@rafal.lemieszewski/tide-ui 0.25.0 → 0.25.1
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.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -110,7 +110,7 @@ Take a look at the reducer(s) handling this action type: ${f.type}.
|
|
|
110
110
|
*
|
|
111
111
|
* This source code is licensed under the MIT license found in the
|
|
112
112
|
* LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/var VF;function Uke(){return VF||(VF=1,process.env.NODE_ENV!=="production"&&(function(){function e(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=M,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,a=t.useEffect,i=t.useMemo,c=t.useDebugValue;Y$.useSyncExternalStoreWithSelector=function(s,l,d,u,p){var f=o(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function k(C){if(!b){if(b=!0,x=C,C=u(C),p!==void 0&&m.hasValue){var S=m.value;if(p(S,C))return w=S}return w=C}if(S=w,r(x,C))return S;var I=u(C);return p!==void 0&&p(S,I)?(x=C,S):(x=C,w=I)}var b=!1,x,w,_=d===void 0?null:d;return[function(){return k(l())},_===null?void 0:function(){return k(_())}]},[l,d,u,p]);var g=n(s,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),c(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Y$}var HF;function Gke(){return HF||(HF=1,process.env.NODE_ENV==="production"?j0.exports=Bke():j0.exports=Uke()),j0.exports}Gke();function Wke(e){e()}function Kke(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Wke(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var FF={notify(){},get:()=>[]};function Xke(e,t){let r,n=FF,o=0,a=!1;function i(g){d();const k=n.subscribe(g);let b=!1;return()=>{b||(b=!0,k(),u())}}function c(){n.notify()}function s(){m.onStateChange&&m.onStateChange()}function l(){return a}function d(){o++,r||(r=e.subscribe(s),n=Kke())}function u(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=FF)}function p(){a||(a=!0,d())}function f(){a&&(a=!1,u())}const m={addNestedSub:i,notifyNestedSubs:c,handleChangeWrapper:s,isSubscribed:l,trySubscribe:p,tryUnsubscribe:f,getListeners:()=>n};return m}var Zke=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yke=Zke(),Jke=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Qke=Jke(),e4e=()=>Yke||Qke?v.useLayoutEffect:v.useEffect,t4e=e4e(),r4e=Symbol.for("react-redux-context"),n4e=typeof globalThis<"u"?globalThis:{};function o4e(){if(!v.createContext)return{};const e=n4e[r4e]??=new Map;let t=e.get(v.createContext);return t||(t=v.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(v.createContext,t)),t}var a4e=o4e();function i4e(e){const{children:t,context:r,serverState:n,store:o}=e,a=v.useMemo(()=>{const s=Xke(o),l={store:o,subscription:s,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return l;{const{identityFunctionCheck:d="once",stabilityCheck:u="once"}=e;return Object.assign(l,{stabilityCheck:u,identityFunctionCheck:d})}},[o,n]),i=v.useMemo(()=>o.getState(),[o]);t4e(()=>{const{subscription:s}=a;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),i!==o.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[a,i]);const c=r||a4e;return v.createElement(c.Provider,{value:a},t)}var c4e=i4e,s4e=(e,t)=>t,JD=X([s4e,qe,oK,At,eX,to,ape,Ot],dpe),QD=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},nZ=Rr("mouseClick"),oZ=Au();oZ.startListening({actionCreator:nZ,effect:(e,t)=>{var r=e.payload,n=JD(t.getState(),QD(r));n?.activeIndex!=null&&t.dispatch(fhe({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var $R=Rr("mouseMove"),aZ=Au();aZ.startListening({actionCreator:$R,effect:(e,t)=>{var r=e.payload,n=t.getState(),o=LD(n,n.tooltip.settings.shared),a=JD(n,QD(r));o==="axis"&&(a?.activeIndex!=null?t.dispatch(WK({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(GK()))}});function l4e(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":t}var BF={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},iZ=Sr({name:"rootProps",initialState:BF,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:BF.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}}}),d4e=iZ.reducer,{updateOptions:u4e}=iZ.actions,cZ=Sr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:wnt}=cZ.actions,h4e=cZ.reducer,sZ=Rr("keyDown"),lZ=Rr("focus"),eT=Au();eT.startListening({actionCreator:sZ,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var i=Number(ND(o,vd(r))),c=to(r);if(a==="Enter"){var s=zN(r,"axis","hover",String(o.index));t.dispatch(vR({active:!o.active,activeIndex:o.index,activeDataKey:o.dataKey,activeCoordinate:s}));return}var l=ahe(r),d=l==="left-to-right"?1:-1,u=a==="ArrowRight"?1:-1,p=i+u*d;if(!(c==null||p>=c.length||p<0)){var f=zN(r,"axis","hover",String(p));t.dispatch(vR({active:!0,activeIndex:p.toString(),activeDataKey:void 0,activeCoordinate:f}))}}}}});eT.startListening({actionCreator:lZ,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var a="0",i=zN(r,"axis","hover",String(a));t.dispatch(vR({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:i}))}}}});var Ar=Rr("externalEvent"),dZ=Au();dZ.startListening({actionCreator:Ar,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:Zhe(r),activeDataKey:oX(r),activeIndex:$o(r),activeLabel:nX(r),activeTooltipIndex:$o(r),isTooltipActive:Yhe(r)};e.payload.handler(n,e.payload.reactEvent)}}});var p4e=X([yd],e=>e.tooltipItemPayloads),f4e=X([p4e,qu,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var o=e.find(c=>c.settings.dataKey===n);if(o!=null){var{positions:a}=o;if(a!=null){var i=t(a,r);return i}}}),uZ=Rr("touchMove"),hZ=Au();hZ.startListening({actionCreator:uZ,effect:(e,t)=>{var r=e.payload,n=t.getState(),o=LD(n,n.tooltip.settings.shared);if(o==="axis"){var a=JD(n,QD({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(WK({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(o==="item"){var i,c=r.touches[0],s=document.elementFromPoint(c.clientX,c.clientY);if(!s||!s.getAttribute)return;var l=s.getAttribute(qG),d=(i=s.getAttribute(VG))!==null&&i!==void 0?i:void 0,u=f4e(t.getState(),l,d);t.dispatch(UK({activeDataKey:d,activeIndex:l,activeCoordinate:u}))}}});var y4e=sG({brush:Rve,cartesianAxis:Gge,chartData:Spe,errorBars:Tye,graphicalItems:gye,layout:rle,legend:Ule,options:xpe,polarAxis:Wfe,polarOptions:h4e,referenceElements:Wve,rootProps:d4e,tooltip:yhe}),v4e=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Ise({reducer:y4e,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([oZ.middleware,aZ.middleware,eT.middleware,dZ.middleware,hZ.middleware]),devTools:{serialize:{replacer:l4e},name:"recharts-".concat(r)}})};function m4e(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=Mt(),a=M.useRef(null);if(o)return r;a.current==null&&(a.current=v4e(t,n));var i=PO;return v.createElement(c4e,{context:i,store:a.current},r)}function g4e(e){var{layout:t,width:r,height:n,margin:o}=e,a=dt(),i=Mt();return M.useEffect(()=>{i||(a(Qse(t)),a(ele({width:r,height:n})),a(Jse(o)))},[a,i,t,r,n,o]),null}function k4e(e){var t=dt();return M.useEffect(()=>{t(u4e(e))},[t,e]),null}var b4e=["children"];function x4e(e,t){if(e==null)return{};var r,n,o=w4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function w4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function WN(){return WN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WN.apply(null,arguments)}var M4e={width:"100%",height:"100%"},_4e=M.forwardRef((e,t)=>{var r=zO(),n=qO(),o=UG();if(!wN(r)||!wN(n))return null;var{children:a,otherAttributes:i,title:c,desc:s}=e,l,d;return typeof i.tabIndex=="number"?l=i.tabIndex:l=o?0:void 0,typeof i.role=="string"?d=i.role:d=o?"application":void 0,v.createElement(kO,WN({},i,{title:c,desc:s,role:d,tabIndex:l,width:r,height:n,style:M4e,ref:t}),a)}),C4e=e=>{var{children:t}=e,r=pe(NA);if(!r)return null;var{width:n,height:o,y:a,x:i}=r;return v.createElement(kO,{width:n,height:o,x:i,y:a},t)},UF=M.forwardRef((e,t)=>{var{children:r}=e,n=x4e(e,b4e),o=Mt();return o?v.createElement(C4e,null,r):v.createElement(_4e,WN({ref:t},n),r)});function S4e(){var e=dt(),[t,r]=M.useState(null),n=pe(Ple);return M.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),a=o.width/t.offsetWidth;Ft(a)&&a!==n&&e(tle(a))}},[t,e,n]),r}function GF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function I4e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GF(Object(r),!0).forEach(function(n){L4e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L4e(e,t,r){return(t=N4e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N4e(e){var t=A4e(e,"string");return typeof t=="symbol"?t:t+""}function A4e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var P4e=M.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:a,onContextMenu:i,onDoubleClick:c,onMouseDown:s,onMouseEnter:l,onMouseLeave:d,onMouseMove:u,onMouseUp:p,onTouchEnd:f,onTouchMove:m,onTouchStart:g,style:k,width:b}=e,x=dt(),[w,_]=M.useState(null),[C,S]=M.useState(null);Npe();var I=S4e(),L=M.useCallback($=>{I($),typeof t=="function"&&t($),_($),S($)},[I,t,_,S]),N=M.useCallback($=>{x(nZ($)),x(Ar({handler:a,reactEvent:$}))},[x,a]),R=M.useCallback($=>{x($R($)),x(Ar({handler:l,reactEvent:$}))},[x,l]),A=M.useCallback($=>{x(GK()),x(Ar({handler:d,reactEvent:$}))},[x,d]),D=M.useCallback($=>{x($R($)),x(Ar({handler:u,reactEvent:$}))},[x,u]),P=M.useCallback(()=>{x(lZ())},[x]),G=M.useCallback($=>{x(sZ($.key))},[x]),ee=M.useCallback($=>{x(Ar({handler:i,reactEvent:$}))},[x,i]),H=M.useCallback($=>{x(Ar({handler:c,reactEvent:$}))},[x,c]),Z=M.useCallback($=>{x(Ar({handler:s,reactEvent:$}))},[x,s]),q=M.useCallback($=>{x(Ar({handler:p,reactEvent:$}))},[x,p]),T=M.useCallback($=>{x(Ar({handler:g,reactEvent:$}))},[x,g]),ne=M.useCallback($=>{x(uZ($)),x(Ar({handler:m,reactEvent:$}))},[x,m]),oe=M.useCallback($=>{x(Ar({handler:f,reactEvent:$}))},[x,f]);return v.createElement(uX.Provider,{value:w},v.createElement(PU.Provider,{value:C},v.createElement("div",{className:De("recharts-wrapper",n),style:I4e({position:"relative",cursor:"default",width:b,height:o},k),onClick:N,onContextMenu:ee,onDoubleClick:H,onFocus:P,onKeyDown:G,onMouseDown:Z,onMouseEnter:R,onMouseLeave:A,onMouseMove:D,onMouseUp:q,onTouchEnd:oe,onTouchMove:ne,onTouchStart:T,ref:L},r)))}),j4e=["children","className","width","height","style","compact","title","desc"];function $4e(e,t){if(e==null)return{};var r,n,o=E4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function E4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var R4e=M.forwardRef((e,t)=>{var{children:r,className:n,width:o,height:a,style:i,compact:c,title:s,desc:l}=e,d=$4e(e,j4e),u=en(d);return c?v.createElement(UF,{otherAttributes:u,title:s,desc:l},r):v.createElement(P4e,{className:n,style:i,width:o,height:a,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},v.createElement(UF,{otherAttributes:u,title:s,desc:l,ref:t},v.createElement(Kve,null,r)))}),O4e=["width","height"];function ER(){return ER=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ER.apply(null,arguments)}function D4e(e,t){if(e==null)return{};var r,n,o=T4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function T4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var z4e={top:5,right:5,bottom:5,left:5},q4e={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:z4e,reverseStackOrder:!1,syncMethod:"index"},iP=M.forwardRef(function(t,r){var n,o=lr(t.categoricalChartProps,q4e),{width:a,height:i}=o,c=D4e(o,O4e);if(!wN(a)||!wN(i))return null;var{chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,categoricalChartProps:p}=t,f={chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,eventEmitter:void 0};return v.createElement(m4e,{preloadedState:{options:f},reduxStoreName:(n=p.id)!==null&&n!==void 0?n:s},v.createElement(Eve,{chartData:p.data}),v.createElement(g4e,{width:a,height:i,layout:o.layout,margin:o.margin}),v.createElement(k4e,{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}),v.createElement(R4e,ER({},c,{width:a,height:i,ref:r})))}),V4e=["axis"],H4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:V4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),F4e=["axis","item"],WF=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:F4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),B4e=["item"],U4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:B4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),G4e=["axis"],W4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:G4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t}));const Td=(e,t=0)=>{const n=e.toFixed(t).split("."),o=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," ");return t>0&&n[1]?`${o}.${n[1]}`:o},KF=(e,t,r=5)=>{if(!e.length||!t.length)return[0,100];let n=1/0,o=-1/0;if(e.forEach(u=>{t.forEach(p=>{const f=u[p];typeof f=="number"?(n=Math.min(n,f),o=Math.max(o,f)):Array.isArray(f)&&f.forEach(m=>{typeof m=="number"&&(n=Math.min(n,m),o=Math.max(o,m))})})}),n===1/0||o===-1/0)return[0,100];const i=(o-n)/(r-1),c=Math.pow(10,Math.floor(Math.log10(i)));let s;i/c<1.5?s=c:i/c<3?s=2*c:i/c<7?s=5*c:s=10*c;const l=Math.floor(n/s)*s,d=Math.ceil(o/s)*s;return[l,d]},XF=(e,t,r,n=20)=>{if(!e.length)return n;let o=0;e.forEach(c=>{t.forEach(s=>{const l=c[s];typeof l=="number"?o=Math.max(o,Math.abs(l)):Array.isArray(l)&&l.forEach(d=>{typeof d=="number"&&(o=Math.max(o,Math.abs(d)))})})});const i=(r?r(o,0):o.toString()).length;return Math.max(n,i*6+12)},lo={bar:["var(--color-chart-bar-1)","var(--color-chart-bar-2)","var(--color-chart-bar-3)","var(--color-chart-bar-4)","var(--color-chart-bar-5)","var(--color-chart-bar-6)"],line:["var(--color-chart-line-1)","var(--color-chart-line-2)","var(--color-chart-line-3)","var(--color-chart-line-4)","var(--color-chart-line-5)"],scatter:["var(--color-chart-scatter-1)","var(--color-chart-scatter-2)","var(--color-chart-scatter-3)","var(--color-chart-scatter-4)","var(--color-chart-scatter-5)","var(--color-chart-scatter-6)"],area:["var(--color-chart-area-1)","var(--color-chart-area-2)","var(--color-chart-area-3)","var(--color-chart-area-4)","var(--color-chart-area-5)","var(--color-chart-area-6)"],accessible:["#0066CC","#CC6600","#009966","#CC0066","#6600CC","#CC9900","#006666","#CC0000"]},Pl=e=>{switch(e){case"dashed":return"5 5";case"dotted":return"2 2";case"solid":default:return}},K4e=(e="circle")=>t=>{const{cx:r,cy:n,r:o,fill:a,stroke:i,strokeWidth:c}=t,s=o||4;switch(e){case"triangle":const l=s*1.5,d=s*1.3,u=`M ${r},${n-l} L ${r+d},${n+l/2} L ${r-d},${n+l/2} Z`;return y.jsx("path",{d:u,fill:a,stroke:i,strokeWidth:c||0});case"square":const p=s*1.4;return y.jsx("rect",{x:r-p,y:n-p,width:p*2,height:p*2,fill:a,stroke:i,strokeWidth:c||0});case"circle":default:return y.jsx("circle",{cx:r,cy:n,r:s,fill:a,stroke:i,strokeWidth:c||0})}},ZF=e=>({verticalAlign:"bottom",align:"center"}),zd=({active:e,payload:t,label:r,config:n,tooltipMaxWidth:o="max-w-xs",chartType:a,referenceMarkers:i})=>{if(!e||!t||!t.length)return null;const c=i?.filter(s=>s.xValue===r)||[];return y.jsxs("div",{className:`rounded-sm border border-[var(--color-border-primary-bold)] bg-[var(--color-surface-primary)] p-[var(--space-md)] shadow-md min-w-[120px] ${o}`,role:"tooltip","aria-label":"Chart data tooltip",children:[y.jsx("p",{className:"text-label-sm mb-[var(--space-xsm)] text-[var(--color-text-primary)]",children:r}),t.map((s,l)=>{const d=n[s.dataKey];let u;if(d?.type==="range-area"&&s.payload){const f=s.payload[s.dataKey];Array.isArray(f)&&f.length===2?u=`${Td(f[0])} – ${Td(f[1])}`:u=typeof s.value=="number"?Td(s.value):s.value}else u=typeof s.value=="number"?Td(s.value):s.value;const p=()=>{switch(a){case"line":const f=n[s.dataKey]?.strokeStyle,m=Pl(f);return y.jsx("div",{className:"w-3 h-0.5 flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:m?`linear-gradient(to right, ${s.color} 50%, transparent 50%)`:s.color,backgroundSize:m==="5 5"?"6px 100%":m==="2 2"?"2px 100%":"100% 100%"}})});case"scatter":return y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"});case"composed":switch(n[s.dataKey]?.type){case"line":const k=n[s.dataKey]?.strokeStyle,b=Pl(k);return y.jsx("div",{className:"w-3 h-0.5 flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:b?`linear-gradient(to right, ${s.color} 50%, transparent 50%)`:s.color,backgroundSize:b==="5 5"?"6px 100%":b==="2 2"?"2px 100%":"100% 100%"}})});case"area":case"range-area":return y.jsx("div",{className:"w-2.5 h-2.5 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"});case"bar":default:return y.jsx("div",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"})}case"bar":case"horizontal-bar":case"area":default:return y.jsx("div",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"})}};return y.jsxs("div",{className:"flex items-center gap-[var(--space-xsm)]",children:[p(),y.jsxs("span",{className:"text-body-sm text-[var(--color-text-primary)] min-w-0 break-words",children:[d?.label||s.dataKey,":"]}),y.jsx("span",{className:"text-body-medium-sm text-[var(--color-text-primary)] ml-auto pl-[16px]",children:u})]},l)}),c.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"border-t border-[var(--color-border-primary-subtle)] my-[var(--space-xsm)]"}),c.map((s,l)=>y.jsxs(M.Fragment,{children:[s.tooltipLabel&&y.jsx("p",{className:"text-body-sm font-medium mb-[var(--space-xsm)] text-[var(--color-text-secondary)]",children:s.tooltipLabel}),!s.tooltipLabel&&l===0&&y.jsx("p",{className:"text-body-sm font-medium mb-[var(--space-xsm)] text-[var(--color-text-secondary)]",children:"Reference Markers:"}),s.dataPoints.map((d,u)=>{const p=()=>{switch(d.shape||"circle"){case"triangle":return y.jsx("svg",{width:8,height:8,className:"flex-shrink-0",viewBox:"0 0 10 10",children:y.jsx("path",{d:"M 5,2 L 8,8 L 2,8 Z",fill:d.fill||"var(--color-chart-line-1)",stroke:d.stroke||"transparent",strokeWidth:d.strokeWidth||0})});case"square":return y.jsx("svg",{width:8,height:8,className:"flex-shrink-0",viewBox:"0 0 10 10",children:y.jsx("rect",{x:"2",y:"2",width:"6",height:"6",fill:d.fill||"var(--color-chart-line-1)",stroke:d.stroke||"transparent",strokeWidth:d.strokeWidth||0})});case"circle":default:return y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:d.fill||"var(--color-chart-line-1)",border:d.stroke?`${d.strokeWidth||1}px solid ${d.stroke}`:"none"}})}};return y.jsxs("div",{className:"flex items-center gap-[var(--space-xsm)] text-caption-sm",children:[p(),y.jsxs("span",{className:"text-[var(--color-text-secondary)] min-w-0 break-words",children:[d.label||`Marker ${u+1}`,":"]}),y.jsx("span",{className:"font-medium text-[var(--color-text-primary)] ml-auto",children:Td(d.yValue)})]},`marker-${l}-point-${u}`)})]},`marker-section-${l}`))]})]})};function pZ({type:e,data:t,config:r,className:n,height:o=300,width:a,minWidth:i=300,onDataPointClick:c,onDataPointHover:s,highlightedIndex:l,showGrid:d=!0,showLegend:u=!0,showTooltip:p=!0,colorScheme:f,responsive:m=!0,maintainAspectRatio:g=!1,legendHeight:k,margin:b,yAxisWidth:x,yAxisTickCount:w,xAxisTickFormatter:_,yAxisTickFormatter:C,showRightYAxis:S=!1,rightYAxisWidth:I,rightYAxisTickCount:L,rightYAxisDomain:N,rightYAxisTickFormatter:R,title:A,description:D,showDataTable:P=!1,tooltipMaxWidth:G="max-w-xs",legendOrder:ee,legendPosition:H="bottom",referenceMarkers:Z,yAxisDomain:q,roundYAxis:T=!1,...ne}){const oe=M.useMemo(()=>{if(f)return lo[f];switch(e){case"bar":case"horizontal-bar":return lo.bar;case"line":return lo.line;case"scatter":return lo.scatter;case"composed":return lo.bar;default:return lo.bar}},[e,f]),$=Object.keys(r).filter(Q=>Q!=="name"),E=M.useMemo(()=>t.map(Q=>{const de={...Q};return $.forEach(Me=>{if(r[Me].type==="range-area"){const Ee=Q[Me];Array.isArray(Ee)&&Ee.length===2&&(de[Me]=Ee,de[`${Me}_min`]=Ee[0],de[`${Me}_max`]=Ee[1])}}),de}),[t,r,$]),F=M.useCallback(Q=>{const de=Q?.activeTooltipIndex??0;s?.(Q?.activePayload?.[0]?.payload,de)},[s]),z=M.useCallback(()=>{s?.(null)},[s]),Y=M.useCallback(Q=>{const de=Q?.activeTooltipIndex??0;c?.(Q?.activePayload?.[0]?.payload,de)},[c]),O=()=>{const Q={top:0,right:0,left:0,bottom:0};return{top:b?.top??Q.top,right:b?.right??Q.right+B,left:b?.left??Q.left,bottom:b?.bottom??Q.bottom}},J=M.useMemo(()=>x||XF(E,$,C,20),[x,E,$,C]),B=M.useMemo(()=>{if(!S)return 0;if(I)return I;const Q=$.filter(de=>r[de].yAxisId==="right");return Q.length===0?0:XF(E,Q,R,20)},[S,I,E,$,r,R]),K=M.useMemo(()=>$.some(de=>(r[de].yAxisId||"left")==="left")?"left":"right",[$,r]),U=k?{...ZF(),wrapperStyle:{position:"absolute",bottom:0,left:0,right:0,height:k,paddingTop:8}}:ZF(),V={data:E,margin:O()},ce={axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:!1,tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},tickFormatter:_},te=M.useMemo(()=>$.filter(Q=>(r[Q].yAxisId||"left")==="left"),[$,r]),Ne=M.useMemo(()=>$.filter(Q=>r[Q].yAxisId==="right"),[$,r]),Ae=M.useMemo(()=>!T||q?q:KF(E,te,w||5),[T,q,E,te,w]),Re=M.useMemo(()=>!T||N?N:KF(E,Ne,L||5),[T,N,E,Ne,L]),Ve={axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:J,tickFormatter:C,...w&&{tickCount:w},...Ae&&{domain:Ae},...T&&{allowDecimals:!1}},tt={stroke:"var(--color-border-primary-subtle)",horizontal:!0,vertical:!1},Je=({payload:Q})=>{if(!Q||!Q.length)return null;const de=ee?[...Q].sort((Oe,kt)=>{const Te=ee.indexOf(Oe.dataKey),ft=ee.indexOf(kt.dataKey);return Te===-1?1:ft===-1?-1:Te-ft}):Q,Ee=O().left+5;return y.jsx("div",{style:{paddingLeft:`${Ee}px`,paddingRight:"16px"},children:y.jsx("div",{className:"flex flex-wrap justify-start items-start gap-x-[var(--space-md)] gap-y-[var(--space-sm)]",children:de.map((Oe,kt)=>{const Te=()=>{switch(e){case"line":const ft=r[Oe.dataKey]?.strokeStyle,yt=Pl(ft);return y.jsx("div",{className:"w-[12px] h-[2px] flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:yt?`linear-gradient(to right, ${Oe.color} 50%, transparent 50%)`:Oe.color,backgroundSize:yt==="5 5"?"8px 100%":yt==="2 2"?"3px 100%":"100% 100%"}})});case"scatter":return y.jsx("div",{className:"w-[6px] h-[6px] rounded-full flex-shrink-0",style:{backgroundColor:Oe.color},"aria-hidden":"true"});case"composed":switch(r[Oe.dataKey]?.type){case"line":const an=r[Oe.dataKey]?.strokeStyle,Qt=Pl(an);return y.jsx("div",{className:"w-[12px] h-[2px] flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:Qt?`linear-gradient(to right, ${Oe.color} 50%, transparent 50%)`:Oe.color,backgroundSize:Qt==="5 5"?"8px 100%":Qt==="2 2"?"3px 100%":"100% 100%"}})});case"area":case"range-area":return y.jsx("div",{className:"w-[8px] h-[8px] flex-shrink-0",style:{backgroundColor:Oe.color},"aria-hidden":"true"});case"bar":default:return y.jsx("div",{className:"w-[6px] h-[6px] flex-shrink-0",style:{backgroundColor:Oe.color},"aria-hidden":"true"})}case"bar":case"horizontal-bar":default:return y.jsx("div",{className:"w-[6px] h-[6px] flex-shrink-0",style:{backgroundColor:Oe.color},"aria-hidden":"true"})}};return y.jsxs("div",{className:"flex items-center justify-center gap-[var(--space-xsm)]",children:[Te(),y.jsx("span",{className:"[&]:text-body-medium-xsm [&]:text-[var(--color-text-secondary)] leading-none whitespace-nowrap",children:Oe.value})]},kt)})})})},gt=()=>{switch(e){case"bar":return y.jsxs(WF,{...V,onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt}),y.jsx(qs,{dataKey:"name",...ce}),y.jsx(An,{...Ve}),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return y.jsx(Z0,{dataKey:Q,name:r[Q].label,fill:Me,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:60},Q)})]});case"horizontal-bar":return y.jsxs(WF,{...V,layout:"vertical",onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt,horizontal:!1,vertical:!0}),y.jsx(qs,{type:"number",...ce}),y.jsx(An,{type:"category",dataKey:"name",...Ve}),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return y.jsx(Z0,{dataKey:Q,name:r[Q].label,fill:Me,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:40},Q)})]});case"line":return y.jsxs(H4e,{...V,onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt,yAxisId:K}),y.jsx(qs,{dataKey:"name",...ce}),y.jsx(An,{yAxisId:"left",...Ve}),S&&y.jsx(An,{yAxisId:"right",orientation:"right",axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:B,tickFormatter:R,...L&&{tickCount:L},...Re&&{domain:Re},...T&&{allowDecimals:!1}}),Z?.map((Q,de)=>Q.showLine!==!1&&y.jsx(UD,{x:Q.xValue,stroke:Q.lineStyle?.stroke||"#000000",strokeWidth:Q.lineStyle?.strokeWidth||2,strokeDasharray:Q.lineStyle?.strokeDasharray},`marker-line-${de}`)),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e,referenceMarkers:Z}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return y.jsx(IR,{type:"linear",dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",stroke:Me,strokeWidth:2,strokeDasharray:Pl(r[Q].strokeStyle),dot:r[Q].showDots===!0?{fill:Me,strokeWidth:0,r:3}:!1,activeDot:{r:5,fill:Me},className:"cursor-pointer transition-colors",isAnimationActive:!1},Q)}),Z?.map((Q,de)=>y.jsx(M.Fragment,{children:Q.dataPoints.map((Me,Ee)=>y.jsx(WD,{x:Q.xValue,y:Me.yValue,r:Me.size||4,fill:Me.fill||"var(--color-chart-line-1)",stroke:Me.stroke||"transparent",strokeWidth:Me.strokeWidth||0,shape:K4e(Me.shape||"circle")},`marker-${de}-point-${Ee}`))},`marker-dots-${de}`))]});case"scatter":return y.jsxs(U4e,{...V,onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt}),y.jsx(qs,{dataKey:"x",type:"number",...ce}),y.jsx(An,{dataKey:"y",type:"number",...Ve}),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.filter(Q=>Q!=="x"&&Q!=="y"&&Q!=="name").map((Q,de)=>{const Me=r[Q]?.color||oe[de%oe.length];return y.jsx(QX,{name:r[Q]?.label||Q,data:t.map(Ee=>({x:Ee.x,y:Ee.y,[Q]:Ee[Q]})),fill:Me,className:"cursor-pointer transition-colors",isAnimationActive:!1},Q)})]});case"composed":return y.jsxs(W4e,{...V,onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt,yAxisId:K}),y.jsx(qs,{dataKey:"name",...ce}),y.jsx(An,{yAxisId:"left",...Ve,domain:[0,"dataMax"]}),S&&y.jsx(An,{yAxisId:"right",orientation:"right",axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:B,tickFormatter:R,...L&&{tickCount:L},...Re&&{domain:Re},...T&&{allowDecimals:!1}}),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return(r[Q].type||"bar")==="bar"?y.jsx(Z0,{dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",fill:Me,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:60},Q):null}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length],Ee=r[Q].type||"bar";return Ee==="area"?y.jsx(NR,{type:"linear",dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",stroke:r[Q].stroke??Me,fill:r[Q].fill??Me,fillOpacity:.3,className:"cursor-pointer transition-colors",isAnimationActive:!1},Q):Ee==="range-area"?y.jsx(NR,{type:"linear",dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",stroke:r[Q].stroke??"none",fill:r[Q].fill??Me,fillOpacity:.3,className:"cursor-pointer transition-colors",isAnimationActive:!1},Q):null}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return(r[Q].type||"bar")==="line"?y.jsx(IR,{type:"linear",dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",stroke:Me,strokeWidth:2,strokeDasharray:Pl(r[Q].strokeStyle),dot:r[Q].showDots===!0?{fill:Me,strokeWidth:0,r:3}:!1,activeDot:{r:5,fill:Me},className:"cursor-pointer transition-colors",isAnimationActive:!1},Q):null})]});default:return y.jsx("div",{children:"Unsupported chart type"})}},Fe=()=>P?y.jsx("div",{className:"sr-only",children:y.jsxs("table",{role:"table","aria-label":A?`Data for ${A}`:"Chart data",children:[y.jsxs("caption",{className:"sr-only",children:[A&&`${A}. `,D||`${e} chart showing ${$.length} data series across ${t.length} categories.`]}),y.jsx("thead",{children:y.jsxs("tr",{children:[y.jsx("th",{scope:"col",children:"Category"}),$.map(Q=>y.jsx("th",{scope:"col",children:r[Q]?.label||Q},Q))]})}),y.jsx("tbody",{children:t.map((Q,de)=>y.jsxs("tr",{children:[y.jsx("th",{scope:"row",children:Q.name||`Item ${de+1}`}),$.map(Me=>y.jsx("td",{children:C?C(Q[Me],de):Q[Me]},Me))]},de))})]})}):null,rt=M.useRef(null);return M.useEffect(()=>{const Q=rt.current;if(!Q)return;const de=setTimeout(()=>{Q.querySelectorAll(".recharts-cartesian-axis-tick").forEach(Ee=>{const Oe=Ee.querySelector("text"),kt=Ee.querySelector(".recharts-cartesian-axis-tick-line");Oe?.textContent?.trim()==="0"&&kt&&kt.setAttribute("stroke-width","2")})},100);return()=>clearTimeout(de)},[t,e]),y.jsxs("div",{ref:rt,className:j("w-full",n),style:{minWidth:i},role:"img","aria-label":A||`${e} chart`,"aria-describedby":D?`${rt.current?.id||"chart"}-desc`:void 0,...ne,children:[A&&y.jsx("h3",{className:"sr-only",id:`${rt.current?.id||"chart"}-title`,children:A}),D&&y.jsx("p",{className:"sr-only",id:`${rt.current?.id||"chart"}-desc`,children:D}),(()=>{const Q=k?o-k:o,de=m?y.jsx(Wpe,{width:a||"100%",height:Q,children:gt()||y.jsx("div",{children:"Chart error"})}):y.jsx("div",{style:{width:a||"100%",height:Q,minWidth:i},children:gt()||y.jsx("div",{children:"Chart error"})});return k?y.jsx("div",{style:{width:a||"100%"},children:de}):de})(),y.jsx(Fe,{})]})}const X4e=(e,t="bar")=>{const r=lo[t];return Array.from({length:e},(n,o)=>r[o%r.length])},Z4e=(e,t,r)=>Array.isArray(e)?e.reduce((o,a,i)=>(o[a]={label:t?.[i]||a,color:r?.[i]},o),{}):e;function Y4e(e,t){const r=v.createContext(t),n=a=>{const{children:i,...c}=a,s=v.useMemo(()=>c,Object.values(c));return y.jsx(r.Provider,{value:s,children:i})};n.displayName=e+"Provider";function o(a){const i=v.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function mt(e,t=[]){let r=[];function n(a,i){const c=v.createContext(i),s=r.length;r=[...r,i];const l=u=>{const{scope:p,children:f,...m}=u,g=p?.[e]?.[s]||c,k=v.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:k,children:f})};l.displayName=a+"Provider";function d(u,p){const f=p?.[e]?.[s]||c,m=v.useContext(f);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[l,d]}const o=()=>{const a=r.map(i=>v.createContext(i));return function(c){const s=c?.[e]||a;return v.useMemo(()=>({[`__scope${e}`]:{...c,[e]:s}}),[c,s])}};return o.scopeName=e,[n,J4e(o,...t)]}function J4e(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((c,{useScope:s,scopeName:l})=>{const u=s(a)[`__scope${l}`];return{...c,...u}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Rt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>t.current?.(...r),[])}var vt=globalThis?.document?v.useLayoutEffect:()=>{};function YF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wn(...e){return t=>{let r=!1;const n=e.map(o=>{const a=YF(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():YF(e[o],null)}}}}function Se(...e){return v.useCallback(Wn(...e),e)}function Eo(e){const t=e5e(e),r=v.forwardRef((n,o)=>{const{children:a,...i}=n,c=v.Children.toArray(a),s=c.find(t5e);if(s){const l=s.props.children,d=c.map(u=>u===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:u);return y.jsx(t,{...i,ref:o,children:v.isValidElement(l)?v.cloneElement(l,void 0,d):null})}return y.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Q4e=Eo("Slot");function e5e(e){const t=v.forwardRef((r,n)=>{const{children:o,...a}=r;if(v.isValidElement(o)){const i=n5e(o),c=r5e(a,o.props);return o.type!==v.Fragment&&(c.ref=n?Wn(n,i):i),v.cloneElement(o,c)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fZ=Symbol("radix.slottable");function yZ(e){const t=({children:r})=>y.jsx(y.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=fZ,t}function t5e(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fZ}function r5e(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...c)=>{const s=a(...c);return o(...c),s}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function n5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var o5e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=o5e.reduce((e,t)=>{const r=Eo(`Primitive.${t}`),n=v.forwardRef((o,a)=>{const{asChild:i,...c}=o,s=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...c,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vZ(e,t){e&&fA.flushSync(()=>e.dispatchEvent(t))}var a5e=AO();function i5e(){return a5e.useSyncExternalStore(c5e,()=>!0,()=>!1)}function c5e(){return()=>{}}var tT="Avatar",[s5e,Mnt]=mt(tT),[l5e,mZ]=s5e(tT),gZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,a]=v.useState("idle");return y.jsx(l5e,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:y.jsx(ie.span,{...n,ref:t})})});gZ.displayName=tT;var kZ="AvatarImage",bZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=mZ(kZ,r),c=d5e(n,a),s=Rt(l=>{o(l),i.onImageLoadingStatusChange(l)});return vt(()=>{c!=="idle"&&s(c)},[c,s]),c==="loaded"?y.jsx(ie.img,{...a,ref:t,src:n}):null});bZ.displayName=kZ;var xZ="AvatarFallback",wZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,a=mZ(xZ,r),[i,c]=v.useState(n===void 0);return v.useEffect(()=>{if(n!==void 0){const s=window.setTimeout(()=>c(!0),n);return()=>window.clearTimeout(s)}},[n]),i&&a.imageLoadingStatus!=="loaded"?y.jsx(ie.span,{...o,ref:t}):null});wZ.displayName=xZ;function JF(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function d5e(e,{referrerPolicy:t,crossOrigin:r}){const n=i5e(),o=v.useRef(null),a=n?(o.current||(o.current=new window.Image),o.current):null,[i,c]=v.useState(()=>JF(a,e));return vt(()=>{c(JF(a,e))},[a,e]),vt(()=>{const s=u=>()=>{c(u)};if(!a)return;const l=s("loaded"),d=s("error");return a.addEventListener("load",l),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",l),a.removeEventListener("error",d)}},[a,r,t]),i}var MZ=gZ,_Z=bZ,CZ=wZ;const SZ=ze("relative flex shrink-0 overflow-hidden items-center justify-center",{variants:{size:{xxs:"h-4 w-4",xs:"h-[var(--size-sm)] w-[var(--size-sm)]",sm:"h-[var(--size-md)] w-[var(--size-md)]",md:"h-[var(--size-lg)] w-[var(--size-lg)]",lg:"h-[var(--size-xlg)] w-[var(--size-xlg)]",xl:"h-[var(--size-2xlg)] w-[var(--size-2xlg)]"},shape:{circle:"rounded-full",rounded:"rounded-md"}},defaultVariants:{size:"md",shape:"circle"}}),IZ=ze("flex h-full w-full items-center justify-center font-medium [&]:text-[var(--color-text-inverse)]",{variants:{size:{xxs:"text-caption-xsm",xs:"text-caption-xsm",sm:"text-caption-sm",md:"text-label-sm",lg:"text-label-md",xl:"text-heading-sm"},shape:{circle:"rounded-full",rounded:"rounded-md"},variant:{information:"bg-[var(--color-background-information-bold)]",success:"bg-[var(--color-background-success-bold)]",error:"bg-[var(--color-background-error-bold)]",warning:"bg-[var(--color-background-warning-bold)]",violet:"bg-[var(--violet-500)]",magenta:"bg-[var(--magenta-500)]"}},defaultVariants:{size:"md",shape:"circle",variant:"information"}}),LZ=v.forwardRef(({className:e,size:t,shape:r,...n},o)=>y.jsx(MZ,{ref:o,className:j(SZ({size:t,shape:r}),e),...n}));LZ.displayName=MZ.displayName;const NZ=v.forwardRef(({className:e,...t},r)=>y.jsxs("div",{className:"relative h-full w-full rounded-[inherit]",children:[y.jsx(_Z,{ref:r,className:j("aspect-square h-full w-full object-cover rounded-[inherit]",e),...t}),y.jsx("div",{className:"absolute inset-0 rounded-[inherit] shadow-[inset_0_0_0_1px_rgba(85,95,109,0.1)] pointer-events-none"})]}));NZ.displayName=_Z.displayName;const AZ=v.forwardRef(({className:e,size:t,shape:r,variant:n,...o},a)=>y.jsx(CZ,{ref:a,className:j(IZ({size:t,shape:r,variant:n}),e),...o}));AZ.displayName=CZ.displayName;const u5e=ze("inline-flex items-center rounded-sm px-[var(--space-sm)] py-[var(--space-xsm)] text-caption-medium-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-1 cursor-default",{variants:{variant:{default:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]",secondary:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]",destructive:"border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]",outline:"bg-transparent border border-[var(--color-border-primary-strong)] text-[var(--color-text-primary)]"},intent:{neutral:"",brand:"",success:"",warning:"",destructive:""},appearance:{solid:"border-transparent",subtle:"border-transparent",outline:"bg-transparent"},size:{sm:"px-[var(--space-xsm)] h-5 [&]:text-body-strong-xsm",md:"px-[var(--space-sm)] h-6 [&]:text-body-strong-sm",lg:"px-[var(--space-md)] h-7 [&]:text-body-strong-md"}},compoundVariants:[{intent:"neutral",appearance:"solid",class:"border-transparent bg-[var(--grey-600)] text-[var(--color-text-inverse)]"},{intent:"neutral",appearance:"subtle",class:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]"},{intent:"neutral",appearance:"outline",class:"border border-[var(--color-border-primary-strong)] text-[var(--color-text-primary)]"},{intent:"brand",appearance:"solid",class:"border-transparent bg-[var(--color-background-brand)] text-[var(--color-text-inverse)]"},{intent:"brand",appearance:"subtle",class:"border-transparent bg-[var(--blue-50)] text-[var(--color-text-brand)]"},{intent:"brand",appearance:"outline",class:"border border-[var(--color-blue-300)] text-[var(--color-text-brand)]"},{intent:"success",appearance:"solid",class:"border-transparent bg-[var(--color-background-success-bold)] text-[var(--color-text-inverse)]"},{intent:"success",appearance:"subtle",class:"border-transparent bg-[var(--color-background-success)] text-[var(--color-text-success)]"},{intent:"success",appearance:"outline",class:"border border-[var(--color-border-success)] text-[var(--color-text-success)]"},{intent:"warning",appearance:"solid",class:"border-transparent bg-[var(--color-background-warning-bold)] text-[var(--color-text-inverse)]"},{intent:"warning",appearance:"subtle",class:"border-transparent bg-[var(--color-background-warning)] text-[var(--color-text-warning)]"},{intent:"warning",appearance:"outline",class:"border border-[var(--color-border-warning)] text-[var(--color-text-warning)]"},{intent:"destructive",appearance:"solid",class:"border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]"},{intent:"destructive",appearance:"subtle",class:"border-transparent bg-[var(--color-background-error)] text-[var(--color-text-error)]"},{intent:"destructive",appearance:"outline",class:"border border-[var(--color-border-error)] text-[var(--color-text-error)]"}],defaultVariants:{variant:"default",intent:"neutral",appearance:"subtle",size:"md"}}),or=v.forwardRef(({className:e,variant:t,intent:r,appearance:n,size:o,...a},i)=>y.jsx("div",{ref:i,className:j(u5e({variant:t,intent:r,appearance:n,size:o}),e),...a}));or.displayName="Badge";function ae(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var h5e=v[" useInsertionEffect ".trim().toString()]||vt;function Bt({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=p5e({defaultProp:t,onChange:r}),c=e!==void 0,s=c?e:o;{const d=v.useRef(e!==void 0);v.useEffect(()=>{const u=d.current;u!==c&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,n])}const l=v.useCallback(d=>{if(c){const u=f5e(d)?d(e):d;u!==e&&i.current?.(u)}else a(d)},[c,e,a,i]);return[s,l]}function p5e({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),o=v.useRef(r),a=v.useRef(t);return h5e(()=>{a.current=t},[t]),v.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function f5e(e){return typeof e=="function"}function y5e(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var jt=e=>{const{present:t,children:r}=e,n=v5e(t),o=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=Se(n.ref,m5e(o));return typeof r=="function"||n.isPresent?v.cloneElement(o,{ref:a}):null};jt.displayName="Presence";function v5e(e){const[t,r]=v.useState(),n=v.useRef(null),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[c,s]=y5e(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=$0(n.current);a.current=c==="mounted"?l:"none"},[c]),vt(()=>{const l=n.current,d=o.current;if(d!==e){const p=a.current,f=$0(l);e?s("MOUNT"):f==="none"||l?.display==="none"?s("UNMOUNT"):s(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,s]),vt(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=f=>{const g=$0(n.current).includes(CSS.escape(f.animationName));if(f.target===t&&g&&(s("ANIMATION_END"),!o.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},p=f=>{f.target===t&&(a.current=$0(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function $0(e){return e?.animationName||"none"}function m5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var g5e=v[" useId ".trim().toString()]||(()=>{}),k5e=0;function wt(e){const[t,r]=v.useState(g5e());return vt(()=>{r(n=>n??String(k5e++))},[e]),e||(t?`radix-${t}`:"")}var cP="Collapsible",[b5e,PZ]=mt(cP),[x5e,rT]=b5e(cP),jZ=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[s,l]=Bt({prop:n,defaultProp:o??!1,onChange:i,caller:cP});return y.jsx(x5e,{scope:r,disabled:a,contentId:wt(),open:s,onOpenToggle:v.useCallback(()=>l(d=>!d),[l]),children:y.jsx(ie.div,{"data-state":oT(s),"data-disabled":a?"":void 0,...c,ref:t})})});jZ.displayName=cP;var $Z="CollapsibleTrigger",yu=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=rT($Z,r);return y.jsx(ie.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":oT(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:ae(e.onClick,o.onOpenToggle)})});yu.displayName=$Z;var nT="CollapsibleContent",sP=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rT(nT,e.__scopeCollapsible);return y.jsx(jt,{present:r||o.open,children:({present:a})=>y.jsx(w5e,{...n,ref:t,present:a})})});sP.displayName=nT;var w5e=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=rT(nT,r),[c,s]=v.useState(n),l=v.useRef(null),d=Se(t,l),u=v.useRef(0),p=u.current,f=v.useRef(0),m=f.current,g=i.open||c,k=v.useRef(g),b=v.useRef(void 0);return v.useEffect(()=>{const x=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(x)},[]),vt(()=>{const x=l.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();u.current=w.height,f.current=w.width,k.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),s(n)}},[i.open,n]),y.jsx(ie.div,{"data-state":oT(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&o})});function oT(e){return e?"open":"closed"}var EZ=jZ,M5e=yu,_5e=sP;/**
|
|
113
|
+
*/var VF;function Uke(){return VF||(VF=1,process.env.NODE_ENV!=="production"&&(function(){function e(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=M,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,o=t.useRef,a=t.useEffect,i=t.useMemo,c=t.useDebugValue;Y$.useSyncExternalStoreWithSelector=function(s,l,d,u,p){var f=o(null);if(f.current===null){var m={hasValue:!1,value:null};f.current=m}else m=f.current;f=i(function(){function k(C){if(!b){if(b=!0,x=C,C=u(C),p!==void 0&&m.hasValue){var S=m.value;if(p(S,C))return w=S}return w=C}if(S=w,r(x,C))return S;var I=u(C);return p!==void 0&&p(S,I)?(x=C,S):(x=C,w=I)}var b=!1,x,w,_=d===void 0?null:d;return[function(){return k(l())},_===null?void 0:function(){return k(_())}]},[l,d,u,p]);var g=n(s,f[0],f[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),c(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Y$}var HF;function Gke(){return HF||(HF=1,process.env.NODE_ENV==="production"?j0.exports=Bke():j0.exports=Uke()),j0.exports}Gke();function Wke(e){e()}function Kke(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Wke(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var FF={notify(){},get:()=>[]};function Xke(e,t){let r,n=FF,o=0,a=!1;function i(g){d();const k=n.subscribe(g);let b=!1;return()=>{b||(b=!0,k(),u())}}function c(){n.notify()}function s(){m.onStateChange&&m.onStateChange()}function l(){return a}function d(){o++,r||(r=e.subscribe(s),n=Kke())}function u(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=FF)}function p(){a||(a=!0,d())}function f(){a&&(a=!1,u())}const m={addNestedSub:i,notifyNestedSubs:c,handleChangeWrapper:s,isSubscribed:l,trySubscribe:p,tryUnsubscribe:f,getListeners:()=>n};return m}var Zke=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yke=Zke(),Jke=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Qke=Jke(),e4e=()=>Yke||Qke?v.useLayoutEffect:v.useEffect,t4e=e4e(),r4e=Symbol.for("react-redux-context"),n4e=typeof globalThis<"u"?globalThis:{};function o4e(){if(!v.createContext)return{};const e=n4e[r4e]??=new Map;let t=e.get(v.createContext);return t||(t=v.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(v.createContext,t)),t}var a4e=o4e();function i4e(e){const{children:t,context:r,serverState:n,store:o}=e,a=v.useMemo(()=>{const s=Xke(o),l={store:o,subscription:s,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return l;{const{identityFunctionCheck:d="once",stabilityCheck:u="once"}=e;return Object.assign(l,{stabilityCheck:u,identityFunctionCheck:d})}},[o,n]),i=v.useMemo(()=>o.getState(),[o]);t4e(()=>{const{subscription:s}=a;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),i!==o.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[a,i]);const c=r||a4e;return v.createElement(c.Provider,{value:a},t)}var c4e=i4e,s4e=(e,t)=>t,JD=X([s4e,qe,oK,At,eX,to,ape,Ot],dpe),QD=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},nZ=Rr("mouseClick"),oZ=Au();oZ.startListening({actionCreator:nZ,effect:(e,t)=>{var r=e.payload,n=JD(t.getState(),QD(r));n?.activeIndex!=null&&t.dispatch(fhe({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var $R=Rr("mouseMove"),aZ=Au();aZ.startListening({actionCreator:$R,effect:(e,t)=>{var r=e.payload,n=t.getState(),o=LD(n,n.tooltip.settings.shared),a=JD(n,QD(r));o==="axis"&&(a?.activeIndex!=null?t.dispatch(WK({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(GK()))}});function l4e(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":t}var BF={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},iZ=Sr({name:"rootProps",initialState:BF,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:BF.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}}}),d4e=iZ.reducer,{updateOptions:u4e}=iZ.actions,cZ=Sr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:wnt}=cZ.actions,h4e=cZ.reducer,sZ=Rr("keyDown"),lZ=Rr("focus"),eT=Au();eT.startListening({actionCreator:sZ,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var i=Number(ND(o,vd(r))),c=to(r);if(a==="Enter"){var s=zN(r,"axis","hover",String(o.index));t.dispatch(vR({active:!o.active,activeIndex:o.index,activeDataKey:o.dataKey,activeCoordinate:s}));return}var l=ahe(r),d=l==="left-to-right"?1:-1,u=a==="ArrowRight"?1:-1,p=i+u*d;if(!(c==null||p>=c.length||p<0)){var f=zN(r,"axis","hover",String(p));t.dispatch(vR({active:!0,activeIndex:p.toString(),activeDataKey:void 0,activeCoordinate:f}))}}}}});eT.startListening({actionCreator:lZ,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:o}=r.tooltip;if(!o.active&&o.index==null){var a="0",i=zN(r,"axis","hover",String(a));t.dispatch(vR({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:i}))}}}});var Ar=Rr("externalEvent"),dZ=Au();dZ.startListening({actionCreator:Ar,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:Zhe(r),activeDataKey:oX(r),activeIndex:$o(r),activeLabel:nX(r),activeTooltipIndex:$o(r),isTooltipActive:Yhe(r)};e.payload.handler(n,e.payload.reactEvent)}}});var p4e=X([yd],e=>e.tooltipItemPayloads),f4e=X([p4e,qu,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var o=e.find(c=>c.settings.dataKey===n);if(o!=null){var{positions:a}=o;if(a!=null){var i=t(a,r);return i}}}),uZ=Rr("touchMove"),hZ=Au();hZ.startListening({actionCreator:uZ,effect:(e,t)=>{var r=e.payload,n=t.getState(),o=LD(n,n.tooltip.settings.shared);if(o==="axis"){var a=JD(n,QD({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(WK({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(o==="item"){var i,c=r.touches[0],s=document.elementFromPoint(c.clientX,c.clientY);if(!s||!s.getAttribute)return;var l=s.getAttribute(qG),d=(i=s.getAttribute(VG))!==null&&i!==void 0?i:void 0,u=f4e(t.getState(),l,d);t.dispatch(UK({activeDataKey:d,activeIndex:l,activeCoordinate:u}))}}});var y4e=sG({brush:Rve,cartesianAxis:Gge,chartData:Spe,errorBars:Tye,graphicalItems:gye,layout:rle,legend:Ule,options:xpe,polarAxis:Wfe,polarOptions:h4e,referenceElements:Wve,rootProps:d4e,tooltip:yhe}),v4e=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Ise({reducer:y4e,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([oZ.middleware,aZ.middleware,eT.middleware,dZ.middleware,hZ.middleware]),devTools:{serialize:{replacer:l4e},name:"recharts-".concat(r)}})};function m4e(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,o=Mt(),a=M.useRef(null);if(o)return r;a.current==null&&(a.current=v4e(t,n));var i=PO;return v.createElement(c4e,{context:i,store:a.current},r)}function g4e(e){var{layout:t,width:r,height:n,margin:o}=e,a=dt(),i=Mt();return M.useEffect(()=>{i||(a(Qse(t)),a(ele({width:r,height:n})),a(Jse(o)))},[a,i,t,r,n,o]),null}function k4e(e){var t=dt();return M.useEffect(()=>{t(u4e(e))},[t,e]),null}var b4e=["children"];function x4e(e,t){if(e==null)return{};var r,n,o=w4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function w4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function WN(){return WN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},WN.apply(null,arguments)}var M4e={width:"100%",height:"100%"},_4e=M.forwardRef((e,t)=>{var r=zO(),n=qO(),o=UG();if(!wN(r)||!wN(n))return null;var{children:a,otherAttributes:i,title:c,desc:s}=e,l,d;return typeof i.tabIndex=="number"?l=i.tabIndex:l=o?0:void 0,typeof i.role=="string"?d=i.role:d=o?"application":void 0,v.createElement(kO,WN({},i,{title:c,desc:s,role:d,tabIndex:l,width:r,height:n,style:M4e,ref:t}),a)}),C4e=e=>{var{children:t}=e,r=pe(NA);if(!r)return null;var{width:n,height:o,y:a,x:i}=r;return v.createElement(kO,{width:n,height:o,x:i,y:a},t)},UF=M.forwardRef((e,t)=>{var{children:r}=e,n=x4e(e,b4e),o=Mt();return o?v.createElement(C4e,null,r):v.createElement(_4e,WN({ref:t},n),r)});function S4e(){var e=dt(),[t,r]=M.useState(null),n=pe(Ple);return M.useEffect(()=>{if(t!=null){var o=t.getBoundingClientRect(),a=o.width/t.offsetWidth;Ft(a)&&a!==n&&e(tle(a))}},[t,e,n]),r}function GF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function I4e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GF(Object(r),!0).forEach(function(n){L4e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L4e(e,t,r){return(t=N4e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N4e(e){var t=A4e(e,"string");return typeof t=="symbol"?t:t+""}function A4e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var P4e=M.forwardRef((e,t)=>{var{children:r,className:n,height:o,onClick:a,onContextMenu:i,onDoubleClick:c,onMouseDown:s,onMouseEnter:l,onMouseLeave:d,onMouseMove:u,onMouseUp:p,onTouchEnd:f,onTouchMove:m,onTouchStart:g,style:k,width:b}=e,x=dt(),[w,_]=M.useState(null),[C,S]=M.useState(null);Npe();var I=S4e(),L=M.useCallback($=>{I($),typeof t=="function"&&t($),_($),S($)},[I,t,_,S]),N=M.useCallback($=>{x(nZ($)),x(Ar({handler:a,reactEvent:$}))},[x,a]),R=M.useCallback($=>{x($R($)),x(Ar({handler:l,reactEvent:$}))},[x,l]),A=M.useCallback($=>{x(GK()),x(Ar({handler:d,reactEvent:$}))},[x,d]),D=M.useCallback($=>{x($R($)),x(Ar({handler:u,reactEvent:$}))},[x,u]),P=M.useCallback(()=>{x(lZ())},[x]),G=M.useCallback($=>{x(sZ($.key))},[x]),ee=M.useCallback($=>{x(Ar({handler:i,reactEvent:$}))},[x,i]),H=M.useCallback($=>{x(Ar({handler:c,reactEvent:$}))},[x,c]),Z=M.useCallback($=>{x(Ar({handler:s,reactEvent:$}))},[x,s]),q=M.useCallback($=>{x(Ar({handler:p,reactEvent:$}))},[x,p]),T=M.useCallback($=>{x(Ar({handler:g,reactEvent:$}))},[x,g]),ne=M.useCallback($=>{x(uZ($)),x(Ar({handler:m,reactEvent:$}))},[x,m]),oe=M.useCallback($=>{x(Ar({handler:f,reactEvent:$}))},[x,f]);return v.createElement(uX.Provider,{value:w},v.createElement(PU.Provider,{value:C},v.createElement("div",{className:De("recharts-wrapper",n),style:I4e({position:"relative",cursor:"default",width:b,height:o},k),onClick:N,onContextMenu:ee,onDoubleClick:H,onFocus:P,onKeyDown:G,onMouseDown:Z,onMouseEnter:R,onMouseLeave:A,onMouseMove:D,onMouseUp:q,onTouchEnd:oe,onTouchMove:ne,onTouchStart:T,ref:L},r)))}),j4e=["children","className","width","height","style","compact","title","desc"];function $4e(e,t){if(e==null)return{};var r,n,o=E4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function E4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var R4e=M.forwardRef((e,t)=>{var{children:r,className:n,width:o,height:a,style:i,compact:c,title:s,desc:l}=e,d=$4e(e,j4e),u=en(d);return c?v.createElement(UF,{otherAttributes:u,title:s,desc:l},r):v.createElement(P4e,{className:n,style:i,width:o,height:a,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},v.createElement(UF,{otherAttributes:u,title:s,desc:l,ref:t},v.createElement(Kve,null,r)))}),O4e=["width","height"];function ER(){return ER=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ER.apply(null,arguments)}function D4e(e,t){if(e==null)return{};var r,n,o=T4e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function T4e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var z4e={top:5,right:5,bottom:5,left:5},q4e={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:z4e,reverseStackOrder:!1,syncMethod:"index"},iP=M.forwardRef(function(t,r){var n,o=lr(t.categoricalChartProps,q4e),{width:a,height:i}=o,c=D4e(o,O4e);if(!wN(a)||!wN(i))return null;var{chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,categoricalChartProps:p}=t,f={chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:d,tooltipPayloadSearcher:u,eventEmitter:void 0};return v.createElement(m4e,{preloadedState:{options:f},reduxStoreName:(n=p.id)!==null&&n!==void 0?n:s},v.createElement(Eve,{chartData:p.data}),v.createElement(g4e,{width:a,height:i,layout:o.layout,margin:o.margin}),v.createElement(k4e,{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}),v.createElement(R4e,ER({},c,{width:a,height:i,ref:r})))}),V4e=["axis"],H4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:V4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),F4e=["axis","item"],WF=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:F4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),B4e=["item"],U4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:B4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t})),G4e=["axis"],W4e=M.forwardRef((e,t)=>v.createElement(iP,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:G4e,tooltipPayloadSearcher:XA,categoricalChartProps:e,ref:t}));const Td=(e,t=0)=>{const n=e.toFixed(t).split("."),o=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," ");return t>0&&n[1]?`${o}.${n[1]}`:o},KF=(e,t,r=5)=>{if(!e.length||!t.length)return[0,100];let n=1/0,o=-1/0;if(e.forEach(u=>{t.forEach(p=>{const f=u[p];typeof f=="number"?(n=Math.min(n,f),o=Math.max(o,f)):Array.isArray(f)&&f.forEach(m=>{typeof m=="number"&&(n=Math.min(n,m),o=Math.max(o,m))})})}),n===1/0||o===-1/0)return[0,100];const i=(o-n)/(r-1),c=Math.pow(10,Math.floor(Math.log10(i)));let s;i/c<1.5?s=c:i/c<3?s=2*c:i/c<7?s=5*c:s=10*c;const l=Math.floor(n/s)*s,d=l+s*(r-1);return[l,d]},XF=(e,t,r,n=20)=>{if(!e.length)return n;let o=0;e.forEach(c=>{t.forEach(s=>{const l=c[s];typeof l=="number"?o=Math.max(o,Math.abs(l)):Array.isArray(l)&&l.forEach(d=>{typeof d=="number"&&(o=Math.max(o,Math.abs(d)))})})});const i=(r?r(o,0):o.toString()).length;return Math.max(n,i*6+12)},lo={bar:["var(--color-chart-bar-1)","var(--color-chart-bar-2)","var(--color-chart-bar-3)","var(--color-chart-bar-4)","var(--color-chart-bar-5)","var(--color-chart-bar-6)"],line:["var(--color-chart-line-1)","var(--color-chart-line-2)","var(--color-chart-line-3)","var(--color-chart-line-4)","var(--color-chart-line-5)"],scatter:["var(--color-chart-scatter-1)","var(--color-chart-scatter-2)","var(--color-chart-scatter-3)","var(--color-chart-scatter-4)","var(--color-chart-scatter-5)","var(--color-chart-scatter-6)"],area:["var(--color-chart-area-1)","var(--color-chart-area-2)","var(--color-chart-area-3)","var(--color-chart-area-4)","var(--color-chart-area-5)","var(--color-chart-area-6)"],accessible:["#0066CC","#CC6600","#009966","#CC0066","#6600CC","#CC9900","#006666","#CC0000"]},Pl=e=>{switch(e){case"dashed":return"5 5";case"dotted":return"2 2";case"solid":default:return}},K4e=(e="circle")=>t=>{const{cx:r,cy:n,r:o,fill:a,stroke:i,strokeWidth:c}=t,s=o||4;switch(e){case"triangle":const l=s*1.5,d=s*1.3,u=`M ${r},${n-l} L ${r+d},${n+l/2} L ${r-d},${n+l/2} Z`;return y.jsx("path",{d:u,fill:a,stroke:i,strokeWidth:c||0});case"square":const p=s*1.4;return y.jsx("rect",{x:r-p,y:n-p,width:p*2,height:p*2,fill:a,stroke:i,strokeWidth:c||0});case"circle":default:return y.jsx("circle",{cx:r,cy:n,r:s,fill:a,stroke:i,strokeWidth:c||0})}},ZF=e=>({verticalAlign:"bottom",align:"center"}),zd=({active:e,payload:t,label:r,config:n,tooltipMaxWidth:o="max-w-xs",chartType:a,referenceMarkers:i})=>{if(!e||!t||!t.length)return null;const c=i?.filter(s=>s.xValue===r)||[];return y.jsxs("div",{className:`rounded-sm border border-[var(--color-border-primary-bold)] bg-[var(--color-surface-primary)] p-[var(--space-md)] shadow-md min-w-[120px] ${o}`,role:"tooltip","aria-label":"Chart data tooltip",children:[y.jsx("p",{className:"text-label-sm mb-[var(--space-xsm)] text-[var(--color-text-primary)]",children:r}),t.map((s,l)=>{const d=n[s.dataKey];let u;if(d?.type==="range-area"&&s.payload){const f=s.payload[s.dataKey];Array.isArray(f)&&f.length===2?u=`${Td(f[0])} – ${Td(f[1])}`:u=typeof s.value=="number"?Td(s.value):s.value}else u=typeof s.value=="number"?Td(s.value):s.value;const p=()=>{switch(a){case"line":const f=n[s.dataKey]?.strokeStyle,m=Pl(f);return y.jsx("div",{className:"w-3 h-0.5 flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:m?`linear-gradient(to right, ${s.color} 50%, transparent 50%)`:s.color,backgroundSize:m==="5 5"?"6px 100%":m==="2 2"?"2px 100%":"100% 100%"}})});case"scatter":return y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"});case"composed":switch(n[s.dataKey]?.type){case"line":const k=n[s.dataKey]?.strokeStyle,b=Pl(k);return y.jsx("div",{className:"w-3 h-0.5 flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:b?`linear-gradient(to right, ${s.color} 50%, transparent 50%)`:s.color,backgroundSize:b==="5 5"?"6px 100%":b==="2 2"?"2px 100%":"100% 100%"}})});case"area":case"range-area":return y.jsx("div",{className:"w-2.5 h-2.5 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"});case"bar":default:return y.jsx("div",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"})}case"bar":case"horizontal-bar":case"area":default:return y.jsx("div",{className:"w-2 h-2 flex-shrink-0",style:{backgroundColor:s.color},"aria-hidden":"true"})}};return y.jsxs("div",{className:"flex items-center gap-[var(--space-xsm)]",children:[p(),y.jsxs("span",{className:"text-body-sm text-[var(--color-text-primary)] min-w-0 break-words",children:[d?.label||s.dataKey,":"]}),y.jsx("span",{className:"text-body-medium-sm text-[var(--color-text-primary)] ml-auto pl-[16px]",children:u})]},l)}),c.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"border-t border-[var(--color-border-primary-subtle)] my-[var(--space-xsm)]"}),c.map((s,l)=>y.jsxs(M.Fragment,{children:[s.tooltipLabel&&y.jsx("p",{className:"text-body-sm font-medium mb-[var(--space-xsm)] text-[var(--color-text-secondary)]",children:s.tooltipLabel}),!s.tooltipLabel&&l===0&&y.jsx("p",{className:"text-body-sm font-medium mb-[var(--space-xsm)] text-[var(--color-text-secondary)]",children:"Reference Markers:"}),s.dataPoints.map((d,u)=>{const p=()=>{switch(d.shape||"circle"){case"triangle":return y.jsx("svg",{width:8,height:8,className:"flex-shrink-0",viewBox:"0 0 10 10",children:y.jsx("path",{d:"M 5,2 L 8,8 L 2,8 Z",fill:d.fill||"var(--color-chart-line-1)",stroke:d.stroke||"transparent",strokeWidth:d.strokeWidth||0})});case"square":return y.jsx("svg",{width:8,height:8,className:"flex-shrink-0",viewBox:"0 0 10 10",children:y.jsx("rect",{x:"2",y:"2",width:"6",height:"6",fill:d.fill||"var(--color-chart-line-1)",stroke:d.stroke||"transparent",strokeWidth:d.strokeWidth||0})});case"circle":default:return y.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:d.fill||"var(--color-chart-line-1)",border:d.stroke?`${d.strokeWidth||1}px solid ${d.stroke}`:"none"}})}};return y.jsxs("div",{className:"flex items-center gap-[var(--space-xsm)] text-caption-sm",children:[p(),y.jsxs("span",{className:"text-[var(--color-text-secondary)] min-w-0 break-words",children:[d.label||`Marker ${u+1}`,":"]}),y.jsx("span",{className:"font-medium text-[var(--color-text-primary)] ml-auto",children:Td(d.yValue)})]},`marker-${l}-point-${u}`)})]},`marker-section-${l}`))]})]})};function pZ({type:e,data:t,config:r,className:n,height:o=300,width:a,minWidth:i=300,onDataPointClick:c,onDataPointHover:s,highlightedIndex:l,showGrid:d=!0,showLegend:u=!0,showTooltip:p=!0,colorScheme:f,responsive:m=!0,maintainAspectRatio:g=!1,legendHeight:k,margin:b,yAxisWidth:x,yAxisTickCount:w,xAxisTickFormatter:_,yAxisTickFormatter:C,showRightYAxis:S=!1,rightYAxisWidth:I,rightYAxisTickCount:L,rightYAxisDomain:N,rightYAxisTickFormatter:R,title:A,description:D,showDataTable:P=!1,tooltipMaxWidth:G="max-w-xs",legendOrder:ee,legendPosition:H="bottom",referenceMarkers:Z,yAxisDomain:q,roundYAxis:T=!1,...ne}){const oe=M.useMemo(()=>{if(f)return lo[f];switch(e){case"bar":case"horizontal-bar":return lo.bar;case"line":return lo.line;case"scatter":return lo.scatter;case"composed":return lo.bar;default:return lo.bar}},[e,f]),$=Object.keys(r).filter(Q=>Q!=="name"),E=M.useMemo(()=>t.map(Q=>{const de={...Q};return $.forEach(Me=>{if(r[Me].type==="range-area"){const Ee=Q[Me];Array.isArray(Ee)&&Ee.length===2&&(de[Me]=Ee,de[`${Me}_min`]=Ee[0],de[`${Me}_max`]=Ee[1])}}),de}),[t,r,$]),F=M.useCallback(Q=>{const de=Q?.activeTooltipIndex??0;s?.(Q?.activePayload?.[0]?.payload,de)},[s]),z=M.useCallback(()=>{s?.(null)},[s]),Y=M.useCallback(Q=>{const de=Q?.activeTooltipIndex??0;c?.(Q?.activePayload?.[0]?.payload,de)},[c]),O=()=>{const Q={top:0,right:0,left:0,bottom:0};return{top:b?.top??Q.top,right:b?.right??Q.right+B,left:b?.left??Q.left,bottom:b?.bottom??Q.bottom}},J=M.useMemo(()=>x||XF(E,$,C,20),[x,E,$,C]),B=M.useMemo(()=>{if(!S)return 0;if(I)return I;const Q=$.filter(de=>r[de].yAxisId==="right");return Q.length===0?0:XF(E,Q,R,20)},[S,I,E,$,r,R]),K=M.useMemo(()=>$.some(de=>(r[de].yAxisId||"left")==="left")?"left":"right",[$,r]),U=k?{...ZF(),wrapperStyle:{position:"absolute",bottom:0,left:0,right:0,height:k,paddingTop:8}}:ZF(),V={data:E,margin:O()},ce={axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:!1,tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},tickFormatter:_},te=M.useMemo(()=>$.filter(Q=>(r[Q].yAxisId||"left")==="left"),[$,r]),Ne=M.useMemo(()=>$.filter(Q=>r[Q].yAxisId==="right"),[$,r]),Ae=M.useMemo(()=>!T||q?q:KF(E,te,w||5),[T,q,E,te,w]),Re=M.useMemo(()=>!T||N?N:KF(E,Ne,L||5),[T,N,E,Ne,L]),Ve={axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:J,tickFormatter:C,...w&&{tickCount:w},...Ae&&{domain:Ae},...T&&{allowDecimals:!1}},tt={stroke:"var(--color-border-primary-subtle)",horizontal:!0,vertical:!1},Je=({payload:Q})=>{if(!Q||!Q.length)return null;const de=ee?[...Q].sort((Oe,kt)=>{const Te=ee.indexOf(Oe.dataKey),ft=ee.indexOf(kt.dataKey);return Te===-1?1:ft===-1?-1:Te-ft}):Q,Ee=O().left+5;return y.jsx("div",{style:{paddingLeft:`${Ee}px`,paddingRight:"16px"},children:y.jsx("div",{className:"flex flex-wrap justify-start items-start gap-x-[var(--space-md)] gap-y-[var(--space-sm)]",children:de.map((Oe,kt)=>{const Te=()=>{switch(e){case"line":const ft=r[Oe.dataKey]?.strokeStyle,yt=Pl(ft);return y.jsx("div",{className:"w-[12px] h-[2px] flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:yt?`linear-gradient(to right, ${Oe.color} 50%, transparent 50%)`:Oe.color,backgroundSize:yt==="5 5"?"8px 100%":yt==="2 2"?"3px 100%":"100% 100%"}})});case"scatter":return y.jsx("div",{className:"w-[6px] h-[6px] rounded-full flex-shrink-0",style:{backgroundColor:Oe.color},"aria-hidden":"true"});case"composed":switch(r[Oe.dataKey]?.type){case"line":const an=r[Oe.dataKey]?.strokeStyle,Qt=Pl(an);return y.jsx("div",{className:"w-[12px] h-[2px] flex-shrink-0 relative","aria-hidden":"true",children:y.jsx("div",{className:"w-full h-full",style:{background:Qt?`linear-gradient(to right, ${Oe.color} 50%, transparent 50%)`:Oe.color,backgroundSize:Qt==="5 5"?"8px 100%":Qt==="2 2"?"3px 100%":"100% 100%"}})});case"area":case"range-area":return y.jsx("div",{className:"w-[8px] h-[8px] flex-shrink-0",style:{backgroundColor:Oe.color},"aria-hidden":"true"});case"bar":default:return y.jsx("div",{className:"w-[6px] h-[6px] flex-shrink-0",style:{backgroundColor:Oe.color},"aria-hidden":"true"})}case"bar":case"horizontal-bar":default:return y.jsx("div",{className:"w-[6px] h-[6px] flex-shrink-0",style:{backgroundColor:Oe.color},"aria-hidden":"true"})}};return y.jsxs("div",{className:"flex items-center justify-center gap-[var(--space-xsm)]",children:[Te(),y.jsx("span",{className:"[&]:text-body-medium-xsm [&]:text-[var(--color-text-secondary)] leading-none whitespace-nowrap",children:Oe.value})]},kt)})})})},gt=()=>{switch(e){case"bar":return y.jsxs(WF,{...V,onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt}),y.jsx(qs,{dataKey:"name",...ce}),y.jsx(An,{...Ve}),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return y.jsx(Z0,{dataKey:Q,name:r[Q].label,fill:Me,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:60},Q)})]});case"horizontal-bar":return y.jsxs(WF,{...V,layout:"vertical",onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt,horizontal:!1,vertical:!0}),y.jsx(qs,{type:"number",...ce}),y.jsx(An,{type:"category",dataKey:"name",...Ve}),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return y.jsx(Z0,{dataKey:Q,name:r[Q].label,fill:Me,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:40},Q)})]});case"line":return y.jsxs(H4e,{...V,onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt,yAxisId:K}),y.jsx(qs,{dataKey:"name",...ce}),y.jsx(An,{yAxisId:"left",...Ve}),S&&y.jsx(An,{yAxisId:"right",orientation:"right",axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:B,tickFormatter:R,...L&&{tickCount:L},...Re&&{domain:Re},...T&&{allowDecimals:!1}}),Z?.map((Q,de)=>Q.showLine!==!1&&y.jsx(UD,{x:Q.xValue,stroke:Q.lineStyle?.stroke||"#000000",strokeWidth:Q.lineStyle?.strokeWidth||2,strokeDasharray:Q.lineStyle?.strokeDasharray},`marker-line-${de}`)),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e,referenceMarkers:Z}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return y.jsx(IR,{type:"linear",dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",stroke:Me,strokeWidth:2,strokeDasharray:Pl(r[Q].strokeStyle),dot:r[Q].showDots===!0?{fill:Me,strokeWidth:0,r:3}:!1,activeDot:{r:5,fill:Me},className:"cursor-pointer transition-colors",isAnimationActive:!1},Q)}),Z?.map((Q,de)=>y.jsx(M.Fragment,{children:Q.dataPoints.map((Me,Ee)=>y.jsx(WD,{x:Q.xValue,y:Me.yValue,r:Me.size||4,fill:Me.fill||"var(--color-chart-line-1)",stroke:Me.stroke||"transparent",strokeWidth:Me.strokeWidth||0,shape:K4e(Me.shape||"circle")},`marker-${de}-point-${Ee}`))},`marker-dots-${de}`))]});case"scatter":return y.jsxs(U4e,{...V,onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt}),y.jsx(qs,{dataKey:"x",type:"number",...ce}),y.jsx(An,{dataKey:"y",type:"number",...Ve}),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.filter(Q=>Q!=="x"&&Q!=="y"&&Q!=="name").map((Q,de)=>{const Me=r[Q]?.color||oe[de%oe.length];return y.jsx(QX,{name:r[Q]?.label||Q,data:t.map(Ee=>({x:Ee.x,y:Ee.y,[Q]:Ee[Q]})),fill:Me,className:"cursor-pointer transition-colors",isAnimationActive:!1},Q)})]});case"composed":return y.jsxs(W4e,{...V,onMouseMove:F,onMouseLeave:z,onClick:Y,children:[d&&y.jsx(Cl,{...tt,yAxisId:K}),y.jsx(qs,{dataKey:"name",...ce}),y.jsx(An,{yAxisId:"left",...Ve,domain:[0,"dataMax"]}),S&&y.jsx(An,{yAxisId:"right",orientation:"right",axisLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:2},tickLine:{stroke:"var(--color-border-primary-subtle)",strokeWidth:1},tick:{fontSize:10,fill:"var(--color-text-tertiary)",fontFamily:"Inter, sans-serif"},width:B,tickFormatter:R,...L&&{tickCount:L},...Re&&{domain:Re},...T&&{allowDecimals:!1}}),p&&y.jsx(Od,{content:Q=>y.jsx(zd,{...Q,config:r,tooltipMaxWidth:G,chartType:e}),cursor:{stroke:"var(--color-border-primary)",strokeWidth:1,fill:"var(--color-background-neutral)",fillOpacity:1},position:{x:void 0,y:void 0},offset:10,animationDuration:0}),u&&y.jsx(wo,{content:y.jsx(Je,{}),...U}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return(r[Q].type||"bar")==="bar"?y.jsx(Z0,{dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",fill:Me,radius:[0,0,0,0],className:"cursor-pointer transition-colors",isAnimationActive:!1,maxBarSize:60},Q):null}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length],Ee=r[Q].type||"bar";return Ee==="area"?y.jsx(NR,{type:"linear",dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",stroke:r[Q].stroke??Me,fill:r[Q].fill??Me,fillOpacity:.3,className:"cursor-pointer transition-colors",isAnimationActive:!1},Q):Ee==="range-area"?y.jsx(NR,{type:"linear",dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",stroke:r[Q].stroke??"none",fill:r[Q].fill??Me,fillOpacity:.3,className:"cursor-pointer transition-colors",isAnimationActive:!1},Q):null}),$.map((Q,de)=>{const Me=r[Q].color||oe[de%oe.length];return(r[Q].type||"bar")==="line"?y.jsx(IR,{type:"linear",dataKey:Q,name:r[Q].label,yAxisId:r[Q].yAxisId||"left",stroke:Me,strokeWidth:2,strokeDasharray:Pl(r[Q].strokeStyle),dot:r[Q].showDots===!0?{fill:Me,strokeWidth:0,r:3}:!1,activeDot:{r:5,fill:Me},className:"cursor-pointer transition-colors",isAnimationActive:!1},Q):null})]});default:return y.jsx("div",{children:"Unsupported chart type"})}},Fe=()=>P?y.jsx("div",{className:"sr-only",children:y.jsxs("table",{role:"table","aria-label":A?`Data for ${A}`:"Chart data",children:[y.jsxs("caption",{className:"sr-only",children:[A&&`${A}. `,D||`${e} chart showing ${$.length} data series across ${t.length} categories.`]}),y.jsx("thead",{children:y.jsxs("tr",{children:[y.jsx("th",{scope:"col",children:"Category"}),$.map(Q=>y.jsx("th",{scope:"col",children:r[Q]?.label||Q},Q))]})}),y.jsx("tbody",{children:t.map((Q,de)=>y.jsxs("tr",{children:[y.jsx("th",{scope:"row",children:Q.name||`Item ${de+1}`}),$.map(Me=>y.jsx("td",{children:C?C(Q[Me],de):Q[Me]},Me))]},de))})]})}):null,rt=M.useRef(null);return M.useEffect(()=>{const Q=rt.current;if(!Q)return;const de=setTimeout(()=>{Q.querySelectorAll(".recharts-cartesian-axis-tick").forEach(Ee=>{const Oe=Ee.querySelector("text"),kt=Ee.querySelector(".recharts-cartesian-axis-tick-line");Oe?.textContent?.trim()==="0"&&kt&&kt.setAttribute("stroke-width","2")})},100);return()=>clearTimeout(de)},[t,e]),y.jsxs("div",{ref:rt,className:j("w-full",n),style:{minWidth:i},role:"img","aria-label":A||`${e} chart`,"aria-describedby":D?`${rt.current?.id||"chart"}-desc`:void 0,...ne,children:[A&&y.jsx("h3",{className:"sr-only",id:`${rt.current?.id||"chart"}-title`,children:A}),D&&y.jsx("p",{className:"sr-only",id:`${rt.current?.id||"chart"}-desc`,children:D}),(()=>{const Q=k?o-k:o,de=m?y.jsx(Wpe,{width:a||"100%",height:Q,children:gt()||y.jsx("div",{children:"Chart error"})}):y.jsx("div",{style:{width:a||"100%",height:Q,minWidth:i},children:gt()||y.jsx("div",{children:"Chart error"})});return k?y.jsx("div",{style:{width:a||"100%"},children:de}):de})(),y.jsx(Fe,{})]})}const X4e=(e,t="bar")=>{const r=lo[t];return Array.from({length:e},(n,o)=>r[o%r.length])},Z4e=(e,t,r)=>Array.isArray(e)?e.reduce((o,a,i)=>(o[a]={label:t?.[i]||a,color:r?.[i]},o),{}):e;function Y4e(e,t){const r=v.createContext(t),n=a=>{const{children:i,...c}=a,s=v.useMemo(()=>c,Object.values(c));return y.jsx(r.Provider,{value:s,children:i})};n.displayName=e+"Provider";function o(a){const i=v.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function mt(e,t=[]){let r=[];function n(a,i){const c=v.createContext(i),s=r.length;r=[...r,i];const l=u=>{const{scope:p,children:f,...m}=u,g=p?.[e]?.[s]||c,k=v.useMemo(()=>m,Object.values(m));return y.jsx(g.Provider,{value:k,children:f})};l.displayName=a+"Provider";function d(u,p){const f=p?.[e]?.[s]||c,m=v.useContext(f);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[l,d]}const o=()=>{const a=r.map(i=>v.createContext(i));return function(c){const s=c?.[e]||a;return v.useMemo(()=>({[`__scope${e}`]:{...c,[e]:s}}),[c,s])}};return o.scopeName=e,[n,J4e(o,...t)]}function J4e(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((c,{useScope:s,scopeName:l})=>{const u=s(a)[`__scope${l}`];return{...c,...u}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Rt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>t.current?.(...r),[])}var vt=globalThis?.document?v.useLayoutEffect:()=>{};function YF(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wn(...e){return t=>{let r=!1;const n=e.map(o=>{const a=YF(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():YF(e[o],null)}}}}function Se(...e){return v.useCallback(Wn(...e),e)}function Eo(e){const t=e5e(e),r=v.forwardRef((n,o)=>{const{children:a,...i}=n,c=v.Children.toArray(a),s=c.find(t5e);if(s){const l=s.props.children,d=c.map(u=>u===s?v.Children.count(l)>1?v.Children.only(null):v.isValidElement(l)?l.props.children:null:u);return y.jsx(t,{...i,ref:o,children:v.isValidElement(l)?v.cloneElement(l,void 0,d):null})}return y.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Q4e=Eo("Slot");function e5e(e){const t=v.forwardRef((r,n)=>{const{children:o,...a}=r;if(v.isValidElement(o)){const i=n5e(o),c=r5e(a,o.props);return o.type!==v.Fragment&&(c.ref=n?Wn(n,i):i),v.cloneElement(o,c)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fZ=Symbol("radix.slottable");function yZ(e){const t=({children:r})=>y.jsx(y.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=fZ,t}function t5e(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fZ}function r5e(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...c)=>{const s=a(...c);return o(...c),s}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function n5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var o5e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ie=o5e.reduce((e,t)=>{const r=Eo(`Primitive.${t}`),n=v.forwardRef((o,a)=>{const{asChild:i,...c}=o,s=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(s,{...c,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vZ(e,t){e&&fA.flushSync(()=>e.dispatchEvent(t))}var a5e=AO();function i5e(){return a5e.useSyncExternalStore(c5e,()=>!0,()=>!1)}function c5e(){return()=>{}}var tT="Avatar",[s5e,Mnt]=mt(tT),[l5e,mZ]=s5e(tT),gZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,a]=v.useState("idle");return y.jsx(l5e,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:y.jsx(ie.span,{...n,ref:t})})});gZ.displayName=tT;var kZ="AvatarImage",bZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=mZ(kZ,r),c=d5e(n,a),s=Rt(l=>{o(l),i.onImageLoadingStatusChange(l)});return vt(()=>{c!=="idle"&&s(c)},[c,s]),c==="loaded"?y.jsx(ie.img,{...a,ref:t,src:n}):null});bZ.displayName=kZ;var xZ="AvatarFallback",wZ=v.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,a=mZ(xZ,r),[i,c]=v.useState(n===void 0);return v.useEffect(()=>{if(n!==void 0){const s=window.setTimeout(()=>c(!0),n);return()=>window.clearTimeout(s)}},[n]),i&&a.imageLoadingStatus!=="loaded"?y.jsx(ie.span,{...o,ref:t}):null});wZ.displayName=xZ;function JF(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function d5e(e,{referrerPolicy:t,crossOrigin:r}){const n=i5e(),o=v.useRef(null),a=n?(o.current||(o.current=new window.Image),o.current):null,[i,c]=v.useState(()=>JF(a,e));return vt(()=>{c(JF(a,e))},[a,e]),vt(()=>{const s=u=>()=>{c(u)};if(!a)return;const l=s("loaded"),d=s("error");return a.addEventListener("load",l),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",l),a.removeEventListener("error",d)}},[a,r,t]),i}var MZ=gZ,_Z=bZ,CZ=wZ;const SZ=ze("relative flex shrink-0 overflow-hidden items-center justify-center",{variants:{size:{xxs:"h-4 w-4",xs:"h-[var(--size-sm)] w-[var(--size-sm)]",sm:"h-[var(--size-md)] w-[var(--size-md)]",md:"h-[var(--size-lg)] w-[var(--size-lg)]",lg:"h-[var(--size-xlg)] w-[var(--size-xlg)]",xl:"h-[var(--size-2xlg)] w-[var(--size-2xlg)]"},shape:{circle:"rounded-full",rounded:"rounded-md"}},defaultVariants:{size:"md",shape:"circle"}}),IZ=ze("flex h-full w-full items-center justify-center font-medium [&]:text-[var(--color-text-inverse)]",{variants:{size:{xxs:"text-caption-xsm",xs:"text-caption-xsm",sm:"text-caption-sm",md:"text-label-sm",lg:"text-label-md",xl:"text-heading-sm"},shape:{circle:"rounded-full",rounded:"rounded-md"},variant:{information:"bg-[var(--color-background-information-bold)]",success:"bg-[var(--color-background-success-bold)]",error:"bg-[var(--color-background-error-bold)]",warning:"bg-[var(--color-background-warning-bold)]",violet:"bg-[var(--violet-500)]",magenta:"bg-[var(--magenta-500)]"}},defaultVariants:{size:"md",shape:"circle",variant:"information"}}),LZ=v.forwardRef(({className:e,size:t,shape:r,...n},o)=>y.jsx(MZ,{ref:o,className:j(SZ({size:t,shape:r}),e),...n}));LZ.displayName=MZ.displayName;const NZ=v.forwardRef(({className:e,...t},r)=>y.jsxs("div",{className:"relative h-full w-full rounded-[inherit]",children:[y.jsx(_Z,{ref:r,className:j("aspect-square h-full w-full object-cover rounded-[inherit]",e),...t}),y.jsx("div",{className:"absolute inset-0 rounded-[inherit] shadow-[inset_0_0_0_1px_rgba(85,95,109,0.1)] pointer-events-none"})]}));NZ.displayName=_Z.displayName;const AZ=v.forwardRef(({className:e,size:t,shape:r,variant:n,...o},a)=>y.jsx(CZ,{ref:a,className:j(IZ({size:t,shape:r,variant:n}),e),...o}));AZ.displayName=CZ.displayName;const u5e=ze("inline-flex items-center rounded-sm px-[var(--space-sm)] py-[var(--space-xsm)] text-caption-medium-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-1 cursor-default",{variants:{variant:{default:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]",secondary:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]",destructive:"border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]",outline:"bg-transparent border border-[var(--color-border-primary-strong)] text-[var(--color-text-primary)]"},intent:{neutral:"",brand:"",success:"",warning:"",destructive:""},appearance:{solid:"border-transparent",subtle:"border-transparent",outline:"bg-transparent"},size:{sm:"px-[var(--space-xsm)] h-5 [&]:text-body-strong-xsm",md:"px-[var(--space-sm)] h-6 [&]:text-body-strong-sm",lg:"px-[var(--space-md)] h-7 [&]:text-body-strong-md"}},compoundVariants:[{intent:"neutral",appearance:"solid",class:"border-transparent bg-[var(--grey-600)] text-[var(--color-text-inverse)]"},{intent:"neutral",appearance:"subtle",class:"border-transparent bg-[var(--grey-100)] text-[var(--color-text-primary)]"},{intent:"neutral",appearance:"outline",class:"border border-[var(--color-border-primary-strong)] text-[var(--color-text-primary)]"},{intent:"brand",appearance:"solid",class:"border-transparent bg-[var(--color-background-brand)] text-[var(--color-text-inverse)]"},{intent:"brand",appearance:"subtle",class:"border-transparent bg-[var(--blue-50)] text-[var(--color-text-brand)]"},{intent:"brand",appearance:"outline",class:"border border-[var(--color-blue-300)] text-[var(--color-text-brand)]"},{intent:"success",appearance:"solid",class:"border-transparent bg-[var(--color-background-success-bold)] text-[var(--color-text-inverse)]"},{intent:"success",appearance:"subtle",class:"border-transparent bg-[var(--color-background-success)] text-[var(--color-text-success)]"},{intent:"success",appearance:"outline",class:"border border-[var(--color-border-success)] text-[var(--color-text-success)]"},{intent:"warning",appearance:"solid",class:"border-transparent bg-[var(--color-background-warning-bold)] text-[var(--color-text-inverse)]"},{intent:"warning",appearance:"subtle",class:"border-transparent bg-[var(--color-background-warning)] text-[var(--color-text-warning)]"},{intent:"warning",appearance:"outline",class:"border border-[var(--color-border-warning)] text-[var(--color-text-warning)]"},{intent:"destructive",appearance:"solid",class:"border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]"},{intent:"destructive",appearance:"subtle",class:"border-transparent bg-[var(--color-background-error)] text-[var(--color-text-error)]"},{intent:"destructive",appearance:"outline",class:"border border-[var(--color-border-error)] text-[var(--color-text-error)]"}],defaultVariants:{variant:"default",intent:"neutral",appearance:"subtle",size:"md"}}),or=v.forwardRef(({className:e,variant:t,intent:r,appearance:n,size:o,...a},i)=>y.jsx("div",{ref:i,className:j(u5e({variant:t,intent:r,appearance:n,size:o}),e),...a}));or.displayName="Badge";function ae(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var h5e=v[" useInsertionEffect ".trim().toString()]||vt;function Bt({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=p5e({defaultProp:t,onChange:r}),c=e!==void 0,s=c?e:o;{const d=v.useRef(e!==void 0);v.useEffect(()=>{const u=d.current;u!==c&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,n])}const l=v.useCallback(d=>{if(c){const u=f5e(d)?d(e):d;u!==e&&i.current?.(u)}else a(d)},[c,e,a,i]);return[s,l]}function p5e({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),o=v.useRef(r),a=v.useRef(t);return h5e(()=>{a.current=t},[t]),v.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function f5e(e){return typeof e=="function"}function y5e(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var jt=e=>{const{present:t,children:r}=e,n=v5e(t),o=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),a=Se(n.ref,m5e(o));return typeof r=="function"||n.isPresent?v.cloneElement(o,{ref:a}):null};jt.displayName="Presence";function v5e(e){const[t,r]=v.useState(),n=v.useRef(null),o=v.useRef(e),a=v.useRef("none"),i=e?"mounted":"unmounted",[c,s]=y5e(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const l=$0(n.current);a.current=c==="mounted"?l:"none"},[c]),vt(()=>{const l=n.current,d=o.current;if(d!==e){const p=a.current,f=$0(l);e?s("MOUNT"):f==="none"||l?.display==="none"?s("UNMOUNT"):s(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,s]),vt(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,u=f=>{const g=$0(n.current).includes(CSS.escape(f.animationName));if(f.target===t&&g&&(s("ANIMATION_END"),!o.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},p=f=>{f.target===t&&(a.current=$0(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(l=>{n.current=l?getComputedStyle(l):null,r(l)},[])}}function $0(e){return e?.animationName||"none"}function m5e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var g5e=v[" useId ".trim().toString()]||(()=>{}),k5e=0;function wt(e){const[t,r]=v.useState(g5e());return vt(()=>{r(n=>n??String(k5e++))},[e]),e||(t?`radix-${t}`:"")}var cP="Collapsible",[b5e,PZ]=mt(cP),[x5e,rT]=b5e(cP),jZ=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[s,l]=Bt({prop:n,defaultProp:o??!1,onChange:i,caller:cP});return y.jsx(x5e,{scope:r,disabled:a,contentId:wt(),open:s,onOpenToggle:v.useCallback(()=>l(d=>!d),[l]),children:y.jsx(ie.div,{"data-state":oT(s),"data-disabled":a?"":void 0,...c,ref:t})})});jZ.displayName=cP;var $Z="CollapsibleTrigger",yu=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=rT($Z,r);return y.jsx(ie.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":oT(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:ae(e.onClick,o.onOpenToggle)})});yu.displayName=$Z;var nT="CollapsibleContent",sP=v.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rT(nT,e.__scopeCollapsible);return y.jsx(jt,{present:r||o.open,children:({present:a})=>y.jsx(w5e,{...n,ref:t,present:a})})});sP.displayName=nT;var w5e=v.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=rT(nT,r),[c,s]=v.useState(n),l=v.useRef(null),d=Se(t,l),u=v.useRef(0),p=u.current,f=v.useRef(0),m=f.current,g=i.open||c,k=v.useRef(g),b=v.useRef(void 0);return v.useEffect(()=>{const x=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(x)},[]),vt(()=>{const x=l.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();u.current=w.height,f.current=w.width,k.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),s(n)}},[i.open,n]),y.jsx(ie.div,{"data-state":oT(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&o})});function oT(e){return e?"open":"closed"}var EZ=jZ,M5e=yu,_5e=sP;/**
|
|
114
114
|
* @license lucide-react v0.534.0 - ISC
|
|
115
115
|
*
|
|
116
116
|
* This source code is licensed under the ISC license.
|