@skalar-saas/design-system 0.2.1 → 0.2.3
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-DSlPTpVd.cjs → index-BcY0Jg1E.cjs} +41 -45
- package/dist/index-BcY0Jg1E.cjs.map +1 -0
- package/dist/{index-CxDCuzeJ.js → index-DC7H6Bp7.js} +1132 -1144
- package/dist/index-DC7H6Bp7.js.map +1 -0
- package/dist/{index-N0owFouQ.js → index-DOWXdrvI.js} +2 -2
- package/dist/{index-N0owFouQ.js.map → index-DOWXdrvI.js.map} +1 -1
- package/dist/{index-C_WnbLro.cjs → index-DjVJd8bb.cjs} +2 -2
- package/dist/{index-C_WnbLro.cjs.map → index-DjVJd8bb.cjs.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/ui/ColumnHandler/PanelHandle.d.ts +11 -6
- package/package.json +1 -1
- package/dist/index-CxDCuzeJ.js.map +0 -1
- package/dist/index-DSlPTpVd.cjs.map +0 -1
|
@@ -1,53 +1,49 @@
|
|
|
1
|
-
"use client";"use strict";const o=require("react/jsx-runtime"),P=require("react"),
|
|
2
|
-
M ${
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Q ${f} ${u-4}, ${f} ${u}
|
|
11
|
-
L ${f} ${e}
|
|
1
|
+
"use client";"use strict";const o=require("react/jsx-runtime"),P=require("react"),me=require("@headlessui/react"),pt=require("framer-motion"),N=require("clsx"),te=require("tailwind-merge"),F=require("iconsax-react"),Aj=require("@radix-ui/react-tooltip"),Ca=require("react-dom"),$O=require("@radix-ui/react-toast"),RO=require("react-day-picker"),lt=require("@dnd-kit/core"),dt=require("@dnd-kit/sortable"),Gp=require("@dnd-kit/utilities"),kr=require("@tanstack/react-table"),LO=require("@tanstack/react-virtual"),DO=e=>e&&e.__esModule?e:{default:e};function Zp(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const O=Zp(P),ae=DO(N),jt=Zp(Aj),_t=Zp($O),zO={default:"max-w-container",narrow:"max-w-container-narrow",medium:"max-w-container-medium",wide:"max-w-container-wide",full:"max-w-none"},BO={none:"",responsive:"px-container-mobile md:px-container-tablet lg:px-container-desktop",fixed:"px-container-desktop"},_j=O.default.forwardRef(({size:e="default",centered:t=!0,padding:r="responsive",as:n="div",className:a,children:i,...s},l)=>{const c=te.twMerge(N.clsx("w-full",zO[e],t&&"mx-auto",BO[r],a));return o.jsx(n,{ref:l,className:c,...s,children:i})});_j.displayName="Container";const kj=O.default.forwardRef(({className:e,children:t,...r},n)=>o.jsx("div",{ref:n,className:te.twMerge(N.clsx("flex items-center justify-between","py-6 md:py-8",e)),...r,children:t}));kj.displayName="Container.Header";const Tj=O.default.forwardRef(({className:e,children:t,...r},n)=>o.jsx("div",{ref:n,className:te.twMerge(N.clsx("flex-1",e)),...r,children:t}));Tj.displayName="Container.Content";const Ej=O.default.forwardRef(({className:e,children:t,...r},n)=>o.jsx("div",{ref:n,className:te.twMerge(N.clsx("flex items-center justify-between","py-6 md:py-8","border-t border-surface-3",e)),...r,children:t}));Ej.displayName="Container.Footer";const Us=_j;Us.Header=kj;Us.Content=Tj;Us.Footer=Ej;const FO={none:"py-0",xs:"py-2 md:py-4",sm:"py-4 md:py-6",md:"py-6 md:py-8",lg:"py-8 md:py-10",xl:"py-10 md:py-12 lg:py-14","2xl":"py-12 md:py-14 lg:py-15"},qO={transparent:"bg-transparent","surface-bg":"bg-surface-bg","surface-1":"bg-surface-1","surface-2":"bg-surface-2",white:"bg-white"},Ks=O.default.forwardRef(({spacing:e="lg",background:t="transparent",bordered:r=!1,as:n="section",className:a,children:i,...s},l)=>{const c=te.twMerge(N.clsx("w-full",FO[e],qO[t],r&&"border-b border-surface-3",a));return o.jsx(n,{ref:l,className:c,...s,children:i})});Ks.displayName="Section";const Ij=O.default.forwardRef(({spacing:e="2xl",...t},r)=>o.jsx(Ks,{ref:r,spacing:e,...t}));Ij.displayName="SectionHero";const Mj=O.default.forwardRef(({background:e="surface-1",...t},r)=>o.jsx(Ks,{ref:r,background:e,...t}));Mj.displayName="SectionFeatures";const Ki={sm:640,md:768,lg:1024,xl:1280,"2xl":1400,"3xl":1600},$j={default:1400,narrow:896,medium:1152,wide:1600},Rj={mobile:16,tablet:24,desktop:32,desktopLarge:48},Lj={width:280,collapsedWidth:64,navigationWidth:240},Dj={headerHeight:60,tabsHeight:48,totalHeight:108},zj={none:0,xs:8,sm:16,md:24,lg:32,xl:48,"2xl":64},Bj={containerMaxWidth:"--layout-container-max-width",containerNarrow:"--layout-container-narrow",containerMedium:"--layout-container-medium",containerWide:"--layout-container-wide",containerPaddingMobile:"--layout-container-padding-mobile",containerPaddingTablet:"--layout-container-padding-tablet",containerPaddingDesktop:"--layout-container-padding-desktop",containerPaddingDesktopLg:"--layout-container-padding-desktop-lg",sidebarWidth:"--layout-sidebar-width",sidebarCollapsed:"--layout-sidebar-collapsed",sidebarNavigation:"--layout-sidebar-navigation",navbarHeaderHeight:"--layout-navbar-header-height",navbarTabsHeight:"--layout-navbar-tabs-height",navbarTotalHeight:"--layout-navbar-total-height"},WO={breakpoints:Ki,container:$j,containerPadding:Rj,sidebar:Lj,navbar:Dj,spacing:zj,cssVariables:Bj};function HO(e){return`${e/16}rem`}function VO(e){return`${e}px`}function UO(e,t="min"){const r=typeof e=="number"?e:Ki[e],n=t==="max"?r-1:r;return`(${t}-width: ${n}px)`}function KO(e,t,r="gte"){const n=Ki[t];return r==="gte"?e>=n:e<n}function GO(e){const r=Object.entries(Ki).sort((n,a)=>a[1]-n[1]);for(const[n,a]of r)if(e>=a)return n;return"sm"}const Fj=P.createContext(null);function ZO(){const e=P.useContext(Fj);if(!e)throw new Error("usePanelContext must be used within a PanelLayout");return e}const Re={minWidth:200,maxWidthPercent:50,minCentralWidth:150,minCentralPercent:10,closeZoneMin:10,closeZoneMax:15,snapMinWidth:15,exitAnimationDuration:100};function YO(e){return e>=Re.closeZoneMin&&e<=Re.closeZoneMax}function Vx(e){return e<Re.snapMinWidth?Re.snapMinWidth:e}function _o(e,t,r=0,n=Re.minCentralWidth){const a=t-n-r,s=Math.min(e,a)/t*100;return Math.max(10,Math.min(s,Re.maxWidthPercent))}function qj(e,t,r,n=0,a=Re.minCentralWidth,i=0,s=0){const l=i/100*r;let c;e==="left"?c=t-l:c=r-t-l;const u=c/r*100,f=100-a/r*100-n-i;return Math.max(Re.closeZoneMin,Math.min(u,f))}function ko(e){return e.filter(t=>t.open).reduce((t,r)=>t+r.width,0)}function Wj(e){return ko(e.left)+ko(e.right)}function Ut(e,t){const r=e.left.find(a=>a.id===t);if(r)return{panel:r,side:"left"};const n=e.right.find(a=>a.id===t);if(n)return{panel:n,side:"right"}}function XO(e){return 100-Wj(e)}function Po(e,t=typeof window<"u"?window.innerWidth:1920){const r={left:[],right:[]};return e.forEach(n=>{const i=e.filter(c=>c.side===n.side&&c.id!==n.id).reduce((c,u)=>c+u.defaultWidth,0),s=_o(n.defaultWidth,t,i),l={id:n.id,open:n.defaultOpen??!0,width:s};r[n.side].push(l)}),r}const Hj=O.default.memo(({children:e,panels:t,onPanelResize:r,onCloseZoneChange:n,onPanelClose:a,minCentralWidth:i=Re.minCentralWidth,className:s})=>{const[l,c]=P.useState(null),u=P.useRef(null),d=P.useCallback(C=>{c(C)},[]),f=P.useCallback((C,y)=>{r(C,y)},[r]),h=P.useCallback((C,y)=>{c(null),y&&a&&a(C)},[a]),p=P.useCallback((C,y)=>{n&&n(C,y)},[n]),g=P.useCallback(C=>{const y=Ut(t,C);if(y)return{...y.panel,isResizing:l===C}},[t,l]),x=P.useMemo(()=>({panels:t,onResizeStart:d,onResize:f,onResizeEnd:h,onCloseZoneChange:p,getPanelState:g,minCentralWidth:i,containerRef:u}),[t,d,f,h,p,g,i]),{leftPanels:m,rightPanels:v,mainContent:b}=P.useMemo(()=>{const C=[],y=[];let j=null;return O.default.Children.forEach(e,S=>{if(O.default.isValidElement(S)){if(S.type&&S.type.displayName==="PanelMain"){j=S;return}if(S.type&&S.type.displayName==="Panel"){const A=S.props;A.side==="left"?C.push(S):A.side==="right"&&y.push(S)}}}),{leftPanels:C,rightPanels:y,mainContent:j}},[e]),w=l!==null;return o.jsx(Fj.Provider,{value:x,children:o.jsxs("div",{ref:u,className:N.clsx("flex h-full w-full overflow-hidden","transition-all duration-100 ease-out",w&&"select-none",s),"data-panel-layout":!0,"data-resizing":w,children:[m,b,v]})})});Hj.displayName="PanelLayout";const Vj=({side:e="right",fillColor:t="var(--surface-1)",className:r})=>{const l=e==="right",c=l?.5:9-.5,u=l?9-.5:.5,d=l?"left":"right",f=l?`
|
|
2
|
+
M ${c} 0
|
|
3
|
+
Q ${c} 4, ${c+4} 4
|
|
4
|
+
L ${u-4} 4
|
|
5
|
+
Q ${u} 4, ${u} 8
|
|
6
|
+
L ${u} 40
|
|
7
|
+
Q ${u} 44, ${u-4} 44
|
|
8
|
+
L ${c+4} 44
|
|
9
|
+
Q ${c} 44, ${c} 48
|
|
12
10
|
`:`
|
|
13
|
-
M ${
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Q ${f} ${u-4}, ${f} ${u}
|
|
22
|
-
L ${f} ${e}
|
|
23
|
-
`,x=d?(f+h)/2:(h+f)/2,m=e/2;return o.jsxs("div",{className:N.clsx("relative cursor-col-resize",n),style:{width:9,height:e},children:[o.jsxs("svg",{width:9,height:e,viewBox:`0 0 9 ${e}`,fill:"none",className:"absolute inset-0",children:[o.jsx("rect",{x:p,y:0,width:.5,height:e,fill:r}),o.jsx("path",{d:g,fill:r,stroke:"var(--surface-3)",strokeWidth:"1"})]}),o.jsxs("div",{className:"absolute flex flex-col gap-[2px] items-center",style:{left:x,top:m,transform:"translate(-50%, -50%)"},children:[o.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"}),o.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"}),o.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"})]})]})},Uj=O.default.memo(({id:e,side:t,children:r,resizable:n=!0,panelBg:a="var(--surface-1)",className:i})=>{const{panels:s,onResizeStart:l,onResize:c,onResizeEnd:u,onCloseZoneChange:d,getPanelState:f,minCentralWidth:h,containerRef:p}=ZO(),g=f(e),x=P.useRef(!1),m=P.useRef(!1),v=P.useRef(null),b=P.useRef(!1),w=P.useRef(0),C=P.useRef(!1),y=P.useRef(null),[j,S]=P.useState(500),A=P.useRef({side:t,oppositeSideWidth:0,minCentralWidth:h,externalPanelsWidth:0,internalPanelsWidth:0,panelState:g}),I=ko(s[t==="left"?"right":"left"]),k=s[t],E=k.findIndex(W=>W.id===e),T=k.filter((W,Z)=>W.open?t==="right"?Z>E:Z<E:!1).reduce((W,Z)=>W+Z.width,0),M=k.filter((W,Z)=>!W.open||W.id===e?!1:t==="right"?Z<E:Z>E).reduce((W,Z)=>W+Z.width,0);A.current={side:t,oppositeSideWidth:I,minCentralWidth:h,externalPanelsWidth:T,internalPanelsWidth:M,panelState:g};const R=P.useRef(c),$=P.useRef(u),L=P.useRef(d);R.current=c,$.current=u,L.current=d;const q=P.useCallback(W=>{x.current&&(m.current=!0,!v.current&&(v.current=requestAnimationFrame(()=>{v.current=null;const Z=p.current;if(!Z)return;const re=Z.getBoundingClientRect(),X=re.width,ne=W.clientX-re.left,{side:ce,oppositeSideWidth:G,minCentralWidth:ee,externalPanelsWidth:J,internalPanelsWidth:D}=A.current,he=qj(ce,ne,X,G,ee,J,D),me=he<w.current&&YO(he);me!==b.current&&(b.current=me,L.current(e,me)),R.current(e,he)})))},[e,p]),U=P.useCallback(()=>{if(!x.current)return;x.current=!1,document.body.style.userSelect="",document.body.style.cursor="";const W=m.current&&b.current,{panelState:Z}=A.current;!W&&Z&&Z.width<Vx(Z.width)&&R.current(e,Vx(Z.width)),m.current=!1,b.current=!1,$.current(e,W),document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",U)},[e,q]),z=P.useCallback(()=>{x.current=!0,document.body.style.userSelect="none",document.body.style.cursor="col-resize";const{panelState:W}=A.current;w.current=W?.width??0,l(e),document.addEventListener("mousemove",q),document.addEventListener("mouseup",U)},[e,q,U,l]);if(P.useEffect(()=>()=>{v.current&&cancelAnimationFrame(v.current),document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",U)},[q,U]),P.useEffect(()=>{if(g?.open&&!g?.exiting){const W=setTimeout(()=>{C.current=!0},150);return()=>clearTimeout(W)}else g?.open||(C.current=!1)},[g?.open,g?.exiting]),P.useEffect(()=>{const W=y.current;if(!W)return;const Z=()=>{const X=W.offsetHeight;X>0&&S(X)};Z();const re=new ResizeObserver(Z);return re.observe(W),()=>re.disconnect()},[]),!g||!g.open&&!g.exiting)return null;const F=t==="left"?"right":"left",H=()=>g.exiting?t==="left"?"animate-panel-exit":"animate-panel-exit-right":C.current?"":t==="left"?"animate-panel-enter":"animate-panel-enter-right";return o.jsxs("div",{ref:y,className:N.clsx("h-full relative flex-shrink-0","transition-[width] duration-100 ease-out",g.isResizing&&"transition-none",i),style:{width:`${g.width}%`},"data-panel":e,"data-panel-side":t,"data-in-close-zone":g.inCloseZone,"data-exiting":g.exiting,children:[o.jsx("div",{className:N.clsx("absolute inset-0 overflow-hidden","transition-opacity duration-100",H(),g.inCloseZone?"opacity-50":"opacity-100"),style:{backgroundColor:a},children:r}),n&&!g.exiting&&o.jsx("div",{className:N.clsx("absolute top-0 z-50",F==="right"?"right-0 translate-x-full":"left-0 -translate-x-full"),onMouseDown:z,children:o.jsx(Vj,{side:F,height:j,fillColor:a})}),!n&&o.jsx("div",{className:N.clsx("absolute top-0 bottom-0 w-px bg-surface-3",F==="right"?"right-0":"left-0")})]})});Uj.displayName="Panel";const Kj=O.default.memo(({children:e,className:t})=>o.jsx("div",{className:N.clsx("flex-1 min-w-0 h-full overflow-hidden relative","transition-all duration-100 ease-out",t),"data-panel-main":!0,children:e}));Kj.displayName="PanelMain";function Ux(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&typeof t.open=="boolean"&&typeof t.width=="number"}function QO(e){if(!e||typeof e!="object")return!1;const t=e;return Array.isArray(t.left)&&Array.isArray(t.right)&&t.left.every(Ux)&&t.right.every(Ux)}function JO(e){const{config:t,persist:r=!1,persistKey:n="panel-state"}=e,a=P.useMemo(()=>{const m=new Map;return t.forEach(v=>m.set(v.id,v)),m},[t]),[i,s]=P.useState(()=>Po(t,1920)),[l,c]=P.useState(!1);P.useEffect(()=>{if(r&&typeof window<"u")try{const m=localStorage.getItem(n);if(m){const v=JSON.parse(m);if(QO(v)){s(v),c(!0);return}}}catch{}typeof window<"u"&&s(Po(t,window.innerWidth)),c(!0)},[r,n]),P.useEffect(()=>{if(l&&r&&typeof window<"u")try{localStorage.setItem(n,JSON.stringify(i))}catch{}},[i,r,n,l]);const u=P.useCallback(m=>{s(v=>{const b=Ut(v,m);if(!b)return v;const{side:w,panel:C}=b;if(C.open)return{...v,[w]:v[w].map(L=>L.id===m?{...L,open:!1}:L)};const y=w==="left"?"right":"left",j=a.get(m),S=typeof window<"u"?window.innerWidth:1920,A=j?_o(j.defaultWidth,S):20,_=v[y].filter(L=>L.open).reduce((L,q)=>L+q.width,0),I=v[w].filter(L=>L.open&&L.id!==m),k=I.reduce((L,q)=>L+q.width,0),E=100-_-Re.minCentralPercent;if(k+A<=E)return{...v,[w]:v[w].map(L=>L.id===m?{...L,open:!0,width:A}:L)};const T=I.length*Re.snapMinWidth,M=E-T,R=Math.min(A,Math.max(Re.snapMinWidth,M)),$=E-R;if(k>0&&$<k){const L=$/k;return{...v,[w]:v[w].map(q=>{if(q.id===m)return{...q,open:!0,width:R};if(q.open){const U=Math.max(Re.snapMinWidth,q.width*L);return{...q,width:U}}return q})}}return{...v,[w]:v[w].map(L=>L.id===m?{...L,open:!0,width:R}:L)}})},[a]),d=P.useCallback((m,v)=>{s(b=>{const w=Ut(b,m);if(!w)return b;const{side:C,panel:y}=w,S=b[C==="left"?"right":"left"].filter(T=>T.open).reduce((T,M)=>T+M.width,0),A=b[C].filter(T=>T.open&&T.id!==m),_=A.reduce((T,M)=>T+M.width,0),I=100-S-Re.minCentralPercent,k=v+_;if(k<=I)return{...b,[C]:b[C].map(T=>T.id===m?{...T,width:v}:T)};if(v>y.width&&_>0){const T=k-I,M=Math.max(A.length*Re.snapMinWidth,_-T),R=I-M,$=M/_;return{...b,[C]:b[C].map(L=>{if(L.id===m)return{...L,width:R};if(L.open){const q=Math.max(Re.snapMinWidth,L.width*$);return{...L,width:q}}return L})}}return{...b,[C]:b[C].map(T=>T.id===m?{...T,width:Math.min(v,I-_)}:T)}})},[]),f=P.useCallback(m=>{s(v=>{const b=Ut(v,m);if(!b||b.panel.open)return v;const{side:w}=b,C=w==="left"?"right":"left",y=a.get(m),j=typeof window<"u"?window.innerWidth:1920,S=y?_o(y.defaultWidth,j):20,A=v[C].filter($=>$.open).reduce(($,L)=>$+L.width,0),_=v[w].filter($=>$.open&&$.id!==m),I=_.reduce(($,L)=>$+L.width,0),k=100-A-Re.minCentralPercent;if(I+S<=k)return{...v,[w]:v[w].map($=>$.id===m?{...$,open:!0,width:S}:$)};const E=_.length*Re.snapMinWidth,T=k-E,M=Math.min(S,Math.max(Re.snapMinWidth,T)),R=k-M;if(I>0&&R<I){const $=R/I;return{...v,[w]:v[w].map(L=>{if(L.id===m)return{...L,open:!0,width:M};if(L.open){const q=Math.max(Re.snapMinWidth,L.width*$);return{...L,width:q}}return L})}}return{...v,[w]:v[w].map($=>$.id===m?{...$,open:!0,width:M}:$)}})},[a]),h=P.useCallback(m=>{s(v=>{const b=Ut(v,m);if(!b||!b.panel.open)return v;const{side:w}=b;return{...v,[w]:v[w].map(C=>C.id===m?{...C,open:!1,exiting:!1,inCloseZone:!1}:C)}})},[]),p=P.useCallback((m,v)=>{s(b=>{const w=Ut(b,m);if(!w)return b;const{side:C}=w;return{...b,[C]:b[C].map(y=>y.id===m?{...y,inCloseZone:v}:y)}})},[]),g=P.useCallback(m=>{s(v=>{const b=Ut(v,m);if(!b)return v;const{side:w}=b;return{...v,[w]:v[w].map(C=>C.id===m?{...C,exiting:!0,inCloseZone:!1}:C)}}),setTimeout(()=>{s(v=>{const b=Ut(v,m);if(!b)return v;const{side:w}=b;return{...v,[w]:v[w].map(C=>C.id===m?{...C,open:!1,exiting:!1,width:Re.snapMinWidth}:C)}})},Re.exitAnimationDuration)},[]),x=P.useCallback(()=>{const m=typeof window<"u"?window.innerWidth:1920;s(Po(t,m))},[t]);return P.useEffect(()=>{const m=[...i.left.filter(b=>b.exiting),...i.right.filter(b=>b.exiting)];if(m.length===0)return;const v=m.map(b=>setTimeout(()=>{s(w=>{const C=Ut(w,b.id);if(!C)return w;const{side:y}=C;return{...w,[y]:w[y].map(j=>j.id===b.id&&j.exiting?{...j,open:!1,exiting:!1}:j)}})},Re.exitAnimationDuration));return()=>{v.forEach(b=>clearTimeout(b))}},[i]),{panels:i,togglePanel:u,resizePanel:d,openPanel:f,closePanel:h,resetPanels:x,handleCloseZoneChange:p,handlePanelClose:g}}const Gj=O.default.memo(({mainContent:e,sidePanel:t,isPanelOpen:r,onPanelExited:n,panelWidth:a=400,panelPosition:i="right",animationDuration:s=75,className:l,mainContentBg:c="bg-white",sidePanelBg:u,resizable:d=!0,minWidth:f=280,maxWidth:h=800,handleFillColor:p="var(--surface-1)",onResize:g})=>{const[x,m]=P.useState(!1),[v,b]=P.useState(r),[w,C]=P.useState(a),[y,j]=P.useState(!1),S=P.useRef(!1),A=P.useRef({clientX:0,width:0}),_=P.useRef(null),[I,k]=P.useState(0);P.useEffect(()=>{const F=_.current;if(!F)return;const H=()=>{const Z=F.offsetHeight;Z>0&&k(Z)};H();const W=new ResizeObserver(H);return W.observe(F),()=>W.disconnect()},[v]),P.useEffect(()=>{if(r)b(!0),m(!1);else if(v){m(!0);const F=setTimeout(()=>{b(!1),m(!1),n?.()},s);return()=>clearTimeout(F)}},[r,s,v,n]);const E=P.useCallback(F=>{if(!S.current)return;const H=F.clientX-A.current.clientX,W=i==="right"?A.current.width-H:A.current.width+H,Z=Math.max(f,Math.min(h,W));C(Z),g?.(Z)},[i,f,h,g]),T=P.useCallback(()=>{S.current&&(S.current=!1,j(!1),document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",T))},[E]),M=P.useCallback(F=>{F.preventDefault(),A.current={clientX:F.clientX,width:w},S.current=!0,j(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize",document.addEventListener("mousemove",E),document.addEventListener("mouseup",T)},[w,E,T]);P.useEffect(()=>()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",T)},[E,T]);const R=r?`calc(100% - ${w}px)`:"100%",$=i==="right"?"animate-slideInRight":"animate-slideInLeft",L=i==="right"?"animate-slideOutRight":"animate-slideOutLeft",q=i==="right"?"left":"right",U=y?"0ms":`${s}ms`,z=()=>o.jsx("div",{ref:_,className:"relative h-full transition-all ease-out",style:{width:r?`${w}px`:"0px",opacity:r?1:0,transitionDuration:U},children:v&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:N.clsx("h-full overflow-hidden",u,x?L:$),children:t}),d&&!x&&o.jsx("div",{className:N.clsx("absolute top-0 z-50",q==="right"?"right-0 translate-x-full":"left-0 -translate-x-full"),onMouseDown:M,children:o.jsx(Vj,{side:q,height:I,fillColor:p})})]})});return o.jsx("div",{className:N.clsx("w-full flex flex-col",l),style:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:o.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[i==="left"&&z(),o.jsx("div",{className:N.clsx("relative flex flex-col ease-out overflow-hidden",c),style:{width:R,transition:"width",transitionDuration:U},children:o.jsx("div",{className:"relative flex-1 overflow-hidden",children:e})}),i==="right"&&z()]})})});Gj.displayName="SplitPanelLayout";const er=e=>e!==void 0&&{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",7:"gap-7",8:"gap-8"}[e]||"gap-4",Zj=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("mask",{id:"mask0_1135_15829",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:o.jsx("path",{d:"M20 0H0V20H20V0Z",fill:"white"})}),o.jsxs("g",{mask:"url(#mask0_1135_15829)",children:[o.jsx("path",{d:"M9.99297 18.9587C5.0513 18.9587 1.04297 14.942 1.04297 10.0003C1.04297 5.05866 5.05964 1.04199 10.0013 1.04199C14.943 1.04199 18.9596 5.05866 18.9596 10.0003C18.9596 10.5003 18.918 11.0087 18.8346 11.5003C18.7763 11.842 18.4596 12.0753 18.1096 12.0087C17.768 11.9503 17.543 11.6253 17.6013 11.2837C17.6763 10.8587 17.7096 10.4253 17.7096 10.0003C17.7096 5.75033 14.2513 2.29199 10.0013 2.29199C5.7513 2.29199 2.29297 5.75033 2.29297 10.0003C2.29297 14.2503 5.7513 17.7087 10.0013 17.7087C10.6013 17.7087 11.193 17.642 11.768 17.5003C12.093 17.4253 12.443 17.6253 12.518 17.967C12.6013 18.3003 12.393 18.642 12.0513 18.717C11.3846 18.8753 10.693 18.9587 9.99297 18.9587Z",fill:"currentColor"}),o.jsx("path",{d:"M13.3346 10.625H6.66797C6.3263 10.625 6.04297 10.3417 6.04297 10C6.04297 9.65833 6.3263 9.375 6.66797 9.375H13.3346C13.6763 9.375 13.9596 9.65833 13.9596 10C13.9596 10.3417 13.6763 10.625 13.3346 10.625Z",fill:"currentColor"}),o.jsx("path",{d:"M10 13.9587C9.65833 13.9587 9.375 13.6753 9.375 13.3337V6.66699C9.375 6.32533 9.65833 6.04199 10 6.04199C10.3417 6.04199 10.625 6.32533 10.625 6.66699V13.3337C10.625 13.6753 10.3417 13.9587 10 13.9587Z",fill:"currentColor"}),o.jsx("path",{d:"M15.7085 18.7834C15.3585 18.7834 15.0669 18.5417 15.0002 18.2084L14.7752 17.2251C14.6669 16.7417 14.2835 16.3667 13.8085 16.2584L12.8085 16.0251C12.4752 15.9501 12.2419 15.6584 12.2502 15.3167C12.2585 14.9751 12.4919 14.6751 12.8252 14.6084L13.8085 14.3834C14.2835 14.2751 14.6669 13.8917 14.7752 13.4167L15.0085 12.4167C15.0835 12.0917 15.3752 11.8584 15.7169 11.8584C16.0669 11.8584 16.3585 12.1001 16.4252 12.4334L16.6502 13.4167C16.7585 13.8917 17.1419 14.2751 17.6169 14.3834L18.6169 14.6167C18.9419 14.6917 19.1835 14.9834 19.1752 15.3251C19.1752 15.6667 18.9419 15.9584 18.6085 16.0334L17.6169 16.2584C17.1335 16.3667 16.7585 16.7501 16.6502 17.2251L16.4169 18.2251C16.3419 18.5501 16.0502 18.7834 15.7085 18.7834ZM14.7835 15.3167C15.1669 15.5417 15.4835 15.8584 15.7085 16.2417C15.9335 15.8584 16.2502 15.5417 16.6335 15.3167C16.2502 15.0917 15.9335 14.7751 15.7085 14.3917C15.4835 14.7751 15.1669 15.0917 14.7835 15.3167Z",fill:"currentColor"})]})]}),Yj=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsxs("g",{clipPath:"url(#clip0_1314_55824)",children:[o.jsx("mask",{id:"mask0_1314_55824",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:o.jsx("path",{d:"M19.5 0.5V19.5H0.5V0.5H19.5Z",fill:"white",stroke:"white"})}),o.jsxs("g",{mask:"url(#mask0_1314_55824)",children:[o.jsx("path",{d:"M13.2839 19.4583C12.9339 19.4583 12.6422 19.225 12.5672 18.8833L12.3339 17.8667C12.2172 17.3667 11.8255 16.975 11.3339 16.8583L10.3089 16.625C9.98385 16.5583 9.74219 16.2583 9.74219 15.9167C9.74219 15.575 9.97552 15.275 10.3172 15.2L11.3255 14.9667C11.8255 14.85 12.2172 14.4583 12.3339 13.9667L12.5672 12.9417C12.6422 12.6083 12.9339 12.375 13.2755 12.375C13.6255 12.375 13.9172 12.6167 13.9839 12.95L14.2172 13.9583C14.3339 14.4583 14.7255 14.85 15.2172 14.9667L16.2422 15.2C16.5672 15.2667 16.8089 15.5667 16.8089 15.9083C16.8089 16.25 16.5755 16.55 16.2422 16.625L15.2255 16.8583C14.7255 16.975 14.3339 17.3667 14.2172 17.8583L13.9755 18.8833C13.9089 19.2083 13.6089 19.45 13.2672 19.45L13.2839 19.4583ZM12.3005 15.9333C12.7089 16.1667 13.0505 16.5083 13.2755 16.9167C13.5089 16.5083 13.8505 16.1667 14.2589 15.9417C13.8505 15.7083 13.5089 15.3667 13.2839 14.9583C13.0505 15.3667 12.7089 15.7083 12.3005 15.9333Z",fill:"currentColor"}),o.jsx("path",{d:"M8.88331 18.4586C8.88331 18.4586 8.82498 18.4586 8.79165 18.4586C7.94165 18.3419 7.11665 18.0919 6.33331 17.7169C6.20831 17.6586 5.95832 17.6253 5.84165 17.6503L5.65832 17.6919C5.09998 17.8253 4.28331 18.0253 3.59165 18.1919C3.02498 18.3336 2.49165 18.2086 2.14165 17.8586C1.79165 17.5086 1.66665 16.9753 1.80832 16.4003L2.34998 14.1503C2.37498 14.0419 2.34998 13.8003 2.28331 13.6669C1.53331 12.0919 1.28331 10.3253 1.56665 8.5586C2.14998 5.02525 5.02498 2.15025 8.55832 1.56692C11.35 1.11692 14.075 1.99192 16.0416 3.96692C18.0083 5.94192 18.875 8.66693 18.425 11.4419C18.2833 12.2919 18.025 13.1086 17.65 13.8669C17.5 14.1753 17.125 14.3003 16.8166 14.1503C16.5083 14.0003 16.3833 13.6253 16.5333 13.3169C16.85 12.6669 17.075 11.9669 17.1916 11.2419C17.5833 8.86693 16.8416 6.53359 15.1583 4.85025C13.475 3.16692 11.1416 2.41692 8.75832 2.80025C5.74998 3.30025 3.29998 5.75025 2.80831 8.76693C2.56665 10.2753 2.77498 11.7919 3.41665 13.1336C3.56665 13.4503 3.68332 14.0003 3.56665 14.4586L3.02498 16.7003C2.98331 16.8836 3.01665 16.9669 3.02498 16.9753C3.03332 16.9836 3.11665 17.0253 3.29998 16.9753C3.99998 16.8086 4.80832 16.6169 5.36665 16.4836L5.55832 16.4336C5.95832 16.3419 6.49998 16.4086 6.86665 16.5836C7.53332 16.9003 8.24165 17.1086 8.96665 17.2086C9.30832 17.2586 9.54165 17.5753 9.49998 17.9169C9.45831 18.2253 9.19165 18.4586 8.88331 18.4586Z",fill:"currentColor"}),o.jsx("path",{d:"M14.5246 8.92515C14.2746 8.92515 14.0329 8.76681 13.9413 8.51681C13.5246 7.3918 12.6413 6.50013 11.5163 6.0668C11.1913 5.9418 11.0329 5.58346 11.1579 5.25846C11.2829 4.93346 11.6496 4.77513 11.9663 4.90013C13.4163 5.4668 14.5663 6.62513 15.1079 8.08346C15.2329 8.40848 15.0663 8.76681 14.7413 8.89181C14.6663 8.91681 14.5996 8.92515 14.5246 8.92515Z",fill:"currentColor"})]})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1314_55824",children:o.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),e6=({size:e,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 1.5a.5.5 0 0 1 .5.5v6.793l2.146-2.147a.5.5 0 1 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L5.5 8.793V2a.5.5 0 0 1 .5-.5Z",clipRule:"evenodd"})}),Xj=P.forwardRef(e6),t6=({size:e,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.267 1h7.466c.264 0 .496 0 .678.016.174.016.413.053.607.213a1 1 0 0 1 .363.81c-.01.252-.142.455-.247.595a8.283 8.283 0 0 1-.44.516L7.826 6.356l-.074.084-.001.001v.002l-.001.113v2.693c0 .068.002.21-.047.344a.75.75 0 0 1-.199.293c-.105.095-.238.147-.302.172l-.018.007-1.714.685c-.08.032-.167.067-.245.09a.764.764 0 0 1-.378.025.75.75 0 0 1-.472-.32.764.764 0 0 1-.118-.36 3.036 3.036 0 0 1-.007-.26v-3.37l-.001-.112v-.002h-.001a3.066 3.066 0 0 0-.075-.085L1.32 3.166l-.015-.016c-.176-.197-.33-.37-.44-.516C.762 2.494.63 2.291.62 2.04a1 1 0 0 1 .362-.811c.194-.16.434-.197.608-.213C1.771 1 2.002 1 2.267 1Zm-.615 1.015.016.022c.078.106.202.244.398.463l2.853 3.189.015.017c.06.066.133.148.188.246a1 1 0 0 1 .104.272c.024.11.024.22.024.308v3.229l1.5-.6V6.532c0-.088 0-.199.024-.308a1 1 0 0 1 .104-.272c.055-.098.129-.18.187-.246l.016-.017L9.934 2.5a7.943 7.943 0 0 0 .414-.485l-.027-.003A7.924 7.924 0 0 0 9.711 2H2.289a7.925 7.925 0 0 0-.637.015Z",clipRule:"evenodd"})}),Qj=P.forwardRef(t6),r6=({size:e,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t.strokeWidth||1,d:"m18.67 18.67 2.22-1.11v-2.78m-6.67-5L12 10.89l2.22-1.11ZM12 10.89 9.78 9.78 12 10.89Zm0 0v2.78-2.78Zm8.89-4.45-2.22 1.11 2.22-1.11Zm0 0-2.22-1.11 2.22 1.11Zm0 0v2.78-2.78Zm-6.67-3.33L12 2 9.78 3.11h4.44ZM3.11 6.44l2.22-1.11-2.22 1.11Zm0 0 2.22 1.11-2.22-1.11Zm0 0v2.78-2.78ZM12 22l-2.22-1.11L12 22Zm0 0 2.22-1.11L12 22Zm0 0v-2.78V22Zm-6.67-3.33-2.22-1.11v-2.78l2.22 3.89Z"})}),n6=P.forwardRef(r6),a6=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 27 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{d:"M23.34 25.005L26.67 23.34V19.17M16.665 11.67L13.335 13.335M13.335 13.335L10.005 11.67M13.335 13.335V17.505M26.67 6.66L23.34 8.325M26.67 6.66L23.34 4.995M26.67 6.66V10.83M16.665 1.665L13.335 0L10.005 1.665H16.665ZM0 6.66L3.33 4.995M0 6.66L3.33 8.325M0 6.66V10.83M13.335 30L10.005 28.335M13.335 30L16.665 28.335M13.335 30V25.83M3.33 25.005L0 23.34V19.17",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),i6=({size:e,...t},r)=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:e,height:e,fill:"none",ref:r,...t,children:[o.jsx("g",{clipPath:"url(#a)",children:o.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM.665 8a7.333 7.333 0 1 1 14.667 0A7.333 7.333 0 0 1 .666 8Z",clipRule:"evenodd"})}),o.jsx("defs",{children:o.jsx("clipPath",{id:"a",children:o.jsx("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}),o6=P.forwardRef(i6),s6=({title:e,titleId:t,size:r,...n},a)=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:r,height:r,fill:"none",ref:a,"aria-labelledby":t,...n,children:[e?o.jsx("title",{id:t,children:e}):null,o.jsxs("g",{clipPath:"url(#a)",children:[o.jsx("mask",{id:"b",width:24,height:24,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"},children:o.jsx("path",{fill:"#fff",d:"M24 0H0v24h24V0Z"})}),o.jsxs("g",{fill:"#fff",mask:"url(#b)",children:[o.jsx("path",{d:"M11.99 22.75C6.06 22.75 1.25 17.93 1.25 12S6.07 1.25 12 1.25 22.75 6.07 22.75 12c0 .6-.05 1.21-.15 1.8-.07.41-.45.69-.87.61a.75.75 0 0 1-.61-.87c.09-.51.13-1.03.13-1.54 0-5.1-4.15-9.25-9.25-9.25S2.75 6.9 2.75 12 6.9 21.25 12 21.25c.72 0 1.43-.08 2.12-.25.39-.09.81.15.9.56.1.4-.15.81-.56.9-.8.19-1.63.29-2.47.29Z"}),o.jsx("path",{d:"M16 12.75H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h8c.41 0 .75.34.75.75s-.34.75-.75.75Z"}),o.jsx("path",{d:"M12 16.75c-.41 0-.75-.34-.75-.75V8c0-.41.34-.75.75-.75s.75.34.75.75v8c0 .41-.34.75-.75.75ZM18.85 22.54a.86.86 0 0 1-.85-.69l-.27-1.18c-.13-.58-.59-1.03-1.16-1.16l-1.2-.28a.848.848 0 0 1-.67-.85c.01-.41.29-.77.69-.85l1.18-.27c.57-.13 1.03-.59 1.16-1.16l.28-1.2c.09-.39.44-.67.85-.67.42 0 .77.29.85.69l.27 1.18c.13.57.59 1.03 1.16 1.16l1.2.28c.39.09.68.44.67.85 0 .41-.28.76-.68.85l-1.19.27c-.58.13-1.03.59-1.16 1.16l-.28 1.2c-.09.39-.44.67-.85.67Zm-1.11-4.16c.46.27.84.65 1.11 1.11.27-.46.65-.84 1.11-1.11-.46-.27-.84-.65-1.11-1.11-.27.46-.65.84-1.11 1.11Z"})]})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"a",children:o.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),l6=P.forwardRef(s6),nt=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.74408 2.74408C3.06951 2.41864 3.59715 2.41864 3.92259 2.74408L10 8.82149L16.0774 2.74408C16.4028 2.41864 16.9305 2.41864 17.2559 2.74408C17.5814 3.06952 17.5814 3.59715 17.2559 3.92259L11.1785 10L17.2559 16.0774C17.5814 16.4028 17.5814 16.9305 17.2559 17.2559C16.9305 17.5814 16.4028 17.5814 16.0774 17.2559L10 11.1785L3.92259 17.2559C3.59715 17.5814 3.06951 17.5814 2.74408 17.2559C2.41864 16.9305 2.41864 16.4028 2.74408 16.0774L8.82149 10L2.74408 3.92259C2.41864 3.59715 2.41864 3.06951 2.74408 2.74408Z",fill:"currentColor"})}),Jj=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 43 43",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsxs("g",{clipPath:"url(#clip0_50_31011)",children:[o.jsx("path",{d:"M33.9412 3.62061H14.6738V11.6106H38.0563V7.73402C38.0563 5.46567 36.2102 3.62061 33.9412 3.62061Z",fill:"#CED9F9"}),o.jsx("path",{d:"M23.0352 12.8403H0.5V5.42636C0.5 2.70972 2.71068 0.5 5.42828 0.5H12.6336C13.3497 0.5 14.0396 0.650925 14.6664 0.934509C15.5418 1.32896 16.2939 1.97913 16.8213 2.8286L23.0352 12.8403Z",fill:"#1640C1"}),o.jsx("path",{d:"M42.5 14.4999V38.3812C42.5 40.6525 40.6511 42.4998 38.3789 42.4998H4.62111C2.34891 42.4998 0.5 40.6525 0.5 38.3812V10.3804H38.3789C40.6511 10.3804 42.5 12.2283 42.5 14.4999Z",fill:"#2354E6"}),o.jsx("path",{d:"M42.5 14.4999V38.3812C42.5 40.6525 40.6511 42.4998 38.3789 42.4998H21.5V10.3804H38.3789C40.6511 10.3804 42.5 12.2283 42.5 14.4999Z",fill:"#1849D6"}),o.jsx("path",{d:"M32.5471 26.44C32.5471 32.5325 27.5909 37.4889 21.4991 37.4889C15.4073 37.4889 10.4512 32.5325 10.4512 26.44C10.4512 20.3486 15.4073 15.3921 21.4991 15.3921C27.5909 15.3921 32.5471 20.3486 32.5471 26.44Z",fill:"#E7ECFC"}),o.jsx("path",{d:"M32.5479 26.44C32.5479 32.5325 27.5918 37.4889 21.5 37.4889V15.3921C27.5918 15.3921 32.5479 20.3486 32.5479 26.44Z",fill:"#CED9F9"}),o.jsx("path",{d:"M25.0612 26.5753C24.8308 26.7704 24.5485 26.8656 24.2688 26.8656C23.9185 26.8656 23.5705 26.7173 23.327 26.4282L22.7307 25.7213V30.3494C22.7307 31.0287 22.1795 31.5799 21.5002 31.5799C20.8209 31.5799 20.2698 31.0287 20.2698 30.3494V25.7213L19.6734 26.4282C19.2344 26.9476 18.4587 27.014 17.9392 26.5753C17.4201 26.1373 17.3535 25.3612 17.7915 24.8418L20.2271 21.9543C20.5447 21.5788 21.008 21.3628 21.5002 21.3628C21.9924 21.3628 22.4558 21.5788 22.7733 21.9543L25.2089 24.8418C25.647 25.3612 25.5803 26.1373 25.0612 26.5753Z",fill:"#6C8DEF"}),o.jsx("path",{d:"M25.061 26.5753C24.8306 26.7704 24.5483 26.8656 24.2686 26.8656C23.9183 26.8656 23.5703 26.7173 23.3268 26.4282L22.7305 25.7213V30.3494C22.7305 31.0287 22.1793 31.5799 21.5 31.5799V21.3628C21.9922 21.3628 22.4555 21.5788 22.7731 21.9543L25.2087 24.8418C25.6467 25.3612 25.5801 26.1373 25.061 26.5753Z",fill:"#3B67E9"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_50_31011",children:o.jsx("rect",{width:"42",height:"42",fill:"white",transform:"translate(0.5 0.5)"})})})]}),Yp=({size:e=16,className:t,...r})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:o.jsx("path",{d:"M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM7 7C6.58579 7 6.25 7.33579 6.25 7.75C6.25 8.16421 6.58579 8.5 7 8.5H7.25293C7.41287 8.5 7.53176 8.64856 7.49707 8.80469L7.03809 10.8701C6.79522 11.963 7.62751 13 8.74707 13H9C9.41421 13 9.75 12.6642 9.75 12.25C9.75 11.8358 9.41421 11.5 9 11.5H8.74707C8.58713 11.5 8.46824 11.3514 8.50293 11.1953L8.96191 9.12988C9.20478 8.03698 8.37249 7 7.25293 7H7ZM8 3C7.44771 3 7 3.44772 7 4C7 4.55228 7.44771 5 8 5C8.55228 5 9 4.55228 9 4C9 3.44772 8.55228 3 8 3Z",fill:"currentColor"})}),e2=({size:e=12,...t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5 6C10.5 6.31066 10.2482 6.5625 9.9375 6.5625L3.42049 6.5625L5.83525 8.97725C6.05492 9.19692 6.05492 9.55308 5.83525 9.77275C5.61558 9.99242 5.25942 9.99242 5.03975 9.77275L1.66475 6.39775C1.44508 6.17808 1.44508 5.82192 1.66475 5.60225L5.03975 2.22725C5.25942 2.00758 5.61558 2.00758 5.83525 2.22725C6.05492 2.44692 6.05492 2.80308 5.83525 3.02275L3.4205 5.4375L9.9375 5.4375C10.2482 5.4375 10.5 5.68934 10.5 6Z",fill:"#22262E"})}),t2=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{d:"M11.4736 10.0004L15.451 13.9779L13.9779 15.451L10.0004 11.4736L6.02295 15.451L4.54981 13.9779L8.52728 10.0004L4.5498 6.02294L6.02294 4.5498L10.0004 8.52728L13.9779 4.5498L15.451 6.02294L11.4736 10.0004Z",className:"fill-med-em"})}),Qr=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:e,className:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM11 9V7H13V9H11ZM11 17V11H13V17H11Z",fill:"currentColor"})}),Xp=({size:e=24,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M12.0002 13.4806V13.2249C12.0002 12.3967 12.5118 11.9583 13.0233 11.6051C13.5227 11.2641 14.0219 10.8256 14.0219 10.0218C14.0219 8.9013 13.1207 8 12.0002 8C10.8797 8 9.97852 8.9013 9.97852 10.0218",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M11.9941 16.3909H12.0051",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),c6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M18.3337 13.9498V3.8915C18.3337 2.8915 17.517 2.14983 16.5253 2.23317H16.4753C14.7253 2.38317 12.067 3.27483 10.5837 4.20817L10.442 4.29983C10.2003 4.44983 9.80033 4.44983 9.55866 4.29983L9.35033 4.17483C7.86699 3.24983 5.21699 2.3665 3.46699 2.22483C2.47533 2.1415 1.66699 2.8915 1.66699 3.88317V13.9498C1.66699 14.7498 2.31699 15.4998 3.11699 15.5998L3.35866 15.6332C5.16699 15.8748 7.95866 16.7915 9.55866 17.6665L9.59199 17.6832C9.81699 17.8082 10.1753 17.8082 10.392 17.6832C11.992 16.7998 14.792 15.8748 16.6087 15.6332L16.8837 15.5998C17.6837 15.4998 18.3337 14.7498 18.3337 13.9498Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M10 4.57495V17.075",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M6.45801 7.07495H4.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M7.08301 9.57495H4.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),u6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M7.08366 15.808H6.66699C3.33366 15.808 1.66699 14.9747 1.66699 10.808V6.64136C1.66699 3.30802 3.33366 1.64136 6.66699 1.64136H13.3337C16.667 1.64136 18.3337 3.30802 18.3337 6.64136V10.808C18.3337 14.1414 16.667 15.808 13.3337 15.808H12.917C12.6587 15.808 12.4087 15.933 12.2503 16.1414L11.0003 17.808C10.4503 18.5414 9.55032 18.5414 9.00032 17.808L7.75032 16.1414C7.61698 15.958 7.31699 15.808 7.08366 15.808Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M6.66667 7.25L5 8.91667L6.66667 10.5833",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M13.333 7.25L14.9997 8.91667L13.333 10.5833",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M10.8337 6.9751L9.16699 10.8585",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),d6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M18.3337 12.5001V7.50008C18.3337 3.33341 16.667 1.66675 12.5003 1.66675H7.50033C3.33366 1.66675 1.66699 3.33341 1.66699 7.50008V12.5001C1.66699 16.6667 3.33366 18.3334 7.50033 18.3334H12.5003C16.667 18.3334 18.3337 16.6667 18.3337 12.5001Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2.09961 5.92529H17.8996",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M7.09961 1.75854V5.80854",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M12.9004 1.75854V5.43354",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M8.125 12.0416V11.0416C8.125 9.75827 9.03333 9.23327 10.1417 9.87493L11.0083 10.3749L11.875 10.8749C12.9833 11.5166 12.9833 12.5666 11.875 13.2083L11.0083 13.7083L10.1417 14.2083C9.03333 14.8499 8.125 14.3249 8.125 13.0416V12.0416V12.0416Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),f6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M15.833 13.3333V5.41667C15.833 4.5 15.083 3.75 14.1663 3.75H9.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M11.667 1.66675L9.16699 3.75008L11.667 5.83341",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M15.833 18.3333C17.2137 18.3333 18.333 17.214 18.333 15.8333C18.333 14.4525 17.2137 13.3333 15.833 13.3333C14.4523 13.3333 13.333 14.4525 13.333 15.8333C13.333 17.214 14.4523 18.3333 15.833 18.3333Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.16699 6.66675V14.5834C4.16699 15.5001 4.91699 16.2501 5.83366 16.2501H10.417",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M8.33301 18.3334L10.833 16.2501L8.33301 14.1667",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.16699 6.66675C5.5477 6.66675 6.66699 5.54746 6.66699 4.16675C6.66699 2.78604 5.5477 1.66675 4.16699 1.66675C2.78628 1.66675 1.66699 2.78604 1.66699 4.16675C1.66699 5.54746 2.78628 6.66675 4.16699 6.66675Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),h6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M16.6667 11.6666C17.5871 11.6666 18.3333 10.9204 18.3333 9.99992C18.3333 9.07944 17.5871 8.33325 16.6667 8.33325C15.7462 8.33325 15 9.07944 15 9.99992C15 10.9204 15.7462 11.6666 16.6667 11.6666Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M16.6667 5.00008C17.5871 5.00008 18.3333 4.25389 18.3333 3.33341C18.3333 2.41294 17.5871 1.66675 16.6667 1.66675C15.7462 1.66675 15 2.41294 15 3.33341C15 4.25389 15.7462 5.00008 16.6667 5.00008Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M16.6667 18.3333C17.5871 18.3333 18.3333 17.5871 18.3333 16.6667C18.3333 15.7462 17.5871 15 16.6667 15C15.7462 15 15 15.7462 15 16.6667C15 17.5871 15.7462 18.3333 16.6667 18.3333Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M3.33366 11.6666C4.25413 11.6666 5.00033 10.9204 5.00033 9.99992C5.00033 9.07944 4.25413 8.33325 3.33366 8.33325C2.41318 8.33325 1.66699 9.07944 1.66699 9.99992C1.66699 10.9204 2.41318 11.6666 3.33366 11.6666Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5 10H15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M15.0003 3.33325H11.667C10.0003 3.33325 9.16699 4.16659 9.16699 5.83325V14.1666C9.16699 15.8333 10.0003 16.6666 11.667 16.6666H15.0003",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),r2=e=>o.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsxs("g",{clipPath:"url(#clip0_1562_62901)",children:[o.jsx("mask",{id:"mask0_1562_62901",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"21",height:"20",children:o.jsx("path",{d:"M20.418 0H0.417969V20H20.418V0Z",fill:"white"})}),o.jsxs("g",{mask:"url(#mask0_1562_62901)",children:[o.jsx("path",{d:"M14.3001 16.2424C13.9501 16.2424 13.6668 16.0091 13.5918 15.6758L13.3751 14.7341C13.2751 14.2841 12.9168 13.9341 12.4751 13.8258L11.5251 13.6008C11.2001 13.5341 10.9668 13.2424 10.9668 12.8924C10.9668 12.5424 11.2001 12.2591 11.5418 12.1841L12.4835 11.9674C12.9335 11.8674 13.2835 11.5091 13.3918 11.0674L13.6168 10.1091C13.6835 9.78411 13.9751 9.55078 14.3168 9.55078C14.6251 9.55078 14.9501 9.78411 15.0251 10.1174L15.2418 11.0674C15.3418 11.5174 15.7001 11.8674 16.1418 11.9758L17.1001 12.2008C17.4251 12.2674 17.6585 12.5591 17.6585 12.9091C17.6585 13.2591 17.4251 13.5424 17.1001 13.6174L16.1501 13.8341C15.7001 13.9341 15.3501 14.2924 15.2418 14.7341L15.0168 15.6841C14.9501 16.0091 14.6501 16.2424 14.3001 16.2424ZM13.4751 12.9091C13.8168 13.1174 14.1001 13.4008 14.3085 13.7424C14.5168 13.4008 14.8001 13.1174 15.1418 12.9174C14.8001 12.7091 14.5168 12.4258 14.3085 12.0841C14.1001 12.4258 13.8168 12.7091 13.4751 12.9174V12.9091Z",fill:"currentColor"}),o.jsx("path",{d:"M4.91727 18.1171C3.98394 18.1171 3.40061 17.8088 3.02561 17.4338C2.29227 16.7005 1.77561 15.1421 3.42561 11.8338L4.15061 10.3921C4.24227 10.2005 4.24227 9.80047 4.15061 9.6088L3.42561 8.15881C1.76727 4.85881 2.29227 3.29214 3.02561 2.55881C3.75894 1.82548 5.31727 1.30048 8.62561 2.95881L15.7589 6.52548C17.9589 7.62548 18.9423 9.3338 18.3173 10.9838C18.1923 11.3088 17.8339 11.4671 17.5089 11.3505C17.1839 11.2255 17.0256 10.8671 17.1423 10.5421C17.5256 9.52547 16.7923 8.44214 15.1923 7.64214L8.05894 4.07548C6.05894 3.07548 4.50894 2.84214 3.90061 3.44214C3.29227 4.04214 3.53394 5.60048 4.53394 7.59214L5.25894 9.04214C5.52561 9.5838 5.52561 10.4005 5.25894 10.9421L4.53394 12.3838C3.53394 14.3838 3.29227 15.9338 3.90061 16.5338C4.50061 17.1338 6.05894 16.9005 8.05894 15.9005L10.3923 14.7338C10.7006 14.5838 11.0756 14.7005 11.2339 15.0171C11.3923 15.3255 11.2589 15.7005 10.9506 15.8588L8.61727 17.0255C7.00894 17.8338 5.80894 18.1171 4.91727 18.1171Z",fill:"currentColor"}),o.jsx("path",{d:"M9.45117 10.625H4.95117C4.60951 10.625 4.32617 10.3417 4.32617 10C4.32617 9.65833 4.60951 9.375 4.95117 9.375H9.45117C9.79284 9.375 10.0762 9.65833 10.0762 10C10.0762 10.3417 9.79284 10.625 9.45117 10.625Z",fill:"currentColor"})]})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1562_62901",children:o.jsx("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.417969)"})})})]}),p6=({size:e,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor",ref:r,...t,children:o.jsx("path",{fillRule:"evenodd",d:"M15.75 4.5a3 3 0 1 1 .825 2.066l-8.421 4.679a3.002 3.002 0 0 1 0 1.51l8.421 4.679a3 3 0 1 1-.729 1.31l-8.421-4.678a3 3 0 1 1 0-4.132l8.421-4.679a3 3 0 0 1-.096-.755Z",clipRule:"evenodd"})}),m6=P.forwardRef(p6),hh=({size:e=36,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("defs",{children:o.jsxs("filter",{id:"filter0_dd_50_34857",x:"0",y:"0",width:"36",height:"36",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[o.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),o.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o.jsx("feMorphology",{radius:"2",operator:"erode",in:"SourceAlpha",result:"effect1_dropShadow_50_34857"}),o.jsx("feOffset",{dy:"2"}),o.jsx("feGaussianBlur",{stdDeviation:"2"}),o.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.06 0"}),o.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_50_34857"}),o.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o.jsx("feMorphology",{radius:"2",operator:"erode",in:"SourceAlpha",result:"effect2_dropShadow_50_34857"}),o.jsx("feOffset",{dy:"4"}),o.jsx("feGaussianBlur",{stdDeviation:"4"}),o.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.1 0"}),o.jsx("feBlend",{mode:"normal",in2:"effect1_dropShadow_50_34857",result:"effect2_dropShadow_50_34857"}),o.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_50_34857",result:"shape"})]})}),o.jsxs("g",{filter:"url(#filter0_dd_50_34857)",children:[o.jsx("circle",{cx:"18",cy:"18",r:"12",fill:"var(--slider-thumb-bg, #FFFFFF)"}),o.jsx("circle",{cx:"18",cy:"18",r:"11.5",stroke:"var(--slider-thumb-stroke, #000000)"})]})]}),x6=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:Math.round(e*.35),viewBox:"0 0 20 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{d:"M5.7021 2.31723C7.41751 0.944899 8.27522 0.258733 9.24878 0.0725807C9.7451 -0.0223194 10.2549 -0.0223194 10.7512 0.0725807C11.7248 0.258733 12.5825 0.944898 14.2979 2.31723L20 6.87891H0L5.7021 2.31723Z",fill:"var(--slider-surface-bg, #F9F9FA)"})}),g6=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:Math.round(e*.35),viewBox:"0 0 20 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{d:"M5.7021 4.56168C7.41751 5.93401 8.27522 6.62017 9.24878 6.80633C9.7451 6.90123 10.2549 6.90123 10.7512 6.80633C11.7248 6.62017 12.5825 5.93401 14.2979 4.56168L20 0H0L5.7021 4.56168Z",fill:"var(--slider-surface-bg, #F9F9FA)"})}),To=({width:e=165,height:t=24,className:r})=>o.jsxs("svg",{width:e,height:t,viewBox:"0 0 165 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[o.jsx("path",{d:"M33.2926 22.0173C31.4874 20.7152 30.4812 18.7916 30.3333 16.2762H38.1162C38.2346 17.6079 38.8265 18.2885 39.8918 18.2885C40.2765 18.2885 40.6316 18.1998 40.898 18.0222C41.1643 17.8446 41.3123 17.5487 41.3123 17.1344C41.3123 16.5721 41.0164 16.1282 40.4245 15.8027C39.8326 15.4476 38.9152 15.0629 37.6427 14.619C36.1335 14.0863 34.9202 13.5832 33.9436 13.0801C32.967 12.5771 32.1384 11.8372 31.4282 10.8607C30.718 9.88409 30.3924 8.64118 30.3924 7.13193C30.3924 5.62269 30.7771 4.32059 31.5762 3.25524C32.3456 2.18989 33.4109 1.39088 34.7722 0.828607C36.1335 0.266338 37.6427 0 39.3295 0C42.2001 0 44.4492 0.651048 46.136 1.98274C47.8228 3.31443 48.7106 5.1492 48.7993 7.54624H40.9276C40.898 6.89519 40.75 6.4217 40.4245 6.12577C40.1286 5.82984 39.7439 5.71147 39.3 5.71147C39.004 5.71147 38.7377 5.82984 38.5305 6.03699C38.3234 6.24414 38.2346 6.54007 38.2346 6.92478C38.2346 7.45746 38.5305 7.90136 39.1224 8.22688C39.7143 8.582 40.6316 8.96671 41.9041 9.46979C43.3838 10.0321 44.5971 10.5351 45.5441 11.0382C46.4911 11.5413 47.3197 12.2515 48.0299 13.1393C48.7402 14.0271 49.0953 15.1813 49.0953 16.5425C49.0953 17.963 48.7402 19.2651 48.0299 20.3896C47.3197 21.5142 46.3135 22.402 44.9522 23.053C43.6205 23.7041 42.0225 24 40.1582 24C37.406 23.9704 35.1273 23.3194 33.2926 22.0173Z",fill:"currentColor"}),o.jsx("path",{d:"M65.7858 23.7633L58.9794 13.6424V23.7633H51.6995V0.41433H59.009V10.2392L65.697 0.41433H73.9831L65.9337 11.6005L74.5157 23.7633H65.7858Z",fill:"currentColor"}),o.jsx("path",{d:"M91.5613 20.2121H83.7783L82.6241 23.7633H74.9299L83.4823 0.41433H91.9164L100.41 23.7633H92.6858L91.5613 20.2121ZM89.7857 14.7078L87.6846 8.19731L85.5834 14.7078H89.7857Z",fill:"currentColor"}),o.jsx("path",{d:"M109.376 18.1998H116.419V23.7633H102.037V0.41433H109.347V18.1998H109.376Z",fill:"currentColor"}),o.jsx("path",{d:"M133.731 20.2121H125.948L124.794 23.7633H117.1L125.652 0.41433H134.087L142.58 23.7633H134.856L133.731 20.2121ZM131.956 14.7078L129.855 8.19731L127.754 14.7078H131.956Z",fill:"currentColor"}),o.jsx("path",{d:"M155.985 23.7633L151.605 15.3884H151.576V23.7633H144.266V0.41433H155.157C157.051 0.41433 158.649 0.739853 160.01 1.42049C161.342 2.10114 162.348 2.98893 163.028 4.14306C163.709 5.29719 164.035 6.59929 164.035 8.04935C164.035 9.61778 163.591 11.0087 162.732 12.1924C161.874 13.4057 160.602 14.2639 159.004 14.7966L164.035 23.7633H155.985ZM151.576 10.5056H154.476C155.186 10.5056 155.719 10.3576 156.044 10.0321C156.4 9.70656 156.577 9.20348 156.577 8.52284C156.577 7.90138 156.4 7.42789 156.044 7.07277C155.689 6.71766 155.157 6.5401 154.476 6.5401H151.576V10.5056Z",fill:"currentColor"}),o.jsx("path",{d:"M0.0593784 0.562271L0.0297852 9.32183L7.19131 9.35142L7.16172 16.5129L14.2345 16.5425L14.2049 23.7041L23.0828 23.7633L23.1716 0.65105L0.0593784 0.562271Z",fill:"currentColor"}),o.jsx("path",{d:"M7.13214 23.6745C3.16667 23.6745 -0.0293892 20.4488 0.00020386 16.4834L7.16173 16.513L7.13214 23.6745Z",fill:"currentColor"})]}),Eo=({width:e=26,height:t=25,className:r})=>o.jsxs("svg",{width:e,height:t,viewBox:"0 0 26 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[o.jsxs("g",{clipPath:"url(#clip0_2642_443540)",children:[o.jsx("path",{d:"M2.89524 2.84375L2.86914 10.5762L9.18445 10.6024L9.15835 16.9242L15.3954 16.9503L15.3693 23.2722L23.1982 23.3244L23.2765 2.92212L2.89524 2.84375Z",fill:"currentColor"}),o.jsx("path",{d:"M9.13314 23.2454C5.63624 23.2454 2.81783 20.398 2.84393 16.8975L9.15924 16.9236L9.13314 23.2454Z",fill:"currentColor"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_2642_443540",children:o.jsx("rect",{width:"25.7812",height:"25.0002",fill:"currentColor"})})})]}),Qp=({size:e=12,...t})=>o.jsx("svg",{width:e,height:e,fill:"none",...t,viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M4.8125 2.625L9.1875 7L4.8125 11.375",stroke:"#5A606B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),v6=({size:e=20,className:t})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,className:t,viewBox:"0 0 24 24",fill:"none",children:[o.jsx("path",{d:"M6.29844 14.3999C6.29844 13.9028 6.70138 13.4999 7.19844 13.4999H7.21044C7.70749 13.4999 8.11044 13.9028 8.11044 14.3999V14.4119C8.11044 14.909 7.70749 15.3119 7.21044 15.3119H7.19844C6.70138 15.3119 6.29844 14.909 6.29844 14.4119V14.3999Z",fill:"#22262E"}),o.jsx("path",{d:"M7.19844 15.8999C6.70138 15.8999 6.29844 16.3028 6.29844 16.7999V16.8119C6.29844 17.309 6.70138 17.7119 7.19844 17.7119H7.21044C7.70749 17.7119 8.11044 17.309 8.11044 16.8119V16.7999C8.11044 16.3028 7.70749 15.8999 7.21044 15.8999H7.19844Z",fill:"#22262E"}),o.jsx("path",{d:"M8.69844 14.3999C8.69844 13.9028 9.10138 13.4999 9.59844 13.4999H9.61044C10.1075 13.4999 10.5104 13.9028 10.5104 14.3999V14.4119C10.5104 14.909 10.1075 15.3119 9.61044 15.3119H9.59844C9.10138 15.3119 8.69844 14.909 8.69844 14.4119V14.3999Z",fill:"#22262E"}),o.jsx("path",{d:"M9.59844 15.8999C9.10138 15.8999 8.69844 16.3028 8.69844 16.7999V16.8119C8.69844 17.309 9.10138 17.7119 9.59844 17.7119H9.61044C10.1075 17.7119 10.5104 17.309 10.5104 16.8119V16.7999C10.5104 16.3028 10.1075 15.8999 9.61044 15.8999H9.59844Z",fill:"#22262E"}),o.jsx("path",{d:"M11.0984 11.9999C11.0984 11.5028 11.5014 11.0999 11.9984 11.0999H12.0104C12.5075 11.0999 12.9104 11.5028 12.9104 11.9999V12.0119C12.9104 12.509 12.5075 12.9119 12.0104 12.9119H11.9984C11.5014 12.9119 11.0984 12.509 11.0984 12.0119V11.9999Z",fill:"#22262E"}),o.jsx("path",{d:"M11.9984 13.4999C11.5014 13.4999 11.0984 13.9028 11.0984 14.3999V14.4119C11.0984 14.909 11.5014 15.3119 11.9984 15.3119H12.0104C12.5075 15.3119 12.9104 14.909 12.9104 14.4119V14.3999C12.9104 13.9028 12.5075 13.4999 12.0104 13.4999H11.9984Z",fill:"#22262E"}),o.jsx("path",{d:"M11.0984 16.7999C11.0984 16.3028 11.5014 15.8999 11.9984 15.8999H12.0104C12.5075 15.8999 12.9104 16.3028 12.9104 16.7999V16.8119C12.9104 17.309 12.5075 17.7119 12.0104 17.7119H11.9984C11.5014 17.7119 11.0984 17.309 11.0984 16.8119V16.7999Z",fill:"#22262E"}),o.jsx("path",{d:"M14.3984 11.0999C13.9014 11.0999 13.4984 11.5028 13.4984 11.9999V12.0119C13.4984 12.509 13.9014 12.9119 14.3984 12.9119H14.4104C14.9075 12.9119 15.3104 12.509 15.3104 12.0119V11.9999C15.3104 11.5028 14.9075 11.0999 14.4104 11.0999H14.3984Z",fill:"#22262E"}),o.jsx("path",{d:"M13.4984 14.3999C13.4984 13.9028 13.9014 13.4999 14.3984 13.4999H14.4104C14.9075 13.4999 15.3104 13.9028 15.3104 14.3999V14.4119C15.3104 14.909 14.9075 15.3119 14.4104 15.3119H14.3984C13.9014 15.3119 13.4984 14.909 13.4984 14.4119V14.3999Z",fill:"#22262E"}),o.jsx("path",{d:"M14.3984 15.8999C13.9014 15.8999 13.4984 16.3028 13.4984 16.7999V16.8119C13.4984 17.309 13.9014 17.7119 14.3984 17.7119H14.4104C14.9075 17.7119 15.3104 17.309 15.3104 16.8119V16.7999C15.3104 16.3028 14.9075 15.8999 14.4104 15.8999H14.3984Z",fill:"#22262E"}),o.jsx("path",{d:"M15.8984 11.9999C15.8984 11.5028 16.3014 11.0999 16.7984 11.0999H16.8104C17.3075 11.0999 17.7104 11.5028 17.7104 11.9999V12.0119C17.7104 12.509 17.3075 12.9119 16.8104 12.9119H16.7984C16.3014 12.9119 15.8984 12.509 15.8984 12.0119V11.9999Z",fill:"#22262E"}),o.jsx("path",{d:"M16.7984 13.4999C16.3014 13.4999 15.8984 13.9028 15.8984 14.3999V14.4119C15.8984 14.909 16.3014 15.3119 16.7984 15.3119H16.8104C17.3075 15.3119 17.7104 14.909 17.7104 14.4119V14.3999C17.7104 13.9028 17.3075 13.4999 16.8104 13.4999H16.7984Z",fill:"#22262E"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.89844 2.3999C7.39549 2.3999 7.79844 2.80285 7.79844 3.2999V4.7999H16.1984V3.2999C16.1984 2.80285 16.6014 2.3999 17.0984 2.3999C17.5955 2.3999 17.9984 2.80285 17.9984 3.2999V4.7999H18.2984C20.121 4.7999 21.5984 6.27736 21.5984 8.0999V18.2999C21.5984 20.1224 20.121 21.5999 18.2984 21.5999H5.69844C3.8759 21.5999 2.39844 20.1224 2.39844 18.2999V8.0999C2.39844 6.27736 3.8759 4.7999 5.69844 4.7999H5.99844V3.2999C5.99844 2.80285 6.40138 2.3999 6.89844 2.3999ZM5.69844 8.9999C4.87001 8.9999 4.19844 9.67148 4.19844 10.4999V18.2999C4.19844 19.1283 4.87001 19.7999 5.69844 19.7999H18.2984C19.1269 19.7999 19.7984 19.1283 19.7984 18.2999V10.4999C19.7984 9.67148 19.1269 8.9999 18.2984 8.9999H5.69844Z",fill:"#22262E"})]}),n2=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),o.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),a2=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),o.jsx("path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}),o.jsx("path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}),o.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]}),y6=({size:e=13,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.4 12.8C9.93462 12.8 12.8 9.93462 12.8 6.4C12.8 2.86538 9.93462 0 6.4 0C2.86538 0 0 2.86538 0 6.4C0 9.93462 2.86538 12.8 6.4 12.8ZM7 3.8C7 3.46863 6.73137 3.2 6.4 3.2C6.06863 3.2 5.8 3.46863 5.8 3.8V5.8H3.8C3.46863 5.8 3.2 6.06863 3.2 6.4C3.2 6.73137 3.46863 7 3.8 7H5.8V9C5.8 9.33137 6.06863 9.6 6.4 9.6C6.73137 9.6 7 9.33137 7 9V7H9C9.33137 7 9.6 6.73137 9.6 6.4C9.6 6.06863 9.33137 5.8 9 5.8H7V3.8Z",fill:"currentColor"})}),b6=P.forwardRef(y6),w6=({size:e=20,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{d:"M16.6004 7.4585L11.1671 12.8918C10.5254 13.5335 9.47539 13.5335 8.83372 12.8918L3.40039 7.4585",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})}),Jp=P.forwardRef(w6),j6=({size:e=20,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",ref:r,fill:"none",...t,children:o.jsx("path",{d:"M19.9201 15.0496L13.4001 8.52965C12.6301 7.75965 11.3701 7.75965 10.6001 8.52965L4.08008 15.0496",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})}),em=P.forwardRef(j6),i2=({size:e=20,className:t,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 11 11",fill:"currentColor",width:e,height:e,className:t,...r,children:o.jsx("path",{d:"M7.39952 1.875L0 9.27452L1.32583 10.6003L8.72543 3.20073V9.1875H10.6004V0H1.41293V1.875H7.39952Z",fill:"currentColor"})}),o2=({size:e=16,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[o.jsx("path",{d:"M3.33333 6.6665C2.6 6.6665 2 7.2665 2 7.99984C2 8.73317 2.6 9.33317 3.33333 9.33317C4.06667 9.33317 4.66667 8.73317 4.66667 7.99984C4.66667 7.2665 4.06667 6.6665 3.33333 6.6665Z",stroke:"currentColor",strokeWidth:"1.2"}),o.jsx("path",{d:"M12.6668 6.6665C11.9335 6.6665 11.3335 7.2665 11.3335 7.99984C11.3335 8.73317 11.9335 9.33317 12.6668 9.33317C13.4002 9.33317 14.0002 8.73317 14.0002 7.99984C14.0002 7.2665 13.4002 6.6665 12.6668 6.6665Z",stroke:"currentColor",strokeWidth:"1.2"}),o.jsx("path",{d:"M7.99984 6.6665C7.2665 6.6665 6.6665 7.2665 6.6665 7.99984C6.6665 8.73317 7.2665 9.33317 7.99984 9.33317C8.73317 9.33317 9.33317 8.73317 9.33317 7.99984C9.33317 7.2665 8.73317 6.6665 7.99984 6.6665Z",stroke:"currentColor",strokeWidth:"1.2"})]}),s2=({size:e=16,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[o.jsx("path",{d:"M8.67318 1.94687L12.6065 3.69354C13.7399 4.19354 13.7399 5.02021 12.6065 5.52021L8.67318 7.26687C8.22652 7.46687 7.49318 7.46687 7.04652 7.26687L3.11318 5.52021C1.97985 5.02021 1.97985 4.19354 3.11318 3.69354L7.04652 1.94687C7.49318 1.74688 8.22652 1.74688 8.67318 1.94687Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2 7.3335C2 7.8935 2.42 8.54016 2.93333 8.76683L7.46 10.7802C7.80667 10.9335 8.2 10.9335 8.54 10.7802L13.0667 8.76683C13.58 8.54016 14 7.8935 14 7.3335",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2 10.6665C2 11.2865 2.36667 11.8465 2.93333 12.0998L7.46 14.1132C7.80667 14.2665 8.2 14.2665 8.54 14.1132L13.0667 12.0998C13.6333 11.8465 14 11.2865 14 10.6665",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),l2=({size:e=16,className:t,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:o.jsx("path",{d:"M8.66667 1.3335L3.33333 9.3335H8L7.33333 14.6668L12.6667 6.66683H8L8.66667 1.3335Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),c2=({size:e=16,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[o.jsx("path",{d:"M5.3335 1.3335V3.3335",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M10.6665 1.3335V3.3335",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2.3335 6.06006H13.6668",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M14 5.66683V11.3335C14 13.3335 13 14.6668 10.6667 14.6668H5.33333C3 14.6668 2 13.3335 2 11.3335V5.66683C2 3.66683 3 2.3335 5.33333 2.3335H10.6667C13 2.3335 14 3.66683 14 5.66683Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M7.99715 9.13314H8.00314",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5.52938 9.13314H5.53537",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5.52938 11.1331H5.53537",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Gs=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M1 4.5V3.25C1 2.005 2.005 1 3.25 1H4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M7.5 1H8.75C9.995 1 11 2.005 11 3.25V4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M11 8V8.75C11 9.995 9.995 11 8.75 11H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.5 11H3.25C2.005 11 1 9.995 1 8.75V7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M9 6V5M3 6H6H9H3ZM3 6V5V6ZM3 6V7V6ZM9 6V7V6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M6 3H7M6 9V3V9ZM6 9H7H6ZM6 9H5H6ZM6 3H5H6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),u2=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M6.62968 1.80011L2.52468 6.14511C2.36968 6.31011 2.21968 6.63511 2.18968 6.86011L2.00468 8.48011C1.93968 9.06511 2.35968 9.46511 2.93968 9.36511L4.54968 9.09011C4.77468 9.05011 5.08968 8.88511 5.24468 8.71511L9.34968 4.37011C10.0597 3.62011 10.3797 2.76511 9.27468 1.72011C8.17468 0.685108 7.33968 1.05011 6.62968 1.80011Z",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5.94531 2.5249C6.16031 3.9049 7.28031 4.9599 8.67031 5.0999",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M1.5 11H10.5",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),Zs=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M8 6.45V8.55C8 10.3 7.3 11 5.55 11H3.45C1.7 11 1 10.3 1 8.55V6.45C1 4.7 1.7 4 3.45 4H5.55C7.3 4 8 4.7 8 6.45Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M11 3.45V5.55C11 7.3 10.3 8 8.55 8H8V6.45C8 4.7 7.3 4 5.55 4H4V3.45C4 1.7 4.7 1 6.45 1H8.55C10.3 1 11 1.7 11 3.45Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ys=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M10.5 2.99023C8.835 2.82523 7.16 2.74023 5.49 2.74023C4.5 2.74023 3.51 2.79023 2.52 2.89023L1.5 2.99023",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.25 2.485L4.36 1.83C4.44 1.355 4.5 1 5.345 1H6.655C7.5 1 7.565 1.375 7.64 1.835L7.75 2.485",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M9.42422 4.56982L9.09922 9.60482C9.04422 10.3898 8.99922 10.9998 7.60422 10.9998H4.39422C2.99922 10.9998 2.95422 10.3898 2.89922 9.60482L2.57422 4.56982",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5.16406 8.25H6.82906",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.75 6.25H7.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),C6=({size:e=19,...t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 10 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.53953 0.0881595C9.95118 0.293984 10.118 0.794545 9.91221 1.20619L1.57887 17.8729C1.37305 18.2845 0.872487 18.4514 0.460839 18.2455C0.0491898 18.0397 -0.117664 17.5392 0.0881606 17.1275L8.42149 0.460838C8.62732 0.0491888 9.12788 -0.117665 9.53953 0.0881595Z",fill:"currentColor"})}),K=O.default.forwardRef(({variant:e="brand",hierarchy:t="primary",size:r="xs",icons:n="none",leadingIcon:a,trailingIcon:i,children:s,disabled:l=!1,className:c,isToggled:u=!1,toggledLeadingIcon:d,toggledTrailingIcon:f,borderRadius:h,color:p,loading:g=!1,...x},m)=>{const v="group inline-flex items-center justify-center font-semibold rounded-6 transition-all duration-200 focus:outline-none disabled:cursor-not-allowed",b="disabled:bg-surface-3 disabled:!text-disabled",w={brand:{primary:"bg-brand-primary-main text-white-uniform hover:bg-brand-primary-accent-3 active:bg-brand-primary-accent-3 focus:ring focus:ring-low-em",secondary:"bg-brand-primary-main-special text-white-uniform hover:bg-brand-primary-accent-special active:bg-brand-primary-accent-special focus:ring focus:ring-low-em"},neutral:{primary:"bg-surface-2 text-high-em hover:bg-surface-3 active:bg-surface-3 focus:ring focus:ring-surface-4",secondary:"text-high-em bg-transparent hover:bg-surface-2 active:bg-surface-2 focus:ring focus:ring-surface-4",tertiary:"text-high-em bg-white border border-surface-3 hover:bg-surface-2 hover:border-surface-4 active:bg-surface-2 active:border-low-em ",quaternary:"text-high-em bg-transparent border border-disabled hover:border-low-em"},danger:{primary:"bg-danger-main text-white-uniform hover:bg-danger-accent-3 active:bg-danger-accent-3 focus:ring-2 focus:ring-danger-accent-2",secondary:"text-danger-main bg-danger-accent-1 hover:bg-danger-accent-2 active:bg-danger-accent-2 focus:ring focus:ring-danger-accent-3",tertiary:"bg-transparent text-danger-main border-1 border-danger-accent-2 hover:bg-danger-accent-1 active:bg-danger-accent-1 focus:border-danger-accent-3 disabled:border-none",quaternary:"text-danger-main hover:bg-danger-accent-1 active:bg-danger-accent-2 focus:ring focus:ring-danger-accent-2 disabled:bg-surface-bg"},success:{primary:"bg-success-main text-white-uniform hover:bg-success-accent-3 focus:ring focus:ring-success-accent-2",secondary:"text-success-em bg-success-accent-1 hover:bg-success-accent-2 focus:ring focus:ring-success-accent-3",tertiary:"bg-transparent text-success-em border-1 border-success-accent-2 hover:bg-success-accent-1 focus:border-success-accent-3",quaternary:"text-success-em hover:bg-success-accent-1 focus:ring focus:ring-success-accent-2"},secondary:{primary:"bg-brand-secondary-main text-white-uniform hover:bg-brand-secondary-accent-3 active:bg-brand-secondary-accent-3 focus:ring focus:ring-surface-4"}},C=s!=null,y={xs:`text-[10px] h-11 ${C&&n!=="only"?"px-6 py-3":"aspect-square"}`,sm:`text-xs h-[34px] ${C&&n!=="only"?"px-6 py-4":"aspect-square"}`,md:`text-sm h-[42px] ${C&&n!=="only"?"px-8 py-5":"aspect-square"}`,lg:`text-base h-14 ${C&&n!=="only"?"px-9 py-6":"aspect-square"}`},j={xs:12,sm:16,md:20,lg:24},S=j[r],A={xs:{leading:"mr-2",trailing:"ml-2"},sm:{leading:"mr-3",trailing:"ml-3"},md:{leading:"mr-4",trailing:"ml-4"},lg:{leading:"mr-5",trailing:"ml-5"}},_=u&&d?d:a,I=u&&f?f:i,k=_&&O.default.isValidElement(_)?O.default.cloneElement(_,{size:S,color:"currentColor"}):null,E=I&&O.default.isValidElement(I)?O.default.cloneElement(I,{size:S,color:"currentColor"}):null,T=w[e]?.[t]??w[e]?.primary??"",M=te.twMerge(N.clsx(v,g&&"relative",T,y[r],h&&`rounded-[${h}]`,p,b,c)),R=o.jsxs(o.Fragment,{children:[(n==="leading"||n==="both")&&k&&o.jsx("span",{className:`group-disabled:!text-disabled ${A[r].leading}`,children:k}),n!=="only"&&s,n==="only"&&k&&o.jsx("span",{className:"group-disabled:!text-disabled",children:k}),(n==="trailing"||n==="both")&&E&&o.jsx("span",{className:`group-disabled:!text-disabled ${A[r].trailing}`,children:E})]});return o.jsx("button",{ref:m,className:M,disabled:l||g,...x,children:g?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:o.jsx("span",{className:"animate-spin rounded-full border-2 border-current border-t-transparent",style:{width:j[r],height:j[r]}})}),o.jsx("span",{className:"invisible inline-flex items-center",children:R})]}):R})});K.displayName="Button";const d2=P.createContext(void 0),Xs=()=>{const e=P.useContext(d2);if(!e)throw new Error("useAlertContext must be used within an Alert provider");return e},S6={success:{icon:Qr,iconColor:"text-success-main",borderClass:"border border-success-accent-3"},warning:{icon:Qr,iconColor:"text-warning-main",borderClass:"border border-warning-accent-3"},error:{icon:Qr,iconColor:"text-danger-main",borderClass:"border border-danger-accent-3"},info:{icon:Qr,iconColor:"text-info-main",borderClass:"border border-info-accent-3"},default:{icon:Qr,iconColor:"text-high-em",borderClass:"border border-surface-3"}},Kx={success:"neutral",warning:"neutral",error:"danger",info:"neutral",default:"neutral"},f2=({children:e,type:t="default"})=>{const[r,n]=P.useState(!1);return o.jsx(d2.Provider,{value:{open:r,setOpen:n,type:t},children:e})};f2.displayName="AlertDialog";const h2=({children:e})=>{const{setOpen:t}=Xs();return O.default.cloneElement(e,{onClick:r=>{e.props.onClick?.(r),t(!0)}})};h2.displayName="AlertDialogTrigger";const p2=P.forwardRef(({className:e,children:t,...r},n)=>{const{open:a,setOpen:i,type:s}=Xs(),l=S6[s];return o.jsx(xe.Transition,{appear:!0,show:a,as:P.Fragment,children:o.jsxs(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>i(!1),children:[o.jsx(xe.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:o.jsx("div",{className:"fixed inset-0 bg-black-uniform/20","aria-hidden":"true"})}),o.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:o.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:o.jsx(xe.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95 translate-y-4",enterTo:"opacity-100 scale-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100 translate-y-0",leaveTo:"opacity-0 scale-95 translate-y-4",children:o.jsx(xe.Dialog.Panel,{ref:n,className:N.clsx("relative bg-surface-bg rounded-[20px] max-w-[460px] w-full",l.borderClass,"shadow-xl",e),...r,children:o.jsx(pt.motion.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10,transition:{duration:.2,ease:"easeIn"}},transition:{duration:.3,ease:"easeOut"},className:"w-full px-10 pt-10 pb-11 gap-8",children:o.jsxs("div",{className:"flex items-start gap-6",children:[o.jsx("div",{className:"p-2",children:o.jsx(Qr,{size:24,className:N.clsx(l.iconColor),"aria-hidden":"true"})}),o.jsx("div",{className:"flex-1 min-w-0",children:t}),o.jsx("div",{className:"shrink-0",children:o.jsx(pt.motion.button,{type:"button","aria-label":"Close",onClick:()=>i(!1),className:"p-1 rounded hover:bg-surface-1 transition",whileHover:{scale:1.1},whileTap:{scale:.9},children:o.jsx(t2,{size:20})})})]})})})})})})]})})});p2.displayName="AlertDialogContent";const m2=({children:e,className:t})=>o.jsx("div",{className:N.clsx("flex items-start",t),children:e});m2.displayName="AlertDialogHeader";const x2=P.forwardRef(({className:e,...t},r)=>o.jsx(xe.Dialog.Title,{ref:r,as:"h3",className:N.clsx("font-bold text-base text-high-em",e),...t}));x2.displayName="AlertDialogTitle";const g2=P.forwardRef(({className:e,...t},r)=>o.jsx(xe.Dialog.Description,{ref:r,className:N.clsx("text-sm font-semibold leading-[22px] tracking-normal whitespace-pre-line text-med-em mt-2 mb-8",e),...t}));g2.displayName="AlertDialogDescription";const v2=({children:e,className:t})=>o.jsx("div",{className:N.clsx("mt-4 flex gap-4 mb-4",t),children:e});v2.displayName="AlertDialogFooter";const y2=({className:e,actionVariant:t,onClick:r,...n})=>{const{type:a,setOpen:i}=Xs(),s=t==="secondary",l=s?"neutral":Kx[a],c=Kx[a]==="danger"?"secondary":"tertiary";return o.jsx(K,{variant:l,hierarchy:c,size:"md",icons:s?void 0:"trailing",trailingIcon:o.jsx(B.ArrowRight,{}),onClick:u=>{r?.(u),i(!1)},className:N.clsx(e),...n})};y2.displayName="AlertDialogAction";const b2=P.forwardRef(({className:e,onClick:t,...r},n)=>{const{setOpen:a}=Xs();return o.jsx(K,{ref:n,variant:"neutral",hierarchy:"secondary",size:"md",className:N.clsx(e),onClick:i=>{t?.(i),a(!1)},...r})});b2.displayName="AlertDialogCancel";const Ge=({theme:e="surface",size:t="sm",variant:r="simple",children:n,className:a,statusState:i="success"})=>{const s="inline-flex items-center justify-center font-medium rounded-full font-medium font-family-inter",l={surface:{simple:"bg-surface-2 text-med-em",outlined:"bg-surface-2 text-med-em border border-surface-4",status:""},warning:{simple:"bg-warning-accent-0 text-warning-em",outlined:"bg-warning-accent-0 text-warning-em border border-warning-accent-1",status:""},info:{simple:"bg-info-accent-1 text-info-em",outlined:"bg-info-accent-1 text-info-em border border-info-accent-2",status:""},success:{simple:"bg-success-accent-1 text-success-em",outlined:"bg-success-accent-1 text-success-em border border-success-accent-2",status:""},danger:{simple:"bg-danger-accent-1 text-danger-em",outlined:"bg-danger-accent-1 text-danger-em border border-danger-accent-2",status:""},disabled:{simple:"bg-surface-3 text-disabled",outlined:"bg-surface-3 text-disabled border border-text-disabled",status:""}},c={xs:"px-2 py-1 text-[10px] leading-[14px] gap-1.5 h-[22px]",sm:"px-4 py-2 text-[10px] leading-[16px] gap-1.5 h-[24px]",md:"px-5 py-2.5 text-[12px] leading-[18px] gap-2 h-[28px]",lg:"px-6 py-3 text-[12px] leading-[18px] gap-2 h-[30px]",xl:"px-7 py-3 text-[14px] leading-[20px] gap-2 h-[34px]"},u={success:{bg:"bg-success-main",text:"text-white",border:"border-success-main"},disabled:{bg:"bg-surface-3",text:"text-disabled",border:"border-surface-3"},danger:{bg:"bg-danger-main",text:"text-white",border:"border-danger-main"},warning:{bg:"bg-warning-main",text:"text-white",border:"border-warning-main"}},d={xs:"size-3",sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7"};if(r==="status"){const h=te.twMerge(N.clsx("rounded-full flex-shrink-0",d[t],u[i].bg,u[i].border&&`border ${u[i].border}`,a));return o.jsx("div",{className:h})}const f=te.twMerge(N.clsx(s,l[e][r],c[t],a));return o.jsx("div",{className:f,children:n&&o.jsx("span",{children:n})})},Bt=({size:e="md",imageUrl:t,initials:r,className:n,statusBadge:a,onClick:i})=>{const s={xs:"xs",sm:"xs",md:"sm",lg:"sm",xl:"md"},l={xs:"size-10 text-[10px]",sm:"size-12 text-xs",md:"size-13 text-sm",lg:"size-14 text-base",xl:"size-15 text-lg"},c=N.clsx("relative",n),u=N.clsx("rounded-full flex items-center justify-center font-bold overflow-hidden",l[e],!t&&"bg-brand-primary-main text-white-uniform",i&&"border-0 p-0 m-0 appearance-none cursor-pointer"),d={xs:"bottom-0.5 right-0.5",sm:"bottom-0.5 right-0.5",md:"bottom-1 right-1",lg:"bottom-1 right-1",xl:"bottom-2 right-2"},f=o.jsx(o.Fragment,{children:t?o.jsx("img",{src:t,alt:r||"Avatar",className:"w-full h-full object-cover"}):o.jsx("span",{children:r})});return o.jsxs("div",{className:c,children:[i?o.jsx("button",{onClick:i,type:"button",className:u,children:f}):o.jsx("div",{className:u,children:f}),a&&o.jsx("div",{className:N.clsx("absolute",d[e]),children:o.jsx(Ge,{variant:"status",statusState:a.state||"success",statusSize:a.size||s[e]})})]})},tm=({avatars:e,size:t="md",max:r=4,className:n,counterClassName:a,...i})=>{const s=e.slice(0,r),l=e.length-r,c=l>0,u={xs:"-space-x-2",sm:"-space-x-3",md:"-space-x-4",lg:"-space-x-5",xl:"-space-x-6"},d={xs:"size-10 text-[10px] p-6",sm:"size-12 text-xs p-8",md:"size-13 text-sm p-9",lg:"size-14 text-base p-10",xl:"size-15 text-lg p-12"},f=N.clsx("flex items-center",u[t],n),h=N.clsx("relative rounded-full flex items-center justify-center font-bold border-2 border-white bg-brand-primary-main text-white-uniform hover:z-10 transition-colors",d[t],a);return o.jsxs("div",{className:f,...i,children:[s.map((p,g)=>o.jsx("div",{className:"relative rounded-full border-2 border-white",children:o.jsx(Bt,{...p,size:t,className:"border-0"})},g)),c&&o.jsxs("div",{className:h,children:["+",l]})]})};tm.displayName="AvatarGroup";function O6({...e}){return o.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function N6({className:e,...t}){return o.jsx("ol",{"data-slot":"breadcrumb-list",className:ae.default(" flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function P6({className:e,...t}){return o.jsx("li",{"data-slot":"breadcrumb-item",className:ae.default("inline-flex items-center gap-1.5",e),...t})}function A6({asChild:e,className:t,...r}){if(e){const{children:n,...a}=r;if(!O.isValidElement(n))return null;const i=n,s={className:ae.default("transition-colors text-low-em font-semibold",t,i.props.className),...a};return O.cloneElement(i,s)}return o.jsx("a",{"data-slot":"breadcrumb-link",className:ae.default("transition-colors text-low-em font-semibold",t),...r})}function _6({className:e,...t}){return o.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:ae.default("text-med-em font-semibold",e),...t})}function k6({children:e,className:t,...r}){return o.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:ae.default("[&>svg]:size-2.5 text-low-em",t),...r,children:e??o.jsx(Qp,{color:"currentColor",size:12})})}function T6({className:e,...t}){return o.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:ae.default("flex size-9 items-center justify-center text-low-em",e),...t,children:["...",o.jsx("span",{className:"sr-only",children:"More"})]})}const E6=({label:e,leadingIcon:t,trailingIcon:r,items:n,isActive:a=!1,className:i,dropdownClassName:s,placement:l="bottom-left",showBackdrop:c=!0})=>{const[u,d]=P.useState(!1),f=P.useRef(null),h=o.jsx("svg",{className:N.clsx("w-4 h-4 transition-transform duration-200",u&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),p=()=>{d(v=>!v)},g=v=>{v.disabled||(v.onClick(),d(!1))},x=()=>{d(!1)};P.useEffect(()=>{const v=b=>{f.current&&!f.current.contains(b.target)&&d(!1)};if(u)return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]);const m=()=>{switch(l){case"bottom-right":return"top-full right-0 mt-[6px]";case"top-left":return"bottom-full left-0 mb-[6px]";case"top-right":return"bottom-full right-0 mb-[6px]";case"bottom-left":default:return"top-full left-0 mt-[6px]"}};return o.jsxs("div",{ref:f,className:"relative",children:[o.jsx(K,{variant:"brand",hierarchy:"primary",size:"sm",icons:r||t?"both":"trailing",leadingIcon:t,trailingIcon:r||h,onClick:p,style:{outline:"none",boxShadow:"none"},className:N.clsx("transition-all duration-200","[&:focus]:outline-none [&:focus]:ring-0 [&:focus]:shadow-none","hover:text-gray-200",(a||u)&&["!bg-secondary-600","!text-white","hover:!bg-secondary-700","hover:!text-gray-100","active:!bg-secondary-600"],i),children:e}),u&&c&&o.jsx("div",{className:"fixed inset-0 z-10",onClick:x}),u&&o.jsx("div",{className:N.clsx("absolute z-20 w-[150px] bg-white border border-gray-100 rounded-[16px] shadow-lg overflow-hidden",m(),s),children:o.jsx("div",{children:n.map((v,b)=>o.jsxs(O.default.Fragment,{children:[b>0&&o.jsx("div",{className:"border-t border-gray-100"}),o.jsx("button",{onClick:()=>g(v),disabled:v.disabled,className:N.clsx("w-full text-left pl-5 py-3 transition-colors duration-150 group",v.disabled?"opacity-50 cursor-not-allowed":"hover:bg-gray-50 cursor-pointer"),children:o.jsxs("div",{className:"flex items-center gap-3",children:[v.icon&&o.jsx("div",{className:"flex-shrink-0 text-primary-900",children:v.icon}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx("div",{className:"font-medium text-primary-900",style:{fontSize:"14px"},children:v.label})})]})})]},v.id))})})]})},mr=({options:e,value:t,onChange:r,size:n="md",variant:a="neutral",disabled:i=!1,className:s,buttonClassName:l})=>{const c={xs:"h-[28px] px-[9.2px] text-[10px]",sm:"h-[34px] px-[10.6px] text-[12px]",md:"h-[42px] px-[13px] text-[14px]",lg:"h-[48px] px-[14.4px] text-[16px]"},u={xs:12,sm:16,md:20,lg:24},d={xs:{left:"rounded-l-[6px]",right:"rounded-r-[6px]"},sm:{left:"rounded-l-[8px]",right:"rounded-r-[8px]"},md:{left:"rounded-l-[10px]",right:"rounded-r-[10px]"},lg:{left:"rounded-l-[12px]",right:"rounded-r-[12px]"}},f={neutral:{base:"border border-surface-3 text-high-em bg-transparent",hover:"hover:bg-surface-2",active:"bg-surface-2 border-surface-4 z-10",disabled:"opacity-50 cursor-not-allowed"},brand:{base:"bg-brand-primary-main-special border-0 text-white-uniform",hover:"hover:bg-brand-primary-accent-special",active:"bg-brand-primary-accent-special",disabled:"bg-surface-3 text-disabled"},secondary:{base:"border-none rounded-none text-high-em bg-transparent",hover:"hover:bg-surface-2",active:"bg-surface-2",disabled:"opacity-50 cursor-not-allowed"}};return o.jsx("div",{className:N.clsx("inline-flex items-center",s),children:e.map((h,p)=>{const g=h.value===t,x=h.icon&&O.default.isValidElement(h.icon)?O.default.cloneElement(h.icon,{size:u[n],color:"currentColor"}):null;return o.jsxs("button",{type:"button",disabled:i,onClick:()=>r(h.value),className:N.clsx("inline-flex items-center justify-center font-semibold whitespace-nowrap transition-colors duration-200",a==="neutral"&&p>0&&"-ml-px",c[n],!l&&p===0&&d[n].left,!l&&p===e.length-1&&d[n].right,l,f[a].base,!g&&!i&&f[a].hover,g&&!i&&f[a].active,i&&"pointer-events-none","disabled:text-disabled"),children:[x&&o.jsx("span",{className:h.label?"mr-2":"",children:x}),h.label]},h.value)})})},I6={small:{wrapper:"w-[16px] h-[16px] rounded-[4px]",icon:"w-[16px] h-[16px]"},medium:{wrapper:"w-[20px] h-[20px] rounded-[6px]",icon:"w-[20px] h-[20px]"},large:{wrapper:"w-[24px] h-[24px] rounded-[8px]",icon:"w-[24px] h-[24px]"}},za={unchecked:"bg-transparent border-low-em hover:bg-surface-1",checked:"bg-black border-low-em text-white",indeterminate:"bg-transparent border-low-em text-low-em",disabled:{unchecked:"bg-surface-3 border-surface-4",checked:"bg-surface-3 border-surface-4 text-surface-4"}},M6=e=>o.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),$6=e=>o.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})}),Dr=({size:e="medium",checked:t=!1,indeterminate:r=!1,disabled:n=!1,className:a,...i})=>{const s=I6[e],l=P.useRef(null);return P.useEffect(()=>{l.current&&(l.current.indeterminate=r)},[r]),o.jsxs("label",{className:N.clsx("inline-flex items-center",n?"cursor-not-allowed":"cursor-pointer",a),children:[o.jsx("input",{ref:l,type:"checkbox",checked:t,disabled:n,className:"sr-only peer",...i}),o.jsxs("div",{className:N.clsx(s.wrapper,"inline-flex shrink-0 items-center justify-center border transition-colors duration-200",n?t||r?za.disabled.checked:za.disabled.unchecked:r?za.indeterminate:t?za.checked:za.unchecked,!n&&"peer-hover:border-low-em",!n&&"peer-focus-visible:ring-1 peer-focus-visible:ring-low-em peer-focus-visible:ring-offset-0"),children:[t&&!r&&o.jsx(M6,{className:s.icon}),r&&o.jsx($6,{className:s.icon})]})]})},$r=({variant:e="neutral",size:t="md",disabled:r=!1,leadingIcon:n,trailingIcon:a,showLeadingIcon:i=!0,showTrailingIcon:s=!0,trailingIconPosition:l="inline",disableUnderline:c=!1,children:u,className:d,...f})=>{const h={neutral:"text-med-wm hover:text-high-em hover:border-low-em",info:"text-info-main hover:text-info-wm hover:border-info-accent-3"},p="text-disabled pointer-events-none",g={xs:{text:"text-[10px]",leadingGap:"mr-[2px]",trailingGap:"ml-[2px]"},sm:{text:"text-[12px]",leadingGap:"mr-[2px]",trailingGap:"ml-[2px]"},md:{text:"text-[14px]",leadingGap:"mr-[4px]",trailingGap:"ml-[4px]"},lg:{text:"text-[16px]",leadingGap:"mr-[4px]",trailingGap:"ml-[4px]"}},x={xs:12,sm:12,md:16,lg:20},m=i&&n&&O.default.isValidElement(n)?O.default.cloneElement(n,{size:x[t],color:"currentColor"}):null,v=s&&a&&O.default.isValidElement(a)?O.default.cloneElement(a,{size:x[t],color:"currentColor"}):null;return o.jsxs("a",{className:N.clsx("inline-flex items-center font-semibold transition-colors duration-200",!c&&"border-b-2 border-transparent",!r&&!c&&h[e],!r&&c&&(e==="neutral"?"text-high-em":"text-info-accent-1"),g[t].text,{"w-full justify-between":l==="end"},r&&p,d),"aria-disabled":r,tabIndex:r?-1:void 0,...r&&{href:void 0},...f,children:[o.jsxs("span",{className:"inline-flex items-center",children:[m&&o.jsx("span",{className:g[t].leadingGap,children:m}),o.jsx("span",{children:u}),l==="inline"&&o.jsx("span",{className:g[t].trailingGap,children:v})]}),l==="end"&&o.jsx("span",{className:"shrink-0",children:v})]})},R6=({icon:e,title:t,description:r,linkText:n="Link",linkHref:a="#",checked:i=!1,onCheckboxChange:s,onLinkClick:l,className:c,disabled:u=!1})=>{const d=h=>{s&&s(h.target.checked)},f=e?O.default.cloneElement(e,{size:32,color:"var(--dark-100)"}):null;return o.jsxs("div",{className:N.clsx("w-full min-h-40 bg-white border border-gray-400 rounded-xl py-8 flex flex-col",u&&"opacity-60 pointer-events-none",c),children:[o.jsxs("div",{className:"flex items-center justify-between mx-8 mb-3 shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[f&&o.jsx("div",{className:"shrink-0",children:f}),o.jsx("h3",{className:"font-space-grotesk font-medium text-[20px] leading-tight text-[var(--dark-100)] truncate ml-2",style:{fontFamily:"var(--font-space-grotesk)"},children:t})]}),o.jsx("div",{className:"flex-shrink-0 mt-2",children:o.jsx(Dr,{size:"large",checked:i,onChange:d,disabled:u})})]}),o.jsx("div",{className:"mx-8 mt-4 mb-3 flex-shrink-0",style:{minHeight:"50px"},children:o.jsx("p",{className:"font-inter text-[12px] leading-[1.4] text-[var(--dark-700)] line-clamp-3",style:{fontFamily:"var(--font-inter)"},children:r})}),o.jsx("div",{className:"flex-1"}),o.jsx("div",{className:"border-t border-gray-400 mb-3 flex-shrink-0"}),o.jsx("div",{className:"mx-8 mt-4 flex-shrink-0",children:o.jsx($r,{variant:"neutral",size:"md",href:a,onClick:l,disabled:u,trailingIconPosition:"end",disableUnderline:!0,children:n})})]})},Qs=O.default.forwardRef(({title:e,children:t,isCollapsed:r,onToggle:n,onClose:a,defaultCollapsed:i=!1,className:s},l)=>{const[c,u]=P.useState(i),d=r??c,f=r!==void 0,h=()=>{const g=!d;f||u(g),n?.(g)},p=te.twMerge(N.clsx("bg-surface-2 rounded-t-3 overflow-hidden","w-[311px]",s));return o.jsxs("div",{ref:l,className:p,children:[o.jsxs("div",{className:"flex items-center justify-between px-5 h-[38px]",children:[o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:d?o.jsx(Jp,{}):o.jsx(em,{}),onClick:h,"aria-label":d?"Expand":"Collapse",className:"shrink-0"}),o.jsx("div",{className:"text-sm font-semibold text-med-em flex-1 text-center",children:e}),o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(nt,{}),onClick:a,"aria-label":"Close",className:"shrink-0"})]}),o.jsx("div",{className:"h-px bg-surface-3"}),!d&&t]})});Qs.displayName="ChatCollapsibleContainer";const ph=({children:e,arrowDirection:t="down",className:r})=>o.jsxs("div",{className:N.clsx("relative inline-block",r),children:[t==="up"&&o.jsx("div",{className:"absolute left-1/2 bottom-full -translate-x-1/2 -mb-px",style:{width:22,height:0,borderLeft:"10px solid transparent",borderRight:"10px solid transparent",borderBottom:"8px solid var(--surface-bg)"}}),o.jsx("div",{className:N.clsx("bg-surface-bg text-high-em p-6 border border-surface-3 text-xs font-medium rounded-xl shadow-lg whitespace-nowrap",t==="down"&&"border-b-0",t==="up"&&"border-t-0"),children:e}),t==="down"&&o.jsx("div",{className:"absolute left-1/2 top-full -translate-x-1/2 -mt-px",style:{width:22,height:0,borderLeft:"10px solid transparent",borderRight:"10px solid transparent",borderTop:"8px solid var(--surface-bg)"}})]}),Js=({progress:e,className:t,variant:r="none",...n})=>{const a=Math.min(100,Math.max(0,e)),s=N.clsx("w-full bg-surface-3 rounded-full relative overflow-visible flex-1 h-4",t),l="h-full rounded-full transition-all duration-300 ease-out bg-black",c=()=>{if(r==="none")return null;const u=`${a}%`;return r==="inline"?o.jsx("span",{className:"font-medium text-sm text-high-em shrink-0",children:u}):r==="below"?o.jsx("p",{className:"mt-2 font-medium text-sm text-high-em text-right",children:u}):null};return o.jsxs("div",{className:"flex flex-col gap-y-2 w-full",children:[o.jsxs("div",{className:"flex items-center w-full gap-x-5",children:[o.jsxs("div",{className:N.clsx(s,r==="tooltip"&&"group cursor-pointer"),role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress: ${a}%`,...n,children:[o.jsx("div",{className:l,style:{width:`${a}%`}}),r==="tooltip"&&o.jsx("div",{className:"absolute bottom-full mb-4 opacity-100 visible transition-opacity duration-200 pointer-events-none",style:{left:`${a}%`,transform:"translateX(-50%)"},children:o.jsxs(ph,{arrowDirection:"down",children:[a,"%"]})})]}),r==="inline"&&c()]}),r==="below"&&c()]})},w2=O.default.forwardRef(({title:e="Todo:",items:t,onItemChange:r,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:s=!1,className:l},c)=>{const h=t.length>3?150:void 0,p=t.filter(b=>b.checked).length,g=t.length,x=g>0?Math.round(p/g*100):0,m=(b,w)=>{r?.(b,w)},v=o.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[o.jsxs("span",{className:"text-sm font-semibold text-med-em whitespace-nowrap",children:[typeof e=="string"?e:"Todo:"," ",p,"/",g]}),o.jsx(Js,{progress:x,variant:"none",className:"h-2"})]});return o.jsx(Qs,{ref:c,title:v,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:s,className:l,children:o.jsx("div",{className:"overflow-y-auto",style:h?{maxHeight:`${h}px`}:void 0,children:t.map((b,w)=>o.jsxs(O.default.Fragment,{children:[o.jsxs("label",{className:"flex items-center px-8 h-[50px] gap-6 cursor-pointer",children:[o.jsx(Dr,{size:"medium",checked:b.checked,disabled:b.disabled,onChange:C=>m(b.id,C.target.checked)}),o.jsx("span",{className:N.clsx("text-xs font-semibold text-med-em flex-1",b.checked&&"line-through"),children:b.label})]}),w<t.length-1&&o.jsx("div",{className:"h-px bg-surface-3"})]},b.id))})})});w2.displayName="ChatCollapsibleCheck";const j2=O.default.forwardRef(({title:e,children:t,actions:r=[],isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:s=!1,className:l},c)=>o.jsxs(Qs,{ref:c,title:e,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:s,className:l,children:[o.jsx("div",{className:"p-8",children:o.jsx("div",{className:"text-xs font-semibold text-med-em",children:t})}),o.jsx("div",{className:"h-px bg-surface-3"}),r.length>0&&o.jsx("div",{className:"flex gap-2 p-5",children:r.map((u,d)=>o.jsx(K,{variant:u.variant||"neutral",hierarchy:u.hierarchy||"tertiary",size:"xs",onClick:u.onClick,className:"flex-1",children:u.label},d))})]}));j2.displayName="ChatCollapsibleDialog";const L6={primary:"bg-brand-primary-main text-white-uniform hover:bg-primary-accent-3",secondary:"bg-surface-2 text-high-em hover:bg-surface-2",tertiary:"bg-white text-high-em border border-surface-3 hover:bg-surface-1 shadow-[0_1px_3px_-1px_rgba(0,0,0,0.16)]",quaternary:"bg-surface-2 text-med-em hover:bg-surface-3",success:"bg-success-accent-1 text-success-em hover:bg-success-accent-2",danger:"bg-danger-accent-1 text-danger-em hover:bg-danger-accent-2",warning:"bg-warning-accent-0 text-warning-em hover:bg-warning-accent-1",info:"bg-info-accent-1 text-info-em hover:bg-info-accent-2"},D6={xs:{container:"text-[10px] font-medium p-[4px] gap-[4px] h-[24px] rounded-[6px]",icon:12},sm:{container:"text-[12px] font-medium p-[8px] gap-[8px] h-[34px] rounded-[8px]",icon:16}},z6="bg-surface-3 text-disabled cursor-not-allowed",Rr=({variant:e="primary",size:t="sm",leadingIcon:r=!0,trailingIcon:n=!0,onTrailingIconClick:a,children:i,className:s,disabled:l,...c})=>{const u=D6[t];let d=null;r===!0?d=o.jsx(B.Add,{}):O.default.isValidElement(r)&&(d=r);const f=d?O.default.cloneElement(d,{size:u.icon,color:"currentColor"}):null;let h=null;n===!0?h=o.jsx(B.ArrowDown2,{}):O.default.isValidElement(n)&&(h=n);const p=h?O.default.cloneElement(h,{size:u.icon,color:"currentColor"}):null,g=m=>{m.stopPropagation(),a&&a(m)},x=()=>{const m={xs:{left:"pl-4",right:"pr-4",both:"px-4"},sm:{left:"pl-6",right:"pr-6",both:"px-6"}},v=!!f,b=!!p;return!v&&!b?m[t].both:!v&&b?m[t].left:v&&!b?m[t].right:""};return o.jsxs("button",{disabled:l,className:N.clsx("inline-flex items-center justify-center shrink-0 font-medium transition-colors duration-200","focus:outline-none",l?z6:L6[e],u.container,x(),s),...c,children:[f&&o.jsx("span",{className:"mr-1",children:f}),o.jsx("span",{children:i}),p&&o.jsx("span",{className:"ml-1 p-0.5 rounded-full",role:"button",onClick:g,children:p})]})},B6={xs:{container:"h-13 min-w-21",sidePadding:"px-7",titleGap:"gap-2",title:"text-[11px] font-semibold",description:"text-[9px] font-medium",tagSize:"xs",buttonSize:"xs"},sm:{container:"h-[50px] min-w-22",sidePadding:"px-8",titleGap:"gap-2",title:"text-xs font-semibold",description:"text-[10px] font-medium",tagSize:"xs",buttonSize:"sm"},md:{container:"h-[56px] min-w-24",sidePadding:"px-9",titleGap:"gap-3",title:"text-sm font-semibold",description:"text-xs font-medium",tagSize:"sm",buttonSize:"sm"},lg:{container:"h-[70px] min-w-25",sidePadding:"px-9",titleGap:"gap-3",title:"text-base font-semibold",description:"text-sm font-medium",tagSize:"sm",buttonSize:"md"}},mh=e=>{const{variant:t,size:r="md",title:n,disabled:a=!1,className:i,onClick:s,...l}=e,c=B6[r],u=N.clsx("flex w-full transition-colors duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-secondary-main",c.container,c.sidePadding,a?"bg-surface-3 cursor-not-allowed":"bg-transparent hover:bg-surface-1 active:bg-surface-2 cursor-pointer",i);if(t==="type-1"){const{leadingTag:d,trailingButton:f}=e,h=p=>{p.stopPropagation(),f?.onClick?.(p)};return o.jsxs("button",{type:"button",disabled:a,onClick:s,className:N.clsx(u,"items-center"),...l,children:[d&&o.jsx(Rr,{size:d.size||c.tagSize,variant:d.variant||"tertiary",disabled:a,leadingIcon:!1,trailingIcon:!1,children:d.content}),o.jsx("span",{className:N.clsx(c.title,a?"text-disabled":"text-med-em","truncate",d&&"ml-5"),children:n}),f&&o.jsx("div",{className:"ml-auto",children:o.jsx(K,{size:c.buttonSize,variant:f.variant||"neutral",hierarchy:f.hierarchy||"tertiary",icons:"only",leadingIcon:f.icon,onClick:h,disabled:a})})]})}if(t==="type-2"){const{tag:d,description:f}=e;return o.jsxs("button",{type:"button",disabled:a,onClick:s,className:N.clsx(u,"flex-col justify-center items-start"),...l,children:[o.jsxs("div",{className:"flex items-center gap-5",children:[o.jsx("span",{className:N.clsx(c.title,a?"text-disabled":"text-med-em","truncate"),children:n}),d&&o.jsx(Rr,{size:d.size||c.tagSize,variant:d.variant||"tertiary",disabled:a,leadingIcon:!1,trailingIcon:!1,children:d.content})]}),f&&o.jsx("span",{className:N.clsx(c.description,a?"text-disabled":"text-low-em","truncate w-full text-left"),children:f})]})}return null},Ya=({children:e,size:t="sm",className:r})=>{const n=t==="md"?"px-2 py-1 text-sm":"px-2 py-1 text-xs";return o.jsx("kbd",{className:N.clsx("bg-surface-1 rounded font-medium text-med-em",n,r),children:e})},F6={xs:{borderRadius:"rounded-[8px]",headerHeight:"h-[38px]",headerPadding:"px-5",headerText:"text-[11px] font-semibold",footerHeight:"h-[32px]",footerText:"text-[9px] font-medium",iconSize:14,buttonSize:"xs",kbdSize:"sm"},sm:{borderRadius:"rounded-[12px]",headerHeight:"h-[38px]",headerPadding:"px-5",headerText:"text-[12px] font-semibold",footerHeight:"h-[40px]",footerText:"text-[10px] font-medium",iconSize:16,buttonSize:"sm",kbdSize:"sm"},md:{borderRadius:"rounded-[16px]",headerHeight:"h-[38px]",headerPadding:"px-5",headerText:"text-[14px] font-semibold",footerHeight:"h-[48px]",footerText:"text-[12px] font-medium",iconSize:18,buttonSize:"sm",kbdSize:"sm"},lg:{borderRadius:"rounded-[20px]",headerHeight:"h-[38px]",headerPadding:"px-5",headerText:"text-[16px] font-semibold",footerHeight:"h-[56px]",footerText:"text-[14px] font-medium",iconSize:20,buttonSize:"md",kbdSize:"sm"}},q6=({config:e})=>o.jsxs(o.Fragment,{children:[o.jsx("div",{className:N.clsx("flex items-center",e.headerHeight,e.headerPadding,"bg-surface-bg"),children:o.jsx("span",{className:N.clsx(e.headerText,"text-med-em"),children:"Opciones"})}),o.jsx("div",{className:"border-t border-surface-3"})]}),W6=({config:e,category:t,onBack:r})=>o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:N.clsx("flex items-center gap-3",e.headerHeight,e.headerPadding,"bg-surface-bg"),children:[o.jsx(K,{size:e.buttonSize,variant:"neutral",hierarchy:"secondary",icons:"only",leadingIcon:o.jsx(B.ArrowLeft2,{}),onClick:r}),o.jsx(Rr,{size:"xs",variant:t.leadingTag.variant||"tertiary",leadingIcon:!1,trailingIcon:!1,children:t.leadingTag.content}),o.jsx("span",{className:N.clsx(e.headerText,"text-med-em"),children:t.title})]}),o.jsx("div",{className:"border-t border-surface-3"})]}),H6=({config:e})=>o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t border-surface-3"}),o.jsxs("div",{className:N.clsx("flex items-center justify-between",e.footerHeight,e.headerPadding,"bg-surface-bg"),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Ya,{size:e.kbdSize,children:"↑"}),o.jsx(Ya,{size:e.kbdSize,children:"↓"})]}),o.jsx("span",{className:N.clsx(e.footerText,"text-low-em"),children:"navegar"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ya,{size:e.kbdSize,children:"↩"}),o.jsx("span",{className:N.clsx(e.footerText,"text-low-em"),children:"seleccionar"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ya,{size:e.kbdSize,children:"esc"}),o.jsx("span",{className:N.clsx(e.footerText,"text-low-em"),children:"cerrar"})]})]})]}),V6=({categories:e=[],size:t="md",onCategorySelect:r,onItemSelect:n,onClose:a,floating:i=!1,className:s,...l})=>{const[c,u]=P.useState("categories"),[d,f]=P.useState(null),h=F6[t],p=m=>{f(m),u("items"),r?.(m.id)},g=()=>{u("categories"),f(null)},x=m=>{d&&n?.(d.id,m.id)};return o.jsxs("div",{className:N.clsx("bg-surface-bg border border-surface-3 overflow-hidden","flex flex-col w-fit",h.borderRadius,i&&"absolute z-50",s),style:{boxShadow:"0px 8px 24px -4px rgba(0, 0, 0, 0.12)"},...l,children:[c==="categories"?o.jsx(q6,{config:h}):d?o.jsx(W6,{config:h,category:d,onBack:g}):null,c==="categories"?e.map(m=>o.jsx(mh,{variant:"type-1",size:t,title:m.title,leadingTag:m.leadingTag,trailingButton:{icon:o.jsx(B.ArrowRight2,{}),onClick:()=>p(m),variant:"neutral",hierarchy:"secondary"},onClick:()=>p(m)},m.id)):d?d.items.map(m=>o.jsx(mh,{variant:"type-2",size:t,title:m.title,tag:m.tag,description:m.description,onClick:()=>x(m)},m.id)):null,o.jsx(H6,{config:h})]})},C2=({className:e,activeView:t="chat",onChatClick:r,onHistorialClick:n,onSettingsClick:a,onCloseClick:i,containerWidth:s=0})=>{const l=[{id:"chat",label:"Chat",icon:o.jsx(Zj,{}),content:o.jsx("div",{})},{id:"historial",label:"Historial",icon:o.jsx(Yj,{}),content:o.jsx("div",{})}],c=l.findIndex(f=>f.id===t),u=f=>{const h=l[f];h.id==="chat"?r?.():h.id==="historial"&&n?.()},d=s<=350?"only-icon":"line-icons";return o.jsxs("div",{className:N.clsx("flex w-full items-baseline justify-between rounded-t-lg",e),children:[o.jsx("div",{className:"flex items-center",children:o.jsx(fm,{variant:d,tabs:l,selectedIndex:c,onChange:u,contentSpacing:"none",showBorder:!1})}),o.jsxs("div",{className:"flex items-center gap-2 pr-8 self-center",children:[o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(B.Add,{}),onClick:a,"aria-label":"Add"}),o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(nt,{}),onClick:i,"aria-label":"Close"})]})]})},U6={xs:12,sm:16,"sm-md":20,md:24,"md-lg":28,lg:32,xl:36,"2xl":40},ie=({size:e="md",children:t,color:r="currentColor",imageUrl:n,alt:a="Icon",className:i})=>{const[s,l]=P.useState(!1),c=typeof e=="number"?e:U6[e];if(n&&!s)return o.jsx("img",{src:n,alt:a,className:N.clsx("rounded-[12px]","object-cover",i),style:{width:c,height:c},onError:()=>l(!0)});if(O.default.isValidElement(t)){const u=t.props.className;return O.default.cloneElement(t,{size:c,color:r,className:N.clsx(i,typeof u=="string"?u:void 0)})}return o.jsx(B.InfoCircle,{size:c,color:r,className:i})},ft=({icon:e,label:t,gap:r=4,align:n="center",iconSize:a="md",labelSize:i,iconColorClass:s="text-low-em",labelColorClass:l="text-low-em",className:c,children:u,...d})=>{const f=`gap-${r}`,h={start:"items-start",center:"items-center",end:"items-end"}[n],p=i?`text-${i}`:"";return o.jsxs("div",{className:N.clsx("flex",h,f,c),...d,children:[e&&o.jsx("span",{className:s,children:o.jsx(ie,{size:a,children:e})}),t&&o.jsx("span",{className:N.clsx(p,l),children:t}),u]})},Ft={sm:{height:"h-[32px]",rounded:"rounded-[8px]",iconSize:12,labelFontSize:"text-[10px]",hintFontSize:"text-[10px]",hintIconSize:12},md:{height:"h-[38px]",rounded:"rounded-[12px]",iconSize:16,labelFontSize:"text-xs",hintFontSize:"text-xs",hintIconSize:12},lg:{height:"h-[48px]",rounded:"rounded-[12px]",iconSize:20,labelFontSize:"text-sm",hintFontSize:"text-sm",hintIconSize:14}},qe={default:{wrapper:"bg-surface-2 border-transparent hover:bg-surface-3",hint:"text-med-em",placeholder:"text-placeholder"},outlined:{wrapper:"bg-white border-surface-4",hint:"text-med-em",placeholder:"text-placeholder"},danger:{wrapper:"bg-danger-accent-1 border-danger-accent-2",hint:"text-danger-em",placeholder:"text-danger-em"},success:{wrapper:"bg-success-accent-1 border-success-accent-2",hint:"text-success-em",placeholder:"text-success-em"}},K6={default:{...qe.default,placeholder:"placeholder-placeholder text-med-em",icon:"text-high-em"},outlined:{...qe.outlined,placeholder:"placeholder-placeholder text-med-em",icon:"text-high-em"},danger:{...qe.danger,wrapper:"bg-danger-accent-1 border-danger-accent-2 hover:border-accent-2 text-danger-em",placeholder:"placeholder-danger-main text-danger-em",icon:"text-danger-em"},success:{...qe.success,wrapper:"bg-success-accent-1 border-success-accent-2 hover:border-success-accent-2",placeholder:"placeholder-success-main text-success-em",icon:"text-success-em"}},G6={sm:{...Ft.sm,inputPadding:"px-3",textareaPadding:"px-3 py-3",fontSize:"text-xs font-regular",leadingIconPosition:"left-4",trailingIconPosition:"right-4",inputPaddingLeftWithIcon:"pl-[32px]",inputPaddingRightWithIcon:"pr-10"},md:{...Ft.md,inputPadding:"px-3.5",textareaPadding:"px-3.5 py-4",fontSize:"text-sm font-regular",leadingIconPosition:"left-6",trailingIconPosition:"right-6",inputPaddingLeftWithIcon:"pl-[36px]",inputPaddingRightWithIcon:"pr-12"},lg:{...Ft.lg,inputPadding:"px-4",textareaPadding:"px-4 py-5",fontSize:"text-base font-regular",leadingIconPosition:"left-8",trailingIconPosition:"right-8",inputPaddingLeftWithIcon:"pl-[44px]",inputPaddingRightWithIcon:"pr-14"}},so={wrapper:"bg-surface-3 pointer-events-none border-transparent",input:"disabled:text-disabled disabled:placeholder-disabled",hint:"text-disabled"},ge=P.forwardRef(({variant:e="default",size:t="md",label:r,hint:n,leadingIcon:a,trailingIcon:i,leadingIconColor:s,trailingIconColor:l,disabled:c,className:u,type:d,customBackground:f,placeholderColor:h,multiline:p,customFontWeight:g,fontSize:x,customFontSize:m,hintIconVariant:v,onInputClick:b,...w},C)=>{const y=K6[e],j=G6[t],S=d==="password",[A,_]=P.useState(!1),I=S&&A?"text":d,k=m||x,E={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},T=k&&E[k]||void 0,M=k&&!E[k]?{fontSize:k}:void 0,R=F=>{const H=F.currentTarget;H.style.height="auto",H.style.height=`${H.scrollHeight}px`,w.onChange&&w.onChange(F)},$=f,L=$?/^[a-z]+-[a-z0-9-]+$/i.test($)?`var(--${$})`:$:void 0,q=g||void 0,U=F=>{b&&(F.preventDefault(),b())},z=te.twMerge(N.clsx("w-full bg-transparent text-placeholder focus:outline-none text-ellipsis",!p&&"h-full",p?j.textareaPadding:j.inputPadding,!g&&"font-medium",!k&&j.fontSize,y.placeholder,c&&so.input,h,T,a&&j.inputPaddingLeftWithIcon,(i||S&&!p)&&j.inputPaddingRightWithIcon,b&&"cursor-pointer pointer-events-none"));return o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-col gap-1.5",b&&"cursor-pointer",u)),onClick:U,children:[r&&o.jsx("label",{htmlFor:w.id,className:te.twMerge(N.clsx("font-semibold text-med-em pl-[2px] truncate",j.labelFontSize)),children:r}),o.jsxs("div",{className:te.twMerge(N.clsx("relative flex items-center border transition-colors duration-200",j.rounded,!p&&j.height,y.wrapper,c&&so.wrapper)),style:{backgroundColor:L},children:[a&&o.jsx(ie,{size:j.iconSize,className:te.twMerge(N.clsx("absolute top-1/2 -translate-y-1/2",j.leadingIconPosition,s||y.icon)),children:a}),p?o.jsx("textarea",{ref:C,disabled:c,className:te.twMerge(z,"resize-none overflow-hidden"),style:{fontWeight:q,...M},onInput:R,rows:1,...w}):o.jsx("input",{ref:C,disabled:c,type:I,className:z,style:{fontWeight:q,...M},...w}),!p&&S?o.jsx("button",{type:"button",onClick:()=>_(!A),className:te.twMerge(N.clsx("absolute top-1/2 -translate-y-1/2 text-placeholder hover:text-med focus:outline-none transition-colors",j.trailingIconPosition)),"aria-label":A?"Ocultar contraseña":"Mostrar contraseña",tabIndex:-1,children:A?o.jsx(a2,{size:j.iconSize}):o.jsx(n2,{size:j.iconSize})}):i?o.jsx(ie,{size:j.iconSize,className:te.twMerge(N.clsx("absolute top-1/2 -translate-y-1/2",j.trailingIconPosition,l||y.icon)),children:i}):null]}),n&&o.jsx(ft,{icon:o.jsx(B.InfoCircle,{variant:v||"Bold"}),label:n,iconSize:j.hintIconSize,gap:1,iconColorClass:N.clsx(y.hint,c&&so.hint),labelColorClass:N.clsx(y.hint,c&&so.hint),className:te.twMerge(N.clsx(j.hintFontSize,"font-semibold"))})]})});ge.displayName="InputField";const Z6={xs:{container:"h-[40px] min-w-[250px]",sidePadding:"pl-6 pr-7",checkboxMargin:"mr-5",middleGap:"gap-5",rightGap:"gap-5",checkbox:"small",leadingImage:"sm",leadingIcon:"xs",trailingIcon:"xs",title:"text-[11px] font-semibold",description:"text-[9px] font-medium",tag:"xs",trailingText:"text-[9px] font-medium"},sm:{container:"h-[50px] min-w-[290px]",sidePadding:"pl-7 pr-8",checkboxMargin:"mr-6",middleGap:"gap-6",rightGap:"gap-6",checkbox:"small",leadingImage:"md",leadingIcon:"sm",trailingIcon:"sm",title:"text-[12px] font-semibold",description:"text-[10px] font-medium",tag:"xs",trailingText:"text-[10px] font-medium"},md:{container:"h-[56px] min-w-[340px]",sidePadding:"pl-9 pr-9",checkboxMargin:"mr-6",middleGap:"gap-6",rightGap:"gap-6",checkbox:"medium",leadingImage:"lg",leadingIcon:"sm-md",trailingIcon:"sm-md",title:"text-[14px] font-semibold",description:"text-[12px] font-medium",tag:"xs",trailingText:"text-[12px] font-medium"},lg:{container:"h-[70px] min-w-[420px]",sidePadding:"pl-9 pr-9",checkboxMargin:"mr-6",middleGap:"gap-6",rightGap:"gap-6",checkbox:"large",leadingImage:"2xl",leadingIcon:"md",trailingIcon:"md",title:"text-[16px] font-semibold",description:"text-[14px] font-medium",tag:"sm",trailingText:"text-[14px] font-medium"}},Qt=({size:e="md",disabled:t=!1,showCheckbox:r=!0,showLeadingImage:n=!0,showLeadingIcon:a=!0,showDescription:i=!0,showTrailingIcon:s=!0,showTag:l=!0,showTrailingText:c=!0,title:u,description:d,customTitleColor:f,customBackgroundColor:h,customHoverColor:p,customLeadingIconColor:g,checked:x=!1,indeterminate:m=!1,onCheckboxChange:v,leadingImageUrl:b,leadingImageAlt:w="List item image",leadingIcon:C,trailingIcon:y,tagContent:j,tagVariant:S="tertiary",trailingText:A,className:_,middleContainerClassName:I,as:k="button",onClick:E,...T})=>{const M=Z6[e],R=U=>{U.stopPropagation()},$=U=>{v?.(U.target.checked)},L=te.twMerge(N.clsx("flex items-center w-full transition-colors duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-secondary-main",M.container,M.sidePadding,h||(t?"bg-surface-3 cursor-not-allowed":"bg-transparent hover:bg-surface-1 active:bg-surface-2 cursor-pointer"),h&&(t?"cursor-not-allowed":"cursor-pointer"),p&&!t&&p),_),q=o.jsxs(o.Fragment,{children:[r&&o.jsx("div",{onClick:R,className:N.clsx("flex items-center",M.checkboxMargin),children:o.jsx(Dr,{size:M.checkbox,checked:x,indeterminate:m,onChange:$,disabled:t})}),o.jsxs("div",{className:te.twMerge(N.clsx("flex items-center",M.middleGap),I),children:[n&&b&&o.jsx("div",{className:N.clsx("shrink-0",t&&"opacity-50"),children:o.jsx(ie,{size:M.leadingImage,imageUrl:b,alt:w})}),a&&o.jsx("div",{className:"shrink-0",children:o.jsx(ie,{size:M.leadingIcon,color:t?"var(--text-disabled)":g||"var(--med-em)",children:C||o.jsx(B.Element3,{})})}),o.jsxs("div",{className:"flex flex-col gap-0 justify-start items-start min-w-0 shrink mr-8",children:[o.jsx("span",{className:N.clsx(M.title,f||(t?"text-disabled":"text-med-em"),"truncate max-w-full"),children:u}),i&&d&&o.jsx("span",{className:N.clsx(M.description,t?"text-disabled":"text-low-em","truncate max-w-full"),children:d})]})]}),o.jsxs("div",{className:N.clsx("flex items-center ml-auto",M.rightGap),children:[s&&o.jsx(ie,{size:M.trailingIcon,color:t?"var(--text-disabled)":"var(--high-em)",children:y||o.jsx(B.ArrowRight2,{})}),l&&j&&o.jsx(Rr,{size:M.tag,variant:S,disabled:t,leadingIcon:!1,trailingIcon:!1,children:j}),c&&A&&o.jsx("span",{className:N.clsx(M.trailingText,t?"text-disabled":"text-low-em"),children:A})]})]});return k==="div"?o.jsx("div",{className:L,...T,children:q}):o.jsx("button",{type:"button",disabled:t,onClick:E,className:L,...T,children:q})};function Y6(e,t){const[r,n]=P.useState(e);return P.useEffect(()=>{const a=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(a)}},[e,t]),r}const X6={position:"fixed",visibility:"hidden",top:0,left:0,zIndex:50};function Gi({triggerRef:e,panelRef:t,enabled:r,offset:n=8,constrain:a=!1}){const[i,s]=P.useState(X6);return P.useLayoutEffect(()=>{if(!r)return;const l=()=>{if(!e.current||!t.current)return;const c=e.current.getBoundingClientRect(),u=t.current.getBoundingClientRect(),d=window.innerWidth,f=window.innerHeight,h=16,p=f-c.bottom-n-h,g=c.top-n-h;let x,m;p>=u.height||p>=g?(x=c.bottom+n,m=f-x-h):(m=g,x=c.top-n-Math.min(u.height,m));let v=c.right-u.width;v<h&&(v=c.left),v=Math.max(h,v),s({position:"fixed",top:x,left:v,...a&&{maxHeight:Math.max(0,m),maxWidth:d-h*2},visibility:"visible",zIndex:50})};return l(),window.addEventListener("scroll",l,!0),window.addEventListener("resize",l),()=>{window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[r,e,t,n]),i}function el({refs:e,onClose:t,enabled:r=!0}){P.useEffect(()=>{if(!r)return;const n=i=>{e.some(s=>s.current?.contains(i.target))||t()},a=i=>{e.some(s=>s.current?.contains(i.target))||t()};return document.addEventListener("mousedown",n),window.addEventListener("scroll",a,!0),()=>{document.removeEventListener("mousedown",n),window.removeEventListener("scroll",a,!0)}},[r,t])}function Q6({triggerRef:e,open:t,onClose:r,constrain:n=!1,offset:a}){const i=P.useRef(null),s=Gi({triggerRef:e,panelRef:i,enabled:t,constrain:n,offset:a});return P.useEffect(()=>{if(!t)return;const c=u=>{u.key==="Escape"&&r()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[t,r]),{panelRef:i,portalStyle:s,backdropProps:{style:{position:"fixed",inset:0,zIndex:49},onMouseDown:r}}}function tl(){const e=P.useRef(null),[t,r]=P.useState(1/0);return P.useEffect(()=>{const n=e.current;if(!n)return;const a=new ResizeObserver(i=>{r(i[0].contentRect.width)});return a.observe(n),()=>a.disconnect()},[]),[e,t]}function J6(){const e=P.useRef(null),[t,r]=P.useState(0);return P.useEffect(()=>{const n=e.current;if(!n)return;const a=new ResizeObserver(i=>{r(i[0].contentRect.height)});return a.observe(n),()=>a.disconnect()},[]),[e,t]}const eN={xs:"rounded-[8px]",sm:"rounded-[12px]",md:"rounded-[16px]",lg:"rounded-[20px]"},Wt=({items:e=[],header:t,headerSize:r="xs",size:n="md",selectedIds:a=[],onSelect:i,floating:s=!1,triggerRef:l,onClose:c,className:u,...d})=>{const f=eN[n],h=!!l,p=O.default.useRef(null);el({refs:[p,...l?[l]:[]],onClose:c??(()=>{}),enabled:!!c});const g=Gi({triggerRef:l??{current:null},panelRef:p,enabled:h}),x=o.jsxs("div",{ref:p,className:N.clsx("bg-surface-bg border border-surface-3 overflow-hidden","flex flex-col w-fit",f,!h&&s&&"absolute z-50",u),style:{boxShadow:"0px 8px 24px -4px rgba(0, 0, 0, 0.12)",...h?g:{}},...d,children:[t&&o.jsxs(o.Fragment,{children:[o.jsx(Qt,{size:r,title:t.title,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,className:"shrink-0 cursor-default hover:bg-transparent active:bg-transparent",customTitleColor:"text-low-em"}),o.jsx("div",{className:"border-t border-surface-3"})]}),e.map((m,v)=>{const{id:b,showDividerAfter:w,onClick:C,onSelect:y,customBackgroundColor:j,customHoverColor:S,...A}=m,_=b?a.includes(b):!1,I=v===e.length-1;return o.jsxs(O.default.Fragment,{children:[o.jsx(Qt,{size:n,onClick:k=>{y?.(),b&&i?.(b),C?.(k)},customBackgroundColor:j||"bg-surface-bg",customHoverColor:S||"hover:bg-surface-2",className:N.clsx("shrink-0",_&&"bg-surface-1",A.className),checked:_,...A}),w&&!I&&o.jsx("div",{className:"border-t border-surface-3"})]},b||v)})]});return h&&typeof document<"u"?Ca.createPortal(x,document.body):x},S2=({id:e,title:t,preview:r,onClick:n,menuItems:a,className:i})=>{const[s,l]=P.useState(!1),c=P.useRef(null),u=P.useRef(null);P.useEffect(()=>{const f=h=>{c.current&&!c.current.contains(h.target)&&u.current&&!u.current.contains(h.target)&&l(!1)};return s&&document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[s]);const d=a?.map((f,h)=>{const p=h===a.length-1;return{...f,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!0,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showDividerAfter:h===a.length-2,className:N.clsx("!h-[34px]",f.className),...p&&{customTitleColor:"text-danger-em",customLeadingIconColor:"var(--danger-em)"}}})||[];return o.jsxs("div",{className:N.clsx("group flex items-start justify-between gap-3 px-8 py-4 hover:bg-surface-1 transition-colors cursor-pointer",i),onClick:n,children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"text-xs font-semibold text-med-em mb-1",children:t}),o.jsx("p",{className:"text-[10px] font-medium text-low-em",children:r})]}),a&&a.length>0&&o.jsxs("div",{className:"flex-shrink-0 relative",onClick:f=>f.stopPropagation(),children:[o.jsx(K,{ref:u,variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(B.More,{variant:"Linear"}),"aria-label":"Más opciones",onClick:()=>l(!s)}),s&&o.jsx("div",{ref:c,className:"absolute right-0 top-full mt-1 z-50",children:o.jsx(Wt,{items:d,size:"xs",className:"!w-[182px]",onSelect:f=>{const h=a.find(p=>p.id===f);h?.onClick&&h.onClick({}),l(!1)}})})]})]})},tN=e=>{const t=new Date,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=new Date(r.getTime()-10080*60*1e3),a=new Date(r.getTime()-720*60*60*1e3),i=new Date(r.getTime()-2160*60*60*1e3);return e.reduce((s,l)=>{const c=new Date(l.timestamp);return c>=r?s.today.push(l):c>=n?s.last7Days.push(l):c>=a?s.last30Days.push(l):c>=i&&s.last90Days.push(l),s},{today:[],last7Days:[],last30Days:[],last90Days:[]})},rN=(e,t)=>{if(!t.trim())return e;const r=t.toLowerCase();return e.filter(n=>n.title.toLowerCase().includes(r))},O2=({items:e,onItemClick:t,searchPlaceholder:r="Buscar en el historial...",className:n,onSearchChange:a,emptyState:i})=>{const[s,l]=P.useState(""),c=P.useMemo(()=>{const h=rN(e,s);return tN(h)},[e,s]),u=h=>{const p=h.target.value;l(p),a?.(p)},d=(h,p)=>p.length===0?null:o.jsxs("div",{children:[o.jsx("div",{className:"px-8 py-8",children:o.jsx("h3",{className:"text-xs font-semibold text-low-em",children:h})}),p.map((g,x)=>o.jsxs(O.default.Fragment,{children:[o.jsx(S2,{id:g.id,title:g.title,preview:g.preview,menuItems:g.menuItems,onClick:()=>t?.(g)}),x<p.length-1&&o.jsx("div",{className:"border-b border-surface-2"})]},g.id))]},h),f=c.today.length===0&&c.last7Days.length===0&&c.last30Days.length===0&&c.last90Days.length===0;return o.jsxs("div",{className:N.clsx("flex flex-col",n),children:[o.jsx("div",{className:"px-8 pt-9",children:o.jsx(ge,{size:"md",variant:"default",placeholder:r,leadingIcon:o.jsx(B.SearchNormal,{size:20,variant:"Linear"}),value:s,onChange:u})}),f?s?o.jsx("div",{className:"flex flex-col items-center justify-center py-12 px-8",children:o.jsxs("p",{className:"text-sm text-low-em text-center",children:['No se encontraron resultados para "',s,'"']})}):i??null:o.jsxs("div",{className:"flex flex-col",children:[d("Hoy",c.today),d("Últimos 7 días",c.last7Days),d("Últimos 30 días",c.last30Days),d("Últimos 90 días",c.last90Days)]})]})},nN=[{id:"conversation",label:"Conversación"},{id:"constructor",label:"Constructor"}],N2=({inputValue:e,onInputChange:t,onSendClick:r,placeholder:n="Input Text",variant:a="default",className:i,minLines:s=2,maxLines:l=10})=>{const[c,u]=P.useState("conversation"),d=P.useRef(null),f=20,h=s*f,p=l*f;P.useEffect(()=>{const x=d.current?.querySelector("textarea");if(!x)return;x.style.height="0px",x.style.overflow="hidden";const m=x.scrollHeight,v=Math.max(h,Math.min(m,p));x.style.height=`${v}px`,x.style.overflow=m>p?"auto":"hidden"},[e,h,p]);const g=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),r?.())};return o.jsxs("div",{ref:d,className:N.clsx("flex flex-col gap-3 p-4 rounded-xl bg-surface-2 border border-surface-3",i),children:[o.jsx("div",{className:"mb-1",children:o.jsx(K,{variant:"neutral",hierarchy:"quaternary",size:"xs",icons:"only",leadingIcon:o.jsx(B.Hashtag,{}),"aria-label":"Add"})}),o.jsx(hl,{variant:"default",placeholder:n,value:e,onChange:x=>t?.(x.target.value),onKeyDown:g,resize:"none",className:"[&_textarea]:!min-h-0"}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center justify-start gap-4",children:[o.jsx("div",{className:"flex items-center gap-4",children:o.jsx(K,{variant:"neutral",hierarchy:"quaternary",size:"md",borderRadius:"12px",icons:"only",leadingIcon:o.jsx(B.AddCircle,{}),"aria-label":"Add"})}),a==="default"&&o.jsx(fl,{withBorder:!0,items:nN,value:c,onChange:u,size:"ai-chat"})]}),o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"md",icons:"only",borderRadius:"12px",leadingIcon:o.jsx(r2,{}),onClick:r,"aria-label":"Send"})]})]})},li=({variant:e,hierarchy:t="flat",children:r,className:n})=>o.jsx("div",{className:N.clsx("chat-message-container",e==="sent"?"chat-message-sent":"chat-message-received",t==="bubble"&&e==="sent"&&"bg-surface-2 px-4 rounded-lg rounded-tr-none",t==="bubble"&&e==="received"&&"bg-white px-4 rounded-lg rounded-tl-none",n),children:o.jsx("div",{className:N.clsx("chat-message-content",e==="sent"?"chat-message-sent-content":"chat-message-received-content"),children:r})}),xh=({className:e,onCopyClick:t,onLikeClick:r,onDislikeClick:n,onRefreshClick:a})=>{const[i,s]=P.useState(!1),[l,c]=P.useState(!1),u=()=>{s(!i),r?.()},d=()=>{c(!l),n?.()};return o.jsxs("div",{className:N.clsx("inline-flex items-center gap-4",e),children:[o.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Copy message",children:o.jsx(ie,{size:"sm",children:o.jsx(B.Copy,{})})}),o.jsx("button",{onClick:u,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Like message",children:o.jsx(ie,{size:"sm",children:i?o.jsx(B.Like1,{variant:"Bold"}):o.jsx(B.Like1,{variant:"Outline"})})}),o.jsx("button",{onClick:d,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Dislike message",children:o.jsx(ie,{size:"sm",children:l?o.jsx(B.Dislike,{variant:"Bold"}):o.jsx(B.Dislike,{variant:"Outline"})})}),o.jsx("button",{onClick:a,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Refresh response",children:o.jsx(ie,{size:"sm",children:o.jsx(B.Refresh,{})})})]})},P2=({fileName:e,fileSize:t,alignment:r="left",className:n,...a})=>o.jsx("a",{href:a.href||"#",download:!0,className:N.clsx("block w-full border border-surface-2 p-4 transition-colors hover:bg-surface-2","py-6 px-8 h-[68px]",{"rounded-tr-lg rounded-br-lg rounded-bl-lg":r==="left","rounded-tl-lg rounded-bl-lg rounded-br-lg":r==="right"},n),...a,children:o.jsxs("div",{className:"flex flex-col text-low-em",children:[o.jsx("span",{className:"font-medium text-sm",children:e}),o.jsx("span",{className:"font-normal text-sm",children:t})]})}),rm=({className:e})=>o.jsx("div",{className:N.clsx("w-full max-w-max self-start",e),children:o.jsx("div",{className:"flex items-center gap-1 px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"w-3 h-3 bg-low-em rounded-full animate-typing-dot",style:{animationDelay:"0ms"}}),o.jsx("span",{className:"w-3 h-3 bg-surface-4 rounded-full animate-typing-dot",style:{animationDelay:"200ms"}}),o.jsx("span",{className:"w-3 h-3 bg-low-em rounded-full animate-typing-dot",style:{animationDelay:"400ms"}})]})})}),aN=O.default.lazy(()=>Promise.resolve().then(()=>require("./index-C_WnbLro.cjs"))),Gx=({children:e})=>o.jsx(P.Suspense,{fallback:o.jsx("span",{children:e}),children:o.jsx(aN,{children:e})}),A2=O.default.memo(({messages:e,showTypingIndicator:t=!1,children:r,className:n,borderSide:a="none",borderStyle:i="surface-3",showHeader:s=!1,headerHeight:l=56,activeView:c="chat",onChatClick:u,onHistorialClick:d,onSettingsClick:f,onCloseClick:h,containerWidth:p=0,historialItems:g=[],onHistorialItemClick:x,historialSearchPlaceholder:m,onHistorialSearchChange:v,historialEmptyState:b,showChatInput:w=!0,chatInputValue:C,onChatInputChange:y,onChatSendClick:j,chatInputPlaceholder:S="Input Text",chatInputVariant:A="default",chatInputMinLines:_=2,chatInputMaxLines:I=10,onMessageCopyClick:k,onMessageLikeClick:E,onMessageDislikeClick:T,onMessageRefreshClick:M})=>{const R=O.default.useMemo(()=>a==="none"?"":`${a==="left"?"border-l":"border-r"} ${i==="surface-3"?"border-surface-3":"border-surface-4"}`,[a,i]);return o.jsxs("div",{className:`h-full w-full flex flex-col bg-white ${R} ${n||""}`,children:[s&&o.jsxs(o.Fragment,{children:[o.jsx("div",{style:{height:`${l}px`},children:o.jsx(C2,{activeView:c,onChatClick:u,onHistorialClick:d,onSettingsClick:f,onCloseClick:h,containerWidth:p,className:"pl-8 items-end h-full"})}),o.jsx(pe,{})]}),c==="historial"?o.jsx(O2,{items:g,onItemClick:x,searchPlaceholder:m,onSearchChange:v,emptyState:b,className:"flex-1 overflow-y-auto"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex-1 overflow-y-auto",children:e?o.jsxs("div",{className:"flex flex-col gap-10 px-9 py-6",children:[e.map(L=>o.jsx(O.default.Fragment,{children:L.attachment?o.jsxs("div",{className:`flex flex-col gap-4 ${L.variant==="sent"?"items-end":"items-start"}`,children:[o.jsxs("div",{className:`flex flex-col gap-10 ${L.variant==="sent"?"items-end":"items-start"}`,children:[o.jsx(li,{variant:L.variant,hierarchy:"bubble",children:typeof L.content=="string"?o.jsx(Gx,{children:L.content}):L.content}),o.jsx("div",{className:"w-auto max-w-[300px]",children:o.jsx(P2,{fileName:L.attachment.fileName,fileSize:L.attachment.fileSize,alignment:L.variant==="sent"?"right":"left",href:L.attachment.href})})]}),L.variant==="received"&&o.jsx(xh,{onCopyClick:()=>k?.(L.id),onLikeClick:()=>E?.(L.id),onDislikeClick:()=>T?.(L.id),onRefreshClick:()=>M?.(L.id)})]}):o.jsxs("div",{className:`flex flex-col ${L.variant==="sent"?"items-end":"items-start"}`,children:[o.jsx(li,{variant:L.variant,hierarchy:"bubble",children:typeof L.content=="string"?o.jsx(Gx,{children:L.content}):L.content}),L.variant==="received"&&o.jsx(xh,{onCopyClick:()=>k?.(L.id),onLikeClick:()=>E?.(L.id),onDislikeClick:()=>T?.(L.id),onRefreshClick:()=>M?.(L.id)})]})},L.id)),t&&o.jsx(rm,{})]}):r}),w&&o.jsx("div",{className:"p-4",children:o.jsx(N2,{minLines:_,maxLines:I,inputValue:C,onInputChange:y,onSendClick:j,placeholder:S,variant:A,containerWidth:p})})]})]})});A2.displayName="ChatPanel";const ht=O.default.memo(({icon:e=o.jsx(ie,{size:56,children:o.jsx(B.Box2,{})}),description:t,actionLabel:r,onAction:n,flat:a=!1,className:i,iconClassName:s,descriptionClassName:l})=>o.jsx("div",{className:N.clsx("flex flex-col items-center justify-center w-full",a?"bg-surface-1 p-10":"rounded-6 bg-surface-1 p-10 border border-surface-2",i),children:o.jsxs("div",{className:"flex flex-col items-center gap-10 text-center",children:[o.jsx("span",{className:N.clsx("text-low-em",s),children:e}),t&&o.jsx("p",{className:N.clsx("text-lg font-medium text-low-em",l),children:t}),r&&o.jsx(K,{variant:"secondary",hierarchy:"primary",size:"md",icons:"leading",leadingIcon:o.jsx(B.Add,{}),onClick:n,children:r})]})}));ht.displayName="EmptyState";function iN(e){const t=new Date(e),n=Math.floor((new Date().getTime()-t.getTime())/1e3),a=Math.floor(n/60),i=Math.floor(a/60),s=Math.floor(i/24);return n<60?"Just now":a<60?`${a}m ago`:i<24?`${i}h ago`:s<7?t.toLocaleDateString("en-US",{weekday:"short"}):t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}const oN=({id:e,name:t,timestamp:r,status:n,avatarUrl:a,avatarInitials:i,isActive:s=!1,onClick:l,className:c})=>o.jsxs("button",{type:"button",id:e,onClick:l,className:N.clsx("flex items-center gap-6 w-full px-8 py-8 text-left transition-colors",s?"bg-surface-2":"hover:bg-surface-1 active:bg-surface-2",c),children:[o.jsx(Bt,{size:"md",imageUrl:a,initials:i}),o.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:t}),o.jsxs("div",{className:"flex items-center gap-8 shrink-0",children:[o.jsx("span",{className:"text-xs font-medium text-high-em whitespace-nowrap",children:iN(r)}),n&&o.jsx(Ge,{variant:"status",statusState:n,size:"sm"})]})]}),Zx=({items:e,activeId:t,searchValue:r="",searchPlaceholder:n="Search chats...",emptyState:a,onItemClick:i,onSearchChange:s,className:l})=>o.jsxs("div",{className:N.clsx("flex flex-col h-full",l),children:[o.jsx("div",{className:"flex items-center h-[64px] px-8 shrink-0",children:o.jsx(ge,{size:"md",variant:"default",placeholder:n,trailingIcon:o.jsx(B.SearchNormal1,{variant:"Linear"}),value:r,onChange:c=>s?.(c.target.value),className:"w-full"})}),o.jsx("div",{className:"border-b border-surface-3 shrink-0"}),e.length===0?o.jsx("div",{className:"flex-1 flex items-center justify-center",children:a??o.jsx(ht,{flat:!0,className:"bg-transparent",description:"No chats yet"})}):o.jsx("div",{className:"flex-1 overflow-y-auto",children:e.map((c,u)=>o.jsxs(O.default.Fragment,{children:[o.jsx(oN,{...c,isActive:c.id===t,onClick:()=>i?.(c)}),u<e.length-1&&o.jsx("div",{className:"border-b border-surface-3"})]},c.id))})]}),pe=({direction:e="horizontal",width:t,height:r,className:n})=>{const a=e==="horizontal"?"100%":"0.5px",i=e==="horizontal"?"0.5px":"100%",s=N.clsx(n,"bg-surface-3 items-center"),l={width:t??a,height:r??i};return o.jsx("div",{className:s,style:l})};function Yx(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function sN(e){return e==="whatsapp"?o.jsx(B.Whatsapp,{size:18,variant:"Bold"}):e==="email"?o.jsx(B.Sms,{size:18,variant:"Linear"}):e==="phone"?o.jsx(B.Call,{size:18,variant:"Linear"}):null}const lN={completada:"success",pendiente:"warning",cancelada:"danger"},cN={completada:"Completada",pendiente:"Pendiente",cancelada:"Cancelada"},uN=({order:e})=>o.jsxs("div",{className:"flex flex-col gap-6 p-8 bg-surface-1 rounded-6",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.orderNumber}),o.jsx("span",{className:"text-xs text-low-em",children:e.date})]}),e.images&&e.images.length>0&&o.jsx("div",{className:"flex gap-4",children:e.images.slice(0,4).map((t,r)=>o.jsx("img",{src:t,alt:"",className:"w-12 h-12 rounded-4 object-cover bg-surface-2"},r))}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.time&&o.jsx("span",{className:"text-xs text-low-em",children:e.time}),o.jsx("span",{className:"text-sm font-semibold text-high-em ml-auto",children:e.price})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx(Ge,{variant:"simple",theme:lN[e.status],size:"sm",children:cN[e.status]}),o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"none",onClick:e.onViewDetails,children:"Ver detalles"})]})]}),dN=({field:e})=>o.jsxs("div",{className:"flex items-center gap-8 px-8 py-6",children:[o.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-1",children:[o.jsx("span",{className:"text-xs text-low-em",children:e.label}),o.jsx("span",{className:"text-sm font-semibold text-high-em truncate",children:e.value})]}),e.onEdit&&o.jsx(K,{variant:"neutral",hierarchy:"quaternary",size:"xs",icons:"only",leadingIcon:o.jsx(B.Edit2,{size:16,variant:"Linear"}),onClick:e.onEdit})]}),Xx=({contact:e,messages:t=[],orders:r=[],isDetailOpen:n=!1,showTypingIndicator:a=!1,inputValue:i="",inputPlaceholder:s="Escribe un mensaje...",onBack:l,onCallClick:c,onVideoClick:u,onDetailOpen:d,onDetailClose:f,onInputChange:h,onSendClick:p,onMoreClick:g,className:x})=>{const m=sN(e.channel);return o.jsxs("div",{className:N.clsx("flex relative overflow-hidden h-full bg-surface-bg",x),children:[o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-4 px-8 h-[64px] shrink-0",children:[o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(B.ArrowLeft2,{size:18,variant:"Linear"}),onClick:l}),o.jsxs("button",{type:"button",className:"flex items-center gap-6 flex-1 min-w-0 text-left",onClick:d,children:[o.jsx(Bt,{size:"md",imageUrl:e.avatarUrl,initials:e.avatarInitials}),o.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),m&&o.jsx("span",{className:"text-low-em shrink-0",children:m})]}),o.jsx(mr,{size:"sm",variant:"neutral",value:"",onChange:v=>{v==="call"&&c?.(),v==="video"&&u?.()},options:[{value:"call",icon:o.jsx(B.Call,{variant:"Linear"})},{value:"video",icon:o.jsx(B.Video,{variant:"Linear"})}]}),g&&o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(B.More,{size:18,variant:"Linear"}),onClick:g})]}),o.jsx(pe,{}),o.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col gap-8 p-8",children:[t.map(v=>{const b=v.attachment?o.jsxs("div",{className:"flex flex-col gap-4",children:[v.content&&o.jsx("span",{children:v.content}),o.jsxs("a",{href:v.attachment.href??"#",className:"flex items-center gap-4 text-xs underline opacity-80",children:[o.jsx("span",{className:"font-medium",children:v.attachment.fileName}),o.jsxs("span",{children:["(",v.attachment.fileSize,")"]})]})]}):v.content;return v.variant==="received"?o.jsxs("div",{className:"flex items-start gap-6",children:[o.jsx(Bt,{size:"sm",imageUrl:e.avatarUrl,initials:e.avatarInitials}),o.jsxs("div",{className:"flex flex-col gap-2 max-w-[85%]",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("span",{className:"text-sm font-medium text-low-em",children:v.senderName}),o.jsx("span",{className:"text-xs text-low-em",children:v.timeLabel??Yx(v.timestamp)})]}),o.jsx(li,{variant:"received",hierarchy:"bubble",className:"px-8 py-6 text-high-em",children:b})]})]},v.id):o.jsxs("div",{className:"flex flex-col gap-2 max-w-[85%] self-end",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("span",{className:"text-sm font-medium text-low-em",children:v.senderName??"You"}),o.jsx("span",{className:"text-xs text-low-em",children:v.timeLabel??Yx(v.timestamp)})]}),o.jsx(li,{variant:"sent",hierarchy:"bubble",className:"px-8 py-6 text-high-em",children:b})]},v.id)}),a&&o.jsxs("div",{className:"flex items-start gap-6",children:[o.jsx(Bt,{size:"sm",imageUrl:e.avatarUrl,initials:e.avatarInitials}),o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.name}),o.jsx(rm,{className:"-ml-2"})]})]})]}),o.jsx(pe,{}),o.jsxs("div",{className:"flex items-center gap-4 px-8 py-6 shrink-0",children:[o.jsx("div",{className:"flex-1",children:o.jsx(ge,{size:"md",variant:"default",placeholder:s,value:i,onChange:v=>h?.(v.target.value)})}),o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(B.Send2,{size:18,variant:"Linear"}),onClick:p})]})]}),o.jsxs("div",{className:N.clsx("absolute inset-y-0 right-0 w-full flex flex-col bg-surface-bg transition-transform duration-300",n?"translate-x-0":"translate-x-full"),children:[o.jsxs("div",{className:"flex items-center gap-6 px-8 py-6 shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-6 flex-1 min-w-0",children:[o.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),m&&o.jsx("span",{className:"text-low-em shrink-0",children:m})]}),o.jsx(K,{variant:"neutral",hierarchy:"quaternary",size:"sm",icons:"only",leadingIcon:o.jsx(B.CloseCircle,{size:18,variant:"Linear"}),onClick:f})]}),o.jsx(pe,{}),o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e.fields&&e.fields.length>0&&o.jsxs("div",{className:"flex flex-col",children:[o.jsx("div",{className:"px-8 py-6",children:o.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:"Información de contacto"})}),e.fields.map((v,b)=>o.jsxs(O.default.Fragment,{children:[o.jsx(dN,{field:v}),b<(e.fields?.length??0)-1&&o.jsx(pe,{})]},v.label))]}),e.fields&&e.fields.length>0&&r.length>0&&o.jsx(pe,{}),r.length>0&&o.jsxs("div",{className:"flex flex-col gap-8 p-8",children:[o.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:"Pedidos"}),r.map(v=>o.jsx(uN,{order:v},v.id))]})]})]})]})};function fN(e){return e==="whatsapp"?o.jsx(B.Whatsapp,{size:18,variant:"Bold"}):e==="email"?o.jsx(B.Sms,{size:18,variant:"Linear"}):e==="phone"?o.jsx(B.Call,{size:18,variant:"Linear"}):null}const hN={completada:"success",pendiente:"warning",cancelada:"danger"},pN={completada:"Completada",pendiente:"Pendiente",cancelada:"Cancelada"},mN=({order:e})=>o.jsxs("div",{className:"flex flex-col gap-6 p-8 bg-white",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(ie,{size:"sm",children:o.jsx(B.DocumentText,{variant:"Linear"})}),o.jsx("span",{className:"text-base text-high-em",children:e.orderNumber})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(ie,{size:"sm",children:o.jsx(B.Calendar,{variant:"Linear"})}),o.jsx("span",{className:"text-base text-high-em",children:e.date})]})]}),o.jsx("div",{className:"h-px bg-surface-3"}),o.jsxs("div",{className:"flex items-center gap-4",children:[e.time&&o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(ie,{size:"sm",children:o.jsx(B.Clock,{variant:"Linear"})}),o.jsx("span",{className:"text-base text-high-em",children:e.time})]}),o.jsx("span",{className:"text-base text-high-em ml-auto",children:e.price})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx(Ge,{variant:"outlined",theme:hN[e.status],size:"sm",children:e.statusLabel??pN[e.status]}),o.jsx(K,{variant:"secondary",hierarchy:"primary",size:"sm",icons:"none",onClick:e.onViewDetails,children:e.viewDetailsLabel??"Ver detalles"})]})]}),xN=({field:e})=>o.jsxs("div",{className:"flex items-center gap-8 px-8 py-6 bg-white",children:[o.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-1",children:[o.jsx("span",{className:"text-xs text-low-em",children:e.label}),o.jsx("span",{className:"text-sm font-semibold text-high-em truncate",children:e.value})]}),e.onEdit&&o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(B.Edit2,{size:16,variant:"Linear"}),onClick:e.onEdit})]}),Qx=({contact:e,orders:t=[],contactSectionLabel:r="Información de contacto",ordersSectionLabel:n="Pedidos",emptyOrdersDescription:a="Sin pedidos",onClose:i,className:s})=>{const l=fN(e.channel);return o.jsxs("div",{className:N.clsx("flex flex-col h-full bg-surface-bg",s),children:[o.jsxs("div",{className:"flex items-center gap-6 px-8 h-[64px] shrink-0 bg-white",children:[o.jsx(Bt,{size:"md",imageUrl:e.avatarUrl,initials:e.avatarInitials}),o.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[o.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),l&&o.jsx("span",{className:"text-low-em shrink-0",children:l})]}),o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(nt,{size:18}),onClick:i})]}),o.jsx(pe,{}),o.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col",children:[e.fields&&e.fields.length>0&&o.jsxs("div",{className:"flex flex-col",children:[o.jsx("div",{className:"px-8 py-6 border-b border-surface-3",children:o.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:r})}),e.fields.map((c,u)=>o.jsxs(O.default.Fragment,{children:[o.jsx(xN,{field:c}),u<(e.fields?.length??0)-1&&o.jsx(pe,{})]},c.label)),o.jsx(pe,{})]}),o.jsxs("div",{className:"flex flex-col flex-1 bg-white",children:[o.jsx("div",{className:"px-8 py-6 border-b border-surface-3",children:o.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:n})}),t.length>0?o.jsx("div",{className:"flex flex-col divide-y divide-surface-3 overflow-y-auto",children:t.map(c=>o.jsx(mN,{order:c},c.id))}):o.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:o.jsx(ht,{flat:!0,description:a,className:"bg-transparent"})})]})]})]})},gN=600,vN=({conversations:e,searchPlaceholder:t,emptyListDescription:r,emptyConversationDescription:n="Selecciona una conversación",contactSectionLabel:a="Información de contacto",ordersSectionLabel:i="Pedidos",emptyOrdersDescription:s="Sin pedidos",inputPlaceholder:l="Escribe un mensaje...",inputValue:c,searchValue:u,onSearchChange:d,onSendClick:f,onInputChange:h,className:p})=>{const[g,x]=tl(),m=x<gN,[v,b]=P.useState("list"),[w,C]=P.useState(null),[y,j]=P.useState(!1),S=w?e.find(k=>k.id===w)??null:null,A=e.map(({id:k,name:E,timestamp:T,status:M,avatarUrl:R,avatarInitials:$})=>({id:k,name:E,timestamp:T,status:M,avatarUrl:R,avatarInitials:$})),_=k=>{C(k),b("conversation")},I=w?e.find(k=>k.id===w)??null:null;return m?o.jsxs("div",{ref:g,className:N.clsx("flex flex-col h-full",p),children:[v==="list"&&o.jsx(Zx,{items:A,activeId:w??void 0,searchPlaceholder:t,emptyState:r?o.jsx(ht,{flat:!0,className:"bg-transparent",description:r}):void 0,searchValue:u,onSearchChange:d,onItemClick:k=>_(k.id)}),v==="conversation"&&I&&o.jsx(Xx,{contact:I.contact,messages:I.messages,inputPlaceholder:l,inputValue:c,onBack:()=>{b("list"),C(null)},onMoreClick:()=>b("sidebar"),onSendClick:f,onInputChange:h}),v==="sidebar"&&I&&o.jsx(Qx,{contact:I.sidebarContact,orders:I.orders,contactSectionLabel:a,ordersSectionLabel:i,emptyOrdersDescription:s,onClose:()=>b("conversation")})]}):o.jsxs("div",{ref:g,className:N.clsx("flex h-full",p),children:[o.jsx("div",{className:"flex-1 min-w-0 border-r border-surface-3",children:o.jsx(Zx,{items:A,activeId:w??void 0,searchPlaceholder:t,emptyState:r?o.jsx(ht,{flat:!0,className:"bg-transparent",description:r}):void 0,searchValue:u,onSearchChange:d,onItemClick:k=>{C(k.id),j(!1)}})}),S?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:N.clsx(y?"flex-1":"flex-[2]","min-w-0"),children:o.jsx(Xx,{contact:S.contact,messages:S.messages,inputPlaceholder:l,inputValue:c,onBack:()=>{C(null),j(!1)},onMoreClick:()=>j(k=>!k),onSendClick:f,onInputChange:h})}),y&&o.jsx("div",{className:"flex-1 min-w-0 border-l border-surface-3",children:o.jsx(Qx,{contact:S.sidebarContact,orders:S.orders,contactSectionLabel:a,ordersSectionLabel:i,emptyOrdersDescription:s,onClose:()=>j(!1)})})]}):o.jsx("div",{className:"flex-[2] min-w-0 flex items-center justify-center bg-surface-bg",children:o.jsx(ht,{flat:!0,description:n,className:"bg-transparent"})})]})},yN={sm:{container:"px-4 py-3 text-xs font-medium leading-[18px]",iconSize:16,gapValue:"6px"},md:{container:"px-5 py-4 text-sm font-semibold leading-[22px]",iconSize:16,gapValue:"6px"}},bN={drag:"cursor-grabbing shadow-[0_8px_14px_-4px_rgba(0,0,0,0.2)]",hover:"opacity-90 hover:scale-[1.02] transition-transform",default:"border border-surface-4"},wN=(e,t)=>t==="disabled"?"bg-surface-3 border-none text-disabled":t==="hover"?e==="selected"?"bg-surface-2 border-surface-3 text-high-em":"bg-surface-2 border-surface-4 text-high-em":t==="focus"?e==="selected"?"bg-surface-2 border-2 border-surface-3 text-high-em":"bg-surface-2 border-2 border-surface-4 text-high-em":t==="drag"?e==="selected"?"bg-surface-2 border-surface-3 text-high-em":"bg-surface-2 border-surface-4 text-high-em":"",jN=({size:e="md",type:t="unselected",state:r="default",children:n,leftContent:a,rightContent:i,onClick:s,className:l,showLeftContent:c=!0,showRightContent:u=!0,showText:d=!0})=>{const f=A=>{if(!O.default.isValidElement(A))return A;const _=A,I=_.props.style||{},k={..._.props,style:{...I,width:"100%",height:"100%",display:"block"},size:void 0};return O.default.cloneElement(_,k)},h=!!s&&r!=="disabled",p=!!a&&c,g=!!i&&u,x=yN[e],m=bN[r],v=wN(t,r),b=te.twMerge("inline-flex items-center border border-solid transition-all duration-150 rounded-full font-family-inter",m,x.container,v,h&&"cursor-pointer hover:opacity-90 active:opacity-100",r==="disabled"&&"cursor-not-allowed",r==="drag"&&"cursor-grabbing",l),w="flex-shrink-0 inline-flex items-center justify-center",C=x.iconSize,y=x.gapValue,j=o.jsx("div",{className:w,style:{marginRight:y,width:`${C}px`,height:`${C}px`},children:p?f(a):null}),S=o.jsx("div",{className:w,style:{marginLeft:y,width:`${C}px`,height:`${C}px`},children:g?f(i):null});return o.jsxs("div",{className:b,role:h?"button":"status",onClick:h?s:void 0,tabIndex:h?0:void 0,children:[j,d&&o.jsx("span",{className:"shrink-0",children:n}),S]})},CN=["--black","--white","--black-uniform","--white-uniform","--surface-bg","--surface-1","--surface-2","--surface-3","--surface-4","--disabled","--placeholder","--low-em","--med-em","--high-em","--brand-primary-main","--brand-primary-main-special","--brand-primary-accent-special","--brand-primary-accent-3","--brand-secondary-main","--brand-secondary-accent-3","--warning-em","--warning-main","--warning-accent-3","--warning-accent-1","--warning-accent-0","--success-em","--success-main","--success-accent-3","--success-accent-2","--success-accent-1","--info-em","--info-main","--info-accent-3","--info-accent-2","--info-accent-1","--danger-em","--danger-main","--danger-accent-3","--danger-accent-2","--danger-accent-1"],SN=()=>{if(typeof document>"u")return[];const e=[],t=getComputedStyle(document.documentElement);return CN.forEach(r=>{const n=t.getPropertyValue(r).trim();n&&e.push({name:r,value:n.toUpperCase()})}),e},ON=({colors:e})=>{const[t,r]=P.useState(e||[]),[n,a]=P.useState(0);return P.useEffect(()=>{if(e){r(e);return}r(SN())},[e,n]),P.useEffect(()=>{if(e)return;const i=new MutationObserver(s=>{s.forEach(l=>{l.type==="attributes"&&l.attributeName==="class"&&a(c=>c+1)})});return i.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>i.disconnect()},[e]),o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:t.map(({name:i,value:s})=>o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"1rem",fontFamily:"monospace"},children:[o.jsx("div",{style:{width:"50px",height:"50px",backgroundColor:s,border:"1px solid #ccc",borderRadius:"4px"}}),o.jsxs("div",{children:[o.jsx("div",{style:{fontWeight:"bold"},children:i}),o.jsx("div",{children:s})]})]},i))})},NN=({disabled:e=!1,className:t,...r})=>o.jsxs("div",{className:te.twMerge(N.clsx("inline-flex flex-col items-center justify-center gap-[2px]","w-[17px] h-[80px] rounded-full border border-surface-3 bg-white","cursor-grab active:cursor-grabbing transition-opacity",e&&"opacity-50 cursor-not-allowed",t)),...r,children:[o.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"}),o.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"}),o.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"})]}),nm=({className:e,disabled:t=!1,onDrag:r,dragHandleProps:n,onDuplicate:a,onDelete:i,...s})=>{const[l,c]=P.useState(""),u=f=>{c(f),f==="duplicate"&&a?.(),f==="delete"&&i?.()},d=[...a?[{value:"duplicate",icon:o.jsx(Zs,{size:12})}]:[],...i?[{value:"delete",icon:o.jsx(Ys,{size:12})}]:[]];return o.jsx("div",{className:N.clsx("border-b border-surface-3 min-h-[28px]",e),...s,children:o.jsxs("div",{className:"flex justify-center",children:[(r||n)&&o.jsx("button",{type:"button",className:N.clsx("h-[28px] px-[9.2px]","inline-flex items-center justify-center","border-none bg-transparent rounded-none","transition-colors duration-200",t?"opacity-50 cursor-not-allowed pointer-events-none":"hover:bg-surface-2 cursor-grab"),onClick:r,disabled:t,...n,children:o.jsx(Gs,{size:12})}),d.length>0&&o.jsx(mr,{options:d,value:l,onChange:u,size:"xs",variant:"secondary",disabled:t,buttonClassName:"rounded-none"})]})})},PN={text_icon:{showLeadingIcon:!0,showLeadingAvatar:!1,showInput:!0,showTrailingChevron:!0,showTrailingAddon:!1},text_image:{showLeadingIcon:!1,showLeadingAvatar:!0,showInput:!0,showTrailingChevron:!0,showTrailingAddon:!1},only_icon:{showLeadingIcon:!1,showLeadingAvatar:!1,showInput:!1,showTrailingChevron:!0,showTrailingAddon:!1},text_icon_text:{showLeadingIcon:!0,showLeadingAvatar:!1,showInput:!0,showTrailingChevron:!1,showTrailingAddon:!0}},AN={default:{fill:{wrapper:"border-none bg-gray-100 focus-within:ring-gray-500 text-dark-300",hint:"text-primary-300",input:"text-primary-300 placeholder-gray-500"},outlined:{wrapper:"border-gray-500 bg-white focus-within:ring-gray-600 text-dark-300",hint:"text-gray-600",input:"text-dark-300 placeholder-gray-500"}},danger:{fill:{wrapper:"border-danger-200 bg-danger-50 focus-within:ring-danger-200 text-danger-600",hint:"text-danger-600",input:"text-danger-600 placeholder-danger-400"},outlined:{wrapper:"border-danger-300 bg-white text-danger-600 focus-within:ring-danger-200",hint:"text-danger-600",input:"text-danger-600 placeholder-danger-400"}},success:{fill:{wrapper:"border-success-300 bg-success-50 focus-within:ring-success-200 text-success-600",hint:"text-success-600",input:"text-success-900 placeholder-success-400"},outlined:{wrapper:"border-success-300 bg-white text-success-600 focus-within:ring-success-200",hint:"text-success-600",input:"text-success-900 placeholder-success-400"}}},_N="opacity-50 bg-gray-100 cursor-not-allowed",kN={sm:{wrapper:"h-[32px] text-[10px] px-4",icon:14,avatar:"w-[12px] h-[12px]"},md:{wrapper:"h-[38px] text-[14px] px-6",icon:16,avatar:"w-[16px] h-[16px]"},lg:{wrapper:"h-[48px] text-[16px] px-8",icon:20,avatar:"w-[20px] h-[20px]"}},TN=({layout:e="text_icon",hierarchy:t="fill",variant:r="default",size:n="md",label:a,hint:i,disabled:s,leadingIcon:l,leadingAvatar:c,trailingAddon:u,options:d,value:f,onChange:h,placeholder:p,className:g,placeholderColor:x,inputTextColor:m,backgroundColor:v,chevronColor:b="currentColor",optionActiveColor:w="bg-primary-500",optionActiveTextColor:C="text-white",optionTextColor:y="text-gray-900",borderRadius:j="rounded-lg"})=>{const[S,A]=P.useState(""),_=AN[r][t],I=kN[n],k=PN[e],E=S===""?d:d.filter(R=>R.label.toLowerCase().includes(S.toLowerCase())),T=te.twMerge(N.clsx("w-full flex-1 bg-transparent focus:outline-none",_.input,x,m)),M=te.twMerge(N.clsx("relative flex items-center gap-2 border transition-colors duration-200 focus-within:ring-2",j,I.wrapper,_.wrapper,s&&_N,v));return o.jsxs("div",{className:N.clsx("flex flex-col gap-1.5",g),children:[a&&o.jsx("label",{className:"font-medium text-sm text-gray-800",children:a}),o.jsx(xe.Combobox,{value:f,onChange:h,disabled:s,children:o.jsxs("div",{className:"relative",children:[o.jsxs("div",{className:M,children:[k.showLeadingIcon&&l&&o.jsx("div",{children:O.default.cloneElement(l,{size:I.icon,color:"currentColor"})}),k.showLeadingAvatar&&c&&o.jsx("img",{src:c,alt:"avatar",className:N.clsx("rounded-full",I.avatar)}),k.showInput&&o.jsx(xe.Combobox.Input,{className:T,placeholder:p,onChange:R=>A(R.target.value),displayValue:R=>R?.label}),k.showTrailingChevron&&!u&&o.jsx(xe.Combobox.Button,{className:N.clsx("flex items-center",{"w-full h-full justify-center":e==="only_icon"}),children:o.jsx(B.ArrowDown2,{size:I.icon,color:b})}),k.showTrailingAddon&&u&&o.jsx("div",{className:"flex-shrink-0",children:u})]}),o.jsx(xe.Combobox.Options,{className:"absolute z-10 mt-1 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm",children:E.length===0&&S!==""?o.jsx("div",{className:"relative cursor-default select-none px-4 py-2 text-gray-700",children:"Nothing found."}):E.map(R=>o.jsx(xe.Combobox.Option,{value:R,className:({active:$})=>te.twMerge(N.clsx("relative cursor-default select-none py-2 pl-4 pr-4",$?`${w} ${C}`:y)),children:R.label},R.id))})]})}),i&&o.jsxs("div",{className:N.clsx("flex items-center gap-1.5 text-sm",_.hint),children:[o.jsx(B.InfoCircle,{size:16,color:"currentColor"}),o.jsx("span",{children:i})]})]})},EN=({items:e,trigger:t,className:r,align:n="right",offset:a=8})=>{const[i,s]=P.useState(!1),l=P.useRef(null),c=P.useRef(null);P.useEffect(()=>{const d=f=>{l.current&&!l.current.contains(f.target)&&c.current&&!c.current.contains(f.target)&&s(!1)};if(i)return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[i]);const u=d=>{d.disabled||(d.onClick(),s(!1))};return o.jsxs("div",{className:N.clsx("relative inline-block",r),children:[o.jsx("div",{ref:c,onClick:()=>s(!i),className:"cursor-pointer",children:t}),i&&o.jsx("div",{ref:l,className:N.clsx("absolute z-50 mt-2 min-w-[200px] rounded-lg bg-white shadow-lg border border-gray-200",n==="right"?"right-0":"left-0"),style:{top:`calc(100% + ${a}px)`},children:o.jsx("div",{className:"py-2",children:e.map((d,f)=>o.jsxs("button",{onClick:()=>u(d),disabled:d.disabled,className:N.clsx("w-full px-4 py-2.5 text-left text-sm flex items-center gap-3 transition-colors relative","hover:bg-gray-50",d.destructive?"text-[var(--danger-main)]":"text-[var(--high-em)]",d.disabled&&"opacity-50 cursor-not-allowed",f<e.length-1&&"border-b border-gray-100",f===0&&"before:absolute before:inset-x-0 before:-top-2 before:h-2 before:bg-transparent hover:before:bg-gray-50",f===e.length-1&&"after:absolute after:inset-x-0 after:-bottom-2 after:h-2 after:bg-transparent hover:after:bg-gray-50"),children:[d.icon&&o.jsx("span",{className:"flex-shrink-0 flex items-center justify-center relative z-10",children:d.icon}),o.jsx("span",{className:"flex-1 font-normal relative z-10",children:d.label})]},d.id))})})]})},am=O.default.memo(({children:e,tooltipContent:t,icon:r,iconColor:n="text-disabled",leadingIcon:a,leadingIconColor:i="text-disabled",iconSize:s,className:l,labelClassName:c,fontSize:u="sm",fontWeight:d="semibold",textColor:f="",onClick:h,state:p="default"})=>{const g={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},x={xs:12,sm:16,base:18,lg:20,xl:24},m={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},v=g[u]||void 0,b=g[u]?void 0:u,w=s??x[u]??20,C=!!h&&p!=="disabled",y=te.twMerge(N.clsx("flex border border-surface-3 w-full items-center px-6 h-14 text-left text-sm font-medium transition-colors rounded-xl",p==="disabled"&&"bg-surface-3 pointer-events-none",p==="hover"&&"bg-surface-1",p==="active"&&"bg-surface-2",p==="drag"&&"cursor-grabbing shadow-[0_8px_14px_-4px_rgba(0,0,0,0.2)] bg-surface-2",C&&p==="default"&&"cursor-pointer hover:bg-surface-1 active:bg-surface-2",p==="disabled"&&"cursor-not-allowed",l)),j=te.twMerge(N.clsx("flex-1 ml-6",v,m[d],p==="disabled"?"text-disabled":f||"text-med-em",c));return o.jsxs("div",{className:y,onClick:C?h:void 0,suppressHydrationWarning:!0,children:[a&&o.jsx("div",{className:"flex items-center shrink-0",children:o.jsx(ie,{size:w,className:i,children:a})}),o.jsx("span",{className:j,style:b?{fontSize:b}:void 0,children:e}),r&&t?o.jsxs(jt.Root,{children:[o.jsx(jt.Trigger,{asChild:!0,children:o.jsx("button",{className:N.clsx("flex items-center focus:outline-none focus-visible:ring-2 rounded-full shrink-0",n),onClick:S=>S.stopPropagation(),children:o.jsx(ie,{size:w,className:n,children:r})})}),o.jsx(jt.Portal,{children:o.jsxs(jt.Content,{sideOffset:5,className:N.clsx("z-50 max-w-xs overflow-hidden rounded-xl bg-surface-bg p-3 text-xs font-medium text-med-em shadow-lg","data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade","data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade"),children:[t,o.jsx(jt.Arrow,{className:"fill-white"})]})})]}):r?o.jsx("div",{className:N.clsx("flex items-center shrink-0",n),children:o.jsx(ie,{size:w,className:n,children:r})}):null]})});am.displayName="DragAndDropListItem";const IN={default:{...qe.default,wrapper:`${qe.default.wrapper} hover:cursor-pointer`,optionsPanel:"border-surface-4",label:"text-med-em",selectedValue:"text-med-em"},danger:{...qe.danger,wrapper:`${qe.danger.wrapper} hover:cursor-pointer`,optionsPanel:"border-danger-accent-2",label:"text-high-em",selectedValue:"text-danger-em"},outlined:{...qe.outlined,wrapper:`${qe.outlined.wrapper} hover:cursor-pointer`,optionsPanel:"border-surface-4",label:"text-med-em",selectedValue:"text-med-em"}},Pn={wrapper:"bg-surface-3 text-disabled pointer-events-none border-transparent",label:"text-disabled",selectedValue:"text-disabled",placeholder:"text-disabled",hint:"text-disabled"},MN={sm:{...Ft.sm,rounded:"rounded-md",selectText:"text-xs"},md:{...Ft.md,selectText:"text-sm font-medium"}},Te=({variant:e="default",size:t="md",menuSize:r,label:n,hint:a,items:i,disabled:s,placeholder:l,className:c,value:u,onChange:d,id:f,customHeight:h,customRadius:p,customPlaceholderColor:g,customBackgroundColor:x,leadingIcon:m,showLeadingIcon:v=!0,hintIconVariant:b,menuMinHeight:w,searchable:C=!1,searchPlaceholder:y})=>{const j=IN[e],S=MN[t],A=r||t,_=P.useRef(null),I=P.useRef(null),[k,E]=P.useState(!1),[T,M]=P.useState("");P.useEffect(()=>{k||M("")},[k]);const R=C&&T.trim()?i.filter(J=>String(J.title??"").toLowerCase().includes(T.trim().toLowerCase())):i,[$,L]=P.useState(null),[q,U]=P.useState(!1),z=i.find(J=>J.id===u);P.useEffect(()=>{U(!0)},[]);const F=O.default.useCallback(()=>{if(_.current&&k){const J=_.current.getBoundingClientRect(),he=window.innerHeight-J.bottom,Q=J.top,me=he<200&&Q>he;L({top:me?J.top-8:J.bottom+8,left:J.left,width:J.width,openUpwards:me})}},[k]);P.useEffect(()=>{if(k){F();const J=D=>{I.current?.contains(D.target)||E(!1)};return window.addEventListener("scroll",J,!0),window.addEventListener("resize",F),()=>{window.removeEventListener("scroll",J,!0),window.removeEventListener("resize",F)}}},[k,F]),P.useEffect(()=>{if(!k)return;const J=D=>{_.current&&!_.current.contains(D.target)&&I.current&&!I.current.contains(D.target)&&E(!1)};return document.addEventListener("mousedown",J),()=>document.removeEventListener("mousedown",J)},[k]);const H=()=>{s||E(!k)},W=J=>{d(J),E(!1)},Z=h?{height:h}:void 0,re=()=>{if(p)return{borderRadius:p}},X=()=>{if(p)return{borderRadius:p}},ne=g?.startsWith("var(")?{color:g}:void 0,ce=g&&!g.startsWith("var(")?g:void 0,G=x&&!x.startsWith("#")&&!x.startsWith("rgb")?x:void 0,ee=x&&(x.startsWith("#")||x.startsWith("rgb"))?{backgroundColor:x}:void 0;return o.jsxs("div",{className:N.clsx("w-full flex flex-col gap-1.5",c),children:[n&&o.jsx("label",{htmlFor:f,className:N.clsx("font-semibold truncate",S.labelFontSize,j.label,s&&Pn.label),children:n}),o.jsxs("div",{className:"relative",children:[o.jsxs("button",{ref:_,id:f,onClick:H,disabled:s,className:N.clsx("relative w-full cursor-default border text-left transition-colors duration-200 focus:outline-none focus-visible:ring-2","flex items-center",!h&&S.height,!x&&j.wrapper,G,s&&Pn.wrapper,!p&&S.rounded),style:{...Z,...re(),...ee},children:[v&&o.jsx("span",{className:N.clsx("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5",s?"text-disabled":z?j.selectedValue:j.placeholder),children:m?O.default.isValidElement(m)?O.default.cloneElement(m,{color:"currentColor"}):m:o.jsx(B.Category,{size:S.iconSize,color:"currentColor"})}),o.jsx("span",{className:N.clsx("flex-1 min-w-0 truncate",v?"pl-[36px]":t==="sm"?"pl-2.5":"pl-3.5"),children:z?o.jsx("span",{className:N.clsx(S.selectText,s?Pn.selectedValue:j.selectedValue),children:z.title}):o.jsx("span",{className:N.clsx(S.selectText,s?Pn.placeholder:j.placeholder,ce),style:ne,children:l})}),o.jsx("span",{className:N.clsx("pointer-events-none flex items-center shrink-0",t==="sm"?"pr-1.5 pl-1.5":"pr-3.5"),children:k?o.jsx(B.ArrowUp2,{size:S.iconSize,color:"currentColor"}):o.jsx(B.ArrowDown2,{size:S.iconSize,color:"currentColor"})})]}),q&&k&&$&&Ca.createPortal(o.jsx("div",{ref:I,className:"fixed z-50",style:$.openUpwards?{bottom:`${window.innerHeight-$.top}px`,left:`${$.left}px`,width:`${$.width}px`}:{top:`${$.top}px`,left:`${$.left}px`,width:`${$.width}px`},children:C?o.jsxs("div",{className:N.clsx("flex w-full flex-col overflow-hidden border shadow-md bg-surface-bg",!p&&"rounded-xl",j.optionsPanel),style:{...X(),maxHeight:$.openUpwards?`min(300px, ${$.top-20}px)`:`min(300px, calc(100vh - ${$.top}px - 20px))`},children:[o.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-surface-3 px-3 py-2",children:[o.jsx(B.SearchNormal1,{size:16,color:"currentColor",className:"shrink-0 text-low-em"}),o.jsx("input",{autoFocus:!0,value:T,onChange:J=>M(J.target.value),placeholder:y||"Buscar…",className:"w-full bg-transparent text-sm text-high-em placeholder:text-placeholder focus:outline-none"})]}),R.length===0?o.jsx("div",{className:"px-4 py-3 text-sm text-low-em",children:"Sin resultados"}):o.jsx(Wt,{items:R.map(({id:J,...D})=>({id:J,...D})),size:A,floating:!1,onSelect:W,selectedIds:u?[u]:[],className:"w-full overflow-y-auto !rounded-none !border-0 !bg-transparent !shadow-none"})]}):o.jsx(Wt,{items:i.map(({id:J,...D})=>({id:J,...D})),size:A,floating:!1,onSelect:W,selectedIds:u?[u]:[],className:N.clsx("w-full overflow-y-auto shadow-md border",!p&&"rounded-xl",j.optionsPanel,"bg-surface-bg"),style:{...X(),maxHeight:$.openUpwards?`min(300px, ${$.top-20}px)`:`min(300px, calc(100vh - ${$.top}px - 20px))`,minHeight:w}})}),document.body)]}),a&&o.jsx(ft,{icon:o.jsx(B.InfoCircle,{variant:b}),label:a,iconSize:S.hintIconSize,gap:1,iconColorClass:N.clsx(j.hint,s&&Pn.hint),labelColorClass:N.clsx(j.hint,s&&Pn.hint),className:N.clsx(S.hintFontSize,"font-semibold")})]})};function $N({children:e,...t}){return o.jsx(xe.Menu,{as:"div",className:"relative inline-block text-left",...t,children:e})}const _2=O.default.memo(({isOver:e=!1,activeHeight:t="56px",inactiveHeight:r="0px",transitionDuration:n=150,transitionTimingFunction:a="ease-out",className:i,style:s,dropRef:l,id:c})=>o.jsx("div",{ref:l,id:c,className:i,style:{height:e?t:r,transition:`height ${n}ms ${a}`,overflow:"hidden",...s}}));_2.displayName="DropZone";const RN={backgroundImage:"repeating-linear-gradient(45deg, var(--surface-3) 0, var(--surface-3) 8px, transparent 8px, transparent 16px)"},ci=O.default.memo(({children:e,className:t,style:r})=>o.jsx("div",{className:N.clsx("flex min-h-[44px] w-full items-center justify-center rounded-xl border border-surface-3 px-3 py-2 text-xs font-medium text-low-em",t),style:{...RN,...r},children:e}));ci.displayName="DropPlaceholder";class LN extends P.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){const{componentName:n,onError:a}=this.props;console.error(`Error in ${n||"component"}:`,t,r),a&&a(t,r)}resetError=()=>{this.setState({hasError:!1,error:null})};render(){const{hasError:t,error:r}=this.state,{children:n,fallback:a,defaultTitle:i="Something went wrong",defaultMessage:s="An error occurred while rendering this component.",retryLabel:l="Try again"}=this.props;return t?a?O.default.isValidElement(a)?O.default.cloneElement(a,{error:r,onRetry:this.resetError}):a:o.jsx("div",{className:"flex items-center justify-center h-full p-8",children:o.jsxs("div",{className:"text-center flex flex-col gap-6 items-center",children:[o.jsx("h3",{className:"text-lg font-semibold text-danger-main",children:i}),o.jsx("p",{className:"text-sm text-med-em",children:s}),o.jsx(K,{onClick:this.resetError,size:"sm",variant:"secondary",hierarchy:"primary",children:l})]})}):n}}const k2=O.default.memo(({icon:e=o.jsx(ie,{className:"text-danger-main",size:"2xl",children:o.jsx(B.Danger,{})}),title:t="Something went wrong",message:r,error:n,onRetry:a,retryLabel:i="Retry",showDetailsInProduction:s=!1,className:l,centered:c=!0,maxWidth:u="max-w-sm"})=>{const d=s||process.env.NODE_ENV==="development";return o.jsx(hm,{children:o.jsx("div",{className:N.clsx("flex flex-col p-8",c&&"items-center justify-center h-full",l),children:o.jsxs("div",{className:N.clsx("text-center flex justify-center items-center flex-col gap-6",u),children:[typeof e=="string"?o.jsx("div",{className:"text-5xl",children:e}):o.jsx("div",{className:"flex justify-center",children:e}),o.jsx("h3",{className:"text-lg font-semibold text-danger-main",children:t}),r&&o.jsx("p",{className:"text-sm text-med-em mb-4",children:r}),n&&d&&o.jsxs("details",{className:"text-left",children:[o.jsx("summary",{className:"text-xs text-med-em cursor-pointer",children:"Technical details"}),o.jsxs("pre",{className:"text-xs text-danger-main p-2 rounded overflow-auto max-h-32",children:[n.message,n.stack&&`
|
|
11
|
+
M ${c} 0
|
|
12
|
+
Q ${c} 4, ${c-4} 4
|
|
13
|
+
L ${u+4} 4
|
|
14
|
+
Q ${u} 4, ${u} 8
|
|
15
|
+
L ${u} 40
|
|
16
|
+
Q ${u} 44, ${u+4} 44
|
|
17
|
+
L ${c-4} 44
|
|
18
|
+
Q ${c} 44, ${c} 48
|
|
19
|
+
`;return o.jsxs("div",{className:N.clsx("relative h-full cursor-col-resize",r),style:{width:9},children:[o.jsx("div",{className:"absolute top-0",style:{[d]:0,width:1,height:`calc(50% - ${48/2}px)`,backgroundColor:"var(--surface-3)"}}),o.jsx("div",{className:"absolute bottom-0",style:{[d]:0,width:1,height:`calc(50% - ${48/2}px)`,backgroundColor:"var(--surface-3)"}}),o.jsxs("div",{className:"absolute top-1/2 left-0 -translate-y-1/2",style:{width:9,height:48},children:[o.jsx("svg",{width:9,height:48,viewBox:"0 0 9 48",fill:"none",className:"absolute inset-0",children:o.jsx("path",{d:f,fill:t,stroke:"var(--surface-3)",strokeWidth:"1"})}),o.jsxs("div",{className:"absolute left-1/2 top-1/2 flex flex-col gap-[2px] items-center",style:{transform:"translate(-50%, -50%)"},children:[o.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"}),o.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"}),o.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"})]})]})]})},Uj=O.default.memo(({id:e,side:t,children:r,resizable:n=!0,panelBg:a="var(--surface-1)",className:i})=>{const{panels:s,onResizeStart:l,onResize:c,onResizeEnd:u,onCloseZoneChange:d,getPanelState:f,minCentralWidth:h,containerRef:p}=ZO(),g=f(e),x=P.useRef(!1),m=P.useRef(!1),v=P.useRef(null),b=P.useRef(!1),w=P.useRef(0),C=P.useRef(!1),y=P.useRef({side:t,oppositeSideWidth:0,minCentralWidth:h,externalPanelsWidth:0,internalPanelsWidth:0,panelState:g}),S=ko(s[t==="left"?"right":"left"]),A=s[t],_=A.findIndex(D=>D.id===e),I=A.filter((D,B)=>D.open?t==="right"?B>_:B<_:!1).reduce((D,B)=>D+B.width,0),k=A.filter((D,B)=>!D.open||D.id===e?!1:t==="right"?B<_:B>_).reduce((D,B)=>D+B.width,0);y.current={side:t,oppositeSideWidth:S,minCentralWidth:h,externalPanelsWidth:I,internalPanelsWidth:k,panelState:g};const E=P.useRef(c),T=P.useRef(u),M=P.useRef(d);E.current=c,T.current=u,M.current=d;const R=P.useCallback(D=>{x.current&&(m.current=!0,!v.current&&(v.current=requestAnimationFrame(()=>{v.current=null;const B=p.current;if(!B)return;const W=B.getBoundingClientRect(),G=W.width,Q=D.clientX-W.left,{side:ne,oppositeSideWidth:X,minCentralWidth:re,externalPanelsWidth:ce,internalPanelsWidth:K}=y.current,J=qj(ne,Q,G,X,re,ce,K),z=J<w.current&&YO(J);z!==b.current&&(b.current=z,M.current(e,z)),E.current(e,J)})))},[e,p]),$=P.useCallback(()=>{if(!x.current)return;x.current=!1,document.body.style.userSelect="",document.body.style.cursor="";const D=m.current&&b.current,{panelState:B}=y.current;!D&&B&&B.width<Vx(B.width)&&E.current(e,Vx(B.width)),m.current=!1,b.current=!1,T.current(e,D),document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",$)},[e,R]),L=P.useCallback(()=>{x.current=!0,document.body.style.userSelect="none",document.body.style.cursor="col-resize";const{panelState:D}=y.current;w.current=D?.width??0,l(e),document.addEventListener("mousemove",R),document.addEventListener("mouseup",$)},[e,R,$,l]);if(P.useEffect(()=>()=>{v.current&&cancelAnimationFrame(v.current),document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",$)},[R,$]),P.useEffect(()=>{if(g?.open&&!g?.exiting){const D=setTimeout(()=>{C.current=!0},150);return()=>clearTimeout(D)}else g?.open||(C.current=!1)},[g?.open,g?.exiting]),!g||!g.open&&!g.exiting)return null;const q=t==="left"?"right":"left",U=()=>g.exiting?t==="left"?"animate-panel-exit":"animate-panel-exit-right":C.current?"":t==="left"?"animate-panel-enter":"animate-panel-enter-right";return o.jsxs("div",{className:N.clsx("h-full relative flex-shrink-0","transition-[width] duration-100 ease-out",g.isResizing&&"transition-none",i),style:{width:`${g.width}%`},"data-panel":e,"data-panel-side":t,"data-in-close-zone":g.inCloseZone,"data-exiting":g.exiting,children:[o.jsx("div",{className:N.clsx("absolute inset-0 overflow-hidden","transition-opacity duration-100",U(),g.inCloseZone?"opacity-50":"opacity-100"),style:{backgroundColor:a},children:r}),n&&!g.exiting&&o.jsx("div",{className:N.clsx("absolute top-0 z-50",q==="right"?"right-0 translate-x-full":"left-0 -translate-x-full"),onMouseDown:L,children:o.jsx(Vj,{side:q,fillColor:a})}),!n&&o.jsx("div",{className:N.clsx("absolute top-0 bottom-0 w-px bg-surface-3",q==="right"?"right-0":"left-0")})]})});Uj.displayName="Panel";const Kj=O.default.memo(({children:e,className:t})=>o.jsx("div",{className:N.clsx("flex-1 min-w-0 h-full overflow-hidden relative","transition-all duration-100 ease-out",t),"data-panel-main":!0,children:e}));Kj.displayName="PanelMain";function Ux(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.id=="string"&&typeof t.open=="boolean"&&typeof t.width=="number"}function QO(e){if(!e||typeof e!="object")return!1;const t=e;return Array.isArray(t.left)&&Array.isArray(t.right)&&t.left.every(Ux)&&t.right.every(Ux)}function JO(e){const{config:t,persist:r=!1,persistKey:n="panel-state"}=e,a=P.useMemo(()=>{const m=new Map;return t.forEach(v=>m.set(v.id,v)),m},[t]),[i,s]=P.useState(()=>Po(t,1920)),[l,c]=P.useState(!1);P.useEffect(()=>{if(r&&typeof window<"u")try{const m=localStorage.getItem(n);if(m){const v=JSON.parse(m);if(QO(v)){s(v),c(!0);return}}}catch{}typeof window<"u"&&s(Po(t,window.innerWidth)),c(!0)},[r,n]),P.useEffect(()=>{if(l&&r&&typeof window<"u")try{localStorage.setItem(n,JSON.stringify(i))}catch{}},[i,r,n,l]);const u=P.useCallback(m=>{s(v=>{const b=Ut(v,m);if(!b)return v;const{side:w,panel:C}=b;if(C.open)return{...v,[w]:v[w].map(L=>L.id===m?{...L,open:!1}:L)};const y=w==="left"?"right":"left",j=a.get(m),S=typeof window<"u"?window.innerWidth:1920,A=j?_o(j.defaultWidth,S):20,_=v[y].filter(L=>L.open).reduce((L,q)=>L+q.width,0),I=v[w].filter(L=>L.open&&L.id!==m),k=I.reduce((L,q)=>L+q.width,0),E=100-_-Re.minCentralPercent;if(k+A<=E)return{...v,[w]:v[w].map(L=>L.id===m?{...L,open:!0,width:A}:L)};const T=I.length*Re.snapMinWidth,M=E-T,R=Math.min(A,Math.max(Re.snapMinWidth,M)),$=E-R;if(k>0&&$<k){const L=$/k;return{...v,[w]:v[w].map(q=>{if(q.id===m)return{...q,open:!0,width:R};if(q.open){const U=Math.max(Re.snapMinWidth,q.width*L);return{...q,width:U}}return q})}}return{...v,[w]:v[w].map(L=>L.id===m?{...L,open:!0,width:R}:L)}})},[a]),d=P.useCallback((m,v)=>{s(b=>{const w=Ut(b,m);if(!w)return b;const{side:C,panel:y}=w,S=b[C==="left"?"right":"left"].filter(T=>T.open).reduce((T,M)=>T+M.width,0),A=b[C].filter(T=>T.open&&T.id!==m),_=A.reduce((T,M)=>T+M.width,0),I=100-S-Re.minCentralPercent,k=v+_;if(k<=I)return{...b,[C]:b[C].map(T=>T.id===m?{...T,width:v}:T)};if(v>y.width&&_>0){const T=k-I,M=Math.max(A.length*Re.snapMinWidth,_-T),R=I-M,$=M/_;return{...b,[C]:b[C].map(L=>{if(L.id===m)return{...L,width:R};if(L.open){const q=Math.max(Re.snapMinWidth,L.width*$);return{...L,width:q}}return L})}}return{...b,[C]:b[C].map(T=>T.id===m?{...T,width:Math.min(v,I-_)}:T)}})},[]),f=P.useCallback(m=>{s(v=>{const b=Ut(v,m);if(!b||b.panel.open)return v;const{side:w}=b,C=w==="left"?"right":"left",y=a.get(m),j=typeof window<"u"?window.innerWidth:1920,S=y?_o(y.defaultWidth,j):20,A=v[C].filter($=>$.open).reduce(($,L)=>$+L.width,0),_=v[w].filter($=>$.open&&$.id!==m),I=_.reduce(($,L)=>$+L.width,0),k=100-A-Re.minCentralPercent;if(I+S<=k)return{...v,[w]:v[w].map($=>$.id===m?{...$,open:!0,width:S}:$)};const E=_.length*Re.snapMinWidth,T=k-E,M=Math.min(S,Math.max(Re.snapMinWidth,T)),R=k-M;if(I>0&&R<I){const $=R/I;return{...v,[w]:v[w].map(L=>{if(L.id===m)return{...L,open:!0,width:M};if(L.open){const q=Math.max(Re.snapMinWidth,L.width*$);return{...L,width:q}}return L})}}return{...v,[w]:v[w].map($=>$.id===m?{...$,open:!0,width:M}:$)}})},[a]),h=P.useCallback(m=>{s(v=>{const b=Ut(v,m);if(!b||!b.panel.open)return v;const{side:w}=b;return{...v,[w]:v[w].map(C=>C.id===m?{...C,open:!1,exiting:!1,inCloseZone:!1}:C)}})},[]),p=P.useCallback((m,v)=>{s(b=>{const w=Ut(b,m);if(!w)return b;const{side:C}=w;return{...b,[C]:b[C].map(y=>y.id===m?{...y,inCloseZone:v}:y)}})},[]),g=P.useCallback(m=>{s(v=>{const b=Ut(v,m);if(!b)return v;const{side:w}=b;return{...v,[w]:v[w].map(C=>C.id===m?{...C,exiting:!0,inCloseZone:!1}:C)}}),setTimeout(()=>{s(v=>{const b=Ut(v,m);if(!b)return v;const{side:w}=b;return{...v,[w]:v[w].map(C=>C.id===m?{...C,open:!1,exiting:!1,width:Re.snapMinWidth}:C)}})},Re.exitAnimationDuration)},[]),x=P.useCallback(()=>{const m=typeof window<"u"?window.innerWidth:1920;s(Po(t,m))},[t]);return P.useEffect(()=>{const m=[...i.left.filter(b=>b.exiting),...i.right.filter(b=>b.exiting)];if(m.length===0)return;const v=m.map(b=>setTimeout(()=>{s(w=>{const C=Ut(w,b.id);if(!C)return w;const{side:y}=C;return{...w,[y]:w[y].map(j=>j.id===b.id&&j.exiting?{...j,open:!1,exiting:!1}:j)}})},Re.exitAnimationDuration));return()=>{v.forEach(b=>clearTimeout(b))}},[i]),{panels:i,togglePanel:u,resizePanel:d,openPanel:f,closePanel:h,resetPanels:x,handleCloseZoneChange:p,handlePanelClose:g}}const Gj=O.default.memo(({mainContent:e,sidePanel:t,isPanelOpen:r,onPanelExited:n,panelWidth:a=400,panelPosition:i="right",animationDuration:s=75,className:l,mainContentBg:c="bg-white",sidePanelBg:u,resizable:d=!0,minWidth:f=280,maxWidth:h=800,handleFillColor:p="var(--surface-1)",onResize:g})=>{const[x,m]=P.useState(!1),[v,b]=P.useState(r),[w,C]=P.useState(a),[y,j]=P.useState(!1),S=P.useRef(!1),A=P.useRef({clientX:0,width:0}),_=P.useRef(null),[I,k]=P.useState(0);P.useEffect(()=>{const B=_.current;if(!B)return;const W=()=>{const Q=B.offsetHeight;Q>0&&k(Q)};W();const G=new ResizeObserver(W);return G.observe(B),()=>G.disconnect()},[v]),P.useEffect(()=>{if(r)b(!0),m(!1);else if(v){m(!0);const B=setTimeout(()=>{b(!1),m(!1),n?.()},s);return()=>clearTimeout(B)}},[r,s,v,n]);const E=P.useCallback(B=>{if(!S.current)return;const W=B.clientX-A.current.clientX,G=i==="right"?A.current.width-W:A.current.width+W,Q=Math.max(f,Math.min(h,G));C(Q),g?.(Q)},[i,f,h,g]),T=P.useCallback(()=>{S.current&&(S.current=!1,j(!1),document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",T))},[E]),M=P.useCallback(B=>{B.preventDefault(),A.current={clientX:B.clientX,width:w},S.current=!0,j(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize",document.addEventListener("mousemove",E),document.addEventListener("mouseup",T)},[w,E,T]);P.useEffect(()=>()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",T)},[E,T]);const R=r?`calc(100% - ${w}px)`:"100%",$=i==="right"?"animate-slideInRight":"animate-slideInLeft",L=i==="right"?"animate-slideOutRight":"animate-slideOutLeft",q=i==="right"?"left":"right",U=y?"0ms":`${s}ms`,D=()=>o.jsx("div",{ref:_,className:"relative h-full transition-all ease-out",style:{width:r?`${w}px`:"0px",opacity:r?1:0,transitionDuration:U},children:v&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:N.clsx("h-full overflow-hidden",u,x?L:$),children:t}),d&&!x&&o.jsx("div",{className:N.clsx("absolute top-0 z-50",q==="right"?"right-0 translate-x-full":"left-0 -translate-x-full"),onMouseDown:M,children:o.jsx(Vj,{side:q,height:I,fillColor:p})})]})});return o.jsx("div",{className:N.clsx("w-full flex flex-col",l),style:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:o.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[i==="left"&&D(),o.jsx("div",{className:N.clsx("relative flex flex-col ease-out overflow-hidden",c),style:{width:R,transition:"width",transitionDuration:U},children:o.jsx("div",{className:"relative flex-1 overflow-hidden",children:e})}),i==="right"&&D()]})})});Gj.displayName="SplitPanelLayout";const er=e=>e!==void 0&&{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",7:"gap-7",8:"gap-8"}[e]||"gap-4",Zj=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("mask",{id:"mask0_1135_15829",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:o.jsx("path",{d:"M20 0H0V20H20V0Z",fill:"white"})}),o.jsxs("g",{mask:"url(#mask0_1135_15829)",children:[o.jsx("path",{d:"M9.99297 18.9587C5.0513 18.9587 1.04297 14.942 1.04297 10.0003C1.04297 5.05866 5.05964 1.04199 10.0013 1.04199C14.943 1.04199 18.9596 5.05866 18.9596 10.0003C18.9596 10.5003 18.918 11.0087 18.8346 11.5003C18.7763 11.842 18.4596 12.0753 18.1096 12.0087C17.768 11.9503 17.543 11.6253 17.6013 11.2837C17.6763 10.8587 17.7096 10.4253 17.7096 10.0003C17.7096 5.75033 14.2513 2.29199 10.0013 2.29199C5.7513 2.29199 2.29297 5.75033 2.29297 10.0003C2.29297 14.2503 5.7513 17.7087 10.0013 17.7087C10.6013 17.7087 11.193 17.642 11.768 17.5003C12.093 17.4253 12.443 17.6253 12.518 17.967C12.6013 18.3003 12.393 18.642 12.0513 18.717C11.3846 18.8753 10.693 18.9587 9.99297 18.9587Z",fill:"currentColor"}),o.jsx("path",{d:"M13.3346 10.625H6.66797C6.3263 10.625 6.04297 10.3417 6.04297 10C6.04297 9.65833 6.3263 9.375 6.66797 9.375H13.3346C13.6763 9.375 13.9596 9.65833 13.9596 10C13.9596 10.3417 13.6763 10.625 13.3346 10.625Z",fill:"currentColor"}),o.jsx("path",{d:"M10 13.9587C9.65833 13.9587 9.375 13.6753 9.375 13.3337V6.66699C9.375 6.32533 9.65833 6.04199 10 6.04199C10.3417 6.04199 10.625 6.32533 10.625 6.66699V13.3337C10.625 13.6753 10.3417 13.9587 10 13.9587Z",fill:"currentColor"}),o.jsx("path",{d:"M15.7085 18.7834C15.3585 18.7834 15.0669 18.5417 15.0002 18.2084L14.7752 17.2251C14.6669 16.7417 14.2835 16.3667 13.8085 16.2584L12.8085 16.0251C12.4752 15.9501 12.2419 15.6584 12.2502 15.3167C12.2585 14.9751 12.4919 14.6751 12.8252 14.6084L13.8085 14.3834C14.2835 14.2751 14.6669 13.8917 14.7752 13.4167L15.0085 12.4167C15.0835 12.0917 15.3752 11.8584 15.7169 11.8584C16.0669 11.8584 16.3585 12.1001 16.4252 12.4334L16.6502 13.4167C16.7585 13.8917 17.1419 14.2751 17.6169 14.3834L18.6169 14.6167C18.9419 14.6917 19.1835 14.9834 19.1752 15.3251C19.1752 15.6667 18.9419 15.9584 18.6085 16.0334L17.6169 16.2584C17.1335 16.3667 16.7585 16.7501 16.6502 17.2251L16.4169 18.2251C16.3419 18.5501 16.0502 18.7834 15.7085 18.7834ZM14.7835 15.3167C15.1669 15.5417 15.4835 15.8584 15.7085 16.2417C15.9335 15.8584 16.2502 15.5417 16.6335 15.3167C16.2502 15.0917 15.9335 14.7751 15.7085 14.3917C15.4835 14.7751 15.1669 15.0917 14.7835 15.3167Z",fill:"currentColor"})]})]}),Yj=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsxs("g",{clipPath:"url(#clip0_1314_55824)",children:[o.jsx("mask",{id:"mask0_1314_55824",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:o.jsx("path",{d:"M19.5 0.5V19.5H0.5V0.5H19.5Z",fill:"white",stroke:"white"})}),o.jsxs("g",{mask:"url(#mask0_1314_55824)",children:[o.jsx("path",{d:"M13.2839 19.4583C12.9339 19.4583 12.6422 19.225 12.5672 18.8833L12.3339 17.8667C12.2172 17.3667 11.8255 16.975 11.3339 16.8583L10.3089 16.625C9.98385 16.5583 9.74219 16.2583 9.74219 15.9167C9.74219 15.575 9.97552 15.275 10.3172 15.2L11.3255 14.9667C11.8255 14.85 12.2172 14.4583 12.3339 13.9667L12.5672 12.9417C12.6422 12.6083 12.9339 12.375 13.2755 12.375C13.6255 12.375 13.9172 12.6167 13.9839 12.95L14.2172 13.9583C14.3339 14.4583 14.7255 14.85 15.2172 14.9667L16.2422 15.2C16.5672 15.2667 16.8089 15.5667 16.8089 15.9083C16.8089 16.25 16.5755 16.55 16.2422 16.625L15.2255 16.8583C14.7255 16.975 14.3339 17.3667 14.2172 17.8583L13.9755 18.8833C13.9089 19.2083 13.6089 19.45 13.2672 19.45L13.2839 19.4583ZM12.3005 15.9333C12.7089 16.1667 13.0505 16.5083 13.2755 16.9167C13.5089 16.5083 13.8505 16.1667 14.2589 15.9417C13.8505 15.7083 13.5089 15.3667 13.2839 14.9583C13.0505 15.3667 12.7089 15.7083 12.3005 15.9333Z",fill:"currentColor"}),o.jsx("path",{d:"M8.88331 18.4586C8.88331 18.4586 8.82498 18.4586 8.79165 18.4586C7.94165 18.3419 7.11665 18.0919 6.33331 17.7169C6.20831 17.6586 5.95832 17.6253 5.84165 17.6503L5.65832 17.6919C5.09998 17.8253 4.28331 18.0253 3.59165 18.1919C3.02498 18.3336 2.49165 18.2086 2.14165 17.8586C1.79165 17.5086 1.66665 16.9753 1.80832 16.4003L2.34998 14.1503C2.37498 14.0419 2.34998 13.8003 2.28331 13.6669C1.53331 12.0919 1.28331 10.3253 1.56665 8.5586C2.14998 5.02525 5.02498 2.15025 8.55832 1.56692C11.35 1.11692 14.075 1.99192 16.0416 3.96692C18.0083 5.94192 18.875 8.66693 18.425 11.4419C18.2833 12.2919 18.025 13.1086 17.65 13.8669C17.5 14.1753 17.125 14.3003 16.8166 14.1503C16.5083 14.0003 16.3833 13.6253 16.5333 13.3169C16.85 12.6669 17.075 11.9669 17.1916 11.2419C17.5833 8.86693 16.8416 6.53359 15.1583 4.85025C13.475 3.16692 11.1416 2.41692 8.75832 2.80025C5.74998 3.30025 3.29998 5.75025 2.80831 8.76693C2.56665 10.2753 2.77498 11.7919 3.41665 13.1336C3.56665 13.4503 3.68332 14.0003 3.56665 14.4586L3.02498 16.7003C2.98331 16.8836 3.01665 16.9669 3.02498 16.9753C3.03332 16.9836 3.11665 17.0253 3.29998 16.9753C3.99998 16.8086 4.80832 16.6169 5.36665 16.4836L5.55832 16.4336C5.95832 16.3419 6.49998 16.4086 6.86665 16.5836C7.53332 16.9003 8.24165 17.1086 8.96665 17.2086C9.30832 17.2586 9.54165 17.5753 9.49998 17.9169C9.45831 18.2253 9.19165 18.4586 8.88331 18.4586Z",fill:"currentColor"}),o.jsx("path",{d:"M14.5246 8.92515C14.2746 8.92515 14.0329 8.76681 13.9413 8.51681C13.5246 7.3918 12.6413 6.50013 11.5163 6.0668C11.1913 5.9418 11.0329 5.58346 11.1579 5.25846C11.2829 4.93346 11.6496 4.77513 11.9663 4.90013C13.4163 5.4668 14.5663 6.62513 15.1079 8.08346C15.2329 8.40848 15.0663 8.76681 14.7413 8.89181C14.6663 8.91681 14.5996 8.92515 14.5246 8.92515Z",fill:"currentColor"})]})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1314_55824",children:o.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),e6=({size:e,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 1.5a.5.5 0 0 1 .5.5v6.793l2.146-2.147a.5.5 0 1 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L5.5 8.793V2a.5.5 0 0 1 .5-.5Z",clipRule:"evenodd"})}),Xj=P.forwardRef(e6),t6=({size:e,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.267 1h7.466c.264 0 .496 0 .678.016.174.016.413.053.607.213a1 1 0 0 1 .363.81c-.01.252-.142.455-.247.595a8.283 8.283 0 0 1-.44.516L7.826 6.356l-.074.084-.001.001v.002l-.001.113v2.693c0 .068.002.21-.047.344a.75.75 0 0 1-.199.293c-.105.095-.238.147-.302.172l-.018.007-1.714.685c-.08.032-.167.067-.245.09a.764.764 0 0 1-.378.025.75.75 0 0 1-.472-.32.764.764 0 0 1-.118-.36 3.036 3.036 0 0 1-.007-.26v-3.37l-.001-.112v-.002h-.001a3.066 3.066 0 0 0-.075-.085L1.32 3.166l-.015-.016c-.176-.197-.33-.37-.44-.516C.762 2.494.63 2.291.62 2.04a1 1 0 0 1 .362-.811c.194-.16.434-.197.608-.213C1.771 1 2.002 1 2.267 1Zm-.615 1.015.016.022c.078.106.202.244.398.463l2.853 3.189.015.017c.06.066.133.148.188.246a1 1 0 0 1 .104.272c.024.11.024.22.024.308v3.229l1.5-.6V6.532c0-.088 0-.199.024-.308a1 1 0 0 1 .104-.272c.055-.098.129-.18.187-.246l.016-.017L9.934 2.5a7.943 7.943 0 0 0 .414-.485l-.027-.003A7.924 7.924 0 0 0 9.711 2H2.289a7.925 7.925 0 0 0-.637.015Z",clipRule:"evenodd"})}),Qj=P.forwardRef(t6),r6=({size:e,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t.strokeWidth||1,d:"m18.67 18.67 2.22-1.11v-2.78m-6.67-5L12 10.89l2.22-1.11ZM12 10.89 9.78 9.78 12 10.89Zm0 0v2.78-2.78Zm8.89-4.45-2.22 1.11 2.22-1.11Zm0 0-2.22-1.11 2.22 1.11Zm0 0v2.78-2.78Zm-6.67-3.33L12 2 9.78 3.11h4.44ZM3.11 6.44l2.22-1.11-2.22 1.11Zm0 0 2.22 1.11-2.22-1.11Zm0 0v2.78-2.78ZM12 22l-2.22-1.11L12 22Zm0 0 2.22-1.11L12 22Zm0 0v-2.78V22Zm-6.67-3.33-2.22-1.11v-2.78l2.22 3.89Z"})}),n6=P.forwardRef(r6),a6=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 27 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{d:"M23.34 25.005L26.67 23.34V19.17M16.665 11.67L13.335 13.335M13.335 13.335L10.005 11.67M13.335 13.335V17.505M26.67 6.66L23.34 8.325M26.67 6.66L23.34 4.995M26.67 6.66V10.83M16.665 1.665L13.335 0L10.005 1.665H16.665ZM0 6.66L3.33 4.995M0 6.66L3.33 8.325M0 6.66V10.83M13.335 30L10.005 28.335M13.335 30L16.665 28.335M13.335 30V25.83M3.33 25.005L0 23.34V19.17",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),i6=({size:e,...t},r)=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:e,height:e,fill:"none",ref:r,...t,children:[o.jsx("g",{clipPath:"url(#a)",children:o.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM.665 8a7.333 7.333 0 1 1 14.667 0A7.333 7.333 0 0 1 .666 8Z",clipRule:"evenodd"})}),o.jsx("defs",{children:o.jsx("clipPath",{id:"a",children:o.jsx("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}),o6=P.forwardRef(i6),s6=({title:e,titleId:t,size:r,...n},a)=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:r,height:r,fill:"none",ref:a,"aria-labelledby":t,...n,children:[e?o.jsx("title",{id:t,children:e}):null,o.jsxs("g",{clipPath:"url(#a)",children:[o.jsx("mask",{id:"b",width:24,height:24,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"},children:o.jsx("path",{fill:"#fff",d:"M24 0H0v24h24V0Z"})}),o.jsxs("g",{fill:"#fff",mask:"url(#b)",children:[o.jsx("path",{d:"M11.99 22.75C6.06 22.75 1.25 17.93 1.25 12S6.07 1.25 12 1.25 22.75 6.07 22.75 12c0 .6-.05 1.21-.15 1.8-.07.41-.45.69-.87.61a.75.75 0 0 1-.61-.87c.09-.51.13-1.03.13-1.54 0-5.1-4.15-9.25-9.25-9.25S2.75 6.9 2.75 12 6.9 21.25 12 21.25c.72 0 1.43-.08 2.12-.25.39-.09.81.15.9.56.1.4-.15.81-.56.9-.8.19-1.63.29-2.47.29Z"}),o.jsx("path",{d:"M16 12.75H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h8c.41 0 .75.34.75.75s-.34.75-.75.75Z"}),o.jsx("path",{d:"M12 16.75c-.41 0-.75-.34-.75-.75V8c0-.41.34-.75.75-.75s.75.34.75.75v8c0 .41-.34.75-.75.75ZM18.85 22.54a.86.86 0 0 1-.85-.69l-.27-1.18c-.13-.58-.59-1.03-1.16-1.16l-1.2-.28a.848.848 0 0 1-.67-.85c.01-.41.29-.77.69-.85l1.18-.27c.57-.13 1.03-.59 1.16-1.16l.28-1.2c.09-.39.44-.67.85-.67.42 0 .77.29.85.69l.27 1.18c.13.57.59 1.03 1.16 1.16l1.2.28c.39.09.68.44.67.85 0 .41-.28.76-.68.85l-1.19.27c-.58.13-1.03.59-1.16 1.16l-.28 1.2c-.09.39-.44.67-.85.67Zm-1.11-4.16c.46.27.84.65 1.11 1.11.27-.46.65-.84 1.11-1.11-.46-.27-.84-.65-1.11-1.11-.27.46-.65.84-1.11 1.11Z"})]})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"a",children:o.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),l6=P.forwardRef(s6),nt=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.74408 2.74408C3.06951 2.41864 3.59715 2.41864 3.92259 2.74408L10 8.82149L16.0774 2.74408C16.4028 2.41864 16.9305 2.41864 17.2559 2.74408C17.5814 3.06952 17.5814 3.59715 17.2559 3.92259L11.1785 10L17.2559 16.0774C17.5814 16.4028 17.5814 16.9305 17.2559 17.2559C16.9305 17.5814 16.4028 17.5814 16.0774 17.2559L10 11.1785L3.92259 17.2559C3.59715 17.5814 3.06951 17.5814 2.74408 17.2559C2.41864 16.9305 2.41864 16.4028 2.74408 16.0774L8.82149 10L2.74408 3.92259C2.41864 3.59715 2.41864 3.06951 2.74408 2.74408Z",fill:"currentColor"})}),Jj=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 43 43",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsxs("g",{clipPath:"url(#clip0_50_31011)",children:[o.jsx("path",{d:"M33.9412 3.62061H14.6738V11.6106H38.0563V7.73402C38.0563 5.46567 36.2102 3.62061 33.9412 3.62061Z",fill:"#CED9F9"}),o.jsx("path",{d:"M23.0352 12.8403H0.5V5.42636C0.5 2.70972 2.71068 0.5 5.42828 0.5H12.6336C13.3497 0.5 14.0396 0.650925 14.6664 0.934509C15.5418 1.32896 16.2939 1.97913 16.8213 2.8286L23.0352 12.8403Z",fill:"#1640C1"}),o.jsx("path",{d:"M42.5 14.4999V38.3812C42.5 40.6525 40.6511 42.4998 38.3789 42.4998H4.62111C2.34891 42.4998 0.5 40.6525 0.5 38.3812V10.3804H38.3789C40.6511 10.3804 42.5 12.2283 42.5 14.4999Z",fill:"#2354E6"}),o.jsx("path",{d:"M42.5 14.4999V38.3812C42.5 40.6525 40.6511 42.4998 38.3789 42.4998H21.5V10.3804H38.3789C40.6511 10.3804 42.5 12.2283 42.5 14.4999Z",fill:"#1849D6"}),o.jsx("path",{d:"M32.5471 26.44C32.5471 32.5325 27.5909 37.4889 21.4991 37.4889C15.4073 37.4889 10.4512 32.5325 10.4512 26.44C10.4512 20.3486 15.4073 15.3921 21.4991 15.3921C27.5909 15.3921 32.5471 20.3486 32.5471 26.44Z",fill:"#E7ECFC"}),o.jsx("path",{d:"M32.5479 26.44C32.5479 32.5325 27.5918 37.4889 21.5 37.4889V15.3921C27.5918 15.3921 32.5479 20.3486 32.5479 26.44Z",fill:"#CED9F9"}),o.jsx("path",{d:"M25.0612 26.5753C24.8308 26.7704 24.5485 26.8656 24.2688 26.8656C23.9185 26.8656 23.5705 26.7173 23.327 26.4282L22.7307 25.7213V30.3494C22.7307 31.0287 22.1795 31.5799 21.5002 31.5799C20.8209 31.5799 20.2698 31.0287 20.2698 30.3494V25.7213L19.6734 26.4282C19.2344 26.9476 18.4587 27.014 17.9392 26.5753C17.4201 26.1373 17.3535 25.3612 17.7915 24.8418L20.2271 21.9543C20.5447 21.5788 21.008 21.3628 21.5002 21.3628C21.9924 21.3628 22.4558 21.5788 22.7733 21.9543L25.2089 24.8418C25.647 25.3612 25.5803 26.1373 25.0612 26.5753Z",fill:"#6C8DEF"}),o.jsx("path",{d:"M25.061 26.5753C24.8306 26.7704 24.5483 26.8656 24.2686 26.8656C23.9183 26.8656 23.5703 26.7173 23.3268 26.4282L22.7305 25.7213V30.3494C22.7305 31.0287 22.1793 31.5799 21.5 31.5799V21.3628C21.9922 21.3628 22.4555 21.5788 22.7731 21.9543L25.2087 24.8418C25.6467 25.3612 25.5801 26.1373 25.061 26.5753Z",fill:"#3B67E9"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_50_31011",children:o.jsx("rect",{width:"42",height:"42",fill:"white",transform:"translate(0.5 0.5)"})})})]}),Yp=({size:e=16,className:t,...r})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:o.jsx("path",{d:"M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM7 7C6.58579 7 6.25 7.33579 6.25 7.75C6.25 8.16421 6.58579 8.5 7 8.5H7.25293C7.41287 8.5 7.53176 8.64856 7.49707 8.80469L7.03809 10.8701C6.79522 11.963 7.62751 13 8.74707 13H9C9.41421 13 9.75 12.6642 9.75 12.25C9.75 11.8358 9.41421 11.5 9 11.5H8.74707C8.58713 11.5 8.46824 11.3514 8.50293 11.1953L8.96191 9.12988C9.20478 8.03698 8.37249 7 7.25293 7H7ZM8 3C7.44771 3 7 3.44772 7 4C7 4.55228 7.44771 5 8 5C8.55228 5 9 4.55228 9 4C9 3.44772 8.55228 3 8 3Z",fill:"currentColor"})}),e2=({size:e=12,...t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5 6C10.5 6.31066 10.2482 6.5625 9.9375 6.5625L3.42049 6.5625L5.83525 8.97725C6.05492 9.19692 6.05492 9.55308 5.83525 9.77275C5.61558 9.99242 5.25942 9.99242 5.03975 9.77275L1.66475 6.39775C1.44508 6.17808 1.44508 5.82192 1.66475 5.60225L5.03975 2.22725C5.25942 2.00758 5.61558 2.00758 5.83525 2.22725C6.05492 2.44692 6.05492 2.80308 5.83525 3.02275L3.4205 5.4375L9.9375 5.4375C10.2482 5.4375 10.5 5.68934 10.5 6Z",fill:"#22262E"})}),t2=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{d:"M11.4736 10.0004L15.451 13.9779L13.9779 15.451L10.0004 11.4736L6.02295 15.451L4.54981 13.9779L8.52728 10.0004L4.5498 6.02294L6.02294 4.5498L10.0004 8.52728L13.9779 4.5498L15.451 6.02294L11.4736 10.0004Z",className:"fill-med-em"})}),Qr=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:e,className:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM11 9V7H13V9H11ZM11 17V11H13V17H11Z",fill:"currentColor"})}),Xp=({size:e=24,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M12.0002 13.4806V13.2249C12.0002 12.3967 12.5118 11.9583 13.0233 11.6051C13.5227 11.2641 14.0219 10.8256 14.0219 10.0218C14.0219 8.9013 13.1207 8 12.0002 8C10.8797 8 9.97852 8.9013 9.97852 10.0218",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M11.9941 16.3909H12.0051",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),c6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M18.3337 13.9498V3.8915C18.3337 2.8915 17.517 2.14983 16.5253 2.23317H16.4753C14.7253 2.38317 12.067 3.27483 10.5837 4.20817L10.442 4.29983C10.2003 4.44983 9.80033 4.44983 9.55866 4.29983L9.35033 4.17483C7.86699 3.24983 5.21699 2.3665 3.46699 2.22483C2.47533 2.1415 1.66699 2.8915 1.66699 3.88317V13.9498C1.66699 14.7498 2.31699 15.4998 3.11699 15.5998L3.35866 15.6332C5.16699 15.8748 7.95866 16.7915 9.55866 17.6665L9.59199 17.6832C9.81699 17.8082 10.1753 17.8082 10.392 17.6832C11.992 16.7998 14.792 15.8748 16.6087 15.6332L16.8837 15.5998C17.6837 15.4998 18.3337 14.7498 18.3337 13.9498Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M10 4.57495V17.075",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M6.45801 7.07495H4.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M7.08301 9.57495H4.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),u6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M7.08366 15.808H6.66699C3.33366 15.808 1.66699 14.9747 1.66699 10.808V6.64136C1.66699 3.30802 3.33366 1.64136 6.66699 1.64136H13.3337C16.667 1.64136 18.3337 3.30802 18.3337 6.64136V10.808C18.3337 14.1414 16.667 15.808 13.3337 15.808H12.917C12.6587 15.808 12.4087 15.933 12.2503 16.1414L11.0003 17.808C10.4503 18.5414 9.55032 18.5414 9.00032 17.808L7.75032 16.1414C7.61698 15.958 7.31699 15.808 7.08366 15.808Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M6.66667 7.25L5 8.91667L6.66667 10.5833",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M13.333 7.25L14.9997 8.91667L13.333 10.5833",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M10.8337 6.9751L9.16699 10.8585",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),d6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M18.3337 12.5001V7.50008C18.3337 3.33341 16.667 1.66675 12.5003 1.66675H7.50033C3.33366 1.66675 1.66699 3.33341 1.66699 7.50008V12.5001C1.66699 16.6667 3.33366 18.3334 7.50033 18.3334H12.5003C16.667 18.3334 18.3337 16.6667 18.3337 12.5001Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2.09961 5.92529H17.8996",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M7.09961 1.75854V5.80854",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M12.9004 1.75854V5.43354",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M8.125 12.0416V11.0416C8.125 9.75827 9.03333 9.23327 10.1417 9.87493L11.0083 10.3749L11.875 10.8749C12.9833 11.5166 12.9833 12.5666 11.875 13.2083L11.0083 13.7083L10.1417 14.2083C9.03333 14.8499 8.125 14.3249 8.125 13.0416V12.0416V12.0416Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),f6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M15.833 13.3333V5.41667C15.833 4.5 15.083 3.75 14.1663 3.75H9.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M11.667 1.66675L9.16699 3.75008L11.667 5.83341",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M15.833 18.3333C17.2137 18.3333 18.333 17.214 18.333 15.8333C18.333 14.4525 17.2137 13.3333 15.833 13.3333C14.4523 13.3333 13.333 14.4525 13.333 15.8333C13.333 17.214 14.4523 18.3333 15.833 18.3333Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.16699 6.66675V14.5834C4.16699 15.5001 4.91699 16.2501 5.83366 16.2501H10.417",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M8.33301 18.3334L10.833 16.2501L8.33301 14.1667",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.16699 6.66675C5.5477 6.66675 6.66699 5.54746 6.66699 4.16675C6.66699 2.78604 5.5477 1.66675 4.16699 1.66675C2.78628 1.66675 1.66699 2.78604 1.66699 4.16675C1.66699 5.54746 2.78628 6.66675 4.16699 6.66675Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),h6=({size:e=20,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("path",{d:"M16.6667 11.6666C17.5871 11.6666 18.3333 10.9204 18.3333 9.99992C18.3333 9.07944 17.5871 8.33325 16.6667 8.33325C15.7462 8.33325 15 9.07944 15 9.99992C15 10.9204 15.7462 11.6666 16.6667 11.6666Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M16.6667 5.00008C17.5871 5.00008 18.3333 4.25389 18.3333 3.33341C18.3333 2.41294 17.5871 1.66675 16.6667 1.66675C15.7462 1.66675 15 2.41294 15 3.33341C15 4.25389 15.7462 5.00008 16.6667 5.00008Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M16.6667 18.3333C17.5871 18.3333 18.3333 17.5871 18.3333 16.6667C18.3333 15.7462 17.5871 15 16.6667 15C15.7462 15 15 15.7462 15 16.6667C15 17.5871 15.7462 18.3333 16.6667 18.3333Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M3.33366 11.6666C4.25413 11.6666 5.00033 10.9204 5.00033 9.99992C5.00033 9.07944 4.25413 8.33325 3.33366 8.33325C2.41318 8.33325 1.66699 9.07944 1.66699 9.99992C1.66699 10.9204 2.41318 11.6666 3.33366 11.6666Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5 10H15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M15.0003 3.33325H11.667C10.0003 3.33325 9.16699 4.16659 9.16699 5.83325V14.1666C9.16699 15.8333 10.0003 16.6666 11.667 16.6666H15.0003",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),r2=e=>o.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsxs("g",{clipPath:"url(#clip0_1562_62901)",children:[o.jsx("mask",{id:"mask0_1562_62901",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"21",height:"20",children:o.jsx("path",{d:"M20.418 0H0.417969V20H20.418V0Z",fill:"white"})}),o.jsxs("g",{mask:"url(#mask0_1562_62901)",children:[o.jsx("path",{d:"M14.3001 16.2424C13.9501 16.2424 13.6668 16.0091 13.5918 15.6758L13.3751 14.7341C13.2751 14.2841 12.9168 13.9341 12.4751 13.8258L11.5251 13.6008C11.2001 13.5341 10.9668 13.2424 10.9668 12.8924C10.9668 12.5424 11.2001 12.2591 11.5418 12.1841L12.4835 11.9674C12.9335 11.8674 13.2835 11.5091 13.3918 11.0674L13.6168 10.1091C13.6835 9.78411 13.9751 9.55078 14.3168 9.55078C14.6251 9.55078 14.9501 9.78411 15.0251 10.1174L15.2418 11.0674C15.3418 11.5174 15.7001 11.8674 16.1418 11.9758L17.1001 12.2008C17.4251 12.2674 17.6585 12.5591 17.6585 12.9091C17.6585 13.2591 17.4251 13.5424 17.1001 13.6174L16.1501 13.8341C15.7001 13.9341 15.3501 14.2924 15.2418 14.7341L15.0168 15.6841C14.9501 16.0091 14.6501 16.2424 14.3001 16.2424ZM13.4751 12.9091C13.8168 13.1174 14.1001 13.4008 14.3085 13.7424C14.5168 13.4008 14.8001 13.1174 15.1418 12.9174C14.8001 12.7091 14.5168 12.4258 14.3085 12.0841C14.1001 12.4258 13.8168 12.7091 13.4751 12.9174V12.9091Z",fill:"currentColor"}),o.jsx("path",{d:"M4.91727 18.1171C3.98394 18.1171 3.40061 17.8088 3.02561 17.4338C2.29227 16.7005 1.77561 15.1421 3.42561 11.8338L4.15061 10.3921C4.24227 10.2005 4.24227 9.80047 4.15061 9.6088L3.42561 8.15881C1.76727 4.85881 2.29227 3.29214 3.02561 2.55881C3.75894 1.82548 5.31727 1.30048 8.62561 2.95881L15.7589 6.52548C17.9589 7.62548 18.9423 9.3338 18.3173 10.9838C18.1923 11.3088 17.8339 11.4671 17.5089 11.3505C17.1839 11.2255 17.0256 10.8671 17.1423 10.5421C17.5256 9.52547 16.7923 8.44214 15.1923 7.64214L8.05894 4.07548C6.05894 3.07548 4.50894 2.84214 3.90061 3.44214C3.29227 4.04214 3.53394 5.60048 4.53394 7.59214L5.25894 9.04214C5.52561 9.5838 5.52561 10.4005 5.25894 10.9421L4.53394 12.3838C3.53394 14.3838 3.29227 15.9338 3.90061 16.5338C4.50061 17.1338 6.05894 16.9005 8.05894 15.9005L10.3923 14.7338C10.7006 14.5838 11.0756 14.7005 11.2339 15.0171C11.3923 15.3255 11.2589 15.7005 10.9506 15.8588L8.61727 17.0255C7.00894 17.8338 5.80894 18.1171 4.91727 18.1171Z",fill:"currentColor"}),o.jsx("path",{d:"M9.45117 10.625H4.95117C4.60951 10.625 4.32617 10.3417 4.32617 10C4.32617 9.65833 4.60951 9.375 4.95117 9.375H9.45117C9.79284 9.375 10.0762 9.65833 10.0762 10C10.0762 10.3417 9.79284 10.625 9.45117 10.625Z",fill:"currentColor"})]})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_1562_62901",children:o.jsx("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.417969)"})})})]}),p6=({size:e,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor",ref:r,...t,children:o.jsx("path",{fillRule:"evenodd",d:"M15.75 4.5a3 3 0 1 1 .825 2.066l-8.421 4.679a3.002 3.002 0 0 1 0 1.51l8.421 4.679a3 3 0 1 1-.729 1.31l-8.421-4.678a3 3 0 1 1 0-4.132l8.421-4.679a3 3 0 0 1-.096-.755Z",clipRule:"evenodd"})}),m6=P.forwardRef(p6),hh=({size:e=36,className:t})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[o.jsx("defs",{children:o.jsxs("filter",{id:"filter0_dd_50_34857",x:"0",y:"0",width:"36",height:"36",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[o.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),o.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o.jsx("feMorphology",{radius:"2",operator:"erode",in:"SourceAlpha",result:"effect1_dropShadow_50_34857"}),o.jsx("feOffset",{dy:"2"}),o.jsx("feGaussianBlur",{stdDeviation:"2"}),o.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.06 0"}),o.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_50_34857"}),o.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o.jsx("feMorphology",{radius:"2",operator:"erode",in:"SourceAlpha",result:"effect2_dropShadow_50_34857"}),o.jsx("feOffset",{dy:"4"}),o.jsx("feGaussianBlur",{stdDeviation:"4"}),o.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.1 0"}),o.jsx("feBlend",{mode:"normal",in2:"effect1_dropShadow_50_34857",result:"effect2_dropShadow_50_34857"}),o.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_50_34857",result:"shape"})]})}),o.jsxs("g",{filter:"url(#filter0_dd_50_34857)",children:[o.jsx("circle",{cx:"18",cy:"18",r:"12",fill:"var(--slider-thumb-bg, #FFFFFF)"}),o.jsx("circle",{cx:"18",cy:"18",r:"11.5",stroke:"var(--slider-thumb-stroke, #000000)"})]})]}),x6=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:Math.round(e*.35),viewBox:"0 0 20 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{d:"M5.7021 2.31723C7.41751 0.944899 8.27522 0.258733 9.24878 0.0725807C9.7451 -0.0223194 10.2549 -0.0223194 10.7512 0.0725807C11.7248 0.258733 12.5825 0.944898 14.2979 2.31723L20 6.87891H0L5.7021 2.31723Z",fill:"var(--slider-surface-bg, #F9F9FA)"})}),g6=({size:e=20,className:t})=>o.jsx("svg",{width:e,height:Math.round(e*.35),viewBox:"0 0 20 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:o.jsx("path",{d:"M5.7021 4.56168C7.41751 5.93401 8.27522 6.62017 9.24878 6.80633C9.7451 6.90123 10.2549 6.90123 10.7512 6.80633C11.7248 6.62017 12.5825 5.93401 14.2979 4.56168L20 0H0L5.7021 4.56168Z",fill:"var(--slider-surface-bg, #F9F9FA)"})}),To=({width:e=165,height:t=24,className:r})=>o.jsxs("svg",{width:e,height:t,viewBox:"0 0 165 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[o.jsx("path",{d:"M33.2926 22.0173C31.4874 20.7152 30.4812 18.7916 30.3333 16.2762H38.1162C38.2346 17.6079 38.8265 18.2885 39.8918 18.2885C40.2765 18.2885 40.6316 18.1998 40.898 18.0222C41.1643 17.8446 41.3123 17.5487 41.3123 17.1344C41.3123 16.5721 41.0164 16.1282 40.4245 15.8027C39.8326 15.4476 38.9152 15.0629 37.6427 14.619C36.1335 14.0863 34.9202 13.5832 33.9436 13.0801C32.967 12.5771 32.1384 11.8372 31.4282 10.8607C30.718 9.88409 30.3924 8.64118 30.3924 7.13193C30.3924 5.62269 30.7771 4.32059 31.5762 3.25524C32.3456 2.18989 33.4109 1.39088 34.7722 0.828607C36.1335 0.266338 37.6427 0 39.3295 0C42.2001 0 44.4492 0.651048 46.136 1.98274C47.8228 3.31443 48.7106 5.1492 48.7993 7.54624H40.9276C40.898 6.89519 40.75 6.4217 40.4245 6.12577C40.1286 5.82984 39.7439 5.71147 39.3 5.71147C39.004 5.71147 38.7377 5.82984 38.5305 6.03699C38.3234 6.24414 38.2346 6.54007 38.2346 6.92478C38.2346 7.45746 38.5305 7.90136 39.1224 8.22688C39.7143 8.582 40.6316 8.96671 41.9041 9.46979C43.3838 10.0321 44.5971 10.5351 45.5441 11.0382C46.4911 11.5413 47.3197 12.2515 48.0299 13.1393C48.7402 14.0271 49.0953 15.1813 49.0953 16.5425C49.0953 17.963 48.7402 19.2651 48.0299 20.3896C47.3197 21.5142 46.3135 22.402 44.9522 23.053C43.6205 23.7041 42.0225 24 40.1582 24C37.406 23.9704 35.1273 23.3194 33.2926 22.0173Z",fill:"currentColor"}),o.jsx("path",{d:"M65.7858 23.7633L58.9794 13.6424V23.7633H51.6995V0.41433H59.009V10.2392L65.697 0.41433H73.9831L65.9337 11.6005L74.5157 23.7633H65.7858Z",fill:"currentColor"}),o.jsx("path",{d:"M91.5613 20.2121H83.7783L82.6241 23.7633H74.9299L83.4823 0.41433H91.9164L100.41 23.7633H92.6858L91.5613 20.2121ZM89.7857 14.7078L87.6846 8.19731L85.5834 14.7078H89.7857Z",fill:"currentColor"}),o.jsx("path",{d:"M109.376 18.1998H116.419V23.7633H102.037V0.41433H109.347V18.1998H109.376Z",fill:"currentColor"}),o.jsx("path",{d:"M133.731 20.2121H125.948L124.794 23.7633H117.1L125.652 0.41433H134.087L142.58 23.7633H134.856L133.731 20.2121ZM131.956 14.7078L129.855 8.19731L127.754 14.7078H131.956Z",fill:"currentColor"}),o.jsx("path",{d:"M155.985 23.7633L151.605 15.3884H151.576V23.7633H144.266V0.41433H155.157C157.051 0.41433 158.649 0.739853 160.01 1.42049C161.342 2.10114 162.348 2.98893 163.028 4.14306C163.709 5.29719 164.035 6.59929 164.035 8.04935C164.035 9.61778 163.591 11.0087 162.732 12.1924C161.874 13.4057 160.602 14.2639 159.004 14.7966L164.035 23.7633H155.985ZM151.576 10.5056H154.476C155.186 10.5056 155.719 10.3576 156.044 10.0321C156.4 9.70656 156.577 9.20348 156.577 8.52284C156.577 7.90138 156.4 7.42789 156.044 7.07277C155.689 6.71766 155.157 6.5401 154.476 6.5401H151.576V10.5056Z",fill:"currentColor"}),o.jsx("path",{d:"M0.0593784 0.562271L0.0297852 9.32183L7.19131 9.35142L7.16172 16.5129L14.2345 16.5425L14.2049 23.7041L23.0828 23.7633L23.1716 0.65105L0.0593784 0.562271Z",fill:"currentColor"}),o.jsx("path",{d:"M7.13214 23.6745C3.16667 23.6745 -0.0293892 20.4488 0.00020386 16.4834L7.16173 16.513L7.13214 23.6745Z",fill:"currentColor"})]}),Eo=({width:e=26,height:t=25,className:r})=>o.jsxs("svg",{width:e,height:t,viewBox:"0 0 26 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[o.jsxs("g",{clipPath:"url(#clip0_2642_443540)",children:[o.jsx("path",{d:"M2.89524 2.84375L2.86914 10.5762L9.18445 10.6024L9.15835 16.9242L15.3954 16.9503L15.3693 23.2722L23.1982 23.3244L23.2765 2.92212L2.89524 2.84375Z",fill:"currentColor"}),o.jsx("path",{d:"M9.13314 23.2454C5.63624 23.2454 2.81783 20.398 2.84393 16.8975L9.15924 16.9236L9.13314 23.2454Z",fill:"currentColor"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0_2642_443540",children:o.jsx("rect",{width:"25.7812",height:"25.0002",fill:"currentColor"})})})]}),Qp=({size:e=12,...t})=>o.jsx("svg",{width:e,height:e,fill:"none",...t,viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M4.8125 2.625L9.1875 7L4.8125 11.375",stroke:"#5A606B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),v6=({size:e=20,className:t})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,className:t,viewBox:"0 0 24 24",fill:"none",children:[o.jsx("path",{d:"M6.29844 14.3999C6.29844 13.9028 6.70138 13.4999 7.19844 13.4999H7.21044C7.70749 13.4999 8.11044 13.9028 8.11044 14.3999V14.4119C8.11044 14.909 7.70749 15.3119 7.21044 15.3119H7.19844C6.70138 15.3119 6.29844 14.909 6.29844 14.4119V14.3999Z",fill:"#22262E"}),o.jsx("path",{d:"M7.19844 15.8999C6.70138 15.8999 6.29844 16.3028 6.29844 16.7999V16.8119C6.29844 17.309 6.70138 17.7119 7.19844 17.7119H7.21044C7.70749 17.7119 8.11044 17.309 8.11044 16.8119V16.7999C8.11044 16.3028 7.70749 15.8999 7.21044 15.8999H7.19844Z",fill:"#22262E"}),o.jsx("path",{d:"M8.69844 14.3999C8.69844 13.9028 9.10138 13.4999 9.59844 13.4999H9.61044C10.1075 13.4999 10.5104 13.9028 10.5104 14.3999V14.4119C10.5104 14.909 10.1075 15.3119 9.61044 15.3119H9.59844C9.10138 15.3119 8.69844 14.909 8.69844 14.4119V14.3999Z",fill:"#22262E"}),o.jsx("path",{d:"M9.59844 15.8999C9.10138 15.8999 8.69844 16.3028 8.69844 16.7999V16.8119C8.69844 17.309 9.10138 17.7119 9.59844 17.7119H9.61044C10.1075 17.7119 10.5104 17.309 10.5104 16.8119V16.7999C10.5104 16.3028 10.1075 15.8999 9.61044 15.8999H9.59844Z",fill:"#22262E"}),o.jsx("path",{d:"M11.0984 11.9999C11.0984 11.5028 11.5014 11.0999 11.9984 11.0999H12.0104C12.5075 11.0999 12.9104 11.5028 12.9104 11.9999V12.0119C12.9104 12.509 12.5075 12.9119 12.0104 12.9119H11.9984C11.5014 12.9119 11.0984 12.509 11.0984 12.0119V11.9999Z",fill:"#22262E"}),o.jsx("path",{d:"M11.9984 13.4999C11.5014 13.4999 11.0984 13.9028 11.0984 14.3999V14.4119C11.0984 14.909 11.5014 15.3119 11.9984 15.3119H12.0104C12.5075 15.3119 12.9104 14.909 12.9104 14.4119V14.3999C12.9104 13.9028 12.5075 13.4999 12.0104 13.4999H11.9984Z",fill:"#22262E"}),o.jsx("path",{d:"M11.0984 16.7999C11.0984 16.3028 11.5014 15.8999 11.9984 15.8999H12.0104C12.5075 15.8999 12.9104 16.3028 12.9104 16.7999V16.8119C12.9104 17.309 12.5075 17.7119 12.0104 17.7119H11.9984C11.5014 17.7119 11.0984 17.309 11.0984 16.8119V16.7999Z",fill:"#22262E"}),o.jsx("path",{d:"M14.3984 11.0999C13.9014 11.0999 13.4984 11.5028 13.4984 11.9999V12.0119C13.4984 12.509 13.9014 12.9119 14.3984 12.9119H14.4104C14.9075 12.9119 15.3104 12.509 15.3104 12.0119V11.9999C15.3104 11.5028 14.9075 11.0999 14.4104 11.0999H14.3984Z",fill:"#22262E"}),o.jsx("path",{d:"M13.4984 14.3999C13.4984 13.9028 13.9014 13.4999 14.3984 13.4999H14.4104C14.9075 13.4999 15.3104 13.9028 15.3104 14.3999V14.4119C15.3104 14.909 14.9075 15.3119 14.4104 15.3119H14.3984C13.9014 15.3119 13.4984 14.909 13.4984 14.4119V14.3999Z",fill:"#22262E"}),o.jsx("path",{d:"M14.3984 15.8999C13.9014 15.8999 13.4984 16.3028 13.4984 16.7999V16.8119C13.4984 17.309 13.9014 17.7119 14.3984 17.7119H14.4104C14.9075 17.7119 15.3104 17.309 15.3104 16.8119V16.7999C15.3104 16.3028 14.9075 15.8999 14.4104 15.8999H14.3984Z",fill:"#22262E"}),o.jsx("path",{d:"M15.8984 11.9999C15.8984 11.5028 16.3014 11.0999 16.7984 11.0999H16.8104C17.3075 11.0999 17.7104 11.5028 17.7104 11.9999V12.0119C17.7104 12.509 17.3075 12.9119 16.8104 12.9119H16.7984C16.3014 12.9119 15.8984 12.509 15.8984 12.0119V11.9999Z",fill:"#22262E"}),o.jsx("path",{d:"M16.7984 13.4999C16.3014 13.4999 15.8984 13.9028 15.8984 14.3999V14.4119C15.8984 14.909 16.3014 15.3119 16.7984 15.3119H16.8104C17.3075 15.3119 17.7104 14.909 17.7104 14.4119V14.3999C17.7104 13.9028 17.3075 13.4999 16.8104 13.4999H16.7984Z",fill:"#22262E"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.89844 2.3999C7.39549 2.3999 7.79844 2.80285 7.79844 3.2999V4.7999H16.1984V3.2999C16.1984 2.80285 16.6014 2.3999 17.0984 2.3999C17.5955 2.3999 17.9984 2.80285 17.9984 3.2999V4.7999H18.2984C20.121 4.7999 21.5984 6.27736 21.5984 8.0999V18.2999C21.5984 20.1224 20.121 21.5999 18.2984 21.5999H5.69844C3.8759 21.5999 2.39844 20.1224 2.39844 18.2999V8.0999C2.39844 6.27736 3.8759 4.7999 5.69844 4.7999H5.99844V3.2999C5.99844 2.80285 6.40138 2.3999 6.89844 2.3999ZM5.69844 8.9999C4.87001 8.9999 4.19844 9.67148 4.19844 10.4999V18.2999C4.19844 19.1283 4.87001 19.7999 5.69844 19.7999H18.2984C19.1269 19.7999 19.7984 19.1283 19.7984 18.2999V10.4999C19.7984 9.67148 19.1269 8.9999 18.2984 8.9999H5.69844Z",fill:"#22262E"})]}),n2=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),o.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),a2=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),o.jsx("path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}),o.jsx("path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}),o.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]}),y6=({size:e=13,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.4 12.8C9.93462 12.8 12.8 9.93462 12.8 6.4C12.8 2.86538 9.93462 0 6.4 0C2.86538 0 0 2.86538 0 6.4C0 9.93462 2.86538 12.8 6.4 12.8ZM7 3.8C7 3.46863 6.73137 3.2 6.4 3.2C6.06863 3.2 5.8 3.46863 5.8 3.8V5.8H3.8C3.46863 5.8 3.2 6.06863 3.2 6.4C3.2 6.73137 3.46863 7 3.8 7H5.8V9C5.8 9.33137 6.06863 9.6 6.4 9.6C6.73137 9.6 7 9.33137 7 9V7H9C9.33137 7 9.6 6.73137 9.6 6.4C9.6 6.06863 9.33137 5.8 9 5.8H7V3.8Z",fill:"currentColor"})}),b6=P.forwardRef(y6),w6=({size:e=20,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:e,height:e,fill:"none",ref:r,...t,children:o.jsx("path",{d:"M16.6004 7.4585L11.1671 12.8918C10.5254 13.5335 9.47539 13.5335 8.83372 12.8918L3.40039 7.4585",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})}),Jp=P.forwardRef(w6),j6=({size:e=20,...t},r)=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",ref:r,fill:"none",...t,children:o.jsx("path",{d:"M19.9201 15.0496L13.4001 8.52965C12.6301 7.75965 11.3701 7.75965 10.6001 8.52965L4.08008 15.0496",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})}),em=P.forwardRef(j6),i2=({size:e=20,className:t,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 11 11",fill:"currentColor",width:e,height:e,className:t,...r,children:o.jsx("path",{d:"M7.39952 1.875L0 9.27452L1.32583 10.6003L8.72543 3.20073V9.1875H10.6004V0H1.41293V1.875H7.39952Z",fill:"currentColor"})}),o2=({size:e=16,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[o.jsx("path",{d:"M3.33333 6.6665C2.6 6.6665 2 7.2665 2 7.99984C2 8.73317 2.6 9.33317 3.33333 9.33317C4.06667 9.33317 4.66667 8.73317 4.66667 7.99984C4.66667 7.2665 4.06667 6.6665 3.33333 6.6665Z",stroke:"currentColor",strokeWidth:"1.2"}),o.jsx("path",{d:"M12.6668 6.6665C11.9335 6.6665 11.3335 7.2665 11.3335 7.99984C11.3335 8.73317 11.9335 9.33317 12.6668 9.33317C13.4002 9.33317 14.0002 8.73317 14.0002 7.99984C14.0002 7.2665 13.4002 6.6665 12.6668 6.6665Z",stroke:"currentColor",strokeWidth:"1.2"}),o.jsx("path",{d:"M7.99984 6.6665C7.2665 6.6665 6.6665 7.2665 6.6665 7.99984C6.6665 8.73317 7.2665 9.33317 7.99984 9.33317C8.73317 9.33317 9.33317 8.73317 9.33317 7.99984C9.33317 7.2665 8.73317 6.6665 7.99984 6.6665Z",stroke:"currentColor",strokeWidth:"1.2"})]}),s2=({size:e=16,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[o.jsx("path",{d:"M8.67318 1.94687L12.6065 3.69354C13.7399 4.19354 13.7399 5.02021 12.6065 5.52021L8.67318 7.26687C8.22652 7.46687 7.49318 7.46687 7.04652 7.26687L3.11318 5.52021C1.97985 5.02021 1.97985 4.19354 3.11318 3.69354L7.04652 1.94687C7.49318 1.74688 8.22652 1.74688 8.67318 1.94687Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2 7.3335C2 7.8935 2.42 8.54016 2.93333 8.76683L7.46 10.7802C7.80667 10.9335 8.2 10.9335 8.54 10.7802L13.0667 8.76683C13.58 8.54016 14 7.8935 14 7.3335",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2 10.6665C2 11.2865 2.36667 11.8465 2.93333 12.0998L7.46 14.1132C7.80667 14.2665 8.2 14.2665 8.54 14.1132L13.0667 12.0998C13.6333 11.8465 14 11.2865 14 10.6665",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),l2=({size:e=16,className:t,...r})=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:o.jsx("path",{d:"M8.66667 1.3335L3.33333 9.3335H8L7.33333 14.6668L12.6667 6.66683H8L8.66667 1.3335Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),c2=({size:e=16,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[o.jsx("path",{d:"M5.3335 1.3335V3.3335",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M10.6665 1.3335V3.3335",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2.3335 6.06006H13.6668",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M14 5.66683V11.3335C14 13.3335 13 14.6668 10.6667 14.6668H5.33333C3 14.6668 2 13.3335 2 11.3335V5.66683C2 3.66683 3 2.3335 5.33333 2.3335H10.6667C13 2.3335 14 3.66683 14 5.66683Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M7.99715 9.13314H8.00314",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5.52938 9.13314H5.53537",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5.52938 11.1331H5.53537",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Gs=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M1 4.5V3.25C1 2.005 2.005 1 3.25 1H4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M7.5 1H8.75C9.995 1 11 2.005 11 3.25V4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M11 8V8.75C11 9.995 9.995 11 8.75 11H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.5 11H3.25C2.005 11 1 9.995 1 8.75V7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M9 6V5M3 6H6H9H3ZM3 6V5V6ZM3 6V7V6ZM9 6V7V6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M6 3H7M6 9V3V9ZM6 9H7H6ZM6 9H5H6ZM6 3H5H6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),u2=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M6.62968 1.80011L2.52468 6.14511C2.36968 6.31011 2.21968 6.63511 2.18968 6.86011L2.00468 8.48011C1.93968 9.06511 2.35968 9.46511 2.93968 9.36511L4.54968 9.09011C4.77468 9.05011 5.08968 8.88511 5.24468 8.71511L9.34968 4.37011C10.0597 3.62011 10.3797 2.76511 9.27468 1.72011C8.17468 0.685108 7.33968 1.05011 6.62968 1.80011Z",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5.94531 2.5249C6.16031 3.9049 7.28031 4.9599 8.67031 5.0999",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M1.5 11H10.5",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),Zs=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M8 6.45V8.55C8 10.3 7.3 11 5.55 11H3.45C1.7 11 1 10.3 1 8.55V6.45C1 4.7 1.7 4 3.45 4H5.55C7.3 4 8 4.7 8 6.45Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M11 3.45V5.55C11 7.3 10.3 8 8.55 8H8V6.45C8 4.7 7.3 4 5.55 4H4V3.45C4 1.7 4.7 1 6.45 1H8.55C10.3 1 11 1.7 11 3.45Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ys=({size:e=20,className:t,...r})=>o.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[o.jsx("path",{d:"M10.5 2.99023C8.835 2.82523 7.16 2.74023 5.49 2.74023C4.5 2.74023 3.51 2.79023 2.52 2.89023L1.5 2.99023",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.25 2.485L4.36 1.83C4.44 1.355 4.5 1 5.345 1H6.655C7.5 1 7.565 1.375 7.64 1.835L7.75 2.485",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M9.42422 4.56982L9.09922 9.60482C9.04422 10.3898 8.99922 10.9998 7.60422 10.9998H4.39422C2.99922 10.9998 2.95422 10.3898 2.89922 9.60482L2.57422 4.56982",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M5.16406 8.25H6.82906",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M4.75 6.25H7.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),C6=({size:e=19,...t})=>o.jsx("svg",{width:e,height:e,viewBox:"0 0 10 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.53953 0.0881595C9.95118 0.293984 10.118 0.794545 9.91221 1.20619L1.57887 17.8729C1.37305 18.2845 0.872487 18.4514 0.460839 18.2455C0.0491898 18.0397 -0.117664 17.5392 0.0881606 17.1275L8.42149 0.460838C8.62732 0.0491888 9.12788 -0.117665 9.53953 0.0881595Z",fill:"currentColor"})}),V=O.default.forwardRef(({variant:e="brand",hierarchy:t="primary",size:r="xs",icons:n="none",leadingIcon:a,trailingIcon:i,children:s,disabled:l=!1,className:c,isToggled:u=!1,toggledLeadingIcon:d,toggledTrailingIcon:f,borderRadius:h,color:p,loading:g=!1,...x},m)=>{const v="group inline-flex items-center justify-center font-semibold rounded-6 transition-all duration-200 focus:outline-none disabled:cursor-not-allowed",b="disabled:bg-surface-3 disabled:!text-disabled",w={brand:{primary:"bg-brand-primary-main text-white-uniform hover:bg-brand-primary-accent-3 active:bg-brand-primary-accent-3 focus:ring focus:ring-low-em",secondary:"bg-brand-primary-main-special text-white-uniform hover:bg-brand-primary-accent-special active:bg-brand-primary-accent-special focus:ring focus:ring-low-em"},neutral:{primary:"bg-surface-2 text-high-em hover:bg-surface-3 active:bg-surface-3 focus:ring focus:ring-surface-4",secondary:"text-high-em bg-transparent hover:bg-surface-2 active:bg-surface-2 focus:ring focus:ring-surface-4",tertiary:"text-high-em bg-white border border-surface-3 hover:bg-surface-2 hover:border-surface-4 active:bg-surface-2 active:border-low-em ",quaternary:"text-high-em bg-transparent border border-disabled hover:border-low-em"},danger:{primary:"bg-danger-main text-white-uniform hover:bg-danger-accent-3 active:bg-danger-accent-3 focus:ring-2 focus:ring-danger-accent-2",secondary:"text-danger-main bg-danger-accent-1 hover:bg-danger-accent-2 active:bg-danger-accent-2 focus:ring focus:ring-danger-accent-3",tertiary:"bg-transparent text-danger-main border-1 border-danger-accent-2 hover:bg-danger-accent-1 active:bg-danger-accent-1 focus:border-danger-accent-3 disabled:border-none",quaternary:"text-danger-main hover:bg-danger-accent-1 active:bg-danger-accent-2 focus:ring focus:ring-danger-accent-2 disabled:bg-surface-bg"},success:{primary:"bg-success-main text-white-uniform hover:bg-success-accent-3 focus:ring focus:ring-success-accent-2",secondary:"text-success-em bg-success-accent-1 hover:bg-success-accent-2 focus:ring focus:ring-success-accent-3",tertiary:"bg-transparent text-success-em border-1 border-success-accent-2 hover:bg-success-accent-1 focus:border-success-accent-3",quaternary:"text-success-em hover:bg-success-accent-1 focus:ring focus:ring-success-accent-2"},secondary:{primary:"bg-brand-secondary-main text-white-uniform hover:bg-brand-secondary-accent-3 active:bg-brand-secondary-accent-3 focus:ring focus:ring-surface-4"}},C=s!=null,y={xs:`text-[10px] h-11 ${C&&n!=="only"?"px-6 py-3":"aspect-square"}`,sm:`text-xs h-[34px] ${C&&n!=="only"?"px-6 py-4":"aspect-square"}`,md:`text-sm h-[42px] ${C&&n!=="only"?"px-8 py-5":"aspect-square"}`,lg:`text-base h-14 ${C&&n!=="only"?"px-9 py-6":"aspect-square"}`},j={xs:12,sm:16,md:20,lg:24},S=j[r],A={xs:{leading:"mr-2",trailing:"ml-2"},sm:{leading:"mr-3",trailing:"ml-3"},md:{leading:"mr-4",trailing:"ml-4"},lg:{leading:"mr-5",trailing:"ml-5"}},_=u&&d?d:a,I=u&&f?f:i,k=_&&O.default.isValidElement(_)?O.default.cloneElement(_,{size:S,color:"currentColor"}):null,E=I&&O.default.isValidElement(I)?O.default.cloneElement(I,{size:S,color:"currentColor"}):null,T=w[e]?.[t]??w[e]?.primary??"",M=te.twMerge(N.clsx(v,g&&"relative",T,y[r],h&&`rounded-[${h}]`,p,b,c)),R=o.jsxs(o.Fragment,{children:[(n==="leading"||n==="both")&&k&&o.jsx("span",{className:`group-disabled:!text-disabled ${A[r].leading}`,children:k}),n!=="only"&&s,n==="only"&&k&&o.jsx("span",{className:"group-disabled:!text-disabled",children:k}),(n==="trailing"||n==="both")&&E&&o.jsx("span",{className:`group-disabled:!text-disabled ${A[r].trailing}`,children:E})]});return o.jsx("button",{ref:m,className:M,disabled:l||g,...x,children:g?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:o.jsx("span",{className:"animate-spin rounded-full border-2 border-current border-t-transparent",style:{width:j[r],height:j[r]}})}),o.jsx("span",{className:"invisible inline-flex items-center",children:R})]}):R})});V.displayName="Button";const d2=P.createContext(void 0),Xs=()=>{const e=P.useContext(d2);if(!e)throw new Error("useAlertContext must be used within an Alert provider");return e},S6={success:{icon:Qr,iconColor:"text-success-main",borderClass:"border border-success-accent-3"},warning:{icon:Qr,iconColor:"text-warning-main",borderClass:"border border-warning-accent-3"},error:{icon:Qr,iconColor:"text-danger-main",borderClass:"border border-danger-accent-3"},info:{icon:Qr,iconColor:"text-info-main",borderClass:"border border-info-accent-3"},default:{icon:Qr,iconColor:"text-high-em",borderClass:"border border-surface-3"}},Kx={success:"neutral",warning:"neutral",error:"danger",info:"neutral",default:"neutral"},f2=({children:e,type:t="default"})=>{const[r,n]=P.useState(!1);return o.jsx(d2.Provider,{value:{open:r,setOpen:n,type:t},children:e})};f2.displayName="AlertDialog";const h2=({children:e})=>{const{setOpen:t}=Xs();return O.default.cloneElement(e,{onClick:r=>{e.props.onClick?.(r),t(!0)}})};h2.displayName="AlertDialogTrigger";const p2=P.forwardRef(({className:e,children:t,...r},n)=>{const{open:a,setOpen:i,type:s}=Xs(),l=S6[s];return o.jsx(me.Transition,{appear:!0,show:a,as:P.Fragment,children:o.jsxs(me.Dialog,{as:"div",className:"relative z-50",onClose:()=>i(!1),children:[o.jsx(me.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:o.jsx("div",{className:"fixed inset-0 bg-black-uniform/20","aria-hidden":"true"})}),o.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:o.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:o.jsx(me.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95 translate-y-4",enterTo:"opacity-100 scale-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100 translate-y-0",leaveTo:"opacity-0 scale-95 translate-y-4",children:o.jsx(me.Dialog.Panel,{ref:n,className:N.clsx("relative bg-surface-bg rounded-[20px] max-w-[460px] w-full",l.borderClass,"shadow-xl",e),...r,children:o.jsx(pt.motion.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-10,transition:{duration:.2,ease:"easeIn"}},transition:{duration:.3,ease:"easeOut"},className:"w-full px-10 pt-10 pb-11 gap-8",children:o.jsxs("div",{className:"flex items-start gap-6",children:[o.jsx("div",{className:"p-2",children:o.jsx(Qr,{size:24,className:N.clsx(l.iconColor),"aria-hidden":"true"})}),o.jsx("div",{className:"flex-1 min-w-0",children:t}),o.jsx("div",{className:"shrink-0",children:o.jsx(pt.motion.button,{type:"button","aria-label":"Close",onClick:()=>i(!1),className:"p-1 rounded hover:bg-surface-1 transition",whileHover:{scale:1.1},whileTap:{scale:.9},children:o.jsx(t2,{size:20})})})]})})})})})})]})})});p2.displayName="AlertDialogContent";const m2=({children:e,className:t})=>o.jsx("div",{className:N.clsx("flex items-start",t),children:e});m2.displayName="AlertDialogHeader";const x2=P.forwardRef(({className:e,...t},r)=>o.jsx(me.Dialog.Title,{ref:r,as:"h3",className:N.clsx("font-bold text-base text-high-em",e),...t}));x2.displayName="AlertDialogTitle";const g2=P.forwardRef(({className:e,...t},r)=>o.jsx(me.Dialog.Description,{ref:r,className:N.clsx("text-sm font-semibold leading-[22px] tracking-normal whitespace-pre-line text-med-em mt-2 mb-8",e),...t}));g2.displayName="AlertDialogDescription";const v2=({children:e,className:t})=>o.jsx("div",{className:N.clsx("mt-4 flex gap-4 mb-4",t),children:e});v2.displayName="AlertDialogFooter";const y2=({className:e,actionVariant:t,onClick:r,...n})=>{const{type:a,setOpen:i}=Xs(),s=t==="secondary",l=s?"neutral":Kx[a],c=Kx[a]==="danger"?"secondary":"tertiary";return o.jsx(V,{variant:l,hierarchy:c,size:"md",icons:s?void 0:"trailing",trailingIcon:o.jsx(F.ArrowRight,{}),onClick:u=>{r?.(u),i(!1)},className:N.clsx(e),...n})};y2.displayName="AlertDialogAction";const b2=P.forwardRef(({className:e,onClick:t,...r},n)=>{const{setOpen:a}=Xs();return o.jsx(V,{ref:n,variant:"neutral",hierarchy:"secondary",size:"md",className:N.clsx(e),onClick:i=>{t?.(i),a(!1)},...r})});b2.displayName="AlertDialogCancel";const Ge=({theme:e="surface",size:t="sm",variant:r="simple",children:n,className:a,statusState:i="success"})=>{const s="inline-flex items-center justify-center font-medium rounded-full font-medium font-family-inter",l={surface:{simple:"bg-surface-2 text-med-em",outlined:"bg-surface-2 text-med-em border border-surface-4",status:""},warning:{simple:"bg-warning-accent-0 text-warning-em",outlined:"bg-warning-accent-0 text-warning-em border border-warning-accent-1",status:""},info:{simple:"bg-info-accent-1 text-info-em",outlined:"bg-info-accent-1 text-info-em border border-info-accent-2",status:""},success:{simple:"bg-success-accent-1 text-success-em",outlined:"bg-success-accent-1 text-success-em border border-success-accent-2",status:""},danger:{simple:"bg-danger-accent-1 text-danger-em",outlined:"bg-danger-accent-1 text-danger-em border border-danger-accent-2",status:""},disabled:{simple:"bg-surface-3 text-disabled",outlined:"bg-surface-3 text-disabled border border-text-disabled",status:""}},c={xs:"px-2 py-1 text-[10px] leading-[14px] gap-1.5 h-[22px]",sm:"px-4 py-2 text-[10px] leading-[16px] gap-1.5 h-[24px]",md:"px-5 py-2.5 text-[12px] leading-[18px] gap-2 h-[28px]",lg:"px-6 py-3 text-[12px] leading-[18px] gap-2 h-[30px]",xl:"px-7 py-3 text-[14px] leading-[20px] gap-2 h-[34px]"},u={success:{bg:"bg-success-main",text:"text-white",border:"border-success-main"},disabled:{bg:"bg-surface-3",text:"text-disabled",border:"border-surface-3"},danger:{bg:"bg-danger-main",text:"text-white",border:"border-danger-main"},warning:{bg:"bg-warning-main",text:"text-white",border:"border-warning-main"}},d={xs:"size-3",sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7"};if(r==="status"){const h=te.twMerge(N.clsx("rounded-full flex-shrink-0",d[t],u[i].bg,u[i].border&&`border ${u[i].border}`,a));return o.jsx("div",{className:h})}const f=te.twMerge(N.clsx(s,l[e][r],c[t],a));return o.jsx("div",{className:f,children:n&&o.jsx("span",{children:n})})},Bt=({size:e="md",imageUrl:t,initials:r,className:n,statusBadge:a,onClick:i})=>{const s={xs:"xs",sm:"xs",md:"sm",lg:"sm",xl:"md"},l={xs:"size-10 text-[10px]",sm:"size-12 text-xs",md:"size-13 text-sm",lg:"size-14 text-base",xl:"size-15 text-lg"},c=N.clsx("relative",n),u=N.clsx("rounded-full flex items-center justify-center font-bold overflow-hidden",l[e],!t&&"bg-brand-primary-main text-white-uniform",i&&"border-0 p-0 m-0 appearance-none cursor-pointer"),d={xs:"bottom-0.5 right-0.5",sm:"bottom-0.5 right-0.5",md:"bottom-1 right-1",lg:"bottom-1 right-1",xl:"bottom-2 right-2"},f=o.jsx(o.Fragment,{children:t?o.jsx("img",{src:t,alt:r||"Avatar",className:"w-full h-full object-cover"}):o.jsx("span",{children:r})});return o.jsxs("div",{className:c,children:[i?o.jsx("button",{onClick:i,type:"button",className:u,children:f}):o.jsx("div",{className:u,children:f}),a&&o.jsx("div",{className:N.clsx("absolute",d[e]),children:o.jsx(Ge,{variant:"status",statusState:a.state||"success",statusSize:a.size||s[e]})})]})},tm=({avatars:e,size:t="md",max:r=4,className:n,counterClassName:a,...i})=>{const s=e.slice(0,r),l=e.length-r,c=l>0,u={xs:"-space-x-2",sm:"-space-x-3",md:"-space-x-4",lg:"-space-x-5",xl:"-space-x-6"},d={xs:"size-10 text-[10px] p-6",sm:"size-12 text-xs p-8",md:"size-13 text-sm p-9",lg:"size-14 text-base p-10",xl:"size-15 text-lg p-12"},f=N.clsx("flex items-center",u[t],n),h=N.clsx("relative rounded-full flex items-center justify-center font-bold border-2 border-white bg-brand-primary-main text-white-uniform hover:z-10 transition-colors",d[t],a);return o.jsxs("div",{className:f,...i,children:[s.map((p,g)=>o.jsx("div",{className:"relative rounded-full border-2 border-white",children:o.jsx(Bt,{...p,size:t,className:"border-0"})},g)),c&&o.jsxs("div",{className:h,children:["+",l]})]})};tm.displayName="AvatarGroup";function O6({...e}){return o.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function N6({className:e,...t}){return o.jsx("ol",{"data-slot":"breadcrumb-list",className:ae.default(" flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function P6({className:e,...t}){return o.jsx("li",{"data-slot":"breadcrumb-item",className:ae.default("inline-flex items-center gap-1.5",e),...t})}function A6({asChild:e,className:t,...r}){if(e){const{children:n,...a}=r;if(!O.isValidElement(n))return null;const i=n,s={className:ae.default("transition-colors text-low-em font-semibold",t,i.props.className),...a};return O.cloneElement(i,s)}return o.jsx("a",{"data-slot":"breadcrumb-link",className:ae.default("transition-colors text-low-em font-semibold",t),...r})}function _6({className:e,...t}){return o.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:ae.default("text-med-em font-semibold",e),...t})}function k6({children:e,className:t,...r}){return o.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:ae.default("[&>svg]:size-2.5 text-low-em",t),...r,children:e??o.jsx(Qp,{color:"currentColor",size:12})})}function T6({className:e,...t}){return o.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:ae.default("flex size-9 items-center justify-center text-low-em",e),...t,children:["...",o.jsx("span",{className:"sr-only",children:"More"})]})}const E6=({label:e,leadingIcon:t,trailingIcon:r,items:n,isActive:a=!1,className:i,dropdownClassName:s,placement:l="bottom-left",showBackdrop:c=!0})=>{const[u,d]=P.useState(!1),f=P.useRef(null),h=o.jsx("svg",{className:N.clsx("w-4 h-4 transition-transform duration-200",u&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),p=()=>{d(v=>!v)},g=v=>{v.disabled||(v.onClick(),d(!1))},x=()=>{d(!1)};P.useEffect(()=>{const v=b=>{f.current&&!f.current.contains(b.target)&&d(!1)};if(u)return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]);const m=()=>{switch(l){case"bottom-right":return"top-full right-0 mt-[6px]";case"top-left":return"bottom-full left-0 mb-[6px]";case"top-right":return"bottom-full right-0 mb-[6px]";case"bottom-left":default:return"top-full left-0 mt-[6px]"}};return o.jsxs("div",{ref:f,className:"relative",children:[o.jsx(V,{variant:"brand",hierarchy:"primary",size:"sm",icons:r||t?"both":"trailing",leadingIcon:t,trailingIcon:r||h,onClick:p,style:{outline:"none",boxShadow:"none"},className:N.clsx("transition-all duration-200","[&:focus]:outline-none [&:focus]:ring-0 [&:focus]:shadow-none","hover:text-gray-200",(a||u)&&["!bg-secondary-600","!text-white","hover:!bg-secondary-700","hover:!text-gray-100","active:!bg-secondary-600"],i),children:e}),u&&c&&o.jsx("div",{className:"fixed inset-0 z-10",onClick:x}),u&&o.jsx("div",{className:N.clsx("absolute z-20 w-[150px] bg-white border border-gray-100 rounded-[16px] shadow-lg overflow-hidden",m(),s),children:o.jsx("div",{children:n.map((v,b)=>o.jsxs(O.default.Fragment,{children:[b>0&&o.jsx("div",{className:"border-t border-gray-100"}),o.jsx("button",{onClick:()=>g(v),disabled:v.disabled,className:N.clsx("w-full text-left pl-5 py-3 transition-colors duration-150 group",v.disabled?"opacity-50 cursor-not-allowed":"hover:bg-gray-50 cursor-pointer"),children:o.jsxs("div",{className:"flex items-center gap-3",children:[v.icon&&o.jsx("div",{className:"flex-shrink-0 text-primary-900",children:v.icon}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx("div",{className:"font-medium text-primary-900",style:{fontSize:"14px"},children:v.label})})]})})]},v.id))})})]})},mr=({options:e,value:t,onChange:r,size:n="md",variant:a="neutral",disabled:i=!1,className:s,buttonClassName:l})=>{const c={xs:"h-[28px] px-[9.2px] text-[10px]",sm:"h-[34px] px-[10.6px] text-[12px]",md:"h-[42px] px-[13px] text-[14px]",lg:"h-[48px] px-[14.4px] text-[16px]"},u={xs:12,sm:16,md:20,lg:24},d={xs:{left:"rounded-l-[6px]",right:"rounded-r-[6px]"},sm:{left:"rounded-l-[8px]",right:"rounded-r-[8px]"},md:{left:"rounded-l-[10px]",right:"rounded-r-[10px]"},lg:{left:"rounded-l-[12px]",right:"rounded-r-[12px]"}},f={neutral:{base:"border border-surface-3 text-high-em bg-transparent",hover:"hover:bg-surface-2",active:"bg-surface-2 border-surface-4 z-10",disabled:"opacity-50 cursor-not-allowed"},brand:{base:"bg-brand-primary-main-special border-0 text-white-uniform",hover:"hover:bg-brand-primary-accent-special",active:"bg-brand-primary-accent-special",disabled:"bg-surface-3 text-disabled"},secondary:{base:"border-none rounded-none text-high-em bg-transparent",hover:"hover:bg-surface-2",active:"bg-surface-2",disabled:"opacity-50 cursor-not-allowed"}};return o.jsx("div",{className:N.clsx("inline-flex items-center",s),children:e.map((h,p)=>{const g=h.value===t,x=h.icon&&O.default.isValidElement(h.icon)?O.default.cloneElement(h.icon,{size:u[n],color:"currentColor"}):null;return o.jsxs("button",{type:"button",disabled:i,onClick:()=>r(h.value),className:N.clsx("inline-flex items-center justify-center font-semibold whitespace-nowrap transition-colors duration-200",a==="neutral"&&p>0&&"-ml-px",c[n],!l&&p===0&&d[n].left,!l&&p===e.length-1&&d[n].right,l,f[a].base,!g&&!i&&f[a].hover,g&&!i&&f[a].active,i&&"pointer-events-none","disabled:text-disabled"),children:[x&&o.jsx("span",{className:h.label?"mr-2":"",children:x}),h.label]},h.value)})})},I6={small:{wrapper:"w-[16px] h-[16px] rounded-[4px]",icon:"w-[16px] h-[16px]"},medium:{wrapper:"w-[20px] h-[20px] rounded-[6px]",icon:"w-[20px] h-[20px]"},large:{wrapper:"w-[24px] h-[24px] rounded-[8px]",icon:"w-[24px] h-[24px]"}},za={unchecked:"bg-transparent border-low-em hover:bg-surface-1",checked:"bg-black border-low-em text-white",indeterminate:"bg-transparent border-low-em text-low-em",disabled:{unchecked:"bg-surface-3 border-surface-4",checked:"bg-surface-3 border-surface-4 text-surface-4"}},M6=e=>o.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),$6=e=>o.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})}),Dr=({size:e="medium",checked:t=!1,indeterminate:r=!1,disabled:n=!1,className:a,...i})=>{const s=I6[e],l=P.useRef(null);return P.useEffect(()=>{l.current&&(l.current.indeterminate=r)},[r]),o.jsxs("label",{className:N.clsx("inline-flex items-center",n?"cursor-not-allowed":"cursor-pointer",a),children:[o.jsx("input",{ref:l,type:"checkbox",checked:t,disabled:n,className:"sr-only peer",...i}),o.jsxs("div",{className:N.clsx(s.wrapper,"inline-flex shrink-0 items-center justify-center border transition-colors duration-200",n?t||r?za.disabled.checked:za.disabled.unchecked:r?za.indeterminate:t?za.checked:za.unchecked,!n&&"peer-hover:border-low-em",!n&&"peer-focus-visible:ring-1 peer-focus-visible:ring-low-em peer-focus-visible:ring-offset-0"),children:[t&&!r&&o.jsx(M6,{className:s.icon}),r&&o.jsx($6,{className:s.icon})]})]})},$r=({variant:e="neutral",size:t="md",disabled:r=!1,leadingIcon:n,trailingIcon:a,showLeadingIcon:i=!0,showTrailingIcon:s=!0,trailingIconPosition:l="inline",disableUnderline:c=!1,children:u,className:d,...f})=>{const h={neutral:"text-med-wm hover:text-high-em hover:border-low-em",info:"text-info-main hover:text-info-wm hover:border-info-accent-3"},p="text-disabled pointer-events-none",g={xs:{text:"text-[10px]",leadingGap:"mr-[2px]",trailingGap:"ml-[2px]"},sm:{text:"text-[12px]",leadingGap:"mr-[2px]",trailingGap:"ml-[2px]"},md:{text:"text-[14px]",leadingGap:"mr-[4px]",trailingGap:"ml-[4px]"},lg:{text:"text-[16px]",leadingGap:"mr-[4px]",trailingGap:"ml-[4px]"}},x={xs:12,sm:12,md:16,lg:20},m=i&&n&&O.default.isValidElement(n)?O.default.cloneElement(n,{size:x[t],color:"currentColor"}):null,v=s&&a&&O.default.isValidElement(a)?O.default.cloneElement(a,{size:x[t],color:"currentColor"}):null;return o.jsxs("a",{className:N.clsx("inline-flex items-center font-semibold transition-colors duration-200",!c&&"border-b-2 border-transparent",!r&&!c&&h[e],!r&&c&&(e==="neutral"?"text-high-em":"text-info-accent-1"),g[t].text,{"w-full justify-between":l==="end"},r&&p,d),"aria-disabled":r,tabIndex:r?-1:void 0,...r&&{href:void 0},...f,children:[o.jsxs("span",{className:"inline-flex items-center",children:[m&&o.jsx("span",{className:g[t].leadingGap,children:m}),o.jsx("span",{children:u}),l==="inline"&&o.jsx("span",{className:g[t].trailingGap,children:v})]}),l==="end"&&o.jsx("span",{className:"shrink-0",children:v})]})},R6=({icon:e,title:t,description:r,linkText:n="Link",linkHref:a="#",checked:i=!1,onCheckboxChange:s,onLinkClick:l,className:c,disabled:u=!1})=>{const d=h=>{s&&s(h.target.checked)},f=e?O.default.cloneElement(e,{size:32,color:"var(--dark-100)"}):null;return o.jsxs("div",{className:N.clsx("w-full min-h-40 bg-white border border-gray-400 rounded-xl py-8 flex flex-col",u&&"opacity-60 pointer-events-none",c),children:[o.jsxs("div",{className:"flex items-center justify-between mx-8 mb-3 shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[f&&o.jsx("div",{className:"shrink-0",children:f}),o.jsx("h3",{className:"font-space-grotesk font-medium text-[20px] leading-tight text-[var(--dark-100)] truncate ml-2",style:{fontFamily:"var(--font-space-grotesk)"},children:t})]}),o.jsx("div",{className:"flex-shrink-0 mt-2",children:o.jsx(Dr,{size:"large",checked:i,onChange:d,disabled:u})})]}),o.jsx("div",{className:"mx-8 mt-4 mb-3 flex-shrink-0",style:{minHeight:"50px"},children:o.jsx("p",{className:"font-inter text-[12px] leading-[1.4] text-[var(--dark-700)] line-clamp-3",style:{fontFamily:"var(--font-inter)"},children:r})}),o.jsx("div",{className:"flex-1"}),o.jsx("div",{className:"border-t border-gray-400 mb-3 flex-shrink-0"}),o.jsx("div",{className:"mx-8 mt-4 flex-shrink-0",children:o.jsx($r,{variant:"neutral",size:"md",href:a,onClick:l,disabled:u,trailingIconPosition:"end",disableUnderline:!0,children:n})})]})},Qs=O.default.forwardRef(({title:e,children:t,isCollapsed:r,onToggle:n,onClose:a,defaultCollapsed:i=!1,className:s},l)=>{const[c,u]=P.useState(i),d=r??c,f=r!==void 0,h=()=>{const g=!d;f||u(g),n?.(g)},p=te.twMerge(N.clsx("bg-surface-2 rounded-t-3 overflow-hidden","w-[311px]",s));return o.jsxs("div",{ref:l,className:p,children:[o.jsxs("div",{className:"flex items-center justify-between px-5 h-[38px]",children:[o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:d?o.jsx(Jp,{}):o.jsx(em,{}),onClick:h,"aria-label":d?"Expand":"Collapse",className:"shrink-0"}),o.jsx("div",{className:"text-sm font-semibold text-med-em flex-1 text-center",children:e}),o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(nt,{}),onClick:a,"aria-label":"Close",className:"shrink-0"})]}),o.jsx("div",{className:"h-px bg-surface-3"}),!d&&t]})});Qs.displayName="ChatCollapsibleContainer";const ph=({children:e,arrowDirection:t="down",className:r})=>o.jsxs("div",{className:N.clsx("relative inline-block",r),children:[t==="up"&&o.jsx("div",{className:"absolute left-1/2 bottom-full -translate-x-1/2 -mb-px",style:{width:22,height:0,borderLeft:"10px solid transparent",borderRight:"10px solid transparent",borderBottom:"8px solid var(--surface-bg)"}}),o.jsx("div",{className:N.clsx("bg-surface-bg text-high-em p-6 border border-surface-3 text-xs font-medium rounded-xl shadow-lg whitespace-nowrap",t==="down"&&"border-b-0",t==="up"&&"border-t-0"),children:e}),t==="down"&&o.jsx("div",{className:"absolute left-1/2 top-full -translate-x-1/2 -mt-px",style:{width:22,height:0,borderLeft:"10px solid transparent",borderRight:"10px solid transparent",borderTop:"8px solid var(--surface-bg)"}})]}),Js=({progress:e,className:t,variant:r="none",...n})=>{const a=Math.min(100,Math.max(0,e)),s=N.clsx("w-full bg-surface-3 rounded-full relative overflow-visible flex-1 h-4",t),l="h-full rounded-full transition-all duration-300 ease-out bg-black",c=()=>{if(r==="none")return null;const u=`${a}%`;return r==="inline"?o.jsx("span",{className:"font-medium text-sm text-high-em shrink-0",children:u}):r==="below"?o.jsx("p",{className:"mt-2 font-medium text-sm text-high-em text-right",children:u}):null};return o.jsxs("div",{className:"flex flex-col gap-y-2 w-full",children:[o.jsxs("div",{className:"flex items-center w-full gap-x-5",children:[o.jsxs("div",{className:N.clsx(s,r==="tooltip"&&"group cursor-pointer"),role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress: ${a}%`,...n,children:[o.jsx("div",{className:l,style:{width:`${a}%`}}),r==="tooltip"&&o.jsx("div",{className:"absolute bottom-full mb-4 opacity-100 visible transition-opacity duration-200 pointer-events-none",style:{left:`${a}%`,transform:"translateX(-50%)"},children:o.jsxs(ph,{arrowDirection:"down",children:[a,"%"]})})]}),r==="inline"&&c()]}),r==="below"&&c()]})},w2=O.default.forwardRef(({title:e="Todo:",items:t,onItemChange:r,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:s=!1,className:l},c)=>{const h=t.length>3?150:void 0,p=t.filter(b=>b.checked).length,g=t.length,x=g>0?Math.round(p/g*100):0,m=(b,w)=>{r?.(b,w)},v=o.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[o.jsxs("span",{className:"text-sm font-semibold text-med-em whitespace-nowrap",children:[typeof e=="string"?e:"Todo:"," ",p,"/",g]}),o.jsx(Js,{progress:x,variant:"none",className:"h-2"})]});return o.jsx(Qs,{ref:c,title:v,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:s,className:l,children:o.jsx("div",{className:"overflow-y-auto",style:h?{maxHeight:`${h}px`}:void 0,children:t.map((b,w)=>o.jsxs(O.default.Fragment,{children:[o.jsxs("label",{className:"flex items-center px-8 h-[50px] gap-6 cursor-pointer",children:[o.jsx(Dr,{size:"medium",checked:b.checked,disabled:b.disabled,onChange:C=>m(b.id,C.target.checked)}),o.jsx("span",{className:N.clsx("text-xs font-semibold text-med-em flex-1",b.checked&&"line-through"),children:b.label})]}),w<t.length-1&&o.jsx("div",{className:"h-px bg-surface-3"})]},b.id))})})});w2.displayName="ChatCollapsibleCheck";const j2=O.default.forwardRef(({title:e,children:t,actions:r=[],isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:s=!1,className:l},c)=>o.jsxs(Qs,{ref:c,title:e,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:s,className:l,children:[o.jsx("div",{className:"p-8",children:o.jsx("div",{className:"text-xs font-semibold text-med-em",children:t})}),o.jsx("div",{className:"h-px bg-surface-3"}),r.length>0&&o.jsx("div",{className:"flex gap-2 p-5",children:r.map((u,d)=>o.jsx(V,{variant:u.variant||"neutral",hierarchy:u.hierarchy||"tertiary",size:"xs",onClick:u.onClick,className:"flex-1",children:u.label},d))})]}));j2.displayName="ChatCollapsibleDialog";const L6={primary:"bg-brand-primary-main text-white-uniform hover:bg-primary-accent-3",secondary:"bg-surface-2 text-high-em hover:bg-surface-2",tertiary:"bg-white text-high-em border border-surface-3 hover:bg-surface-1 shadow-[0_1px_3px_-1px_rgba(0,0,0,0.16)]",quaternary:"bg-surface-2 text-med-em hover:bg-surface-3",success:"bg-success-accent-1 text-success-em hover:bg-success-accent-2",danger:"bg-danger-accent-1 text-danger-em hover:bg-danger-accent-2",warning:"bg-warning-accent-0 text-warning-em hover:bg-warning-accent-1",info:"bg-info-accent-1 text-info-em hover:bg-info-accent-2"},D6={xs:{container:"text-[10px] font-medium p-[4px] gap-[4px] h-[24px] rounded-[6px]",icon:12},sm:{container:"text-[12px] font-medium p-[8px] gap-[8px] h-[34px] rounded-[8px]",icon:16}},z6="bg-surface-3 text-disabled cursor-not-allowed",Rr=({variant:e="primary",size:t="sm",leadingIcon:r=!0,trailingIcon:n=!0,onTrailingIconClick:a,children:i,className:s,disabled:l,...c})=>{const u=D6[t];let d=null;r===!0?d=o.jsx(F.Add,{}):O.default.isValidElement(r)&&(d=r);const f=d?O.default.cloneElement(d,{size:u.icon,color:"currentColor"}):null;let h=null;n===!0?h=o.jsx(F.ArrowDown2,{}):O.default.isValidElement(n)&&(h=n);const p=h?O.default.cloneElement(h,{size:u.icon,color:"currentColor"}):null,g=m=>{m.stopPropagation(),a&&a(m)},x=()=>{const m={xs:{left:"pl-4",right:"pr-4",both:"px-4"},sm:{left:"pl-6",right:"pr-6",both:"px-6"}},v=!!f,b=!!p;return!v&&!b?m[t].both:!v&&b?m[t].left:v&&!b?m[t].right:""};return o.jsxs("button",{disabled:l,className:N.clsx("inline-flex items-center justify-center shrink-0 font-medium transition-colors duration-200","focus:outline-none",l?z6:L6[e],u.container,x(),s),...c,children:[f&&o.jsx("span",{className:"mr-1",children:f}),o.jsx("span",{children:i}),p&&o.jsx("span",{className:"ml-1 p-0.5 rounded-full",role:"button",onClick:g,children:p})]})},B6={xs:{container:"h-13 min-w-21",sidePadding:"px-7",titleGap:"gap-2",title:"text-[11px] font-semibold",description:"text-[9px] font-medium",tagSize:"xs",buttonSize:"xs"},sm:{container:"h-[50px] min-w-22",sidePadding:"px-8",titleGap:"gap-2",title:"text-xs font-semibold",description:"text-[10px] font-medium",tagSize:"xs",buttonSize:"sm"},md:{container:"h-[56px] min-w-24",sidePadding:"px-9",titleGap:"gap-3",title:"text-sm font-semibold",description:"text-xs font-medium",tagSize:"sm",buttonSize:"sm"},lg:{container:"h-[70px] min-w-25",sidePadding:"px-9",titleGap:"gap-3",title:"text-base font-semibold",description:"text-sm font-medium",tagSize:"sm",buttonSize:"md"}},mh=e=>{const{variant:t,size:r="md",title:n,disabled:a=!1,className:i,onClick:s,...l}=e,c=B6[r],u=N.clsx("flex w-full transition-colors duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-secondary-main",c.container,c.sidePadding,a?"bg-surface-3 cursor-not-allowed":"bg-transparent hover:bg-surface-1 active:bg-surface-2 cursor-pointer",i);if(t==="type-1"){const{leadingTag:d,trailingButton:f}=e,h=p=>{p.stopPropagation(),f?.onClick?.(p)};return o.jsxs("button",{type:"button",disabled:a,onClick:s,className:N.clsx(u,"items-center"),...l,children:[d&&o.jsx(Rr,{size:d.size||c.tagSize,variant:d.variant||"tertiary",disabled:a,leadingIcon:!1,trailingIcon:!1,children:d.content}),o.jsx("span",{className:N.clsx(c.title,a?"text-disabled":"text-med-em","truncate",d&&"ml-5"),children:n}),f&&o.jsx("div",{className:"ml-auto",children:o.jsx(V,{size:c.buttonSize,variant:f.variant||"neutral",hierarchy:f.hierarchy||"tertiary",icons:"only",leadingIcon:f.icon,onClick:h,disabled:a})})]})}if(t==="type-2"){const{tag:d,description:f}=e;return o.jsxs("button",{type:"button",disabled:a,onClick:s,className:N.clsx(u,"flex-col justify-center items-start"),...l,children:[o.jsxs("div",{className:"flex items-center gap-5",children:[o.jsx("span",{className:N.clsx(c.title,a?"text-disabled":"text-med-em","truncate"),children:n}),d&&o.jsx(Rr,{size:d.size||c.tagSize,variant:d.variant||"tertiary",disabled:a,leadingIcon:!1,trailingIcon:!1,children:d.content})]}),f&&o.jsx("span",{className:N.clsx(c.description,a?"text-disabled":"text-low-em","truncate w-full text-left"),children:f})]})}return null},Ya=({children:e,size:t="sm",className:r})=>{const n=t==="md"?"px-2 py-1 text-sm":"px-2 py-1 text-xs";return o.jsx("kbd",{className:N.clsx("bg-surface-1 rounded font-medium text-med-em",n,r),children:e})},F6={xs:{borderRadius:"rounded-[8px]",headerHeight:"h-[38px]",headerPadding:"px-5",headerText:"text-[11px] font-semibold",footerHeight:"h-[32px]",footerText:"text-[9px] font-medium",iconSize:14,buttonSize:"xs",kbdSize:"sm"},sm:{borderRadius:"rounded-[12px]",headerHeight:"h-[38px]",headerPadding:"px-5",headerText:"text-[12px] font-semibold",footerHeight:"h-[40px]",footerText:"text-[10px] font-medium",iconSize:16,buttonSize:"sm",kbdSize:"sm"},md:{borderRadius:"rounded-[16px]",headerHeight:"h-[38px]",headerPadding:"px-5",headerText:"text-[14px] font-semibold",footerHeight:"h-[48px]",footerText:"text-[12px] font-medium",iconSize:18,buttonSize:"sm",kbdSize:"sm"},lg:{borderRadius:"rounded-[20px]",headerHeight:"h-[38px]",headerPadding:"px-5",headerText:"text-[16px] font-semibold",footerHeight:"h-[56px]",footerText:"text-[14px] font-medium",iconSize:20,buttonSize:"md",kbdSize:"sm"}},q6=({config:e})=>o.jsxs(o.Fragment,{children:[o.jsx("div",{className:N.clsx("flex items-center",e.headerHeight,e.headerPadding,"bg-surface-bg"),children:o.jsx("span",{className:N.clsx(e.headerText,"text-med-em"),children:"Opciones"})}),o.jsx("div",{className:"border-t border-surface-3"})]}),W6=({config:e,category:t,onBack:r})=>o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:N.clsx("flex items-center gap-3",e.headerHeight,e.headerPadding,"bg-surface-bg"),children:[o.jsx(V,{size:e.buttonSize,variant:"neutral",hierarchy:"secondary",icons:"only",leadingIcon:o.jsx(F.ArrowLeft2,{}),onClick:r}),o.jsx(Rr,{size:"xs",variant:t.leadingTag.variant||"tertiary",leadingIcon:!1,trailingIcon:!1,children:t.leadingTag.content}),o.jsx("span",{className:N.clsx(e.headerText,"text-med-em"),children:t.title})]}),o.jsx("div",{className:"border-t border-surface-3"})]}),H6=({config:e})=>o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t border-surface-3"}),o.jsxs("div",{className:N.clsx("flex items-center justify-between",e.footerHeight,e.headerPadding,"bg-surface-bg"),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Ya,{size:e.kbdSize,children:"↑"}),o.jsx(Ya,{size:e.kbdSize,children:"↓"})]}),o.jsx("span",{className:N.clsx(e.footerText,"text-low-em"),children:"navegar"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ya,{size:e.kbdSize,children:"↩"}),o.jsx("span",{className:N.clsx(e.footerText,"text-low-em"),children:"seleccionar"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ya,{size:e.kbdSize,children:"esc"}),o.jsx("span",{className:N.clsx(e.footerText,"text-low-em"),children:"cerrar"})]})]})]}),V6=({categories:e=[],size:t="md",onCategorySelect:r,onItemSelect:n,onClose:a,floating:i=!1,className:s,...l})=>{const[c,u]=P.useState("categories"),[d,f]=P.useState(null),h=F6[t],p=m=>{f(m),u("items"),r?.(m.id)},g=()=>{u("categories"),f(null)},x=m=>{d&&n?.(d.id,m.id)};return o.jsxs("div",{className:N.clsx("bg-surface-bg border border-surface-3 overflow-hidden","flex flex-col w-fit",h.borderRadius,i&&"absolute z-50",s),style:{boxShadow:"0px 8px 24px -4px rgba(0, 0, 0, 0.12)"},...l,children:[c==="categories"?o.jsx(q6,{config:h}):d?o.jsx(W6,{config:h,category:d,onBack:g}):null,c==="categories"?e.map(m=>o.jsx(mh,{variant:"type-1",size:t,title:m.title,leadingTag:m.leadingTag,trailingButton:{icon:o.jsx(F.ArrowRight2,{}),onClick:()=>p(m),variant:"neutral",hierarchy:"secondary"},onClick:()=>p(m)},m.id)):d?d.items.map(m=>o.jsx(mh,{variant:"type-2",size:t,title:m.title,tag:m.tag,description:m.description,onClick:()=>x(m)},m.id)):null,o.jsx(H6,{config:h})]})},C2=({className:e,activeView:t="chat",onChatClick:r,onHistorialClick:n,onSettingsClick:a,onCloseClick:i,containerWidth:s=0})=>{const l=[{id:"chat",label:"Chat",icon:o.jsx(Zj,{}),content:o.jsx("div",{})},{id:"historial",label:"Historial",icon:o.jsx(Yj,{}),content:o.jsx("div",{})}],c=l.findIndex(f=>f.id===t),u=f=>{const h=l[f];h.id==="chat"?r?.():h.id==="historial"&&n?.()},d=s<=350?"only-icon":"line-icons";return o.jsxs("div",{className:N.clsx("flex w-full items-baseline justify-between rounded-t-lg",e),children:[o.jsx("div",{className:"flex items-center",children:o.jsx(fm,{variant:d,tabs:l,selectedIndex:c,onChange:u,contentSpacing:"none",showBorder:!1})}),o.jsxs("div",{className:"flex items-center gap-2 pr-8 self-center",children:[o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(F.Add,{}),onClick:a,"aria-label":"Add"}),o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(nt,{}),onClick:i,"aria-label":"Close"})]})]})},U6={xs:12,sm:16,"sm-md":20,md:24,"md-lg":28,lg:32,xl:36,"2xl":40},ie=({size:e="md",children:t,color:r="currentColor",imageUrl:n,alt:a="Icon",className:i})=>{const[s,l]=P.useState(!1),c=typeof e=="number"?e:U6[e];if(n&&!s)return o.jsx("img",{src:n,alt:a,className:N.clsx("rounded-[12px]","object-cover",i),style:{width:c,height:c},onError:()=>l(!0)});if(O.default.isValidElement(t)){const u=t.props.className;return O.default.cloneElement(t,{size:c,color:r,className:N.clsx(i,typeof u=="string"?u:void 0)})}return o.jsx(F.InfoCircle,{size:c,color:r,className:i})},ft=({icon:e,label:t,gap:r=4,align:n="center",iconSize:a="md",labelSize:i,iconColorClass:s="text-low-em",labelColorClass:l="text-low-em",className:c,children:u,...d})=>{const f=`gap-${r}`,h={start:"items-start",center:"items-center",end:"items-end"}[n],p=i?`text-${i}`:"";return o.jsxs("div",{className:N.clsx("flex",h,f,c),...d,children:[e&&o.jsx("span",{className:s,children:o.jsx(ie,{size:a,children:e})}),t&&o.jsx("span",{className:N.clsx(p,l),children:t}),u]})},Ft={sm:{height:"h-[32px]",rounded:"rounded-[8px]",iconSize:12,labelFontSize:"text-[10px]",hintFontSize:"text-[10px]",hintIconSize:12},md:{height:"h-[38px]",rounded:"rounded-[12px]",iconSize:16,labelFontSize:"text-xs",hintFontSize:"text-xs",hintIconSize:12},lg:{height:"h-[48px]",rounded:"rounded-[12px]",iconSize:20,labelFontSize:"text-sm",hintFontSize:"text-sm",hintIconSize:14}},qe={default:{wrapper:"bg-surface-2 border-transparent hover:bg-surface-3",hint:"text-med-em",placeholder:"text-placeholder"},outlined:{wrapper:"bg-white border-surface-4",hint:"text-med-em",placeholder:"text-placeholder"},danger:{wrapper:"bg-danger-accent-1 border-danger-accent-2",hint:"text-danger-em",placeholder:"text-danger-em"},success:{wrapper:"bg-success-accent-1 border-success-accent-2",hint:"text-success-em",placeholder:"text-success-em"}},K6={default:{...qe.default,placeholder:"placeholder-placeholder text-med-em",icon:"text-high-em"},outlined:{...qe.outlined,placeholder:"placeholder-placeholder text-med-em",icon:"text-high-em"},danger:{...qe.danger,wrapper:"bg-danger-accent-1 border-danger-accent-2 hover:border-accent-2 text-danger-em",placeholder:"placeholder-danger-main text-danger-em",icon:"text-danger-em"},success:{...qe.success,wrapper:"bg-success-accent-1 border-success-accent-2 hover:border-success-accent-2",placeholder:"placeholder-success-main text-success-em",icon:"text-success-em"}},G6={sm:{...Ft.sm,inputPadding:"px-3",textareaPadding:"px-3 py-3",fontSize:"text-xs font-regular",leadingIconPosition:"left-4",trailingIconPosition:"right-4",inputPaddingLeftWithIcon:"pl-[32px]",inputPaddingRightWithIcon:"pr-10"},md:{...Ft.md,inputPadding:"px-3.5",textareaPadding:"px-3.5 py-4",fontSize:"text-sm font-regular",leadingIconPosition:"left-6",trailingIconPosition:"right-6",inputPaddingLeftWithIcon:"pl-[36px]",inputPaddingRightWithIcon:"pr-12"},lg:{...Ft.lg,inputPadding:"px-4",textareaPadding:"px-4 py-5",fontSize:"text-base font-regular",leadingIconPosition:"left-8",trailingIconPosition:"right-8",inputPaddingLeftWithIcon:"pl-[44px]",inputPaddingRightWithIcon:"pr-14"}},so={wrapper:"bg-surface-3 pointer-events-none border-transparent",input:"disabled:text-disabled disabled:placeholder-disabled",hint:"text-disabled"},xe=P.forwardRef(({variant:e="default",size:t="md",label:r,hint:n,leadingIcon:a,trailingIcon:i,leadingIconColor:s,trailingIconColor:l,disabled:c,className:u,type:d,customBackground:f,placeholderColor:h,multiline:p,customFontWeight:g,fontSize:x,customFontSize:m,hintIconVariant:v,onInputClick:b,...w},C)=>{const y=K6[e],j=G6[t],S=d==="password",[A,_]=P.useState(!1),I=S&&A?"text":d,k=m||x,E={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},T=k&&E[k]||void 0,M=k&&!E[k]?{fontSize:k}:void 0,R=B=>{const W=B.currentTarget;W.style.height="auto",W.style.height=`${W.scrollHeight}px`,w.onChange&&w.onChange(B)},$=f,L=$?/^[a-z]+-[a-z0-9-]+$/i.test($)?`var(--${$})`:$:void 0,q=g||void 0,U=B=>{b&&(B.preventDefault(),b())},D=te.twMerge(N.clsx("w-full bg-transparent text-placeholder focus:outline-none text-ellipsis",!p&&"h-full",p?j.textareaPadding:j.inputPadding,!g&&"font-medium",!k&&j.fontSize,y.placeholder,c&&so.input,h,T,a&&j.inputPaddingLeftWithIcon,(i||S&&!p)&&j.inputPaddingRightWithIcon,b&&"cursor-pointer pointer-events-none"));return o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-col gap-1.5",b&&"cursor-pointer",u)),onClick:U,children:[r&&o.jsx("label",{htmlFor:w.id,className:te.twMerge(N.clsx("font-semibold text-med-em pl-[2px] truncate",j.labelFontSize)),children:r}),o.jsxs("div",{className:te.twMerge(N.clsx("relative flex items-center border transition-colors duration-200",j.rounded,!p&&j.height,y.wrapper,c&&so.wrapper)),style:{backgroundColor:L},children:[a&&o.jsx(ie,{size:j.iconSize,className:te.twMerge(N.clsx("absolute top-1/2 -translate-y-1/2",j.leadingIconPosition,s||y.icon)),children:a}),p?o.jsx("textarea",{ref:C,disabled:c,className:te.twMerge(D,"resize-none overflow-hidden"),style:{fontWeight:q,...M},onInput:R,rows:1,...w}):o.jsx("input",{ref:C,disabled:c,type:I,className:D,style:{fontWeight:q,...M},...w}),!p&&S?o.jsx("button",{type:"button",onClick:()=>_(!A),className:te.twMerge(N.clsx("absolute top-1/2 -translate-y-1/2 text-placeholder hover:text-med focus:outline-none transition-colors",j.trailingIconPosition)),"aria-label":A?"Ocultar contraseña":"Mostrar contraseña",tabIndex:-1,children:A?o.jsx(a2,{size:j.iconSize}):o.jsx(n2,{size:j.iconSize})}):i?o.jsx(ie,{size:j.iconSize,className:te.twMerge(N.clsx("absolute top-1/2 -translate-y-1/2",j.trailingIconPosition,l||y.icon)),children:i}):null]}),n&&o.jsx(ft,{icon:o.jsx(F.InfoCircle,{variant:v||"Bold"}),label:n,iconSize:j.hintIconSize,gap:1,iconColorClass:N.clsx(y.hint,c&&so.hint),labelColorClass:N.clsx(y.hint,c&&so.hint),className:te.twMerge(N.clsx(j.hintFontSize,"font-semibold"))})]})});xe.displayName="InputField";const Z6={xs:{container:"h-[40px] min-w-[250px]",sidePadding:"pl-6 pr-7",checkboxMargin:"mr-5",middleGap:"gap-5",rightGap:"gap-5",checkbox:"small",leadingImage:"sm",leadingIcon:"xs",trailingIcon:"xs",title:"text-[11px] font-semibold",description:"text-[9px] font-medium",tag:"xs",trailingText:"text-[9px] font-medium"},sm:{container:"h-[50px] min-w-[290px]",sidePadding:"pl-7 pr-8",checkboxMargin:"mr-6",middleGap:"gap-6",rightGap:"gap-6",checkbox:"small",leadingImage:"md",leadingIcon:"sm",trailingIcon:"sm",title:"text-[12px] font-semibold",description:"text-[10px] font-medium",tag:"xs",trailingText:"text-[10px] font-medium"},md:{container:"h-[56px] min-w-[340px]",sidePadding:"pl-9 pr-9",checkboxMargin:"mr-6",middleGap:"gap-6",rightGap:"gap-6",checkbox:"medium",leadingImage:"lg",leadingIcon:"sm-md",trailingIcon:"sm-md",title:"text-[14px] font-semibold",description:"text-[12px] font-medium",tag:"xs",trailingText:"text-[12px] font-medium"},lg:{container:"h-[70px] min-w-[420px]",sidePadding:"pl-9 pr-9",checkboxMargin:"mr-6",middleGap:"gap-6",rightGap:"gap-6",checkbox:"large",leadingImage:"2xl",leadingIcon:"md",trailingIcon:"md",title:"text-[16px] font-semibold",description:"text-[14px] font-medium",tag:"sm",trailingText:"text-[14px] font-medium"}},Qt=({size:e="md",disabled:t=!1,showCheckbox:r=!0,showLeadingImage:n=!0,showLeadingIcon:a=!0,showDescription:i=!0,showTrailingIcon:s=!0,showTag:l=!0,showTrailingText:c=!0,title:u,description:d,customTitleColor:f,customBackgroundColor:h,customHoverColor:p,customLeadingIconColor:g,checked:x=!1,indeterminate:m=!1,onCheckboxChange:v,leadingImageUrl:b,leadingImageAlt:w="List item image",leadingIcon:C,trailingIcon:y,tagContent:j,tagVariant:S="tertiary",trailingText:A,className:_,middleContainerClassName:I,as:k="button",onClick:E,...T})=>{const M=Z6[e],R=U=>{U.stopPropagation()},$=U=>{v?.(U.target.checked)},L=te.twMerge(N.clsx("flex items-center w-full transition-colors duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-secondary-main",M.container,M.sidePadding,h||(t?"bg-surface-3 cursor-not-allowed":"bg-transparent hover:bg-surface-1 active:bg-surface-2 cursor-pointer"),h&&(t?"cursor-not-allowed":"cursor-pointer"),p&&!t&&p),_),q=o.jsxs(o.Fragment,{children:[r&&o.jsx("div",{onClick:R,className:N.clsx("flex items-center",M.checkboxMargin),children:o.jsx(Dr,{size:M.checkbox,checked:x,indeterminate:m,onChange:$,disabled:t})}),o.jsxs("div",{className:te.twMerge(N.clsx("flex items-center",M.middleGap),I),children:[n&&b&&o.jsx("div",{className:N.clsx("shrink-0",t&&"opacity-50"),children:o.jsx(ie,{size:M.leadingImage,imageUrl:b,alt:w})}),a&&o.jsx("div",{className:"shrink-0",children:o.jsx(ie,{size:M.leadingIcon,color:t?"var(--text-disabled)":g||"var(--med-em)",children:C||o.jsx(F.Element3,{})})}),o.jsxs("div",{className:"flex flex-col gap-0 justify-start items-start min-w-0 shrink mr-8",children:[o.jsx("span",{className:N.clsx(M.title,f||(t?"text-disabled":"text-med-em"),"truncate max-w-full"),children:u}),i&&d&&o.jsx("span",{className:N.clsx(M.description,t?"text-disabled":"text-low-em","truncate max-w-full"),children:d})]})]}),o.jsxs("div",{className:N.clsx("flex items-center ml-auto",M.rightGap),children:[s&&o.jsx(ie,{size:M.trailingIcon,color:t?"var(--text-disabled)":"var(--high-em)",children:y||o.jsx(F.ArrowRight2,{})}),l&&j&&o.jsx(Rr,{size:M.tag,variant:S,disabled:t,leadingIcon:!1,trailingIcon:!1,children:j}),c&&A&&o.jsx("span",{className:N.clsx(M.trailingText,t?"text-disabled":"text-low-em"),children:A})]})]});return k==="div"?o.jsx("div",{className:L,...T,children:q}):o.jsx("button",{type:"button",disabled:t,onClick:E,className:L,...T,children:q})};function Y6(e,t){const[r,n]=P.useState(e);return P.useEffect(()=>{const a=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(a)}},[e,t]),r}const X6={position:"fixed",visibility:"hidden",top:0,left:0,zIndex:50};function Gi({triggerRef:e,panelRef:t,enabled:r,offset:n=8,constrain:a=!1}){const[i,s]=P.useState(X6);return P.useLayoutEffect(()=>{if(!r)return;const l=()=>{if(!e.current||!t.current)return;const c=e.current.getBoundingClientRect(),u=t.current.getBoundingClientRect(),d=window.innerWidth,f=window.innerHeight,h=16,p=f-c.bottom-n-h,g=c.top-n-h;let x,m;p>=u.height||p>=g?(x=c.bottom+n,m=f-x-h):(m=g,x=c.top-n-Math.min(u.height,m));let v=c.right-u.width;v<h&&(v=c.left),v=Math.max(h,v),s({position:"fixed",top:x,left:v,...a&&{maxHeight:Math.max(0,m),maxWidth:d-h*2},visibility:"visible",zIndex:50})};return l(),window.addEventListener("scroll",l,!0),window.addEventListener("resize",l),()=>{window.removeEventListener("scroll",l,!0),window.removeEventListener("resize",l)}},[r,e,t,n]),i}function el({refs:e,onClose:t,enabled:r=!0}){P.useEffect(()=>{if(!r)return;const n=i=>{e.some(s=>s.current?.contains(i.target))||t()},a=i=>{e.some(s=>s.current?.contains(i.target))||t()};return document.addEventListener("mousedown",n),window.addEventListener("scroll",a,!0),()=>{document.removeEventListener("mousedown",n),window.removeEventListener("scroll",a,!0)}},[r,t])}function Q6({triggerRef:e,open:t,onClose:r,constrain:n=!1,offset:a}){const i=P.useRef(null),s=Gi({triggerRef:e,panelRef:i,enabled:t,constrain:n,offset:a});return P.useEffect(()=>{if(!t)return;const c=u=>{u.key==="Escape"&&r()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[t,r]),{panelRef:i,portalStyle:s,backdropProps:{style:{position:"fixed",inset:0,zIndex:49},onMouseDown:r}}}function tl(){const e=P.useRef(null),[t,r]=P.useState(1/0);return P.useEffect(()=>{const n=e.current;if(!n)return;const a=new ResizeObserver(i=>{r(i[0].contentRect.width)});return a.observe(n),()=>a.disconnect()},[]),[e,t]}function J6(){const e=P.useRef(null),[t,r]=P.useState(0);return P.useEffect(()=>{const n=e.current;if(!n)return;const a=new ResizeObserver(i=>{r(i[0].contentRect.height)});return a.observe(n),()=>a.disconnect()},[]),[e,t]}const eN={xs:"rounded-[8px]",sm:"rounded-[12px]",md:"rounded-[16px]",lg:"rounded-[20px]"},Wt=({items:e=[],header:t,headerSize:r="xs",size:n="md",selectedIds:a=[],onSelect:i,floating:s=!1,triggerRef:l,onClose:c,className:u,...d})=>{const f=eN[n],h=!!l,p=O.default.useRef(null);el({refs:[p,...l?[l]:[]],onClose:c??(()=>{}),enabled:!!c});const g=Gi({triggerRef:l??{current:null},panelRef:p,enabled:h}),x=o.jsxs("div",{ref:p,className:N.clsx("bg-surface-bg border border-surface-3 overflow-hidden","flex flex-col w-fit",f,!h&&s&&"absolute z-50",u),style:{boxShadow:"0px 8px 24px -4px rgba(0, 0, 0, 0.12)",...h?g:{}},...d,children:[t&&o.jsxs(o.Fragment,{children:[o.jsx(Qt,{size:r,title:t.title,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,className:"shrink-0 cursor-default hover:bg-transparent active:bg-transparent",customTitleColor:"text-low-em"}),o.jsx("div",{className:"border-t border-surface-3"})]}),e.map((m,v)=>{const{id:b,showDividerAfter:w,onClick:C,onSelect:y,customBackgroundColor:j,customHoverColor:S,...A}=m,_=b?a.includes(b):!1,I=v===e.length-1;return o.jsxs(O.default.Fragment,{children:[o.jsx(Qt,{size:n,onClick:k=>{y?.(),b&&i?.(b),C?.(k)},customBackgroundColor:j||"bg-surface-bg",customHoverColor:S||"hover:bg-surface-2",className:N.clsx("shrink-0",_&&"bg-surface-1",A.className),checked:_,...A}),w&&!I&&o.jsx("div",{className:"border-t border-surface-3"})]},b||v)})]});return h&&typeof document<"u"?Ca.createPortal(x,document.body):x},S2=({id:e,title:t,preview:r,onClick:n,menuItems:a,className:i})=>{const[s,l]=P.useState(!1),c=P.useRef(null),u=P.useRef(null);P.useEffect(()=>{const f=h=>{c.current&&!c.current.contains(h.target)&&u.current&&!u.current.contains(h.target)&&l(!1)};return s&&document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[s]);const d=a?.map((f,h)=>{const p=h===a.length-1;return{...f,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!0,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showDividerAfter:h===a.length-2,className:N.clsx("!h-[34px]",f.className),...p&&{customTitleColor:"text-danger-em",customLeadingIconColor:"var(--danger-em)"}}})||[];return o.jsxs("div",{className:N.clsx("group flex items-start justify-between gap-3 px-8 py-4 hover:bg-surface-1 transition-colors cursor-pointer",i),onClick:n,children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"text-xs font-semibold text-med-em mb-1",children:t}),o.jsx("p",{className:"text-[10px] font-medium text-low-em",children:r})]}),a&&a.length>0&&o.jsxs("div",{className:"flex-shrink-0 relative",onClick:f=>f.stopPropagation(),children:[o.jsx(V,{ref:u,variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(F.More,{variant:"Linear"}),"aria-label":"Más opciones",onClick:()=>l(!s)}),s&&o.jsx("div",{ref:c,className:"absolute right-0 top-full mt-1 z-50",children:o.jsx(Wt,{items:d,size:"xs",className:"!w-[182px]",onSelect:f=>{const h=a.find(p=>p.id===f);h?.onClick&&h.onClick({}),l(!1)}})})]})]})},tN=e=>{const t=new Date,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=new Date(r.getTime()-10080*60*1e3),a=new Date(r.getTime()-720*60*60*1e3),i=new Date(r.getTime()-2160*60*60*1e3);return e.reduce((s,l)=>{const c=new Date(l.timestamp);return c>=r?s.today.push(l):c>=n?s.last7Days.push(l):c>=a?s.last30Days.push(l):c>=i&&s.last90Days.push(l),s},{today:[],last7Days:[],last30Days:[],last90Days:[]})},rN=(e,t)=>{if(!t.trim())return e;const r=t.toLowerCase();return e.filter(n=>n.title.toLowerCase().includes(r))},O2=({items:e,onItemClick:t,searchPlaceholder:r="Buscar en el historial...",className:n,onSearchChange:a,emptyState:i})=>{const[s,l]=P.useState(""),c=P.useMemo(()=>{const h=rN(e,s);return tN(h)},[e,s]),u=h=>{const p=h.target.value;l(p),a?.(p)},d=(h,p)=>p.length===0?null:o.jsxs("div",{children:[o.jsx("div",{className:"px-8 py-8",children:o.jsx("h3",{className:"text-xs font-semibold text-low-em",children:h})}),p.map((g,x)=>o.jsxs(O.default.Fragment,{children:[o.jsx(S2,{id:g.id,title:g.title,preview:g.preview,menuItems:g.menuItems,onClick:()=>t?.(g)}),x<p.length-1&&o.jsx("div",{className:"border-b border-surface-2"})]},g.id))]},h),f=c.today.length===0&&c.last7Days.length===0&&c.last30Days.length===0&&c.last90Days.length===0;return o.jsxs("div",{className:N.clsx("flex flex-col",n),children:[o.jsx("div",{className:"px-8 pt-9",children:o.jsx(xe,{size:"md",variant:"default",placeholder:r,leadingIcon:o.jsx(F.SearchNormal,{size:20,variant:"Linear"}),value:s,onChange:u})}),f?s?o.jsx("div",{className:"flex flex-col items-center justify-center py-12 px-8",children:o.jsxs("p",{className:"text-sm text-low-em text-center",children:['No se encontraron resultados para "',s,'"']})}):i??null:o.jsxs("div",{className:"flex flex-col",children:[d("Hoy",c.today),d("Últimos 7 días",c.last7Days),d("Últimos 30 días",c.last30Days),d("Últimos 90 días",c.last90Days)]})]})},nN=[{id:"conversation",label:"Conversación"},{id:"constructor",label:"Constructor"}],N2=({inputValue:e,onInputChange:t,onSendClick:r,placeholder:n="Input Text",variant:a="default",className:i,minLines:s=2,maxLines:l=10})=>{const[c,u]=P.useState("conversation"),d=P.useRef(null),f=20,h=s*f,p=l*f;P.useEffect(()=>{const x=d.current?.querySelector("textarea");if(!x)return;x.style.height="0px",x.style.overflow="hidden";const m=x.scrollHeight,v=Math.max(h,Math.min(m,p));x.style.height=`${v}px`,x.style.overflow=m>p?"auto":"hidden"},[e,h,p]);const g=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),r?.())};return o.jsxs("div",{ref:d,className:N.clsx("flex flex-col gap-3 p-4 rounded-xl bg-surface-2 border border-surface-3",i),children:[o.jsx("div",{className:"mb-1",children:o.jsx(V,{variant:"neutral",hierarchy:"quaternary",size:"xs",icons:"only",leadingIcon:o.jsx(F.Hashtag,{}),"aria-label":"Add"})}),o.jsx(hl,{variant:"default",placeholder:n,value:e,onChange:x=>t?.(x.target.value),onKeyDown:g,resize:"none",className:"[&_textarea]:!min-h-0"}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center justify-start gap-4",children:[o.jsx("div",{className:"flex items-center gap-4",children:o.jsx(V,{variant:"neutral",hierarchy:"quaternary",size:"md",borderRadius:"12px",icons:"only",leadingIcon:o.jsx(F.AddCircle,{}),"aria-label":"Add"})}),a==="default"&&o.jsx(fl,{withBorder:!0,items:nN,value:c,onChange:u,size:"ai-chat"})]}),o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"md",icons:"only",borderRadius:"12px",leadingIcon:o.jsx(r2,{}),onClick:r,"aria-label":"Send"})]})]})},li=({variant:e,hierarchy:t="flat",children:r,className:n})=>o.jsx("div",{className:N.clsx("chat-message-container",e==="sent"?"chat-message-sent":"chat-message-received",t==="bubble"&&e==="sent"&&"bg-surface-2 px-4 rounded-lg rounded-tr-none",t==="bubble"&&e==="received"&&"bg-white px-4 rounded-lg rounded-tl-none",n),children:o.jsx("div",{className:N.clsx("chat-message-content",e==="sent"?"chat-message-sent-content":"chat-message-received-content"),children:r})}),xh=({className:e,onCopyClick:t,onLikeClick:r,onDislikeClick:n,onRefreshClick:a})=>{const[i,s]=P.useState(!1),[l,c]=P.useState(!1),u=()=>{s(!i),r?.()},d=()=>{c(!l),n?.()};return o.jsxs("div",{className:N.clsx("inline-flex items-center gap-4",e),children:[o.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Copy message",children:o.jsx(ie,{size:"sm",children:o.jsx(F.Copy,{})})}),o.jsx("button",{onClick:u,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Like message",children:o.jsx(ie,{size:"sm",children:i?o.jsx(F.Like1,{variant:"Bold"}):o.jsx(F.Like1,{variant:"Outline"})})}),o.jsx("button",{onClick:d,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Dislike message",children:o.jsx(ie,{size:"sm",children:l?o.jsx(F.Dislike,{variant:"Bold"}):o.jsx(F.Dislike,{variant:"Outline"})})}),o.jsx("button",{onClick:a,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Refresh response",children:o.jsx(ie,{size:"sm",children:o.jsx(F.Refresh,{})})})]})},P2=({fileName:e,fileSize:t,alignment:r="left",className:n,...a})=>o.jsx("a",{href:a.href||"#",download:!0,className:N.clsx("block w-full border border-surface-2 p-4 transition-colors hover:bg-surface-2","py-6 px-8 h-[68px]",{"rounded-tr-lg rounded-br-lg rounded-bl-lg":r==="left","rounded-tl-lg rounded-bl-lg rounded-br-lg":r==="right"},n),...a,children:o.jsxs("div",{className:"flex flex-col text-low-em",children:[o.jsx("span",{className:"font-medium text-sm",children:e}),o.jsx("span",{className:"font-normal text-sm",children:t})]})}),rm=({className:e})=>o.jsx("div",{className:N.clsx("w-full max-w-max self-start",e),children:o.jsx("div",{className:"flex items-center gap-1 px-4 py-3",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"w-3 h-3 bg-low-em rounded-full animate-typing-dot",style:{animationDelay:"0ms"}}),o.jsx("span",{className:"w-3 h-3 bg-surface-4 rounded-full animate-typing-dot",style:{animationDelay:"200ms"}}),o.jsx("span",{className:"w-3 h-3 bg-low-em rounded-full animate-typing-dot",style:{animationDelay:"400ms"}})]})})}),aN=O.default.lazy(()=>Promise.resolve().then(()=>require("./index-DjVJd8bb.cjs"))),Gx=({children:e})=>o.jsx(P.Suspense,{fallback:o.jsx("span",{children:e}),children:o.jsx(aN,{children:e})}),A2=O.default.memo(({messages:e,showTypingIndicator:t=!1,children:r,className:n,borderSide:a="none",borderStyle:i="surface-3",showHeader:s=!1,headerHeight:l=56,activeView:c="chat",onChatClick:u,onHistorialClick:d,onSettingsClick:f,onCloseClick:h,containerWidth:p=0,historialItems:g=[],onHistorialItemClick:x,historialSearchPlaceholder:m,onHistorialSearchChange:v,historialEmptyState:b,showChatInput:w=!0,chatInputValue:C,onChatInputChange:y,onChatSendClick:j,chatInputPlaceholder:S="Input Text",chatInputVariant:A="default",chatInputMinLines:_=2,chatInputMaxLines:I=10,onMessageCopyClick:k,onMessageLikeClick:E,onMessageDislikeClick:T,onMessageRefreshClick:M})=>{const R=O.default.useMemo(()=>a==="none"?"":`${a==="left"?"border-l":"border-r"} ${i==="surface-3"?"border-surface-3":"border-surface-4"}`,[a,i]);return o.jsxs("div",{className:`h-full w-full flex flex-col bg-white ${R} ${n||""}`,children:[s&&o.jsxs(o.Fragment,{children:[o.jsx("div",{style:{height:`${l}px`},children:o.jsx(C2,{activeView:c,onChatClick:u,onHistorialClick:d,onSettingsClick:f,onCloseClick:h,containerWidth:p,className:"pl-8 items-end h-full"})}),o.jsx(he,{})]}),c==="historial"?o.jsx(O2,{items:g,onItemClick:x,searchPlaceholder:m,onSearchChange:v,emptyState:b,className:"flex-1 overflow-y-auto"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex-1 overflow-y-auto",children:e?o.jsxs("div",{className:"flex flex-col gap-10 px-9 py-6",children:[e.map(L=>o.jsx(O.default.Fragment,{children:L.attachment?o.jsxs("div",{className:`flex flex-col gap-4 ${L.variant==="sent"?"items-end":"items-start"}`,children:[o.jsxs("div",{className:`flex flex-col gap-10 ${L.variant==="sent"?"items-end":"items-start"}`,children:[o.jsx(li,{variant:L.variant,hierarchy:"bubble",children:typeof L.content=="string"?o.jsx(Gx,{children:L.content}):L.content}),o.jsx("div",{className:"w-auto max-w-[300px]",children:o.jsx(P2,{fileName:L.attachment.fileName,fileSize:L.attachment.fileSize,alignment:L.variant==="sent"?"right":"left",href:L.attachment.href})})]}),L.variant==="received"&&o.jsx(xh,{onCopyClick:()=>k?.(L.id),onLikeClick:()=>E?.(L.id),onDislikeClick:()=>T?.(L.id),onRefreshClick:()=>M?.(L.id)})]}):o.jsxs("div",{className:`flex flex-col ${L.variant==="sent"?"items-end":"items-start"}`,children:[o.jsx(li,{variant:L.variant,hierarchy:"bubble",children:typeof L.content=="string"?o.jsx(Gx,{children:L.content}):L.content}),L.variant==="received"&&o.jsx(xh,{onCopyClick:()=>k?.(L.id),onLikeClick:()=>E?.(L.id),onDislikeClick:()=>T?.(L.id),onRefreshClick:()=>M?.(L.id)})]})},L.id)),t&&o.jsx(rm,{})]}):r}),w&&o.jsx("div",{className:"p-4",children:o.jsx(N2,{minLines:_,maxLines:I,inputValue:C,onInputChange:y,onSendClick:j,placeholder:S,variant:A,containerWidth:p})})]})]})});A2.displayName="ChatPanel";const ht=O.default.memo(({icon:e=o.jsx(ie,{size:56,children:o.jsx(F.Box2,{})}),description:t,actionLabel:r,onAction:n,flat:a=!1,className:i,iconClassName:s,descriptionClassName:l})=>o.jsx("div",{className:N.clsx("flex flex-col items-center justify-center w-full",a?"bg-surface-1 p-10":"rounded-6 bg-surface-1 p-10 border border-surface-2",i),children:o.jsxs("div",{className:"flex flex-col items-center gap-10 text-center",children:[o.jsx("span",{className:N.clsx("text-low-em",s),children:e}),t&&o.jsx("p",{className:N.clsx("text-lg font-medium text-low-em",l),children:t}),r&&o.jsx(V,{variant:"secondary",hierarchy:"primary",size:"md",icons:"leading",leadingIcon:o.jsx(F.Add,{}),onClick:n,children:r})]})}));ht.displayName="EmptyState";function iN(e){const t=new Date(e),n=Math.floor((new Date().getTime()-t.getTime())/1e3),a=Math.floor(n/60),i=Math.floor(a/60),s=Math.floor(i/24);return n<60?"Just now":a<60?`${a}m ago`:i<24?`${i}h ago`:s<7?t.toLocaleDateString("en-US",{weekday:"short"}):t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}const oN=({id:e,name:t,timestamp:r,status:n,avatarUrl:a,avatarInitials:i,isActive:s=!1,onClick:l,className:c})=>o.jsxs("button",{type:"button",id:e,onClick:l,className:N.clsx("flex items-center gap-6 w-full px-8 py-8 text-left transition-colors",s?"bg-surface-2":"hover:bg-surface-1 active:bg-surface-2",c),children:[o.jsx(Bt,{size:"md",imageUrl:a,initials:i}),o.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:t}),o.jsxs("div",{className:"flex items-center gap-8 shrink-0",children:[o.jsx("span",{className:"text-xs font-medium text-high-em whitespace-nowrap",children:iN(r)}),n&&o.jsx(Ge,{variant:"status",statusState:n,size:"sm"})]})]}),Zx=({items:e,activeId:t,searchValue:r="",searchPlaceholder:n="Search chats...",emptyState:a,onItemClick:i,onSearchChange:s,className:l})=>o.jsxs("div",{className:N.clsx("flex flex-col h-full",l),children:[o.jsx("div",{className:"flex items-center h-[64px] px-8 shrink-0",children:o.jsx(xe,{size:"md",variant:"default",placeholder:n,trailingIcon:o.jsx(F.SearchNormal1,{variant:"Linear"}),value:r,onChange:c=>s?.(c.target.value),className:"w-full"})}),o.jsx("div",{className:"border-b border-surface-3 shrink-0"}),e.length===0?o.jsx("div",{className:"flex-1 flex items-center justify-center",children:a??o.jsx(ht,{flat:!0,className:"bg-transparent",description:"No chats yet"})}):o.jsx("div",{className:"flex-1 overflow-y-auto",children:e.map((c,u)=>o.jsxs(O.default.Fragment,{children:[o.jsx(oN,{...c,isActive:c.id===t,onClick:()=>i?.(c)}),u<e.length-1&&o.jsx("div",{className:"border-b border-surface-3"})]},c.id))})]}),he=({direction:e="horizontal",width:t,height:r,className:n})=>{const a=e==="horizontal"?"100%":"0.5px",i=e==="horizontal"?"0.5px":"100%",s=N.clsx(n,"bg-surface-3 items-center"),l={width:t??a,height:r??i};return o.jsx("div",{className:s,style:l})};function Yx(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function sN(e){return e==="whatsapp"?o.jsx(F.Whatsapp,{size:18,variant:"Bold"}):e==="email"?o.jsx(F.Sms,{size:18,variant:"Linear"}):e==="phone"?o.jsx(F.Call,{size:18,variant:"Linear"}):null}const lN={completada:"success",pendiente:"warning",cancelada:"danger"},cN={completada:"Completada",pendiente:"Pendiente",cancelada:"Cancelada"},uN=({order:e})=>o.jsxs("div",{className:"flex flex-col gap-6 p-8 bg-surface-1 rounded-6",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.orderNumber}),o.jsx("span",{className:"text-xs text-low-em",children:e.date})]}),e.images&&e.images.length>0&&o.jsx("div",{className:"flex gap-4",children:e.images.slice(0,4).map((t,r)=>o.jsx("img",{src:t,alt:"",className:"w-12 h-12 rounded-4 object-cover bg-surface-2"},r))}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.time&&o.jsx("span",{className:"text-xs text-low-em",children:e.time}),o.jsx("span",{className:"text-sm font-semibold text-high-em ml-auto",children:e.price})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx(Ge,{variant:"simple",theme:lN[e.status],size:"sm",children:cN[e.status]}),o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"none",onClick:e.onViewDetails,children:"Ver detalles"})]})]}),dN=({field:e})=>o.jsxs("div",{className:"flex items-center gap-8 px-8 py-6",children:[o.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-1",children:[o.jsx("span",{className:"text-xs text-low-em",children:e.label}),o.jsx("span",{className:"text-sm font-semibold text-high-em truncate",children:e.value})]}),e.onEdit&&o.jsx(V,{variant:"neutral",hierarchy:"quaternary",size:"xs",icons:"only",leadingIcon:o.jsx(F.Edit2,{size:16,variant:"Linear"}),onClick:e.onEdit})]}),Xx=({contact:e,messages:t=[],orders:r=[],isDetailOpen:n=!1,showTypingIndicator:a=!1,inputValue:i="",inputPlaceholder:s="Escribe un mensaje...",onBack:l,onCallClick:c,onVideoClick:u,onDetailOpen:d,onDetailClose:f,onInputChange:h,onSendClick:p,onMoreClick:g,className:x})=>{const m=sN(e.channel);return o.jsxs("div",{className:N.clsx("flex relative overflow-hidden h-full bg-surface-bg",x),children:[o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-4 px-8 h-[64px] shrink-0",children:[o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(F.ArrowLeft2,{size:18,variant:"Linear"}),onClick:l}),o.jsxs("button",{type:"button",className:"flex items-center gap-6 flex-1 min-w-0 text-left",onClick:d,children:[o.jsx(Bt,{size:"md",imageUrl:e.avatarUrl,initials:e.avatarInitials}),o.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),m&&o.jsx("span",{className:"text-low-em shrink-0",children:m})]}),o.jsx(mr,{size:"sm",variant:"neutral",value:"",onChange:v=>{v==="call"&&c?.(),v==="video"&&u?.()},options:[{value:"call",icon:o.jsx(F.Call,{variant:"Linear"})},{value:"video",icon:o.jsx(F.Video,{variant:"Linear"})}]}),g&&o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(F.More,{size:18,variant:"Linear"}),onClick:g})]}),o.jsx(he,{}),o.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col gap-8 p-8",children:[t.map(v=>{const b=v.attachment?o.jsxs("div",{className:"flex flex-col gap-4",children:[v.content&&o.jsx("span",{children:v.content}),o.jsxs("a",{href:v.attachment.href??"#",className:"flex items-center gap-4 text-xs underline opacity-80",children:[o.jsx("span",{className:"font-medium",children:v.attachment.fileName}),o.jsxs("span",{children:["(",v.attachment.fileSize,")"]})]})]}):v.content;return v.variant==="received"?o.jsxs("div",{className:"flex items-start gap-6",children:[o.jsx(Bt,{size:"sm",imageUrl:e.avatarUrl,initials:e.avatarInitials}),o.jsxs("div",{className:"flex flex-col gap-2 max-w-[85%]",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("span",{className:"text-sm font-medium text-low-em",children:v.senderName}),o.jsx("span",{className:"text-xs text-low-em",children:v.timeLabel??Yx(v.timestamp)})]}),o.jsx(li,{variant:"received",hierarchy:"bubble",className:"px-8 py-6 text-high-em",children:b})]})]},v.id):o.jsxs("div",{className:"flex flex-col gap-2 max-w-[85%] self-end",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("span",{className:"text-sm font-medium text-low-em",children:v.senderName??"You"}),o.jsx("span",{className:"text-xs text-low-em",children:v.timeLabel??Yx(v.timestamp)})]}),o.jsx(li,{variant:"sent",hierarchy:"bubble",className:"px-8 py-6 text-high-em",children:b})]},v.id)}),a&&o.jsxs("div",{className:"flex items-start gap-6",children:[o.jsx(Bt,{size:"sm",imageUrl:e.avatarUrl,initials:e.avatarInitials}),o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.name}),o.jsx(rm,{className:"-ml-2"})]})]})]}),o.jsx(he,{}),o.jsxs("div",{className:"flex items-center gap-4 px-8 py-6 shrink-0",children:[o.jsx("div",{className:"flex-1",children:o.jsx(xe,{size:"md",variant:"default",placeholder:s,value:i,onChange:v=>h?.(v.target.value)})}),o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(F.Send2,{size:18,variant:"Linear"}),onClick:p})]})]}),o.jsxs("div",{className:N.clsx("absolute inset-y-0 right-0 w-full flex flex-col bg-surface-bg transition-transform duration-300",n?"translate-x-0":"translate-x-full"),children:[o.jsxs("div",{className:"flex items-center gap-6 px-8 py-6 shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-6 flex-1 min-w-0",children:[o.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),m&&o.jsx("span",{className:"text-low-em shrink-0",children:m})]}),o.jsx(V,{variant:"neutral",hierarchy:"quaternary",size:"sm",icons:"only",leadingIcon:o.jsx(F.CloseCircle,{size:18,variant:"Linear"}),onClick:f})]}),o.jsx(he,{}),o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e.fields&&e.fields.length>0&&o.jsxs("div",{className:"flex flex-col",children:[o.jsx("div",{className:"px-8 py-6",children:o.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:"Información de contacto"})}),e.fields.map((v,b)=>o.jsxs(O.default.Fragment,{children:[o.jsx(dN,{field:v}),b<(e.fields?.length??0)-1&&o.jsx(he,{})]},v.label))]}),e.fields&&e.fields.length>0&&r.length>0&&o.jsx(he,{}),r.length>0&&o.jsxs("div",{className:"flex flex-col gap-8 p-8",children:[o.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:"Pedidos"}),r.map(v=>o.jsx(uN,{order:v},v.id))]})]})]})]})};function fN(e){return e==="whatsapp"?o.jsx(F.Whatsapp,{size:18,variant:"Bold"}):e==="email"?o.jsx(F.Sms,{size:18,variant:"Linear"}):e==="phone"?o.jsx(F.Call,{size:18,variant:"Linear"}):null}const hN={completada:"success",pendiente:"warning",cancelada:"danger"},pN={completada:"Completada",pendiente:"Pendiente",cancelada:"Cancelada"},mN=({order:e})=>o.jsxs("div",{className:"flex flex-col gap-6 p-8 bg-white",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(ie,{size:"sm",children:o.jsx(F.DocumentText,{variant:"Linear"})}),o.jsx("span",{className:"text-base text-high-em",children:e.orderNumber})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(ie,{size:"sm",children:o.jsx(F.Calendar,{variant:"Linear"})}),o.jsx("span",{className:"text-base text-high-em",children:e.date})]})]}),o.jsx("div",{className:"h-px bg-surface-3"}),o.jsxs("div",{className:"flex items-center gap-4",children:[e.time&&o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(ie,{size:"sm",children:o.jsx(F.Clock,{variant:"Linear"})}),o.jsx("span",{className:"text-base text-high-em",children:e.time})]}),o.jsx("span",{className:"text-base text-high-em ml-auto",children:e.price})]}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx(Ge,{variant:"outlined",theme:hN[e.status],size:"sm",children:e.statusLabel??pN[e.status]}),o.jsx(V,{variant:"secondary",hierarchy:"primary",size:"sm",icons:"none",onClick:e.onViewDetails,children:e.viewDetailsLabel??"Ver detalles"})]})]}),xN=({field:e})=>o.jsxs("div",{className:"flex items-center gap-8 px-8 py-6 bg-white",children:[o.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-1",children:[o.jsx("span",{className:"text-xs text-low-em",children:e.label}),o.jsx("span",{className:"text-sm font-semibold text-high-em truncate",children:e.value})]}),e.onEdit&&o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(F.Edit2,{size:16,variant:"Linear"}),onClick:e.onEdit})]}),Qx=({contact:e,orders:t=[],contactSectionLabel:r="Información de contacto",ordersSectionLabel:n="Pedidos",emptyOrdersDescription:a="Sin pedidos",onClose:i,className:s})=>{const l=fN(e.channel);return o.jsxs("div",{className:N.clsx("flex flex-col h-full bg-surface-bg",s),children:[o.jsxs("div",{className:"flex items-center gap-6 px-8 h-[64px] shrink-0 bg-white",children:[o.jsx(Bt,{size:"md",imageUrl:e.avatarUrl,initials:e.avatarInitials}),o.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[o.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),l&&o.jsx("span",{className:"text-low-em shrink-0",children:l})]}),o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(nt,{size:18}),onClick:i})]}),o.jsx(he,{}),o.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col",children:[e.fields&&e.fields.length>0&&o.jsxs("div",{className:"flex flex-col",children:[o.jsx("div",{className:"px-8 py-6 border-b border-surface-3",children:o.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:r})}),e.fields.map((c,u)=>o.jsxs(O.default.Fragment,{children:[o.jsx(xN,{field:c}),u<(e.fields?.length??0)-1&&o.jsx(he,{})]},c.label)),o.jsx(he,{})]}),o.jsxs("div",{className:"flex flex-col flex-1 bg-white",children:[o.jsx("div",{className:"px-8 py-6 border-b border-surface-3",children:o.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:n})}),t.length>0?o.jsx("div",{className:"flex flex-col divide-y divide-surface-3 overflow-y-auto",children:t.map(c=>o.jsx(mN,{order:c},c.id))}):o.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:o.jsx(ht,{flat:!0,description:a,className:"bg-transparent"})})]})]})]})},gN=600,vN=({conversations:e,searchPlaceholder:t,emptyListDescription:r,emptyConversationDescription:n="Selecciona una conversación",contactSectionLabel:a="Información de contacto",ordersSectionLabel:i="Pedidos",emptyOrdersDescription:s="Sin pedidos",inputPlaceholder:l="Escribe un mensaje...",inputValue:c,searchValue:u,onSearchChange:d,onSendClick:f,onInputChange:h,className:p})=>{const[g,x]=tl(),m=x<gN,[v,b]=P.useState("list"),[w,C]=P.useState(null),[y,j]=P.useState(!1),S=w?e.find(k=>k.id===w)??null:null,A=e.map(({id:k,name:E,timestamp:T,status:M,avatarUrl:R,avatarInitials:$})=>({id:k,name:E,timestamp:T,status:M,avatarUrl:R,avatarInitials:$})),_=k=>{C(k),b("conversation")},I=w?e.find(k=>k.id===w)??null:null;return m?o.jsxs("div",{ref:g,className:N.clsx("flex flex-col h-full",p),children:[v==="list"&&o.jsx(Zx,{items:A,activeId:w??void 0,searchPlaceholder:t,emptyState:r?o.jsx(ht,{flat:!0,className:"bg-transparent",description:r}):void 0,searchValue:u,onSearchChange:d,onItemClick:k=>_(k.id)}),v==="conversation"&&I&&o.jsx(Xx,{contact:I.contact,messages:I.messages,inputPlaceholder:l,inputValue:c,onBack:()=>{b("list"),C(null)},onMoreClick:()=>b("sidebar"),onSendClick:f,onInputChange:h}),v==="sidebar"&&I&&o.jsx(Qx,{contact:I.sidebarContact,orders:I.orders,contactSectionLabel:a,ordersSectionLabel:i,emptyOrdersDescription:s,onClose:()=>b("conversation")})]}):o.jsxs("div",{ref:g,className:N.clsx("flex h-full",p),children:[o.jsx("div",{className:"flex-1 min-w-0 border-r border-surface-3",children:o.jsx(Zx,{items:A,activeId:w??void 0,searchPlaceholder:t,emptyState:r?o.jsx(ht,{flat:!0,className:"bg-transparent",description:r}):void 0,searchValue:u,onSearchChange:d,onItemClick:k=>{C(k.id),j(!1)}})}),S?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:N.clsx(y?"flex-1":"flex-[2]","min-w-0"),children:o.jsx(Xx,{contact:S.contact,messages:S.messages,inputPlaceholder:l,inputValue:c,onBack:()=>{C(null),j(!1)},onMoreClick:()=>j(k=>!k),onSendClick:f,onInputChange:h})}),y&&o.jsx("div",{className:"flex-1 min-w-0 border-l border-surface-3",children:o.jsx(Qx,{contact:S.sidebarContact,orders:S.orders,contactSectionLabel:a,ordersSectionLabel:i,emptyOrdersDescription:s,onClose:()=>j(!1)})})]}):o.jsx("div",{className:"flex-[2] min-w-0 flex items-center justify-center bg-surface-bg",children:o.jsx(ht,{flat:!0,description:n,className:"bg-transparent"})})]})},yN={sm:{container:"px-4 py-3 text-xs font-medium leading-[18px]",iconSize:16,gapValue:"6px"},md:{container:"px-5 py-4 text-sm font-semibold leading-[22px]",iconSize:16,gapValue:"6px"}},bN={drag:"cursor-grabbing shadow-[0_8px_14px_-4px_rgba(0,0,0,0.2)]",hover:"opacity-90 hover:scale-[1.02] transition-transform",default:"border border-surface-4"},wN=(e,t)=>t==="disabled"?"bg-surface-3 border-none text-disabled":t==="hover"?e==="selected"?"bg-surface-2 border-surface-3 text-high-em":"bg-surface-2 border-surface-4 text-high-em":t==="focus"?e==="selected"?"bg-surface-2 border-2 border-surface-3 text-high-em":"bg-surface-2 border-2 border-surface-4 text-high-em":t==="drag"?e==="selected"?"bg-surface-2 border-surface-3 text-high-em":"bg-surface-2 border-surface-4 text-high-em":"",jN=({size:e="md",type:t="unselected",state:r="default",children:n,leftContent:a,rightContent:i,onClick:s,className:l,showLeftContent:c=!0,showRightContent:u=!0,showText:d=!0})=>{const f=A=>{if(!O.default.isValidElement(A))return A;const _=A,I=_.props.style||{},k={..._.props,style:{...I,width:"100%",height:"100%",display:"block"},size:void 0};return O.default.cloneElement(_,k)},h=!!s&&r!=="disabled",p=!!a&&c,g=!!i&&u,x=yN[e],m=bN[r],v=wN(t,r),b=te.twMerge("inline-flex items-center border border-solid transition-all duration-150 rounded-full font-family-inter",m,x.container,v,h&&"cursor-pointer hover:opacity-90 active:opacity-100",r==="disabled"&&"cursor-not-allowed",r==="drag"&&"cursor-grabbing",l),w="flex-shrink-0 inline-flex items-center justify-center",C=x.iconSize,y=x.gapValue,j=o.jsx("div",{className:w,style:{marginRight:y,width:`${C}px`,height:`${C}px`},children:p?f(a):null}),S=o.jsx("div",{className:w,style:{marginLeft:y,width:`${C}px`,height:`${C}px`},children:g?f(i):null});return o.jsxs("div",{className:b,role:h?"button":"status",onClick:h?s:void 0,tabIndex:h?0:void 0,children:[j,d&&o.jsx("span",{className:"shrink-0",children:n}),S]})},CN=["--black","--white","--black-uniform","--white-uniform","--surface-bg","--surface-1","--surface-2","--surface-3","--surface-4","--disabled","--placeholder","--low-em","--med-em","--high-em","--brand-primary-main","--brand-primary-main-special","--brand-primary-accent-special","--brand-primary-accent-3","--brand-secondary-main","--brand-secondary-accent-3","--warning-em","--warning-main","--warning-accent-3","--warning-accent-1","--warning-accent-0","--success-em","--success-main","--success-accent-3","--success-accent-2","--success-accent-1","--info-em","--info-main","--info-accent-3","--info-accent-2","--info-accent-1","--danger-em","--danger-main","--danger-accent-3","--danger-accent-2","--danger-accent-1"],SN=()=>{if(typeof document>"u")return[];const e=[],t=getComputedStyle(document.documentElement);return CN.forEach(r=>{const n=t.getPropertyValue(r).trim();n&&e.push({name:r,value:n.toUpperCase()})}),e},ON=({colors:e})=>{const[t,r]=P.useState(e||[]),[n,a]=P.useState(0);return P.useEffect(()=>{if(e){r(e);return}r(SN())},[e,n]),P.useEffect(()=>{if(e)return;const i=new MutationObserver(s=>{s.forEach(l=>{l.type==="attributes"&&l.attributeName==="class"&&a(c=>c+1)})});return i.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>i.disconnect()},[e]),o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:t.map(({name:i,value:s})=>o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"1rem",fontFamily:"monospace"},children:[o.jsx("div",{style:{width:"50px",height:"50px",backgroundColor:s,border:"1px solid #ccc",borderRadius:"4px"}}),o.jsxs("div",{children:[o.jsx("div",{style:{fontWeight:"bold"},children:i}),o.jsx("div",{children:s})]})]},i))})},NN=({disabled:e=!1,className:t,...r})=>o.jsxs("div",{className:te.twMerge(N.clsx("inline-flex flex-col items-center justify-center gap-[2px]","w-[17px] h-[80px] rounded-full border border-surface-3 bg-white","cursor-grab active:cursor-grabbing transition-opacity",e&&"opacity-50 cursor-not-allowed",t)),...r,children:[o.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"}),o.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"}),o.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"})]}),nm=({className:e,disabled:t=!1,onDrag:r,dragHandleProps:n,onDuplicate:a,onDelete:i,...s})=>{const[l,c]=P.useState(""),u=f=>{c(f),f==="duplicate"&&a?.(),f==="delete"&&i?.()},d=[...a?[{value:"duplicate",icon:o.jsx(Zs,{size:12})}]:[],...i?[{value:"delete",icon:o.jsx(Ys,{size:12})}]:[]];return o.jsx("div",{className:N.clsx("border-b border-surface-3 min-h-[28px]",e),...s,children:o.jsxs("div",{className:"flex justify-center",children:[(r||n)&&o.jsx("button",{type:"button",className:N.clsx("h-[28px] px-[9.2px]","inline-flex items-center justify-center","border-none bg-transparent rounded-none","transition-colors duration-200",t?"opacity-50 cursor-not-allowed pointer-events-none":"hover:bg-surface-2 cursor-grab"),onClick:r,disabled:t,...n,children:o.jsx(Gs,{size:12})}),d.length>0&&o.jsx(mr,{options:d,value:l,onChange:u,size:"xs",variant:"secondary",disabled:t,buttonClassName:"rounded-none"})]})})},PN={text_icon:{showLeadingIcon:!0,showLeadingAvatar:!1,showInput:!0,showTrailingChevron:!0,showTrailingAddon:!1},text_image:{showLeadingIcon:!1,showLeadingAvatar:!0,showInput:!0,showTrailingChevron:!0,showTrailingAddon:!1},only_icon:{showLeadingIcon:!1,showLeadingAvatar:!1,showInput:!1,showTrailingChevron:!0,showTrailingAddon:!1},text_icon_text:{showLeadingIcon:!0,showLeadingAvatar:!1,showInput:!0,showTrailingChevron:!1,showTrailingAddon:!0}},AN={default:{fill:{wrapper:"border-none bg-gray-100 focus-within:ring-gray-500 text-dark-300",hint:"text-primary-300",input:"text-primary-300 placeholder-gray-500"},outlined:{wrapper:"border-gray-500 bg-white focus-within:ring-gray-600 text-dark-300",hint:"text-gray-600",input:"text-dark-300 placeholder-gray-500"}},danger:{fill:{wrapper:"border-danger-200 bg-danger-50 focus-within:ring-danger-200 text-danger-600",hint:"text-danger-600",input:"text-danger-600 placeholder-danger-400"},outlined:{wrapper:"border-danger-300 bg-white text-danger-600 focus-within:ring-danger-200",hint:"text-danger-600",input:"text-danger-600 placeholder-danger-400"}},success:{fill:{wrapper:"border-success-300 bg-success-50 focus-within:ring-success-200 text-success-600",hint:"text-success-600",input:"text-success-900 placeholder-success-400"},outlined:{wrapper:"border-success-300 bg-white text-success-600 focus-within:ring-success-200",hint:"text-success-600",input:"text-success-900 placeholder-success-400"}}},_N="opacity-50 bg-gray-100 cursor-not-allowed",kN={sm:{wrapper:"h-[32px] text-[10px] px-4",icon:14,avatar:"w-[12px] h-[12px]"},md:{wrapper:"h-[38px] text-[14px] px-6",icon:16,avatar:"w-[16px] h-[16px]"},lg:{wrapper:"h-[48px] text-[16px] px-8",icon:20,avatar:"w-[20px] h-[20px]"}},TN=({layout:e="text_icon",hierarchy:t="fill",variant:r="default",size:n="md",label:a,hint:i,disabled:s,leadingIcon:l,leadingAvatar:c,trailingAddon:u,options:d,value:f,onChange:h,placeholder:p,className:g,placeholderColor:x,inputTextColor:m,backgroundColor:v,chevronColor:b="currentColor",optionActiveColor:w="bg-primary-500",optionActiveTextColor:C="text-white",optionTextColor:y="text-gray-900",borderRadius:j="rounded-lg"})=>{const[S,A]=P.useState(""),_=AN[r][t],I=kN[n],k=PN[e],E=S===""?d:d.filter(R=>R.label.toLowerCase().includes(S.toLowerCase())),T=te.twMerge(N.clsx("w-full flex-1 bg-transparent focus:outline-none",_.input,x,m)),M=te.twMerge(N.clsx("relative flex items-center gap-2 border transition-colors duration-200 focus-within:ring-2",j,I.wrapper,_.wrapper,s&&_N,v));return o.jsxs("div",{className:N.clsx("flex flex-col gap-1.5",g),children:[a&&o.jsx("label",{className:"font-medium text-sm text-gray-800",children:a}),o.jsx(me.Combobox,{value:f,onChange:h,disabled:s,children:o.jsxs("div",{className:"relative",children:[o.jsxs("div",{className:M,children:[k.showLeadingIcon&&l&&o.jsx("div",{children:O.default.cloneElement(l,{size:I.icon,color:"currentColor"})}),k.showLeadingAvatar&&c&&o.jsx("img",{src:c,alt:"avatar",className:N.clsx("rounded-full",I.avatar)}),k.showInput&&o.jsx(me.Combobox.Input,{className:T,placeholder:p,onChange:R=>A(R.target.value),displayValue:R=>R?.label}),k.showTrailingChevron&&!u&&o.jsx(me.Combobox.Button,{className:N.clsx("flex items-center",{"w-full h-full justify-center":e==="only_icon"}),children:o.jsx(F.ArrowDown2,{size:I.icon,color:b})}),k.showTrailingAddon&&u&&o.jsx("div",{className:"flex-shrink-0",children:u})]}),o.jsx(me.Combobox.Options,{className:"absolute z-10 mt-1 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm",children:E.length===0&&S!==""?o.jsx("div",{className:"relative cursor-default select-none px-4 py-2 text-gray-700",children:"Nothing found."}):E.map(R=>o.jsx(me.Combobox.Option,{value:R,className:({active:$})=>te.twMerge(N.clsx("relative cursor-default select-none py-2 pl-4 pr-4",$?`${w} ${C}`:y)),children:R.label},R.id))})]})}),i&&o.jsxs("div",{className:N.clsx("flex items-center gap-1.5 text-sm",_.hint),children:[o.jsx(F.InfoCircle,{size:16,color:"currentColor"}),o.jsx("span",{children:i})]})]})},EN=({items:e,trigger:t,className:r,align:n="right",offset:a=8})=>{const[i,s]=P.useState(!1),l=P.useRef(null),c=P.useRef(null);P.useEffect(()=>{const d=f=>{l.current&&!l.current.contains(f.target)&&c.current&&!c.current.contains(f.target)&&s(!1)};if(i)return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[i]);const u=d=>{d.disabled||(d.onClick(),s(!1))};return o.jsxs("div",{className:N.clsx("relative inline-block",r),children:[o.jsx("div",{ref:c,onClick:()=>s(!i),className:"cursor-pointer",children:t}),i&&o.jsx("div",{ref:l,className:N.clsx("absolute z-50 mt-2 min-w-[200px] rounded-lg bg-white shadow-lg border border-gray-200",n==="right"?"right-0":"left-0"),style:{top:`calc(100% + ${a}px)`},children:o.jsx("div",{className:"py-2",children:e.map((d,f)=>o.jsxs("button",{onClick:()=>u(d),disabled:d.disabled,className:N.clsx("w-full px-4 py-2.5 text-left text-sm flex items-center gap-3 transition-colors relative","hover:bg-gray-50",d.destructive?"text-[var(--danger-main)]":"text-[var(--high-em)]",d.disabled&&"opacity-50 cursor-not-allowed",f<e.length-1&&"border-b border-gray-100",f===0&&"before:absolute before:inset-x-0 before:-top-2 before:h-2 before:bg-transparent hover:before:bg-gray-50",f===e.length-1&&"after:absolute after:inset-x-0 after:-bottom-2 after:h-2 after:bg-transparent hover:after:bg-gray-50"),children:[d.icon&&o.jsx("span",{className:"flex-shrink-0 flex items-center justify-center relative z-10",children:d.icon}),o.jsx("span",{className:"flex-1 font-normal relative z-10",children:d.label})]},d.id))})})]})},am=O.default.memo(({children:e,tooltipContent:t,icon:r,iconColor:n="text-disabled",leadingIcon:a,leadingIconColor:i="text-disabled",iconSize:s,className:l,labelClassName:c,fontSize:u="sm",fontWeight:d="semibold",textColor:f="",onClick:h,state:p="default"})=>{const g={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},x={xs:12,sm:16,base:18,lg:20,xl:24},m={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},v=g[u]||void 0,b=g[u]?void 0:u,w=s??x[u]??20,C=!!h&&p!=="disabled",y=te.twMerge(N.clsx("flex border border-surface-3 w-full items-center px-6 h-14 text-left text-sm font-medium transition-colors rounded-xl",p==="disabled"&&"bg-surface-3 pointer-events-none",p==="hover"&&"bg-surface-1",p==="active"&&"bg-surface-2",p==="drag"&&"cursor-grabbing shadow-[0_8px_14px_-4px_rgba(0,0,0,0.2)] bg-surface-2",C&&p==="default"&&"cursor-pointer hover:bg-surface-1 active:bg-surface-2",p==="disabled"&&"cursor-not-allowed",l)),j=te.twMerge(N.clsx("flex-1 ml-6",v,m[d],p==="disabled"?"text-disabled":f||"text-med-em",c));return o.jsxs("div",{className:y,onClick:C?h:void 0,suppressHydrationWarning:!0,children:[a&&o.jsx("div",{className:"flex items-center shrink-0",children:o.jsx(ie,{size:w,className:i,children:a})}),o.jsx("span",{className:j,style:b?{fontSize:b}:void 0,children:e}),r&&t?o.jsxs(jt.Root,{children:[o.jsx(jt.Trigger,{asChild:!0,children:o.jsx("button",{className:N.clsx("flex items-center focus:outline-none focus-visible:ring-2 rounded-full shrink-0",n),onClick:S=>S.stopPropagation(),children:o.jsx(ie,{size:w,className:n,children:r})})}),o.jsx(jt.Portal,{children:o.jsxs(jt.Content,{sideOffset:5,className:N.clsx("z-50 max-w-xs overflow-hidden rounded-xl bg-surface-bg p-3 text-xs font-medium text-med-em shadow-lg","data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade","data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade"),children:[t,o.jsx(jt.Arrow,{className:"fill-white"})]})})]}):r?o.jsx("div",{className:N.clsx("flex items-center shrink-0",n),children:o.jsx(ie,{size:w,className:n,children:r})}):null]})});am.displayName="DragAndDropListItem";const IN={default:{...qe.default,wrapper:`${qe.default.wrapper} hover:cursor-pointer`,optionsPanel:"border-surface-4",label:"text-med-em",selectedValue:"text-med-em"},danger:{...qe.danger,wrapper:`${qe.danger.wrapper} hover:cursor-pointer`,optionsPanel:"border-danger-accent-2",label:"text-high-em",selectedValue:"text-danger-em"},outlined:{...qe.outlined,wrapper:`${qe.outlined.wrapper} hover:cursor-pointer`,optionsPanel:"border-surface-4",label:"text-med-em",selectedValue:"text-med-em"}},Pn={wrapper:"bg-surface-3 text-disabled pointer-events-none border-transparent",label:"text-disabled",selectedValue:"text-disabled",placeholder:"text-disabled",hint:"text-disabled"},MN={sm:{...Ft.sm,rounded:"rounded-md",selectText:"text-xs"},md:{...Ft.md,selectText:"text-sm font-medium"}},Te=({variant:e="default",size:t="md",menuSize:r,label:n,hint:a,items:i,disabled:s,placeholder:l,className:c,value:u,onChange:d,id:f,customHeight:h,customRadius:p,customPlaceholderColor:g,customBackgroundColor:x,leadingIcon:m,showLeadingIcon:v=!0,hintIconVariant:b,menuMinHeight:w,searchable:C=!1,searchPlaceholder:y})=>{const j=IN[e],S=MN[t],A=r||t,_=P.useRef(null),I=P.useRef(null),[k,E]=P.useState(!1),[T,M]=P.useState("");P.useEffect(()=>{k||M("")},[k]);const R=C&&T.trim()?i.filter(ee=>String(ee.title??"").toLowerCase().includes(T.trim().toLowerCase())):i,[$,L]=P.useState(null),[q,U]=P.useState(!1),D=i.find(ee=>ee.id===u);P.useEffect(()=>{U(!0)},[]);const B=O.default.useCallback(()=>{if(_.current&&k){const ee=_.current.getBoundingClientRect(),pe=window.innerHeight-ee.bottom,Y=ee.top,Ne=pe<200&&Y>pe;L({top:Ne?ee.top-8:ee.bottom+8,left:ee.left,width:ee.width,openUpwards:Ne})}},[k]);P.useEffect(()=>{if(k){B();const ee=z=>{I.current?.contains(z.target)||E(!1)};return window.addEventListener("scroll",ee,!0),window.addEventListener("resize",B),()=>{window.removeEventListener("scroll",ee,!0),window.removeEventListener("resize",B)}}},[k,B]),P.useEffect(()=>{if(!k)return;const ee=z=>{_.current&&!_.current.contains(z.target)&&I.current&&!I.current.contains(z.target)&&E(!1)};return document.addEventListener("mousedown",ee),()=>document.removeEventListener("mousedown",ee)},[k]);const W=()=>{s||E(!k)},G=ee=>{d(ee),E(!1)},Q=h?{height:h}:void 0,ne=()=>{if(p)return{borderRadius:p}},X=()=>{if(p)return{borderRadius:p}},re=g?.startsWith("var(")?{color:g}:void 0,ce=g&&!g.startsWith("var(")?g:void 0,K=x&&!x.startsWith("#")&&!x.startsWith("rgb")?x:void 0,J=x&&(x.startsWith("#")||x.startsWith("rgb"))?{backgroundColor:x}:void 0;return o.jsxs("div",{className:N.clsx("w-full flex flex-col gap-1.5",c),children:[n&&o.jsx("label",{htmlFor:f,className:N.clsx("font-semibold truncate",S.labelFontSize,j.label,s&&Pn.label),children:n}),o.jsxs("div",{className:"relative",children:[o.jsxs("button",{ref:_,id:f,onClick:W,disabled:s,className:N.clsx("relative w-full cursor-default border text-left transition-colors duration-200 focus:outline-none focus-visible:ring-2","flex items-center",!h&&S.height,!x&&j.wrapper,K,s&&Pn.wrapper,!p&&S.rounded),style:{...Q,...ne(),...J},children:[v&&o.jsx("span",{className:N.clsx("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5",s?"text-disabled":D?j.selectedValue:j.placeholder),children:m?O.default.isValidElement(m)?O.default.cloneElement(m,{color:"currentColor"}):m:o.jsx(F.Category,{size:S.iconSize,color:"currentColor"})}),o.jsx("span",{className:N.clsx("flex-1 min-w-0 truncate",v?"pl-[36px]":t==="sm"?"pl-2.5":"pl-3.5"),children:D?o.jsx("span",{className:N.clsx(S.selectText,s?Pn.selectedValue:j.selectedValue),children:D.title}):o.jsx("span",{className:N.clsx(S.selectText,s?Pn.placeholder:j.placeholder,ce),style:re,children:l})}),o.jsx("span",{className:N.clsx("pointer-events-none flex items-center shrink-0",t==="sm"?"pr-1.5 pl-1.5":"pr-3.5"),children:k?o.jsx(F.ArrowUp2,{size:S.iconSize,color:"currentColor"}):o.jsx(F.ArrowDown2,{size:S.iconSize,color:"currentColor"})})]}),q&&k&&$&&Ca.createPortal(o.jsx("div",{ref:I,className:"fixed z-50",style:$.openUpwards?{bottom:`${window.innerHeight-$.top}px`,left:`${$.left}px`,width:`${$.width}px`}:{top:`${$.top}px`,left:`${$.left}px`,width:`${$.width}px`},children:C?o.jsxs("div",{className:N.clsx("flex w-full flex-col overflow-hidden border shadow-md bg-surface-bg",!p&&"rounded-xl",j.optionsPanel),style:{...X(),maxHeight:$.openUpwards?`min(300px, ${$.top-20}px)`:`min(300px, calc(100vh - ${$.top}px - 20px))`},children:[o.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-surface-3 px-3 py-2",children:[o.jsx(F.SearchNormal1,{size:16,color:"currentColor",className:"shrink-0 text-low-em"}),o.jsx("input",{autoFocus:!0,value:T,onChange:ee=>M(ee.target.value),placeholder:y||"Buscar…",className:"w-full bg-transparent text-sm text-high-em placeholder:text-placeholder focus:outline-none"})]}),R.length===0?o.jsx("div",{className:"px-4 py-3 text-sm text-low-em",children:"Sin resultados"}):o.jsx(Wt,{items:R.map(({id:ee,...z})=>({id:ee,...z})),size:A,floating:!1,onSelect:G,selectedIds:u?[u]:[],className:"w-full overflow-y-auto !rounded-none !border-0 !bg-transparent !shadow-none"})]}):o.jsx(Wt,{items:i.map(({id:ee,...z})=>({id:ee,...z})),size:A,floating:!1,onSelect:G,selectedIds:u?[u]:[],className:N.clsx("w-full overflow-y-auto shadow-md border",!p&&"rounded-xl",j.optionsPanel,"bg-surface-bg"),style:{...X(),maxHeight:$.openUpwards?`min(300px, ${$.top-20}px)`:`min(300px, calc(100vh - ${$.top}px - 20px))`,minHeight:w}})}),document.body)]}),a&&o.jsx(ft,{icon:o.jsx(F.InfoCircle,{variant:b}),label:a,iconSize:S.hintIconSize,gap:1,iconColorClass:N.clsx(j.hint,s&&Pn.hint),labelColorClass:N.clsx(j.hint,s&&Pn.hint),className:N.clsx(S.hintFontSize,"font-semibold")})]})};function $N({children:e,...t}){return o.jsx(me.Menu,{as:"div",className:"relative inline-block text-left",...t,children:e})}const _2=O.default.memo(({isOver:e=!1,activeHeight:t="56px",inactiveHeight:r="0px",transitionDuration:n=150,transitionTimingFunction:a="ease-out",className:i,style:s,dropRef:l,id:c})=>o.jsx("div",{ref:l,id:c,className:i,style:{height:e?t:r,transition:`height ${n}ms ${a}`,overflow:"hidden",...s}}));_2.displayName="DropZone";const RN={backgroundImage:"repeating-linear-gradient(45deg, var(--surface-3) 0, var(--surface-3) 8px, transparent 8px, transparent 16px)"},ci=O.default.memo(({children:e,className:t,style:r})=>o.jsx("div",{className:N.clsx("flex min-h-[44px] w-full items-center justify-center rounded-xl border border-surface-3 px-3 py-2 text-xs font-medium text-low-em",t),style:{...RN,...r},children:e}));ci.displayName="DropPlaceholder";class LN extends P.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){const{componentName:n,onError:a}=this.props;console.error(`Error in ${n||"component"}:`,t,r),a&&a(t,r)}resetError=()=>{this.setState({hasError:!1,error:null})};render(){const{hasError:t,error:r}=this.state,{children:n,fallback:a,defaultTitle:i="Something went wrong",defaultMessage:s="An error occurred while rendering this component.",retryLabel:l="Try again"}=this.props;return t?a?O.default.isValidElement(a)?O.default.cloneElement(a,{error:r,onRetry:this.resetError}):a:o.jsx("div",{className:"flex items-center justify-center h-full p-8",children:o.jsxs("div",{className:"text-center flex flex-col gap-6 items-center",children:[o.jsx("h3",{className:"text-lg font-semibold text-danger-main",children:i}),o.jsx("p",{className:"text-sm text-med-em",children:s}),o.jsx(V,{onClick:this.resetError,size:"sm",variant:"secondary",hierarchy:"primary",children:l})]})}):n}}const k2=O.default.memo(({icon:e=o.jsx(ie,{className:"text-danger-main",size:"2xl",children:o.jsx(F.Danger,{})}),title:t="Something went wrong",message:r,error:n,onRetry:a,retryLabel:i="Retry",showDetailsInProduction:s=!1,className:l,centered:c=!0,maxWidth:u="max-w-sm"})=>{const d=s||process.env.NODE_ENV==="development";return o.jsx(hm,{children:o.jsx("div",{className:N.clsx("flex flex-col p-8",c&&"items-center justify-center h-full",l),children:o.jsxs("div",{className:N.clsx("text-center flex justify-center items-center flex-col gap-6",u),children:[typeof e=="string"?o.jsx("div",{className:"text-5xl",children:e}):o.jsx("div",{className:"flex justify-center",children:e}),o.jsx("h3",{className:"text-lg font-semibold text-danger-main",children:t}),r&&o.jsx("p",{className:"text-sm text-med-em mb-4",children:r}),n&&d&&o.jsxs("details",{className:"text-left",children:[o.jsx("summary",{className:"text-xs text-med-em cursor-pointer",children:"Technical details"}),o.jsxs("pre",{className:"text-xs text-danger-main p-2 rounded overflow-auto max-h-32",children:[n.message,n.stack&&`
|
|
24
20
|
|
|
25
|
-
${n.stack}`]})]}),a&&o.jsx(K,{onClick:a,variant:"secondary",hierarchy:"secondary",size:"sm",children:i})]})})})});k2.displayName="ErrorState";const DN=({groups:e,className:t,width:r,height:n})=>{const a=N.clsx("flex","items-center","justify-center","p-1 bg-brand-primary-main-special rounded-8 border border-brand-primary-accent-special gap-2"),[i,s]=P.useState(null),l=P.useRef(null);P.useEffect(()=>{const u=d=>{l.current&&!l.current.contains(d.target)&&s(null)};if(i)return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[i]);const c={width:r,height:n};return o.jsx("div",{style:c,className:N.clsx("flex items-center gap-4 w-fit",t),children:e.map((u,d)=>o.jsx("div",{className:a,children:u.map(f=>o.jsx("div",{className:"relative",children:f.type==="dropdown"?o.jsxs("div",{ref:l,className:"relative gap-4",children:[o.jsx(K,{variant:f.variant||"brand",hierarchy:f.hierarchy||"secondary",size:f.size||"sm",icons:f.label&&f.leadingIcon?"both":"trailing",leadingIcon:f.label?f.leadingIcon:void 0,trailingIcon:i===f.id?o.jsx(em,{}):o.jsx(Jp,{}),onClick:()=>s(i===f.id?null:f.id),disabled:f.disabled,style:{outline:"none",boxShadow:"none"},className:N.clsx(f.className,i===f.id&&"bg-brand-primary-accent-special"),children:f.label?f.label:O.default.isValidElement(f.leadingIcon)?O.default.cloneElement(f.leadingIcon,{size:18,color:"currentColor"}):f.leadingIcon}),i===f.id&&o.jsx(Wt,{floating:!0,size:f.dropMenuSize||"sm",selectedIds:f.selectedIds,items:f.items.map(h=>({id:h.id,title:h.label,leadingIcon:h.icon,showLeadingIcon:!!h.icon,showDescription:f.showDescription??!1,showTrailingIcon:f.showTrailingIcon??!1,showTrailingText:f.showTrailingText??!1,trailingText:h.trailingText,showTag:f.showTag??!1,showCheckbox:f.showCheckbox??!1,disabled:h.disabled,showDividerAfter:h.showDividerAfter,onClick:()=>{h.onClick(),s(null)},...h.destructive&&{customTitleColor:f.destructiveColor||"text-danger-em"}})),className:N.clsx("bottom-full mb-4",f.dropMenuClassName)})]}):o.jsx(K,{variant:f.variant||"brand",hierarchy:f.hierarchy||"secondary",size:f.size||"sm",icons:f.label?f.leadingIcon&&f.trailingIcon?"both":f.leadingIcon?"leading":f.trailingIcon?"trailing":void 0:"only",leadingIcon:f.leadingIcon,trailingIcon:f.trailingIcon,onClick:f.onClick,disabled:f.disabled,style:{outline:"none",boxShadow:"none"},className:N.clsx(f.className),children:f.label})},f.id))},d))})},T2=({icon:e,text:t,onClick:r,className:n=""})=>{const a=()=>{r&&r()};return o.jsxs("div",{className:N.clsx("w-full h-[60px]","bg-surface-bg","border border-surface-3","rounded-lg","flex flex-col items-center justify-center","cursor-grab",r&&"hover:bg-surface-1 transition-colors",n),onClick:a,children:[e&&o.jsx("div",{className:"flex items-center justify-center",children:o.jsx(ie,{size:20,color:"var(--low-em)",children:e})}),t&&o.jsx("span",{className:"font-inter font-semibold text-[10px] text-low-em mt-1",children:t})]})},im=e=>e?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[e]:"",om=e=>e?{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"}[e]:"",zN={sm:"h-13",md:"h-14",lg:"h-[60px]"},E2=({gap:e=4,justify:t,align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex",er(e),im(t),om(r),n),...i,children:a}),I2=({gap:e=4,justify:t="center",align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex h-full",er(e),im(t),om(r),n),...i,children:a}),M2=({gap:e=5,justify:t="end",align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex",er(e),im(t),om(r),n),...i,children:a}),BN={always:"flex",desktop:"hidden lg:flex",none:"hidden"},rl=e=>{const{className:t,bordered:r=!0,size:n="lg",logoVariant:a="with-text",showLogo:i="always",children:s,logoSectionGap:l=6,leftWidth:c,centerWidth:u,rightWidth:d,centerFullHeight:f=!0,showCenterOnMobile:h=!1,...p}=e,g=O.default.Children.toArray(s).find(v=>O.default.isValidElement(v)&&v.type===E2),x=O.default.Children.toArray(s).find(v=>O.default.isValidElement(v)&&v.type===I2),m=O.default.Children.toArray(s).find(v=>O.default.isValidElement(v)&&v.type===M2);return o.jsx("header",{className:ae.default("relative w-full bg-white",r&&"border-b border-surface-4",t),...p,children:o.jsxs("div",{className:ae.default("flex items-center",c!==void 0||u!==void 0||d!==void 0?"lg:px-0":"justify-between lg:px-container-desktop","px-container-mobile md:px-container-tablet",zN[n]),children:[o.jsxs("div",{className:ae.default("flex items-center",c!==void 0?"lg:pl-8!":"shrink-0",er(l)),style:c!==void 0?{width:`${c}%`}:void 0,children:[i!=="none"&&o.jsx("div",{className:ae.default("items-center",BN[i]),children:a==="with-text"?o.jsx(To,{height:25,className:"text-black"}):o.jsx(Eo,{height:25,className:"text-black"})}),g]}),x&&o.jsx("div",{className:ae.default(h?"flex justify-center":"hidden lg:flex justify-center",f&&"h-full",u!==void 0?"":"flex-1"),style:u!==void 0?{width:`${u}%`}:void 0,children:x}),o.jsx("div",{className:ae.default("flex items-center",d!==void 0?"justify-end lg:pr-8!":"shrink-0 ml-auto"),style:d!==void 0?{width:`${d}%`}:void 0,children:m})]})})};rl.LeftContent=E2;rl.Center=I2;rl.Right=M2;function FN(e,t=20){const r=100-2*t,n=e.left.filter(c=>c.open).reduce((c,u)=>c+u.width,0),a=e.right.filter(c=>c.open).reduce((c,u)=>c+u.width,0);if(n===0&&a===0)return{leftWidth:t,centerWidth:r,rightWidth:t};const i=n>0?n:t,s=a>0?a:t,l=100-i-s;return{leftWidth:i,centerWidth:l,rightWidth:s}}const $2=e=>e?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[e]:"",R2=e=>e?{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"}[e]:"",qN={sm:"h-13",md:"h-14",lg:"h-[60px]"},L2=({gap:e=4,justify:t,align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex",er(e),$2(t),R2(r),n),...i,children:a}),D2=({gap:e=4,justify:t="end",align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex",er(e),$2(t),R2(r),n),...i,children:a}),nl=e=>{const{className:t,bordered:r=!0,size:n="md",logoVariant:a="no-text",showLogo:i="always",children:s,logoSectionGap:l=6,leftWidth:c,rightWidth:u,...d}=e,f=O.default.Children.toArray(s).find(p=>O.default.isValidElement(p)&&p.type===L2),h=O.default.Children.toArray(s).find(p=>O.default.isValidElement(p)&&p.type===D2);return o.jsxs("footer",{className:ae.default("relative w-full bg-white",r&&"border-t border-surface-4",t),...d,children:[o.jsxs("div",{className:"flex flex-col gap-8 px-container-mobile py-8 lg:hidden",children:[i!=="none"&&o.jsx("div",{className:"flex items-center",children:a==="with-text"?o.jsx(To,{height:22,className:"text-black"}):o.jsx(Eo,{height:22,className:"text-black"})}),f&&o.jsx("div",{className:"flex items-center",children:f}),h&&o.jsx("div",{className:"flex items-center gap-4 px-0",children:h})]}),o.jsxs("div",{className:ae.default("hidden lg:flex items-center justify-between lg:px-container-desktop",qN[n]),children:[o.jsxs("div",{className:ae.default("flex items-center shrink-0",er(l)),style:c!==void 0?{width:`${c}%`}:void 0,children:[i!=="none"&&o.jsx("div",{className:"flex items-center",children:a==="with-text"?o.jsx(To,{height:22,className:"text-black"}):o.jsx(Eo,{height:22,className:"text-black"})}),f]}),o.jsx("div",{className:"flex items-center shrink-0 ml-auto",style:u!==void 0?{width:`${u}%`}:void 0,children:h})]})]})};nl.Left=L2;nl.Right=D2;nl.displayName="Footer";const WN={default:{container:"flex flex-col items-center justify-center",dropZone:"flex flex-col items-center justify-center space-y-2 transition-colors border-surface-3 border-[1px]",preview:"bg-surface-3 border-surface-4"}},HN={sm:{container:"w-48 h-18 p-2 gap-2 rounded-lg",dropZone:"w-full h-18 rounded-md p-2",preview:"w-full h-18 rounded-md",iconSize:24},md:{container:"w-72 h-44 p-4 gap-3 rounded-xl",dropZone:"w-64 h-40 rounded-xl p-4",preview:"w-64 h-40 rounded-xl",iconSize:42},lg:{container:"w-96 h-52 p-4 gap-5 rounded-xl",dropZone:"w-full h-48 rounded-xl p-4",preview:"w-full h-48 rounded-xl",iconSize:48}},Jx={container:"opacity-50 cursor-not-allowed pointer-events-none",dropZone:"cursor-not-allowed"},VN=({onImageSelected:e,variant:t="default",size:r="md",className:n,acceptedFileTypes:a="image/*",maxFileSize:i,disabled:s=!1,initialPreviewUrl:l})=>{const c=P.useRef(null),u=P.useRef(0),[d,f]=P.useState(!1),[h,p]=P.useState(l||null),[g,x]=P.useState(!1),[m,v]=P.useState(null),b=WN[t],w=HN[r],C=T=>{if(i&&T.size>i){const M=(i/1048576).toFixed(1);v(`File size must be less than ${M}MB`);return}if(!T.type.startsWith("image/")){v("Please select a valid image file");return}v(null),e(T),p(URL.createObjectURL(T))},y=T=>{T.target.files&&T.target.files[0]&&C(T.target.files[0])},j=T=>{T.preventDefault(),f(!1),T.dataTransfer.files&&T.dataTransfer.files[0]&&C(T.dataTransfer.files[0])},S=T=>{T.preventDefault(),s||f(!0)},A=T=>{T.preventDefault(),!s&&(u.current+=1,f(!0))},_=T=>{T.preventDefault(),u.current-=1,u.current<=0&&(f(!1),u.current=0)},I=T=>{T.stopPropagation(),c.current?.click()},k=()=>{s||x(!0)},E=()=>{x(!1)};return o.jsx("div",{className:N.clsx("flex flex-col",n),children:o.jsx("div",{className:N.clsx(b.container,w.container,s&&Jx.container),children:o.jsxs("div",{className:N.clsx(b.dropZone,w.dropZone,"cursor-pointer relative",s&&Jx.dropZone,d&&!h&&"bg-black/20"),onDrop:s?void 0:j,onDragOver:s?void 0:S,onDragEnter:s?void 0:A,onDragLeave:s?void 0:_,onClick:s?void 0:I,children:[h?o.jsxs("div",{className:N.clsx("absolute inset-0 overflow-hidden transition-all duration-200",w.preview),onMouseEnter:k,onMouseLeave:E,children:[o.jsx("img",{src:h,alt:"Preview",className:N.clsx("w-full h-full object-cover transition-all duration-200",g&&"brightness-90")}),g&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center transition-all duration-200",children:o.jsx(K,{onClick:I,variant:"neutral",size:"xs",disabled:s,children:"Change Image"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:N.clsx("flex items-center justify-center rounded-lg overflow-hidden",h&&"border border-surface-4 bg-surface-2",`w-[${w.iconSize*2}px] h-[${w.iconSize*2}px]`),children:o.jsx(Jj,{size:w.iconSize,className:N.clsx(s&&"text-disabled")})}),o.jsx("div",{className:N.clsx("text-center text-[11px] font-body font-medium leading-tight tracking-normal whitespace-normal break-words",s&&"text-disabled"),children:"Drag your image to start uploading"}),o.jsxs("div",{className:"my-2 w-full flex items-center justify-center",children:[o.jsx("span",{className:"border-t w-1/2 mx-2 border-low-em"}),o.jsx("span",{className:N.clsx("text-xs ml-2 mr-2",d?"text-med-em":"text-high-em",s&&"text-disabled"),children:"OR"}),o.jsx("span",{className:"border-t w-1/2 mx-2 border-low-em"})]})]}),!h&&o.jsx(K,{onClick:I,variant:"neutral",size:"xs",className:"mt-1",disabled:s,children:"Browse"}),o.jsx("input",{type:"file",accept:a,ref:c,className:"hidden",onChange:y,disabled:s})]})})})},UN={default:{background:"bg-gray-200",iconColor:"text-[var(--dark-700)]",titleColor:"text-[var(--dark-700)]",descriptionColor:"text-[var(--dark-700)]"},danger:{background:"bg-[var(--danger-50)]",iconColor:"text-[var(--danger-600)]",titleColor:"text-[var(--danger-600)]",descriptionColor:"text-[var(--danger-600)]"},success:{background:"bg-[var(--success-50)]",iconColor:"text-[var(--success-600)]",titleColor:"text-[var(--success-600)]",descriptionColor:"text-[var(--success-600)]"}},KN=({variant:e="default",title:t,description:r,icon:n,className:a})=>{const i=UN[e],l=(u=>{const d=u.match(/text-\[var\(--([^)]+)\)\]/);if(d)return`var(--${d[1]})`})(i.iconColor),c=()=>n&&O.default.isValidElement(n)?O.default.cloneElement(n,{color:l}):o.jsx(B.Warning2,{size:12,variant:"Outline",color:l});return o.jsxs("div",{className:N.clsx("flex flex-col gap-0.5 px-8 py-4 rounded-xl",i.background,a),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex-shrink-0",children:c()}),o.jsx("span",{className:N.clsx("text-[12px] font-semibold leading-tight",i.titleColor),children:t})]}),o.jsx("span",{className:N.clsx("text-[10px] font-medium leading-tight mt-2",i.descriptionColor),children:r})]})},sm=P.forwardRef(({onSearch:e,debounceMs:t=300,isLoading:r=!1,showClearButton:n=!0,errorMessage:a,suggestions:i=[],onSuggestionClick:s,placeholder:l="Search...",value:c,onChange:u,disabled:d=!1,id:f,name:h,autoComplete:p,maxLength:g,required:x,onBlur:m,onFocus:v,onInvalid:b,"aria-label":w="Search",className:C,size:y,...j},S)=>{const[A,_]=P.useState(""),[I,k]=P.useState(!1),[E,T]=P.useState(-1),M=P.useRef(null),R=c!==void 0,$=R?c:A,L=Y6($,t);P.useEffect(()=>{L&&e&&e(L)},[L,e]),P.useEffect(()=>{const X=ne=>{M.current&&!M.current.contains(ne.target)&&k(!1)};return document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}},[]);const q=X=>{const ne=X.target.value;R||_(ne),u&&u(X),ne&&i.length>0?(k(!0),T(-1)):k(!1)},U=X=>{if(X.key==="Enter"){if(X.preventDefault(),I&&E>=0&&E<i.length){const ne=i[E];H(ne)}else e&&$&&e($);k(!1)}else X.key==="ArrowDown"?(X.preventDefault(),I&&i.length>0&&T(ne=>ne<i.length-1?ne+1:0)):X.key==="ArrowUp"?(X.preventDefault(),I&&i.length>0&&T(ne=>ne>0?ne-1:i.length-1)):X.key==="Escape"&&(k(!1),T(-1))},z=X=>{$&&i.length>0&&k(!0),v&&v(X)},F=()=>{const X={target:{value:""}};R||_(""),u&&u(X),k(!1),T(-1)},H=X=>{const ne={target:{value:X}};R||_(X),u&&u(ne),s&&s(X),k(!1),T(-1)},W=a?"danger":"default",Z=r?o.jsx(B.ArrowRotateRight,{color:"currentColor",size:16,className:"animate-spin text-primary-500"}):$&&n&&o.jsx("button",{type:"button",onClick:F,className:"text-gray-500 hover:text-gray-700 focus:outline-none transition-colors","aria-label":"Clear search",children:o.jsx(B.CloseCircle,{color:"currentColor",size:16})}),re=i.filter(X=>X.toLowerCase().includes($.toLowerCase()));return o.jsxs("div",{className:"relative w-full",ref:M,children:[o.jsx(ge,{ref:S,className:N.clsx("w-full text-placeholder",C),value:$,onChange:q,onKeyDown:U,onFocus:z,onBlur:m,onInvalid:b,variant:W,hint:a,leadingIcon:o.jsx(B.SearchNormal1,{color:"currentColor",size:16}),trailingIcon:Z,placeholder:l,disabled:d,id:f,name:h,autoComplete:p,maxLength:g,required:x,"aria-label":w,...j}),I&&re.length>0&&o.jsx("div",{className:"absolute z-10 w-full mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-60 overflow-auto",role:"listbox",children:re.map((X,ne)=>o.jsx("div",{className:N.clsx("px-3 py-2 cursor-pointer text-sm",ne===E?"bg-primary-100 text-primary-900":"text-gray-700 hover:bg-gray-100"),onClick:()=>H(X),role:"option","aria-selected":ne===E,children:X},ne))})]})});sm.displayName="InputSearch";const Sa=({children:e,content:t,side:r="top",sideOffset:n=5,showArrow:a=!0,className:i,maxWidth:s="max-w-xs",delayDuration:l,disabled:c=!1,primaryButton:u,secondaryButton:d,customBackground:f,customTextColor:h,customFontSize:p})=>{if(c)return e;const g=u||d,x={};return f&&(x.backgroundColor=f),h&&(x.color=h),p&&(x.fontSize=p),o.jsxs(jt.Root,{delayDuration:l,children:[o.jsx(jt.Trigger,{asChild:!0,children:e}),o.jsx(jt.Portal,{children:o.jsxs(jt.Content,{side:r,sideOffset:n,className:N.clsx("z-50 overflow-hidden rounded-6 p-6 shadow-e2",!f&&"bg-surface-bg",!h&&"text-high-em",!p&&"text-xs","font-medium",s,"data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade","data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade","data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade","data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade",i),style:Object.keys(x).length>0?x:void 0,children:[o.jsxs("div",{className:N.clsx(g&&"flex flex-col gap-8"),children:[o.jsx("div",{children:t}),g&&o.jsxs("div",{className:"flex gap-4 items-center w-full",children:[u&&o.jsx(K,{variant:u.variant||"neutral",hierarchy:u.hierarchy||"secondary",size:u.size||"xs",onClick:u.onClick,disabled:u.disabled,className:"flex-1",children:u.text}),d&&o.jsx(K,{variant:d.variant||"neutral",hierarchy:d.hierarchy||"secondary",size:d.size||"xs",onClick:d.onClick,disabled:d.disabled,className:"flex-1",children:d.text})]})]}),a&&o.jsx(jt.Arrow,{className:f?void 0:"fill-surface-bg",style:f?{fill:f}:void 0})]})})]})},GN=256,ZN=64,z2=P.createContext(null);function pn(){const e=P.useContext(z2);if(!e)throw new Error("useSidebar must be used within <Sidebar>");return e}const B2=P.forwardRef(({collapsed:e,defaultCollapsed:t=!1,onCollapsedChange:r,keyboardShortcut:n=!0,className:a,children:i,...s},l)=>{const[c,u]=P.useState(t),d=e??c,f=P.useCallback(p=>{e===void 0&&u(p),r?.(p)},[e,r]),h=P.useCallback(()=>f(!d),[d,f]);return P.useEffect(()=>{if(!n)return;const p=g=>{(g.metaKey||g.ctrlKey)&&g.key.toLowerCase()==="b"&&(g.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n,h]),o.jsx(z2.Provider,{value:{collapsed:d,toggle:h,setCollapsed:f},children:o.jsx(Aj.TooltipProvider,{delayDuration:300,children:o.jsx("aside",{ref:l,"data-state":d?"collapsed":"expanded",style:{width:d?ZN:GN},className:te.twMerge(N.clsx("flex h-full shrink-0 flex-col overflow-hidden border-r border-surface-2 bg-surface-bg transition-[width] duration-200 ease-linear",a)),...s,children:i})})})});B2.displayName="Sidebar";function YN({className:e,children:t,...r}){return o.jsx("div",{className:te.twMerge("flex flex-col gap-[8px] p-[12px]",e),...r,children:t})}const XN="[scrollbar-width:thin] [scrollbar-color:var(--surface-3)_transparent] [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-surface-3 [&::-webkit-scrollbar-thumb]:hover:bg-surface-4";function QN({className:e,children:t,...r}){return o.jsx("div",{className:te.twMerge(N.clsx("flex min-h-0 flex-1 flex-col gap-[4px] overflow-y-auto px-[12px]",XN,e)),...r,children:t})}function JN({className:e,children:t,...r}){return o.jsx("div",{className:te.twMerge("mt-auto flex flex-col gap-[8px] p-[12px]",e),...r,children:t})}function e4({placeholder:e="Buscar...",...t}){const{collapsed:r}=pn();return r?o.jsx(Sa,{content:"Buscar",side:"right",children:o.jsx(K,{"aria-label":"Buscar",variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:o.jsx(B.SearchNormal1,{color:"currentColor"}),className:"h-[40px] w-[40px] !rounded-[10px] focus:ring-0"})}):o.jsx(sm,{placeholder:e,...t})}function t4({className:e,children:t,...r}){return o.jsx("div",{className:te.twMerge("flex flex-col gap-[2px]",e),...r,children:t})}function r4({className:e,children:t,...r}){const{collapsed:n}=pn();return n?null:o.jsx("div",{className:te.twMerge("px-[10px] pt-[14px] pb-[4px] text-[11px] font-medium tracking-wide text-low-em uppercase",e),...r,children:t})}const F2=P.forwardRef(({icon:e,label:t,active:r,trailing:n,className:a,...i},s)=>{const{collapsed:l}=pn(),c=o.jsxs("button",{ref:s,"aria-label":t,"data-active":r||void 0,className:te.twMerge(N.clsx("flex h-[40px] w-full items-center gap-[12px] overflow-hidden rounded-[10px] px-[10px] text-sm transition-colors focus:outline-none",r?"bg-brand-secondary-main text-white-uniform":"text-med-em hover:bg-surface-1 hover:text-high-em",a)),...i,children:[o.jsx("span",{className:"flex h-[20px] w-[20px] shrink-0 items-center justify-center",children:e}),!l&&o.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t}),!l&&n]});return l?o.jsx(Sa,{content:t,side:"right",children:c}):c});F2.displayName="Sidebar.Item";function n4({children:e}){const{collapsed:t}=pn();return t?null:o.jsx(o.Fragment,{children:e})}function a4({name:e,email:t,avatarUrl:r,initials:n,onClick:a}){const{collapsed:i}=pn();return i?o.jsx(Sa,{content:e,side:"right",children:o.jsx("button",{"aria-label":e,onClick:a,className:"flex h-[40px] w-full items-center justify-center rounded-[10px] hover:bg-surface-1 focus:outline-none",children:o.jsx(Bt,{size:"sm",imageUrl:r,initials:n})})}):o.jsxs("button",{onClick:a,className:"flex w-full items-center gap-[10px] rounded-[10px] p-[8px] text-left hover:bg-surface-1 focus:outline-none",children:[o.jsx(Bt,{size:"sm",imageUrl:r,initials:n}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-medium text-high-em",children:e}),t&&o.jsx("span",{className:"block truncate text-xs text-low-em",children:t})]}),o.jsx(B.ArrowUp2,{size:16,color:"var(--low-em)",className:"shrink-0"})]})}function i4({className:e,...t}){const{collapsed:r,toggle:n}=pn();return o.jsx(K,{"aria-label":r?"Expandir menú":"Colapsar menú",variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:o.jsx(B.ArrowLeft2,{color:"currentColor",className:r?"rotate-180":void 0}),onClick:n,className:te.twMerge("h-[40px] w-[40px] shrink-0 !rounded-[10px] focus:ring-0",e),...t})}const o4=Object.assign(B2,{Header:YN,Content:QN,Footer:JN,Search:e4,Group:t4,GroupLabel:r4,Item:F2,Card:n4,User:a4,Trigger:i4}),q2=({options:e,onChange:t,label:r,addLabel:n="Add option",labelPlaceholder:a="Label",valuePlaceholder:i="value",emptyHint:s="No options yet.",disabled:l=!1,className:c})=>{const u=(h,p)=>t(e.map((g,x)=>x===h?{...g,...p}:g)),d=()=>t([...e,{value:"",label:""}]),f=h=>t(e.filter((p,g)=>g!==h));return o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-col gap-3",c)),children:[r&&o.jsx("span",{className:"text-xs font-semibold text-med-em",children:r}),e.length===0?o.jsx("p",{className:"text-xs text-med-em",children:s}):o.jsx("div",{className:"flex flex-col gap-2",children:e.map((h,p)=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex-1",children:o.jsx(ge,{size:"sm",value:h.label,placeholder:a,disabled:l,onChange:g=>u(p,{label:g.target.value}),onBlur:()=>{!h.value&&h.label&&u(p,{value:h.label})}})}),o.jsx("div",{className:"w-28",children:o.jsx(ge,{size:"sm",value:h.value,placeholder:i,disabled:l,onChange:g=>u(p,{value:g.target.value})})}),o.jsx(K,{variant:"neutral",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:o.jsx(B.Trash,{size:16}),"aria-label":"Remove option",disabled:l,onClick:()=>f(p)})]},p))}),o.jsx("div",{children:o.jsx(K,{variant:"neutral",hierarchy:"tertiary",size:"xs",icons:"leading",leadingIcon:o.jsx(B.Add,{}),disabled:l,onClick:d,children:n})})]})};q2.displayName="OptionsEditor";const s4=({icon:e,children:t,isActive:r=!1,className:n,customFontSize:a,customIconSize:i,...s})=>{const l={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},c=a&&l[a]||void 0,u=a&&!l[a]?{fontSize:a}:void 0,d=i||20;return o.jsxs("button",{className:N.clsx("border border-surface-3 flex w-full items-center px-6 h-14 text-left text-sm font-semibold transition-colors rounded-xl","focus:outline-none",{"gap-6 bg-surface-1 text-med-em":r,"gap-6 hover:bg-surface-3":!r},n),...s,children:[o.jsx("span",{style:{color:"var(--med-em)"},children:O.default.isValidElement(e)&&O.default.cloneElement(e,{size:d,color:"currentColor"})}),o.jsx("span",{className:N.clsx("text-med-em",c),style:u,children:t})]})},l4=o.jsx(Xp,{}),W2=({children:e,tooltipContent:t,icon:r,iconColor:n="text-disabled",labelClassName:a,className:i,customFontSize:s,customIconSize:l})=>{const c={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},u=s&&c[s]||void 0,d=s&&!c[s]?{fontSize:s}:void 0,f=l||16,h=r??l4;return o.jsxs("div",{className:N.clsx("flex items-center gap-2",i),children:[o.jsx("span",{className:N.clsx(a,u),style:d,children:e}),o.jsx(Sa,{content:t,children:o.jsx("button",{type:"button",className:N.clsx("bg-surface-bg flex items-center focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary-main rounded-full",n),children:O.default.cloneElement(h,{size:f,color:"currentColor"})})})]})},c4={sm:"max-w-[300px] w-full",md:"w-[32rem]",lg:"w-[40rem]"},lm={sm:{header:"py-4 px-8",body:"p-6",footer:"py-6 px-8"},md:{header:"py-4 px-8",body:"p-8",footer:"py-6 px-8"},lg:{header:"py-4 px-8",body:"p-10",footer:"py-6 px-8"}},H2=P.createContext(void 0),mn=()=>{const e=P.useContext(H2);if(!e)throw new Error("useModalContext must be used within a Modal provider");return e},al=({children:e,size:t="md",padding:r})=>{const[n,a]=P.useState(!1);return o.jsx(H2.Provider,{value:{open:n,setOpen:a,size:t,padding:r??t},children:e})};al.displayName="Modal";const il=({children:e})=>{const{setOpen:t}=mn();return O.default.cloneElement(e,{onClick:r=>{e.props.onClick&&e.props.onClick(r),t(!0)}})};il.displayName="ModalTrigger";const ol=P.forwardRef(({children:e,className:t,...r},n)=>{const{open:a,setOpen:i,size:s}=mn();return o.jsx(xe.Transition,{appear:!0,show:a,as:P.Fragment,children:o.jsxs(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>i(!1),children:[o.jsx(xe.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:o.jsx("div",{className:"fixed inset-0 bg-black-uniform/30","aria-hidden":"true"})}),o.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:o.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:o.jsx(xe.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:o.jsx(xe.Dialog.Panel,{ref:n,className:N.clsx("bg-white rounded-2xl shadow-xl flex flex-col border border-surface-3 text-left transform transition-all",c4[s],t),...r,children:e})})})})]})})});ol.displayName="ModalContent";const sl=({children:e,onBack:t,disabled:r=!1,className:n})=>{const{setOpen:a,padding:i}=mn(),s=lm[i];return o.jsxs("header",{className:N.clsx("flex items-center border-b border-surface-3 shrink-0",s.header,n),children:[o.jsx(K,{variant:"neutral",hierarchy:"secondary",className:N.clsx("cursor-pointer",!t&&"invisible"),onClick:t,size:"sm",icons:"only",disabled:r||!t,leadingIcon:o.jsx(e2,{className:"text-high-em"})}),o.jsx("div",{className:"flex-1 flex justify-center items-center",children:e}),o.jsx(K,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(nt,{className:"text-high-em"}),onClick:()=>a(!1),disabled:r})]})};sl.displayName="ModalHeader";const ll=P.forwardRef(({className:e,...t},r)=>o.jsx(xe.Dialog.Title,{ref:r,as:"h3",className:N.clsx("font-semibold text-base leading-tight text-center text-high-em",e),...t}));ll.displayName="ModalTitle";const cm=P.forwardRef(({className:e,...t},r)=>o.jsx(xe.Dialog.Description,{ref:r,className:N.clsx("text-sm text-high-em",e),...t}));cm.displayName="ModalDescription";const cl=({children:e,className:t})=>{const{padding:r}=mn(),n=lm[r];return o.jsx("main",{className:N.clsx(n.body,"flex-1 overflow-y-auto",t),children:e})};cl.displayName="ModalBody";const ul=({className:e,children:t,...r})=>{const{padding:n}=mn(),a=lm[n];return o.jsx("footer",{className:N.clsx("flex items-center border-t border-surface-3 shrink-0",a.footer,e),...r,children:t})};ul.displayName="ModalFooter";const V2=({backButton:e,cancelButton:t,acceptButton:r,className:n})=>{const{setOpen:a,size:i}=mn(),s=i==="sm",l=(c,u)=>{c.onClick&&c.onClick(u),c.closeOnClick!==!1&&a(!1)};return o.jsxs(ul,{className:N.clsx(s?"flex-row gap-8":"justify-between",n),children:[e&&!s&&o.jsx(K,{variant:e.variant||"neutral",hierarchy:e.hierarchy||"secondary",size:e.size||"md",...e,onClick:c=>l(e,c),children:e.label}),!e&&!s&&o.jsx("div",{}),o.jsxs("div",{className:N.clsx("flex",s?"flex-row gap-8 w-full":"gap-8"),children:[t&&o.jsx(K,{variant:t.variant||"neutral",hierarchy:t.hierarchy||"primary",size:t.size||"md",...t,className:te.twMerge(s?"w-full":"w-32",t.className),onClick:c=>l(t,c),children:t.label}),r&&o.jsx(K,{variant:r.variant||"secondary",hierarchy:r.hierarchy||"primary",size:r.size||"md",...r,className:te.twMerge(s?"w-full":"w-32",r.className),onClick:c=>l(r,c),children:r.label})]})]})};V2.displayName="ModalFooterActions";const um=({children:e})=>{const{setOpen:t}=mn();return O.default.cloneElement(e,{onClick:r=>{e.props.onClick&&e.props.onClick(r),t(!1)}})};um.displayName="ModalClose";function u4(e,t){return e.split(t).reduce((r,n,a,i)=>(r.push(o.jsx("span",{className:"font-normal",children:n},`part-${a}`)),a<i.length-1&&r.push(o.jsx("span",{className:"font-bold",children:t},`bold-${a}`)),r),[])}function U2({trigger:e,title:t,description:r,confirmationText:n,confirmationLabel:a,confirmButtonLabel:i,cancelButtonLabel:s="Cancel",onConfirm:l,loading:c=!1}){const[u,d]=P.useState(""),f=u.trim()===n,h=()=>d(""),p=O.default.isValidElement(e)?e:null;return o.jsxs(al,{children:[p?o.jsx(il,{children:p}):null,o.jsxs(ol,{children:[o.jsx(sl,{disabled:c,children:o.jsx(ll,{children:t})}),o.jsxs(cl,{children:[o.jsx(cm,{children:r}),o.jsx("div",{className:"mt-6",children:o.jsx(ge,{label:u4(a,n),placeholder:n,value:u,onChange:g=>d(g.target.value),disabled:c,variant:"outlined",size:"md"})})]}),o.jsxs(ul,{className:"justify-end gap-3",children:[o.jsx(um,{children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"md",disabled:c,onClick:h,children:s})}),o.jsx(K,{variant:"danger",hierarchy:"primary",size:"md",onClick:()=>{f&&!c&&l()},disabled:!f,loading:c,children:i})]})]})]})}U2.displayName="DeleteConfirmationModal";const K2=P.createContext(void 0),dm=()=>{const e=P.useContext(K2);if(!e)throw new Error("Drawer subcomponents must be used within <Drawer>");return e},d4={sm:"w-64",md:"w-72",lg:"w-80",xl:"w-96"},eg={right:"translate-x-full",left:"-translate-x-full"},f4={right:"right-0",left:"left-0"},G2=({open:e,onOpenChange:t,side:r="right",children:n})=>o.jsx(K2.Provider,{value:{onOpenChange:t,side:r},children:o.jsx(xe.Transition,{show:e,as:P.Fragment,children:o.jsx(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>t(!1),children:n})})});G2.displayName="Drawer";const Z2=({className:e})=>{const{onOpenChange:t}=dm();return o.jsx(xe.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:o.jsx("div",{className:te.twMerge(N.clsx("fixed inset-0 bg-black-uniform/30",e)),"aria-hidden":"true",onClick:()=>t(!1)})})};Z2.displayName="DrawerOverlay";const Y2=({width:e="md",className:t,children:r})=>{const{side:n}=dm();return o.jsx(xe.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:eg[n],enterTo:"translate-x-0",leave:"ease-in duration-200",leaveFrom:"translate-x-0",leaveTo:eg[n],children:o.jsx(xe.Dialog.Panel,{className:te.twMerge(N.clsx("fixed top-0 bottom-0 h-full flex flex-col bg-white shadow-e2 transform",d4[e],f4[n],t)),children:r})})};Y2.displayName="DrawerPanel";const X2=({children:e,className:t,height:r=60,title:n})=>o.jsxs("div",{style:{height:r},className:te.twMerge(N.clsx("flex items-center justify-between shrink-0 px-8 border-b border-surface-3",t)),children:[n&&o.jsx("span",{className:"text-sm font-semibold text-high-em",children:n}),e]});X2.displayName="DrawerHeader";const Q2=({children:e,className:t})=>o.jsx("div",{className:te.twMerge(N.clsx("flex-1",t)),children:e});Q2.displayName="DrawerContent";const J2=({children:e,className:t})=>e?o.jsx("div",{className:te.twMerge(N.clsx("shrink-0 border-t border-surface-3 py-6 px-8",t)),children:e}):null;J2.displayName="DrawerFooter";const e3=({children:e,size:t="sm"})=>{const{onOpenChange:r}=dm();return e?O.default.cloneElement(e,{onClick:n=>{e.props.onClick?.(n),r(!1)}}):o.jsx(K,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:t,icons:"only",leadingIcon:o.jsx(nt,{className:"text-high-em"}),onClick:()=>r(!1)})};e3.displayName="DrawerClose";const h4=Object.assign(G2,{Overlay:Z2,Panel:Y2,Header:X2,Content:Q2,Footer:J2,Close:e3});function t3({planName:e,price:t,billingPeriod:r="month",priceContent:n,description:a,ctaLabel:i="Switch Plan",onCtaClick:s,features:l,featuresTitle:c="Features",featuresSubtitle:u="Everything in our plan includes",isRecommended:d=!1,recommendedLabel:f="Recommended",recommendedIcon:h,loading:p=!1,ctaVariant:g="neutral",ctaHierarchy:x="primary",sectionColor:m="bg-white",sectionTextColor:v,className:b}){return o.jsxs("div",{className:te.twMerge(N.clsx("relative w-full flex flex-col",b)),children:[d&&o.jsx("div",{className:"absolute -top-9 left-1/2 -translate-x-1/2 z-10 whitespace-nowrap",children:o.jsx(Ge,{size:"lg",theme:"surface",variant:"outlined",children:o.jsx(ft,{icon:h,label:f,iconSize:14,gap:3,iconColorClass:"text-med-em",labelColorClass:"text-med-em text-xs font-semibold"})})}),o.jsxs("div",{className:"bg-surface-2 border border-surface-3 rounded-8 overflow-hidden w-full flex flex-col flex-1",children:[o.jsxs("div",{className:N.clsx("flex items-start justify-between p-8 border-b border-surface-3",m),children:[o.jsx("span",{className:N.clsx("text-xl font-semibold",v??"text-high-em"),children:e}),o.jsx("div",{className:"flex items-baseline gap-4",children:n??o.jsxs(o.Fragment,{children:[o.jsx("span",{className:N.clsx("text-2xl font-bold leading-none",v??"text-high-em"),children:t}),r&&o.jsxs("span",{className:N.clsx("text-sm",v??"text-high-em"),children:["/ ",r]})]})})]}),o.jsxs("div",{className:N.clsx("flex flex-col gap-8 p-8 border-b border-surface-3",m),children:[o.jsx("p",{className:N.clsx("text-sm leading-relaxed",v??"text-high-em"),children:a}),o.jsx(K,{variant:g,hierarchy:x,size:"md",className:"w-full",onClick:s,loading:p,children:i})]}),o.jsxs("div",{className:"flex flex-col gap-8 p-8 bg-surface-bg flex-1",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xl font-bold text-high-em",children:c}),o.jsx("p",{className:"text-sm text-high-em",children:u})]}),o.jsx("ul",{className:"flex flex-col gap-8",children:l.map(w=>o.jsxs("li",{className:"flex items-center gap-8",children:[o.jsx("span",{className:"text-low-em shrink-0",children:o.jsx(B.TickCircle,{size:14,color:"currentColor"})}),o.jsx("span",{className:"text-sm text-low-em",children:w})]},w))})]})]})]})}t3.displayName="PlanPricingCard";const dl=({type:e="default",size:t="lg",variant:r="primary",children:n,className:a})=>{const i="inline-flex items-center justify-center transition-colors duration-200",s={lg:"w-[80px] h-[80px] rounded-[16px]",md:"w-[56px] h-[56px] rounded-[16px]",sm:"w-[40px] h-[40px] rounded-[8px]"},l={lg:32,md:24,sm:20},c={default:{primary:"bg-surface-4 text-white-uniform",secondary:"bg-surface-1 text-high-em",tertiary:"bg-transparent border-[2px] border-surface-3 text-high-em",quaternary:"bg-transparent text-high-em"},brand:{primary:"bg-brand-primary-main text-white-uniform",secondary:"bg-surface-3 text-primary-accent-3",tertiary:"bg-transparent border-[2px] border-surface-4 text-primary-accent-3",quaternary:"bg-transparent text-primary-accent-3"},danger:{primary:"bg-danger-main text-white-uniform",secondary:"bg-danger-accent-1 text-danger-main",tertiary:"bg-transparent border-[2px] border-danger-accent-2 text-danger-main",quaternary:"bg-transparent text-danger-main"},success:{primary:"bg-success-main text-white-uniform",secondary:"bg-success-accent-1 text-success-main",tertiary:"bg-transparent border-[2px] border-success-accent-2 text-success-main",quaternary:"bg-transparent text-success-main"}},u=O.default.isValidElement(n)?O.default.cloneElement(n,{size:l[t],color:"currentColor"}):null;return o.jsx("div",{className:N.clsx(i,s[t],c[e][r],a),children:u})},r3=O.default.forwardRef(({title:e,companyImage:t,badgeStatus:r,badgeStatusState:n,onButtonAction:a,actionButtonRef:i,stackLabel:s,powerLabel:l,calendarLabel:c,link1Label:u,link1Href:d,link2Label:f,link2Href:h,link2Status:p,onCardClick:g,className:x,...m},v)=>{const b=N.clsx("flex flex-col overflow-hidden transition-all duration-200 w-full min-w-0 p-4 gap-3 border rounded-2xl border-surface-3","bg-white","p-6 md:p-8 gap-6 md:gap-8"),w=te.twMerge(N.clsx(b,x)),C={success:"success",warning:"warning",danger:"danger",disabled:"disabled"};return o.jsxs("div",{ref:v,className:w,...m,children:[o.jsxs("div",{className:"flex-row flex justify-between",children:[o.jsx("div",{className:"flex",children:o.jsx(ie,{className:"!rounded-4",size:"2xl",imageUrl:t})}),o.jsx("div",{className:"flex w-fit",children:o.jsx(K,{ref:i,size:"sm",leadingIcon:o.jsx(ie,{children:o.jsx(o2,{})}),icons:"only",hierarchy:"secondary",variant:"neutral",onClick:a})})]}),o.jsxs("div",{className:"flex-col flex justify-between gap-4",children:[o.jsxs("div",{className:"flex gap-5 items-center",children:[o.jsx("span",{className:"text-high-em font-semibold",children:e}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsx(Ge,{variant:"simple",theme:C[n],children:r})})]}),o.jsxs("div",{className:"flex flex-row gap-4",children:[o.jsx(ft,{label:s,labelSize:"sm",iconSize:"sm",gap:4,icon:o.jsx(s2,{})}),o.jsx(ft,{label:l,labelSize:"sm",iconSize:"sm",gap:4,icon:o.jsx(l2,{})}),o.jsx(ft,{label:c,labelSize:"sm",iconSize:"sm",gap:4,icon:o.jsx(c2,{})})]})]}),o.jsx(pe,{direction:"horizontal"}),o.jsxs("div",{className:"flex-row flex justify-between gap-8",children:[o.jsxs("div",{className:"flex w-1/2 flex-col gap-2",children:[o.jsx("span",{className:"text-sm text-low-em",children:"Subdomain"}),o.jsx("div",{className:"flex-row flex center items-center gap-4",children:o.jsx($r,{href:d,className:"w-fit",variant:"neutral",children:u})})]}),o.jsxs("div",{className:"flex w-1/2 flex-col gap-2",children:[o.jsx("span",{className:"text-sm text-low-em",children:"Database"}),o.jsxs("div",{className:"flex-row flex center items-center gap-4",children:[o.jsx(Ge,{variant:"status",statusState:p,statusSize:"xs"}),o.jsx($r,{href:h,trailingIcon:o.jsx(i2,{}),className:"w-fit",variant:"neutral",children:f})]})]})]})]})});r3.displayName="ProjectCard";const gh=({progress:e,description:t,className:r,...n})=>{const a=Math.min(100,Math.max(0,e)),i="w-full bg-surface-3 rounded-full h-1 relative overflow-hidden flex-1",s=N.clsx("size-[18px] rounded-full transition-all duration-300 grow-0 shrink-0 border-black",e>1?"border-5":e===0?"border-2 border-surface-3":"border-5"),l=N.clsx(i,r);return o.jsxs("div",{className:"flex flex-col gap-y-2 w-full",children:[o.jsxs("div",{className:"flex items-center w-full gap-x-5",children:[o.jsx("div",{className:s}),o.jsx("div",{className:l,role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress: ${a}%`,...n,children:o.jsx("div",{className:"h-full rounded-full transition-all duration-300 ease-out bg-black",style:{width:`${a}%`}})})]}),t&&o.jsx("p",{className:"mt-2 font-medium text-sm text-left text-low-em",children:t})]})},Ql={xs:{size:144,container:"size-[144px]",strokeWidth:12,labelFontSize:"text-xs",fontSize:"text-[24px]",lineHeight:"leading-[36px]",halfCircle:"w-[144px] h-[80px]",labelSpace:"",halfCircleLabelPosition:"top-2/5"},sm:{size:180,container:"size-[180px]",strokeWidth:14,labelFontSize:"text-xs",fontSize:"text-[28px]",lineHeight:"leading-[42px]",halfCircle:"w-[180px] h-[95px]",labelSpace:"",halfCircleLabelPosition:"top-2/5"},md:{size:240,container:"size-[240px]",strokeWidth:16,labelFontSize:"text-sm",fontSize:"text-[38px]",lineHeight:"leading-[62px]",halfCircle:"w-[240px] h-[131px]",labelSpace:"",halfCircleLabelPosition:"top-2/5"},lg:{size:280,container:"size-[280px]",strokeWidth:18,labelFontSize:"text-md",fontSize:"text-[48px]",lineHeight:"leading-[72px]",halfCircle:"w-[280px] h-[154px]",labelSpace:"",halfCircleLabelPosition:"top-2/5"}},p4={primary:{track:"text-surface-3",fill:"text-black",label:"text-low-em text-center",progressLabel:"text-high-em font-space-grotesk font-semibold",opacity:1}},qn=({progress:e,size:t="md",variant:r="primary",shape:n="circle",showLabel:a=!0,label:i,className:s,ariaLabel:l,id:c,...u})=>{const d=Math.min(100,Math.max(0,e)),f=O.default.useId(),h=c||`progress-circle-${f}`,p=i?`${h}-label`:void 0,g=Ql[t],x=p4[r],m=()=>l||(i?`Progreso: ${i}, ${d}% completado`:`Progreso: ${d}% completado`),v=g.size,b=(v-g.strokeWidth)/2,w=2*Math.PI*b,C=w-d/100*w,y=()=>n==="circle"?Ql[t].container:Ql[t].halfCircle,j=()=>o.jsxs("svg",{width:v,height:v,className:"transform -rotate-90",role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-label":m(),"aria-labelledby":p,"aria-live":"polite","aria-atomic":"true",children:[o.jsx("circle",{cx:v/2,cy:v/2,r:b,stroke:"currentColor",strokeWidth:g.strokeWidth,fill:"none",className:x.track,opacity:x.opacity}),o.jsx("circle",{cx:v/2,cy:v/2,r:b,stroke:"currentColor",strokeWidth:g.strokeWidth,fill:"none",className:x.fill,strokeDasharray:w,strokeDashoffset:C,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),S=()=>{const A=g.strokeWidth,_=v,I=v/2+A,k=(v-g.strokeWidth)/2,E=A/2,T=I-A/2,M=v-A/2,R=I-A/2,$=Math.PI*k*2,L=$-d/100*$;return o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:`0 0 ${_} ${I}`,className:"size-full",fill:"none",role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-label":m(),"aria-labelledby":p,"aria-live":"polite","aria-atomic":"true",children:[o.jsx("path",{d:`M${E},${T} A${k},${k} 0 1,1 ${M},${R}`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:g.strokeWidth,stroke:"currentColor",className:x.track,opacity:x.opacity}),o.jsx("path",{d:`M${E},${T} A${k},${k} 0 1,1 ${M},${R}`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:g.strokeWidth,stroke:"currentColor",className:x.fill,strokeDasharray:$,strokeDashoffset:L,style:{transition:"stroke-dashoffset 0.3s ease-in-out"}})]})};return o.jsxs("div",{className:N.clsx("relative inline-flex items-center justify-center",y(),s),id:h,...u,children:[n==="circle"?j():S(),a&&n==="circle"&&o.jsxs("div",{className:N.clsx("absolute inset-0 flex flex-col items-center justify-center","leading-none"),children:[i&&o.jsx("span",{id:p,className:N.clsx(g.labelFontSize,x.label),children:i}),o.jsx("span",{className:N.clsx(g.fontSize,g.lineHeight,x.progressLabel),style:{fontFamily:"var(--font-space-grotesk)"},children:`${d}%`})]}),a&&n==="half-circle"&&o.jsxs("div",{className:N.clsx("absolute left-0 right-0 flex flex-col items-center justify-center",i?g.halfCircleLabelPosition:"top-1/2",i&&g.labelSpace),children:[i&&o.jsx("span",{id:p,className:N.clsx(g.labelFontSize,x.label),children:i}),o.jsx("span",{className:N.clsx(g.fontSize,g.lineHeight,x.progressLabel),style:{fontFamily:"var(--font-space-grotesk)"},children:`${d}%`})]})]})},m4=({currentStep:e,totalSteps:t,currentStepProgress:r=0,stepDescriptions:n=[],title:a,subtitle:i,className:s,collapsed:l,onToggleCollapse:c,onClose:u,onlyProgressCircle:d=!1})=>{const[f,h]=O.default.useState(l??!0);O.default.useEffect(()=>{typeof l=="boolean"&&h(l)},[l]);const p=()=>{const m=!f;h(m),c&&c(m)},g=O.default.useMemo(()=>Array.from({length:t},(m,v)=>{const b=v+1;let w;return b<e?w=100:w=0,{progress:w,description:n[v]||`Step ${b}`}}),[e,t,n]),x=t>0?Math.round((e-1)/t*100+r/t):0;return d?o.jsx(qn,{progress:x,size:"xs",showLabel:!0,ariaLabel:`Overall progress: ${x}%`,className:s}):o.jsxs(pt.motion.div,{className:N.clsx("bg-white overflow-hidden",s),role:"region","aria-label":`Progress tracker${f?"":" - expanded"}`,layout:!0,animate:{height:f?61:130},transition:{duration:.3,ease:"easeInOut"},children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-2 gap-3",children:[o.jsx(pt.motion.div,{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:p,layout:!0,children:o.jsx(pt.AnimatePresence,{mode:"wait",children:f?o.jsx(pt.motion.div,{className:"flex items-center gap-3 flex-1 min-w-0",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:g.map((m,v)=>o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(gh,{progress:m.progress})},v))},"collapsed-content"):o.jsxs(pt.motion.div,{className:"flex flex-col flex-1",initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.2},children:[a&&o.jsx("h3",{className:"text-[16px] text-dark-100 font-semibold",children:a}),i&&o.jsx("p",{className:"text-sm text-dark-700",children:i})]},"expanded-title")})}),o.jsxs("div",{className:"flex items-center gap-9 py-4 px-6",children:[o.jsx(qn,{progress:x,size:"xs",showLabel:!0,ariaLabel:`Overall progress: ${x}%`}),o.jsx(pt.motion.button,{className:"rounded-full cursor-pointer flex items-center justify-center",onClick:p,whileHover:{scale:1.1},whileTap:{scale:.9},transition:{duration:.1},"aria-label":f?"Expand":"Collapse",children:o.jsx(pt.motion.div,{style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},animate:{rotate:f?0:180},transition:{duration:.2},children:o.jsx(B.ArrowDown2,{size:16,color:"black"})})}),o.jsx(pt.motion.button,{className:"rounded-full cursor-pointer flex items-center justify-center w-6 h-6",onClick:u,whileHover:{scale:1.1},whileTap:{scale:.9},transition:{duration:.1},"aria-label":"Close",children:o.jsx(nt,{size:16})})]})]}),o.jsx(pt.AnimatePresence,{children:!f&&o.jsx(pt.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"overflow-hidden",children:o.jsx("div",{className:"pt-2 pb-4 px-8",children:o.jsx(pt.motion.div,{className:"flex gap-3 w-full",initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.2},children:g.map((m,v)=>{const w=v+1===e;return o.jsx(pt.motion.div,{className:"w-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15+v*.05,duration:.2,ease:"easeOut"},children:o.jsxs("div",{children:[o.jsx(gh,{progress:m.progress}),(m.progress!==0||w)&&m.description&&o.jsx("div",{className:"text-sm text-[#2F343C] mt-3 font-semibold",children:m.description}),m.progress===0&&!w&&m.description&&o.jsx("div",{className:"text-sm text-[#5A606B] mt-3 font-semibold",children:m.description})]})},v)})})})})})]})},x4=({actions:e,borderless:t=!1,loading:r=!1,className:n})=>r?o.jsx("div",{className:te.twMerge(N.clsx("flex flex-col bg-surface-1",!t&&"border border-surface-3 rounded-lg overflow-hidden",n)),children:o.jsx("div",{className:"flex flex-col gap-6 p-6",children:Array.from({length:4}).map((a,i)=>o.jsx("div",{className:"h-36 rounded-lg bg-surface-2 animate-pulse"},i))})}):o.jsx("div",{className:te.twMerge(N.clsx("flex flex-col bg-surface-1",!t&&"border border-surface-3 rounded-lg overflow-hidden",n)),children:o.jsx("div",{className:"flex flex-col gap-6 p-6",children:e.map(a=>o.jsx(K,{variant:"neutral",hierarchy:"tertiary",size:"md",icons:a.icon?"leading":"none",leadingIcon:a.icon,onClick:a.onClick,disabled:a.disabled,className:"w-full justify-start",children:a.label},a.id))})}),g4={small:{wrapper:"w-[16px] h-[16px]",dot:"w-[6px] h-[6px]"},medium:{wrapper:"w-[20px] h-[20px]",dot:"w-[8px] h-[8px]"},large:{wrapper:"w-[24px] h-[24px]",dot:"w-[10px] h-[10px]"}},An={unchecked:"bg-transparent border-low-em hover:bg-surface-1",checked:"bg-transparent border-1 border-low-em hover:bg-surface-1",focus:"peer-focus-visible:ring-1 peer-focus-visible:ring-low-em",disabled:{unchecked:"bg-surface-3 border-surface-4",checked:"bg-surface-3 border-surface-4",dot:"bg-surface-4"}},v4=({size:e="medium",checked:t=!1,disabled:r=!1,className:n,...a})=>{const i=g4[e];return o.jsxs("label",{className:N.clsx("inline-flex items-center",r?"cursor-not-allowed":"cursor-pointer",n),children:[o.jsx("input",{type:"radio",checked:t,disabled:r,className:"sr-only peer",...a}),o.jsx("div",{className:N.clsx(i.wrapper,"rounded-full border transition-colors duration-200",t&&"inline-flex items-center justify-center",An.focus,r?t?An.disabled.checked:An.disabled.unchecked:t?An.checked:An.unchecked,!r&&"peer-hover:border-low-em"),children:t&&o.jsx("div",{className:N.clsx(i.dot,"rounded-full",r?An.disabled.dot:"bg-black")})})]})},y4={sm:{card:"gap-3 p-4",iconBox:"size-10",iconRadius:"rounded-4",icon:14,trailing:16},md:{card:"gap-4 p-5",iconBox:"size-12",iconRadius:"rounded-5",icon:20,trailing:18},lg:{card:"gap-4 p-6",iconBox:"size-14",iconRadius:"rounded-6",icon:26,trailing:22}},n3=O.default.forwardRef(({icon:e,title:t,description:r,selected:n=!1,size:a="md",trailingIcon:i,className:s,...l},c)=>{const u="group flex w-full items-center rounded-8 border text-left transition-all duration-200 focus:outline-none",d=n?"border-brand-secondary-main bg-surface-1 ring-1 ring-brand-secondary-main":"border-surface-3 bg-surface-1 hover:bg-surface-2",f=n?"bg-brand-secondary-main text-white-uniform":"bg-surface-3 text-low-em",h=y4[a],p=(g,x)=>O.default.isValidElement(g)?O.default.cloneElement(g,{size:x,color:"currentColor"}):g;return o.jsxs("button",{ref:c,type:"button",role:"radio","aria-checked":n,className:te.twMerge(N.clsx(u,h.card,d,s)),...l,children:[o.jsx("span",{className:N.clsx("flex shrink-0 items-center justify-center",h.iconBox,h.iconRadius,f),children:p(e,h.icon)}),o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("span",{className:"text-sm font-medium text-high-em",children:t}),r&&o.jsx("span",{className:"text-xs text-low-em",children:r})]}),n&&i&&o.jsx("span",{className:"shrink-0 text-brand-secondary-main",children:p(i,h.trailing)})]})});n3.displayName="SelectableCard";const b4={success:"bg-success-main",warning:"bg-warning-main",error:"bg-danger-main",info:"bg-info-em"},tg={brand:{done:"border-brand-secondary-main bg-brand-secondary-main text-white",current:"border-brand-secondary-main text-brand-secondary-main",line:"bg-brand-secondary-main"},success:{done:"border-success-main bg-success-main text-white",current:"border-success-main text-success-main",line:"bg-success-main"},warning:{done:"border-warning-main bg-warning-main text-white",current:"border-warning-main text-warning-main",line:"bg-warning-main"}},w4={brand:{done:"bg-brand-secondary-main",current:"bg-brand-secondary-accent-3",pending:"bg-surface-3"},success:{done:"bg-success-main",current:"bg-success-accent-3",pending:"bg-surface-3"},warning:{done:"bg-warning-main",current:"bg-warning-accent-3",pending:"bg-surface-3"}},a3=({steps:e,current:t,variant:r="numbered",lineStyle:n="solid",colorVariant:a,indicatorGap:i,stepGap:s,itemClassName:l,className:c})=>{const u=a?tg[a]:tg.brand,d=a?w4[a]:null;return o.jsx("ol",{className:te.twMerge("flex flex-col",c),children:e.map((f,h)=>{const p=h<t?"done":h===t?"current":"pending",g=h===e.length-1,x=r==="dot",m=n==="dashed",v=x?d?d[p]:f.status?b4[f.status]:"bg-surface-3":null;return o.jsxs("li",{className:te.twMerge("flex",i??"gap-3",l),children:[o.jsxs("div",{className:"flex flex-col items-center self-stretch",children:[x?o.jsx("span",{className:N.clsx("size-2.5 shrink-0 rounded-full mt-1.5",v)}):o.jsx("span",{className:N.clsx("flex size-12 shrink-0 items-center justify-center rounded-full border text-xs font-medium",p==="done"&&u.done,p==="current"&&u.current,p==="pending"&&"border-surface-3 text-low-em"),children:String(h+1).padStart(2,"0")}),!g&&(m?o.jsx("span",{className:"w-0 border-l-2 border-dashed border-surface-3 grow my-1"}):o.jsx("span",{className:N.clsx("my-1 w-px grow",h<t?u.line:"bg-surface-3")}))]}),o.jsxs("div",{className:N.clsx(x?"pt-0":"pt-3",!g&&(s??(x?"pb-4":"pb-6"))),children:[o.jsx("p",{className:N.clsx("text-sm",x?"text-med-em":N.clsx(p==="current"&&"font-medium text-high-em",p==="done"&&"text-med-em",p==="pending"&&"text-low-em")),children:f.title}),f.caption&&o.jsx("p",{className:"text-xs text-low-em mt-0.5",children:f.caption})]})]},`${f.title}-${h}`)})})},j4={xs:{wrapper:"h-10 rounded-4",button:"px-4 text-[10px] rounded-3 h-9",activeButton:"rounded-3 px-4",gap:"gap-x-[5px]"},sm:{wrapper:"h-13 rounded-6 px-2",button:"px-4 text-xs rounded-4 h-12",activeButton:"rounded-4",gap:"gap-x-[5px]"},md:{wrapper:"h-14 rounded-6 px-2",button:"px-6 text-sm rounded-6 h-13",activeButton:"rounded-3",gap:"gap-x-[5px]"},lg:{wrapper:"h-[56px] rounded-8 px-2",button:"px-8 text-base rounded-6 h-14",activeButton:"rounded-4",gap:"gap-x-3"},"ai-chat":{wrapper:"h-[42px] rounded-6 px-[3px]",button:"px-4 text-sm rounded-5 h-[34px]",activeButton:"rounded-5 px-4",gap:"gap-x-[5px]"}},fl=({items:e,value:t,onChange:r,size:n="md",variant:a="default",itemGap:i,withBorder:s=!1,className:l})=>{const c=j4[n],u=a==="surface";return o.jsx("div",{className:N.clsx("inline-flex items-center p-1",u?"bg-surface-bg":"bg-surface-2",c.wrapper,i??c.gap,s&&"border border-surface-4",l),children:e.map(d=>{const f=d.id===t;return o.jsx("button",{onClick:()=>r(d.id),className:N.clsx("font-semibold transition-colors duration-200",c.button,f?N.clsx(u?"bg-surface-2":"bg-surface-bg","shadow-sm text-high-em",c.activeButton):"text-low-em hover:bg-surface-3 hover:text-med-em"),children:d.label},d.id)})})},C4=[{id:"all",label:"All"},{id:"success",label:"Success"},{id:"warning",label:"Warnings"},{id:"error",label:"Errors"}],i3=P.forwardRef(({entries:e,showSwitcher:t=!0,filterItems:r=C4,switcherSize:n="sm",switcherVariant:a="surface",switcherItemGap:i="gap-x-8",variant:s="dot",lineStyle:l="dashed",colorVariant:c,stepGap:u="pb-8",indicatorGap:d="gap-8",itemPadding:f="py-2",current:h,bodyPadding:p="p-8",className:g,...x},m)=>{const[v,b]=P.useState(r[0]?.id??"all"),C=(v==="all"?e:e.filter(y=>y.status===v)).map(y=>({title:y.description,caption:y.timestamp,status:y.status}));return o.jsxs("div",{ref:m,className:te.twMerge("bg-white border border-surface-3 w-full max-w-sm flex flex-col overflow-hidden",g),...x,children:[t&&o.jsx("div",{className:"bg-surface-bg px-4 py-2 border-b border-surface-2 overflow-x-auto ds-scrollbar shrink-0",children:o.jsx(fl,{items:r,value:v,onChange:y=>b(String(y)),size:n,variant:a,itemGap:i})}),o.jsx("div",{className:te.twMerge("flex-1 min-h-0 overflow-y-auto ds-scrollbar",p),children:C.length===0?o.jsx("p",{className:"text-sm text-low-em py-8 text-center",children:"No activity found"}):o.jsx(a3,{steps:C,current:h??C.length,variant:s,lineStyle:l,colorVariant:c,stepGap:u,indicatorGap:d,itemClassName:f})})]})});i3.displayName="ActivityFeed";const o3=O.default.createContext(null),tr=()=>{const e=O.default.useContext(o3);if(!e)throw new Error("useTableContext must be used within a TableProvider");return e},s3=({children:e,value:t})=>O.default.createElement(o3.Provider,{value:t},e),S4=48,O4=({columns:e,data:t,tableLayout:r={},children:n,className:a,...i})=>{const s=O.default.useRef(null),[l,c]=O.default.useState(()=>!i.sortBy||!i.sortDirection?[]:[{id:i.sortBy,desc:i.sortDirection==="desc"}]),[u,d]=O.default.useState(()=>{const y={};return i.selectedRows?.forEach(j=>{y[String(j)]=!0}),y}),[f,h]=O.default.useState(i.searchValue||""),[p,g]=O.default.useState(()=>({pageIndex:(i.currentPage||1)-1,pageSize:i.itemsPerPage||10})),[x,m]=O.default.useState({});O.default.useEffect(()=>{if(i.sortBy&&i.sortDirection){const y=[{id:i.sortBy,desc:i.sortDirection==="desc"}];JSON.stringify(y)!==JSON.stringify(l)&&c(y)}},[i.sortBy,i.sortDirection,l]),O.default.useEffect(()=>{if(i.selectedRows){const y={};i.selectedRows.forEach(j=>{y[String(j)]=!0}),JSON.stringify(y)!==JSON.stringify(u)&&d(y)}},[i.selectedRows,u]),O.default.useEffect(()=>{i.searchValue!==f&&h(i.searchValue||"")},[i.searchValue,f]),O.default.useEffect(()=>{if(i.currentPage){const y=i.currentPage-1;y!==p.pageIndex&&g(j=>({...j,pageIndex:y}))}},[i.currentPage,p.pageIndex]);const v=O.default.useMemo(()=>{const y=e.map(j=>{const S=j.id==="__select"||j.type==="select",A=i.selectColumnSize??S4,_={id:j.id,header:j.header,accessorKey:j.id,enableSorting:j.sortable??!1,enableColumnFilter:j.filterable??!1,size:S?A:j.size,minSize:S?A:j.minSize,maxSize:S?A:j.maxSize,enableResizing:!0,meta:{align:j.align,hasExplicitSize:S||j.size!==void 0}};return j.component?_.cell=({row:I,getValue:k})=>{const E=j.component,T=j.accessor?j.accessor(I.original):k();return O.default.createElement(E,{value:T,row:I.original,rowIndex:I.index,...j.componentProps})}:j.cell?_.cell=({row:I})=>j.cell(I.original):j.accessor?_.cell=({row:I})=>j.accessor(I.original):_.cell=({getValue:I})=>I(),_});return i.selectable&&y.unshift({id:"__select",header:"",cell:({row:j})=>j.original,enableSorting:!1,enableColumnFilter:!1,size:48,minSize:48,maxSize:48}),y},[e,i.selectable]),b=kr.useReactTable({data:t,columns:v,state:{columnSizing:x,sorting:l,rowSelection:u,globalFilter:f,pagination:i.showPagination?p:void 0},enableColumnResizing:!0,columnResizeMode:"onChange",onColumnSizingChange:m,defaultColumn:{minSize:20,maxSize:Number.MAX_SAFE_INTEGER,size:150},onSortingChange:y=>{const j=typeof y=="function"?y(l):y;c(j);const S=j[0];S?i.onSortChange?.(S.id,S.desc?"desc":"asc"):i.onSortChange?.("",null)},onRowSelectionChange:y=>{const j=typeof y=="function"?y(u):y;d(j);const S=new Set;Object.keys(j).forEach(A=>{if(j[A]){const _=Number(A);S.add(isNaN(_)?A:_)}}),i.onSelectionChange?.(S)},onGlobalFilterChange:y=>{const j=typeof y=="function"?y(f):y;h(j),i.onSearchChange?.(j)},onPaginationChange:y=>{if(!i.showPagination)return;const j=typeof y=="function"?y(p):y;g(j),i.onPageChange?.(j.pageIndex+1)},getCoreRowModel:kr.getCoreRowModel(),getSortedRowModel:kr.getSortedRowModel(),getFilteredRowModel:kr.getFilteredRowModel(),getPaginationRowModel:i.showPagination?kr.getPaginationRowModel():void 0,manualPagination:!1,manualSorting:!1,getRowId:(y,j)=>String(i.getRowId?.(y,j)??j)}),w=O.default.useMemo(()=>({dense:!1,cellBorder:!1,rowBorder:!0,rowHeight:64,cellAlign:"center",headerBackground:!0,headerBorder:!0,virtualized:i.virtualized||!1,width:"auto",columnsVisibility:!1,columnsResizable:!0,...r}),[r,i.virtualized]),C=()=>{b.resetGlobalFilter(),b.resetColumnFilters(),i.showPagination&&b.setPageIndex(0)};return o.jsx(s3,{value:{table:b,tableLayout:w,parentRef:s,emptyStateTitle:i.emptyStateTitle,emptyStateDescription:i.emptyStateDescription,showClearFiltersButton:i.showClearFiltersButton??!0,resetAllFilters:C},children:o.jsx("div",{className:N.clsx("w-full min-w-0 flex flex-col",a),children:n})})},N4=({children:e,className:t,noFooter:r=!1})=>{const{tableLayout:n,parentRef:a,table:i}=tr(),{virtualized:s,width:l}=n,c=i.getFilteredRowModel().rows.length===0;return s?o.jsx("div",{ref:a,className:N.clsx("bg-surface-0 border-x border-surface-4 overflow-auto w-full min-w-full table ds-scrollbar",t),style:{height:"400px"},children:o.jsx("table",{className:N.clsx("w-full",l==="fixed"&&"table-fixed",l==="auto"&&"table-auto"),children:e})}):o.jsx("div",{className:N.clsx("bg-surface-0 border-x border-surface-4 overflow-x-auto w-full ds-scrollbar",(r||c)&&"border-b rounded-b-2xl",t),children:o.jsxs("table",{className:N.clsx(!c&&l!=="fixed"&&"min-w-max","w-full",l==="fixed"&&"table-fixed",l==="auto"&&"table-auto"),"data-slot":"data-table",children:[l==="fixed"&&o.jsx("colgroup",{children:i.getAllLeafColumns().map(u=>o.jsx("col",{style:u.id==="__select"?{width:`${u.getSize()}px`,maxWidth:`${u.getSize()}px`}:void 0},u.id))}),e]})})},Io=({children:e,className:t,style:r,isTBody:n=!0})=>{const{tableLayout:a}=tr(),{rowBorder:i,rowHeight:s}=a,l=s&&n?{...r,height:`${s}px`}:r;return o.jsx("tr",{className:N.clsx("bg-white hover:bg-surface-2 transition-colors",i&&"border-b border-surface-4 last:border-b-0",t),style:l,children:e})},l3=({header:e,className:t})=>{const{table:r,tableLayout:n}=tr(),{headerBackground:a,dense:i,cellBorder:s,columnsResizable:l,cellAlign:c,width:u}=n,d=e.column,f=e.column.getIsSorted(),h=f!==!1,p=d.getCanResize()&&l;if(d.id==="__select")return o.jsx("th",{className:N.clsx(i?"px-2 py-2":"px-3 py-3",a&&"bg-surface-1","align-middle relative",s&&"border-r border-surface-4 last:border-r-0",t),style:{width:`${e.getSize()}px`,minWidth:`${e.getSize()}px`,maxWidth:`${e.getSize()}px`,...c&&{textAlign:c}},children:o.jsx("div",{className:"flex items-center justify-center",children:o.jsx(Dr,{className:"",checked:r.getIsAllPageRowsSelected(),onChange:r.getToggleAllPageRowsSelectedHandler(),indeterminate:r.getIsSomePageRowsSelected(),size:"small"})})});const g=o.jsxs("th",{className:N.clsx(i?"px-4 py-2":"px-6 py-3",a&&"bg-surface-1","flex items-center justify-center flex-row gap-2 min-w-0 relative",d.getCanSort()&&"cursor-pointer hover:bg-surface-3 transition-colors",h&&"bg-surface-3",s&&"border-r border-surface-4 last:border-r-0",t),style:{...u!=="fixed"&&{width:`${e.getSize()}px`,minWidth:`${d.columnDef.minSize||20}px`,maxWidth:`${d.columnDef.maxSize||Number.MAX_SAFE_INTEGER}px`},textAlign:e.column.columnDef.meta?.align??c},onClick:d.getCanSort()?d.getToggleSortingHandler():void 0,children:[o.jsx("div",{className:"align-middle gap-2 min-w-0",children:o.jsx("span",{className:N.clsx("text-xs font-medium leading-[18px] truncate capitalize text-low-em",h&&"font-semibold"),children:kr.flexRender(e.column.columnDef.header,e.getContext())})}),f&&o.jsx("div",{className:"align-middle flex-shrink-0",children:o.jsx(rg,{direction:f==="desc"?"desc":"asc"})}),d.getCanFilter()&&o.jsx("div",{className:"align-middle flex-shrink-0",children:o.jsx(ng,{})})]});return p?o.jsxs("th",{className:N.clsx(i?"px-4 py-2":"px-6 py-3",a&&"bg-surface-1","align-middle min-w-0 relative group",d.getCanSort()&&"cursor-pointer hover:bg-surface-3 transition-colors",h&&"bg-surface-3",s&&"border-r border-surface-4 last:border-r-0",t),style:{...u!=="fixed"&&{width:`${e.getSize()}px`,minWidth:`${d.columnDef.minSize||20}px`,maxWidth:`${d.columnDef.maxSize||Number.MAX_SAFE_INTEGER}px`},...c&&{textAlign:c}},onClick:d.getCanSort()?d.getToggleSortingHandler():void 0,children:[o.jsxs("div",{className:"flex items-center justify-center flex-row gap-2",children:[o.jsx("div",{className:"align-middle gap-2 min-w-0",children:o.jsx("span",{className:N.clsx("text-xs font-medium leading-[18px] truncate capitalize text-low-em",h&&"font-semibold"),children:kr.flexRender(e.column.columnDef.header,e.getContext())})}),f&&o.jsx("div",{className:"align-middle flex-shrink-0",children:o.jsx(rg,{direction:f==="desc"?"desc":"asc"})}),d.getCanFilter()&&o.jsx("div",{className:"align-middle flex-shrink-0",children:o.jsx(ng,{})})]}),o.jsx("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:N.clsx("absolute top-0 right-0 w-1 h-full cursor-col-resize z-10","bg-transparent hover:bg-surface-4 opacity-0 group-hover:opacity-50")})]}):g},rg=({direction:e})=>e?o.jsx(Xj,{className:N.clsx("text-low-em",e==="asc"&&"rotate-180"),size:12}):null,ng=()=>o.jsx(Qj,{className:"text-low-em",size:12}),P4=({className:e})=>{const{table:t,tableLayout:r}=tr(),{headerBackground:n,headerBorder:a}=r;return o.jsx("thead",{className:N.clsx(n&&"bg-surface-1",a&&"border-b border-surface-4",e),children:t.getHeaderGroups().map(i=>o.jsx(Io,{isTBody:!1,children:i.headers.map(s=>o.jsx(l3,{header:s},s.id))},i.id))})},vh=({cell:e,className:t})=>{const{tableLayout:r}=tr(),{cellAlign:n}=r,a=e.row,i=a.getIsSelected();return e.column.id==="__select"?o.jsx("td",{className:N.clsx(r.dense?"px-2 py-2":"px-3 py-3","relative",i?"bg-surface-2":"",r.cellBorder&&"border-r border-surface-4 last:border-r-0",t),style:{width:`${e.column.getSize()}px`,minWidth:`${e.column.getSize()}px`,maxWidth:`${e.column.getSize()}px`},children:o.jsx("div",{className:"flex items-center justify-center",children:o.jsx(Dr,{checked:i,onChange:a.getToggleSelectedHandler(),size:"small"})})}):o.jsx("td",{className:N.clsx(r.dense?"px-4 py-2":"px-6 py-4","text-high-em text-sm font-medium leading-5 transition-colors min-w-0 truncate",i?"bg-surface-2":"",r.cellBorder&&"border-r border-surface-4 last:border-r-0",t),style:{textAlign:e.column.columnDef.meta?.align??n},children:kr.flexRender(e.column.columnDef.cell,e.getContext())})},c3=({title:e="No data available.",className:t,colSpan:r=1})=>o.jsx("tr",{className:N.clsx("w-full",t),children:o.jsx("td",{colSpan:r,children:o.jsx(ht,{description:e,flat:!0,className:"rounded-b-2xl"})})}),A4=({className:e})=>{const{table:t,tableLayout:r,parentRef:n,emptyStateTitle:a,resetAllFilters:i}=tr(),{virtualized:s}=r;if(t.getFilteredRowModel().rows.length===0)return o.jsx("tbody",{className:N.clsx(r.rowBorder&&"divide-y divide-surface-4",r.dense&&"text-sm",e),children:o.jsx(c3,{title:a,colSpan:t.getAllColumns().length})});if(!s)return o.jsx("tbody",{className:N.clsx(r.rowBorder&&"divide-y divide-surface-4",r.dense&&"text-sm",e),children:t.getRowModel().rows.map(f=>o.jsx(Io,{children:f.getVisibleCells().map(h=>o.jsx(vh,{cell:h},h.id))},f.id))});const c=LO.useVirtualizer({count:t.getRowModel().rows.length,getScrollElement:()=>n?.current||null,estimateSize:()=>r.rowHeight?r.rowHeight:r.dense?32:40,overscan:5}),u=c.getVirtualItems(),d=c.getTotalSize();return o.jsx("tbody",{className:N.clsx("relative",r.dense&&"text-sm",e),style:{height:`${d}px`},children:u.map(f=>{const h=t.getRowModel().rows[f.index];return o.jsx(Io,{style:{position:"absolute",top:0,left:0,width:"100%",height:`${f.size}px`,transform:`translateY(${f.start}px)`},children:h.getVisibleCells().map(p=>o.jsx(vh,{cell:p},p.id))},f.key)})})},_4=(e,t)=>{const r=Number(e);if(isNaN(r)||!isFinite(r))return 1;const n=Math.floor(r),a=Math.max(1,Math.min(n,t));return t>0?a:1},u3=e=>({id:String(e),title:String(e),showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1,className:"!min-w-0 justify-center [&>div:last-child]:hidden",middleContainerClassName:"justify-center [&>div]:mr-0"}),k4=e=>e.map(t=>u3(t)),T4=(e,t,r,n)=>{const a=e*t+1,i=Math.min((e+1)*t,r||n);return{start:a,end:i,total:r||n}},E4=({showPagination:e=!0,totalItems:t,className:r,sizes:n=[10,20,50,100],footerBackground:a=!0,noBorder:i=!1,actions:s})=>{const{table:l}=tr(),[c,u]=tl(),d=u<500,f=l.getState().pagination,h=l.getPageCount(),p=l.getCanPreviousPage(),g=l.getCanNextPage(),x=S=>{const A=_4(S,h)-1;l.setPageIndex(A)},m=S=>{l.setPageSize(Number(S))},v=()=>l.previousPage(),b=()=>l.nextPage(),w=l.getFilteredRowModel().rows.length,{total:C}=T4(f.pageIndex,f.pageSize,t,w),y=k4(n),j=f.pageSize;return!e||w===0?null:o.jsxs("div",{ref:c,className:N.clsx("flex-shrink-0 w-full px-8 py-6 flex flex-row justify-between items-center gap-4",!i&&"border border-surface-4 rounded-b-2xl",a&&"bg-surface-1",r),children:[o.jsxs("div",{className:N.clsx("items-center flex-row shrink-0 gap-4",d?"hidden":"flex"),children:[o.jsx("span",{className:N.clsx("text-low-em text-sm font-semibold",d?"hidden":"block"),children:"Showing"}),o.jsx(Te,{className:"!w-[68px]",size:"sm",variant:"outlined",value:String(j),items:y,onChange:m,showLeadingIcon:!1,customHeight:"28px",customRadius:"8px",menuSize:"sm"}),o.jsx("span",{className:N.clsx("text-med-em text-sm font-semibold",d?"hidden":"block"),children:`/ ${String(C)}`})]}),o.jsxs("div",{className:N.clsx("flex flex-row items-center gap-4",d?"w-full justify-between":"w-auto justify-end"),children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("span",{className:N.clsx("text-med-em text-sm font-semibold whitespace-nowrap",d?"hidden":"block"),children:"Go To Page"}),o.jsx(Te,{className:"!w-[68px]",size:"sm",variant:"outlined",value:String(f.pageIndex+1),items:Array.from({length:h||1},(S,A)=>u3(A+1)),onChange:x,showLeadingIcon:!1,customHeight:"28px",customRadius:"8px",menuSize:"sm"}),o.jsxs("span",{className:"text-med-em text-sm font-semibold whitespace-nowrap",children:["of ",h||1]})]}),o.jsx("div",{className:"px-4 flex items-center",children:o.jsx("span",{className:"w-0 border-l border-gray-300 h-[33px]"})}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(K,{onClick:v,disabled:!p,variant:"neutral",hierarchy:"tertiary",size:"sm",children:"Previous"}),o.jsx(K,{onClick:b,disabled:!g,variant:"brand",hierarchy:"primary",size:"sm",children:"Next"})]})]}),s&&o.jsx("div",{className:"flex items-center gap-x-4 flex-shrink-0",children:s})]})},I4=({title:e,search:t,actions:r,className:n})=>o.jsxs("div",{className:N.clsx("w-full px-8 py-6 bg-white border border-surface-4 rounded-t-2xl flex flex-row justify-between items-center gap-4",n),children:[e&&!t&&o.jsx("div",{className:"flex-shrink-0 text-xl font-semibold text-high-em leading-[30px]",children:e}),t&&o.jsx("div",{className:"flex-1",children:o.jsx(ge,{value:t.value??"",onChange:a=>t.onChange(a.target.value),placeholder:t.placeholder??"Search...",size:"md",leadingIcon:o.jsx(B.SearchNormal1,{size:16})})}),r&&o.jsx("div",{className:"flex items-center gap-x-4 flex-shrink-0",children:r})]}),M4=({columnId:e,className:t,options:r,title:n})=>{const{table:a}=tr(),i=a.getColumn(e),[s,l]=P.useState(i?.getFilterValue()||"");if(!i||!i.getCanFilter())return null;const c=i.columnDef,u=c.filterType||"text",d=n||c.header||i.id,f=p=>{l(p),i.setFilterValue(p||void 0)},h=()=>{switch(u){case"select":return o.jsxs("select",{value:s,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm",children:[o.jsx("option",{value:"",children:"All"}),r?.map((p,g)=>o.jsx("option",{value:String(p.value),children:p.label},g))]});case"number":return o.jsx("input",{type:"number",value:s,onChange:p=>f(p.target.value),placeholder:`Filter ${d}...`,className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"});case"date":return o.jsx("input",{type:"date",value:s,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"});case"boolean":return o.jsxs("select",{value:s,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm",children:[o.jsx("option",{value:"",children:"All"}),o.jsx("option",{value:"true",children:"Yes"}),o.jsx("option",{value:"false",children:"No"})]});case"text":default:return o.jsx("input",{type:"text",value:s,onChange:p=>f(p.target.value),placeholder:`Filter ${d}...`,className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"})}};return o.jsxs("div",{className:N.clsx("p-2 border-t border-gray-200",t),children:[o.jsx("div",{className:"text-xs font-medium text-gray-700 mb-1",children:d}),h()]})},$4=({className:e,trigger:t,position:r="right"})=>{const{table:n}=tr(),[a,i]=P.useState(!1),s=n.getAllColumns().filter(h=>h.id!=="__select"&&h.getCanHide());if(s.length===0)return null;const l=h=>{s.forEach(p=>{p.getCanHide()&&p.toggleVisibility(h)})},c=s.every(h=>h.getIsVisible()),u=s.some(h=>h.getIsVisible()),d=o.jsxs(K,{variant:"neutral",hierarchy:"tertiary",size:"sm",className:"flex items-center gap-2",children:[o.jsx(B.Eye,{size:"16"}),"Columns",o.jsx(B.ArrowDown2,{size:"16"})]}),f=r==="right"?"right-0 origin-top-right":"left-0 origin-top-left";return o.jsxs("div",{className:N.clsx("relative inline-block text-left",e),children:[o.jsx("div",{onClick:()=>i(!a),children:t||d}),a&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),o.jsx("div",{className:N.clsx("absolute z-20 mt-2 w-56 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",f),children:o.jsxs("div",{className:"py-1",children:[o.jsx("div",{className:"px-4 py-2 border-b border-gray-200",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Column Visibility"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{onClick:()=>l(!0),className:"text-xs text-blue-600 hover:text-blue-800",disabled:c,children:"All"}),o.jsx("span",{className:"text-gray-300",children:"|"}),o.jsx("button",{onClick:()=>l(!1),className:"text-xs text-blue-600 hover:text-blue-800",disabled:!u,children:"None"})]})]})}),o.jsx("div",{className:"max-h-60 overflow-y-auto",children:s.map(h=>{const p=h.getIsVisible(),g=typeof h.columnDef.header=="string"?h.columnDef.header:h.id;return o.jsxs("div",{className:"px-4 py-2 hover:bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx(Dr,{checked:p,onChange:h.getToggleVisibilityHandler(),size:"small"}),o.jsx("label",{htmlFor:`column-${h.id}`,className:"ml-2 text-sm text-gray-700 cursor-pointer",onClick:x=>{x.stopPropagation(),h.toggleVisibility()},children:g})]}),o.jsx("button",{onClick:x=>{x.stopPropagation(),h.toggleVisibility()},className:"p-1 rounded hover:bg-gray-200",children:p?o.jsx(B.Eye,{size:"16",className:"text-gray-600"}):o.jsx(B.EyeSlash,{size:"16",className:"text-gray-400"})})]},h.id)})})]})})]})]})},R4=({value:e,config:t})=>{const r=t?.size||"sm";return o.jsx(Bt,{size:r,initials:String(e||"")})},L4=({value:e,config:t})=>{const r=t?.size||"xs",n=t?.variantMap||{},a=t?.variant||"secondary",i=String(e||"").toLowerCase(),s=n[i]||a;return o.jsx(Rr,{variant:s,size:r,children:String(e||"")})},D4=({value:e})=>{const t=String(e||"");return o.jsx("a",{href:`mailto:${t}`,className:"text-primary-900 hover:underline",children:t})},ag=({value:e})=>o.jsx("span",{children:String(e||"")}),z4=({value:e})=>{const t=typeof e=="number"?e:parseFloat(String(e||"0"));return o.jsx("span",{children:t.toLocaleString()})},B4=({value:e})=>{if(!e)return o.jsx("span",{children:"-"});const t=e instanceof Date?e:new Date(String(e));return o.jsx("span",{children:t.toLocaleDateString()})},F4=({value:e})=>{const t=!!e;return o.jsx("span",{className:t?"text-success-600":"text-gray-400",children:t?"✓":"✗"})},q4={avatar:R4,tag:L4,email:D4,text:ag,number:z4,date:B4,boolean:F4,custom:ag};function d3(e){const t=q4[e.dataType];return{id:e.id,header:e.header,sortable:e.sortable,filterable:e.filterable,width:e.width,filterType:e.filterConfig?.type,filterOptions:e.filterConfig?.options,component:({value:r,row:n,rowIndex:a})=>t({value:r,row:n,rowIndex:a,config:e.componentProps}),accessor:r=>r[e.id]}}function W4(e){return e.map(t=>d3(t))}function H4(e){return[{id:"__select",header:"",type:"select",width:"w-16"},...e]}const f3={title:"User Management",columns:[{id:"avatar",header:"Avatar",dataType:"avatar",componentProps:{size:"sm"}},{id:"name",header:"Name",dataType:"text",sortable:!0,filterable:!0,filterConfig:{type:"text"}},{id:"email",header:"Email",dataType:"email",filterable:!0,filterConfig:{type:"text"}},{id:"status",header:"Status",dataType:"tag",filterable:!0,filterConfig:{type:"select",options:[{label:"Active",value:"active"},{label:"Inactive",value:"inactive"},{label:"Pending",value:"pending"}]},componentProps:{size:"xs",variantMap:{active:"success",inactive:"quaternary",pending:"info"}}},{id:"role",header:"Role",dataType:"text",filterable:!0,filterConfig:{type:"select",options:[{label:"Admin",value:"Admin"},{label:"User",value:"User"},{label:"Manager",value:"Manager"}]}},{id:"department",header:"Department",dataType:"text"},{id:"loginCount",header:"Logins",dataType:"number",sortable:!0},{id:"isVerified",header:"Verified",dataType:"boolean"},{id:"createdAt",header:"Created",dataType:"date",sortable:!0}],features:{selectable:!0,virtualized:!1,pagination:!0,sorting:!0,filtering:!0},pagination:{itemsPerPage:10,currentPage:1,totalPages:5,totalItems:50}},h3=[{id:1,avatar:"JD",name:"John Doe",email:"john.doe@example.com",status:"active",role:"Admin",department:"Engineering",createdAt:"2024-01-15",loginCount:142,isVerified:!0},{id:2,avatar:"JS",name:"Jane Smith",email:"jane.smith@example.com",status:"active",role:"Manager",department:"Marketing",createdAt:"2024-02-20",loginCount:98,isVerified:!0},{id:3,avatar:"RJ",name:"Robert Johnson",email:"robert.j@example.com",status:"pending",role:"User",department:"Sales",createdAt:"2024-03-10",loginCount:5,isVerified:!1},{id:4,avatar:"MW",name:"Maria Williams",email:"maria.w@example.com",status:"active",role:"User",department:"HR",createdAt:"2024-01-25",loginCount:67,isVerified:!0},{id:5,avatar:"DB",name:"David Brown",email:"david.b@example.com",status:"inactive",role:"User",department:"Engineering",createdAt:"2023-12-05",loginCount:234,isVerified:!0}],V4={config:f3,data:h3},p3={title:"Product Inventory",columns:[{id:"sku",header:"SKU",dataType:"text",sortable:!0},{id:"name",header:"Product Name",dataType:"text",sortable:!0,filterable:!0,filterConfig:{type:"text"}},{id:"category",header:"Category",dataType:"tag",filterable:!0,filterConfig:{type:"select",options:[{label:"Electronics",value:"Electronics"},{label:"Clothing",value:"Clothing"},{label:"Food",value:"Food"}]},componentProps:{size:"xs",variant:"secondary"}},{id:"price",header:"Price",dataType:"number",sortable:!0,filterConfig:{type:"number"}},{id:"stock",header:"Stock",dataType:"number",sortable:!0},{id:"isActive",header:"Active",dataType:"boolean",filterable:!0,filterConfig:{type:"boolean"}},{id:"lastUpdated",header:"Last Updated",dataType:"date",sortable:!0}],features:{selectable:!0,virtualized:!1,pagination:!0,sorting:!0,filtering:!0},pagination:{itemsPerPage:15,currentPage:1,totalPages:3,totalItems:45}},m3=[{id:1,sku:"ELEC-001",name:"Wireless Mouse",category:"Electronics",price:29.99,stock:150,isActive:!0,lastUpdated:"2024-03-15"},{id:2,sku:"CLTH-045",name:"Cotton T-Shirt",category:"Clothing",price:19.99,stock:300,isActive:!0,lastUpdated:"2024-03-14"},{id:3,sku:"FOOD-112",name:"Organic Coffee",category:"Food",price:12.5,stock:0,isActive:!1,lastUpdated:"2024-02-28"},{id:4,sku:"ELEC-089",name:"USB-C Cable",category:"Electronics",price:15.99,stock:500,isActive:!0,lastUpdated:"2024-03-16"},{id:5,sku:"CLTH-098",name:"Denim Jeans",category:"Clothing",price:59.99,stock:75,isActive:!0,lastUpdated:"2024-03-10"}],U4={config:p3,data:m3},ig={line:{list:"flex gap-x-9 border-b border-surface-3",tab:"relative pb-8 px-2 font-medium text-[14px] transition-colors focus:outline-none",selected:"text-high-em after:absolute after:bottom-[-1px] after:left-0 after:right-0 after:h-1 after:bg-black",unselected:"text-low-em"},"line-full-width":{list:"flex border-b border-surface-3",tab:"flex flex-1 justify-center relative pb-8 px-2 font-medium text-sm transition-colors focus:outline-none",selected:"text-high-em after:absolute after:bottom-[-1px] after:left-0 after:right-0 after:h-1 after:bg-black",unselected:"text-low-em"},pill:{list:"flex gap-x-12",tab:"font-medium text-sm transition-colors focus:outline-none px-6 rounded-md",selected:"bg-surface-2 text-high-em py-4",unselected:"text-low-em px-3 py-2 hover:bg-surface-2/50"}},Jl={none:"",xs:"mt-2",sm:"mt-4",md:"mt-6",lg:"mt-8",xl:"mt-12"},fm=({variant:e="line",tabs:t,className:r,selectedIndex:n,onChange:a,customPaddingBottom:i,contentSpacing:s="sm",fullHeight:l=!1,iconLabelGap:c=4,iconSize:u=16,showBorder:d=!0,headerHeight:f,tabPaddingX:h,tabListClassName:p,lazy:g=!1,responsive:x})=>{const m=O.default.useRef(null),v=O.default.useRef(0),b=O.default.useRef(!1),[w,C]=O.default.useState(!1);O.default.useLayoutEffect(()=>{if(!x)return;const $=m.current;if(!$)return;const L=()=>{b.current||(v.current=$.scrollWidth);const U=$.clientWidth,z=v.current,F=b.current?U<z+24:U<z;F!==b.current&&(b.current=F,C(F))};L();const q=new ResizeObserver(L);return q.observe($),()=>q.disconnect()},[x,t.length]);const y=w&&e==="line-icons",j=e==="line-icons"||e==="only-icon",S=e!=="only-icon"&&!y,A=e==="only-icon"||y,_=e==="line-icons"||e==="only-icon"?ig.line:ig[e],I=d?_.list:_.list.replace(/border-b\s+border-surface-3/g,"").trim(),k={};f&&(k.height=`${f}px`,k.alignItems="flex-end");const E=()=>typeof s=="number"?"":s in Jl?Jl[s]:Jl.sm,T=typeof s=="number"?{marginTop:`${s}px`}:{},M=l?{height:"100%",maxHeight:"100%",overflow:"hidden",display:"flex",flexDirection:"column"}:{},R=l?{height:"100%",maxHeight:"100%",flex:1}:{};return o.jsx("div",{className:N.clsx("w-full",r),style:M,children:o.jsxs(xe.Tab.Group,{selectedIndex:n,onChange:a,as:"div",className:l?"flex flex-col overflow-hidden":void 0,style:R,children:[o.jsx(xe.Tab.List,{ref:m,className:N.clsx(I,p),style:k,children:t.map($=>o.jsx(xe.Tab,{title:A?$.label:void 0,className:({selected:L})=>N.clsx(_.tab,x&&"shrink-0",L?_.selected:_.unselected),style:{...i?{paddingBottom:i}:{},...h!==void 0?{paddingLeft:`${h}px`,paddingRight:`${h}px`}:{}},children:({selected:L})=>{const q=L&&$.selectedIcon?$.selectedIcon:$.icon;return o.jsxs("div",{className:N.clsx("flex items-center",er(c)),children:[j&&q&&O.default.isValidElement(q)&&O.default.cloneElement(q,{size:u,color:"currentColor"}),S&&o.jsx("span",{className:"whitespace-nowrap",children:$.label})]})}},$.id))}),o.jsx(xe.Tab.Panels,{className:E(),style:l?{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden",...T}:T,children:t.map($=>o.jsx(xe.Tab.Panel,{unmount:g,style:l?{minHeight:0,flex:1,overflowY:"auto",maxHeight:"100%"}:void 0,children:$.content},$.id))})]})})},K4=({tabs:e,activeTabId:t,onTabChange:r,addLabel:n="Add components",onAddComponent:a,borderless:i=!1,fullHeight:s=!1,lazy:l=!1,loading:c=!1,className:u})=>{const[d,f]=O.default.useState(e[0]?.id);O.default.useEffect(()=>{if(t!==void 0)return;e.some(v=>v.id===d)||f(e[0]?.id)},[e,t,d]);const h=t??d,p=m=>{const v=e[m]?.id;v!==void 0&&(f(v),r?.(v))},g=Math.max(0,e.findIndex(m=>m.id===h));if(e.length===0&&!c)return null;if(c)return o.jsxs("div",{className:N.clsx("overflow-hidden",s&&"h-full",!i&&"border border-surface-3 rounded-lg",u),children:[o.jsxs("div",{className:"flex items-center gap-8 p-6 bg-surface-bg border-b border-surface-3",children:[o.jsx("div",{className:"h-24 w-48 rounded-md bg-surface-2 animate-pulse"}),o.jsx("div",{className:"h-24 w-40 rounded-md bg-surface-2 animate-pulse"})]}),o.jsx("div",{className:N.clsx("flex items-center justify-center bg-white",s?"min-h-full":"min-h-[160px]"),children:o.jsx("div",{className:"h-28 w-120 rounded-md bg-surface-2 animate-pulse"})})]});const x=e.map(m=>({id:m.id,label:m.label,content:m.content?o.jsx("div",{className:N.clsx("p-6 bg-white",s&&"min-h-full"),children:m.content}):o.jsx("div",{className:N.clsx("flex items-center justify-center bg-white",s?"min-h-full":"min-h-[160px]"),children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:o.jsx(B.Add,{size:16}),onClick:()=>a?.(m.id),children:n})})}));return o.jsx("div",{className:N.clsx("overflow-hidden",s&&"h-full",!i&&"border border-surface-3 rounded-lg",u),children:o.jsx(fm,{variant:"pill",tabs:x,selectedIndex:g,onChange:p,tabListClassName:"bg-surface-bg border-b border-surface-3 p-6",contentSpacing:"none",fullHeight:s,lazy:l})})},x3=({tabs:e,className:t,selectedIndex:r,onChange:n,onAddTab:a,onArrowRightClick:i,onCloseTab:s,tabWidth:l,scrollDistance:c=300})=>{const u=P.useRef(null),[d,f]=P.useState(!1),[h,p]=P.useState(!1),g=()=>{if(!u.current)return;const{scrollLeft:v,scrollWidth:b,clientWidth:w}=u.current;f(v>0),p(v<b-w-1)};P.useEffect(()=>{g();const v=u.current;if(v){v.addEventListener("scroll",g);const b=new ResizeObserver(g);return b.observe(v),()=>{v.removeEventListener("scroll",g),b.disconnect()}}},[e]);const x=()=>{u.current&&u.current.scrollBy({left:-c,behavior:"smooth"})},m=()=>{u.current&&u.current.scrollBy({left:c,behavior:"smooth"})};return o.jsx("div",{className:N.clsx("w-full h-full",t),children:o.jsx(xe.Tab.Group,{className:"h-full w-full",selectedIndex:r,onChange:n,children:o.jsxs("div",{className:"relative flex items-center border-x border-surface-3 h-full w-full",children:[d&&o.jsx("button",{onClick:x,className:"h-full hover:bg-surface-bg cursor-pointer px-6 border-r border-surface-3 shrink-0","aria-label":"Scroll left",children:o.jsx(ie,{className:"text-med-em",size:"xs",children:o.jsx(B.ArrowLeft2,{})})}),o.jsx("div",{ref:u,className:"flex-1 h-full w-full overflow-x-auto [&::-webkit-scrollbar]:!hidden [-ms-overflow-style:none!important] [scrollbar-width:none!important]",children:o.jsx(xe.Tab.List,{className:"flex min-w-full h-full ",children:e.map((v,b)=>o.jsx(xe.Tab,{as:"div",className:({selected:w})=>N.clsx("relative py-3 font-medium border-r border-surface-3","whitespace-nowrap h-full flex items-center cursor-pointer","outline-none focus:outline-none focus-visible:outline-none focus:ring-0 active:outline-none",l?"":"flex-1",w?"text-high-em bg-white after:absolute border-b-2 border-b-black":"text-low-em bg-surface-bg hover:bg-surface-2"),style:l?r===b?{minWidth:`${l}px`}:{width:`${l}px`,minWidth:`${l}px`}:void 0,children:({selected:w})=>o.jsxs("div",{className:"flex items-center justify-between gap-8 p-8 w-full",children:[o.jsx("span",{className:`!truncate text-sm text-high-em font-medium ${w?"text-high-em":"text-low-em"}`,children:v.label}),v.closeable&&w&&s&&o.jsx(K,{onClick:C=>{C.stopPropagation(),s(b)},className:"cursor-pointer",leadingIcon:o.jsx(ie,{size:"xs",className:"text-med-em",children:o.jsx(nt,{})}),"aria-label":"Close tab",icons:"only",variant:"neutral",hierarchy:"secondary"})]})},v.id))})}),o.jsxs("div",{className:"flex items-center h-full",children:[h&&o.jsx("button",{onClick:i||m,className:"h-full hover:bg-surface-bg cursor-pointer px-6 border-x border-surface-3","aria-label":"Scroll right",children:o.jsx(ie,{className:"text-low-em",size:"xs",children:o.jsx(B.ArrowRight2,{})})}),a&&o.jsx("button",{onClick:a,className:`h-full hover:bg-surface-bg cursor-pointer px-6 ${h?"":"border-l border-surface-3"}`,"aria-label":"Add new tab",children:o.jsx(ie,{className:"text-low-em",size:12,children:o.jsx(B.Add,{})})})]})]})})})};x3.displayName="HeaderTabs";const G4={default:{...qe.default,placeholder:"placeholder-placeholder",text:"text-med-em"},danger:{...qe.danger,placeholder:"placeholder-danger-em",text:"text-danger-em"}},Z4={sm:{...Ft.sm,fontSize:"text-xs"},md:{...Ft.md,fontSize:"text-sm"},lg:{...Ft.lg,fontSize:"text-base"}},_n={wrapper:"bg-surface-3 pointer-events-none border-transparent",label:"!text-disabled",hint:"!text-disabled",text:"disabled:text-disabled",placeholder:"disabled:placeholder-disabled"},hl=({variant:e="default",size:t="md",label:r,hint:n,hintIconVariant:a,disabled:i,resize:s="vertical",className:l,customFontWeight:c,customBackground:u,...d})=>{const f=G4[e],h=Z4[t],p=c||void 0,g=u?/^[a-z]+-[a-z0-9-]+$/i.test(u)?`var(--${u})`:u:void 0,x={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"};return o.jsxs("div",{className:N.clsx("flex flex-col gap-1.5",l),children:[r&&o.jsx("label",{htmlFor:d.id,className:N.clsx("font-semibold text-med-em",h.labelFontSize,i&&_n.label),children:r}),o.jsx("div",{className:N.clsx("relative flex items-center border rounded-xl transition-colors duration-200 flex-1",!u&&f.wrapper,i&&_n.wrapper),style:{backgroundColor:g},children:o.jsx("textarea",{disabled:i,className:N.clsx("w-full h-full bg-transparent px-3.5 py-2.5 focus:outline-none min-h-[80px]",h.fontSize,!c&&"font-medium",f.text,f.placeholder,x[s],i&&_n.text,i&&_n.placeholder),style:{fontWeight:p},...d})}),n&&o.jsx(ft,{icon:o.jsx(B.InfoCircle,{variant:a}),label:n,iconSize:h.hintIconSize,gap:1,iconColorClass:N.clsx(f.hint,i&&_n.hint),labelColorClass:N.clsx(f.hint,i&&_n.hint),className:N.clsx(h.hintFontSize,"font-semibold")})]})};function Y4({theme:e="light",onToggle:t,className:r}){return o.jsx("button",{onClick:t,className:r||"rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-dark-700 hover:bg-gray-50 dark:border-surface-3 dark:bg-surface-2 dark:text-low-em dark:hover:bg-surface-3","aria-label":"Toggle theme",children:e==="dark"?o.jsx("span",{children:"Light Mode"}):o.jsx("span",{children:"Dark Mode"})})}const X4="bg-white rounded-[20px] shadow-xl py-6 px-10 flex items-center gap-6 max-w-md leading-10",Q4={default:"border border-surface-3",custom:"border border-surface-3",danger:"border border-danger-accent-3",success:"border border-success-accent-3",warning:"border border-warning-accent-3"},g3=18,v3="text-base font-bold text-high-em leading-10",y3="text-sm text-high-em leading-9",b3=(e,t)=>te.twMerge(X4,Q4[e||"default"],t),w3=P.forwardRef((e,t)=>{const{title:r,description:n,variant:a="default",action:i,onOpenChange:s,duration:l=5e3,children:c,icon:u,className:d,iconSize:f=g3,...h}=e,p=a!=="custom"||u;return o.jsxs(_t.Root,{ref:t,duration:l,onOpenChange:s,className:b3(a,d),...h,children:[p&&o.jsx("div",{children:a==="custom"&&u?u:o.jsx(Yp,{size:f})}),o.jsxs("div",{className:"flex-1",children:[r&&o.jsx(_t.Title,{className:v3,children:r}),n&&o.jsx(_t.Description,{className:y3,children:n})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-8 bg-surface-3"}),o.jsx(_t.Action,{asChild:!0,altText:i.label,onClick:i.onClick,children:o.jsx(K,{className:"cursor-pointer",variant:"neutral",hierarchy:"quaternary",size:"md",icons:"none",children:i.label})})]}),o.jsx(_t.Close,{asChild:!0,className:"shrink-0 flex items-center justify-center",children:o.jsx(K,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(nt,{className:"text-high-em",size:8})})}),c]})});w3.displayName="Toast";const j3=P.createContext(null),J4=()=>{const e=P.useContext(j3);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},eP=({children:e})=>{const[t,r]=P.useState([]),n=P.useCallback(i=>{const{title:s,description:l,variant:c="default",action:u,duration:d=5e3}=i,f={id:Math.random().toString(36).substr(2,9),title:s,description:l,variant:c,action:u,duration:d};r(h=>[...h,f])},[]),a=P.useCallback((i,s)=>{i||r(l=>l.filter(c=>c.id!==s))},[]);return o.jsx(j3.Provider,{value:{toast:n},children:o.jsxs(_t.Provider,{swipeDirection:"right",children:[e,o.jsx(_t.Viewport,{className:"fixed top-5 right-5 z-[999] flex flex-col gap-4 w-full max-w-[400px]"}),t.map(i=>o.jsxs(_t.Root,{duration:i.duration,onOpenChange:s=>a(s,i.id),className:b3(i.variant),children:[i.variant!=="custom"&&o.jsx("div",{className:"shrink-0 w-10 h-12 flex items-center justify-center",children:o.jsx(Yp,{size:g3})}),o.jsxs("div",{className:"flex-1",children:[i.title&&o.jsx(_t.Title,{className:v3,children:i.title}),i.description&&o.jsx(_t.Description,{className:y3,children:i.description})]}),i.action&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-12 bg-surface-3"}),o.jsx(_t.Action,{asChild:!0,altText:i.action.label,onClick:i.action.onClick,children:o.jsx(K,{className:"cursor-pointer",variant:"neutral",hierarchy:"quaternary",size:"md",icons:"none",children:i.action.label})})]}),o.jsx(_t.Close,{asChild:!0,className:"shrink-0 flex items-center justify-center",children:o.jsx(K,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(nt,{className:"text-high-em",size:8})})})]},i.id))]})})},tP={small:{wrapper:"w-[36px] h-[20px]",knob:"w-[16px] h-[16px]",knobOn:"translate-x-[16px]"},medium:{wrapper:"w-[44px] h-[24px]",knob:"w-[20px] h-[20px]",knobOn:"translate-x-[20px]"},large:{wrapper:"w-[52px] h-[28px]",knob:"w-[24px] h-[24px]",knobOn:"translate-x-[24px]"}},Vr={bgOff:"bg-surface-1 hover:bg-surface-2",bgOn:"bg-black hover:bg-low-em",bgDisabled:"bg-surface-3",knob:"bg-white shadow-[0_1px_2px_0_rgba(10,13,18,0.06)]",knobDisabled:"bg-surface-4",focus:"peer-focus:ring-2 peer-focus:ring-low-em peer-active:ring-2 peer-active:ring-low-em",disabled:"cursor-not-allowed"},Zi=({size:e="medium",checked:t,disabled:r,className:n,...a})=>{const i=tP[e];return o.jsxs("label",{className:N.clsx("relative inline-flex items-center",r?Vr.disabled:"cursor-pointer",n),children:[o.jsx("input",{type:"checkbox",className:"sr-only peer",checked:t,disabled:r,...a}),o.jsx("div",{className:N.clsx(i.wrapper,"relative rounded-full transition-colors duration-200 ease-in-out","flex items-center",r?Vr.bgDisabled:t?Vr.bgOn:Vr.bgOff,!r&&Vr.focus),children:o.jsx("div",{className:N.clsx(i.knob,r?Vr.knobDisabled:Vr.knob,"absolute top-[2px] left-[2px] rounded-full transition-transform duration-200 ease-in-out",t&&i.knobOn)})})]})},hm=O.default.memo(({children:e,className:t,borderSide:r="none",borderStyle:n="surface-3"})=>{const a=O.default.useMemo(()=>r==="none"?"":`${r==="left"?"border-l":"border-r"} ${n==="surface-3"?"border-surface-3":"border-surface-4"}`,[r,n]);return o.jsx("div",{className:`h-full w-full flex flex-col ${a} ${t||""}`,children:e})});hm.displayName="TypesPanel";const rP=({categories:e=[],onItemClick:t,renderItem:r,className:n=""})=>{const a=i=>{t&&t(i)};return o.jsxs("div",{className:`px-6 py-8 flex-1 overflow-y-auto ${n}`,children:[e.map((i,s)=>o.jsxs("div",{className:"mb-8 last:mb-0",children:[o.jsx("h3",{className:"font-inter font-semibold text-sm text-med-em mb-8",children:i.title}),o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(70px,1fr))] gap-6",children:i.items.map(l=>o.jsx(O.default.Fragment,{children:r?r(l,{onClick:()=>a(l.id)}):o.jsx(T2,{icon:l.icon,text:l.label,onClick:()=>a(l.id)})},l.id))}),s<e.length-1&&o.jsx("div",{className:"mt-8",children:o.jsx(pe,{})})]},i.id)),e.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-sm text-med-em",children:"No hay elementos en esta categoría"})})]})},nP=({categories:e=[],onItemClick:t,renderItem:r,className:n=""})=>{const a=i=>{t&&t(i)};return o.jsx(jt.Provider,{delayDuration:300,children:o.jsxs("div",{className:`px-6 py-8 flex-1 overflow-y-auto ${n}`,children:[e.map((i,s)=>o.jsxs("div",{className:"mb-8 last:mb-0",children:[o.jsx("h3",{className:"font-inter font-semibold text-sm text-med-em mb-8",children:i.title}),o.jsx("div",{className:"flex flex-col gap-6",children:i.items.map(l=>o.jsx(O.default.Fragment,{children:r?r(l,{onClick:()=>a(l.id)}):o.jsx(am,{leadingIcon:o.jsx(B.HambergerMenu,{size:20}),leadingIconColor:"text-disabled",icon:o.jsx(Xp,{}),iconColor:"text-disabled",tooltipContent:`Add ${l.label} field type`,onClick:()=>a(l.id),children:l.label})},l.id))}),s<e.length-1&&o.jsx("div",{className:"mt-8",children:o.jsx(pe,{})})]},i.id)),e.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-sm text-med-em",children:"No hay elementos en esta categoría"})})]})})},aP=[{id:"todos",title:"Todos",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1},{id:"basicos",title:"Básicos",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1},{id:"avanzados",title:"Avanzados",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1},{id:"multimedia",title:"Multimedia",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1},{id:"relaciones",title:"Relaciones",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1}],iP=[{value:"list",icon:o.jsx(B.Task,{})},{value:"grid",icon:o.jsx(B.Category,{})}],oP=({className:e="",selectedType:t,onTypeChange:r,selectedView:n,onViewChange:a,actions:i,categories:s,placeholder:l="All",showLabel:c=!0})=>{const[u,d]=P.useState("basicos"),[f,h]=P.useState("list"),p=t!==void 0?t:u,g=n!==void 0?n:f,x=v=>{r?r(v):d(v)},m=v=>{a?a(v):h(v)};return o.jsx(jt.Provider,{delayDuration:300,children:o.jsxs("div",{className:`flex flex-col ${e}`,children:[c&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"px-6 pt-9 pb-8 flex items-center justify-between",children:[o.jsx(W2,{tooltipContent:"Select and configure the type of data field you want to create",labelClassName:"font-inter font-semibold text-sm text-high-em",className:"flex items-center gap-1",children:"Types"}),i&&o.jsx("div",{children:i})]}),o.jsx(pe,{})]}),o.jsxs("div",{className:`flex items-center justify-between gap-4 px-6 ${c?"py-8":"py-4"}`,children:[o.jsx("div",{className:"flex-1",children:o.jsx(Te,{items:s?s.map(v=>({id:v.id,title:v.title,showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1,className:"!h-[34px]"})):aP.map(v=>({...v,showLeadingIcon:!1,className:"!h-[34px]"})),value:p,onChange:x,placeholder:l,size:"md",menuSize:"sm",leadingIcon:o.jsx(B.SearchNormal1,{size:16}),showLeadingIcon:!0})}),o.jsx(mr,{options:iP,value:g,onChange:m,size:"sm"})]}),o.jsx(pe,{})]})})},sP=({className:e="",searchQuery:t,onSearchChange:r,searchPlaceholder:n="Search...",selectedView:a,onViewChange:i,viewOptions:s=[],buttonGroupSize:l="sm"})=>{const[c,u]=P.useState(""),[d,f]=P.useState("list"),h=t!==void 0?t:c,p=a!==void 0?a:d,g=P.useCallback(m=>{const v=m.target.value;r?r(v):u(v)},[r]),x=m=>{i?i(m):f(m)};return o.jsxs("div",{className:`flex flex-col ${e}`,children:[o.jsx(pe,{}),o.jsxs("div",{className:"flex items-center justify-between gap-4 py-8 px-6",children:[o.jsx("div",{className:"flex-1",children:o.jsx(ge,{type:"search",placeholder:n,value:h,onChange:g,trailingIcon:o.jsx(B.SearchNormal1,{size:16,color:"currentColor"})})}),o.jsx(mr,{options:s,value:p,onChange:x,size:l})]}),o.jsx(pe,{})]})},pm=({title:e,backButton:t,actions:r,className:n})=>o.jsxs("div",{className:N.clsx("flex items-center gap-2","h-[56px] px-4","border-b border-surface-3",n),children:[t&&o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:o.jsx(B.ArrowLeft2,{}),"aria-label":t["aria-label"]||"Go back",onClick:t.onClick,className:"shrink-0"}),o.jsxs("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[o.jsx("h2",{className:N.clsx("text-sm font-semibold leading-[22px]","text-high-em","truncate"),children:e}),r&&o.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})]})]});pm.displayName="PanelHeader";const lP=({user:e,sections:t,align:r="right",offset:n=8,className:a,avatarSize:i="md"})=>{const[s,l]=P.useState(!1),c=P.useRef(null),u=P.useRef(null);P.useEffect(()=>{const h=p=>{c.current&&!c.current.contains(p.target)&&u.current&&!u.current.contains(p.target)&&l(!1)};if(s)return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[s]);const d=h=>{!h.disabled&&h.onClick&&(h.onClick(),l(!1))},f=(h,p)=>{h.switch?.onChange&&h.switch.onChange(p)};return o.jsxs("div",{className:N.clsx("relative inline-block",a),children:[o.jsx("div",{ref:u,onClick:()=>l(!s),className:"cursor-pointer",children:o.jsx(Bt,{size:i,imageUrl:e.avatar,initials:e.initials||e.name.charAt(0),statusBadge:e.statusBadge})}),s&&o.jsxs("div",{ref:c,className:N.clsx("absolute z-50 mt-2 min-w-[280px] rounded-lg bg-white shadow-lg border border-surface-3",r==="right"?"right-0":"left-0"),style:{top:`calc(100% + ${n}px)`},children:[o.jsxs("div",{className:"px-10 py-8 border-b border-surface-3",children:[o.jsx("p",{className:"text-sm font-semibold text-high-em",children:e.name}),e.email&&o.jsx("p",{className:"text-xs text-low-em mt-1",children:e.email})]}),o.jsx("div",{className:"py-3",children:t.map((h,p)=>o.jsxs(O.default.Fragment,{children:[h.map(g=>o.jsxs("button",{onClick:()=>d(g),disabled:g.disabled||!!g.switch,className:N.clsx("w-full px-10 py-4 text-left text-sm flex items-center gap-3 transition-colors",!g.switch&&"hover:bg-surface-1",g.destructive?"text-danger-main":"text-high-em",g.disabled&&"opacity-50 cursor-not-allowed"),children:[g.icon&&o.jsx("span",{className:"flex-shrink-0 flex items-center justify-center text-current",children:g.icon}),o.jsx("span",{className:"flex-1 font-normal",children:g.label}),g.trailing&&o.jsx("span",{className:"flex-shrink-0",children:g.trailing}),!g.trailing&&g.badge&&o.jsx(Ge,{theme:g.badge.theme||"success",size:"xs",variant:"simple",children:g.badge.label}),!g.trailing&&g.switch&&o.jsx(Zi,{size:"small",checked:g.switch.checked,onChange:x=>f(g,x.target.checked),onClick:x=>x.stopPropagation()})]},g.id)),p<t.length-1&&o.jsx("div",{className:"my-3 border-t border-surface-3"})]},p))})]})]})},mm=({selected:e,onSelect:t,disabled:r=!1,onCancel:n,onAccept:a,extraMonth:i=!1,pickType:s="range",className:l="",cancelLabel:c="Cancel",acceptLabel:u="Accept",showFooter:d=!0})=>{const[f,h]=P.useState(e);P.useEffect(()=>{h(e)},[e]);const p=f,g=b=>{h(b),t&&t(b)},x=()=>{h(void 0),n&&n()},m=()=>{a&&a(p)},v=s==="range"?{mode:"range",selected:p,onSelect:g}:{mode:"single",selected:p?.from,onSelect:b=>g(b?{from:b}:void 0)};return o.jsxs("div",{className:te.twMerge(N.clsx("font-family-inter bg-white border border-surface-3 rounded-[20px] w-fit",r&&"opacity-50 pointer-events-none",l)),children:[o.jsx(RO.DayPicker,{...v,disabled:r,numberOfMonths:i?2:1,showOutsideDays:!0,className:"datepicker-calendar p-2.5",components:{Chevron:({orientation:b})=>b==="left"?o.jsx(B.ArrowLeft2,{size:16,color:"var(--high-em)"}):o.jsx(B.ArrowRight2,{size:16,color:"var(--high-em)"})}}),d&&o.jsx("div",{className:"border-t border-surface-3 px-2.5 py-2.5 pl-5 self-end justify-end",children:o.jsxs("div",{className:"flex gap-2 self-end justify-end",children:[o.jsx(K,{className:"mr-8",variant:"neutral",size:"sm",hierarchy:"secondary",onClick:x,disabled:r,children:c}),o.jsx(K,{variant:"brand",size:"sm",hierarchy:"primary",onClick:m,disabled:r,children:u})]})})]})},xm=({className:e,icon:t,label:r,description:n,actions:a,iconType:i="default",iconVariant:s="secondary",iconSize:l="sm",linkProps:c,badge:u,bottomContent:d,labelInlineContent:f,contentGap:h=2,classNameActions:p,...g})=>o.jsxs("div",{className:N.clsx("flex flex-row gap-8 items-center",e),...g,children:[t&&o.jsx(dl,{type:i,variant:s,size:l,children:t}),o.jsxs("div",{className:N.clsx("flex flex-1 flex-col",er(h)),children:[o.jsxs("div",{className:N.clsx("flex flex-row",u?"justify-between gap-2":""),children:[o.jsxs("div",{className:"flex flex-row gap-6 items-center",children:[c?o.jsx($r,{className:"w-fit",...c,children:r}):o.jsx("span",{className:"text-high-em text-md font-medium",children:r}),f&&o.jsx("div",{children:f})]}),u&&o.jsx("div",{children:u})]}),n&&o.jsx("span",{className:"text-med-em text-sm font-normal",children:n}),d&&o.jsx("div",{children:d})]}),a&&o.jsx("div",{className:N.clsx("flex gap-8",p),children:a})]}),cP=({className:e,planLabel:t,priceLabel:r,timeLabel:n,nextPaymentLabel:a,dateLabel:i,items:s,buttonLabel1:l,onClickButton1:c,buttonLabel2:u,onClickButton2:d,...f})=>o.jsxs("div",{className:N.clsx("flex flex-col border border-surface-3 rounded-8 w-full",e),...f,children:[o.jsxs("div",{className:"flex flex-row px-10 py-8 border-b border-b-surface-3 gap-8",children:[o.jsxs("div",{className:"flex flex-col flex-1 gap-4",children:[o.jsx("span",{className:"flex text-med-em font-medium text-sm",children:t}),o.jsxs("div",{className:"flex flex-row items-center gap-6",children:[o.jsx("span",{className:"text-high-em font-semibold text-3xl font-family-space-grotesk",children:r}),o.jsxs("span",{className:"text-med-em text-sm font-normal",children:["/ ",n]})]})]}),o.jsxs("div",{className:"flex flex-col self-center ",children:[o.jsx("span",{className:"font-normal text-xs text-right text-med-em",children:a}),o.jsx("span",{className:"text-md text-right font-medium text-high-em",children:i})]})]}),o.jsxs("ul",{className:"flex flex-col p-10 gap-12",children:[o.jsx("div",{className:"flex flex-col gap-10",children:s.map((h,p)=>o.jsx(O.default.Fragment,{children:o.jsx("li",{children:o.jsx(xm,{icon:h.icon,iconType:"default",iconVariant:"secondary",iconSize:"sm",label:h.itemLabel,badge:o.jsx(Ge,{variant:"simple",theme:h.badgeTheme,children:h.badge}),bottomContent:o.jsx(Js,{progress:h.progress})})})},p))}),o.jsxs("div",{className:"flex flex-row gap-6",children:[o.jsx(K,{className:"w-1/2",size:"md",variant:"brand",hierarchy:"primary",onClick:c,children:l}),o.jsx(K,{className:"w-1/2",size:"md",variant:"neutral",hierarchy:"tertiary",onClick:d,children:u})]})]})]}),uP=({className:e,title:t,subtitle:r,actionButtonLabel:n,actionButtonLabelOnClick:a,extraComponent:i,items:s,...l})=>o.jsxs("div",{className:N.clsx("flex flex-col border border-surface-3 rounded-8 w-full",e),...l,children:[o.jsxs("div",{className:"flex flex-row px-10 py-8 border-b border-b-surface-3",children:[o.jsxs("div",{className:"flex flex-1 flex-col content-center",children:[o.jsx("h3",{className:"text-high-em font-semibold",children:t}),o.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]}),n&&o.jsx("div",{className:"flex self-center",children:o.jsx(K,{size:"sm",variant:"neutral",hierarchy:"tertiary",onClick:a,children:n})})]}),o.jsxs("div",{className:"flex flex-col p-10 gap-10",children:[o.jsx("div",{className:"flex flex-col gap-6",children:s.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(pe,{}),o.jsx(xm,{icon:c.icon,label:c.label,description:c.description,actions:(c.buttonLabel||c.buttonIcon)&&o.jsx(K,{size:"sm",onClick:c.buttonOnClick,...c.buttonLabel?{variant:"neutral",hierarchy:"tertiary"}:{icons:"only",variant:"neutral",hierarchy:"secondary",leadingIcon:c.buttonIcon||o.jsx(Qp,{})},children:c.buttonLabel})})]},u))}),i&&o.jsx("div",{className:"flex flex-1",children:i})]})]}),dP=({className:e,title:t,subtitle:r,buttonItems:n,...a})=>o.jsxs("div",{className:N.clsx("flex flex-col gap-8 p-8 bg-surface-1 rounded-8 w-full",e),...a,children:[o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsx("h3",{className:"text-high-em font-semibold text-xl",children:t}),o.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]}),o.jsx("div",{className:"flex flex-col gap-4",children:n.map((i,s)=>o.jsx(K,{children:i.label,leadingIcon:i.icon,size:"sm",icons:"leading",onClick:i.buttonOnClick,...i.variant||i.hierarchy?{variant:i.variant,hierarchy:i.hierarchy}:{variant:"brand",hierarchy:"primary"}},s))})]}),C3=({className:e,icon:t,projectName:r,dbLabel:n,statusLabel:a,statusState:i,stats:s,...l})=>o.jsxs("div",{className:N.clsx("flex flex-col border border-surface-3 rounded-8 bg-white w-full",e),...l,children:[o.jsxs("div",{className:"flex flex-col gap-6 px-10 py-8 border-b border-b-surface-3",children:[o.jsxs("div",{className:"flex items-center gap-5",children:[o.jsx("span",{className:"flex size-12 shrink-0 items-center justify-center rounded-5 bg-surface-2 text-high-em",children:o.jsx(ie,{size:"sm-md",children:t})}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsx("span",{className:"text-high-em font-semibold truncate",children:r}),o.jsx("span",{className:"text-med-em text-sm",children:n})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Ge,{variant:"status",statusState:i,statusSize:"xs"}),o.jsx("span",{className:"text-med-em text-sm",children:a})]})]}),o.jsx("div",{className:"flex flex-col gap-6 px-10 py-8",children:s.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(pe,{}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("span",{className:"text-med-em text-sm",children:c.label}),c.badgeTheme?o.jsx(Ge,{variant:"simple",theme:c.badgeTheme,children:c.value}):o.jsx("span",{className:"text-high-em font-medium",children:c.value})]})]},u))})]});C3.displayName="ProjectOverviewCard";const ec={showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!0},S3=({className:e,icon:t,name:r,statusLabel:n,statusTheme:a="surface",fieldsLabel:i,updatedLabel:s,onView:l,onDuplicate:c,onDelete:u,viewLabel:d="Ver",duplicateLabel:f="Duplicar",deleteLabel:h="Eliminar",...p})=>{const[g,x]=P.useState(!1),m=P.useRef(null),v=()=>x(!1),b=[{...ec,id:"view",title:d,leadingIcon:o.jsx(B.Eye,{}),onSelect:()=>{v(),l?.()}},{...ec,id:"duplicate",title:f,leadingIcon:o.jsx(B.Copy,{}),onSelect:()=>{v(),c?.()}},{...ec,id:"delete",title:h,leadingIcon:o.jsx(B.Trash,{}),customTitleColor:"text-danger-em",onSelect:()=>{v(),u?.()}}];return o.jsxs("div",{role:l?"button":void 0,onClick:l,className:te.twMerge(N.clsx("flex flex-col gap-4 p-6 border border-surface-3 rounded-2xl bg-white w-full min-w-0",l&&"cursor-pointer transition hover:border-surface-4",e)),...p,children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[o.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-4 bg-surface-2 text-high-em",children:o.jsx(ie,{size:"sm",children:t})}),o.jsx("span",{className:"truncate font-semibold text-high-em",children:r})]}),o.jsxs("div",{className:"relative shrink-0",children:[o.jsx("button",{ref:m,type:"button","aria-label":"Opciones del módulo",onClick:w=>{w.stopPropagation(),x(C=>!C)},className:"rounded-md p-1.5 text-low-em transition hover:bg-surface-2 hover:text-high-em",children:o.jsx(B.More,{size:20,color:"currentColor",className:"rotate-90"})}),g&&o.jsx(Wt,{size:"xs",triggerRef:m,onClose:v,items:b})]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[o.jsx(ft,{icon:o.jsx(B.Hashtag,{}),label:i,labelSize:"sm",iconSize:"sm",gap:4}),s&&o.jsx(ft,{icon:o.jsx(B.Clock,{}),label:s,labelSize:"sm",iconSize:"sm",gap:4}),o.jsx(Ge,{variant:"simple",theme:a,children:n})]})]})};S3.displayName="ModuleSummaryCard";const tc={showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!0},O3=({className:e,icon:t,name:r,typeLabel:n,moduleLabel:a,updatedLabel:i,statusLabel:s,statusTheme:l="surface",onView:c,onDuplicate:u,onDelete:d,viewLabel:f="Ver",duplicateLabel:h="Duplicar",deleteLabel:p="Eliminar",...g})=>{const[x,m]=P.useState(!1),v=P.useRef(null),b=()=>m(!1),w=[c&&{...tc,id:"view",title:f,leadingIcon:o.jsx(B.Eye,{}),onSelect:()=>{b(),c()}},u&&{...tc,id:"duplicate",title:h,leadingIcon:o.jsx(B.Copy,{}),onSelect:()=>{b(),u()}},d&&{...tc,id:"delete",title:p,leadingIcon:o.jsx(B.Trash,{}),customTitleColor:"text-danger-em",onSelect:()=>{b(),d()}}].filter(Boolean),C=w.length>0;return o.jsxs("div",{role:c?"button":void 0,onClick:c,className:te.twMerge(N.clsx("flex flex-col gap-4 p-6 border border-surface-3 rounded-2xl bg-white w-full min-w-0",c&&"cursor-pointer transition hover:border-surface-4",e)),...g,children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[o.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-4 bg-surface-2 text-high-em",children:o.jsx(ie,{size:"sm",children:t})}),o.jsx("span",{className:"truncate font-semibold text-high-em",children:r})]}),C&&o.jsxs("div",{className:"relative shrink-0",children:[o.jsx("button",{ref:v,type:"button","aria-label":"Opciones del widget",onClick:y=>{y.stopPropagation(),m(j=>!j)},className:"rounded-md p-1.5 text-low-em transition hover:bg-surface-2 hover:text-high-em",children:o.jsx(B.More,{size:20,color:"currentColor",className:"rotate-90"})}),x&&o.jsx(Wt,{size:"xs",triggerRef:v,onClose:b,items:w})]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[o.jsx(ft,{icon:o.jsx(B.Category,{}),label:n,labelSize:"sm",iconSize:"sm",gap:4}),a&&o.jsx(ft,{icon:o.jsx(B.Box,{}),label:a,labelSize:"sm",iconSize:"sm",gap:4}),i&&o.jsx(ft,{icon:o.jsx(B.Clock,{}),label:i,labelSize:"sm",iconSize:"sm",gap:4}),o.jsx(Ge,{variant:"simple",theme:l,children:s})]})]})};O3.displayName="WidgetSummaryCard";const pl=P.forwardRef(({className:e,title:t,description:r,icon:n,isDragging:a=!1,onMaximize:i,onTextBlock:s,onEdit:l,onCopy:c,onTrash:u,...d},f)=>{const[h,p]=P.useState("icon1"),g=m=>{switch(p(m),m){case"maximize":i?.();break;case"text-block":s?.();break;case"edit":l?.();break;case"copy":c?.();break;case"trash":u?.();break}},x=[...i?[{value:"maximize",icon:o.jsx(ie,{size:12,children:o.jsx(Gs,{})})}]:[],...s?[{value:"text-block",label:t}]:[],...l?[{value:"edit",icon:o.jsx(ie,{size:12,children:o.jsx(u2,{})})}]:[],...c?[{value:"copy",icon:o.jsx(ie,{size:12,children:o.jsx(Zs,{})})}]:[],...u?[{value:"trash",icon:o.jsx(ie,{size:12,children:o.jsx(Ys,{})})}]:[]];return o.jsxs("div",{ref:f,className:N.clsx("group relative flex flex-col border border-surface-3 rounded-8 w-full transition-colors bg-white",a&&"bg-surface-2 opacity-60",e),...d,children:[o.jsxs("div",{className:"flex flex-row p-4 gap-4",children:[o.jsx("div",{children:o.jsx(dl,{variant:"secondary",size:"sm",children:n})}),o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"text-high-em font-semibold text-sm font-family-space-grotesk",children:t}),o.jsx("span",{className:"text-med-em text-xs font-normal",children:r})]})]}),o.jsx("div",{className:"absolute inset-0 m-auto hidden w-fit h-fit p-4 group-hover:block",children:o.jsx(mr,{options:x,value:h,onChange:g,size:"xs",variant:"brand"})})]})});pl.displayName="WidgetBuilderItemHoverAction";const fP=({className:e,title:t,subtitle:r,image:n,imageAlt:a="Project image",actionButtons:i=[],labelIcons:s=[],...l})=>{const[c,u]=O.default.useState(!1);return o.jsxs("div",{className:N.clsx("flex flex-col rounded-2xl w-full border border-surface-3 h-full",e),...l,children:[o.jsxs("div",{className:"relative w-full h-48 overflow-hidden rounded-t-2xl",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[o.jsx("img",{src:n,alt:a,className:"w-full h-full object-cover"}),i.length>0&&c&&o.jsx("div",{className:"absolute inset-0 transition-opacity duration-300",style:{background:"linear-gradient(0deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%)"}}),i.length>0&&o.jsx("div",{className:N.clsx("absolute inset-0 flex items-center justify-center cursor-pointer gap-6 transition-opacity duration-300",c?"opacity-100":"opacity-0"),children:i.map((d,f)=>o.jsx(K,{variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:d.icon,size:"md",onClick:d.onClick,"aria-label":d.ariaLabel,className:"z-10 cursor-pointer"},f))})]}),o.jsxs("div",{className:"flex flex-col py-6 px-8 gap-3 bg-white rounded-b-2xl flex-1",children:[o.jsx("span",{className:"font-semibold text-high-em text-md line-clamp-1",children:t}),o.jsx("span",{className:"text-low-em text-sm font-normal line-clamp-3",children:r}),s.length>0&&o.jsx("div",{className:"flex flex-row gap-8",children:s.map((d,f)=>o.jsx(ft,{gap:4,iconSize:"sm",labelSize:"sm",icon:d.icon,label:d.label},f))})]})]})},hP=({className:e,title:t,subtitle:r,icon:n,iconType:a="default",iconVariant:i="secondary",iconSize:s="sm",headerActions:l,children:c,footerText:u,footerActions:d,footerVariant:f="default",classNameHeader:h,classNameBody:p,classNameFooter:g,...x})=>{const m=t||r||l||n,v=u||d,b={default:"border-surface-3 ",danger:"bg-danger-accent-1 border-danger-accent-3",warning:"bg-warning-accent-1 border-warning-accent-3",success:"bg-success-accent-1 border-success-accent-3"};return o.jsxs("div",{className:N.clsx("flex flex-col bg-white border rounded-8 w-full",e,b[f]),...x,children:[m&&o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-row gap-8 p-8 justify-between items-center",c&&"pb-0"),h),children:[o.jsxs("div",{className:"flex flex-row gap-8 items-center flex-1",children:[n&&o.jsx(dl,{type:a,variant:i,size:s,children:n}),(t||r)&&o.jsxs("div",{className:"flex flex-col gap-2",children:[t&&o.jsx("h3",{className:"text-high-em font-semibold text-md",children:t}),r&&o.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]})]}),l&&o.jsx("div",{className:"flex items-center",children:l})]}),c&&o.jsx("div",{className:te.twMerge(N.clsx("p-8",m),p),children:c}),v&&o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-row gap-10 p-8 items-center rounded-b-8",u&&d?"justify-between":d?"justify-end":"justify-start",(m||c)&&"border-t",b[f]),g),children:[u&&o.jsx("div",{className:"text-sm text-low-em",children:u}),d&&o.jsx("div",{children:d})]})]})},pP=({title:e,columns:t,rows:r,onChange:n,className:a,...i})=>{const s=`1fr repeat(${t.length}, auto)`,l=(c,u,d)=>o.jsx(Dr,{size:"small",checked:c.checked[d]??!1,disabled:c.disabled?.[d]??!1,onChange:f=>n(u,d,f.target.checked)});return o.jsxs("div",{className:te.twMerge("bg-white border border-surface-3 rounded-8 w-full overflow-hidden px-6",a),...i,children:[o.jsxs("div",{className:"hidden sm:grid gap-x-6",style:{gridTemplateColumns:s},children:[o.jsx("div",{className:"flex items-center py-6",children:e&&o.jsx("h3",{className:"text-base text-high-em font-normal",children:e})}),t.map(c=>o.jsx("div",{className:"flex items-center justify-center py-6 text-base text-med-em",children:c},c)),o.jsx("div",{className:"col-span-full",children:o.jsx(pe,{})}),r.map((c,u)=>o.jsxs(O.default.Fragment,{children:[o.jsx("div",{className:"flex items-center py-5",children:o.jsx("span",{className:"text-sm text-high-em",children:c.label})}),t.map((d,f)=>o.jsx("div",{className:"flex items-center justify-center py-5",children:l(c,u,f)},f)),u<r.length-1&&o.jsx("div",{className:"col-span-full",children:o.jsx(pe,{})})]},u))]}),o.jsxs("div",{className:"flex flex-col sm:hidden",children:[e&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"py-6",children:o.jsx("h3",{className:"text-base text-high-em font-normal",children:e})}),o.jsx(pe,{})]}),r.map((c,u)=>o.jsxs(O.default.Fragment,{children:[o.jsxs("div",{className:"flex flex-col gap-4 py-5",children:[o.jsx("span",{className:"text-sm text-high-em",children:c.label}),o.jsx("div",{className:"flex flex-col gap-3",children:t.map((d,f)=>o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm text-med-em",children:d}),l(c,u,f)]},f))})]}),u<r.length-1&&o.jsx(pe,{})]},u))]})]})},og=({size:e=20,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:e,height:e,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M4 8H12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{fill:"currentColor",d:"M8 12V4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),sg=({size:e=20,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",fill:"none",width:e,height:e,className:t,...r,children:[o.jsx("path",{d:"M4.5 11H7.5C10 11 11 10 11 7.5V4.5C11 2 10 1 7.5 1H4.5C2 1 1 2 1 4.5V7.5C1 10 2 11 4.5 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M6 1V11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),mP=[[4],[2,2],[3,1],[1,3],[2,1,1],[1,2,1],[1,1,2],[1,1,1,1]];function xP(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function gP(e){switch(e){case 1:return"w-1/4";case 2:return"w-1/2";case 3:return"w-3/4";case 4:return"w-full"}}const N3=P.createContext(void 0);function P3(){const e=P.useContext(N3);if(!e)throw new Error("Must be used inside DropLayoutPicker");return e}const gm=({children:e,value:t,onChange:r})=>{const[n,a]=P.useState(!1),i=P.useRef(null);return o.jsx(N3.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};gm.displayName="DropLayoutPicker";const vm=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=P3();return O.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};vm.displayName="DropLayoutPickerTrigger";const ym=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=P3(),s=P.useRef(null),[l,c]=P.useState(null),u=Gi({triggerRef:i,panelRef:s,enabled:t});return el({refs:[i,s],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u"?null:Ca.createPortal(o.jsxs("div",{ref:s,className:N.clsx("bg-white rounded-xl border border-surface-3 flex flex-col","min-w-[280px]",e),style:u,children:[o.jsx("div",{className:"p-5",children:o.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Column Layout"})}),o.jsx("div",{className:"border-t border-surface-3"}),o.jsx("div",{className:"p-5",children:o.jsx("div",{className:"grid grid-cols-4 gap-3",children:mP.map((d,f)=>{const h=xP(d,n),p=l===f;return o.jsx("div",{className:N.clsx("h-12 rounded-md cursor-pointer transition-colors border-2 p-1.5",p?"bg-info-accent-1 border-info-accent-2":h?"bg-info-accent-2 border-info-accent-3":"bg-surface-2 border-transparent hover:bg-surface-3"),onMouseEnter:()=>c(f),onMouseLeave:()=>c(null),onClick:()=>{a(d),r(!1)},children:o.jsx("div",{className:"flex gap-0.5 h-full",children:d.map((g,x)=>o.jsx("div",{className:N.clsx("bg-info-accent-3 rounded-sm",gP(g))},x))})},f)})})})]}),document.body)};ym.displayName="DropLayoutPickerContent";const Yi=({className:e,bodyClassName:t,disabled:r=!1,onMaximize:n,dragHandleProps:a,onGrid:i,onAdd:s,onCopy:l,onTrash:c,onAddWidget:u,layout:d,onLayoutChange:f,children:h,...p})=>{const[g,x]=P.useState(""),m=y=>{x(y),y==="grid"&&i?.(),y==="add"&&s?.(),y==="copy"&&l?.(),y==="trash"&&c?.()},v=d!==void 0&&f!==void 0,b=[...!v&&i?[{value:"grid",icon:o.jsx(sg,{size:12})}]:[],...s?[{value:"add",icon:o.jsx(og,{size:12})}]:[]],w=[...l?[{value:"copy",icon:o.jsx(Zs,{size:12})}]:[],...c?[{value:"trash",icon:o.jsx(Ys,{size:12})}]:[]],C=n||a||b.length>0||v;return o.jsxs("div",{className:N.clsx("relative flex flex-col border border-surface-3 w-full",e),...p,children:[o.jsxs("div",{className:"bg-surface-2 flex justify-between border-b border-surface-3 min-h-[28px]",children:[C&&o.jsxs("div",{className:"flex",children:[(n||a)&&o.jsx("button",{type:"button",className:N.clsx("h-[28px] px-[9.2px]","inline-flex items-center justify-center","border-none bg-transparent rounded-none","transition-colors duration-200",r?"opacity-50 cursor-not-allowed pointer-events-none":"hover:bg-surface-2 cursor-grab"),onClick:n,disabled:r,...a,children:o.jsx(Gs,{size:12})}),b.length>0&&o.jsx(mr,{options:b,value:g,onChange:m,size:"xs",variant:"secondary",disabled:r,buttonClassName:"rounded-none"}),v&&d&&f&&o.jsxs(gm,{value:d,onChange:f,children:[o.jsx(vm,{children:o.jsx("button",{type:"button",className:N.clsx("h-[28px] px-[9.2px] text-[10px]","inline-flex items-center justify-center","font-semibold whitespace-nowrap text-high-em","border-none rounded-none bg-transparent","transition-colors duration-200",!r&&"hover:bg-surface-2",r&&"opacity-50 cursor-not-allowed pointer-events-none"),disabled:r,children:o.jsx(sg,{size:12})})}),o.jsx(ym,{})]})]}),w.length>0&&o.jsx(mr,{options:w,value:g,onChange:m,size:"xs",variant:"secondary",disabled:r,buttonClassName:"rounded-none"})]}),o.jsxs("div",{className:N.clsx("flex flex-col p-4 gap-4 h-full",t),children:[o.jsx("div",{className:"flex flex-col gap-4",children:h}),u&&o.jsx("div",{className:"flex justify-center",children:o.jsx(K,{size:"sm",variant:"neutral",hierarchy:"secondary",icons:"only",leadingIcon:o.jsx(og,{}),onClick:u})})]})]})},A3=e=>"grid-cols-4",_3=(e,t)=>{const r=e[t];if(!r)return"col-span-1";switch(r){case 1:return"col-span-1";case 2:return"col-span-2";case 3:return"col-span-3";case 4:return"col-span-4";default:return"col-span-1"}},vP=["maximize","grid","add","copy","trash","addWidget"],yP=["maximize","text-block","edit","copy","trash"],bP=({widget:e,index:t,columnId:r,sectionId:n,onWidgetAction:a,widgetActionSet:i,renderWidgetIcon:s})=>{const{attributes:l,listeners:c,setNodeRef:u,isDragging:d}=dt.useSortable({id:`vc-widget-${e.id}`,data:{type:"vc-widget",widgetId:e.id,widgetTitle:e.title,widgetDescription:e.description,widgetIndex:t,columnId:r,sectionId:n},animateLayoutChanges:()=>!1}),f=P.useRef(null),h=p=>a&&i.has(p)?()=>a(p,e.id,f.current):void 0;return o.jsx("div",{ref:u,"data-vc-widget":e.id,style:{display:d?"none":void 0,cursor:"grab",touchAction:"none"},...l,...c,children:o.jsx(pl,{ref:f,title:e.title,description:e.description,icon:s?.(e)??o.jsx(ie,{}),onMaximize:h("maximize"),onTextBlock:h("text-block"),onEdit:h("edit"),onCopy:h("copy"),onTrash:h("trash")})})},wP=({widget:e,index:t,columnId:r,sectionId:n,onSectionAction:a,sectionActionSet:i,onColumnAction:s,onWidgetAction:l,widgetActionSet:c,renderWidgetIcon:u,onLayoutChange:d})=>{const{attributes:f,listeners:h,setNodeRef:p,isDragging:g}=dt.useSortable({id:`vc-widget-${e.id}`,data:{type:"vc-widget",widgetId:e.id,widgetTitle:e.title,widgetDescription:e.description,widgetIndex:t,columnId:r,sectionId:n},animateLayoutChanges:()=>!1});if(!e.nestedSection)return null;const x=e.nestedSection,m=A3(x.layout),v=w=>a&&i.has(w)?()=>a(w,x.id):void 0,b=x.columns.map(w=>`vc-col-${w.id}`);return o.jsx("div",{ref:p,"data-vc-widget":e.id,style:{display:g?"none":void 0,touchAction:"none"},...f,children:o.jsx(Yi,{bodyClassName:"bg-white",onMaximize:v("maximize"),dragHandleProps:h,onGrid:v("grid"),onAdd:v("add"),onCopy:v("copy"),onTrash:v("trash"),layout:d?x.layout:void 0,onLayoutChange:d?w=>d(x.id,w):void 0,children:o.jsx(dt.SortableContext,{items:b,strategy:dt.horizontalListSortingStrategy,children:o.jsx("div",{className:N.clsx("grid gap-4",m),children:x.columns.map((w,C)=>{const y=_3(x.layout,C);return o.jsx(k3,{column:w,sectionId:x.id,sectionLayout:x.layout,columnSpan:y,onColumnAction:s,onWidgetAction:l,widgetActionSet:c,renderWidgetIcon:u,onSectionAction:a,sectionActionSet:i,onLayoutChange:d},w.id)})})})})})},k3=({column:e,sectionId:t,sectionLayout:r,columnSpan:n,onColumnAction:a,onWidgetAction:i,widgetActionSet:s,renderWidgetIcon:l,onSectionAction:c,sectionActionSet:u,onLayoutChange:d})=>{const{setNodeRef:f,listeners:h,attributes:p,transform:g,isDragging:x}=dt.useSortable({id:`vc-col-${e.id}`,data:{type:"vc-column",columnId:e.id,sectionId:t},animateLayoutChanges:()=>!1}),[m,v]=P.useState(!1),[b,w]=P.useState(null);lt.useDndMonitor({onDragOver(A){const _=A.over?.data.current??{},I=_.columnId===e.id;v(I),w(I&&typeof _.widgetIndex=="number"?_.widgetIndex:null)},onDragEnd(){v(!1),w(null)},onDragCancel(){v(!1),w(null)}});const C=m,y=A=>a?()=>a(A,e.id,t):void 0,j=[...e.widgets].sort((A,_)=>A.position-_.position),S=j.map(A=>`vc-widget-${A.id}`);return o.jsxs("div",{ref:f,"data-droppable-id":`vc-col-${e.id}`,...p,style:{transform:Gp.CSS.Translate.toString(g),transition:x?"none":"transform 150ms ease",opacity:x?0:1},className:N.clsx(n,"flex flex-col",r.length>1&&"border border-surface-3"),children:[r.length>1&&o.jsx(nm,{onDrag:y("drag"),dragHandleProps:h,onDuplicate:y("duplicate"),onDelete:y("delete")}),o.jsxs("div",{className:N.clsx("flex flex-col gap-4 p-4","min-h-[200px]","bg-white"),children:[o.jsxs(dt.SortableContext,{items:S,strategy:dt.verticalListSortingStrategy,children:[j.map((A,_)=>o.jsxs(O.default.Fragment,{children:[C&&b===_&&o.jsx(ci,{}),A.type==="nested-row"?o.jsx(wP,{widget:A,index:_,columnId:e.id,sectionId:t,onSectionAction:c,sectionActionSet:u,onColumnAction:a,onWidgetAction:i,widgetActionSet:s,renderWidgetIcon:l,onLayoutChange:d}):o.jsx(bP,{widget:A,index:_,columnId:e.id,sectionId:t,onWidgetAction:i,widgetActionSet:s,renderWidgetIcon:l})]},A.id)),C&&(b===null||b>=j.length)&&o.jsx(ci,{})]}),!C&&(j.length===0?o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(B.Add,{}),onClick:y("drag")})}):o.jsx("div",{className:"flex items-center justify-center pt-2",children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(B.Add,{}),onClick:y("drag")})}))]})]})},jP=({emptyStateDescription:e})=>{const{setNodeRef:t,isOver:r}=lt.useDroppable({id:"vc-empty-state",data:{isEmpty:!0}});return o.jsx("div",{ref:t,className:"w-64",children:o.jsx(Yi,{bodyClassName:N.clsx("bg-white",r&&"!bg-surface-1"),disabled:!0,onMaximize:()=>{},onGrid:()=>{},onAdd:()=>{},onCopy:()=>{},onTrash:()=>{},onAddWidget:()=>{},children:o.jsx(ht,{flat:!0,description:e,className:"bg-transparent"})})})},CP=()=>{const{setNodeRef:e}=lt.useDroppable({id:"vc-new-row",data:{isNewRow:!0}});return o.jsx("div",{ref:e,className:"mt-4 min-h-[0px]"})},SP=({onWidgetDrop:e,onColumnReorder:t,onSectionReorder:r})=>(lt.useDndMonitor({onDragEnd(n){const{active:a,over:i}=n;if(!i?.id||typeof i.id!="string")return;const s=i.id,l=i.data.current??{},c=a.data.current??{};if(c.type==="vc-column"){let u;s.startsWith("vc-col-")?u=s.replace("vc-col-",""):s.startsWith("vc-widget-")&&(u=l.columnId),t&&u&&u!==c.columnId&&t(c.columnId,c.sectionId,u);return}if(c.type==="vc-section"){r&&s&&!s.startsWith("vc-")&&r(c.sectionId,s);return}if(s==="vc-empty-state")e?.("__empty__","__empty__",0,c);else if(s==="vc-new-row")e?.("__new_row__","__new_row__",-1,c);else if(s.startsWith("vc-widget-")){const{columnId:u,sectionId:d,widgetIndex:f}=l,h=c.columnId!==void 0&&c.columnId!==u;u&&d&&e?.(u,d,h?-1:f,c)}else if(s.startsWith("vc-col-")){const{columnId:u,sectionId:d}=l;u&&d&&e?.(u,d,-1,c)}}}),null),OP=({section:e,sectionActionSet:t,widgetActionSet:r,onSectionAction:n,onColumnAction:a,onWidgetAction:i,renderWidgetIcon:s,onWidgetDrop:l,onLayoutChange:c})=>{const{setNodeRef:u,listeners:d,attributes:f,transform:h,isDragging:p}=dt.useSortable({id:e.id,data:{type:"vc-section",sectionId:e.id},animateLayoutChanges:()=>!1}),g=A3(e.layout),x=v=>n&&t.has(v)?()=>n(v,e.id):void 0,m=e.columns.map(v=>`vc-col-${v.id}`);return o.jsx("div",{ref:u,...f,style:{transform:Gp.CSS.Translate.toString(h),transition:p?"none":"transform 150ms ease",opacity:p?0:1},children:o.jsx(Yi,{bodyClassName:"bg-white",onMaximize:x("maximize"),dragHandleProps:d,onAdd:x("add"),onCopy:x("copy"),onTrash:x("trash"),layout:c?e.layout:void 0,onLayoutChange:c?v=>c(e.id,v):void 0,children:o.jsx(dt.SortableContext,{items:m,strategy:dt.horizontalListSortingStrategy,children:o.jsx("div",{className:N.clsx("grid gap-4",g),children:e.columns.map((v,b)=>{const w=_3(e.layout,b);return l?o.jsx(k3,{column:v,sectionId:e.id,sectionLayout:e.layout,columnSpan:w,onColumnAction:a,onWidgetAction:i,widgetActionSet:r,renderWidgetIcon:s,onSectionAction:n,sectionActionSet:t,onLayoutChange:c},v.id):o.jsxs("div",{"data-droppable-id":`vc-col-${v.id}`,className:N.clsx(w,"flex flex-col",e.layout.length>1&&"border border-surface-3"),children:[e.layout.length>1&&o.jsx(nm,{onDrag:a?()=>a("drag",v.id,e.id):void 0,onDuplicate:a?()=>a("duplicate",v.id,e.id):void 0,onDelete:a?()=>a("delete",v.id,e.id):void 0}),o.jsxs("div",{className:"flex flex-col gap-4 p-4 min-h-[120px] bg-white",children:[v.widgets.sort((C,y)=>C.position-y.position).map(C=>{const y=j=>i&&r.has(j)?()=>i(j,C.id,null):void 0;return o.jsx(pl,{title:C.title,description:C.description,icon:s?.(C)??o.jsx(ie,{}),onMaximize:y("maximize"),onTextBlock:y("text-block"),onEdit:y("edit"),onCopy:y("copy"),onTrash:y("trash")},C.id)}),v.widgets.length===0?o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(B.Add,{}),onClick:a?()=>a("drag",v.id,e.id):void 0})}):o.jsx("div",{className:"flex items-center justify-center pt-2",children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(B.Add,{}),onClick:a?()=>a("drag",v.id,e.id):void 0})})]})]},v.id)})})})})})},NP=({className:e,data:t,emptyStateDescription:r="No sections yet",onSectionAction:n,sectionActions:a,onColumnAction:i,onWidgetAction:s,widgetActions:l,renderWidgetIcon:c,onWidgetDrop:u,onLayoutChange:d,onColumnReorder:f,onSectionReorder:h,...p})=>{const g=[...t?.sections??[]].sort((b,w)=>b.position-w.position),x=new Set(n?a??vP:[]),m=new Set(s?l??yP:[]),v=g.map(b=>b.id);return o.jsxs("div",{className:N.clsx("flex flex-col w-full h-full",e),...p,children:[(u||f||h)&&o.jsx(SP,{onWidgetDrop:u,onColumnReorder:f,onSectionReorder:h}),o.jsx("div",{className:N.clsx("flex-1 bg-surface-bg",g.length===0?"flex items-center justify-center p-8":"flex flex-col gap-4 p-8"),children:g.length===0?u?o.jsx(jP,{emptyStateDescription:r}):o.jsx("div",{className:"w-64",children:o.jsx(Yi,{bodyClassName:"bg-white",disabled:!0,onMaximize:()=>{},onGrid:()=>{},onAdd:()=>{},onCopy:()=>{},onTrash:()=>{},onAddWidget:()=>{},children:o.jsx(ht,{flat:!0,description:r,className:"bg-transparent"})})}):o.jsxs(o.Fragment,{children:[o.jsx(dt.SortableContext,{items:v,strategy:dt.verticalListSortingStrategy,children:g.map(b=>o.jsx(OP,{section:b,sectionActionSet:x,widgetActionSet:m,onSectionAction:n,onColumnAction:i,onWidgetAction:s,renderWidgetIcon:c,onWidgetDrop:u,onLayoutChange:d,onColumnReorder:f},b.id))}),u&&o.jsx(CP,{})]})})]})},PP=e=>{const t=lt.pointerWithin(e);if(t.length===0)return lt.closestCenter(e);const{droppableRects:r,droppableContainers:n,pointerCoordinates:a}=e,i=c=>{const u=r.get(c.id);return u?u.width*u.height:Number.POSITIVE_INFINITY},s=[...t].sort((c,u)=>i(c)-i(u))[0];if(String(s.id).startsWith("vc-col-")&&a){const c=s.data?.droppableContainer?.data.current?.columnId;if(c){const u=Array.from(n.values()).filter(d=>typeof d.id=="string"&&d.id.startsWith("vc-widget-")&&d.data.current?.columnId===c).map(d=>({container:d,rect:r.get(d.id)})).filter(d=>!!d.rect).sort((d,f)=>d.rect.top-f.rect.top);for(const d of u)if(a.y<d.rect.top+d.rect.height/2)return[{id:d.container.id,data:{droppableContainer:d.container,value:0}}]}}return[s]},AP={sm:"max-w-[300px] w-full",md:"w-[32rem]",lg:"w-[40rem]"},bm={sm:{header:"py-1 px-2",body:"p-6",footer:"p-4"},md:{header:"py-1 px-2",body:"p-8",footer:"p-4"},lg:{header:"py-1 px-2",body:"p-10",footer:"p-4"}},T3=P.createContext(void 0),xn=()=>{const e=P.useContext(T3);if(!e)throw new Error("useDropModalContext must be used within a DropModal");return e},Wn=({children:e,size:t="md",padding:r,open:n,onClose:a,triggerRef:i})=>{const[s,l]=P.useState(!1),c=P.useRef(null),u=n!==void 0,d=u?n:s,f=p=>{u||l(p),p||a?.()},h=i??c;return o.jsx(T3.Provider,{value:{open:d,setOpen:f,size:t,padding:r??t,triggerRef:h},children:e})};Wn.displayName="DropModal";const wm=({children:e})=>{const{setOpen:t,open:r,triggerRef:n}=xn();return O.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),t(!r)}})};wm.displayName="DropModalTrigger";const Hn=P.forwardRef(({children:e,className:t},r)=>{const{open:n,setOpen:a,size:i,triggerRef:s}=xn(),l=()=>a(!1),{panelRef:c,portalStyle:u,backdropProps:d}=Q6({triggerRef:s,open:n,onClose:l,constrain:!0});return!n||typeof document>"u"?null:Ca.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{...d}),o.jsx("div",{ref:f=>{c.current=f,typeof r=="function"?r(f):r&&(r.current=f)},role:"dialog","aria-modal":"true",className:N.clsx("bg-white rounded-2xl shadow-xl flex flex-col border border-surface-3 overflow-hidden",AP[i],t),style:u,children:e})]}),document.body)});Hn.displayName="DropModalContent";const Vn=({children:e,disabled:t=!1,className:r,leftIcon:n,onLeftAction:a,leftButtonRef:i,rightIcon:s,onRightAction:l,rightButtonRef:c})=>{const{setOpen:u,padding:d}=xn(),f=bm[d];return o.jsxs("header",{className:N.clsx("flex items-center border-b border-surface-3 shrink-0 rounded-t-xl",f.header,r),children:[o.jsx(K,{ref:i,variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",className:N.clsx("cursor-pointer",!n&&"invisible"),leadingIcon:n&&o.jsx(ie,{size:"sm",children:n}),onClick:a,disabled:t||!a}),o.jsx("div",{className:"flex-1 flex justify-center items-center",children:e}),o.jsx(K,{ref:c,variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",className:"cursor-pointer",leadingIcon:o.jsx(ie,{size:"sm",children:s??o.jsx(nt,{className:"text-high-em"})}),onClick:l??(()=>u(!1)),disabled:t})]})};Vn.displayName="DropModalHeader";const jm=P.forwardRef(({className:e,...t},r)=>o.jsx("h3",{ref:r,className:N.clsx("font-semibold text-xs leading-tight text-center text-high-em",e),...t}));jm.displayName="DropModalTitle";const Un=({children:e,className:t,padding:r})=>{const{padding:n}=xn(),a=bm[n],i=r??!t;return o.jsx("main",{className:N.clsx(i&&a.body,"flex-1 overflow-y-auto",t),children:e})};Un.displayName="DropModalBody";const Cm=({className:e,children:t,...r})=>{const{padding:n}=xn(),a=bm[n];return o.jsx("footer",{className:N.clsx("flex items-center border-t border-surface-3 shrink-0",a.footer,e),...r,children:t})};Cm.displayName="DropModalFooter";const Kn=({cancelButton:e,saveButton:t,className:r})=>{const{setOpen:n,size:a}=xn(),i=a==="sm",s=(l,c)=>{l.onClick?.(c),l.closeOnClick!==!1&&n(!1)};return o.jsx(Cm,{className:N.clsx(i?"flex-row gap-5":"justify-end",r),children:o.jsxs("div",{className:N.clsx("flex",i?"flex-row gap-5 w-full justify-end":"gap-5"),children:[e&&o.jsx(K,{variant:e.variant||"neutral",hierarchy:e.hierarchy||"primary",size:e.size||"xs",...e,className:e.className,onClick:l=>s(e,l),children:e.label}),t&&o.jsx(K,{variant:t.variant||"secondary",hierarchy:t.hierarchy||"primary",size:t.size||"xs",...t,className:t.className,onClick:l=>s(t,l),children:t.label})]})})};Kn.displayName="DropModalFooterActions";const E3=({children:e})=>{const{setOpen:t}=xn();return O.default.cloneElement(e,{onClick:r=>{e.props.onClick?.(r),t(!1)}})};E3.displayName="DropModalClose";const Mo=2;function _P(e,t,r,n){const a=e%Mo,i=Math.floor(e/Mo),s=t!==null&&a<=t.colIdx&&i<=t.rowIdx,l=a<r&&i<n;return{colIdx:a,rowIdx:i,isHovered:s,isActive:l}}function kP(e,t){return N.clsx("w-12 h-12 rounded-md cursor-pointer transition-colors border-2",e?"bg-info-accent-1 border-info-accent-2":t?"bg-info-accent-2 border-info-accent-3":"bg-surface-2 border-transparent")}function TP(){return[1,2].map(e=>({id:String(e),title:String(e),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1}))}const I3=P.createContext(void 0);function M3(){const e=P.useContext(I3);if(!e)throw new Error("Must be used inside DropSizePicker");return e}const lg=({value:e,onChange:t})=>{const[r,n]=P.useState(!1),a=P.useRef(null);return P.useEffect(()=>{if(!r)return;const i=s=>{a.current?.contains(s.target)||n(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[r]),o.jsxs("div",{ref:a,className:"flex-1 relative",children:[o.jsxs("button",{type:"button",onClick:()=>n(i=>!i),className:N.clsx("w-full flex items-center h-[38px] rounded-xl border cursor-pointer","bg-surface-2 border-transparent hover:bg-surface-3 transition-colors","focus:outline-none focus-visible:ring-2 pl-3.5 pr-3.5"),children:[o.jsx("span",{className:"flex-1 text-sm font-medium text-med-em text-left",children:e}),o.jsx("span",{className:"text-med-em flex items-center shrink-0",children:r?o.jsx(B.ArrowUp2,{size:16,color:"currentColor"}):o.jsx(B.ArrowDown2,{size:16,color:"currentColor"})})]}),r&&o.jsx(Wt,{floating:!0,size:"sm",items:TP().map(i=>({...i,className:"!min-w-0",onSelect:()=>{t(Number(i.id)),n(!1)}})),selectedIds:[String(e)],className:"w-full top-full mt-1"})]})},Sm=({children:e,value:t,onChange:r})=>{const[n,a]=P.useState(!1),i=P.useRef(null);return o.jsx(I3.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};Sm.displayName="DropSizePicker";const Om=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=M3();return O.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};Om.displayName="DropSizePickerTrigger";const Nm=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=M3(),s=P.useRef(null),[l,c]=P.useState(null),u=Gi({triggerRef:i,panelRef:s,enabled:t});if(el({refs:[i,s],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u")return null;const{cols:d,rows:f}=n;return Ca.createPortal(o.jsxs("div",{ref:s,className:N.clsx("bg-white rounded-xl border border-surface-3 flex flex-col","min-w-[200px]",e),style:u,children:[o.jsx("div",{className:"p-5",children:o.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Size"})}),o.jsx("div",{className:"border-t border-surface-3"}),o.jsxs("div",{className:"flex items-center gap-3 p-5",children:[o.jsx("span",{className:"text-med-em flex items-center shrink-0",children:o.jsx(B.RowVertical,{size:16,color:"currentColor"})}),o.jsx(lg,{value:d,onChange:h=>a({cols:h,rows:f})})]}),o.jsxs("div",{className:"flex items-center gap-3 p-5",children:[o.jsx("span",{className:"text-med-em flex items-center shrink-0",children:o.jsx(B.RowHorizontal,{size:16,color:"currentColor"})}),o.jsx(lg,{value:f,onChange:h=>a({cols:d,rows:h})})]}),o.jsx("div",{className:"border-t border-surface-3"}),o.jsx("div",{className:"p-5 flex justify-center",children:o.jsx("div",{className:"grid grid-cols-2 gap-3",children:Array.from({length:Mo*Mo},(h,p)=>{const{colIdx:g,rowIdx:x,isHovered:m,isActive:v}=_P(p,l,d,f);return o.jsx("div",{className:kP(m,v),onMouseEnter:()=>c({colIdx:g,rowIdx:x}),onMouseLeave:()=>c(null),onClick:()=>a({cols:g+1,rows:x+1})},p)})})})]}),document.body)};Nm.displayName="DropSizePickerContent";const EP={1:"w-[400px] h-[400px]","2h":"w-[825px] h-[400px]","2w":"w-[400px] h-[825px]",4:"w-[825px] h-[825px]"},gn=({size:e="1",title:t,actions:r,children:n,className:a,classNameHeader:i,classNameBody:s,clipBody:l=!1})=>{const c=t||r;return o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-col bg-white border border-surface-3 rounded-6",EP[e]),a),children:[c&&o.jsxs("div",{className:te.twMerge(N.clsx("flex items-center justify-between p-8 border-b border-surface-3"),i),children:[t&&o.jsx("h3",{className:"text-med-em font-semibold text-xl",children:t}),r&&o.jsx("div",{className:"flex items-center gap-4",children:r})]}),o.jsx("div",{className:te.twMerge(N.clsx("flex-1 p-8 overflow-auto",l&&"overflow-hidden"),s),children:n})]})},IP=({mode:e,title:t,actions:r,onSubmit:n,onSettings:a,className:i,texts:s})=>{const[l,c]=P.useState(""),[u,d]=P.useState(""),[f,h]=P.useState(""),[p,g]=P.useState(""),[x,m]=P.useState(!1),[v,b]=P.useState(!1),w=e==="signup",C=s?.heading??"¡Automatiza!",y=s?.subheading??"Vende y gestiona con inteligencia",j=s?.namePlaceholder??"Nombre",S=s?.emailPlaceholder??"Correo",A=s?.passwordPlaceholder??(w?"Nueva contraseña":"Contraseña"),_=s?.confirmPasswordPlaceholder??"Confirmar contraseña",I=s?.submitLabel??"Continuar",k=E=>{E.preventDefault();const T={email:u,password:f,...w&&{name:l,confirmPassword:p}};n?.(T)};return o.jsx(gn,{size:"1",className:i,title:t??(w?"Regístrarse":"Iniciar sesión"),actions:r===null?void 0:r??o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(B.Setting,{})}),onClick:a}),children:o.jsxs("form",{onSubmit:k,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[!w&&o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:C}),o.jsx("span",{className:"text-high-em text-md self-center",children:y})]}),w&&o.jsx(ge,{type:"text",name:"name",autoComplete:"name",value:l,onChange:E=>c(E.target.value),placeholder:j,required:!0}),o.jsx(ge,{type:"email",name:"email",autoComplete:"email",value:u,onChange:E=>d(E.target.value),placeholder:S,required:!0}),o.jsx(ge,{type:x?"text":"password",name:"password",autoComplete:w?"new-password":"current-password",value:f,onChange:E=>h(E.target.value),placeholder:A,trailingIcon:o.jsx(ie,{children:x?o.jsx(B.Eye,{onClick:()=>m(!1),className:"cursor-pointer"}):o.jsx(B.EyeSlash,{onClick:()=>m(!0),className:"cursor-pointer"})}),required:!0}),w&&o.jsx(ge,{type:v?"text":"password",name:"confirmPassword",autoComplete:"new-password",value:p,onChange:E=>g(E.target.value),placeholder:_,trailingIcon:o.jsx(ie,{children:v?o.jsx(B.Eye,{onClick:()=>b(!1),className:"cursor-pointer"}):o.jsx(B.EyeSlash,{onClick:()=>b(!0),className:"cursor-pointer"})}),required:!0}),o.jsx(K,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:I})]})})},MP=({title:e="Recuperación",actions:t,step:r,type:n="password",onSubmit:a,onBackToLogin:i,onSettings:s,className:l,texts:c})=>{const[u,d]=P.useState(""),f=C=>{C.preventDefault(),a?.(u)},h=r==="email",p=n==="account",g=c?.heading??(h&&p?"Recuperar cuenta":"Recuperar contraseña"),x=c?.placeholder??(h?"Correo":"Código de verificación"),m=c?.hint??(h?"Un código será enviado a tu correo":"Ingresa el código enviado a tu correo"),v=c?.submitLabel??"Continuar",b=c?.backToLoginPrompt??"¿Todo bien? ",w=c?.backToLoginLabel??"Iniciar sesión";return o.jsx(gn,{size:"1",className:l,title:e,actions:t===null?void 0:t??o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(B.Setting,{})}),onClick:s}),children:o.jsxs("form",{onSubmit:f,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[o.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:g}),o.jsx(ge,{type:h?"email":"text",value:u,onChange:C=>d(C.target.value),placeholder:x,hint:m,required:!0}),o.jsx(K,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:v}),o.jsxs("div",{className:"text-center text-sm gap-4",children:[o.jsx("span",{className:"text-med-em text-sm font-semibold",children:b}),o.jsx($r,{onClick:i,size:"sm",variant:"info",className:"cursor-pointer font-semibold",children:w})]})]})})},$P=({title:e="Recuperación",actions:t,onSubmit:r,onBackToLogin:n,onSettings:a,className:i,texts:s})=>{const[l,c]=P.useState(""),[u,d]=P.useState(""),[f,h]=P.useState(!1),[p,g]=P.useState(!1),x=s?.heading??"Cambiar contraseña",m=s?.passwordPlaceholder??"Nueva contraseña",v=s?.confirmPasswordPlaceholder??"Confirmar contraseña",b=s?.submitLabel??"Continuar",w=s?.backToLoginPrompt??"¿Todo bien? ",C=s?.backToLoginLabel??"Iniciar sesión",y=j=>{j.preventDefault(),r?.(l,u)};return o.jsx(gn,{size:"1",className:i,title:e,actions:t===null?void 0:t??o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(B.Setting,{})}),onClick:a}),children:o.jsxs("form",{onSubmit:y,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[o.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:x}),o.jsx(ge,{type:f?"text":"password",value:l,onChange:j=>c(j.target.value),placeholder:m,trailingIcon:o.jsx(ie,{children:f?o.jsx(B.Eye,{onClick:()=>h(!1),className:"cursor-pointer"}):o.jsx(B.EyeSlash,{onClick:()=>h(!0),className:"cursor-pointer"})}),required:!0}),o.jsx(ge,{type:p?"text":"password",value:u,onChange:j=>d(j.target.value),placeholder:v,trailingIcon:o.jsx(ie,{children:p?o.jsx(B.Eye,{onClick:()=>g(!1),className:"cursor-pointer"}):o.jsx(B.EyeSlash,{onClick:()=>g(!0),className:"cursor-pointer"})}),required:!0}),o.jsx(K,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:b}),o.jsxs("div",{className:"text-center text-sm gap-4",children:[o.jsx("span",{className:"text-med-em text-sm font-semibold",children:w}),o.jsx($r,{onClick:n,size:"md",variant:"info",className:"cursor-pointer font-semibold",children:C})]})]})})},RP=({title:e="Autenticación",actions:t,onRecover:r,onSettings:n,className:a,texts:i})=>{const s=i?.prompt??"¿Olvidaste tu contraseña?",l=i?.recoverLabel??"Recuperar";return o.jsx(gn,{size:"1",className:a,title:e,actions:t===null?void 0:t??o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(B.Setting,{})}),onClick:n}),children:o.jsxs("div",{className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[o.jsx("span",{className:"text-med-em text-md self-center font-semibold",children:s}),o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"lg",onClick:r,className:"w-full",children:l})]})})},LP=({title:e="Autenticación",actions:t,onGoogleSignIn:r,onAppleSignIn:n,onAction:a,onSettings:i,actionPrompt:s="¿Ya tienes una cuenta?",actionLabel:l="Iniciar sesión",className:c,texts:u})=>{const d=u?.googleLabel??"Continuar con Google",f=u?.appleLabel??"Continuar con Apple";return o.jsx(gn,{size:"1",className:c,title:e,actions:t===null?void 0:t??o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(B.Setting,{})}),onClick:i}),children:o.jsxs("div",{className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"lg",icons:"leading",leadingIcon:o.jsx(ie,{children:o.jsx(B.Google,{})}),onClick:r,className:"w-full",children:d}),o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"lg",icons:"leading",leadingIcon:o.jsx(ie,{children:o.jsx(B.Apple,{})}),onClick:n,children:f}),o.jsx(pe,{}),o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx("span",{className:"text-med-em text-md font-semibold text-center",children:s}),o.jsx(K,{variant:"secondary",hierarchy:"primary",size:"lg",onClick:a,className:"w-full",children:l})]})]})})},DP=({length:e=6,onComplete:t})=>{const[r,n]=P.useState(Array(e).fill("")),a=P.useRef([]),i=(c,u)=>{if(!/^\d*$/.test(u))return;const d=[...r];d[c]=u.slice(-1),n(d),u&&c<e-1&&a.current[c+1]?.focus();const f=d.join("");f.length===e&&!d.includes("")&&t?.(f)},s=(c,u)=>{u.key==="Backspace"&&!r[c]&&c>0&&a.current[c-1]?.focus()},l=c=>{c.preventDefault();const u=c.clipboardData.getData("text").replace(/\D/g,"").slice(0,e),d=[...r];u.split("").forEach((h,p)=>{d[p]=h}),n(d);const f=d.findIndex(h=>!h);a.current[f===-1?e-1:f]?.focus(),u.length===e&&t?.(u)};return o.jsx("div",{className:"flex gap-3 justify-center",children:r.map((c,u)=>o.jsx("input",{ref:d=>{a.current[u]=d},type:"text",inputMode:"numeric",maxLength:1,value:c,onChange:d=>i(u,d.target.value),onKeyDown:d=>s(u,d),onPaste:u===0?l:void 0,className:"w-14 h-14 text-center text-xl font-semibold border border-surface-3 rounded-lg focus:outline-none focus:border-info-main focus:ring-1 focus:ring-info-main bg-white text-high-em"},u))})},zP=({title:e="Confirmar Email",heading:t="Verificar Correo",description:r="Ingresa el código de 6 dígitos enviado a tu correo",length:n=6,actions:a,onComplete:i,onResend:s,onBackToLogin:l,onSettings:c,className:u,texts:d})=>{const f=d?.resendLabel??"Reenviar código",h=d?.backToLoginPrompt??"¿Todo bien? ",p=d?.backToLoginLabel??"Iniciar sesión";return o.jsxs(gn,{size:"1",className:u,classNameBody:"flex flex-col gap-8 h-full mx-auto justify-center max-w-90",title:e,actions:a===null?void 0:a??o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(B.Setting,{})}),onClick:c}),children:[o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:t}),o.jsx("span",{className:"text-high-em text-md self-center text-center",children:r})]}),o.jsx(DP,{length:n,onComplete:i}),o.jsx(K,{type:"button",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",onClick:s,children:f}),o.jsxs("div",{className:"text-center",children:[o.jsx("span",{className:"text-med-em text-sm font-semibold",children:h}),o.jsx($r,{onClick:l,size:"md",variant:"info",className:"cursor-pointer font-semibold",children:p})]})]})},Pm=({title:e="Module",onSettingsClick:t,className:r,showSettings:n=!0})=>o.jsx("div",{className:N.clsx("drag-handle px-6 py-4 border-b border-surface-3 bg-surface-1 cursor-move rounded-t-xl",r),children:o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex gap-5 items-center",children:[o.jsx(B.Grid5,{size:24,color:"var(--high-em)"}),o.jsx("h2",{className:"text-[16px] font-semibold text-med-em flex-1 text-center",children:e})]}),n&&o.jsx("div",{className:"flex items-center gap-3",children:o.jsx("button",{onClick:t,className:"p-1 hover:bg-surface-2 rounded transition-colors","aria-label":"Configure module",type:"button",children:o.jsx(B.Setting,{size:24,color:"var(--high-em)"})})})]})}),$3=({title:e="Module",onSettingsClick:t,showSettings:r=!0,children:n,className:a,minWidth:i=300,maxWidth:s=300,emptyState:l})=>{const c=O.default.Children.count(n)>0;return o.jsxs("div",{className:N.clsx("bg-white rounded-xl border border-surface-3 overflow-hidden",a),style:{minWidth:`${i}px`,maxWidth:`${s}px`},children:[o.jsx(Pm,{title:e,onSettingsClick:t,showSettings:r}),o.jsx("div",{className:"overflow-hidden",style:{minHeight:"200px"},children:c?n:l})]})};Pm.displayName="ModuleCardHeader";$3.displayName="ModuleCard";const R3=O.default.forwardRef(({type:e,label:t="New Field",description:r="Description",isSelected:n=!1,isLast:a=!1,onClick:i,onDelete:s,showActions:l=!0,className:c,dragHandleProps:u,innerRef:d,style:f},h)=>{const[p,g]=O.default.useState(!1),x=p&&l,m=d||h;return o.jsxs("div",{ref:m,style:f,className:N.clsx("relative",c),children:[o.jsx("div",{onClick:i,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),className:N.clsx("w-full text-left m-0 cursor-pointer overflow-hidden",n?"bg-surface-3":"hover:bg-surface-1"),children:o.jsx("div",{className:"pr-6",children:o.jsxs("div",{className:"flex justify-between items-center overflow-hidden min-h-[60px]",children:[o.jsxs("div",{className:"flex min-w-0 flex-1 justify-start items-stretch self-stretch",children:[o.jsx("div",{className:"self-stretch flex overflow-hidden transition-all duration-200 ease-out",style:{width:x?"30px":"0px",opacity:x?1:0},children:o.jsxs("div",{onClick:v=>v.stopPropagation(),className:"flex flex-col w-[30px] h-full shrink-0",children:[o.jsx("div",{...u,className:"flex flex-1 items-center justify-center cursor-grab active:cursor-grabbing touch-none hover:bg-surface-2 transition-colors","aria-label":"Drag to reorder",children:o.jsx(B.HambergerMenu,{size:17,color:"var(--high-em)"})}),s&&o.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),s()},className:"flex flex-1 items-center justify-center hover:bg-surface-2 transition-colors","aria-label":"Delete field",children:o.jsx(B.Trash,{size:17,color:"var(--high-em)",variant:"Linear"})})]})}),o.jsxs("div",{className:"flex min-w-0 flex-col justify-center transition-all duration-200 ease-out",style:{paddingLeft:x?"0px":"24px"},children:[o.jsx("div",{className:"truncate text-[16px] font-semibold text-med-em",children:e}),o.jsx("div",{className:"truncate text-[10px] font-medium tracking-wide mb-1 text-low-em",children:r})]})]}),o.jsx("div",{className:"shrink-0 max-w-[45%] truncate pl-4 text-sm font-medium text-low-em",children:t})]})})}),!a&&o.jsx("div",{className:"border-b border-surface-3"})]})});R3.displayName="ModuleFieldItem";const L3=({title:e="Módulos",items:t=[],className:r,onExportClick:n,minWidth:a=250,maxWidth:i=300,opacity:s=.7})=>o.jsxs("div",{className:N.clsx("bg-white rounded-xl border border-surface-3 overflow-hidden",r),style:{minWidth:`${a}px`,maxWidth:`${i}px`,opacity:s},children:[o.jsx("div",{className:"px-6 py-4 border-b border-surface-3 bg-surface-2 rounded-t-xl",children:o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex gap-5 items-center",children:[o.jsx(B.Grid5,{size:24,color:"var(--low-em)"}),o.jsx("h2",{className:"text-xl font-semibold text-low-em flex-1 text-center",children:e})]}),n&&o.jsx("button",{type:"button",onClick:n,className:"hover:bg-surface-3 rounded p-1 transition-colors","aria-label":"Export data",children:o.jsx(B.ExportSquare,{size:24,color:"var(--low-em)"})})]})}),o.jsxs("div",{className:"max-h-[600px] overflow-y-auto overflow-x-hidden",children:[t.map((l,c)=>{const u=c===t.length-1;return o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"w-full text-left transition-all duration-200 m-0 cursor-not-allowed",children:o.jsx("div",{className:"my-6 mx-8",children:o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsxs("div",{className:"flex justify-start gap-5 items-center",children:[o.jsx(B.HambergerMenu,{size:20,color:"var(--low-em)"}),o.jsx(B.Component,{size:20,color:"var(--low-em)"}),o.jsx("div",{className:"text-xs font-semibold tracking-wide mb-1 text-low-em",children:l.type})]}),o.jsx("div",{className:"text-sm font-medium truncate text-low-em",children:l.label})]})})}),!u&&o.jsx("div",{className:"border-b border-surface-3"})]},l.id)}),t.length===0&&o.jsx("div",{className:"py-12 px-8 flex items-center justify-center",children:o.jsx("p",{className:"text-sm text-low-em text-center",children:"No related data"})})]})]});L3.displayName="RelatedDataCard";const BP=({widgetCount:e,visibleCount:t,icon:r,tooltipContent:n})=>o.jsx("div",{className:"border-b border-gray-200",children:o.jsxs("div",{className:"p-8 flex items-center justify-between",children:[o.jsxs("span",{className:" font-semibold text-sm text-dark-100",style:{fontFamily:"var(--font-space-grotesk)"},children:["Widgets (",e,")"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:N.clsx("text-sm font-semibold",t===0?"text-low-em":"text-success-main"),children:[t," visible"]}),r&&n&&o.jsx(Sa,{content:n,side:"bottom",children:o.jsx("div",{children:r})}),r&&!n&&r]})]})}),FP=({value:e,onChange:t,placeholder:r})=>o.jsx("div",{className:"p-8 flex flex-col gap-4 ",children:o.jsx(ge,{type:"search",placeholder:r||"Search",value:e,onChange:t,trailingIcon:o.jsx(B.SearchNormal1,{size:16,color:"currentColor"})})}),qP=({items:e,searchPlaceholder:t="Search",showSearch:r=!0,headerIcon:n,headerTooltip:a,onItemClick:i,className:s,itemClassName:l,backgroundColor:c="bg-white",borderStyle:u="border border-surface-3"})=>{const[d,f]=P.useState(""),h=e.filter(m=>m.title.toLowerCase().includes(d.toLowerCase())||m.description?.toLowerCase().includes(d.toLowerCase())),p=e.length,g=e.filter(m=>m.isVisible).length,x=m=>{i?.(m)};return o.jsx(jt.Provider,{delayDuration:200,children:o.jsxs("div",{className:N.clsx("h-full w-full flex flex-col",c,u,s),children:[o.jsx(BP,{widgetCount:p,visibleCount:g,icon:n,tooltipContent:a}),r&&o.jsx(FP,{value:d,onChange:m=>f(m.target.value),placeholder:t}),o.jsx(pe,{}),o.jsx("div",{className:"flex-1 overflow-y-auto p-8 flex flex-col gap-8",children:h.length>0?h.map(m=>o.jsx(Qt,{title:m.title,description:m.description,leadingIcon:o.jsx(ie,{className:`${m.isDisabled?"text-disabled":""}`,children:m.icon}),showCheckbox:!1,showLeadingImage:!1,showDescription:!!m.description,showTag:!1,size:"sm",showTrailingIcon:!1,showTrailingText:m.position!==void 0,trailingText:m.position!==void 0?String(m.position):void 0,disabled:m.isDisabled,customBackgroundColor:N.clsx(m.isSelected&&"bg-surface-2"),className:N.clsx("py-6 rounded-xl",m.isSelected&&"border border-surface-3",m.isVisible&&"border border-surface-3",l),onClick:()=>x(m)},m.id)):o.jsxs("div",{className:"flex flex-col items-center justify-center p-10 text-center gap-10",children:[o.jsx(ie,{size:"lg",children:o.jsx(B.Box2,{})}),o.jsx("p",{className:"text-sm font-medium text-low-em",children:e.length===0?"You don't have any Widgets created yet":"No widgets found"})]})})]})})},WP={paid:"success",pending:"warning",overdue:"danger",cancelled:"surface"},cg=({label:e,value:t})=>o.jsxs("div",{className:"flex flex-row",children:[o.jsx("span",{className:"text-low-em text-base w-[110px] shrink-0",children:e}),o.jsx("span",{className:"text-high-em text-base font-bold",children:t})]}),HP=({title:e,status:t,fields:r,onMenuClick:n,className:a})=>{const i=t.charAt(0).toUpperCase()+t.slice(1),s=Math.ceil(r.length/2),l=r.slice(0,s),c=r.slice(s);return o.jsxs("div",{className:N.clsx("bg-white border border-surface-3 rounded-2xl p-10 flex flex-col gap-8",a),children:[o.jsxs("div",{className:"flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-8",children:[o.jsx("span",{className:"text-high-em font-semibold text-xl",children:e}),o.jsx(Ge,{theme:WP[t],variant:"simple",size:"lg",children:i})]}),o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:o.jsx(B.More,{variant:"Linear"}),onClick:n})]}),o.jsx("span",{className:"text-med-em text-sm -mt-2",children:"Summary"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[o.jsx("div",{className:"flex flex-col gap-8",children:l.map(u=>o.jsx(cg,{...u},u.label))}),o.jsx("div",{className:"flex flex-col gap-8",children:c.map(u=>o.jsx(cg,{...u},u.label))})]})]})},VP=e=>o.jsx(nt,{size:12}),D3=({item:e,onTitleChange:t,onDataSourceChange:r,onDelete:n,onDragStart:a,onDragOver:i,onDrop:s,onDragEnd:l,isDragOver:c,mode:u="both",className:d})=>{const f=e.dataSourceOptions.map(h=>({id:h.id,title:h.label,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1}));return o.jsxs("div",{draggable:!0,onDragStart:a,onDragOver:h=>{h.preventDefault(),i?.(h)},onDrop:s,onDragEnd:l,className:N.clsx("flex items-center px-4 py-4 gap-5 rounded-xl border transition-colors",c?"border-brand-main bg-surface-1":"border-surface-3 bg-white",d),children:[o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{size:"md",children:o.jsx(B.HambergerMenu,{})}),className:"cursor-grab active:cursor-grabbing shrink-0 text-disabled","aria-label":"Drag to reorder"}),(u==="both"||u==="input")&&o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(ge,{type:"text",label:"Title",placeholder:"Column title",value:e.title,onChange:h=>t(h.target.value)})}),(u==="both"||u==="dropdown")&&o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Te,{label:"Data source",placeholder:"Select",value:e.dataSource,showLeadingIcon:!1,menuSize:"sm",items:f,onChange:r})}),o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(VP,{}),className:"shrink-0","aria-label":"Delete row",onClick:n})]})},UP=({title:e,contextMenu:t,backButton:r,onAction:n})=>{const[a,i]=P.useState(!1),s=P.useRef(null),l=t&&t.length>0;return P.useEffect(()=>{if(!a)return;const c=u=>{s.current&&!s.current.contains(u.target)&&i(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[a]),o.jsx(pm,{title:e,backButton:r,actions:l?o.jsxs("div",{ref:s,className:"relative",children:[o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(B.More,{size:16}),"aria-label":"More options",onClick:()=>i(c=>!c)}),a&&o.jsx(Wt,{floating:!0,size:"xs",items:(t??[]).map(c=>({id:c.id,title:c.label,leadingIcon:c.icon,showLeadingIcon:!!c.icon,customTitleColor:c.destructive?"text-danger-main":void 0,showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1,onSelect:()=>{n?.(c.id),i(!1)}})),className:"absolute right-0 top-full mt-3 min-w-[180px]"})]}):void 0})},KP=({field:e,onChange:t})=>o.jsx(ge,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value),type:"text"}),GP=({field:e,onChange:t})=>o.jsx(hl,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value)}),ml=e=>e.map(t=>({id:t.id,title:t.label,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1})),ZP=({field:e,onChange:t})=>o.jsx(Te,{menuSize:"sm",label:e.label,placeholder:e.placeholder,value:e.value??"",showLeadingIcon:!1,items:ml(e.options??[]),onChange:t}),YP=({field:e,onChange:t})=>o.jsxs("div",{className:"flex items-center justify-between gap-4 py-1",children:[e.label&&o.jsx("span",{className:"text-sm font-semibold text-high-em flex-1",children:e.label}),o.jsx(Zi,{size:"small",checked:e.value??!1,onChange:r=>t(r.target.checked)})]}),XP=({field:e,onChange:t})=>{const r=e.dropdowns??[],n=(a,i)=>{t(r.map((s,l)=>l===a?{...s,value:i}:s))};return o.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&o.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),o.jsx("div",{className:"flex gap-6",children:r.map((a,i)=>o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Te,{menuSize:"sm",label:e.showLabels!==!1?a.label:void 0,placeholder:a.placeholder,value:a.value??"",showLeadingIcon:!1,items:ml(a.options),onChange:s=>n(i,s)})},a.id))})]})},QP=({field:e,onAction:t})=>{const r=e.items??[],[n,a]=P.useState(null),i=P.useRef(new Map),s=P.useRef(null);return o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[e.label&&o.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),e.addAction&&o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(B.Add,{size:14}),"aria-label":"Add item",onClick:()=>t?.(e.addAction)})]}),r.length>0&&o.jsx("div",{className:"rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:r.map(l=>{const c=(l.contextMenu??[]).map(d=>({id:d.id,title:d.label,leadingIcon:d.icon,showLeadingIcon:!!d.icon,customTitleColor:d.destructive?"text-danger-main":void 0,showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1,onSelect:()=>{t?.(d.id),a(null)}})),u=n===l.id;return u&&(s.current=i.current.get(l.id)??null),o.jsx(Qt,{title:l.label,size:"sm",as:c.length>0?"div":"button",showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingText:!1,showTrailingIcon:c.length>0,trailingIcon:c.length>0?o.jsxs("div",{ref:d=>{i.current.set(l.id,d)},className:"relative",onMouseDown:d=>d.stopPropagation(),children:[o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(B.More,{size:14}),"aria-label":"Item options",onClick:()=>a(u?null:l.id)}),u&&o.jsx(Wt,{triggerRef:s,size:"xs",items:c,className:"min-w-[160px]",onClose:()=>a(null)})]}):void 0,className:"rounded-none"},l.id)})})]})},JP=({field:e,onChange:t,onAction:r})=>{const n=e.items??[],a=P.useRef(null),[i,s]=P.useState(null),l=(e.options??[]).map(u=>({id:u.id,label:u.label})),c=(u,d)=>t(n.map(f=>f.id===u?{...f,...d}:f));return o.jsxs("div",{className:"flex flex-col gap-6",children:[e.label&&o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),e.addAction&&o.jsx(K,{variant:"neutral",hierarchy:"tertiary",size:"xs",icons:"leading",leadingIcon:o.jsx(B.Add,{}),onClick:()=>r?.(e.addAction),children:"Add"})]}),o.jsx("div",{className:"flex flex-col gap-6",children:n.map(u=>o.jsx(D3,{item:{id:u.id,title:u.title,dataSource:u.dropdownValue??"",dataSourceOptions:l},mode:u.rowMode??e.rowMode,isDragOver:i===u.id,onTitleChange:d=>c(u.id,{title:d}),onDataSourceChange:d=>c(u.id,{dropdownValue:d}),onDelete:()=>r?.(`delete:${u.id}`),onDragStart:()=>{a.current=u.id},onDragOver:()=>{a.current!==u.id&&s(u.id)},onDrop:()=>{if(!a.current||a.current===u.id){a.current=null,s(null);return}r?.(`reorder:${a.current}:${u.id}`),a.current=null,s(null)},onDragEnd:()=>{a.current=null,s(null)}},u.id))})]})},eA=({field:e,onChange:t})=>{const r=e.value??{cols:1,rows:1};return o.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.label&&o.jsx("label",{className:"text-xs font-semibold text-med-em",children:e.label}),o.jsxs(Sm,{value:r,onChange:t,children:[o.jsx(Om,{children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",className:"w-full",children:e.placeholder??`${r.cols}×${r.rows}`})}),o.jsx(Nm,{})]})]})},Oe={showCheckbox:!1,showLeadingIcon:!1},z3=[{...Oe,id:"controlQuery",title:"Control query"},{...Oe,id:"controlComponent",title:"Control component"},{...Oe,id:"runScript",title:"Run script",showDividerAfter:!0},{...Oe,id:"goToApp",title:"Go to app"},{...Oe,id:"goToPage",title:"Go to page"},{...Oe,id:"goToUrl",title:"Go to URL",showDividerAfter:!0},{...Oe,id:"showNotification",title:"Show notification"},{...Oe,id:"setVariable",title:"Set variable"},{...Oe,id:"setUrlParameters",title:"Set URL parameters"},{...Oe,id:"setLocalStorage",title:"Set local storage"},{...Oe,id:"copyToClipboard",title:"Copy to clipboard"},{...Oe,id:"exportData",title:"Export data",showDividerAfter:!0},{...Oe,id:"confetti",title:"Confetti",customTitleColor:"var(--color-brand-secondary-main)"}],B3=Object.fromEntries(z3.map(e=>[e.id,e.title])),tA={controlQuery:{query:"",method:""},controlComponent:{component:"",method:""},runScript:{script:""},goToApp:{app:""},goToPage:{page:"",params:[]},goToUrl:{url:"",newTab:!1},showNotification:{title:"",message:"",type:"info",duration:3e3},setVariable:{variable:"",value:""},setUrlParameters:{params:[]},setLocalStorage:{key:"",value:""},copyToClipboard:{value:""},exportData:{data:"",fileName:"",fileType:"csv"},confetti:{}};function rA(e){const{action:t,config:r}=e;switch(t){case"controlQuery":return!r.query;case"controlComponent":return!r.component;case"runScript":return!r.script;case"goToApp":return!r.app;case"goToPage":return!r.page;case"goToUrl":return!r.url;case"showNotification":return!r.title&&!r.message;case"setVariable":return!r.variable;case"setLocalStorage":return!r.key;case"copyToClipboard":return!r.value;case"exportData":return!r.data;default:return!1}}function nA({handler:e,selected:t,incomplete:r,onClick:n}){const a=e.event.charAt(0).toUpperCase()+e.event.slice(1),i=r?"Incomplete selection":B3[e.action]??e.action;return o.jsx("div",{className:t?"rounded-md bg-surface-3":"",onClick:s=>n(s.currentTarget),children:o.jsx(Qt,{title:a,showTrailingText:!0,trailingText:i,size:"sm",showCheckbox:!1,showLeadingIcon:!1,customTitleColor:r?"var(--color-low-em)":void 0,middleContainerClassName:r?"italic":void 0})})}function Ie({label:e,children:t}){return o.jsxs("div",{className:"flex items-center gap-3 py-3",children:[o.jsx("span",{className:"w-28 shrink-0 text-xs text-med-em",children:e}),o.jsx("div",{className:"min-w-0 flex-1",children:t})]})}function Zr({value:e,onChange:t,placeholder:r="{{ ... }}",disabled:n,size:a="md",...i}){return o.jsx(ge,{...i,size:a,value:e??"",onChange:s=>t?.(s.target.value),placeholder:r,disabled:n,className:"font-mono"})}const aA=[{id:"ms",title:"ms",showCheckbox:!1,showLeadingIcon:!1},{id:"s",title:"s",showCheckbox:!1,showLeadingIcon:!1}];function iA({value:e,onChange:t}){return o.jsxs("div",{className:"flex items-center gap-6",children:[o.jsx("div",{className:"w-16 shrink-0",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:aA,value:e.unit,onChange:r=>t({...e,unit:r})})}),o.jsx(ge,{size:"md",type:"number",value:String(e.value),onChange:r=>t({...e,value:Number(r.target.value)}),placeholder:"0"})]})}function oA({value:e,onChange:t}){return o.jsx(Te,{size:"md",showLeadingIcon:!1,items:z3,value:e,onChange:r=>t(r)})}const sA=[{...Oe,id:"info",title:"Info"},{...Oe,id:"success",title:"Success"},{...Oe,id:"warning",title:"Warning"},{...Oe,id:"error",title:"Error"}],lA=[{...Oe,id:"csv",title:"CSV"},{...Oe,id:"json",title:"JSON"}],ug=[{...Oe,id:"",title:"No available methods"}];function Be(e,t,r,n){t({...e,[r]:n})}function cA({action:e,config:t,onChange:r,availableQueries:n=[],availableComponents:a=[],availableApps:i=[],availablePages:s=[],availableVariables:l=[]}){const c=n.map(p=>({...Oe,id:p,title:p})),u=a.map(p=>({...Oe,id:p,title:p})),d=i.map(p=>({...Oe,id:p,title:p})),f=s.map(p=>({...Oe,id:p,title:p})),h=l.map(p=>({...Oe,id:p,title:p}));switch(e){case"controlQuery":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Query",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:c.length?c:[{...Oe,id:"",title:"— select —"}],value:String(t.query??""),onChange:p=>Be(t,r,"query",p)})}),o.jsx(Ie,{label:"Method",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:ug,value:"",onChange:()=>{},disabled:!0})})]});case"controlComponent":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Component",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:u.length?u:[{...Oe,id:"",title:"— select —"}],value:String(t.component??""),onChange:p=>Be(t,r,"component",p)})}),o.jsx(Ie,{label:"Method",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:ug,value:"",onChange:()=>{},disabled:!0})})]});case"runScript":return o.jsx(Ie,{label:"Script",children:o.jsx(hl,{size:"md",value:String(t.script??""),onChange:p=>Be(t,r,"script",p.target.value),placeholder:"// write your script here",resize:"vertical"})});case"goToApp":return o.jsx(Ie,{label:"App",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:d.length?d:[{...Oe,id:"",title:"— select —"}],value:String(t.app??""),onChange:p=>Be(t,r,"app",p)})});case"goToPage":return o.jsx(Ie,{label:"Page",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:f.length?f:[{...Oe,id:"",title:"— select —"}],value:String(t.page??""),onChange:p=>Be(t,r,"page",p)})});case"goToUrl":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"URL",children:o.jsx(Zr,{value:String(t.url??""),onChange:p=>Be(t,r,"url",p),placeholder:"https://..."})}),o.jsx(Ie,{label:"New tab",children:o.jsx(Zi,{checked:!!t.newTab,onChange:p=>Be(t,r,"newTab",p.target.checked)})})]});case"showNotification":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Title",children:o.jsx(ge,{size:"md",value:String(t.title??""),onChange:p=>Be(t,r,"title",p.target.value),placeholder:"Notification title"})}),o.jsx(Ie,{label:"Message",children:o.jsx(ge,{size:"md",value:String(t.message??""),onChange:p=>Be(t,r,"message",p.target.value),placeholder:"Message"})}),o.jsx(Ie,{label:"Type",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:sA,value:String(t.type??"info"),onChange:p=>Be(t,r,"type",p)})}),o.jsx(Ie,{label:"Duration (ms)",children:o.jsx(ge,{size:"md",type:"number",value:String(t.duration??3e3),onChange:p=>Be(t,r,"duration",Number(p.target.value))})})]});case"setVariable":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Variable",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:h.length?h:[{...Oe,id:"",title:"— select —"}],value:String(t.variable??""),onChange:p=>Be(t,r,"variable",p)})}),o.jsx(Ie,{label:"Value",children:o.jsx(Zr,{value:String(t.value??""),onChange:p=>Be(t,r,"value",p)})})]});case"setUrlParameters":return o.jsx(Ie,{label:"Params",children:o.jsx(Zr,{value:String(t.params??""),onChange:p=>Be(t,r,"params",p),placeholder:"{{ { key: value } }}"})});case"setLocalStorage":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Key",children:o.jsx(ge,{size:"md",value:String(t.key??""),onChange:p=>Be(t,r,"key",p.target.value),placeholder:"storage_key"})}),o.jsx(Ie,{label:"Value",children:o.jsx(Zr,{value:String(t.value??""),onChange:p=>Be(t,r,"value",p)})})]});case"copyToClipboard":return o.jsx(Ie,{label:"Value",children:o.jsx(Zr,{value:String(t.value??""),onChange:p=>Be(t,r,"value",p)})});case"exportData":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Data",children:o.jsx(Zr,{value:String(t.data??""),onChange:p=>Be(t,r,"data",p)})}),o.jsx(Ie,{label:"File name",children:o.jsx(ge,{size:"md",value:String(t.fileName??""),onChange:p=>Be(t,r,"fileName",p.target.value),placeholder:"export"})}),o.jsx(Ie,{label:"File type",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:lA,value:String(t.fileType??"csv"),onChange:p=>Be(t,r,"fileType",p)})})]});case"confetti":return o.jsx("p",{className:"py-2 text-xs text-low-em",children:"No configuration needed."});default:return null}}function uA({handler:e,open:t,onClose:r,onSave:n,triggerRef:a,availableQueries:i,availableComponents:s,availableApps:l,availablePages:c,availableVariables:u}){const[d,f]=P.useState(null);if(P.useEffect(()=>{t&&e&&f({...e})},[t,e]),!d)return null;const h=d.event.charAt(0).toUpperCase()+d.event.slice(1),g=`${B3[d.action]??d.action} options`;function x(m){f(v=>v&&{...v,action:m,config:{...tA[m]}})}return o.jsx(Wn,{open:t,onClose:r,triggerRef:a,size:"sm",children:o.jsxs(Hn,{className:"max-h-[80vh] !w-112",children:[o.jsx(Vn,{onRightAction:r,children:o.jsxs(jm,{children:["Edit ",h," handler"]})}),o.jsxs(Un,{className:"flex flex-col gap-0 p-10",children:[o.jsx(Ie,{label:"Action",children:o.jsx(oA,{value:d.action,onChange:x})}),d.action!=="confetti"&&o.jsxs("div",{className:"mt-4 mb-2",children:[o.jsx(pe,{}),o.jsx("span",{className:"text-xs font-medium text-low-em",children:g})]}),o.jsx(cA,{action:d.action,config:d.config,onChange:m=>f(v=>v&&{...v,config:m}),availableQueries:i,availableComponents:s,availableApps:l,availablePages:c,availableVariables:u}),o.jsxs("div",{className:"mt-4 mb-2",children:[o.jsx(pe,{}),o.jsx("span",{className:"text-xs font-medium text-low-em",children:"Advanced"})]}),o.jsx(Ie,{label:"Only run when",children:o.jsx(Zr,{value:d.onlyRunWhen??"",onChange:m=>f(v=>v&&{...v,onlyRunWhen:m}),placeholder:"{{ !!example.value }}"})}),o.jsx(Ie,{label:"Debounce",children:o.jsx(iA,{value:d.debounce??{unit:"ms",value:0},onChange:m=>f(v=>v&&{...v,debounce:m})})})]}),o.jsx(Kn,{cancelButton:{label:"Cancel",closeOnClick:!1,onClick:r},saveButton:{label:"Save",closeOnClick:!1,onClick:()=>{d&&n(d),r()}}})]})})}function dA(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}function fA({field:e,onChange:t}){const r=e.value??[],n=e.resources??{},[a,i]=P.useState(null),[s,l]=P.useState(!1),c=P.useRef(null),u=P.useRef(null),d=r.find(x=>x.id===a)??null;function f(x,m){c.current=m,i(x),l(!0)}function h(){l(!1),i(null)}function p(){const x={id:dA(),event:"click",action:"controlQuery",config:{query:"",method:""}};t([...r,x]),f(x.id,u.current)}function g(x){t(r.map(m=>m.id===x.id?x:m))}return o.jsxs("div",{className:"flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[o.jsx("span",{className:"text-xs font-medium text-med-em",children:"Event handlers"}),o.jsx(K,{ref:u,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:o.jsx(B.Add,{size:14}),onClick:p})]}),r.length===0?o.jsx("p",{className:"px-3 py-2 text-xs text-low-em",children:"No event handlers"}):o.jsx("div",{className:"flex flex-col",children:r.map(x=>o.jsx(nA,{handler:x,selected:a===x.id,incomplete:rA(x),onClick:m=>f(x.id,m)},x.id))}),o.jsx(uA,{open:s,handler:d,onClose:h,onSave:g,triggerRef:c,availableQueries:n.availableQueries,availableComponents:n.availableComponents,availableApps:n.availableApps,availablePages:n.availablePages,availableVariables:n.availableVariables})]})}const hA=({subField:e,onChange:t})=>{switch(e.type){case"text":return o.jsx(ge,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value),type:"text"});case"toggle":return o.jsxs("div",{className:"flex items-center justify-between gap-4 py-1",children:[e.label&&o.jsx("span",{className:"text-sm font-semibold text-high-em flex-1",children:e.label}),o.jsx(Zi,{size:"small",checked:e.value??!1,onChange:r=>t(r.target.checked)})]});case"dropdown":return o.jsx(Te,{menuSize:"sm",label:e.label,placeholder:e.placeholder,value:e.value??"",showLeadingIcon:!1,items:ml(e.options??[]),onChange:r=>t(r)});default:return null}},pA=({field:e,onChange:t})=>{const r=e.items??[],n=(a,i,s)=>t(r.map(l=>l.id!==a?l:{...l,subFields:l.subFields.map(c=>c.id!==i?c:{...c,value:s})}));return o.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&o.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.label}),o.jsxs("div",{className:"flex flex-col rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:[r.length===0&&o.jsx(ht,{flat:!0,description:"No items",className:"py-6 px-4"}),r.map(a=>o.jsxs(Wn,{size:"sm",children:[o.jsx(wm,{children:o.jsx(Qt,{size:"sm",title:a.title,description:a.description,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!!a.description,showTag:!1,showTrailingText:!1,showTrailingIcon:!1})}),o.jsxs(Hn,{className:"!w-72",children:[o.jsx(Vn,{children:a.title}),o.jsx(Un,{padding:!0,className:"ds-scrollbar overflow-y-auto max-h-80",children:o.jsx("div",{className:"flex flex-col gap-4",children:a.subFields.map(i=>o.jsx(hA,{subField:i,onChange:s=>n(a.id,i.id,s)},i.id))})}),o.jsx(Kn,{saveButton:{label:"Done",closeOnClick:!0}})]})]},a.id))]})]})};function dg(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const mA=({field:e,onChange:t,onAction:r})=>{const n=e.value??[],[a,i]=P.useState(n[0]?.id??""),[s,l]=P.useState(!1),[c,u]=P.useState(""),[d,f]=P.useState(!1),[h,p]=P.useState([]),g=P.useRef(null),x=P.useRef(null),m=n.find(w=>w.id===a)??n[0],v=w=>(e.options??[]).find(C=>C.id===w)?.label??w,b=()=>{const w=(e.options??[]).find(y=>y.id===c);if(!w||!m)return;const C={id:dg(),typeId:w.id,label:w.label};t(n.map(y=>y.id!==m.id?y:{...y,components:[...y.components,C]}))};return n.length===0?o.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&o.jsx("span",{className:"text-xs font-semibold text-high-em",children:e.label}),o.jsx("div",{className:"flex items-center justify-center rounded-lg border border-surface-3 h-10",children:o.jsx("span",{className:"text-xs text-low-em",children:"No tabs configured"})})]}):o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[e.label&&o.jsx("span",{className:"text-xs font-semibold text-high-em",children:e.label}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(K,{ref:x,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:o.jsx(B.Edit2,{size:14}),onClick:()=>{p(n.map(w=>({...w}))),f(!0)}}),o.jsx(K,{ref:g,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:o.jsx(B.Add,{size:14}),onClick:()=>{u(""),l(!0)}})]})]}),n.length>1&&o.jsx(fl,{size:"sm",items:n.map(w=>({id:w.id,label:w.label})),value:a,onChange:i}),o.jsx("div",{className:"flex flex-col rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:m.components.length===0?o.jsx(ht,{flat:!0,description:"No components",className:"py-6 px-4"}):m.components.map(w=>o.jsx(Qt,{size:"sm",title:w.label,trailingText:v(w.typeId),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showTag:!1,showTrailingText:!0,showTrailingIcon:!0,onClick:()=>r?.(`open-component::${m.id}::${w.id}`)},w.id))}),o.jsx(Wn,{open:d,onClose:()=>f(!1),triggerRef:x,size:"sm",children:o.jsxs(Hn,{className:"!w-72",children:[o.jsx(Vn,{children:"Edit tabs"}),o.jsx(Un,{padding:!0,className:"ds-scrollbar overflow-y-auto",children:o.jsxs("div",{className:"flex flex-col gap-3",children:[h.map((w,C)=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ge,{value:w.label,placeholder:"Tab label",onChange:y=>p(h.map((j,S)=>S!==C?j:{...j,label:y.target.value}))}),o.jsx(K,{size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:o.jsx(B.Trash,{size:14}),disabled:h.length<=1,onClick:()=>p(h.filter((y,j)=>j!==C))})]},w.id)),o.jsx(K,{size:"sm",variant:"neutral",hierarchy:"tertiary",icons:"leading",leadingIcon:o.jsx(B.Add,{size:14}),onClick:()=>p([...h,{id:dg(),label:"New tab",components:[]}]),children:"Add tab"})]})}),o.jsx(Kn,{cancelButton:{label:"Cancel",closeOnClick:!0},saveButton:{label:"Save",closeOnClick:!1,onClick:()=>{const w=n.filter(y=>!h.find(j=>j.id===y.id)).map(y=>y.id),C=h.map(y=>{const j=n.find(S=>S.id===y.id);return j?{...j,label:y.label}:y});t(C),w.includes(a)&&i(C[0]?.id??""),f(!1)}}})]})}),o.jsx(Wn,{open:s,onClose:()=>l(!1),triggerRef:g,size:"sm",children:o.jsxs(Hn,{className:"!w-72",children:[o.jsx(Vn,{children:"Add component"}),o.jsx(Un,{children:o.jsx(Te,{menuSize:"sm",label:"Type",placeholder:"Select a component",value:c,showLeadingIcon:!1,items:ml(e.options??[]),onChange:u})}),o.jsx(Kn,{cancelButton:{label:"Cancel",closeOnClick:!0},saveButton:{label:"Add",disabled:!c,closeOnClick:!1,onClick:()=>{b(),l(!1)}}})]})})]})},xA=({field:e,onChange:t,onAction:r})=>{switch(e.type){case"text":return o.jsx(KP,{field:e,onChange:t});case"textarea":return o.jsx(GP,{field:e,onChange:t});case"dropdown":return o.jsx(ZP,{field:e,onChange:t});case"toggle":return o.jsx(YP,{field:e,onChange:t});case"multi-dropdown":return o.jsx(XP,{field:e,onChange:t});case"list":return o.jsx(QP,{field:e,onAction:r});case"draggable-list":return o.jsx(JP,{field:e,onChange:t,onAction:r});case"size-picker":return o.jsx(eA,{field:e,onChange:t});case"event-handlers":return o.jsx(fA,{field:e,onChange:t});case"modal-list":return o.jsx(pA,{field:e,onChange:t});case"component-tree":return o.jsx(mA,{field:e,onChange:t,onAction:r});default:return null}},gA=({section:e,onFieldChange:t,onAction:r})=>o.jsxs("div",{className:"flex flex-col gap-6",children:[e.title&&o.jsx("h3",{className:"text-sm font-semibold text-high-em",children:e.title}),e.fields.map(n=>o.jsx(xA,{field:n,onChange:a=>t(n.id,a),onAction:r},n.id))]}),vA=({title:e="Preview",children:t,defaultOpen:r=!1,className:n})=>{const[a,i]=P.useState(r);return o.jsxs("div",{className:N.clsx("flex flex-col bg-surface-2 rounded-xl",n),children:[o.jsxs("button",{type:"button",onClick:()=>i(s=>!s),className:"flex items-center justify-between w-full h-[38px] px-4 cursor-pointer",children:[o.jsx("span",{className:"text-xs font-semibold text-med-em",children:e}),o.jsx(ie,{size:"sm",children:a?o.jsx(B.ArrowUp2,{}):o.jsx(B.ArrowDown2,{})})]}),o.jsx("div",{className:N.clsx("grid transition-all duration-200",a?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:o.jsx("div",{className:"overflow-hidden",children:o.jsx("div",{className:"px-4 pb-4",children:t})})})]})};function yA(e,t){switch(e.type){case"draggable-list":return{...e,items:t};case"modal-list":return{...e,items:t};case"component-tree":return{...e,value:t};case"multi-dropdown":return{...e,dropdowns:t};default:return{...e,value:t}}}const bA=({config:e,onChange:t,onAction:r,backButton:n,className:a})=>{const i=(s,l,c)=>{t({...e,sections:e.sections.map(u=>u.id!==s?u:{...u,fields:u.fields.map(d=>d.id!==l?d:yA(d,c))})})};return o.jsxs("div",{className:N.clsx("h-full w-full flex flex-col bg-white",a),children:[o.jsx("div",{className:"shrink-0",children:o.jsx(UP,{title:e.title,contextMenu:e.contextMenu,backButton:n,onAction:r})}),o.jsx("div",{className:"flex-1 overflow-y-auto ds-scrollbar flex flex-col p-8 gap-6",children:e.sections.map((s,l)=>o.jsxs(O.default.Fragment,{children:[o.jsx(gA,{section:s,onFieldChange:(c,u)=>i(s.id,c,u),onAction:r}),l<e.sections.length-1&&o.jsx(pe,{})]},s.id))})]})},wA=[{id:"And",title:"And",showCheckbox:!1,showLeadingIcon:!1},{id:"Or",title:"Or",showCheckbox:!1,showLeadingIcon:!1}];function jA({position:e}){return o.jsx("div",{className:N.clsx("relative z-[1] w-[22px] h-[23px] shrink-0 border-l border-surface-4",e==="above"?"border-t rounded-tl-xl":"border-b rounded-bl-xl")})}function CA(e){if(!O.default.isValidElement(e))return!1;const t=e;return typeof t.type=="string"&&!t.props.children}function F3({children:e,operator:t,onChange:r,dropdownIndex:n=0,dropdownBg:a="bg-white"}){const i=O.default.Children.toArray(e);return i.length<=1?o.jsx(o.Fragment,{children:i}):o.jsx("div",{className:"grid grid-cols-[75px_1fr] gap-x-3 gap-y-2.5 auto-rows-[minmax(60px,auto)]",children:i.map((s,l)=>o.jsxs(P.Fragment,{children:[o.jsxs("div",{className:"relative flex items-center justify-center",children:[l>0&&o.jsx("div",{className:"absolute left-[26.5px] top-[-5px] bottom-1/2 border-l border-surface-4 z-0"}),l<i.length-1&&o.jsx("div",{className:"absolute left-[26.5px] top-1/2 bottom-[-5px] border-l border-surface-4 z-0"}),!CA(s)&&o.jsx(jA,{position:l<=n?"above":"below"}),(l===n||n<0&&l===0)&&o.jsx("div",{className:N.clsx("absolute left-0 z-10 py-6",n<0?"bottom-[60%]":"top-[60%]",a),children:o.jsx(Te,{items:wA,value:t.value,size:"sm",menuSize:"sm",showLeadingIcon:!1,className:"min-w-[60px]",onChange:c=>r(t.id,c)})})]}),o.jsx("div",{className:"flex items-stretch self-stretch min-w-0",children:s})]},l))})}const SA={default:{...qe.default,wrapper:`${qe.default.wrapper} hover:cursor-pointer`,text:"text-med-em"},outlined:{...qe.outlined,wrapper:`${qe.outlined.wrapper} hover:cursor-pointer`,text:"text-med-em"},danger:{...qe.danger,wrapper:`${qe.danger.wrapper} hover:cursor-pointer`,text:"text-danger-em"},success:{...qe.success,wrapper:`${qe.success.wrapper} hover:cursor-pointer`,text:"text-success-em"}},OA={sm:{...Ft.sm,text:"text-xs",padding:"px-3"},md:{...Ft.md,text:"text-sm font-medium",padding:"px-3.5"},lg:{...Ft.lg,text:"text-base",padding:"px-4"}},Ba={wrapper:"bg-surface-3 pointer-events-none border-transparent",text:"text-disabled"};function yh(e){if(!e)return;const t=new Date(e);return isNaN(t.getTime())?void 0:t}function fg(e){return e?e.toISOString().split("T")[0]:""}function rc(e){const t=yh(e);return t?t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):""}function q3({pickType:e="single",from:t="",to:r="",placeholder:n="Select date...",disabled:a=!1,size:i="md",variant:s="default",label:l,hint:c,hintIconVariant:u,className:d,icon:f,iconColor:h="var(--med-em)",onAccept:p}){const[g,x]=P.useState(!1),m=P.useRef(null),v=P.useRef(null),b=P.useCallback(()=>x(!1),[]);el({refs:[m,v],onClose:b,enabled:g});const w=Gi({triggerRef:m,panelRef:v,enabled:g}),C=OA[i],y=SA[s],j=e==="range"&&(t||r)?[rc(t),rc(r)].filter(Boolean).join(" → "):rc(t),S={from:yh(t),to:e==="range"?yh(r):void 0},A=a?Ba.text:j?y.text:y.placeholder;return o.jsxs("div",{className:N.clsx("flex flex-col gap-1.5 w-full",d),children:[l&&o.jsx("label",{className:N.clsx("font-semibold truncate",C.labelFontSize,a?Ba.text:y.text),children:l}),o.jsxs("button",{ref:m,type:"button",disabled:a,onClick:()=>!a&&x(_=>!_),className:N.clsx("relative flex items-center w-full min-w-0 overflow-hidden border transition-colors duration-200 focus:outline-none",C.height,C.rounded,C.padding,a?Ba.wrapper:y.wrapper),children:[o.jsx("span",{className:N.clsx("flex-1 min-w-0 truncate text-left",C.text,A),children:j||n}),o.jsx("span",{className:N.clsx("shrink-0 flex items-center",i==="sm"?"pl-1.5":"pl-2"),children:o.jsx(ie,{size:C.iconSize,color:h,children:f??o.jsx(B.Calendar,{})})})]}),c&&o.jsx(ft,{icon:o.jsx(B.InfoCircle,{variant:u||"Bold"}),label:c,iconSize:C.hintIconSize,gap:1,iconColorClass:N.clsx(a?Ba.text:y.hint),labelColorClass:N.clsx(a?Ba.text:y.hint),className:N.clsx(C.hintFontSize,"font-semibold")}),g&&Ca.createPortal(o.jsx("div",{ref:v,style:w,children:o.jsx(mm,{selected:S,pickType:e,onAccept:_=>{p(fg(_?.from),e==="range"?fg(_?.to):void 0),x(!1)},onCancel:()=>x(!1)})}),document.body)]})}function NA(e,t){if(!(!e.operator||!e.fieldType))return t.operatorsByFieldType[e.fieldType]?.find(r=>r.id===e.operator)}function PA(e){return e==="between"?["",""]:e==="multi-or"||e==="multi-and"?[""]:[]}function lo({inputType:e,value:t,placeholder:r,valueOptions:n,fieldItems:a,onChange:i}){return e==="dropdown"?o.jsx(Te,{items:n,value:t||void 0,placeholder:r,showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:i}):e==="field"?o.jsx(Te,{items:a,value:t||void 0,placeholder:r,showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:i}):e==="date"?o.jsx(q3,{pickType:"single",from:t,placeholder:r,onAccept:s=>i(s)}):o.jsx(ge,{type:e,value:t,placeholder:r,size:"md",onChange:s=>i(s.target.value)})}function AA({operatorConfig:e,values:t,valueOptions:r,fieldItems:n,onValuesChange:a}){if(!e||e.valueMode==="none")return null;const i=e.valueMode,s=e.valueInputType??"dropdown";if(i==="single")return o.jsx("div",{className:"grow shrink-0 basis-[200px]",children:o.jsx(lo,{inputType:s,value:t[0]??"",placeholder:"Select value...",valueOptions:r,fieldItems:n,onChange:u=>a([u])})});if(i==="between")return o.jsxs("div",{className:"flex items-center gap-8 grow shrink-0 basis-[200px] min-w-0",children:[o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(lo,{inputType:s,value:t[0]??"",placeholder:"From...",valueOptions:r,fieldItems:n,onChange:u=>{const d=[...t];d[0]=u,a(d)}})}),(e.separator??",")!==""&&o.jsx("span",{className:"text-xs font-medium text-low-em shrink-0 select-none",children:e.separator??","}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(lo,{inputType:s,value:t[1]??"",placeholder:"To...",valueOptions:r,fieldItems:n,onChange:u=>{const d=[...t];d[1]=u,a(d)}})})]});const l=i==="multi-or"?"or":"and",c=t.length>1;return o.jsxs("div",{className:"flex items-center gap-8 grow shrink-0 basis-[200px] flex-wrap",children:[t.map((u,d)=>o.jsxs(O.default.Fragment,{children:[d>0&&o.jsx("span",{className:"text-xs font-medium text-low-em shrink-0 select-none",children:l}),o.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[o.jsx("div",{className:"min-w-[120px] flex-1",children:o.jsx(lo,{inputType:s,value:u,placeholder:"Select...",valueOptions:r,fieldItems:n,onChange:f=>{const h=[...t];h[d]=f,a(h)}})}),c&&o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx("span",{className:"contents",children:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})})}),onClick:()=>a(t.filter((f,h)=>h!==d)),"aria-label":"Remove value"})]})]},d)),o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{size:14,children:o.jsx(B.Add,{})}),onClick:()=>a([...t,""]),"aria-label":"Add value"})]})}function W3({condition:e,config:t,onChange:r,onDelete:n=()=>{}}){const a=NA(e,t),i=t.fields.map(({fieldType:f,...h})=>h),s=e.fieldType?(t.operatorsByFieldType[e.fieldType]??[]).map(({valueMode:f,valueInputType:h,connector:p,separator:g,...x})=>x):[];function l(f){const h=t.fields.find(p=>p.id===f);h&&r({...e,field:f,fieldType:h.fieldType,operator:"",values:[]})}function c(f){const h=t.operatorsByFieldType[e.fieldType]?.find(p=>p.id===f);r({...e,operator:f,values:h?PA(h.valueMode):[]})}function u(f){r({...e,values:f})}const d=!a||a.valueMode==="none";return o.jsxs("div",{className:"flex items-stretch gap-8 w-full border border-surface-3 rounded-xl p-5",children:[o.jsxs("div",{className:"flex flex-wrap flex-1 items-center gap-8 min-w-0",children:[o.jsx("div",{className:"grow shrink-0 basis-40",children:o.jsx(Te,{items:i,value:e.field||void 0,placeholder:"Field...",showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:l})}),o.jsx("div",{className:"grow shrink-0 basis-[130px]",children:o.jsx(Te,{items:s,value:e.operator||void 0,placeholder:"Operator...",showLeadingIcon:!1,size:"md",menuSize:"sm",disabled:!e.field,onChange:c})}),a?.connector==="arrow"&&o.jsx("span",{className:"shrink-0",children:o.jsx(ie,{size:"sm",color:"var(--med-em)",children:o.jsx(B.ArrowRight,{})})}),o.jsx(AA,{operatorConfig:a,values:e.values,valueOptions:t.valueOptions,fieldItems:i,onValuesChange:u}),d&&o.jsx("div",{className:"flex-1"})]}),e.showDelete&&o.jsx("div",{className:"flex items-center shrink-0",children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx("span",{className:"contents",children:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})})}),onClick:()=>n(e.id),"aria-label":"Delete condition"})})]})}const _A={xs:"text-xs",sm:"text-sm",md:"text-base"};function H3({title:e,children:t,footer:r,headerAction:n,className:a,titleClassName:i,headerClassName:s,contentClassName:l,titleSize:c="sm",defaultPadding:u=!1}){return o.jsxs("div",{className:N.clsx("flex flex-col bg-white rounded-2xl border border-surface-3",a),children:[o.jsxs("div",{className:te.twMerge(N.clsx("flex items-center shrink-0 py-4 px-8 border-b border-surface-3",s)),children:[o.jsx("h3",{className:N.clsx("font-semibold text-high-em flex-1",_A[c],i),children:e}),n]}),o.jsx("div",{className:te.twMerge(N.clsx("flex-1 overflow-y-auto p-5",u&&"p-8",l)),children:t}),r&&o.jsx("div",{className:"shrink-0 flex items-center justify-end gap-2 px-8 pb-6",children:r})]})}function kA({title:e,conditions:t,config:r,operator:n,onOperatorChange:a,onChange:i,onDelete:s,onAddAnd:l,onAddOr:c,dropdownIndex:u=0,className:d}){const f=o.jsx(ie,{children:o.jsx(B.Add,{})}),h=[...l?[{value:"and",icon:f,label:"And"}]:[],...c?[{value:"or",icon:f,label:"Or"}]:[]],p=h.length>0?o.jsx(mr,{options:h,value:"",size:"sm",variant:"neutral",onChange:g=>{g==="and"&&l?.(),g==="or"&&c?.()}}):void 0;return o.jsx(H3,{title:e,footer:p,className:d,children:o.jsx("div",{className:"p-5",children:o.jsx(F3,{operator:n,onChange:a,dropdownIndex:u,children:t.map(g=>o.jsx(W3,{condition:g,config:r,onChange:i,onDelete:s},g.id))})})})}const TA=[{id:"if",title:"If",showCheckbox:!1,showLeadingIcon:!1},{id:"if-else",title:"If / Else",showCheckbox:!1,showLeadingIcon:!1}],EA={when:"When",then:"Then","else-if":"Else If",else:"Else"},V3=70,IA=10;function MA(){return o.jsx("div",{className:"relative h-[23px] shrink-0",style:{width:V3},children:o.jsx("div",{className:"absolute left-4 top-0 w-14 h-full border-l border-b border-surface-4 rounded-bl-xl"})})}function $A({name:e,onNameChange:t,type:r,onTypeChange:n,branches:a,onAddElseIf:i,onRemoveBranch:s,className:l}){return o.jsxs("div",{className:N.clsx("flex flex-col gap-10",l),children:[o.jsxs("div",{className:"flex items-end gap-5",children:[o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(ge,{label:"Name",value:e,size:"md",onChange:c=>t(c.target.value)})}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Te,{items:TA,value:r,label:"Type",showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:c=>n(c)})})]}),a.map((c,u)=>{const d=u,f=u===0,h=c.removable&&!!s;return o.jsxs("div",{className:N.clsx("flex items-start gap-2",!f&&"ml-[var(--indent-mobile)] md:ml-[var(--indent-desktop)]"),style:f?void 0:{"--indent-mobile":`${(d-1)*IA}px`,"--indent-desktop":`${(d-1)*V3}px`},children:[!f&&o.jsx("div",{className:"hidden md:block shrink-0",children:o.jsx(MA,{})}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(kA,{title:EA[c.type],...c.panel})}),h&&o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx("span",{className:"contents",children:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})})}),onClick:()=>s(c.id),"aria-label":"Remove branch"})]},c.id)}),i&&o.jsx("div",{children:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",leadingIcon:o.jsx(ie,{size:14,children:o.jsx(B.Add,{})}),onClick:i,children:"Add Else If"})})]})}const U3=({name:e,expression:t,inputField:r,className:n})=>{const[a,i]=O.default.useState(!1),s=O.default.useRef(null),l=!!t?.options?.length;function c(){l&&i(d=>!d)}function u(d){t?.onSelect?.(d),i(!1)}return o.jsxs("div",{className:N.clsx("flex flex-col p-4 gap-4 border border-surface-4 rounded-xl",n),children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-semibold text-high-em truncate pr-2",children:e}),t&&o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:s,className:"inline-flex shrink-0",children:o.jsx(Rr,{size:"sm",variant:"quaternary",leadingIcon:!1,trailingIcon:!1,className:"font-semibold cursor-pointer",onClick:c,children:t.label})}),l&&a&&o.jsx(Wt,{items:t.options,selectedIds:t.selectedId?[t.selectedId]:[],size:"xs",triggerRef:s,onSelect:u,onClose:()=>i(!1)})]})]}),r!==void 0&&o.jsx(ge,{...r})]})};function K3({operator:e,className:t}){return e?o.jsxs("div",{className:`flex items-center gap-5 ${t??""}`,children:[o.jsx(pe,{className:"flex-1"}),o.jsx(Ge,{size:"md",theme:"surface",variant:"simple",className:"shrink-0",children:e}),o.jsx(pe,{className:"flex-1"})]}):o.jsx("div",{className:`flex items-center gap-5 ${t??""}`,children:o.jsx(pe,{className:"flex-1"})})}function RA({title:e,items:t,operator:r,onAdd:n,onDelete:a,onClose:i,className:s}){const l=n?o.jsx(K,{variant:"neutral",hierarchy:"primary",size:"xs",icons:"leading",leadingIcon:o.jsx(ie,{children:o.jsx(B.Add,{})}),onClick:n,children:"Add expression"}):void 0;return o.jsx(H3,{title:e,footer:l,titleSize:"xs",headerClassName:"px-4 py-2 bg-surface-2",contentClassName:"p-4",headerAction:o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})}),onClick:i,"aria-label":"Close"}),className:te.twMerge(N.clsx("rounded-lg overflow-hidden",s)),children:o.jsx("div",{className:"flex flex-col gap-3",children:t.map((c,u)=>{const{id:d,...f}=c,h=u===t.length-1;return o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(U3,{className:"flex-1",...f}),a&&o.jsx(K,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx("span",{className:"contents",children:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})})}),onClick:()=>a(d),"aria-label":"Remove expression"})]}),!h&&o.jsx(K3,{operator:r})]},d)})})})}const LA={confirmed:{theme:"success",label:"Confirmed"},pending:{theme:"warning",label:"Pending"},"no-show":{theme:"danger",label:"No-show"},cancelled:{theme:"surface",label:"Cancelled"}},$o=({time:e,title:t,description:r,status:n,isSelected:a=!1,className:i,...s})=>{const l=LA[n];return o.jsxs("div",{className:te.twMerge(N.clsx("px-8 py-8 flex items-center gap-6 cursor-pointer transition-colors outline-none","border-b border-surface-3",a?"bg-surface-1":"bg-white hover:bg-surface-1",i)),...s,children:[o.jsx("span",{className:N.clsx("text-xs font-semibold text-med-em shrink-0 whitespace-nowrap",a&&"p-2 bg-white border border-surface-4 rounded-md"),children:e}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsx("span",{className:"text-sm font-semibold text-med-em truncate",children:t}),o.jsx("span",{className:"text-xs text-low-em truncate",children:r})]}),l&&o.jsx(Ge,{theme:l.theme,variant:"outlined",size:"sm",className:"shrink-0",children:l.label})]})};$o.displayName="AppointmentRow";const Ro=({name:e,age:t,gender:r,tags:n,fields:a,onEdit:i,className:s})=>o.jsxs("div",{className:te.twMerge("p-6 flex flex-col gap-6 flex-1 overflow-y-auto",s),children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-med-em",children:e}),o.jsxs("p",{className:"text-xs text-low-em",children:[r," · ",t," yrs"]}),n&&n.length>0&&o.jsx("div",{className:"flex flex-wrap gap-6 py-4",children:n.map(l=>o.jsx(Rr,{variant:"tertiary",size:"xs",leadingIcon:!1,trailingIcon:!1,children:l},l))})]}),i&&o.jsx(K,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:o.jsx(B.Edit2,{}),onClick:i,"aria-label":"Edit"})]}),a&&a.length>0&&o.jsx("div",{className:"flex flex-col",children:a.map(({label:l,value:c},u)=>o.jsxs("div",{className:"flex items-baseline gap-6 px-5 py-4",children:[o.jsx("span",{className:"text-xs text-low-em tracking-wide shrink-0",children:l}),o.jsx("span",{className:"text-xs text-med-em font-medium",children:c??"—"})]},`${l}-${u}`))})]});Ro.displayName="AppointmentDetail";const DA=480,G3=({appointments:e,selectedId:t,detail:r,onSelectAppointment:n,showDetail:a=!0,showDatePicker:i=!1,selectedDate:s,onDateChange:l,datePickerType:c="single",className:u,...d})=>{const f=e.findIndex(x=>x.id===t),[h,p]=tl(),g=p!==1/0&&p<DA;return o.jsxs(al,{size:"md",padding:"sm",children:[o.jsxs("div",{ref:h,className:te.twMerge(N.clsx("bg-surface-1 shadow-e2 overflow-hidden",g?"flex flex-col w-full":"flex flex-row",u)),...d,children:[o.jsxs("div",{className:N.clsx("flex flex-col min-h-0 h-full",!g&&a?"w-1/2":"w-full"),children:[i&&o.jsx("div",{className:N.clsx("shrink-0 flex justify-center bg-white border-b border-surface-3",!g&&a&&"border-r border-surface-3",!g&&a&&f===0&&"rounded-br-lg"),children:o.jsx(mm,{selected:s,pickType:c,onSelect:l,showFooter:!1,className:"rounded-none border-0"})}),o.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[o.jsx("div",{className:"flex flex-col overflow-y-auto bg-surface-1 min-h-0 max-h-full ds-scrollbar",children:e.map((x,m)=>{const v=x.id===t,b=m===f-1,w=m===f+1,C={time:x.time,title:x.title,description:x.description,status:x.status,isSelected:v,onClick:()=>n?.(x.id),className:N.clsx(v?"bg-surface-1 border-transparent":[!g&&a&&"border-r border-surface-3",!g&&b&&"rounded-br-lg",!g&&w&&"rounded-tr-lg border-t border-surface-3"])};return g?o.jsx(il,{children:o.jsx($o,{...C})},x.id):o.jsx($o,{...C},x.id)})}),!g&&a&&o.jsx("div",{className:"flex-1 border-r border-surface-3"}),g&&o.jsx("div",{className:"flex-1"})]})]}),!g&&a&&o.jsx("div",{className:"w-1/2 bg-surface-1 flex flex-col min-w-0",children:r?o.jsx(Ro,{...r}):o.jsx(ht,{flat:!0,description:"Select an appointment to view details",className:"!bg-transparent h-full"})})]}),o.jsxs(ol,{children:[o.jsx(sl,{children:o.jsx(ll,{children:r?.name??"Details"})}),o.jsx(cl,{children:r?o.jsx(Ro,{...r}):o.jsx(ht,{flat:!0,description:"Select an appointment to view details",className:"!bg-transparent h-full"})})]})]})};G3.displayName="Planner";const xl=({title:e,description:t,status:r,statusTheme:n,avatars:a,quickActions:i=[],variant:s="neutral",onCheck:l,onDelete:c,className:u,...d})=>o.jsxs("div",{className:te.twMerge(N.clsx("bg-white rounded-xl border border-surface-3 shadow-e1 p-4 flex flex-col gap-4",s==="secondary"&&"bg-surface-2",u)),...d,children:[o.jsx("div",{className:"text-sm font-semibold text-high-em truncate",children:e}),t!=null&&o.jsx("div",{className:"text-xs text-med-em leading-snug line-clamp-3",children:t}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(Ge,{theme:n,size:"sm",variant:"simple",children:r}),a&&a.length>0&&o.jsx(tm,{avatars:a,size:"xs",max:3}),i.length>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[i.includes("check")&&o.jsx(K,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:o.jsx(B.TickCircle,{}),onClick:f=>{f.stopPropagation(),l?.()},"aria-label":"Mark complete"}),i.includes("delete")&&o.jsx(K,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:o.jsx(B.Trash,{}),onClick:f=>{f.stopPropagation(),c?.()},"aria-label":"Delete"})]})]})]});xl.displayName="KanbanCard";const zA={red:{theme:"danger",statusState:"danger"},orange:{theme:"warning",statusState:"warning"},green:{theme:"success",statusState:"success"},gray:{theme:"surface",statusState:"disabled"}},Z3=({card:e,columnName:t,statusTheme:r,variant:n,onCardClick:a})=>{const{attributes:i,listeners:s,setNodeRef:l,transform:c,transition:u,isDragging:d}=dt.useSortable({id:e.id,data:{id:e.id,columnName:t},animateLayoutChanges:()=>!1});return o.jsxs("div",{ref:l,style:{transform:Gp.CSS.Transform.toString(c),transition:u},className:N.clsx("touch-none",d?"relative cursor-grabbing":"cursor-grab"),onClick:()=>a?.(e.id),...i,...s,children:[d&&o.jsx(ci,{className:"absolute inset-0"}),o.jsx("div",{className:N.clsx(d&&"invisible"),children:o.jsx(xl,{title:e.title,description:e.description,status:e.status,statusTheme:r,avatars:e.avatars,quickActions:e.quickActions,variant:n,onCheck:e.onCheck,onDelete:e.onDelete})})]})};Z3.displayName="DraggableCard";const Y3=({columnName:e})=>{const{setNodeRef:t}=lt.useDroppable({id:`endzone-${e}`,data:{columnName:e,isEndZone:!0}});return o.jsx("div",{ref:t,className:"flex-1 min-h-8"})};Y3.displayName="KanbanEndZone";const Am=({name:e,statusColor:t,cards:r,showCounter:n=!1,onAddCard:a,variant:i,emptyState:s="No items yet",onCardClick:l,className:c,fullHeight:u=!1})=>{const{setNodeRef:d}=lt.useDroppable({id:e,data:{columnName:e}}),{theme:f,statusState:h}=zA[t];return o.jsxs("div",{ref:d,className:te.twMerge(N.clsx("bg-surface-bg rounded-xl border border-surface-3 p-4 flex flex-col gap-3",u?"h-full min-h-0 flex-1 min-w-22":"w-22 shrink-0",c)),children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx(Ge,{variant:"status",size:"xs",statusState:h}),o.jsx("span",{className:"text-base font-semibold text-high-em truncate",children:e}),n&&o.jsxs("span",{className:"text-lg font-semibold text-low-em",children:["(",r.length,")"]})]}),a&&o.jsx(K,{icons:"only",hierarchy:"secondary",variant:"neutral",size:"xs",leadingIcon:o.jsx(B.Add,{}),onClick:a,"aria-label":`Add card to ${e}`})]}),o.jsx(dt.SortableContext,{items:r.map(p=>p.id),strategy:dt.verticalListSortingStrategy,children:o.jsx("div",{className:N.clsx("flex flex-col gap-3 flex-1 pr-2",u?"min-h-0 overflow-y-auto ds-scrollbar":r.length>4&&"overflow-y-auto ds-scrollbar max-h-26"),children:r.length===0?o.jsx(ht,{flat:!0,description:s,className:"!bg-transparent h-full"}):o.jsxs(o.Fragment,{children:[r.map(p=>o.jsx(Z3,{card:p,columnName:e,statusTheme:f,variant:i,onCardClick:l},p.id)),o.jsx(Y3,{columnName:e})]})})}),a&&o.jsx(K,{hierarchy:"secondary",variant:"neutral",size:"sm",icons:"leading",leadingIcon:o.jsx(B.Add,{}),className:"w-full justify-center",onClick:a,children:"Add Task"})]})};Am.displayName="KanbanColumn";const BA={red:"danger",orange:"warning",green:"success",gray:"surface"},FA=e=>{const t=lt.pointerWithin(e);return t.length>0?t:lt.rectIntersection(e)},X3=({columns:e,data:t,fieldMap:r,showCounter:n,variant:a,emptyState:i,columnClassName:s,fullHeight:l,onAddCard:c,onCardCheck:u,onCardDelete:d,onCardMove:f,onCardClick:h,className:p,...g})=>{const[x,m]=P.useState(null),[v,b]=P.useState(null),w=v??t,C=lt.useSensors(lt.useSensor(lt.PointerSensor,{activationConstraint:{distance:8}})),y=T=>w.filter(M=>M[r.status]===T).map(M=>{const R=String(M[r.id]??"");return{id:R,title:String(M[r.title]??""),description:r.description?M[r.description]:void 0,status:T,avatars:r.avatars?M[r.avatars]:void 0,quickActions:r.quickActions,onCheck:u?()=>u(R):void 0,onDelete:d?()=>d(R):void 0}}),S=e.flatMap(T=>y(T.name)).find(T=>T.id===x)??null,A=S?e.find(T=>y(T.name).some(M=>M.id===x))?.name:void 0,_=T=>{m(String(T.active.id)),b([...t])},I=T=>{const{active:M,over:R}=T;if(!R)return;const $=String(M.id),L=String(R.id);if($===L)return;const q=R.data.current?.columnName;q!=null&&b(U=>{const z=U??t,F=z.findIndex(re=>String(re[r.id])===$);if(F<0)return U;const H={...z[F],[r.status]:q},W=z.filter((re,X)=>X!==F),Z=W.findIndex(re=>String(re[r.id])===L);if(Z>=0)W.splice(Z,0,H);else{let re=-1;W.forEach((X,ne)=>{X[r.status]===q&&(re=ne)}),W.splice(re+1,0,H)}return W})},k=T=>{const M=v;if(m(null),b(null),!M)return;const R=String(T.active.id),$=M.find(U=>String(U[r.id])===R);if(!$)return;const L=String($[r.status]??""),q=Math.max(0,M.filter(U=>U[r.status]===$[r.status]).findIndex(U=>String(U[r.id])===R));f?.(R,L,q)},E=()=>{m(null),b(null)};return o.jsxs(lt.DndContext,{sensors:C,collisionDetection:FA,onDragStart:_,onDragOver:I,onDragEnd:k,onDragCancel:E,children:[o.jsx("div",{className:te.twMerge(N.clsx("flex flex-row gap-4 p-4 overflow-x-auto ds-scrollbar",l&&"h-full",p)),...g,children:e.map(T=>o.jsx(Am,{name:T.name,statusColor:T.statusColor,cards:y(T.name),showCounter:n,variant:a,emptyState:i,onAddCard:c?()=>c(T.name):void 0,onCardClick:h,className:s,fullHeight:l},T.name))}),o.jsx(lt.DragOverlay,{dropAnimation:null,children:S&&A&&o.jsx(xl,{title:S.title,description:S.description,status:S.status,statusTheme:BA[e.find(T=>T.name===A).statusColor],avatars:S.avatars,quickActions:S.quickActions,variant:a,className:"rotate-1 shadow-e3"})})]})};X3.displayName="Kanban";var co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nc,hg;function vt(){if(hg)return nc;hg=1;var e=Array.isArray;return nc=e,nc}var ac,pg;function Q3(){if(pg)return ac;pg=1;var e=typeof co=="object"&&co&&co.Object===Object&&co;return ac=e,ac}var ic,mg;function rr(){if(mg)return ic;mg=1;var e=Q3(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ic=r,ic}var oc,xg;function Xi(){if(xg)return oc;xg=1;var e=rr(),t=e.Symbol;return oc=t,oc}var sc,gg;function qA(){if(gg)return sc;gg=1;var e=Xi(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(s){var l=r.call(s,a),c=s[a];try{s[a]=void 0;var u=!0}catch{}var d=n.call(s);return u&&(l?s[a]=c:delete s[a]),d}return sc=i,sc}var lc,vg;function WA(){if(vg)return lc;vg=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return lc=r,lc}var cc,yg;function Cr(){if(yg)return cc;yg=1;var e=Xi(),t=qA(),r=WA(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function s(l){return l==null?l===void 0?a:n:i&&i in Object(l)?t(l):r(l)}return cc=s,cc}var uc,bg;function Sr(){if(bg)return uc;bg=1;function e(t){return t!=null&&typeof t=="object"}return uc=e,uc}var dc,wg;function Oa(){if(wg)return dc;wg=1;var e=Cr(),t=Sr(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return dc=n,dc}var fc,jg;function _m(){if(jg)return fc;jg=1;var e=vt(),t=Oa(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,s){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||s!=null&&i in Object(s)}return fc=a,fc}var hc,Cg;function zr(){if(Cg)return hc;Cg=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return hc=e,hc}var pc,Sg;function km(){if(Sg)return pc;Sg=1;var e=Cr(),t=zr(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function s(l){if(!t(l))return!1;var c=e(l);return c==n||c==a||c==r||c==i}return pc=s,pc}var mc,Og;function HA(){if(Og)return mc;Og=1;var e=rr(),t=e["__core-js_shared__"];return mc=t,mc}var xc,Ng;function VA(){if(Ng)return xc;Ng=1;var e=HA(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return xc=r,xc}var gc,Pg;function J3(){if(Pg)return gc;Pg=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return gc=r,gc}var vc,Ag;function UA(){if(Ag)return vc;Ag=1;var e=km(),t=VA(),r=zr(),n=J3(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!r(h)||t(h))return!1;var p=e(h)?d:i;return p.test(n(h))}return vc=f,vc}var yc,_g;function KA(){if(_g)return yc;_g=1;function e(t,r){return t?.[r]}return yc=e,yc}var bc,kg;function vn(){if(kg)return bc;kg=1;var e=UA(),t=KA();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return bc=r,bc}var wc,Tg;function gl(){if(Tg)return wc;Tg=1;var e=vn(),t=e(Object,"create");return wc=t,wc}var jc,Eg;function GA(){if(Eg)return jc;Eg=1;var e=gl();function t(){this.__data__=e?e(null):{},this.size=0}return jc=t,jc}var Cc,Ig;function ZA(){if(Ig)return Cc;Ig=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Cc=e,Cc}var Sc,Mg;function YA(){if(Mg)return Sc;Mg=1;var e=gl(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var s=this.__data__;if(e){var l=s[i];return l===t?void 0:l}return n.call(s,i)?s[i]:void 0}return Sc=a,Sc}var Oc,$g;function XA(){if($g)return Oc;$g=1;var e=gl(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return Oc=n,Oc}var Nc,Rg;function QA(){if(Rg)return Nc;Rg=1;var e=gl(),t="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?t:a,this}return Nc=r,Nc}var Pc,Lg;function JA(){if(Lg)return Pc;Lg=1;var e=GA(),t=ZA(),r=YA(),n=XA(),a=QA();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Pc=i,Pc}var Ac,Dg;function e_(){if(Dg)return Ac;Dg=1;function e(){this.__data__=[],this.size=0}return Ac=e,Ac}var _c,zg;function Tm(){if(zg)return _c;zg=1;function e(t,r){return t===r||t!==t&&r!==r}return _c=e,_c}var kc,Bg;function vl(){if(Bg)return kc;Bg=1;var e=Tm();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return kc=t,kc}var Tc,Fg;function t_(){if(Fg)return Tc;Fg=1;var e=vl(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,s=e(i,a);if(s<0)return!1;var l=i.length-1;return s==l?i.pop():r.call(i,s,1),--this.size,!0}return Tc=n,Tc}var Ec,qg;function r_(){if(qg)return Ec;qg=1;var e=vl();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return Ec=t,Ec}var Ic,Wg;function n_(){if(Wg)return Ic;Wg=1;var e=vl();function t(r){return e(this.__data__,r)>-1}return Ic=t,Ic}var Mc,Hg;function a_(){if(Hg)return Mc;Hg=1;var e=vl();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Mc=t,Mc}var $c,Vg;function yl(){if(Vg)return $c;Vg=1;var e=e_(),t=t_(),r=r_(),n=n_(),a=a_();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,$c=i,$c}var Rc,Ug;function Em(){if(Ug)return Rc;Ug=1;var e=vn(),t=rr(),r=e(t,"Map");return Rc=r,Rc}var Lc,Kg;function i_(){if(Kg)return Lc;Kg=1;var e=JA(),t=yl(),r=Em();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Lc=n,Lc}var Dc,Gg;function o_(){if(Gg)return Dc;Gg=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Dc=e,Dc}var zc,Zg;function bl(){if(Zg)return zc;Zg=1;var e=o_();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return zc=t,zc}var Bc,Yg;function s_(){if(Yg)return Bc;Yg=1;var e=bl();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Bc=t,Bc}var Fc,Xg;function l_(){if(Xg)return Fc;Xg=1;var e=bl();function t(r){return e(this,r).get(r)}return Fc=t,Fc}var qc,Qg;function c_(){if(Qg)return qc;Qg=1;var e=bl();function t(r){return e(this,r).has(r)}return qc=t,qc}var Wc,Jg;function u_(){if(Jg)return Wc;Jg=1;var e=bl();function t(r,n){var a=e(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return Wc=t,Wc}var Hc,ev;function Im(){if(ev)return Hc;ev=1;var e=i_(),t=s_(),r=l_(),n=c_(),a=u_();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Hc=i,Hc}var Vc,tv;function eC(){if(tv)return Vc;tv=1;var e=Im(),t="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var s=arguments,l=a?a.apply(this,s):s[0],c=i.cache;if(c.has(l))return c.get(l);var u=n.apply(this,s);return i.cache=c.set(l,u)||c,u};return i.cache=new(r.Cache||e),i}return r.Cache=e,Vc=r,Vc}var Uc,rv;function d_(){if(rv)return Uc;rv=1;var e=eC(),t=500;function r(n){var a=e(n,function(s){return i.size===t&&i.clear(),s}),i=a.cache;return a}return Uc=r,Uc}var Kc,nv;function f_(){if(nv)return Kc;nv=1;var e=d_(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(s,l,c,u){i.push(c?u.replace(r,"$1"):l||s)}),i});return Kc=n,Kc}var Gc,av;function Mm(){if(av)return Gc;av=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=Array(a);++n<a;)i[n]=r(t[n],n,t);return i}return Gc=e,Gc}var Zc,iv;function h_(){if(iv)return Zc;iv=1;var e=Xi(),t=Mm(),r=vt(),n=Oa(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function s(l){if(typeof l=="string")return l;if(r(l))return t(l,s)+"";if(n(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return Zc=s,Zc}var Yc,ov;function tC(){if(ov)return Yc;ov=1;var e=h_();function t(r){return r==null?"":e(r)}return Yc=t,Yc}var Xc,sv;function rC(){if(sv)return Xc;sv=1;var e=vt(),t=_m(),r=f_(),n=tC();function a(i,s){return e(i)?i:t(i,s)?[i]:r(n(i))}return Xc=a,Xc}var Qc,lv;function wl(){if(lv)return Qc;lv=1;var e=Oa();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Qc=t,Qc}var Jc,cv;function $m(){if(cv)return Jc;cv=1;var e=rC(),t=wl();function r(n,a){a=e(a,n);for(var i=0,s=a.length;n!=null&&i<s;)n=n[t(a[i++])];return i&&i==s?n:void 0}return Jc=r,Jc}var eu,uv;function nC(){if(uv)return eu;uv=1;var e=$m();function t(r,n,a){var i=r==null?void 0:e(r,n);return i===void 0?a:i}return eu=t,eu}var p_=nC();const St=Ne(p_);var tu,dv;function m_(){if(dv)return tu;dv=1;function e(t){return t==null}return tu=e,tu}var x_=m_();const de=Ne(x_);var ru,fv;function g_(){if(fv)return ru;fv=1;var e=Cr(),t=vt(),r=Sr(),n="[object String]";function a(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return ru=a,ru}var v_=g_();const un=Ne(v_);var y_=km();const le=Ne(y_);var b_=zr();const Na=Ne(b_);var uo={exports:{}},be={};var hv;function w_(){if(hv)return be;hv=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function x(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case e:switch(m=m.type,m){case r:case a:case n:case u:case d:return m;default:switch(m=m&&m.$$typeof,m){case l:case s:case c:case h:case f:case i:return m;default:return v}}case t:return v}}}return be.ContextConsumer=s,be.ContextProvider=i,be.Element=e,be.ForwardRef=c,be.Fragment=r,be.Lazy=h,be.Memo=f,be.Portal=t,be.Profiler=a,be.StrictMode=n,be.Suspense=u,be.SuspenseList=d,be.isAsyncMode=function(){return!1},be.isConcurrentMode=function(){return!1},be.isContextConsumer=function(m){return x(m)===s},be.isContextProvider=function(m){return x(m)===i},be.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},be.isForwardRef=function(m){return x(m)===c},be.isFragment=function(m){return x(m)===r},be.isLazy=function(m){return x(m)===h},be.isMemo=function(m){return x(m)===f},be.isPortal=function(m){return x(m)===t},be.isProfiler=function(m){return x(m)===a},be.isStrictMode=function(m){return x(m)===n},be.isSuspense=function(m){return x(m)===u},be.isSuspenseList=function(m){return x(m)===d},be.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===a||m===n||m===u||m===d||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===f||m.$$typeof===i||m.$$typeof===s||m.$$typeof===c||m.$$typeof===g||m.getModuleId!==void 0)},be.typeOf=x,be}var we={};var pv;function j_(){return pv||(pv=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=!1,x=!1,m=!1,v=!1,b=!1,w;w=Symbol.for("react.module.reference");function C(Q){return!!(typeof Q=="string"||typeof Q=="function"||Q===r||Q===a||b||Q===n||Q===u||Q===d||v||Q===p||g||x||m||typeof Q=="object"&&Q!==null&&(Q.$$typeof===h||Q.$$typeof===f||Q.$$typeof===i||Q.$$typeof===s||Q.$$typeof===c||Q.$$typeof===w||Q.getModuleId!==void 0))}function y(Q){if(typeof Q=="object"&&Q!==null){var me=Q.$$typeof;switch(me){case e:var $e=Q.type;switch($e){case r:case a:case n:case u:case d:return $e;default:var tt=$e&&$e.$$typeof;switch(tt){case l:case s:case c:case h:case f:case i:return tt;default:return me}}case t:return me}}}var j=s,S=i,A=e,_=c,I=r,k=h,E=f,T=t,M=a,R=n,$=u,L=d,q=!1,U=!1;function z(Q){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function F(Q){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(Q){return y(Q)===s}function W(Q){return y(Q)===i}function Z(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===e}function re(Q){return y(Q)===c}function X(Q){return y(Q)===r}function ne(Q){return y(Q)===h}function ce(Q){return y(Q)===f}function G(Q){return y(Q)===t}function ee(Q){return y(Q)===a}function J(Q){return y(Q)===n}function D(Q){return y(Q)===u}function he(Q){return y(Q)===d}we.ContextConsumer=j,we.ContextProvider=S,we.Element=A,we.ForwardRef=_,we.Fragment=I,we.Lazy=k,we.Memo=E,we.Portal=T,we.Profiler=M,we.StrictMode=R,we.Suspense=$,we.SuspenseList=L,we.isAsyncMode=z,we.isConcurrentMode=F,we.isContextConsumer=H,we.isContextProvider=W,we.isElement=Z,we.isForwardRef=re,we.isFragment=X,we.isLazy=ne,we.isMemo=ce,we.isPortal=G,we.isProfiler=ee,we.isStrictMode=J,we.isSuspense=D,we.isSuspenseList=he,we.isValidElementType=C,we.typeOf=y})()),we}var mv;function C_(){return mv||(mv=1,process.env.NODE_ENV==="production"?uo.exports=w_():uo.exports=j_()),uo.exports}var S_=C_(),nu,xv;function aC(){if(xv)return nu;xv=1;var e=Cr(),t=Sr(),r="[object Number]";function n(a){return typeof a=="number"||t(a)&&e(a)==r}return nu=n,nu}var au,gv;function O_(){if(gv)return au;gv=1;var e=aC();function t(r){return e(r)&&r!=+r}return au=t,au}var N_=O_();const Pa=Ne(N_);var P_=aC();const A_=Ne(P_);var Je=function(t){return t===0?0:t>0?1:-1},en=function(t){return un(t)&&t.indexOf("%")===t.length-1},Y=function(t){return A_(t)&&!Pa(t)},__=function(t){return de(t)},Ke=function(t){return Y(t)||un(t)},k_=0,yn=function(t){var r=++k_;return"".concat(t||"").concat(r)},ct=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Y(t)&&!un(t))return n;var i;if(en(t)){var s=t.indexOf("%");i=r*parseFloat(t.slice(0,s))/100}else i=+t;return Pa(i)&&(i=n),a&&i>r&&(i=r),i},Tr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},T_=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},Ee=function(t,r){return Y(t)&&Y(r)?function(n){return t+n*(r-t)}:function(){return r}};function Lo(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):St(n,t))===r})}var E_=function(t,r){return Y(t)&&Y(r)?t-r:un(t)&&un(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function zn(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}var I_=["viewBox","children"],M_=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],vv=["points","pathLength"],iu={svg:I_,polygon:vv,polyline:vv},Rm=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Do=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(P.isValidElement(t)&&(n=t.props),!Na(n))return null;var a={};return Object.keys(n).forEach(function(i){Rm.includes(i)&&(a[i]=r||function(s){return n[i](n,s)})}),a},$_=function(t,r,n){return function(a){return t(r,n,a),null}},xr=function(t,r,n){if(!Na(t)||bh(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var s=t[i];Rm.includes(i)&&typeof s=="function"&&(a||(a={}),a[i]=$_(s,r,n))}),a},R_=["children"],L_=["children"];function yv(e,t){if(e==null)return{};var r=D_(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function D_(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wh(e){"@babel/helpers - typeof";return wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wh(e)}var bv={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},fr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},wv=null,ou=null,Lm=function e(t){if(t===wv&&Array.isArray(ou))return ou;var r=[];return P.Children.forEach(t,function(n){de(n)||(S_.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),ou=r,wv=t,r};function gt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return fr(a)}):n=[fr(t)],Lm(e).forEach(function(a){var i=St(a,"type.displayName")||St(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function wt(e,t){var r=gt(e,t);return r&&r[0]}var jv=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Y(n)||n<=0||!Y(a)||a<=0)},z_=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],B_=function(t){return t&&t.type&&un(t.type)&&z_.indexOf(t.type)>=0},iC=function(t){return t&&wh(t)==="object"&&"clipDot"in t},F_=function(t,r,n,a){var i,s=(i=iu?.[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!le(t)&&(a&&s.includes(r)||M_.includes(r))||n&&Rm.includes(r)},oe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(P.isValidElement(t)&&(a=t.props),!Na(a))return null;var i={};return Object.keys(a).forEach(function(s){var l;F_((l=a)===null||l===void 0?void 0:l[s],s,r,n)&&(i[s]=a[s])}),i},jh=function e(t,r){if(t===r)return!0;var n=P.Children.count(t);if(n!==P.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Cv(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],s=r[a];if(Array.isArray(i)||Array.isArray(s)){if(!e(i,s))return!1}else if(!Cv(i,s))return!1}return!0},Cv=function(t,r){if(de(t)&&de(r))return!0;if(!de(t)&&!de(r)){var n=t.props||{},a=n.children,i=yv(n,R_),s=r.props||{},l=s.children,c=yv(s,L_);return a&&l?zn(i,c)&&jh(a,l):!a&&!l?zn(i,c):!1}return!1},Sv=function(t,r){var n=[],a={};return Lm(t).forEach(function(i,s){if(B_(i))n.push(i);else if(i){var l=fr(i.type),c=r[l]||{},u=c.handler,d=c.once;if(u&&(!d||!a[l])){var f=u(i,l,s);n.push(f),a[l]=!0}}}),n},q_=function(t){var r=t&&t.type;return r&&bv[r]?bv[r]:null},W_=function(t,r){return Lm(r).indexOf(t)},H_=["children","width","height","viewBox","className","style","title","desc"];function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ch.apply(this,arguments)}function V_(e,t){if(e==null)return{};var r=U_(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function U_(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sh(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,s=e.style,l=e.title,c=e.desc,u=V_(e,H_),d=a||{width:r,height:n,x:0,y:0},f=ae.default("recharts-surface",i);return O.default.createElement("svg",Ch({},oe(u,!0,"svg"),{className:f,width:r,height:n,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),O.default.createElement("title",null,l),O.default.createElement("desc",null,c),t)}var K_=["children","className"];function Oh(){return Oh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oh.apply(this,arguments)}function G_(e,t){if(e==null)return{};var r=Z_(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Z_(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var fe=O.default.forwardRef(function(e,t){var r=e.children,n=e.className,a=G_(e,K_),i=ae.default("recharts-layer",n);return O.default.createElement("g",Oh({className:i},oe(a,!0),{ref:t}),r)}),Y_=process.env.NODE_ENV!=="production",Et=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];if(Y_&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(r.replace(/%s/g,function(){return a[s++]}))}},su,Ov;function X_(){if(Ov)return su;Ov=1;function e(t,r,n){var a=-1,i=t.length;r<0&&(r=-r>i?0:i+r),n=n>i?i:n,n<0&&(n+=i),i=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(i);++a<i;)s[a]=t[a+r];return s}return su=e,su}var lu,Nv;function Q_(){if(Nv)return lu;Nv=1;var e=X_();function t(r,n,a){var i=r.length;return a=a===void 0?i:a,!n&&a>=i?r:e(r,n,a)}return lu=t,lu}var cu,Pv;function oC(){if(Pv)return cu;Pv=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="\\u200d",l=RegExp("["+s+e+a+i+"]");function c(u){return l.test(u)}return cu=c,cu}var uu,Av;function J_(){if(Av)return uu;Av=1;function e(t){return t.split("")}return uu=e,uu}var du,_v;function e8(){if(_v)return du;_v=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=u+"?",x="["+i+"]?",m="(?:"+p+"(?:"+[d,f,h].join("|")+")"+x+g+")*",v=x+g+m,b="(?:"+[d+l+"?",l,f,h,s].join("|")+")",w=RegExp(c+"(?="+c+")|"+b+v,"g");function C(y){return y.match(w)||[]}return du=C,du}var fu,kv;function t8(){if(kv)return fu;kv=1;var e=J_(),t=oC(),r=e8();function n(a){return t(a)?r(a):e(a)}return fu=n,fu}var hu,Tv;function r8(){if(Tv)return hu;Tv=1;var e=Q_(),t=oC(),r=t8(),n=tC();function a(i){return function(s){s=n(s);var l=t(s)?r(s):void 0,c=l?l[0]:s.charAt(0),u=l?e(l,1).join(""):s.slice(1);return c[i]()+u}}return hu=a,hu}var pu,Ev;function n8(){if(Ev)return pu;Ev=1;var e=r8(),t=e("toUpperCase");return pu=t,pu}var a8=n8();const jl=Ne(a8);function ke(e){return function(){return e}}const sC=Math.cos,zo=Math.sin,Ht=Math.sqrt,Bo=Math.PI,Cl=2*Bo,Nh=Math.PI,Ph=2*Nh,Yr=1e-6,i8=Ph-Yr;function lC(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function o8(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return lC;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class s8{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?lC:o8(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,s){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,l=this._y1,c=n-t,u=a-r,d=s-t,f=l-r,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Yr)if(!(Math.abs(f*c-u*d)>Yr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,g=a-l,x=c*c+u*u,m=p*p+g*g,v=Math.sqrt(x),b=Math.sqrt(h),w=i*Math.tan((Nh-Math.acos((x+h-m)/(2*v*b)))/2),C=w/b,y=w/v;Math.abs(C-1)>Yr&&this._append`L${t+C*d},${r+C*f}`,this._append`A${i},${i},0,0,${+(f*p>d*g)},${this._x1=t+y*c},${this._y1=r+y*u}`}}arc(t,r,n,a,i,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),c=n*Math.sin(a),u=t+l,d=r+c,f=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Yr||Math.abs(this._y1-d)>Yr)&&this._append`L${u},${d}`,n&&(h<0&&(h=h%Ph+Ph),h>i8?this._append`A${n},${n},0,1,${f},${t-l},${r-c}A${n},${n},0,1,${f},${this._x1=u},${this._y1=d}`:h>Yr&&this._append`A${n},${n},0,${+(h>=Nh)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function Dm(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new s8(t)}function zm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cC(e){this._context=e}cC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sl(e){return new cC(e)}function uC(e){return e[0]}function dC(e){return e[1]}function fC(e,t){var r=ke(!0),n=null,a=Sl,i=null,s=Dm(l);e=typeof e=="function"?e:e===void 0?uC:ke(e),t=typeof t=="function"?t:t===void 0?dC:ke(t);function l(c){var u,d=(c=zm(c)).length,f,h=!1,p;for(n==null&&(i=a(p=s())),u=0;u<=d;++u)!(u<d&&r(f=c[u],u,c))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(f,u,c),+t(f,u,c));if(p)return i=null,p+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:ke(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:ke(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ke(!!c),l):r},l.curve=function(c){return arguments.length?(a=c,n!=null&&(i=a(n)),l):a},l.context=function(c){return arguments.length?(c==null?n=i=null:i=a(n=c),l):n},l}function fo(e,t,r){var n=null,a=ke(!0),i=null,s=Sl,l=null,c=Dm(u);e=typeof e=="function"?e:e===void 0?uC:ke(+e),t=typeof t=="function"?t:ke(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?dC:ke(+r);function u(f){var h,p,g,x=(f=zm(f)).length,m,v=!1,b,w=new Array(x),C=new Array(x);for(i==null&&(l=s(b=c())),h=0;h<=x;++h){if(!(h<x&&a(m=f[h],h,f))===v)if(v=!v)p=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),g=h-1;g>=p;--g)l.point(w[g],C[g]);l.lineEnd(),l.areaEnd()}v&&(w[h]=+e(m,h,f),C[h]=+t(m,h,f),l.point(n?+n(m,h,f):w[h],r?+r(m,h,f):C[h]))}if(b)return l=null,b+""||null}function d(){return fC().defined(a).curve(s).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ke(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ke(+f),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:ke(!!f),u):a},u.curve=function(f){return arguments.length?(s=f,i!=null&&(l=s(i)),u):s},u.context=function(f){return arguments.length?(f==null?i=l=null:l=s(i=f),u):i},u}class hC{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function l8(e){return new hC(e,!0)}function c8(e){return new hC(e,!1)}const Bm={draw(e,t){const r=Ht(t/Bo);e.moveTo(r,0),e.arc(0,0,r,0,Cl)}},u8={draw(e,t){const r=Ht(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},pC=Ht(1/3),d8=pC*2,f8={draw(e,t){const r=Ht(t/d8),n=r*pC;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},h8={draw(e,t){const r=Ht(t),n=-r/2;e.rect(n,n,r,r)}},p8=.8908130915292852,mC=zo(Bo/10)/zo(7*Bo/10),m8=zo(Cl/10)*mC,x8=-sC(Cl/10)*mC,g8={draw(e,t){const r=Ht(t*p8),n=m8*r,a=x8*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const s=Cl*i/5,l=sC(s),c=zo(s);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*a,c*n+l*a)}e.closePath()}},mu=Ht(3),v8={draw(e,t){const r=-Ht(t/(mu*3));e.moveTo(0,r*2),e.lineTo(-mu*r,-r),e.lineTo(mu*r,-r),e.closePath()}},Nt=-.5,Pt=Ht(3)/2,Ah=1/Ht(12),y8=(Ah/2+1)*3,b8={draw(e,t){const r=Ht(t/y8),n=r/2,a=r*Ah,i=n,s=r*Ah+r,l=-i,c=s;e.moveTo(n,a),e.lineTo(i,s),e.lineTo(l,c),e.lineTo(Nt*n-Pt*a,Pt*n+Nt*a),e.lineTo(Nt*i-Pt*s,Pt*i+Nt*s),e.lineTo(Nt*l-Pt*c,Pt*l+Nt*c),e.lineTo(Nt*n+Pt*a,Nt*a-Pt*n),e.lineTo(Nt*i+Pt*s,Nt*s-Pt*i),e.lineTo(Nt*l+Pt*c,Nt*c-Pt*l),e.closePath()}};function w8(e,t){let r=null,n=Dm(a);e=typeof e=="function"?e:ke(e||Bm),t=typeof t=="function"?t:ke(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:ke(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:ke(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Fo(){}function qo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function xC(e){this._context=e}xC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:qo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:qo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function j8(e){return new xC(e)}function gC(e){this._context=e}gC.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:qo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function C8(e){return new gC(e)}function vC(e){this._context=e}vC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:qo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S8(e){return new vC(e)}function yC(e){this._context=e}yC.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function O8(e){return new yC(e)}function Iv(e){return e<0?-1:1}function Mv(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),s=(r-e._y1)/(a||n<0&&-0),l=(i*a+s*n)/(n+a);return(Iv(i)+Iv(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(l))||0}function $v(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function xu(e,t,r){var n=e._x0,a=e._y0,i=e._x1,s=e._y1,l=(i-n)/3;e._context.bezierCurveTo(n+l,a+l*t,i-l,s-l*r,i,s)}function Wo(e){this._context=e}Wo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xu(this,this._t0,$v(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,xu(this,$v(this,r=Mv(this,e,t)),r);break;default:xu(this,this._t0,r=Mv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function bC(e){this._context=new wC(e)}(bC.prototype=Object.create(Wo.prototype)).point=function(e,t){Wo.prototype.point.call(this,t,e)};function wC(e){this._context=e}wC.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function N8(e){return new Wo(e)}function P8(e){return new bC(e)}function jC(e){this._context=e}jC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Rv(e),a=Rv(t),i=0,s=1;s<r;++i,++s)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Rv(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),s=new Array(r);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,s[t]-=n*s[t-1];for(a[r-1]=s[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function A8(e){return new jC(e)}function Ol(e,t){this._context=e,this._t=t}Ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function _8(e){return new Ol(e,.5)}function k8(e){return new Ol(e,0)}function T8(e){return new Ol(e,1)}function Gn(e,t){if((s=e.length)>1)for(var r=1,n,a,i=e[t[0]],s,l=i.length;r<s;++r)for(a=i,i=e[t[r]],n=0;n<l;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function _h(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function E8(e,t){return e[t]}function I8(e){const t=[];return t.key=e,t}function M8(){var e=ke([]),t=_h,r=Gn,n=E8;function a(i){var s=Array.from(e.apply(this,arguments),I8),l,c=s.length,u=-1,d;for(const f of i)for(l=0,++u;l<c;++l)(s[l][u]=[0,+n(f,s[l].key,u,i)]).data=f;for(l=0,d=zm(t(s));l<c;++l)s[d[l]].index=l;return r(s,d),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:ke(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:ke(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?_h:typeof i=="function"?i:ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??Gn,a):r},a}function $8(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,s;a<i;++a){for(s=r=0;r<n;++r)s+=e[r][a][1]||0;if(s)for(r=0;r<n;++r)e[r][a][1]/=s}Gn(e,t)}}function R8(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var s=0,l=0;s<a;++s)l+=e[s][r][1]||0;n[r][1]+=n[r][0]=-l/2}Gn(e,t)}}function L8(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,s;n<i;++n){for(var l=0,c=0,u=0;l<s;++l){for(var d=e[t[l]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,g=0;g<l;++g){var x=e[t[g]],m=x[n][1]||0,v=x[n-1][1]||0;p+=m-v}c+=f,u+=p*f}a[n-1][1]+=a[n-1][0]=r,c&&(r-=u/c)}a[n-1][1]+=a[n-1][0]=r,Gn(e,t)}}function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}var D8=["type","size","sizeType"];function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kh.apply(this,arguments)}function Lv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lv(Object(r),!0).forEach(function(n){z8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z8(e,t,r){return t=B8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B8(e){var t=F8(e,"string");return ui(t)=="symbol"?t:t+""}function F8(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function q8(e,t){if(e==null)return{};var r=W8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var CC={symbolCircle:Bm,symbolCross:u8,symbolDiamond:f8,symbolSquare:h8,symbolStar:g8,symbolTriangle:v8,symbolWye:b8},H8=Math.PI/180,V8=function(t){var r="symbol".concat(jl(t));return CC[r]||Bm},U8=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*H8;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},K8=function(t,r){CC["symbol".concat(jl(t))]=r},Fm=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,s=t.sizeType,l=s===void 0?"area":s,c=q8(t,D8),u=Dv(Dv({},c),{},{type:n,size:i,sizeType:l}),d=function(){var m=V8(n),v=w8().type(m).size(U8(i,l,n));return v()},f=u.className,h=u.cx,p=u.cy,g=oe(u,!0);return h===+h&&p===+p&&i===+i?O.default.createElement("path",kh({},g,{className:ae.default("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};Fm.registerSymbol=K8;function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function Th(){return Th=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Th.apply(this,arguments)}function zv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function G8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zv(Object(r),!0).forEach(function(n){di(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,OC(n.key),n)}}function X8(e,t,r){return t&&Y8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q8(e,t,r){return t=Ho(t),J8(e,SC()?Reflect.construct(t,r||[],Ho(e).constructor):t.apply(e,r))}function J8(e,t){if(t&&(Zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e9(e)}function e9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SC=function(){return!!e})()}function Ho(e){return Ho=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ho(e)}function t9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eh(e,t)}function Eh(e,t){return Eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Eh(e,t)}function di(e,t,r){return t=OC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OC(e){var t=r9(e,"string");return Zn(t)=="symbol"?t:t+""}function r9(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var At=32,qm=(function(e){function t(){return Z8(this,t),Q8(this,t,arguments)}return t9(t,e),X8(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=At/2,s=At/6,l=At/3,c=n.inactive?a:n.color;if(n.type==="plainline")return O.default.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:At,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return O.default.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
|
|
21
|
+
${n.stack}`]})]}),a&&o.jsx(V,{onClick:a,variant:"secondary",hierarchy:"secondary",size:"sm",children:i})]})})})});k2.displayName="ErrorState";const DN=({groups:e,className:t,width:r,height:n})=>{const a=N.clsx("flex","items-center","justify-center","p-1 bg-brand-primary-main-special rounded-8 border border-brand-primary-accent-special gap-2"),[i,s]=P.useState(null),l=P.useRef(null);P.useEffect(()=>{const u=d=>{l.current&&!l.current.contains(d.target)&&s(null)};if(i)return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[i]);const c={width:r,height:n};return o.jsx("div",{style:c,className:N.clsx("flex items-center gap-4 w-fit",t),children:e.map((u,d)=>o.jsx("div",{className:a,children:u.map(f=>o.jsx("div",{className:"relative",children:f.type==="dropdown"?o.jsxs("div",{ref:l,className:"relative gap-4",children:[o.jsx(V,{variant:f.variant||"brand",hierarchy:f.hierarchy||"secondary",size:f.size||"sm",icons:f.label&&f.leadingIcon?"both":"trailing",leadingIcon:f.label?f.leadingIcon:void 0,trailingIcon:i===f.id?o.jsx(em,{}):o.jsx(Jp,{}),onClick:()=>s(i===f.id?null:f.id),disabled:f.disabled,style:{outline:"none",boxShadow:"none"},className:N.clsx(f.className,i===f.id&&"bg-brand-primary-accent-special"),children:f.label?f.label:O.default.isValidElement(f.leadingIcon)?O.default.cloneElement(f.leadingIcon,{size:18,color:"currentColor"}):f.leadingIcon}),i===f.id&&o.jsx(Wt,{floating:!0,size:f.dropMenuSize||"sm",selectedIds:f.selectedIds,items:f.items.map(h=>({id:h.id,title:h.label,leadingIcon:h.icon,showLeadingIcon:!!h.icon,showDescription:f.showDescription??!1,showTrailingIcon:f.showTrailingIcon??!1,showTrailingText:f.showTrailingText??!1,trailingText:h.trailingText,showTag:f.showTag??!1,showCheckbox:f.showCheckbox??!1,disabled:h.disabled,showDividerAfter:h.showDividerAfter,onClick:()=>{h.onClick(),s(null)},...h.destructive&&{customTitleColor:f.destructiveColor||"text-danger-em"}})),className:N.clsx("bottom-full mb-4",f.dropMenuClassName)})]}):o.jsx(V,{variant:f.variant||"brand",hierarchy:f.hierarchy||"secondary",size:f.size||"sm",icons:f.label?f.leadingIcon&&f.trailingIcon?"both":f.leadingIcon?"leading":f.trailingIcon?"trailing":void 0:"only",leadingIcon:f.leadingIcon,trailingIcon:f.trailingIcon,onClick:f.onClick,disabled:f.disabled,style:{outline:"none",boxShadow:"none"},className:N.clsx(f.className),children:f.label})},f.id))},d))})},T2=({icon:e,text:t,onClick:r,className:n=""})=>{const a=()=>{r&&r()};return o.jsxs("div",{className:N.clsx("w-full h-[60px]","bg-surface-bg","border border-surface-3","rounded-lg","flex flex-col items-center justify-center","cursor-grab",r&&"hover:bg-surface-1 transition-colors",n),onClick:a,children:[e&&o.jsx("div",{className:"flex items-center justify-center",children:o.jsx(ie,{size:20,color:"var(--low-em)",children:e})}),t&&o.jsx("span",{className:"font-inter font-semibold text-[10px] text-low-em mt-1",children:t})]})},im=e=>e?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[e]:"",om=e=>e?{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"}[e]:"",zN={sm:"h-13",md:"h-14",lg:"h-[60px]"},E2=({gap:e=4,justify:t,align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex",er(e),im(t),om(r),n),...i,children:a}),I2=({gap:e=4,justify:t="center",align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex h-full",er(e),im(t),om(r),n),...i,children:a}),M2=({gap:e=5,justify:t="end",align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex",er(e),im(t),om(r),n),...i,children:a}),BN={always:"flex",desktop:"hidden lg:flex",none:"hidden"},rl=e=>{const{className:t,bordered:r=!0,size:n="lg",logoVariant:a="with-text",showLogo:i="always",children:s,logoSectionGap:l=6,leftWidth:c,centerWidth:u,rightWidth:d,centerFullHeight:f=!0,showCenterOnMobile:h=!1,...p}=e,g=O.default.Children.toArray(s).find(v=>O.default.isValidElement(v)&&v.type===E2),x=O.default.Children.toArray(s).find(v=>O.default.isValidElement(v)&&v.type===I2),m=O.default.Children.toArray(s).find(v=>O.default.isValidElement(v)&&v.type===M2);return o.jsx("header",{className:ae.default("relative w-full bg-white",r&&"border-b border-surface-4",t),...p,children:o.jsxs("div",{className:ae.default("flex items-center",c!==void 0||u!==void 0||d!==void 0?"lg:px-0":"justify-between lg:px-container-desktop","px-container-mobile md:px-container-tablet",zN[n]),children:[o.jsxs("div",{className:ae.default("flex items-center",c!==void 0?"lg:pl-8!":"shrink-0",er(l)),style:c!==void 0?{width:`${c}%`}:void 0,children:[i!=="none"&&o.jsx("div",{className:ae.default("items-center",BN[i]),children:a==="with-text"?o.jsx(To,{height:25,className:"text-black"}):o.jsx(Eo,{height:25,className:"text-black"})}),g]}),x&&o.jsx("div",{className:ae.default(h?"flex justify-center":"hidden lg:flex justify-center",f&&"h-full",u!==void 0?"":"flex-1"),style:u!==void 0?{width:`${u}%`}:void 0,children:x}),o.jsx("div",{className:ae.default("flex items-center",d!==void 0?"justify-end lg:pr-8!":"shrink-0 ml-auto"),style:d!==void 0?{width:`${d}%`}:void 0,children:m})]})})};rl.LeftContent=E2;rl.Center=I2;rl.Right=M2;function FN(e,t=20){const r=100-2*t,n=e.left.filter(c=>c.open).reduce((c,u)=>c+u.width,0),a=e.right.filter(c=>c.open).reduce((c,u)=>c+u.width,0);if(n===0&&a===0)return{leftWidth:t,centerWidth:r,rightWidth:t};const i=n>0?n:t,s=a>0?a:t,l=100-i-s;return{leftWidth:i,centerWidth:l,rightWidth:s}}const $2=e=>e?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[e]:"",R2=e=>e?{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"}[e]:"",qN={sm:"h-13",md:"h-14",lg:"h-[60px]"},L2=({gap:e=4,justify:t,align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex",er(e),$2(t),R2(r),n),...i,children:a}),D2=({gap:e=4,justify:t="end",align:r="center",className:n,children:a,...i})=>o.jsx("div",{className:ae.default("flex",er(e),$2(t),R2(r),n),...i,children:a}),nl=e=>{const{className:t,bordered:r=!0,size:n="md",logoVariant:a="no-text",showLogo:i="always",children:s,logoSectionGap:l=6,leftWidth:c,rightWidth:u,...d}=e,f=O.default.Children.toArray(s).find(p=>O.default.isValidElement(p)&&p.type===L2),h=O.default.Children.toArray(s).find(p=>O.default.isValidElement(p)&&p.type===D2);return o.jsxs("footer",{className:ae.default("relative w-full bg-white",r&&"border-t border-surface-4",t),...d,children:[o.jsxs("div",{className:"flex flex-col gap-8 px-container-mobile py-8 lg:hidden",children:[i!=="none"&&o.jsx("div",{className:"flex items-center",children:a==="with-text"?o.jsx(To,{height:22,className:"text-black"}):o.jsx(Eo,{height:22,className:"text-black"})}),f&&o.jsx("div",{className:"flex items-center",children:f}),h&&o.jsx("div",{className:"flex items-center gap-4 px-0",children:h})]}),o.jsxs("div",{className:ae.default("hidden lg:flex items-center justify-between lg:px-container-desktop",qN[n]),children:[o.jsxs("div",{className:ae.default("flex items-center shrink-0",er(l)),style:c!==void 0?{width:`${c}%`}:void 0,children:[i!=="none"&&o.jsx("div",{className:"flex items-center",children:a==="with-text"?o.jsx(To,{height:22,className:"text-black"}):o.jsx(Eo,{height:22,className:"text-black"})}),f]}),o.jsx("div",{className:"flex items-center shrink-0 ml-auto",style:u!==void 0?{width:`${u}%`}:void 0,children:h})]})]})};nl.Left=L2;nl.Right=D2;nl.displayName="Footer";const WN={default:{container:"flex flex-col items-center justify-center",dropZone:"flex flex-col items-center justify-center space-y-2 transition-colors border-surface-3 border-[1px]",preview:"bg-surface-3 border-surface-4"}},HN={sm:{container:"w-48 h-18 p-2 gap-2 rounded-lg",dropZone:"w-full h-18 rounded-md p-2",preview:"w-full h-18 rounded-md",iconSize:24},md:{container:"w-72 h-44 p-4 gap-3 rounded-xl",dropZone:"w-64 h-40 rounded-xl p-4",preview:"w-64 h-40 rounded-xl",iconSize:42},lg:{container:"w-96 h-52 p-4 gap-5 rounded-xl",dropZone:"w-full h-48 rounded-xl p-4",preview:"w-full h-48 rounded-xl",iconSize:48}},Jx={container:"opacity-50 cursor-not-allowed pointer-events-none",dropZone:"cursor-not-allowed"},VN=({onImageSelected:e,variant:t="default",size:r="md",className:n,acceptedFileTypes:a="image/*",maxFileSize:i,disabled:s=!1,initialPreviewUrl:l})=>{const c=P.useRef(null),u=P.useRef(0),[d,f]=P.useState(!1),[h,p]=P.useState(l||null),[g,x]=P.useState(!1),[m,v]=P.useState(null),b=WN[t],w=HN[r],C=T=>{if(i&&T.size>i){const M=(i/1048576).toFixed(1);v(`File size must be less than ${M}MB`);return}if(!T.type.startsWith("image/")){v("Please select a valid image file");return}v(null),e(T),p(URL.createObjectURL(T))},y=T=>{T.target.files&&T.target.files[0]&&C(T.target.files[0])},j=T=>{T.preventDefault(),f(!1),T.dataTransfer.files&&T.dataTransfer.files[0]&&C(T.dataTransfer.files[0])},S=T=>{T.preventDefault(),s||f(!0)},A=T=>{T.preventDefault(),!s&&(u.current+=1,f(!0))},_=T=>{T.preventDefault(),u.current-=1,u.current<=0&&(f(!1),u.current=0)},I=T=>{T.stopPropagation(),c.current?.click()},k=()=>{s||x(!0)},E=()=>{x(!1)};return o.jsx("div",{className:N.clsx("flex flex-col",n),children:o.jsx("div",{className:N.clsx(b.container,w.container,s&&Jx.container),children:o.jsxs("div",{className:N.clsx(b.dropZone,w.dropZone,"cursor-pointer relative",s&&Jx.dropZone,d&&!h&&"bg-black/20"),onDrop:s?void 0:j,onDragOver:s?void 0:S,onDragEnter:s?void 0:A,onDragLeave:s?void 0:_,onClick:s?void 0:I,children:[h?o.jsxs("div",{className:N.clsx("absolute inset-0 overflow-hidden transition-all duration-200",w.preview),onMouseEnter:k,onMouseLeave:E,children:[o.jsx("img",{src:h,alt:"Preview",className:N.clsx("w-full h-full object-cover transition-all duration-200",g&&"brightness-90")}),g&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center transition-all duration-200",children:o.jsx(V,{onClick:I,variant:"neutral",size:"xs",disabled:s,children:"Change Image"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:N.clsx("flex items-center justify-center rounded-lg overflow-hidden",h&&"border border-surface-4 bg-surface-2",`w-[${w.iconSize*2}px] h-[${w.iconSize*2}px]`),children:o.jsx(Jj,{size:w.iconSize,className:N.clsx(s&&"text-disabled")})}),o.jsx("div",{className:N.clsx("text-center text-[11px] font-body font-medium leading-tight tracking-normal whitespace-normal break-words",s&&"text-disabled"),children:"Drag your image to start uploading"}),o.jsxs("div",{className:"my-2 w-full flex items-center justify-center",children:[o.jsx("span",{className:"border-t w-1/2 mx-2 border-low-em"}),o.jsx("span",{className:N.clsx("text-xs ml-2 mr-2",d?"text-med-em":"text-high-em",s&&"text-disabled"),children:"OR"}),o.jsx("span",{className:"border-t w-1/2 mx-2 border-low-em"})]})]}),!h&&o.jsx(V,{onClick:I,variant:"neutral",size:"xs",className:"mt-1",disabled:s,children:"Browse"}),o.jsx("input",{type:"file",accept:a,ref:c,className:"hidden",onChange:y,disabled:s})]})})})},UN={default:{background:"bg-gray-200",iconColor:"text-[var(--dark-700)]",titleColor:"text-[var(--dark-700)]",descriptionColor:"text-[var(--dark-700)]"},danger:{background:"bg-[var(--danger-50)]",iconColor:"text-[var(--danger-600)]",titleColor:"text-[var(--danger-600)]",descriptionColor:"text-[var(--danger-600)]"},success:{background:"bg-[var(--success-50)]",iconColor:"text-[var(--success-600)]",titleColor:"text-[var(--success-600)]",descriptionColor:"text-[var(--success-600)]"}},KN=({variant:e="default",title:t,description:r,icon:n,className:a})=>{const i=UN[e],l=(u=>{const d=u.match(/text-\[var\(--([^)]+)\)\]/);if(d)return`var(--${d[1]})`})(i.iconColor),c=()=>n&&O.default.isValidElement(n)?O.default.cloneElement(n,{color:l}):o.jsx(F.Warning2,{size:12,variant:"Outline",color:l});return o.jsxs("div",{className:N.clsx("flex flex-col gap-0.5 px-8 py-4 rounded-xl",i.background,a),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex-shrink-0",children:c()}),o.jsx("span",{className:N.clsx("text-[12px] font-semibold leading-tight",i.titleColor),children:t})]}),o.jsx("span",{className:N.clsx("text-[10px] font-medium leading-tight mt-2",i.descriptionColor),children:r})]})},sm=P.forwardRef(({onSearch:e,debounceMs:t=300,isLoading:r=!1,showClearButton:n=!0,errorMessage:a,suggestions:i=[],onSuggestionClick:s,placeholder:l="Search...",value:c,onChange:u,disabled:d=!1,id:f,name:h,autoComplete:p,maxLength:g,required:x,onBlur:m,onFocus:v,onInvalid:b,"aria-label":w="Search",className:C,size:y,...j},S)=>{const[A,_]=P.useState(""),[I,k]=P.useState(!1),[E,T]=P.useState(-1),M=P.useRef(null),R=c!==void 0,$=R?c:A,L=Y6($,t);P.useEffect(()=>{L&&e&&e(L)},[L,e]),P.useEffect(()=>{const X=re=>{M.current&&!M.current.contains(re.target)&&k(!1)};return document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}},[]);const q=X=>{const re=X.target.value;R||_(re),u&&u(X),re&&i.length>0?(k(!0),T(-1)):k(!1)},U=X=>{if(X.key==="Enter"){if(X.preventDefault(),I&&E>=0&&E<i.length){const re=i[E];W(re)}else e&&$&&e($);k(!1)}else X.key==="ArrowDown"?(X.preventDefault(),I&&i.length>0&&T(re=>re<i.length-1?re+1:0)):X.key==="ArrowUp"?(X.preventDefault(),I&&i.length>0&&T(re=>re>0?re-1:i.length-1)):X.key==="Escape"&&(k(!1),T(-1))},D=X=>{$&&i.length>0&&k(!0),v&&v(X)},B=()=>{const X={target:{value:""}};R||_(""),u&&u(X),k(!1),T(-1)},W=X=>{const re={target:{value:X}};R||_(X),u&&u(re),s&&s(X),k(!1),T(-1)},G=a?"danger":"default",Q=r?o.jsx(F.ArrowRotateRight,{color:"currentColor",size:16,className:"animate-spin text-primary-500"}):$&&n&&o.jsx("button",{type:"button",onClick:B,className:"text-gray-500 hover:text-gray-700 focus:outline-none transition-colors","aria-label":"Clear search",children:o.jsx(F.CloseCircle,{color:"currentColor",size:16})}),ne=i.filter(X=>X.toLowerCase().includes($.toLowerCase()));return o.jsxs("div",{className:"relative w-full",ref:M,children:[o.jsx(xe,{ref:S,className:N.clsx("w-full text-placeholder",C),value:$,onChange:q,onKeyDown:U,onFocus:D,onBlur:m,onInvalid:b,variant:G,hint:a,leadingIcon:o.jsx(F.SearchNormal1,{color:"currentColor",size:16}),trailingIcon:Q,placeholder:l,disabled:d,id:f,name:h,autoComplete:p,maxLength:g,required:x,"aria-label":w,...j}),I&&ne.length>0&&o.jsx("div",{className:"absolute z-10 w-full mt-1 bg-white border border-gray-200 rounded-md shadow-lg max-h-60 overflow-auto",role:"listbox",children:ne.map((X,re)=>o.jsx("div",{className:N.clsx("px-3 py-2 cursor-pointer text-sm",re===E?"bg-primary-100 text-primary-900":"text-gray-700 hover:bg-gray-100"),onClick:()=>W(X),role:"option","aria-selected":re===E,children:X},re))})]})});sm.displayName="InputSearch";const Sa=({children:e,content:t,side:r="top",sideOffset:n=5,showArrow:a=!0,className:i,maxWidth:s="max-w-xs",delayDuration:l,disabled:c=!1,primaryButton:u,secondaryButton:d,customBackground:f,customTextColor:h,customFontSize:p})=>{if(c)return e;const g=u||d,x={};return f&&(x.backgroundColor=f),h&&(x.color=h),p&&(x.fontSize=p),o.jsxs(jt.Root,{delayDuration:l,children:[o.jsx(jt.Trigger,{asChild:!0,children:e}),o.jsx(jt.Portal,{children:o.jsxs(jt.Content,{side:r,sideOffset:n,className:N.clsx("z-50 overflow-hidden rounded-6 p-6 shadow-e2",!f&&"bg-surface-bg",!h&&"text-high-em",!p&&"text-xs","font-medium",s,"data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade","data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade","data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade","data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade",i),style:Object.keys(x).length>0?x:void 0,children:[o.jsxs("div",{className:N.clsx(g&&"flex flex-col gap-8"),children:[o.jsx("div",{children:t}),g&&o.jsxs("div",{className:"flex gap-4 items-center w-full",children:[u&&o.jsx(V,{variant:u.variant||"neutral",hierarchy:u.hierarchy||"secondary",size:u.size||"xs",onClick:u.onClick,disabled:u.disabled,className:"flex-1",children:u.text}),d&&o.jsx(V,{variant:d.variant||"neutral",hierarchy:d.hierarchy||"secondary",size:d.size||"xs",onClick:d.onClick,disabled:d.disabled,className:"flex-1",children:d.text})]})]}),a&&o.jsx(jt.Arrow,{className:f?void 0:"fill-surface-bg",style:f?{fill:f}:void 0})]})})]})},GN=256,ZN=64,z2=P.createContext(null);function pn(){const e=P.useContext(z2);if(!e)throw new Error("useSidebar must be used within <Sidebar>");return e}const B2=P.forwardRef(({collapsed:e,defaultCollapsed:t=!1,onCollapsedChange:r,keyboardShortcut:n=!0,className:a,children:i,...s},l)=>{const[c,u]=P.useState(t),d=e??c,f=P.useCallback(p=>{e===void 0&&u(p),r?.(p)},[e,r]),h=P.useCallback(()=>f(!d),[d,f]);return P.useEffect(()=>{if(!n)return;const p=g=>{(g.metaKey||g.ctrlKey)&&g.key.toLowerCase()==="b"&&(g.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n,h]),o.jsx(z2.Provider,{value:{collapsed:d,toggle:h,setCollapsed:f},children:o.jsx(Aj.TooltipProvider,{delayDuration:300,children:o.jsx("aside",{ref:l,"data-state":d?"collapsed":"expanded",style:{width:d?ZN:GN},className:te.twMerge(N.clsx("flex h-full shrink-0 flex-col overflow-hidden border-r border-surface-2 bg-surface-bg transition-[width] duration-200 ease-linear",a)),...s,children:i})})})});B2.displayName="Sidebar";function YN({className:e,children:t,...r}){return o.jsx("div",{className:te.twMerge("flex flex-col gap-[8px] p-[12px]",e),...r,children:t})}const XN="[scrollbar-width:thin] [scrollbar-color:var(--surface-3)_transparent] [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-surface-3 [&::-webkit-scrollbar-thumb]:hover:bg-surface-4";function QN({className:e,children:t,...r}){return o.jsx("div",{className:te.twMerge(N.clsx("flex min-h-0 flex-1 flex-col gap-[4px] overflow-y-auto px-[12px]",XN,e)),...r,children:t})}function JN({className:e,children:t,...r}){return o.jsx("div",{className:te.twMerge("mt-auto flex flex-col gap-[8px] p-[12px]",e),...r,children:t})}function e4({placeholder:e="Buscar...",...t}){const{collapsed:r}=pn();return r?o.jsx(Sa,{content:"Buscar",side:"right",children:o.jsx(V,{"aria-label":"Buscar",variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:o.jsx(F.SearchNormal1,{color:"currentColor"}),className:"h-[40px] w-[40px] !rounded-[10px] focus:ring-0"})}):o.jsx(sm,{placeholder:e,...t})}function t4({className:e,children:t,...r}){return o.jsx("div",{className:te.twMerge("flex flex-col gap-[2px]",e),...r,children:t})}function r4({className:e,children:t,...r}){const{collapsed:n}=pn();return n?null:o.jsx("div",{className:te.twMerge("px-[10px] pt-[14px] pb-[4px] text-[11px] font-medium tracking-wide text-low-em uppercase",e),...r,children:t})}const F2=P.forwardRef(({icon:e,label:t,active:r,trailing:n,className:a,...i},s)=>{const{collapsed:l}=pn(),c=o.jsxs("button",{ref:s,"aria-label":t,"data-active":r||void 0,className:te.twMerge(N.clsx("flex h-[40px] w-full items-center gap-[12px] overflow-hidden rounded-[10px] px-[10px] text-sm transition-colors focus:outline-none",r?"bg-brand-secondary-main text-white-uniform":"text-med-em hover:bg-surface-1 hover:text-high-em",a)),...i,children:[o.jsx("span",{className:"flex h-[20px] w-[20px] shrink-0 items-center justify-center",children:e}),!l&&o.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t}),!l&&n]});return l?o.jsx(Sa,{content:t,side:"right",children:c}):c});F2.displayName="Sidebar.Item";function n4({children:e}){const{collapsed:t}=pn();return t?null:o.jsx(o.Fragment,{children:e})}function a4({name:e,email:t,avatarUrl:r,initials:n,onClick:a}){const{collapsed:i}=pn();return i?o.jsx(Sa,{content:e,side:"right",children:o.jsx("button",{"aria-label":e,onClick:a,className:"flex h-[40px] w-full items-center justify-center rounded-[10px] hover:bg-surface-1 focus:outline-none",children:o.jsx(Bt,{size:"sm",imageUrl:r,initials:n})})}):o.jsxs("button",{onClick:a,className:"flex w-full items-center gap-[10px] rounded-[10px] p-[8px] text-left hover:bg-surface-1 focus:outline-none",children:[o.jsx(Bt,{size:"sm",imageUrl:r,initials:n}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-medium text-high-em",children:e}),t&&o.jsx("span",{className:"block truncate text-xs text-low-em",children:t})]}),o.jsx(F.ArrowUp2,{size:16,color:"var(--low-em)",className:"shrink-0"})]})}function i4({className:e,...t}){const{collapsed:r,toggle:n}=pn();return o.jsx(V,{"aria-label":r?"Expandir menú":"Colapsar menú",variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:o.jsx(F.ArrowLeft2,{color:"currentColor",className:r?"rotate-180":void 0}),onClick:n,className:te.twMerge("h-[40px] w-[40px] shrink-0 !rounded-[10px] focus:ring-0",e),...t})}const o4=Object.assign(B2,{Header:YN,Content:QN,Footer:JN,Search:e4,Group:t4,GroupLabel:r4,Item:F2,Card:n4,User:a4,Trigger:i4}),q2=({options:e,onChange:t,label:r,addLabel:n="Add option",labelPlaceholder:a="Label",valuePlaceholder:i="value",emptyHint:s="No options yet.",disabled:l=!1,className:c})=>{const u=(h,p)=>t(e.map((g,x)=>x===h?{...g,...p}:g)),d=()=>t([...e,{value:"",label:""}]),f=h=>t(e.filter((p,g)=>g!==h));return o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-col gap-3",c)),children:[r&&o.jsx("span",{className:"text-xs font-semibold text-med-em",children:r}),e.length===0?o.jsx("p",{className:"text-xs text-med-em",children:s}):o.jsx("div",{className:"flex flex-col gap-2",children:e.map((h,p)=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex-1",children:o.jsx(xe,{size:"sm",value:h.label,placeholder:a,disabled:l,onChange:g=>u(p,{label:g.target.value}),onBlur:()=>{!h.value&&h.label&&u(p,{value:h.label})}})}),o.jsx("div",{className:"w-28",children:o.jsx(xe,{size:"sm",value:h.value,placeholder:i,disabled:l,onChange:g=>u(p,{value:g.target.value})})}),o.jsx(V,{variant:"neutral",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:o.jsx(F.Trash,{size:16}),"aria-label":"Remove option",disabled:l,onClick:()=>f(p)})]},p))}),o.jsx("div",{children:o.jsx(V,{variant:"neutral",hierarchy:"tertiary",size:"xs",icons:"leading",leadingIcon:o.jsx(F.Add,{}),disabled:l,onClick:d,children:n})})]})};q2.displayName="OptionsEditor";const s4=({icon:e,children:t,isActive:r=!1,className:n,customFontSize:a,customIconSize:i,...s})=>{const l={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},c=a&&l[a]||void 0,u=a&&!l[a]?{fontSize:a}:void 0,d=i||20;return o.jsxs("button",{className:N.clsx("border border-surface-3 flex w-full items-center px-6 h-14 text-left text-sm font-semibold transition-colors rounded-xl","focus:outline-none",{"gap-6 bg-surface-1 text-med-em":r,"gap-6 hover:bg-surface-3":!r},n),...s,children:[o.jsx("span",{style:{color:"var(--med-em)"},children:O.default.isValidElement(e)&&O.default.cloneElement(e,{size:d,color:"currentColor"})}),o.jsx("span",{className:N.clsx("text-med-em",c),style:u,children:t})]})},l4=o.jsx(Xp,{}),W2=({children:e,tooltipContent:t,icon:r,iconColor:n="text-disabled",labelClassName:a,className:i,customFontSize:s,customIconSize:l})=>{const c={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},u=s&&c[s]||void 0,d=s&&!c[s]?{fontSize:s}:void 0,f=l||16,h=r??l4;return o.jsxs("div",{className:N.clsx("flex items-center gap-2",i),children:[o.jsx("span",{className:N.clsx(a,u),style:d,children:e}),o.jsx(Sa,{content:t,children:o.jsx("button",{type:"button",className:N.clsx("bg-surface-bg flex items-center focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary-main rounded-full",n),children:O.default.cloneElement(h,{size:f,color:"currentColor"})})})]})},c4={sm:"max-w-[300px] w-full",md:"w-[32rem]",lg:"w-[40rem]"},lm={sm:{header:"py-4 px-8",body:"p-6",footer:"py-6 px-8"},md:{header:"py-4 px-8",body:"p-8",footer:"py-6 px-8"},lg:{header:"py-4 px-8",body:"p-10",footer:"py-6 px-8"}},H2=P.createContext(void 0),mn=()=>{const e=P.useContext(H2);if(!e)throw new Error("useModalContext must be used within a Modal provider");return e},al=({children:e,size:t="md",padding:r})=>{const[n,a]=P.useState(!1);return o.jsx(H2.Provider,{value:{open:n,setOpen:a,size:t,padding:r??t},children:e})};al.displayName="Modal";const il=({children:e})=>{const{setOpen:t}=mn();return O.default.cloneElement(e,{onClick:r=>{e.props.onClick&&e.props.onClick(r),t(!0)}})};il.displayName="ModalTrigger";const ol=P.forwardRef(({children:e,className:t,...r},n)=>{const{open:a,setOpen:i,size:s}=mn();return o.jsx(me.Transition,{appear:!0,show:a,as:P.Fragment,children:o.jsxs(me.Dialog,{as:"div",className:"relative z-50",onClose:()=>i(!1),children:[o.jsx(me.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:o.jsx("div",{className:"fixed inset-0 bg-black-uniform/30","aria-hidden":"true"})}),o.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:o.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:o.jsx(me.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:o.jsx(me.Dialog.Panel,{ref:n,className:N.clsx("bg-white rounded-2xl shadow-xl flex flex-col border border-surface-3 text-left transform transition-all",c4[s],t),...r,children:e})})})})]})})});ol.displayName="ModalContent";const sl=({children:e,onBack:t,disabled:r=!1,className:n})=>{const{setOpen:a,padding:i}=mn(),s=lm[i];return o.jsxs("header",{className:N.clsx("flex items-center border-b border-surface-3 shrink-0",s.header,n),children:[o.jsx(V,{variant:"neutral",hierarchy:"secondary",className:N.clsx("cursor-pointer",!t&&"invisible"),onClick:t,size:"sm",icons:"only",disabled:r||!t,leadingIcon:o.jsx(e2,{className:"text-high-em"})}),o.jsx("div",{className:"flex-1 flex justify-center items-center",children:e}),o.jsx(V,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(nt,{className:"text-high-em"}),onClick:()=>a(!1),disabled:r})]})};sl.displayName="ModalHeader";const ll=P.forwardRef(({className:e,...t},r)=>o.jsx(me.Dialog.Title,{ref:r,as:"h3",className:N.clsx("font-semibold text-base leading-tight text-center text-high-em",e),...t}));ll.displayName="ModalTitle";const cm=P.forwardRef(({className:e,...t},r)=>o.jsx(me.Dialog.Description,{ref:r,className:N.clsx("text-sm text-high-em",e),...t}));cm.displayName="ModalDescription";const cl=({children:e,className:t})=>{const{padding:r}=mn(),n=lm[r];return o.jsx("main",{className:N.clsx(n.body,"flex-1 overflow-y-auto",t),children:e})};cl.displayName="ModalBody";const ul=({className:e,children:t,...r})=>{const{padding:n}=mn(),a=lm[n];return o.jsx("footer",{className:N.clsx("flex items-center border-t border-surface-3 shrink-0",a.footer,e),...r,children:t})};ul.displayName="ModalFooter";const V2=({backButton:e,cancelButton:t,acceptButton:r,className:n})=>{const{setOpen:a,size:i}=mn(),s=i==="sm",l=(c,u)=>{c.onClick&&c.onClick(u),c.closeOnClick!==!1&&a(!1)};return o.jsxs(ul,{className:N.clsx(s?"flex-row gap-8":"justify-between",n),children:[e&&!s&&o.jsx(V,{variant:e.variant||"neutral",hierarchy:e.hierarchy||"secondary",size:e.size||"md",...e,onClick:c=>l(e,c),children:e.label}),!e&&!s&&o.jsx("div",{}),o.jsxs("div",{className:N.clsx("flex",s?"flex-row gap-8 w-full":"gap-8"),children:[t&&o.jsx(V,{variant:t.variant||"neutral",hierarchy:t.hierarchy||"primary",size:t.size||"md",...t,className:te.twMerge(s?"w-full":"w-32",t.className),onClick:c=>l(t,c),children:t.label}),r&&o.jsx(V,{variant:r.variant||"secondary",hierarchy:r.hierarchy||"primary",size:r.size||"md",...r,className:te.twMerge(s?"w-full":"w-32",r.className),onClick:c=>l(r,c),children:r.label})]})]})};V2.displayName="ModalFooterActions";const um=({children:e})=>{const{setOpen:t}=mn();return O.default.cloneElement(e,{onClick:r=>{e.props.onClick&&e.props.onClick(r),t(!1)}})};um.displayName="ModalClose";function u4(e,t){return e.split(t).reduce((r,n,a,i)=>(r.push(o.jsx("span",{className:"font-normal",children:n},`part-${a}`)),a<i.length-1&&r.push(o.jsx("span",{className:"font-bold",children:t},`bold-${a}`)),r),[])}function U2({trigger:e,title:t,description:r,confirmationText:n,confirmationLabel:a,confirmButtonLabel:i,cancelButtonLabel:s="Cancel",onConfirm:l,loading:c=!1}){const[u,d]=P.useState(""),f=u.trim()===n,h=()=>d(""),p=O.default.isValidElement(e)?e:null;return o.jsxs(al,{children:[p?o.jsx(il,{children:p}):null,o.jsxs(ol,{children:[o.jsx(sl,{disabled:c,children:o.jsx(ll,{children:t})}),o.jsxs(cl,{children:[o.jsx(cm,{children:r}),o.jsx("div",{className:"mt-6",children:o.jsx(xe,{label:u4(a,n),placeholder:n,value:u,onChange:g=>d(g.target.value),disabled:c,variant:"outlined",size:"md"})})]}),o.jsxs(ul,{className:"justify-end gap-3",children:[o.jsx(um,{children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"md",disabled:c,onClick:h,children:s})}),o.jsx(V,{variant:"danger",hierarchy:"primary",size:"md",onClick:()=>{f&&!c&&l()},disabled:!f,loading:c,children:i})]})]})]})}U2.displayName="DeleteConfirmationModal";const K2=P.createContext(void 0),dm=()=>{const e=P.useContext(K2);if(!e)throw new Error("Drawer subcomponents must be used within <Drawer>");return e},d4={sm:"w-64",md:"w-72",lg:"w-80",xl:"w-96"},eg={right:"translate-x-full",left:"-translate-x-full"},f4={right:"right-0",left:"left-0"},G2=({open:e,onOpenChange:t,side:r="right",children:n})=>o.jsx(K2.Provider,{value:{onOpenChange:t,side:r},children:o.jsx(me.Transition,{show:e,as:P.Fragment,children:o.jsx(me.Dialog,{as:"div",className:"relative z-50",onClose:()=>t(!1),children:n})})});G2.displayName="Drawer";const Z2=({className:e})=>{const{onOpenChange:t}=dm();return o.jsx(me.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:o.jsx("div",{className:te.twMerge(N.clsx("fixed inset-0 bg-black-uniform/30",e)),"aria-hidden":"true",onClick:()=>t(!1)})})};Z2.displayName="DrawerOverlay";const Y2=({width:e="md",className:t,children:r})=>{const{side:n}=dm();return o.jsx(me.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:eg[n],enterTo:"translate-x-0",leave:"ease-in duration-200",leaveFrom:"translate-x-0",leaveTo:eg[n],children:o.jsx(me.Dialog.Panel,{className:te.twMerge(N.clsx("fixed top-0 bottom-0 h-full flex flex-col bg-white shadow-e2 transform",d4[e],f4[n],t)),children:r})})};Y2.displayName="DrawerPanel";const X2=({children:e,className:t,height:r=60,title:n})=>o.jsxs("div",{style:{height:r},className:te.twMerge(N.clsx("flex items-center justify-between shrink-0 px-8 border-b border-surface-3",t)),children:[n&&o.jsx("span",{className:"text-sm font-semibold text-high-em",children:n}),e]});X2.displayName="DrawerHeader";const Q2=({children:e,className:t})=>o.jsx("div",{className:te.twMerge(N.clsx("flex-1",t)),children:e});Q2.displayName="DrawerContent";const J2=({children:e,className:t})=>e?o.jsx("div",{className:te.twMerge(N.clsx("shrink-0 border-t border-surface-3 py-6 px-8",t)),children:e}):null;J2.displayName="DrawerFooter";const e3=({children:e,size:t="sm"})=>{const{onOpenChange:r}=dm();return e?O.default.cloneElement(e,{onClick:n=>{e.props.onClick?.(n),r(!1)}}):o.jsx(V,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:t,icons:"only",leadingIcon:o.jsx(nt,{className:"text-high-em"}),onClick:()=>r(!1)})};e3.displayName="DrawerClose";const h4=Object.assign(G2,{Overlay:Z2,Panel:Y2,Header:X2,Content:Q2,Footer:J2,Close:e3});function t3({planName:e,price:t,billingPeriod:r="month",priceContent:n,description:a,ctaLabel:i="Switch Plan",onCtaClick:s,features:l,featuresTitle:c="Features",featuresSubtitle:u="Everything in our plan includes",isRecommended:d=!1,recommendedLabel:f="Recommended",recommendedIcon:h,loading:p=!1,ctaVariant:g="neutral",ctaHierarchy:x="primary",sectionColor:m="bg-white",sectionTextColor:v,className:b}){return o.jsxs("div",{className:te.twMerge(N.clsx("relative w-full flex flex-col",b)),children:[d&&o.jsx("div",{className:"absolute -top-9 left-1/2 -translate-x-1/2 z-10 whitespace-nowrap",children:o.jsx(Ge,{size:"lg",theme:"surface",variant:"outlined",children:o.jsx(ft,{icon:h,label:f,iconSize:14,gap:3,iconColorClass:"text-med-em",labelColorClass:"text-med-em text-xs font-semibold"})})}),o.jsxs("div",{className:"bg-surface-2 border border-surface-3 rounded-8 overflow-hidden w-full flex flex-col flex-1",children:[o.jsxs("div",{className:N.clsx("flex items-start justify-between p-8 border-b border-surface-3",m),children:[o.jsx("span",{className:N.clsx("text-xl font-semibold",v??"text-high-em"),children:e}),o.jsx("div",{className:"flex items-baseline gap-4",children:n??o.jsxs(o.Fragment,{children:[o.jsx("span",{className:N.clsx("text-2xl font-bold leading-none",v??"text-high-em"),children:t}),r&&o.jsxs("span",{className:N.clsx("text-sm",v??"text-high-em"),children:["/ ",r]})]})})]}),o.jsxs("div",{className:N.clsx("flex flex-col gap-8 p-8 border-b border-surface-3",m),children:[o.jsx("p",{className:N.clsx("text-sm leading-relaxed",v??"text-high-em"),children:a}),o.jsx(V,{variant:g,hierarchy:x,size:"md",className:"w-full",onClick:s,loading:p,children:i})]}),o.jsxs("div",{className:"flex flex-col gap-8 p-8 bg-surface-bg flex-1",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xl font-bold text-high-em",children:c}),o.jsx("p",{className:"text-sm text-high-em",children:u})]}),o.jsx("ul",{className:"flex flex-col gap-8",children:l.map(w=>o.jsxs("li",{className:"flex items-center gap-8",children:[o.jsx("span",{className:"text-low-em shrink-0",children:o.jsx(F.TickCircle,{size:14,color:"currentColor"})}),o.jsx("span",{className:"text-sm text-low-em",children:w})]},w))})]})]})]})}t3.displayName="PlanPricingCard";const dl=({type:e="default",size:t="lg",variant:r="primary",children:n,className:a})=>{const i="inline-flex items-center justify-center transition-colors duration-200",s={lg:"w-[80px] h-[80px] rounded-[16px]",md:"w-[56px] h-[56px] rounded-[16px]",sm:"w-[40px] h-[40px] rounded-[8px]"},l={lg:32,md:24,sm:20},c={default:{primary:"bg-surface-4 text-white-uniform",secondary:"bg-surface-1 text-high-em",tertiary:"bg-transparent border-[2px] border-surface-3 text-high-em",quaternary:"bg-transparent text-high-em"},brand:{primary:"bg-brand-primary-main text-white-uniform",secondary:"bg-surface-3 text-primary-accent-3",tertiary:"bg-transparent border-[2px] border-surface-4 text-primary-accent-3",quaternary:"bg-transparent text-primary-accent-3"},danger:{primary:"bg-danger-main text-white-uniform",secondary:"bg-danger-accent-1 text-danger-main",tertiary:"bg-transparent border-[2px] border-danger-accent-2 text-danger-main",quaternary:"bg-transparent text-danger-main"},success:{primary:"bg-success-main text-white-uniform",secondary:"bg-success-accent-1 text-success-main",tertiary:"bg-transparent border-[2px] border-success-accent-2 text-success-main",quaternary:"bg-transparent text-success-main"}},u=O.default.isValidElement(n)?O.default.cloneElement(n,{size:l[t],color:"currentColor"}):null;return o.jsx("div",{className:N.clsx(i,s[t],c[e][r],a),children:u})},r3=O.default.forwardRef(({title:e,companyImage:t,badgeStatus:r,badgeStatusState:n,onButtonAction:a,actionButtonRef:i,stackLabel:s,powerLabel:l,calendarLabel:c,link1Label:u,link1Href:d,link2Label:f,link2Href:h,link2Status:p,onCardClick:g,className:x,...m},v)=>{const b=N.clsx("flex flex-col overflow-hidden transition-all duration-200 w-full min-w-0 p-4 gap-3 border rounded-2xl border-surface-3","bg-white","p-6 md:p-8 gap-6 md:gap-8"),w=te.twMerge(N.clsx(b,x)),C={success:"success",warning:"warning",danger:"danger",disabled:"disabled"};return o.jsxs("div",{ref:v,className:w,...m,children:[o.jsxs("div",{className:"flex-row flex justify-between",children:[o.jsx("div",{className:"flex",children:o.jsx(ie,{className:"!rounded-4",size:"2xl",imageUrl:t})}),o.jsx("div",{className:"flex w-fit",children:o.jsx(V,{ref:i,size:"sm",leadingIcon:o.jsx(ie,{children:o.jsx(o2,{})}),icons:"only",hierarchy:"secondary",variant:"neutral",onClick:a})})]}),o.jsxs("div",{className:"flex-col flex justify-between gap-4",children:[o.jsxs("div",{className:"flex gap-5 items-center",children:[o.jsx("span",{className:"text-high-em font-semibold",children:e}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsx(Ge,{variant:"simple",theme:C[n],children:r})})]}),o.jsxs("div",{className:"flex flex-row gap-4",children:[o.jsx(ft,{label:s,labelSize:"sm",iconSize:"sm",gap:4,icon:o.jsx(s2,{})}),o.jsx(ft,{label:l,labelSize:"sm",iconSize:"sm",gap:4,icon:o.jsx(l2,{})}),o.jsx(ft,{label:c,labelSize:"sm",iconSize:"sm",gap:4,icon:o.jsx(c2,{})})]})]}),o.jsx(he,{direction:"horizontal"}),o.jsxs("div",{className:"flex-row flex justify-between gap-8",children:[o.jsxs("div",{className:"flex w-1/2 flex-col gap-2",children:[o.jsx("span",{className:"text-sm text-low-em",children:"Subdomain"}),o.jsx("div",{className:"flex-row flex center items-center gap-4",children:o.jsx($r,{href:d,className:"w-fit",variant:"neutral",children:u})})]}),o.jsxs("div",{className:"flex w-1/2 flex-col gap-2",children:[o.jsx("span",{className:"text-sm text-low-em",children:"Database"}),o.jsxs("div",{className:"flex-row flex center items-center gap-4",children:[o.jsx(Ge,{variant:"status",statusState:p,statusSize:"xs"}),o.jsx($r,{href:h,trailingIcon:o.jsx(i2,{}),className:"w-fit",variant:"neutral",children:f})]})]})]})]})});r3.displayName="ProjectCard";const gh=({progress:e,description:t,className:r,...n})=>{const a=Math.min(100,Math.max(0,e)),i="w-full bg-surface-3 rounded-full h-1 relative overflow-hidden flex-1",s=N.clsx("size-[18px] rounded-full transition-all duration-300 grow-0 shrink-0 border-black",e>1?"border-5":e===0?"border-2 border-surface-3":"border-5"),l=N.clsx(i,r);return o.jsxs("div",{className:"flex flex-col gap-y-2 w-full",children:[o.jsxs("div",{className:"flex items-center w-full gap-x-5",children:[o.jsx("div",{className:s}),o.jsx("div",{className:l,role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress: ${a}%`,...n,children:o.jsx("div",{className:"h-full rounded-full transition-all duration-300 ease-out bg-black",style:{width:`${a}%`}})})]}),t&&o.jsx("p",{className:"mt-2 font-medium text-sm text-left text-low-em",children:t})]})},Ql={xs:{size:144,container:"size-[144px]",strokeWidth:12,labelFontSize:"text-xs",fontSize:"text-[24px]",lineHeight:"leading-[36px]",halfCircle:"w-[144px] h-[80px]",labelSpace:"",halfCircleLabelPosition:"top-2/5"},sm:{size:180,container:"size-[180px]",strokeWidth:14,labelFontSize:"text-xs",fontSize:"text-[28px]",lineHeight:"leading-[42px]",halfCircle:"w-[180px] h-[95px]",labelSpace:"",halfCircleLabelPosition:"top-2/5"},md:{size:240,container:"size-[240px]",strokeWidth:16,labelFontSize:"text-sm",fontSize:"text-[38px]",lineHeight:"leading-[62px]",halfCircle:"w-[240px] h-[131px]",labelSpace:"",halfCircleLabelPosition:"top-2/5"},lg:{size:280,container:"size-[280px]",strokeWidth:18,labelFontSize:"text-md",fontSize:"text-[48px]",lineHeight:"leading-[72px]",halfCircle:"w-[280px] h-[154px]",labelSpace:"",halfCircleLabelPosition:"top-2/5"}},p4={primary:{track:"text-surface-3",fill:"text-black",label:"text-low-em text-center",progressLabel:"text-high-em font-space-grotesk font-semibold",opacity:1}},qn=({progress:e,size:t="md",variant:r="primary",shape:n="circle",showLabel:a=!0,label:i,className:s,ariaLabel:l,id:c,...u})=>{const d=Math.min(100,Math.max(0,e)),f=O.default.useId(),h=c||`progress-circle-${f}`,p=i?`${h}-label`:void 0,g=Ql[t],x=p4[r],m=()=>l||(i?`Progreso: ${i}, ${d}% completado`:`Progreso: ${d}% completado`),v=g.size,b=(v-g.strokeWidth)/2,w=2*Math.PI*b,C=w-d/100*w,y=()=>n==="circle"?Ql[t].container:Ql[t].halfCircle,j=()=>o.jsxs("svg",{width:v,height:v,className:"transform -rotate-90",role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-label":m(),"aria-labelledby":p,"aria-live":"polite","aria-atomic":"true",children:[o.jsx("circle",{cx:v/2,cy:v/2,r:b,stroke:"currentColor",strokeWidth:g.strokeWidth,fill:"none",className:x.track,opacity:x.opacity}),o.jsx("circle",{cx:v/2,cy:v/2,r:b,stroke:"currentColor",strokeWidth:g.strokeWidth,fill:"none",className:x.fill,strokeDasharray:w,strokeDashoffset:C,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),S=()=>{const A=g.strokeWidth,_=v,I=v/2+A,k=(v-g.strokeWidth)/2,E=A/2,T=I-A/2,M=v-A/2,R=I-A/2,$=Math.PI*k*2,L=$-d/100*$;return o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:`0 0 ${_} ${I}`,className:"size-full",fill:"none",role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,"aria-label":m(),"aria-labelledby":p,"aria-live":"polite","aria-atomic":"true",children:[o.jsx("path",{d:`M${E},${T} A${k},${k} 0 1,1 ${M},${R}`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:g.strokeWidth,stroke:"currentColor",className:x.track,opacity:x.opacity}),o.jsx("path",{d:`M${E},${T} A${k},${k} 0 1,1 ${M},${R}`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:g.strokeWidth,stroke:"currentColor",className:x.fill,strokeDasharray:$,strokeDashoffset:L,style:{transition:"stroke-dashoffset 0.3s ease-in-out"}})]})};return o.jsxs("div",{className:N.clsx("relative inline-flex items-center justify-center",y(),s),id:h,...u,children:[n==="circle"?j():S(),a&&n==="circle"&&o.jsxs("div",{className:N.clsx("absolute inset-0 flex flex-col items-center justify-center","leading-none"),children:[i&&o.jsx("span",{id:p,className:N.clsx(g.labelFontSize,x.label),children:i}),o.jsx("span",{className:N.clsx(g.fontSize,g.lineHeight,x.progressLabel),style:{fontFamily:"var(--font-space-grotesk)"},children:`${d}%`})]}),a&&n==="half-circle"&&o.jsxs("div",{className:N.clsx("absolute left-0 right-0 flex flex-col items-center justify-center",i?g.halfCircleLabelPosition:"top-1/2",i&&g.labelSpace),children:[i&&o.jsx("span",{id:p,className:N.clsx(g.labelFontSize,x.label),children:i}),o.jsx("span",{className:N.clsx(g.fontSize,g.lineHeight,x.progressLabel),style:{fontFamily:"var(--font-space-grotesk)"},children:`${d}%`})]})]})},m4=({currentStep:e,totalSteps:t,currentStepProgress:r=0,stepDescriptions:n=[],title:a,subtitle:i,className:s,collapsed:l,onToggleCollapse:c,onClose:u,onlyProgressCircle:d=!1})=>{const[f,h]=O.default.useState(l??!0);O.default.useEffect(()=>{typeof l=="boolean"&&h(l)},[l]);const p=()=>{const m=!f;h(m),c&&c(m)},g=O.default.useMemo(()=>Array.from({length:t},(m,v)=>{const b=v+1;let w;return b<e?w=100:w=0,{progress:w,description:n[v]||`Step ${b}`}}),[e,t,n]),x=t>0?Math.round((e-1)/t*100+r/t):0;return d?o.jsx(qn,{progress:x,size:"xs",showLabel:!0,ariaLabel:`Overall progress: ${x}%`,className:s}):o.jsxs(pt.motion.div,{className:N.clsx("bg-white overflow-hidden",s),role:"region","aria-label":`Progress tracker${f?"":" - expanded"}`,layout:!0,animate:{height:f?61:130},transition:{duration:.3,ease:"easeInOut"},children:[o.jsxs("div",{className:"flex items-center justify-between px-6 py-2 gap-3",children:[o.jsx(pt.motion.div,{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:p,layout:!0,children:o.jsx(pt.AnimatePresence,{mode:"wait",children:f?o.jsx(pt.motion.div,{className:"flex items-center gap-3 flex-1 min-w-0",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:g.map((m,v)=>o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(gh,{progress:m.progress})},v))},"collapsed-content"):o.jsxs(pt.motion.div,{className:"flex flex-col flex-1",initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.2},children:[a&&o.jsx("h3",{className:"text-[16px] text-dark-100 font-semibold",children:a}),i&&o.jsx("p",{className:"text-sm text-dark-700",children:i})]},"expanded-title")})}),o.jsxs("div",{className:"flex items-center gap-9 py-4 px-6",children:[o.jsx(qn,{progress:x,size:"xs",showLabel:!0,ariaLabel:`Overall progress: ${x}%`}),o.jsx(pt.motion.button,{className:"rounded-full cursor-pointer flex items-center justify-center",onClick:p,whileHover:{scale:1.1},whileTap:{scale:.9},transition:{duration:.1},"aria-label":f?"Expand":"Collapse",children:o.jsx(pt.motion.div,{style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},animate:{rotate:f?0:180},transition:{duration:.2},children:o.jsx(F.ArrowDown2,{size:16,color:"black"})})}),o.jsx(pt.motion.button,{className:"rounded-full cursor-pointer flex items-center justify-center w-6 h-6",onClick:u,whileHover:{scale:1.1},whileTap:{scale:.9},transition:{duration:.1},"aria-label":"Close",children:o.jsx(nt,{size:16})})]})]}),o.jsx(pt.AnimatePresence,{children:!f&&o.jsx(pt.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"overflow-hidden",children:o.jsx("div",{className:"pt-2 pb-4 px-8",children:o.jsx(pt.motion.div,{className:"flex gap-3 w-full",initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.2},children:g.map((m,v)=>{const w=v+1===e;return o.jsx(pt.motion.div,{className:"w-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15+v*.05,duration:.2,ease:"easeOut"},children:o.jsxs("div",{children:[o.jsx(gh,{progress:m.progress}),(m.progress!==0||w)&&m.description&&o.jsx("div",{className:"text-sm text-[#2F343C] mt-3 font-semibold",children:m.description}),m.progress===0&&!w&&m.description&&o.jsx("div",{className:"text-sm text-[#5A606B] mt-3 font-semibold",children:m.description})]})},v)})})})})})]})},x4=({actions:e,borderless:t=!1,loading:r=!1,className:n})=>r?o.jsx("div",{className:te.twMerge(N.clsx("flex flex-col bg-surface-1",!t&&"border border-surface-3 rounded-lg overflow-hidden",n)),children:o.jsx("div",{className:"flex flex-col gap-6 p-6",children:Array.from({length:4}).map((a,i)=>o.jsx("div",{className:"h-36 rounded-lg bg-surface-2 animate-pulse"},i))})}):o.jsx("div",{className:te.twMerge(N.clsx("flex flex-col bg-surface-1",!t&&"border border-surface-3 rounded-lg overflow-hidden",n)),children:o.jsx("div",{className:"flex flex-col gap-6 p-6",children:e.map(a=>o.jsx(V,{variant:"neutral",hierarchy:"tertiary",size:"md",icons:a.icon?"leading":"none",leadingIcon:a.icon,onClick:a.onClick,disabled:a.disabled,className:"w-full justify-start",children:a.label},a.id))})}),g4={small:{wrapper:"w-[16px] h-[16px]",dot:"w-[6px] h-[6px]"},medium:{wrapper:"w-[20px] h-[20px]",dot:"w-[8px] h-[8px]"},large:{wrapper:"w-[24px] h-[24px]",dot:"w-[10px] h-[10px]"}},An={unchecked:"bg-transparent border-low-em hover:bg-surface-1",checked:"bg-transparent border-1 border-low-em hover:bg-surface-1",focus:"peer-focus-visible:ring-1 peer-focus-visible:ring-low-em",disabled:{unchecked:"bg-surface-3 border-surface-4",checked:"bg-surface-3 border-surface-4",dot:"bg-surface-4"}},v4=({size:e="medium",checked:t=!1,disabled:r=!1,className:n,...a})=>{const i=g4[e];return o.jsxs("label",{className:N.clsx("inline-flex items-center",r?"cursor-not-allowed":"cursor-pointer",n),children:[o.jsx("input",{type:"radio",checked:t,disabled:r,className:"sr-only peer",...a}),o.jsx("div",{className:N.clsx(i.wrapper,"rounded-full border transition-colors duration-200",t&&"inline-flex items-center justify-center",An.focus,r?t?An.disabled.checked:An.disabled.unchecked:t?An.checked:An.unchecked,!r&&"peer-hover:border-low-em"),children:t&&o.jsx("div",{className:N.clsx(i.dot,"rounded-full",r?An.disabled.dot:"bg-black")})})]})},y4={sm:{card:"gap-3 p-4",iconBox:"size-10",iconRadius:"rounded-4",icon:14,trailing:16},md:{card:"gap-4 p-5",iconBox:"size-12",iconRadius:"rounded-5",icon:20,trailing:18},lg:{card:"gap-4 p-6",iconBox:"size-14",iconRadius:"rounded-6",icon:26,trailing:22}},n3=O.default.forwardRef(({icon:e,title:t,description:r,selected:n=!1,size:a="md",trailingIcon:i,className:s,...l},c)=>{const u="group flex w-full items-center rounded-8 border text-left transition-all duration-200 focus:outline-none",d=n?"border-brand-secondary-main bg-surface-1 ring-1 ring-brand-secondary-main":"border-surface-3 bg-surface-1 hover:bg-surface-2",f=n?"bg-brand-secondary-main text-white-uniform":"bg-surface-3 text-low-em",h=y4[a],p=(g,x)=>O.default.isValidElement(g)?O.default.cloneElement(g,{size:x,color:"currentColor"}):g;return o.jsxs("button",{ref:c,type:"button",role:"radio","aria-checked":n,className:te.twMerge(N.clsx(u,h.card,d,s)),...l,children:[o.jsx("span",{className:N.clsx("flex shrink-0 items-center justify-center",h.iconBox,h.iconRadius,f),children:p(e,h.icon)}),o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("span",{className:"text-sm font-medium text-high-em",children:t}),r&&o.jsx("span",{className:"text-xs text-low-em",children:r})]}),n&&i&&o.jsx("span",{className:"shrink-0 text-brand-secondary-main",children:p(i,h.trailing)})]})});n3.displayName="SelectableCard";const b4={success:"bg-success-main",warning:"bg-warning-main",error:"bg-danger-main",info:"bg-info-em"},tg={brand:{done:"border-brand-secondary-main bg-brand-secondary-main text-white",current:"border-brand-secondary-main text-brand-secondary-main",line:"bg-brand-secondary-main"},success:{done:"border-success-main bg-success-main text-white",current:"border-success-main text-success-main",line:"bg-success-main"},warning:{done:"border-warning-main bg-warning-main text-white",current:"border-warning-main text-warning-main",line:"bg-warning-main"}},w4={brand:{done:"bg-brand-secondary-main",current:"bg-brand-secondary-accent-3",pending:"bg-surface-3"},success:{done:"bg-success-main",current:"bg-success-accent-3",pending:"bg-surface-3"},warning:{done:"bg-warning-main",current:"bg-warning-accent-3",pending:"bg-surface-3"}},a3=({steps:e,current:t,variant:r="numbered",lineStyle:n="solid",colorVariant:a,indicatorGap:i,stepGap:s,itemClassName:l,className:c})=>{const u=a?tg[a]:tg.brand,d=a?w4[a]:null;return o.jsx("ol",{className:te.twMerge("flex flex-col",c),children:e.map((f,h)=>{const p=h<t?"done":h===t?"current":"pending",g=h===e.length-1,x=r==="dot",m=n==="dashed",v=x?d?d[p]:f.status?b4[f.status]:"bg-surface-3":null;return o.jsxs("li",{className:te.twMerge("flex",i??"gap-3",l),children:[o.jsxs("div",{className:"flex flex-col items-center self-stretch",children:[x?o.jsx("span",{className:N.clsx("size-2.5 shrink-0 rounded-full mt-1.5",v)}):o.jsx("span",{className:N.clsx("flex size-12 shrink-0 items-center justify-center rounded-full border text-xs font-medium",p==="done"&&u.done,p==="current"&&u.current,p==="pending"&&"border-surface-3 text-low-em"),children:String(h+1).padStart(2,"0")}),!g&&(m?o.jsx("span",{className:"w-0 border-l-2 border-dashed border-surface-3 grow my-1"}):o.jsx("span",{className:N.clsx("my-1 w-px grow",h<t?u.line:"bg-surface-3")}))]}),o.jsxs("div",{className:N.clsx(x?"pt-0":"pt-3",!g&&(s??(x?"pb-4":"pb-6"))),children:[o.jsx("p",{className:N.clsx("text-sm",x?"text-med-em":N.clsx(p==="current"&&"font-medium text-high-em",p==="done"&&"text-med-em",p==="pending"&&"text-low-em")),children:f.title}),f.caption&&o.jsx("p",{className:"text-xs text-low-em mt-0.5",children:f.caption})]})]},`${f.title}-${h}`)})})},j4={xs:{wrapper:"h-10 rounded-4",button:"px-4 text-[10px] rounded-3 h-9",activeButton:"rounded-3 px-4",gap:"gap-x-[5px]"},sm:{wrapper:"h-13 rounded-6 px-2",button:"px-4 text-xs rounded-4 h-12",activeButton:"rounded-4",gap:"gap-x-[5px]"},md:{wrapper:"h-14 rounded-6 px-2",button:"px-6 text-sm rounded-6 h-13",activeButton:"rounded-3",gap:"gap-x-[5px]"},lg:{wrapper:"h-[56px] rounded-8 px-2",button:"px-8 text-base rounded-6 h-14",activeButton:"rounded-4",gap:"gap-x-3"},"ai-chat":{wrapper:"h-[42px] rounded-6 px-[3px]",button:"px-4 text-sm rounded-5 h-[34px]",activeButton:"rounded-5 px-4",gap:"gap-x-[5px]"}},fl=({items:e,value:t,onChange:r,size:n="md",variant:a="default",itemGap:i,withBorder:s=!1,className:l})=>{const c=j4[n],u=a==="surface";return o.jsx("div",{className:N.clsx("inline-flex items-center p-1",u?"bg-surface-bg":"bg-surface-2",c.wrapper,i??c.gap,s&&"border border-surface-4",l),children:e.map(d=>{const f=d.id===t;return o.jsx("button",{onClick:()=>r(d.id),className:N.clsx("font-semibold transition-colors duration-200",c.button,f?N.clsx(u?"bg-surface-2":"bg-surface-bg","shadow-sm text-high-em",c.activeButton):"text-low-em hover:bg-surface-3 hover:text-med-em"),children:d.label},d.id)})})},C4=[{id:"all",label:"All"},{id:"success",label:"Success"},{id:"warning",label:"Warnings"},{id:"error",label:"Errors"}],i3=P.forwardRef(({entries:e,showSwitcher:t=!0,filterItems:r=C4,switcherSize:n="sm",switcherVariant:a="surface",switcherItemGap:i="gap-x-8",variant:s="dot",lineStyle:l="dashed",colorVariant:c,stepGap:u="pb-8",indicatorGap:d="gap-8",itemPadding:f="py-2",current:h,bodyPadding:p="p-8",className:g,...x},m)=>{const[v,b]=P.useState(r[0]?.id??"all"),C=(v==="all"?e:e.filter(y=>y.status===v)).map(y=>({title:y.description,caption:y.timestamp,status:y.status}));return o.jsxs("div",{ref:m,className:te.twMerge("bg-white border border-surface-3 w-full max-w-sm flex flex-col overflow-hidden",g),...x,children:[t&&o.jsx("div",{className:"bg-surface-bg px-4 py-2 border-b border-surface-2 overflow-x-auto ds-scrollbar shrink-0",children:o.jsx(fl,{items:r,value:v,onChange:y=>b(String(y)),size:n,variant:a,itemGap:i})}),o.jsx("div",{className:te.twMerge("flex-1 min-h-0 overflow-y-auto ds-scrollbar",p),children:C.length===0?o.jsx("p",{className:"text-sm text-low-em py-8 text-center",children:"No activity found"}):o.jsx(a3,{steps:C,current:h??C.length,variant:s,lineStyle:l,colorVariant:c,stepGap:u,indicatorGap:d,itemClassName:f})})]})});i3.displayName="ActivityFeed";const o3=O.default.createContext(null),tr=()=>{const e=O.default.useContext(o3);if(!e)throw new Error("useTableContext must be used within a TableProvider");return e},s3=({children:e,value:t})=>O.default.createElement(o3.Provider,{value:t},e),S4=48,O4=({columns:e,data:t,tableLayout:r={},children:n,className:a,...i})=>{const s=O.default.useRef(null),[l,c]=O.default.useState(()=>!i.sortBy||!i.sortDirection?[]:[{id:i.sortBy,desc:i.sortDirection==="desc"}]),[u,d]=O.default.useState(()=>{const y={};return i.selectedRows?.forEach(j=>{y[String(j)]=!0}),y}),[f,h]=O.default.useState(i.searchValue||""),[p,g]=O.default.useState(()=>({pageIndex:(i.currentPage||1)-1,pageSize:i.itemsPerPage||10})),[x,m]=O.default.useState({});O.default.useEffect(()=>{if(i.sortBy&&i.sortDirection){const y=[{id:i.sortBy,desc:i.sortDirection==="desc"}];JSON.stringify(y)!==JSON.stringify(l)&&c(y)}},[i.sortBy,i.sortDirection,l]),O.default.useEffect(()=>{if(i.selectedRows){const y={};i.selectedRows.forEach(j=>{y[String(j)]=!0}),JSON.stringify(y)!==JSON.stringify(u)&&d(y)}},[i.selectedRows,u]),O.default.useEffect(()=>{i.searchValue!==f&&h(i.searchValue||"")},[i.searchValue,f]),O.default.useEffect(()=>{if(i.currentPage){const y=i.currentPage-1;y!==p.pageIndex&&g(j=>({...j,pageIndex:y}))}},[i.currentPage,p.pageIndex]);const v=O.default.useMemo(()=>{const y=e.map(j=>{const S=j.id==="__select"||j.type==="select",A=i.selectColumnSize??S4,_={id:j.id,header:j.header,accessorKey:j.id,enableSorting:j.sortable??!1,enableColumnFilter:j.filterable??!1,size:S?A:j.size,minSize:S?A:j.minSize,maxSize:S?A:j.maxSize,enableResizing:!0,meta:{align:j.align,hasExplicitSize:S||j.size!==void 0}};return j.component?_.cell=({row:I,getValue:k})=>{const E=j.component,T=j.accessor?j.accessor(I.original):k();return O.default.createElement(E,{value:T,row:I.original,rowIndex:I.index,...j.componentProps})}:j.cell?_.cell=({row:I})=>j.cell(I.original):j.accessor?_.cell=({row:I})=>j.accessor(I.original):_.cell=({getValue:I})=>I(),_});return i.selectable&&y.unshift({id:"__select",header:"",cell:({row:j})=>j.original,enableSorting:!1,enableColumnFilter:!1,size:48,minSize:48,maxSize:48}),y},[e,i.selectable]),b=kr.useReactTable({data:t,columns:v,state:{columnSizing:x,sorting:l,rowSelection:u,globalFilter:f,pagination:i.showPagination?p:void 0},enableColumnResizing:!0,columnResizeMode:"onChange",onColumnSizingChange:m,defaultColumn:{minSize:20,maxSize:Number.MAX_SAFE_INTEGER,size:150},onSortingChange:y=>{const j=typeof y=="function"?y(l):y;c(j);const S=j[0];S?i.onSortChange?.(S.id,S.desc?"desc":"asc"):i.onSortChange?.("",null)},onRowSelectionChange:y=>{const j=typeof y=="function"?y(u):y;d(j);const S=new Set;Object.keys(j).forEach(A=>{if(j[A]){const _=Number(A);S.add(isNaN(_)?A:_)}}),i.onSelectionChange?.(S)},onGlobalFilterChange:y=>{const j=typeof y=="function"?y(f):y;h(j),i.onSearchChange?.(j)},onPaginationChange:y=>{if(!i.showPagination)return;const j=typeof y=="function"?y(p):y;g(j),i.onPageChange?.(j.pageIndex+1)},getCoreRowModel:kr.getCoreRowModel(),getSortedRowModel:kr.getSortedRowModel(),getFilteredRowModel:kr.getFilteredRowModel(),getPaginationRowModel:i.showPagination?kr.getPaginationRowModel():void 0,manualPagination:!1,manualSorting:!1,getRowId:(y,j)=>String(i.getRowId?.(y,j)??j)}),w=O.default.useMemo(()=>({dense:!1,cellBorder:!1,rowBorder:!0,rowHeight:64,cellAlign:"center",headerBackground:!0,headerBorder:!0,virtualized:i.virtualized||!1,width:"auto",columnsVisibility:!1,columnsResizable:!0,...r}),[r,i.virtualized]),C=()=>{b.resetGlobalFilter(),b.resetColumnFilters(),i.showPagination&&b.setPageIndex(0)};return o.jsx(s3,{value:{table:b,tableLayout:w,parentRef:s,emptyStateTitle:i.emptyStateTitle,emptyStateDescription:i.emptyStateDescription,showClearFiltersButton:i.showClearFiltersButton??!0,resetAllFilters:C},children:o.jsx("div",{className:N.clsx("w-full min-w-0 flex flex-col",a),children:n})})},N4=({children:e,className:t,noFooter:r=!1})=>{const{tableLayout:n,parentRef:a,table:i}=tr(),{virtualized:s,width:l}=n,c=i.getFilteredRowModel().rows.length===0;return s?o.jsx("div",{ref:a,className:N.clsx("bg-surface-0 border-x border-surface-4 overflow-auto w-full min-w-full table ds-scrollbar",t),style:{height:"400px"},children:o.jsx("table",{className:N.clsx("w-full",l==="fixed"&&"table-fixed",l==="auto"&&"table-auto"),children:e})}):o.jsx("div",{className:N.clsx("bg-surface-0 border-x border-surface-4 overflow-x-auto w-full ds-scrollbar",(r||c)&&"border-b rounded-b-2xl",t),children:o.jsxs("table",{className:N.clsx(!c&&l!=="fixed"&&"min-w-max","w-full",l==="fixed"&&"table-fixed",l==="auto"&&"table-auto"),"data-slot":"data-table",children:[l==="fixed"&&o.jsx("colgroup",{children:i.getAllLeafColumns().map(u=>o.jsx("col",{style:u.id==="__select"?{width:`${u.getSize()}px`,maxWidth:`${u.getSize()}px`}:void 0},u.id))}),e]})})},Io=({children:e,className:t,style:r,isTBody:n=!0})=>{const{tableLayout:a}=tr(),{rowBorder:i,rowHeight:s}=a,l=s&&n?{...r,height:`${s}px`}:r;return o.jsx("tr",{className:N.clsx("bg-white hover:bg-surface-2 transition-colors",i&&"border-b border-surface-4 last:border-b-0",t),style:l,children:e})},l3=({header:e,className:t})=>{const{table:r,tableLayout:n}=tr(),{headerBackground:a,dense:i,cellBorder:s,columnsResizable:l,cellAlign:c,width:u}=n,d=e.column,f=e.column.getIsSorted(),h=f!==!1,p=d.getCanResize()&&l;if(d.id==="__select")return o.jsx("th",{className:N.clsx(i?"px-2 py-2":"px-3 py-3",a&&"bg-surface-1","align-middle relative",s&&"border-r border-surface-4 last:border-r-0",t),style:{width:`${e.getSize()}px`,minWidth:`${e.getSize()}px`,maxWidth:`${e.getSize()}px`,...c&&{textAlign:c}},children:o.jsx("div",{className:"flex items-center justify-center",children:o.jsx(Dr,{className:"",checked:r.getIsAllPageRowsSelected(),onChange:r.getToggleAllPageRowsSelectedHandler(),indeterminate:r.getIsSomePageRowsSelected(),size:"small"})})});const g=o.jsxs("th",{className:N.clsx(i?"px-4 py-2":"px-6 py-3",a&&"bg-surface-1","flex items-center justify-center flex-row gap-2 min-w-0 relative",d.getCanSort()&&"cursor-pointer hover:bg-surface-3 transition-colors",h&&"bg-surface-3",s&&"border-r border-surface-4 last:border-r-0",t),style:{...u!=="fixed"&&{width:`${e.getSize()}px`,minWidth:`${d.columnDef.minSize||20}px`,maxWidth:`${d.columnDef.maxSize||Number.MAX_SAFE_INTEGER}px`},textAlign:e.column.columnDef.meta?.align??c},onClick:d.getCanSort()?d.getToggleSortingHandler():void 0,children:[o.jsx("div",{className:"align-middle gap-2 min-w-0",children:o.jsx("span",{className:N.clsx("text-xs font-medium leading-[18px] truncate capitalize text-low-em",h&&"font-semibold"),children:kr.flexRender(e.column.columnDef.header,e.getContext())})}),f&&o.jsx("div",{className:"align-middle flex-shrink-0",children:o.jsx(rg,{direction:f==="desc"?"desc":"asc"})}),d.getCanFilter()&&o.jsx("div",{className:"align-middle flex-shrink-0",children:o.jsx(ng,{})})]});return p?o.jsxs("th",{className:N.clsx(i?"px-4 py-2":"px-6 py-3",a&&"bg-surface-1","align-middle min-w-0 relative group",d.getCanSort()&&"cursor-pointer hover:bg-surface-3 transition-colors",h&&"bg-surface-3",s&&"border-r border-surface-4 last:border-r-0",t),style:{...u!=="fixed"&&{width:`${e.getSize()}px`,minWidth:`${d.columnDef.minSize||20}px`,maxWidth:`${d.columnDef.maxSize||Number.MAX_SAFE_INTEGER}px`},...c&&{textAlign:c}},onClick:d.getCanSort()?d.getToggleSortingHandler():void 0,children:[o.jsxs("div",{className:"flex items-center justify-center flex-row gap-2",children:[o.jsx("div",{className:"align-middle gap-2 min-w-0",children:o.jsx("span",{className:N.clsx("text-xs font-medium leading-[18px] truncate capitalize text-low-em",h&&"font-semibold"),children:kr.flexRender(e.column.columnDef.header,e.getContext())})}),f&&o.jsx("div",{className:"align-middle flex-shrink-0",children:o.jsx(rg,{direction:f==="desc"?"desc":"asc"})}),d.getCanFilter()&&o.jsx("div",{className:"align-middle flex-shrink-0",children:o.jsx(ng,{})})]}),o.jsx("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:N.clsx("absolute top-0 right-0 w-1 h-full cursor-col-resize z-10","bg-transparent hover:bg-surface-4 opacity-0 group-hover:opacity-50")})]}):g},rg=({direction:e})=>e?o.jsx(Xj,{className:N.clsx("text-low-em",e==="asc"&&"rotate-180"),size:12}):null,ng=()=>o.jsx(Qj,{className:"text-low-em",size:12}),P4=({className:e})=>{const{table:t,tableLayout:r}=tr(),{headerBackground:n,headerBorder:a}=r;return o.jsx("thead",{className:N.clsx(n&&"bg-surface-1",a&&"border-b border-surface-4",e),children:t.getHeaderGroups().map(i=>o.jsx(Io,{isTBody:!1,children:i.headers.map(s=>o.jsx(l3,{header:s},s.id))},i.id))})},vh=({cell:e,className:t})=>{const{tableLayout:r}=tr(),{cellAlign:n}=r,a=e.row,i=a.getIsSelected();return e.column.id==="__select"?o.jsx("td",{className:N.clsx(r.dense?"px-2 py-2":"px-3 py-3","relative",i?"bg-surface-2":"",r.cellBorder&&"border-r border-surface-4 last:border-r-0",t),style:{width:`${e.column.getSize()}px`,minWidth:`${e.column.getSize()}px`,maxWidth:`${e.column.getSize()}px`},children:o.jsx("div",{className:"flex items-center justify-center",children:o.jsx(Dr,{checked:i,onChange:a.getToggleSelectedHandler(),size:"small"})})}):o.jsx("td",{className:N.clsx(r.dense?"px-4 py-2":"px-6 py-4","text-high-em text-sm font-medium leading-5 transition-colors min-w-0 truncate",i?"bg-surface-2":"",r.cellBorder&&"border-r border-surface-4 last:border-r-0",t),style:{textAlign:e.column.columnDef.meta?.align??n},children:kr.flexRender(e.column.columnDef.cell,e.getContext())})},c3=({title:e="No data available.",className:t,colSpan:r=1})=>o.jsx("tr",{className:N.clsx("w-full",t),children:o.jsx("td",{colSpan:r,children:o.jsx(ht,{description:e,flat:!0,className:"rounded-b-2xl"})})}),A4=({className:e})=>{const{table:t,tableLayout:r,parentRef:n,emptyStateTitle:a,resetAllFilters:i}=tr(),{virtualized:s}=r;if(t.getFilteredRowModel().rows.length===0)return o.jsx("tbody",{className:N.clsx(r.rowBorder&&"divide-y divide-surface-4",r.dense&&"text-sm",e),children:o.jsx(c3,{title:a,colSpan:t.getAllColumns().length})});if(!s)return o.jsx("tbody",{className:N.clsx(r.rowBorder&&"divide-y divide-surface-4",r.dense&&"text-sm",e),children:t.getRowModel().rows.map(f=>o.jsx(Io,{children:f.getVisibleCells().map(h=>o.jsx(vh,{cell:h},h.id))},f.id))});const c=LO.useVirtualizer({count:t.getRowModel().rows.length,getScrollElement:()=>n?.current||null,estimateSize:()=>r.rowHeight?r.rowHeight:r.dense?32:40,overscan:5}),u=c.getVirtualItems(),d=c.getTotalSize();return o.jsx("tbody",{className:N.clsx("relative",r.dense&&"text-sm",e),style:{height:`${d}px`},children:u.map(f=>{const h=t.getRowModel().rows[f.index];return o.jsx(Io,{style:{position:"absolute",top:0,left:0,width:"100%",height:`${f.size}px`,transform:`translateY(${f.start}px)`},children:h.getVisibleCells().map(p=>o.jsx(vh,{cell:p},p.id))},f.key)})})},_4=(e,t)=>{const r=Number(e);if(isNaN(r)||!isFinite(r))return 1;const n=Math.floor(r),a=Math.max(1,Math.min(n,t));return t>0?a:1},u3=e=>({id:String(e),title:String(e),showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1,className:"!min-w-0 justify-center [&>div:last-child]:hidden",middleContainerClassName:"justify-center [&>div]:mr-0"}),k4=e=>e.map(t=>u3(t)),T4=(e,t,r,n)=>{const a=e*t+1,i=Math.min((e+1)*t,r||n);return{start:a,end:i,total:r||n}},E4=({showPagination:e=!0,totalItems:t,className:r,sizes:n=[10,20,50,100],footerBackground:a=!0,noBorder:i=!1,actions:s})=>{const{table:l}=tr(),[c,u]=tl(),d=u<500,f=l.getState().pagination,h=l.getPageCount(),p=l.getCanPreviousPage(),g=l.getCanNextPage(),x=S=>{const A=_4(S,h)-1;l.setPageIndex(A)},m=S=>{l.setPageSize(Number(S))},v=()=>l.previousPage(),b=()=>l.nextPage(),w=l.getFilteredRowModel().rows.length,{total:C}=T4(f.pageIndex,f.pageSize,t,w),y=k4(n),j=f.pageSize;return!e||w===0?null:o.jsxs("div",{ref:c,className:N.clsx("flex-shrink-0 w-full px-8 py-6 flex flex-row justify-between items-center gap-4",!i&&"border border-surface-4 rounded-b-2xl",a&&"bg-surface-1",r),children:[o.jsxs("div",{className:N.clsx("items-center flex-row shrink-0 gap-4",d?"hidden":"flex"),children:[o.jsx("span",{className:N.clsx("text-low-em text-sm font-semibold",d?"hidden":"block"),children:"Showing"}),o.jsx(Te,{className:"!w-[68px]",size:"sm",variant:"outlined",value:String(j),items:y,onChange:m,showLeadingIcon:!1,customHeight:"28px",customRadius:"8px",menuSize:"sm"}),o.jsx("span",{className:N.clsx("text-med-em text-sm font-semibold",d?"hidden":"block"),children:`/ ${String(C)}`})]}),o.jsxs("div",{className:N.clsx("flex flex-row items-center gap-4",d?"w-full justify-between":"w-auto justify-end"),children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("span",{className:N.clsx("text-med-em text-sm font-semibold whitespace-nowrap",d?"hidden":"block"),children:"Go To Page"}),o.jsx(Te,{className:"!w-[68px]",size:"sm",variant:"outlined",value:String(f.pageIndex+1),items:Array.from({length:h||1},(S,A)=>u3(A+1)),onChange:x,showLeadingIcon:!1,customHeight:"28px",customRadius:"8px",menuSize:"sm"}),o.jsxs("span",{className:"text-med-em text-sm font-semibold whitespace-nowrap",children:["of ",h||1]})]}),o.jsx("div",{className:"px-4 flex items-center",children:o.jsx("span",{className:"w-0 border-l border-gray-300 h-[33px]"})}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(V,{onClick:v,disabled:!p,variant:"neutral",hierarchy:"tertiary",size:"sm",children:"Previous"}),o.jsx(V,{onClick:b,disabled:!g,variant:"brand",hierarchy:"primary",size:"sm",children:"Next"})]})]}),s&&o.jsx("div",{className:"flex items-center gap-x-4 flex-shrink-0",children:s})]})},I4=({title:e,search:t,actions:r,className:n})=>o.jsxs("div",{className:N.clsx("w-full px-8 py-6 bg-white border border-surface-4 rounded-t-2xl flex flex-row justify-between items-center gap-4",n),children:[e&&!t&&o.jsx("div",{className:"flex-shrink-0 text-xl font-semibold text-high-em leading-[30px]",children:e}),t&&o.jsx("div",{className:"flex-1",children:o.jsx(xe,{value:t.value??"",onChange:a=>t.onChange(a.target.value),placeholder:t.placeholder??"Search...",size:"md",leadingIcon:o.jsx(F.SearchNormal1,{size:16})})}),r&&o.jsx("div",{className:"flex items-center gap-x-4 flex-shrink-0",children:r})]}),M4=({columnId:e,className:t,options:r,title:n})=>{const{table:a}=tr(),i=a.getColumn(e),[s,l]=P.useState(i?.getFilterValue()||"");if(!i||!i.getCanFilter())return null;const c=i.columnDef,u=c.filterType||"text",d=n||c.header||i.id,f=p=>{l(p),i.setFilterValue(p||void 0)},h=()=>{switch(u){case"select":return o.jsxs("select",{value:s,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm",children:[o.jsx("option",{value:"",children:"All"}),r?.map((p,g)=>o.jsx("option",{value:String(p.value),children:p.label},g))]});case"number":return o.jsx("input",{type:"number",value:s,onChange:p=>f(p.target.value),placeholder:`Filter ${d}...`,className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"});case"date":return o.jsx("input",{type:"date",value:s,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"});case"boolean":return o.jsxs("select",{value:s,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm",children:[o.jsx("option",{value:"",children:"All"}),o.jsx("option",{value:"true",children:"Yes"}),o.jsx("option",{value:"false",children:"No"})]});case"text":default:return o.jsx("input",{type:"text",value:s,onChange:p=>f(p.target.value),placeholder:`Filter ${d}...`,className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"})}};return o.jsxs("div",{className:N.clsx("p-2 border-t border-gray-200",t),children:[o.jsx("div",{className:"text-xs font-medium text-gray-700 mb-1",children:d}),h()]})},$4=({className:e,trigger:t,position:r="right"})=>{const{table:n}=tr(),[a,i]=P.useState(!1),s=n.getAllColumns().filter(h=>h.id!=="__select"&&h.getCanHide());if(s.length===0)return null;const l=h=>{s.forEach(p=>{p.getCanHide()&&p.toggleVisibility(h)})},c=s.every(h=>h.getIsVisible()),u=s.some(h=>h.getIsVisible()),d=o.jsxs(V,{variant:"neutral",hierarchy:"tertiary",size:"sm",className:"flex items-center gap-2",children:[o.jsx(F.Eye,{size:"16"}),"Columns",o.jsx(F.ArrowDown2,{size:"16"})]}),f=r==="right"?"right-0 origin-top-right":"left-0 origin-top-left";return o.jsxs("div",{className:N.clsx("relative inline-block text-left",e),children:[o.jsx("div",{onClick:()=>i(!a),children:t||d}),a&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),o.jsx("div",{className:N.clsx("absolute z-20 mt-2 w-56 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",f),children:o.jsxs("div",{className:"py-1",children:[o.jsx("div",{className:"px-4 py-2 border-b border-gray-200",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Column Visibility"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{onClick:()=>l(!0),className:"text-xs text-blue-600 hover:text-blue-800",disabled:c,children:"All"}),o.jsx("span",{className:"text-gray-300",children:"|"}),o.jsx("button",{onClick:()=>l(!1),className:"text-xs text-blue-600 hover:text-blue-800",disabled:!u,children:"None"})]})]})}),o.jsx("div",{className:"max-h-60 overflow-y-auto",children:s.map(h=>{const p=h.getIsVisible(),g=typeof h.columnDef.header=="string"?h.columnDef.header:h.id;return o.jsxs("div",{className:"px-4 py-2 hover:bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx(Dr,{checked:p,onChange:h.getToggleVisibilityHandler(),size:"small"}),o.jsx("label",{htmlFor:`column-${h.id}`,className:"ml-2 text-sm text-gray-700 cursor-pointer",onClick:x=>{x.stopPropagation(),h.toggleVisibility()},children:g})]}),o.jsx("button",{onClick:x=>{x.stopPropagation(),h.toggleVisibility()},className:"p-1 rounded hover:bg-gray-200",children:p?o.jsx(F.Eye,{size:"16",className:"text-gray-600"}):o.jsx(F.EyeSlash,{size:"16",className:"text-gray-400"})})]},h.id)})})]})})]})]})},R4=({value:e,config:t})=>{const r=t?.size||"sm";return o.jsx(Bt,{size:r,initials:String(e||"")})},L4=({value:e,config:t})=>{const r=t?.size||"xs",n=t?.variantMap||{},a=t?.variant||"secondary",i=String(e||"").toLowerCase(),s=n[i]||a;return o.jsx(Rr,{variant:s,size:r,children:String(e||"")})},D4=({value:e})=>{const t=String(e||"");return o.jsx("a",{href:`mailto:${t}`,className:"text-primary-900 hover:underline",children:t})},ag=({value:e})=>o.jsx("span",{children:String(e||"")}),z4=({value:e})=>{const t=typeof e=="number"?e:parseFloat(String(e||"0"));return o.jsx("span",{children:t.toLocaleString()})},B4=({value:e})=>{if(!e)return o.jsx("span",{children:"-"});const t=e instanceof Date?e:new Date(String(e));return o.jsx("span",{children:t.toLocaleDateString()})},F4=({value:e})=>{const t=!!e;return o.jsx("span",{className:t?"text-success-600":"text-gray-400",children:t?"✓":"✗"})},q4={avatar:R4,tag:L4,email:D4,text:ag,number:z4,date:B4,boolean:F4,custom:ag};function d3(e){const t=q4[e.dataType];return{id:e.id,header:e.header,sortable:e.sortable,filterable:e.filterable,width:e.width,filterType:e.filterConfig?.type,filterOptions:e.filterConfig?.options,component:({value:r,row:n,rowIndex:a})=>t({value:r,row:n,rowIndex:a,config:e.componentProps}),accessor:r=>r[e.id]}}function W4(e){return e.map(t=>d3(t))}function H4(e){return[{id:"__select",header:"",type:"select",width:"w-16"},...e]}const f3={title:"User Management",columns:[{id:"avatar",header:"Avatar",dataType:"avatar",componentProps:{size:"sm"}},{id:"name",header:"Name",dataType:"text",sortable:!0,filterable:!0,filterConfig:{type:"text"}},{id:"email",header:"Email",dataType:"email",filterable:!0,filterConfig:{type:"text"}},{id:"status",header:"Status",dataType:"tag",filterable:!0,filterConfig:{type:"select",options:[{label:"Active",value:"active"},{label:"Inactive",value:"inactive"},{label:"Pending",value:"pending"}]},componentProps:{size:"xs",variantMap:{active:"success",inactive:"quaternary",pending:"info"}}},{id:"role",header:"Role",dataType:"text",filterable:!0,filterConfig:{type:"select",options:[{label:"Admin",value:"Admin"},{label:"User",value:"User"},{label:"Manager",value:"Manager"}]}},{id:"department",header:"Department",dataType:"text"},{id:"loginCount",header:"Logins",dataType:"number",sortable:!0},{id:"isVerified",header:"Verified",dataType:"boolean"},{id:"createdAt",header:"Created",dataType:"date",sortable:!0}],features:{selectable:!0,virtualized:!1,pagination:!0,sorting:!0,filtering:!0},pagination:{itemsPerPage:10,currentPage:1,totalPages:5,totalItems:50}},h3=[{id:1,avatar:"JD",name:"John Doe",email:"john.doe@example.com",status:"active",role:"Admin",department:"Engineering",createdAt:"2024-01-15",loginCount:142,isVerified:!0},{id:2,avatar:"JS",name:"Jane Smith",email:"jane.smith@example.com",status:"active",role:"Manager",department:"Marketing",createdAt:"2024-02-20",loginCount:98,isVerified:!0},{id:3,avatar:"RJ",name:"Robert Johnson",email:"robert.j@example.com",status:"pending",role:"User",department:"Sales",createdAt:"2024-03-10",loginCount:5,isVerified:!1},{id:4,avatar:"MW",name:"Maria Williams",email:"maria.w@example.com",status:"active",role:"User",department:"HR",createdAt:"2024-01-25",loginCount:67,isVerified:!0},{id:5,avatar:"DB",name:"David Brown",email:"david.b@example.com",status:"inactive",role:"User",department:"Engineering",createdAt:"2023-12-05",loginCount:234,isVerified:!0}],V4={config:f3,data:h3},p3={title:"Product Inventory",columns:[{id:"sku",header:"SKU",dataType:"text",sortable:!0},{id:"name",header:"Product Name",dataType:"text",sortable:!0,filterable:!0,filterConfig:{type:"text"}},{id:"category",header:"Category",dataType:"tag",filterable:!0,filterConfig:{type:"select",options:[{label:"Electronics",value:"Electronics"},{label:"Clothing",value:"Clothing"},{label:"Food",value:"Food"}]},componentProps:{size:"xs",variant:"secondary"}},{id:"price",header:"Price",dataType:"number",sortable:!0,filterConfig:{type:"number"}},{id:"stock",header:"Stock",dataType:"number",sortable:!0},{id:"isActive",header:"Active",dataType:"boolean",filterable:!0,filterConfig:{type:"boolean"}},{id:"lastUpdated",header:"Last Updated",dataType:"date",sortable:!0}],features:{selectable:!0,virtualized:!1,pagination:!0,sorting:!0,filtering:!0},pagination:{itemsPerPage:15,currentPage:1,totalPages:3,totalItems:45}},m3=[{id:1,sku:"ELEC-001",name:"Wireless Mouse",category:"Electronics",price:29.99,stock:150,isActive:!0,lastUpdated:"2024-03-15"},{id:2,sku:"CLTH-045",name:"Cotton T-Shirt",category:"Clothing",price:19.99,stock:300,isActive:!0,lastUpdated:"2024-03-14"},{id:3,sku:"FOOD-112",name:"Organic Coffee",category:"Food",price:12.5,stock:0,isActive:!1,lastUpdated:"2024-02-28"},{id:4,sku:"ELEC-089",name:"USB-C Cable",category:"Electronics",price:15.99,stock:500,isActive:!0,lastUpdated:"2024-03-16"},{id:5,sku:"CLTH-098",name:"Denim Jeans",category:"Clothing",price:59.99,stock:75,isActive:!0,lastUpdated:"2024-03-10"}],U4={config:p3,data:m3},ig={line:{list:"flex gap-x-9 border-b border-surface-3",tab:"relative pb-8 px-2 font-medium text-[14px] transition-colors focus:outline-none",selected:"text-high-em after:absolute after:bottom-[-1px] after:left-0 after:right-0 after:h-1 after:bg-black",unselected:"text-low-em"},"line-full-width":{list:"flex border-b border-surface-3",tab:"flex flex-1 justify-center relative pb-8 px-2 font-medium text-sm transition-colors focus:outline-none",selected:"text-high-em after:absolute after:bottom-[-1px] after:left-0 after:right-0 after:h-1 after:bg-black",unselected:"text-low-em"},pill:{list:"flex gap-x-12",tab:"font-medium text-sm transition-colors focus:outline-none px-6 rounded-md",selected:"bg-surface-2 text-high-em py-4",unselected:"text-low-em px-3 py-2 hover:bg-surface-2/50"}},Jl={none:"",xs:"mt-2",sm:"mt-4",md:"mt-6",lg:"mt-8",xl:"mt-12"},fm=({variant:e="line",tabs:t,className:r,selectedIndex:n,onChange:a,customPaddingBottom:i,contentSpacing:s="sm",fullHeight:l=!1,iconLabelGap:c=4,iconSize:u=16,showBorder:d=!0,headerHeight:f,tabPaddingX:h,tabListClassName:p,lazy:g=!1,responsive:x})=>{const m=O.default.useRef(null),v=O.default.useRef(0),b=O.default.useRef(!1),[w,C]=O.default.useState(!1);O.default.useLayoutEffect(()=>{if(!x)return;const $=m.current;if(!$)return;const L=()=>{b.current||(v.current=$.scrollWidth);const U=$.clientWidth,D=v.current,B=b.current?U<D+24:U<D;B!==b.current&&(b.current=B,C(B))};L();const q=new ResizeObserver(L);return q.observe($),()=>q.disconnect()},[x,t.length]);const y=w&&e==="line-icons",j=e==="line-icons"||e==="only-icon",S=e!=="only-icon"&&!y,A=e==="only-icon"||y,_=e==="line-icons"||e==="only-icon"?ig.line:ig[e],I=d?_.list:_.list.replace(/border-b\s+border-surface-3/g,"").trim(),k={};f&&(k.height=`${f}px`,k.alignItems="flex-end");const E=()=>typeof s=="number"?"":s in Jl?Jl[s]:Jl.sm,T=typeof s=="number"?{marginTop:`${s}px`}:{},M=l?{height:"100%",maxHeight:"100%",overflow:"hidden",display:"flex",flexDirection:"column"}:{},R=l?{height:"100%",maxHeight:"100%",flex:1}:{};return o.jsx("div",{className:N.clsx("w-full",r),style:M,children:o.jsxs(me.Tab.Group,{selectedIndex:n,onChange:a,as:"div",className:l?"flex flex-col overflow-hidden":void 0,style:R,children:[o.jsx(me.Tab.List,{ref:m,className:N.clsx(I,p),style:k,children:t.map($=>o.jsx(me.Tab,{title:A?$.label:void 0,className:({selected:L})=>N.clsx(_.tab,x&&"shrink-0",L?_.selected:_.unselected),style:{...i?{paddingBottom:i}:{},...h!==void 0?{paddingLeft:`${h}px`,paddingRight:`${h}px`}:{}},children:({selected:L})=>{const q=L&&$.selectedIcon?$.selectedIcon:$.icon;return o.jsxs("div",{className:N.clsx("flex items-center",er(c)),children:[j&&q&&O.default.isValidElement(q)&&O.default.cloneElement(q,{size:u,color:"currentColor"}),S&&o.jsx("span",{className:"whitespace-nowrap",children:$.label})]})}},$.id))}),o.jsx(me.Tab.Panels,{className:E(),style:l?{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden",...T}:T,children:t.map($=>o.jsx(me.Tab.Panel,{unmount:g,style:l?{minHeight:0,flex:1,overflowY:"auto",maxHeight:"100%"}:void 0,children:$.content},$.id))})]})})},K4=({tabs:e,activeTabId:t,onTabChange:r,addLabel:n="Add components",onAddComponent:a,borderless:i=!1,fullHeight:s=!1,lazy:l=!1,loading:c=!1,className:u})=>{const[d,f]=O.default.useState(e[0]?.id);O.default.useEffect(()=>{if(t!==void 0)return;e.some(v=>v.id===d)||f(e[0]?.id)},[e,t,d]);const h=t??d,p=m=>{const v=e[m]?.id;v!==void 0&&(f(v),r?.(v))},g=Math.max(0,e.findIndex(m=>m.id===h));if(e.length===0&&!c)return null;if(c)return o.jsxs("div",{className:N.clsx("overflow-hidden",s&&"h-full",!i&&"border border-surface-3 rounded-lg",u),children:[o.jsxs("div",{className:"flex items-center gap-8 p-6 bg-surface-bg border-b border-surface-3",children:[o.jsx("div",{className:"h-24 w-48 rounded-md bg-surface-2 animate-pulse"}),o.jsx("div",{className:"h-24 w-40 rounded-md bg-surface-2 animate-pulse"})]}),o.jsx("div",{className:N.clsx("flex items-center justify-center bg-white",s?"min-h-full":"min-h-[160px]"),children:o.jsx("div",{className:"h-28 w-120 rounded-md bg-surface-2 animate-pulse"})})]});const x=e.map(m=>({id:m.id,label:m.label,content:m.content?o.jsx("div",{className:N.clsx("p-6 bg-white",s&&"min-h-full"),children:m.content}):o.jsx("div",{className:N.clsx("flex items-center justify-center bg-white",s?"min-h-full":"min-h-[160px]"),children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:o.jsx(F.Add,{size:16}),onClick:()=>a?.(m.id),children:n})})}));return o.jsx("div",{className:N.clsx("overflow-hidden",s&&"h-full",!i&&"border border-surface-3 rounded-lg",u),children:o.jsx(fm,{variant:"pill",tabs:x,selectedIndex:g,onChange:p,tabListClassName:"bg-surface-bg border-b border-surface-3 p-6",contentSpacing:"none",fullHeight:s,lazy:l})})},x3=({tabs:e,className:t,selectedIndex:r,onChange:n,onAddTab:a,onArrowRightClick:i,onCloseTab:s,tabWidth:l,scrollDistance:c=300})=>{const u=P.useRef(null),[d,f]=P.useState(!1),[h,p]=P.useState(!1),g=()=>{if(!u.current)return;const{scrollLeft:v,scrollWidth:b,clientWidth:w}=u.current;f(v>0),p(v<b-w-1)};P.useEffect(()=>{g();const v=u.current;if(v){v.addEventListener("scroll",g);const b=new ResizeObserver(g);return b.observe(v),()=>{v.removeEventListener("scroll",g),b.disconnect()}}},[e]);const x=()=>{u.current&&u.current.scrollBy({left:-c,behavior:"smooth"})},m=()=>{u.current&&u.current.scrollBy({left:c,behavior:"smooth"})};return o.jsx("div",{className:N.clsx("w-full h-full",t),children:o.jsx(me.Tab.Group,{className:"h-full w-full",selectedIndex:r,onChange:n,children:o.jsxs("div",{className:"relative flex items-center border-x border-surface-3 h-full w-full",children:[d&&o.jsx("button",{onClick:x,className:"h-full hover:bg-surface-bg cursor-pointer px-6 border-r border-surface-3 shrink-0","aria-label":"Scroll left",children:o.jsx(ie,{className:"text-med-em",size:"xs",children:o.jsx(F.ArrowLeft2,{})})}),o.jsx("div",{ref:u,className:"flex-1 h-full w-full overflow-x-auto [&::-webkit-scrollbar]:!hidden [-ms-overflow-style:none!important] [scrollbar-width:none!important]",children:o.jsx(me.Tab.List,{className:"flex min-w-full h-full ",children:e.map((v,b)=>o.jsx(me.Tab,{as:"div",className:({selected:w})=>N.clsx("relative py-3 font-medium border-r border-surface-3","whitespace-nowrap h-full flex items-center cursor-pointer","outline-none focus:outline-none focus-visible:outline-none focus:ring-0 active:outline-none",l?"":"flex-1",w?"text-high-em bg-white after:absolute border-b-2 border-b-black":"text-low-em bg-surface-bg hover:bg-surface-2"),style:l?r===b?{minWidth:`${l}px`}:{width:`${l}px`,minWidth:`${l}px`}:void 0,children:({selected:w})=>o.jsxs("div",{className:"flex items-center justify-between gap-8 p-8 w-full",children:[o.jsx("span",{className:`!truncate text-sm text-high-em font-medium ${w?"text-high-em":"text-low-em"}`,children:v.label}),v.closeable&&w&&s&&o.jsx(V,{onClick:C=>{C.stopPropagation(),s(b)},className:"cursor-pointer",leadingIcon:o.jsx(ie,{size:"xs",className:"text-med-em",children:o.jsx(nt,{})}),"aria-label":"Close tab",icons:"only",variant:"neutral",hierarchy:"secondary"})]})},v.id))})}),o.jsxs("div",{className:"flex items-center h-full",children:[h&&o.jsx("button",{onClick:i||m,className:"h-full hover:bg-surface-bg cursor-pointer px-6 border-x border-surface-3","aria-label":"Scroll right",children:o.jsx(ie,{className:"text-low-em",size:"xs",children:o.jsx(F.ArrowRight2,{})})}),a&&o.jsx("button",{onClick:a,className:`h-full hover:bg-surface-bg cursor-pointer px-6 ${h?"":"border-l border-surface-3"}`,"aria-label":"Add new tab",children:o.jsx(ie,{className:"text-low-em",size:12,children:o.jsx(F.Add,{})})})]})]})})})};x3.displayName="HeaderTabs";const G4={default:{...qe.default,placeholder:"placeholder-placeholder",text:"text-med-em"},danger:{...qe.danger,placeholder:"placeholder-danger-em",text:"text-danger-em"}},Z4={sm:{...Ft.sm,fontSize:"text-xs"},md:{...Ft.md,fontSize:"text-sm"},lg:{...Ft.lg,fontSize:"text-base"}},_n={wrapper:"bg-surface-3 pointer-events-none border-transparent",label:"!text-disabled",hint:"!text-disabled",text:"disabled:text-disabled",placeholder:"disabled:placeholder-disabled"},hl=({variant:e="default",size:t="md",label:r,hint:n,hintIconVariant:a,disabled:i,resize:s="vertical",className:l,customFontWeight:c,customBackground:u,...d})=>{const f=G4[e],h=Z4[t],p=c||void 0,g=u?/^[a-z]+-[a-z0-9-]+$/i.test(u)?`var(--${u})`:u:void 0,x={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"};return o.jsxs("div",{className:N.clsx("flex flex-col gap-1.5",l),children:[r&&o.jsx("label",{htmlFor:d.id,className:N.clsx("font-semibold text-med-em",h.labelFontSize,i&&_n.label),children:r}),o.jsx("div",{className:N.clsx("relative flex items-center border rounded-xl transition-colors duration-200 flex-1",!u&&f.wrapper,i&&_n.wrapper),style:{backgroundColor:g},children:o.jsx("textarea",{disabled:i,className:N.clsx("w-full h-full bg-transparent px-3.5 py-2.5 focus:outline-none min-h-[80px]",h.fontSize,!c&&"font-medium",f.text,f.placeholder,x[s],i&&_n.text,i&&_n.placeholder),style:{fontWeight:p},...d})}),n&&o.jsx(ft,{icon:o.jsx(F.InfoCircle,{variant:a}),label:n,iconSize:h.hintIconSize,gap:1,iconColorClass:N.clsx(f.hint,i&&_n.hint),labelColorClass:N.clsx(f.hint,i&&_n.hint),className:N.clsx(h.hintFontSize,"font-semibold")})]})};function Y4({theme:e="light",onToggle:t,className:r}){return o.jsx("button",{onClick:t,className:r||"rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-dark-700 hover:bg-gray-50 dark:border-surface-3 dark:bg-surface-2 dark:text-low-em dark:hover:bg-surface-3","aria-label":"Toggle theme",children:e==="dark"?o.jsx("span",{children:"Light Mode"}):o.jsx("span",{children:"Dark Mode"})})}const X4="bg-white rounded-[20px] shadow-xl py-6 px-10 flex items-center gap-6 max-w-md leading-10",Q4={default:"border border-surface-3",custom:"border border-surface-3",danger:"border border-danger-accent-3",success:"border border-success-accent-3",warning:"border border-warning-accent-3"},g3=18,v3="text-base font-bold text-high-em leading-10",y3="text-sm text-high-em leading-9",b3=(e,t)=>te.twMerge(X4,Q4[e||"default"],t),w3=P.forwardRef((e,t)=>{const{title:r,description:n,variant:a="default",action:i,onOpenChange:s,duration:l=5e3,children:c,icon:u,className:d,iconSize:f=g3,...h}=e,p=a!=="custom"||u;return o.jsxs(_t.Root,{ref:t,duration:l,onOpenChange:s,className:b3(a,d),...h,children:[p&&o.jsx("div",{children:a==="custom"&&u?u:o.jsx(Yp,{size:f})}),o.jsxs("div",{className:"flex-1",children:[r&&o.jsx(_t.Title,{className:v3,children:r}),n&&o.jsx(_t.Description,{className:y3,children:n})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-8 bg-surface-3"}),o.jsx(_t.Action,{asChild:!0,altText:i.label,onClick:i.onClick,children:o.jsx(V,{className:"cursor-pointer",variant:"neutral",hierarchy:"quaternary",size:"md",icons:"none",children:i.label})})]}),o.jsx(_t.Close,{asChild:!0,className:"shrink-0 flex items-center justify-center",children:o.jsx(V,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(nt,{className:"text-high-em",size:8})})}),c]})});w3.displayName="Toast";const j3=P.createContext(null),J4=()=>{const e=P.useContext(j3);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},eP=({children:e})=>{const[t,r]=P.useState([]),n=P.useCallback(i=>{const{title:s,description:l,variant:c="default",action:u,duration:d=5e3}=i,f={id:Math.random().toString(36).substr(2,9),title:s,description:l,variant:c,action:u,duration:d};r(h=>[...h,f])},[]),a=P.useCallback((i,s)=>{i||r(l=>l.filter(c=>c.id!==s))},[]);return o.jsx(j3.Provider,{value:{toast:n},children:o.jsxs(_t.Provider,{swipeDirection:"right",children:[e,o.jsx(_t.Viewport,{className:"fixed top-5 right-5 z-[999] flex flex-col gap-4 w-full max-w-[400px]"}),t.map(i=>o.jsxs(_t.Root,{duration:i.duration,onOpenChange:s=>a(s,i.id),className:b3(i.variant),children:[i.variant!=="custom"&&o.jsx("div",{className:"shrink-0 w-10 h-12 flex items-center justify-center",children:o.jsx(Yp,{size:g3})}),o.jsxs("div",{className:"flex-1",children:[i.title&&o.jsx(_t.Title,{className:v3,children:i.title}),i.description&&o.jsx(_t.Description,{className:y3,children:i.description})]}),i.action&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-12 bg-surface-3"}),o.jsx(_t.Action,{asChild:!0,altText:i.action.label,onClick:i.action.onClick,children:o.jsx(V,{className:"cursor-pointer",variant:"neutral",hierarchy:"quaternary",size:"md",icons:"none",children:i.action.label})})]}),o.jsx(_t.Close,{asChild:!0,className:"shrink-0 flex items-center justify-center",children:o.jsx(V,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(nt,{className:"text-high-em",size:8})})})]},i.id))]})})},tP={small:{wrapper:"w-[36px] h-[20px]",knob:"w-[16px] h-[16px]",knobOn:"translate-x-[16px]"},medium:{wrapper:"w-[44px] h-[24px]",knob:"w-[20px] h-[20px]",knobOn:"translate-x-[20px]"},large:{wrapper:"w-[52px] h-[28px]",knob:"w-[24px] h-[24px]",knobOn:"translate-x-[24px]"}},Vr={bgOff:"bg-surface-1 hover:bg-surface-2",bgOn:"bg-black hover:bg-low-em",bgDisabled:"bg-surface-3",knob:"bg-white shadow-[0_1px_2px_0_rgba(10,13,18,0.06)]",knobDisabled:"bg-surface-4",focus:"peer-focus:ring-2 peer-focus:ring-low-em peer-active:ring-2 peer-active:ring-low-em",disabled:"cursor-not-allowed"},Zi=({size:e="medium",checked:t,disabled:r,className:n,...a})=>{const i=tP[e];return o.jsxs("label",{className:N.clsx("relative inline-flex items-center",r?Vr.disabled:"cursor-pointer",n),children:[o.jsx("input",{type:"checkbox",className:"sr-only peer",checked:t,disabled:r,...a}),o.jsx("div",{className:N.clsx(i.wrapper,"relative rounded-full transition-colors duration-200 ease-in-out","flex items-center",r?Vr.bgDisabled:t?Vr.bgOn:Vr.bgOff,!r&&Vr.focus),children:o.jsx("div",{className:N.clsx(i.knob,r?Vr.knobDisabled:Vr.knob,"absolute top-[2px] left-[2px] rounded-full transition-transform duration-200 ease-in-out",t&&i.knobOn)})})]})},hm=O.default.memo(({children:e,className:t,borderSide:r="none",borderStyle:n="surface-3"})=>{const a=O.default.useMemo(()=>r==="none"?"":`${r==="left"?"border-l":"border-r"} ${n==="surface-3"?"border-surface-3":"border-surface-4"}`,[r,n]);return o.jsx("div",{className:`h-full w-full flex flex-col ${a} ${t||""}`,children:e})});hm.displayName="TypesPanel";const rP=({categories:e=[],onItemClick:t,renderItem:r,className:n=""})=>{const a=i=>{t&&t(i)};return o.jsxs("div",{className:`px-6 py-8 flex-1 overflow-y-auto ${n}`,children:[e.map((i,s)=>o.jsxs("div",{className:"mb-8 last:mb-0",children:[o.jsx("h3",{className:"font-inter font-semibold text-sm text-med-em mb-8",children:i.title}),o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(70px,1fr))] gap-6",children:i.items.map(l=>o.jsx(O.default.Fragment,{children:r?r(l,{onClick:()=>a(l.id)}):o.jsx(T2,{icon:l.icon,text:l.label,onClick:()=>a(l.id)})},l.id))}),s<e.length-1&&o.jsx("div",{className:"mt-8",children:o.jsx(he,{})})]},i.id)),e.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-sm text-med-em",children:"No hay elementos en esta categoría"})})]})},nP=({categories:e=[],onItemClick:t,renderItem:r,className:n=""})=>{const a=i=>{t&&t(i)};return o.jsx(jt.Provider,{delayDuration:300,children:o.jsxs("div",{className:`px-6 py-8 flex-1 overflow-y-auto ${n}`,children:[e.map((i,s)=>o.jsxs("div",{className:"mb-8 last:mb-0",children:[o.jsx("h3",{className:"font-inter font-semibold text-sm text-med-em mb-8",children:i.title}),o.jsx("div",{className:"flex flex-col gap-6",children:i.items.map(l=>o.jsx(O.default.Fragment,{children:r?r(l,{onClick:()=>a(l.id)}):o.jsx(am,{leadingIcon:o.jsx(F.HambergerMenu,{size:20}),leadingIconColor:"text-disabled",icon:o.jsx(Xp,{}),iconColor:"text-disabled",tooltipContent:`Add ${l.label} field type`,onClick:()=>a(l.id),children:l.label})},l.id))}),s<e.length-1&&o.jsx("div",{className:"mt-8",children:o.jsx(he,{})})]},i.id)),e.length===0&&o.jsx("div",{className:"text-center py-12",children:o.jsx("p",{className:"text-sm text-med-em",children:"No hay elementos en esta categoría"})})]})})},aP=[{id:"todos",title:"Todos",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1},{id:"basicos",title:"Básicos",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1},{id:"avanzados",title:"Avanzados",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1},{id:"multimedia",title:"Multimedia",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1},{id:"relaciones",title:"Relaciones",showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1}],iP=[{value:"list",icon:o.jsx(F.Task,{})},{value:"grid",icon:o.jsx(F.Category,{})}],oP=({className:e="",selectedType:t,onTypeChange:r,selectedView:n,onViewChange:a,actions:i,categories:s,placeholder:l="All",showLabel:c=!0})=>{const[u,d]=P.useState("basicos"),[f,h]=P.useState("list"),p=t!==void 0?t:u,g=n!==void 0?n:f,x=v=>{r?r(v):d(v)},m=v=>{a?a(v):h(v)};return o.jsx(jt.Provider,{delayDuration:300,children:o.jsxs("div",{className:`flex flex-col ${e}`,children:[c&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"px-6 pt-9 pb-8 flex items-center justify-between",children:[o.jsx(W2,{tooltipContent:"Select and configure the type of data field you want to create",labelClassName:"font-inter font-semibold text-sm text-high-em",className:"flex items-center gap-1",children:"Types"}),i&&o.jsx("div",{children:i})]}),o.jsx(he,{})]}),o.jsxs("div",{className:`flex items-center justify-between gap-4 px-6 ${c?"py-8":"py-4"}`,children:[o.jsx("div",{className:"flex-1",children:o.jsx(Te,{items:s?s.map(v=>({id:v.id,title:v.title,showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1,className:"!h-[34px]"})):aP.map(v=>({...v,showLeadingIcon:!1,className:"!h-[34px]"})),value:p,onChange:x,placeholder:l,size:"md",menuSize:"sm",leadingIcon:o.jsx(F.SearchNormal1,{size:16}),showLeadingIcon:!0})}),o.jsx(mr,{options:iP,value:g,onChange:m,size:"sm"})]}),o.jsx(he,{})]})})},sP=({className:e="",searchQuery:t,onSearchChange:r,searchPlaceholder:n="Search...",selectedView:a,onViewChange:i,viewOptions:s=[],buttonGroupSize:l="sm"})=>{const[c,u]=P.useState(""),[d,f]=P.useState("list"),h=t!==void 0?t:c,p=a!==void 0?a:d,g=P.useCallback(m=>{const v=m.target.value;r?r(v):u(v)},[r]),x=m=>{i?i(m):f(m)};return o.jsxs("div",{className:`flex flex-col ${e}`,children:[o.jsx(he,{}),o.jsxs("div",{className:"flex items-center justify-between gap-4 py-8 px-6",children:[o.jsx("div",{className:"flex-1",children:o.jsx(xe,{type:"search",placeholder:n,value:h,onChange:g,trailingIcon:o.jsx(F.SearchNormal1,{size:16,color:"currentColor"})})}),o.jsx(mr,{options:s,value:p,onChange:x,size:l})]}),o.jsx(he,{})]})},pm=({title:e,backButton:t,actions:r,className:n})=>o.jsxs("div",{className:N.clsx("flex items-center gap-2","h-[56px] px-4","border-b border-surface-3",n),children:[t&&o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:o.jsx(F.ArrowLeft2,{}),"aria-label":t["aria-label"]||"Go back",onClick:t.onClick,className:"shrink-0"}),o.jsxs("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[o.jsx("h2",{className:N.clsx("text-sm font-semibold leading-[22px]","text-high-em","truncate"),children:e}),r&&o.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})]})]});pm.displayName="PanelHeader";const lP=({user:e,sections:t,align:r="right",offset:n=8,className:a,avatarSize:i="md"})=>{const[s,l]=P.useState(!1),c=P.useRef(null),u=P.useRef(null);P.useEffect(()=>{const h=p=>{c.current&&!c.current.contains(p.target)&&u.current&&!u.current.contains(p.target)&&l(!1)};if(s)return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[s]);const d=h=>{!h.disabled&&h.onClick&&(h.onClick(),l(!1))},f=(h,p)=>{h.switch?.onChange&&h.switch.onChange(p)};return o.jsxs("div",{className:N.clsx("relative inline-block",a),children:[o.jsx("div",{ref:u,onClick:()=>l(!s),className:"cursor-pointer",children:o.jsx(Bt,{size:i,imageUrl:e.avatar,initials:e.initials||e.name.charAt(0),statusBadge:e.statusBadge})}),s&&o.jsxs("div",{ref:c,className:N.clsx("absolute z-50 mt-2 min-w-[280px] rounded-lg bg-white shadow-lg border border-surface-3",r==="right"?"right-0":"left-0"),style:{top:`calc(100% + ${n}px)`},children:[o.jsxs("div",{className:"px-10 py-8 border-b border-surface-3",children:[o.jsx("p",{className:"text-sm font-semibold text-high-em",children:e.name}),e.email&&o.jsx("p",{className:"text-xs text-low-em mt-1",children:e.email})]}),o.jsx("div",{className:"py-3",children:t.map((h,p)=>o.jsxs(O.default.Fragment,{children:[h.map(g=>o.jsxs("button",{onClick:()=>d(g),disabled:g.disabled||!!g.switch,className:N.clsx("w-full px-10 py-4 text-left text-sm flex items-center gap-3 transition-colors",!g.switch&&"hover:bg-surface-1",g.destructive?"text-danger-main":"text-high-em",g.disabled&&"opacity-50 cursor-not-allowed"),children:[g.icon&&o.jsx("span",{className:"flex-shrink-0 flex items-center justify-center text-current",children:g.icon}),o.jsx("span",{className:"flex-1 font-normal",children:g.label}),g.trailing&&o.jsx("span",{className:"flex-shrink-0",children:g.trailing}),!g.trailing&&g.badge&&o.jsx(Ge,{theme:g.badge.theme||"success",size:"xs",variant:"simple",children:g.badge.label}),!g.trailing&&g.switch&&o.jsx(Zi,{size:"small",checked:g.switch.checked,onChange:x=>f(g,x.target.checked),onClick:x=>x.stopPropagation()})]},g.id)),p<t.length-1&&o.jsx("div",{className:"my-3 border-t border-surface-3"})]},p))})]})]})},mm=({selected:e,onSelect:t,disabled:r=!1,onCancel:n,onAccept:a,extraMonth:i=!1,pickType:s="range",className:l="",cancelLabel:c="Cancel",acceptLabel:u="Accept",showFooter:d=!0})=>{const[f,h]=P.useState(e);P.useEffect(()=>{h(e)},[e]);const p=f,g=b=>{h(b),t&&t(b)},x=()=>{h(void 0),n&&n()},m=()=>{a&&a(p)},v=s==="range"?{mode:"range",selected:p,onSelect:g}:{mode:"single",selected:p?.from,onSelect:b=>g(b?{from:b}:void 0)};return o.jsxs("div",{className:te.twMerge(N.clsx("font-family-inter bg-white border border-surface-3 rounded-[20px] w-fit",r&&"opacity-50 pointer-events-none",l)),children:[o.jsx(RO.DayPicker,{...v,disabled:r,numberOfMonths:i?2:1,showOutsideDays:!0,className:"datepicker-calendar p-2.5",components:{Chevron:({orientation:b})=>b==="left"?o.jsx(F.ArrowLeft2,{size:16,color:"var(--high-em)"}):o.jsx(F.ArrowRight2,{size:16,color:"var(--high-em)"})}}),d&&o.jsx("div",{className:"border-t border-surface-3 px-2.5 py-2.5 pl-5 self-end justify-end",children:o.jsxs("div",{className:"flex gap-2 self-end justify-end",children:[o.jsx(V,{className:"mr-8",variant:"neutral",size:"sm",hierarchy:"secondary",onClick:x,disabled:r,children:c}),o.jsx(V,{variant:"brand",size:"sm",hierarchy:"primary",onClick:m,disabled:r,children:u})]})})]})},xm=({className:e,icon:t,label:r,description:n,actions:a,iconType:i="default",iconVariant:s="secondary",iconSize:l="sm",linkProps:c,badge:u,bottomContent:d,labelInlineContent:f,contentGap:h=2,classNameActions:p,...g})=>o.jsxs("div",{className:N.clsx("flex flex-row gap-8 items-center",e),...g,children:[t&&o.jsx(dl,{type:i,variant:s,size:l,children:t}),o.jsxs("div",{className:N.clsx("flex flex-1 flex-col",er(h)),children:[o.jsxs("div",{className:N.clsx("flex flex-row",u?"justify-between gap-2":""),children:[o.jsxs("div",{className:"flex flex-row gap-6 items-center",children:[c?o.jsx($r,{className:"w-fit",...c,children:r}):o.jsx("span",{className:"text-high-em text-md font-medium",children:r}),f&&o.jsx("div",{children:f})]}),u&&o.jsx("div",{children:u})]}),n&&o.jsx("span",{className:"text-med-em text-sm font-normal",children:n}),d&&o.jsx("div",{children:d})]}),a&&o.jsx("div",{className:N.clsx("flex gap-8",p),children:a})]}),cP=({className:e,planLabel:t,priceLabel:r,timeLabel:n,nextPaymentLabel:a,dateLabel:i,items:s,buttonLabel1:l,onClickButton1:c,buttonLabel2:u,onClickButton2:d,...f})=>o.jsxs("div",{className:N.clsx("flex flex-col border border-surface-3 rounded-8 w-full",e),...f,children:[o.jsxs("div",{className:"flex flex-row px-10 py-8 border-b border-b-surface-3 gap-8",children:[o.jsxs("div",{className:"flex flex-col flex-1 gap-4",children:[o.jsx("span",{className:"flex text-med-em font-medium text-sm",children:t}),o.jsxs("div",{className:"flex flex-row items-center gap-6",children:[o.jsx("span",{className:"text-high-em font-semibold text-3xl font-family-space-grotesk",children:r}),o.jsxs("span",{className:"text-med-em text-sm font-normal",children:["/ ",n]})]})]}),o.jsxs("div",{className:"flex flex-col self-center ",children:[o.jsx("span",{className:"font-normal text-xs text-right text-med-em",children:a}),o.jsx("span",{className:"text-md text-right font-medium text-high-em",children:i})]})]}),o.jsxs("ul",{className:"flex flex-col p-10 gap-12",children:[o.jsx("div",{className:"flex flex-col gap-10",children:s.map((h,p)=>o.jsx(O.default.Fragment,{children:o.jsx("li",{children:o.jsx(xm,{icon:h.icon,iconType:"default",iconVariant:"secondary",iconSize:"sm",label:h.itemLabel,badge:o.jsx(Ge,{variant:"simple",theme:h.badgeTheme,children:h.badge}),bottomContent:o.jsx(Js,{progress:h.progress})})})},p))}),o.jsxs("div",{className:"flex flex-row gap-6",children:[o.jsx(V,{className:"w-1/2",size:"md",variant:"brand",hierarchy:"primary",onClick:c,children:l}),o.jsx(V,{className:"w-1/2",size:"md",variant:"neutral",hierarchy:"tertiary",onClick:d,children:u})]})]})]}),uP=({className:e,title:t,subtitle:r,actionButtonLabel:n,actionButtonLabelOnClick:a,extraComponent:i,items:s,...l})=>o.jsxs("div",{className:N.clsx("flex flex-col border border-surface-3 rounded-8 w-full",e),...l,children:[o.jsxs("div",{className:"flex flex-row px-10 py-8 border-b border-b-surface-3",children:[o.jsxs("div",{className:"flex flex-1 flex-col content-center",children:[o.jsx("h3",{className:"text-high-em font-semibold",children:t}),o.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]}),n&&o.jsx("div",{className:"flex self-center",children:o.jsx(V,{size:"sm",variant:"neutral",hierarchy:"tertiary",onClick:a,children:n})})]}),o.jsxs("div",{className:"flex flex-col p-10 gap-10",children:[o.jsx("div",{className:"flex flex-col gap-6",children:s.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(he,{}),o.jsx(xm,{icon:c.icon,label:c.label,description:c.description,actions:(c.buttonLabel||c.buttonIcon)&&o.jsx(V,{size:"sm",onClick:c.buttonOnClick,...c.buttonLabel?{variant:"neutral",hierarchy:"tertiary"}:{icons:"only",variant:"neutral",hierarchy:"secondary",leadingIcon:c.buttonIcon||o.jsx(Qp,{})},children:c.buttonLabel})})]},u))}),i&&o.jsx("div",{className:"flex flex-1",children:i})]})]}),dP=({className:e,title:t,subtitle:r,buttonItems:n,...a})=>o.jsxs("div",{className:N.clsx("flex flex-col gap-8 p-8 bg-surface-1 rounded-8 w-full",e),...a,children:[o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsx("h3",{className:"text-high-em font-semibold text-xl",children:t}),o.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]}),o.jsx("div",{className:"flex flex-col gap-4",children:n.map((i,s)=>o.jsx(V,{children:i.label,leadingIcon:i.icon,size:"sm",icons:"leading",onClick:i.buttonOnClick,...i.variant||i.hierarchy?{variant:i.variant,hierarchy:i.hierarchy}:{variant:"brand",hierarchy:"primary"}},s))})]}),C3=({className:e,icon:t,projectName:r,dbLabel:n,statusLabel:a,statusState:i,stats:s,...l})=>o.jsxs("div",{className:N.clsx("flex flex-col border border-surface-3 rounded-8 bg-white w-full",e),...l,children:[o.jsxs("div",{className:"flex flex-col gap-6 px-10 py-8 border-b border-b-surface-3",children:[o.jsxs("div",{className:"flex items-center gap-5",children:[o.jsx("span",{className:"flex size-12 shrink-0 items-center justify-center rounded-5 bg-surface-2 text-high-em",children:o.jsx(ie,{size:"sm-md",children:t})}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsx("span",{className:"text-high-em font-semibold truncate",children:r}),o.jsx("span",{className:"text-med-em text-sm",children:n})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Ge,{variant:"status",statusState:i,statusSize:"xs"}),o.jsx("span",{className:"text-med-em text-sm",children:a})]})]}),o.jsx("div",{className:"flex flex-col gap-6 px-10 py-8",children:s.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(he,{}),o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("span",{className:"text-med-em text-sm",children:c.label}),c.badgeTheme?o.jsx(Ge,{variant:"simple",theme:c.badgeTheme,children:c.value}):o.jsx("span",{className:"text-high-em font-medium",children:c.value})]})]},u))})]});C3.displayName="ProjectOverviewCard";const ec={showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!0},S3=({className:e,icon:t,name:r,statusLabel:n,statusTheme:a="surface",fieldsLabel:i,updatedLabel:s,onView:l,onDuplicate:c,onDelete:u,viewLabel:d="Ver",duplicateLabel:f="Duplicar",deleteLabel:h="Eliminar",...p})=>{const[g,x]=P.useState(!1),m=P.useRef(null),v=()=>x(!1),b=[{...ec,id:"view",title:d,leadingIcon:o.jsx(F.Eye,{}),onSelect:()=>{v(),l?.()}},{...ec,id:"duplicate",title:f,leadingIcon:o.jsx(F.Copy,{}),onSelect:()=>{v(),c?.()}},{...ec,id:"delete",title:h,leadingIcon:o.jsx(F.Trash,{}),customTitleColor:"text-danger-em",onSelect:()=>{v(),u?.()}}];return o.jsxs("div",{role:l?"button":void 0,onClick:l,className:te.twMerge(N.clsx("flex flex-col gap-4 p-6 border border-surface-3 rounded-2xl bg-white w-full min-w-0",l&&"cursor-pointer transition hover:border-surface-4",e)),...p,children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[o.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-4 bg-surface-2 text-high-em",children:o.jsx(ie,{size:"sm",children:t})}),o.jsx("span",{className:"truncate font-semibold text-high-em",children:r})]}),o.jsxs("div",{className:"relative shrink-0",children:[o.jsx("button",{ref:m,type:"button","aria-label":"Opciones del módulo",onClick:w=>{w.stopPropagation(),x(C=>!C)},className:"rounded-md p-1.5 text-low-em transition hover:bg-surface-2 hover:text-high-em",children:o.jsx(F.More,{size:20,color:"currentColor",className:"rotate-90"})}),g&&o.jsx(Wt,{size:"xs",triggerRef:m,onClose:v,items:b})]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[o.jsx(ft,{icon:o.jsx(F.Hashtag,{}),label:i,labelSize:"sm",iconSize:"sm",gap:4}),s&&o.jsx(ft,{icon:o.jsx(F.Clock,{}),label:s,labelSize:"sm",iconSize:"sm",gap:4}),o.jsx(Ge,{variant:"simple",theme:a,children:n})]})]})};S3.displayName="ModuleSummaryCard";const tc={showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!0},O3=({className:e,icon:t,name:r,typeLabel:n,moduleLabel:a,updatedLabel:i,statusLabel:s,statusTheme:l="surface",onView:c,onDuplicate:u,onDelete:d,viewLabel:f="Ver",duplicateLabel:h="Duplicar",deleteLabel:p="Eliminar",...g})=>{const[x,m]=P.useState(!1),v=P.useRef(null),b=()=>m(!1),w=[c&&{...tc,id:"view",title:f,leadingIcon:o.jsx(F.Eye,{}),onSelect:()=>{b(),c()}},u&&{...tc,id:"duplicate",title:h,leadingIcon:o.jsx(F.Copy,{}),onSelect:()=>{b(),u()}},d&&{...tc,id:"delete",title:p,leadingIcon:o.jsx(F.Trash,{}),customTitleColor:"text-danger-em",onSelect:()=>{b(),d()}}].filter(Boolean),C=w.length>0;return o.jsxs("div",{role:c?"button":void 0,onClick:c,className:te.twMerge(N.clsx("flex flex-col gap-4 p-6 border border-surface-3 rounded-2xl bg-white w-full min-w-0",c&&"cursor-pointer transition hover:border-surface-4",e)),...g,children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[o.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-4 bg-surface-2 text-high-em",children:o.jsx(ie,{size:"sm",children:t})}),o.jsx("span",{className:"truncate font-semibold text-high-em",children:r})]}),C&&o.jsxs("div",{className:"relative shrink-0",children:[o.jsx("button",{ref:v,type:"button","aria-label":"Opciones del widget",onClick:y=>{y.stopPropagation(),m(j=>!j)},className:"rounded-md p-1.5 text-low-em transition hover:bg-surface-2 hover:text-high-em",children:o.jsx(F.More,{size:20,color:"currentColor",className:"rotate-90"})}),x&&o.jsx(Wt,{size:"xs",triggerRef:v,onClose:b,items:w})]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[o.jsx(ft,{icon:o.jsx(F.Category,{}),label:n,labelSize:"sm",iconSize:"sm",gap:4}),a&&o.jsx(ft,{icon:o.jsx(F.Box,{}),label:a,labelSize:"sm",iconSize:"sm",gap:4}),i&&o.jsx(ft,{icon:o.jsx(F.Clock,{}),label:i,labelSize:"sm",iconSize:"sm",gap:4}),o.jsx(Ge,{variant:"simple",theme:l,children:s})]})]})};O3.displayName="WidgetSummaryCard";const pl=P.forwardRef(({className:e,title:t,description:r,icon:n,isDragging:a=!1,onMaximize:i,onTextBlock:s,onEdit:l,onCopy:c,onTrash:u,...d},f)=>{const[h,p]=P.useState("icon1"),g=m=>{switch(p(m),m){case"maximize":i?.();break;case"text-block":s?.();break;case"edit":l?.();break;case"copy":c?.();break;case"trash":u?.();break}},x=[...i?[{value:"maximize",icon:o.jsx(ie,{size:12,children:o.jsx(Gs,{})})}]:[],...s?[{value:"text-block",label:t}]:[],...l?[{value:"edit",icon:o.jsx(ie,{size:12,children:o.jsx(u2,{})})}]:[],...c?[{value:"copy",icon:o.jsx(ie,{size:12,children:o.jsx(Zs,{})})}]:[],...u?[{value:"trash",icon:o.jsx(ie,{size:12,children:o.jsx(Ys,{})})}]:[]];return o.jsxs("div",{ref:f,className:N.clsx("group relative flex flex-col border border-surface-3 rounded-8 w-full transition-colors bg-white",a&&"bg-surface-2 opacity-60",e),...d,children:[o.jsxs("div",{className:"flex flex-row p-4 gap-4",children:[o.jsx("div",{children:o.jsx(dl,{variant:"secondary",size:"sm",children:n})}),o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"text-high-em font-semibold text-sm font-family-space-grotesk",children:t}),o.jsx("span",{className:"text-med-em text-xs font-normal",children:r})]})]}),o.jsx("div",{className:"absolute inset-0 m-auto hidden w-fit h-fit p-4 group-hover:block",children:o.jsx(mr,{options:x,value:h,onChange:g,size:"xs",variant:"brand"})})]})});pl.displayName="WidgetBuilderItemHoverAction";const fP=({className:e,title:t,subtitle:r,image:n,imageAlt:a="Project image",actionButtons:i=[],labelIcons:s=[],...l})=>{const[c,u]=O.default.useState(!1);return o.jsxs("div",{className:N.clsx("flex flex-col rounded-2xl w-full border border-surface-3 h-full",e),...l,children:[o.jsxs("div",{className:"relative w-full h-48 overflow-hidden rounded-t-2xl",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[o.jsx("img",{src:n,alt:a,className:"w-full h-full object-cover"}),i.length>0&&c&&o.jsx("div",{className:"absolute inset-0 transition-opacity duration-300",style:{background:"linear-gradient(0deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%)"}}),i.length>0&&o.jsx("div",{className:N.clsx("absolute inset-0 flex items-center justify-center cursor-pointer gap-6 transition-opacity duration-300",c?"opacity-100":"opacity-0"),children:i.map((d,f)=>o.jsx(V,{variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:d.icon,size:"md",onClick:d.onClick,"aria-label":d.ariaLabel,className:"z-10 cursor-pointer"},f))})]}),o.jsxs("div",{className:"flex flex-col py-6 px-8 gap-3 bg-white rounded-b-2xl flex-1",children:[o.jsx("span",{className:"font-semibold text-high-em text-md line-clamp-1",children:t}),o.jsx("span",{className:"text-low-em text-sm font-normal line-clamp-3",children:r}),s.length>0&&o.jsx("div",{className:"flex flex-row gap-8",children:s.map((d,f)=>o.jsx(ft,{gap:4,iconSize:"sm",labelSize:"sm",icon:d.icon,label:d.label},f))})]})]})},hP=({className:e,title:t,subtitle:r,icon:n,iconType:a="default",iconVariant:i="secondary",iconSize:s="sm",headerActions:l,children:c,footerText:u,footerActions:d,footerVariant:f="default",classNameHeader:h,classNameBody:p,classNameFooter:g,...x})=>{const m=t||r||l||n,v=u||d,b={default:"border-surface-3 ",danger:"bg-danger-accent-1 border-danger-accent-3",warning:"bg-warning-accent-1 border-warning-accent-3",success:"bg-success-accent-1 border-success-accent-3"};return o.jsxs("div",{className:N.clsx("flex flex-col bg-white border rounded-8 w-full",e,b[f]),...x,children:[m&&o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-row gap-8 p-8 justify-between items-center",c&&"pb-0"),h),children:[o.jsxs("div",{className:"flex flex-row gap-8 items-center flex-1",children:[n&&o.jsx(dl,{type:a,variant:i,size:s,children:n}),(t||r)&&o.jsxs("div",{className:"flex flex-col gap-2",children:[t&&o.jsx("h3",{className:"text-high-em font-semibold text-md",children:t}),r&&o.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]})]}),l&&o.jsx("div",{className:"flex items-center",children:l})]}),c&&o.jsx("div",{className:te.twMerge(N.clsx("p-8",m),p),children:c}),v&&o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-row gap-10 p-8 items-center rounded-b-8",u&&d?"justify-between":d?"justify-end":"justify-start",(m||c)&&"border-t",b[f]),g),children:[u&&o.jsx("div",{className:"text-sm text-low-em",children:u}),d&&o.jsx("div",{children:d})]})]})},pP=({title:e,columns:t,rows:r,onChange:n,className:a,...i})=>{const s=`1fr repeat(${t.length}, auto)`,l=(c,u,d)=>o.jsx(Dr,{size:"small",checked:c.checked[d]??!1,disabled:c.disabled?.[d]??!1,onChange:f=>n(u,d,f.target.checked)});return o.jsxs("div",{className:te.twMerge("bg-white border border-surface-3 rounded-8 w-full overflow-hidden px-6",a),...i,children:[o.jsxs("div",{className:"hidden sm:grid gap-x-6",style:{gridTemplateColumns:s},children:[o.jsx("div",{className:"flex items-center py-6",children:e&&o.jsx("h3",{className:"text-base text-high-em font-normal",children:e})}),t.map(c=>o.jsx("div",{className:"flex items-center justify-center py-6 text-base text-med-em",children:c},c)),o.jsx("div",{className:"col-span-full",children:o.jsx(he,{})}),r.map((c,u)=>o.jsxs(O.default.Fragment,{children:[o.jsx("div",{className:"flex items-center py-5",children:o.jsx("span",{className:"text-sm text-high-em",children:c.label})}),t.map((d,f)=>o.jsx("div",{className:"flex items-center justify-center py-5",children:l(c,u,f)},f)),u<r.length-1&&o.jsx("div",{className:"col-span-full",children:o.jsx(he,{})})]},u))]}),o.jsxs("div",{className:"flex flex-col sm:hidden",children:[e&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"py-6",children:o.jsx("h3",{className:"text-base text-high-em font-normal",children:e})}),o.jsx(he,{})]}),r.map((c,u)=>o.jsxs(O.default.Fragment,{children:[o.jsxs("div",{className:"flex flex-col gap-4 py-5",children:[o.jsx("span",{className:"text-sm text-high-em",children:c.label}),o.jsx("div",{className:"flex flex-col gap-3",children:t.map((d,f)=>o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm text-med-em",children:d}),l(c,u,f)]},f))})]}),u<r.length-1&&o.jsx(he,{})]},u))]})]})},og=({size:e=20,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:e,height:e,className:t,...r,children:[o.jsx("path",{fill:"currentColor",d:"M4 8H12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{fill:"currentColor",d:"M8 12V4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),sg=({size:e=20,className:t,...r})=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",fill:"none",width:e,height:e,className:t,...r,children:[o.jsx("path",{d:"M4.5 11H7.5C10 11 11 10 11 7.5V4.5C11 2 10 1 7.5 1H4.5C2 1 1 2 1 4.5V7.5C1 10 2 11 4.5 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M6 1V11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),mP=[[4],[2,2],[3,1],[1,3],[2,1,1],[1,2,1],[1,1,2],[1,1,1,1]];function xP(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function gP(e){switch(e){case 1:return"w-1/4";case 2:return"w-1/2";case 3:return"w-3/4";case 4:return"w-full"}}const N3=P.createContext(void 0);function P3(){const e=P.useContext(N3);if(!e)throw new Error("Must be used inside DropLayoutPicker");return e}const gm=({children:e,value:t,onChange:r})=>{const[n,a]=P.useState(!1),i=P.useRef(null);return o.jsx(N3.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};gm.displayName="DropLayoutPicker";const vm=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=P3();return O.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};vm.displayName="DropLayoutPickerTrigger";const ym=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=P3(),s=P.useRef(null),[l,c]=P.useState(null),u=Gi({triggerRef:i,panelRef:s,enabled:t});return el({refs:[i,s],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u"?null:Ca.createPortal(o.jsxs("div",{ref:s,className:N.clsx("bg-white rounded-xl border border-surface-3 flex flex-col","min-w-[280px]",e),style:u,children:[o.jsx("div",{className:"p-5",children:o.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Column Layout"})}),o.jsx("div",{className:"border-t border-surface-3"}),o.jsx("div",{className:"p-5",children:o.jsx("div",{className:"grid grid-cols-4 gap-3",children:mP.map((d,f)=>{const h=xP(d,n),p=l===f;return o.jsx("div",{className:N.clsx("h-12 rounded-md cursor-pointer transition-colors border-2 p-1.5",p?"bg-info-accent-1 border-info-accent-2":h?"bg-info-accent-2 border-info-accent-3":"bg-surface-2 border-transparent hover:bg-surface-3"),onMouseEnter:()=>c(f),onMouseLeave:()=>c(null),onClick:()=>{a(d),r(!1)},children:o.jsx("div",{className:"flex gap-0.5 h-full",children:d.map((g,x)=>o.jsx("div",{className:N.clsx("bg-info-accent-3 rounded-sm",gP(g))},x))})},f)})})})]}),document.body)};ym.displayName="DropLayoutPickerContent";const Yi=({className:e,bodyClassName:t,disabled:r=!1,onMaximize:n,dragHandleProps:a,onGrid:i,onAdd:s,onCopy:l,onTrash:c,onAddWidget:u,layout:d,onLayoutChange:f,children:h,...p})=>{const[g,x]=P.useState(""),m=y=>{x(y),y==="grid"&&i?.(),y==="add"&&s?.(),y==="copy"&&l?.(),y==="trash"&&c?.()},v=d!==void 0&&f!==void 0,b=[...!v&&i?[{value:"grid",icon:o.jsx(sg,{size:12})}]:[],...s?[{value:"add",icon:o.jsx(og,{size:12})}]:[]],w=[...l?[{value:"copy",icon:o.jsx(Zs,{size:12})}]:[],...c?[{value:"trash",icon:o.jsx(Ys,{size:12})}]:[]],C=n||a||b.length>0||v;return o.jsxs("div",{className:N.clsx("relative flex flex-col border border-surface-3 w-full",e),...p,children:[o.jsxs("div",{className:"bg-surface-2 flex justify-between border-b border-surface-3 min-h-[28px]",children:[C&&o.jsxs("div",{className:"flex",children:[(n||a)&&o.jsx("button",{type:"button",className:N.clsx("h-[28px] px-[9.2px]","inline-flex items-center justify-center","border-none bg-transparent rounded-none","transition-colors duration-200",r?"opacity-50 cursor-not-allowed pointer-events-none":"hover:bg-surface-2 cursor-grab"),onClick:n,disabled:r,...a,children:o.jsx(Gs,{size:12})}),b.length>0&&o.jsx(mr,{options:b,value:g,onChange:m,size:"xs",variant:"secondary",disabled:r,buttonClassName:"rounded-none"}),v&&d&&f&&o.jsxs(gm,{value:d,onChange:f,children:[o.jsx(vm,{children:o.jsx("button",{type:"button",className:N.clsx("h-[28px] px-[9.2px] text-[10px]","inline-flex items-center justify-center","font-semibold whitespace-nowrap text-high-em","border-none rounded-none bg-transparent","transition-colors duration-200",!r&&"hover:bg-surface-2",r&&"opacity-50 cursor-not-allowed pointer-events-none"),disabled:r,children:o.jsx(sg,{size:12})})}),o.jsx(ym,{})]})]}),w.length>0&&o.jsx(mr,{options:w,value:g,onChange:m,size:"xs",variant:"secondary",disabled:r,buttonClassName:"rounded-none"})]}),o.jsxs("div",{className:N.clsx("flex flex-col p-4 gap-4 h-full",t),children:[o.jsx("div",{className:"flex flex-col gap-4",children:h}),u&&o.jsx("div",{className:"flex justify-center",children:o.jsx(V,{size:"sm",variant:"neutral",hierarchy:"secondary",icons:"only",leadingIcon:o.jsx(og,{}),onClick:u})})]})]})},A3=e=>"grid-cols-4",_3=(e,t)=>{const r=e[t];if(!r)return"col-span-1";switch(r){case 1:return"col-span-1";case 2:return"col-span-2";case 3:return"col-span-3";case 4:return"col-span-4";default:return"col-span-1"}},vP=["maximize","grid","add","copy","trash","addWidget"],yP=["maximize","text-block","edit","copy","trash"],bP=({widget:e,index:t,columnId:r,sectionId:n,onWidgetAction:a,widgetActionSet:i,renderWidgetIcon:s})=>{const{attributes:l,listeners:c,setNodeRef:u,isDragging:d}=dt.useSortable({id:`vc-widget-${e.id}`,data:{type:"vc-widget",widgetId:e.id,widgetTitle:e.title,widgetDescription:e.description,widgetIndex:t,columnId:r,sectionId:n},animateLayoutChanges:()=>!1}),f=P.useRef(null),h=p=>a&&i.has(p)?()=>a(p,e.id,f.current):void 0;return o.jsx("div",{ref:u,"data-vc-widget":e.id,style:{display:d?"none":void 0,cursor:"grab",touchAction:"none"},...l,...c,children:o.jsx(pl,{ref:f,title:e.title,description:e.description,icon:s?.(e)??o.jsx(ie,{}),onMaximize:h("maximize"),onTextBlock:h("text-block"),onEdit:h("edit"),onCopy:h("copy"),onTrash:h("trash")})})},wP=({widget:e,index:t,columnId:r,sectionId:n,onSectionAction:a,sectionActionSet:i,onColumnAction:s,onWidgetAction:l,widgetActionSet:c,renderWidgetIcon:u,onLayoutChange:d})=>{const{attributes:f,listeners:h,setNodeRef:p,isDragging:g}=dt.useSortable({id:`vc-widget-${e.id}`,data:{type:"vc-widget",widgetId:e.id,widgetTitle:e.title,widgetDescription:e.description,widgetIndex:t,columnId:r,sectionId:n},animateLayoutChanges:()=>!1});if(!e.nestedSection)return null;const x=e.nestedSection,m=A3(x.layout),v=w=>a&&i.has(w)?()=>a(w,x.id):void 0,b=x.columns.map(w=>`vc-col-${w.id}`);return o.jsx("div",{ref:p,"data-vc-widget":e.id,style:{display:g?"none":void 0,touchAction:"none"},...f,children:o.jsx(Yi,{bodyClassName:"bg-white",onMaximize:v("maximize"),dragHandleProps:h,onGrid:v("grid"),onAdd:v("add"),onCopy:v("copy"),onTrash:v("trash"),layout:d?x.layout:void 0,onLayoutChange:d?w=>d(x.id,w):void 0,children:o.jsx(dt.SortableContext,{items:b,strategy:dt.horizontalListSortingStrategy,children:o.jsx("div",{className:N.clsx("grid gap-4",m),children:x.columns.map((w,C)=>{const y=_3(x.layout,C);return o.jsx(k3,{column:w,sectionId:x.id,sectionLayout:x.layout,columnSpan:y,onColumnAction:s,onWidgetAction:l,widgetActionSet:c,renderWidgetIcon:u,onSectionAction:a,sectionActionSet:i,onLayoutChange:d},w.id)})})})})})},k3=({column:e,sectionId:t,sectionLayout:r,columnSpan:n,onColumnAction:a,onWidgetAction:i,widgetActionSet:s,renderWidgetIcon:l,onSectionAction:c,sectionActionSet:u,onLayoutChange:d})=>{const{setNodeRef:f,listeners:h,attributes:p,transform:g,isDragging:x}=dt.useSortable({id:`vc-col-${e.id}`,data:{type:"vc-column",columnId:e.id,sectionId:t},animateLayoutChanges:()=>!1}),[m,v]=P.useState(!1),[b,w]=P.useState(null);lt.useDndMonitor({onDragOver(A){const _=A.over?.data.current??{},I=_.columnId===e.id;v(I),w(I&&typeof _.widgetIndex=="number"?_.widgetIndex:null)},onDragEnd(){v(!1),w(null)},onDragCancel(){v(!1),w(null)}});const C=m,y=A=>a?()=>a(A,e.id,t):void 0,j=[...e.widgets].sort((A,_)=>A.position-_.position),S=j.map(A=>`vc-widget-${A.id}`);return o.jsxs("div",{ref:f,"data-droppable-id":`vc-col-${e.id}`,...p,style:{transform:Gp.CSS.Translate.toString(g),transition:x?"none":"transform 150ms ease",opacity:x?0:1},className:N.clsx(n,"flex flex-col",r.length>1&&"border border-surface-3"),children:[r.length>1&&o.jsx(nm,{onDrag:y("drag"),dragHandleProps:h,onDuplicate:y("duplicate"),onDelete:y("delete")}),o.jsxs("div",{className:N.clsx("flex flex-col gap-4 p-4","min-h-[200px]","bg-white"),children:[o.jsxs(dt.SortableContext,{items:S,strategy:dt.verticalListSortingStrategy,children:[j.map((A,_)=>o.jsxs(O.default.Fragment,{children:[C&&b===_&&o.jsx(ci,{}),A.type==="nested-row"?o.jsx(wP,{widget:A,index:_,columnId:e.id,sectionId:t,onSectionAction:c,sectionActionSet:u,onColumnAction:a,onWidgetAction:i,widgetActionSet:s,renderWidgetIcon:l,onLayoutChange:d}):o.jsx(bP,{widget:A,index:_,columnId:e.id,sectionId:t,onWidgetAction:i,widgetActionSet:s,renderWidgetIcon:l})]},A.id)),C&&(b===null||b>=j.length)&&o.jsx(ci,{})]}),!C&&(j.length===0?o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(F.Add,{}),onClick:y("drag")})}):o.jsx("div",{className:"flex items-center justify-center pt-2",children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(F.Add,{}),onClick:y("drag")})}))]})]})},jP=({emptyStateDescription:e})=>{const{setNodeRef:t,isOver:r}=lt.useDroppable({id:"vc-empty-state",data:{isEmpty:!0}});return o.jsx("div",{ref:t,className:"w-64",children:o.jsx(Yi,{bodyClassName:N.clsx("bg-white",r&&"!bg-surface-1"),disabled:!0,onMaximize:()=>{},onGrid:()=>{},onAdd:()=>{},onCopy:()=>{},onTrash:()=>{},onAddWidget:()=>{},children:o.jsx(ht,{flat:!0,description:e,className:"bg-transparent"})})})},CP=()=>{const{setNodeRef:e}=lt.useDroppable({id:"vc-new-row",data:{isNewRow:!0}});return o.jsx("div",{ref:e,className:"mt-4 min-h-[0px]"})},SP=({onWidgetDrop:e,onColumnReorder:t,onSectionReorder:r})=>(lt.useDndMonitor({onDragEnd(n){const{active:a,over:i}=n;if(!i?.id||typeof i.id!="string")return;const s=i.id,l=i.data.current??{},c=a.data.current??{};if(c.type==="vc-column"){let u;s.startsWith("vc-col-")?u=s.replace("vc-col-",""):s.startsWith("vc-widget-")&&(u=l.columnId),t&&u&&u!==c.columnId&&t(c.columnId,c.sectionId,u);return}if(c.type==="vc-section"){r&&s&&!s.startsWith("vc-")&&r(c.sectionId,s);return}if(s==="vc-empty-state")e?.("__empty__","__empty__",0,c);else if(s==="vc-new-row")e?.("__new_row__","__new_row__",-1,c);else if(s.startsWith("vc-widget-")){const{columnId:u,sectionId:d,widgetIndex:f}=l,h=c.columnId!==void 0&&c.columnId!==u;u&&d&&e?.(u,d,h?-1:f,c)}else if(s.startsWith("vc-col-")){const{columnId:u,sectionId:d}=l;u&&d&&e?.(u,d,-1,c)}}}),null),OP=({section:e,sectionActionSet:t,widgetActionSet:r,onSectionAction:n,onColumnAction:a,onWidgetAction:i,renderWidgetIcon:s,onWidgetDrop:l,onLayoutChange:c})=>{const{setNodeRef:u,listeners:d,attributes:f,transform:h,isDragging:p}=dt.useSortable({id:e.id,data:{type:"vc-section",sectionId:e.id},animateLayoutChanges:()=>!1}),g=A3(e.layout),x=v=>n&&t.has(v)?()=>n(v,e.id):void 0,m=e.columns.map(v=>`vc-col-${v.id}`);return o.jsx("div",{ref:u,...f,style:{transform:Gp.CSS.Translate.toString(h),transition:p?"none":"transform 150ms ease",opacity:p?0:1},children:o.jsx(Yi,{bodyClassName:"bg-white",onMaximize:x("maximize"),dragHandleProps:d,onAdd:x("add"),onCopy:x("copy"),onTrash:x("trash"),layout:c?e.layout:void 0,onLayoutChange:c?v=>c(e.id,v):void 0,children:o.jsx(dt.SortableContext,{items:m,strategy:dt.horizontalListSortingStrategy,children:o.jsx("div",{className:N.clsx("grid gap-4",g),children:e.columns.map((v,b)=>{const w=_3(e.layout,b);return l?o.jsx(k3,{column:v,sectionId:e.id,sectionLayout:e.layout,columnSpan:w,onColumnAction:a,onWidgetAction:i,widgetActionSet:r,renderWidgetIcon:s,onSectionAction:n,sectionActionSet:t,onLayoutChange:c},v.id):o.jsxs("div",{"data-droppable-id":`vc-col-${v.id}`,className:N.clsx(w,"flex flex-col",e.layout.length>1&&"border border-surface-3"),children:[e.layout.length>1&&o.jsx(nm,{onDrag:a?()=>a("drag",v.id,e.id):void 0,onDuplicate:a?()=>a("duplicate",v.id,e.id):void 0,onDelete:a?()=>a("delete",v.id,e.id):void 0}),o.jsxs("div",{className:"flex flex-col gap-4 p-4 min-h-[120px] bg-white",children:[v.widgets.sort((C,y)=>C.position-y.position).map(C=>{const y=j=>i&&r.has(j)?()=>i(j,C.id,null):void 0;return o.jsx(pl,{title:C.title,description:C.description,icon:s?.(C)??o.jsx(ie,{}),onMaximize:y("maximize"),onTextBlock:y("text-block"),onEdit:y("edit"),onCopy:y("copy"),onTrash:y("trash")},C.id)}),v.widgets.length===0?o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(F.Add,{}),onClick:a?()=>a("drag",v.id,e.id):void 0})}):o.jsx("div",{className:"flex items-center justify-center pt-2",children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(F.Add,{}),onClick:a?()=>a("drag",v.id,e.id):void 0})})]})]},v.id)})})})})})},NP=({className:e,data:t,emptyStateDescription:r="No sections yet",onSectionAction:n,sectionActions:a,onColumnAction:i,onWidgetAction:s,widgetActions:l,renderWidgetIcon:c,onWidgetDrop:u,onLayoutChange:d,onColumnReorder:f,onSectionReorder:h,...p})=>{const g=[...t?.sections??[]].sort((b,w)=>b.position-w.position),x=new Set(n?a??vP:[]),m=new Set(s?l??yP:[]),v=g.map(b=>b.id);return o.jsxs("div",{className:N.clsx("flex flex-col w-full h-full",e),...p,children:[(u||f||h)&&o.jsx(SP,{onWidgetDrop:u,onColumnReorder:f,onSectionReorder:h}),o.jsx("div",{className:N.clsx("flex-1 bg-surface-bg",g.length===0?"flex items-center justify-center p-8":"flex flex-col gap-4 p-8"),children:g.length===0?u?o.jsx(jP,{emptyStateDescription:r}):o.jsx("div",{className:"w-64",children:o.jsx(Yi,{bodyClassName:"bg-white",disabled:!0,onMaximize:()=>{},onGrid:()=>{},onAdd:()=>{},onCopy:()=>{},onTrash:()=>{},onAddWidget:()=>{},children:o.jsx(ht,{flat:!0,description:r,className:"bg-transparent"})})}):o.jsxs(o.Fragment,{children:[o.jsx(dt.SortableContext,{items:v,strategy:dt.verticalListSortingStrategy,children:g.map(b=>o.jsx(OP,{section:b,sectionActionSet:x,widgetActionSet:m,onSectionAction:n,onColumnAction:i,onWidgetAction:s,renderWidgetIcon:c,onWidgetDrop:u,onLayoutChange:d,onColumnReorder:f},b.id))}),u&&o.jsx(CP,{})]})})]})},PP=e=>{const t=lt.pointerWithin(e);if(t.length===0)return lt.closestCenter(e);const{droppableRects:r,droppableContainers:n,pointerCoordinates:a}=e,i=c=>{const u=r.get(c.id);return u?u.width*u.height:Number.POSITIVE_INFINITY},s=[...t].sort((c,u)=>i(c)-i(u))[0];if(String(s.id).startsWith("vc-col-")&&a){const c=s.data?.droppableContainer?.data.current?.columnId;if(c){const u=Array.from(n.values()).filter(d=>typeof d.id=="string"&&d.id.startsWith("vc-widget-")&&d.data.current?.columnId===c).map(d=>({container:d,rect:r.get(d.id)})).filter(d=>!!d.rect).sort((d,f)=>d.rect.top-f.rect.top);for(const d of u)if(a.y<d.rect.top+d.rect.height/2)return[{id:d.container.id,data:{droppableContainer:d.container,value:0}}]}}return[s]},AP={sm:"max-w-[300px] w-full",md:"w-[32rem]",lg:"w-[40rem]"},bm={sm:{header:"py-1 px-2",body:"p-6",footer:"p-4"},md:{header:"py-1 px-2",body:"p-8",footer:"p-4"},lg:{header:"py-1 px-2",body:"p-10",footer:"p-4"}},T3=P.createContext(void 0),xn=()=>{const e=P.useContext(T3);if(!e)throw new Error("useDropModalContext must be used within a DropModal");return e},Wn=({children:e,size:t="md",padding:r,open:n,onClose:a,triggerRef:i})=>{const[s,l]=P.useState(!1),c=P.useRef(null),u=n!==void 0,d=u?n:s,f=p=>{u||l(p),p||a?.()},h=i??c;return o.jsx(T3.Provider,{value:{open:d,setOpen:f,size:t,padding:r??t,triggerRef:h},children:e})};Wn.displayName="DropModal";const wm=({children:e})=>{const{setOpen:t,open:r,triggerRef:n}=xn();return O.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),t(!r)}})};wm.displayName="DropModalTrigger";const Hn=P.forwardRef(({children:e,className:t},r)=>{const{open:n,setOpen:a,size:i,triggerRef:s}=xn(),l=()=>a(!1),{panelRef:c,portalStyle:u,backdropProps:d}=Q6({triggerRef:s,open:n,onClose:l,constrain:!0});return!n||typeof document>"u"?null:Ca.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{...d}),o.jsx("div",{ref:f=>{c.current=f,typeof r=="function"?r(f):r&&(r.current=f)},role:"dialog","aria-modal":"true",className:N.clsx("bg-white rounded-2xl shadow-xl flex flex-col border border-surface-3 overflow-hidden",AP[i],t),style:u,children:e})]}),document.body)});Hn.displayName="DropModalContent";const Vn=({children:e,disabled:t=!1,className:r,leftIcon:n,onLeftAction:a,leftButtonRef:i,rightIcon:s,onRightAction:l,rightButtonRef:c})=>{const{setOpen:u,padding:d}=xn(),f=bm[d];return o.jsxs("header",{className:N.clsx("flex items-center border-b border-surface-3 shrink-0 rounded-t-xl",f.header,r),children:[o.jsx(V,{ref:i,variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",className:N.clsx("cursor-pointer",!n&&"invisible"),leadingIcon:n&&o.jsx(ie,{size:"sm",children:n}),onClick:a,disabled:t||!a}),o.jsx("div",{className:"flex-1 flex justify-center items-center",children:e}),o.jsx(V,{ref:c,variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",className:"cursor-pointer",leadingIcon:o.jsx(ie,{size:"sm",children:s??o.jsx(nt,{className:"text-high-em"})}),onClick:l??(()=>u(!1)),disabled:t})]})};Vn.displayName="DropModalHeader";const jm=P.forwardRef(({className:e,...t},r)=>o.jsx("h3",{ref:r,className:N.clsx("font-semibold text-xs leading-tight text-center text-high-em",e),...t}));jm.displayName="DropModalTitle";const Un=({children:e,className:t,padding:r})=>{const{padding:n}=xn(),a=bm[n],i=r??!t;return o.jsx("main",{className:N.clsx(i&&a.body,"flex-1 overflow-y-auto",t),children:e})};Un.displayName="DropModalBody";const Cm=({className:e,children:t,...r})=>{const{padding:n}=xn(),a=bm[n];return o.jsx("footer",{className:N.clsx("flex items-center border-t border-surface-3 shrink-0",a.footer,e),...r,children:t})};Cm.displayName="DropModalFooter";const Kn=({cancelButton:e,saveButton:t,className:r})=>{const{setOpen:n,size:a}=xn(),i=a==="sm",s=(l,c)=>{l.onClick?.(c),l.closeOnClick!==!1&&n(!1)};return o.jsx(Cm,{className:N.clsx(i?"flex-row gap-5":"justify-end",r),children:o.jsxs("div",{className:N.clsx("flex",i?"flex-row gap-5 w-full justify-end":"gap-5"),children:[e&&o.jsx(V,{variant:e.variant||"neutral",hierarchy:e.hierarchy||"primary",size:e.size||"xs",...e,className:e.className,onClick:l=>s(e,l),children:e.label}),t&&o.jsx(V,{variant:t.variant||"secondary",hierarchy:t.hierarchy||"primary",size:t.size||"xs",...t,className:t.className,onClick:l=>s(t,l),children:t.label})]})})};Kn.displayName="DropModalFooterActions";const E3=({children:e})=>{const{setOpen:t}=xn();return O.default.cloneElement(e,{onClick:r=>{e.props.onClick?.(r),t(!1)}})};E3.displayName="DropModalClose";const Mo=2;function _P(e,t,r,n){const a=e%Mo,i=Math.floor(e/Mo),s=t!==null&&a<=t.colIdx&&i<=t.rowIdx,l=a<r&&i<n;return{colIdx:a,rowIdx:i,isHovered:s,isActive:l}}function kP(e,t){return N.clsx("w-12 h-12 rounded-md cursor-pointer transition-colors border-2",e?"bg-info-accent-1 border-info-accent-2":t?"bg-info-accent-2 border-info-accent-3":"bg-surface-2 border-transparent")}function TP(){return[1,2].map(e=>({id:String(e),title:String(e),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1}))}const I3=P.createContext(void 0);function M3(){const e=P.useContext(I3);if(!e)throw new Error("Must be used inside DropSizePicker");return e}const lg=({value:e,onChange:t})=>{const[r,n]=P.useState(!1),a=P.useRef(null);return P.useEffect(()=>{if(!r)return;const i=s=>{a.current?.contains(s.target)||n(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[r]),o.jsxs("div",{ref:a,className:"flex-1 relative",children:[o.jsxs("button",{type:"button",onClick:()=>n(i=>!i),className:N.clsx("w-full flex items-center h-[38px] rounded-xl border cursor-pointer","bg-surface-2 border-transparent hover:bg-surface-3 transition-colors","focus:outline-none focus-visible:ring-2 pl-3.5 pr-3.5"),children:[o.jsx("span",{className:"flex-1 text-sm font-medium text-med-em text-left",children:e}),o.jsx("span",{className:"text-med-em flex items-center shrink-0",children:r?o.jsx(F.ArrowUp2,{size:16,color:"currentColor"}):o.jsx(F.ArrowDown2,{size:16,color:"currentColor"})})]}),r&&o.jsx(Wt,{floating:!0,size:"sm",items:TP().map(i=>({...i,className:"!min-w-0",onSelect:()=>{t(Number(i.id)),n(!1)}})),selectedIds:[String(e)],className:"w-full top-full mt-1"})]})},Sm=({children:e,value:t,onChange:r})=>{const[n,a]=P.useState(!1),i=P.useRef(null);return o.jsx(I3.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};Sm.displayName="DropSizePicker";const Om=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=M3();return O.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};Om.displayName="DropSizePickerTrigger";const Nm=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=M3(),s=P.useRef(null),[l,c]=P.useState(null),u=Gi({triggerRef:i,panelRef:s,enabled:t});if(el({refs:[i,s],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u")return null;const{cols:d,rows:f}=n;return Ca.createPortal(o.jsxs("div",{ref:s,className:N.clsx("bg-white rounded-xl border border-surface-3 flex flex-col","min-w-[200px]",e),style:u,children:[o.jsx("div",{className:"p-5",children:o.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Size"})}),o.jsx("div",{className:"border-t border-surface-3"}),o.jsxs("div",{className:"flex items-center gap-3 p-5",children:[o.jsx("span",{className:"text-med-em flex items-center shrink-0",children:o.jsx(F.RowVertical,{size:16,color:"currentColor"})}),o.jsx(lg,{value:d,onChange:h=>a({cols:h,rows:f})})]}),o.jsxs("div",{className:"flex items-center gap-3 p-5",children:[o.jsx("span",{className:"text-med-em flex items-center shrink-0",children:o.jsx(F.RowHorizontal,{size:16,color:"currentColor"})}),o.jsx(lg,{value:f,onChange:h=>a({cols:d,rows:h})})]}),o.jsx("div",{className:"border-t border-surface-3"}),o.jsx("div",{className:"p-5 flex justify-center",children:o.jsx("div",{className:"grid grid-cols-2 gap-3",children:Array.from({length:Mo*Mo},(h,p)=>{const{colIdx:g,rowIdx:x,isHovered:m,isActive:v}=_P(p,l,d,f);return o.jsx("div",{className:kP(m,v),onMouseEnter:()=>c({colIdx:g,rowIdx:x}),onMouseLeave:()=>c(null),onClick:()=>a({cols:g+1,rows:x+1})},p)})})})]}),document.body)};Nm.displayName="DropSizePickerContent";const EP={1:"w-[400px] h-[400px]","2h":"w-[825px] h-[400px]","2w":"w-[400px] h-[825px]",4:"w-[825px] h-[825px]"},gn=({size:e="1",title:t,actions:r,children:n,className:a,classNameHeader:i,classNameBody:s,clipBody:l=!1})=>{const c=t||r;return o.jsxs("div",{className:te.twMerge(N.clsx("flex flex-col bg-white border border-surface-3 rounded-6",EP[e]),a),children:[c&&o.jsxs("div",{className:te.twMerge(N.clsx("flex items-center justify-between p-8 border-b border-surface-3"),i),children:[t&&o.jsx("h3",{className:"text-med-em font-semibold text-xl",children:t}),r&&o.jsx("div",{className:"flex items-center gap-4",children:r})]}),o.jsx("div",{className:te.twMerge(N.clsx("flex-1 p-8 overflow-auto",l&&"overflow-hidden"),s),children:n})]})},IP=({mode:e,title:t,actions:r,onSubmit:n,onSettings:a,className:i,texts:s})=>{const[l,c]=P.useState(""),[u,d]=P.useState(""),[f,h]=P.useState(""),[p,g]=P.useState(""),[x,m]=P.useState(!1),[v,b]=P.useState(!1),w=e==="signup",C=s?.heading??"¡Automatiza!",y=s?.subheading??"Vende y gestiona con inteligencia",j=s?.namePlaceholder??"Nombre",S=s?.emailPlaceholder??"Correo",A=s?.passwordPlaceholder??(w?"Nueva contraseña":"Contraseña"),_=s?.confirmPasswordPlaceholder??"Confirmar contraseña",I=s?.submitLabel??"Continuar",k=E=>{E.preventDefault();const T={email:u,password:f,...w&&{name:l,confirmPassword:p}};n?.(T)};return o.jsx(gn,{size:"1",className:i,title:t??(w?"Regístrarse":"Iniciar sesión"),actions:r===null?void 0:r??o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(F.Setting,{})}),onClick:a}),children:o.jsxs("form",{onSubmit:k,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[!w&&o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:C}),o.jsx("span",{className:"text-high-em text-md self-center",children:y})]}),w&&o.jsx(xe,{type:"text",name:"name",autoComplete:"name",value:l,onChange:E=>c(E.target.value),placeholder:j,required:!0}),o.jsx(xe,{type:"email",name:"email",autoComplete:"email",value:u,onChange:E=>d(E.target.value),placeholder:S,required:!0}),o.jsx(xe,{type:x?"text":"password",name:"password",autoComplete:w?"new-password":"current-password",value:f,onChange:E=>h(E.target.value),placeholder:A,trailingIcon:o.jsx(ie,{children:x?o.jsx(F.Eye,{onClick:()=>m(!1),className:"cursor-pointer"}):o.jsx(F.EyeSlash,{onClick:()=>m(!0),className:"cursor-pointer"})}),required:!0}),w&&o.jsx(xe,{type:v?"text":"password",name:"confirmPassword",autoComplete:"new-password",value:p,onChange:E=>g(E.target.value),placeholder:_,trailingIcon:o.jsx(ie,{children:v?o.jsx(F.Eye,{onClick:()=>b(!1),className:"cursor-pointer"}):o.jsx(F.EyeSlash,{onClick:()=>b(!0),className:"cursor-pointer"})}),required:!0}),o.jsx(V,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:I})]})})},MP=({title:e="Recuperación",actions:t,step:r,type:n="password",onSubmit:a,onBackToLogin:i,onSettings:s,className:l,texts:c})=>{const[u,d]=P.useState(""),f=C=>{C.preventDefault(),a?.(u)},h=r==="email",p=n==="account",g=c?.heading??(h&&p?"Recuperar cuenta":"Recuperar contraseña"),x=c?.placeholder??(h?"Correo":"Código de verificación"),m=c?.hint??(h?"Un código será enviado a tu correo":"Ingresa el código enviado a tu correo"),v=c?.submitLabel??"Continuar",b=c?.backToLoginPrompt??"¿Todo bien? ",w=c?.backToLoginLabel??"Iniciar sesión";return o.jsx(gn,{size:"1",className:l,title:e,actions:t===null?void 0:t??o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(F.Setting,{})}),onClick:s}),children:o.jsxs("form",{onSubmit:f,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[o.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:g}),o.jsx(xe,{type:h?"email":"text",value:u,onChange:C=>d(C.target.value),placeholder:x,hint:m,required:!0}),o.jsx(V,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:v}),o.jsxs("div",{className:"text-center text-sm gap-4",children:[o.jsx("span",{className:"text-med-em text-sm font-semibold",children:b}),o.jsx($r,{onClick:i,size:"sm",variant:"info",className:"cursor-pointer font-semibold",children:w})]})]})})},$P=({title:e="Recuperación",actions:t,onSubmit:r,onBackToLogin:n,onSettings:a,className:i,texts:s})=>{const[l,c]=P.useState(""),[u,d]=P.useState(""),[f,h]=P.useState(!1),[p,g]=P.useState(!1),x=s?.heading??"Cambiar contraseña",m=s?.passwordPlaceholder??"Nueva contraseña",v=s?.confirmPasswordPlaceholder??"Confirmar contraseña",b=s?.submitLabel??"Continuar",w=s?.backToLoginPrompt??"¿Todo bien? ",C=s?.backToLoginLabel??"Iniciar sesión",y=j=>{j.preventDefault(),r?.(l,u)};return o.jsx(gn,{size:"1",className:i,title:e,actions:t===null?void 0:t??o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(F.Setting,{})}),onClick:a}),children:o.jsxs("form",{onSubmit:y,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[o.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:x}),o.jsx(xe,{type:f?"text":"password",value:l,onChange:j=>c(j.target.value),placeholder:m,trailingIcon:o.jsx(ie,{children:f?o.jsx(F.Eye,{onClick:()=>h(!1),className:"cursor-pointer"}):o.jsx(F.EyeSlash,{onClick:()=>h(!0),className:"cursor-pointer"})}),required:!0}),o.jsx(xe,{type:p?"text":"password",value:u,onChange:j=>d(j.target.value),placeholder:v,trailingIcon:o.jsx(ie,{children:p?o.jsx(F.Eye,{onClick:()=>g(!1),className:"cursor-pointer"}):o.jsx(F.EyeSlash,{onClick:()=>g(!0),className:"cursor-pointer"})}),required:!0}),o.jsx(V,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:b}),o.jsxs("div",{className:"text-center text-sm gap-4",children:[o.jsx("span",{className:"text-med-em text-sm font-semibold",children:w}),o.jsx($r,{onClick:n,size:"md",variant:"info",className:"cursor-pointer font-semibold",children:C})]})]})})},RP=({title:e="Autenticación",actions:t,onRecover:r,onSettings:n,className:a,texts:i})=>{const s=i?.prompt??"¿Olvidaste tu contraseña?",l=i?.recoverLabel??"Recuperar";return o.jsx(gn,{size:"1",className:a,title:e,actions:t===null?void 0:t??o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(F.Setting,{})}),onClick:n}),children:o.jsxs("div",{className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[o.jsx("span",{className:"text-med-em text-md self-center font-semibold",children:s}),o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"lg",onClick:r,className:"w-full",children:l})]})})},LP=({title:e="Autenticación",actions:t,onGoogleSignIn:r,onAppleSignIn:n,onAction:a,onSettings:i,actionPrompt:s="¿Ya tienes una cuenta?",actionLabel:l="Iniciar sesión",className:c,texts:u})=>{const d=u?.googleLabel??"Continuar con Google",f=u?.appleLabel??"Continuar con Apple";return o.jsx(gn,{size:"1",className:c,title:e,actions:t===null?void 0:t??o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(F.Setting,{})}),onClick:i}),children:o.jsxs("div",{className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"lg",icons:"leading",leadingIcon:o.jsx(ie,{children:o.jsx(F.Google,{})}),onClick:r,className:"w-full",children:d}),o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"lg",icons:"leading",leadingIcon:o.jsx(ie,{children:o.jsx(F.Apple,{})}),onClick:n,children:f}),o.jsx(he,{}),o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx("span",{className:"text-med-em text-md font-semibold text-center",children:s}),o.jsx(V,{variant:"secondary",hierarchy:"primary",size:"lg",onClick:a,className:"w-full",children:l})]})]})})},DP=({length:e=6,onComplete:t})=>{const[r,n]=P.useState(Array(e).fill("")),a=P.useRef([]),i=(c,u)=>{if(!/^\d*$/.test(u))return;const d=[...r];d[c]=u.slice(-1),n(d),u&&c<e-1&&a.current[c+1]?.focus();const f=d.join("");f.length===e&&!d.includes("")&&t?.(f)},s=(c,u)=>{u.key==="Backspace"&&!r[c]&&c>0&&a.current[c-1]?.focus()},l=c=>{c.preventDefault();const u=c.clipboardData.getData("text").replace(/\D/g,"").slice(0,e),d=[...r];u.split("").forEach((h,p)=>{d[p]=h}),n(d);const f=d.findIndex(h=>!h);a.current[f===-1?e-1:f]?.focus(),u.length===e&&t?.(u)};return o.jsx("div",{className:"flex gap-3 justify-center",children:r.map((c,u)=>o.jsx("input",{ref:d=>{a.current[u]=d},type:"text",inputMode:"numeric",maxLength:1,value:c,onChange:d=>i(u,d.target.value),onKeyDown:d=>s(u,d),onPaste:u===0?l:void 0,className:"w-14 h-14 text-center text-xl font-semibold border border-surface-3 rounded-lg focus:outline-none focus:border-info-main focus:ring-1 focus:ring-info-main bg-white text-high-em"},u))})},zP=({title:e="Confirmar Email",heading:t="Verificar Correo",description:r="Ingresa el código de 6 dígitos enviado a tu correo",length:n=6,actions:a,onComplete:i,onResend:s,onBackToLogin:l,onSettings:c,className:u,texts:d})=>{const f=d?.resendLabel??"Reenviar código",h=d?.backToLoginPrompt??"¿Todo bien? ",p=d?.backToLoginLabel??"Iniciar sesión";return o.jsxs(gn,{size:"1",className:u,classNameBody:"flex flex-col gap-8 h-full mx-auto justify-center max-w-90",title:e,actions:a===null?void 0:a??o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{children:o.jsx(F.Setting,{})}),onClick:c}),children:[o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:t}),o.jsx("span",{className:"text-high-em text-md self-center text-center",children:r})]}),o.jsx(DP,{length:n,onComplete:i}),o.jsx(V,{type:"button",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",onClick:s,children:f}),o.jsxs("div",{className:"text-center",children:[o.jsx("span",{className:"text-med-em text-sm font-semibold",children:h}),o.jsx($r,{onClick:l,size:"md",variant:"info",className:"cursor-pointer font-semibold",children:p})]})]})},Pm=({title:e="Module",onSettingsClick:t,className:r,showSettings:n=!0})=>o.jsx("div",{className:N.clsx("drag-handle px-6 py-4 border-b border-surface-3 bg-surface-1 cursor-move rounded-t-xl",r),children:o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex gap-5 items-center",children:[o.jsx(F.Grid5,{size:24,color:"var(--high-em)"}),o.jsx("h2",{className:"text-[16px] font-semibold text-med-em flex-1 text-center",children:e})]}),n&&o.jsx("div",{className:"flex items-center gap-3",children:o.jsx("button",{onClick:t,className:"p-1 hover:bg-surface-2 rounded transition-colors","aria-label":"Configure module",type:"button",children:o.jsx(F.Setting,{size:24,color:"var(--high-em)"})})})]})}),$3=({title:e="Module",onSettingsClick:t,showSettings:r=!0,children:n,className:a,minWidth:i=300,maxWidth:s=300,emptyState:l})=>{const c=O.default.Children.count(n)>0;return o.jsxs("div",{className:N.clsx("bg-white rounded-xl border border-surface-3 overflow-hidden",a),style:{minWidth:`${i}px`,maxWidth:`${s}px`},children:[o.jsx(Pm,{title:e,onSettingsClick:t,showSettings:r}),o.jsx("div",{className:"overflow-hidden",style:{minHeight:"200px"},children:c?n:l})]})};Pm.displayName="ModuleCardHeader";$3.displayName="ModuleCard";const R3=O.default.forwardRef(({type:e,label:t="New Field",description:r="Description",isSelected:n=!1,isLast:a=!1,onClick:i,onDelete:s,showActions:l=!0,className:c,dragHandleProps:u,innerRef:d,style:f},h)=>{const[p,g]=O.default.useState(!1),x=p&&l,m=d||h;return o.jsxs("div",{ref:m,style:f,className:N.clsx("relative",c),children:[o.jsx("div",{onClick:i,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),className:N.clsx("w-full text-left m-0 cursor-pointer overflow-hidden",n?"bg-surface-3":"hover:bg-surface-1"),children:o.jsx("div",{className:"pr-6",children:o.jsxs("div",{className:"flex justify-between items-center overflow-hidden min-h-[60px]",children:[o.jsxs("div",{className:"flex min-w-0 flex-1 justify-start items-stretch self-stretch",children:[o.jsx("div",{className:"self-stretch flex overflow-hidden transition-all duration-200 ease-out",style:{width:x?"30px":"0px",opacity:x?1:0},children:o.jsxs("div",{onClick:v=>v.stopPropagation(),className:"flex flex-col w-[30px] h-full shrink-0",children:[o.jsx("div",{...u,className:"flex flex-1 items-center justify-center cursor-grab active:cursor-grabbing touch-none hover:bg-surface-2 transition-colors","aria-label":"Drag to reorder",children:o.jsx(F.HambergerMenu,{size:17,color:"var(--high-em)"})}),s&&o.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),s()},className:"flex flex-1 items-center justify-center hover:bg-surface-2 transition-colors","aria-label":"Delete field",children:o.jsx(F.Trash,{size:17,color:"var(--high-em)",variant:"Linear"})})]})}),o.jsxs("div",{className:"flex min-w-0 flex-col justify-center transition-all duration-200 ease-out",style:{paddingLeft:x?"0px":"24px"},children:[o.jsx("div",{className:"truncate text-[16px] font-semibold text-med-em",children:e}),o.jsx("div",{className:"truncate text-[10px] font-medium tracking-wide mb-1 text-low-em",children:r})]})]}),o.jsx("div",{className:"shrink-0 max-w-[45%] truncate pl-4 text-sm font-medium text-low-em",children:t})]})})}),!a&&o.jsx("div",{className:"border-b border-surface-3"})]})});R3.displayName="ModuleFieldItem";const L3=({title:e="Módulos",items:t=[],className:r,onExportClick:n,minWidth:a=250,maxWidth:i=300,opacity:s=.7})=>o.jsxs("div",{className:N.clsx("bg-white rounded-xl border border-surface-3 overflow-hidden",r),style:{minWidth:`${a}px`,maxWidth:`${i}px`,opacity:s},children:[o.jsx("div",{className:"px-6 py-4 border-b border-surface-3 bg-surface-2 rounded-t-xl",children:o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex gap-5 items-center",children:[o.jsx(F.Grid5,{size:24,color:"var(--low-em)"}),o.jsx("h2",{className:"text-xl font-semibold text-low-em flex-1 text-center",children:e})]}),n&&o.jsx("button",{type:"button",onClick:n,className:"hover:bg-surface-3 rounded p-1 transition-colors","aria-label":"Export data",children:o.jsx(F.ExportSquare,{size:24,color:"var(--low-em)"})})]})}),o.jsxs("div",{className:"max-h-[600px] overflow-y-auto overflow-x-hidden",children:[t.map((l,c)=>{const u=c===t.length-1;return o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"w-full text-left transition-all duration-200 m-0 cursor-not-allowed",children:o.jsx("div",{className:"my-6 mx-8",children:o.jsxs("div",{className:"flex justify-between items-center",children:[o.jsxs("div",{className:"flex justify-start gap-5 items-center",children:[o.jsx(F.HambergerMenu,{size:20,color:"var(--low-em)"}),o.jsx(F.Component,{size:20,color:"var(--low-em)"}),o.jsx("div",{className:"text-xs font-semibold tracking-wide mb-1 text-low-em",children:l.type})]}),o.jsx("div",{className:"text-sm font-medium truncate text-low-em",children:l.label})]})})}),!u&&o.jsx("div",{className:"border-b border-surface-3"})]},l.id)}),t.length===0&&o.jsx("div",{className:"py-12 px-8 flex items-center justify-center",children:o.jsx("p",{className:"text-sm text-low-em text-center",children:"No related data"})})]})]});L3.displayName="RelatedDataCard";const BP=({widgetCount:e,visibleCount:t,icon:r,tooltipContent:n})=>o.jsx("div",{className:"border-b border-gray-200",children:o.jsxs("div",{className:"p-8 flex items-center justify-between",children:[o.jsxs("span",{className:" font-semibold text-sm text-dark-100",style:{fontFamily:"var(--font-space-grotesk)"},children:["Widgets (",e,")"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:N.clsx("text-sm font-semibold",t===0?"text-low-em":"text-success-main"),children:[t," visible"]}),r&&n&&o.jsx(Sa,{content:n,side:"bottom",children:o.jsx("div",{children:r})}),r&&!n&&r]})]})}),FP=({value:e,onChange:t,placeholder:r})=>o.jsx("div",{className:"p-8 flex flex-col gap-4 ",children:o.jsx(xe,{type:"search",placeholder:r||"Search",value:e,onChange:t,trailingIcon:o.jsx(F.SearchNormal1,{size:16,color:"currentColor"})})}),qP=({items:e,searchPlaceholder:t="Search",showSearch:r=!0,headerIcon:n,headerTooltip:a,onItemClick:i,className:s,itemClassName:l,backgroundColor:c="bg-white",borderStyle:u="border border-surface-3"})=>{const[d,f]=P.useState(""),h=e.filter(m=>m.title.toLowerCase().includes(d.toLowerCase())||m.description?.toLowerCase().includes(d.toLowerCase())),p=e.length,g=e.filter(m=>m.isVisible).length,x=m=>{i?.(m)};return o.jsx(jt.Provider,{delayDuration:200,children:o.jsxs("div",{className:N.clsx("h-full w-full flex flex-col",c,u,s),children:[o.jsx(BP,{widgetCount:p,visibleCount:g,icon:n,tooltipContent:a}),r&&o.jsx(FP,{value:d,onChange:m=>f(m.target.value),placeholder:t}),o.jsx(he,{}),o.jsx("div",{className:"flex-1 overflow-y-auto p-8 flex flex-col gap-8",children:h.length>0?h.map(m=>o.jsx(Qt,{title:m.title,description:m.description,leadingIcon:o.jsx(ie,{className:`${m.isDisabled?"text-disabled":""}`,children:m.icon}),showCheckbox:!1,showLeadingImage:!1,showDescription:!!m.description,showTag:!1,size:"sm",showTrailingIcon:!1,showTrailingText:m.position!==void 0,trailingText:m.position!==void 0?String(m.position):void 0,disabled:m.isDisabled,customBackgroundColor:N.clsx(m.isSelected&&"bg-surface-2"),className:N.clsx("py-6 rounded-xl",m.isSelected&&"border border-surface-3",m.isVisible&&"border border-surface-3",l),onClick:()=>x(m)},m.id)):o.jsxs("div",{className:"flex flex-col items-center justify-center p-10 text-center gap-10",children:[o.jsx(ie,{size:"lg",children:o.jsx(F.Box2,{})}),o.jsx("p",{className:"text-sm font-medium text-low-em",children:e.length===0?"You don't have any Widgets created yet":"No widgets found"})]})})]})})},WP={paid:"success",pending:"warning",overdue:"danger",cancelled:"surface"},cg=({label:e,value:t})=>o.jsxs("div",{className:"flex flex-row",children:[o.jsx("span",{className:"text-low-em text-base w-[110px] shrink-0",children:e}),o.jsx("span",{className:"text-high-em text-base font-bold",children:t})]}),HP=({title:e,status:t,fields:r,onMenuClick:n,className:a})=>{const i=t.charAt(0).toUpperCase()+t.slice(1),s=Math.ceil(r.length/2),l=r.slice(0,s),c=r.slice(s);return o.jsxs("div",{className:N.clsx("bg-white border border-surface-3 rounded-2xl p-10 flex flex-col gap-8",a),children:[o.jsxs("div",{className:"flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-8",children:[o.jsx("span",{className:"text-high-em font-semibold text-xl",children:e}),o.jsx(Ge,{theme:WP[t],variant:"simple",size:"lg",children:i})]}),o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:o.jsx(F.More,{variant:"Linear"}),onClick:n})]}),o.jsx("span",{className:"text-med-em text-sm -mt-2",children:"Summary"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[o.jsx("div",{className:"flex flex-col gap-8",children:l.map(u=>o.jsx(cg,{...u},u.label))}),o.jsx("div",{className:"flex flex-col gap-8",children:c.map(u=>o.jsx(cg,{...u},u.label))})]})]})},VP=e=>o.jsx(nt,{size:12}),D3=({item:e,onTitleChange:t,onDataSourceChange:r,onDelete:n,onDragStart:a,onDragOver:i,onDrop:s,onDragEnd:l,isDragOver:c,mode:u="both",className:d})=>{const f=e.dataSourceOptions.map(h=>({id:h.id,title:h.label,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1}));return o.jsxs("div",{draggable:!0,onDragStart:a,onDragOver:h=>{h.preventDefault(),i?.(h)},onDrop:s,onDragEnd:l,className:N.clsx("flex items-center px-4 py-4 gap-5 rounded-xl border transition-colors",c?"border-brand-main bg-surface-1":"border-surface-3 bg-white",d),children:[o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{size:"md",children:o.jsx(F.HambergerMenu,{})}),className:"cursor-grab active:cursor-grabbing shrink-0 text-disabled","aria-label":"Drag to reorder"}),(u==="both"||u==="input")&&o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(xe,{type:"text",label:"Title",placeholder:"Column title",value:e.title,onChange:h=>t(h.target.value)})}),(u==="both"||u==="dropdown")&&o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Te,{label:"Data source",placeholder:"Select",value:e.dataSource,showLeadingIcon:!1,menuSize:"sm",items:f,onChange:r})}),o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx(VP,{}),className:"shrink-0","aria-label":"Delete row",onClick:n})]})},UP=({title:e,contextMenu:t,backButton:r,onAction:n})=>{const[a,i]=P.useState(!1),s=P.useRef(null),l=t&&t.length>0;return P.useEffect(()=>{if(!a)return;const c=u=>{s.current&&!s.current.contains(u.target)&&i(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[a]),o.jsx(pm,{title:e,backButton:r,actions:l?o.jsxs("div",{ref:s,className:"relative",children:[o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(F.More,{size:16}),"aria-label":"More options",onClick:()=>i(c=>!c)}),a&&o.jsx(Wt,{floating:!0,size:"xs",items:(t??[]).map(c=>({id:c.id,title:c.label,leadingIcon:c.icon,showLeadingIcon:!!c.icon,customTitleColor:c.destructive?"text-danger-main":void 0,showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1,onSelect:()=>{n?.(c.id),i(!1)}})),className:"absolute right-0 top-full mt-3 min-w-[180px]"})]}):void 0})},KP=({field:e,onChange:t})=>o.jsx(xe,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value),type:"text"}),GP=({field:e,onChange:t})=>o.jsx(hl,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value)}),ml=e=>e.map(t=>({id:t.id,title:t.label,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1})),ZP=({field:e,onChange:t})=>o.jsx(Te,{menuSize:"sm",label:e.label,placeholder:e.placeholder,value:e.value??"",showLeadingIcon:!1,items:ml(e.options??[]),onChange:t}),YP=({field:e,onChange:t})=>o.jsxs("div",{className:"flex items-center justify-between gap-4 py-1",children:[e.label&&o.jsx("span",{className:"text-sm font-semibold text-high-em flex-1",children:e.label}),o.jsx(Zi,{size:"small",checked:e.value??!1,onChange:r=>t(r.target.checked)})]}),XP=({field:e,onChange:t})=>{const r=e.dropdowns??[],n=(a,i)=>{t(r.map((s,l)=>l===a?{...s,value:i}:s))};return o.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&o.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),o.jsx("div",{className:"flex gap-6",children:r.map((a,i)=>o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Te,{menuSize:"sm",label:e.showLabels!==!1?a.label:void 0,placeholder:a.placeholder,value:a.value??"",showLeadingIcon:!1,items:ml(a.options),onChange:s=>n(i,s)})},a.id))})]})},QP=({field:e,onAction:t})=>{const r=e.items??[],[n,a]=P.useState(null),i=P.useRef(new Map),s=P.useRef(null);return o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[e.label&&o.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),e.addAction&&o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(F.Add,{size:14}),"aria-label":"Add item",onClick:()=>t?.(e.addAction)})]}),r.length>0&&o.jsx("div",{className:"rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:r.map(l=>{const c=(l.contextMenu??[]).map(d=>({id:d.id,title:d.label,leadingIcon:d.icon,showLeadingIcon:!!d.icon,customTitleColor:d.destructive?"text-danger-main":void 0,showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1,onSelect:()=>{t?.(d.id),a(null)}})),u=n===l.id;return u&&(s.current=i.current.get(l.id)??null),o.jsx(Qt,{title:l.label,size:"sm",as:c.length>0?"div":"button",showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingText:!1,showTrailingIcon:c.length>0,trailingIcon:c.length>0?o.jsxs("div",{ref:d=>{i.current.set(l.id,d)},className:"relative",onMouseDown:d=>d.stopPropagation(),children:[o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(F.More,{size:14}),"aria-label":"Item options",onClick:()=>a(u?null:l.id)}),u&&o.jsx(Wt,{triggerRef:s,size:"xs",items:c,className:"min-w-[160px]",onClose:()=>a(null)})]}):void 0,className:"rounded-none"},l.id)})})]})},JP=({field:e,onChange:t,onAction:r})=>{const n=e.items??[],a=P.useRef(null),[i,s]=P.useState(null),l=(e.options??[]).map(u=>({id:u.id,label:u.label})),c=(u,d)=>t(n.map(f=>f.id===u?{...f,...d}:f));return o.jsxs("div",{className:"flex flex-col gap-6",children:[e.label&&o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),e.addAction&&o.jsx(V,{variant:"neutral",hierarchy:"tertiary",size:"xs",icons:"leading",leadingIcon:o.jsx(F.Add,{}),onClick:()=>r?.(e.addAction),children:"Add"})]}),o.jsx("div",{className:"flex flex-col gap-6",children:n.map(u=>o.jsx(D3,{item:{id:u.id,title:u.title,dataSource:u.dropdownValue??"",dataSourceOptions:l},mode:u.rowMode??e.rowMode,isDragOver:i===u.id,onTitleChange:d=>c(u.id,{title:d}),onDataSourceChange:d=>c(u.id,{dropdownValue:d}),onDelete:()=>r?.(`delete:${u.id}`),onDragStart:()=>{a.current=u.id},onDragOver:()=>{a.current!==u.id&&s(u.id)},onDrop:()=>{if(!a.current||a.current===u.id){a.current=null,s(null);return}r?.(`reorder:${a.current}:${u.id}`),a.current=null,s(null)},onDragEnd:()=>{a.current=null,s(null)}},u.id))})]})},eA=({field:e,onChange:t})=>{const r=e.value??{cols:1,rows:1};return o.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.label&&o.jsx("label",{className:"text-xs font-semibold text-med-em",children:e.label}),o.jsxs(Sm,{value:r,onChange:t,children:[o.jsx(Om,{children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",className:"w-full",children:e.placeholder??`${r.cols}×${r.rows}`})}),o.jsx(Nm,{})]})]})},Se={showCheckbox:!1,showLeadingIcon:!1},z3=[{...Se,id:"controlQuery",title:"Control query"},{...Se,id:"controlComponent",title:"Control component"},{...Se,id:"runScript",title:"Run script",showDividerAfter:!0},{...Se,id:"goToApp",title:"Go to app"},{...Se,id:"goToPage",title:"Go to page"},{...Se,id:"goToUrl",title:"Go to URL",showDividerAfter:!0},{...Se,id:"showNotification",title:"Show notification"},{...Se,id:"setVariable",title:"Set variable"},{...Se,id:"setUrlParameters",title:"Set URL parameters"},{...Se,id:"setLocalStorage",title:"Set local storage"},{...Se,id:"copyToClipboard",title:"Copy to clipboard"},{...Se,id:"exportData",title:"Export data",showDividerAfter:!0},{...Se,id:"confetti",title:"Confetti",customTitleColor:"var(--color-brand-secondary-main)"}],B3=Object.fromEntries(z3.map(e=>[e.id,e.title])),tA={controlQuery:{query:"",method:""},controlComponent:{component:"",method:""},runScript:{script:""},goToApp:{app:""},goToPage:{page:"",params:[]},goToUrl:{url:"",newTab:!1},showNotification:{title:"",message:"",type:"info",duration:3e3},setVariable:{variable:"",value:""},setUrlParameters:{params:[]},setLocalStorage:{key:"",value:""},copyToClipboard:{value:""},exportData:{data:"",fileName:"",fileType:"csv"},confetti:{}};function rA(e){const{action:t,config:r}=e;switch(t){case"controlQuery":return!r.query;case"controlComponent":return!r.component;case"runScript":return!r.script;case"goToApp":return!r.app;case"goToPage":return!r.page;case"goToUrl":return!r.url;case"showNotification":return!r.title&&!r.message;case"setVariable":return!r.variable;case"setLocalStorage":return!r.key;case"copyToClipboard":return!r.value;case"exportData":return!r.data;default:return!1}}function nA({handler:e,selected:t,incomplete:r,onClick:n}){const a=e.event.charAt(0).toUpperCase()+e.event.slice(1),i=r?"Incomplete selection":B3[e.action]??e.action;return o.jsx("div",{className:t?"rounded-md bg-surface-3":"",onClick:s=>n(s.currentTarget),children:o.jsx(Qt,{title:a,showTrailingText:!0,trailingText:i,size:"sm",showCheckbox:!1,showLeadingIcon:!1,customTitleColor:r?"var(--color-low-em)":void 0,middleContainerClassName:r?"italic":void 0})})}function Ie({label:e,children:t}){return o.jsxs("div",{className:"flex items-center gap-3 py-3",children:[o.jsx("span",{className:"w-28 shrink-0 text-xs text-med-em",children:e}),o.jsx("div",{className:"min-w-0 flex-1",children:t})]})}function Zr({value:e,onChange:t,placeholder:r="{{ ... }}",disabled:n,size:a="md",...i}){return o.jsx(xe,{...i,size:a,value:e??"",onChange:s=>t?.(s.target.value),placeholder:r,disabled:n,className:"font-mono"})}const aA=[{id:"ms",title:"ms",showCheckbox:!1,showLeadingIcon:!1},{id:"s",title:"s",showCheckbox:!1,showLeadingIcon:!1}];function iA({value:e,onChange:t}){return o.jsxs("div",{className:"flex items-center gap-6",children:[o.jsx("div",{className:"w-16 shrink-0",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:aA,value:e.unit,onChange:r=>t({...e,unit:r})})}),o.jsx(xe,{size:"md",type:"number",value:String(e.value),onChange:r=>t({...e,value:Number(r.target.value)}),placeholder:"0"})]})}function oA({value:e,onChange:t}){return o.jsx(Te,{size:"md",showLeadingIcon:!1,items:z3,value:e,onChange:r=>t(r)})}const sA=[{...Se,id:"info",title:"Info"},{...Se,id:"success",title:"Success"},{...Se,id:"warning",title:"Warning"},{...Se,id:"error",title:"Error"}],lA=[{...Se,id:"csv",title:"CSV"},{...Se,id:"json",title:"JSON"}],ug=[{...Se,id:"",title:"No available methods"}];function Be(e,t,r,n){t({...e,[r]:n})}function cA({action:e,config:t,onChange:r,availableQueries:n=[],availableComponents:a=[],availableApps:i=[],availablePages:s=[],availableVariables:l=[]}){const c=n.map(p=>({...Se,id:p,title:p})),u=a.map(p=>({...Se,id:p,title:p})),d=i.map(p=>({...Se,id:p,title:p})),f=s.map(p=>({...Se,id:p,title:p})),h=l.map(p=>({...Se,id:p,title:p}));switch(e){case"controlQuery":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Query",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:c.length?c:[{...Se,id:"",title:"— select —"}],value:String(t.query??""),onChange:p=>Be(t,r,"query",p)})}),o.jsx(Ie,{label:"Method",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:ug,value:"",onChange:()=>{},disabled:!0})})]});case"controlComponent":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Component",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:u.length?u:[{...Se,id:"",title:"— select —"}],value:String(t.component??""),onChange:p=>Be(t,r,"component",p)})}),o.jsx(Ie,{label:"Method",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:ug,value:"",onChange:()=>{},disabled:!0})})]});case"runScript":return o.jsx(Ie,{label:"Script",children:o.jsx(hl,{size:"md",value:String(t.script??""),onChange:p=>Be(t,r,"script",p.target.value),placeholder:"// write your script here",resize:"vertical"})});case"goToApp":return o.jsx(Ie,{label:"App",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:d.length?d:[{...Se,id:"",title:"— select —"}],value:String(t.app??""),onChange:p=>Be(t,r,"app",p)})});case"goToPage":return o.jsx(Ie,{label:"Page",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:f.length?f:[{...Se,id:"",title:"— select —"}],value:String(t.page??""),onChange:p=>Be(t,r,"page",p)})});case"goToUrl":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"URL",children:o.jsx(Zr,{value:String(t.url??""),onChange:p=>Be(t,r,"url",p),placeholder:"https://..."})}),o.jsx(Ie,{label:"New tab",children:o.jsx(Zi,{checked:!!t.newTab,onChange:p=>Be(t,r,"newTab",p.target.checked)})})]});case"showNotification":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Title",children:o.jsx(xe,{size:"md",value:String(t.title??""),onChange:p=>Be(t,r,"title",p.target.value),placeholder:"Notification title"})}),o.jsx(Ie,{label:"Message",children:o.jsx(xe,{size:"md",value:String(t.message??""),onChange:p=>Be(t,r,"message",p.target.value),placeholder:"Message"})}),o.jsx(Ie,{label:"Type",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:sA,value:String(t.type??"info"),onChange:p=>Be(t,r,"type",p)})}),o.jsx(Ie,{label:"Duration (ms)",children:o.jsx(xe,{size:"md",type:"number",value:String(t.duration??3e3),onChange:p=>Be(t,r,"duration",Number(p.target.value))})})]});case"setVariable":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Variable",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:h.length?h:[{...Se,id:"",title:"— select —"}],value:String(t.variable??""),onChange:p=>Be(t,r,"variable",p)})}),o.jsx(Ie,{label:"Value",children:o.jsx(Zr,{value:String(t.value??""),onChange:p=>Be(t,r,"value",p)})})]});case"setUrlParameters":return o.jsx(Ie,{label:"Params",children:o.jsx(Zr,{value:String(t.params??""),onChange:p=>Be(t,r,"params",p),placeholder:"{{ { key: value } }}"})});case"setLocalStorage":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Key",children:o.jsx(xe,{size:"md",value:String(t.key??""),onChange:p=>Be(t,r,"key",p.target.value),placeholder:"storage_key"})}),o.jsx(Ie,{label:"Value",children:o.jsx(Zr,{value:String(t.value??""),onChange:p=>Be(t,r,"value",p)})})]});case"copyToClipboard":return o.jsx(Ie,{label:"Value",children:o.jsx(Zr,{value:String(t.value??""),onChange:p=>Be(t,r,"value",p)})});case"exportData":return o.jsxs(o.Fragment,{children:[o.jsx(Ie,{label:"Data",children:o.jsx(Zr,{value:String(t.data??""),onChange:p=>Be(t,r,"data",p)})}),o.jsx(Ie,{label:"File name",children:o.jsx(xe,{size:"md",value:String(t.fileName??""),onChange:p=>Be(t,r,"fileName",p.target.value),placeholder:"export"})}),o.jsx(Ie,{label:"File type",children:o.jsx(Te,{size:"md",showLeadingIcon:!1,items:lA,value:String(t.fileType??"csv"),onChange:p=>Be(t,r,"fileType",p)})})]});case"confetti":return o.jsx("p",{className:"py-2 text-xs text-low-em",children:"No configuration needed."});default:return null}}function uA({handler:e,open:t,onClose:r,onSave:n,triggerRef:a,availableQueries:i,availableComponents:s,availableApps:l,availablePages:c,availableVariables:u}){const[d,f]=P.useState(null);if(P.useEffect(()=>{t&&e&&f({...e})},[t,e]),!d)return null;const h=d.event.charAt(0).toUpperCase()+d.event.slice(1),g=`${B3[d.action]??d.action} options`;function x(m){f(v=>v&&{...v,action:m,config:{...tA[m]}})}return o.jsx(Wn,{open:t,onClose:r,triggerRef:a,size:"sm",children:o.jsxs(Hn,{className:"max-h-[80vh] !w-112",children:[o.jsx(Vn,{onRightAction:r,children:o.jsxs(jm,{children:["Edit ",h," handler"]})}),o.jsxs(Un,{className:"flex flex-col gap-0 p-10",children:[o.jsx(Ie,{label:"Action",children:o.jsx(oA,{value:d.action,onChange:x})}),d.action!=="confetti"&&o.jsxs("div",{className:"mt-4 mb-2",children:[o.jsx(he,{}),o.jsx("span",{className:"text-xs font-medium text-low-em",children:g})]}),o.jsx(cA,{action:d.action,config:d.config,onChange:m=>f(v=>v&&{...v,config:m}),availableQueries:i,availableComponents:s,availableApps:l,availablePages:c,availableVariables:u}),o.jsxs("div",{className:"mt-4 mb-2",children:[o.jsx(he,{}),o.jsx("span",{className:"text-xs font-medium text-low-em",children:"Advanced"})]}),o.jsx(Ie,{label:"Only run when",children:o.jsx(Zr,{value:d.onlyRunWhen??"",onChange:m=>f(v=>v&&{...v,onlyRunWhen:m}),placeholder:"{{ !!example.value }}"})}),o.jsx(Ie,{label:"Debounce",children:o.jsx(iA,{value:d.debounce??{unit:"ms",value:0},onChange:m=>f(v=>v&&{...v,debounce:m})})})]}),o.jsx(Kn,{cancelButton:{label:"Cancel",closeOnClick:!1,onClick:r},saveButton:{label:"Save",closeOnClick:!1,onClick:()=>{d&&n(d),r()}}})]})})}function dA(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}function fA({field:e,onChange:t}){const r=e.value??[],n=e.resources??{},[a,i]=P.useState(null),[s,l]=P.useState(!1),c=P.useRef(null),u=P.useRef(null),d=r.find(x=>x.id===a)??null;function f(x,m){c.current=m,i(x),l(!0)}function h(){l(!1),i(null)}function p(){const x={id:dA(),event:"click",action:"controlQuery",config:{query:"",method:""}};t([...r,x]),f(x.id,u.current)}function g(x){t(r.map(m=>m.id===x.id?x:m))}return o.jsxs("div",{className:"flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[o.jsx("span",{className:"text-xs font-medium text-med-em",children:"Event handlers"}),o.jsx(V,{ref:u,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:o.jsx(F.Add,{size:14}),onClick:p})]}),r.length===0?o.jsx("p",{className:"px-3 py-2 text-xs text-low-em",children:"No event handlers"}):o.jsx("div",{className:"flex flex-col",children:r.map(x=>o.jsx(nA,{handler:x,selected:a===x.id,incomplete:rA(x),onClick:m=>f(x.id,m)},x.id))}),o.jsx(uA,{open:s,handler:d,onClose:h,onSave:g,triggerRef:c,availableQueries:n.availableQueries,availableComponents:n.availableComponents,availableApps:n.availableApps,availablePages:n.availablePages,availableVariables:n.availableVariables})]})}const hA=({subField:e,onChange:t})=>{switch(e.type){case"text":return o.jsx(xe,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value),type:"text"});case"toggle":return o.jsxs("div",{className:"flex items-center justify-between gap-4 py-1",children:[e.label&&o.jsx("span",{className:"text-sm font-semibold text-high-em flex-1",children:e.label}),o.jsx(Zi,{size:"small",checked:e.value??!1,onChange:r=>t(r.target.checked)})]});case"dropdown":return o.jsx(Te,{menuSize:"sm",label:e.label,placeholder:e.placeholder,value:e.value??"",showLeadingIcon:!1,items:ml(e.options??[]),onChange:r=>t(r)});default:return null}},pA=({field:e,onChange:t})=>{const r=e.items??[],n=(a,i,s)=>t(r.map(l=>l.id!==a?l:{...l,subFields:l.subFields.map(c=>c.id!==i?c:{...c,value:s})}));return o.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&o.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.label}),o.jsxs("div",{className:"flex flex-col rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:[r.length===0&&o.jsx(ht,{flat:!0,description:"No items",className:"py-6 px-4"}),r.map(a=>o.jsxs(Wn,{size:"sm",children:[o.jsx(wm,{children:o.jsx(Qt,{size:"sm",title:a.title,description:a.description,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!!a.description,showTag:!1,showTrailingText:!1,showTrailingIcon:!1})}),o.jsxs(Hn,{className:"!w-72",children:[o.jsx(Vn,{children:a.title}),o.jsx(Un,{padding:!0,className:"ds-scrollbar overflow-y-auto max-h-80",children:o.jsx("div",{className:"flex flex-col gap-4",children:a.subFields.map(i=>o.jsx(hA,{subField:i,onChange:s=>n(a.id,i.id,s)},i.id))})}),o.jsx(Kn,{saveButton:{label:"Done",closeOnClick:!0}})]})]},a.id))]})]})};function dg(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const mA=({field:e,onChange:t,onAction:r})=>{const n=e.value??[],[a,i]=P.useState(n[0]?.id??""),[s,l]=P.useState(!1),[c,u]=P.useState(""),[d,f]=P.useState(!1),[h,p]=P.useState([]),g=P.useRef(null),x=P.useRef(null),m=n.find(w=>w.id===a)??n[0],v=w=>(e.options??[]).find(C=>C.id===w)?.label??w,b=()=>{const w=(e.options??[]).find(y=>y.id===c);if(!w||!m)return;const C={id:dg(),typeId:w.id,label:w.label};t(n.map(y=>y.id!==m.id?y:{...y,components:[...y.components,C]}))};return n.length===0?o.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&o.jsx("span",{className:"text-xs font-semibold text-high-em",children:e.label}),o.jsx("div",{className:"flex items-center justify-center rounded-lg border border-surface-3 h-10",children:o.jsx("span",{className:"text-xs text-low-em",children:"No tabs configured"})})]}):o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[e.label&&o.jsx("span",{className:"text-xs font-semibold text-high-em",children:e.label}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(V,{ref:x,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:o.jsx(F.Edit2,{size:14}),onClick:()=>{p(n.map(w=>({...w}))),f(!0)}}),o.jsx(V,{ref:g,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:o.jsx(F.Add,{size:14}),onClick:()=>{u(""),l(!0)}})]})]}),n.length>1&&o.jsx(fl,{size:"sm",items:n.map(w=>({id:w.id,label:w.label})),value:a,onChange:i}),o.jsx("div",{className:"flex flex-col rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:m.components.length===0?o.jsx(ht,{flat:!0,description:"No components",className:"py-6 px-4"}):m.components.map(w=>o.jsx(Qt,{size:"sm",title:w.label,trailingText:v(w.typeId),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showTag:!1,showTrailingText:!0,showTrailingIcon:!0,onClick:()=>r?.(`open-component::${m.id}::${w.id}`)},w.id))}),o.jsx(Wn,{open:d,onClose:()=>f(!1),triggerRef:x,size:"sm",children:o.jsxs(Hn,{className:"!w-72",children:[o.jsx(Vn,{children:"Edit tabs"}),o.jsx(Un,{padding:!0,className:"ds-scrollbar overflow-y-auto",children:o.jsxs("div",{className:"flex flex-col gap-3",children:[h.map((w,C)=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(xe,{value:w.label,placeholder:"Tab label",onChange:y=>p(h.map((j,S)=>S!==C?j:{...j,label:y.target.value}))}),o.jsx(V,{size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:o.jsx(F.Trash,{size:14}),disabled:h.length<=1,onClick:()=>p(h.filter((y,j)=>j!==C))})]},w.id)),o.jsx(V,{size:"sm",variant:"neutral",hierarchy:"tertiary",icons:"leading",leadingIcon:o.jsx(F.Add,{size:14}),onClick:()=>p([...h,{id:dg(),label:"New tab",components:[]}]),children:"Add tab"})]})}),o.jsx(Kn,{cancelButton:{label:"Cancel",closeOnClick:!0},saveButton:{label:"Save",closeOnClick:!1,onClick:()=>{const w=n.filter(y=>!h.find(j=>j.id===y.id)).map(y=>y.id),C=h.map(y=>{const j=n.find(S=>S.id===y.id);return j?{...j,label:y.label}:y});t(C),w.includes(a)&&i(C[0]?.id??""),f(!1)}}})]})}),o.jsx(Wn,{open:s,onClose:()=>l(!1),triggerRef:g,size:"sm",children:o.jsxs(Hn,{className:"!w-72",children:[o.jsx(Vn,{children:"Add component"}),o.jsx(Un,{children:o.jsx(Te,{menuSize:"sm",label:"Type",placeholder:"Select a component",value:c,showLeadingIcon:!1,items:ml(e.options??[]),onChange:u})}),o.jsx(Kn,{cancelButton:{label:"Cancel",closeOnClick:!0},saveButton:{label:"Add",disabled:!c,closeOnClick:!1,onClick:()=>{b(),l(!1)}}})]})})]})},xA=({field:e,onChange:t,onAction:r})=>{switch(e.type){case"text":return o.jsx(KP,{field:e,onChange:t});case"textarea":return o.jsx(GP,{field:e,onChange:t});case"dropdown":return o.jsx(ZP,{field:e,onChange:t});case"toggle":return o.jsx(YP,{field:e,onChange:t});case"multi-dropdown":return o.jsx(XP,{field:e,onChange:t});case"list":return o.jsx(QP,{field:e,onAction:r});case"draggable-list":return o.jsx(JP,{field:e,onChange:t,onAction:r});case"size-picker":return o.jsx(eA,{field:e,onChange:t});case"event-handlers":return o.jsx(fA,{field:e,onChange:t});case"modal-list":return o.jsx(pA,{field:e,onChange:t});case"component-tree":return o.jsx(mA,{field:e,onChange:t,onAction:r});default:return null}},gA=({section:e,onFieldChange:t,onAction:r})=>o.jsxs("div",{className:"flex flex-col gap-6",children:[e.title&&o.jsx("h3",{className:"text-sm font-semibold text-high-em",children:e.title}),e.fields.map(n=>o.jsx(xA,{field:n,onChange:a=>t(n.id,a),onAction:r},n.id))]}),vA=({title:e="Preview",children:t,defaultOpen:r=!1,className:n})=>{const[a,i]=P.useState(r);return o.jsxs("div",{className:N.clsx("flex flex-col bg-surface-2 rounded-xl",n),children:[o.jsxs("button",{type:"button",onClick:()=>i(s=>!s),className:"flex items-center justify-between w-full h-[38px] px-4 cursor-pointer",children:[o.jsx("span",{className:"text-xs font-semibold text-med-em",children:e}),o.jsx(ie,{size:"sm",children:a?o.jsx(F.ArrowUp2,{}):o.jsx(F.ArrowDown2,{})})]}),o.jsx("div",{className:N.clsx("grid transition-all duration-200",a?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:o.jsx("div",{className:"overflow-hidden",children:o.jsx("div",{className:"px-4 pb-4",children:t})})})]})};function yA(e,t){switch(e.type){case"draggable-list":return{...e,items:t};case"modal-list":return{...e,items:t};case"component-tree":return{...e,value:t};case"multi-dropdown":return{...e,dropdowns:t};default:return{...e,value:t}}}const bA=({config:e,onChange:t,onAction:r,backButton:n,className:a})=>{const i=(s,l,c)=>{t({...e,sections:e.sections.map(u=>u.id!==s?u:{...u,fields:u.fields.map(d=>d.id!==l?d:yA(d,c))})})};return o.jsxs("div",{className:N.clsx("h-full w-full flex flex-col bg-white",a),children:[o.jsx("div",{className:"shrink-0",children:o.jsx(UP,{title:e.title,contextMenu:e.contextMenu,backButton:n,onAction:r})}),o.jsx("div",{className:"flex-1 overflow-y-auto ds-scrollbar flex flex-col p-8 gap-6",children:e.sections.map((s,l)=>o.jsxs(O.default.Fragment,{children:[o.jsx(gA,{section:s,onFieldChange:(c,u)=>i(s.id,c,u),onAction:r}),l<e.sections.length-1&&o.jsx(he,{})]},s.id))})]})},wA=[{id:"And",title:"And",showCheckbox:!1,showLeadingIcon:!1},{id:"Or",title:"Or",showCheckbox:!1,showLeadingIcon:!1}];function jA({position:e}){return o.jsx("div",{className:N.clsx("relative z-[1] w-[22px] h-[23px] shrink-0 border-l border-surface-4",e==="above"?"border-t rounded-tl-xl":"border-b rounded-bl-xl")})}function CA(e){if(!O.default.isValidElement(e))return!1;const t=e;return typeof t.type=="string"&&!t.props.children}function F3({children:e,operator:t,onChange:r,dropdownIndex:n=0,dropdownBg:a="bg-white"}){const i=O.default.Children.toArray(e);return i.length<=1?o.jsx(o.Fragment,{children:i}):o.jsx("div",{className:"grid grid-cols-[75px_1fr] gap-x-3 gap-y-2.5 auto-rows-[minmax(60px,auto)]",children:i.map((s,l)=>o.jsxs(P.Fragment,{children:[o.jsxs("div",{className:"relative flex items-center justify-center",children:[l>0&&o.jsx("div",{className:"absolute left-[26.5px] top-[-5px] bottom-1/2 border-l border-surface-4 z-0"}),l<i.length-1&&o.jsx("div",{className:"absolute left-[26.5px] top-1/2 bottom-[-5px] border-l border-surface-4 z-0"}),!CA(s)&&o.jsx(jA,{position:l<=n?"above":"below"}),(l===n||n<0&&l===0)&&o.jsx("div",{className:N.clsx("absolute left-0 z-10 py-6",n<0?"bottom-[60%]":"top-[60%]",a),children:o.jsx(Te,{items:wA,value:t.value,size:"sm",menuSize:"sm",showLeadingIcon:!1,className:"min-w-[60px]",onChange:c=>r(t.id,c)})})]}),o.jsx("div",{className:"flex items-stretch self-stretch min-w-0",children:s})]},l))})}const SA={default:{...qe.default,wrapper:`${qe.default.wrapper} hover:cursor-pointer`,text:"text-med-em"},outlined:{...qe.outlined,wrapper:`${qe.outlined.wrapper} hover:cursor-pointer`,text:"text-med-em"},danger:{...qe.danger,wrapper:`${qe.danger.wrapper} hover:cursor-pointer`,text:"text-danger-em"},success:{...qe.success,wrapper:`${qe.success.wrapper} hover:cursor-pointer`,text:"text-success-em"}},OA={sm:{...Ft.sm,text:"text-xs",padding:"px-3"},md:{...Ft.md,text:"text-sm font-medium",padding:"px-3.5"},lg:{...Ft.lg,text:"text-base",padding:"px-4"}},Ba={wrapper:"bg-surface-3 pointer-events-none border-transparent",text:"text-disabled"};function yh(e){if(!e)return;const t=new Date(e);return isNaN(t.getTime())?void 0:t}function fg(e){return e?e.toISOString().split("T")[0]:""}function rc(e){const t=yh(e);return t?t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):""}function q3({pickType:e="single",from:t="",to:r="",placeholder:n="Select date...",disabled:a=!1,size:i="md",variant:s="default",label:l,hint:c,hintIconVariant:u,className:d,icon:f,iconColor:h="var(--med-em)",onAccept:p}){const[g,x]=P.useState(!1),m=P.useRef(null),v=P.useRef(null),b=P.useCallback(()=>x(!1),[]);el({refs:[m,v],onClose:b,enabled:g});const w=Gi({triggerRef:m,panelRef:v,enabled:g}),C=OA[i],y=SA[s],j=e==="range"&&(t||r)?[rc(t),rc(r)].filter(Boolean).join(" → "):rc(t),S={from:yh(t),to:e==="range"?yh(r):void 0},A=a?Ba.text:j?y.text:y.placeholder;return o.jsxs("div",{className:N.clsx("flex flex-col gap-1.5 w-full",d),children:[l&&o.jsx("label",{className:N.clsx("font-semibold truncate",C.labelFontSize,a?Ba.text:y.text),children:l}),o.jsxs("button",{ref:m,type:"button",disabled:a,onClick:()=>!a&&x(_=>!_),className:N.clsx("relative flex items-center w-full min-w-0 overflow-hidden border transition-colors duration-200 focus:outline-none",C.height,C.rounded,C.padding,a?Ba.wrapper:y.wrapper),children:[o.jsx("span",{className:N.clsx("flex-1 min-w-0 truncate text-left",C.text,A),children:j||n}),o.jsx("span",{className:N.clsx("shrink-0 flex items-center",i==="sm"?"pl-1.5":"pl-2"),children:o.jsx(ie,{size:C.iconSize,color:h,children:f??o.jsx(F.Calendar,{})})})]}),c&&o.jsx(ft,{icon:o.jsx(F.InfoCircle,{variant:u||"Bold"}),label:c,iconSize:C.hintIconSize,gap:1,iconColorClass:N.clsx(a?Ba.text:y.hint),labelColorClass:N.clsx(a?Ba.text:y.hint),className:N.clsx(C.hintFontSize,"font-semibold")}),g&&Ca.createPortal(o.jsx("div",{ref:v,style:w,children:o.jsx(mm,{selected:S,pickType:e,onAccept:_=>{p(fg(_?.from),e==="range"?fg(_?.to):void 0),x(!1)},onCancel:()=>x(!1)})}),document.body)]})}function NA(e,t){if(!(!e.operator||!e.fieldType))return t.operatorsByFieldType[e.fieldType]?.find(r=>r.id===e.operator)}function PA(e){return e==="between"?["",""]:e==="multi-or"||e==="multi-and"?[""]:[]}function lo({inputType:e,value:t,placeholder:r,valueOptions:n,fieldItems:a,onChange:i}){return e==="dropdown"?o.jsx(Te,{items:n,value:t||void 0,placeholder:r,showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:i}):e==="field"?o.jsx(Te,{items:a,value:t||void 0,placeholder:r,showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:i}):e==="date"?o.jsx(q3,{pickType:"single",from:t,placeholder:r,onAccept:s=>i(s)}):o.jsx(xe,{type:e,value:t,placeholder:r,size:"md",onChange:s=>i(s.target.value)})}function AA({operatorConfig:e,values:t,valueOptions:r,fieldItems:n,onValuesChange:a}){if(!e||e.valueMode==="none")return null;const i=e.valueMode,s=e.valueInputType??"dropdown";if(i==="single")return o.jsx("div",{className:"grow shrink-0 basis-[200px]",children:o.jsx(lo,{inputType:s,value:t[0]??"",placeholder:"Select value...",valueOptions:r,fieldItems:n,onChange:u=>a([u])})});if(i==="between")return o.jsxs("div",{className:"flex items-center gap-8 grow shrink-0 basis-[200px] min-w-0",children:[o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(lo,{inputType:s,value:t[0]??"",placeholder:"From...",valueOptions:r,fieldItems:n,onChange:u=>{const d=[...t];d[0]=u,a(d)}})}),(e.separator??",")!==""&&o.jsx("span",{className:"text-xs font-medium text-low-em shrink-0 select-none",children:e.separator??","}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(lo,{inputType:s,value:t[1]??"",placeholder:"To...",valueOptions:r,fieldItems:n,onChange:u=>{const d=[...t];d[1]=u,a(d)}})})]});const l=i==="multi-or"?"or":"and",c=t.length>1;return o.jsxs("div",{className:"flex items-center gap-8 grow shrink-0 basis-[200px] flex-wrap",children:[t.map((u,d)=>o.jsxs(O.default.Fragment,{children:[d>0&&o.jsx("span",{className:"text-xs font-medium text-low-em shrink-0 select-none",children:l}),o.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[o.jsx("div",{className:"min-w-[120px] flex-1",children:o.jsx(lo,{inputType:s,value:u,placeholder:"Select...",valueOptions:r,fieldItems:n,onChange:f=>{const h=[...t];h[d]=f,a(h)}})}),c&&o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx("span",{className:"contents",children:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})})}),onClick:()=>a(t.filter((f,h)=>h!==d)),"aria-label":"Remove value"})]})]},d)),o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:o.jsx(ie,{size:14,children:o.jsx(F.Add,{})}),onClick:()=>a([...t,""]),"aria-label":"Add value"})]})}function W3({condition:e,config:t,onChange:r,onDelete:n=()=>{}}){const a=NA(e,t),i=t.fields.map(({fieldType:f,...h})=>h),s=e.fieldType?(t.operatorsByFieldType[e.fieldType]??[]).map(({valueMode:f,valueInputType:h,connector:p,separator:g,...x})=>x):[];function l(f){const h=t.fields.find(p=>p.id===f);h&&r({...e,field:f,fieldType:h.fieldType,operator:"",values:[]})}function c(f){const h=t.operatorsByFieldType[e.fieldType]?.find(p=>p.id===f);r({...e,operator:f,values:h?PA(h.valueMode):[]})}function u(f){r({...e,values:f})}const d=!a||a.valueMode==="none";return o.jsxs("div",{className:"flex items-stretch gap-8 w-full border border-surface-3 rounded-xl p-5",children:[o.jsxs("div",{className:"flex flex-wrap flex-1 items-center gap-8 min-w-0",children:[o.jsx("div",{className:"grow shrink-0 basis-40",children:o.jsx(Te,{items:i,value:e.field||void 0,placeholder:"Field...",showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:l})}),o.jsx("div",{className:"grow shrink-0 basis-[130px]",children:o.jsx(Te,{items:s,value:e.operator||void 0,placeholder:"Operator...",showLeadingIcon:!1,size:"md",menuSize:"sm",disabled:!e.field,onChange:c})}),a?.connector==="arrow"&&o.jsx("span",{className:"shrink-0",children:o.jsx(ie,{size:"sm",color:"var(--med-em)",children:o.jsx(F.ArrowRight,{})})}),o.jsx(AA,{operatorConfig:a,values:e.values,valueOptions:t.valueOptions,fieldItems:i,onValuesChange:u}),d&&o.jsx("div",{className:"flex-1"})]}),e.showDelete&&o.jsx("div",{className:"flex items-center shrink-0",children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx("span",{className:"contents",children:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})})}),onClick:()=>n(e.id),"aria-label":"Delete condition"})})]})}const _A={xs:"text-xs",sm:"text-sm",md:"text-base"};function H3({title:e,children:t,footer:r,headerAction:n,className:a,titleClassName:i,headerClassName:s,contentClassName:l,titleSize:c="sm",defaultPadding:u=!1}){return o.jsxs("div",{className:N.clsx("flex flex-col bg-white rounded-2xl border border-surface-3",a),children:[o.jsxs("div",{className:te.twMerge(N.clsx("flex items-center shrink-0 py-4 px-8 border-b border-surface-3",s)),children:[o.jsx("h3",{className:N.clsx("font-semibold text-high-em flex-1",_A[c],i),children:e}),n]}),o.jsx("div",{className:te.twMerge(N.clsx("flex-1 overflow-y-auto p-5",u&&"p-8",l)),children:t}),r&&o.jsx("div",{className:"shrink-0 flex items-center justify-end gap-2 px-8 pb-6",children:r})]})}function kA({title:e,conditions:t,config:r,operator:n,onOperatorChange:a,onChange:i,onDelete:s,onAddAnd:l,onAddOr:c,dropdownIndex:u=0,className:d}){const f=o.jsx(ie,{children:o.jsx(F.Add,{})}),h=[...l?[{value:"and",icon:f,label:"And"}]:[],...c?[{value:"or",icon:f,label:"Or"}]:[]],p=h.length>0?o.jsx(mr,{options:h,value:"",size:"sm",variant:"neutral",onChange:g=>{g==="and"&&l?.(),g==="or"&&c?.()}}):void 0;return o.jsx(H3,{title:e,footer:p,className:d,children:o.jsx("div",{className:"p-5",children:o.jsx(F3,{operator:n,onChange:a,dropdownIndex:u,children:t.map(g=>o.jsx(W3,{condition:g,config:r,onChange:i,onDelete:s},g.id))})})})}const TA=[{id:"if",title:"If",showCheckbox:!1,showLeadingIcon:!1},{id:"if-else",title:"If / Else",showCheckbox:!1,showLeadingIcon:!1}],EA={when:"When",then:"Then","else-if":"Else If",else:"Else"},V3=70,IA=10;function MA(){return o.jsx("div",{className:"relative h-[23px] shrink-0",style:{width:V3},children:o.jsx("div",{className:"absolute left-4 top-0 w-14 h-full border-l border-b border-surface-4 rounded-bl-xl"})})}function $A({name:e,onNameChange:t,type:r,onTypeChange:n,branches:a,onAddElseIf:i,onRemoveBranch:s,className:l}){return o.jsxs("div",{className:N.clsx("flex flex-col gap-10",l),children:[o.jsxs("div",{className:"flex items-end gap-5",children:[o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(xe,{label:"Name",value:e,size:"md",onChange:c=>t(c.target.value)})}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Te,{items:TA,value:r,label:"Type",showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:c=>n(c)})})]}),a.map((c,u)=>{const d=u,f=u===0,h=c.removable&&!!s;return o.jsxs("div",{className:N.clsx("flex items-start gap-2",!f&&"ml-[var(--indent-mobile)] md:ml-[var(--indent-desktop)]"),style:f?void 0:{"--indent-mobile":`${(d-1)*IA}px`,"--indent-desktop":`${(d-1)*V3}px`},children:[!f&&o.jsx("div",{className:"hidden md:block shrink-0",children:o.jsx(MA,{})}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(kA,{title:EA[c.type],...c.panel})}),h&&o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx("span",{className:"contents",children:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})})}),onClick:()=>s(c.id),"aria-label":"Remove branch"})]},c.id)}),i&&o.jsx("div",{children:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",leadingIcon:o.jsx(ie,{size:14,children:o.jsx(F.Add,{})}),onClick:i,children:"Add Else If"})})]})}const U3=({name:e,expression:t,inputField:r,className:n})=>{const[a,i]=O.default.useState(!1),s=O.default.useRef(null),l=!!t?.options?.length;function c(){l&&i(d=>!d)}function u(d){t?.onSelect?.(d),i(!1)}return o.jsxs("div",{className:N.clsx("flex flex-col p-4 gap-4 border border-surface-4 rounded-xl",n),children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-semibold text-high-em truncate pr-2",children:e}),t&&o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:s,className:"inline-flex shrink-0",children:o.jsx(Rr,{size:"sm",variant:"quaternary",leadingIcon:!1,trailingIcon:!1,className:"font-semibold cursor-pointer",onClick:c,children:t.label})}),l&&a&&o.jsx(Wt,{items:t.options,selectedIds:t.selectedId?[t.selectedId]:[],size:"xs",triggerRef:s,onSelect:u,onClose:()=>i(!1)})]})]}),r!==void 0&&o.jsx(xe,{...r})]})};function K3({operator:e,className:t}){return e?o.jsxs("div",{className:`flex items-center gap-5 ${t??""}`,children:[o.jsx(he,{className:"flex-1"}),o.jsx(Ge,{size:"md",theme:"surface",variant:"simple",className:"shrink-0",children:e}),o.jsx(he,{className:"flex-1"})]}):o.jsx("div",{className:`flex items-center gap-5 ${t??""}`,children:o.jsx(he,{className:"flex-1"})})}function RA({title:e,items:t,operator:r,onAdd:n,onDelete:a,onClose:i,className:s}){const l=n?o.jsx(V,{variant:"neutral",hierarchy:"primary",size:"xs",icons:"leading",leadingIcon:o.jsx(ie,{children:o.jsx(F.Add,{})}),onClick:n,children:"Add expression"}):void 0;return o.jsx(H3,{title:e,footer:l,titleSize:"xs",headerClassName:"px-4 py-2 bg-surface-2",contentClassName:"p-4",headerAction:o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})}),onClick:i,"aria-label":"Close"}),className:te.twMerge(N.clsx("rounded-lg overflow-hidden",s)),children:o.jsx("div",{className:"flex flex-col gap-3",children:t.map((c,u)=>{const{id:d,...f}=c,h=u===t.length-1;return o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(U3,{className:"flex-1",...f}),a&&o.jsx(V,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:o.jsx("span",{className:"contents",children:o.jsx(ie,{size:"xs",children:o.jsx(nt,{})})}),onClick:()=>a(d),"aria-label":"Remove expression"})]}),!h&&o.jsx(K3,{operator:r})]},d)})})})}const LA={confirmed:{theme:"success",label:"Confirmed"},pending:{theme:"warning",label:"Pending"},"no-show":{theme:"danger",label:"No-show"},cancelled:{theme:"surface",label:"Cancelled"}},$o=({time:e,title:t,description:r,status:n,isSelected:a=!1,className:i,...s})=>{const l=LA[n];return o.jsxs("div",{className:te.twMerge(N.clsx("px-8 py-8 flex items-center gap-6 cursor-pointer transition-colors outline-none","border-b border-surface-3",a?"bg-surface-1":"bg-white hover:bg-surface-1",i)),...s,children:[o.jsx("span",{className:N.clsx("text-xs font-semibold text-med-em shrink-0 whitespace-nowrap",a&&"p-2 bg-white border border-surface-4 rounded-md"),children:e}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[o.jsx("span",{className:"text-sm font-semibold text-med-em truncate",children:t}),o.jsx("span",{className:"text-xs text-low-em truncate",children:r})]}),l&&o.jsx(Ge,{theme:l.theme,variant:"outlined",size:"sm",className:"shrink-0",children:l.label})]})};$o.displayName="AppointmentRow";const Ro=({name:e,age:t,gender:r,tags:n,fields:a,onEdit:i,className:s})=>o.jsxs("div",{className:te.twMerge("p-6 flex flex-col gap-6 flex-1 overflow-y-auto",s),children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-med-em",children:e}),o.jsxs("p",{className:"text-xs text-low-em",children:[r," · ",t," yrs"]}),n&&n.length>0&&o.jsx("div",{className:"flex flex-wrap gap-6 py-4",children:n.map(l=>o.jsx(Rr,{variant:"tertiary",size:"xs",leadingIcon:!1,trailingIcon:!1,children:l},l))})]}),i&&o.jsx(V,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:o.jsx(F.Edit2,{}),onClick:i,"aria-label":"Edit"})]}),a&&a.length>0&&o.jsx("div",{className:"flex flex-col",children:a.map(({label:l,value:c},u)=>o.jsxs("div",{className:"flex items-baseline gap-6 px-5 py-4",children:[o.jsx("span",{className:"text-xs text-low-em tracking-wide shrink-0",children:l}),o.jsx("span",{className:"text-xs text-med-em font-medium",children:c??"—"})]},`${l}-${u}`))})]});Ro.displayName="AppointmentDetail";const DA=480,G3=({appointments:e,selectedId:t,detail:r,onSelectAppointment:n,showDetail:a=!0,showDatePicker:i=!1,selectedDate:s,onDateChange:l,datePickerType:c="single",className:u,...d})=>{const f=e.findIndex(x=>x.id===t),[h,p]=tl(),g=p!==1/0&&p<DA;return o.jsxs(al,{size:"md",padding:"sm",children:[o.jsxs("div",{ref:h,className:te.twMerge(N.clsx("bg-surface-1 shadow-e2 overflow-hidden",g?"flex flex-col w-full":"flex flex-row",u)),...d,children:[o.jsxs("div",{className:N.clsx("flex flex-col min-h-0 h-full",!g&&a?"w-1/2":"w-full"),children:[i&&o.jsx("div",{className:N.clsx("shrink-0 flex justify-center bg-white border-b border-surface-3",!g&&a&&"border-r border-surface-3",!g&&a&&f===0&&"rounded-br-lg"),children:o.jsx(mm,{selected:s,pickType:c,onSelect:l,showFooter:!1,className:"rounded-none border-0"})}),o.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[o.jsx("div",{className:"flex flex-col overflow-y-auto bg-surface-1 min-h-0 max-h-full ds-scrollbar",children:e.map((x,m)=>{const v=x.id===t,b=m===f-1,w=m===f+1,C={time:x.time,title:x.title,description:x.description,status:x.status,isSelected:v,onClick:()=>n?.(x.id),className:N.clsx(v?"bg-surface-1 border-transparent":[!g&&a&&"border-r border-surface-3",!g&&b&&"rounded-br-lg",!g&&w&&"rounded-tr-lg border-t border-surface-3"])};return g?o.jsx(il,{children:o.jsx($o,{...C})},x.id):o.jsx($o,{...C},x.id)})}),!g&&a&&o.jsx("div",{className:"flex-1 border-r border-surface-3"}),g&&o.jsx("div",{className:"flex-1"})]})]}),!g&&a&&o.jsx("div",{className:"w-1/2 bg-surface-1 flex flex-col min-w-0",children:r?o.jsx(Ro,{...r}):o.jsx(ht,{flat:!0,description:"Select an appointment to view details",className:"!bg-transparent h-full"})})]}),o.jsxs(ol,{children:[o.jsx(sl,{children:o.jsx(ll,{children:r?.name??"Details"})}),o.jsx(cl,{children:r?o.jsx(Ro,{...r}):o.jsx(ht,{flat:!0,description:"Select an appointment to view details",className:"!bg-transparent h-full"})})]})]})};G3.displayName="Planner";const xl=({title:e,description:t,status:r,statusTheme:n,avatars:a,quickActions:i=[],variant:s="neutral",onCheck:l,onDelete:c,className:u,...d})=>o.jsxs("div",{className:te.twMerge(N.clsx("bg-white rounded-xl border border-surface-3 shadow-e1 p-4 flex flex-col gap-4",s==="secondary"&&"bg-surface-2",u)),...d,children:[o.jsx("div",{className:"text-sm font-semibold text-high-em truncate",children:e}),t!=null&&o.jsx("div",{className:"text-xs text-med-em leading-snug line-clamp-3",children:t}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx(Ge,{theme:n,size:"sm",variant:"simple",children:r}),a&&a.length>0&&o.jsx(tm,{avatars:a,size:"xs",max:3}),i.length>0&&o.jsxs("div",{className:"flex items-center gap-2",children:[i.includes("check")&&o.jsx(V,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:o.jsx(F.TickCircle,{}),onClick:f=>{f.stopPropagation(),l?.()},"aria-label":"Mark complete"}),i.includes("delete")&&o.jsx(V,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:o.jsx(F.Trash,{}),onClick:f=>{f.stopPropagation(),c?.()},"aria-label":"Delete"})]})]})]});xl.displayName="KanbanCard";const zA={red:{theme:"danger",statusState:"danger"},orange:{theme:"warning",statusState:"warning"},green:{theme:"success",statusState:"success"},gray:{theme:"surface",statusState:"disabled"}},Z3=({card:e,columnName:t,statusTheme:r,variant:n,onCardClick:a})=>{const{attributes:i,listeners:s,setNodeRef:l,transform:c,transition:u,isDragging:d}=dt.useSortable({id:e.id,data:{id:e.id,columnName:t},animateLayoutChanges:()=>!1});return o.jsxs("div",{ref:l,style:{transform:Gp.CSS.Transform.toString(c),transition:u},className:N.clsx("touch-none",d?"relative cursor-grabbing":"cursor-grab"),onClick:()=>a?.(e.id),...i,...s,children:[d&&o.jsx(ci,{className:"absolute inset-0"}),o.jsx("div",{className:N.clsx(d&&"invisible"),children:o.jsx(xl,{title:e.title,description:e.description,status:e.status,statusTheme:r,avatars:e.avatars,quickActions:e.quickActions,variant:n,onCheck:e.onCheck,onDelete:e.onDelete})})]})};Z3.displayName="DraggableCard";const Y3=({columnName:e})=>{const{setNodeRef:t}=lt.useDroppable({id:`endzone-${e}`,data:{columnName:e,isEndZone:!0}});return o.jsx("div",{ref:t,className:"flex-1 min-h-8"})};Y3.displayName="KanbanEndZone";const Am=({name:e,statusColor:t,cards:r,showCounter:n=!1,onAddCard:a,variant:i,emptyState:s="No items yet",onCardClick:l,className:c,fullHeight:u=!1})=>{const{setNodeRef:d}=lt.useDroppable({id:e,data:{columnName:e}}),{theme:f,statusState:h}=zA[t];return o.jsxs("div",{ref:d,className:te.twMerge(N.clsx("bg-surface-bg rounded-xl border border-surface-3 p-4 flex flex-col gap-3",u?"h-full min-h-0 flex-1 min-w-22":"w-22 shrink-0",c)),children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx(Ge,{variant:"status",size:"xs",statusState:h}),o.jsx("span",{className:"text-base font-semibold text-high-em truncate",children:e}),n&&o.jsxs("span",{className:"text-lg font-semibold text-low-em",children:["(",r.length,")"]})]}),a&&o.jsx(V,{icons:"only",hierarchy:"secondary",variant:"neutral",size:"xs",leadingIcon:o.jsx(F.Add,{}),onClick:a,"aria-label":`Add card to ${e}`})]}),o.jsx(dt.SortableContext,{items:r.map(p=>p.id),strategy:dt.verticalListSortingStrategy,children:o.jsx("div",{className:N.clsx("flex flex-col gap-3 flex-1 pr-2",u?"min-h-0 overflow-y-auto ds-scrollbar":r.length>4&&"overflow-y-auto ds-scrollbar max-h-26"),children:r.length===0?o.jsx(ht,{flat:!0,description:s,className:"!bg-transparent h-full"}):o.jsxs(o.Fragment,{children:[r.map(p=>o.jsx(Z3,{card:p,columnName:e,statusTheme:f,variant:i,onCardClick:l},p.id)),o.jsx(Y3,{columnName:e})]})})}),a&&o.jsx(V,{hierarchy:"secondary",variant:"neutral",size:"sm",icons:"leading",leadingIcon:o.jsx(F.Add,{}),className:"w-full justify-center",onClick:a,children:"Add Task"})]})};Am.displayName="KanbanColumn";const BA={red:"danger",orange:"warning",green:"success",gray:"surface"},FA=e=>{const t=lt.pointerWithin(e);return t.length>0?t:lt.rectIntersection(e)},X3=({columns:e,data:t,fieldMap:r,showCounter:n,variant:a,emptyState:i,columnClassName:s,fullHeight:l,onAddCard:c,onCardCheck:u,onCardDelete:d,onCardMove:f,onCardClick:h,className:p,...g})=>{const[x,m]=P.useState(null),[v,b]=P.useState(null),w=v??t,C=lt.useSensors(lt.useSensor(lt.PointerSensor,{activationConstraint:{distance:8}})),y=T=>w.filter(M=>M[r.status]===T).map(M=>{const R=String(M[r.id]??"");return{id:R,title:String(M[r.title]??""),description:r.description?M[r.description]:void 0,status:T,avatars:r.avatars?M[r.avatars]:void 0,quickActions:r.quickActions,onCheck:u?()=>u(R):void 0,onDelete:d?()=>d(R):void 0}}),S=e.flatMap(T=>y(T.name)).find(T=>T.id===x)??null,A=S?e.find(T=>y(T.name).some(M=>M.id===x))?.name:void 0,_=T=>{m(String(T.active.id)),b([...t])},I=T=>{const{active:M,over:R}=T;if(!R)return;const $=String(M.id),L=String(R.id);if($===L)return;const q=R.data.current?.columnName;q!=null&&b(U=>{const D=U??t,B=D.findIndex(ne=>String(ne[r.id])===$);if(B<0)return U;const W={...D[B],[r.status]:q},G=D.filter((ne,X)=>X!==B),Q=G.findIndex(ne=>String(ne[r.id])===L);if(Q>=0)G.splice(Q,0,W);else{let ne=-1;G.forEach((X,re)=>{X[r.status]===q&&(ne=re)}),G.splice(ne+1,0,W)}return G})},k=T=>{const M=v;if(m(null),b(null),!M)return;const R=String(T.active.id),$=M.find(U=>String(U[r.id])===R);if(!$)return;const L=String($[r.status]??""),q=Math.max(0,M.filter(U=>U[r.status]===$[r.status]).findIndex(U=>String(U[r.id])===R));f?.(R,L,q)},E=()=>{m(null),b(null)};return o.jsxs(lt.DndContext,{sensors:C,collisionDetection:FA,onDragStart:_,onDragOver:I,onDragEnd:k,onDragCancel:E,children:[o.jsx("div",{className:te.twMerge(N.clsx("flex flex-row gap-4 p-4 overflow-x-auto ds-scrollbar",l&&"h-full",p)),...g,children:e.map(T=>o.jsx(Am,{name:T.name,statusColor:T.statusColor,cards:y(T.name),showCounter:n,variant:a,emptyState:i,onAddCard:c?()=>c(T.name):void 0,onCardClick:h,className:s,fullHeight:l},T.name))}),o.jsx(lt.DragOverlay,{dropAnimation:null,children:S&&A&&o.jsx(xl,{title:S.title,description:S.description,status:S.status,statusTheme:BA[e.find(T=>T.name===A).statusColor],avatars:S.avatars,quickActions:S.quickActions,variant:a,className:"rotate-1 shadow-e3"})})]})};X3.displayName="Kanban";var co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nc,hg;function vt(){if(hg)return nc;hg=1;var e=Array.isArray;return nc=e,nc}var ac,pg;function Q3(){if(pg)return ac;pg=1;var e=typeof co=="object"&&co&&co.Object===Object&&co;return ac=e,ac}var ic,mg;function rr(){if(mg)return ic;mg=1;var e=Q3(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ic=r,ic}var oc,xg;function Xi(){if(xg)return oc;xg=1;var e=rr(),t=e.Symbol;return oc=t,oc}var sc,gg;function qA(){if(gg)return sc;gg=1;var e=Xi(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(s){var l=r.call(s,a),c=s[a];try{s[a]=void 0;var u=!0}catch{}var d=n.call(s);return u&&(l?s[a]=c:delete s[a]),d}return sc=i,sc}var lc,vg;function WA(){if(vg)return lc;vg=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return lc=r,lc}var cc,yg;function Cr(){if(yg)return cc;yg=1;var e=Xi(),t=qA(),r=WA(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function s(l){return l==null?l===void 0?a:n:i&&i in Object(l)?t(l):r(l)}return cc=s,cc}var uc,bg;function Sr(){if(bg)return uc;bg=1;function e(t){return t!=null&&typeof t=="object"}return uc=e,uc}var dc,wg;function Oa(){if(wg)return dc;wg=1;var e=Cr(),t=Sr(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return dc=n,dc}var fc,jg;function _m(){if(jg)return fc;jg=1;var e=vt(),t=Oa(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,s){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||s!=null&&i in Object(s)}return fc=a,fc}var hc,Cg;function zr(){if(Cg)return hc;Cg=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return hc=e,hc}var pc,Sg;function km(){if(Sg)return pc;Sg=1;var e=Cr(),t=zr(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function s(l){if(!t(l))return!1;var c=e(l);return c==n||c==a||c==r||c==i}return pc=s,pc}var mc,Og;function HA(){if(Og)return mc;Og=1;var e=rr(),t=e["__core-js_shared__"];return mc=t,mc}var xc,Ng;function VA(){if(Ng)return xc;Ng=1;var e=HA(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return xc=r,xc}var gc,Pg;function J3(){if(Pg)return gc;Pg=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return gc=r,gc}var vc,Ag;function UA(){if(Ag)return vc;Ag=1;var e=km(),t=VA(),r=zr(),n=J3(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!r(h)||t(h))return!1;var p=e(h)?d:i;return p.test(n(h))}return vc=f,vc}var yc,_g;function KA(){if(_g)return yc;_g=1;function e(t,r){return t?.[r]}return yc=e,yc}var bc,kg;function vn(){if(kg)return bc;kg=1;var e=UA(),t=KA();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return bc=r,bc}var wc,Tg;function gl(){if(Tg)return wc;Tg=1;var e=vn(),t=e(Object,"create");return wc=t,wc}var jc,Eg;function GA(){if(Eg)return jc;Eg=1;var e=gl();function t(){this.__data__=e?e(null):{},this.size=0}return jc=t,jc}var Cc,Ig;function ZA(){if(Ig)return Cc;Ig=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Cc=e,Cc}var Sc,Mg;function YA(){if(Mg)return Sc;Mg=1;var e=gl(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var s=this.__data__;if(e){var l=s[i];return l===t?void 0:l}return n.call(s,i)?s[i]:void 0}return Sc=a,Sc}var Oc,$g;function XA(){if($g)return Oc;$g=1;var e=gl(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return Oc=n,Oc}var Nc,Rg;function QA(){if(Rg)return Nc;Rg=1;var e=gl(),t="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?t:a,this}return Nc=r,Nc}var Pc,Lg;function JA(){if(Lg)return Pc;Lg=1;var e=GA(),t=ZA(),r=YA(),n=XA(),a=QA();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Pc=i,Pc}var Ac,Dg;function e_(){if(Dg)return Ac;Dg=1;function e(){this.__data__=[],this.size=0}return Ac=e,Ac}var _c,zg;function Tm(){if(zg)return _c;zg=1;function e(t,r){return t===r||t!==t&&r!==r}return _c=e,_c}var kc,Bg;function vl(){if(Bg)return kc;Bg=1;var e=Tm();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return kc=t,kc}var Tc,Fg;function t_(){if(Fg)return Tc;Fg=1;var e=vl(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,s=e(i,a);if(s<0)return!1;var l=i.length-1;return s==l?i.pop():r.call(i,s,1),--this.size,!0}return Tc=n,Tc}var Ec,qg;function r_(){if(qg)return Ec;qg=1;var e=vl();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return Ec=t,Ec}var Ic,Wg;function n_(){if(Wg)return Ic;Wg=1;var e=vl();function t(r){return e(this.__data__,r)>-1}return Ic=t,Ic}var Mc,Hg;function a_(){if(Hg)return Mc;Hg=1;var e=vl();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Mc=t,Mc}var $c,Vg;function yl(){if(Vg)return $c;Vg=1;var e=e_(),t=t_(),r=r_(),n=n_(),a=a_();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,$c=i,$c}var Rc,Ug;function Em(){if(Ug)return Rc;Ug=1;var e=vn(),t=rr(),r=e(t,"Map");return Rc=r,Rc}var Lc,Kg;function i_(){if(Kg)return Lc;Kg=1;var e=JA(),t=yl(),r=Em();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Lc=n,Lc}var Dc,Gg;function o_(){if(Gg)return Dc;Gg=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Dc=e,Dc}var zc,Zg;function bl(){if(Zg)return zc;Zg=1;var e=o_();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return zc=t,zc}var Bc,Yg;function s_(){if(Yg)return Bc;Yg=1;var e=bl();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Bc=t,Bc}var Fc,Xg;function l_(){if(Xg)return Fc;Xg=1;var e=bl();function t(r){return e(this,r).get(r)}return Fc=t,Fc}var qc,Qg;function c_(){if(Qg)return qc;Qg=1;var e=bl();function t(r){return e(this,r).has(r)}return qc=t,qc}var Wc,Jg;function u_(){if(Jg)return Wc;Jg=1;var e=bl();function t(r,n){var a=e(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return Wc=t,Wc}var Hc,ev;function Im(){if(ev)return Hc;ev=1;var e=i_(),t=s_(),r=l_(),n=c_(),a=u_();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var u=s[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Hc=i,Hc}var Vc,tv;function eC(){if(tv)return Vc;tv=1;var e=Im(),t="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var s=arguments,l=a?a.apply(this,s):s[0],c=i.cache;if(c.has(l))return c.get(l);var u=n.apply(this,s);return i.cache=c.set(l,u)||c,u};return i.cache=new(r.Cache||e),i}return r.Cache=e,Vc=r,Vc}var Uc,rv;function d_(){if(rv)return Uc;rv=1;var e=eC(),t=500;function r(n){var a=e(n,function(s){return i.size===t&&i.clear(),s}),i=a.cache;return a}return Uc=r,Uc}var Kc,nv;function f_(){if(nv)return Kc;nv=1;var e=d_(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(s,l,c,u){i.push(c?u.replace(r,"$1"):l||s)}),i});return Kc=n,Kc}var Gc,av;function Mm(){if(av)return Gc;av=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=Array(a);++n<a;)i[n]=r(t[n],n,t);return i}return Gc=e,Gc}var Zc,iv;function h_(){if(iv)return Zc;iv=1;var e=Xi(),t=Mm(),r=vt(),n=Oa(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function s(l){if(typeof l=="string")return l;if(r(l))return t(l,s)+"";if(n(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return Zc=s,Zc}var Yc,ov;function tC(){if(ov)return Yc;ov=1;var e=h_();function t(r){return r==null?"":e(r)}return Yc=t,Yc}var Xc,sv;function rC(){if(sv)return Xc;sv=1;var e=vt(),t=_m(),r=f_(),n=tC();function a(i,s){return e(i)?i:t(i,s)?[i]:r(n(i))}return Xc=a,Xc}var Qc,lv;function wl(){if(lv)return Qc;lv=1;var e=Oa();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Qc=t,Qc}var Jc,cv;function $m(){if(cv)return Jc;cv=1;var e=rC(),t=wl();function r(n,a){a=e(a,n);for(var i=0,s=a.length;n!=null&&i<s;)n=n[t(a[i++])];return i&&i==s?n:void 0}return Jc=r,Jc}var eu,uv;function nC(){if(uv)return eu;uv=1;var e=$m();function t(r,n,a){var i=r==null?void 0:e(r,n);return i===void 0?a:i}return eu=t,eu}var p_=nC();const St=Oe(p_);var tu,dv;function m_(){if(dv)return tu;dv=1;function e(t){return t==null}return tu=e,tu}var x_=m_();const de=Oe(x_);var ru,fv;function g_(){if(fv)return ru;fv=1;var e=Cr(),t=vt(),r=Sr(),n="[object String]";function a(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return ru=a,ru}var v_=g_();const un=Oe(v_);var y_=km();const le=Oe(y_);var b_=zr();const Na=Oe(b_);var uo={exports:{}},ye={};var hv;function w_(){if(hv)return ye;hv=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function x(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case e:switch(m=m.type,m){case r:case a:case n:case u:case d:return m;default:switch(m=m&&m.$$typeof,m){case l:case s:case c:case h:case f:case i:return m;default:return v}}case t:return v}}}return ye.ContextConsumer=s,ye.ContextProvider=i,ye.Element=e,ye.ForwardRef=c,ye.Fragment=r,ye.Lazy=h,ye.Memo=f,ye.Portal=t,ye.Profiler=a,ye.StrictMode=n,ye.Suspense=u,ye.SuspenseList=d,ye.isAsyncMode=function(){return!1},ye.isConcurrentMode=function(){return!1},ye.isContextConsumer=function(m){return x(m)===s},ye.isContextProvider=function(m){return x(m)===i},ye.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},ye.isForwardRef=function(m){return x(m)===c},ye.isFragment=function(m){return x(m)===r},ye.isLazy=function(m){return x(m)===h},ye.isMemo=function(m){return x(m)===f},ye.isPortal=function(m){return x(m)===t},ye.isProfiler=function(m){return x(m)===a},ye.isStrictMode=function(m){return x(m)===n},ye.isSuspense=function(m){return x(m)===u},ye.isSuspenseList=function(m){return x(m)===d},ye.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===a||m===n||m===u||m===d||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===f||m.$$typeof===i||m.$$typeof===s||m.$$typeof===c||m.$$typeof===g||m.getModuleId!==void 0)},ye.typeOf=x,ye}var be={};var pv;function j_(){return pv||(pv=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=!1,x=!1,m=!1,v=!1,b=!1,w;w=Symbol.for("react.module.reference");function C(Y){return!!(typeof Y=="string"||typeof Y=="function"||Y===r||Y===a||b||Y===n||Y===u||Y===d||v||Y===p||g||x||m||typeof Y=="object"&&Y!==null&&(Y.$$typeof===h||Y.$$typeof===f||Y.$$typeof===i||Y.$$typeof===s||Y.$$typeof===c||Y.$$typeof===w||Y.getModuleId!==void 0))}function y(Y){if(typeof Y=="object"&&Y!==null){var Ne=Y.$$typeof;switch(Ne){case e:var $e=Y.type;switch($e){case r:case a:case n:case u:case d:return $e;default:var tt=$e&&$e.$$typeof;switch(tt){case l:case s:case c:case h:case f:case i:return tt;default:return Ne}}case t:return Ne}}}var j=s,S=i,A=e,_=c,I=r,k=h,E=f,T=t,M=a,R=n,$=u,L=d,q=!1,U=!1;function D(Y){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(Y){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(Y){return y(Y)===s}function G(Y){return y(Y)===i}function Q(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function ne(Y){return y(Y)===c}function X(Y){return y(Y)===r}function re(Y){return y(Y)===h}function ce(Y){return y(Y)===f}function K(Y){return y(Y)===t}function J(Y){return y(Y)===a}function ee(Y){return y(Y)===n}function z(Y){return y(Y)===u}function pe(Y){return y(Y)===d}be.ContextConsumer=j,be.ContextProvider=S,be.Element=A,be.ForwardRef=_,be.Fragment=I,be.Lazy=k,be.Memo=E,be.Portal=T,be.Profiler=M,be.StrictMode=R,be.Suspense=$,be.SuspenseList=L,be.isAsyncMode=D,be.isConcurrentMode=B,be.isContextConsumer=W,be.isContextProvider=G,be.isElement=Q,be.isForwardRef=ne,be.isFragment=X,be.isLazy=re,be.isMemo=ce,be.isPortal=K,be.isProfiler=J,be.isStrictMode=ee,be.isSuspense=z,be.isSuspenseList=pe,be.isValidElementType=C,be.typeOf=y})()),be}var mv;function C_(){return mv||(mv=1,process.env.NODE_ENV==="production"?uo.exports=w_():uo.exports=j_()),uo.exports}var S_=C_(),nu,xv;function aC(){if(xv)return nu;xv=1;var e=Cr(),t=Sr(),r="[object Number]";function n(a){return typeof a=="number"||t(a)&&e(a)==r}return nu=n,nu}var au,gv;function O_(){if(gv)return au;gv=1;var e=aC();function t(r){return e(r)&&r!=+r}return au=t,au}var N_=O_();const Pa=Oe(N_);var P_=aC();const A_=Oe(P_);var Je=function(t){return t===0?0:t>0?1:-1},en=function(t){return un(t)&&t.indexOf("%")===t.length-1},Z=function(t){return A_(t)&&!Pa(t)},__=function(t){return de(t)},Ke=function(t){return Z(t)||un(t)},k_=0,yn=function(t){var r=++k_;return"".concat(t||"").concat(r)},ct=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Z(t)&&!un(t))return n;var i;if(en(t)){var s=t.indexOf("%");i=r*parseFloat(t.slice(0,s))/100}else i=+t;return Pa(i)&&(i=n),a&&i>r&&(i=r),i},Tr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},T_=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},Ee=function(t,r){return Z(t)&&Z(r)?function(n){return t+n*(r-t)}:function(){return r}};function Lo(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):St(n,t))===r})}var E_=function(t,r){return Z(t)&&Z(r)?t-r:un(t)&&un(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function zn(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}var I_=["viewBox","children"],M_=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],vv=["points","pathLength"],iu={svg:I_,polygon:vv,polyline:vv},Rm=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Do=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(P.isValidElement(t)&&(n=t.props),!Na(n))return null;var a={};return Object.keys(n).forEach(function(i){Rm.includes(i)&&(a[i]=r||function(s){return n[i](n,s)})}),a},$_=function(t,r,n){return function(a){return t(r,n,a),null}},xr=function(t,r,n){if(!Na(t)||bh(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var s=t[i];Rm.includes(i)&&typeof s=="function"&&(a||(a={}),a[i]=$_(s,r,n))}),a},R_=["children"],L_=["children"];function yv(e,t){if(e==null)return{};var r=D_(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function D_(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wh(e){"@babel/helpers - typeof";return wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wh(e)}var bv={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},fr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},wv=null,ou=null,Lm=function e(t){if(t===wv&&Array.isArray(ou))return ou;var r=[];return P.Children.forEach(t,function(n){de(n)||(S_.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),ou=r,wv=t,r};function gt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return fr(a)}):n=[fr(t)],Lm(e).forEach(function(a){var i=St(a,"type.displayName")||St(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function wt(e,t){var r=gt(e,t);return r&&r[0]}var jv=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!Z(n)||n<=0||!Z(a)||a<=0)},z_=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],B_=function(t){return t&&t.type&&un(t.type)&&z_.indexOf(t.type)>=0},iC=function(t){return t&&wh(t)==="object"&&"clipDot"in t},F_=function(t,r,n,a){var i,s=(i=iu?.[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!le(t)&&(a&&s.includes(r)||M_.includes(r))||n&&Rm.includes(r)},oe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(P.isValidElement(t)&&(a=t.props),!Na(a))return null;var i={};return Object.keys(a).forEach(function(s){var l;F_((l=a)===null||l===void 0?void 0:l[s],s,r,n)&&(i[s]=a[s])}),i},jh=function e(t,r){if(t===r)return!0;var n=P.Children.count(t);if(n!==P.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Cv(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],s=r[a];if(Array.isArray(i)||Array.isArray(s)){if(!e(i,s))return!1}else if(!Cv(i,s))return!1}return!0},Cv=function(t,r){if(de(t)&&de(r))return!0;if(!de(t)&&!de(r)){var n=t.props||{},a=n.children,i=yv(n,R_),s=r.props||{},l=s.children,c=yv(s,L_);return a&&l?zn(i,c)&&jh(a,l):!a&&!l?zn(i,c):!1}return!1},Sv=function(t,r){var n=[],a={};return Lm(t).forEach(function(i,s){if(B_(i))n.push(i);else if(i){var l=fr(i.type),c=r[l]||{},u=c.handler,d=c.once;if(u&&(!d||!a[l])){var f=u(i,l,s);n.push(f),a[l]=!0}}}),n},q_=function(t){var r=t&&t.type;return r&&bv[r]?bv[r]:null},W_=function(t,r){return Lm(r).indexOf(t)},H_=["children","width","height","viewBox","className","style","title","desc"];function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ch.apply(this,arguments)}function V_(e,t){if(e==null)return{};var r=U_(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function U_(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sh(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,s=e.style,l=e.title,c=e.desc,u=V_(e,H_),d=a||{width:r,height:n,x:0,y:0},f=ae.default("recharts-surface",i);return O.default.createElement("svg",Ch({},oe(u,!0,"svg"),{className:f,width:r,height:n,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),O.default.createElement("title",null,l),O.default.createElement("desc",null,c),t)}var K_=["children","className"];function Oh(){return Oh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oh.apply(this,arguments)}function G_(e,t){if(e==null)return{};var r=Z_(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Z_(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var fe=O.default.forwardRef(function(e,t){var r=e.children,n=e.className,a=G_(e,K_),i=ae.default("recharts-layer",n);return O.default.createElement("g",Oh({className:i},oe(a,!0),{ref:t}),r)}),Y_=process.env.NODE_ENV!=="production",Et=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];if(Y_&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(r.replace(/%s/g,function(){return a[s++]}))}},su,Ov;function X_(){if(Ov)return su;Ov=1;function e(t,r,n){var a=-1,i=t.length;r<0&&(r=-r>i?0:i+r),n=n>i?i:n,n<0&&(n+=i),i=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(i);++a<i;)s[a]=t[a+r];return s}return su=e,su}var lu,Nv;function Q_(){if(Nv)return lu;Nv=1;var e=X_();function t(r,n,a){var i=r.length;return a=a===void 0?i:a,!n&&a>=i?r:e(r,n,a)}return lu=t,lu}var cu,Pv;function oC(){if(Pv)return cu;Pv=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="\\u200d",l=RegExp("["+s+e+a+i+"]");function c(u){return l.test(u)}return cu=c,cu}var uu,Av;function J_(){if(Av)return uu;Av=1;function e(t){return t.split("")}return uu=e,uu}var du,_v;function e8(){if(_v)return du;_v=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=u+"?",x="["+i+"]?",m="(?:"+p+"(?:"+[d,f,h].join("|")+")"+x+g+")*",v=x+g+m,b="(?:"+[d+l+"?",l,f,h,s].join("|")+")",w=RegExp(c+"(?="+c+")|"+b+v,"g");function C(y){return y.match(w)||[]}return du=C,du}var fu,kv;function t8(){if(kv)return fu;kv=1;var e=J_(),t=oC(),r=e8();function n(a){return t(a)?r(a):e(a)}return fu=n,fu}var hu,Tv;function r8(){if(Tv)return hu;Tv=1;var e=Q_(),t=oC(),r=t8(),n=tC();function a(i){return function(s){s=n(s);var l=t(s)?r(s):void 0,c=l?l[0]:s.charAt(0),u=l?e(l,1).join(""):s.slice(1);return c[i]()+u}}return hu=a,hu}var pu,Ev;function n8(){if(Ev)return pu;Ev=1;var e=r8(),t=e("toUpperCase");return pu=t,pu}var a8=n8();const jl=Oe(a8);function ke(e){return function(){return e}}const sC=Math.cos,zo=Math.sin,Ht=Math.sqrt,Bo=Math.PI,Cl=2*Bo,Nh=Math.PI,Ph=2*Nh,Yr=1e-6,i8=Ph-Yr;function lC(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function o8(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return lC;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class s8{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?lC:o8(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,s){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,l=this._y1,c=n-t,u=a-r,d=s-t,f=l-r,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Yr)if(!(Math.abs(f*c-u*d)>Yr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,g=a-l,x=c*c+u*u,m=p*p+g*g,v=Math.sqrt(x),b=Math.sqrt(h),w=i*Math.tan((Nh-Math.acos((x+h-m)/(2*v*b)))/2),C=w/b,y=w/v;Math.abs(C-1)>Yr&&this._append`L${t+C*d},${r+C*f}`,this._append`A${i},${i},0,0,${+(f*p>d*g)},${this._x1=t+y*c},${this._y1=r+y*u}`}}arc(t,r,n,a,i,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),c=n*Math.sin(a),u=t+l,d=r+c,f=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Yr||Math.abs(this._y1-d)>Yr)&&this._append`L${u},${d}`,n&&(h<0&&(h=h%Ph+Ph),h>i8?this._append`A${n},${n},0,1,${f},${t-l},${r-c}A${n},${n},0,1,${f},${this._x1=u},${this._y1=d}`:h>Yr&&this._append`A${n},${n},0,${+(h>=Nh)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function Dm(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new s8(t)}function zm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cC(e){this._context=e}cC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sl(e){return new cC(e)}function uC(e){return e[0]}function dC(e){return e[1]}function fC(e,t){var r=ke(!0),n=null,a=Sl,i=null,s=Dm(l);e=typeof e=="function"?e:e===void 0?uC:ke(e),t=typeof t=="function"?t:t===void 0?dC:ke(t);function l(c){var u,d=(c=zm(c)).length,f,h=!1,p;for(n==null&&(i=a(p=s())),u=0;u<=d;++u)!(u<d&&r(f=c[u],u,c))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(f,u,c),+t(f,u,c));if(p)return i=null,p+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:ke(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:ke(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ke(!!c),l):r},l.curve=function(c){return arguments.length?(a=c,n!=null&&(i=a(n)),l):a},l.context=function(c){return arguments.length?(c==null?n=i=null:i=a(n=c),l):n},l}function fo(e,t,r){var n=null,a=ke(!0),i=null,s=Sl,l=null,c=Dm(u);e=typeof e=="function"?e:e===void 0?uC:ke(+e),t=typeof t=="function"?t:ke(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?dC:ke(+r);function u(f){var h,p,g,x=(f=zm(f)).length,m,v=!1,b,w=new Array(x),C=new Array(x);for(i==null&&(l=s(b=c())),h=0;h<=x;++h){if(!(h<x&&a(m=f[h],h,f))===v)if(v=!v)p=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),g=h-1;g>=p;--g)l.point(w[g],C[g]);l.lineEnd(),l.areaEnd()}v&&(w[h]=+e(m,h,f),C[h]=+t(m,h,f),l.point(n?+n(m,h,f):w[h],r?+r(m,h,f):C[h]))}if(b)return l=null,b+""||null}function d(){return fC().defined(a).curve(s).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ke(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ke(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ke(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ke(+f),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:ke(!!f),u):a},u.curve=function(f){return arguments.length?(s=f,i!=null&&(l=s(i)),u):s},u.context=function(f){return arguments.length?(f==null?i=l=null:l=s(i=f),u):i},u}class hC{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function l8(e){return new hC(e,!0)}function c8(e){return new hC(e,!1)}const Bm={draw(e,t){const r=Ht(t/Bo);e.moveTo(r,0),e.arc(0,0,r,0,Cl)}},u8={draw(e,t){const r=Ht(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},pC=Ht(1/3),d8=pC*2,f8={draw(e,t){const r=Ht(t/d8),n=r*pC;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},h8={draw(e,t){const r=Ht(t),n=-r/2;e.rect(n,n,r,r)}},p8=.8908130915292852,mC=zo(Bo/10)/zo(7*Bo/10),m8=zo(Cl/10)*mC,x8=-sC(Cl/10)*mC,g8={draw(e,t){const r=Ht(t*p8),n=m8*r,a=x8*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const s=Cl*i/5,l=sC(s),c=zo(s);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*a,c*n+l*a)}e.closePath()}},mu=Ht(3),v8={draw(e,t){const r=-Ht(t/(mu*3));e.moveTo(0,r*2),e.lineTo(-mu*r,-r),e.lineTo(mu*r,-r),e.closePath()}},Nt=-.5,Pt=Ht(3)/2,Ah=1/Ht(12),y8=(Ah/2+1)*3,b8={draw(e,t){const r=Ht(t/y8),n=r/2,a=r*Ah,i=n,s=r*Ah+r,l=-i,c=s;e.moveTo(n,a),e.lineTo(i,s),e.lineTo(l,c),e.lineTo(Nt*n-Pt*a,Pt*n+Nt*a),e.lineTo(Nt*i-Pt*s,Pt*i+Nt*s),e.lineTo(Nt*l-Pt*c,Pt*l+Nt*c),e.lineTo(Nt*n+Pt*a,Nt*a-Pt*n),e.lineTo(Nt*i+Pt*s,Nt*s-Pt*i),e.lineTo(Nt*l+Pt*c,Nt*c-Pt*l),e.closePath()}};function w8(e,t){let r=null,n=Dm(a);e=typeof e=="function"?e:ke(e||Bm),t=typeof t=="function"?t:ke(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:ke(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:ke(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Fo(){}function qo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function xC(e){this._context=e}xC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:qo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:qo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function j8(e){return new xC(e)}function gC(e){this._context=e}gC.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:qo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function C8(e){return new gC(e)}function vC(e){this._context=e}vC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:qo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S8(e){return new vC(e)}function yC(e){this._context=e}yC.prototype={areaStart:Fo,areaEnd:Fo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function O8(e){return new yC(e)}function Iv(e){return e<0?-1:1}function Mv(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),s=(r-e._y1)/(a||n<0&&-0),l=(i*a+s*n)/(n+a);return(Iv(i)+Iv(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(l))||0}function $v(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function xu(e,t,r){var n=e._x0,a=e._y0,i=e._x1,s=e._y1,l=(i-n)/3;e._context.bezierCurveTo(n+l,a+l*t,i-l,s-l*r,i,s)}function Wo(e){this._context=e}Wo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xu(this,this._t0,$v(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,xu(this,$v(this,r=Mv(this,e,t)),r);break;default:xu(this,this._t0,r=Mv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function bC(e){this._context=new wC(e)}(bC.prototype=Object.create(Wo.prototype)).point=function(e,t){Wo.prototype.point.call(this,t,e)};function wC(e){this._context=e}wC.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function N8(e){return new Wo(e)}function P8(e){return new bC(e)}function jC(e){this._context=e}jC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Rv(e),a=Rv(t),i=0,s=1;s<r;++i,++s)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Rv(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),s=new Array(r);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,s[t]-=n*s[t-1];for(a[r-1]=s[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function A8(e){return new jC(e)}function Ol(e,t){this._context=e,this._t=t}Ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function _8(e){return new Ol(e,.5)}function k8(e){return new Ol(e,0)}function T8(e){return new Ol(e,1)}function Gn(e,t){if((s=e.length)>1)for(var r=1,n,a,i=e[t[0]],s,l=i.length;r<s;++r)for(a=i,i=e[t[r]],n=0;n<l;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function _h(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function E8(e,t){return e[t]}function I8(e){const t=[];return t.key=e,t}function M8(){var e=ke([]),t=_h,r=Gn,n=E8;function a(i){var s=Array.from(e.apply(this,arguments),I8),l,c=s.length,u=-1,d;for(const f of i)for(l=0,++u;l<c;++l)(s[l][u]=[0,+n(f,s[l].key,u,i)]).data=f;for(l=0,d=zm(t(s));l<c;++l)s[d[l]].index=l;return r(s,d),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:ke(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:ke(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?_h:typeof i=="function"?i:ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??Gn,a):r},a}function $8(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,s;a<i;++a){for(s=r=0;r<n;++r)s+=e[r][a][1]||0;if(s)for(r=0;r<n;++r)e[r][a][1]/=s}Gn(e,t)}}function R8(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var s=0,l=0;s<a;++s)l+=e[s][r][1]||0;n[r][1]+=n[r][0]=-l/2}Gn(e,t)}}function L8(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,s;n<i;++n){for(var l=0,c=0,u=0;l<s;++l){for(var d=e[t[l]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,g=0;g<l;++g){var x=e[t[g]],m=x[n][1]||0,v=x[n-1][1]||0;p+=m-v}c+=f,u+=p*f}a[n-1][1]+=a[n-1][0]=r,c&&(r-=u/c)}a[n-1][1]+=a[n-1][0]=r,Gn(e,t)}}function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}var D8=["type","size","sizeType"];function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kh.apply(this,arguments)}function Lv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lv(Object(r),!0).forEach(function(n){z8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z8(e,t,r){return t=B8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B8(e){var t=F8(e,"string");return ui(t)=="symbol"?t:t+""}function F8(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function q8(e,t){if(e==null)return{};var r=W8(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var CC={symbolCircle:Bm,symbolCross:u8,symbolDiamond:f8,symbolSquare:h8,symbolStar:g8,symbolTriangle:v8,symbolWye:b8},H8=Math.PI/180,V8=function(t){var r="symbol".concat(jl(t));return CC[r]||Bm},U8=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*H8;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},K8=function(t,r){CC["symbol".concat(jl(t))]=r},Fm=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,s=t.sizeType,l=s===void 0?"area":s,c=q8(t,D8),u=Dv(Dv({},c),{},{type:n,size:i,sizeType:l}),d=function(){var m=V8(n),v=w8().type(m).size(U8(i,l,n));return v()},f=u.className,h=u.cx,p=u.cy,g=oe(u,!0);return h===+h&&p===+p&&i===+i?O.default.createElement("path",kh({},g,{className:ae.default("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};Fm.registerSymbol=K8;function Zn(e){"@babel/helpers - typeof";return Zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zn(e)}function Th(){return Th=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Th.apply(this,arguments)}function zv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function G8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zv(Object(r),!0).forEach(function(n){di(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y8(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,OC(n.key),n)}}function X8(e,t,r){return t&&Y8(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q8(e,t,r){return t=Ho(t),J8(e,SC()?Reflect.construct(t,r||[],Ho(e).constructor):t.apply(e,r))}function J8(e,t){if(t&&(Zn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e9(e)}function e9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SC=function(){return!!e})()}function Ho(e){return Ho=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ho(e)}function t9(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eh(e,t)}function Eh(e,t){return Eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Eh(e,t)}function di(e,t,r){return t=OC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OC(e){var t=r9(e,"string");return Zn(t)=="symbol"?t:t+""}function r9(e,t){if(Zn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Zn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var At=32,qm=(function(e){function t(){return Z8(this,t),Q8(this,t,arguments)}return t9(t,e),X8(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=At/2,s=At/6,l=At/3,c=n.inactive?a:n.color;if(n.type==="plainline")return O.default.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:At,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return O.default.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
|
|
26
22
|
A`).concat(s,",").concat(s,",0,1,1,").concat(2*l,",").concat(i,`
|
|
27
23
|
H`).concat(At,"M").concat(2*l,",").concat(i,`
|
|
28
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return O.default.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(At/8,"h").concat(At,"v").concat(At*3/4,"h").concat(-At,"z"),className:"recharts-legend-icon"});if(O.default.isValidElement(n.legendIcon)){var u=G8({},n);return delete u.legendIcon,O.default.cloneElement(n.legendIcon,u)}return O.default.createElement(Fm,{fill:c,cx:i,cy:i,size:At,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,s=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,d={x:0,y:0,width:At,height:At},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,g){var x=p.formatter||c,m=ae.default(di(di({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var v=le(p.value)?null:p.value;Et(!le(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=p.inactive?u:p.color;return O.default.createElement("li",Th({className:m,style:f,key:"legend-item-".concat(g)},xr(n.props,p,g)),O.default.createElement(Sh,{width:s,height:s,viewBox:d,style:h},n.renderIcon(p)),O.default.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},x?x(v,p,g):v))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,s=n.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return O.default.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(P.PureComponent);di(qm,"displayName","Legend");di(qm,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var gu,Bv;function n9(){if(Bv)return gu;Bv=1;var e=yl();function t(){this.__data__=new e,this.size=0}return gu=t,gu}var vu,Fv;function a9(){if(Fv)return vu;Fv=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return vu=e,vu}var yu,qv;function i9(){if(qv)return yu;qv=1;function e(t){return this.__data__.get(t)}return yu=e,yu}var bu,Wv;function o9(){if(Wv)return bu;Wv=1;function e(t){return this.__data__.has(t)}return bu=e,bu}var wu,Hv;function s9(){if(Hv)return wu;Hv=1;var e=yl(),t=Em(),r=Im(),n=200;function a(i,s){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<n-1)return c.push([i,s]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(i,s),this.size=l.size,this}return wu=a,wu}var ju,Vv;function NC(){if(Vv)return ju;Vv=1;var e=yl(),t=n9(),r=a9(),n=i9(),a=o9(),i=s9();function s(l){var c=this.__data__=new e(l);this.size=c.size}return s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=a,s.prototype.set=i,ju=s,ju}var Cu,Uv;function l9(){if(Uv)return Cu;Uv=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Cu=t,Cu}var Su,Kv;function c9(){if(Kv)return Su;Kv=1;function e(t){return this.__data__.has(t)}return Su=e,Su}var Ou,Gv;function PC(){if(Gv)return Ou;Gv=1;var e=Im(),t=l9(),r=c9();function n(a){var i=-1,s=a==null?0:a.length;for(this.__data__=new e;++i<s;)this.add(a[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Ou=n,Ou}var Nu,Zv;function AC(){if(Zv)return Nu;Zv=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(t[n],n,t))return!0;return!1}return Nu=e,Nu}var Pu,Yv;function _C(){if(Yv)return Pu;Yv=1;function e(t,r){return t.has(r)}return Pu=e,Pu}var Au,Xv;function kC(){if(Xv)return Au;Xv=1;var e=PC(),t=AC(),r=_C(),n=1,a=2;function i(s,l,c,u,d,f){var h=c&n,p=s.length,g=l.length;if(p!=g&&!(h&&g>p))return!1;var x=f.get(s),m=f.get(l);if(x&&m)return x==l&&m==s;var v=-1,b=!0,w=c&a?new e:void 0;for(f.set(s,l),f.set(l,s);++v<p;){var C=s[v],y=l[v];if(u)var j=h?u(y,C,v,l,s,f):u(C,y,v,s,l,f);if(j!==void 0){if(j)continue;b=!1;break}if(w){if(!t(l,function(S,A){if(!r(w,A)&&(C===S||d(C,S,c,u,f)))return w.push(A)})){b=!1;break}}else if(!(C===y||d(C,y,c,u,f))){b=!1;break}}return f.delete(s),f.delete(l),b}return Au=i,Au}var _u,Qv;function u9(){if(Qv)return _u;Qv=1;var e=rr(),t=e.Uint8Array;return _u=t,_u}var ku,Jv;function d9(){if(Jv)return ku;Jv=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,i){n[++r]=[i,a]}),n}return ku=e,ku}var Tu,ey;function Wm(){if(ey)return Tu;ey=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return Tu=e,Tu}var Eu,ty;function f9(){if(ty)return Eu;ty=1;var e=Xi(),t=u9(),r=Tm(),n=kC(),a=d9(),i=Wm(),s=1,l=2,c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",x="[object String]",m="[object Symbol]",v="[object ArrayBuffer]",b="[object DataView]",w=e?e.prototype:void 0,C=w?w.valueOf:void 0;function y(j,S,A,_,I,k,E){switch(A){case b:if(j.byteLength!=S.byteLength||j.byteOffset!=S.byteOffset)return!1;j=j.buffer,S=S.buffer;case v:return!(j.byteLength!=S.byteLength||!k(new t(j),new t(S)));case c:case u:case h:return r(+j,+S);case d:return j.name==S.name&&j.message==S.message;case p:case x:return j==S+"";case f:var T=a;case g:var M=_&s;if(T||(T=i),j.size!=S.size&&!M)return!1;var R=E.get(j);if(R)return R==S;_|=l,E.set(j,S);var $=n(T(j),T(S),_,I,k,E);return E.delete(j),$;case m:if(C)return C.call(j)==C.call(S)}return!1}return Eu=y,Eu}var Iu,ry;function TC(){if(ry)return Iu;ry=1;function e(t,r){for(var n=-1,a=r.length,i=t.length;++n<a;)t[i+n]=r[n];return t}return Iu=e,Iu}var Mu,ny;function h9(){if(ny)return Mu;ny=1;var e=TC(),t=vt();function r(n,a,i){var s=a(n);return t(n)?s:e(s,i(n))}return Mu=r,Mu}var $u,ay;function p9(){if(ay)return $u;ay=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,s=[];++n<a;){var l=t[n];r(l,n,t)&&(s[i++]=l)}return s}return $u=e,$u}var Ru,iy;function m9(){if(iy)return Ru;iy=1;function e(){return[]}return Ru=e,Ru}var Lu,oy;function x9(){if(oy)return Lu;oy=1;var e=p9(),t=m9(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(s){return s==null?[]:(s=Object(s),e(a(s),function(l){return n.call(s,l)}))}:t;return Lu=i,Lu}var Du,sy;function g9(){if(sy)return Du;sy=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return Du=e,Du}var zu,ly;function v9(){if(ly)return zu;ly=1;var e=Cr(),t=Sr(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return zu=n,zu}var Bu,cy;function Hm(){if(cy)return Bu;cy=1;var e=v9(),t=Sr(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(s){return t(s)&&n.call(s,"callee")&&!a.call(s,"callee")};return Bu=i,Bu}var Xa={exports:{}},Fu,uy;function y9(){if(uy)return Fu;uy=1;function e(){return!1}return Fu=e,Fu}Xa.exports;var dy;function EC(){return dy||(dy=1,(function(e,t){var r=rr(),n=y9(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,l=s?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;e.exports=u})(Xa,Xa.exports)),Xa.exports}var qu,fy;function Vm(){if(fy)return qu;fy=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return qu=r,qu}var Wu,hy;function Um(){if(hy)return Wu;hy=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Wu=t,Wu}var Hu,py;function b9(){if(py)return Hu;py=1;var e=Cr(),t=Um(),r=Sr(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",g="[object String]",x="[object WeakMap]",m="[object ArrayBuffer]",v="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",C="[object Int8Array]",y="[object Int16Array]",j="[object Int32Array]",S="[object Uint8Array]",A="[object Uint8ClampedArray]",_="[object Uint16Array]",I="[object Uint32Array]",k={};k[b]=k[w]=k[C]=k[y]=k[j]=k[S]=k[A]=k[_]=k[I]=!0,k[n]=k[a]=k[m]=k[i]=k[v]=k[s]=k[l]=k[c]=k[u]=k[d]=k[f]=k[h]=k[p]=k[g]=k[x]=!1;function E(T){return r(T)&&t(T.length)&&!!k[e(T)]}return Hu=E,Hu}var Vu,my;function IC(){if(my)return Vu;my=1;function e(t){return function(r){return t(r)}}return Vu=e,Vu}var Qa={exports:{}};Qa.exports;var xy;function w9(){return xy||(xy=1,(function(e,t){var r=Q3(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,l=(function(){try{var c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();e.exports=l})(Qa,Qa.exports)),Qa.exports}var Uu,gy;function MC(){if(gy)return Uu;gy=1;var e=b9(),t=IC(),r=w9(),n=r&&r.isTypedArray,a=n?t(n):e;return Uu=a,Uu}var Ku,vy;function j9(){if(vy)return Ku;vy=1;var e=g9(),t=Hm(),r=vt(),n=EC(),a=Vm(),i=MC(),s=Object.prototype,l=s.hasOwnProperty;function c(u,d){var f=r(u),h=!f&&t(u),p=!f&&!h&&n(u),g=!f&&!h&&!p&&i(u),x=f||h||p||g,m=x?e(u.length,String):[],v=m.length;for(var b in u)(d||l.call(u,b))&&!(x&&(b=="length"||p&&(b=="offset"||b=="parent")||g&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||a(b,v)))&&m.push(b);return m}return Ku=c,Ku}var Gu,yy;function C9(){if(yy)return Gu;yy=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return Gu=t,Gu}var Zu,by;function $C(){if(by)return Zu;by=1;function e(t,r){return function(n){return t(r(n))}}return Zu=e,Zu}var Yu,wy;function S9(){if(wy)return Yu;wy=1;var e=$C(),t=e(Object.keys,Object);return Yu=t,Yu}var Xu,jy;function O9(){if(jy)return Xu;jy=1;var e=C9(),t=S9(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var s=[];for(var l in Object(i))n.call(i,l)&&l!="constructor"&&s.push(l);return s}return Xu=a,Xu}var Qu,Cy;function Qi(){if(Cy)return Qu;Cy=1;var e=km(),t=Um();function r(n){return n!=null&&t(n.length)&&!e(n)}return Qu=r,Qu}var Ju,Sy;function Nl(){if(Sy)return Ju;Sy=1;var e=j9(),t=O9(),r=Qi();function n(a){return r(a)?e(a):t(a)}return Ju=n,Ju}var ed,Oy;function N9(){if(Oy)return ed;Oy=1;var e=h9(),t=x9(),r=Nl();function n(a){return e(a,r,t)}return ed=n,ed}var td,Ny;function P9(){if(Ny)return td;Ny=1;var e=N9(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,s,l,c,u,d){var f=l&t,h=e(i),p=h.length,g=e(s),x=g.length;if(p!=x&&!f)return!1;for(var m=p;m--;){var v=h[m];if(!(f?v in s:n.call(s,v)))return!1}var b=d.get(i),w=d.get(s);if(b&&w)return b==s&&w==i;var C=!0;d.set(i,s),d.set(s,i);for(var y=f;++m<p;){v=h[m];var j=i[v],S=s[v];if(c)var A=f?c(S,j,v,s,i,d):c(j,S,v,i,s,d);if(!(A===void 0?j===S||u(j,S,l,c,d):A)){C=!1;break}y||(y=v=="constructor")}if(C&&!y){var _=i.constructor,I=s.constructor;_!=I&&"constructor"in i&&"constructor"in s&&!(typeof _=="function"&&_ instanceof _&&typeof I=="function"&&I instanceof I)&&(C=!1)}return d.delete(i),d.delete(s),C}return td=a,td}var rd,Py;function A9(){if(Py)return rd;Py=1;var e=vn(),t=rr(),r=e(t,"DataView");return rd=r,rd}var nd,Ay;function _9(){if(Ay)return nd;Ay=1;var e=vn(),t=rr(),r=e(t,"Promise");return nd=r,nd}var ad,_y;function RC(){if(_y)return ad;_y=1;var e=vn(),t=rr(),r=e(t,"Set");return ad=r,ad}var id,ky;function k9(){if(ky)return id;ky=1;var e=vn(),t=rr(),r=e(t,"WeakMap");return id=r,id}var od,Ty;function T9(){if(Ty)return od;Ty=1;var e=A9(),t=Em(),r=_9(),n=RC(),a=k9(),i=Cr(),s=J3(),l="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",p=s(e),g=s(t),x=s(r),m=s(n),v=s(a),b=i;return(e&&b(new e(new ArrayBuffer(1)))!=h||t&&b(new t)!=l||r&&b(r.resolve())!=u||n&&b(new n)!=d||a&&b(new a)!=f)&&(b=function(w){var C=i(w),y=C==c?w.constructor:void 0,j=y?s(y):"";if(j)switch(j){case p:return h;case g:return l;case x:return u;case m:return d;case v:return f}return C}),od=b,od}var sd,Ey;function E9(){if(Ey)return sd;Ey=1;var e=NC(),t=kC(),r=f9(),n=P9(),a=T9(),i=vt(),s=EC(),l=MC(),c=1,u="[object Arguments]",d="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(x,m,v,b,w,C){var y=i(x),j=i(m),S=y?d:a(x),A=j?d:a(m);S=S==u?f:S,A=A==u?f:A;var _=S==f,I=A==f,k=S==A;if(k&&s(x)){if(!s(m))return!1;y=!0,_=!1}if(k&&!_)return C||(C=new e),y||l(x)?t(x,m,v,b,w,C):r(x,m,S,v,b,w,C);if(!(v&c)){var E=_&&p.call(x,"__wrapped__"),T=I&&p.call(m,"__wrapped__");if(E||T){var M=E?x.value():x,R=T?m.value():m;return C||(C=new e),w(M,R,v,b,C)}}return k?(C||(C=new e),n(x,m,v,b,w,C)):!1}return sd=g,sd}var ld,Iy;function Km(){if(Iy)return ld;Iy=1;var e=E9(),t=Sr();function r(n,a,i,s,l){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,i,s,r,l)}return ld=r,ld}var cd,My;function I9(){if(My)return cd;My=1;var e=NC(),t=Km(),r=1,n=2;function a(i,s,l,c){var u=l.length,d=u,f=!c;if(i==null)return!d;for(i=Object(i);u--;){var h=l[u];if(f&&h[2]?h[1]!==i[h[0]]:!(h[0]in i))return!1}for(;++u<d;){h=l[u];var p=h[0],g=i[p],x=h[1];if(f&&h[2]){if(g===void 0&&!(p in i))return!1}else{var m=new e;if(c)var v=c(g,x,p,i,s,m);if(!(v===void 0?t(x,g,r|n,c,m):v))return!1}}return!0}return cd=a,cd}var ud,$y;function LC(){if($y)return ud;$y=1;var e=zr();function t(r){return r===r&&!e(r)}return ud=t,ud}var dd,Ry;function M9(){if(Ry)return dd;Ry=1;var e=LC(),t=Nl();function r(n){for(var a=t(n),i=a.length;i--;){var s=a[i],l=n[s];a[i]=[s,l,e(l)]}return a}return dd=r,dd}var fd,Ly;function DC(){if(Ly)return fd;Ly=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return fd=e,fd}var hd,Dy;function $9(){if(Dy)return hd;Dy=1;var e=I9(),t=M9(),r=DC();function n(a){var i=t(a);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(s){return s===a||e(s,a,i)}}return hd=n,hd}var pd,zy;function R9(){if(zy)return pd;zy=1;function e(t,r){return t!=null&&r in Object(t)}return pd=e,pd}var md,By;function L9(){if(By)return md;By=1;var e=rC(),t=Hm(),r=vt(),n=Vm(),a=Um(),i=wl();function s(l,c,u){c=e(c,l);for(var d=-1,f=c.length,h=!1;++d<f;){var p=i(c[d]);if(!(h=l!=null&&u(l,p)))break;l=l[p]}return h||++d!=f?h:(f=l==null?0:l.length,!!f&&a(f)&&n(p,f)&&(r(l)||t(l)))}return md=s,md}var xd,Fy;function D9(){if(Fy)return xd;Fy=1;var e=R9(),t=L9();function r(n,a){return n!=null&&t(n,a,e)}return xd=r,xd}var gd,qy;function z9(){if(qy)return gd;qy=1;var e=Km(),t=nC(),r=D9(),n=_m(),a=LC(),i=DC(),s=wl(),l=1,c=2;function u(d,f){return n(d)&&a(f)?i(s(d),f):function(h){var p=t(h,d);return p===void 0&&p===f?r(h,d):e(f,p,l|c)}}return gd=u,gd}var vd,Wy;function Aa(){if(Wy)return vd;Wy=1;function e(t){return t}return vd=e,vd}var yd,Hy;function B9(){if(Hy)return yd;Hy=1;function e(t){return function(r){return r?.[t]}}return yd=e,yd}var bd,Vy;function F9(){if(Vy)return bd;Vy=1;var e=$m();function t(r){return function(n){return e(n,r)}}return bd=t,bd}var wd,Uy;function q9(){if(Uy)return wd;Uy=1;var e=B9(),t=F9(),r=_m(),n=wl();function a(i){return r(i)?e(n(i)):t(i)}return wd=a,wd}var jd,Ky;function nr(){if(Ky)return jd;Ky=1;var e=$9(),t=z9(),r=Aa(),n=vt(),a=q9();function i(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?t(s[0],s[1]):e(s):a(s)}return jd=i,jd}var Cd,Gy;function zC(){if(Gy)return Cd;Gy=1;function e(t,r,n,a){for(var i=t.length,s=n+(a?1:-1);a?s--:++s<i;)if(r(t[s],s,t))return s;return-1}return Cd=e,Cd}var Sd,Zy;function W9(){if(Zy)return Sd;Zy=1;function e(t){return t!==t}return Sd=e,Sd}var Od,Yy;function H9(){if(Yy)return Od;Yy=1;function e(t,r,n){for(var a=n-1,i=t.length;++a<i;)if(t[a]===r)return a;return-1}return Od=e,Od}var Nd,Xy;function V9(){if(Xy)return Nd;Xy=1;var e=zC(),t=W9(),r=H9();function n(a,i,s){return i===i?r(a,i,s):e(a,t,s)}return Nd=n,Nd}var Pd,Qy;function U9(){if(Qy)return Pd;Qy=1;var e=V9();function t(r,n){var a=r==null?0:r.length;return!!a&&e(r,n,0)>-1}return Pd=t,Pd}var Ad,Jy;function K9(){if(Jy)return Ad;Jy=1;function e(t,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;)if(n(r,t[a]))return!0;return!1}return Ad=e,Ad}var _d,eb;function G9(){if(eb)return _d;eb=1;function e(){}return _d=e,_d}var kd,tb;function Z9(){if(tb)return kd;tb=1;var e=RC(),t=G9(),r=Wm(),n=1/0,a=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return kd=a,kd}var Td,rb;function Y9(){if(rb)return Td;rb=1;var e=PC(),t=U9(),r=K9(),n=_C(),a=Z9(),i=Wm(),s=200;function l(c,u,d){var f=-1,h=t,p=c.length,g=!0,x=[],m=x;if(d)g=!1,h=r;else if(p>=s){var v=u?null:a(c);if(v)return i(v);g=!1,h=n,m=new e}else m=u?[]:x;e:for(;++f<p;){var b=c[f],w=u?u(b):b;if(b=d||b!==0?b:0,g&&w===w){for(var C=m.length;C--;)if(m[C]===w)continue e;u&&m.push(w),x.push(b)}else h(m,w,d)||(m!==x&&m.push(w),x.push(b))}return x}return Td=l,Td}var Ed,nb;function X9(){if(nb)return Ed;nb=1;var e=nr(),t=Y9();function r(n,a){return n&&n.length?t(n,e(a,2)):[]}return Ed=r,Ed}var Q9=X9();const ab=Ne(Q9);function BC(e,t,r){return t===!0?ab(e,r):le(t)?ab(e,t):e}function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}var J9=["ref"];function ib(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ib(Object(r),!0).forEach(function(n){Pl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ib(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ek(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ob(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qC(n.key),n)}}function tk(e,t,r){return t&&ob(e.prototype,t),r&&ob(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rk(e,t,r){return t=Vo(t),nk(e,FC()?Reflect.construct(t,r||[],Vo(e).constructor):t.apply(e,r))}function nk(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ak(e)}function ak(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FC=function(){return!!e})()}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vo(e)}function ik(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ih(e,t)}function Ih(e,t){return Ih=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ih(e,t)}function Pl(e,t,r){return t=qC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qC(e){var t=ok(e,"string");return Yn(t)=="symbol"?t:t+""}function ok(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function sk(e,t){if(e==null)return{};var r=lk(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lk(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ck(e){return e.value}function uk(e,t){if(O.default.isValidElement(e))return O.default.cloneElement(e,t);if(typeof e=="function")return O.default.createElement(e,t);t.ref;var r=sk(t,J9);return O.default.createElement(qm,r)}var sb=1,Zt=(function(e){function t(){var r;ek(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=rk(this,t,[].concat(a)),Pl(r,"lastBoundingBox",{width:-1,height:-1}),r}return ik(t,e),tk(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>sb||Math.abs(a.height-this.lastBoundingBox.height)>sb)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?or({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,s=a.align,l=a.verticalAlign,c=a.margin,u=a.chartWidth,d=a.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var g=this.getBBoxSnapshot();h={top:((d||0)-g.height)/2}}else h=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return or(or({},f),h)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,s=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,d=a.payload,f=or(or({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return O.default.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},uk(i,or(or({},this.props),{},{payload:BC(d,u,ck)})))}}],[{key:"getWithHeight",value:function(n,a){var i=or(or({},this.defaultProps),n.props),s=i.layout;return s==="vertical"&&Y(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||a}:null}}])})(P.PureComponent);Pl(Zt,"displayName","Legend");Pl(Zt,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Id,lb;function dk(){if(lb)return Id;lb=1;var e=Xi(),t=Hm(),r=vt(),n=e?e.isConcatSpreadable:void 0;function a(i){return r(i)||t(i)||!!(n&&i&&i[n])}return Id=a,Id}var Md,cb;function WC(){if(cb)return Md;cb=1;var e=TC(),t=dk();function r(n,a,i,s,l){var c=-1,u=n.length;for(i||(i=t),l||(l=[]);++c<u;){var d=n[c];a>0&&i(d)?a>1?r(d,a-1,i,s,l):e(l,d):s||(l[l.length]=d)}return l}return Md=r,Md}var $d,ub;function fk(){if(ub)return $d;ub=1;function e(t){return function(r,n,a){for(var i=-1,s=Object(r),l=a(r),c=l.length;c--;){var u=l[t?c:++i];if(n(s[u],u,s)===!1)break}return r}}return $d=e,$d}var Rd,db;function hk(){if(db)return Rd;db=1;var e=fk(),t=e();return Rd=t,Rd}var Ld,fb;function HC(){if(fb)return Ld;fb=1;var e=hk(),t=Nl();function r(n,a){return n&&e(n,a,t)}return Ld=r,Ld}var Dd,hb;function pk(){if(hb)return Dd;hb=1;var e=Qi();function t(r,n){return function(a,i){if(a==null)return a;if(!e(a))return r(a,i);for(var s=a.length,l=n?s:-1,c=Object(a);(n?l--:++l<s)&&i(c[l],l,c)!==!1;);return a}}return Dd=t,Dd}var zd,pb;function Gm(){if(pb)return zd;pb=1;var e=HC(),t=pk(),r=t(e);return zd=r,zd}var Bd,mb;function VC(){if(mb)return Bd;mb=1;var e=Gm(),t=Qi();function r(n,a){var i=-1,s=t(n)?Array(n.length):[];return e(n,function(l,c,u){s[++i]=a(l,c,u)}),s}return Bd=r,Bd}var Fd,xb;function mk(){if(xb)return Fd;xb=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Fd=e,Fd}var qd,gb;function xk(){if(gb)return qd;gb=1;var e=Oa();function t(r,n){if(r!==n){var a=r!==void 0,i=r===null,s=r===r,l=e(r),c=n!==void 0,u=n===null,d=n===n,f=e(n);if(!u&&!f&&!l&&r>n||l&&c&&d&&!u&&!f||i&&c&&d||!a&&d||!s)return 1;if(!i&&!l&&!f&&r<n||f&&a&&s&&!i&&!l||u&&a&&s||!c&&s||!d)return-1}return 0}return qd=t,qd}var Wd,vb;function gk(){if(vb)return Wd;vb=1;var e=xk();function t(r,n,a){for(var i=-1,s=r.criteria,l=n.criteria,c=s.length,u=a.length;++i<c;){var d=e(s[i],l[i]);if(d){if(i>=u)return d;var f=a[i];return d*(f=="desc"?-1:1)}}return r.index-n.index}return Wd=t,Wd}var Hd,yb;function vk(){if(yb)return Hd;yb=1;var e=Mm(),t=$m(),r=nr(),n=VC(),a=mk(),i=IC(),s=gk(),l=Aa(),c=vt();function u(d,f,h){f.length?f=e(f,function(x){return c(x)?function(m){return t(m,x.length===1?x[0]:x)}:x}):f=[l];var p=-1;f=e(f,i(r));var g=n(d,function(x,m,v){var b=e(f,function(w){return w(x)});return{criteria:b,index:++p,value:x}});return a(g,function(x,m){return s(x,m,h)})}return Hd=u,Hd}var Vd,bb;function yk(){if(bb)return Vd;bb=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Vd=e,Vd}var Ud,wb;function bk(){if(wb)return Ud;wb=1;var e=yk(),t=Math.max;function r(n,a,i){return a=t(a===void 0?n.length-1:a,0),function(){for(var s=arguments,l=-1,c=t(s.length-a,0),u=Array(c);++l<c;)u[l]=s[a+l];l=-1;for(var d=Array(a+1);++l<a;)d[l]=s[l];return d[a]=i(u),e(n,this,d)}}return Ud=r,Ud}var Kd,jb;function wk(){if(jb)return Kd;jb=1;function e(t){return function(){return t}}return Kd=e,Kd}var Gd,Cb;function UC(){if(Cb)return Gd;Cb=1;var e=vn(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Gd=t,Gd}var Zd,Sb;function jk(){if(Sb)return Zd;Sb=1;var e=wk(),t=UC(),r=Aa(),n=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return Zd=n,Zd}var Yd,Ob;function Ck(){if(Ob)return Yd;Ob=1;var e=800,t=16,r=Date.now;function n(a){var i=0,s=0;return function(){var l=r(),c=t-(l-s);if(s=l,c>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Yd=n,Yd}var Xd,Nb;function Sk(){if(Nb)return Xd;Nb=1;var e=jk(),t=Ck(),r=t(e);return Xd=r,Xd}var Qd,Pb;function Ok(){if(Pb)return Qd;Pb=1;var e=Aa(),t=bk(),r=Sk();function n(a,i){return r(t(a,i,e),a+"")}return Qd=n,Qd}var Jd,Ab;function Al(){if(Ab)return Jd;Ab=1;var e=Tm(),t=Qi(),r=Vm(),n=zr();function a(i,s,l){if(!n(l))return!1;var c=typeof s;return(c=="number"?t(l)&&r(s,l.length):c=="string"&&s in l)?e(l[s],i):!1}return Jd=a,Jd}var ef,_b;function Nk(){if(_b)return ef;_b=1;var e=WC(),t=vk(),r=Ok(),n=Al(),a=r(function(i,s){if(i==null)return[];var l=s.length;return l>1&&n(i,s[0],s[1])?s=[]:l>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return ef=a,ef}var Pk=Nk();const Zm=Ne(Pk);function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}function Mh(){return Mh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mh.apply(this,arguments)}function Ak(e,t){return Ek(e)||Tk(e,t)||kk(e,t)||_k()}function _k(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kk(e,t){if(e){if(typeof e=="string")return kb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kb(e,t)}}function kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Tk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function Ek(e){if(Array.isArray(e))return e}function Tb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tb(Object(r),!0).forEach(function(n){Ik(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ik(e,t,r){return t=Mk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mk(e){var t=$k(e,"string");return fi(t)=="symbol"?t:t+""}function $k(e,t){if(fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rk(e){return Array.isArray(e)&&Ke(e[0])&&Ke(e[1])?e.join(" ~ "):e}var Lk=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,s=t.itemStyle,l=s===void 0?{}:s,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,x=t.label,m=t.labelFormatter,v=t.accessibilityLayer,b=v===void 0?!1:v,w=function(){if(d&&d.length){var E={padding:0,margin:0},T=(h?Zm(d,h):d).map(function(M,R){if(M.type==="none")return null;var $=tf({display:"block",paddingTop:4,paddingBottom:4,color:M.color||"#000"},l),L=M.formatter||f||Rk,q=M.value,U=M.name,z=q,F=U;if(L&&z!=null&&F!=null){var H=L(q,U,M,R,d);if(Array.isArray(H)){var W=Ak(H,2);z=W[0],F=W[1]}else z=H}return O.default.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:$},Ke(F)?O.default.createElement("span",{className:"recharts-tooltip-item-name"},F):null,Ke(F)?O.default.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,O.default.createElement("span",{className:"recharts-tooltip-item-value"},z),O.default.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return O.default.createElement("ul",{className:"recharts-tooltip-item-list",style:E},T)}return null},C=tf({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=tf({margin:0},u),j=!de(x),S=j?x:"",A=ae.default("recharts-default-tooltip",p),_=ae.default("recharts-tooltip-label",g);j&&m&&d!==void 0&&d!==null&&(S=m(x,d));var I=b?{role:"status","aria-live":"assertive"}:{};return O.default.createElement("div",Mh({className:A,style:C},I),O.default.createElement("p",{className:_,style:y},O.default.isValidElement(S)?S:"".concat(S)),w())};function hi(e){"@babel/helpers - typeof";return hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(e)}function ho(e,t,r){return t=Dk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dk(e){var t=zk(e,"string");return hi(t)=="symbol"?t:t+""}function zk(e,t){if(hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fa="recharts-tooltip-wrapper",Bk={visibility:"hidden"};function Fk(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ae.default(Fa,ho(ho(ho(ho({},"".concat(Fa,"-right"),Y(r)&&t&&Y(t.x)&&r>=t.x),"".concat(Fa,"-left"),Y(r)&&t&&Y(t.x)&&r<t.x),"".concat(Fa,"-bottom"),Y(n)&&t&&Y(t.y)&&n>=t.y),"".concat(Fa,"-top"),Y(n)&&t&&Y(t.y)&&n<t.y))}function Eb(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,s=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&Y(i[n]))return i[n];var d=r[n]-l-a,f=r[n]+a;if(t[n])return s[n]?d:f;if(s[n]){var h=d,p=c[n];return h<p?Math.max(f,c[n]):Math.max(d,c[n])}var g=f+l,x=c[n]+u;return g>x?Math.max(d,c[n]):Math.max(f,c[n])}function qk(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Wk(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,d,f;return s.height>0&&s.width>0&&r?(d=Eb({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=Eb({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=qk({translateX:d,translateY:f,useTranslate3d:l})):u=Bk,{cssProperties:u,cssClasses:Fk({translateX:d,translateY:f,coordinate:r})}}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function Ib(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ib(Object(r),!0).forEach(function(n){Rh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ib(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,GC(n.key),n)}}function Uk(e,t,r){return t&&Vk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kk(e,t,r){return t=Uo(t),Gk(e,KC()?Reflect.construct(t,r||[],Uo(e).constructor):t.apply(e,r))}function Gk(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zk(e)}function Zk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KC=function(){return!!e})()}function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uo(e)}function Yk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$h(e,t)}function $h(e,t){return $h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$h(e,t)}function Rh(e,t,r){return t=GC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GC(e){var t=Xk(e,"string");return Xn(t)=="symbol"?t:t+""}function Xk(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $b=1,Qk=(function(e){function t(){var r;Hk(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Kk(this,t,[].concat(a)),Rh(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Rh(r,"handleKeyDown",function(s){if(s.key==="Escape"){var l,c,u,d;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),r}return Yk(t,e),Uk(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>$b||Math.abs(n.height-this.state.lastBoundingBox.height)>$b)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.children,d=a.coordinate,f=a.hasPayload,h=a.isAnimationActive,p=a.offset,g=a.position,x=a.reverseDirection,m=a.useTranslate3d,v=a.viewBox,b=a.wrapperStyle,w=Wk({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:v}),C=w.cssClasses,y=w.cssProperties,j=Mb(Mb({transition:h&&i?"transform ".concat(l,"ms ").concat(c):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return O.default.createElement("div",{tabIndex:-1,className:C,style:j,ref:function(A){n.wrapperNode=A}},u)}}])})(P.PureComponent),Jk=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ar={isSsr:Jk()};function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function Rb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rb(Object(r),!0).forEach(function(n){Ym(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,YC(n.key),n)}}function rT(e,t,r){return t&&tT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nT(e,t,r){return t=Ko(t),aT(e,ZC()?Reflect.construct(t,r||[],Ko(e).constructor):t.apply(e,r))}function aT(e,t){if(t&&(Qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iT(e)}function iT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZC=function(){return!!e})()}function Ko(e){return Ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ko(e)}function oT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lh(e,t)}function Lh(e,t){return Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Lh(e,t)}function Ym(e,t,r){return t=YC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YC(e){var t=sT(e,"string");return Qn(t)=="symbol"?t:t+""}function sT(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function lT(e){return e.dataKey}function cT(e,t){return O.default.isValidElement(e)?O.default.cloneElement(e,t):typeof e=="function"?O.default.createElement(e,t):O.default.createElement(Lk,t)}var We=(function(e){function t(){return eT(this,t),nT(this,t,arguments)}return oT(t,e),rT(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.content,d=a.coordinate,f=a.filterNull,h=a.isAnimationActive,p=a.offset,g=a.payload,x=a.payloadUniqBy,m=a.position,v=a.reverseDirection,b=a.useTranslate3d,w=a.viewBox,C=a.wrapperStyle,y=g??[];f&&y.length&&(y=BC(g.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),x,lT));var j=y.length>0;return O.default.createElement(Qk,{allowEscapeViewBox:s,animationDuration:l,animationEasing:c,isAnimationActive:h,active:i,coordinate:d,hasPayload:j,offset:p,position:m,reverseDirection:v,useTranslate3d:b,viewBox:w,wrapperStyle:C},cT(u,Lb(Lb({},this.props),{},{payload:y})))}}])})(P.PureComponent);Ym(We,"displayName","Tooltip");Ym(We,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ar.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var rf,Db;function uT(){if(Db)return rf;Db=1;var e=rr(),t=function(){return e.Date.now()};return rf=t,rf}var nf,zb;function dT(){if(zb)return nf;zb=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return nf=t,nf}var af,Bb;function fT(){if(Bb)return af;Bb=1;var e=dT(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return af=r,af}var of,Fb;function XC(){if(Fb)return of;Fb=1;var e=fT(),t=zr(),r=Oa(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=i.test(u);return f||s.test(u)?l(u.slice(2),f?2:8):a.test(u)?n:+u}return of=c,of}var sf,qb;function hT(){if(qb)return sf;qb=1;var e=zr(),t=uT(),r=XC(),n="Expected a function",a=Math.max,i=Math.min;function s(l,c,u){var d,f,h,p,g,x,m=0,v=!1,b=!1,w=!0;if(typeof l!="function")throw new TypeError(n);c=r(c)||0,e(u)&&(v=!!u.leading,b="maxWait"in u,h=b?a(r(u.maxWait)||0,c):h,w="trailing"in u?!!u.trailing:w);function C(T){var M=d,R=f;return d=f=void 0,m=T,p=l.apply(R,M),p}function y(T){return m=T,g=setTimeout(A,c),v?C(T):p}function j(T){var M=T-x,R=T-m,$=c-M;return b?i($,h-R):$}function S(T){var M=T-x,R=T-m;return x===void 0||M>=c||M<0||b&&R>=h}function A(){var T=t();if(S(T))return _(T);g=setTimeout(A,j(T))}function _(T){return g=void 0,w&&d?C(T):(d=f=void 0,p)}function I(){g!==void 0&&clearTimeout(g),m=0,d=x=f=g=void 0}function k(){return g===void 0?p:_(t())}function E(){var T=t(),M=S(T);if(d=arguments,f=this,x=T,M){if(g===void 0)return y(x);if(b)return clearTimeout(g),g=setTimeout(A,c),C(x)}return g===void 0&&(g=setTimeout(A,c)),p}return E.cancel=I,E.flush=k,E}return sf=s,sf}var lf,Wb;function pT(){if(Wb)return lf;Wb=1;var e=hT(),t=zr(),r="Expected a function";function n(a,i,s){var l=!0,c=!0;if(typeof a!="function")throw new TypeError(r);return t(s)&&(l="leading"in s?!!s.leading:l,c="trailing"in s?!!s.trailing:c),e(a,i,{leading:l,maxWait:i,trailing:c})}return lf=n,lf}var mT=pT();const QC=Ne(mT);function pi(e){"@babel/helpers - typeof";return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(e)}function Hb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function po(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hb(Object(r),!0).forEach(function(n){xT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xT(e,t,r){return t=gT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gT(e){var t=vT(e,"string");return pi(t)=="symbol"?t:t+""}function vT(e,t){if(pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yT(e,t){return CT(e)||jT(e,t)||wT(e,t)||bT()}function bT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
30
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wT(e,t){if(e){if(typeof e=="string")return Vb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vb(e,t)}}function Vb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function CT(e){if(Array.isArray(e))return e}var ST=P.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,s=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,x=g===void 0?0:g,m=e.id,v=e.className,b=e.onResize,w=e.style,C=w===void 0?{}:w,y=P.useRef(null),j=P.useRef();j.current=b,P.useImperativeHandle(t,function(){return Object.defineProperty(y.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),y.current},configurable:!0})});var S=P.useState({containerWidth:a.width,containerHeight:a.height}),A=yT(S,2),_=A[0],I=A[1],k=P.useCallback(function(T,M){I(function(R){var $=Math.round(T),L=Math.round(M);return R.containerWidth===$&&R.containerHeight===L?R:{containerWidth:$,containerHeight:L}})},[]);P.useEffect(function(){var T=function(U){var
|
|
24
|
+
A`).concat(s,",").concat(s,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return O.default.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(At/8,"h").concat(At,"v").concat(At*3/4,"h").concat(-At,"z"),className:"recharts-legend-icon"});if(O.default.isValidElement(n.legendIcon)){var u=G8({},n);return delete u.legendIcon,O.default.cloneElement(n.legendIcon,u)}return O.default.createElement(Fm,{fill:c,cx:i,cy:i,size:At,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,s=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,d={x:0,y:0,width:At,height:At},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,g){var x=p.formatter||c,m=ae.default(di(di({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var v=le(p.value)?null:p.value;Et(!le(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=p.inactive?u:p.color;return O.default.createElement("li",Th({className:m,style:f,key:"legend-item-".concat(g)},xr(n.props,p,g)),O.default.createElement(Sh,{width:s,height:s,viewBox:d,style:h},n.renderIcon(p)),O.default.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},x?x(v,p,g):v))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,s=n.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return O.default.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(P.PureComponent);di(qm,"displayName","Legend");di(qm,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var gu,Bv;function n9(){if(Bv)return gu;Bv=1;var e=yl();function t(){this.__data__=new e,this.size=0}return gu=t,gu}var vu,Fv;function a9(){if(Fv)return vu;Fv=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return vu=e,vu}var yu,qv;function i9(){if(qv)return yu;qv=1;function e(t){return this.__data__.get(t)}return yu=e,yu}var bu,Wv;function o9(){if(Wv)return bu;Wv=1;function e(t){return this.__data__.has(t)}return bu=e,bu}var wu,Hv;function s9(){if(Hv)return wu;Hv=1;var e=yl(),t=Em(),r=Im(),n=200;function a(i,s){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<n-1)return c.push([i,s]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(i,s),this.size=l.size,this}return wu=a,wu}var ju,Vv;function NC(){if(Vv)return ju;Vv=1;var e=yl(),t=n9(),r=a9(),n=i9(),a=o9(),i=s9();function s(l){var c=this.__data__=new e(l);this.size=c.size}return s.prototype.clear=t,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=a,s.prototype.set=i,ju=s,ju}var Cu,Uv;function l9(){if(Uv)return Cu;Uv=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Cu=t,Cu}var Su,Kv;function c9(){if(Kv)return Su;Kv=1;function e(t){return this.__data__.has(t)}return Su=e,Su}var Ou,Gv;function PC(){if(Gv)return Ou;Gv=1;var e=Im(),t=l9(),r=c9();function n(a){var i=-1,s=a==null?0:a.length;for(this.__data__=new e;++i<s;)this.add(a[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Ou=n,Ou}var Nu,Zv;function AC(){if(Zv)return Nu;Zv=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(t[n],n,t))return!0;return!1}return Nu=e,Nu}var Pu,Yv;function _C(){if(Yv)return Pu;Yv=1;function e(t,r){return t.has(r)}return Pu=e,Pu}var Au,Xv;function kC(){if(Xv)return Au;Xv=1;var e=PC(),t=AC(),r=_C(),n=1,a=2;function i(s,l,c,u,d,f){var h=c&n,p=s.length,g=l.length;if(p!=g&&!(h&&g>p))return!1;var x=f.get(s),m=f.get(l);if(x&&m)return x==l&&m==s;var v=-1,b=!0,w=c&a?new e:void 0;for(f.set(s,l),f.set(l,s);++v<p;){var C=s[v],y=l[v];if(u)var j=h?u(y,C,v,l,s,f):u(C,y,v,s,l,f);if(j!==void 0){if(j)continue;b=!1;break}if(w){if(!t(l,function(S,A){if(!r(w,A)&&(C===S||d(C,S,c,u,f)))return w.push(A)})){b=!1;break}}else if(!(C===y||d(C,y,c,u,f))){b=!1;break}}return f.delete(s),f.delete(l),b}return Au=i,Au}var _u,Qv;function u9(){if(Qv)return _u;Qv=1;var e=rr(),t=e.Uint8Array;return _u=t,_u}var ku,Jv;function d9(){if(Jv)return ku;Jv=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,i){n[++r]=[i,a]}),n}return ku=e,ku}var Tu,ey;function Wm(){if(ey)return Tu;ey=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return Tu=e,Tu}var Eu,ty;function f9(){if(ty)return Eu;ty=1;var e=Xi(),t=u9(),r=Tm(),n=kC(),a=d9(),i=Wm(),s=1,l=2,c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",x="[object String]",m="[object Symbol]",v="[object ArrayBuffer]",b="[object DataView]",w=e?e.prototype:void 0,C=w?w.valueOf:void 0;function y(j,S,A,_,I,k,E){switch(A){case b:if(j.byteLength!=S.byteLength||j.byteOffset!=S.byteOffset)return!1;j=j.buffer,S=S.buffer;case v:return!(j.byteLength!=S.byteLength||!k(new t(j),new t(S)));case c:case u:case h:return r(+j,+S);case d:return j.name==S.name&&j.message==S.message;case p:case x:return j==S+"";case f:var T=a;case g:var M=_&s;if(T||(T=i),j.size!=S.size&&!M)return!1;var R=E.get(j);if(R)return R==S;_|=l,E.set(j,S);var $=n(T(j),T(S),_,I,k,E);return E.delete(j),$;case m:if(C)return C.call(j)==C.call(S)}return!1}return Eu=y,Eu}var Iu,ry;function TC(){if(ry)return Iu;ry=1;function e(t,r){for(var n=-1,a=r.length,i=t.length;++n<a;)t[i+n]=r[n];return t}return Iu=e,Iu}var Mu,ny;function h9(){if(ny)return Mu;ny=1;var e=TC(),t=vt();function r(n,a,i){var s=a(n);return t(n)?s:e(s,i(n))}return Mu=r,Mu}var $u,ay;function p9(){if(ay)return $u;ay=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,s=[];++n<a;){var l=t[n];r(l,n,t)&&(s[i++]=l)}return s}return $u=e,$u}var Ru,iy;function m9(){if(iy)return Ru;iy=1;function e(){return[]}return Ru=e,Ru}var Lu,oy;function x9(){if(oy)return Lu;oy=1;var e=p9(),t=m9(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(s){return s==null?[]:(s=Object(s),e(a(s),function(l){return n.call(s,l)}))}:t;return Lu=i,Lu}var Du,sy;function g9(){if(sy)return Du;sy=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return Du=e,Du}var zu,ly;function v9(){if(ly)return zu;ly=1;var e=Cr(),t=Sr(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return zu=n,zu}var Bu,cy;function Hm(){if(cy)return Bu;cy=1;var e=v9(),t=Sr(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(s){return t(s)&&n.call(s,"callee")&&!a.call(s,"callee")};return Bu=i,Bu}var Xa={exports:{}},Fu,uy;function y9(){if(uy)return Fu;uy=1;function e(){return!1}return Fu=e,Fu}Xa.exports;var dy;function EC(){return dy||(dy=1,(function(e,t){var r=rr(),n=y9(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,l=s?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;e.exports=u})(Xa,Xa.exports)),Xa.exports}var qu,fy;function Vm(){if(fy)return qu;fy=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return qu=r,qu}var Wu,hy;function Um(){if(hy)return Wu;hy=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Wu=t,Wu}var Hu,py;function b9(){if(py)return Hu;py=1;var e=Cr(),t=Um(),r=Sr(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",g="[object String]",x="[object WeakMap]",m="[object ArrayBuffer]",v="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",C="[object Int8Array]",y="[object Int16Array]",j="[object Int32Array]",S="[object Uint8Array]",A="[object Uint8ClampedArray]",_="[object Uint16Array]",I="[object Uint32Array]",k={};k[b]=k[w]=k[C]=k[y]=k[j]=k[S]=k[A]=k[_]=k[I]=!0,k[n]=k[a]=k[m]=k[i]=k[v]=k[s]=k[l]=k[c]=k[u]=k[d]=k[f]=k[h]=k[p]=k[g]=k[x]=!1;function E(T){return r(T)&&t(T.length)&&!!k[e(T)]}return Hu=E,Hu}var Vu,my;function IC(){if(my)return Vu;my=1;function e(t){return function(r){return t(r)}}return Vu=e,Vu}var Qa={exports:{}};Qa.exports;var xy;function w9(){return xy||(xy=1,(function(e,t){var r=Q3(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,l=(function(){try{var c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();e.exports=l})(Qa,Qa.exports)),Qa.exports}var Uu,gy;function MC(){if(gy)return Uu;gy=1;var e=b9(),t=IC(),r=w9(),n=r&&r.isTypedArray,a=n?t(n):e;return Uu=a,Uu}var Ku,vy;function j9(){if(vy)return Ku;vy=1;var e=g9(),t=Hm(),r=vt(),n=EC(),a=Vm(),i=MC(),s=Object.prototype,l=s.hasOwnProperty;function c(u,d){var f=r(u),h=!f&&t(u),p=!f&&!h&&n(u),g=!f&&!h&&!p&&i(u),x=f||h||p||g,m=x?e(u.length,String):[],v=m.length;for(var b in u)(d||l.call(u,b))&&!(x&&(b=="length"||p&&(b=="offset"||b=="parent")||g&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||a(b,v)))&&m.push(b);return m}return Ku=c,Ku}var Gu,yy;function C9(){if(yy)return Gu;yy=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return Gu=t,Gu}var Zu,by;function $C(){if(by)return Zu;by=1;function e(t,r){return function(n){return t(r(n))}}return Zu=e,Zu}var Yu,wy;function S9(){if(wy)return Yu;wy=1;var e=$C(),t=e(Object.keys,Object);return Yu=t,Yu}var Xu,jy;function O9(){if(jy)return Xu;jy=1;var e=C9(),t=S9(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var s=[];for(var l in Object(i))n.call(i,l)&&l!="constructor"&&s.push(l);return s}return Xu=a,Xu}var Qu,Cy;function Qi(){if(Cy)return Qu;Cy=1;var e=km(),t=Um();function r(n){return n!=null&&t(n.length)&&!e(n)}return Qu=r,Qu}var Ju,Sy;function Nl(){if(Sy)return Ju;Sy=1;var e=j9(),t=O9(),r=Qi();function n(a){return r(a)?e(a):t(a)}return Ju=n,Ju}var ed,Oy;function N9(){if(Oy)return ed;Oy=1;var e=h9(),t=x9(),r=Nl();function n(a){return e(a,r,t)}return ed=n,ed}var td,Ny;function P9(){if(Ny)return td;Ny=1;var e=N9(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,s,l,c,u,d){var f=l&t,h=e(i),p=h.length,g=e(s),x=g.length;if(p!=x&&!f)return!1;for(var m=p;m--;){var v=h[m];if(!(f?v in s:n.call(s,v)))return!1}var b=d.get(i),w=d.get(s);if(b&&w)return b==s&&w==i;var C=!0;d.set(i,s),d.set(s,i);for(var y=f;++m<p;){v=h[m];var j=i[v],S=s[v];if(c)var A=f?c(S,j,v,s,i,d):c(j,S,v,i,s,d);if(!(A===void 0?j===S||u(j,S,l,c,d):A)){C=!1;break}y||(y=v=="constructor")}if(C&&!y){var _=i.constructor,I=s.constructor;_!=I&&"constructor"in i&&"constructor"in s&&!(typeof _=="function"&&_ instanceof _&&typeof I=="function"&&I instanceof I)&&(C=!1)}return d.delete(i),d.delete(s),C}return td=a,td}var rd,Py;function A9(){if(Py)return rd;Py=1;var e=vn(),t=rr(),r=e(t,"DataView");return rd=r,rd}var nd,Ay;function _9(){if(Ay)return nd;Ay=1;var e=vn(),t=rr(),r=e(t,"Promise");return nd=r,nd}var ad,_y;function RC(){if(_y)return ad;_y=1;var e=vn(),t=rr(),r=e(t,"Set");return ad=r,ad}var id,ky;function k9(){if(ky)return id;ky=1;var e=vn(),t=rr(),r=e(t,"WeakMap");return id=r,id}var od,Ty;function T9(){if(Ty)return od;Ty=1;var e=A9(),t=Em(),r=_9(),n=RC(),a=k9(),i=Cr(),s=J3(),l="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",p=s(e),g=s(t),x=s(r),m=s(n),v=s(a),b=i;return(e&&b(new e(new ArrayBuffer(1)))!=h||t&&b(new t)!=l||r&&b(r.resolve())!=u||n&&b(new n)!=d||a&&b(new a)!=f)&&(b=function(w){var C=i(w),y=C==c?w.constructor:void 0,j=y?s(y):"";if(j)switch(j){case p:return h;case g:return l;case x:return u;case m:return d;case v:return f}return C}),od=b,od}var sd,Ey;function E9(){if(Ey)return sd;Ey=1;var e=NC(),t=kC(),r=f9(),n=P9(),a=T9(),i=vt(),s=EC(),l=MC(),c=1,u="[object Arguments]",d="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(x,m,v,b,w,C){var y=i(x),j=i(m),S=y?d:a(x),A=j?d:a(m);S=S==u?f:S,A=A==u?f:A;var _=S==f,I=A==f,k=S==A;if(k&&s(x)){if(!s(m))return!1;y=!0,_=!1}if(k&&!_)return C||(C=new e),y||l(x)?t(x,m,v,b,w,C):r(x,m,S,v,b,w,C);if(!(v&c)){var E=_&&p.call(x,"__wrapped__"),T=I&&p.call(m,"__wrapped__");if(E||T){var M=E?x.value():x,R=T?m.value():m;return C||(C=new e),w(M,R,v,b,C)}}return k?(C||(C=new e),n(x,m,v,b,w,C)):!1}return sd=g,sd}var ld,Iy;function Km(){if(Iy)return ld;Iy=1;var e=E9(),t=Sr();function r(n,a,i,s,l){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,i,s,r,l)}return ld=r,ld}var cd,My;function I9(){if(My)return cd;My=1;var e=NC(),t=Km(),r=1,n=2;function a(i,s,l,c){var u=l.length,d=u,f=!c;if(i==null)return!d;for(i=Object(i);u--;){var h=l[u];if(f&&h[2]?h[1]!==i[h[0]]:!(h[0]in i))return!1}for(;++u<d;){h=l[u];var p=h[0],g=i[p],x=h[1];if(f&&h[2]){if(g===void 0&&!(p in i))return!1}else{var m=new e;if(c)var v=c(g,x,p,i,s,m);if(!(v===void 0?t(x,g,r|n,c,m):v))return!1}}return!0}return cd=a,cd}var ud,$y;function LC(){if($y)return ud;$y=1;var e=zr();function t(r){return r===r&&!e(r)}return ud=t,ud}var dd,Ry;function M9(){if(Ry)return dd;Ry=1;var e=LC(),t=Nl();function r(n){for(var a=t(n),i=a.length;i--;){var s=a[i],l=n[s];a[i]=[s,l,e(l)]}return a}return dd=r,dd}var fd,Ly;function DC(){if(Ly)return fd;Ly=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return fd=e,fd}var hd,Dy;function $9(){if(Dy)return hd;Dy=1;var e=I9(),t=M9(),r=DC();function n(a){var i=t(a);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(s){return s===a||e(s,a,i)}}return hd=n,hd}var pd,zy;function R9(){if(zy)return pd;zy=1;function e(t,r){return t!=null&&r in Object(t)}return pd=e,pd}var md,By;function L9(){if(By)return md;By=1;var e=rC(),t=Hm(),r=vt(),n=Vm(),a=Um(),i=wl();function s(l,c,u){c=e(c,l);for(var d=-1,f=c.length,h=!1;++d<f;){var p=i(c[d]);if(!(h=l!=null&&u(l,p)))break;l=l[p]}return h||++d!=f?h:(f=l==null?0:l.length,!!f&&a(f)&&n(p,f)&&(r(l)||t(l)))}return md=s,md}var xd,Fy;function D9(){if(Fy)return xd;Fy=1;var e=R9(),t=L9();function r(n,a){return n!=null&&t(n,a,e)}return xd=r,xd}var gd,qy;function z9(){if(qy)return gd;qy=1;var e=Km(),t=nC(),r=D9(),n=_m(),a=LC(),i=DC(),s=wl(),l=1,c=2;function u(d,f){return n(d)&&a(f)?i(s(d),f):function(h){var p=t(h,d);return p===void 0&&p===f?r(h,d):e(f,p,l|c)}}return gd=u,gd}var vd,Wy;function Aa(){if(Wy)return vd;Wy=1;function e(t){return t}return vd=e,vd}var yd,Hy;function B9(){if(Hy)return yd;Hy=1;function e(t){return function(r){return r?.[t]}}return yd=e,yd}var bd,Vy;function F9(){if(Vy)return bd;Vy=1;var e=$m();function t(r){return function(n){return e(n,r)}}return bd=t,bd}var wd,Uy;function q9(){if(Uy)return wd;Uy=1;var e=B9(),t=F9(),r=_m(),n=wl();function a(i){return r(i)?e(n(i)):t(i)}return wd=a,wd}var jd,Ky;function nr(){if(Ky)return jd;Ky=1;var e=$9(),t=z9(),r=Aa(),n=vt(),a=q9();function i(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?t(s[0],s[1]):e(s):a(s)}return jd=i,jd}var Cd,Gy;function zC(){if(Gy)return Cd;Gy=1;function e(t,r,n,a){for(var i=t.length,s=n+(a?1:-1);a?s--:++s<i;)if(r(t[s],s,t))return s;return-1}return Cd=e,Cd}var Sd,Zy;function W9(){if(Zy)return Sd;Zy=1;function e(t){return t!==t}return Sd=e,Sd}var Od,Yy;function H9(){if(Yy)return Od;Yy=1;function e(t,r,n){for(var a=n-1,i=t.length;++a<i;)if(t[a]===r)return a;return-1}return Od=e,Od}var Nd,Xy;function V9(){if(Xy)return Nd;Xy=1;var e=zC(),t=W9(),r=H9();function n(a,i,s){return i===i?r(a,i,s):e(a,t,s)}return Nd=n,Nd}var Pd,Qy;function U9(){if(Qy)return Pd;Qy=1;var e=V9();function t(r,n){var a=r==null?0:r.length;return!!a&&e(r,n,0)>-1}return Pd=t,Pd}var Ad,Jy;function K9(){if(Jy)return Ad;Jy=1;function e(t,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;)if(n(r,t[a]))return!0;return!1}return Ad=e,Ad}var _d,eb;function G9(){if(eb)return _d;eb=1;function e(){}return _d=e,_d}var kd,tb;function Z9(){if(tb)return kd;tb=1;var e=RC(),t=G9(),r=Wm(),n=1/0,a=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return kd=a,kd}var Td,rb;function Y9(){if(rb)return Td;rb=1;var e=PC(),t=U9(),r=K9(),n=_C(),a=Z9(),i=Wm(),s=200;function l(c,u,d){var f=-1,h=t,p=c.length,g=!0,x=[],m=x;if(d)g=!1,h=r;else if(p>=s){var v=u?null:a(c);if(v)return i(v);g=!1,h=n,m=new e}else m=u?[]:x;e:for(;++f<p;){var b=c[f],w=u?u(b):b;if(b=d||b!==0?b:0,g&&w===w){for(var C=m.length;C--;)if(m[C]===w)continue e;u&&m.push(w),x.push(b)}else h(m,w,d)||(m!==x&&m.push(w),x.push(b))}return x}return Td=l,Td}var Ed,nb;function X9(){if(nb)return Ed;nb=1;var e=nr(),t=Y9();function r(n,a){return n&&n.length?t(n,e(a,2)):[]}return Ed=r,Ed}var Q9=X9();const ab=Oe(Q9);function BC(e,t,r){return t===!0?ab(e,r):le(t)?ab(e,t):e}function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}var J9=["ref"];function ib(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ib(Object(r),!0).forEach(function(n){Pl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ib(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ek(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ob(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qC(n.key),n)}}function tk(e,t,r){return t&&ob(e.prototype,t),r&&ob(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function rk(e,t,r){return t=Vo(t),nk(e,FC()?Reflect.construct(t,r||[],Vo(e).constructor):t.apply(e,r))}function nk(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ak(e)}function ak(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FC=function(){return!!e})()}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vo(e)}function ik(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ih(e,t)}function Ih(e,t){return Ih=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ih(e,t)}function Pl(e,t,r){return t=qC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qC(e){var t=ok(e,"string");return Yn(t)=="symbol"?t:t+""}function ok(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function sk(e,t){if(e==null)return{};var r=lk(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lk(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ck(e){return e.value}function uk(e,t){if(O.default.isValidElement(e))return O.default.cloneElement(e,t);if(typeof e=="function")return O.default.createElement(e,t);t.ref;var r=sk(t,J9);return O.default.createElement(qm,r)}var sb=1,Zt=(function(e){function t(){var r;ek(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=rk(this,t,[].concat(a)),Pl(r,"lastBoundingBox",{width:-1,height:-1}),r}return ik(t,e),tk(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>sb||Math.abs(a.height-this.lastBoundingBox.height)>sb)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?or({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,s=a.align,l=a.verticalAlign,c=a.margin,u=a.chartWidth,d=a.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var g=this.getBBoxSnapshot();h={top:((d||0)-g.height)/2}}else h=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return or(or({},f),h)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,s=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,d=a.payload,f=or(or({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return O.default.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},uk(i,or(or({},this.props),{},{payload:BC(d,u,ck)})))}}],[{key:"getWithHeight",value:function(n,a){var i=or(or({},this.defaultProps),n.props),s=i.layout;return s==="vertical"&&Z(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||a}:null}}])})(P.PureComponent);Pl(Zt,"displayName","Legend");Pl(Zt,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Id,lb;function dk(){if(lb)return Id;lb=1;var e=Xi(),t=Hm(),r=vt(),n=e?e.isConcatSpreadable:void 0;function a(i){return r(i)||t(i)||!!(n&&i&&i[n])}return Id=a,Id}var Md,cb;function WC(){if(cb)return Md;cb=1;var e=TC(),t=dk();function r(n,a,i,s,l){var c=-1,u=n.length;for(i||(i=t),l||(l=[]);++c<u;){var d=n[c];a>0&&i(d)?a>1?r(d,a-1,i,s,l):e(l,d):s||(l[l.length]=d)}return l}return Md=r,Md}var $d,ub;function fk(){if(ub)return $d;ub=1;function e(t){return function(r,n,a){for(var i=-1,s=Object(r),l=a(r),c=l.length;c--;){var u=l[t?c:++i];if(n(s[u],u,s)===!1)break}return r}}return $d=e,$d}var Rd,db;function hk(){if(db)return Rd;db=1;var e=fk(),t=e();return Rd=t,Rd}var Ld,fb;function HC(){if(fb)return Ld;fb=1;var e=hk(),t=Nl();function r(n,a){return n&&e(n,a,t)}return Ld=r,Ld}var Dd,hb;function pk(){if(hb)return Dd;hb=1;var e=Qi();function t(r,n){return function(a,i){if(a==null)return a;if(!e(a))return r(a,i);for(var s=a.length,l=n?s:-1,c=Object(a);(n?l--:++l<s)&&i(c[l],l,c)!==!1;);return a}}return Dd=t,Dd}var zd,pb;function Gm(){if(pb)return zd;pb=1;var e=HC(),t=pk(),r=t(e);return zd=r,zd}var Bd,mb;function VC(){if(mb)return Bd;mb=1;var e=Gm(),t=Qi();function r(n,a){var i=-1,s=t(n)?Array(n.length):[];return e(n,function(l,c,u){s[++i]=a(l,c,u)}),s}return Bd=r,Bd}var Fd,xb;function mk(){if(xb)return Fd;xb=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Fd=e,Fd}var qd,gb;function xk(){if(gb)return qd;gb=1;var e=Oa();function t(r,n){if(r!==n){var a=r!==void 0,i=r===null,s=r===r,l=e(r),c=n!==void 0,u=n===null,d=n===n,f=e(n);if(!u&&!f&&!l&&r>n||l&&c&&d&&!u&&!f||i&&c&&d||!a&&d||!s)return 1;if(!i&&!l&&!f&&r<n||f&&a&&s&&!i&&!l||u&&a&&s||!c&&s||!d)return-1}return 0}return qd=t,qd}var Wd,vb;function gk(){if(vb)return Wd;vb=1;var e=xk();function t(r,n,a){for(var i=-1,s=r.criteria,l=n.criteria,c=s.length,u=a.length;++i<c;){var d=e(s[i],l[i]);if(d){if(i>=u)return d;var f=a[i];return d*(f=="desc"?-1:1)}}return r.index-n.index}return Wd=t,Wd}var Hd,yb;function vk(){if(yb)return Hd;yb=1;var e=Mm(),t=$m(),r=nr(),n=VC(),a=mk(),i=IC(),s=gk(),l=Aa(),c=vt();function u(d,f,h){f.length?f=e(f,function(x){return c(x)?function(m){return t(m,x.length===1?x[0]:x)}:x}):f=[l];var p=-1;f=e(f,i(r));var g=n(d,function(x,m,v){var b=e(f,function(w){return w(x)});return{criteria:b,index:++p,value:x}});return a(g,function(x,m){return s(x,m,h)})}return Hd=u,Hd}var Vd,bb;function yk(){if(bb)return Vd;bb=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Vd=e,Vd}var Ud,wb;function bk(){if(wb)return Ud;wb=1;var e=yk(),t=Math.max;function r(n,a,i){return a=t(a===void 0?n.length-1:a,0),function(){for(var s=arguments,l=-1,c=t(s.length-a,0),u=Array(c);++l<c;)u[l]=s[a+l];l=-1;for(var d=Array(a+1);++l<a;)d[l]=s[l];return d[a]=i(u),e(n,this,d)}}return Ud=r,Ud}var Kd,jb;function wk(){if(jb)return Kd;jb=1;function e(t){return function(){return t}}return Kd=e,Kd}var Gd,Cb;function UC(){if(Cb)return Gd;Cb=1;var e=vn(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Gd=t,Gd}var Zd,Sb;function jk(){if(Sb)return Zd;Sb=1;var e=wk(),t=UC(),r=Aa(),n=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return Zd=n,Zd}var Yd,Ob;function Ck(){if(Ob)return Yd;Ob=1;var e=800,t=16,r=Date.now;function n(a){var i=0,s=0;return function(){var l=r(),c=t-(l-s);if(s=l,c>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Yd=n,Yd}var Xd,Nb;function Sk(){if(Nb)return Xd;Nb=1;var e=jk(),t=Ck(),r=t(e);return Xd=r,Xd}var Qd,Pb;function Ok(){if(Pb)return Qd;Pb=1;var e=Aa(),t=bk(),r=Sk();function n(a,i){return r(t(a,i,e),a+"")}return Qd=n,Qd}var Jd,Ab;function Al(){if(Ab)return Jd;Ab=1;var e=Tm(),t=Qi(),r=Vm(),n=zr();function a(i,s,l){if(!n(l))return!1;var c=typeof s;return(c=="number"?t(l)&&r(s,l.length):c=="string"&&s in l)?e(l[s],i):!1}return Jd=a,Jd}var ef,_b;function Nk(){if(_b)return ef;_b=1;var e=WC(),t=vk(),r=Ok(),n=Al(),a=r(function(i,s){if(i==null)return[];var l=s.length;return l>1&&n(i,s[0],s[1])?s=[]:l>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return ef=a,ef}var Pk=Nk();const Zm=Oe(Pk);function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}function Mh(){return Mh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mh.apply(this,arguments)}function Ak(e,t){return Ek(e)||Tk(e,t)||kk(e,t)||_k()}function _k(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
25
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kk(e,t){if(e){if(typeof e=="string")return kb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kb(e,t)}}function kb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Tk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function Ek(e){if(Array.isArray(e))return e}function Tb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tb(Object(r),!0).forEach(function(n){Ik(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ik(e,t,r){return t=Mk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mk(e){var t=$k(e,"string");return fi(t)=="symbol"?t:t+""}function $k(e,t){if(fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rk(e){return Array.isArray(e)&&Ke(e[0])&&Ke(e[1])?e.join(" ~ "):e}var Lk=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,s=t.itemStyle,l=s===void 0?{}:s,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,x=t.label,m=t.labelFormatter,v=t.accessibilityLayer,b=v===void 0?!1:v,w=function(){if(d&&d.length){var E={padding:0,margin:0},T=(h?Zm(d,h):d).map(function(M,R){if(M.type==="none")return null;var $=tf({display:"block",paddingTop:4,paddingBottom:4,color:M.color||"#000"},l),L=M.formatter||f||Rk,q=M.value,U=M.name,D=q,B=U;if(L&&D!=null&&B!=null){var W=L(q,U,M,R,d);if(Array.isArray(W)){var G=Ak(W,2);D=G[0],B=G[1]}else D=W}return O.default.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:$},Ke(B)?O.default.createElement("span",{className:"recharts-tooltip-item-name"},B):null,Ke(B)?O.default.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,O.default.createElement("span",{className:"recharts-tooltip-item-value"},D),O.default.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return O.default.createElement("ul",{className:"recharts-tooltip-item-list",style:E},T)}return null},C=tf({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=tf({margin:0},u),j=!de(x),S=j?x:"",A=ae.default("recharts-default-tooltip",p),_=ae.default("recharts-tooltip-label",g);j&&m&&d!==void 0&&d!==null&&(S=m(x,d));var I=b?{role:"status","aria-live":"assertive"}:{};return O.default.createElement("div",Mh({className:A,style:C},I),O.default.createElement("p",{className:_,style:y},O.default.isValidElement(S)?S:"".concat(S)),w())};function hi(e){"@babel/helpers - typeof";return hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(e)}function ho(e,t,r){return t=Dk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dk(e){var t=zk(e,"string");return hi(t)=="symbol"?t:t+""}function zk(e,t){if(hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fa="recharts-tooltip-wrapper",Bk={visibility:"hidden"};function Fk(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ae.default(Fa,ho(ho(ho(ho({},"".concat(Fa,"-right"),Z(r)&&t&&Z(t.x)&&r>=t.x),"".concat(Fa,"-left"),Z(r)&&t&&Z(t.x)&&r<t.x),"".concat(Fa,"-bottom"),Z(n)&&t&&Z(t.y)&&n>=t.y),"".concat(Fa,"-top"),Z(n)&&t&&Z(t.y)&&n<t.y))}function Eb(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,s=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&Z(i[n]))return i[n];var d=r[n]-l-a,f=r[n]+a;if(t[n])return s[n]?d:f;if(s[n]){var h=d,p=c[n];return h<p?Math.max(f,c[n]):Math.max(d,c[n])}var g=f+l,x=c[n]+u;return g>x?Math.max(d,c[n]):Math.max(f,c[n])}function qk(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Wk(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,d,f;return s.height>0&&s.width>0&&r?(d=Eb({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),f=Eb({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=qk({translateX:d,translateY:f,useTranslate3d:l})):u=Bk,{cssProperties:u,cssClasses:Fk({translateX:d,translateY:f,coordinate:r})}}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function Ib(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ib(Object(r),!0).forEach(function(n){Rh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ib(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,GC(n.key),n)}}function Uk(e,t,r){return t&&Vk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kk(e,t,r){return t=Uo(t),Gk(e,KC()?Reflect.construct(t,r||[],Uo(e).constructor):t.apply(e,r))}function Gk(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zk(e)}function Zk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KC=function(){return!!e})()}function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uo(e)}function Yk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$h(e,t)}function $h(e,t){return $h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$h(e,t)}function Rh(e,t,r){return t=GC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GC(e){var t=Xk(e,"string");return Xn(t)=="symbol"?t:t+""}function Xk(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $b=1,Qk=(function(e){function t(){var r;Hk(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Kk(this,t,[].concat(a)),Rh(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Rh(r,"handleKeyDown",function(s){if(s.key==="Escape"){var l,c,u,d;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),r}return Yk(t,e),Uk(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>$b||Math.abs(n.height-this.state.lastBoundingBox.height)>$b)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.children,d=a.coordinate,f=a.hasPayload,h=a.isAnimationActive,p=a.offset,g=a.position,x=a.reverseDirection,m=a.useTranslate3d,v=a.viewBox,b=a.wrapperStyle,w=Wk({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:v}),C=w.cssClasses,y=w.cssProperties,j=Mb(Mb({transition:h&&i?"transform ".concat(l,"ms ").concat(c):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},b);return O.default.createElement("div",{tabIndex:-1,className:C,style:j,ref:function(A){n.wrapperNode=A}},u)}}])})(P.PureComponent),Jk=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ar={isSsr:Jk()};function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function Rb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rb(Object(r),!0).forEach(function(n){Ym(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,YC(n.key),n)}}function rT(e,t,r){return t&&tT(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nT(e,t,r){return t=Ko(t),aT(e,ZC()?Reflect.construct(t,r||[],Ko(e).constructor):t.apply(e,r))}function aT(e,t){if(t&&(Qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iT(e)}function iT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZC=function(){return!!e})()}function Ko(e){return Ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ko(e)}function oT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lh(e,t)}function Lh(e,t){return Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Lh(e,t)}function Ym(e,t,r){return t=YC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YC(e){var t=sT(e,"string");return Qn(t)=="symbol"?t:t+""}function sT(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function lT(e){return e.dataKey}function cT(e,t){return O.default.isValidElement(e)?O.default.cloneElement(e,t):typeof e=="function"?O.default.createElement(e,t):O.default.createElement(Lk,t)}var We=(function(e){function t(){return eT(this,t),nT(this,t,arguments)}return oT(t,e),rT(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.content,d=a.coordinate,f=a.filterNull,h=a.isAnimationActive,p=a.offset,g=a.payload,x=a.payloadUniqBy,m=a.position,v=a.reverseDirection,b=a.useTranslate3d,w=a.viewBox,C=a.wrapperStyle,y=g??[];f&&y.length&&(y=BC(g.filter(function(S){return S.value!=null&&(S.hide!==!0||n.props.includeHidden)}),x,lT));var j=y.length>0;return O.default.createElement(Qk,{allowEscapeViewBox:s,animationDuration:l,animationEasing:c,isAnimationActive:h,active:i,coordinate:d,hasPayload:j,offset:p,position:m,reverseDirection:v,useTranslate3d:b,viewBox:w,wrapperStyle:C},cT(u,Lb(Lb({},this.props),{},{payload:y})))}}])})(P.PureComponent);Ym(We,"displayName","Tooltip");Ym(We,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ar.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var rf,Db;function uT(){if(Db)return rf;Db=1;var e=rr(),t=function(){return e.Date.now()};return rf=t,rf}var nf,zb;function dT(){if(zb)return nf;zb=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return nf=t,nf}var af,Bb;function fT(){if(Bb)return af;Bb=1;var e=dT(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return af=r,af}var of,Fb;function XC(){if(Fb)return of;Fb=1;var e=fT(),t=zr(),r=Oa(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=i.test(u);return f||s.test(u)?l(u.slice(2),f?2:8):a.test(u)?n:+u}return of=c,of}var sf,qb;function hT(){if(qb)return sf;qb=1;var e=zr(),t=uT(),r=XC(),n="Expected a function",a=Math.max,i=Math.min;function s(l,c,u){var d,f,h,p,g,x,m=0,v=!1,b=!1,w=!0;if(typeof l!="function")throw new TypeError(n);c=r(c)||0,e(u)&&(v=!!u.leading,b="maxWait"in u,h=b?a(r(u.maxWait)||0,c):h,w="trailing"in u?!!u.trailing:w);function C(T){var M=d,R=f;return d=f=void 0,m=T,p=l.apply(R,M),p}function y(T){return m=T,g=setTimeout(A,c),v?C(T):p}function j(T){var M=T-x,R=T-m,$=c-M;return b?i($,h-R):$}function S(T){var M=T-x,R=T-m;return x===void 0||M>=c||M<0||b&&R>=h}function A(){var T=t();if(S(T))return _(T);g=setTimeout(A,j(T))}function _(T){return g=void 0,w&&d?C(T):(d=f=void 0,p)}function I(){g!==void 0&&clearTimeout(g),m=0,d=x=f=g=void 0}function k(){return g===void 0?p:_(t())}function E(){var T=t(),M=S(T);if(d=arguments,f=this,x=T,M){if(g===void 0)return y(x);if(b)return clearTimeout(g),g=setTimeout(A,c),C(x)}return g===void 0&&(g=setTimeout(A,c)),p}return E.cancel=I,E.flush=k,E}return sf=s,sf}var lf,Wb;function pT(){if(Wb)return lf;Wb=1;var e=hT(),t=zr(),r="Expected a function";function n(a,i,s){var l=!0,c=!0;if(typeof a!="function")throw new TypeError(r);return t(s)&&(l="leading"in s?!!s.leading:l,c="trailing"in s?!!s.trailing:c),e(a,i,{leading:l,maxWait:i,trailing:c})}return lf=n,lf}var mT=pT();const QC=Oe(mT);function pi(e){"@babel/helpers - typeof";return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(e)}function Hb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function po(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hb(Object(r),!0).forEach(function(n){xT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xT(e,t,r){return t=gT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gT(e){var t=vT(e,"string");return pi(t)=="symbol"?t:t+""}function vT(e,t){if(pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yT(e,t){return CT(e)||jT(e,t)||wT(e,t)||bT()}function bT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
26
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wT(e,t){if(e){if(typeof e=="string")return Vb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vb(e,t)}}function Vb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function CT(e){if(Array.isArray(e))return e}var ST=P.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,s=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,x=g===void 0?0:g,m=e.id,v=e.className,b=e.onResize,w=e.style,C=w===void 0?{}:w,y=P.useRef(null),j=P.useRef();j.current=b,P.useImperativeHandle(t,function(){return Object.defineProperty(y.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),y.current},configurable:!0})});var S=P.useState({containerWidth:a.width,containerHeight:a.height}),A=yT(S,2),_=A[0],I=A[1],k=P.useCallback(function(T,M){I(function(R){var $=Math.round(T),L=Math.round(M);return R.containerWidth===$&&R.containerHeight===L?R:{containerWidth:$,containerHeight:L}})},[]);P.useEffect(function(){var T=function(U){var D,B=U[0].contentRect,W=B.width,G=B.height;k(W,G),(D=j.current)===null||D===void 0||D.call(j,W,G)};x>0&&(T=QC(T,x,{trailing:!0,leading:!1}));var M=new ResizeObserver(T),R=y.current.getBoundingClientRect(),$=R.width,L=R.height;return k($,L),M.observe(y.current),function(){M.disconnect()}},[k,x]);var E=P.useMemo(function(){var T=_.containerWidth,M=_.containerHeight;if(T<0||M<0)return null;Et(en(s)||en(c),`The width(%s) and height(%s) are both fixed numbers,
|
|
31
27
|
maybe you don't need to use a ResponsiveContainer.`,s,c),Et(!r||r>0,"The aspect(%s) must be greater than zero.",r);var R=en(s)?T:s,$=en(c)?M:c;r&&r>0&&(R?$=R/r:$&&(R=$*r),h&&$>h&&($=h)),Et(R>0||$>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
32
28
|
please check the style of container, or the props width(%s) and height(%s),
|
|
33
29
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
34
30
|
height and width.`,R,$,s,c,d,f,r);var L=!Array.isArray(p)&&fr(p.type).endsWith("Chart");return O.default.Children.map(p,function(q){return O.default.isValidElement(q)?P.cloneElement(q,po({width:R,height:$},L?{style:po({height:"100%",width:"100%",maxHeight:$,maxWidth:R},q.props.style)}:{})):q})},[r,p,c,h,f,d,_,s]);return O.default.createElement("div",{id:m?"".concat(m):void 0,className:ae.default("recharts-responsive-container",v),style:po(po({},C),{},{width:s,height:c,minWidth:d,minHeight:f,maxHeight:h}),ref:y},E)}),bn=function(t){return null};bn.displayName="Cell";function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(e)}function Ub(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ub(Object(r),!0).forEach(function(n){OT(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ub(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OT(e,t,r){return t=NT(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NT(e){var t=PT(e,"string");return mi(t)=="symbol"?t:t+""}function PT(e,t){if(mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kn={widthCache:{},cacheCount:0},AT=2e3,_T={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Kb="recharts_measurement_span";function kT(e){var t=Dh({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var ei=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ar.isSsr)return{width:0,height:0};var n=kT(r),a=JSON.stringify({text:t,copyStyle:n});if(kn.widthCache[a])return kn.widthCache[a];try{var i=document.getElementById(Kb);i||(i=document.createElement("span"),i.setAttribute("id",Kb),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=Dh(Dh({},_T),n);Object.assign(i.style,s),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return kn.widthCache[a]=c,++kn.cacheCount>AT&&(kn.cacheCount=0,kn.widthCache={}),c}catch{return{width:0,height:0}}},TT=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function xi(e){"@babel/helpers - typeof";return xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xi(e)}function Go(e,t){return $T(e)||MT(e,t)||IT(e,t)||ET()}function ET(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35
31
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IT(e,t){if(e){if(typeof e=="string")return Gb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gb(e,t)}}function Gb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function MT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function $T(e){if(Array.isArray(e))return e}function RT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,DT(n.key),n)}}function LT(e,t,r){return t&&Zb(e.prototype,t),r&&Zb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function DT(e){var t=zT(e,"string");return xi(t)=="symbol"?t:t+""}function zT(e,t){if(xi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Xb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,BT=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,FT=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,JC={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},qT=Object.keys(JC),Mn="NaN";function WT(e,t){return e*JC[t]}var mo=(function(){function e(t,r){RT(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!BT.test(r)&&(this.num=NaN,this.unit=""),qT.includes(r)&&(this.num=WT(t,r),this.unit="px")}return LT(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=FT.exec(r))!==null&&n!==void 0?n:[],i=Go(a,3),s=i[1],l=i[2];return new e(parseFloat(s),l??"")}}])})();function eS(e){if(e.includes(Mn))return Mn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=Yb.exec(t))!==null&&r!==void 0?r:[],a=Go(n,4),i=a[1],s=a[2],l=a[3],c=mo.parse(i??""),u=mo.parse(l??""),d=s==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return Mn;t=t.replace(Yb,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=Xb.exec(t))!==null&&f!==void 0?f:[],p=Go(h,4),g=p[1],x=p[2],m=p[3],v=mo.parse(g??""),b=mo.parse(m??""),w=x==="+"?v.add(b):v.subtract(b);if(w.isNaN())return Mn;t=t.replace(Xb,w.toString())}return t}var Qb=/\(([^()]*)\)/;function HT(e){for(var t=e;t.includes("(");){var r=Qb.exec(t),n=Go(r,2),a=n[1];t=t.replace(Qb,eS(a))}return t}function VT(e){var t=e.replace(/\s+/g,"");return t=HT(t),t=eS(t),t}function UT(e){try{return VT(e)}catch{return Mn}}function cf(e){var t=UT(e.slice(5,-1));return t===Mn?"":t}var KT=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],GT=["dx","dy","angle","className","breakAll"];function zh(){return zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zh.apply(this,arguments)}function Jb(e,t){if(e==null)return{};var r=ZT(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZT(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function e0(e,t){return JT(e)||QT(e,t)||XT(e,t)||YT()}function YT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
36
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XT(e,t){if(e){if(typeof e=="string")return t0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t0(e,t)}}function t0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function JT(e){if(Array.isArray(e))return e}var tS=/[ \f\n\r\t\v\u2028\u2029]+/,rS=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];de(r)||(n?i=r.toString().split(""):i=r.toString().split(tS));var s=i.map(function(c){return{word:c,width:ei(c,a).width}}),l=n?0:ei(" ",a).width;return{wordsWithComputedWidth:s,spaceWidth:l}}catch{return null}},eE=function(t,r,n,a,i){var s=t.maxLines,l=t.children,c=t.style,u=t.breakAll,d=Y(s),f=l,h=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return R.reduce(function($,L){var q=L.word,U=L.width,z=$[$.length-1];if(z&&(a==null||i||z.width+U+n<Number(a)))z.words.push(q),z.width+=U+n;else{var F={words:[q],width:U};$.push(F)}return $},[])},p=h(r),g=function(R){return R.reduce(function($,L){return $.width>L.width?$:L})};if(!d)return p;for(var x="…",m=function(R){var $=f.slice(0,R),L=rS({breakAll:u,style:c,children:$+x}).wordsWithComputedWidth,q=h(L),U=q.length>s||g(q).width>Number(a);return[U,q]},v=0,b=f.length-1,w=0,C;v<=b&&w<=f.length-1;){var y=Math.floor((v+b)/2),j=y-1,S=m(j),A=e0(S,2),_=A[0],I=A[1],k=m(y),E=e0(k,1),T=E[0];if(!_&&!T&&(v=y+1),_&&T&&(b=y-1),!_&&T){C=I;break}w++}return C||p},r0=function(t){var r=de(t)?[]:t.toString().split(tS);return[{words:r}]},tE=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,l=t.maxLines;if((r||n)&&!ar.isSsr){var c,u,d=rS({breakAll:s,children:a,style:i});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;c=f,u=h}else return r0(a);return eE({breakAll:s,children:a,maxLines:l,style:i},c,u,r,n)}return r0(a)},n0="#808080",dn=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.lineHeight,l=s===void 0?"1em":s,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,x=g===void 0?"end":g,m=t.fill,v=m===void 0?n0:m,b=Jb(t,KT),w=P.useMemo(function(){return tE({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),C=b.dx,y=b.dy,j=b.angle,S=b.className,A=b.breakAll,_=Jb(b,GT);if(!Ke(n)||!Ke(i))return null;var I=n+(Y(C)?C:0),k=i+(Y(y)?y:0),E;switch(x){case"start":E=cf("calc(".concat(u,")"));break;case"middle":E=cf("calc(".concat((w.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:E=cf("calc(".concat(w.length-1," * -").concat(l,")"));break}var T=[];if(f){var M=w[0].width,R=b.width;T.push("scale(".concat((Y(R)?R/M:1)/M,")"))}return j&&T.push("rotate(".concat(j,", ").concat(I,", ").concat(k,")")),T.length&&(_.transform=T.join(" ")),O.default.createElement("text",zh({},oe(_,!0),{x:I,y:k,className:ae.default("recharts-text",S),textAnchor:p,fill:v.includes("url")?n0:v}),w.map(function($,L){var q=$.words.join(A?"":" ");return O.default.createElement("tspan",{x:I,dy:L===0?E:l,key:"".concat(q,"-").concat(L)},q)}))};function Mr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rE(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xm(e){let t,r,n;e.length!==2?(t=Mr,r=(l,c)=>Mr(e(l),c),n=(l,c)=>e(l)-c):(t=e===Mr||e===rE?e:nE,r=e,n=e);function a(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;r(l[f],c)<0?u=f+1:d=f}while(u<d)}return u}function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;r(l[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function s(l,c,u=0,d=l.length){const f=a(l,c,u,d-1);return f>u&&n(l[f-1],c)>-n(l[f],c)?f-1:f}return{left:a,center:s,right:i}}function nE(){return 0}function nS(e){return e===null?NaN:+e}function*aE(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const iE=Xm(Mr),Ji=iE.right;Xm(nS).center;class a0 extends Map{constructor(t,r=lE){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(i0(this,t))}has(t){return super.has(i0(this,t))}set(t,r){return super.set(oE(this,t),r)}delete(t){return super.delete(sE(this,t))}}function i0({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function oE({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function sE({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function lE(e){return e!==null&&typeof e=="object"?e.valueOf():e}function cE(e=Mr){if(e===Mr)return aS;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function aS(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const uE=Math.sqrt(50),dE=Math.sqrt(10),fE=Math.sqrt(2);function Zo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),s=i>=uE?10:i>=dE?5:i>=fE?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/s,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*s,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=r&&r<2?Zo(e,t,r*2):[l,c,u]}function Bh(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,s]=n?Zo(t,e,r):Zo(e,t,r);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(n)if(s<0)for(let u=0;u<l;++u)c[u]=(i-u)/-s;else for(let u=0;u<l;++u)c[u]=(i-u)*s;else if(s<0)for(let u=0;u<l;++u)c[u]=(a+u)/-s;else for(let u=0;u<l;++u)c[u]=(a+u)*s;return c}function Fh(e,t,r){return t=+t,e=+e,r=+r,Zo(e,t,r)[2]}function qh(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Fh(t,e,r):Fh(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function o0(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function s0(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function iS(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?aS:cE(a);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/c+h)),g=Math.min(n,Math.floor(t+(c-u)*f/c+h));iS(e,t,p,g,a)}const i=e[t];let s=r,l=n;for(qa(e,r,t),a(e[n],i)>0&&qa(e,r,n);s<l;){for(qa(e,s,l),++s,--l;a(e[s],i)<0;)++s;for(;a(e[l],i)>0;)--l}a(e[r],i)===0?qa(e,r,l):(++l,qa(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function qa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function hE(e,t,r){if(e=Float64Array.from(aE(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return s0(e);if(t>=1)return o0(e);var n,a=(n-1)*t,i=Math.floor(a),s=o0(iS(e,i).subarray(0,i+1)),l=s0(e.subarray(i+1));return s+(l-s)*(a-i)}}function pE(e,t,r=nS){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),s=+r(e[i],i,e),l=+r(e[i+1],i+1,e);return s+(l-s)*(a-i)}}function mE(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function $t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Or(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Wh=Symbol("implicit");function Qm(){var e=new a0,t=[],r=[],n=Wh;function a(i){let s=e.get(i);if(s===void 0){if(n!==Wh)return n;e.set(i,s=t.push(i)-1)}return r[s%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new a0;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Qm(t,r).unknown(n)},$t.apply(a,arguments),a}function gi(){var e=Qm().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,s,l=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var h=t().length,p=a<n,g=p?a:n,x=p?n:a;i=(x-g)/Math.max(1,h-c+u*2),l&&(i=Math.floor(i)),g+=(x-g-i*(h-c))*d,s=i*(1-c),l&&(g=Math.round(g),s=Math.round(s));var m=mE(h).map(function(v){return g+i*v});return r(p?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,l=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(l=!!h,f()):l},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return gi(t(),[n,a]).round(l).paddingInner(c).paddingOuter(u).align(d)},$t.apply(f(),arguments)}function oS(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return oS(t())},e}function ti(){return oS(gi.apply(null,arguments).paddingInner(1))}function Jm(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function sS(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function eo(){}var vi=.7,Yo=1/vi,Bn="\\s*([+-]?\\d+)\\s*",yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xE=/^#([0-9a-f]{3,8})$/,gE=new RegExp(`^rgb\\(${Bn},${Bn},${Bn}\\)$`),vE=new RegExp(`^rgb\\(${Yt},${Yt},${Yt}\\)$`),yE=new RegExp(`^rgba\\(${Bn},${Bn},${Bn},${yi}\\)$`),bE=new RegExp(`^rgba\\(${Yt},${Yt},${Yt},${yi}\\)$`),wE=new RegExp(`^hsl\\(${yi},${Yt},${Yt}\\)$`),jE=new RegExp(`^hsla\\(${yi},${Yt},${Yt},${yi}\\)$`),l0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Jm(eo,bi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:c0,formatHex:c0,formatHex8:CE,formatHsl:SE,formatRgb:u0,toString:u0});function c0(){return this.rgb().formatHex()}function CE(){return this.rgb().formatHex8()}function SE(){return lS(this).formatHsl()}function u0(){return this.rgb().formatRgb()}function bi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=xE.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?d0(t):r===3?new mt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?xo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?xo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=gE.exec(e))?new mt(t[1],t[2],t[3],1):(t=vE.exec(e))?new mt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yE.exec(e))?xo(t[1],t[2],t[3],t[4]):(t=bE.exec(e))?xo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wE.exec(e))?p0(t[1],t[2]/100,t[3]/100,1):(t=jE.exec(e))?p0(t[1],t[2]/100,t[3]/100,t[4]):l0.hasOwnProperty(e)?d0(l0[e]):e==="transparent"?new mt(NaN,NaN,NaN,0):null}function d0(e){return new mt(e>>16&255,e>>8&255,e&255,1)}function xo(e,t,r,n){return n<=0&&(e=t=r=NaN),new mt(e,t,r,n)}function OE(e){return e instanceof eo||(e=bi(e)),e?(e=e.rgb(),new mt(e.r,e.g,e.b,e.opacity)):new mt}function Hh(e,t,r,n){return arguments.length===1?OE(e):new mt(e,t,r,n??1)}function mt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Jm(mt,Hh,sS(eo,{brighter(e){return e=e==null?Yo:Math.pow(Yo,e),new mt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new mt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mt(on(this.r),on(this.g),on(this.b),Xo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:f0,formatHex:f0,formatHex8:NE,formatRgb:h0,toString:h0}));function f0(){return`#${tn(this.r)}${tn(this.g)}${tn(this.b)}`}function NE(){return`#${tn(this.r)}${tn(this.g)}${tn(this.b)}${tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function h0(){const e=Xo(this.opacity);return`${e===1?"rgb(":"rgba("}${on(this.r)}, ${on(this.g)}, ${on(this.b)}${e===1?")":`, ${e})`}`}function Xo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function on(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tn(e){return e=on(e),(e<16?"0":"")+e.toString(16)}function p0(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new zt(e,t,r,n)}function lS(e){if(e instanceof zt)return new zt(e.h,e.s,e.l,e.opacity);if(e instanceof eo||(e=bi(e)),!e)return new zt;if(e instanceof zt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),s=NaN,l=i-a,c=(i+a)/2;return l?(t===i?s=(r-n)/l+(r<n)*6:r===i?s=(n-t)/l+2:s=(t-r)/l+4,l/=c<.5?i+a:2-i-a,s*=60):l=c>0&&c<1?0:s,new zt(s,l,c,e.opacity)}function PE(e,t,r,n){return arguments.length===1?lS(e):new zt(e,t,r,n??1)}function zt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Jm(zt,PE,sS(eo,{brighter(e){return e=e==null?Yo:Math.pow(Yo,e),new zt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new zt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new mt(uf(e>=240?e-240:e+120,a,n),uf(e,a,n),uf(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new zt(m0(this.h),go(this.s),go(this.l),Xo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xo(this.opacity);return`${e===1?"hsl(":"hsla("}${m0(this.h)}, ${go(this.s)*100}%, ${go(this.l)*100}%${e===1?")":`, ${e})`}`}}));function m0(e){return e=(e||0)%360,e<0?e+360:e}function go(e){return Math.max(0,Math.min(1,e||0))}function uf(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ex=e=>()=>e;function AE(e,t){return function(r){return e+r*t}}function _E(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function kE(e){return(e=+e)==1?cS:function(t,r){return r-t?_E(t,r,e):ex(isNaN(t)?r:t)}}function cS(e,t){var r=t-e;return r?AE(e,r):ex(isNaN(e)?t:e)}const x0=(function e(t){var r=kE(t);function n(a,i){var s=r((a=Hh(a)).r,(i=Hh(i)).r),l=r(a.g,i.g),c=r(a.b,i.b),u=cS(a.opacity,i.opacity);return function(d){return a.r=s(d),a.g=l(d),a.b=c(d),a.opacity=u(d),a+""}}return n.gamma=e,n})(1);function TE(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function EE(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function IE(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),s;for(s=0;s<n;++s)a[s]=_a(e[s],t[s]);for(;s<r;++s)i[s]=t[s];return function(l){for(s=0;s<n;++s)i[s]=a[s](l);return i}}function ME(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Qo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function $E(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=_a(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var Vh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,df=new RegExp(Vh.source,"g");function RE(e){return function(){return e}}function LE(e){return function(t){return e(t)+""}}function DE(e,t){var r=Vh.lastIndex=df.lastIndex=0,n,a,i,s=-1,l=[],c=[];for(e=e+"",t=t+"";(n=Vh.exec(e))&&(a=df.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),l[s]?l[s]+=i:l[++s]=i),(n=n[0])===(a=a[0])?l[s]?l[s]+=a:l[++s]=a:(l[++s]=null,c.push({i:s,x:Qo(n,a)})),r=df.lastIndex;return r<t.length&&(i=t.slice(r),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?LE(c[0].x):RE(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function _a(e,t){var r=typeof t,n;return t==null||r==="boolean"?ex(t):(r==="number"?Qo:r==="string"?(n=bi(t))?(t=n,x0):DE:t instanceof bi?x0:t instanceof Date?ME:EE(t)?TE:Array.isArray(t)?IE:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?$E:Qo)(e,t)}function tx(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function zE(e,t){t===void 0&&(t=e,e=_a);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(s){var l=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return i[l](s-l)}}function BE(e){return function(){return e}}function Jo(e){return+e}var g0=[0,1];function ut(e){return e}function Uh(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:BE(isNaN(t)?NaN:.5)}function FE(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function qE(e,t,r){var n=e[0],a=e[1],i=t[0],s=t[1];return a<n?(n=Uh(a,n),i=r(s,i)):(n=Uh(n,a),i=r(i,s)),function(l){return i(n(l))}}function WE(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)a[s]=Uh(e[s],e[s+1]),i[s]=r(t[s],t[s+1]);return function(l){var c=Ji(e,l,1,n)-1;return i[c](a[c](l))}}function to(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function _l(){var e=g0,t=g0,r=_a,n,a,i,s=ut,l,c,u;function d(){var h=Math.min(e.length,t.length);return s!==ut&&(s=FE(e[0],e[h-1])),l=h>2?WE:qE,c=u=null,f}function f(h){return h==null||isNaN(h=+h)?i:(c||(c=l(e.map(n),t,r)))(n(s(h)))}return f.invert=function(h){return s(a((u||(u=l(t,e.map(n),Qo)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Jo),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=tx,d()},f.clamp=function(h){return arguments.length?(s=h?!0:ut,d()):s!==ut},f.interpolate=function(h){return arguments.length?(r=h,d()):r},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return n=h,a=p,d()}}function rx(){return _l()(ut,ut)}function HE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function es(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Jn(e){return e=es(Math.abs(e)),e?e[1]:NaN}function VE(e,t){return function(r,n){for(var a=r.length,i=[],s=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),i.push(r.substring(a-=l,a+l)),!((c+=l+1)>n));)l=e[s=(s+1)%e.length];return i.reverse().join(t)}}function UE(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var KE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wi(e){if(!(t=KE.exec(e)))throw new Error("invalid format: "+e);var t;return new nx({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}wi.prototype=nx.prototype;function nx(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}nx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function GE(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var ts;function ZE(e,t){var r=es(e,t);if(!r)return ts=void 0,e.toPrecision(t);var n=r[0],a=r[1],i=a-(ts=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return i===s?n:i>s?n+new Array(i-s+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+es(e,Math.max(0,t+i-1))[0]}function v0(e,t){var r=es(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const y0={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:HE,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>v0(e*100,t),r:v0,s:ZE,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function b0(e){return e}var w0=Array.prototype.map,j0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function YE(e){var t=e.grouping===void 0||e.thousands===void 0?b0:VE(w0.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?b0:UE(w0.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f,h){f=wi(f);var p=f.fill,g=f.align,x=f.sign,m=f.symbol,v=f.zero,b=f.width,w=f.comma,C=f.precision,y=f.trim,j=f.type;j==="n"?(w=!0,j="g"):y0[j]||(C===void 0&&(C=12),y=!0,j="g"),(v||p==="0"&&g==="=")&&(v=!0,p="0",g="=");var S=(h&&h.prefix!==void 0?h.prefix:"")+(m==="$"?r:m==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),A=(m==="$"?n:/[%p]/.test(j)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),_=y0[j],I=/[defgprs%]/.test(j);C=C===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function k(E){var T=S,M=A,R,$,L;if(j==="c")M=_(E)+M,E="";else{E=+E;var q=E<0||1/E<0;if(E=isNaN(E)?c:_(Math.abs(E),C),y&&(E=GE(E)),q&&+E==0&&x!=="+"&&(q=!1),T=(q?x==="("?x:l:x==="-"||x==="("?"":x)+T,M=(j==="s"&&!isNaN(E)&&ts!==void 0?j0[8+ts/3]:"")+M+(q&&x==="("?")":""),I){for(R=-1,$=E.length;++R<$;)if(L=E.charCodeAt(R),48>L||L>57){M=(L===46?a+E.slice(R+1):E.slice(R))+M,E=E.slice(0,R);break}}}w&&!v&&(E=t(E,1/0));var U=T.length+E.length+M.length,z=U<b?new Array(b-U+1).join(p):"";switch(w&&v&&(E=t(z+E,z.length?b-M.length:1/0),z=""),g){case"<":E=T+E+M+z;break;case"=":E=T+z+E+M;break;case"^":E=z.slice(0,U=z.length>>1)+T+E+M+z.slice(U);break;default:E=z+T+E+M;break}return i(E)}return k.toString=function(){return f+""},k}function d(f,h){var p=Math.max(-8,Math.min(8,Math.floor(Jn(h)/3)))*3,g=Math.pow(10,-p),x=u((f=wi(f),f.type="f",f),{suffix:j0[8+p/3]});return function(m){return x(g*m)}}return{format:u,formatPrefix:d}}var vo,ax,uS;XE({thousands:",",grouping:[3],currency:["$",""]});function XE(e){return vo=YE(e),ax=vo.format,uS=vo.formatPrefix,vo}function QE(e){return Math.max(0,-Jn(Math.abs(e)))}function JE(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jn(t)/3)))*3-Jn(Math.abs(e)))}function eI(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jn(t)-Jn(e))+1}function dS(e,t,r,n){var a=qh(e,t,r),i;switch(n=wi(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=JE(a,s))&&(n.precision=i),uS(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=eI(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=QE(a))&&(n.precision=i-(n.type==="%")*2);break}}return ax(n)}function Br(e){var t=e.domain;return e.ticks=function(r){var n=t();return Bh(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return dS(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,s=n[a],l=n[i],c,u,d=10;for(l<s&&(u=s,s=l,l=u,u=a,a=i,i=u);d-- >0;){if(u=Fh(s,l,r),u===c)return n[a]=s,n[i]=l,t(n);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function rs(){var e=rx();return e.copy=function(){return to(e,rs())},$t.apply(e,arguments),Br(e)}function fS(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Jo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return fS(e).unknown(t)},e=arguments.length?Array.from(e,Jo):[0,1],Br(r)}function hS(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],s;return i<a&&(s=r,r=n,n=s,s=a,a=i,i=s),e[r]=t.floor(a),e[n]=t.ceil(i),e}function C0(e){return Math.log(e)}function S0(e){return Math.exp(e)}function tI(e){return-Math.log(-e)}function rI(e){return-Math.exp(-e)}function nI(e){return isFinite(e)?+("1e"+e):e<0?0:e}function aI(e){return e===10?nI:e===Math.E?Math.exp:t=>Math.pow(e,t)}function iI(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function O0(e){return(t,r)=>-e(-t,r)}function ix(e){const t=e(C0,S0),r=t.domain;let n=10,a,i;function s(){return a=iI(n),i=aI(n),r()[0]<0?(a=O0(a),i=O0(i),e(tI,rI)):e(C0,S0),t}return t.base=function(l){return arguments.length?(n=+l,s()):n},t.domain=function(l){return arguments.length?(r(l),s()):r()},t.ticks=l=>{const c=r();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let h=a(u),p=a(d),g,x;const m=l==null?10:+l;let v=[];if(!(n%1)&&p-h<m){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(g=1;g<n;++g)if(x=h<0?g/i(-h):g*i(h),!(x<u)){if(x>d)break;v.push(x)}}else for(;h<=p;++h)for(g=n-1;g>=1;--g)if(x=h>0?g/i(-h):g*i(h),!(x<u)){if(x>d)break;v.push(x)}v.length*2<m&&(v=Bh(u,d,m))}else v=Bh(h,p,Math.min(p-h,m)).map(i);return f?v.reverse():v},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=wi(c)).precision==null&&(c.trim=!0),c=ax(c)),l===1/0)return c;const u=Math.max(1,n*l/t.ticks().length);return d=>{let f=d/i(Math.round(a(d)));return f*n<n-.5&&(f*=n),f<=u?c(d):""}},t.nice=()=>r(hS(r(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function pS(){const e=ix(_l()).domain([1,10]);return e.copy=()=>to(e,pS()).base(e.base()),$t.apply(e,arguments),e}function N0(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function P0(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ox(e){var t=1,r=e(N0(t),P0(t));return r.constant=function(n){return arguments.length?e(N0(t=+n),P0(t)):t},Br(r)}function mS(){var e=ox(_l());return e.copy=function(){return to(e,mS()).constant(e.constant())},$t.apply(e,arguments)}function A0(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oI(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function sI(e){return e<0?-e*e:e*e}function sx(e){var t=e(ut,ut),r=1;function n(){return r===1?e(ut,ut):r===.5?e(oI,sI):e(A0(r),A0(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Br(t)}function lx(){var e=sx(_l());return e.copy=function(){return to(e,lx()).exponent(e.exponent())},$t.apply(e,arguments),e}function lI(){return lx.apply(null,arguments).exponent(.5)}function _0(e){return Math.sign(e)*e*e}function cI(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function xS(){var e=rx(),t=[0,1],r=!1,n;function a(i){var s=cI(e(i));return isNaN(s)?n:r?Math.round(s):s}return a.invert=function(i){return e.invert(_0(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Jo)).map(_0)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return xS(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},$t.apply(a,arguments),Br(a)}function gS(){var e=[],t=[],r=[],n;function a(){var s=0,l=Math.max(1,t.length);for(r=new Array(l-1);++s<l;)r[s-1]=pE(e,s/l);return i}function i(s){return s==null||isNaN(s=+s)?n:t[Ji(r,s)]}return i.invertExtent=function(s){var l=t.indexOf(s);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let l of s)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Mr),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return gS().domain(e).range(t).unknown(n)},$t.apply(i,arguments)}function vS(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function s(c){return c!=null&&c<=c?a[Ji(n,c,0,r)]:i}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},s.range=function(c){return arguments.length?(r=(a=Array.from(c)).length-1,l()):a.slice()},s.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return vS().domain([e,t]).range(a).unknown(i)},$t.apply(Br(s),arguments)}function yS(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Ji(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return yS().domain(e).range(t).unknown(r)},$t.apply(a,arguments)}const ff=new Date,hf=new Date;function Ze(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),l=a.ceil(i);return i-s<l-i?s:l},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<s)||!(l>0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(u<i&&i<s);return c},a.filter=i=>Ze(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!i(s););else for(;--l>=0;)for(;t(s,1),!i(s););}),r&&(a.count=(i,s)=>(ff.setTime(+i),hf.setTime(+s),e(ff),e(hf),Math.floor(r(ff,hf))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const ns=Ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ns.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ze(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ns);ns.range;const cr=1e3,Tt=cr*60,ur=Tt*60,gr=ur*24,cx=gr*7,k0=gr*30,pf=gr*365,rn=Ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*cr)},(e,t)=>(t-e)/cr,e=>e.getUTCSeconds());rn.range;const ux=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*cr)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getMinutes());ux.range;const dx=Ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getUTCMinutes());dx.range;const fx=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*cr-e.getMinutes()*Tt)},(e,t)=>{e.setTime(+e+t*ur)},(e,t)=>(t-e)/ur,e=>e.getHours());fx.range;const hx=Ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ur)},(e,t)=>(t-e)/ur,e=>e.getUTCHours());hx.range;const ro=Ze(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/gr,e=>e.getDate()-1);ro.range;const kl=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gr,e=>e.getUTCDate()-1);kl.range;const bS=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gr,e=>Math.floor(e/gr));bS.range;function wn(e){return Ze(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Tt)/cx)}const Tl=wn(0),as=wn(1),uI=wn(2),dI=wn(3),ea=wn(4),fI=wn(5),hI=wn(6);Tl.range;as.range;uI.range;dI.range;ea.range;fI.range;hI.range;function jn(e){return Ze(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/cx)}const El=jn(0),is=jn(1),pI=jn(2),mI=jn(3),ta=jn(4),xI=jn(5),gI=jn(6);El.range;is.range;pI.range;mI.range;ta.range;xI.range;gI.range;const px=Ze(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());px.range;const mx=Ze(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());mx.range;const vr=Ze(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());vr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ze(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});vr.range;const yr=Ze(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());yr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ze(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});yr.range;function wS(e,t,r,n,a,i){const s=[[rn,1,cr],[rn,5,5*cr],[rn,15,15*cr],[rn,30,30*cr],[i,1,Tt],[i,5,5*Tt],[i,15,15*Tt],[i,30,30*Tt],[a,1,ur],[a,3,3*ur],[a,6,6*ur],[a,12,12*ur],[n,1,gr],[n,2,2*gr],[r,1,cx],[t,1,k0],[t,3,3*k0],[e,1,pf]];function l(u,d,f){const h=d<u;h&&([u,d]=[d,u]);const p=f&&typeof f.range=="function"?f:c(u,d,f),g=p?p.range(u,+d+1):[];return h?g.reverse():g}function c(u,d,f){const h=Math.abs(d-u)/f,p=Xm(([,,m])=>m).right(s,h);if(p===s.length)return e.every(qh(u/pf,d/pf,f));if(p===0)return ns.every(Math.max(qh(u,d,f),1));const[g,x]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return g.every(x)}return[l,c]}const[vI,yI]=wS(yr,mx,El,bS,hx,dx),[bI,wI]=wS(vr,px,Tl,ro,fx,ux);function mf(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function xf(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Wa(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function jI(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,s=e.shortDays,l=e.months,c=e.shortMonths,u=Ha(a),d=Va(a),f=Ha(i),h=Va(i),p=Ha(s),g=Va(s),x=Ha(l),m=Va(l),v=Ha(c),b=Va(c),w={a:L,A:q,b:U,B:z,c:null,d:R0,e:R0,f:VI,g:tM,G:nM,H:qI,I:WI,j:HI,L:jS,m:UI,M:KI,p:F,q:H,Q:z0,s:B0,S:GI,u:ZI,U:YI,V:XI,w:QI,W:JI,x:null,X:null,y:eM,Y:rM,Z:aM,"%":D0},C={a:W,A:Z,b:re,B:X,c:null,d:L0,e:L0,f:lM,g:vM,G:bM,H:iM,I:oM,j:sM,L:SS,m:cM,M:uM,p:ne,q:ce,Q:z0,s:B0,S:dM,u:fM,U:hM,V:pM,w:mM,W:xM,x:null,X:null,y:gM,Y:yM,Z:wM,"%":D0},y={a:I,A:k,b:E,B:T,c:M,d:M0,e:M0,f:DI,g:I0,G:E0,H:$0,I:$0,j:MI,L:LI,m:II,M:$I,p:_,q:EI,Q:BI,s:FI,S:RI,u:PI,U:AI,V:_I,w:NI,W:kI,x:R,X:$,y:I0,Y:E0,Z:TI,"%":zI};w.x=j(r,w),w.X=j(n,w),w.c=j(t,w),C.x=j(r,C),C.X=j(n,C),C.c=j(t,C);function j(G,ee){return function(J){var D=[],he=-1,Q=0,me=G.length,$e,tt,Pr;for(J instanceof Date||(J=new Date(+J));++he<me;)G.charCodeAt(he)===37&&(D.push(G.slice(Q,he)),(tt=T0[$e=G.charAt(++he)])!=null?$e=G.charAt(++he):tt=$e==="e"?" ":"0",(Pr=ee[$e])&&($e=Pr(J,tt)),D.push($e),Q=he+1);return D.push(G.slice(Q,he)),D.join("")}}function S(G,ee){return function(J){var D=Wa(1900,void 0,1),he=A(D,G,J+="",0),Q,me;if(he!=J.length)return null;if("Q"in D)return new Date(D.Q);if("s"in D)return new Date(D.s*1e3+("L"in D?D.L:0));if(ee&&!("Z"in D)&&(D.Z=0),"p"in D&&(D.H=D.H%12+D.p*12),D.m===void 0&&(D.m="q"in D?D.q:0),"V"in D){if(D.V<1||D.V>53)return null;"w"in D||(D.w=1),"Z"in D?(Q=xf(Wa(D.y,0,1)),me=Q.getUTCDay(),Q=me>4||me===0?is.ceil(Q):is(Q),Q=kl.offset(Q,(D.V-1)*7),D.y=Q.getUTCFullYear(),D.m=Q.getUTCMonth(),D.d=Q.getUTCDate()+(D.w+6)%7):(Q=mf(Wa(D.y,0,1)),me=Q.getDay(),Q=me>4||me===0?as.ceil(Q):as(Q),Q=ro.offset(Q,(D.V-1)*7),D.y=Q.getFullYear(),D.m=Q.getMonth(),D.d=Q.getDate()+(D.w+6)%7)}else("W"in D||"U"in D)&&("w"in D||(D.w="u"in D?D.u%7:"W"in D?1:0),me="Z"in D?xf(Wa(D.y,0,1)).getUTCDay():mf(Wa(D.y,0,1)).getDay(),D.m=0,D.d="W"in D?(D.w+6)%7+D.W*7-(me+5)%7:D.w+D.U*7-(me+6)%7);return"Z"in D?(D.H+=D.Z/100|0,D.M+=D.Z%100,xf(D)):mf(D)}}function A(G,ee,J,D){for(var he=0,Q=ee.length,me=J.length,$e,tt;he<Q;){if(D>=me)return-1;if($e=ee.charCodeAt(he++),$e===37){if($e=ee.charAt(he++),tt=y[$e in T0?ee.charAt(he++):$e],!tt||(D=tt(G,J,D))<0)return-1}else if($e!=J.charCodeAt(D++))return-1}return D}function _(G,ee,J){var D=u.exec(ee.slice(J));return D?(G.p=d.get(D[0].toLowerCase()),J+D[0].length):-1}function I(G,ee,J){var D=p.exec(ee.slice(J));return D?(G.w=g.get(D[0].toLowerCase()),J+D[0].length):-1}function k(G,ee,J){var D=f.exec(ee.slice(J));return D?(G.w=h.get(D[0].toLowerCase()),J+D[0].length):-1}function E(G,ee,J){var D=v.exec(ee.slice(J));return D?(G.m=b.get(D[0].toLowerCase()),J+D[0].length):-1}function T(G,ee,J){var D=x.exec(ee.slice(J));return D?(G.m=m.get(D[0].toLowerCase()),J+D[0].length):-1}function M(G,ee,J){return A(G,t,ee,J)}function R(G,ee,J){return A(G,r,ee,J)}function $(G,ee,J){return A(G,n,ee,J)}function L(G){return s[G.getDay()]}function q(G){return i[G.getDay()]}function U(G){return c[G.getMonth()]}function z(G){return l[G.getMonth()]}function F(G){return a[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function W(G){return s[G.getUTCDay()]}function Z(G){return i[G.getUTCDay()]}function re(G){return c[G.getUTCMonth()]}function X(G){return l[G.getUTCMonth()]}function ne(G){return a[+(G.getUTCHours()>=12)]}function ce(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var ee=j(G+="",w);return ee.toString=function(){return G},ee},parse:function(G){var ee=S(G+="",!1);return ee.toString=function(){return G},ee},utcFormat:function(G){var ee=j(G+="",C);return ee.toString=function(){return G},ee},utcParse:function(G){var ee=S(G+="",!0);return ee.toString=function(){return G},ee}}}var T0={"-":"",_:" ",0:"0"},et=/^\s*\d+/,CI=/^%/,SI=/[\\^$*+?|[\]().{}]/g;function ye(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function OI(e){return e.replace(SI,"\\$&")}function Ha(e){return new RegExp("^(?:"+e.map(OI).join("|")+")","i")}function Va(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function NI(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function PI(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function AI(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function _I(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function kI(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function E0(e,t,r){var n=et.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function I0(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function TI(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function EI(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function II(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function M0(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function MI(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function $0(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function $I(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function RI(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function LI(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function DI(e,t,r){var n=et.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function zI(e,t,r){var n=CI.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function BI(e,t,r){var n=et.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function FI(e,t,r){var n=et.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function R0(e,t){return ye(e.getDate(),t,2)}function qI(e,t){return ye(e.getHours(),t,2)}function WI(e,t){return ye(e.getHours()%12||12,t,2)}function HI(e,t){return ye(1+ro.count(vr(e),e),t,3)}function jS(e,t){return ye(e.getMilliseconds(),t,3)}function VI(e,t){return jS(e,t)+"000"}function UI(e,t){return ye(e.getMonth()+1,t,2)}function KI(e,t){return ye(e.getMinutes(),t,2)}function GI(e,t){return ye(e.getSeconds(),t,2)}function ZI(e){var t=e.getDay();return t===0?7:t}function YI(e,t){return ye(Tl.count(vr(e)-1,e),t,2)}function CS(e){var t=e.getDay();return t>=4||t===0?ea(e):ea.ceil(e)}function XI(e,t){return e=CS(e),ye(ea.count(vr(e),e)+(vr(e).getDay()===4),t,2)}function QI(e){return e.getDay()}function JI(e,t){return ye(as.count(vr(e)-1,e),t,2)}function eM(e,t){return ye(e.getFullYear()%100,t,2)}function tM(e,t){return e=CS(e),ye(e.getFullYear()%100,t,2)}function rM(e,t){return ye(e.getFullYear()%1e4,t,4)}function nM(e,t){var r=e.getDay();return e=r>=4||r===0?ea(e):ea.ceil(e),ye(e.getFullYear()%1e4,t,4)}function aM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function L0(e,t){return ye(e.getUTCDate(),t,2)}function iM(e,t){return ye(e.getUTCHours(),t,2)}function oM(e,t){return ye(e.getUTCHours()%12||12,t,2)}function sM(e,t){return ye(1+kl.count(yr(e),e),t,3)}function SS(e,t){return ye(e.getUTCMilliseconds(),t,3)}function lM(e,t){return SS(e,t)+"000"}function cM(e,t){return ye(e.getUTCMonth()+1,t,2)}function uM(e,t){return ye(e.getUTCMinutes(),t,2)}function dM(e,t){return ye(e.getUTCSeconds(),t,2)}function fM(e){var t=e.getUTCDay();return t===0?7:t}function hM(e,t){return ye(El.count(yr(e)-1,e),t,2)}function OS(e){var t=e.getUTCDay();return t>=4||t===0?ta(e):ta.ceil(e)}function pM(e,t){return e=OS(e),ye(ta.count(yr(e),e)+(yr(e).getUTCDay()===4),t,2)}function mM(e){return e.getUTCDay()}function xM(e,t){return ye(is.count(yr(e)-1,e),t,2)}function gM(e,t){return ye(e.getUTCFullYear()%100,t,2)}function vM(e,t){return e=OS(e),ye(e.getUTCFullYear()%100,t,2)}function yM(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function bM(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ta(e):ta.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function wM(){return"+0000"}function D0(){return"%"}function z0(e){return+e}function B0(e){return Math.floor(+e/1e3)}var Tn,NS,PS;jM({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jM(e){return Tn=jI(e),NS=Tn.format,Tn.parse,PS=Tn.utcFormat,Tn.utcParse,Tn}function CM(e){return new Date(e)}function SM(e){return e instanceof Date?+e:+new Date(+e)}function xx(e,t,r,n,a,i,s,l,c,u){var d=rx(),f=d.invert,h=d.domain,p=u(".%L"),g=u(":%S"),x=u("%I:%M"),m=u("%I %p"),v=u("%a %d"),b=u("%b %d"),w=u("%B"),C=u("%Y");function y(j){return(c(j)<j?p:l(j)<j?g:s(j)<j?x:i(j)<j?m:n(j)<j?a(j)<j?v:b:r(j)<j?w:C)(j)}return d.invert=function(j){return new Date(f(j))},d.domain=function(j){return arguments.length?h(Array.from(j,SM)):h().map(CM)},d.ticks=function(j){var S=h();return e(S[0],S[S.length-1],j??10)},d.tickFormat=function(j,S){return S==null?y:u(S)},d.nice=function(j){var S=h();return(!j||typeof j.range!="function")&&(j=t(S[0],S[S.length-1],j??10)),j?h(hS(S,j)):d},d.copy=function(){return to(d,xx(e,t,r,n,a,i,s,l,c,u))},d}function OM(){return $t.apply(xx(bI,wI,vr,px,Tl,ro,fx,ux,rn,NS).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function NM(){return $t.apply(xx(vI,yI,yr,mx,El,kl,hx,dx,rn,PS).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Il(){var e=0,t=1,r,n,a,i,s=ut,l=!1,c;function u(f){return f==null||isNaN(f=+f)?c:s(a===0?.5:(f=(i(f)-r)*a,l?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(l=!!f,u):l},u.interpolator=function(f){return arguments.length?(s=f,u):s};function d(f){return function(h){var p,g;return arguments.length?([p,g]=h,s=f(p,g),u):[s(0),s(1)]}}return u.range=d(_a),u.rangeRound=d(tx),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function Fr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function AS(){var e=Br(Il()(ut));return e.copy=function(){return Fr(e,AS())},Or.apply(e,arguments)}function _S(){var e=ix(Il()).domain([1,10]);return e.copy=function(){return Fr(e,_S()).base(e.base())},Or.apply(e,arguments)}function kS(){var e=ox(Il());return e.copy=function(){return Fr(e,kS()).constant(e.constant())},Or.apply(e,arguments)}function gx(){var e=sx(Il());return e.copy=function(){return Fr(e,gx()).exponent(e.exponent())},Or.apply(e,arguments)}function PM(){return gx.apply(null,arguments).exponent(.5)}function TS(){var e=[],t=ut;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ji(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Mr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>hE(e,i/n))},r.copy=function(){return TS(t).domain(e)},Or.apply(r,arguments)}function Ml(){var e=0,t=.5,r=1,n=1,a,i,s,l,c,u=ut,d,f=!1,h;function p(x){return isNaN(x=+x)?h:(x=.5+((x=+d(x))-i)*(n*x<n*i?l:c),u(f?Math.max(0,Math.min(1,x)):x))}p.domain=function(x){return arguments.length?([e,t,r]=x,a=d(e=+e),i=d(t=+t),s=d(r=+r),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),n=i<a?-1:1,p):[e,t,r]},p.clamp=function(x){return arguments.length?(f=!!x,p):f},p.interpolator=function(x){return arguments.length?(u=x,p):u};function g(x){return function(m){var v,b,w;return arguments.length?([v,b,w]=m,u=zE(x,[v,b,w]),p):[u(0),u(.5),u(1)]}}return p.range=g(_a),p.rangeRound=g(tx),p.unknown=function(x){return arguments.length?(h=x,p):h},function(x){return d=x,a=x(e),i=x(t),s=x(r),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),n=i<a?-1:1,p}}function ES(){var e=Br(Ml()(ut));return e.copy=function(){return Fr(e,ES())},Or.apply(e,arguments)}function IS(){var e=ix(Ml()).domain([.1,1,10]);return e.copy=function(){return Fr(e,IS()).base(e.base())},Or.apply(e,arguments)}function MS(){var e=ox(Ml());return e.copy=function(){return Fr(e,MS()).constant(e.constant())},Or.apply(e,arguments)}function vx(){var e=sx(Ml());return e.copy=function(){return Fr(e,vx()).exponent(e.exponent())},Or.apply(e,arguments)}function AM(){return vx.apply(null,arguments).exponent(.5)}const F0=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:gi,scaleDiverging:ES,scaleDivergingLog:IS,scaleDivergingPow:vx,scaleDivergingSqrt:AM,scaleDivergingSymlog:MS,scaleIdentity:fS,scaleImplicit:Wh,scaleLinear:rs,scaleLog:pS,scaleOrdinal:Qm,scalePoint:ti,scalePow:lx,scaleQuantile:gS,scaleQuantize:vS,scaleRadial:xS,scaleSequential:AS,scaleSequentialLog:_S,scaleSequentialPow:gx,scaleSequentialQuantile:TS,scaleSequentialSqrt:PM,scaleSequentialSymlog:kS,scaleSqrt:lI,scaleSymlog:mS,scaleThreshold:yS,scaleTime:OM,scaleUtc:NM,tickFormat:dS},Symbol.toStringTag,{value:"Module"}));var gf,q0;function $l(){if(q0)return gf;q0=1;var e=Oa();function t(r,n,a){for(var i=-1,s=r.length;++i<s;){var l=r[i],c=n(l);if(c!=null&&(u===void 0?c===c&&!e(c):a(c,u)))var u=c,d=l}return d}return gf=t,gf}var vf,W0;function $S(){if(W0)return vf;W0=1;function e(t,r){return t>r}return vf=e,vf}var yf,H0;function _M(){if(H0)return yf;H0=1;var e=$l(),t=$S(),r=Aa();function n(a){return a&&a.length?e(a,r,t):void 0}return yf=n,yf}var kM=_M();const Er=Ne(kM);var bf,V0;function RS(){if(V0)return bf;V0=1;function e(t,r){return t<r}return bf=e,bf}var wf,U0;function TM(){if(U0)return wf;U0=1;var e=$l(),t=RS(),r=Aa();function n(a){return a&&a.length?e(a,r,t):void 0}return wf=n,wf}var EM=TM();const Rl=Ne(EM);var jf,K0;function IM(){if(K0)return jf;K0=1;var e=Mm(),t=nr(),r=VC(),n=vt();function a(i,s){var l=n(i)?e:r;return l(i,t(s,3))}return jf=a,jf}var Cf,G0;function MM(){if(G0)return Cf;G0=1;var e=WC(),t=IM();function r(n,a){return e(t(n,a),1)}return Cf=r,Cf}var $M=MM();const RM=Ne($M);var Sf,Z0;function LM(){if(Z0)return Sf;Z0=1;var e=Km();function t(r,n){return e(r,n)}return Sf=t,Sf}var DM=LM();const br=Ne(DM);var ka=1e9,zM={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},bx,De=!0,Mt="[DecimalError] ",sn=Mt+"Invalid argument: ",yx=Mt+"Exponent out of range: ",Ta=Math.floor,Xr=Math.pow,BM=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ct,Xe=1e7,Me=7,LS=9007199254740991,os=Ta(LS/Me),se={};se.absoluteValue=se.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};se.comparedTo=se.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};se.decimalPlaces=se.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Me;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};se.dividedBy=se.div=function(e){return hr(this,new this.constructor(e))};se.dividedToIntegerBy=se.idiv=function(e){var t=this,r=t.constructor;return Ae(hr(t,new r(e),0,1),r.precision)};se.equals=se.eq=function(e){return!this.cmp(e)};se.exponent=function(){return He(this)};se.greaterThan=se.gt=function(e){return this.cmp(e)>0};se.greaterThanOrEqualTo=se.gte=function(e){return this.cmp(e)>=0};se.isInteger=se.isint=function(){return this.e>this.d.length-2};se.isNegative=se.isneg=function(){return this.s<0};se.isPositive=se.ispos=function(){return this.s>0};se.isZero=function(){return this.s===0};se.lessThan=se.lt=function(e){return this.cmp(e)<0};se.lessThanOrEqualTo=se.lte=function(e){return this.cmp(e)<1};se.logarithm=se.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Ct))throw Error(Mt+"NaN");if(r.s<1)throw Error(Mt+(r.s?"NaN":"-Infinity"));return r.eq(Ct)?new n(0):(De=!1,t=hr(ji(r,i),ji(e,i),i),De=!0,Ae(t,a))};se.minus=se.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?BS(t,e):DS(t,(e.s=-e.s,e))};se.modulo=se.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Mt+"NaN");return r.s?(De=!1,t=hr(r,e,0,1).times(e),De=!0,r.minus(t)):Ae(new n(r),a)};se.naturalExponential=se.exp=function(){return zS(this)};se.naturalLogarithm=se.ln=function(){return ji(this)};se.negated=se.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};se.plus=se.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?DS(t,e):BS(t,(e.s=-e.s,e))};se.precision=se.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(sn+e);if(t=He(a)+1,n=a.d.length-1,r=n*Me+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};se.squareRoot=se.sqrt=function(){var e,t,r,n,a,i,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Mt+"NaN")}for(e=He(l),De=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=Kt(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Ta((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(a.toString()),r=c.precision,a=s=r+3;;)if(i=n,n=i.plus(hr(l,i,s+2)).times(.5),Kt(i.d).slice(0,s)===(t=Kt(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ae(i,r+1,0),i.times(i).eq(l)){n=i;break}}else if(t!="9999")break;s+=4}return De=!0,Ae(n,r)};se.times=se.mul=function(e){var t,r,n,a,i,s,l,c,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,c=h.length,u=p.length,c<u&&(i=h,h=p,p=i,s=c,c=u,u=s),i=[],s=c+u,n=s;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=c+n;a>n;)l=i[a]+p[n]*h[a-n-1]+t,i[a--]=l%Xe|0,t=l/Xe|0;i[a]=(i[a]+t)%Xe|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,De?Ae(e,f.precision):e};se.toDecimalPlaces=se.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Jt(e,0,ka),t===void 0?t=n.rounding:Jt(t,0,8),Ae(r,e+He(r)+1,t))};se.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=fn(n,!0):(Jt(e,0,ka),t===void 0?t=a.rounding:Jt(t,0,8),n=Ae(new a(n),e+1,t),r=fn(n,!0,e+1)),r};se.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?fn(a):(Jt(e,0,ka),t===void 0?t=i.rounding:Jt(t,0,8),n=Ae(new i(a),e+He(a)+1,t),r=fn(n.abs(),!1,e+He(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};se.toInteger=se.toint=function(){var e=this,t=e.constructor;return Ae(new t(e),He(e)+1,t.rounding)};se.toNumber=function(){return+this};se.toPower=se.pow=function(e){var t,r,n,a,i,s,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Ct);if(l=new c(l),!l.s){if(e.s<1)throw Error(Mt+"Infinity");return l}if(l.eq(Ct))return l;if(n=c.precision,e.eq(Ct))return Ae(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,i=l.s,s){if((r=d<0?-d:d)<=LS){for(a=new c(Ct),t=Math.ceil(n/Me+4),De=!1;r%2&&(a=a.times(l),X0(a.d,t)),r=Ta(r/2),r!==0;)l=l.times(l),X0(l.d,t);return De=!0,e.s<0?new c(Ct).div(a):Ae(a,n)}}else if(i<0)throw Error(Mt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,De=!1,a=e.times(ji(l,n+u)),De=!0,a=zS(a),a.s=i,a};se.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=He(a),n=fn(a,r<=i.toExpNeg||r>=i.toExpPos)):(Jt(e,1,ka),t===void 0?t=i.rounding:Jt(t,0,8),a=Ae(new i(a),e,t),r=He(a),n=fn(a,e<=r||r<=i.toExpNeg,e)),n};se.toSignificantDigits=se.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Jt(e,1,ka),t===void 0?t=n.rounding:Jt(t,0,8)),Ae(new n(r),e,t)};se.toString=se.valueOf=se.val=se.toJSON=se[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=He(e),r=e.constructor;return fn(e,t<=r.toExpNeg||t>=r.toExpPos)};function DS(e,t){var r,n,a,i,s,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),De?Ae(t,f):t;if(c=e.d,u=t.d,s=e.e,a=t.e,c=c.slice(),i=s-a,i){for(i<0?(n=c,i=-i,l=u.length):(n=u,a=s,l=c.length),s=Math.ceil(f/Me),l=s>l?s+1:l+1,i>l&&(i=l,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,n=u,u=c,c=n),r=0;i;)r=(c[--i]=c[i]+u[i]+r)/Xe|0,c[i]%=Xe;for(r&&(c.unshift(r),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,De?Ae(t,f):t}function Jt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(sn+e)}function Kt(e){var t,r,n,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)n=e[t]+"",r=Me-n.length,r&&(i+=_r(r)),i+=n;s=e[t],n=s+"",r=Me-n.length,r&&(i+=_r(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var hr=(function(){function e(n,a){var i,s=0,l=n.length;for(n=n.slice();l--;)i=n[l]*a+s,n[l]=i%Xe|0,s=i/Xe|0;return s&&n.unshift(s),n}function t(n,a,i,s){var l,c;if(i!=s)c=i>s?1:-1;else for(l=c=0;l<i;l++)if(n[l]!=a[l]){c=n[l]>a[l]?1:-1;break}return c}function r(n,a,i){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*Xe+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,s){var l,c,u,d,f,h,p,g,x,m,v,b,w,C,y,j,S,A,_=n.constructor,I=n.s==a.s?1:-1,k=n.d,E=a.d;if(!n.s)return new _(n);if(!a.s)throw Error(Mt+"Division by zero");for(c=n.e-a.e,S=E.length,y=k.length,p=new _(I),g=p.d=[],u=0;E[u]==(k[u]||0);)++u;if(E[u]>(k[u]||0)&&--c,i==null?b=i=_.precision:s?b=i+(He(n)-He(a))+1:b=i,b<0)return new _(0);if(b=b/Me+2|0,u=0,S==1)for(d=0,E=E[0],b++;(u<y||d)&&b--;u++)w=d*Xe+(k[u]||0),g[u]=w/E|0,d=w%E|0;else{for(d=Xe/(E[0]+1)|0,d>1&&(E=e(E,d),k=e(k,d),S=E.length,y=k.length),C=S,x=k.slice(0,S),m=x.length;m<S;)x[m++]=0;A=E.slice(),A.unshift(0),j=E[0],E[1]>=Xe/2&&++j;do d=0,l=t(E,x,S,m),l<0?(v=x[0],S!=m&&(v=v*Xe+(x[1]||0)),d=v/j|0,d>1?(d>=Xe&&(d=Xe-1),f=e(E,d),h=f.length,m=x.length,l=t(f,x,h,m),l==1&&(d--,r(f,S<h?A:E,h))):(d==0&&(l=d=1),f=E.slice()),h=f.length,h<m&&f.unshift(0),r(x,f,m),l==-1&&(m=x.length,l=t(E,x,S,m),l<1&&(d++,r(x,S<m?A:E,m))),m=x.length):l===0&&(d++,x=[0]),g[u++]=d,l&&x[0]?x[m++]=k[C]||0:(x=[k[C]],m=1);while((C++<y||x[0]!==void 0)&&b--)}return g[0]||g.shift(),p.e=c,Ae(p,s?i+He(p)+1:i)}})();function zS(e,t){var r,n,a,i,s,l,c=0,u=0,d=e.constructor,f=d.precision;if(He(e)>16)throw Error(yx+He(e));if(!e.s)return new d(Ct);for(De=!1,l=f,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(n=Math.log(Xr(2,u))/Math.LN10*2+5|0,l+=n,r=a=i=new d(Ct),d.precision=l;;){if(a=Ae(a.times(e),l),r=r.times(++c),s=i.plus(hr(a,r,l)),Kt(s.d).slice(0,l)===Kt(i.d).slice(0,l)){for(;u--;)i=Ae(i.times(i),l);return d.precision=f,t==null?(De=!0,Ae(i,f)):i}i=s}}function He(e){for(var t=e.e*Me,r=e.d[0];r>=10;r/=10)t++;return t}function Of(e,t,r){if(t>e.LN10.sd())throw De=!0,r&&(e.precision=r),Error(Mt+"LN10 precision limit exceeded");return Ae(new e(e.LN10),t)}function _r(e){for(var t="";e--;)t+="0";return t}function ji(e,t){var r,n,a,i,s,l,c,u,d,f=1,h=10,p=e,g=p.d,x=p.constructor,m=x.precision;if(p.s<1)throw Error(Mt+(p.s?"NaN":"-Infinity"));if(p.eq(Ct))return new x(0);if(t==null?(De=!1,u=m):u=t,p.eq(10))return t==null&&(De=!0),Of(x,u);if(u+=h,x.precision=u,r=Kt(g),n=r.charAt(0),i=He(p),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Kt(p.d),n=r.charAt(0),f++;i=He(p),n>1?(p=new x("0."+r),i++):p=new x(n+"."+r.slice(1))}else return c=Of(x,u+2,m).times(i+""),p=ji(new x(n+"."+r.slice(1)),u-h).plus(c),x.precision=m,t==null?(De=!0,Ae(p,m)):p;for(l=s=p=hr(p.minus(Ct),p.plus(Ct),u),d=Ae(p.times(p),u),a=3;;){if(s=Ae(s.times(d),u),c=l.plus(hr(s,new x(a),u)),Kt(c.d).slice(0,u)===Kt(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(Of(x,u+2,m).times(i+""))),l=hr(l,new x(f),u),x.precision=m,t==null?(De=!0,Ae(l,m)):l;l=c,a+=2}}function Y0(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Ta(r/Me),e.d=[],n=(r+1)%Me,r<0&&(n+=Me),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Me;n<a;)e.d.push(+t.slice(n,n+=Me));t=t.slice(n),n=Me-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),De&&(e.e>os||e.e<-os))throw Error(yx+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ae(e,t,r){var n,a,i,s,l,c,u,d,f=e.d;for(s=1,i=f[0];i>=10;i/=10)s++;if(n=t-s,n<0)n+=Me,a=t,u=f[d=0];else{if(d=Math.ceil((n+1)/Me),i=f.length,d>=i)return e;for(u=i=f[d],s=1;i>=10;i/=10)s++;n%=Me,a=n-Me+s}if(r!==void 0&&(i=Xr(10,s-a-1),l=u/i%10|0,c=t<0||f[d+1]!==void 0||u%i,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?a>0?u/Xr(10,s-a):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(i=He(e),f.length=1,t=t-i-1,f[0]=Xr(10,(Me-t%Me)%Me),e.e=Ta(-t/Me)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,i=1,d--):(f.length=d+1,i=Xr(10,Me-n),f[d]=a>0?(u/Xr(10,s-a)%Xr(10,a)|0)*i:0),c)for(;;)if(d==0){(f[0]+=i)==Xe&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=Xe)break;f[d--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(De&&(e.e>os||e.e<-os))throw Error(yx+He(e));return e}function BS(e,t){var r,n,a,i,s,l,c,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),De?Ae(t,p):t;if(c=e.d,f=t.d,n=t.e,u=e.e,c=c.slice(),s=u-n,s){for(d=s<0,d?(r=c,s=-s,l=f.length):(r=f,n=u,l=c.length),a=Math.max(Math.ceil(p/Me),l)+2,s>a&&(s=a,r.length=1),r.reverse(),a=s;a--;)r.push(0);r.reverse()}else{for(a=c.length,l=f.length,d=a<l,d&&(l=a),a=0;a<l;a++)if(c[a]!=f[a]){d=c[a]<f[a];break}s=0}for(d&&(r=c,c=f,f=r,t.s=-t.s),l=c.length,a=f.length-l;a>0;--a)c[l++]=0;for(a=f.length;a>s;){if(c[--a]<f[a]){for(i=a;i&&c[--i]===0;)c[i]=Xe-1;--c[i],c[a]+=Xe}c[a]-=f[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,De?Ae(t,p):t):new h(0)}function fn(e,t,r){var n,a=He(e),i=Kt(e.d),s=i.length;return t?(r&&(n=r-s)>0?i=i.charAt(0)+"."+i.slice(1)+_r(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+_r(-a-1)+i,r&&(n=r-s)>0&&(i+=_r(n))):a>=s?(i+=_r(a+1-s),r&&(n=r-a-1)>0&&(i=i+"."+_r(n))):((n=a+1)<s&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-s)>0&&(a+1===s&&(i+="."),i+=_r(n))),e.s<0?"-"+i:i}function X0(e,t){if(e.length>t)return e.length=t,!0}function FS(e){var t,r,n;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(sn+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return Y0(s,i.toString())}else if(typeof i!="string")throw Error(sn+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,BM.test(i))Y0(s,i);else throw Error(sn+i)}if(a.prototype=se,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=FS,a.config=a.set=FM,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function FM(e){if(!e||typeof e!="object")throw Error(Mt+"Object expected");var t,r,n,a=["precision",1,ka,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Ta(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(sn+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(sn+r+": "+n);return this}var bx=FS(zM);Ct=new bx(1);const Pe=bx;function qM(e){return UM(e)||VM(e)||HM(e)||WM()}function WM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
32
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XT(e,t){if(e){if(typeof e=="string")return t0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t0(e,t)}}function t0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QT(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function JT(e){if(Array.isArray(e))return e}var tS=/[ \f\n\r\t\v\u2028\u2029]+/,rS=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];de(r)||(n?i=r.toString().split(""):i=r.toString().split(tS));var s=i.map(function(c){return{word:c,width:ei(c,a).width}}),l=n?0:ei(" ",a).width;return{wordsWithComputedWidth:s,spaceWidth:l}}catch{return null}},eE=function(t,r,n,a,i){var s=t.maxLines,l=t.children,c=t.style,u=t.breakAll,d=Z(s),f=l,h=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return R.reduce(function($,L){var q=L.word,U=L.width,D=$[$.length-1];if(D&&(a==null||i||D.width+U+n<Number(a)))D.words.push(q),D.width+=U+n;else{var B={words:[q],width:U};$.push(B)}return $},[])},p=h(r),g=function(R){return R.reduce(function($,L){return $.width>L.width?$:L})};if(!d)return p;for(var x="…",m=function(R){var $=f.slice(0,R),L=rS({breakAll:u,style:c,children:$+x}).wordsWithComputedWidth,q=h(L),U=q.length>s||g(q).width>Number(a);return[U,q]},v=0,b=f.length-1,w=0,C;v<=b&&w<=f.length-1;){var y=Math.floor((v+b)/2),j=y-1,S=m(j),A=e0(S,2),_=A[0],I=A[1],k=m(y),E=e0(k,1),T=E[0];if(!_&&!T&&(v=y+1),_&&T&&(b=y-1),!_&&T){C=I;break}w++}return C||p},r0=function(t){var r=de(t)?[]:t.toString().split(tS);return[{words:r}]},tE=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,l=t.maxLines;if((r||n)&&!ar.isSsr){var c,u,d=rS({breakAll:s,children:a,style:i});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;c=f,u=h}else return r0(a);return eE({breakAll:s,children:a,maxLines:l,style:i},c,u,r,n)}return r0(a)},n0="#808080",dn=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.lineHeight,l=s===void 0?"1em":s,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,x=g===void 0?"end":g,m=t.fill,v=m===void 0?n0:m,b=Jb(t,KT),w=P.useMemo(function(){return tE({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:f,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,f,b.style,b.width]),C=b.dx,y=b.dy,j=b.angle,S=b.className,A=b.breakAll,_=Jb(b,GT);if(!Ke(n)||!Ke(i))return null;var I=n+(Z(C)?C:0),k=i+(Z(y)?y:0),E;switch(x){case"start":E=cf("calc(".concat(u,")"));break;case"middle":E=cf("calc(".concat((w.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:E=cf("calc(".concat(w.length-1," * -").concat(l,")"));break}var T=[];if(f){var M=w[0].width,R=b.width;T.push("scale(".concat((Z(R)?R/M:1)/M,")"))}return j&&T.push("rotate(".concat(j,", ").concat(I,", ").concat(k,")")),T.length&&(_.transform=T.join(" ")),O.default.createElement("text",zh({},oe(_,!0),{x:I,y:k,className:ae.default("recharts-text",S),textAnchor:p,fill:v.includes("url")?n0:v}),w.map(function($,L){var q=$.words.join(A?"":" ");return O.default.createElement("tspan",{x:I,dy:L===0?E:l,key:"".concat(q,"-").concat(L)},q)}))};function Mr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rE(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xm(e){let t,r,n;e.length!==2?(t=Mr,r=(l,c)=>Mr(e(l),c),n=(l,c)=>e(l)-c):(t=e===Mr||e===rE?e:nE,r=e,n=e);function a(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;r(l[f],c)<0?u=f+1:d=f}while(u<d)}return u}function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;r(l[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function s(l,c,u=0,d=l.length){const f=a(l,c,u,d-1);return f>u&&n(l[f-1],c)>-n(l[f],c)?f-1:f}return{left:a,center:s,right:i}}function nE(){return 0}function nS(e){return e===null?NaN:+e}function*aE(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const iE=Xm(Mr),Ji=iE.right;Xm(nS).center;class a0 extends Map{constructor(t,r=lE){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(i0(this,t))}has(t){return super.has(i0(this,t))}set(t,r){return super.set(oE(this,t),r)}delete(t){return super.delete(sE(this,t))}}function i0({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function oE({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function sE({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function lE(e){return e!==null&&typeof e=="object"?e.valueOf():e}function cE(e=Mr){if(e===Mr)return aS;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function aS(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const uE=Math.sqrt(50),dE=Math.sqrt(10),fE=Math.sqrt(2);function Zo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),s=i>=uE?10:i>=dE?5:i>=fE?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/s,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*s,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=r&&r<2?Zo(e,t,r*2):[l,c,u]}function Bh(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,s]=n?Zo(t,e,r):Zo(e,t,r);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(n)if(s<0)for(let u=0;u<l;++u)c[u]=(i-u)/-s;else for(let u=0;u<l;++u)c[u]=(i-u)*s;else if(s<0)for(let u=0;u<l;++u)c[u]=(a+u)/-s;else for(let u=0;u<l;++u)c[u]=(a+u)*s;return c}function Fh(e,t,r){return t=+t,e=+e,r=+r,Zo(e,t,r)[2]}function qh(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Fh(t,e,r):Fh(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function o0(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function s0(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function iS(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?aS:cE(a);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/c+h)),g=Math.min(n,Math.floor(t+(c-u)*f/c+h));iS(e,t,p,g,a)}const i=e[t];let s=r,l=n;for(qa(e,r,t),a(e[n],i)>0&&qa(e,r,n);s<l;){for(qa(e,s,l),++s,--l;a(e[s],i)<0;)++s;for(;a(e[l],i)>0;)--l}a(e[r],i)===0?qa(e,r,l):(++l,qa(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function qa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function hE(e,t,r){if(e=Float64Array.from(aE(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return s0(e);if(t>=1)return o0(e);var n,a=(n-1)*t,i=Math.floor(a),s=o0(iS(e,i).subarray(0,i+1)),l=s0(e.subarray(i+1));return s+(l-s)*(a-i)}}function pE(e,t,r=nS){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),s=+r(e[i],i,e),l=+r(e[i+1],i+1,e);return s+(l-s)*(a-i)}}function mE(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function $t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Or(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Wh=Symbol("implicit");function Qm(){var e=new a0,t=[],r=[],n=Wh;function a(i){let s=e.get(i);if(s===void 0){if(n!==Wh)return n;e.set(i,s=t.push(i)-1)}return r[s%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new a0;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Qm(t,r).unknown(n)},$t.apply(a,arguments),a}function gi(){var e=Qm().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,s,l=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var h=t().length,p=a<n,g=p?a:n,x=p?n:a;i=(x-g)/Math.max(1,h-c+u*2),l&&(i=Math.floor(i)),g+=(x-g-i*(h-c))*d,s=i*(1-c),l&&(g=Math.round(g),s=Math.round(s));var m=mE(h).map(function(v){return g+i*v});return r(p?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,l=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(l=!!h,f()):l},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return gi(t(),[n,a]).round(l).paddingInner(c).paddingOuter(u).align(d)},$t.apply(f(),arguments)}function oS(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return oS(t())},e}function ti(){return oS(gi.apply(null,arguments).paddingInner(1))}function Jm(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function sS(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function eo(){}var vi=.7,Yo=1/vi,Bn="\\s*([+-]?\\d+)\\s*",yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xE=/^#([0-9a-f]{3,8})$/,gE=new RegExp(`^rgb\\(${Bn},${Bn},${Bn}\\)$`),vE=new RegExp(`^rgb\\(${Yt},${Yt},${Yt}\\)$`),yE=new RegExp(`^rgba\\(${Bn},${Bn},${Bn},${yi}\\)$`),bE=new RegExp(`^rgba\\(${Yt},${Yt},${Yt},${yi}\\)$`),wE=new RegExp(`^hsl\\(${yi},${Yt},${Yt}\\)$`),jE=new RegExp(`^hsla\\(${yi},${Yt},${Yt},${yi}\\)$`),l0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Jm(eo,bi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:c0,formatHex:c0,formatHex8:CE,formatHsl:SE,formatRgb:u0,toString:u0});function c0(){return this.rgb().formatHex()}function CE(){return this.rgb().formatHex8()}function SE(){return lS(this).formatHsl()}function u0(){return this.rgb().formatRgb()}function bi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=xE.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?d0(t):r===3?new mt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?xo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?xo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=gE.exec(e))?new mt(t[1],t[2],t[3],1):(t=vE.exec(e))?new mt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yE.exec(e))?xo(t[1],t[2],t[3],t[4]):(t=bE.exec(e))?xo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wE.exec(e))?p0(t[1],t[2]/100,t[3]/100,1):(t=jE.exec(e))?p0(t[1],t[2]/100,t[3]/100,t[4]):l0.hasOwnProperty(e)?d0(l0[e]):e==="transparent"?new mt(NaN,NaN,NaN,0):null}function d0(e){return new mt(e>>16&255,e>>8&255,e&255,1)}function xo(e,t,r,n){return n<=0&&(e=t=r=NaN),new mt(e,t,r,n)}function OE(e){return e instanceof eo||(e=bi(e)),e?(e=e.rgb(),new mt(e.r,e.g,e.b,e.opacity)):new mt}function Hh(e,t,r,n){return arguments.length===1?OE(e):new mt(e,t,r,n??1)}function mt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Jm(mt,Hh,sS(eo,{brighter(e){return e=e==null?Yo:Math.pow(Yo,e),new mt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new mt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mt(on(this.r),on(this.g),on(this.b),Xo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:f0,formatHex:f0,formatHex8:NE,formatRgb:h0,toString:h0}));function f0(){return`#${tn(this.r)}${tn(this.g)}${tn(this.b)}`}function NE(){return`#${tn(this.r)}${tn(this.g)}${tn(this.b)}${tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function h0(){const e=Xo(this.opacity);return`${e===1?"rgb(":"rgba("}${on(this.r)}, ${on(this.g)}, ${on(this.b)}${e===1?")":`, ${e})`}`}function Xo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function on(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tn(e){return e=on(e),(e<16?"0":"")+e.toString(16)}function p0(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new zt(e,t,r,n)}function lS(e){if(e instanceof zt)return new zt(e.h,e.s,e.l,e.opacity);if(e instanceof eo||(e=bi(e)),!e)return new zt;if(e instanceof zt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),s=NaN,l=i-a,c=(i+a)/2;return l?(t===i?s=(r-n)/l+(r<n)*6:r===i?s=(n-t)/l+2:s=(t-r)/l+4,l/=c<.5?i+a:2-i-a,s*=60):l=c>0&&c<1?0:s,new zt(s,l,c,e.opacity)}function PE(e,t,r,n){return arguments.length===1?lS(e):new zt(e,t,r,n??1)}function zt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Jm(zt,PE,sS(eo,{brighter(e){return e=e==null?Yo:Math.pow(Yo,e),new zt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new zt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new mt(uf(e>=240?e-240:e+120,a,n),uf(e,a,n),uf(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new zt(m0(this.h),go(this.s),go(this.l),Xo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xo(this.opacity);return`${e===1?"hsl(":"hsla("}${m0(this.h)}, ${go(this.s)*100}%, ${go(this.l)*100}%${e===1?")":`, ${e})`}`}}));function m0(e){return e=(e||0)%360,e<0?e+360:e}function go(e){return Math.max(0,Math.min(1,e||0))}function uf(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ex=e=>()=>e;function AE(e,t){return function(r){return e+r*t}}function _E(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function kE(e){return(e=+e)==1?cS:function(t,r){return r-t?_E(t,r,e):ex(isNaN(t)?r:t)}}function cS(e,t){var r=t-e;return r?AE(e,r):ex(isNaN(e)?t:e)}const x0=(function e(t){var r=kE(t);function n(a,i){var s=r((a=Hh(a)).r,(i=Hh(i)).r),l=r(a.g,i.g),c=r(a.b,i.b),u=cS(a.opacity,i.opacity);return function(d){return a.r=s(d),a.g=l(d),a.b=c(d),a.opacity=u(d),a+""}}return n.gamma=e,n})(1);function TE(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function EE(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function IE(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),s;for(s=0;s<n;++s)a[s]=_a(e[s],t[s]);for(;s<r;++s)i[s]=t[s];return function(l){for(s=0;s<n;++s)i[s]=a[s](l);return i}}function ME(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Qo(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function $E(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=_a(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var Vh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,df=new RegExp(Vh.source,"g");function RE(e){return function(){return e}}function LE(e){return function(t){return e(t)+""}}function DE(e,t){var r=Vh.lastIndex=df.lastIndex=0,n,a,i,s=-1,l=[],c=[];for(e=e+"",t=t+"";(n=Vh.exec(e))&&(a=df.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),l[s]?l[s]+=i:l[++s]=i),(n=n[0])===(a=a[0])?l[s]?l[s]+=a:l[++s]=a:(l[++s]=null,c.push({i:s,x:Qo(n,a)})),r=df.lastIndex;return r<t.length&&(i=t.slice(r),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?LE(c[0].x):RE(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function _a(e,t){var r=typeof t,n;return t==null||r==="boolean"?ex(t):(r==="number"?Qo:r==="string"?(n=bi(t))?(t=n,x0):DE:t instanceof bi?x0:t instanceof Date?ME:EE(t)?TE:Array.isArray(t)?IE:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?$E:Qo)(e,t)}function tx(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function zE(e,t){t===void 0&&(t=e,e=_a);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(s){var l=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return i[l](s-l)}}function BE(e){return function(){return e}}function Jo(e){return+e}var g0=[0,1];function ut(e){return e}function Uh(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:BE(isNaN(t)?NaN:.5)}function FE(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function qE(e,t,r){var n=e[0],a=e[1],i=t[0],s=t[1];return a<n?(n=Uh(a,n),i=r(s,i)):(n=Uh(n,a),i=r(i,s)),function(l){return i(n(l))}}function WE(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)a[s]=Uh(e[s],e[s+1]),i[s]=r(t[s],t[s+1]);return function(l){var c=Ji(e,l,1,n)-1;return i[c](a[c](l))}}function to(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function _l(){var e=g0,t=g0,r=_a,n,a,i,s=ut,l,c,u;function d(){var h=Math.min(e.length,t.length);return s!==ut&&(s=FE(e[0],e[h-1])),l=h>2?WE:qE,c=u=null,f}function f(h){return h==null||isNaN(h=+h)?i:(c||(c=l(e.map(n),t,r)))(n(s(h)))}return f.invert=function(h){return s(a((u||(u=l(t,e.map(n),Qo)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Jo),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=tx,d()},f.clamp=function(h){return arguments.length?(s=h?!0:ut,d()):s!==ut},f.interpolate=function(h){return arguments.length?(r=h,d()):r},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return n=h,a=p,d()}}function rx(){return _l()(ut,ut)}function HE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function es(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Jn(e){return e=es(Math.abs(e)),e?e[1]:NaN}function VE(e,t){return function(r,n){for(var a=r.length,i=[],s=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),i.push(r.substring(a-=l,a+l)),!((c+=l+1)>n));)l=e[s=(s+1)%e.length];return i.reverse().join(t)}}function UE(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var KE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wi(e){if(!(t=KE.exec(e)))throw new Error("invalid format: "+e);var t;return new nx({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}wi.prototype=nx.prototype;function nx(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}nx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function GE(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var ts;function ZE(e,t){var r=es(e,t);if(!r)return ts=void 0,e.toPrecision(t);var n=r[0],a=r[1],i=a-(ts=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return i===s?n:i>s?n+new Array(i-s+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+es(e,Math.max(0,t+i-1))[0]}function v0(e,t){var r=es(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const y0={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:HE,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>v0(e*100,t),r:v0,s:ZE,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function b0(e){return e}var w0=Array.prototype.map,j0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function YE(e){var t=e.grouping===void 0||e.thousands===void 0?b0:VE(w0.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?b0:UE(w0.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f,h){f=wi(f);var p=f.fill,g=f.align,x=f.sign,m=f.symbol,v=f.zero,b=f.width,w=f.comma,C=f.precision,y=f.trim,j=f.type;j==="n"?(w=!0,j="g"):y0[j]||(C===void 0&&(C=12),y=!0,j="g"),(v||p==="0"&&g==="=")&&(v=!0,p="0",g="=");var S=(h&&h.prefix!==void 0?h.prefix:"")+(m==="$"?r:m==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),A=(m==="$"?n:/[%p]/.test(j)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),_=y0[j],I=/[defgprs%]/.test(j);C=C===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function k(E){var T=S,M=A,R,$,L;if(j==="c")M=_(E)+M,E="";else{E=+E;var q=E<0||1/E<0;if(E=isNaN(E)?c:_(Math.abs(E),C),y&&(E=GE(E)),q&&+E==0&&x!=="+"&&(q=!1),T=(q?x==="("?x:l:x==="-"||x==="("?"":x)+T,M=(j==="s"&&!isNaN(E)&&ts!==void 0?j0[8+ts/3]:"")+M+(q&&x==="("?")":""),I){for(R=-1,$=E.length;++R<$;)if(L=E.charCodeAt(R),48>L||L>57){M=(L===46?a+E.slice(R+1):E.slice(R))+M,E=E.slice(0,R);break}}}w&&!v&&(E=t(E,1/0));var U=T.length+E.length+M.length,D=U<b?new Array(b-U+1).join(p):"";switch(w&&v&&(E=t(D+E,D.length?b-M.length:1/0),D=""),g){case"<":E=T+E+M+D;break;case"=":E=T+D+E+M;break;case"^":E=D.slice(0,U=D.length>>1)+T+E+M+D.slice(U);break;default:E=D+T+E+M;break}return i(E)}return k.toString=function(){return f+""},k}function d(f,h){var p=Math.max(-8,Math.min(8,Math.floor(Jn(h)/3)))*3,g=Math.pow(10,-p),x=u((f=wi(f),f.type="f",f),{suffix:j0[8+p/3]});return function(m){return x(g*m)}}return{format:u,formatPrefix:d}}var vo,ax,uS;XE({thousands:",",grouping:[3],currency:["$",""]});function XE(e){return vo=YE(e),ax=vo.format,uS=vo.formatPrefix,vo}function QE(e){return Math.max(0,-Jn(Math.abs(e)))}function JE(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jn(t)/3)))*3-Jn(Math.abs(e)))}function eI(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jn(t)-Jn(e))+1}function dS(e,t,r,n){var a=qh(e,t,r),i;switch(n=wi(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=JE(a,s))&&(n.precision=i),uS(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=eI(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=QE(a))&&(n.precision=i-(n.type==="%")*2);break}}return ax(n)}function Br(e){var t=e.domain;return e.ticks=function(r){var n=t();return Bh(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return dS(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,s=n[a],l=n[i],c,u,d=10;for(l<s&&(u=s,s=l,l=u,u=a,a=i,i=u);d-- >0;){if(u=Fh(s,l,r),u===c)return n[a]=s,n[i]=l,t(n);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function rs(){var e=rx();return e.copy=function(){return to(e,rs())},$t.apply(e,arguments),Br(e)}function fS(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Jo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return fS(e).unknown(t)},e=arguments.length?Array.from(e,Jo):[0,1],Br(r)}function hS(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],s;return i<a&&(s=r,r=n,n=s,s=a,a=i,i=s),e[r]=t.floor(a),e[n]=t.ceil(i),e}function C0(e){return Math.log(e)}function S0(e){return Math.exp(e)}function tI(e){return-Math.log(-e)}function rI(e){return-Math.exp(-e)}function nI(e){return isFinite(e)?+("1e"+e):e<0?0:e}function aI(e){return e===10?nI:e===Math.E?Math.exp:t=>Math.pow(e,t)}function iI(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function O0(e){return(t,r)=>-e(-t,r)}function ix(e){const t=e(C0,S0),r=t.domain;let n=10,a,i;function s(){return a=iI(n),i=aI(n),r()[0]<0?(a=O0(a),i=O0(i),e(tI,rI)):e(C0,S0),t}return t.base=function(l){return arguments.length?(n=+l,s()):n},t.domain=function(l){return arguments.length?(r(l),s()):r()},t.ticks=l=>{const c=r();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let h=a(u),p=a(d),g,x;const m=l==null?10:+l;let v=[];if(!(n%1)&&p-h<m){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(g=1;g<n;++g)if(x=h<0?g/i(-h):g*i(h),!(x<u)){if(x>d)break;v.push(x)}}else for(;h<=p;++h)for(g=n-1;g>=1;--g)if(x=h>0?g/i(-h):g*i(h),!(x<u)){if(x>d)break;v.push(x)}v.length*2<m&&(v=Bh(u,d,m))}else v=Bh(h,p,Math.min(p-h,m)).map(i);return f?v.reverse():v},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=wi(c)).precision==null&&(c.trim=!0),c=ax(c)),l===1/0)return c;const u=Math.max(1,n*l/t.ticks().length);return d=>{let f=d/i(Math.round(a(d)));return f*n<n-.5&&(f*=n),f<=u?c(d):""}},t.nice=()=>r(hS(r(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function pS(){const e=ix(_l()).domain([1,10]);return e.copy=()=>to(e,pS()).base(e.base()),$t.apply(e,arguments),e}function N0(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function P0(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ox(e){var t=1,r=e(N0(t),P0(t));return r.constant=function(n){return arguments.length?e(N0(t=+n),P0(t)):t},Br(r)}function mS(){var e=ox(_l());return e.copy=function(){return to(e,mS()).constant(e.constant())},$t.apply(e,arguments)}function A0(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oI(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function sI(e){return e<0?-e*e:e*e}function sx(e){var t=e(ut,ut),r=1;function n(){return r===1?e(ut,ut):r===.5?e(oI,sI):e(A0(r),A0(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Br(t)}function lx(){var e=sx(_l());return e.copy=function(){return to(e,lx()).exponent(e.exponent())},$t.apply(e,arguments),e}function lI(){return lx.apply(null,arguments).exponent(.5)}function _0(e){return Math.sign(e)*e*e}function cI(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function xS(){var e=rx(),t=[0,1],r=!1,n;function a(i){var s=cI(e(i));return isNaN(s)?n:r?Math.round(s):s}return a.invert=function(i){return e.invert(_0(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Jo)).map(_0)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return xS(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},$t.apply(a,arguments),Br(a)}function gS(){var e=[],t=[],r=[],n;function a(){var s=0,l=Math.max(1,t.length);for(r=new Array(l-1);++s<l;)r[s-1]=pE(e,s/l);return i}function i(s){return s==null||isNaN(s=+s)?n:t[Ji(r,s)]}return i.invertExtent=function(s){var l=t.indexOf(s);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let l of s)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Mr),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return gS().domain(e).range(t).unknown(n)},$t.apply(i,arguments)}function vS(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function s(c){return c!=null&&c<=c?a[Ji(n,c,0,r)]:i}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},s.range=function(c){return arguments.length?(r=(a=Array.from(c)).length-1,l()):a.slice()},s.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return vS().domain([e,t]).range(a).unknown(i)},$t.apply(Br(s),arguments)}function yS(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Ji(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return yS().domain(e).range(t).unknown(r)},$t.apply(a,arguments)}const ff=new Date,hf=new Date;function Ze(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),l=a.ceil(i);return i-s<l-i?s:l},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<s)||!(l>0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(u<i&&i<s);return c},a.filter=i=>Ze(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!i(s););else for(;--l>=0;)for(;t(s,1),!i(s););}),r&&(a.count=(i,s)=>(ff.setTime(+i),hf.setTime(+s),e(ff),e(hf),Math.floor(r(ff,hf))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const ns=Ze(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ns.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ze(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ns);ns.range;const cr=1e3,Tt=cr*60,ur=Tt*60,gr=ur*24,cx=gr*7,k0=gr*30,pf=gr*365,rn=Ze(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*cr)},(e,t)=>(t-e)/cr,e=>e.getUTCSeconds());rn.range;const ux=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*cr)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getMinutes());ux.range;const dx=Ze(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getUTCMinutes());dx.range;const fx=Ze(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*cr-e.getMinutes()*Tt)},(e,t)=>{e.setTime(+e+t*ur)},(e,t)=>(t-e)/ur,e=>e.getHours());fx.range;const hx=Ze(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ur)},(e,t)=>(t-e)/ur,e=>e.getUTCHours());hx.range;const ro=Ze(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/gr,e=>e.getDate()-1);ro.range;const kl=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gr,e=>e.getUTCDate()-1);kl.range;const bS=Ze(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/gr,e=>Math.floor(e/gr));bS.range;function wn(e){return Ze(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Tt)/cx)}const Tl=wn(0),as=wn(1),uI=wn(2),dI=wn(3),ea=wn(4),fI=wn(5),hI=wn(6);Tl.range;as.range;uI.range;dI.range;ea.range;fI.range;hI.range;function jn(e){return Ze(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/cx)}const El=jn(0),is=jn(1),pI=jn(2),mI=jn(3),ta=jn(4),xI=jn(5),gI=jn(6);El.range;is.range;pI.range;mI.range;ta.range;xI.range;gI.range;const px=Ze(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());px.range;const mx=Ze(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());mx.range;const vr=Ze(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());vr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ze(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});vr.range;const yr=Ze(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());yr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ze(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});yr.range;function wS(e,t,r,n,a,i){const s=[[rn,1,cr],[rn,5,5*cr],[rn,15,15*cr],[rn,30,30*cr],[i,1,Tt],[i,5,5*Tt],[i,15,15*Tt],[i,30,30*Tt],[a,1,ur],[a,3,3*ur],[a,6,6*ur],[a,12,12*ur],[n,1,gr],[n,2,2*gr],[r,1,cx],[t,1,k0],[t,3,3*k0],[e,1,pf]];function l(u,d,f){const h=d<u;h&&([u,d]=[d,u]);const p=f&&typeof f.range=="function"?f:c(u,d,f),g=p?p.range(u,+d+1):[];return h?g.reverse():g}function c(u,d,f){const h=Math.abs(d-u)/f,p=Xm(([,,m])=>m).right(s,h);if(p===s.length)return e.every(qh(u/pf,d/pf,f));if(p===0)return ns.every(Math.max(qh(u,d,f),1));const[g,x]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return g.every(x)}return[l,c]}const[vI,yI]=wS(yr,mx,El,bS,hx,dx),[bI,wI]=wS(vr,px,Tl,ro,fx,ux);function mf(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function xf(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Wa(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function jI(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,s=e.shortDays,l=e.months,c=e.shortMonths,u=Ha(a),d=Va(a),f=Ha(i),h=Va(i),p=Ha(s),g=Va(s),x=Ha(l),m=Va(l),v=Ha(c),b=Va(c),w={a:L,A:q,b:U,B:D,c:null,d:R0,e:R0,f:VI,g:tM,G:nM,H:qI,I:WI,j:HI,L:jS,m:UI,M:KI,p:B,q:W,Q:z0,s:B0,S:GI,u:ZI,U:YI,V:XI,w:QI,W:JI,x:null,X:null,y:eM,Y:rM,Z:aM,"%":D0},C={a:G,A:Q,b:ne,B:X,c:null,d:L0,e:L0,f:lM,g:vM,G:bM,H:iM,I:oM,j:sM,L:SS,m:cM,M:uM,p:re,q:ce,Q:z0,s:B0,S:dM,u:fM,U:hM,V:pM,w:mM,W:xM,x:null,X:null,y:gM,Y:yM,Z:wM,"%":D0},y={a:I,A:k,b:E,B:T,c:M,d:M0,e:M0,f:DI,g:I0,G:E0,H:$0,I:$0,j:MI,L:LI,m:II,M:$I,p:_,q:EI,Q:BI,s:FI,S:RI,u:PI,U:AI,V:_I,w:NI,W:kI,x:R,X:$,y:I0,Y:E0,Z:TI,"%":zI};w.x=j(r,w),w.X=j(n,w),w.c=j(t,w),C.x=j(r,C),C.X=j(n,C),C.c=j(t,C);function j(K,J){return function(ee){var z=[],pe=-1,Y=0,Ne=K.length,$e,tt,Pr;for(ee instanceof Date||(ee=new Date(+ee));++pe<Ne;)K.charCodeAt(pe)===37&&(z.push(K.slice(Y,pe)),(tt=T0[$e=K.charAt(++pe)])!=null?$e=K.charAt(++pe):tt=$e==="e"?" ":"0",(Pr=J[$e])&&($e=Pr(ee,tt)),z.push($e),Y=pe+1);return z.push(K.slice(Y,pe)),z.join("")}}function S(K,J){return function(ee){var z=Wa(1900,void 0,1),pe=A(z,K,ee+="",0),Y,Ne;if(pe!=ee.length)return null;if("Q"in z)return new Date(z.Q);if("s"in z)return new Date(z.s*1e3+("L"in z?z.L:0));if(J&&!("Z"in z)&&(z.Z=0),"p"in z&&(z.H=z.H%12+z.p*12),z.m===void 0&&(z.m="q"in z?z.q:0),"V"in z){if(z.V<1||z.V>53)return null;"w"in z||(z.w=1),"Z"in z?(Y=xf(Wa(z.y,0,1)),Ne=Y.getUTCDay(),Y=Ne>4||Ne===0?is.ceil(Y):is(Y),Y=kl.offset(Y,(z.V-1)*7),z.y=Y.getUTCFullYear(),z.m=Y.getUTCMonth(),z.d=Y.getUTCDate()+(z.w+6)%7):(Y=mf(Wa(z.y,0,1)),Ne=Y.getDay(),Y=Ne>4||Ne===0?as.ceil(Y):as(Y),Y=ro.offset(Y,(z.V-1)*7),z.y=Y.getFullYear(),z.m=Y.getMonth(),z.d=Y.getDate()+(z.w+6)%7)}else("W"in z||"U"in z)&&("w"in z||(z.w="u"in z?z.u%7:"W"in z?1:0),Ne="Z"in z?xf(Wa(z.y,0,1)).getUTCDay():mf(Wa(z.y,0,1)).getDay(),z.m=0,z.d="W"in z?(z.w+6)%7+z.W*7-(Ne+5)%7:z.w+z.U*7-(Ne+6)%7);return"Z"in z?(z.H+=z.Z/100|0,z.M+=z.Z%100,xf(z)):mf(z)}}function A(K,J,ee,z){for(var pe=0,Y=J.length,Ne=ee.length,$e,tt;pe<Y;){if(z>=Ne)return-1;if($e=J.charCodeAt(pe++),$e===37){if($e=J.charAt(pe++),tt=y[$e in T0?J.charAt(pe++):$e],!tt||(z=tt(K,ee,z))<0)return-1}else if($e!=ee.charCodeAt(z++))return-1}return z}function _(K,J,ee){var z=u.exec(J.slice(ee));return z?(K.p=d.get(z[0].toLowerCase()),ee+z[0].length):-1}function I(K,J,ee){var z=p.exec(J.slice(ee));return z?(K.w=g.get(z[0].toLowerCase()),ee+z[0].length):-1}function k(K,J,ee){var z=f.exec(J.slice(ee));return z?(K.w=h.get(z[0].toLowerCase()),ee+z[0].length):-1}function E(K,J,ee){var z=v.exec(J.slice(ee));return z?(K.m=b.get(z[0].toLowerCase()),ee+z[0].length):-1}function T(K,J,ee){var z=x.exec(J.slice(ee));return z?(K.m=m.get(z[0].toLowerCase()),ee+z[0].length):-1}function M(K,J,ee){return A(K,t,J,ee)}function R(K,J,ee){return A(K,r,J,ee)}function $(K,J,ee){return A(K,n,J,ee)}function L(K){return s[K.getDay()]}function q(K){return i[K.getDay()]}function U(K){return c[K.getMonth()]}function D(K){return l[K.getMonth()]}function B(K){return a[+(K.getHours()>=12)]}function W(K){return 1+~~(K.getMonth()/3)}function G(K){return s[K.getUTCDay()]}function Q(K){return i[K.getUTCDay()]}function ne(K){return c[K.getUTCMonth()]}function X(K){return l[K.getUTCMonth()]}function re(K){return a[+(K.getUTCHours()>=12)]}function ce(K){return 1+~~(K.getUTCMonth()/3)}return{format:function(K){var J=j(K+="",w);return J.toString=function(){return K},J},parse:function(K){var J=S(K+="",!1);return J.toString=function(){return K},J},utcFormat:function(K){var J=j(K+="",C);return J.toString=function(){return K},J},utcParse:function(K){var J=S(K+="",!0);return J.toString=function(){return K},J}}}var T0={"-":"",_:" ",0:"0"},et=/^\s*\d+/,CI=/^%/,SI=/[\\^$*+?|[\]().{}]/g;function ve(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function OI(e){return e.replace(SI,"\\$&")}function Ha(e){return new RegExp("^(?:"+e.map(OI).join("|")+")","i")}function Va(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function NI(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function PI(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function AI(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function _I(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function kI(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function E0(e,t,r){var n=et.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function I0(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function TI(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function EI(e,t,r){var n=et.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function II(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function M0(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function MI(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function $0(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function $I(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function RI(e,t,r){var n=et.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function LI(e,t,r){var n=et.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function DI(e,t,r){var n=et.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function zI(e,t,r){var n=CI.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function BI(e,t,r){var n=et.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function FI(e,t,r){var n=et.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function R0(e,t){return ve(e.getDate(),t,2)}function qI(e,t){return ve(e.getHours(),t,2)}function WI(e,t){return ve(e.getHours()%12||12,t,2)}function HI(e,t){return ve(1+ro.count(vr(e),e),t,3)}function jS(e,t){return ve(e.getMilliseconds(),t,3)}function VI(e,t){return jS(e,t)+"000"}function UI(e,t){return ve(e.getMonth()+1,t,2)}function KI(e,t){return ve(e.getMinutes(),t,2)}function GI(e,t){return ve(e.getSeconds(),t,2)}function ZI(e){var t=e.getDay();return t===0?7:t}function YI(e,t){return ve(Tl.count(vr(e)-1,e),t,2)}function CS(e){var t=e.getDay();return t>=4||t===0?ea(e):ea.ceil(e)}function XI(e,t){return e=CS(e),ve(ea.count(vr(e),e)+(vr(e).getDay()===4),t,2)}function QI(e){return e.getDay()}function JI(e,t){return ve(as.count(vr(e)-1,e),t,2)}function eM(e,t){return ve(e.getFullYear()%100,t,2)}function tM(e,t){return e=CS(e),ve(e.getFullYear()%100,t,2)}function rM(e,t){return ve(e.getFullYear()%1e4,t,4)}function nM(e,t){var r=e.getDay();return e=r>=4||r===0?ea(e):ea.ceil(e),ve(e.getFullYear()%1e4,t,4)}function aM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ve(t/60|0,"0",2)+ve(t%60,"0",2)}function L0(e,t){return ve(e.getUTCDate(),t,2)}function iM(e,t){return ve(e.getUTCHours(),t,2)}function oM(e,t){return ve(e.getUTCHours()%12||12,t,2)}function sM(e,t){return ve(1+kl.count(yr(e),e),t,3)}function SS(e,t){return ve(e.getUTCMilliseconds(),t,3)}function lM(e,t){return SS(e,t)+"000"}function cM(e,t){return ve(e.getUTCMonth()+1,t,2)}function uM(e,t){return ve(e.getUTCMinutes(),t,2)}function dM(e,t){return ve(e.getUTCSeconds(),t,2)}function fM(e){var t=e.getUTCDay();return t===0?7:t}function hM(e,t){return ve(El.count(yr(e)-1,e),t,2)}function OS(e){var t=e.getUTCDay();return t>=4||t===0?ta(e):ta.ceil(e)}function pM(e,t){return e=OS(e),ve(ta.count(yr(e),e)+(yr(e).getUTCDay()===4),t,2)}function mM(e){return e.getUTCDay()}function xM(e,t){return ve(is.count(yr(e)-1,e),t,2)}function gM(e,t){return ve(e.getUTCFullYear()%100,t,2)}function vM(e,t){return e=OS(e),ve(e.getUTCFullYear()%100,t,2)}function yM(e,t){return ve(e.getUTCFullYear()%1e4,t,4)}function bM(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ta(e):ta.ceil(e),ve(e.getUTCFullYear()%1e4,t,4)}function wM(){return"+0000"}function D0(){return"%"}function z0(e){return+e}function B0(e){return Math.floor(+e/1e3)}var Tn,NS,PS;jM({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function jM(e){return Tn=jI(e),NS=Tn.format,Tn.parse,PS=Tn.utcFormat,Tn.utcParse,Tn}function CM(e){return new Date(e)}function SM(e){return e instanceof Date?+e:+new Date(+e)}function xx(e,t,r,n,a,i,s,l,c,u){var d=rx(),f=d.invert,h=d.domain,p=u(".%L"),g=u(":%S"),x=u("%I:%M"),m=u("%I %p"),v=u("%a %d"),b=u("%b %d"),w=u("%B"),C=u("%Y");function y(j){return(c(j)<j?p:l(j)<j?g:s(j)<j?x:i(j)<j?m:n(j)<j?a(j)<j?v:b:r(j)<j?w:C)(j)}return d.invert=function(j){return new Date(f(j))},d.domain=function(j){return arguments.length?h(Array.from(j,SM)):h().map(CM)},d.ticks=function(j){var S=h();return e(S[0],S[S.length-1],j??10)},d.tickFormat=function(j,S){return S==null?y:u(S)},d.nice=function(j){var S=h();return(!j||typeof j.range!="function")&&(j=t(S[0],S[S.length-1],j??10)),j?h(hS(S,j)):d},d.copy=function(){return to(d,xx(e,t,r,n,a,i,s,l,c,u))},d}function OM(){return $t.apply(xx(bI,wI,vr,px,Tl,ro,fx,ux,rn,NS).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function NM(){return $t.apply(xx(vI,yI,yr,mx,El,kl,hx,dx,rn,PS).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Il(){var e=0,t=1,r,n,a,i,s=ut,l=!1,c;function u(f){return f==null||isNaN(f=+f)?c:s(a===0?.5:(f=(i(f)-r)*a,l?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(l=!!f,u):l},u.interpolator=function(f){return arguments.length?(s=f,u):s};function d(f){return function(h){var p,g;return arguments.length?([p,g]=h,s=f(p,g),u):[s(0),s(1)]}}return u.range=d(_a),u.rangeRound=d(tx),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function Fr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function AS(){var e=Br(Il()(ut));return e.copy=function(){return Fr(e,AS())},Or.apply(e,arguments)}function _S(){var e=ix(Il()).domain([1,10]);return e.copy=function(){return Fr(e,_S()).base(e.base())},Or.apply(e,arguments)}function kS(){var e=ox(Il());return e.copy=function(){return Fr(e,kS()).constant(e.constant())},Or.apply(e,arguments)}function gx(){var e=sx(Il());return e.copy=function(){return Fr(e,gx()).exponent(e.exponent())},Or.apply(e,arguments)}function PM(){return gx.apply(null,arguments).exponent(.5)}function TS(){var e=[],t=ut;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ji(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Mr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>hE(e,i/n))},r.copy=function(){return TS(t).domain(e)},Or.apply(r,arguments)}function Ml(){var e=0,t=.5,r=1,n=1,a,i,s,l,c,u=ut,d,f=!1,h;function p(x){return isNaN(x=+x)?h:(x=.5+((x=+d(x))-i)*(n*x<n*i?l:c),u(f?Math.max(0,Math.min(1,x)):x))}p.domain=function(x){return arguments.length?([e,t,r]=x,a=d(e=+e),i=d(t=+t),s=d(r=+r),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),n=i<a?-1:1,p):[e,t,r]},p.clamp=function(x){return arguments.length?(f=!!x,p):f},p.interpolator=function(x){return arguments.length?(u=x,p):u};function g(x){return function(m){var v,b,w;return arguments.length?([v,b,w]=m,u=zE(x,[v,b,w]),p):[u(0),u(.5),u(1)]}}return p.range=g(_a),p.rangeRound=g(tx),p.unknown=function(x){return arguments.length?(h=x,p):h},function(x){return d=x,a=x(e),i=x(t),s=x(r),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),n=i<a?-1:1,p}}function ES(){var e=Br(Ml()(ut));return e.copy=function(){return Fr(e,ES())},Or.apply(e,arguments)}function IS(){var e=ix(Ml()).domain([.1,1,10]);return e.copy=function(){return Fr(e,IS()).base(e.base())},Or.apply(e,arguments)}function MS(){var e=ox(Ml());return e.copy=function(){return Fr(e,MS()).constant(e.constant())},Or.apply(e,arguments)}function vx(){var e=sx(Ml());return e.copy=function(){return Fr(e,vx()).exponent(e.exponent())},Or.apply(e,arguments)}function AM(){return vx.apply(null,arguments).exponent(.5)}const F0=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:gi,scaleDiverging:ES,scaleDivergingLog:IS,scaleDivergingPow:vx,scaleDivergingSqrt:AM,scaleDivergingSymlog:MS,scaleIdentity:fS,scaleImplicit:Wh,scaleLinear:rs,scaleLog:pS,scaleOrdinal:Qm,scalePoint:ti,scalePow:lx,scaleQuantile:gS,scaleQuantize:vS,scaleRadial:xS,scaleSequential:AS,scaleSequentialLog:_S,scaleSequentialPow:gx,scaleSequentialQuantile:TS,scaleSequentialSqrt:PM,scaleSequentialSymlog:kS,scaleSqrt:lI,scaleSymlog:mS,scaleThreshold:yS,scaleTime:OM,scaleUtc:NM,tickFormat:dS},Symbol.toStringTag,{value:"Module"}));var gf,q0;function $l(){if(q0)return gf;q0=1;var e=Oa();function t(r,n,a){for(var i=-1,s=r.length;++i<s;){var l=r[i],c=n(l);if(c!=null&&(u===void 0?c===c&&!e(c):a(c,u)))var u=c,d=l}return d}return gf=t,gf}var vf,W0;function $S(){if(W0)return vf;W0=1;function e(t,r){return t>r}return vf=e,vf}var yf,H0;function _M(){if(H0)return yf;H0=1;var e=$l(),t=$S(),r=Aa();function n(a){return a&&a.length?e(a,r,t):void 0}return yf=n,yf}var kM=_M();const Er=Oe(kM);var bf,V0;function RS(){if(V0)return bf;V0=1;function e(t,r){return t<r}return bf=e,bf}var wf,U0;function TM(){if(U0)return wf;U0=1;var e=$l(),t=RS(),r=Aa();function n(a){return a&&a.length?e(a,r,t):void 0}return wf=n,wf}var EM=TM();const Rl=Oe(EM);var jf,K0;function IM(){if(K0)return jf;K0=1;var e=Mm(),t=nr(),r=VC(),n=vt();function a(i,s){var l=n(i)?e:r;return l(i,t(s,3))}return jf=a,jf}var Cf,G0;function MM(){if(G0)return Cf;G0=1;var e=WC(),t=IM();function r(n,a){return e(t(n,a),1)}return Cf=r,Cf}var $M=MM();const RM=Oe($M);var Sf,Z0;function LM(){if(Z0)return Sf;Z0=1;var e=Km();function t(r,n){return e(r,n)}return Sf=t,Sf}var DM=LM();const br=Oe(DM);var ka=1e9,zM={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},bx,De=!0,Mt="[DecimalError] ",sn=Mt+"Invalid argument: ",yx=Mt+"Exponent out of range: ",Ta=Math.floor,Xr=Math.pow,BM=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ct,Xe=1e7,Me=7,LS=9007199254740991,os=Ta(LS/Me),se={};se.absoluteValue=se.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};se.comparedTo=se.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};se.decimalPlaces=se.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Me;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};se.dividedBy=se.div=function(e){return hr(this,new this.constructor(e))};se.dividedToIntegerBy=se.idiv=function(e){var t=this,r=t.constructor;return Ae(hr(t,new r(e),0,1),r.precision)};se.equals=se.eq=function(e){return!this.cmp(e)};se.exponent=function(){return He(this)};se.greaterThan=se.gt=function(e){return this.cmp(e)>0};se.greaterThanOrEqualTo=se.gte=function(e){return this.cmp(e)>=0};se.isInteger=se.isint=function(){return this.e>this.d.length-2};se.isNegative=se.isneg=function(){return this.s<0};se.isPositive=se.ispos=function(){return this.s>0};se.isZero=function(){return this.s===0};se.lessThan=se.lt=function(e){return this.cmp(e)<0};se.lessThanOrEqualTo=se.lte=function(e){return this.cmp(e)<1};se.logarithm=se.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Ct))throw Error(Mt+"NaN");if(r.s<1)throw Error(Mt+(r.s?"NaN":"-Infinity"));return r.eq(Ct)?new n(0):(De=!1,t=hr(ji(r,i),ji(e,i),i),De=!0,Ae(t,a))};se.minus=se.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?BS(t,e):DS(t,(e.s=-e.s,e))};se.modulo=se.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Mt+"NaN");return r.s?(De=!1,t=hr(r,e,0,1).times(e),De=!0,r.minus(t)):Ae(new n(r),a)};se.naturalExponential=se.exp=function(){return zS(this)};se.naturalLogarithm=se.ln=function(){return ji(this)};se.negated=se.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};se.plus=se.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?DS(t,e):BS(t,(e.s=-e.s,e))};se.precision=se.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(sn+e);if(t=He(a)+1,n=a.d.length-1,r=n*Me+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};se.squareRoot=se.sqrt=function(){var e,t,r,n,a,i,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Mt+"NaN")}for(e=He(l),De=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=Kt(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Ta((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(a.toString()),r=c.precision,a=s=r+3;;)if(i=n,n=i.plus(hr(l,i,s+2)).times(.5),Kt(i.d).slice(0,s)===(t=Kt(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ae(i,r+1,0),i.times(i).eq(l)){n=i;break}}else if(t!="9999")break;s+=4}return De=!0,Ae(n,r)};se.times=se.mul=function(e){var t,r,n,a,i,s,l,c,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,c=h.length,u=p.length,c<u&&(i=h,h=p,p=i,s=c,c=u,u=s),i=[],s=c+u,n=s;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=c+n;a>n;)l=i[a]+p[n]*h[a-n-1]+t,i[a--]=l%Xe|0,t=l/Xe|0;i[a]=(i[a]+t)%Xe|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,De?Ae(e,f.precision):e};se.toDecimalPlaces=se.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Jt(e,0,ka),t===void 0?t=n.rounding:Jt(t,0,8),Ae(r,e+He(r)+1,t))};se.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=fn(n,!0):(Jt(e,0,ka),t===void 0?t=a.rounding:Jt(t,0,8),n=Ae(new a(n),e+1,t),r=fn(n,!0,e+1)),r};se.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?fn(a):(Jt(e,0,ka),t===void 0?t=i.rounding:Jt(t,0,8),n=Ae(new i(a),e+He(a)+1,t),r=fn(n.abs(),!1,e+He(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};se.toInteger=se.toint=function(){var e=this,t=e.constructor;return Ae(new t(e),He(e)+1,t.rounding)};se.toNumber=function(){return+this};se.toPower=se.pow=function(e){var t,r,n,a,i,s,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Ct);if(l=new c(l),!l.s){if(e.s<1)throw Error(Mt+"Infinity");return l}if(l.eq(Ct))return l;if(n=c.precision,e.eq(Ct))return Ae(l,n);if(t=e.e,r=e.d.length-1,s=t>=r,i=l.s,s){if((r=d<0?-d:d)<=LS){for(a=new c(Ct),t=Math.ceil(n/Me+4),De=!1;r%2&&(a=a.times(l),X0(a.d,t)),r=Ta(r/2),r!==0;)l=l.times(l),X0(l.d,t);return De=!0,e.s<0?new c(Ct).div(a):Ae(a,n)}}else if(i<0)throw Error(Mt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,De=!1,a=e.times(ji(l,n+u)),De=!0,a=zS(a),a.s=i,a};se.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=He(a),n=fn(a,r<=i.toExpNeg||r>=i.toExpPos)):(Jt(e,1,ka),t===void 0?t=i.rounding:Jt(t,0,8),a=Ae(new i(a),e,t),r=He(a),n=fn(a,e<=r||r<=i.toExpNeg,e)),n};se.toSignificantDigits=se.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Jt(e,1,ka),t===void 0?t=n.rounding:Jt(t,0,8)),Ae(new n(r),e,t)};se.toString=se.valueOf=se.val=se.toJSON=se[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=He(e),r=e.constructor;return fn(e,t<=r.toExpNeg||t>=r.toExpPos)};function DS(e,t){var r,n,a,i,s,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),De?Ae(t,f):t;if(c=e.d,u=t.d,s=e.e,a=t.e,c=c.slice(),i=s-a,i){for(i<0?(n=c,i=-i,l=u.length):(n=u,a=s,l=c.length),s=Math.ceil(f/Me),l=s>l?s+1:l+1,i>l&&(i=l,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,n=u,u=c,c=n),r=0;i;)r=(c[--i]=c[i]+u[i]+r)/Xe|0,c[i]%=Xe;for(r&&(c.unshift(r),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,De?Ae(t,f):t}function Jt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(sn+e)}function Kt(e){var t,r,n,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)n=e[t]+"",r=Me-n.length,r&&(i+=_r(r)),i+=n;s=e[t],n=s+"",r=Me-n.length,r&&(i+=_r(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var hr=(function(){function e(n,a){var i,s=0,l=n.length;for(n=n.slice();l--;)i=n[l]*a+s,n[l]=i%Xe|0,s=i/Xe|0;return s&&n.unshift(s),n}function t(n,a,i,s){var l,c;if(i!=s)c=i>s?1:-1;else for(l=c=0;l<i;l++)if(n[l]!=a[l]){c=n[l]>a[l]?1:-1;break}return c}function r(n,a,i){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*Xe+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,s){var l,c,u,d,f,h,p,g,x,m,v,b,w,C,y,j,S,A,_=n.constructor,I=n.s==a.s?1:-1,k=n.d,E=a.d;if(!n.s)return new _(n);if(!a.s)throw Error(Mt+"Division by zero");for(c=n.e-a.e,S=E.length,y=k.length,p=new _(I),g=p.d=[],u=0;E[u]==(k[u]||0);)++u;if(E[u]>(k[u]||0)&&--c,i==null?b=i=_.precision:s?b=i+(He(n)-He(a))+1:b=i,b<0)return new _(0);if(b=b/Me+2|0,u=0,S==1)for(d=0,E=E[0],b++;(u<y||d)&&b--;u++)w=d*Xe+(k[u]||0),g[u]=w/E|0,d=w%E|0;else{for(d=Xe/(E[0]+1)|0,d>1&&(E=e(E,d),k=e(k,d),S=E.length,y=k.length),C=S,x=k.slice(0,S),m=x.length;m<S;)x[m++]=0;A=E.slice(),A.unshift(0),j=E[0],E[1]>=Xe/2&&++j;do d=0,l=t(E,x,S,m),l<0?(v=x[0],S!=m&&(v=v*Xe+(x[1]||0)),d=v/j|0,d>1?(d>=Xe&&(d=Xe-1),f=e(E,d),h=f.length,m=x.length,l=t(f,x,h,m),l==1&&(d--,r(f,S<h?A:E,h))):(d==0&&(l=d=1),f=E.slice()),h=f.length,h<m&&f.unshift(0),r(x,f,m),l==-1&&(m=x.length,l=t(E,x,S,m),l<1&&(d++,r(x,S<m?A:E,m))),m=x.length):l===0&&(d++,x=[0]),g[u++]=d,l&&x[0]?x[m++]=k[C]||0:(x=[k[C]],m=1);while((C++<y||x[0]!==void 0)&&b--)}return g[0]||g.shift(),p.e=c,Ae(p,s?i+He(p)+1:i)}})();function zS(e,t){var r,n,a,i,s,l,c=0,u=0,d=e.constructor,f=d.precision;if(He(e)>16)throw Error(yx+He(e));if(!e.s)return new d(Ct);for(De=!1,l=f,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(n=Math.log(Xr(2,u))/Math.LN10*2+5|0,l+=n,r=a=i=new d(Ct),d.precision=l;;){if(a=Ae(a.times(e),l),r=r.times(++c),s=i.plus(hr(a,r,l)),Kt(s.d).slice(0,l)===Kt(i.d).slice(0,l)){for(;u--;)i=Ae(i.times(i),l);return d.precision=f,t==null?(De=!0,Ae(i,f)):i}i=s}}function He(e){for(var t=e.e*Me,r=e.d[0];r>=10;r/=10)t++;return t}function Of(e,t,r){if(t>e.LN10.sd())throw De=!0,r&&(e.precision=r),Error(Mt+"LN10 precision limit exceeded");return Ae(new e(e.LN10),t)}function _r(e){for(var t="";e--;)t+="0";return t}function ji(e,t){var r,n,a,i,s,l,c,u,d,f=1,h=10,p=e,g=p.d,x=p.constructor,m=x.precision;if(p.s<1)throw Error(Mt+(p.s?"NaN":"-Infinity"));if(p.eq(Ct))return new x(0);if(t==null?(De=!1,u=m):u=t,p.eq(10))return t==null&&(De=!0),Of(x,u);if(u+=h,x.precision=u,r=Kt(g),n=r.charAt(0),i=He(p),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Kt(p.d),n=r.charAt(0),f++;i=He(p),n>1?(p=new x("0."+r),i++):p=new x(n+"."+r.slice(1))}else return c=Of(x,u+2,m).times(i+""),p=ji(new x(n+"."+r.slice(1)),u-h).plus(c),x.precision=m,t==null?(De=!0,Ae(p,m)):p;for(l=s=p=hr(p.minus(Ct),p.plus(Ct),u),d=Ae(p.times(p),u),a=3;;){if(s=Ae(s.times(d),u),c=l.plus(hr(s,new x(a),u)),Kt(c.d).slice(0,u)===Kt(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(Of(x,u+2,m).times(i+""))),l=hr(l,new x(f),u),x.precision=m,t==null?(De=!0,Ae(l,m)):l;l=c,a+=2}}function Y0(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Ta(r/Me),e.d=[],n=(r+1)%Me,r<0&&(n+=Me),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Me;n<a;)e.d.push(+t.slice(n,n+=Me));t=t.slice(n),n=Me-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),De&&(e.e>os||e.e<-os))throw Error(yx+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ae(e,t,r){var n,a,i,s,l,c,u,d,f=e.d;for(s=1,i=f[0];i>=10;i/=10)s++;if(n=t-s,n<0)n+=Me,a=t,u=f[d=0];else{if(d=Math.ceil((n+1)/Me),i=f.length,d>=i)return e;for(u=i=f[d],s=1;i>=10;i/=10)s++;n%=Me,a=n-Me+s}if(r!==void 0&&(i=Xr(10,s-a-1),l=u/i%10|0,c=t<0||f[d+1]!==void 0||u%i,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?a>0?u/Xr(10,s-a):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(i=He(e),f.length=1,t=t-i-1,f[0]=Xr(10,(Me-t%Me)%Me),e.e=Ta(-t/Me)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,i=1,d--):(f.length=d+1,i=Xr(10,Me-n),f[d]=a>0?(u/Xr(10,s-a)%Xr(10,a)|0)*i:0),c)for(;;)if(d==0){(f[0]+=i)==Xe&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=Xe)break;f[d--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(De&&(e.e>os||e.e<-os))throw Error(yx+He(e));return e}function BS(e,t){var r,n,a,i,s,l,c,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),De?Ae(t,p):t;if(c=e.d,f=t.d,n=t.e,u=e.e,c=c.slice(),s=u-n,s){for(d=s<0,d?(r=c,s=-s,l=f.length):(r=f,n=u,l=c.length),a=Math.max(Math.ceil(p/Me),l)+2,s>a&&(s=a,r.length=1),r.reverse(),a=s;a--;)r.push(0);r.reverse()}else{for(a=c.length,l=f.length,d=a<l,d&&(l=a),a=0;a<l;a++)if(c[a]!=f[a]){d=c[a]<f[a];break}s=0}for(d&&(r=c,c=f,f=r,t.s=-t.s),l=c.length,a=f.length-l;a>0;--a)c[l++]=0;for(a=f.length;a>s;){if(c[--a]<f[a]){for(i=a;i&&c[--i]===0;)c[i]=Xe-1;--c[i],c[a]+=Xe}c[a]-=f[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,De?Ae(t,p):t):new h(0)}function fn(e,t,r){var n,a=He(e),i=Kt(e.d),s=i.length;return t?(r&&(n=r-s)>0?i=i.charAt(0)+"."+i.slice(1)+_r(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+_r(-a-1)+i,r&&(n=r-s)>0&&(i+=_r(n))):a>=s?(i+=_r(a+1-s),r&&(n=r-a-1)>0&&(i=i+"."+_r(n))):((n=a+1)<s&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-s)>0&&(a+1===s&&(i+="."),i+=_r(n))),e.s<0?"-"+i:i}function X0(e,t){if(e.length>t)return e.length=t,!0}function FS(e){var t,r,n;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(sn+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return Y0(s,i.toString())}else if(typeof i!="string")throw Error(sn+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,BM.test(i))Y0(s,i);else throw Error(sn+i)}if(a.prototype=se,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=FS,a.config=a.set=FM,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function FM(e){if(!e||typeof e!="object")throw Error(Mt+"Object expected");var t,r,n,a=["precision",1,ka,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Ta(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(sn+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(sn+r+": "+n);return this}var bx=FS(zM);Ct=new bx(1);const Pe=bx;function qM(e){return UM(e)||VM(e)||HM(e)||WM()}function WM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
37
33
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HM(e,t){if(e){if(typeof e=="string")return Kh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kh(e,t)}}function VM(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function UM(e){if(Array.isArray(e))return Kh(e)}function Kh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var KM=function(t){return t},qS={},WS=function(t){return t===qS},Q0=function(t){return function r(){return arguments.length===0||arguments.length===1&&WS(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},GM=function e(t,r){return t===1?r:Q0(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var s=a.filter(function(l){return l!==qS}).length;return s>=t?r.apply(void 0,a):e(t-s,Q0(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=a.map(function(f){return WS(f)?c.shift():f});return r.apply(void 0,qM(d).concat(c))}))})},Ll=function(t){return GM(t.length,t)},Gh=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},ZM=Ll(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),YM=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return KM;var a=r.reverse(),i=a[0],s=a.slice(1);return function(){return s.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},Zh=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},HS=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return r&&i.every(function(l,c){return l===r[c]})||(r=i,n=t.apply(void 0,i)),n}};function XM(e){var t;return e===0?t=1:t=Math.floor(new Pe(e).abs().log(10).toNumber())+1,t}function QM(e,t,r){for(var n=new Pe(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var JM=Ll(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),e7=Ll(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),t7=Ll(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const Dl={rangeStep:QM,getDigitCount:XM,interpolateNumber:JM,uninterpolateNumber:e7,uninterpolateTruncation:t7};function Yh(e){return a7(e)||n7(e)||VS(e)||r7()}function r7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
38
34
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n7(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function a7(e){if(Array.isArray(e))return Xh(e)}function Ci(e,t){return s7(e)||o7(e,t)||VS(e,t)||i7()}function i7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
39
35
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VS(e,t){if(e){if(typeof e=="string")return Xh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xh(e,t)}}function Xh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o7(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var s=e[Symbol.iterator](),l;!(n=(l=s.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(c){a=!0,i=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw i}}return r}}function s7(e){if(Array.isArray(e))return e}function US(e){var t=Ci(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function KS(e,t,r){if(e.lte(0))return new Pe(0);var n=Dl.getDigitCount(e.toNumber()),a=new Pe(10).pow(n),i=e.div(a),s=n!==1?.05:.1,l=new Pe(Math.ceil(i.div(s).toNumber())).add(r).mul(s),c=l.mul(a);return t?c:new Pe(Math.ceil(c))}function l7(e,t,r){var n=1,a=new Pe(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Pe(10).pow(Dl.getDigitCount(e)-1),a=new Pe(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Pe(Math.floor(e)))}else e===0?a=new Pe(Math.floor((t-1)/2)):r||(a=new Pe(Math.floor(e)));var s=Math.floor((t-1)/2),l=YM(ZM(function(c){return a.add(new Pe(c-s).mul(n)).toNumber()}),Gh);return l(0,t)}function GS(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Pe(0),tickMin:new Pe(0),tickMax:new Pe(0)};var i=KS(new Pe(t).sub(e).div(r-1),n,a),s;e<=0&&t>=0?s=new Pe(0):(s=new Pe(e).add(t).div(2),s=s.sub(new Pe(s).mod(i)));var l=Math.ceil(s.sub(e).div(i).toNumber()),c=Math.ceil(new Pe(t).sub(s).div(i).toNumber()),u=l+c+1;return u>r?GS(e,t,r,n,a+1):(u<r&&(c=t>0?c+(r-u):c,l=t>0?l:l+(r-u)),{step:i,tickMin:s.sub(new Pe(l).mul(i)),tickMax:s.add(new Pe(c).mul(i))})}function c7(e){var t=Ci(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(a,2),l=US([r,n]),c=Ci(l,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(Yh(Gh(0,a-1).map(function(){return 1/0}))):[].concat(Yh(Gh(0,a-1).map(function(){return-1/0})),[d]);return r>n?Zh(f):f}if(u===d)return l7(u,a,i);var h=GS(u,d,s,i),p=h.step,g=h.tickMin,x=h.tickMax,m=Dl.rangeStep(g,x.add(new Pe(.1).mul(p)),p);return r>n?Zh(m):m}function u7(e,t){var r=Ci(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=US([n,a]),l=Ci(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[n,a];if(c===u)return[c];var d=Math.max(t,2),f=KS(new Pe(u).sub(c).div(d-1),i,0),h=[].concat(Yh(Dl.rangeStep(new Pe(c),new Pe(u).sub(new Pe(.99).mul(f)),f)),[u]);return n>a?Zh(h):h}var d7=HS(c7),f7=HS(u7),h7=process.env.NODE_ENV==="production",Nf="Invariant failed";function xt(e,t){if(h7)throw new Error(Nf);var r=typeof t=="function"?t():t,n=r?"".concat(Nf,": ").concat(r):Nf;throw new Error(n)}var p7=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ra(e){"@babel/helpers - typeof";return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(e)}function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ss.apply(this,arguments)}function m7(e,t){return y7(e)||v7(e,t)||g7(e,t)||x7()}function x7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
40
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g7(e,t){if(e){if(typeof e=="string")return J0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J0(e,t)}}function J0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v7(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function y7(e){if(Array.isArray(e))return e}function b7(e,t){if(e==null)return{};var r=w7(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function j7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,XS(n.key),n)}}function S7(e,t,r){return t&&C7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function O7(e,t,r){return t=ls(t),N7(e,ZS()?Reflect.construct(t,r||[],ls(e).constructor):t.apply(e,r))}function N7(e,t){if(t&&(ra(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P7(e)}function P7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZS=function(){return!!e})()}function ls(e){return ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ls(e)}function A7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qh(e,t)}function Qh(e,t){return Qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Qh(e,t)}function YS(e,t,r){return t=XS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XS(e){var t=_7(e,"string");return ra(t)=="symbol"?t:t+""}function _7(e,t){if(ra(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ra(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var no=(function(e){function t(){return j7(this,t),O7(this,t,arguments)}return A7(t,e),S7(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,s=n.width,l=n.dataKey,c=n.data,u=n.dataPointFormatter,d=n.xAxis,f=n.yAxis,h=b7(n,p7),p=oe(h,!1);this.props.direction==="x"&&d.type!=="number"&&(process.env.NODE_ENV!=="production"?xt(!1,'ErrorBar requires Axis type property to be "number".'):xt());var g=c.map(function(x){var m=u(x,l),v=m.x,b=m.y,w=m.value,C=m.errorVal;if(!C)return null;var y=[],j,S;if(Array.isArray(C)){var A=m7(C,2);j=A[0],S=A[1]}else j=S=C;if(i==="vertical"){var _=d.scale,I=b+a,k=I+s,E=I-s,T=_(w-j),M=_(w+S);y.push({x1:M,y1:k,x2:M,y2:E}),y.push({x1:T,y1:I,x2:M,y2:I}),y.push({x1:T,y1:k,x2:T,y2:E})}else if(i==="horizontal"){var R=f.scale,$=v+a,L=$-s,q=$+s,U=R(w-j),
|
|
41
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M7(e,t){if(e){if(typeof e=="string")return Jh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jh(e,t)}}function $7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R7(e){if(Array.isArray(e))return Jh(e)}function Jh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ze(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r1(Object(r),!0).forEach(function(n){Fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fn(e,t,r){return t=L7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L7(e){var t=D7(e,"string");return Oi(t)=="symbol"?t:t+""}function D7(e,t){if(Oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Le(e,t,r){return de(e)||de(t)?r:Ke(t)?St(e,t,r):le(t)?t(e):r}function ri(e,t,r,n){var a=RM(e,function(l){return Le(l,t)});if(r==="number"){var i=a.filter(function(l){return Y(l)||parseFloat(l)});return i.length?[Rl(i),Er(i)]:[1/0,-1/0]}var s=n?a.filter(function(l){return!de(l)}):a;return s.map(function(l){return Ke(l)||l instanceof Date?l:""})}var z7=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,s=-1,l=(r=n?.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<l;u++){var d=u>0?a[u-1].coordinate:a[l-1].coordinate,f=a[u].coordinate,h=u>=l-1?a[0].coordinate:a[u+1].coordinate,p=void 0;if(Je(f-d)!==Je(h-f)){var g=[];if(Je(h-f)===Je(c[1]-c[0])){p=h;var x=f+c[1]-c[0];g[0]=Math.min(x,(x+d)/2),g[1]=Math.max(x,(x+d)/2)}else{p=d;var m=h+c[1]-c[0];g[0]=Math.min(f,(m+f)/2),g[1]=Math.max(f,(m+f)/2)}var v=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>v[0]&&t<=v[1]||t>=g[0]&&t<=g[1]){s=a[u].index;break}}else{var b=Math.min(d,h),w=Math.max(d,h);if(t>(b+f)/2&&t<=(w+f)/2){s=a[u].index;break}}}else for(var C=0;C<l;C++)if(C===0&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C>0&&C<l-1&&t>(n[C].coordinate+n[C-1].coordinate)/2&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C===l-1&&t>(n[C].coordinate+n[C-1].coordinate)/2){s=n[C].index;break}return s},wx=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?ze(ze({},t.type.defaultProps),t.props):t.props,s=i.stroke,l=i.fill,c;switch(a){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:l;break;default:c=l;break}return c},B7=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var s={},l=Object.keys(i),c=0,u=l.length;c<u;c++)for(var d=i[l[c]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var g=d[f[h]],x=g.items,m=g.cateAxisId,v=x.filter(function(S){return fr(S.type).indexOf("Bar")>=0});if(v&&v.length){var b=v[0].type.defaultProps,w=b!==void 0?ze(ze({},b),v[0].props):v[0].props,C=w.barSize,y=w[m];s[y]||(s[y]=[]);var j=de(C)?r:C;s[y].push({item:v[0],stackList:v.slice(1),barSize:de(j)?void 0:ct(j,n,0)})}}return s},F7=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,s=i===void 0?[]:i,l=t.maxBarSize,c=s.length;if(c<1)return null;var u=ct(r,a,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var h=!1,p=a/c,g=s.reduce(function(C,y){return C+y.barSize||0},0);g+=(c-1)*u,g>=a&&(g-=(c-1)*u,u=0),g>=a&&p>0&&(h=!0,p*=.9,g=c*p);var x=(a-g)/2>>0,m={offset:x-u,size:0};d=s.reduce(function(C,y){var j={item:y.item,position:{offset:m.offset+m.size+u,size:h?p:y.barSize}},S=[].concat(t1(C),[j]);return m=S[S.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){S.push({item:A,position:m})}),S},f)}else{var v=ct(n,a,0,!0);a-2*v-(c-1)*u<=0&&(u=0);var b=(a-2*v-(c-1)*u)/c;b>1&&(b>>=0);var w=l===+l?Math.min(b,l):b;d=s.reduce(function(C,y,j){var S=[].concat(t1(C),[{item:y.item,position:{offset:v+(b+u)*j+(b-w)/2,size:w}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){S.push({item:A,position:S[S.length-1].position})}),S},f)}return d},q7=function(t,r,n,a){var i=n.children,s=n.width,l=n.margin,c=s-(l.left||0)-(l.right||0),u=QS({children:i,legendWidth:c});if(u){var d=a||{},f=d.width,h=d.height,p=u.align,g=u.verticalAlign,x=u.layout;if((x==="vertical"||x==="horizontal"&&g==="middle")&&p!=="center"&&Y(t[p]))return ze(ze({},t),{},Fn({},p,t[p]+(f||0)));if((x==="horizontal"||x==="vertical"&&p==="center")&&g!=="middle"&&Y(t[g]))return ze(ze({},t),{},Fn({},g,t[g]+(h||0)))}return t},W7=function(t,r,n){return de(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},JS=function(t,r,n,a,i){var s=r.props.children,l=gt(s,no).filter(function(u){return W7(a,i,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=Le(d,n);if(de(f))return u;var h=Array.isArray(f)?[Rl(f),Er(f)]:[f,f],p=c.reduce(function(g,x){var m=Le(d,x,0),v=h[0]-Math.abs(Array.isArray(m)?m[0]:m),b=h[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(v,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},H7=function(t,r,n,a,i){var s=r.map(function(l){return JS(t,l,n,i,a)}).filter(function(l){return!de(l)});return s&&s.length?s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},e5=function(t,r,n,a,i){var s=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&JS(t,c,u,a)||ri(t,u,n,i)});if(n==="number")return s.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return s.reduce(function(c,u){for(var d=0,f=u.length;d<f;d++)l[u[d]]||(l[u[d]]=!0,c.push(u[d]));return c},[])},t5=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},r5=function(t,r,n,a){if(a)return t.map(function(c){return c.coordinate});var i,s,l=t.map(function(c){return c.coordinate===r&&(i=!0),c.coordinate===n&&(s=!0),c.coordinate});return i||l.push(r),s||l.push(n),l},dr=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,s=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&s==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&l?.length>=2?Je(l[0]-l[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=i?i.indexOf(f):f;return{coordinate:a(h)+u,value:f,offset:u}});return d.filter(function(f){return!Pa(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:a(f)+u,value:f,index:h,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,h){return{coordinate:a(f)+u,value:i?i[f]:f,index:h,offset:u}})},Pf=new WeakMap,yo=function(t,r){if(typeof r!="function")return t;Pf.has(t)||Pf.set(t,new WeakMap);var n=Pf.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},n5=function(t,r,n){var a=t.scale,i=t.type,s=t.layout,l=t.axisType;if(a==="auto")return s==="radial"&&l==="radiusAxis"?{scale:gi(),realScaleType:"band"}:s==="radial"&&l==="angleAxis"?{scale:rs(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:ti(),realScaleType:"point"}:i==="category"?{scale:gi(),realScaleType:"band"}:{scale:rs(),realScaleType:"linear"};if(un(a)){var c="scale".concat(jl(a));return{scale:(F0[c]||ti)(),realScaleType:F0[c]?c:"point"}}return le(a)?{scale:a}:{scale:ti(),realScaleType:"point"}},n1=1e-4,a5=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-n1,s=Math.max(a[0],a[1])+n1,l=t(r[0]),c=t(r[n-1]);(l<i||l>s||c<i||c>s)&&t.domain([r[0],r[n-1]])}},i5=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},o5=function(t,r){if(!r||r.length!==2||!Y(r[0])||!Y(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!Y(t[0])||t[0]<n)&&(i[0]=n),(!Y(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},V7=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0,l=0;l<r;++l){var c=Pa(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=i,t[l][n][1]=i+c,i=t[l][n][1]):(t[l][n][0]=s,t[l][n][1]=s+c,s=t[l][n][1])}},U7=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0;s<r;++s){var l=Pa(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},K7={sign:V7,expand:$8,none:Gn,silhouette:R8,wiggle:L8,positive:U7},G7=function(t,r,n){var a=r.map(function(l){return l.props.dataKey}),i=K7[n],s=M8().keys(a).value(function(l,c){return+Le(l,c,0)}).order(_h).offset(i);return s(t)},Z7=function(t,r,n,a,i,s){if(!t)return null;var l=s?r.reverse():r,c={},u=l.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?ze(ze({},h.type.defaultProps),h.props):h.props,x=g.stackId,m=g.hide;if(m)return f;var v=g[n],b=f[v]||{hasStack:!1,stackGroups:{}};if(Ke(x)){var w=b.stackGroups[x]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(h),b.hasStack=!0,b.stackGroups[x]=w}else b.stackGroups[yn("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[h]};return ze(ze({},f),{},Fn({},v,b))},c),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(x,m){var v=p.stackGroups[m];return ze(ze({},x),{},Fn({},m,{numericAxisId:n,cateAxisId:a,items:v.items,stackedData:G7(t,v.items,i)}))},g)}return ze(ze({},f),{},Fn({},h,p))},d)},s5=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,s=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=d7(u,i,l);return t.domain([Rl(d),Er(d)]),{niceTicks:d}}if(i&&a==="number"){var f=t.domain(),h=f7(f,i,l);return{niceTicks:h}}return null};function cs(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!de(a[t.dataKey])){var l=Lo(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var c=Le(a,de(s)?t.dataKey:s);return de(c)?null:t.scale(c)}var us=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,s=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+a:null;var c=Le(s,r.dataKey,r.domain[l]);return de(c)?null:r.scale(c)-i/2+a},l5=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},Y7=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ze(ze({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Ke(i)){var s=r[i];if(s){var l=s.items.indexOf(t);return l>=0?s.stackedData[l]:null}}return null},X7=function(t){return t.reduce(function(r,n){return[Rl(n.concat([r[0]]).filter(Y)),Er(n.concat([r[1]]).filter(Y))]},[1/0,-1/0])},c5=function(t,r,n){return Object.keys(t).reduce(function(a,i){var s=t[i],l=s.stackedData,c=l.reduce(function(u,d){var f=X7(d.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},a1=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,i1=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ep=function(t,r,n){if(le(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Y(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(a1.test(t[0])){var i=+a1.exec(t[0])[1];a[0]=r[0]-i}else le(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Y(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(i1.test(t[1])){var s=+i1.exec(t[1])[1];a[1]=r[1]+s}else le(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},ds=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Zm(r,function(f){return f.coordinate}),s=1/0,l=1,c=i.length;l<c;l++){var u=i[l],d=i[l-1];s=Math.min((u.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},o1=function(t,r,n){return!t||!t.length||br(t,St(n,"type.defaultProps.domain"))?r:t},jx=function(t,r){var n=t.type.defaultProps?ze(ze({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,s=n.unit,l=n.formatter,c=n.tooltipType,u=n.chartType,d=n.hide;return ze(ze({},oe(t,!1)),{},{dataKey:a,unit:s,formatter:l,name:i||a,color:wx(t),value:Le(r,a),type:c,payload:r,chartType:u,hide:d})};function Ni(e){"@babel/helpers - typeof";return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ni(e)}function s1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s1(Object(r),!0).forEach(function(n){u5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u5(e,t,r){return t=Q7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q7(e){var t=J7(e,"string");return Ni(t)=="symbol"?t:t+""}function J7(e,t){if(Ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e$(e,t){return a$(e)||n$(e,t)||r$(e,t)||t$()}function t$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
42
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r$(e,t){if(e){if(typeof e=="string")return l1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l1(e,t)}}function l1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function a$(e){if(Array.isArray(e))return e}var fs=Math.PI/180,i$=function(t){return t*180/Math.PI},
|
|
43
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h$(e,t){if(e){if(typeof e=="string")return tp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tp(e,t)}}function p$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m$(e){if(Array.isArray(e))return tp(e)}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function x$(e,t){if(e==null)return{};var r=g$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function u1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u1(Object(r),!0).forEach(function(n){v$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v$(e,t,r){return t=y$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y$(e){var t=b$(e,"string");return Pi(t)=="symbol"?t:t+""}function b$(e,t){if(Pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ai(){return Ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ai.apply(this,arguments)}var w$=function(t){var r=t.value,n=t.formatter,a=de(t.children)?r:t.children;return le(n)?n(a):a},j$=function(t,r){var n=Je(r-t),a=Math.min(Math.abs(r-t),360);return n*a},C$=function(t,r,n){var a=t.position,i=t.viewBox,s=t.offset,l=t.className,c=i,u=c.cx,d=c.cy,f=c.innerRadius,h=c.outerRadius,p=c.startAngle,g=c.endAngle,x=c.clockWise,m=(f+h)/2,v=j$(p,g),b=v>=0?1:-1,w,C;a==="insideStart"?(w=p+b*s,C=x):a==="insideEnd"?(w=g-b*s,C=!x):a==="end"&&(w=g+b*s,C=x),C=v<=0?C:!C;var y=
|
|
36
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g7(e,t){if(e){if(typeof e=="string")return J0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J0(e,t)}}function J0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v7(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function y7(e){if(Array.isArray(e))return e}function b7(e,t){if(e==null)return{};var r=w7(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function j7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,XS(n.key),n)}}function S7(e,t,r){return t&&C7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function O7(e,t,r){return t=ls(t),N7(e,ZS()?Reflect.construct(t,r||[],ls(e).constructor):t.apply(e,r))}function N7(e,t){if(t&&(ra(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P7(e)}function P7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZS=function(){return!!e})()}function ls(e){return ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ls(e)}function A7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qh(e,t)}function Qh(e,t){return Qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Qh(e,t)}function YS(e,t,r){return t=XS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XS(e){var t=_7(e,"string");return ra(t)=="symbol"?t:t+""}function _7(e,t){if(ra(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ra(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var no=(function(e){function t(){return j7(this,t),O7(this,t,arguments)}return A7(t,e),S7(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,s=n.width,l=n.dataKey,c=n.data,u=n.dataPointFormatter,d=n.xAxis,f=n.yAxis,h=b7(n,p7),p=oe(h,!1);this.props.direction==="x"&&d.type!=="number"&&(process.env.NODE_ENV!=="production"?xt(!1,'ErrorBar requires Axis type property to be "number".'):xt());var g=c.map(function(x){var m=u(x,l),v=m.x,b=m.y,w=m.value,C=m.errorVal;if(!C)return null;var y=[],j,S;if(Array.isArray(C)){var A=m7(C,2);j=A[0],S=A[1]}else j=S=C;if(i==="vertical"){var _=d.scale,I=b+a,k=I+s,E=I-s,T=_(w-j),M=_(w+S);y.push({x1:M,y1:k,x2:M,y2:E}),y.push({x1:T,y1:I,x2:M,y2:I}),y.push({x1:T,y1:k,x2:T,y2:E})}else if(i==="horizontal"){var R=f.scale,$=v+a,L=$-s,q=$+s,U=R(w-j),D=R(w+S);y.push({x1:L,y1:D,x2:q,y2:D}),y.push({x1:$,y1:U,x2:$,y2:D}),y.push({x1:L,y1:U,x2:q,y2:U})}return O.default.createElement(fe,ss({className:"recharts-errorBar",key:"bar-".concat(y.map(function(B){return"".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))},p),y.map(function(B){return O.default.createElement("line",ss({},B,{key:"line-".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))}))});return O.default.createElement(fe,{className:"recharts-errorBars"},g)}}])})(O.default.Component);YS(no,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});YS(no,"displayName","ErrorBar");function Si(e){"@babel/helpers - typeof";return Si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Si(e)}function e1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e1(Object(r),!0).forEach(function(n){k7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function k7(e,t,r){return t=T7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T7(e){var t=E7(e,"string");return Si(t)=="symbol"?t:t+""}function E7(e,t){if(Si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QS=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,s=wt(r,Zt);if(!s)return null;var l=Zt.defaultProps,c=l!==void 0?Ur(Ur({},l),s.props):{},u;return s.props&&s.props.payload?u=s.props&&s.props.payload:i==="children"?u=(n||[]).reduce(function(d,f){var h=f.item,p=f.props,g=p.sectors||p.data||[];return d.concat(g.map(function(x){return{type:s.props.iconType||h.props.legendType,value:x.name,color:x.fill,payload:x}}))},[]):u=(n||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?Ur(Ur({},h),f.props):{},g=p.dataKey,x=p.name,m=p.legendType,v=p.hide;return{inactive:v,dataKey:g,type:c.iconType||m||"square",color:wx(f),value:x||g,payload:p}}),Ur(Ur(Ur({},c),Zt.getWithHeight(s,a)),{},{payload:u,item:s})};function Oi(e){"@babel/helpers - typeof";return Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oi(e)}function t1(e){return R7(e)||$7(e)||M7(e)||I7()}function I7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
37
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M7(e,t){if(e){if(typeof e=="string")return Jh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jh(e,t)}}function $7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R7(e){if(Array.isArray(e))return Jh(e)}function Jh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ze(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r1(Object(r),!0).forEach(function(n){Fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fn(e,t,r){return t=L7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L7(e){var t=D7(e,"string");return Oi(t)=="symbol"?t:t+""}function D7(e,t){if(Oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Le(e,t,r){return de(e)||de(t)?r:Ke(t)?St(e,t,r):le(t)?t(e):r}function ri(e,t,r,n){var a=RM(e,function(l){return Le(l,t)});if(r==="number"){var i=a.filter(function(l){return Z(l)||parseFloat(l)});return i.length?[Rl(i),Er(i)]:[1/0,-1/0]}var s=n?a.filter(function(l){return!de(l)}):a;return s.map(function(l){return Ke(l)||l instanceof Date?l:""})}var z7=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,s=-1,l=(r=n?.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<l;u++){var d=u>0?a[u-1].coordinate:a[l-1].coordinate,f=a[u].coordinate,h=u>=l-1?a[0].coordinate:a[u+1].coordinate,p=void 0;if(Je(f-d)!==Je(h-f)){var g=[];if(Je(h-f)===Je(c[1]-c[0])){p=h;var x=f+c[1]-c[0];g[0]=Math.min(x,(x+d)/2),g[1]=Math.max(x,(x+d)/2)}else{p=d;var m=h+c[1]-c[0];g[0]=Math.min(f,(m+f)/2),g[1]=Math.max(f,(m+f)/2)}var v=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>v[0]&&t<=v[1]||t>=g[0]&&t<=g[1]){s=a[u].index;break}}else{var b=Math.min(d,h),w=Math.max(d,h);if(t>(b+f)/2&&t<=(w+f)/2){s=a[u].index;break}}}else for(var C=0;C<l;C++)if(C===0&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C>0&&C<l-1&&t>(n[C].coordinate+n[C-1].coordinate)/2&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C===l-1&&t>(n[C].coordinate+n[C-1].coordinate)/2){s=n[C].index;break}return s},wx=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?ze(ze({},t.type.defaultProps),t.props):t.props,s=i.stroke,l=i.fill,c;switch(a){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:l;break;default:c=l;break}return c},B7=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var s={},l=Object.keys(i),c=0,u=l.length;c<u;c++)for(var d=i[l[c]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var g=d[f[h]],x=g.items,m=g.cateAxisId,v=x.filter(function(S){return fr(S.type).indexOf("Bar")>=0});if(v&&v.length){var b=v[0].type.defaultProps,w=b!==void 0?ze(ze({},b),v[0].props):v[0].props,C=w.barSize,y=w[m];s[y]||(s[y]=[]);var j=de(C)?r:C;s[y].push({item:v[0],stackList:v.slice(1),barSize:de(j)?void 0:ct(j,n,0)})}}return s},F7=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,s=i===void 0?[]:i,l=t.maxBarSize,c=s.length;if(c<1)return null;var u=ct(r,a,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var h=!1,p=a/c,g=s.reduce(function(C,y){return C+y.barSize||0},0);g+=(c-1)*u,g>=a&&(g-=(c-1)*u,u=0),g>=a&&p>0&&(h=!0,p*=.9,g=c*p);var x=(a-g)/2>>0,m={offset:x-u,size:0};d=s.reduce(function(C,y){var j={item:y.item,position:{offset:m.offset+m.size+u,size:h?p:y.barSize}},S=[].concat(t1(C),[j]);return m=S[S.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){S.push({item:A,position:m})}),S},f)}else{var v=ct(n,a,0,!0);a-2*v-(c-1)*u<=0&&(u=0);var b=(a-2*v-(c-1)*u)/c;b>1&&(b>>=0);var w=l===+l?Math.min(b,l):b;d=s.reduce(function(C,y,j){var S=[].concat(t1(C),[{item:y.item,position:{offset:v+(b+u)*j+(b-w)/2,size:w}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){S.push({item:A,position:S[S.length-1].position})}),S},f)}return d},q7=function(t,r,n,a){var i=n.children,s=n.width,l=n.margin,c=s-(l.left||0)-(l.right||0),u=QS({children:i,legendWidth:c});if(u){var d=a||{},f=d.width,h=d.height,p=u.align,g=u.verticalAlign,x=u.layout;if((x==="vertical"||x==="horizontal"&&g==="middle")&&p!=="center"&&Z(t[p]))return ze(ze({},t),{},Fn({},p,t[p]+(f||0)));if((x==="horizontal"||x==="vertical"&&p==="center")&&g!=="middle"&&Z(t[g]))return ze(ze({},t),{},Fn({},g,t[g]+(h||0)))}return t},W7=function(t,r,n){return de(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},JS=function(t,r,n,a,i){var s=r.props.children,l=gt(s,no).filter(function(u){return W7(a,i,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=Le(d,n);if(de(f))return u;var h=Array.isArray(f)?[Rl(f),Er(f)]:[f,f],p=c.reduce(function(g,x){var m=Le(d,x,0),v=h[0]-Math.abs(Array.isArray(m)?m[0]:m),b=h[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(v,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},H7=function(t,r,n,a,i){var s=r.map(function(l){return JS(t,l,n,i,a)}).filter(function(l){return!de(l)});return s&&s.length?s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},e5=function(t,r,n,a,i){var s=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&JS(t,c,u,a)||ri(t,u,n,i)});if(n==="number")return s.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return s.reduce(function(c,u){for(var d=0,f=u.length;d<f;d++)l[u[d]]||(l[u[d]]=!0,c.push(u[d]));return c},[])},t5=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},r5=function(t,r,n,a){if(a)return t.map(function(c){return c.coordinate});var i,s,l=t.map(function(c){return c.coordinate===r&&(i=!0),c.coordinate===n&&(s=!0),c.coordinate});return i||l.push(r),s||l.push(n),l},dr=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,s=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&s==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&l?.length>=2?Je(l[0]-l[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=i?i.indexOf(f):f;return{coordinate:a(h)+u,value:f,offset:u}});return d.filter(function(f){return!Pa(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:a(f)+u,value:f,index:h,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,h){return{coordinate:a(f)+u,value:i?i[f]:f,index:h,offset:u}})},Pf=new WeakMap,yo=function(t,r){if(typeof r!="function")return t;Pf.has(t)||Pf.set(t,new WeakMap);var n=Pf.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},n5=function(t,r,n){var a=t.scale,i=t.type,s=t.layout,l=t.axisType;if(a==="auto")return s==="radial"&&l==="radiusAxis"?{scale:gi(),realScaleType:"band"}:s==="radial"&&l==="angleAxis"?{scale:rs(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:ti(),realScaleType:"point"}:i==="category"?{scale:gi(),realScaleType:"band"}:{scale:rs(),realScaleType:"linear"};if(un(a)){var c="scale".concat(jl(a));return{scale:(F0[c]||ti)(),realScaleType:F0[c]?c:"point"}}return le(a)?{scale:a}:{scale:ti(),realScaleType:"point"}},n1=1e-4,a5=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-n1,s=Math.max(a[0],a[1])+n1,l=t(r[0]),c=t(r[n-1]);(l<i||l>s||c<i||c>s)&&t.domain([r[0],r[n-1]])}},i5=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},o5=function(t,r){if(!r||r.length!==2||!Z(r[0])||!Z(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!Z(t[0])||t[0]<n)&&(i[0]=n),(!Z(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},V7=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0,l=0;l<r;++l){var c=Pa(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=i,t[l][n][1]=i+c,i=t[l][n][1]):(t[l][n][0]=s,t[l][n][1]=s+c,s=t[l][n][1])}},U7=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0;s<r;++s){var l=Pa(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},K7={sign:V7,expand:$8,none:Gn,silhouette:R8,wiggle:L8,positive:U7},G7=function(t,r,n){var a=r.map(function(l){return l.props.dataKey}),i=K7[n],s=M8().keys(a).value(function(l,c){return+Le(l,c,0)}).order(_h).offset(i);return s(t)},Z7=function(t,r,n,a,i,s){if(!t)return null;var l=s?r.reverse():r,c={},u=l.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?ze(ze({},h.type.defaultProps),h.props):h.props,x=g.stackId,m=g.hide;if(m)return f;var v=g[n],b=f[v]||{hasStack:!1,stackGroups:{}};if(Ke(x)){var w=b.stackGroups[x]||{numericAxisId:n,cateAxisId:a,items:[]};w.items.push(h),b.hasStack=!0,b.stackGroups[x]=w}else b.stackGroups[yn("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[h]};return ze(ze({},f),{},Fn({},v,b))},c),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(x,m){var v=p.stackGroups[m];return ze(ze({},x),{},Fn({},m,{numericAxisId:n,cateAxisId:a,items:v.items,stackedData:G7(t,v.items,i)}))},g)}return ze(ze({},f),{},Fn({},h,p))},d)},s5=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,s=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=d7(u,i,l);return t.domain([Rl(d),Er(d)]),{niceTicks:d}}if(i&&a==="number"){var f=t.domain(),h=f7(f,i,l);return{niceTicks:h}}return null};function cs(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!de(a[t.dataKey])){var l=Lo(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var c=Le(a,de(s)?t.dataKey:s);return de(c)?null:t.scale(c)}var us=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,s=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+a:null;var c=Le(s,r.dataKey,r.domain[l]);return de(c)?null:r.scale(c)-i/2+a},l5=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},Y7=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ze(ze({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Ke(i)){var s=r[i];if(s){var l=s.items.indexOf(t);return l>=0?s.stackedData[l]:null}}return null},X7=function(t){return t.reduce(function(r,n){return[Rl(n.concat([r[0]]).filter(Z)),Er(n.concat([r[1]]).filter(Z))]},[1/0,-1/0])},c5=function(t,r,n){return Object.keys(t).reduce(function(a,i){var s=t[i],l=s.stackedData,c=l.reduce(function(u,d){var f=X7(d.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},a1=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,i1=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ep=function(t,r,n){if(le(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(Z(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(a1.test(t[0])){var i=+a1.exec(t[0])[1];a[0]=r[0]-i}else le(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(Z(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(i1.test(t[1])){var s=+i1.exec(t[1])[1];a[1]=r[1]+s}else le(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},ds=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Zm(r,function(f){return f.coordinate}),s=1/0,l=1,c=i.length;l<c;l++){var u=i[l],d=i[l-1];s=Math.min((u.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},o1=function(t,r,n){return!t||!t.length||br(t,St(n,"type.defaultProps.domain"))?r:t},jx=function(t,r){var n=t.type.defaultProps?ze(ze({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,s=n.unit,l=n.formatter,c=n.tooltipType,u=n.chartType,d=n.hide;return ze(ze({},oe(t,!1)),{},{dataKey:a,unit:s,formatter:l,name:i||a,color:wx(t),value:Le(r,a),type:c,payload:r,chartType:u,hide:d})};function Ni(e){"@babel/helpers - typeof";return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ni(e)}function s1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s1(Object(r),!0).forEach(function(n){u5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u5(e,t,r){return t=Q7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q7(e){var t=J7(e,"string");return Ni(t)=="symbol"?t:t+""}function J7(e,t){if(Ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e$(e,t){return a$(e)||n$(e,t)||r$(e,t)||t$()}function t$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
38
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r$(e,t){if(e){if(typeof e=="string")return l1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l1(e,t)}}function l1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n$(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function a$(e){if(Array.isArray(e))return e}var fs=Math.PI/180,i$=function(t){return t*180/Math.PI},ge=function(t,r,n,a){return{x:t+Math.cos(-fs*a)*n,y:r+Math.sin(-fs*a)*n}},d5=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Cx=function(t,r,n,a,i){var s=t.width,l=t.height,c=t.startAngle,u=t.endAngle,d=ct(t.cx,s,s/2),f=ct(t.cy,l,l/2),h=d5(s,l,n),p=ct(t.innerRadius,h,0),g=ct(t.outerRadius,h,h*.8),x=Object.keys(r);return x.reduce(function(m,v){var b=r[v],w=b.domain,C=b.reversed,y;if(de(b.range))a==="angleAxis"?y=[c,u]:a==="radiusAxis"&&(y=[p,g]),C&&(y=[y[1],y[0]]);else{y=b.range;var j=y,S=e$(j,2);c=S[0],u=S[1]}var A=n5(b,i),_=A.realScaleType,I=A.scale;I.domain(w).range(y),a5(I);var k=s5(I,sr(sr({},b),{},{realScaleType:_})),E=sr(sr(sr({},b),k),{},{range:y,radius:g,realScaleType:_,scale:I,cx:d,cy:f,innerRadius:p,outerRadius:g,startAngle:c,endAngle:u});return sr(sr({},m),{},u5({},v,E))},{})},o$=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-s,2))},s$=function(t,r){var n=t.x,a=t.y,i=r.cx,s=r.cy,l=o$({x:n,y:a},{x:i,y:s});if(l<=0)return{radius:l};var c=(n-i)/l,u=Math.acos(c);return a>s&&(u=2*Math.PI-u),{radius:l,angle:i$(u),angleInRadian:u}},l$=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),s=Math.min(a,i);return{startAngle:r-s*360,endAngle:n-s*360}},c$=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),s=Math.floor(a/360),l=Math.min(i,s);return t+l*360},c1=function(t,r){var n=t.x,a=t.y,i=s$({x:n,y:a},r),s=i.radius,l=i.angle,c=r.innerRadius,u=r.outerRadius;if(s<c||s>u)return!1;if(s===0)return!0;var d=l$(r),f=d.startAngle,h=d.endAngle,p=l,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?sr(sr({},r),{},{radius:s,angle:c$(p,r)}):null},f5=function(t){return!P.isValidElement(t)&&!le(t)&&typeof t!="boolean"?t.className:""};function Pi(e){"@babel/helpers - typeof";return Pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pi(e)}var u$=["offset"];function d$(e){return m$(e)||p$(e)||h$(e)||f$()}function f$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
39
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h$(e,t){if(e){if(typeof e=="string")return tp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tp(e,t)}}function p$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m$(e){if(Array.isArray(e))return tp(e)}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function x$(e,t){if(e==null)return{};var r=g$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function g$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function u1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u1(Object(r),!0).forEach(function(n){v$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v$(e,t,r){return t=y$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y$(e){var t=b$(e,"string");return Pi(t)=="symbol"?t:t+""}function b$(e,t){if(Pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ai(){return Ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ai.apply(this,arguments)}var w$=function(t){var r=t.value,n=t.formatter,a=de(t.children)?r:t.children;return le(n)?n(a):a},j$=function(t,r){var n=Je(r-t),a=Math.min(Math.abs(r-t),360);return n*a},C$=function(t,r,n){var a=t.position,i=t.viewBox,s=t.offset,l=t.className,c=i,u=c.cx,d=c.cy,f=c.innerRadius,h=c.outerRadius,p=c.startAngle,g=c.endAngle,x=c.clockWise,m=(f+h)/2,v=j$(p,g),b=v>=0?1:-1,w,C;a==="insideStart"?(w=p+b*s,C=x):a==="insideEnd"?(w=g-b*s,C=!x):a==="end"&&(w=g+b*s,C=x),C=v<=0?C:!C;var y=ge(u,d,m,w),j=ge(u,d,m,w+(C?1:-1)*359),S="M".concat(y.x,",").concat(y.y,`
|
|
44
40
|
A`).concat(m,",").concat(m,",0,1,").concat(C?0:1,`,
|
|
45
|
-
`).concat(j.x,",").concat(j.y),A=de(t.id)?yn("recharts-radial-line-"):t.id;return O.default.createElement("text",Ai({},n,{dominantBaseline:"central",className:ae.default("recharts-radial-bar-label",l)}),O.default.createElement("defs",null,O.default.createElement("path",{id:A,d:S})),O.default.createElement("textPath",{xlinkHref:"#".concat(A)},r))},S$=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,s=i.cx,l=i.cy,c=i.innerRadius,u=i.outerRadius,d=i.startAngle,f=i.endAngle,h=(d+f)/2;if(a==="outside"){var p=
|
|
46
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $$(e,t){if(e){if(typeof e=="string")return rp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rp(e,t)}}function R$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L$(e){if(Array.isArray(e))return rp(e)}function rp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hs(){return hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hs.apply(this,arguments)}function f1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function h1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f1(Object(r),!0).forEach(function(n){D$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D$(e,t,r){return t=z$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z$(e){var t=B$(e,"string");return _i(t)=="symbol"?t:t+""}function B$(e,t){if(_i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function p1(e,t){if(e==null)return{};var r=F$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function F$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var q$=function(t){return Array.isArray(t.value)?p5(t.value):t.value};function It(e){var t=e.valueAccessor,r=t===void 0?q$:t,n=p1(e,T$),a=n.data,i=n.dataKey,s=n.clockWise,l=n.id,c=n.textBreakAll,u=p1(n,E$);return!a||!a.length?null:O.default.createElement(fe,{className:"recharts-label-list"},a.map(function(d,f){var h=de(i)?r(d,f):Le(d&&d.payload,i),p=de(l)?{}:{id:"".concat(l,"-").concat(f)};return O.default.createElement(Qe,hs({},oe(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:c,viewBox:Qe.parseViewBox(de(s)?d:h1(h1({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}It.displayName="LabelList";function W$(e,t){return e?e===!0?O.default.createElement(It,{key:"labelList-implicit",data:t}):O.default.isValidElement(e)||le(e)?O.default.createElement(It,{key:"labelList-implicit",data:t,content:e}):Na(e)?O.default.createElement(It,hs({data:t},e,{key:"labelList-implicit"})):null:null}function H$(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=gt(n,It).map(function(s,l){return P.cloneElement(s,{data:t,key:"labelList-".concat(l)})});if(!r)return a;var i=W$(e.label,t);return[i].concat(I$(a))}It.renderCallByParent=H$;var V$=["component"];function np(e){"@babel/helpers - typeof";return np=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(e)}function U$(e,t){if(e==null)return{};var r=K$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function K$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sx(e){var t=e.component,r=U$(e,V$),n;return P.isValidElement(t)?n=P.cloneElement(t,r):le(t)?n=P.createElement(t,r):Et(!1,"Customized's props `component` must be React.element or Function, but got %s.",np(t)),O.default.createElement(fe,{className:"recharts-customized-wrapper"},n)}Sx.displayName="Customized";function ki(e){"@babel/helpers - typeof";return ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ki(e)}function ap(){return ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ap.apply(this,arguments)}function m1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function x1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m1(Object(r),!0).forEach(function(n){G$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G$(e,t,r){return t=Z$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z$(e){var t=Y$(e,"string");return ki(t)=="symbol"?t:t+""}function Y$(e,t){if(ki(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ki(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var X$=function(t,r){var n=Je(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},bo=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,s=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(l?1:-1)+a,f=Math.asin(c/d)/fs,h=u?i:i+s*f,p=
|
|
41
|
+
`).concat(j.x,",").concat(j.y),A=de(t.id)?yn("recharts-radial-line-"):t.id;return O.default.createElement("text",Ai({},n,{dominantBaseline:"central",className:ae.default("recharts-radial-bar-label",l)}),O.default.createElement("defs",null,O.default.createElement("path",{id:A,d:S})),O.default.createElement("textPath",{xlinkHref:"#".concat(A)},r))},S$=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,s=i.cx,l=i.cy,c=i.innerRadius,u=i.outerRadius,d=i.startAngle,f=i.endAngle,h=(d+f)/2;if(a==="outside"){var p=ge(s,l,u+n,h),g=p.x,x=p.y;return{x:g,y:x,textAnchor:g>=s?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"end"};var m=(c+u)/2,v=ge(s,l,m,h),b=v.x,w=v.y;return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},O$=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,s=r,l=s.x,c=s.y,u=s.width,d=s.height,f=d>=0?1:-1,h=f*a,p=f>0?"end":"start",g=f>0?"start":"end",x=u>=0?1:-1,m=x*a,v=x>0?"end":"start",b=x>0?"start":"end";if(i==="top"){var w={x:l+u/2,y:c-f*a,textAnchor:"middle",verticalAnchor:p};return Ue(Ue({},w),n?{height:Math.max(c-n.y,0),width:u}:{})}if(i==="bottom"){var C={x:l+u/2,y:c+d+h,textAnchor:"middle",verticalAnchor:g};return Ue(Ue({},C),n?{height:Math.max(n.y+n.height-(c+d),0),width:u}:{})}if(i==="left"){var y={x:l-m,y:c+d/2,textAnchor:v,verticalAnchor:"middle"};return Ue(Ue({},y),n?{width:Math.max(y.x-n.x,0),height:d}:{})}if(i==="right"){var j={x:l+u+m,y:c+d/2,textAnchor:b,verticalAnchor:"middle"};return Ue(Ue({},j),n?{width:Math.max(n.x+n.width-j.x,0),height:d}:{})}var S=n?{width:u,height:d}:{};return i==="insideLeft"?Ue({x:l+m,y:c+d/2,textAnchor:b,verticalAnchor:"middle"},S):i==="insideRight"?Ue({x:l+u-m,y:c+d/2,textAnchor:v,verticalAnchor:"middle"},S):i==="insideTop"?Ue({x:l+u/2,y:c+h,textAnchor:"middle",verticalAnchor:g},S):i==="insideBottom"?Ue({x:l+u/2,y:c+d-h,textAnchor:"middle",verticalAnchor:p},S):i==="insideTopLeft"?Ue({x:l+m,y:c+h,textAnchor:b,verticalAnchor:g},S):i==="insideTopRight"?Ue({x:l+u-m,y:c+h,textAnchor:v,verticalAnchor:g},S):i==="insideBottomLeft"?Ue({x:l+m,y:c+d-h,textAnchor:b,verticalAnchor:p},S):i==="insideBottomRight"?Ue({x:l+u-m,y:c+d-h,textAnchor:v,verticalAnchor:p},S):Na(i)&&(Z(i.x)||en(i.x))&&(Z(i.y)||en(i.y))?Ue({x:l+ct(i.x,u),y:c+ct(i.y,d),textAnchor:"end",verticalAnchor:"end"},S):Ue({x:l+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},S)},N$=function(t){return"cx"in t&&Z(t.cx)};function Qe(e){var t=e.offset,r=t===void 0?5:t,n=x$(e,u$),a=Ue({offset:r},n),i=a.viewBox,s=a.position,l=a.value,c=a.children,u=a.content,d=a.className,f=d===void 0?"":d,h=a.textBreakAll;if(!i||de(l)&&de(c)&&!P.isValidElement(u)&&!le(u))return null;if(P.isValidElement(u))return P.cloneElement(u,a);var p;if(le(u)){if(p=P.createElement(u,a),P.isValidElement(p))return p}else p=w$(a);var g=N$(i),x=oe(a,!0);if(g&&(s==="insideStart"||s==="insideEnd"||s==="end"))return C$(a,p,x);var m=g?S$(a):O$(a);return O.default.createElement(dn,Ai({className:ae.default("recharts-label",f)},x,m,{breakAll:h}),p)}Qe.displayName="Label";var h5=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,s=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,g=t.left,x=t.width,m=t.height,v=t.clockWise,b=t.labelViewBox;if(b)return b;if(Z(x)&&Z(m)){if(Z(f)&&Z(h))return{x:f,y:h,width:x,height:m};if(Z(p)&&Z(g))return{x:p,y:g,width:x,height:m}}return Z(f)&&Z(h)?{x:f,y:h,width:0,height:0}:Z(r)&&Z(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:s||a||0,innerRadius:u||0,outerRadius:d||c||l||0,clockWise:v}:t.viewBox?t.viewBox:{}},P$=function(t,r){return t?t===!0?O.default.createElement(Qe,{key:"label-implicit",viewBox:r}):Ke(t)?O.default.createElement(Qe,{key:"label-implicit",viewBox:r,value:t}):P.isValidElement(t)?t.type===Qe?P.cloneElement(t,{key:"label-implicit",viewBox:r}):O.default.createElement(Qe,{key:"label-implicit",content:t,viewBox:r}):le(t)?O.default.createElement(Qe,{key:"label-implicit",content:t,viewBox:r}):Na(t)?O.default.createElement(Qe,Ai({viewBox:r},t,{key:"label-implicit"})):null:null},A$=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=h5(t),s=gt(a,Qe).map(function(c,u){return P.cloneElement(c,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return s;var l=P$(t.label,r||i);return[l].concat(d$(s))};Qe.parseViewBox=h5;Qe.renderCallByParent=A$;var Af,d1;function _$(){if(d1)return Af;d1=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Af=e,Af}var k$=_$();const p5=Oe(k$);function _i(e){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(e)}var T$=["valueAccessor"],E$=["data","dataKey","clockWise","id","textBreakAll"];function I$(e){return L$(e)||R$(e)||$$(e)||M$()}function M$(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
42
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $$(e,t){if(e){if(typeof e=="string")return rp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rp(e,t)}}function R$(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L$(e){if(Array.isArray(e))return rp(e)}function rp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hs(){return hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hs.apply(this,arguments)}function f1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function h1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f1(Object(r),!0).forEach(function(n){D$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D$(e,t,r){return t=z$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z$(e){var t=B$(e,"string");return _i(t)=="symbol"?t:t+""}function B$(e,t){if(_i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function p1(e,t){if(e==null)return{};var r=F$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function F$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var q$=function(t){return Array.isArray(t.value)?p5(t.value):t.value};function It(e){var t=e.valueAccessor,r=t===void 0?q$:t,n=p1(e,T$),a=n.data,i=n.dataKey,s=n.clockWise,l=n.id,c=n.textBreakAll,u=p1(n,E$);return!a||!a.length?null:O.default.createElement(fe,{className:"recharts-label-list"},a.map(function(d,f){var h=de(i)?r(d,f):Le(d&&d.payload,i),p=de(l)?{}:{id:"".concat(l,"-").concat(f)};return O.default.createElement(Qe,hs({},oe(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:c,viewBox:Qe.parseViewBox(de(s)?d:h1(h1({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}It.displayName="LabelList";function W$(e,t){return e?e===!0?O.default.createElement(It,{key:"labelList-implicit",data:t}):O.default.isValidElement(e)||le(e)?O.default.createElement(It,{key:"labelList-implicit",data:t,content:e}):Na(e)?O.default.createElement(It,hs({data:t},e,{key:"labelList-implicit"})):null:null}function H$(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=gt(n,It).map(function(s,l){return P.cloneElement(s,{data:t,key:"labelList-".concat(l)})});if(!r)return a;var i=W$(e.label,t);return[i].concat(I$(a))}It.renderCallByParent=H$;var V$=["component"];function np(e){"@babel/helpers - typeof";return np=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(e)}function U$(e,t){if(e==null)return{};var r=K$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function K$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Sx(e){var t=e.component,r=U$(e,V$),n;return P.isValidElement(t)?n=P.cloneElement(t,r):le(t)?n=P.createElement(t,r):Et(!1,"Customized's props `component` must be React.element or Function, but got %s.",np(t)),O.default.createElement(fe,{className:"recharts-customized-wrapper"},n)}Sx.displayName="Customized";function ki(e){"@babel/helpers - typeof";return ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ki(e)}function ap(){return ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ap.apply(this,arguments)}function m1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function x1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m1(Object(r),!0).forEach(function(n){G$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G$(e,t,r){return t=Z$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z$(e){var t=Y$(e,"string");return ki(t)=="symbol"?t:t+""}function Y$(e,t){if(ki(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ki(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var X$=function(t,r){var n=Je(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},bo=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,s=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(l?1:-1)+a,f=Math.asin(c/d)/fs,h=u?i:i+s*f,p=ge(r,n,d,h),g=ge(r,n,a,h),x=u?i-s*f:i,m=ge(r,n,d*Math.cos(f*fs),x);return{center:p,circleTangency:g,lineTangency:m,theta:f}},m5=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.startAngle,l=t.endAngle,c=X$(s,l),u=s+c,d=ge(r,n,i,s),f=ge(r,n,i,u),h="M ".concat(d.x,",").concat(d.y,`
|
|
47
43
|
A `).concat(i,",").concat(i,`,0,
|
|
48
44
|
`).concat(+(Math.abs(c)>180),",").concat(+(s>u),`,
|
|
49
45
|
`).concat(f.x,",").concat(f.y,`
|
|
50
|
-
`);if(a>0){var p=
|
|
46
|
+
`);if(a>0){var p=ge(r,n,a,s),g=ge(r,n,a,u);h+="L ".concat(g.x,",").concat(g.y,`
|
|
51
47
|
A `).concat(a,",").concat(a,`,0,
|
|
52
48
|
`).concat(+(Math.abs(c)>180),",").concat(+(s<=u),`,
|
|
53
49
|
`).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},Q$=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=Je(d-u),h=bo({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:s,cornerIsExternal:c}),p=h.circleTangency,g=h.lineTangency,x=h.theta,m=bo({cx:r,cy:n,radius:i,angle:d,sign:-f,cornerRadius:s,cornerIsExternal:c}),v=m.circleTangency,b=m.lineTangency,w=m.theta,C=c?Math.abs(u-d):Math.abs(u-d)-x-w;if(C<0)return l?"M ".concat(g.x,",").concat(g.y,`
|
|
@@ -60,14 +56,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
60
56
|
`);if(a>0){var j=bo({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),S=j.circleTangency,A=j.lineTangency,_=j.theta,I=bo({cx:r,cy:n,radius:a,angle:d,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),k=I.circleTangency,E=I.lineTangency,T=I.theta,M=c?Math.abs(u-d):Math.abs(u-d)-_-T;if(M<0&&s===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat(E.x,",").concat(E.y,`
|
|
61
57
|
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(k.x,",").concat(k.y,`
|
|
62
58
|
A`).concat(a,",").concat(a,",0,").concat(+(M>180),",").concat(+(f>0),",").concat(S.x,",").concat(S.y,`
|
|
63
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(A.x,",").concat(A.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},J$={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},x5=function(t){var r=x1(x1({},J$),t),n=r.cx,a=r.cy,i=r.innerRadius,s=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,d=r.startAngle,f=r.endAngle,h=r.className;if(s<i||d===f)return null;var p=ae.default("recharts-sector",h),g=s-i,x=ct(l,g,0,!0),m;return x>0&&Math.abs(d-f)<360?m=Q$({cx:n,cy:a,innerRadius:i,outerRadius:s,cornerRadius:Math.min(x,g/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):m=m5({cx:n,cy:a,innerRadius:i,outerRadius:s,startAngle:d,endAngle:f}),O.default.createElement("path",ap({},oe(r,!0),{className:p,d:m,role:"img"}))};function Ti(e){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(e)}function ip(){return ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ip.apply(this,arguments)}function g1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function v1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(r),!0).forEach(function(n){eR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eR(e,t,r){return t=tR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tR(e){var t=rR(e,"string");return Ti(t)=="symbol"?t:t+""}function rR(e,t){if(Ti(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y1={curveBasisClosed:C8,curveBasisOpen:S8,curveBasis:j8,curveBumpX:l8,curveBumpY:c8,curveLinearClosed:O8,curveLinear:Sl,curveMonotoneX:N8,curveMonotoneY:P8,curveNatural:A8,curveStep:_8,curveStepAfter:T8,curveStepBefore:k8},wo=function(t){return t.x===+t.x&&t.y===+t.y},Ua=function(t){return t.x},Ka=function(t){return t.y},nR=function(t,r){if(le(t))return t;var n="curve".concat(jl(t));return(n==="curveMonotone"||n==="curveBump")&&r?y1["".concat(n).concat(r==="vertical"?"Y":"X")]:y1[n]||Sl},aR=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,s=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=nR(n,l),f=u?i.filter(function(x){return wo(x)}):i,h;if(Array.isArray(s)){var p=u?s.filter(function(x){return wo(x)}):s,g=f.map(function(x,m){return v1(v1({},x),{},{base:p[m]})});return l==="vertical"?h=fo().y(Ka).x1(Ua).x0(function(x){return x.base.x}):h=fo().x(Ua).y1(Ka).y0(function(x){return x.base.y}),h.defined(wo).curve(d),h(g)}return l==="vertical"&&Y(s)?h=fo().y(Ka).x1(Ua).x0(s):Y(s)?h=fo().x(Ua).y1(Ka).y0(s):h=fC().x(Ua).y(Ka),h.defined(wo).curve(d),h(f)},ln=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var s=n&&n.length?aR(t):a;return O.createElement("path",ip({},oe(t,!1),Do(t),{className:ae.default("recharts-curve",r),d:s,ref:i}))},jo={exports:{}},Co={exports:{}},je={};var b1;function iR(){if(b1)return je;b1=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(y){if(typeof y=="object"&&y!==null){var j=y.$$typeof;switch(j){case t:switch(y=y.type,y){case c:case u:case n:case i:case a:case f:return y;default:switch(y=y&&y.$$typeof,y){case l:case d:case g:case p:case s:return y;default:return j}}case r:return j}}}function C(y){return w(y)===u}return je.AsyncMode=c,je.ConcurrentMode=u,je.ContextConsumer=l,je.ContextProvider=s,je.Element=t,je.ForwardRef=d,je.Fragment=n,je.Lazy=g,je.Memo=p,je.Portal=r,je.Profiler=i,je.StrictMode=a,je.Suspense=f,je.isAsyncMode=function(y){return C(y)||w(y)===c},je.isConcurrentMode=C,je.isContextConsumer=function(y){return w(y)===l},je.isContextProvider=function(y){return w(y)===s},je.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},je.isForwardRef=function(y){return w(y)===d},je.isFragment=function(y){return w(y)===n},je.isLazy=function(y){return w(y)===g},je.isMemo=function(y){return w(y)===p},je.isPortal=function(y){return w(y)===r},je.isProfiler=function(y){return w(y)===i},je.isStrictMode=function(y){return w(y)===a},je.isSuspense=function(y){return w(y)===f},je.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===u||y===i||y===a||y===f||y===h||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===p||y.$$typeof===s||y.$$typeof===l||y.$$typeof===d||y.$$typeof===m||y.$$typeof===v||y.$$typeof===b||y.$$typeof===x)},je.typeOf=w,je}var Ce={};var w1;function oR(){return w1||(w1=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(D){return typeof D=="string"||typeof D=="function"||D===n||D===u||D===i||D===a||D===f||D===h||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===p||D.$$typeof===s||D.$$typeof===l||D.$$typeof===d||D.$$typeof===m||D.$$typeof===v||D.$$typeof===b||D.$$typeof===x)}function C(D){if(typeof D=="object"&&D!==null){var he=D.$$typeof;switch(he){case t:var Q=D.type;switch(Q){case c:case u:case n:case i:case a:case f:return Q;default:var me=Q&&Q.$$typeof;switch(me){case l:case d:case g:case p:case s:return me;default:return he}}case r:return he}}}var y=c,j=u,S=l,A=s,_=t,I=d,k=n,E=g,T=p,M=r,R=i,$=a,L=f,q=!1;function U(D){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),z(D)||C(D)===c}function z(D){return C(D)===u}function F(D){return C(D)===l}function H(D){return C(D)===s}function W(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function Z(D){return C(D)===d}function re(D){return C(D)===n}function X(D){return C(D)===g}function ne(D){return C(D)===p}function ce(D){return C(D)===r}function G(D){return C(D)===i}function ee(D){return C(D)===a}function J(D){return C(D)===f}Ce.AsyncMode=y,Ce.ConcurrentMode=j,Ce.ContextConsumer=S,Ce.ContextProvider=A,Ce.Element=_,Ce.ForwardRef=I,Ce.Fragment=k,Ce.Lazy=E,Ce.Memo=T,Ce.Portal=M,Ce.Profiler=R,Ce.StrictMode=$,Ce.Suspense=L,Ce.isAsyncMode=U,Ce.isConcurrentMode=z,Ce.isContextConsumer=F,Ce.isContextProvider=H,Ce.isElement=W,Ce.isForwardRef=Z,Ce.isFragment=re,Ce.isLazy=X,Ce.isMemo=ne,Ce.isPortal=ce,Ce.isProfiler=G,Ce.isStrictMode=ee,Ce.isSuspense=J,Ce.isValidElementType=w,Ce.typeOf=C})()),Ce}var j1;function g5(){return j1||(j1=1,process.env.NODE_ENV==="production"?Co.exports=iR():Co.exports=oR()),Co.exports}var _f,C1;function sR(){if(C1)return _f;C1=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return _f=a()?Object.assign:function(i,s){for(var l,c=n(i),u,d=1;d<arguments.length;d++){l=Object(arguments[d]);for(var f in l)t.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var h=0;h<u.length;h++)r.call(l,u[h])&&(c[u[h]]=l[u[h]])}}return c},_f}var kf,S1;function Ox(){if(S1)return kf;S1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return kf=e,kf}var Tf,O1;function v5(){return O1||(O1=1,Tf=Function.call.bind(Object.prototype.hasOwnProperty)),Tf}var Ef,N1;function lR(){if(N1)return Ef;N1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ox(),r={},n=v5();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(i,s,l,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(n(i,d)){var f;try{if(typeof i[d]!="function"){var h=Error((c||"React class")+": "+l+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[d](s,d,c,l,null,t)}catch(g){f=g}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var p=u?u():"";e("Failed "+l+" type: "+f.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Ef=a,Ef}var If,P1;function cR(){if(P1)return If;P1=1;var e=g5(),t=sR(),r=Ox(),n=v5(),a=lR(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return If=function(l,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(z){var F=z&&(u&&z[u]||z[d]);if(typeof F=="function")return F}var h="<<anonymous>>",p={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:w,element:C(),elementType:y(),instanceOf:j,node:I(),objectOf:A,oneOf:S,oneOfType:_,shape:E,exact:T};function g(z,F){return z===F?z!==0||1/z===1/F:z!==z&&F!==F}function x(z,F){this.message=z,this.data=F&&typeof F=="object"?F:{},this.stack=""}x.prototype=Error.prototype;function m(z){if(process.env.NODE_ENV!=="production")var F={},H=0;function W(re,X,ne,ce,G,ee,J){if(ce=ce||h,ee=ee||ne,J!==r){if(c){var D=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw D.name="Invariant Violation",D}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var he=ce+":"+ne;!F[he]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+ce+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[he]=!0,H++)}}return X[ne]==null?re?X[ne]===null?new x("The "+G+" `"+ee+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new x("The "+G+" `"+ee+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:z(X,ne,ce,G,ee)}var Z=W.bind(null,!1);return Z.isRequired=W.bind(null,!0),Z}function v(z){function F(H,W,Z,re,X,ne){var ce=H[W],G=$(ce);if(G!==z){var ee=L(ce);return new x("Invalid "+re+" `"+X+"` of type "+("`"+ee+"` supplied to `"+Z+"`, expected ")+("`"+z+"`."),{expectedType:z})}return null}return m(F)}function b(){return m(s)}function w(z){function F(H,W,Z,re,X){if(typeof z!="function")return new x("Property `"+X+"` of component `"+Z+"` has invalid PropType notation inside arrayOf.");var ne=H[W];if(!Array.isArray(ne)){var ce=$(ne);return new x("Invalid "+re+" `"+X+"` of type "+("`"+ce+"` supplied to `"+Z+"`, expected an array."))}for(var G=0;G<ne.length;G++){var ee=z(ne,G,Z,re,X+"["+G+"]",r);if(ee instanceof Error)return ee}return null}return m(F)}function C(){function z(F,H,W,Z,re){var X=F[H];if(!l(X)){var ne=$(X);return new x("Invalid "+Z+" `"+re+"` of type "+("`"+ne+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return m(z)}function y(){function z(F,H,W,Z,re){var X=F[H];if(!e.isValidElementType(X)){var ne=$(X);return new x("Invalid "+Z+" `"+re+"` of type "+("`"+ne+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return m(z)}function j(z){function F(H,W,Z,re,X){if(!(H[W]instanceof z)){var ne=z.name||h,ce=U(H[W]);return new x("Invalid "+re+" `"+X+"` of type "+("`"+ce+"` supplied to `"+Z+"`, expected ")+("instance of `"+ne+"`."))}return null}return m(F)}function S(z){if(!Array.isArray(z))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function F(H,W,Z,re,X){for(var ne=H[W],ce=0;ce<z.length;ce++)if(g(ne,z[ce]))return null;var G=JSON.stringify(z,function(J,D){var he=L(D);return he==="symbol"?String(D):D});return new x("Invalid "+re+" `"+X+"` of value `"+String(ne)+"` "+("supplied to `"+Z+"`, expected one of "+G+"."))}return m(F)}function A(z){function F(H,W,Z,re,X){if(typeof z!="function")return new x("Property `"+X+"` of component `"+Z+"` has invalid PropType notation inside objectOf.");var ne=H[W],ce=$(ne);if(ce!=="object")return new x("Invalid "+re+" `"+X+"` of type "+("`"+ce+"` supplied to `"+Z+"`, expected an object."));for(var G in ne)if(n(ne,G)){var ee=z(ne,G,Z,re,X+"."+G,r);if(ee instanceof Error)return ee}return null}return m(F)}function _(z){if(!Array.isArray(z))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var F=0;F<z.length;F++){var H=z[F];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(H)+" at index "+F+"."),s}function W(Z,re,X,ne,ce){for(var G=[],ee=0;ee<z.length;ee++){var J=z[ee],D=J(Z,re,X,ne,ce,r);if(D==null)return null;D.data&&n(D.data,"expectedType")&&G.push(D.data.expectedType)}var he=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new x("Invalid "+ne+" `"+ce+"` supplied to "+("`"+X+"`"+he+"."))}return m(W)}function I(){function z(F,H,W,Z,re){return M(F[H])?null:new x("Invalid "+Z+" `"+re+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return m(z)}function k(z,F,H,W,Z){return new x((z||"React class")+": "+F+" type `"+H+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Z+"`.")}function E(z){function F(H,W,Z,re,X){var ne=H[W],ce=$(ne);if(ce!=="object")return new x("Invalid "+re+" `"+X+"` of type `"+ce+"` "+("supplied to `"+Z+"`, expected `object`."));for(var G in z){var ee=z[G];if(typeof ee!="function")return k(Z,re,X,G,L(ee));var J=ee(ne,G,Z,re,X+"."+G,r);if(J)return J}return null}return m(F)}function T(z){function F(H,W,Z,re,X){var ne=H[W],ce=$(ne);if(ce!=="object")return new x("Invalid "+re+" `"+X+"` of type `"+ce+"` "+("supplied to `"+Z+"`, expected `object`."));var G=t({},H[W],z);for(var ee in G){var J=z[ee];if(n(z,ee)&&typeof J!="function")return k(Z,re,X,ee,L(J));if(!J)return new x("Invalid "+re+" `"+X+"` key `"+ee+"` supplied to `"+Z+"`.\nBad object: "+JSON.stringify(H[W],null," ")+`
|
|
64
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
59
|
+
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(A.x,",").concat(A.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},J$={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},x5=function(t){var r=x1(x1({},J$),t),n=r.cx,a=r.cy,i=r.innerRadius,s=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,d=r.startAngle,f=r.endAngle,h=r.className;if(s<i||d===f)return null;var p=ae.default("recharts-sector",h),g=s-i,x=ct(l,g,0,!0),m;return x>0&&Math.abs(d-f)<360?m=Q$({cx:n,cy:a,innerRadius:i,outerRadius:s,cornerRadius:Math.min(x,g/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):m=m5({cx:n,cy:a,innerRadius:i,outerRadius:s,startAngle:d,endAngle:f}),O.default.createElement("path",ap({},oe(r,!0),{className:p,d:m,role:"img"}))};function Ti(e){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(e)}function ip(){return ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ip.apply(this,arguments)}function g1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function v1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(r),!0).forEach(function(n){eR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eR(e,t,r){return t=tR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tR(e){var t=rR(e,"string");return Ti(t)=="symbol"?t:t+""}function rR(e,t){if(Ti(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y1={curveBasisClosed:C8,curveBasisOpen:S8,curveBasis:j8,curveBumpX:l8,curveBumpY:c8,curveLinearClosed:O8,curveLinear:Sl,curveMonotoneX:N8,curveMonotoneY:P8,curveNatural:A8,curveStep:_8,curveStepAfter:T8,curveStepBefore:k8},wo=function(t){return t.x===+t.x&&t.y===+t.y},Ua=function(t){return t.x},Ka=function(t){return t.y},nR=function(t,r){if(le(t))return t;var n="curve".concat(jl(t));return(n==="curveMonotone"||n==="curveBump")&&r?y1["".concat(n).concat(r==="vertical"?"Y":"X")]:y1[n]||Sl},aR=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,s=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=nR(n,l),f=u?i.filter(function(x){return wo(x)}):i,h;if(Array.isArray(s)){var p=u?s.filter(function(x){return wo(x)}):s,g=f.map(function(x,m){return v1(v1({},x),{},{base:p[m]})});return l==="vertical"?h=fo().y(Ka).x1(Ua).x0(function(x){return x.base.x}):h=fo().x(Ua).y1(Ka).y0(function(x){return x.base.y}),h.defined(wo).curve(d),h(g)}return l==="vertical"&&Z(s)?h=fo().y(Ka).x1(Ua).x0(s):Z(s)?h=fo().x(Ua).y1(Ka).y0(s):h=fC().x(Ua).y(Ka),h.defined(wo).curve(d),h(f)},ln=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var s=n&&n.length?aR(t):a;return O.createElement("path",ip({},oe(t,!1),Do(t),{className:ae.default("recharts-curve",r),d:s,ref:i}))},jo={exports:{}},Co={exports:{}},we={};var b1;function iR(){if(b1)return we;b1=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(y){if(typeof y=="object"&&y!==null){var j=y.$$typeof;switch(j){case t:switch(y=y.type,y){case c:case u:case n:case i:case a:case f:return y;default:switch(y=y&&y.$$typeof,y){case l:case d:case g:case p:case s:return y;default:return j}}case r:return j}}}function C(y){return w(y)===u}return we.AsyncMode=c,we.ConcurrentMode=u,we.ContextConsumer=l,we.ContextProvider=s,we.Element=t,we.ForwardRef=d,we.Fragment=n,we.Lazy=g,we.Memo=p,we.Portal=r,we.Profiler=i,we.StrictMode=a,we.Suspense=f,we.isAsyncMode=function(y){return C(y)||w(y)===c},we.isConcurrentMode=C,we.isContextConsumer=function(y){return w(y)===l},we.isContextProvider=function(y){return w(y)===s},we.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},we.isForwardRef=function(y){return w(y)===d},we.isFragment=function(y){return w(y)===n},we.isLazy=function(y){return w(y)===g},we.isMemo=function(y){return w(y)===p},we.isPortal=function(y){return w(y)===r},we.isProfiler=function(y){return w(y)===i},we.isStrictMode=function(y){return w(y)===a},we.isSuspense=function(y){return w(y)===f},we.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===u||y===i||y===a||y===f||y===h||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===p||y.$$typeof===s||y.$$typeof===l||y.$$typeof===d||y.$$typeof===m||y.$$typeof===v||y.$$typeof===b||y.$$typeof===x)},we.typeOf=w,we}var je={};var w1;function oR(){return w1||(w1=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(z){return typeof z=="string"||typeof z=="function"||z===n||z===u||z===i||z===a||z===f||z===h||typeof z=="object"&&z!==null&&(z.$$typeof===g||z.$$typeof===p||z.$$typeof===s||z.$$typeof===l||z.$$typeof===d||z.$$typeof===m||z.$$typeof===v||z.$$typeof===b||z.$$typeof===x)}function C(z){if(typeof z=="object"&&z!==null){var pe=z.$$typeof;switch(pe){case t:var Y=z.type;switch(Y){case c:case u:case n:case i:case a:case f:return Y;default:var Ne=Y&&Y.$$typeof;switch(Ne){case l:case d:case g:case p:case s:return Ne;default:return pe}}case r:return pe}}}var y=c,j=u,S=l,A=s,_=t,I=d,k=n,E=g,T=p,M=r,R=i,$=a,L=f,q=!1;function U(z){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(z)||C(z)===c}function D(z){return C(z)===u}function B(z){return C(z)===l}function W(z){return C(z)===s}function G(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function Q(z){return C(z)===d}function ne(z){return C(z)===n}function X(z){return C(z)===g}function re(z){return C(z)===p}function ce(z){return C(z)===r}function K(z){return C(z)===i}function J(z){return C(z)===a}function ee(z){return C(z)===f}je.AsyncMode=y,je.ConcurrentMode=j,je.ContextConsumer=S,je.ContextProvider=A,je.Element=_,je.ForwardRef=I,je.Fragment=k,je.Lazy=E,je.Memo=T,je.Portal=M,je.Profiler=R,je.StrictMode=$,je.Suspense=L,je.isAsyncMode=U,je.isConcurrentMode=D,je.isContextConsumer=B,je.isContextProvider=W,je.isElement=G,je.isForwardRef=Q,je.isFragment=ne,je.isLazy=X,je.isMemo=re,je.isPortal=ce,je.isProfiler=K,je.isStrictMode=J,je.isSuspense=ee,je.isValidElementType=w,je.typeOf=C})()),je}var j1;function g5(){return j1||(j1=1,process.env.NODE_ENV==="production"?Co.exports=iR():Co.exports=oR()),Co.exports}var _f,C1;function sR(){if(C1)return _f;C1=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(d){return s[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return _f=a()?Object.assign:function(i,s){for(var l,c=n(i),u,d=1;d<arguments.length;d++){l=Object(arguments[d]);for(var f in l)t.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var h=0;h<u.length;h++)r.call(l,u[h])&&(c[u[h]]=l[u[h]])}}return c},_f}var kf,S1;function Ox(){if(S1)return kf;S1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return kf=e,kf}var Tf,O1;function v5(){return O1||(O1=1,Tf=Function.call.bind(Object.prototype.hasOwnProperty)),Tf}var Ef,N1;function lR(){if(N1)return Ef;N1=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ox(),r={},n=v5();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(i,s,l,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(n(i,d)){var f;try{if(typeof i[d]!="function"){var h=Error((c||"React class")+": "+l+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[d](s,d,c,l,null,t)}catch(g){f=g}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var p=u?u():"";e("Failed "+l+" type: "+f.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Ef=a,Ef}var If,P1;function cR(){if(P1)return If;P1=1;var e=g5(),t=sR(),r=Ox(),n=v5(),a=lR(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return If=function(l,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(D){var B=D&&(u&&D[u]||D[d]);if(typeof B=="function")return B}var h="<<anonymous>>",p={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:w,element:C(),elementType:y(),instanceOf:j,node:I(),objectOf:A,oneOf:S,oneOfType:_,shape:E,exact:T};function g(D,B){return D===B?D!==0||1/D===1/B:D!==D&&B!==B}function x(D,B){this.message=D,this.data=B&&typeof B=="object"?B:{},this.stack=""}x.prototype=Error.prototype;function m(D){if(process.env.NODE_ENV!=="production")var B={},W=0;function G(ne,X,re,ce,K,J,ee){if(ce=ce||h,J=J||re,ee!==r){if(c){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=ce+":"+re;!B[pe]&&W<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+ce+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[pe]=!0,W++)}}return X[re]==null?ne?X[re]===null?new x("The "+K+" `"+J+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new x("The "+K+" `"+J+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:D(X,re,ce,K,J)}var Q=G.bind(null,!1);return Q.isRequired=G.bind(null,!0),Q}function v(D){function B(W,G,Q,ne,X,re){var ce=W[G],K=$(ce);if(K!==D){var J=L(ce);return new x("Invalid "+ne+" `"+X+"` of type "+("`"+J+"` supplied to `"+Q+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return m(B)}function b(){return m(s)}function w(D){function B(W,G,Q,ne,X){if(typeof D!="function")return new x("Property `"+X+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var re=W[G];if(!Array.isArray(re)){var ce=$(re);return new x("Invalid "+ne+" `"+X+"` of type "+("`"+ce+"` supplied to `"+Q+"`, expected an array."))}for(var K=0;K<re.length;K++){var J=D(re,K,Q,ne,X+"["+K+"]",r);if(J instanceof Error)return J}return null}return m(B)}function C(){function D(B,W,G,Q,ne){var X=B[W];if(!l(X)){var re=$(X);return new x("Invalid "+Q+" `"+ne+"` of type "+("`"+re+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return m(D)}function y(){function D(B,W,G,Q,ne){var X=B[W];if(!e.isValidElementType(X)){var re=$(X);return new x("Invalid "+Q+" `"+ne+"` of type "+("`"+re+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return m(D)}function j(D){function B(W,G,Q,ne,X){if(!(W[G]instanceof D)){var re=D.name||h,ce=U(W[G]);return new x("Invalid "+ne+" `"+X+"` of type "+("`"+ce+"` supplied to `"+Q+"`, expected ")+("instance of `"+re+"`."))}return null}return m(B)}function S(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function B(W,G,Q,ne,X){for(var re=W[G],ce=0;ce<D.length;ce++)if(g(re,D[ce]))return null;var K=JSON.stringify(D,function(ee,z){var pe=L(z);return pe==="symbol"?String(z):z});return new x("Invalid "+ne+" `"+X+"` of value `"+String(re)+"` "+("supplied to `"+Q+"`, expected one of "+K+"."))}return m(B)}function A(D){function B(W,G,Q,ne,X){if(typeof D!="function")return new x("Property `"+X+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var re=W[G],ce=$(re);if(ce!=="object")return new x("Invalid "+ne+" `"+X+"` of type "+("`"+ce+"` supplied to `"+Q+"`, expected an object."));for(var K in re)if(n(re,K)){var J=D(re,K,Q,ne,X+"."+K,r);if(J instanceof Error)return J}return null}return m(B)}function _(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var B=0;B<D.length;B++){var W=D[B];if(typeof W!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(W)+" at index "+B+"."),s}function G(Q,ne,X,re,ce){for(var K=[],J=0;J<D.length;J++){var ee=D[J],z=ee(Q,ne,X,re,ce,r);if(z==null)return null;z.data&&n(z.data,"expectedType")&&K.push(z.data.expectedType)}var pe=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new x("Invalid "+re+" `"+ce+"` supplied to "+("`"+X+"`"+pe+"."))}return m(G)}function I(){function D(B,W,G,Q,ne){return M(B[W])?null:new x("Invalid "+Q+" `"+ne+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return m(D)}function k(D,B,W,G,Q){return new x((D||"React class")+": "+B+" type `"+W+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function E(D){function B(W,G,Q,ne,X){var re=W[G],ce=$(re);if(ce!=="object")return new x("Invalid "+ne+" `"+X+"` of type `"+ce+"` "+("supplied to `"+Q+"`, expected `object`."));for(var K in D){var J=D[K];if(typeof J!="function")return k(Q,ne,X,K,L(J));var ee=J(re,K,Q,ne,X+"."+K,r);if(ee)return ee}return null}return m(B)}function T(D){function B(W,G,Q,ne,X){var re=W[G],ce=$(re);if(ce!=="object")return new x("Invalid "+ne+" `"+X+"` of type `"+ce+"` "+("supplied to `"+Q+"`, expected `object`."));var K=t({},W[G],D);for(var J in K){var ee=D[J];if(n(D,J)&&typeof ee!="function")return k(Q,ne,X,J,L(ee));if(!ee)return new x("Invalid "+ne+" `"+X+"` key `"+J+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(W[G],null," ")+`
|
|
60
|
+
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var z=ee(re,J,Q,ne,X+"."+J,r);if(z)return z}return null}return m(B)}function M(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(M);if(D===null||l(D))return!0;var B=f(D);if(B){var W=B.call(D),G;if(B!==D.entries){for(;!(G=W.next()).done;)if(!M(G.value))return!1}else for(;!(G=W.next()).done;){var Q=G.value;if(Q&&!M(Q[1]))return!1}}else return!1;return!0;default:return!1}}function R(D,B){return D==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function $(D){var B=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":R(B,D)?"symbol":B}function L(D){if(typeof D>"u"||D===null)return""+D;var B=$(D);if(B==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return B}function q(D){var B=L(D);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function U(D){return!D.constructor||!D.constructor.name?h:D.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},If}var Mf,A1;function uR(){if(A1)return Mf;A1=1;var e=Ox();function t(){}function r(){}return r.resetWarningCache=t,Mf=function(){function n(s,l,c,u,d,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},Mf}var _1;function dR(){if(_1)return jo.exports;if(_1=1,process.env.NODE_ENV!=="production"){var e=g5(),t=!0;jo.exports=cR()(e.isElement,t)}else jo.exports=uR()();return jo.exports}var fR=dR();const Ce=Oe(fR),{getOwnPropertyNames:hR,getOwnPropertySymbols:pR}=Object,{hasOwnProperty:mR}=Object.prototype;function $f(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function So(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);const{cache:i}=a,s=i.get(r),l=i.get(n);if(s&&l)return s===n&&l===r;i.set(r,n),i.set(n,r);const c=e(r,n,a);return i.delete(r),i.delete(n),c}}function xR(e){return e?.[Symbol.toStringTag]}function k1(e){return hR(e).concat(pR(e))}const gR=Object.hasOwn||((e,t)=>mR.call(e,t));function Cn(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const vR="__v",yR="__o",bR="_owner",{getOwnPropertyDescriptor:T1,keys:E1}=Object;function wR(e,t){return e.byteLength===t.byteLength&&ps(new Uint8Array(e),new Uint8Array(t))}function jR(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function CR(e,t){return e.byteLength===t.byteLength&&ps(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function SR(e,t){return Cn(e.getTime(),t.getTime())}function OR(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function NR(e,t){return e===t}function I1(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const a=new Array(n),i=e.entries();let s,l,c=0;for(;(s=i.next())&&!s.done;){const u=t.entries();let d=!1,f=0;for(;(l=u.next())&&!l.done;){if(a[f]){f++;continue}const h=s.value,p=l.value;if(r.equals(h[0],p[0],c,f,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){d=a[f]=!0;break}f++}if(!d)return!1;c++}return!0}const PR=Cn;function AR(e,t,r){const n=E1(e);let a=n.length;if(E1(t).length!==a)return!1;for(;a-- >0;)if(!y5(e,t,r,n[a]))return!1;return!0}function Ga(e,t,r){const n=k1(e);let a=n.length;if(k1(t).length!==a)return!1;let i,s,l;for(;a-- >0;)if(i=n[a],!y5(e,t,r,i)||(s=T1(e,i),l=T1(t,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function _R(e,t){return Cn(e.valueOf(),t.valueOf())}function kR(e,t){return e.source===t.source&&e.flags===t.flags}function M1(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const a=new Array(n),i=e.values();let s,l;for(;(s=i.next())&&!s.done;){const c=t.values();let u=!1,d=0;for(;(l=c.next())&&!l.done;){if(!a[d]&&r.equals(s.value,l.value,s.value,l.value,e,t,r)){u=a[d]=!0;break}d++}if(!u)return!1}return!0}function ps(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function TR(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function y5(e,t,r,n){return(n===bR||n===yR||n===vR)&&(e.$$typeof||t.$$typeof)?!0:gR(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const ER="[object ArrayBuffer]",IR="[object Arguments]",MR="[object Boolean]",$R="[object DataView]",RR="[object Date]",LR="[object Error]",DR="[object Map]",zR="[object Number]",BR="[object Object]",FR="[object RegExp]",qR="[object Set]",WR="[object String]",HR={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},VR="[object URL]",UR=Object.prototype.toString;function KR({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:l,areObjectsEqual:c,arePrimitiveWrappersEqual:u,areRegExpsEqual:d,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:g}){return function(m,v,b){if(m===v)return!0;if(m==null||v==null)return!1;const w=typeof m;if(w!==typeof v)return!1;if(w!=="object")return w==="number"?l(m,v,b):w==="function"?i(m,v,b):!1;const C=m.constructor;if(C!==v.constructor)return!1;if(C===Object)return c(m,v,b);if(Array.isArray(m))return t(m,v,b);if(C===Date)return n(m,v,b);if(C===RegExp)return d(m,v,b);if(C===Map)return s(m,v,b);if(C===Set)return f(m,v,b);const y=UR.call(m);if(y===RR)return n(m,v,b);if(y===FR)return d(m,v,b);if(y===DR)return s(m,v,b);if(y===qR)return f(m,v,b);if(y===BR)return typeof m.then!="function"&&typeof v.then!="function"&&c(m,v,b);if(y===VR)return p(m,v,b);if(y===LR)return a(m,v,b);if(y===IR)return c(m,v,b);if(HR[y])return h(m,v,b);if(y===ER)return e(m,v,b);if(y===$R)return r(m,v,b);if(y===MR||y===zR||y===WR)return u(m,v,b);if(g){let j=g[y];if(!j){const S=xR(m);S&&(j=g[S])}if(j)return j(m,v,b)}return!1}}function GR({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:wR,areArraysEqual:r?Ga:jR,areDataViewsEqual:CR,areDatesEqual:SR,areErrorsEqual:OR,areFunctionsEqual:NR,areMapsEqual:r?$f(I1,Ga):I1,areNumbersEqual:PR,areObjectsEqual:r?Ga:AR,arePrimitiveWrappersEqual:_R,areRegExpsEqual:kR,areSetsEqual:r?$f(M1,Ga):M1,areTypedArraysEqual:r?$f(ps,Ga):ps,areUrlsEqual:TR,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const a=So(n.areArraysEqual),i=So(n.areMapsEqual),s=So(n.areObjectsEqual),l=So(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return n}function ZR(e){return function(t,r,n,a,i,s,l){return e(t,r,l)}}function YR({circular:e,comparator:t,createState:r,equals:n,strict:a}){if(r)return function(l,c){const{cache:u=e?new WeakMap:void 0,meta:d}=r();return t(l,c,{cache:u,equals:n,meta:d,strict:a})};if(e)return function(l,c){return t(l,c,{cache:new WeakMap,equals:n,meta:void 0,strict:a})};const i={cache:void 0,equals:n,meta:void 0,strict:a};return function(l,c){return t(l,c,i)}}const XR=qr();qr({strict:!0});qr({circular:!0});qr({circular:!0,strict:!0});qr({createInternalComparator:()=>Cn});qr({strict:!0,createInternalComparator:()=>Cn});qr({circular:!0,createInternalComparator:()=>Cn});qr({circular:!0,createInternalComparator:()=>Cn,strict:!0});function qr(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:a=!1}=e,i=GR(e),s=KR(i),l=r?r(s):ZR(s);return YR({circular:t,comparator:s,createState:n,equals:l,strict:a})}function QR(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function $1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):QR(a)};requestAnimationFrame(n)}function op(e){"@babel/helpers - typeof";return op=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},op(e)}function JR(e){return nL(e)||rL(e)||tL(e)||eL()}function eL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
65
61
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tL(e,t){if(e){if(typeof e=="string")return R1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R1(e,t)}}function R1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nL(e){if(Array.isArray(e))return e}function aL(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var s=i,l=JR(s),c=l[0],u=l.slice(1);if(typeof c=="number"){$1(a.bind(null,u),c);return}a(c),$1(a.bind(null,u));return}op(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Ei(e){"@babel/helpers - typeof";return Ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ei(e)}function L1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function D1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L1(Object(r),!0).forEach(function(n){b5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b5(e,t,r){return t=iL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iL(e){var t=oL(e,"string");return Ei(t)==="symbol"?t:String(t)}function oL(e,t){if(Ei(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ei(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sL=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},lL=function(t){return t},cL=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ni=function(t,r){return Object.keys(r).reduce(function(n,a){return D1(D1({},n),{},b5({},a,t(a,r[a])))},{})},z1=function(t,r,n){return t.map(function(a){return"".concat(cL(a)," ").concat(r,"ms ").concat(n)}).join(",")},uL=process.env.NODE_ENV!=="production",ms=function(t,r,n,a,i,s,l,c){if(uL&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,a,i,s,l,c],d=0;console.warn(r.replace(/%s/g,function(){return u[d++]}))}};function dL(e,t){return pL(e)||hL(e,t)||w5(e,t)||fL()}function fL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
62
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function pL(e){if(Array.isArray(e))return e}function mL(e){return vL(e)||gL(e)||w5(e)||xL()}function xL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
67
63
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w5(e,t){if(e){if(typeof e=="string")return sp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sp(e,t)}}function gL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vL(e){if(Array.isArray(e))return sp(e)}function sp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var xs=1e-4,j5=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},C5=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},B1=function(t,r){return function(n){var a=j5(t,r);return C5(a,n)}},yL=function(t,r){return function(n){var a=j5(t,r),i=[].concat(mL(a.map(function(s,l){return s*l}).slice(1)),[0]);return C5(i,n)}},F1=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],s=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,s=1,l=1;break;case"ease":a=.25,i=.1,s=.25,l=1;break;case"ease-in":a=.42,i=0,s=1,l=1;break;case"ease-out":a=.42,i=0,s=.58,l=1;break;case"ease-in-out":a=0,i=0,s=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(m){return parseFloat(m)}),d=dL(u,4);a=d[0],i=d[1],s=d[2],l=d[3]}else ms(!1,"[configBezier]: arguments should be one of oneOf 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', instead received %s",r)}}ms([a,s,i,l].every(function(m){return typeof m=="number"&&m>=0&&m<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",r);var f=B1(a,s),h=B1(i,l),p=yL(a,s),g=function(v){return v>1?1:v<0?0:v},x=function(v){for(var b=v>1?1:v,w=b,C=0;C<8;++C){var y=f(w)-b,j=p(w);if(Math.abs(y-b)<xs||j<xs)return h(w);w=g(w-y/j)}return h(w)};return x.isStepper=!1,x},bL=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,s=t.dt,l=s===void 0?17:s,c=function(d,f,h){var p=-(d-f)*n,g=h*i,x=h+(p-g)*l/1e3,m=h*l/1e3+d;return Math.abs(m-f)<xs&&Math.abs(x)<xs?[f,0]:[m,x]};return c.isStepper=!0,c.dt=l,c},wL=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return F1(a);case"spring":return bL();default:if(a.split("(")[0]==="cubic-bezier")return F1(a);ms(!1,"[configEasing]: first argument should be one of 'ease', 'ease-in', 'ease-out', 'ease-in-out','cubic-bezier(x1,y1,x2,y2)', 'linear' and 'spring', instead received %s",r)}return typeof a=="function"?a:(ms(!1,"[configEasing]: first argument type should be function or string, instead received %s",r),null)};function Ii(e){"@babel/helpers - typeof";return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ii(e)}function q1(e){return SL(e)||CL(e)||S5(e)||jL()}function jL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
68
64
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SL(e){if(Array.isArray(e))return cp(e)}function W1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?W1(Object(r),!0).forEach(function(n){lp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lp(e,t,r){return t=OL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OL(e){var t=NL(e,"string");return Ii(t)==="symbol"?t:String(t)}function NL(e,t){if(Ii(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ii(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PL(e,t){return kL(e)||_L(e,t)||S5(e,t)||AL()}function AL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
69
65
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S5(e,t){if(e){if(typeof e=="string")return cp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cp(e,t)}}function cp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _L(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function kL(e){if(Array.isArray(e))return e}var gs=function(t,r,n){return t+(r-t)*n},up=function(t){var r=t.from,n=t.to;return r!==n},TL=function e(t,r,n){var a=ni(function(i,s){if(up(s)){var l=t(s.from,s.to,s.velocity),c=PL(l,2),u=c[0],d=c[1];return rt(rt({},s),{},{from:u,velocity:d})}return s},r);return n<1?ni(function(i,s){return up(s)?rt(rt({},s),{},{velocity:gs(s.velocity,a[i].velocity,n),from:gs(s.from,a[i].from,n)}):s},r):e(t,a,n-1)};const EL=(function(e,t,r,n,a){var i=sL(e,t),s=i.reduce(function(m,v){return rt(rt({},m),{},lp({},v,[e[v],t[v]]))},{}),l=i.reduce(function(m,v){return rt(rt({},m),{},lp({},v,{from:e[v],velocity:0,to:t[v]}))},{}),c=-1,u,d,f=function(){return null},h=function(){return ni(function(v,b){return b.from},l)},p=function(){return!Object.values(l).filter(up).length},g=function(v){u||(u=v);var b=v-u,w=b/r.dt;l=TL(r,l,w),a(rt(rt(rt({},e),t),h())),u=v,p()||(c=requestAnimationFrame(f))},x=function(v){d||(d=v);var b=(v-d)/n,w=ni(function(y,j){return gs.apply(void 0,q1(j).concat([r(b)]))},s);if(a(rt(rt(rt({},e),t),w)),b<1)c=requestAnimationFrame(f);else{var C=ni(function(y,j){return gs.apply(void 0,q1(j).concat([r(1)]))},s);a(rt(rt(rt({},e),t),C))}};return f=r.isStepper?g:x,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}});function na(e){"@babel/helpers - typeof";return na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(e)}var IL=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function ML(e,t){if(e==null)return{};var r=$L(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $L(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Rf(e){return zL(e)||DL(e)||LL(e)||RL()}function RL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
70
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LL(e,t){if(e){if(typeof e=="string")return dp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dp(e,t)}}function DL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zL(e){if(Array.isArray(e))return dp(e)}function dp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function H1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H1(Object(r),!0).forEach(function(n){Ja(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ja(e,t,r){return t=O5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O5(n.key),n)}}function qL(e,t,r){return t&&FL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function O5(e){var t=WL(e,"string");return na(t)==="symbol"?t:String(t)}function WL(e,t){if(na(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(na(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fp(e,t)}function fp(e,t){return fp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},fp(e,t)}function VL(e){var t=UL();return function(){var n=vs(e),a;if(t){var i=vs(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return hp(this,a)}}function hp(e,t){if(t&&(na(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pp(e)}function pp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UL(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vs(e)}var Ot=(function(e){HL(r,e);var t=VL(r);function r(n,a){var i;BL(this,r),i=t.call(this,n,a);var s=i.props,l=s.isActive,c=s.attributeName,u=s.from,d=s.to,f=s.steps,h=s.children,p=s.duration;if(i.handleStyleChange=i.handleStyleChange.bind(pp(i)),i.changeStyle=i.changeStyle.bind(pp(i)),!l||p<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:d}),hp(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof h=="function")return i.state={style:u},hp(i);i.state={style:c?Ja({},c,u):u}}else i.state={style:{}};return i}return qL(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,s=a.canBegin;this.mounted=!0,!(!i||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,s=i.isActive,l=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,d=i.to,f=i.from,h=this.state.style;if(l){if(!s){var p={style:c?Ja({},c,d):d};this.state&&h&&(c&&h[c]!==d||!c&&h!==d)&&this.setState(p);return}if(!(XR(a.to,d)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=g||u?f:a.to;if(this.state&&h){var m={style:c?Ja({},c,x):x};(c&&h[c]!==x||!c&&h!==x)&&this.setState(m)}this.runAnimation(Rt(Rt({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,s=a.from,l=a.to,c=a.duration,u=a.easing,d=a.begin,f=a.onAnimationEnd,h=a.onAnimationStart,p=EL(s,l,wL(u),c,this.changeStyle),g=function(){i.stopJSAnimation=p()};this.manager.start([h,d,g,c,f])}},{key:"runStepAnimation",value:function(a){var i=this,s=a.steps,l=a.begin,c=a.onAnimationStart,u=s[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(x,m,v){if(v===0)return x;var b=m.duration,w=m.easing,C=w===void 0?"ease":w,y=m.style,j=m.properties,S=m.onAnimationEnd,A=v>0?s[v-1]:m,_=j||Object.keys(y);if(typeof C=="function"||C==="spring")return[].concat(Rf(x),[i.runJSAnimation.bind(i,{from:A.style,to:y,duration:b,easing:C}),b]);var I=z1(_,b,C),k=Rt(Rt(Rt({},A.style),y),{},{transition:I});return[].concat(Rf(x),[k,b,S]).filter(lL)};return this.manager.start([c].concat(Rf(s.reduce(p,[d,Math.max(h,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=aL());var i=a.begin,s=a.duration,l=a.attributeName,c=a.to,u=a.easing,d=a.onAnimationStart,f=a.onAnimationEnd,h=a.steps,p=a.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var x=l?Ja({},l,c):c,m=z1(Object.keys(x),s,u);g.start([d,i,Rt(Rt({},x),{},{transition:m}),s,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var s=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=ML(a,IL),u=P.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!l||u===0||s<=0)return i;var f=function(p){var g=p.props,x=g.style,m=x===void 0?{}:x,v=g.className,b=P.cloneElement(p,Rt(Rt({},c),{},{style:Rt(Rt({},m),d),className:v}));return b};return u===1?f(P.Children.only(i)):O.default.createElement("div",null,P.Children.map(i,function(h){return f(h)}))}}]),r})(P.PureComponent);Ot.displayName="Animate";Ot.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ot.propTypes={from:
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LL(e,t){if(e){if(typeof e=="string")return dp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dp(e,t)}}function DL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zL(e){if(Array.isArray(e))return dp(e)}function dp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function H1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H1(Object(r),!0).forEach(function(n){Ja(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ja(e,t,r){return t=O5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O5(n.key),n)}}function qL(e,t,r){return t&&FL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function O5(e){var t=WL(e,"string");return na(t)==="symbol"?t:String(t)}function WL(e,t){if(na(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(na(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fp(e,t)}function fp(e,t){return fp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},fp(e,t)}function VL(e){var t=UL();return function(){var n=vs(e),a;if(t){var i=vs(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return hp(this,a)}}function hp(e,t){if(t&&(na(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pp(e)}function pp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UL(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vs(e){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vs(e)}var Ot=(function(e){HL(r,e);var t=VL(r);function r(n,a){var i;BL(this,r),i=t.call(this,n,a);var s=i.props,l=s.isActive,c=s.attributeName,u=s.from,d=s.to,f=s.steps,h=s.children,p=s.duration;if(i.handleStyleChange=i.handleStyleChange.bind(pp(i)),i.changeStyle=i.changeStyle.bind(pp(i)),!l||p<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:d}),hp(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof h=="function")return i.state={style:u},hp(i);i.state={style:c?Ja({},c,u):u}}else i.state={style:{}};return i}return qL(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,s=a.canBegin;this.mounted=!0,!(!i||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,s=i.isActive,l=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,d=i.to,f=i.from,h=this.state.style;if(l){if(!s){var p={style:c?Ja({},c,d):d};this.state&&h&&(c&&h[c]!==d||!c&&h!==d)&&this.setState(p);return}if(!(XR(a.to,d)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=g||u?f:a.to;if(this.state&&h){var m={style:c?Ja({},c,x):x};(c&&h[c]!==x||!c&&h!==x)&&this.setState(m)}this.runAnimation(Rt(Rt({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,s=a.from,l=a.to,c=a.duration,u=a.easing,d=a.begin,f=a.onAnimationEnd,h=a.onAnimationStart,p=EL(s,l,wL(u),c,this.changeStyle),g=function(){i.stopJSAnimation=p()};this.manager.start([h,d,g,c,f])}},{key:"runStepAnimation",value:function(a){var i=this,s=a.steps,l=a.begin,c=a.onAnimationStart,u=s[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(x,m,v){if(v===0)return x;var b=m.duration,w=m.easing,C=w===void 0?"ease":w,y=m.style,j=m.properties,S=m.onAnimationEnd,A=v>0?s[v-1]:m,_=j||Object.keys(y);if(typeof C=="function"||C==="spring")return[].concat(Rf(x),[i.runJSAnimation.bind(i,{from:A.style,to:y,duration:b,easing:C}),b]);var I=z1(_,b,C),k=Rt(Rt(Rt({},A.style),y),{},{transition:I});return[].concat(Rf(x),[k,b,S]).filter(lL)};return this.manager.start([c].concat(Rf(s.reduce(p,[d,Math.max(h,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=aL());var i=a.begin,s=a.duration,l=a.attributeName,c=a.to,u=a.easing,d=a.onAnimationStart,f=a.onAnimationEnd,h=a.steps,p=a.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var x=l?Ja({},l,c):c,m=z1(Object.keys(x),s,u);g.start([d,i,Rt(Rt({},x),{},{transition:m}),s,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var s=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=ML(a,IL),u=P.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!l||u===0||s<=0)return i;var f=function(p){var g=p.props,x=g.style,m=x===void 0?{}:x,v=g.className,b=P.cloneElement(p,Rt(Rt({},c),{},{style:Rt(Rt({},m),d),className:v}));return b};return u===1?f(P.Children.only(i)):O.default.createElement("div",null,P.Children.map(i,function(h){return f(h)}))}}]),r})(P.PureComponent);Ot.displayName="Animate";Ot.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ot.propTypes={from:Ce.oneOfType([Ce.object,Ce.string]),to:Ce.oneOfType([Ce.object,Ce.string]),attributeName:Ce.string,duration:Ce.number,begin:Ce.number,easing:Ce.oneOfType([Ce.string,Ce.func]),steps:Ce.arrayOf(Ce.shape({duration:Ce.number.isRequired,style:Ce.object.isRequired,easing:Ce.oneOfType([Ce.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ce.func]),properties:Ce.arrayOf("string"),onAnimationEnd:Ce.func})),children:Ce.oneOfType([Ce.node,Ce.func]),isActive:Ce.bool,canBegin:Ce.bool,onAnimationEnd:Ce.func,shouldReAnimate:Ce.bool,onAnimationStart:Ce.func,onAnimationReStart:Ce.func};function Mi(e){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(e)}function ys(){return ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ys.apply(this,arguments)}function KL(e,t){return XL(e)||YL(e,t)||ZL(e,t)||GL()}function GL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
71
67
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZL(e,t){if(e){if(typeof e=="string")return V1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V1(e,t)}}function V1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function XL(e){if(Array.isArray(e))return e}function U1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function K1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U1(Object(r),!0).forEach(function(n){QL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QL(e,t,r){return t=JL(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JL(e){var t=eD(e,"string");return Mi(t)=="symbol"?t:t+""}function eD(e,t){if(Mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var G1=function(t,r,n,a,i){var s=Math.min(Math.abs(n)/2,Math.abs(a)/2),l=a>=0?1:-1,c=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,d;if(s>0&&i instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=i[h]>s?s:i[h];d="M".concat(t,",").concat(r+l*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(r)),d+="L ".concat(t+n-c*f[1],",").concat(r),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
|
|
72
68
|
`).concat(t+n,",").concat(r+l*f[1])),d+="L ".concat(t+n,",").concat(r+a-l*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
|
|
73
69
|
`).concat(t+n-c*f[2],",").concat(r+a)),d+="L ".concat(t+c*f[3],",").concat(r+a),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
|
|
@@ -79,13 +75,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
79
75
|
A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n-c*g,",").concat(r+a,`
|
|
80
76
|
L `).concat(t+c*g,",").concat(r+a,`
|
|
81
77
|
A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(r+a-l*g," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return d},tD=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,s=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(i,i+l),d=Math.max(i,i+l),f=Math.min(s,s+c),h=Math.max(s,s+c);return n>=u&&n<=d&&a>=f&&a<=h}return!1},rD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Nx=function(t){var r=K1(K1({},rD),t),n=P.useRef(),a=P.useState(-1),i=KL(a,2),s=i[0],l=i[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var C=n.current.getTotalLength();C&&l(C)}catch{}},[]);var c=r.x,u=r.y,d=r.width,f=r.height,h=r.radius,p=r.className,g=r.animationEasing,x=r.animationDuration,m=r.animationBegin,v=r.isAnimationActive,b=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var w=ae.default("recharts-rectangle",p);return b?O.default.createElement(Ot,{canBegin:s>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:x,animationEasing:g,isActive:b},function(C){var y=C.width,j=C.height,S=C.x,A=C.y;return O.default.createElement(Ot,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:x,isActive:v,easing:g},O.default.createElement("path",ys({},oe(r,!0),{className:w,d:G1(S,A,y,j,h),ref:n})))}):O.default.createElement("path",ys({},oe(r,!0),{className:w,d:G1(c,u,d,f,h)}))},nD=["points","className","baseLinePoints","connectNulls"];function $n(){return $n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$n.apply(this,arguments)}function aD(e,t){if(e==null)return{};var r=iD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Z1(e){return cD(e)||lD(e)||sD(e)||oD()}function oD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
82
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sD(e,t){if(e){if(typeof e=="string")return mp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mp(e,t)}}function lD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cD(e){if(Array.isArray(e))return mp(e)}function mp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Y1=function(t){return t&&t.x===+t.x&&t.y===+t.y},uD=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){Y1(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Y1(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},ai=function(t,r){var n=uD(t);r&&(n=[n.reduce(function(i,s){return[].concat(Z1(i),Z1(s))},[])]);var a=n.map(function(i){return i.reduce(function(s,l,c){return"".concat(s).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(a,"Z"):a},dD=function(t,r,n){var a=ai(t,n);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(ai(r.reverse(),n).slice(1))},N5=function(t){var r=t.points,n=t.className,a=t.baseLinePoints,i=t.connectNulls,s=aD(t,nD);if(!r||!r.length)return null;var l=ae.default("recharts-polygon",n);if(a&&a.length){var c=s.stroke&&s.stroke!=="none",u=dD(r,a,i);return O.default.createElement("g",{className:l},O.default.createElement("path",$n({},oe(s,!0),{fill:u.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:u})),c?O.default.createElement("path",$n({},oe(s,!0),{fill:"none",d:ai(r,i)})):null,c?O.default.createElement("path",$n({},oe(s,!0),{fill:"none",d:ai(a,i)})):null)}var d=ai(r,i);return O.default.createElement("path",$n({},oe(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",className:l,d}))};function xp(){return xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xp.apply(this,arguments)}var Ea=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,s=ae.default("recharts-dot",i);return r===+r&&n===+n&&a===+a?O.createElement("circle",xp({},oe(t,!1),Do(t),{className:s,cx:r,cy:n,r:a})):null};function $i(e){"@babel/helpers - typeof";return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$i(e)}var fD=["x","y","top","left","width","height","className"];function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gp.apply(this,arguments)}function X1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X1(Object(r),!0).forEach(function(n){pD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pD(e,t,r){return t=mD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mD(e){var t=xD(e,"string");return $i(t)=="symbol"?t:t+""}function xD(e,t){if($i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gD(e,t){if(e==null)return{};var r=vD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var yD=function(t,r,n,a,i,s){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(s,",").concat(r,"h").concat(n)},bD=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.top,l=s===void 0?0:s,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,g=t.className,x=gD(t,fD),m=hD({x:n,y:i,top:l,left:u,width:f,height:p},x);return!Y(n)||!Y(i)||!Y(f)||!Y(p)||!Y(l)||!Y(u)?null:O.default.createElement("path",gp({},oe(m,!0),{className:ae.default("recharts-cross",g),d:yD(n,i,f,p,l,u)}))},wD=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];function Ri(e){"@babel/helpers - typeof";return Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ri(e)}function jD(e,t){if(e==null)return{};var r=CD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wr.apply(this,arguments)}function Q1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Li(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q1(Object(r),!0).forEach(function(n){SD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SD(e,t,r){return t=OD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OD(e){var t=ND(e,"string");return Ri(t)=="symbol"?t:t+""}function ND(e,t){if(Ri(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ri(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PD=function(t,r,n,a){var i="";return a.forEach(function(s,l){var c=ve(r,n,t,s);l?i+="L ".concat(c.x,",").concat(c.y):i+="M ".concat(c.x,",").concat(c.y)}),i+="Z",i},AD=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.polarAngles,l=t.radialLines;if(!s||!s.length||!l)return null;var c=Li({stroke:"#ccc"},oe(t,!1));return O.default.createElement("g",{className:"recharts-polar-grid-angle"},s.map(function(u){var d=ve(r,n,a,u),f=ve(r,n,i,u);return O.default.createElement("line",wr({},c,{key:"line-".concat(u),x1:d.x,y1:d.y,x2:f.x,y2:f.y}))}))},_D=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.index,s=Li(Li({stroke:"#ccc"},oe(t,!1)),{},{fill:"none"});return O.default.createElement("circle",wr({},s,{className:ae.default("recharts-polar-grid-concentric-circle",t.className),key:"circle-".concat(i),cx:r,cy:n,r:a}))},kD=function(t){var r=t.radius,n=t.index,a=Li(Li({stroke:"#ccc"},oe(t,!1)),{},{fill:"none"});return O.default.createElement("path",wr({},a,{className:ae.default("recharts-polar-grid-concentric-polygon",t.className),key:"path-".concat(n),d:PD(r,t.cx,t.cy,t.polarAngles)}))},TD=function(t){var r=t.polarRadius,n=t.gridType;return!r||!r.length?null:O.default.createElement("g",{className:"recharts-polar-grid-concentric"},r.map(function(a,i){var s=i;return n==="circle"?O.default.createElement(_D,wr({key:s},t,{radius:a,index:i})):O.default.createElement(kD,wr({key:s},t,{radius:a,index:i}))}))},P5=function(t){var r=t.cx,n=r===void 0?0:r,a=t.cy,i=a===void 0?0:a,s=t.innerRadius,l=s===void 0?0:s,c=t.outerRadius,u=c===void 0?0:c,d=t.gridType,f=d===void 0?"polygon":d,h=t.radialLines,p=h===void 0?!0:h,g=jD(t,wD);return u<=0?null:O.default.createElement("g",{className:"recharts-polar-grid"},O.default.createElement(AD,wr({cx:n,cy:i,innerRadius:l,outerRadius:u,gridType:f,radialLines:p},g)),O.default.createElement(TD,wr({cx:n,cy:i,innerRadius:l,outerRadius:u,gridType:f,radialLines:p},g)))};P5.displayName="PolarGrid";var Lf,J1;function ED(){if(J1)return Lf;J1=1;var e=$l(),t=$S(),r=nr();function n(a,i){return a&&a.length?e(a,r(i,2),t):void 0}return Lf=n,Lf}var ID=ED();const MD=Ne(ID);var Df,ew;function $D(){if(ew)return Df;ew=1;var e=$l(),t=nr(),r=RS();function n(a,i){return a&&a.length?e(a,t(i,2),r):void 0}return Df=n,Df}var RD=$D();const LD=Ne(RD);var DD=["cx","cy","angle","ticks","axisLine"],zD=["ticks","tick","angle","tickFormatter","stroke"];function aa(e){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aa(e)}function ii(){return ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ii.apply(this,arguments)}function tw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tw(Object(r),!0).forEach(function(n){zl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rw(e,t){if(e==null)return{};var r=BD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function FD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_5(n.key),n)}}function qD(e,t,r){return t&&nw(e.prototype,t),r&&nw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WD(e,t,r){return t=bs(t),HD(e,A5()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function HD(e,t){if(t&&(aa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VD(e)}function VD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A5=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function UD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vp(e,t)}function vp(e,t){return vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vp(e,t)}function zl(e,t,r){return t=_5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _5(e){var t=KD(e,"string");return aa(t)=="symbol"?t:t+""}function KD(e,t){if(aa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(aa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ia=(function(e){function t(){return FD(this,t),WD(this,t,arguments)}return UD(t,e),qD(t,[{key:"getTickValueCoord",value:function(n){var a=n.coordinate,i=this.props,s=i.angle,l=i.cx,c=i.cy;return ve(l,c,a,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,a;switch(n){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.angle,l=n.ticks,c=MD(l,function(d){return d.coordinate||0}),u=LD(l,function(d){return d.coordinate||0});return{cx:a,cy:i,startAngle:s,endAngle:s,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.angle,l=n.ticks,c=n.axisLine,u=rw(n,DD),d=l.reduce(function(g,x){return[Math.min(g[0],x.coordinate),Math.max(g[1],x.coordinate)]},[1/0,-1/0]),f=ve(a,i,d[0],s),h=ve(a,i,d[1],s),p=Kr(Kr(Kr({},oe(u,!1)),{},{fill:"none"},oe(c,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return O.default.createElement("line",ii({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,s=a.tick,l=a.angle,c=a.tickFormatter,u=a.stroke,d=rw(a,zD),f=this.getTickTextAnchor(),h=oe(d,!1),p=oe(s,!1),g=i.map(function(x,m){var v=n.getTickValueCoord(x),b=Kr(Kr(Kr(Kr({textAnchor:f,transform:"rotate(".concat(90-l,", ").concat(v.x,", ").concat(v.y,")")},h),{},{stroke:"none",fill:u},p),{},{index:m},v),{},{payload:x});return O.default.createElement(fe,ii({className:ae.default("recharts-polar-radius-axis-tick",f5(s)),key:"tick-".concat(x.coordinate)},xr(n.props,x,m)),t.renderTickItem(s,b,c?c(x.value,m):x.value))});return O.default.createElement(fe,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.axisLine,s=n.tick;return!a||!a.length?null:O.default.createElement(fe,{className:ae.default("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),s&&this.renderTicks(),Qe.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,a,i){var s;return O.default.isValidElement(n)?s=O.default.cloneElement(n,a):le(n)?s=n(a):s=O.default.createElement(dn,ii({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),s}}])})(P.PureComponent);zl(Ia,"displayName","PolarRadiusAxis");zl(Ia,"axisType","radiusAxis");zl(Ia,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function ia(e){"@babel/helpers - typeof";return ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(e)}function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jr.apply(this,arguments)}function aw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aw(Object(r),!0).forEach(function(n){Bl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,T5(n.key),n)}}function ZD(e,t,r){return t&&iw(e.prototype,t),r&&iw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function YD(e,t,r){return t=ws(t),XD(e,k5()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function XD(e,t){if(t&&(ia(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QD(e)}function QD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k5=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function JD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yp(e,t)}function yp(e,t){return yp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},yp(e,t)}function Bl(e,t,r){return t=T5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T5(e){var t=ez(e,"string");return ia(t)=="symbol"?t:t+""}function ez(e,t){if(ia(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ia(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tz=Math.PI/180,ow=1e-5,Sn=(function(e){function t(){return GD(this,t),YD(this,t,arguments)}return JD(t,e),ZD(t,[{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.cx,s=a.cy,l=a.radius,c=a.orientation,u=a.tickSize,d=u||8,f=ve(i,s,l,n.coordinate),h=ve(i,s,l+(c==="inner"?-1:1)*d,n.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var a=this.props.orientation,i=Math.cos(-n.coordinate*tz),s;return i>ow?s=a==="outer"?"start":"end":i<-ow?s=a==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.radius,l=n.axisLine,c=n.axisLineType,u=Gr(Gr({},oe(this.props,!1)),{},{fill:"none"},oe(l,!1));if(c==="circle")return O.default.createElement(Ea,Jr({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:s}));var d=this.props.ticks,f=d.map(function(h){return ve(a,i,s,h.coordinate)});return O.default.createElement(N5,Jr({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,s=a.tick,l=a.tickLine,c=a.tickFormatter,u=a.stroke,d=oe(this.props,!1),f=oe(s,!1),h=Gr(Gr({},d),{},{fill:"none"},oe(l,!1)),p=i.map(function(g,x){var m=n.getTickLineCoord(g),v=n.getTickTextAnchor(g),b=Gr(Gr(Gr({textAnchor:v},d),{},{stroke:"none",fill:u},f),{},{index:x,payload:g,x:m.x2,y:m.y2});return O.default.createElement(fe,Jr({className:ae.default("recharts-polar-angle-axis-tick",f5(s)),key:"tick-".concat(g.coordinate)},xr(n.props,g,x)),l&&O.default.createElement("line",Jr({className:"recharts-polar-angle-axis-tick-line"},h,m)),s&&t.renderTickItem(s,b,c?c(g.value,x):g.value))});return O.default.createElement(fe,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.radius,s=n.axisLine;return i<=0||!a||!a.length?null:O.default.createElement(fe,{className:ae.default("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,a,i){var s;return O.default.isValidElement(n)?s=O.default.cloneElement(n,a):le(n)?s=n(a):s=O.default.createElement(dn,Jr({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),s}}])})(P.PureComponent);Bl(Sn,"displayName","PolarAngleAxis");Bl(Sn,"axisType","angleAxis");Bl(Sn,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var zf,sw;function rz(){if(sw)return zf;sw=1;var e=$C(),t=e(Object.getPrototypeOf,Object);return zf=t,zf}var Bf,lw;function nz(){if(lw)return Bf;lw=1;var e=Cr(),t=rz(),r=Sr(),n="[object Object]",a=Function.prototype,i=Object.prototype,s=a.toString,l=i.hasOwnProperty,c=s.call(Object);function u(d){if(!r(d)||e(d)!=n)return!1;var f=t(d);if(f===null)return!0;var h=l.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&s.call(h)==c}return Bf=u,Bf}var az=nz();const iz=Ne(az);var Ff,cw;function oz(){if(cw)return Ff;cw=1;var e=Cr(),t=Sr(),r="[object Boolean]";function n(a){return a===!0||a===!1||t(a)&&e(a)==r}return Ff=n,Ff}var sz=oz();const lz=Ne(sz);function Di(e){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(e)}function js(){return js=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},js.apply(this,arguments)}function cz(e,t){return hz(e)||fz(e,t)||dz(e,t)||uz()}function uz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
83
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dz(e,t){if(e){if(typeof e=="string")return uw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uw(e,t)}}function uw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function hz(e){if(Array.isArray(e))return e}function dw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dw(Object(r),!0).forEach(function(n){pz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pz(e,t,r){return t=mz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mz(e){var t=xz(e,"string");return Di(t)=="symbol"?t:t+""}function xz(e,t){if(Di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hw=function(t,r,n,a,i){var s=n-a,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-s/2,",").concat(r+i),l+="L ".concat(t+n-s/2-a,",").concat(r+i),l+="L ".concat(t,",").concat(r," Z"),l},gz={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},vz=function(t){var r=fw(fw({},gz),t),n=P.useRef(),a=P.useState(-1),i=cz(a,2),s=i[0],l=i[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&l(w)}catch{}},[]);var c=r.x,u=r.y,d=r.upperWidth,f=r.lowerWidth,h=r.height,p=r.className,g=r.animationEasing,x=r.animationDuration,m=r.animationBegin,v=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var b=ae.default("recharts-trapezoid",p);return v?O.default.createElement(Ot,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:c,y:u},duration:x,animationEasing:g,isActive:v},function(w){var C=w.upperWidth,y=w.lowerWidth,j=w.height,S=w.x,A=w.y;return O.default.createElement(Ot,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:x,easing:g},O.default.createElement("path",js({},oe(r,!0),{className:b,d:hw(S,A,C,y,j),ref:n})))}):O.default.createElement("g",null,O.default.createElement("path",js({},oe(r,!0),{className:b,d:hw(c,u,d,f,h)})))},yz=["option","shapeType","propTransformer","activeClassName","isActive"];function zi(e){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(e)}function bz(e,t){if(e==null)return{};var r=wz(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Cs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pw(Object(r),!0).forEach(function(n){jz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jz(e,t,r){return t=Cz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cz(e){var t=Sz(e,"string");return zi(t)=="symbol"?t:t+""}function Sz(e,t){if(zi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oz(e,t){return Cs(Cs({},t),e)}function Nz(e,t){return e==="symbols"}function mw(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return O.default.createElement(Nx,r);case"trapezoid":return O.default.createElement(vz,r);case"sector":return O.default.createElement(x5,r);case"symbols":if(Nz(t))return O.default.createElement(Fm,r);break;default:return null}}function Pz(e){return P.isValidElement(e)?e.props:e}function Px(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?Oz:n,i=e.activeClassName,s=i===void 0?"recharts-active-shape":i,l=e.isActive,c=bz(e,yz),u;if(P.isValidElement(t))u=P.cloneElement(t,Cs(Cs({},c),Pz(t)));else if(le(t))u=t(c);else if(iz(t)&&!lz(t)){var d=a(t,c);u=O.default.createElement(mw,{shapeType:r,elementProps:d})}else{var f=c;u=O.default.createElement(mw,{shapeType:r,elementProps:f})}return l?O.default.createElement(fe,{className:s},u):u}function Fl(e,t){return t!=null&&"trapezoids"in e.props}function ql(e,t){return t!=null&&"sectors"in e.props}function Bi(e,t){return t!=null&&"points"in e.props}function Az(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function _z(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function kz(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function Tz(e,t){var r;return Fl(e,t)?r=Az:ql(e,t)?r=_z:Bi(e,t)&&(r=kz),r}function Ez(e,t){var r;return Fl(e,t)?r="trapezoids":ql(e,t)?r="sectors":Bi(e,t)&&(r="points"),r}function Iz(e,t){if(Fl(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(ql(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Bi(e,t)?t.payload:{}}function Mz(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=Ez(r,t),i=Iz(r,t),s=n.filter(function(c,u){var d=br(i,c),f=r.props[a].filter(function(g){var x=Tz(r,t);return x(g,t)}),h=r.props[a].indexOf(f[f.length-1]),p=u===h;return d&&p}),l=n.indexOf(s[s.length-1]);return l}var Ao;function oa(e){"@babel/helpers - typeof";return oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(e)}function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rn.apply(this,arguments)}function xw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xw(Object(r),!0).forEach(function(n){kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,I5(n.key),n)}}function Rz(e,t,r){return t&&gw(e.prototype,t),r&&gw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lz(e,t,r){return t=Ss(t),Dz(e,E5()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function Dz(e,t){if(t&&(oa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zz(e)}function zz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E5=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function Bz(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bp(e,t)}function bp(e,t){return bp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bp(e,t)}function kt(e,t,r){return t=I5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I5(e){var t=Fz(e,"string");return oa(t)=="symbol"?t:t+""}function Fz(e,t){if(oa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Vt=(function(e){function t(r){var n;return $z(this,t),n=Lz(this,t,[r]),kt(n,"pieRef",null),kt(n,"sectorRefs",[]),kt(n,"id",yn("recharts-pie-")),kt(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),le(a)&&a()}),kt(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),le(a)&&a()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return Bz(t,e),Rz(t,[{key:"isActiveIndex",value:function(n){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(n)!==-1:n===a}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.label,l=i.labelLine,c=i.dataKey,u=i.valueKey,d=oe(this.props,!1),f=oe(s,!1),h=oe(l,!1),p=s&&s.offsetRadius||20,g=n.map(function(x,m){var v=(x.startAngle+x.endAngle)/2,b=ve(x.cx,x.cy,x.outerRadius+p,v),w=_e(_e(_e(_e({},d),x),{},{stroke:"none"},f),{},{index:m,textAnchor:t.getTextAnchor(b.x,x.cx)},b),C=_e(_e(_e(_e({},d),x),{},{fill:"none",stroke:x.fill},h),{},{index:m,points:[ve(x.cx,x.cy,x.outerRadius,v),b]}),y=c;return de(c)&&de(u)?y="value":de(c)&&(y=u),O.default.createElement(fe,{key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(m)},l&&t.renderLabelLineItem(l,C,"line"),t.renderLabelItem(s,w,Le(x,y)))});return O.default.createElement(fe,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(n){var a=this,i=this.props,s=i.activeShape,l=i.blendStroke,c=i.inactiveShape;return n.map(function(u,d){if(u?.startAngle===0&&u?.endAngle===0&&n.length!==1)return null;var f=a.isActiveIndex(d),h=c&&a.hasActiveIndex()?c:null,p=f?s:h,g=_e(_e({},u),{},{stroke:l?u.fill:u.stroke,tabIndex:-1});return O.default.createElement(fe,Rn({ref:function(m){m&&!a.sectorRefs.includes(m)&&a.sectorRefs.push(m)},tabIndex:-1,className:"recharts-pie-sector"},xr(a.props,u,d),{key:"sector-".concat(u?.startAngle,"-").concat(u?.endAngle,"-").concat(u.midAngle,"-").concat(d)}),O.default.createElement(Px,Rn({option:p,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,a=this.props,i=a.sectors,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state,h=f.prevSectors,p=f.prevIsAnimationActive;return O.default.createElement(Ot,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var x=g.t,m=[],v=i&&i[0],b=v.startAngle;return i.forEach(function(w,C){var y=h&&h[C],j=C>0?St(w,"paddingAngle",0):0;if(y){var S=Ee(y.endAngle-y.startAngle,w.endAngle-w.startAngle),A=_e(_e({},w),{},{startAngle:b+j,endAngle:b+S(x)+j});m.push(A),b=A.endAngle}else{var _=w.endAngle,I=w.startAngle,k=Ee(0,_-I),E=k(x),T=_e(_e({},w),{},{startAngle:b+j,endAngle:b+E+j});m.push(T),b=T.endAngle}}),O.default.createElement(fe,null,n.renderSectorsStatically(m))})}},{key:"attachKeyboardHandlers",value:function(n){var a=this;n.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var s=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[s].focus(),a.setState({sectorToFocus:s});break}case"ArrowRight":{var l=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,a=n.sectors,i=n.isAnimationActive,s=this.state.prevSectors;return i&&a&&a.length&&(!s||!br(s,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,a=this.props,i=a.hide,s=a.sectors,l=a.className,c=a.label,u=a.cx,d=a.cy,f=a.innerRadius,h=a.outerRadius,p=a.isAnimationActive,g=this.state.isAnimationFinished;if(i||!s||!s.length||!Y(u)||!Y(d)||!Y(f)||!Y(h))return null;var x=ae.default("recharts-pie",l);return O.default.createElement(fe,{tabIndex:this.props.rootTabIndex,className:x,ref:function(v){n.pieRef=v}},this.renderSectors(),c&&this.renderLabels(s),Qe.renderCallByParent(this.props,null,!1),(!p||g)&&It.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return a.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:n.sectors!==a.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,a){return n>a?"start":n<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,a,i){if(O.default.isValidElement(n))return O.default.cloneElement(n,a);if(le(n))return n(a);var s=ae.default("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return O.default.createElement(ln,Rn({},a,{key:i,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,a,i){if(O.default.isValidElement(n))return O.default.cloneElement(n,a);var s=i;if(le(n)&&(s=n(a),O.default.isValidElement(s)))return s;var l=ae.default("recharts-pie-label-text",typeof n!="boolean"&&!le(n)?n.className:"");return O.default.createElement(dn,Rn({},a,{alignmentBaseline:"middle",className:l}),s)}}])})(P.PureComponent);Ao=Vt;kt(Vt,"displayName","Pie");kt(Vt,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ar.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});kt(Vt,"parseDeltaAngle",function(e,t){var r=Je(t-e),n=Math.min(Math.abs(t-e),360);return r*n});kt(Vt,"getRealPieData",function(e){var t=e.data,r=e.children,n=oe(e,!1),a=gt(r,bn);return t&&t.length?t.map(function(i,s){return _e(_e(_e({payload:i},n),i),a&&a[s]&&a[s].props)}):a&&a.length?a.map(function(i){return _e(_e({},n),i.props)}):[]});kt(Vt,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,a=t.width,i=t.height,s=d5(a,i),l=n+ct(e.cx,a,a/2),c=r+ct(e.cy,i,i/2),u=ct(e.innerRadius,s,0),d=ct(e.outerRadius,s,s*.8),f=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}});kt(Vt,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?_e(_e({},t.type.defaultProps),t.props):t.props,a=Ao.getRealPieData(n);if(!a||!a.length)return null;var i=n.cornerRadius,s=n.startAngle,l=n.endAngle,c=n.paddingAngle,u=n.dataKey,d=n.nameKey,f=n.valueKey,h=n.tooltipType,p=Math.abs(n.minAngle),g=Ao.parseCoordinateOfPie(n,r),x=Ao.parseDeltaAngle(s,l),m=Math.abs(x),v=u;de(u)&&de(f)?(Et(!1,`Use "dataKey" to specify the value of pie,
|
|
78
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sD(e,t){if(e){if(typeof e=="string")return mp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mp(e,t)}}function lD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cD(e){if(Array.isArray(e))return mp(e)}function mp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Y1=function(t){return t&&t.x===+t.x&&t.y===+t.y},uD=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){Y1(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),Y1(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},ai=function(t,r){var n=uD(t);r&&(n=[n.reduce(function(i,s){return[].concat(Z1(i),Z1(s))},[])]);var a=n.map(function(i){return i.reduce(function(s,l,c){return"".concat(s).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(a,"Z"):a},dD=function(t,r,n){var a=ai(t,n);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(ai(r.reverse(),n).slice(1))},N5=function(t){var r=t.points,n=t.className,a=t.baseLinePoints,i=t.connectNulls,s=aD(t,nD);if(!r||!r.length)return null;var l=ae.default("recharts-polygon",n);if(a&&a.length){var c=s.stroke&&s.stroke!=="none",u=dD(r,a,i);return O.default.createElement("g",{className:l},O.default.createElement("path",$n({},oe(s,!0),{fill:u.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:u})),c?O.default.createElement("path",$n({},oe(s,!0),{fill:"none",d:ai(r,i)})):null,c?O.default.createElement("path",$n({},oe(s,!0),{fill:"none",d:ai(a,i)})):null)}var d=ai(r,i);return O.default.createElement("path",$n({},oe(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",className:l,d}))};function xp(){return xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xp.apply(this,arguments)}var Ea=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,s=ae.default("recharts-dot",i);return r===+r&&n===+n&&a===+a?O.createElement("circle",xp({},oe(t,!1),Do(t),{className:s,cx:r,cy:n,r:a})):null};function $i(e){"@babel/helpers - typeof";return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$i(e)}var fD=["x","y","top","left","width","height","className"];function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gp.apply(this,arguments)}function X1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X1(Object(r),!0).forEach(function(n){pD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pD(e,t,r){return t=mD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mD(e){var t=xD(e,"string");return $i(t)=="symbol"?t:t+""}function xD(e,t){if($i(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gD(e,t){if(e==null)return{};var r=vD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var yD=function(t,r,n,a,i,s){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(s,",").concat(r,"h").concat(n)},bD=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.top,l=s===void 0?0:s,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,g=t.className,x=gD(t,fD),m=hD({x:n,y:i,top:l,left:u,width:f,height:p},x);return!Z(n)||!Z(i)||!Z(f)||!Z(p)||!Z(l)||!Z(u)?null:O.default.createElement("path",gp({},oe(m,!0),{className:ae.default("recharts-cross",g),d:yD(n,i,f,p,l,u)}))},wD=["cx","cy","innerRadius","outerRadius","gridType","radialLines"];function Ri(e){"@babel/helpers - typeof";return Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ri(e)}function jD(e,t){if(e==null)return{};var r=CD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wr.apply(this,arguments)}function Q1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Li(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q1(Object(r),!0).forEach(function(n){SD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SD(e,t,r){return t=OD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OD(e){var t=ND(e,"string");return Ri(t)=="symbol"?t:t+""}function ND(e,t){if(Ri(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ri(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PD=function(t,r,n,a){var i="";return a.forEach(function(s,l){var c=ge(r,n,t,s);l?i+="L ".concat(c.x,",").concat(c.y):i+="M ".concat(c.x,",").concat(c.y)}),i+="Z",i},AD=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.polarAngles,l=t.radialLines;if(!s||!s.length||!l)return null;var c=Li({stroke:"#ccc"},oe(t,!1));return O.default.createElement("g",{className:"recharts-polar-grid-angle"},s.map(function(u){var d=ge(r,n,a,u),f=ge(r,n,i,u);return O.default.createElement("line",wr({},c,{key:"line-".concat(u),x1:d.x,y1:d.y,x2:f.x,y2:f.y}))}))},_D=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.index,s=Li(Li({stroke:"#ccc"},oe(t,!1)),{},{fill:"none"});return O.default.createElement("circle",wr({},s,{className:ae.default("recharts-polar-grid-concentric-circle",t.className),key:"circle-".concat(i),cx:r,cy:n,r:a}))},kD=function(t){var r=t.radius,n=t.index,a=Li(Li({stroke:"#ccc"},oe(t,!1)),{},{fill:"none"});return O.default.createElement("path",wr({},a,{className:ae.default("recharts-polar-grid-concentric-polygon",t.className),key:"path-".concat(n),d:PD(r,t.cx,t.cy,t.polarAngles)}))},TD=function(t){var r=t.polarRadius,n=t.gridType;return!r||!r.length?null:O.default.createElement("g",{className:"recharts-polar-grid-concentric"},r.map(function(a,i){var s=i;return n==="circle"?O.default.createElement(_D,wr({key:s},t,{radius:a,index:i})):O.default.createElement(kD,wr({key:s},t,{radius:a,index:i}))}))},P5=function(t){var r=t.cx,n=r===void 0?0:r,a=t.cy,i=a===void 0?0:a,s=t.innerRadius,l=s===void 0?0:s,c=t.outerRadius,u=c===void 0?0:c,d=t.gridType,f=d===void 0?"polygon":d,h=t.radialLines,p=h===void 0?!0:h,g=jD(t,wD);return u<=0?null:O.default.createElement("g",{className:"recharts-polar-grid"},O.default.createElement(AD,wr({cx:n,cy:i,innerRadius:l,outerRadius:u,gridType:f,radialLines:p},g)),O.default.createElement(TD,wr({cx:n,cy:i,innerRadius:l,outerRadius:u,gridType:f,radialLines:p},g)))};P5.displayName="PolarGrid";var Lf,J1;function ED(){if(J1)return Lf;J1=1;var e=$l(),t=$S(),r=nr();function n(a,i){return a&&a.length?e(a,r(i,2),t):void 0}return Lf=n,Lf}var ID=ED();const MD=Oe(ID);var Df,ew;function $D(){if(ew)return Df;ew=1;var e=$l(),t=nr(),r=RS();function n(a,i){return a&&a.length?e(a,t(i,2),r):void 0}return Df=n,Df}var RD=$D();const LD=Oe(RD);var DD=["cx","cy","angle","ticks","axisLine"],zD=["ticks","tick","angle","tickFormatter","stroke"];function aa(e){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aa(e)}function ii(){return ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ii.apply(this,arguments)}function tw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Kr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tw(Object(r),!0).forEach(function(n){zl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rw(e,t){if(e==null)return{};var r=BD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function FD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_5(n.key),n)}}function qD(e,t,r){return t&&nw(e.prototype,t),r&&nw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WD(e,t,r){return t=bs(t),HD(e,A5()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function HD(e,t){if(t&&(aa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VD(e)}function VD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A5=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function UD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vp(e,t)}function vp(e,t){return vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vp(e,t)}function zl(e,t,r){return t=_5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _5(e){var t=KD(e,"string");return aa(t)=="symbol"?t:t+""}function KD(e,t){if(aa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(aa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ia=(function(e){function t(){return FD(this,t),WD(this,t,arguments)}return UD(t,e),qD(t,[{key:"getTickValueCoord",value:function(n){var a=n.coordinate,i=this.props,s=i.angle,l=i.cx,c=i.cy;return ge(l,c,a,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,a;switch(n){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.angle,l=n.ticks,c=MD(l,function(d){return d.coordinate||0}),u=LD(l,function(d){return d.coordinate||0});return{cx:a,cy:i,startAngle:s,endAngle:s,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.angle,l=n.ticks,c=n.axisLine,u=rw(n,DD),d=l.reduce(function(g,x){return[Math.min(g[0],x.coordinate),Math.max(g[1],x.coordinate)]},[1/0,-1/0]),f=ge(a,i,d[0],s),h=ge(a,i,d[1],s),p=Kr(Kr(Kr({},oe(u,!1)),{},{fill:"none"},oe(c,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return O.default.createElement("line",ii({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,s=a.tick,l=a.angle,c=a.tickFormatter,u=a.stroke,d=rw(a,zD),f=this.getTickTextAnchor(),h=oe(d,!1),p=oe(s,!1),g=i.map(function(x,m){var v=n.getTickValueCoord(x),b=Kr(Kr(Kr(Kr({textAnchor:f,transform:"rotate(".concat(90-l,", ").concat(v.x,", ").concat(v.y,")")},h),{},{stroke:"none",fill:u},p),{},{index:m},v),{},{payload:x});return O.default.createElement(fe,ii({className:ae.default("recharts-polar-radius-axis-tick",f5(s)),key:"tick-".concat(x.coordinate)},xr(n.props,x,m)),t.renderTickItem(s,b,c?c(x.value,m):x.value))});return O.default.createElement(fe,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.axisLine,s=n.tick;return!a||!a.length?null:O.default.createElement(fe,{className:ae.default("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),s&&this.renderTicks(),Qe.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,a,i){var s;return O.default.isValidElement(n)?s=O.default.cloneElement(n,a):le(n)?s=n(a):s=O.default.createElement(dn,ii({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),s}}])})(P.PureComponent);zl(Ia,"displayName","PolarRadiusAxis");zl(Ia,"axisType","radiusAxis");zl(Ia,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function ia(e){"@babel/helpers - typeof";return ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(e)}function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jr.apply(this,arguments)}function aw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aw(Object(r),!0).forEach(function(n){Bl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,T5(n.key),n)}}function ZD(e,t,r){return t&&iw(e.prototype,t),r&&iw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function YD(e,t,r){return t=ws(t),XD(e,k5()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function XD(e,t){if(t&&(ia(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QD(e)}function QD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k5=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function JD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yp(e,t)}function yp(e,t){return yp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},yp(e,t)}function Bl(e,t,r){return t=T5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T5(e){var t=ez(e,"string");return ia(t)=="symbol"?t:t+""}function ez(e,t){if(ia(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ia(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tz=Math.PI/180,ow=1e-5,Sn=(function(e){function t(){return GD(this,t),YD(this,t,arguments)}return JD(t,e),ZD(t,[{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.cx,s=a.cy,l=a.radius,c=a.orientation,u=a.tickSize,d=u||8,f=ge(i,s,l,n.coordinate),h=ge(i,s,l+(c==="inner"?-1:1)*d,n.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var a=this.props.orientation,i=Math.cos(-n.coordinate*tz),s;return i>ow?s=a==="outer"?"start":"end":i<-ow?s=a==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,s=n.radius,l=n.axisLine,c=n.axisLineType,u=Gr(Gr({},oe(this.props,!1)),{},{fill:"none"},oe(l,!1));if(c==="circle")return O.default.createElement(Ea,Jr({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:s}));var d=this.props.ticks,f=d.map(function(h){return ge(a,i,s,h.coordinate)});return O.default.createElement(N5,Jr({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,s=a.tick,l=a.tickLine,c=a.tickFormatter,u=a.stroke,d=oe(this.props,!1),f=oe(s,!1),h=Gr(Gr({},d),{},{fill:"none"},oe(l,!1)),p=i.map(function(g,x){var m=n.getTickLineCoord(g),v=n.getTickTextAnchor(g),b=Gr(Gr(Gr({textAnchor:v},d),{},{stroke:"none",fill:u},f),{},{index:x,payload:g,x:m.x2,y:m.y2});return O.default.createElement(fe,Jr({className:ae.default("recharts-polar-angle-axis-tick",f5(s)),key:"tick-".concat(g.coordinate)},xr(n.props,g,x)),l&&O.default.createElement("line",Jr({className:"recharts-polar-angle-axis-tick-line"},h,m)),s&&t.renderTickItem(s,b,c?c(g.value,x):g.value))});return O.default.createElement(fe,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.radius,s=n.axisLine;return i<=0||!a||!a.length?null:O.default.createElement(fe,{className:ae.default("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,a,i){var s;return O.default.isValidElement(n)?s=O.default.cloneElement(n,a):le(n)?s=n(a):s=O.default.createElement(dn,Jr({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),s}}])})(P.PureComponent);Bl(Sn,"displayName","PolarAngleAxis");Bl(Sn,"axisType","angleAxis");Bl(Sn,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var zf,sw;function rz(){if(sw)return zf;sw=1;var e=$C(),t=e(Object.getPrototypeOf,Object);return zf=t,zf}var Bf,lw;function nz(){if(lw)return Bf;lw=1;var e=Cr(),t=rz(),r=Sr(),n="[object Object]",a=Function.prototype,i=Object.prototype,s=a.toString,l=i.hasOwnProperty,c=s.call(Object);function u(d){if(!r(d)||e(d)!=n)return!1;var f=t(d);if(f===null)return!0;var h=l.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&s.call(h)==c}return Bf=u,Bf}var az=nz();const iz=Oe(az);var Ff,cw;function oz(){if(cw)return Ff;cw=1;var e=Cr(),t=Sr(),r="[object Boolean]";function n(a){return a===!0||a===!1||t(a)&&e(a)==r}return Ff=n,Ff}var sz=oz();const lz=Oe(sz);function Di(e){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(e)}function js(){return js=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},js.apply(this,arguments)}function cz(e,t){return hz(e)||fz(e,t)||dz(e,t)||uz()}function uz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
79
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dz(e,t){if(e){if(typeof e=="string")return uw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uw(e,t)}}function uw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fz(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function hz(e){if(Array.isArray(e))return e}function dw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dw(Object(r),!0).forEach(function(n){pz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pz(e,t,r){return t=mz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mz(e){var t=xz(e,"string");return Di(t)=="symbol"?t:t+""}function xz(e,t){if(Di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hw=function(t,r,n,a,i){var s=n-a,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-s/2,",").concat(r+i),l+="L ".concat(t+n-s/2-a,",").concat(r+i),l+="L ".concat(t,",").concat(r," Z"),l},gz={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},vz=function(t){var r=fw(fw({},gz),t),n=P.useRef(),a=P.useState(-1),i=cz(a,2),s=i[0],l=i[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&l(w)}catch{}},[]);var c=r.x,u=r.y,d=r.upperWidth,f=r.lowerWidth,h=r.height,p=r.className,g=r.animationEasing,x=r.animationDuration,m=r.animationBegin,v=r.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var b=ae.default("recharts-trapezoid",p);return v?O.default.createElement(Ot,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:c,y:u},duration:x,animationEasing:g,isActive:v},function(w){var C=w.upperWidth,y=w.lowerWidth,j=w.height,S=w.x,A=w.y;return O.default.createElement(Ot,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:x,easing:g},O.default.createElement("path",js({},oe(r,!0),{className:b,d:hw(S,A,C,y,j),ref:n})))}):O.default.createElement("g",null,O.default.createElement("path",js({},oe(r,!0),{className:b,d:hw(c,u,d,f,h)})))},yz=["option","shapeType","propTransformer","activeClassName","isActive"];function zi(e){"@babel/helpers - typeof";return zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(e)}function bz(e,t){if(e==null)return{};var r=wz(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Cs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pw(Object(r),!0).forEach(function(n){jz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jz(e,t,r){return t=Cz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cz(e){var t=Sz(e,"string");return zi(t)=="symbol"?t:t+""}function Sz(e,t){if(zi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oz(e,t){return Cs(Cs({},t),e)}function Nz(e,t){return e==="symbols"}function mw(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return O.default.createElement(Nx,r);case"trapezoid":return O.default.createElement(vz,r);case"sector":return O.default.createElement(x5,r);case"symbols":if(Nz(t))return O.default.createElement(Fm,r);break;default:return null}}function Pz(e){return P.isValidElement(e)?e.props:e}function Px(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?Oz:n,i=e.activeClassName,s=i===void 0?"recharts-active-shape":i,l=e.isActive,c=bz(e,yz),u;if(P.isValidElement(t))u=P.cloneElement(t,Cs(Cs({},c),Pz(t)));else if(le(t))u=t(c);else if(iz(t)&&!lz(t)){var d=a(t,c);u=O.default.createElement(mw,{shapeType:r,elementProps:d})}else{var f=c;u=O.default.createElement(mw,{shapeType:r,elementProps:f})}return l?O.default.createElement(fe,{className:s},u):u}function Fl(e,t){return t!=null&&"trapezoids"in e.props}function ql(e,t){return t!=null&&"sectors"in e.props}function Bi(e,t){return t!=null&&"points"in e.props}function Az(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function _z(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function kz(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function Tz(e,t){var r;return Fl(e,t)?r=Az:ql(e,t)?r=_z:Bi(e,t)&&(r=kz),r}function Ez(e,t){var r;return Fl(e,t)?r="trapezoids":ql(e,t)?r="sectors":Bi(e,t)&&(r="points"),r}function Iz(e,t){if(Fl(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(ql(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Bi(e,t)?t.payload:{}}function Mz(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=Ez(r,t),i=Iz(r,t),s=n.filter(function(c,u){var d=br(i,c),f=r.props[a].filter(function(g){var x=Tz(r,t);return x(g,t)}),h=r.props[a].indexOf(f[f.length-1]),p=u===h;return d&&p}),l=n.indexOf(s[s.length-1]);return l}var Ao;function oa(e){"@babel/helpers - typeof";return oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(e)}function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rn.apply(this,arguments)}function xw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xw(Object(r),!0).forEach(function(n){kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,I5(n.key),n)}}function Rz(e,t,r){return t&&gw(e.prototype,t),r&&gw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lz(e,t,r){return t=Ss(t),Dz(e,E5()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function Dz(e,t){if(t&&(oa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zz(e)}function zz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E5=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function Bz(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bp(e,t)}function bp(e,t){return bp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},bp(e,t)}function kt(e,t,r){return t=I5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I5(e){var t=Fz(e,"string");return oa(t)=="symbol"?t:t+""}function Fz(e,t){if(oa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(oa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Vt=(function(e){function t(r){var n;return $z(this,t),n=Lz(this,t,[r]),kt(n,"pieRef",null),kt(n,"sectorRefs",[]),kt(n,"id",yn("recharts-pie-")),kt(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),le(a)&&a()}),kt(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),le(a)&&a()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return Bz(t,e),Rz(t,[{key:"isActiveIndex",value:function(n){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(n)!==-1:n===a}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.label,l=i.labelLine,c=i.dataKey,u=i.valueKey,d=oe(this.props,!1),f=oe(s,!1),h=oe(l,!1),p=s&&s.offsetRadius||20,g=n.map(function(x,m){var v=(x.startAngle+x.endAngle)/2,b=ge(x.cx,x.cy,x.outerRadius+p,v),w=_e(_e(_e(_e({},d),x),{},{stroke:"none"},f),{},{index:m,textAnchor:t.getTextAnchor(b.x,x.cx)},b),C=_e(_e(_e(_e({},d),x),{},{fill:"none",stroke:x.fill},h),{},{index:m,points:[ge(x.cx,x.cy,x.outerRadius,v),b]}),y=c;return de(c)&&de(u)?y="value":de(c)&&(y=u),O.default.createElement(fe,{key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(m)},l&&t.renderLabelLineItem(l,C,"line"),t.renderLabelItem(s,w,Le(x,y)))});return O.default.createElement(fe,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(n){var a=this,i=this.props,s=i.activeShape,l=i.blendStroke,c=i.inactiveShape;return n.map(function(u,d){if(u?.startAngle===0&&u?.endAngle===0&&n.length!==1)return null;var f=a.isActiveIndex(d),h=c&&a.hasActiveIndex()?c:null,p=f?s:h,g=_e(_e({},u),{},{stroke:l?u.fill:u.stroke,tabIndex:-1});return O.default.createElement(fe,Rn({ref:function(m){m&&!a.sectorRefs.includes(m)&&a.sectorRefs.push(m)},tabIndex:-1,className:"recharts-pie-sector"},xr(a.props,u,d),{key:"sector-".concat(u?.startAngle,"-").concat(u?.endAngle,"-").concat(u.midAngle,"-").concat(d)}),O.default.createElement(Px,Rn({option:p,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,a=this.props,i=a.sectors,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state,h=f.prevSectors,p=f.prevIsAnimationActive;return O.default.createElement(Ot,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var x=g.t,m=[],v=i&&i[0],b=v.startAngle;return i.forEach(function(w,C){var y=h&&h[C],j=C>0?St(w,"paddingAngle",0):0;if(y){var S=Ee(y.endAngle-y.startAngle,w.endAngle-w.startAngle),A=_e(_e({},w),{},{startAngle:b+j,endAngle:b+S(x)+j});m.push(A),b=A.endAngle}else{var _=w.endAngle,I=w.startAngle,k=Ee(0,_-I),E=k(x),T=_e(_e({},w),{},{startAngle:b+j,endAngle:b+E+j});m.push(T),b=T.endAngle}}),O.default.createElement(fe,null,n.renderSectorsStatically(m))})}},{key:"attachKeyboardHandlers",value:function(n){var a=this;n.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var s=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[s].focus(),a.setState({sectorToFocus:s});break}case"ArrowRight":{var l=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,a=n.sectors,i=n.isAnimationActive,s=this.state.prevSectors;return i&&a&&a.length&&(!s||!br(s,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,a=this.props,i=a.hide,s=a.sectors,l=a.className,c=a.label,u=a.cx,d=a.cy,f=a.innerRadius,h=a.outerRadius,p=a.isAnimationActive,g=this.state.isAnimationFinished;if(i||!s||!s.length||!Z(u)||!Z(d)||!Z(f)||!Z(h))return null;var x=ae.default("recharts-pie",l);return O.default.createElement(fe,{tabIndex:this.props.rootTabIndex,className:x,ref:function(v){n.pieRef=v}},this.renderSectors(),c&&this.renderLabels(s),Qe.renderCallByParent(this.props,null,!1),(!p||g)&&It.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return a.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:n.sectors!==a.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,a){return n>a?"start":n<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,a,i){if(O.default.isValidElement(n))return O.default.cloneElement(n,a);if(le(n))return n(a);var s=ae.default("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return O.default.createElement(ln,Rn({},a,{key:i,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,a,i){if(O.default.isValidElement(n))return O.default.cloneElement(n,a);var s=i;if(le(n)&&(s=n(a),O.default.isValidElement(s)))return s;var l=ae.default("recharts-pie-label-text",typeof n!="boolean"&&!le(n)?n.className:"");return O.default.createElement(dn,Rn({},a,{alignmentBaseline:"middle",className:l}),s)}}])})(P.PureComponent);Ao=Vt;kt(Vt,"displayName","Pie");kt(Vt,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ar.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});kt(Vt,"parseDeltaAngle",function(e,t){var r=Je(t-e),n=Math.min(Math.abs(t-e),360);return r*n});kt(Vt,"getRealPieData",function(e){var t=e.data,r=e.children,n=oe(e,!1),a=gt(r,bn);return t&&t.length?t.map(function(i,s){return _e(_e(_e({payload:i},n),i),a&&a[s]&&a[s].props)}):a&&a.length?a.map(function(i){return _e(_e({},n),i.props)}):[]});kt(Vt,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,a=t.width,i=t.height,s=d5(a,i),l=n+ct(e.cx,a,a/2),c=r+ct(e.cy,i,i/2),u=ct(e.innerRadius,s,0),d=ct(e.outerRadius,s,s*.8),f=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}});kt(Vt,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?_e(_e({},t.type.defaultProps),t.props):t.props,a=Ao.getRealPieData(n);if(!a||!a.length)return null;var i=n.cornerRadius,s=n.startAngle,l=n.endAngle,c=n.paddingAngle,u=n.dataKey,d=n.nameKey,f=n.valueKey,h=n.tooltipType,p=Math.abs(n.minAngle),g=Ao.parseCoordinateOfPie(n,r),x=Ao.parseDeltaAngle(s,l),m=Math.abs(x),v=u;de(u)&&de(f)?(Et(!1,`Use "dataKey" to specify the value of pie,
|
|
84
80
|
the props "valueKey" will be deprecated in 1.1.0`),v="value"):de(u)&&(Et(!1,`Use "dataKey" to specify the value of pie,
|
|
85
|
-
the props "valueKey" will be deprecated in 1.1.0`),v=f);var b=a.filter(function(A){return Le(A,v,0)!==0}).length,w=(m>=360?b:b-1)*c,C=m-b*p-w,y=a.reduce(function(A,_){var I=Le(_,v,0);return A+(Y(I)?I:0)},0),j;if(y>0){var S;j=a.map(function(A,_){var I=Le(A,v,0),k=Le(A,d,_),E=(Y(I)?I:0)/y,T;_?T=S.endAngle+Je(x)*c*(I!==0?1:0):T=s;var M=T+Je(x)*((I!==0?p:0)+E*C),R=(T+M)/2,$=(g.innerRadius+g.outerRadius)/2,L=[{name:k,value:I,payload:A,dataKey:v,type:h}],q=ve(g.cx,g.cy,$,R);return S=_e(_e(_e({percent:E,cornerRadius:i,name:k,tooltipPayload:L,midAngle:R,middleRadius:$,tooltipPosition:q},A),g),{},{value:Le(A,v),startAngle:T,endAngle:M,payload:A,paddingAngle:Je(x)*c}),S})}return _e(_e({},g),{},{sectors:j,data:a})});var qf,vw;function qz(){if(vw)return qf;vw=1;function e(t){return t&&t.length?t[0]:void 0}return qf=e,qf}var Wf,yw;function Wz(){return yw||(yw=1,Wf=qz()),Wf}var Hz=Wz();const Vz=Ne(Hz);var Uz=["key"];function sa(e){"@babel/helpers - typeof";return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sa(e)}function Kz(e,t){if(e==null)return{};var r=Gz(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Os(){return Os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Os.apply(this,arguments)}function bw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bw(Object(r),!0).forEach(function(n){lr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zz(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ww(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$5(n.key),n)}}function Yz(e,t,r){return t&&ww(e.prototype,t),r&&ww(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xz(e,t,r){return t=Ns(t),Qz(e,M5()?Reflect.construct(t,r||[],Ns(e).constructor):t.apply(e,r))}function Qz(e,t){if(t&&(sa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jz(e)}function Jz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M5=function(){return!!e})()}function Ns(e){return Ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ns(e)}function eB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wp(e,t)}function wp(e,t){return wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},wp(e,t)}function lr(e,t,r){return t=$5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $5(e){var t=tB(e,"string");return sa(t)=="symbol"?t:t+""}function tB(e,t){if(sa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ao=(function(e){function t(){var r;Zz(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Xz(this,t,[].concat(a)),lr(r,"state",{isAnimationFinished:!1}),lr(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),le(s)&&s()}),lr(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),le(s)&&s()}),lr(r,"handleMouseEnter",function(s){var l=r.props.onMouseEnter;l&&l(r.props,s)}),lr(r,"handleMouseLeave",function(s){var l=r.props.onMouseLeave;l&&l(r.props,s)}),r}return eB(t,e),Yz(t,[{key:"renderDots",value:function(n){var a=this.props,i=a.dot,s=a.dataKey,l=oe(this.props,!1),c=oe(i,!0),u=n.map(function(d,f){var h=st(st(st({key:"dot-".concat(f),r:3},l),c),{},{dataKey:s,cx:d.x,cy:d.y,index:f,payload:d});return t.renderDotItem(i,h)});return O.default.createElement(fe,{className:"recharts-radar-dots"},u)}},{key:"renderPolygonStatically",value:function(n){var a=this.props,i=a.shape,s=a.dot,l=a.isRange,c=a.baseLinePoints,u=a.connectNulls,d;return O.default.isValidElement(i)?d=O.default.cloneElement(i,st(st({},this.props),{},{points:n})):le(i)?d=i(st(st({},this.props),{},{points:n})):d=O.default.createElement(N5,Os({},oe(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:n,baseLinePoints:l?c:null,connectNulls:u})),O.default.createElement(fe,{className:"recharts-radar-polygon"},d,s?this.renderDots(n):null)}},{key:"renderPolygonWithAnimation",value:function(){var n=this,a=this.props,i=a.points,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state.prevPoints;return O.default.createElement(Ot,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"radar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var p=h.t,g=f&&f.length/i.length,x=i.map(function(m,v){var b=f&&f[Math.floor(v*g)];if(b){var w=Ee(b.x,m.x),C=Ee(b.y,m.y);return st(st({},m),{},{x:w(p),y:C(p)})}var y=Ee(m.cx,m.x),j=Ee(m.cy,m.y);return st(st({},m),{},{x:y(p),y:j(p)})});return n.renderPolygonStatically(x)})}},{key:"renderPolygon",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,s=n.isRange,l=this.state.prevPoints;return i&&a&&a.length&&!s&&(!l||!br(l,a))?this.renderPolygonWithAnimation():this.renderPolygonStatically(a)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.className,s=n.points,l=n.isAnimationActive;if(a||!s||!s.length)return null;var c=this.state.isAnimationFinished,u=ae.default("recharts-radar",i);return O.default.createElement(fe,{className:u},this.renderPolygon(),(!l||c)&&It.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"renderDotItem",value:function(n,a){var i;if(O.default.isValidElement(n))i=O.default.cloneElement(n,a);else if(le(n))i=n(a);else{var s=a.key,l=Kz(a,Uz);i=O.default.createElement(Ea,Os({},l,{key:s,className:ae.default("recharts-radar-dot",typeof n!="boolean"?n.className:"")}))}return i}}])})(P.PureComponent);lr(ao,"displayName","Radar");lr(ao,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!ar.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});lr(ao,"getComposedData",function(e){var t=e.radiusAxis,r=e.angleAxis,n=e.displayedData,a=e.dataKey,i=e.bandSize,s=r.cx,l=r.cy,c=!1,u=[],d=r.type!=="number"?i??0:0;n.forEach(function(h,p){var g=Le(h,r.dataKey,p),x=Le(h,a),m=r.scale(g)+d,v=Array.isArray(x)?p5(x):x,b=de(v)?void 0:t.scale(v);Array.isArray(x)&&x.length>=2&&(c=!0),u.push(st(st({},ve(s,l,b,m)),{},{name:g,value:x,cx:s,cy:l,radius:b,angle:m,payload:h}))});var f=[];return c&&u.forEach(function(h){if(Array.isArray(h.value)){var p=Vz(h.value),g=de(p)?void 0:t.scale(p);f.push(st(st({},h),{},{radius:g},ve(s,l,g,h.angle)))}else f.push(h)}),{points:u,isRange:c,baseLinePoints:f}});function Fi(e){"@babel/helpers - typeof";return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fi(e)}function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jp.apply(this,arguments)}function jw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jw(Object(r),!0).forEach(function(n){rB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rB(e,t,r){return t=nB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nB(e){var t=aB(e,"string");return Fi(t)=="symbol"?t:t+""}function aB(e,t){if(Fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cw(e){return typeof e=="string"?parseInt(e,10):e}function iB(e,t){var r="".concat(t.cx||e.cx),n=Number(r),a="".concat(t.cy||e.cy),i=Number(a);return Hf(Hf(Hf({},t),e),{},{cx:n,cy:i})}function Sw(e){return O.default.createElement(Px,jp({shapeType:"sector",propTransformer:iB},e))}var oB=["shape","activeShape","activeIndex","cornerRadius"],sB=["value","background"];function la(e){"@babel/helpers - typeof";return la=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(e)}function Ps(){return Ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ps.apply(this,arguments)}function Ow(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ow(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nw(e,t){if(e==null)return{};var r=lB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function cB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L5(n.key),n)}}function uB(e,t,r){return t&&Pw(e.prototype,t),r&&Pw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dB(e,t,r){return t=As(t),fB(e,R5()?Reflect.construct(t,r||[],As(e).constructor):t.apply(e,r))}function fB(e,t){if(t&&(la(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hB(e)}function hB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R5=function(){return!!e})()}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},As(e)}function pB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cp(e,t)}function Cp(e,t){return Cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Cp(e,t)}function cn(e,t,r){return t=L5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L5(e){var t=mB(e,"string");return la(t)=="symbol"?t:t+""}function mB(e,t){if(la(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(la(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ma=(function(e){function t(){var r;cB(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=dB(this,t,[].concat(a)),cn(r,"state",{isAnimationFinished:!1}),cn(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),le(s)&&s()}),cn(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),le(s)&&s()}),r}return pB(t,e),uB(t,[{key:"getDeltaAngle",value:function(){var n=this.props,a=n.startAngle,i=n.endAngle,s=Je(i-a),l=Math.min(Math.abs(i-a),360);return s*l}},{key:"renderSectorsStatically",value:function(n){var a=this,i=this.props,s=i.shape,l=i.activeShape,c=i.activeIndex,u=i.cornerRadius,d=Nw(i,oB),f=oe(d,!1);return n.map(function(h,p){var g=p===c,x=Ye(Ye(Ye(Ye({},f),{},{cornerRadius:Cw(u)},h),xr(a.props,h,p)),{},{className:"recharts-radial-bar-sector ".concat(h.className),forceCornerRadius:d.forceCornerRadius,cornerIsExternal:d.cornerIsExternal,isActive:g,option:g?l:s});return O.default.createElement(Sw,Ps({},x,{key:"sector-".concat(p)}))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,a=this.props,i=a.data,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state.prevData;return O.default.createElement(Ot,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"radialBar-".concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(h){var p=h.t,g=i.map(function(x,m){var v=f&&f[m];if(v){var b=Ee(v.startAngle,x.startAngle),w=Ee(v.endAngle,x.endAngle);return Ye(Ye({},x),{},{startAngle:b(p),endAngle:w(p)})}var C=x.endAngle,y=x.startAngle,j=Ee(y,C);return Ye(Ye({},x),{},{endAngle:j(p)})});return O.default.createElement(fe,null,n.renderSectorsStatically(g))})}},{key:"renderSectors",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,s=this.state.prevData;return i&&a&&a.length&&(!s||!br(s,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"renderBackground",value:function(n){var a=this,i=this.props.cornerRadius,s=oe(this.props.background,!1);return n.map(function(l,c){l.value;var u=l.background,d=Nw(l,sB);if(!u)return null;var f=Ye(Ye(Ye(Ye(Ye({cornerRadius:Cw(i)},d),{},{fill:"#eee"},u),s),xr(a.props,l,c)),{},{index:c,className:ae.default("recharts-radial-bar-background-sector",s?.className),option:u,isActive:!1});return O.default.createElement(Sw,Ps({},f,{key:"sector-".concat(c)}))})}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,s=n.className,l=n.background,c=n.isAnimationActive;if(a||!i||!i.length)return null;var u=this.state.isAnimationFinished,d=ae.default("recharts-area",s);return O.default.createElement(fe,{className:d},l&&O.default.createElement(fe,{className:"recharts-radial-bar-background"},this.renderBackground(i)),O.default.createElement(fe,{className:"recharts-radial-bar-sectors"},this.renderSectors()),(!c||u)&&It.renderCallByParent(Ye({},this.props),i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])})(P.PureComponent);cn(Ma,"displayName","RadialBar");cn(Ma,"defaultProps",{angleAxisId:0,radiusAxisId:0,minPointSize:0,hide:!1,legendType:"rect",data:[],isAnimationActive:!ar.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease",forceCornerRadius:!1,cornerIsExternal:!1});cn(Ma,"getComposedData",function(e){var t=e.item,r=e.props,n=e.radiusAxis,a=e.radiusAxisTicks,i=e.angleAxis,s=e.angleAxisTicks,l=e.displayedData,c=e.dataKey,u=e.stackedData,d=e.barPosition,f=e.bandSize,h=e.dataStartIndex,p=i5(d,t);if(!p)return null;var g=i.cx,x=i.cy,m=r.layout,v=t.props,b=v.children,w=v.minPointSize,C=m==="radial"?i:n,y=u?C.scale.domain():null,j=l5({numericAxis:C}),S=gt(b,bn),A=l.map(function(_,I){var k,E,T,M,R,$;if(u?k=o5(u[h+I],y):(k=Le(_,c),Array.isArray(k)||(k=[j,k])),m==="radial"){E=us({axis:n,ticks:a,bandSize:f,offset:p.offset,entry:_,index:I}),R=i.scale(k[1]),M=i.scale(k[0]),T=E+p.size;var L=R-M;if(Math.abs(w)>0&&Math.abs(L)<Math.abs(w)){var q=Je(L||w)*(Math.abs(w)-Math.abs(L));R+=q}$={background:{cx:g,cy:x,innerRadius:E,outerRadius:T,startAngle:r.startAngle,endAngle:r.endAngle}}}else{E=n.scale(k[0]),T=n.scale(k[1]),M=us({axis:i,ticks:s,bandSize:f,offset:p.offset,entry:_,index:I}),R=M+p.size;var U=T-E;if(Math.abs(w)>0&&Math.abs(U)<Math.abs(w)){var z=Je(U||w)*(Math.abs(w)-Math.abs(U));T+=z}}return Ye(Ye(Ye(Ye({},_),$),{},{payload:_,value:u?k:k[1],cx:g,cy:x,innerRadius:E,outerRadius:T,startAngle:M,endAngle:R},S&&S[I]&&S[I].props),{},{tooltipPayload:[jx(t,_)],tooltipPosition:ve(g,x,(E+T)/2,(M+R)/2)})});return{data:A,layout:m}});var Vf,Aw;function xB(){if(Aw)return Vf;Aw=1;var e=Math.ceil,t=Math.max;function r(n,a,i,s){for(var l=-1,c=t(e((a-n)/(i||1)),0),u=Array(c);c--;)u[s?c:++l]=n,n+=i;return u}return Vf=r,Vf}var Uf,_w;function D5(){if(_w)return Uf;_w=1;var e=XC(),t=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*r}return a===a?a:0}return Uf=n,Uf}var Kf,kw;function gB(){if(kw)return Kf;kw=1;var e=xB(),t=Al(),r=D5();function n(a){return function(i,s,l){return l&&typeof l!="number"&&t(i,s,l)&&(s=l=void 0),i=r(i),s===void 0?(s=i,i=0):s=r(s),l=l===void 0?i<s?1:-1:r(l),e(i,s,l,a)}}return Kf=n,Kf}var Gf,Tw;function vB(){if(Tw)return Gf;Tw=1;var e=gB(),t=e();return Gf=t,Gf}var yB=vB();const _s=Ne(yB);function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function Ew(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Iw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ew(Object(r),!0).forEach(function(n){z5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ew(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z5(e,t,r){return t=bB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bB(e){var t=wB(e,"string");return qi(t)=="symbol"?t:t+""}function wB(e,t){if(qi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jB=["Webkit","Moz","O","ms"],CB=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=jB.reduce(function(i,s){return Iw(Iw({},i),{},z5({},s+n,r))},{});return a[t]=r,a};function ca(e){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(e)}function ks(){return ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ks.apply(this,arguments)}function Mw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(r),!0).forEach(function(n){bt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F5(n.key),n)}}function OB(e,t,r){return t&&$w(e.prototype,t),r&&$w(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function NB(e,t,r){return t=Ts(t),PB(e,B5()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function PB(e,t){if(t&&(ca(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AB(e)}function AB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(B5=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(e)}function _B(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sp(e,t)}function Sp(e,t){return Sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Sp(e,t)}function bt(e,t,r){return t=F5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F5(e){var t=kB(e,"string");return ca(t)=="symbol"?t:t+""}function kB(e,t){if(ca(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ca(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var TB=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,s=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=ti().domain(_s(0,c)).range([i,i+s-l]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:d}},Rw=function(t){return t.changedTouches&&!!t.changedTouches.length},ua=(function(e){function t(r){var n;return SB(this,t),n=NB(this,t,[r]),bt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),bt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),bt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,s=a.onDragEnd,l=a.startIndex;s?.({endIndex:i,startIndex:l})}),n.detachDragEndListener()}),bt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),bt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),bt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),bt(n,"handleSlideDragStart",function(a){var i=Rw(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return _B(t,e),OB(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,s=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,d=u.length-1,f=Math.min(a,i),h=Math.max(a,i),p=t.getIndexInRange(s,f),g=t.getIndexInRange(s,h);return{startIndex:p-p%c,endIndex:g===d?d:g-g%c}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,s=a.tickFormatter,l=a.dataKey,c=Le(i[n],l,n);return le(s)?s(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,s=a.startX,l=a.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,h=c.startIndex,p=c.endIndex,g=c.onChange,x=n.pageX-i;x>0?x=Math.min(x,u+d-f-l,u+d-f-s):x<0&&(x=Math.max(x,u-s,u-l));var m=this.getIndex({startX:s+x,endX:l+x});(m.startIndex!==h||m.endIndex!==p)&&g&&g(m),this.setState({startX:s+x,endX:l+x,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Rw(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,s=a.movingTravellerId,l=a.endX,c=a.startX,u=this.state[s],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,x=d.gap,m=d.data,v={startX:this.state.startX,endX:this.state.endX},b=n.pageX-i;b>0?b=Math.min(b,f+h-p-u):b<0&&(b=Math.max(b,f-u)),v[s]=u+b;var w=this.getIndex(v),C=w.startIndex,y=w.endIndex,j=function(){var A=m.length-1;return s==="startX"&&(l>c?C%x===0:y%x===0)||l<c&&y===A||s==="endX"&&(l>c?y%x===0:C%x===0)||l>c&&y===A};this.setState(bt(bt({},s,u+b),"brushMoveStartX",n.pageX),function(){g&&j()&&g(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,s=this.state,l=s.scaleValues,c=s.startX,u=s.endX,d=this.state[a],f=l.indexOf(d);if(f!==-1){var h=f+n;if(!(h===-1||h>=l.length)){var p=l[h];a==="startX"&&p>=u||a==="endX"&&p<=c||this.setState(bt({},a,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.fill,u=n.stroke;return O.default.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:s,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.data,u=n.children,d=n.padding,f=P.Children.only(u);return f?O.default.cloneElement(f,{x:a,y:i,width:s,height:l,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,s,l=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,h=c.traveller,p=c.ariaLabel,g=c.data,x=c.startIndex,m=c.endIndex,v=Math.max(n,this.props.x),b=Zf(Zf({},oe(this.props,!1)),{},{x:v,y:u,width:d,height:f}),w=p||"Min value: ".concat((i=g[x])===null||i===void 0?void 0:i.name,", Max value: ").concat((s=g[m])===null||s===void 0?void 0:s.name);return O.default.createElement(fe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(y){["ArrowLeft","ArrowRight"].includes(y.key)&&(y.preventDefault(),y.stopPropagation(),l.handleTravellerMoveKeyboard(y.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,b))}},{key:"renderSlide",value:function(n,a){var i=this.props,s=i.y,l=i.height,c=i.stroke,u=i.travellerWidth,d=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return O.default.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:s,width:f,height:l})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,s=n.y,l=n.height,c=n.travellerWidth,u=n.stroke,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:u};return O.default.createElement(fe,{className:"recharts-brush-texts"},O.default.createElement(dn,ks({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:s+l/2},g),this.getTextOfTick(a)),O.default.createElement(dn,ks({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+c+p,y:s+l/2},g),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,s=n.children,l=n.x,c=n.y,u=n.width,d=n.height,f=n.alwaysShowText,h=this.state,p=h.startX,g=h.endX,x=h.isTextActive,m=h.isSlideMoving,v=h.isTravellerMoving,b=h.isTravellerFocused;if(!a||!a.length||!Y(l)||!Y(c)||!Y(u)||!Y(d)||u<=0||d<=0)return null;var w=ae.default("recharts-brush",i),C=O.default.Children.count(s)===1,y=CB("userSelect","none");return O.default.createElement(fe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(x||m||v||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,s=n.width,l=n.height,c=n.stroke,u=Math.floor(i+l/2)-1;return O.default.createElement(O.default.Fragment,null,O.default.createElement("rect",{x:a,y:i,width:s,height:l,fill:c,stroke:"none"}),O.default.createElement("line",{x1:a+1,y1:u,x2:a+s-1,y2:u,fill:"none",stroke:"#fff"}),O.default.createElement("line",{x1:a+1,y1:u+2,x2:a+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return O.default.isValidElement(n)?i=O.default.cloneElement(n,a):le(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,s=n.width,l=n.x,c=n.travellerWidth,u=n.updateId,d=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return Zf({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:s},i&&i.length?TB({data:i,width:s,x:l,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+s-c]);var h=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:s,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,s=0,l=i-1;l-s>1;){var c=Math.floor((s+l)/2);n[c]>a?l=c:s=c}return a>=n[l]?l:s}}])})(P.PureComponent);bt(ua,"displayName","Brush");bt(ua,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Yf,Lw;function EB(){if(Lw)return Yf;Lw=1;var e=Gm();function t(r,n){var a;return e(r,function(i,s,l){return a=n(i,s,l),!a}),!!a}return Yf=t,Yf}var Xf,Dw;function IB(){if(Dw)return Xf;Dw=1;var e=AC(),t=nr(),r=EB(),n=vt(),a=Al();function i(s,l,c){var u=n(s)?e:r;return c&&a(s,l,c)&&(l=void 0),u(s,t(l,3))}return Xf=i,Xf}var MB=IB();const $B=Ne(MB);var Xt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Qf,zw;function RB(){if(zw)return Qf;zw=1;var e=UC();function t(r,n,a){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return Qf=t,Qf}var Jf,Bw;function LB(){if(Bw)return Jf;Bw=1;var e=RB(),t=HC(),r=nr();function n(a,i){var s={};return i=r(i,3),t(a,function(l,c,u){e(s,c,i(l,c,u))}),s}return Jf=n,Jf}var DB=LB();const zB=Ne(DB);var eh,Fw;function BB(){if(Fw)return eh;Fw=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(!r(t[n],n,t))return!1;return!0}return eh=e,eh}var th,qw;function FB(){if(qw)return th;qw=1;var e=Gm();function t(r,n){var a=!0;return e(r,function(i,s,l){return a=!!n(i,s,l),a}),a}return th=t,th}var rh,Ww;function qB(){if(Ww)return rh;Ww=1;var e=BB(),t=FB(),r=nr(),n=vt(),a=Al();function i(s,l,c){var u=n(s)?e:t;return c&&a(s,l,c)&&(l=void 0),u(s,r(l,3))}return rh=i,rh}var WB=qB();const q5=Ne(WB);var HB=["x","y"];function da(e){"@babel/helpers - typeof";return da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},da(e)}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Op.apply(this,arguments)}function Hw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(r),!0).forEach(function(n){VB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VB(e,t,r){return t=UB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UB(e){var t=KB(e,"string");return da(t)=="symbol"?t:t+""}function KB(e,t){if(da(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(da(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GB(e,t){if(e==null)return{};var r=ZB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function YB(e,t){var r=e.x,n=e.y,a=GB(e,HB),i="".concat(r),s=parseInt(i,10),l="".concat(n),c=parseInt(l,10),u="".concat(t.height||a.height),d=parseInt(u,10),f="".concat(t.width||a.width),h=parseInt(f,10);return Za(Za(Za(Za(Za({},t),a),s?{x:s}:{}),c?{y:c}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function Vw(e){return O.default.createElement(Px,Op({shapeType:"rectangle",propTransformer:YB,activeClassName:"recharts-active-bar"},e))}var XB=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=Y(n)||__(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?xt(!1,"minPointSize callback function received a value with type of ".concat(da(n),". Currently only numbers or null/undefined are supported.")):xt()),r)}},QB=["value","background"],W5;function fa(e){"@babel/helpers - typeof";return fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fa(e)}function JB(e,t){if(e==null)return{};var r=eF(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Es(){return Es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Es.apply(this,arguments)}function Uw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uw(Object(r),!0).forEach(function(n){Ir(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,V5(n.key),n)}}function rF(e,t,r){return t&&Kw(e.prototype,t),r&&Kw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nF(e,t,r){return t=Is(t),aF(e,H5()?Reflect.construct(t,r||[],Is(e).constructor):t.apply(e,r))}function aF(e,t){if(t&&(fa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iF(e)}function iF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H5=function(){return!!e})()}function Is(e){return Is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Is(e)}function oF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Np(e,t)}function Np(e,t){return Np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Np(e,t)}function Ir(e,t,r){return t=V5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V5(e){var t=sF(e,"string");return fa(t)=="symbol"?t:t+""}function sF(e,t){if(fa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jr=(function(e){function t(){var r;tF(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=nF(this,t,[].concat(a)),Ir(r,"state",{isAnimationFinished:!1}),Ir(r,"id",yn("recharts-bar-")),Ir(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),Ir(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return oF(t,e),rF(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,s=i.shape,l=i.dataKey,c=i.activeIndex,u=i.activeBar,d=oe(this.props,!1);return n&&n.map(function(f,h){var p=h===c,g=p?u:s,x=Fe(Fe(Fe({},d),f),{},{isActive:p,option:g,index:h,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return O.default.createElement(fe,Es({className:"recharts-bar-rectangle"},xr(a.props,f,h),{key:"rectangle-".concat(f?.x,"-").concat(f?.y,"-").concat(f?.value,"-").concat(h)}),O.default.createElement(Vw,x))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,s=a.layout,l=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,d=a.animationEasing,f=a.animationId,h=this.state.prevData;return O.default.createElement(Ot,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,x=i.map(function(m,v){var b=h&&h[v];if(b){var w=Ee(b.x,m.x),C=Ee(b.y,m.y),y=Ee(b.width,m.width),j=Ee(b.height,m.height);return Fe(Fe({},m),{},{x:w(g),y:C(g),width:y(g),height:j(g)})}if(s==="horizontal"){var S=Ee(0,m.height),A=S(g);return Fe(Fe({},m),{},{y:m.y+m.height-A,height:A})}var _=Ee(0,m.width),I=_(g);return Fe(Fe({},m),{},{width:I})});return O.default.createElement(fe,null,n.renderRectanglesStatically(x))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,s=this.state.prevData;return i&&a&&a.length&&(!s||!br(s,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,s=a.dataKey,l=a.activeIndex,c=oe(this.props.background,!1);return i.map(function(u,d){u.value;var f=u.background,h=JB(u,QB);if(!f)return null;var p=Fe(Fe(Fe(Fe(Fe({},h),{},{fill:"#eee"},f),c),xr(n.props,u,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return O.default.createElement(Vw,Es({key:"background-bar-".concat(d),option:n.props.background,isActive:d===l},p))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.data,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=gt(d,no);if(!f)return null;var h=u==="vertical"?s[0].height/2:s[0].width/2,p=function(m,v){var b=Array.isArray(m.value)?m.value[1]:m.value;return{x:m.x,y:m.y,value:b,errorVal:Le(m,v)}},g={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.default.createElement(fe,g,f.map(function(x){return O.default.cloneElement(x,{key:"error-bar-".concat(a,"-").concat(x.props.dataKey),data:s,xAxis:l,yAxis:c,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,s=n.className,l=n.xAxis,c=n.yAxis,u=n.left,d=n.top,f=n.width,h=n.height,p=n.isAnimationActive,g=n.background,x=n.id;if(a||!i||!i.length)return null;var m=this.state.isAnimationFinished,v=ae.default("recharts-bar",s),b=l&&l.allowDataOverflow,w=c&&c.allowDataOverflow,C=b||w,y=de(x)?this.id:x;return O.default.createElement(fe,{className:v},b||w?O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"clipPath-".concat(y)},O.default.createElement("rect",{x:b?u:u-f/2,y:w?d:d-h/2,width:b?f:f*2,height:w?h:h*2}))):null,O.default.createElement(fe,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(y,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,y),(!p||m)&&It.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])})(P.PureComponent);W5=jr;Ir(jr,"displayName","Bar");Ir(jr,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ar.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ir(jr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,s=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=i5(n,r);if(!p)return null;var g=t.layout,x=r.type.defaultProps,m=x!==void 0?Fe(Fe({},x),r.props):r.props,v=m.dataKey,b=m.children,w=m.minPointSize,C=g==="horizontal"?s:i,y=u?C.scale.domain():null,j=l5({numericAxis:C}),S=gt(b,bn),A=f.map(function(_,I){var k,E,T,M,R,$;u?k=o5(u[d+I],y):(k=Le(_,v),Array.isArray(k)||(k=[j,k]));var L=XB(w,W5.defaultProps.minPointSize)(k[1],I);if(g==="horizontal"){var q,U=[s.scale(k[0]),s.scale(k[1])],z=U[0],F=U[1];E=us({axis:i,ticks:l,bandSize:a,offset:p.offset,entry:_,index:I}),T=(q=F??z)!==null&&q!==void 0?q:void 0,M=p.size;var H=z-F;if(R=Number.isNaN(H)?0:H,$={x:E,y:s.y,width:M,height:s.height},Math.abs(L)>0&&Math.abs(R)<Math.abs(L)){var W=Je(R||L)*(Math.abs(L)-Math.abs(R));T-=W,R+=W}}else{var Z=[i.scale(k[0]),i.scale(k[1])],re=Z[0],X=Z[1];if(E=re,T=us({axis:s,ticks:c,bandSize:a,offset:p.offset,entry:_,index:I}),M=X-re,R=p.size,$={x:i.x,y:T,width:i.width,height:R},Math.abs(L)>0&&Math.abs(M)<Math.abs(L)){var ne=Je(M||L)*(Math.abs(L)-Math.abs(M));M+=ne}}return Fe(Fe(Fe({},_),{},{x:E,y:T,width:M,height:R,value:u?k:k[1],payload:_,background:$},S&&S[I]&&S[I].props),{},{tooltipPayload:[jx(r,_)],tooltipPosition:{x:E+M/2,y:T+R/2}})});return Fe({data:A,layout:g},h)});function Wi(e){"@babel/helpers - typeof";return Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wi(e)}function lF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,U5(n.key),n)}}function cF(e,t,r){return t&&Gw(e.prototype,t),r&&Gw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zw(Object(r),!0).forEach(function(n){Wl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wl(e,t,r){return t=U5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U5(e){var t=uF(e,"string");return Wi(t)=="symbol"?t:t+""}function uF(e,t){if(Wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ax=function(t,r,n,a,i){var s=t.width,l=t.height,c=t.layout,u=t.children,d=Object.keys(r),f={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},h=!!wt(u,jr);return d.reduce(function(p,g){var x=r[g],m=x.orientation,v=x.domain,b=x.padding,w=b===void 0?{}:b,C=x.mirror,y=x.reversed,j="".concat(m).concat(C?"Mirror":""),S,A,_,I,k;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var E=v[1]-v[0],T=1/0,M=x.categoricalDomain.sort(E_);if(M.forEach(function(Z,re){re>0&&(T=Math.min((Z||0)-(M[re-1]||0),T))}),Number.isFinite(T)){var R=T/E,$=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(S=R*$/2),x.padding==="no-gap"){var L=ct(t.barCategoryGap,R*$),q=R*$/2;S=q-L-(q-L)/$*L}}}a==="xAxis"?A=[n.left+(w.left||0)+(S||0),n.left+n.width-(w.right||0)-(S||0)]:a==="yAxis"?A=c==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(S||0),n.top+n.height-(w.bottom||0)-(S||0)]:A=x.range,y&&(A=[A[1],A[0]]);var U=n5(x,i,h),z=U.scale,F=U.realScaleType;z.domain(v).range(A),a5(z);var H=s5(z,Lt(Lt({},x),{},{realScaleType:F}));a==="xAxis"?(k=m==="top"&&!C||m==="bottom"&&C,_=n.left,I=f[j]-k*x.height):a==="yAxis"&&(k=m==="left"&&!C||m==="right"&&C,_=f[j]-k*x.width,I=n.top);var W=Lt(Lt(Lt({},x),H),{},{realScaleType:F,x:_,y:I,scale:z,width:a==="xAxis"?n.width:x.width,height:a==="yAxis"?n.height:x.height});return W.bandSize=ds(W,H),!x.hide&&a==="xAxis"?f[j]+=(k?-1:1)*W.height:x.hide||(f[j]+=(k?-1:1)*W.width),Lt(Lt({},p),{},Wl({},g,W))},{})},K5=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return{x:Math.min(n,i),y:Math.min(a,s),width:Math.abs(i-n),height:Math.abs(s-a)}},dF=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return K5({x:r,y:n},{x:a,y:i})},G5=(function(){function e(t){lF(this,e),this.scale=t}return cF(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])})();Wl(G5,"EPS",1e-4);var _x=function(t){var r=Object.keys(t).reduce(function(n,a){return Lt(Lt({},n),{},Wl({},a,G5.create(t[a])))},{});return Lt(Lt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.bandAware,l=i.position;return zB(a,function(c,u){return r[u].apply(c,{bandAware:s,position:l})})},isInRange:function(a){return q5(a,function(i,s){return r[s].isInRange(i)})}})};function fF(e){return(e%180+180)%180}var hF=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=fF(a),s=i*Math.PI/180,l=Math.atan(n/r),c=s>l&&s<Math.PI-l?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},nh,Yw;function pF(){if(Yw)return nh;Yw=1;var e=nr(),t=Qi(),r=Nl();function n(a){return function(i,s,l){var c=Object(i);if(!t(i)){var u=e(s,3);i=r(i),s=function(f){return u(c[f],f,c)}}var d=a(i,s,l);return d>-1?c[u?i[d]:d]:void 0}}return nh=n,nh}var ah,Xw;function mF(){if(Xw)return ah;Xw=1;var e=D5();function t(r){var n=e(r),a=n%1;return n===n?a?n-a:n:0}return ah=t,ah}var ih,Qw;function xF(){if(Qw)return ih;Qw=1;var e=zC(),t=nr(),r=mF(),n=Math.max;function a(i,s,l){var c=i==null?0:i.length;if(!c)return-1;var u=l==null?0:r(l);return u<0&&(u=n(c+u,0)),e(i,t(s,3),u)}return ih=a,ih}var oh,Jw;function gF(){if(Jw)return oh;Jw=1;var e=pF(),t=xF(),r=e(t);return oh=r,oh}var vF=gF();const yF=Ne(vF);var bF=eC();const wF=Ne(bF);var jF=wF(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function Ms(e){"@babel/helpers - typeof";return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(e)}var kx=P.createContext(void 0),Tx=P.createContext(void 0),Z5=P.createContext(void 0),Y5=P.createContext({}),X5=P.createContext(void 0),Q5=P.createContext(0),J5=P.createContext(0),ej=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,s=t.clipPathId,l=t.children,c=t.width,u=t.height,d=jF(i);return O.default.createElement(kx.Provider,{value:n},O.default.createElement(Tx.Provider,{value:a},O.default.createElement(Y5.Provider,{value:i},O.default.createElement(Z5.Provider,{value:d},O.default.createElement(X5.Provider,{value:s},O.default.createElement(Q5.Provider,{value:u},O.default.createElement(J5.Provider,{value:c},l)))))))},CF=function(){return P.useContext(X5)};function eO(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var tO=function(t){var r=P.useContext(kx);r==null&&(process.env.NODE_ENV!=="production"?xt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):xt());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?xt(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(Ms(t),"]. ").concat(eO(r))):xt()),n},SF=function(){var t=P.useContext(kx);return Tr(t)},OF=function(){var t=P.useContext(Tx),r=yF(t,function(n){return q5(n.domain,Number.isFinite)});return r||Tr(t)},rO=function(t){var r=P.useContext(Tx);r==null&&(process.env.NODE_ENV!=="production"?xt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):xt());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?xt(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(Ms(t),"]. ").concat(eO(r))):xt()),n},NF=function(){var t=P.useContext(Z5);return t},PF=function(){return P.useContext(Y5)},Ex=function(){return P.useContext(J5)},Ix=function(){return P.useContext(Q5)};function ha(e){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(e)}function AF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _F(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aO(n.key),n)}}function kF(e,t,r){return t&&_F(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TF(e,t,r){return t=$s(t),EF(e,nO()?Reflect.construct(t,r||[],$s(e).constructor):t.apply(e,r))}function EF(e,t){if(t&&(ha(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IF(e)}function IF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nO=function(){return!!e})()}function $s(e){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$s(e)}function MF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pp(e,t)}function Pp(e,t){return Pp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Pp(e,t)}function tj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tj(Object(r),!0).forEach(function(n){Mx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mx(e,t,r){return t=aO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aO(e){var t=$F(e,"string");return ha(t)=="symbol"?t:t+""}function $F(e,t){if(ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function RF(e,t){return BF(e)||zF(e,t)||DF(e,t)||LF()}function LF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
86
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DF(e,t){if(e){if(typeof e=="string")return nj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nj(e,t)}}function nj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function BF(e){if(Array.isArray(e))return e}function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ap.apply(this,arguments)}var FF=function(t,r){var n;return O.default.isValidElement(t)?n=O.default.cloneElement(t,r):le(t)?n=t(r):n=O.default.createElement("line",Ap({},r,{className:"recharts-reference-line-line"})),n},qF=function(t,r,n,a,i,s,l,c,u){var d=i.x,f=i.y,h=i.width,p=i.height;if(n){var g=u.y,x=t.y.apply(g,{position:s});if(Xt(u,"discard")&&!t.y.isInRange(x))return null;var m=[{x:d+h,y:x},{x:d,y:x}];return c==="left"?m.reverse():m}if(r){var v=u.x,b=t.x.apply(v,{position:s});if(Xt(u,"discard")&&!t.x.isInRange(b))return null;var w=[{x:b,y:f+p},{x:b,y:f}];return l==="top"?w.reverse():w}if(a){var C=u.segment,y=C.map(function(j){return t.apply(j,{position:s})});return Xt(u,"discard")&&$B(y,function(j){return!t.isInRange(j)})?null:y}return null};function WF(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,s=e.shape,l=e.className,c=e.alwaysShow,u=CF(),d=tO(a),f=rO(i),h=NF();if(!u||!h)return null;Et(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=_x({x:d.scale,y:f.scale}),g=Ke(t),x=Ke(r),m=n&&n.length===2,v=qF(p,g,x,m,h,e.position,d.orientation,f.orientation,e);if(!v)return null;var b=RF(v,2),w=b[0],C=w.x,y=w.y,j=b[1],S=j.x,A=j.y,_=Xt(e,"hidden")?"url(#".concat(u,")"):void 0,I=rj(rj({clipPath:_},oe(e,!0)),{},{x1:C,y1:y,x2:S,y2:A});return O.default.createElement(fe,{className:ae.default("recharts-reference-line",l)},FF(s,I),Qe.renderCallByParent(e,dF({x1:C,y1:y,x2:S,y2:A})))}var $x=(function(e){function t(){return AF(this,t),TF(this,t,arguments)}return MF(t,e),kF(t,[{key:"render",value:function(){return O.default.createElement(WF,this.props)}}])})(O.default.Component);Mx($x,"displayName","ReferenceLine");Mx($x,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_p.apply(this,arguments)}function pa(e){"@babel/helpers - typeof";return pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(e)}function aj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ij(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aj(Object(r),!0).forEach(function(n){Hl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oO(n.key),n)}}function UF(e,t,r){return t&&VF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KF(e,t,r){return t=Rs(t),GF(e,iO()?Reflect.construct(t,r||[],Rs(e).constructor):t.apply(e,r))}function GF(e,t){if(t&&(pa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZF(e)}function ZF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iO=function(){return!!e})()}function Rs(e){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Rs(e)}function YF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kp(e,t)}function kp(e,t){return kp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},kp(e,t)}function Hl(e,t,r){return t=oO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oO(e){var t=XF(e,"string");return pa(t)=="symbol"?t:t+""}function XF(e,t){if(pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var QF=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,s=_x({x:a.scale,y:i.scale}),l=s.apply({x:r,y:n},{bandAware:!0});return Xt(t,"discard")&&!s.isInRange(l)?null:l},Vl=(function(e){function t(){return HF(this,t),KF(this,t,arguments)}return YF(t,e),UF(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,s=n.r,l=n.alwaysShow,c=n.clipPathId,u=Ke(a),d=Ke(i);if(Et(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=QF(this.props);if(!f)return null;var h=f.x,p=f.y,g=this.props,x=g.shape,m=g.className,v=Xt(this.props,"hidden")?"url(#".concat(c,")"):void 0,b=ij(ij({clipPath:v},oe(this.props,!0)),{},{cx:h,cy:p});return O.default.createElement(fe,{className:ae.default("recharts-reference-dot",m)},t.renderDot(x,b),Qe.renderCallByParent(this.props,{x:h-s,y:p-s,width:2*s,height:2*s}))}}])})(O.default.Component);Hl(Vl,"displayName","ReferenceDot");Hl(Vl,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Hl(Vl,"renderDot",function(e,t){var r;return O.default.isValidElement(e)?r=O.default.cloneElement(e,t):le(e)?r=e(t):r=O.default.createElement(Ea,_p({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Tp(){return Tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tp.apply(this,arguments)}function ma(e){"@babel/helpers - typeof";return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(e)}function oj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oj(Object(r),!0).forEach(function(n){Ul(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lO(n.key),n)}}function tq(e,t,r){return t&&eq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rq(e,t,r){return t=Ls(t),nq(e,sO()?Reflect.construct(t,r||[],Ls(e).constructor):t.apply(e,r))}function nq(e,t){if(t&&(ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aq(e)}function aq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sO=function(){return!!e})()}function Ls(e){return Ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ls(e)}function iq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ep(e,t)}function Ep(e,t){return Ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ep(e,t)}function Ul(e,t,r){return t=lO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lO(e){var t=oq(e,"string");return ma(t)=="symbol"?t:t+""}function oq(e,t){if(ma(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ma(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sq=function(t,r,n,a,i){var s=i.x1,l=i.x2,c=i.y1,u=i.y2,d=i.xAxis,f=i.yAxis;if(!d||!f)return null;var h=_x({x:d.scale,y:f.scale}),p={x:t?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(c,{position:"start"}):h.y.rangeMin},g={x:r?h.x.apply(l,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Xt(i,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:K5(p,g)},Kl=(function(e){function t(){return JF(this,t),rq(this,t,arguments)}return iq(t,e),tq(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,s=n.y1,l=n.y2,c=n.className,u=n.alwaysShow,d=n.clipPathId;Et(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ke(a),h=Ke(i),p=Ke(s),g=Ke(l),x=this.props.shape;if(!f&&!h&&!p&&!g&&!x)return null;var m=sq(f,h,p,g,this.props);if(!m&&!x)return null;var v=Xt(this.props,"hidden")?"url(#".concat(d,")"):void 0;return O.default.createElement(fe,{className:ae.default("recharts-reference-area",c)},t.renderRect(x,sj(sj({clipPath:v},oe(this.props,!0)),m)),Qe.renderCallByParent(this.props,m))}}])})(O.default.Component);Ul(Kl,"displayName","ReferenceArea");Ul(Kl,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Ul(Kl,"renderRect",function(e,t){var r;return O.default.isValidElement(e)?r=O.default.cloneElement(e,t):le(e)?r=e(t):r=O.default.createElement(Nx,Tp({},t,{className:"recharts-reference-area-rect"})),r});function cO(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function lq(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return hF(n,r)}function cq(e,t,r){var n=r==="width",a=e.x,i=e.y,s=e.width,l=e.height;return t===1?{start:n?a:i,end:n?a+s:i+l}:{start:n?a+s:i+l,end:n?a:i}}function Ds(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function uq(e,t){return cO(e,t+1)}function dq(e,t,r,n,a){for(var i=(n||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s,f=function(){var g=n?.[c];if(g===void 0)return{v:cO(n,u)};var x=c,m,v=function(){return m===void 0&&(m=r(g,x)),m},b=g.coordinate,w=c===0||Ds(e,b,v,d,l);w||(c=0,d=s,u+=1),w&&(d=b+e*(v()/2+a),c+=u)},h;u<=i.length;)if(h=f(),h)return h.v;return[]}function Hi(e){"@babel/helpers - typeof";return Hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hi(e)}function lj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lj(Object(r),!0).forEach(function(n){fq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fq(e,t,r){return t=hq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hq(e){var t=pq(e,"string");return Hi(t)=="symbol"?t:t+""}function pq(e,t){if(Hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mq(e,t,r,n,a){for(var i=(n||[]).slice(),s=i.length,l=t.start,c=t.end,u=function(h){var p=i[h],g,x=function(){return g===void 0&&(g=r(p,h)),g};if(h===s-1){var m=e*(p.coordinate+e*x()/2-c);i[h]=p=at(at({},p),{},{tickCoord:m>0?p.coordinate-m*e:p.coordinate})}else i[h]=p=at(at({},p),{},{tickCoord:p.coordinate});var v=Ds(e,p.tickCoord,x,l,c);v&&(c=p.tickCoord-e*(x()/2+a),i[h]=at(at({},p),{},{isShow:!0}))},d=s-1;d>=0;d--)u(d);return i}function xq(e,t,r,n,a,i){var s=(n||[]).slice(),l=s.length,c=t.start,u=t.end;if(i){var d=n[l-1],f=r(d,l-1),h=e*(d.coordinate+e*f/2-u);s[l-1]=d=at(at({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=Ds(e,d.tickCoord,function(){return f},c,u);p&&(u=d.tickCoord-e*(f/2+a),s[l-1]=at(at({},d),{},{isShow:!0}))}for(var g=i?l-1:l,x=function(b){var w=s[b],C,y=function(){return C===void 0&&(C=r(w,b)),C};if(b===0){var j=e*(w.coordinate-e*y()/2-c);s[b]=w=at(at({},w),{},{tickCoord:j<0?w.coordinate-j*e:w.coordinate})}else s[b]=w=at(at({},w),{},{tickCoord:w.coordinate});var S=Ds(e,w.tickCoord,y,c,u);S&&(c=w.tickCoord+e*(y()/2+a),s[b]=at(at({},w),{},{isShow:!0}))},m=0;m<g;m++)x(m);return s}function Rx(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,s=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(Y(c)||ar.isSsr)return uq(a,typeof c=="number"&&Y(c)?c:0);var h=[],p=l==="top"||l==="bottom"?"width":"height",g=d&&p==="width"?ei(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},x=function(w,C){var y=le(u)?u(w.value,C):w.value;return p==="width"?lq(ei(y,{fontSize:t,letterSpacing:r}),g,f):ei(y,{fontSize:t,letterSpacing:r})[p]},m=a.length>=2?Je(a[1].coordinate-a[0].coordinate):1,v=cq(i,m,p);return c==="equidistantPreserveStart"?dq(m,v,x,a,s):(c==="preserveStart"||c==="preserveStartEnd"?h=xq(m,v,x,a,s,c==="preserveStartEnd"):h=mq(m,v,x,a,s),h.filter(function(b){return b.isShow}))}var gq=["viewBox"],vq=["viewBox"],yq=["ticks"];function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function Ln(){return Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ln.apply(this,arguments)}function cj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cj(Object(r),!0).forEach(function(n){Lx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sh(e,t){if(e==null)return{};var r=bq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uj(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dO(n.key),n)}}function jq(e,t,r){return t&&uj(e.prototype,t),r&&uj(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cq(e,t,r){return t=zs(t),Sq(e,uO()?Reflect.construct(t,r||[],zs(e).constructor):t.apply(e,r))}function Sq(e,t){if(t&&(xa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oq(e)}function Oq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uO=function(){return!!e})()}function zs(e){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zs(e)}function Nq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ip(e,t)}function Ip(e,t){return Ip=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ip(e,t)}function Lx(e,t,r){return t=dO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dO(e){var t=Pq(e,"string");return xa(t)=="symbol"?t:t+""}function Pq(e,t){if(xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $a=(function(e){function t(r){var n;return wq(this,t),n=Cq(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Nq(t,e),jq(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,s=sh(n,gq),l=this.props,c=l.viewBox,u=sh(l,vq);return!zn(i,c)||!zn(s,u)||!zn(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,s=a.y,l=a.width,c=a.height,u=a.orientation,d=a.tickSize,f=a.mirror,h=a.tickMargin,p,g,x,m,v,b,w=f?-1:1,C=n.tickSize||d,y=Y(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=g=n.coordinate,m=s+ +!f*c,x=m-w*C,b=x-w*h,v=y;break;case"left":x=m=n.coordinate,g=i+ +!f*l,p=g-w*C,v=p-w*h,b=y;break;case"right":x=m=n.coordinate,g=i+ +f*l,p=g+w*C,v=p+w*h,b=y;break;default:p=g=n.coordinate,m=s+ +f*c,x=m+w*C,b=x+w*h,v=y;break}return{line:{x1:p,y1:x,x2:g,y2:m},tick:{x:v,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s;switch(a){case"left":s=i?"start":"end";break;case"right":s=i?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s="end";switch(a){case"left":case"right":s="middle";break;case"top":s=i?"start":"end";break;default:s=i?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.orientation,u=n.mirror,d=n.axisLine,f=Ve(Ve(Ve({},oe(this.props,!1)),oe(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);f=Ve(Ve({},f),{},{x1:a,y1:i+h*l,x2:a+s,y2:i+h*l})}else{var p=+(c==="left"&&!u||c==="right"&&u);f=Ve(Ve({},f),{},{x1:a+p*s,y1:i,x2:a+p*s,y2:i+l})}return O.default.createElement("line",Ln({},f,{className:ae.default("recharts-cartesian-axis-line",St(d,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var s=this,l=this.props,c=l.tickLine,u=l.stroke,d=l.tick,f=l.tickFormatter,h=l.unit,p=Rx(Ve(Ve({},this.props),{},{ticks:n}),a,i),g=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),m=oe(this.props,!1),v=oe(d,!1),b=Ve(Ve({},m),{},{fill:"none"},oe(c,!1)),w=p.map(function(C,y){var j=s.getTickLineCoord(C),S=j.line,A=j.tick,_=Ve(Ve(Ve(Ve({textAnchor:g,verticalAnchor:x},m),{},{stroke:"none",fill:u},v),A),{},{index:y,payload:C,visibleTicksCount:p.length,tickFormatter:f});return O.default.createElement(fe,Ln({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},xr(s.props,C,y)),c&&O.default.createElement("line",Ln({},b,S,{className:ae.default("recharts-cartesian-axis-tick-line",St(c,"className"))})),d&&t.renderTickItem(d,_,"".concat(le(f)?f(C.value,y):C.value).concat(h||"")))});return O.default.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,s=a.width,l=a.height,c=a.ticksGenerator,u=a.className,d=a.hide;if(d)return null;var f=this.props,h=f.ticks,p=sh(f,yq),g=h;return le(c)&&(g=h&&h.length>0?c(this.props):c(p)),s<=0||l<=0||!g||!g.length?null:O.default.createElement(fe,{className:ae.default("recharts-cartesian-axis",u),ref:function(m){n.layerReference=m}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Qe.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var s,l=ae.default(a.className,"recharts-cartesian-axis-tick-value");return O.default.isValidElement(n)?s=O.default.cloneElement(n,Ve(Ve({},a),{},{className:l})):le(n)?s=n(Ve(Ve({},a),{},{className:l})):s=O.default.createElement(dn,Ln({},a,{className:"recharts-cartesian-axis-tick-value"}),i),s}}])})(P.Component);Lx($a,"displayName","CartesianAxis");Lx($a,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Aq=["x1","y1","x2","y2","key"],_q=["offset"];function hn(e){"@babel/helpers - typeof";return hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(e)}function dj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dj(Object(r),!0).forEach(function(n){kq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kq(e,t,r){return t=Tq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tq(e){var t=Eq(e,"string");return hn(t)=="symbol"?t:t+""}function Eq(e,t){if(hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nn.apply(this,arguments)}function fj(e,t){if(e==null)return{};var r=Iq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Iq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Mq=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,s=t.width,l=t.height,c=t.ry;return O.default.createElement("rect",{x:a,y:i,ry:c,width:s,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function fO(e,t){var r;if(O.default.isValidElement(e))r=O.default.cloneElement(e,t);else if(le(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,s=t.y2,l=t.key,c=fj(t,Aq),u=oe(c,!1);u.offset;var d=fj(u,_q);r=O.default.createElement("line",nn({},d,{x1:n,y1:a,x2:i,y2:s,fill:"none",key:l}))}return r}function $q(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(l,c){var u=it(it({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return fO(a,u)});return O.default.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Rq(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(l,c){var u=it(it({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return fO(a,u)});return O.default.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function Lq(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,s=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=l.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],x=g?a+s-h:d[p+1]-h;if(x<=0)return null;var m=p%t.length;return O.default.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:x,width:i,stroke:"none",fill:t[m],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.default.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function Dq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,s=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var d=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],x=g?i+l-h:d[p+1]-h;if(x<=0)return null;var m=p%n.length;return O.default.createElement("rect",{key:"react-".concat(p),x:h,y:s,width:x,height:c,stroke:"none",fill:n[m],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return O.default.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var zq=function(t,r){var n=t.xAxis,a=t.width,i=t.height,s=t.offset;return r5(Rx(it(it(it({},$a.defaultProps),n),{},{ticks:dr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.left,s.left+s.width,r)},Bq=function(t,r){var n=t.yAxis,a=t.width,i=t.height,s=t.offset;return r5(Rx(it(it(it({},$a.defaultProps),n),{},{ticks:dr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.top,s.top+s.height,r)},En={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function oi(e){var t,r,n,a,i,s,l=Ex(),c=Ix(),u=PF(),d=it(it({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:En.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:En.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:En.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:En.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:En.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:En.verticalFill,x:Y(e.x)?e.x:u.left,y:Y(e.y)?e.y:u.top,width:Y(e.width)?e.width:u.width,height:Y(e.height)?e.height:u.height}),f=d.x,h=d.y,p=d.width,g=d.height,x=d.syncWithTicks,m=d.horizontalValues,v=d.verticalValues,b=SF(),w=OF();if(!Y(p)||p<=0||!Y(g)||g<=0||!Y(f)||f!==+f||!Y(h)||h!==+h)return null;var C=d.verticalCoordinatesGenerator||zq,y=d.horizontalCoordinatesGenerator||Bq,j=d.horizontalPoints,S=d.verticalPoints;if((!j||!j.length)&&le(y)){var A=m&&m.length,_=y({yAxis:w?it(it({},w),{},{ticks:A?m:w.ticks}):void 0,width:l,height:c,offset:u},A?!0:x);Et(Array.isArray(_),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(hn(_),"]")),Array.isArray(_)&&(j=_)}if((!S||!S.length)&&le(C)){var I=v&&v.length,k=C({xAxis:b?it(it({},b),{},{ticks:I?v:b.ticks}):void 0,width:l,height:c,offset:u},I?!0:x);Et(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(hn(k),"]")),Array.isArray(k)&&(S=k)}return O.default.createElement("g",{className:"recharts-cartesian-grid"},O.default.createElement(Mq,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),O.default.createElement($q,nn({},d,{offset:u,horizontalPoints:j,xAxis:b,yAxis:w})),O.default.createElement(Rq,nn({},d,{offset:u,verticalPoints:S,xAxis:b,yAxis:w})),O.default.createElement(Lq,nn({},d,{horizontalPoints:j})),O.default.createElement(Dq,nn({},d,{verticalPoints:S})))}oi.displayName="CartesianGrid";var Fq=["type","layout","connectNulls","ref"],qq=["key"];function ga(e){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function hj(e,t){if(e==null)return{};var r=Wq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},si.apply(this,arguments)}function pj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pj(Object(r),!0).forEach(function(n){Dt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function In(e){return Kq(e)||Uq(e)||Vq(e)||Hq()}function Hq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
87
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vq(e,t){if(e){if(typeof e=="string")return Mp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mp(e,t)}}function Uq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kq(e){if(Array.isArray(e))return Mp(e)}function Mp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mj(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pO(n.key),n)}}function Zq(e,t,r){return t&&mj(e.prototype,t),r&&mj(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yq(e,t,r){return t=Bs(t),Xq(e,hO()?Reflect.construct(t,r||[],Bs(e).constructor):t.apply(e,r))}function Xq(e,t){if(t&&(ga(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qq(e)}function Qq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hO=function(){return!!e})()}function Bs(e){return Bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bs(e)}function Jq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$p(e,t)}function $p(e,t){return $p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$p(e,t)}function Dt(e,t,r){return t=pO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pO(e){var t=eW(e,"string");return ga(t)=="symbol"?t:t+""}function eW(e,t){if(ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var io=(function(e){function t(){var r;Gq(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Yq(this,t,[].concat(a)),Dt(r,"state",{isAnimationFinished:!0,totalLength:0}),Dt(r,"generateSimpleStrokeDasharray",function(s,l){return"".concat(l,"px ").concat(s-l,"px")}),Dt(r,"getStrokeDasharray",function(s,l,c){var u=c.reduce(function(v,b){return v+b});if(!u)return r.generateSimpleStrokeDasharray(l,s);for(var d=Math.floor(s/u),f=s%u,h=l-s,p=[],g=0,x=0;g<c.length;x+=c[g],++g)if(x+c[g]>f){p=[].concat(In(c.slice(0,g)),[f-x]);break}var m=p.length%2===0?[0,h]:[h];return[].concat(In(t.repeat(c,d)),In(p),m).map(function(v){return"".concat(v,"px")}).join(", ")}),Dt(r,"id",yn("recharts-line-")),Dt(r,"pathRef",function(s){r.mainCurve=s}),Dt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Dt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Jq(t,e),Zq(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.points,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=gt(d,no);if(!f)return null;var h=function(x,m){return{x:x.x,y:x.y,value:x.value,errorVal:Le(x.payload,m)}},p={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.default.createElement(fe,p,f.map(function(g){return O.default.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:s,xAxis:l,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,u=l.points,d=l.dataKey,f=oe(this.props,!1),h=oe(c,!0),p=u.map(function(x,m){var v=yt(yt(yt({key:"dot-".concat(m),r:3},f),h),{},{index:m,cx:x.x,cy:x.y,value:x.value,dataKey:d,payload:x.payload,points:u});return t.renderDotItem(c,v)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.default.createElement(fe,si({className:"recharts-line-dots",key:"dots"},g),p)}},{key:"renderCurveStatically",value:function(n,a,i,s){var l=this.props,c=l.type,u=l.layout,d=l.connectNulls;l.ref;var f=hj(l,Fq),h=yt(yt(yt({},oe(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},s),{},{type:c,layout:u,connectNulls:d});return O.default.createElement(ln,si({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,c=s.strokeDasharray,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,g=s.animateNewValues,x=s.width,m=s.height,v=this.state,b=v.prevPoints,w=v.totalLength;return O.default.createElement(Ot,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var y=C.t;if(b){var j=b.length/l.length,S=l.map(function(E,T){var M=Math.floor(T*j);if(b[M]){var R=b[M],$=Ee(R.x,E.x),L=Ee(R.y,E.y);return yt(yt({},E),{},{x:$(y),y:L(y)})}if(g){var q=Ee(x*2,E.x),U=Ee(m/2,E.y);return yt(yt({},E),{},{x:q(y),y:U(y)})}return yt(yt({},E),{},{x:E.x,y:E.y})});return i.renderCurveStatically(S,n,a)}var A=Ee(0,w),_=A(y),I;if(c){var k="".concat(c).split(/[,\s]+/gim).map(function(E){return parseFloat(E)});I=i.getStrokeDasharray(_,w,k)}else I=i.generateSimpleStrokeDasharray(w,_);return i.renderCurveStatically(l,n,a,{strokeDasharray:I})})}},{key:"renderCurve",value:function(n,a){var i=this.props,s=i.points,l=i.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return l&&s&&s.length&&(!u&&d>0||!br(u,s))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,l=a.points,c=a.className,u=a.xAxis,d=a.yAxis,f=a.top,h=a.left,p=a.width,g=a.height,x=a.isAnimationActive,m=a.id;if(i||!l||!l.length)return null;var v=this.state.isAnimationFinished,b=l.length===1,w=ae.default("recharts-line",c),C=u&&u.allowDataOverflow,y=d&&d.allowDataOverflow,j=C||y,S=de(m)?this.id:m,A=(n=oe(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=A.r,I=_===void 0?3:_,k=A.strokeWidth,E=k===void 0?2:k,T=iC(s)?s:{},M=T.clipDot,R=M===void 0?!0:M,$=I*2+E;return O.default.createElement(fe,{className:w},C||y?O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"clipPath-".concat(S)},O.default.createElement("rect",{x:C?h:h-p/2,y:y?f:f-g/2,width:C?p:p*2,height:y?g:g*2})),!R&&O.default.createElement("clipPath",{id:"clipPath-dots-".concat(S)},O.default.createElement("rect",{x:h-$/2,y:f-$/2,width:p+$,height:g+$}))):null,!b&&this.renderCurve(j,S),this.renderErrorBar(j,S),(b||s)&&this.renderDots(j,R,S),(!x||v)&&It.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(In(n),[0]):n,s=[],l=0;l<a;++l)s=[].concat(In(s),In(i));return s}},{key:"renderDotItem",value:function(n,a){var i;if(O.default.isValidElement(n))i=O.default.cloneElement(n,a);else if(le(n))i=n(a);else{var s=a.key,l=hj(a,qq),c=ae.default("recharts-line-dot",typeof n!="boolean"?n.className:"");i=O.default.createElement(Ea,si({key:s},l,{className:c}))}return i}}])})(P.PureComponent);Dt(io,"displayName","Line");Dt(io,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!ar.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Dt(io,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,s=e.dataKey,l=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,f=c.map(function(h,p){var g=Le(h,s);return d==="horizontal"?{x:cs({axis:r,ticks:a,bandSize:l,entry:h,index:p}),y:de(g)?null:n.scale(g),value:g,payload:h}:{x:de(g)?null:r.scale(g),y:cs({axis:n,ticks:i,bandSize:l,entry:h,index:p}),value:g,payload:h}});return yt({points:f,layout:d},u)});var tW=["layout","type","stroke","connectNulls","isRange","ref"],rW=["key"],mO;function va(e){"@babel/helpers - typeof";return va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(e)}function xO(e,t){if(e==null)return{};var r=nW(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function an(){return an=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},an.apply(this,arguments)}function xj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xj(Object(r),!0).forEach(function(n){Gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gj(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vO(n.key),n)}}function iW(e,t,r){return t&&gj(e.prototype,t),r&&gj(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oW(e,t,r){return t=Fs(t),sW(e,gO()?Reflect.construct(t,r||[],Fs(e).constructor):t.apply(e,r))}function sW(e,t){if(t&&(va(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lW(e)}function lW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gO=function(){return!!e})()}function Fs(e){return Fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fs(e)}function cW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rp(e,t)}function Rp(e,t){return Rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Rp(e,t)}function Gt(e,t,r){return t=vO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vO(e){var t=uW(e,"string");return va(t)=="symbol"?t:t+""}function uW(e,t){if(va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wr=(function(e){function t(){var r;aW(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=oW(this,t,[].concat(a)),Gt(r,"state",{isAnimationFinished:!0}),Gt(r,"id",yn("recharts-area-")),Gt(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),le(s)&&s()}),Gt(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),le(s)&&s()}),r}return cW(t,e),iW(t,[{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(s&&!l)return null;var c=this.props,u=c.dot,d=c.points,f=c.dataKey,h=oe(this.props,!1),p=oe(u,!0),g=d.map(function(m,v){var b=Ar(Ar(Ar({key:"dot-".concat(v),r:3},h),p),{},{index:v,cx:m.x,cy:m.y,dataKey:f,value:m.value,payload:m.payload,points:d});return t.renderDotItem(u,b)}),x={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.default.createElement(fe,an({className:"recharts-area-dots"},x),g)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,s=a.points,l=a.strokeWidth,c=s[0].x,u=s[s.length-1].x,d=n*Math.abs(c-u),f=Er(s.map(function(h){return h.y||0}));return Y(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(Er(i.map(function(h){return h.y||0})),f)),Y(f)?O.default.createElement("rect",{x:c<u?c:c-d,y:0,width:d,height:Math.floor(f+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,s=a.points,l=a.strokeWidth,c=s[0].y,u=s[s.length-1].y,d=n*Math.abs(c-u),f=Er(s.map(function(h){return h.x||0}));return Y(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(Er(i.map(function(h){return h.x||0})),f)),Y(f)?O.default.createElement("rect",{x:0,y:c<u?c:c-d,width:f+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,s){var l=this.props,c=l.layout,u=l.type,d=l.stroke,f=l.connectNulls,h=l.isRange;l.ref;var p=xO(l,tW);return O.default.createElement(fe,{clipPath:i?"url(#clipPath-".concat(s,")"):null},O.default.createElement(ln,an({},oe(p,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),d!=="none"&&O.default.createElement(ln,an({},oe(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:n})),d!=="none"&&h&&O.default.createElement(ln,an({},oe(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,c=s.baseLine,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,g=this.state,x=g.prevPoints,m=g.prevBaseLine;return O.default.createElement(Ot,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var b=v.t;if(x){var w=x.length/l.length,C=l.map(function(A,_){var I=Math.floor(_*w);if(x[I]){var k=x[I],E=Ee(k.x,A.x),T=Ee(k.y,A.y);return Ar(Ar({},A),{},{x:E(b),y:T(b)})}return A}),y;if(Y(c)&&typeof c=="number"){var j=Ee(m,c);y=j(b)}else if(de(c)||Pa(c)){var S=Ee(m,0);y=S(b)}else y=c.map(function(A,_){var I=Math.floor(_*w);if(m[I]){var k=m[I],E=Ee(k.x,A.x),T=Ee(k.y,A.y);return Ar(Ar({},A),{},{x:E(b),y:T(b)})}return A});return i.renderAreaStatically(C,y,n,a)}return O.default.createElement(fe,null,O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(b))),O.default.createElement(fe,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(l,c,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,s=i.points,l=i.baseLine,c=i.isAnimationActive,u=this.state,d=u.prevPoints,f=u.prevBaseLine,h=u.totalLength;return c&&s&&s.length&&(!d&&h>0||!br(d,s)||!br(f,l))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(s,l,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,l=a.points,c=a.className,u=a.top,d=a.left,f=a.xAxis,h=a.yAxis,p=a.width,g=a.height,x=a.isAnimationActive,m=a.id;if(i||!l||!l.length)return null;var v=this.state.isAnimationFinished,b=l.length===1,w=ae.default("recharts-area",c),C=f&&f.allowDataOverflow,y=h&&h.allowDataOverflow,j=C||y,S=de(m)?this.id:m,A=(n=oe(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=A.r,I=_===void 0?3:_,k=A.strokeWidth,E=k===void 0?2:k,T=iC(s)?s:{},M=T.clipDot,R=M===void 0?!0:M,$=I*2+E;return O.default.createElement(fe,{className:w},C||y?O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"clipPath-".concat(S)},O.default.createElement("rect",{x:C?d:d-p/2,y:y?u:u-g/2,width:C?p:p*2,height:y?g:g*2})),!R&&O.default.createElement("clipPath",{id:"clipPath-dots-".concat(S)},O.default.createElement("rect",{x:d-$/2,y:u-$/2,width:p+$,height:g+$}))):null,b?null:this.renderArea(j,S),(s||b)&&this.renderDots(j,R,S),(!x||v)&&It.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(P.PureComponent);mO=Wr;Gt(Wr,"displayName","Area");Gt(Wr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ar.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Gt(Wr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,s=t.props.baseValue,l=s??i;if(Y(l)&&typeof l=="number")return l;var c=a==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return l==="dataMin"?f:l==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});Gt(Wr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,g=u&&u.length,x=mO.getBaseValue(t,r,n,a),m=p==="horizontal",v=!1,b=f.map(function(C,y){var j;g?j=u[d+y]:(j=Le(C,c),Array.isArray(j)?v=!0:j=[x,j]);var S=j[1]==null||g&&Le(C,c)==null;return m?{x:cs({axis:n,ticks:i,bandSize:l,entry:C,index:y}),y:S?null:a.scale(j[1]),value:j,payload:C}:{x:S?null:n.scale(j[1]),y:cs({axis:a,ticks:s,bandSize:l,entry:C,index:y}),value:j,payload:C}}),w;return g||v?w=b.map(function(C){var y=Array.isArray(C.value)?C.value[0]:null;return m?{x:C.x,y:y!=null&&C.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:C.y}}):w=m?a.scale(x):n.scale(x),Ar({points:b,baseLine:w,layout:p,isRange:v},h)});Gt(Wr,"renderDotItem",function(e,t){var r;if(O.default.isValidElement(e))r=O.default.cloneElement(e,t);else if(le(e))r=e(t);else{var n=ae.default("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=xO(t,rW);r=O.default.createElement(Ea,an({},i,{key:a,className:n}))}return r});function ya(e){"@babel/helpers - typeof";return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ya(e)}function dW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wO(n.key),n)}}function hW(e,t,r){return t&&fW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pW(e,t,r){return t=qs(t),mW(e,yO()?Reflect.construct(t,r||[],qs(e).constructor):t.apply(e,r))}function mW(e,t){if(t&&(ya(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xW(e)}function xW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yO=function(){return!!e})()}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qs(e)}function gW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lp(e,t)}function Lp(e,t){return Lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Lp(e,t)}function bO(e,t,r){return t=wO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wO(e){var t=vW(e,"string");return ya(t)=="symbol"?t:t+""}function vW(e,t){if(ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dp.apply(this,arguments)}function yW(e){var t=e.xAxisId,r=Ex(),n=Ix(),a=tO(t);return a==null?null:O.createElement($a,Dp({},a,{className:ae.default("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return dr(s,!0)}}))}var pr=(function(e){function t(){return dW(this,t),pW(this,t,arguments)}return gW(t,e),hW(t,[{key:"render",value:function(){return O.createElement(yW,this.props)}}])})(O.Component);bO(pr,"displayName","XAxis");bO(pr,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function bW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,SO(n.key),n)}}function jW(e,t,r){return t&&wW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CW(e,t,r){return t=Ws(t),SW(e,jO()?Reflect.construct(t,r||[],Ws(e).constructor):t.apply(e,r))}function SW(e,t){if(t&&(ba(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OW(e)}function OW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jO=function(){return!!e})()}function Ws(e){return Ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ws(e)}function NW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zp(e,t)}function zp(e,t){return zp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zp(e,t)}function CO(e,t,r){return t=SO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SO(e){var t=PW(e,"string");return ba(t)=="symbol"?t:t+""}function PW(e,t){if(ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bp.apply(this,arguments)}var AW=function(t){var r=t.yAxisId,n=Ex(),a=Ix(),i=rO(r);return i==null?null:O.createElement($a,Bp({},i,{className:ae.default("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(l){return dr(l,!0)}}))},Lr=(function(e){function t(){return bW(this,t),CW(this,t,arguments)}return NW(t,e),jW(t,[{key:"render",value:function(){return O.createElement(AW,this.props)}}])})(O.Component);CO(Lr,"displayName","YAxis");CO(Lr,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function vj(e){return EW(e)||TW(e)||kW(e)||_W()}function _W(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
88
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kW(e,t){if(e){if(typeof e=="string")return Fp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fp(e,t)}}function TW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EW(e){if(Array.isArray(e))return Fp(e)}function Fp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var qp=function(t,r,n,a,i){var s=gt(t,$x),l=gt(t,Vl),c=[].concat(vj(s),vj(l)),u=gt(t,Kl),d="".concat(a,"Id"),f=a[0],h=r;if(c.length&&(h=c.reduce(function(x,m){if(m.props[d]===n&&Xt(m.props,"extendDomain")&&Y(m.props[f])){var v=m.props[f];return[Math.min(x[0],v),Math.max(x[1],v)]}return x},h)),u.length){var p="".concat(f,"1"),g="".concat(f,"2");h=u.reduce(function(x,m){if(m.props[d]===n&&Xt(m.props,"extendDomain")&&Y(m.props[p])&&Y(m.props[g])){var v=m.props[p],b=m.props[g];return[Math.min(x[0],v,b),Math.max(x[1],v,b)]}return x},h)}return i&&i.length&&(h=i.reduce(function(x,m){return Y(m)?[Math.min(x[0],m),Math.max(x[1],m)]:x},h)),h},lh={exports:{}},yj;function IW(){return yj||(yj=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new a(d,f||c,h),g=r?r+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],p]:c._events[g].push(p):(c._events[g]=p,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=r?r+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,g=new Array(p);h<p;h++)g[h]=f[h].fn;return g},l.prototype.listenerCount=function(u){var d=r?r+u:u,f=this._events[d];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,d,f,h,p,g){var x=r?r+u:u;if(!this._events[x])return!1;var m=this._events[x],v=arguments.length,b,w;if(m.fn){switch(m.once&&this.removeListener(u,m.fn,void 0,!0),v){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,f),!0;case 4:return m.fn.call(m.context,d,f,h),!0;case 5:return m.fn.call(m.context,d,f,h,p),!0;case 6:return m.fn.call(m.context,d,f,h,p,g),!0}for(w=1,b=new Array(v-1);w<v;w++)b[w-1]=arguments[w];m.fn.apply(m.context,b)}else{var C=m.length,y;for(w=0;w<C;w++)switch(m[w].once&&this.removeListener(u,m[w].fn,void 0,!0),v){case 1:m[w].fn.call(m[w].context);break;case 2:m[w].fn.call(m[w].context,d);break;case 3:m[w].fn.call(m[w].context,d,f);break;case 4:m[w].fn.call(m[w].context,d,f,h);break;default:if(!b)for(y=1,b=new Array(v-1);y<v;y++)b[y-1]=arguments[y];m[w].fn.apply(m[w].context,b)}}return!0},l.prototype.on=function(u,d,f){return i(this,u,d,f,!1)},l.prototype.once=function(u,d,f){return i(this,u,d,f,!0)},l.prototype.removeListener=function(u,d,f,h){var p=r?r+u:u;if(!this._events[p])return this;if(!d)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===d&&(!h||g.once)&&(!f||g.context===f)&&s(this,p);else{for(var x=0,m=[],v=g.length;x<v;x++)(g[x].fn!==d||h&&!g[x].once||f&&g[x].context!==f)&&m.push(g[x]);m.length?this._events[p]=m.length===1?m[0]:m:s(this,p)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=r?r+u:u,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(lh)),lh.exports}var MW=IW();const $W=Ne(MW);var ch=new $W,uh="recharts.syncMouseEvents";function Vi(e){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vi(e)}function RW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,OO(n.key),n)}}function DW(e,t,r){return t&&LW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dh(e,t,r){return t=OO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OO(e){var t=zW(e,"string");return Vi(t)=="symbol"?t:t+""}function zW(e,t){if(Vi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var BW=(function(){function e(){RW(this,e),dh(this,"activeIndex",0),dh(this,"coordinateList",[]),dh(this,"layout","horizontal")}return DW(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,s=r.container,l=s===void 0?null:s,c=r.layout,u=c===void 0?null:c,d=r.offset,f=d===void 0?null:d,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,s=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+c+u,h=s+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])})();function FW(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e?.[0],a=e?.[1];if(n&&a&&Y(n)&&Y(a))return!0}return!1}function qW(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function NO(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,s=ve(t,r,n,a),l=ve(t,r,n,i);return{points:[s,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function WW(e,t,r){var n,a,i,s;if(e==="horizontal")n=t.x,i=n,a=r.top,s=r.top+r.height;else if(e==="vertical")a=t.y,s=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,h=ve(l,c,u,f),p=ve(l,c,d,f);n=h.x,a=h.y,i=p.x,s=p.y}else return NO(t);return[{x:n,y:a},{x:i,y:s}]}function Ui(e){"@babel/helpers - typeof";return Ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ui(e)}function bj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Oo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bj(Object(r),!0).forEach(function(n){HW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HW(e,t,r){return t=VW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VW(e){var t=UW(e,"string");return Ui(t)=="symbol"?t:t+""}function UW(e,t){if(Ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KW(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,s=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!i||!s||h!=="ScatterChart"&&a!=="axis")return null;var g,x=ln;if(h==="ScatterChart")g=s,x=bD;else if(h==="BarChart")g=qW(f,s,c,d),x=Nx;else if(f==="radial"){var m=NO(s),v=m.cx,b=m.cy,w=m.radius,C=m.startAngle,y=m.endAngle;g={cx:v,cy:b,startAngle:C,endAngle:y,innerRadius:w,outerRadius:w},x=x5}else g={points:WW(f,s,c)},x=ln;var j=Oo(Oo(Oo(Oo({stroke:"#ccc",pointerEvents:"none"},c),g),oe(p,!1)),{},{payload:l,payloadIndex:u,className:ae.default("recharts-tooltip-cursor",p.className)});return P.isValidElement(p)?P.cloneElement(p,j):P.createElement(x,j)}var GW=["item"],ZW=["children","className","width","height","style","compact","title","desc"];function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function Dn(){return Dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dn.apply(this,arguments)}function wj(e,t){return QW(e)||XW(e,t)||AO(e,t)||YW()}function YW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
|
+
the props "valueKey" will be deprecated in 1.1.0`),v=f);var b=a.filter(function(A){return Le(A,v,0)!==0}).length,w=(m>=360?b:b-1)*c,C=m-b*p-w,y=a.reduce(function(A,_){var I=Le(_,v,0);return A+(Z(I)?I:0)},0),j;if(y>0){var S;j=a.map(function(A,_){var I=Le(A,v,0),k=Le(A,d,_),E=(Z(I)?I:0)/y,T;_?T=S.endAngle+Je(x)*c*(I!==0?1:0):T=s;var M=T+Je(x)*((I!==0?p:0)+E*C),R=(T+M)/2,$=(g.innerRadius+g.outerRadius)/2,L=[{name:k,value:I,payload:A,dataKey:v,type:h}],q=ge(g.cx,g.cy,$,R);return S=_e(_e(_e({percent:E,cornerRadius:i,name:k,tooltipPayload:L,midAngle:R,middleRadius:$,tooltipPosition:q},A),g),{},{value:Le(A,v),startAngle:T,endAngle:M,payload:A,paddingAngle:Je(x)*c}),S})}return _e(_e({},g),{},{sectors:j,data:a})});var qf,vw;function qz(){if(vw)return qf;vw=1;function e(t){return t&&t.length?t[0]:void 0}return qf=e,qf}var Wf,yw;function Wz(){return yw||(yw=1,Wf=qz()),Wf}var Hz=Wz();const Vz=Oe(Hz);var Uz=["key"];function sa(e){"@babel/helpers - typeof";return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sa(e)}function Kz(e,t){if(e==null)return{};var r=Gz(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Os(){return Os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Os.apply(this,arguments)}function bw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bw(Object(r),!0).forEach(function(n){lr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zz(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ww(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$5(n.key),n)}}function Yz(e,t,r){return t&&ww(e.prototype,t),r&&ww(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xz(e,t,r){return t=Ns(t),Qz(e,M5()?Reflect.construct(t,r||[],Ns(e).constructor):t.apply(e,r))}function Qz(e,t){if(t&&(sa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jz(e)}function Jz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M5=function(){return!!e})()}function Ns(e){return Ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ns(e)}function eB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wp(e,t)}function wp(e,t){return wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},wp(e,t)}function lr(e,t,r){return t=$5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $5(e){var t=tB(e,"string");return sa(t)=="symbol"?t:t+""}function tB(e,t){if(sa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ao=(function(e){function t(){var r;Zz(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Xz(this,t,[].concat(a)),lr(r,"state",{isAnimationFinished:!1}),lr(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),le(s)&&s()}),lr(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),le(s)&&s()}),lr(r,"handleMouseEnter",function(s){var l=r.props.onMouseEnter;l&&l(r.props,s)}),lr(r,"handleMouseLeave",function(s){var l=r.props.onMouseLeave;l&&l(r.props,s)}),r}return eB(t,e),Yz(t,[{key:"renderDots",value:function(n){var a=this.props,i=a.dot,s=a.dataKey,l=oe(this.props,!1),c=oe(i,!0),u=n.map(function(d,f){var h=st(st(st({key:"dot-".concat(f),r:3},l),c),{},{dataKey:s,cx:d.x,cy:d.y,index:f,payload:d});return t.renderDotItem(i,h)});return O.default.createElement(fe,{className:"recharts-radar-dots"},u)}},{key:"renderPolygonStatically",value:function(n){var a=this.props,i=a.shape,s=a.dot,l=a.isRange,c=a.baseLinePoints,u=a.connectNulls,d;return O.default.isValidElement(i)?d=O.default.cloneElement(i,st(st({},this.props),{},{points:n})):le(i)?d=i(st(st({},this.props),{},{points:n})):d=O.default.createElement(N5,Os({},oe(this.props,!0),{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,points:n,baseLinePoints:l?c:null,connectNulls:u})),O.default.createElement(fe,{className:"recharts-radar-polygon"},d,s?this.renderDots(n):null)}},{key:"renderPolygonWithAnimation",value:function(){var n=this,a=this.props,i=a.points,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state.prevPoints;return O.default.createElement(Ot,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"radar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var p=h.t,g=f&&f.length/i.length,x=i.map(function(m,v){var b=f&&f[Math.floor(v*g)];if(b){var w=Ee(b.x,m.x),C=Ee(b.y,m.y);return st(st({},m),{},{x:w(p),y:C(p)})}var y=Ee(m.cx,m.x),j=Ee(m.cy,m.y);return st(st({},m),{},{x:y(p),y:j(p)})});return n.renderPolygonStatically(x)})}},{key:"renderPolygon",value:function(){var n=this.props,a=n.points,i=n.isAnimationActive,s=n.isRange,l=this.state.prevPoints;return i&&a&&a.length&&!s&&(!l||!br(l,a))?this.renderPolygonWithAnimation():this.renderPolygonStatically(a)}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.className,s=n.points,l=n.isAnimationActive;if(a||!s||!s.length)return null;var c=this.state.isAnimationFinished,u=ae.default("recharts-radar",i);return O.default.createElement(fe,{className:u},this.renderPolygon(),(!l||c)&&It.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"renderDotItem",value:function(n,a){var i;if(O.default.isValidElement(n))i=O.default.cloneElement(n,a);else if(le(n))i=n(a);else{var s=a.key,l=Kz(a,Uz);i=O.default.createElement(Ea,Os({},l,{key:s,className:ae.default("recharts-radar-dot",typeof n!="boolean"?n.className:"")}))}return i}}])})(P.PureComponent);lr(ao,"displayName","Radar");lr(ao,"defaultProps",{angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!ar.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});lr(ao,"getComposedData",function(e){var t=e.radiusAxis,r=e.angleAxis,n=e.displayedData,a=e.dataKey,i=e.bandSize,s=r.cx,l=r.cy,c=!1,u=[],d=r.type!=="number"?i??0:0;n.forEach(function(h,p){var g=Le(h,r.dataKey,p),x=Le(h,a),m=r.scale(g)+d,v=Array.isArray(x)?p5(x):x,b=de(v)?void 0:t.scale(v);Array.isArray(x)&&x.length>=2&&(c=!0),u.push(st(st({},ge(s,l,b,m)),{},{name:g,value:x,cx:s,cy:l,radius:b,angle:m,payload:h}))});var f=[];return c&&u.forEach(function(h){if(Array.isArray(h.value)){var p=Vz(h.value),g=de(p)?void 0:t.scale(p);f.push(st(st({},h),{},{radius:g},ge(s,l,g,h.angle)))}else f.push(h)}),{points:u,isRange:c,baseLinePoints:f}});function Fi(e){"@babel/helpers - typeof";return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fi(e)}function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jp.apply(this,arguments)}function jw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jw(Object(r),!0).forEach(function(n){rB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rB(e,t,r){return t=nB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nB(e){var t=aB(e,"string");return Fi(t)=="symbol"?t:t+""}function aB(e,t){if(Fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cw(e){return typeof e=="string"?parseInt(e,10):e}function iB(e,t){var r="".concat(t.cx||e.cx),n=Number(r),a="".concat(t.cy||e.cy),i=Number(a);return Hf(Hf(Hf({},t),e),{},{cx:n,cy:i})}function Sw(e){return O.default.createElement(Px,jp({shapeType:"sector",propTransformer:iB},e))}var oB=["shape","activeShape","activeIndex","cornerRadius"],sB=["value","background"];function la(e){"@babel/helpers - typeof";return la=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(e)}function Ps(){return Ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ps.apply(this,arguments)}function Ow(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ow(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nw(e,t){if(e==null)return{};var r=lB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function cB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L5(n.key),n)}}function uB(e,t,r){return t&&Pw(e.prototype,t),r&&Pw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function dB(e,t,r){return t=As(t),fB(e,R5()?Reflect.construct(t,r||[],As(e).constructor):t.apply(e,r))}function fB(e,t){if(t&&(la(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hB(e)}function hB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R5=function(){return!!e})()}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},As(e)}function pB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cp(e,t)}function Cp(e,t){return Cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Cp(e,t)}function cn(e,t,r){return t=L5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L5(e){var t=mB(e,"string");return la(t)=="symbol"?t:t+""}function mB(e,t){if(la(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(la(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ma=(function(e){function t(){var r;cB(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=dB(this,t,[].concat(a)),cn(r,"state",{isAnimationFinished:!1}),cn(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),le(s)&&s()}),cn(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),le(s)&&s()}),r}return pB(t,e),uB(t,[{key:"getDeltaAngle",value:function(){var n=this.props,a=n.startAngle,i=n.endAngle,s=Je(i-a),l=Math.min(Math.abs(i-a),360);return s*l}},{key:"renderSectorsStatically",value:function(n){var a=this,i=this.props,s=i.shape,l=i.activeShape,c=i.activeIndex,u=i.cornerRadius,d=Nw(i,oB),f=oe(d,!1);return n.map(function(h,p){var g=p===c,x=Ye(Ye(Ye(Ye({},f),{},{cornerRadius:Cw(u)},h),xr(a.props,h,p)),{},{className:"recharts-radial-bar-sector ".concat(h.className),forceCornerRadius:d.forceCornerRadius,cornerIsExternal:d.cornerIsExternal,isActive:g,option:g?l:s});return O.default.createElement(Sw,Ps({},x,{key:"sector-".concat(p)}))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,a=this.props,i=a.data,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state.prevData;return O.default.createElement(Ot,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"radialBar-".concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(h){var p=h.t,g=i.map(function(x,m){var v=f&&f[m];if(v){var b=Ee(v.startAngle,x.startAngle),w=Ee(v.endAngle,x.endAngle);return Ye(Ye({},x),{},{startAngle:b(p),endAngle:w(p)})}var C=x.endAngle,y=x.startAngle,j=Ee(y,C);return Ye(Ye({},x),{},{endAngle:j(p)})});return O.default.createElement(fe,null,n.renderSectorsStatically(g))})}},{key:"renderSectors",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,s=this.state.prevData;return i&&a&&a.length&&(!s||!br(s,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"renderBackground",value:function(n){var a=this,i=this.props.cornerRadius,s=oe(this.props.background,!1);return n.map(function(l,c){l.value;var u=l.background,d=Nw(l,sB);if(!u)return null;var f=Ye(Ye(Ye(Ye(Ye({cornerRadius:Cw(i)},d),{},{fill:"#eee"},u),s),xr(a.props,l,c)),{},{index:c,className:ae.default("recharts-radial-bar-background-sector",s?.className),option:u,isActive:!1});return O.default.createElement(Sw,Ps({},f,{key:"sector-".concat(c)}))})}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,s=n.className,l=n.background,c=n.isAnimationActive;if(a||!i||!i.length)return null;var u=this.state.isAnimationFinished,d=ae.default("recharts-area",s);return O.default.createElement(fe,{className:d},l&&O.default.createElement(fe,{className:"recharts-radial-bar-background"},this.renderBackground(i)),O.default.createElement(fe,{className:"recharts-radial-bar-sectors"},this.renderSectors()),(!c||u)&&It.renderCallByParent(Ye({},this.props),i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])})(P.PureComponent);cn(Ma,"displayName","RadialBar");cn(Ma,"defaultProps",{angleAxisId:0,radiusAxisId:0,minPointSize:0,hide:!1,legendType:"rect",data:[],isAnimationActive:!ar.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease",forceCornerRadius:!1,cornerIsExternal:!1});cn(Ma,"getComposedData",function(e){var t=e.item,r=e.props,n=e.radiusAxis,a=e.radiusAxisTicks,i=e.angleAxis,s=e.angleAxisTicks,l=e.displayedData,c=e.dataKey,u=e.stackedData,d=e.barPosition,f=e.bandSize,h=e.dataStartIndex,p=i5(d,t);if(!p)return null;var g=i.cx,x=i.cy,m=r.layout,v=t.props,b=v.children,w=v.minPointSize,C=m==="radial"?i:n,y=u?C.scale.domain():null,j=l5({numericAxis:C}),S=gt(b,bn),A=l.map(function(_,I){var k,E,T,M,R,$;if(u?k=o5(u[h+I],y):(k=Le(_,c),Array.isArray(k)||(k=[j,k])),m==="radial"){E=us({axis:n,ticks:a,bandSize:f,offset:p.offset,entry:_,index:I}),R=i.scale(k[1]),M=i.scale(k[0]),T=E+p.size;var L=R-M;if(Math.abs(w)>0&&Math.abs(L)<Math.abs(w)){var q=Je(L||w)*(Math.abs(w)-Math.abs(L));R+=q}$={background:{cx:g,cy:x,innerRadius:E,outerRadius:T,startAngle:r.startAngle,endAngle:r.endAngle}}}else{E=n.scale(k[0]),T=n.scale(k[1]),M=us({axis:i,ticks:s,bandSize:f,offset:p.offset,entry:_,index:I}),R=M+p.size;var U=T-E;if(Math.abs(w)>0&&Math.abs(U)<Math.abs(w)){var D=Je(U||w)*(Math.abs(w)-Math.abs(U));T+=D}}return Ye(Ye(Ye(Ye({},_),$),{},{payload:_,value:u?k:k[1],cx:g,cy:x,innerRadius:E,outerRadius:T,startAngle:M,endAngle:R},S&&S[I]&&S[I].props),{},{tooltipPayload:[jx(t,_)],tooltipPosition:ge(g,x,(E+T)/2,(M+R)/2)})});return{data:A,layout:m}});var Vf,Aw;function xB(){if(Aw)return Vf;Aw=1;var e=Math.ceil,t=Math.max;function r(n,a,i,s){for(var l=-1,c=t(e((a-n)/(i||1)),0),u=Array(c);c--;)u[s?c:++l]=n,n+=i;return u}return Vf=r,Vf}var Uf,_w;function D5(){if(_w)return Uf;_w=1;var e=XC(),t=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*r}return a===a?a:0}return Uf=n,Uf}var Kf,kw;function gB(){if(kw)return Kf;kw=1;var e=xB(),t=Al(),r=D5();function n(a){return function(i,s,l){return l&&typeof l!="number"&&t(i,s,l)&&(s=l=void 0),i=r(i),s===void 0?(s=i,i=0):s=r(s),l=l===void 0?i<s?1:-1:r(l),e(i,s,l,a)}}return Kf=n,Kf}var Gf,Tw;function vB(){if(Tw)return Gf;Tw=1;var e=gB(),t=e();return Gf=t,Gf}var yB=vB();const _s=Oe(yB);function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function Ew(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Iw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ew(Object(r),!0).forEach(function(n){z5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ew(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z5(e,t,r){return t=bB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bB(e){var t=wB(e,"string");return qi(t)=="symbol"?t:t+""}function wB(e,t){if(qi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jB=["Webkit","Moz","O","ms"],CB=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=jB.reduce(function(i,s){return Iw(Iw({},i),{},z5({},s+n,r))},{});return a[t]=r,a};function ca(e){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(e)}function ks(){return ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ks.apply(this,arguments)}function Mw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Zf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(r),!0).forEach(function(n){bt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F5(n.key),n)}}function OB(e,t,r){return t&&$w(e.prototype,t),r&&$w(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function NB(e,t,r){return t=Ts(t),PB(e,B5()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function PB(e,t){if(t&&(ca(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AB(e)}function AB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(B5=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(e)}function _B(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sp(e,t)}function Sp(e,t){return Sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Sp(e,t)}function bt(e,t,r){return t=F5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F5(e){var t=kB(e,"string");return ca(t)=="symbol"?t:t+""}function kB(e,t){if(ca(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ca(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var TB=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,s=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=ti().domain(_s(0,c)).range([i,i+s-l]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:d}},Rw=function(t){return t.changedTouches&&!!t.changedTouches.length},ua=(function(e){function t(r){var n;return SB(this,t),n=NB(this,t,[r]),bt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),bt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),bt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,s=a.onDragEnd,l=a.startIndex;s?.({endIndex:i,startIndex:l})}),n.detachDragEndListener()}),bt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),bt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),bt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),bt(n,"handleSlideDragStart",function(a){var i=Rw(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return _B(t,e),OB(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,s=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,d=u.length-1,f=Math.min(a,i),h=Math.max(a,i),p=t.getIndexInRange(s,f),g=t.getIndexInRange(s,h);return{startIndex:p-p%c,endIndex:g===d?d:g-g%c}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,s=a.tickFormatter,l=a.dataKey,c=Le(i[n],l,n);return le(s)?s(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,s=a.startX,l=a.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,h=c.startIndex,p=c.endIndex,g=c.onChange,x=n.pageX-i;x>0?x=Math.min(x,u+d-f-l,u+d-f-s):x<0&&(x=Math.max(x,u-s,u-l));var m=this.getIndex({startX:s+x,endX:l+x});(m.startIndex!==h||m.endIndex!==p)&&g&&g(m),this.setState({startX:s+x,endX:l+x,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Rw(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,s=a.movingTravellerId,l=a.endX,c=a.startX,u=this.state[s],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,x=d.gap,m=d.data,v={startX:this.state.startX,endX:this.state.endX},b=n.pageX-i;b>0?b=Math.min(b,f+h-p-u):b<0&&(b=Math.max(b,f-u)),v[s]=u+b;var w=this.getIndex(v),C=w.startIndex,y=w.endIndex,j=function(){var A=m.length-1;return s==="startX"&&(l>c?C%x===0:y%x===0)||l<c&&y===A||s==="endX"&&(l>c?y%x===0:C%x===0)||l>c&&y===A};this.setState(bt(bt({},s,u+b),"brushMoveStartX",n.pageX),function(){g&&j()&&g(w)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,s=this.state,l=s.scaleValues,c=s.startX,u=s.endX,d=this.state[a],f=l.indexOf(d);if(f!==-1){var h=f+n;if(!(h===-1||h>=l.length)){var p=l[h];a==="startX"&&p>=u||a==="endX"&&p<=c||this.setState(bt({},a,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.fill,u=n.stroke;return O.default.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:s,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.data,u=n.children,d=n.padding,f=P.Children.only(u);return f?O.default.cloneElement(f,{x:a,y:i,width:s,height:l,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,s,l=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,h=c.traveller,p=c.ariaLabel,g=c.data,x=c.startIndex,m=c.endIndex,v=Math.max(n,this.props.x),b=Zf(Zf({},oe(this.props,!1)),{},{x:v,y:u,width:d,height:f}),w=p||"Min value: ".concat((i=g[x])===null||i===void 0?void 0:i.name,", Max value: ").concat((s=g[m])===null||s===void 0?void 0:s.name);return O.default.createElement(fe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(y){["ArrowLeft","ArrowRight"].includes(y.key)&&(y.preventDefault(),y.stopPropagation(),l.handleTravellerMoveKeyboard(y.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,b))}},{key:"renderSlide",value:function(n,a){var i=this.props,s=i.y,l=i.height,c=i.stroke,u=i.travellerWidth,d=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return O.default.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:s,width:f,height:l})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,s=n.y,l=n.height,c=n.travellerWidth,u=n.stroke,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:u};return O.default.createElement(fe,{className:"recharts-brush-texts"},O.default.createElement(dn,ks({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:s+l/2},g),this.getTextOfTick(a)),O.default.createElement(dn,ks({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+c+p,y:s+l/2},g),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,s=n.children,l=n.x,c=n.y,u=n.width,d=n.height,f=n.alwaysShowText,h=this.state,p=h.startX,g=h.endX,x=h.isTextActive,m=h.isSlideMoving,v=h.isTravellerMoving,b=h.isTravellerFocused;if(!a||!a.length||!Z(l)||!Z(c)||!Z(u)||!Z(d)||u<=0||d<=0)return null;var w=ae.default("recharts-brush",i),C=O.default.Children.count(s)===1,y=CB("userSelect","none");return O.default.createElement(fe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(x||m||v||b||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,s=n.width,l=n.height,c=n.stroke,u=Math.floor(i+l/2)-1;return O.default.createElement(O.default.Fragment,null,O.default.createElement("rect",{x:a,y:i,width:s,height:l,fill:c,stroke:"none"}),O.default.createElement("line",{x1:a+1,y1:u,x2:a+s-1,y2:u,fill:"none",stroke:"#fff"}),O.default.createElement("line",{x1:a+1,y1:u+2,x2:a+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return O.default.isValidElement(n)?i=O.default.cloneElement(n,a):le(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,s=n.width,l=n.x,c=n.travellerWidth,u=n.updateId,d=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return Zf({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:s},i&&i.length?TB({data:i,width:s,x:l,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+s-c]);var h=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:s,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,s=0,l=i-1;l-s>1;){var c=Math.floor((s+l)/2);n[c]>a?l=c:s=c}return a>=n[l]?l:s}}])})(P.PureComponent);bt(ua,"displayName","Brush");bt(ua,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Yf,Lw;function EB(){if(Lw)return Yf;Lw=1;var e=Gm();function t(r,n){var a;return e(r,function(i,s,l){return a=n(i,s,l),!a}),!!a}return Yf=t,Yf}var Xf,Dw;function IB(){if(Dw)return Xf;Dw=1;var e=AC(),t=nr(),r=EB(),n=vt(),a=Al();function i(s,l,c){var u=n(s)?e:r;return c&&a(s,l,c)&&(l=void 0),u(s,t(l,3))}return Xf=i,Xf}var MB=IB();const $B=Oe(MB);var Xt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},Qf,zw;function RB(){if(zw)return Qf;zw=1;var e=UC();function t(r,n,a){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return Qf=t,Qf}var Jf,Bw;function LB(){if(Bw)return Jf;Bw=1;var e=RB(),t=HC(),r=nr();function n(a,i){var s={};return i=r(i,3),t(a,function(l,c,u){e(s,c,i(l,c,u))}),s}return Jf=n,Jf}var DB=LB();const zB=Oe(DB);var eh,Fw;function BB(){if(Fw)return eh;Fw=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(!r(t[n],n,t))return!1;return!0}return eh=e,eh}var th,qw;function FB(){if(qw)return th;qw=1;var e=Gm();function t(r,n){var a=!0;return e(r,function(i,s,l){return a=!!n(i,s,l),a}),a}return th=t,th}var rh,Ww;function qB(){if(Ww)return rh;Ww=1;var e=BB(),t=FB(),r=nr(),n=vt(),a=Al();function i(s,l,c){var u=n(s)?e:t;return c&&a(s,l,c)&&(l=void 0),u(s,r(l,3))}return rh=i,rh}var WB=qB();const q5=Oe(WB);var HB=["x","y"];function da(e){"@babel/helpers - typeof";return da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},da(e)}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Op.apply(this,arguments)}function Hw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hw(Object(r),!0).forEach(function(n){VB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VB(e,t,r){return t=UB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UB(e){var t=KB(e,"string");return da(t)=="symbol"?t:t+""}function KB(e,t){if(da(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(da(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GB(e,t){if(e==null)return{};var r=ZB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function YB(e,t){var r=e.x,n=e.y,a=GB(e,HB),i="".concat(r),s=parseInt(i,10),l="".concat(n),c=parseInt(l,10),u="".concat(t.height||a.height),d=parseInt(u,10),f="".concat(t.width||a.width),h=parseInt(f,10);return Za(Za(Za(Za(Za({},t),a),s?{x:s}:{}),c?{y:c}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function Vw(e){return O.default.createElement(Px,Op({shapeType:"rectangle",propTransformer:YB,activeClassName:"recharts-active-bar"},e))}var XB=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=Z(n)||__(n);return i?t(n,a):(i||(process.env.NODE_ENV!=="production"?xt(!1,"minPointSize callback function received a value with type of ".concat(da(n),". Currently only numbers or null/undefined are supported.")):xt()),r)}},QB=["value","background"],W5;function fa(e){"@babel/helpers - typeof";return fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fa(e)}function JB(e,t){if(e==null)return{};var r=eF(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Es(){return Es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Es.apply(this,arguments)}function Uw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uw(Object(r),!0).forEach(function(n){Ir(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,V5(n.key),n)}}function rF(e,t,r){return t&&Kw(e.prototype,t),r&&Kw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function nF(e,t,r){return t=Is(t),aF(e,H5()?Reflect.construct(t,r||[],Is(e).constructor):t.apply(e,r))}function aF(e,t){if(t&&(fa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iF(e)}function iF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H5=function(){return!!e})()}function Is(e){return Is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Is(e)}function oF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Np(e,t)}function Np(e,t){return Np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Np(e,t)}function Ir(e,t,r){return t=V5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V5(e){var t=sF(e,"string");return fa(t)=="symbol"?t:t+""}function sF(e,t){if(fa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jr=(function(e){function t(){var r;tF(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=nF(this,t,[].concat(a)),Ir(r,"state",{isAnimationFinished:!1}),Ir(r,"id",yn("recharts-bar-")),Ir(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),Ir(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return oF(t,e),rF(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,s=i.shape,l=i.dataKey,c=i.activeIndex,u=i.activeBar,d=oe(this.props,!1);return n&&n.map(function(f,h){var p=h===c,g=p?u:s,x=Fe(Fe(Fe({},d),f),{},{isActive:p,option:g,index:h,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return O.default.createElement(fe,Es({className:"recharts-bar-rectangle"},xr(a.props,f,h),{key:"rectangle-".concat(f?.x,"-").concat(f?.y,"-").concat(f?.value,"-").concat(h)}),O.default.createElement(Vw,x))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,s=a.layout,l=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,d=a.animationEasing,f=a.animationId,h=this.state.prevData;return O.default.createElement(Ot,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,x=i.map(function(m,v){var b=h&&h[v];if(b){var w=Ee(b.x,m.x),C=Ee(b.y,m.y),y=Ee(b.width,m.width),j=Ee(b.height,m.height);return Fe(Fe({},m),{},{x:w(g),y:C(g),width:y(g),height:j(g)})}if(s==="horizontal"){var S=Ee(0,m.height),A=S(g);return Fe(Fe({},m),{},{y:m.y+m.height-A,height:A})}var _=Ee(0,m.width),I=_(g);return Fe(Fe({},m),{},{width:I})});return O.default.createElement(fe,null,n.renderRectanglesStatically(x))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,s=this.state.prevData;return i&&a&&a.length&&(!s||!br(s,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,s=a.dataKey,l=a.activeIndex,c=oe(this.props.background,!1);return i.map(function(u,d){u.value;var f=u.background,h=JB(u,QB);if(!f)return null;var p=Fe(Fe(Fe(Fe(Fe({},h),{},{fill:"#eee"},f),c),xr(n.props,u,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return O.default.createElement(Vw,Es({key:"background-bar-".concat(d),option:n.props.background,isActive:d===l},p))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.data,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=gt(d,no);if(!f)return null;var h=u==="vertical"?s[0].height/2:s[0].width/2,p=function(m,v){var b=Array.isArray(m.value)?m.value[1]:m.value;return{x:m.x,y:m.y,value:b,errorVal:Le(m,v)}},g={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.default.createElement(fe,g,f.map(function(x){return O.default.cloneElement(x,{key:"error-bar-".concat(a,"-").concat(x.props.dataKey),data:s,xAxis:l,yAxis:c,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,s=n.className,l=n.xAxis,c=n.yAxis,u=n.left,d=n.top,f=n.width,h=n.height,p=n.isAnimationActive,g=n.background,x=n.id;if(a||!i||!i.length)return null;var m=this.state.isAnimationFinished,v=ae.default("recharts-bar",s),b=l&&l.allowDataOverflow,w=c&&c.allowDataOverflow,C=b||w,y=de(x)?this.id:x;return O.default.createElement(fe,{className:v},b||w?O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"clipPath-".concat(y)},O.default.createElement("rect",{x:b?u:u-f/2,y:w?d:d-h/2,width:b?f:f*2,height:w?h:h*2}))):null,O.default.createElement(fe,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(y,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,y),(!p||m)&&It.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])})(P.PureComponent);W5=jr;Ir(jr,"displayName","Bar");Ir(jr,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ar.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ir(jr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,s=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=i5(n,r);if(!p)return null;var g=t.layout,x=r.type.defaultProps,m=x!==void 0?Fe(Fe({},x),r.props):r.props,v=m.dataKey,b=m.children,w=m.minPointSize,C=g==="horizontal"?s:i,y=u?C.scale.domain():null,j=l5({numericAxis:C}),S=gt(b,bn),A=f.map(function(_,I){var k,E,T,M,R,$;u?k=o5(u[d+I],y):(k=Le(_,v),Array.isArray(k)||(k=[j,k]));var L=XB(w,W5.defaultProps.minPointSize)(k[1],I);if(g==="horizontal"){var q,U=[s.scale(k[0]),s.scale(k[1])],D=U[0],B=U[1];E=us({axis:i,ticks:l,bandSize:a,offset:p.offset,entry:_,index:I}),T=(q=B??D)!==null&&q!==void 0?q:void 0,M=p.size;var W=D-B;if(R=Number.isNaN(W)?0:W,$={x:E,y:s.y,width:M,height:s.height},Math.abs(L)>0&&Math.abs(R)<Math.abs(L)){var G=Je(R||L)*(Math.abs(L)-Math.abs(R));T-=G,R+=G}}else{var Q=[i.scale(k[0]),i.scale(k[1])],ne=Q[0],X=Q[1];if(E=ne,T=us({axis:s,ticks:c,bandSize:a,offset:p.offset,entry:_,index:I}),M=X-ne,R=p.size,$={x:i.x,y:T,width:i.width,height:R},Math.abs(L)>0&&Math.abs(M)<Math.abs(L)){var re=Je(M||L)*(Math.abs(L)-Math.abs(M));M+=re}}return Fe(Fe(Fe({},_),{},{x:E,y:T,width:M,height:R,value:u?k:k[1],payload:_,background:$},S&&S[I]&&S[I].props),{},{tooltipPayload:[jx(r,_)],tooltipPosition:{x:E+M/2,y:T+R/2}})});return Fe({data:A,layout:g},h)});function Wi(e){"@babel/helpers - typeof";return Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wi(e)}function lF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,U5(n.key),n)}}function cF(e,t,r){return t&&Gw(e.prototype,t),r&&Gw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zw(Object(r),!0).forEach(function(n){Wl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wl(e,t,r){return t=U5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U5(e){var t=uF(e,"string");return Wi(t)=="symbol"?t:t+""}function uF(e,t){if(Wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ax=function(t,r,n,a,i){var s=t.width,l=t.height,c=t.layout,u=t.children,d=Object.keys(r),f={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},h=!!wt(u,jr);return d.reduce(function(p,g){var x=r[g],m=x.orientation,v=x.domain,b=x.padding,w=b===void 0?{}:b,C=x.mirror,y=x.reversed,j="".concat(m).concat(C?"Mirror":""),S,A,_,I,k;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var E=v[1]-v[0],T=1/0,M=x.categoricalDomain.sort(E_);if(M.forEach(function(Q,ne){ne>0&&(T=Math.min((Q||0)-(M[ne-1]||0),T))}),Number.isFinite(T)){var R=T/E,$=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(S=R*$/2),x.padding==="no-gap"){var L=ct(t.barCategoryGap,R*$),q=R*$/2;S=q-L-(q-L)/$*L}}}a==="xAxis"?A=[n.left+(w.left||0)+(S||0),n.left+n.width-(w.right||0)-(S||0)]:a==="yAxis"?A=c==="horizontal"?[n.top+n.height-(w.bottom||0),n.top+(w.top||0)]:[n.top+(w.top||0)+(S||0),n.top+n.height-(w.bottom||0)-(S||0)]:A=x.range,y&&(A=[A[1],A[0]]);var U=n5(x,i,h),D=U.scale,B=U.realScaleType;D.domain(v).range(A),a5(D);var W=s5(D,Lt(Lt({},x),{},{realScaleType:B}));a==="xAxis"?(k=m==="top"&&!C||m==="bottom"&&C,_=n.left,I=f[j]-k*x.height):a==="yAxis"&&(k=m==="left"&&!C||m==="right"&&C,_=f[j]-k*x.width,I=n.top);var G=Lt(Lt(Lt({},x),W),{},{realScaleType:B,x:_,y:I,scale:D,width:a==="xAxis"?n.width:x.width,height:a==="yAxis"?n.height:x.height});return G.bandSize=ds(G,W),!x.hide&&a==="xAxis"?f[j]+=(k?-1:1)*G.height:x.hide||(f[j]+=(k?-1:1)*G.width),Lt(Lt({},p),{},Wl({},g,G))},{})},K5=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return{x:Math.min(n,i),y:Math.min(a,s),width:Math.abs(i-n),height:Math.abs(s-a)}},dF=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return K5({x:r,y:n},{x:a,y:i})},G5=(function(){function e(t){lF(this,e),this.scale=t}return cF(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])})();Wl(G5,"EPS",1e-4);var _x=function(t){var r=Object.keys(t).reduce(function(n,a){return Lt(Lt({},n),{},Wl({},a,G5.create(t[a])))},{});return Lt(Lt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.bandAware,l=i.position;return zB(a,function(c,u){return r[u].apply(c,{bandAware:s,position:l})})},isInRange:function(a){return q5(a,function(i,s){return r[s].isInRange(i)})}})};function fF(e){return(e%180+180)%180}var hF=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=fF(a),s=i*Math.PI/180,l=Math.atan(n/r),c=s>l&&s<Math.PI-l?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},nh,Yw;function pF(){if(Yw)return nh;Yw=1;var e=nr(),t=Qi(),r=Nl();function n(a){return function(i,s,l){var c=Object(i);if(!t(i)){var u=e(s,3);i=r(i),s=function(f){return u(c[f],f,c)}}var d=a(i,s,l);return d>-1?c[u?i[d]:d]:void 0}}return nh=n,nh}var ah,Xw;function mF(){if(Xw)return ah;Xw=1;var e=D5();function t(r){var n=e(r),a=n%1;return n===n?a?n-a:n:0}return ah=t,ah}var ih,Qw;function xF(){if(Qw)return ih;Qw=1;var e=zC(),t=nr(),r=mF(),n=Math.max;function a(i,s,l){var c=i==null?0:i.length;if(!c)return-1;var u=l==null?0:r(l);return u<0&&(u=n(c+u,0)),e(i,t(s,3),u)}return ih=a,ih}var oh,Jw;function gF(){if(Jw)return oh;Jw=1;var e=pF(),t=xF(),r=e(t);return oh=r,oh}var vF=gF();const yF=Oe(vF);var bF=eC();const wF=Oe(bF);var jF=wF(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function Ms(e){"@babel/helpers - typeof";return Ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(e)}var kx=P.createContext(void 0),Tx=P.createContext(void 0),Z5=P.createContext(void 0),Y5=P.createContext({}),X5=P.createContext(void 0),Q5=P.createContext(0),J5=P.createContext(0),ej=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,s=t.clipPathId,l=t.children,c=t.width,u=t.height,d=jF(i);return O.default.createElement(kx.Provider,{value:n},O.default.createElement(Tx.Provider,{value:a},O.default.createElement(Y5.Provider,{value:i},O.default.createElement(Z5.Provider,{value:d},O.default.createElement(X5.Provider,{value:s},O.default.createElement(Q5.Provider,{value:u},O.default.createElement(J5.Provider,{value:c},l)))))))},CF=function(){return P.useContext(X5)};function eO(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var tO=function(t){var r=P.useContext(kx);r==null&&(process.env.NODE_ENV!=="production"?xt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):xt());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?xt(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(Ms(t),"]. ").concat(eO(r))):xt()),n},SF=function(){var t=P.useContext(kx);return Tr(t)},OF=function(){var t=P.useContext(Tx),r=yF(t,function(n){return q5(n.domain,Number.isFinite)});return r||Tr(t)},rO=function(t){var r=P.useContext(Tx);r==null&&(process.env.NODE_ENV!=="production"?xt(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):xt());var n=r[t];return n==null&&(process.env.NODE_ENV!=="production"?xt(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(Ms(t),"]. ").concat(eO(r))):xt()),n},NF=function(){var t=P.useContext(Z5);return t},PF=function(){return P.useContext(Y5)},Ex=function(){return P.useContext(J5)},Ix=function(){return P.useContext(Q5)};function ha(e){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(e)}function AF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _F(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,aO(n.key),n)}}function kF(e,t,r){return t&&_F(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TF(e,t,r){return t=$s(t),EF(e,nO()?Reflect.construct(t,r||[],$s(e).constructor):t.apply(e,r))}function EF(e,t){if(t&&(ha(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IF(e)}function IF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nO=function(){return!!e})()}function $s(e){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$s(e)}function MF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pp(e,t)}function Pp(e,t){return Pp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Pp(e,t)}function tj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function rj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tj(Object(r),!0).forEach(function(n){Mx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mx(e,t,r){return t=aO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aO(e){var t=$F(e,"string");return ha(t)=="symbol"?t:t+""}function $F(e,t){if(ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function RF(e,t){return BF(e)||zF(e,t)||DF(e,t)||LF()}function LF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
82
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DF(e,t){if(e){if(typeof e=="string")return nj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nj(e,t)}}function nj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function BF(e){if(Array.isArray(e))return e}function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ap.apply(this,arguments)}var FF=function(t,r){var n;return O.default.isValidElement(t)?n=O.default.cloneElement(t,r):le(t)?n=t(r):n=O.default.createElement("line",Ap({},r,{className:"recharts-reference-line-line"})),n},qF=function(t,r,n,a,i,s,l,c,u){var d=i.x,f=i.y,h=i.width,p=i.height;if(n){var g=u.y,x=t.y.apply(g,{position:s});if(Xt(u,"discard")&&!t.y.isInRange(x))return null;var m=[{x:d+h,y:x},{x:d,y:x}];return c==="left"?m.reverse():m}if(r){var v=u.x,b=t.x.apply(v,{position:s});if(Xt(u,"discard")&&!t.x.isInRange(b))return null;var w=[{x:b,y:f+p},{x:b,y:f}];return l==="top"?w.reverse():w}if(a){var C=u.segment,y=C.map(function(j){return t.apply(j,{position:s})});return Xt(u,"discard")&&$B(y,function(j){return!t.isInRange(j)})?null:y}return null};function WF(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,s=e.shape,l=e.className,c=e.alwaysShow,u=CF(),d=tO(a),f=rO(i),h=NF();if(!u||!h)return null;Et(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=_x({x:d.scale,y:f.scale}),g=Ke(t),x=Ke(r),m=n&&n.length===2,v=qF(p,g,x,m,h,e.position,d.orientation,f.orientation,e);if(!v)return null;var b=RF(v,2),w=b[0],C=w.x,y=w.y,j=b[1],S=j.x,A=j.y,_=Xt(e,"hidden")?"url(#".concat(u,")"):void 0,I=rj(rj({clipPath:_},oe(e,!0)),{},{x1:C,y1:y,x2:S,y2:A});return O.default.createElement(fe,{className:ae.default("recharts-reference-line",l)},FF(s,I),Qe.renderCallByParent(e,dF({x1:C,y1:y,x2:S,y2:A})))}var $x=(function(e){function t(){return AF(this,t),TF(this,t,arguments)}return MF(t,e),kF(t,[{key:"render",value:function(){return O.default.createElement(WF,this.props)}}])})(O.default.Component);Mx($x,"displayName","ReferenceLine");Mx($x,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_p.apply(this,arguments)}function pa(e){"@babel/helpers - typeof";return pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(e)}function aj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ij(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aj(Object(r),!0).forEach(function(n){Hl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oO(n.key),n)}}function UF(e,t,r){return t&&VF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KF(e,t,r){return t=Rs(t),GF(e,iO()?Reflect.construct(t,r||[],Rs(e).constructor):t.apply(e,r))}function GF(e,t){if(t&&(pa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZF(e)}function ZF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iO=function(){return!!e})()}function Rs(e){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Rs(e)}function YF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kp(e,t)}function kp(e,t){return kp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},kp(e,t)}function Hl(e,t,r){return t=oO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oO(e){var t=XF(e,"string");return pa(t)=="symbol"?t:t+""}function XF(e,t){if(pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var QF=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,s=_x({x:a.scale,y:i.scale}),l=s.apply({x:r,y:n},{bandAware:!0});return Xt(t,"discard")&&!s.isInRange(l)?null:l},Vl=(function(e){function t(){return HF(this,t),KF(this,t,arguments)}return YF(t,e),UF(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,s=n.r,l=n.alwaysShow,c=n.clipPathId,u=Ke(a),d=Ke(i);if(Et(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=QF(this.props);if(!f)return null;var h=f.x,p=f.y,g=this.props,x=g.shape,m=g.className,v=Xt(this.props,"hidden")?"url(#".concat(c,")"):void 0,b=ij(ij({clipPath:v},oe(this.props,!0)),{},{cx:h,cy:p});return O.default.createElement(fe,{className:ae.default("recharts-reference-dot",m)},t.renderDot(x,b),Qe.renderCallByParent(this.props,{x:h-s,y:p-s,width:2*s,height:2*s}))}}])})(O.default.Component);Hl(Vl,"displayName","ReferenceDot");Hl(Vl,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Hl(Vl,"renderDot",function(e,t){var r;return O.default.isValidElement(e)?r=O.default.cloneElement(e,t):le(e)?r=e(t):r=O.default.createElement(Ea,_p({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Tp(){return Tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tp.apply(this,arguments)}function ma(e){"@babel/helpers - typeof";return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(e)}function oj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oj(Object(r),!0).forEach(function(n){Ul(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lO(n.key),n)}}function tq(e,t,r){return t&&eq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rq(e,t,r){return t=Ls(t),nq(e,sO()?Reflect.construct(t,r||[],Ls(e).constructor):t.apply(e,r))}function nq(e,t){if(t&&(ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aq(e)}function aq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sO=function(){return!!e})()}function Ls(e){return Ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ls(e)}function iq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ep(e,t)}function Ep(e,t){return Ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ep(e,t)}function Ul(e,t,r){return t=lO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lO(e){var t=oq(e,"string");return ma(t)=="symbol"?t:t+""}function oq(e,t){if(ma(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ma(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sq=function(t,r,n,a,i){var s=i.x1,l=i.x2,c=i.y1,u=i.y2,d=i.xAxis,f=i.yAxis;if(!d||!f)return null;var h=_x({x:d.scale,y:f.scale}),p={x:t?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(c,{position:"start"}):h.y.rangeMin},g={x:r?h.x.apply(l,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Xt(i,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:K5(p,g)},Kl=(function(e){function t(){return JF(this,t),rq(this,t,arguments)}return iq(t,e),tq(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,s=n.y1,l=n.y2,c=n.className,u=n.alwaysShow,d=n.clipPathId;Et(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Ke(a),h=Ke(i),p=Ke(s),g=Ke(l),x=this.props.shape;if(!f&&!h&&!p&&!g&&!x)return null;var m=sq(f,h,p,g,this.props);if(!m&&!x)return null;var v=Xt(this.props,"hidden")?"url(#".concat(d,")"):void 0;return O.default.createElement(fe,{className:ae.default("recharts-reference-area",c)},t.renderRect(x,sj(sj({clipPath:v},oe(this.props,!0)),m)),Qe.renderCallByParent(this.props,m))}}])})(O.default.Component);Ul(Kl,"displayName","ReferenceArea");Ul(Kl,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Ul(Kl,"renderRect",function(e,t){var r;return O.default.isValidElement(e)?r=O.default.cloneElement(e,t):le(e)?r=e(t):r=O.default.createElement(Nx,Tp({},t,{className:"recharts-reference-area-rect"})),r});function cO(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function lq(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return hF(n,r)}function cq(e,t,r){var n=r==="width",a=e.x,i=e.y,s=e.width,l=e.height;return t===1?{start:n?a:i,end:n?a+s:i+l}:{start:n?a+s:i+l,end:n?a:i}}function Ds(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function uq(e,t){return cO(e,t+1)}function dq(e,t,r,n,a){for(var i=(n||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s,f=function(){var g=n?.[c];if(g===void 0)return{v:cO(n,u)};var x=c,m,v=function(){return m===void 0&&(m=r(g,x)),m},b=g.coordinate,w=c===0||Ds(e,b,v,d,l);w||(c=0,d=s,u+=1),w&&(d=b+e*(v()/2+a),c+=u)},h;u<=i.length;)if(h=f(),h)return h.v;return[]}function Hi(e){"@babel/helpers - typeof";return Hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hi(e)}function lj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lj(Object(r),!0).forEach(function(n){fq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fq(e,t,r){return t=hq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hq(e){var t=pq(e,"string");return Hi(t)=="symbol"?t:t+""}function pq(e,t){if(Hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Hi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mq(e,t,r,n,a){for(var i=(n||[]).slice(),s=i.length,l=t.start,c=t.end,u=function(h){var p=i[h],g,x=function(){return g===void 0&&(g=r(p,h)),g};if(h===s-1){var m=e*(p.coordinate+e*x()/2-c);i[h]=p=at(at({},p),{},{tickCoord:m>0?p.coordinate-m*e:p.coordinate})}else i[h]=p=at(at({},p),{},{tickCoord:p.coordinate});var v=Ds(e,p.tickCoord,x,l,c);v&&(c=p.tickCoord-e*(x()/2+a),i[h]=at(at({},p),{},{isShow:!0}))},d=s-1;d>=0;d--)u(d);return i}function xq(e,t,r,n,a,i){var s=(n||[]).slice(),l=s.length,c=t.start,u=t.end;if(i){var d=n[l-1],f=r(d,l-1),h=e*(d.coordinate+e*f/2-u);s[l-1]=d=at(at({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=Ds(e,d.tickCoord,function(){return f},c,u);p&&(u=d.tickCoord-e*(f/2+a),s[l-1]=at(at({},d),{},{isShow:!0}))}for(var g=i?l-1:l,x=function(b){var w=s[b],C,y=function(){return C===void 0&&(C=r(w,b)),C};if(b===0){var j=e*(w.coordinate-e*y()/2-c);s[b]=w=at(at({},w),{},{tickCoord:j<0?w.coordinate-j*e:w.coordinate})}else s[b]=w=at(at({},w),{},{tickCoord:w.coordinate});var S=Ds(e,w.tickCoord,y,c,u);S&&(c=w.tickCoord+e*(y()/2+a),s[b]=at(at({},w),{},{isShow:!0}))},m=0;m<g;m++)x(m);return s}function Rx(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,s=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(Z(c)||ar.isSsr)return uq(a,typeof c=="number"&&Z(c)?c:0);var h=[],p=l==="top"||l==="bottom"?"width":"height",g=d&&p==="width"?ei(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},x=function(w,C){var y=le(u)?u(w.value,C):w.value;return p==="width"?lq(ei(y,{fontSize:t,letterSpacing:r}),g,f):ei(y,{fontSize:t,letterSpacing:r})[p]},m=a.length>=2?Je(a[1].coordinate-a[0].coordinate):1,v=cq(i,m,p);return c==="equidistantPreserveStart"?dq(m,v,x,a,s):(c==="preserveStart"||c==="preserveStartEnd"?h=xq(m,v,x,a,s,c==="preserveStartEnd"):h=mq(m,v,x,a,s),h.filter(function(b){return b.isShow}))}var gq=["viewBox"],vq=["viewBox"],yq=["ticks"];function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function Ln(){return Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ln.apply(this,arguments)}function cj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cj(Object(r),!0).forEach(function(n){Lx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sh(e,t){if(e==null)return{};var r=bq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uj(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dO(n.key),n)}}function jq(e,t,r){return t&&uj(e.prototype,t),r&&uj(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cq(e,t,r){return t=zs(t),Sq(e,uO()?Reflect.construct(t,r||[],zs(e).constructor):t.apply(e,r))}function Sq(e,t){if(t&&(xa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oq(e)}function Oq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uO=function(){return!!e})()}function zs(e){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zs(e)}function Nq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ip(e,t)}function Ip(e,t){return Ip=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ip(e,t)}function Lx(e,t,r){return t=dO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dO(e){var t=Pq(e,"string");return xa(t)=="symbol"?t:t+""}function Pq(e,t){if(xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $a=(function(e){function t(r){var n;return wq(this,t),n=Cq(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Nq(t,e),jq(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,s=sh(n,gq),l=this.props,c=l.viewBox,u=sh(l,vq);return!zn(i,c)||!zn(s,u)||!zn(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,s=a.y,l=a.width,c=a.height,u=a.orientation,d=a.tickSize,f=a.mirror,h=a.tickMargin,p,g,x,m,v,b,w=f?-1:1,C=n.tickSize||d,y=Z(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=g=n.coordinate,m=s+ +!f*c,x=m-w*C,b=x-w*h,v=y;break;case"left":x=m=n.coordinate,g=i+ +!f*l,p=g-w*C,v=p-w*h,b=y;break;case"right":x=m=n.coordinate,g=i+ +f*l,p=g+w*C,v=p+w*h,b=y;break;default:p=g=n.coordinate,m=s+ +f*c,x=m+w*C,b=x+w*h,v=y;break}return{line:{x1:p,y1:x,x2:g,y2:m},tick:{x:v,y:b}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s;switch(a){case"left":s=i?"start":"end";break;case"right":s=i?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s="end";switch(a){case"left":case"right":s="middle";break;case"top":s=i?"start":"end";break;default:s=i?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,l=n.height,c=n.orientation,u=n.mirror,d=n.axisLine,f=Ve(Ve(Ve({},oe(this.props,!1)),oe(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);f=Ve(Ve({},f),{},{x1:a,y1:i+h*l,x2:a+s,y2:i+h*l})}else{var p=+(c==="left"&&!u||c==="right"&&u);f=Ve(Ve({},f),{},{x1:a+p*s,y1:i,x2:a+p*s,y2:i+l})}return O.default.createElement("line",Ln({},f,{className:ae.default("recharts-cartesian-axis-line",St(d,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var s=this,l=this.props,c=l.tickLine,u=l.stroke,d=l.tick,f=l.tickFormatter,h=l.unit,p=Rx(Ve(Ve({},this.props),{},{ticks:n}),a,i),g=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),m=oe(this.props,!1),v=oe(d,!1),b=Ve(Ve({},m),{},{fill:"none"},oe(c,!1)),w=p.map(function(C,y){var j=s.getTickLineCoord(C),S=j.line,A=j.tick,_=Ve(Ve(Ve(Ve({textAnchor:g,verticalAnchor:x},m),{},{stroke:"none",fill:u},v),A),{},{index:y,payload:C,visibleTicksCount:p.length,tickFormatter:f});return O.default.createElement(fe,Ln({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},xr(s.props,C,y)),c&&O.default.createElement("line",Ln({},b,S,{className:ae.default("recharts-cartesian-axis-tick-line",St(c,"className"))})),d&&t.renderTickItem(d,_,"".concat(le(f)?f(C.value,y):C.value).concat(h||"")))});return O.default.createElement("g",{className:"recharts-cartesian-axis-ticks"},w)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,s=a.width,l=a.height,c=a.ticksGenerator,u=a.className,d=a.hide;if(d)return null;var f=this.props,h=f.ticks,p=sh(f,yq),g=h;return le(c)&&(g=h&&h.length>0?c(this.props):c(p)),s<=0||l<=0||!g||!g.length?null:O.default.createElement(fe,{className:ae.default("recharts-cartesian-axis",u),ref:function(m){n.layerReference=m}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Qe.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var s,l=ae.default(a.className,"recharts-cartesian-axis-tick-value");return O.default.isValidElement(n)?s=O.default.cloneElement(n,Ve(Ve({},a),{},{className:l})):le(n)?s=n(Ve(Ve({},a),{},{className:l})):s=O.default.createElement(dn,Ln({},a,{className:"recharts-cartesian-axis-tick-value"}),i),s}}])})(P.Component);Lx($a,"displayName","CartesianAxis");Lx($a,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Aq=["x1","y1","x2","y2","key"],_q=["offset"];function hn(e){"@babel/helpers - typeof";return hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(e)}function dj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dj(Object(r),!0).forEach(function(n){kq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kq(e,t,r){return t=Tq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tq(e){var t=Eq(e,"string");return hn(t)=="symbol"?t:t+""}function Eq(e,t){if(hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nn.apply(this,arguments)}function fj(e,t){if(e==null)return{};var r=Iq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Iq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Mq=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,s=t.width,l=t.height,c=t.ry;return O.default.createElement("rect",{x:a,y:i,ry:c,width:s,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function fO(e,t){var r;if(O.default.isValidElement(e))r=O.default.cloneElement(e,t);else if(le(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,s=t.y2,l=t.key,c=fj(t,Aq),u=oe(c,!1);u.offset;var d=fj(u,_q);r=O.default.createElement("line",nn({},d,{x1:n,y1:a,x2:i,y2:s,fill:"none",key:l}))}return r}function $q(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(l,c){var u=it(it({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return fO(a,u)});return O.default.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Rq(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(l,c){var u=it(it({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return fO(a,u)});return O.default.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function Lq(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,s=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=l.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],x=g?a+s-h:d[p+1]-h;if(x<=0)return null;var m=p%t.length;return O.default.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:x,width:i,stroke:"none",fill:t[m],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.default.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function Dq(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,s=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var d=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],x=g?i+l-h:d[p+1]-h;if(x<=0)return null;var m=p%n.length;return O.default.createElement("rect",{key:"react-".concat(p),x:h,y:s,width:x,height:c,stroke:"none",fill:n[m],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return O.default.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var zq=function(t,r){var n=t.xAxis,a=t.width,i=t.height,s=t.offset;return r5(Rx(it(it(it({},$a.defaultProps),n),{},{ticks:dr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.left,s.left+s.width,r)},Bq=function(t,r){var n=t.yAxis,a=t.width,i=t.height,s=t.offset;return r5(Rx(it(it(it({},$a.defaultProps),n),{},{ticks:dr(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.top,s.top+s.height,r)},En={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function oi(e){var t,r,n,a,i,s,l=Ex(),c=Ix(),u=PF(),d=it(it({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:En.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:En.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:En.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:En.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:En.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:En.verticalFill,x:Z(e.x)?e.x:u.left,y:Z(e.y)?e.y:u.top,width:Z(e.width)?e.width:u.width,height:Z(e.height)?e.height:u.height}),f=d.x,h=d.y,p=d.width,g=d.height,x=d.syncWithTicks,m=d.horizontalValues,v=d.verticalValues,b=SF(),w=OF();if(!Z(p)||p<=0||!Z(g)||g<=0||!Z(f)||f!==+f||!Z(h)||h!==+h)return null;var C=d.verticalCoordinatesGenerator||zq,y=d.horizontalCoordinatesGenerator||Bq,j=d.horizontalPoints,S=d.verticalPoints;if((!j||!j.length)&&le(y)){var A=m&&m.length,_=y({yAxis:w?it(it({},w),{},{ticks:A?m:w.ticks}):void 0,width:l,height:c,offset:u},A?!0:x);Et(Array.isArray(_),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(hn(_),"]")),Array.isArray(_)&&(j=_)}if((!S||!S.length)&&le(C)){var I=v&&v.length,k=C({xAxis:b?it(it({},b),{},{ticks:I?v:b.ticks}):void 0,width:l,height:c,offset:u},I?!0:x);Et(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(hn(k),"]")),Array.isArray(k)&&(S=k)}return O.default.createElement("g",{className:"recharts-cartesian-grid"},O.default.createElement(Mq,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),O.default.createElement($q,nn({},d,{offset:u,horizontalPoints:j,xAxis:b,yAxis:w})),O.default.createElement(Rq,nn({},d,{offset:u,verticalPoints:S,xAxis:b,yAxis:w})),O.default.createElement(Lq,nn({},d,{horizontalPoints:j})),O.default.createElement(Dq,nn({},d,{verticalPoints:S})))}oi.displayName="CartesianGrid";var Fq=["type","layout","connectNulls","ref"],qq=["key"];function ga(e){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function hj(e,t){if(e==null)return{};var r=Wq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},si.apply(this,arguments)}function pj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pj(Object(r),!0).forEach(function(n){Dt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function In(e){return Kq(e)||Uq(e)||Vq(e)||Hq()}function Hq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
83
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vq(e,t){if(e){if(typeof e=="string")return Mp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mp(e,t)}}function Uq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kq(e){if(Array.isArray(e))return Mp(e)}function Mp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mj(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pO(n.key),n)}}function Zq(e,t,r){return t&&mj(e.prototype,t),r&&mj(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yq(e,t,r){return t=Bs(t),Xq(e,hO()?Reflect.construct(t,r||[],Bs(e).constructor):t.apply(e,r))}function Xq(e,t){if(t&&(ga(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qq(e)}function Qq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hO=function(){return!!e})()}function Bs(e){return Bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bs(e)}function Jq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$p(e,t)}function $p(e,t){return $p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$p(e,t)}function Dt(e,t,r){return t=pO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pO(e){var t=eW(e,"string");return ga(t)=="symbol"?t:t+""}function eW(e,t){if(ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var io=(function(e){function t(){var r;Gq(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Yq(this,t,[].concat(a)),Dt(r,"state",{isAnimationFinished:!0,totalLength:0}),Dt(r,"generateSimpleStrokeDasharray",function(s,l){return"".concat(l,"px ").concat(s-l,"px")}),Dt(r,"getStrokeDasharray",function(s,l,c){var u=c.reduce(function(v,b){return v+b});if(!u)return r.generateSimpleStrokeDasharray(l,s);for(var d=Math.floor(s/u),f=s%u,h=l-s,p=[],g=0,x=0;g<c.length;x+=c[g],++g)if(x+c[g]>f){p=[].concat(In(c.slice(0,g)),[f-x]);break}var m=p.length%2===0?[0,h]:[h];return[].concat(In(t.repeat(c,d)),In(p),m).map(function(v){return"".concat(v,"px")}).join(", ")}),Dt(r,"id",yn("recharts-line-")),Dt(r,"pathRef",function(s){r.mainCurve=s}),Dt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Dt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Jq(t,e),Zq(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.points,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=gt(d,no);if(!f)return null;var h=function(x,m){return{x:x.x,y:x.y,value:x.value,errorVal:Le(x.payload,m)}},p={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.default.createElement(fe,p,f.map(function(g){return O.default.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:s,xAxis:l,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,u=l.points,d=l.dataKey,f=oe(this.props,!1),h=oe(c,!0),p=u.map(function(x,m){var v=yt(yt(yt({key:"dot-".concat(m),r:3},f),h),{},{index:m,cx:x.x,cy:x.y,value:x.value,dataKey:d,payload:x.payload,points:u});return t.renderDotItem(c,v)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.default.createElement(fe,si({className:"recharts-line-dots",key:"dots"},g),p)}},{key:"renderCurveStatically",value:function(n,a,i,s){var l=this.props,c=l.type,u=l.layout,d=l.connectNulls;l.ref;var f=hj(l,Fq),h=yt(yt(yt({},oe(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},s),{},{type:c,layout:u,connectNulls:d});return O.default.createElement(ln,si({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,c=s.strokeDasharray,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,g=s.animateNewValues,x=s.width,m=s.height,v=this.state,b=v.prevPoints,w=v.totalLength;return O.default.createElement(Ot,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var y=C.t;if(b){var j=b.length/l.length,S=l.map(function(E,T){var M=Math.floor(T*j);if(b[M]){var R=b[M],$=Ee(R.x,E.x),L=Ee(R.y,E.y);return yt(yt({},E),{},{x:$(y),y:L(y)})}if(g){var q=Ee(x*2,E.x),U=Ee(m/2,E.y);return yt(yt({},E),{},{x:q(y),y:U(y)})}return yt(yt({},E),{},{x:E.x,y:E.y})});return i.renderCurveStatically(S,n,a)}var A=Ee(0,w),_=A(y),I;if(c){var k="".concat(c).split(/[,\s]+/gim).map(function(E){return parseFloat(E)});I=i.getStrokeDasharray(_,w,k)}else I=i.generateSimpleStrokeDasharray(w,_);return i.renderCurveStatically(l,n,a,{strokeDasharray:I})})}},{key:"renderCurve",value:function(n,a){var i=this.props,s=i.points,l=i.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return l&&s&&s.length&&(!u&&d>0||!br(u,s))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,l=a.points,c=a.className,u=a.xAxis,d=a.yAxis,f=a.top,h=a.left,p=a.width,g=a.height,x=a.isAnimationActive,m=a.id;if(i||!l||!l.length)return null;var v=this.state.isAnimationFinished,b=l.length===1,w=ae.default("recharts-line",c),C=u&&u.allowDataOverflow,y=d&&d.allowDataOverflow,j=C||y,S=de(m)?this.id:m,A=(n=oe(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=A.r,I=_===void 0?3:_,k=A.strokeWidth,E=k===void 0?2:k,T=iC(s)?s:{},M=T.clipDot,R=M===void 0?!0:M,$=I*2+E;return O.default.createElement(fe,{className:w},C||y?O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"clipPath-".concat(S)},O.default.createElement("rect",{x:C?h:h-p/2,y:y?f:f-g/2,width:C?p:p*2,height:y?g:g*2})),!R&&O.default.createElement("clipPath",{id:"clipPath-dots-".concat(S)},O.default.createElement("rect",{x:h-$/2,y:f-$/2,width:p+$,height:g+$}))):null,!b&&this.renderCurve(j,S),this.renderErrorBar(j,S),(b||s)&&this.renderDots(j,R,S),(!x||v)&&It.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(In(n),[0]):n,s=[],l=0;l<a;++l)s=[].concat(In(s),In(i));return s}},{key:"renderDotItem",value:function(n,a){var i;if(O.default.isValidElement(n))i=O.default.cloneElement(n,a);else if(le(n))i=n(a);else{var s=a.key,l=hj(a,qq),c=ae.default("recharts-line-dot",typeof n!="boolean"?n.className:"");i=O.default.createElement(Ea,si({key:s},l,{className:c}))}return i}}])})(P.PureComponent);Dt(io,"displayName","Line");Dt(io,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!ar.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Dt(io,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,s=e.dataKey,l=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,f=c.map(function(h,p){var g=Le(h,s);return d==="horizontal"?{x:cs({axis:r,ticks:a,bandSize:l,entry:h,index:p}),y:de(g)?null:n.scale(g),value:g,payload:h}:{x:de(g)?null:r.scale(g),y:cs({axis:n,ticks:i,bandSize:l,entry:h,index:p}),value:g,payload:h}});return yt({points:f,layout:d},u)});var tW=["layout","type","stroke","connectNulls","isRange","ref"],rW=["key"],mO;function va(e){"@babel/helpers - typeof";return va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(e)}function xO(e,t){if(e==null)return{};var r=nW(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function an(){return an=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},an.apply(this,arguments)}function xj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xj(Object(r),!0).forEach(function(n){Gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gj(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vO(n.key),n)}}function iW(e,t,r){return t&&gj(e.prototype,t),r&&gj(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oW(e,t,r){return t=Fs(t),sW(e,gO()?Reflect.construct(t,r||[],Fs(e).constructor):t.apply(e,r))}function sW(e,t){if(t&&(va(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lW(e)}function lW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gO=function(){return!!e})()}function Fs(e){return Fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fs(e)}function cW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rp(e,t)}function Rp(e,t){return Rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Rp(e,t)}function Gt(e,t,r){return t=vO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vO(e){var t=uW(e,"string");return va(t)=="symbol"?t:t+""}function uW(e,t){if(va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wr=(function(e){function t(){var r;aW(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=oW(this,t,[].concat(a)),Gt(r,"state",{isAnimationFinished:!0}),Gt(r,"id",yn("recharts-area-")),Gt(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),le(s)&&s()}),Gt(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),le(s)&&s()}),r}return cW(t,e),iW(t,[{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(s&&!l)return null;var c=this.props,u=c.dot,d=c.points,f=c.dataKey,h=oe(this.props,!1),p=oe(u,!0),g=d.map(function(m,v){var b=Ar(Ar(Ar({key:"dot-".concat(v),r:3},h),p),{},{index:v,cx:m.x,cy:m.y,dataKey:f,value:m.value,payload:m.payload,points:d});return t.renderDotItem(u,b)}),x={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.default.createElement(fe,an({className:"recharts-area-dots"},x),g)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,s=a.points,l=a.strokeWidth,c=s[0].x,u=s[s.length-1].x,d=n*Math.abs(c-u),f=Er(s.map(function(h){return h.y||0}));return Z(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(Er(i.map(function(h){return h.y||0})),f)),Z(f)?O.default.createElement("rect",{x:c<u?c:c-d,y:0,width:d,height:Math.floor(f+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,s=a.points,l=a.strokeWidth,c=s[0].y,u=s[s.length-1].y,d=n*Math.abs(c-u),f=Er(s.map(function(h){return h.x||0}));return Z(i)&&typeof i=="number"?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(Er(i.map(function(h){return h.x||0})),f)),Z(f)?O.default.createElement("rect",{x:0,y:c<u?c:c-d,width:f+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,s){var l=this.props,c=l.layout,u=l.type,d=l.stroke,f=l.connectNulls,h=l.isRange;l.ref;var p=xO(l,tW);return O.default.createElement(fe,{clipPath:i?"url(#clipPath-".concat(s,")"):null},O.default.createElement(ln,an({},oe(p,!0),{points:n,connectNulls:f,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),d!=="none"&&O.default.createElement(ln,an({},oe(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:n})),d!=="none"&&h&&O.default.createElement(ln,an({},oe(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:f,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,s=this.props,l=s.points,c=s.baseLine,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,g=this.state,x=g.prevPoints,m=g.prevBaseLine;return O.default.createElement(Ot,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var b=v.t;if(x){var w=x.length/l.length,C=l.map(function(A,_){var I=Math.floor(_*w);if(x[I]){var k=x[I],E=Ee(k.x,A.x),T=Ee(k.y,A.y);return Ar(Ar({},A),{},{x:E(b),y:T(b)})}return A}),y;if(Z(c)&&typeof c=="number"){var j=Ee(m,c);y=j(b)}else if(de(c)||Pa(c)){var S=Ee(m,0);y=S(b)}else y=c.map(function(A,_){var I=Math.floor(_*w);if(m[I]){var k=m[I],E=Ee(k.x,A.x),T=Ee(k.y,A.y);return Ar(Ar({},A),{},{x:E(b),y:T(b)})}return A});return i.renderAreaStatically(C,y,n,a)}return O.default.createElement(fe,null,O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(b))),O.default.createElement(fe,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(l,c,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,s=i.points,l=i.baseLine,c=i.isAnimationActive,u=this.state,d=u.prevPoints,f=u.prevBaseLine,h=u.totalLength;return c&&s&&s.length&&(!d&&h>0||!br(d,s)||!br(f,l))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(s,l,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,l=a.points,c=a.className,u=a.top,d=a.left,f=a.xAxis,h=a.yAxis,p=a.width,g=a.height,x=a.isAnimationActive,m=a.id;if(i||!l||!l.length)return null;var v=this.state.isAnimationFinished,b=l.length===1,w=ae.default("recharts-area",c),C=f&&f.allowDataOverflow,y=h&&h.allowDataOverflow,j=C||y,S=de(m)?this.id:m,A=(n=oe(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},_=A.r,I=_===void 0?3:_,k=A.strokeWidth,E=k===void 0?2:k,T=iC(s)?s:{},M=T.clipDot,R=M===void 0?!0:M,$=I*2+E;return O.default.createElement(fe,{className:w},C||y?O.default.createElement("defs",null,O.default.createElement("clipPath",{id:"clipPath-".concat(S)},O.default.createElement("rect",{x:C?d:d-p/2,y:y?u:u-g/2,width:C?p:p*2,height:y?g:g*2})),!R&&O.default.createElement("clipPath",{id:"clipPath-dots-".concat(S)},O.default.createElement("rect",{x:d-$/2,y:u-$/2,width:p+$,height:g+$}))):null,b?null:this.renderArea(j,S),(s||b)&&this.renderDots(j,R,S),(!x||v)&&It.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(P.PureComponent);mO=Wr;Gt(Wr,"displayName","Area");Gt(Wr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ar.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Gt(Wr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,s=t.props.baseValue,l=s??i;if(Z(l)&&typeof l=="number")return l;var c=a==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var d=Math.max(u[0],u[1]),f=Math.min(u[0],u[1]);return l==="dataMin"?f:l==="dataMax"||d<0?d:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]});Gt(Wr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,g=u&&u.length,x=mO.getBaseValue(t,r,n,a),m=p==="horizontal",v=!1,b=f.map(function(C,y){var j;g?j=u[d+y]:(j=Le(C,c),Array.isArray(j)?v=!0:j=[x,j]);var S=j[1]==null||g&&Le(C,c)==null;return m?{x:cs({axis:n,ticks:i,bandSize:l,entry:C,index:y}),y:S?null:a.scale(j[1]),value:j,payload:C}:{x:S?null:n.scale(j[1]),y:cs({axis:a,ticks:s,bandSize:l,entry:C,index:y}),value:j,payload:C}}),w;return g||v?w=b.map(function(C){var y=Array.isArray(C.value)?C.value[0]:null;return m?{x:C.x,y:y!=null&&C.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:C.y}}):w=m?a.scale(x):n.scale(x),Ar({points:b,baseLine:w,layout:p,isRange:v},h)});Gt(Wr,"renderDotItem",function(e,t){var r;if(O.default.isValidElement(e))r=O.default.cloneElement(e,t);else if(le(e))r=e(t);else{var n=ae.default("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=xO(t,rW);r=O.default.createElement(Ea,an({},i,{key:a,className:n}))}return r});function ya(e){"@babel/helpers - typeof";return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ya(e)}function dW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wO(n.key),n)}}function hW(e,t,r){return t&&fW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pW(e,t,r){return t=qs(t),mW(e,yO()?Reflect.construct(t,r||[],qs(e).constructor):t.apply(e,r))}function mW(e,t){if(t&&(ya(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xW(e)}function xW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yO=function(){return!!e})()}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qs(e)}function gW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lp(e,t)}function Lp(e,t){return Lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Lp(e,t)}function bO(e,t,r){return t=wO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wO(e){var t=vW(e,"string");return ya(t)=="symbol"?t:t+""}function vW(e,t){if(ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dp.apply(this,arguments)}function yW(e){var t=e.xAxisId,r=Ex(),n=Ix(),a=tO(t);return a==null?null:O.createElement($a,Dp({},a,{className:ae.default("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return dr(s,!0)}}))}var pr=(function(e){function t(){return dW(this,t),pW(this,t,arguments)}return gW(t,e),hW(t,[{key:"render",value:function(){return O.createElement(yW,this.props)}}])})(O.Component);bO(pr,"displayName","XAxis");bO(pr,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function bW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,SO(n.key),n)}}function jW(e,t,r){return t&&wW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CW(e,t,r){return t=Ws(t),SW(e,jO()?Reflect.construct(t,r||[],Ws(e).constructor):t.apply(e,r))}function SW(e,t){if(t&&(ba(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OW(e)}function OW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jO=function(){return!!e})()}function Ws(e){return Ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ws(e)}function NW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zp(e,t)}function zp(e,t){return zp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zp(e,t)}function CO(e,t,r){return t=SO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SO(e){var t=PW(e,"string");return ba(t)=="symbol"?t:t+""}function PW(e,t){if(ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bp.apply(this,arguments)}var AW=function(t){var r=t.yAxisId,n=Ex(),a=Ix(),i=rO(r);return i==null?null:O.createElement($a,Bp({},i,{className:ae.default("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(l){return dr(l,!0)}}))},Lr=(function(e){function t(){return bW(this,t),CW(this,t,arguments)}return NW(t,e),jW(t,[{key:"render",value:function(){return O.createElement(AW,this.props)}}])})(O.Component);CO(Lr,"displayName","YAxis");CO(Lr,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function vj(e){return EW(e)||TW(e)||kW(e)||_W()}function _W(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
84
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kW(e,t){if(e){if(typeof e=="string")return Fp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fp(e,t)}}function TW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EW(e){if(Array.isArray(e))return Fp(e)}function Fp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var qp=function(t,r,n,a,i){var s=gt(t,$x),l=gt(t,Vl),c=[].concat(vj(s),vj(l)),u=gt(t,Kl),d="".concat(a,"Id"),f=a[0],h=r;if(c.length&&(h=c.reduce(function(x,m){if(m.props[d]===n&&Xt(m.props,"extendDomain")&&Z(m.props[f])){var v=m.props[f];return[Math.min(x[0],v),Math.max(x[1],v)]}return x},h)),u.length){var p="".concat(f,"1"),g="".concat(f,"2");h=u.reduce(function(x,m){if(m.props[d]===n&&Xt(m.props,"extendDomain")&&Z(m.props[p])&&Z(m.props[g])){var v=m.props[p],b=m.props[g];return[Math.min(x[0],v,b),Math.max(x[1],v,b)]}return x},h)}return i&&i.length&&(h=i.reduce(function(x,m){return Z(m)?[Math.min(x[0],m),Math.max(x[1],m)]:x},h)),h},lh={exports:{}},yj;function IW(){return yj||(yj=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new a(d,f||c,h),g=r?r+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],p]:c._events[g].push(p):(c._events[g]=p,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=r?r+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,g=new Array(p);h<p;h++)g[h]=f[h].fn;return g},l.prototype.listenerCount=function(u){var d=r?r+u:u,f=this._events[d];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,d,f,h,p,g){var x=r?r+u:u;if(!this._events[x])return!1;var m=this._events[x],v=arguments.length,b,w;if(m.fn){switch(m.once&&this.removeListener(u,m.fn,void 0,!0),v){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,f),!0;case 4:return m.fn.call(m.context,d,f,h),!0;case 5:return m.fn.call(m.context,d,f,h,p),!0;case 6:return m.fn.call(m.context,d,f,h,p,g),!0}for(w=1,b=new Array(v-1);w<v;w++)b[w-1]=arguments[w];m.fn.apply(m.context,b)}else{var C=m.length,y;for(w=0;w<C;w++)switch(m[w].once&&this.removeListener(u,m[w].fn,void 0,!0),v){case 1:m[w].fn.call(m[w].context);break;case 2:m[w].fn.call(m[w].context,d);break;case 3:m[w].fn.call(m[w].context,d,f);break;case 4:m[w].fn.call(m[w].context,d,f,h);break;default:if(!b)for(y=1,b=new Array(v-1);y<v;y++)b[y-1]=arguments[y];m[w].fn.apply(m[w].context,b)}}return!0},l.prototype.on=function(u,d,f){return i(this,u,d,f,!1)},l.prototype.once=function(u,d,f){return i(this,u,d,f,!0)},l.prototype.removeListener=function(u,d,f,h){var p=r?r+u:u;if(!this._events[p])return this;if(!d)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===d&&(!h||g.once)&&(!f||g.context===f)&&s(this,p);else{for(var x=0,m=[],v=g.length;x<v;x++)(g[x].fn!==d||h&&!g[x].once||f&&g[x].context!==f)&&m.push(g[x]);m.length?this._events[p]=m.length===1?m[0]:m:s(this,p)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=r?r+u:u,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(lh)),lh.exports}var MW=IW();const $W=Oe(MW);var ch=new $W,uh="recharts.syncMouseEvents";function Vi(e){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vi(e)}function RW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,OO(n.key),n)}}function DW(e,t,r){return t&&LW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dh(e,t,r){return t=OO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OO(e){var t=zW(e,"string");return Vi(t)=="symbol"?t:t+""}function zW(e,t){if(Vi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Vi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var BW=(function(){function e(){RW(this,e),dh(this,"activeIndex",0),dh(this,"coordinateList",[]),dh(this,"layout","horizontal")}return DW(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,s=r.container,l=s===void 0?null:s,c=r.layout,u=c===void 0?null:c,d=r.offset,f=d===void 0?null:d,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,s=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+c+u,h=s+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])})();function FW(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e?.[0],a=e?.[1];if(n&&a&&Z(n)&&Z(a))return!0}return!1}function qW(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function NO(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,s=ge(t,r,n,a),l=ge(t,r,n,i);return{points:[s,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function WW(e,t,r){var n,a,i,s;if(e==="horizontal")n=t.x,i=n,a=r.top,s=r.top+r.height;else if(e==="vertical")a=t.y,s=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,h=ge(l,c,u,f),p=ge(l,c,d,f);n=h.x,a=h.y,i=p.x,s=p.y}else return NO(t);return[{x:n,y:a},{x:i,y:s}]}function Ui(e){"@babel/helpers - typeof";return Ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ui(e)}function bj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Oo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bj(Object(r),!0).forEach(function(n){HW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HW(e,t,r){return t=VW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VW(e){var t=UW(e,"string");return Ui(t)=="symbol"?t:t+""}function UW(e,t){if(Ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KW(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,s=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!i||!s||h!=="ScatterChart"&&a!=="axis")return null;var g,x=ln;if(h==="ScatterChart")g=s,x=bD;else if(h==="BarChart")g=qW(f,s,c,d),x=Nx;else if(f==="radial"){var m=NO(s),v=m.cx,b=m.cy,w=m.radius,C=m.startAngle,y=m.endAngle;g={cx:v,cy:b,startAngle:C,endAngle:y,innerRadius:w,outerRadius:w},x=x5}else g={points:WW(f,s,c)},x=ln;var j=Oo(Oo(Oo(Oo({stroke:"#ccc",pointerEvents:"none"},c),g),oe(p,!1)),{},{payload:l,payloadIndex:u,className:ae.default("recharts-tooltip-cursor",p.className)});return P.isValidElement(p)?P.cloneElement(p,j):P.createElement(x,j)}var GW=["item"],ZW=["children","className","width","height","style","compact","title","desc"];function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function Dn(){return Dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dn.apply(this,arguments)}function wj(e,t){return QW(e)||XW(e,t)||AO(e,t)||YW()}function YW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
89
85
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return l}}function QW(e){if(Array.isArray(e))return e}function jj(e,t){if(e==null)return{};var r=JW(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function eH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tH(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_O(n.key),n)}}function rH(e,t,r){return t&&tH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nH(e,t,r){return t=Hs(t),aH(e,PO()?Reflect.construct(t,r||[],Hs(e).constructor):t.apply(e,r))}function aH(e,t){if(t&&(wa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iH(e)}function iH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PO=function(){return!!e})()}function Hs(e){return Hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hs(e)}function oH(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wp(e,t)}function Wp(e,t){return Wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Wp(e,t)}function ja(e){return cH(e)||lH(e)||AO(e)||sH()}function sH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
90
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AO(e,t){if(e){if(typeof e=="string")return Hp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hp(e,t)}}function lH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cH(e){if(Array.isArray(e))return Hp(e)}function Hp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cj(Object(r),!0).forEach(function(n){ue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ue(e,t,r){return t=_O(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _O(e){var t=uH(e,"string");return wa(t)=="symbol"?t:t+""}function uH(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dH={xAxis:["bottom","top"],yAxis:["left","right"]},fH={width:"100%",height:"100%"},kO={x:0,y:0};function No(e){return e}var hH=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},pH=function(t,r,n,a){var i=r.find(function(d){return d&&d.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var s=i.coordinate,l=a.radius;return V(V(V({},a),ve(a.cx,a.cy,l,s)),{},{angle:s,radius:l})}var c=i.coordinate,u=a.angle;return V(V(V({},a),ve(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return kO},Gl=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,s=(n??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(ja(l),ja(u)):l},[]);return s.length>0?s:t&&t.length&&Y(a)&&Y(i)?t.slice(a,i+1):[]};function TO(e){return e==="number"?[0,"auto"]:void 0}var Vp=function(t,r,n,a){var i=t.graphicalItems,s=t.tooltipAxis,l=Gl(r,t);return n<0||!i||!i.length||n>=l.length?null:i.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var p=f===void 0?l:f;h=Lo(p,s.dataKey,a)}else h=f&&f[n]||l[n];return h?[].concat(ja(c),[jx(u,h)]):c},[])},Sj=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},s=hH(i,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=z7(s,l,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,h=Vp(t,r,d,f),p=pH(n,l,d,i);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},mH=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=t5(d,i);return n.reduce(function(g,x){var m,v=x.type.defaultProps!==void 0?V(V({},x.type.defaultProps),x.props):x.props,b=v.type,w=v.dataKey,C=v.allowDataOverflow,y=v.allowDuplicatedCategory,j=v.scale,S=v.ticks,A=v.includeHidden,_=v[s];if(g[_])return g;var I=Gl(t.data,{graphicalItems:a.filter(function(H){var W,Z=s in H.props?H.props[s]:(W=H.type.defaultProps)===null||W===void 0?void 0:W[s];return Z===_}),dataStartIndex:c,dataEndIndex:u}),k=I.length,E,T,M;FW(v.domain,C,b)&&(E=ep(v.domain,null,C),p&&(b==="number"||j!=="auto")&&(M=ri(I,w,"category")));var R=TO(b);if(!E||E.length===0){var $,L=($=v.domain)!==null&&$!==void 0?$:R;if(w){if(E=ri(I,w,b),b==="category"&&p){var q=T_(E);y&&q?(T=E,E=_s(0,k)):y||(E=o1(L,E,x).reduce(function(H,W){return H.indexOf(W)>=0?H:[].concat(ja(H),[W])},[]))}else if(b==="category")y?E=E.filter(function(H){return H!==""&&!de(H)}):E=o1(L,E,x).reduce(function(H,W){return H.indexOf(W)>=0||W===""||de(W)?H:[].concat(ja(H),[W])},[]);else if(b==="number"){var U=H7(I,a.filter(function(H){var W,Z,re=s in H.props?H.props[s]:(W=H.type.defaultProps)===null||W===void 0?void 0:W[s],X="hide"in H.props?H.props.hide:(Z=H.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return re===_&&(A||!X)}),w,i,d);U&&(E=U)}p&&(b==="number"||j!=="auto")&&(M=ri(I,w,"category"))}else p?E=_s(0,k):l&&l[_]&&l[_].hasStack&&b==="number"?E=h==="expand"?[0,1]:c5(l[_].stackGroups,c,u):E=e5(I,a.filter(function(H){var W=s in H.props?H.props[s]:H.type.defaultProps[s],Z="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return W===_&&(A||!Z)}),b,d,!0);if(b==="number")E=qp(f,E,_,i,S),L&&(E=ep(L,E,C));else if(b==="category"&&L){var z=L,F=E.every(function(H){return z.indexOf(H)>=0});F&&(E=z)}}return V(V({},g),{},ue({},_,V(V({},v),{},{axisType:i,domain:E,categoricalDomain:M,duplicateDomain:T,originalDomain:(m=v.domain)!==null&&m!==void 0?m:R,isCategorical:p,layout:d})))},{})},xH=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=Gl(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),p=h.length,g=t5(d,i),x=-1;return n.reduce(function(m,v){var b=v.type.defaultProps!==void 0?V(V({},v.type.defaultProps),v.props):v.props,w=b[s],C=TO("number");if(!m[w]){x++;var y;return g?y=_s(0,p):l&&l[w]&&l[w].hasStack?(y=c5(l[w].stackGroups,c,u),y=qp(f,y,w,i)):(y=ep(C,e5(h,n.filter(function(j){var S,A,_=s in j.props?j.props[s]:(S=j.type.defaultProps)===null||S===void 0?void 0:S[s],I="hide"in j.props?j.props.hide:(A=j.type.defaultProps)===null||A===void 0?void 0:A.hide;return _===w&&!I}),"number",d),a.defaultProps.allowDataOverflow),y=qp(f,y,w,i)),V(V({},m),{},ue({},w,V(V({axisType:i},a.defaultProps),{},{hide:!0,orientation:St(dH,"".concat(i,".").concat(x%2),null),domain:y,originalDomain:C,isCategorical:g,layout:d})))}return m},{})},gH=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,s=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.children,f="".concat(a,"Id"),h=gt(d,i),p={};return h&&h.length?p=mH(t,{axes:h,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):s&&s.length&&(p=xH(t,{Axis:i,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),p},vH=function(t){var r=Tr(t),n=dr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Zm(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ds(r,n)}},Oj=function(t){var r=t.children,n=t.defaultShowTooltip,a=wt(r,ua),i=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(s=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},yH=function(t){return!t||!t.length?!1:t.some(function(r){var n=fr(r&&r.type);return n&&n.indexOf("Bar")>=0})},Nj=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},bH=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,s=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,u=n.width,d=n.height,f=n.children,h=n.margin||{},p=wt(f,ua),g=wt(f,Zt),x=Object.keys(c).reduce(function(y,j){var S=c[j],A=S.orientation;return!S.mirror&&!S.hide?V(V({},y),{},ue({},A,y[A]+S.width)):y},{left:h.left||0,right:h.right||0}),m=Object.keys(s).reduce(function(y,j){var S=s[j],A=S.orientation;return!S.mirror&&!S.hide?V(V({},y),{},ue({},A,St(y,"".concat(A))+S.height)):y},{top:h.top||0,bottom:h.bottom||0}),v=V(V({},m),x),b=v.bottom;p&&(v.bottom+=p.props.height||ua.defaultProps.height),g&&r&&(v=q7(v,a,n,r));var w=u-v.left-v.right,C=d-v.top-v.bottom;return V(V({brushBottom:b},v),{},{width:Math.max(w,0),height:Math.max(C,0)})},wH=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Ra=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(v,b){var w=b.graphicalItems,C=b.stackGroups,y=b.offset,j=b.updateId,S=b.dataStartIndex,A=b.dataEndIndex,_=v.barSize,I=v.layout,k=v.barGap,E=v.barCategoryGap,T=v.maxBarSize,M=Nj(I),R=M.numericAxisName,$=M.cateAxisName,L=yH(w),q=[];return w.forEach(function(U,z){var F=Gl(v.data,{graphicalItems:[U],dataStartIndex:S,dataEndIndex:A}),H=U.type.defaultProps!==void 0?V(V({},U.type.defaultProps),U.props):U.props,W=H.dataKey,Z=H.maxBarSize,re=H["".concat(R,"Id")],X=H["".concat($,"Id")],ne={},ce=c.reduce(function(Hr,ir){var Zl,Yl,Xl=b["".concat(ir.axisType,"Map")],Wx=H["".concat(ir.axisType,"Id")];Xl&&Xl[Wx]||ir.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?xt(!1,"Specifying a(n) ".concat(ir.axisType,"Id requires a corresponding ").concat(ir.axisType,"Id on the targeted graphical component ").concat((Zl=U==null||(Yl=U.type)===null||Yl===void 0?void 0:Yl.displayName)!==null&&Zl!==void 0?Zl:"")):xt());var Hx=Xl[Wx];return V(V({},Hr),{},ue(ue({},ir.axisType,Hx),"".concat(ir.axisType,"Ticks"),dr(Hx)))},ne),G=ce[$],ee=ce["".concat($,"Ticks")],J=C&&C[re]&&C[re].hasStack&&Y7(U,C[re].stackGroups),D=fr(U.type).indexOf("Bar")>=0,he=ds(G,ee),Q=[],me=L&&B7({barSize:_,stackGroups:C,totalSize:wH(ce,$)});if(D){var $e,tt,Pr=de(Z)?T:Z,Nn=($e=(tt=ds(G,ee,!0))!==null&&tt!==void 0?tt:Pr)!==null&&$e!==void 0?$e:0;Q=F7({barGap:k,barCategoryGap:E,bandSize:Nn!==he?Nn:he,sizeList:me[X],maxBarSize:Pr}),Nn!==he&&(Q=Q.map(function(Hr){return V(V({},Hr),{},{position:V(V({},Hr.position),{},{offset:Hr.position.offset-Nn/2})})}))}var oo=U&&U.type&&U.type.getComposedData;oo&&q.push({props:V(V({},oo(V(V({},ce),{},{displayedData:F,props:v,dataKey:W,item:U,bandSize:he,barPosition:Q,offset:y,stackedData:J,layout:I,dataStartIndex:S,dataEndIndex:A}))),{},ue(ue(ue({key:U.key||"item-".concat(z)},R,ce[R]),$,ce[$]),"animationId",j)),childIndex:W_(U,v.children),item:U})}),q},p=function(v,b){var w=v.props,C=v.dataStartIndex,y=v.dataEndIndex,j=v.updateId;if(!jv({props:w}))return null;var S=w.children,A=w.layout,_=w.stackOffset,I=w.data,k=w.reverseStackOrder,E=Nj(A),T=E.numericAxisName,M=E.cateAxisName,R=gt(S,n),$=Z7(I,R,"".concat(T,"Id"),"".concat(M,"Id"),_,k),L=c.reduce(function(H,W){var Z="".concat(W.axisType,"Map");return V(V({},H),{},ue({},Z,gH(w,V(V({},W),{},{graphicalItems:R,stackGroups:W.axisType===T&&$,dataStartIndex:C,dataEndIndex:y}))))},{}),q=bH(V(V({},L),{},{props:w,graphicalItems:R}),b?.legendBBox);Object.keys(L).forEach(function(H){L[H]=d(w,L[H],q,H.replace("Map",""),r)});var U=L["".concat(M,"Map")],z=vH(U),F=h(w,V(V({},L),{},{dataStartIndex:C,dataEndIndex:y,updateId:j,graphicalItems:R,stackGroups:$,offset:q}));return V(V({formattedGraphicalItems:F,graphicalItems:R,offset:q,stackGroups:$},z),L)},g=(function(m){function v(b){var w,C,y;return eH(this,v),y=nH(this,v,[b]),ue(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(y,"accessibilityManager",new BW),ue(y,"handleLegendBBoxUpdate",function(j){if(j){var S=y.state,A=S.dataStartIndex,_=S.dataEndIndex,I=S.updateId;y.setState(V({legendBBox:j},p({props:y.props,dataStartIndex:A,dataEndIndex:_,updateId:I},V(V({},y.state),{},{legendBBox:j}))))}}),ue(y,"handleReceiveSyncEvent",function(j,S,A){if(y.props.syncId===j){if(A===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(S)}}),ue(y,"handleBrushChange",function(j){var S=j.startIndex,A=j.endIndex;if(S!==y.state.dataStartIndex||A!==y.state.dataEndIndex){var _=y.state.updateId;y.setState(function(){return V({dataStartIndex:S,dataEndIndex:A},p({props:y.props,dataStartIndex:S,dataEndIndex:A,updateId:_},y.state))}),y.triggerSyncEvent({dataStartIndex:S,dataEndIndex:A})}}),ue(y,"handleMouseEnter",function(j){var S=y.getMouseInfo(j);if(S){var A=V(V({},S),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var _=y.props.onMouseEnter;le(_)&&_(A,j)}}),ue(y,"triggeredAfterMouseMove",function(j){var S=y.getMouseInfo(j),A=S?V(V({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var _=y.props.onMouseMove;le(_)&&_(A,j)}),ue(y,"handleItemMouseEnter",function(j){y.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),ue(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),ue(y,"handleMouseMove",function(j){j.persist(),y.throttleTriggeredAfterMouseMove(j)}),ue(y,"handleMouseLeave",function(j){y.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};y.setState(S),y.triggerSyncEvent(S);var A=y.props.onMouseLeave;le(A)&&A(S,j)}),ue(y,"handleOuterEvent",function(j){var S=q_(j),A=St(y.props,"".concat(S));if(S&&le(A)){var _,I;/.*touch.*/i.test(S)?I=y.getMouseInfo(j.changedTouches[0]):I=y.getMouseInfo(j),A((_=I)!==null&&_!==void 0?_:{},j)}}),ue(y,"handleClick",function(j){var S=y.getMouseInfo(j);if(S){var A=V(V({},S),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var _=y.props.onClick;le(_)&&_(A,j)}}),ue(y,"handleMouseDown",function(j){var S=y.props.onMouseDown;if(le(S)){var A=y.getMouseInfo(j);S(A,j)}}),ue(y,"handleMouseUp",function(j){var S=y.props.onMouseUp;if(le(S)){var A=y.getMouseInfo(j);S(A,j)}}),ue(y,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),ue(y,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&y.handleMouseDown(j.changedTouches[0])}),ue(y,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&y.handleMouseUp(j.changedTouches[0])}),ue(y,"handleDoubleClick",function(j){var S=y.props.onDoubleClick;if(le(S)){var A=y.getMouseInfo(j);S(A,j)}}),ue(y,"handleContextMenu",function(j){var S=y.props.onContextMenu;if(le(S)){var A=y.getMouseInfo(j);S(A,j)}}),ue(y,"triggerSyncEvent",function(j){y.props.syncId!==void 0&&ch.emit(uh,y.props.syncId,j,y.eventEmitterSymbol)}),ue(y,"applySyncEvent",function(j){var S=y.props,A=S.layout,_=S.syncMethod,I=y.state.updateId,k=j.dataStartIndex,E=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)y.setState(V({dataStartIndex:k,dataEndIndex:E},p({props:y.props,dataStartIndex:k,dataEndIndex:E,updateId:I},y.state)));else if(j.activeTooltipIndex!==void 0){var T=j.chartX,M=j.chartY,R=j.activeTooltipIndex,$=y.state,L=$.offset,q=$.tooltipTicks;if(!L)return;if(typeof _=="function")R=_(q,j);else if(_==="value"){R=-1;for(var U=0;U<q.length;U++)if(q[U].value===j.activeLabel){R=U;break}}var z=V(V({},L),{},{x:L.left,y:L.top}),F=Math.min(T,z.x+z.width),H=Math.min(M,z.y+z.height),W=q[R]&&q[R].value,Z=Vp(y.state,y.props.data,R),re=q[R]?{x:A==="horizontal"?q[R].coordinate:F,y:A==="horizontal"?H:q[R].coordinate}:kO;y.setState(V(V({},j),{},{activeLabel:W,activeCoordinate:re,activePayload:Z,activeTooltipIndex:R}))}else y.setState(j)}),ue(y,"renderCursor",function(j){var S,A=y.state,_=A.isTooltipActive,I=A.activeCoordinate,k=A.activePayload,E=A.offset,T=A.activeTooltipIndex,M=A.tooltipAxisBandSize,R=y.getTooltipEventType(),$=(S=j.props.active)!==null&&S!==void 0?S:_,L=y.props.layout,q=j.key||"_recharts-cursor";return O.default.createElement(KW,{key:q,activeCoordinate:I,activePayload:k,activeTooltipIndex:T,chartName:r,element:j,isActive:$,layout:L,offset:E,tooltipAxisBandSize:M,tooltipEventType:R})}),ue(y,"renderPolarAxis",function(j,S,A){var _=St(j,"type.axisType"),I=St(y.state,"".concat(_,"Map")),k=j.type.defaultProps,E=k!==void 0?V(V({},k),j.props):j.props,T=I&&I[E["".concat(_,"Id")]];return P.cloneElement(j,V(V({},T),{},{className:ae.default(_,T.className),key:j.key||"".concat(S,"-").concat(A),ticks:dr(T,!0)}))}),ue(y,"renderPolarGrid",function(j){var S=j.props,A=S.radialLines,_=S.polarAngles,I=S.polarRadius,k=y.state,E=k.radiusAxisMap,T=k.angleAxisMap,M=Tr(E),R=Tr(T),$=R.cx,L=R.cy,q=R.innerRadius,U=R.outerRadius;return P.cloneElement(j,{polarAngles:Array.isArray(_)?_:dr(R,!0).map(function(z){return z.coordinate}),polarRadius:Array.isArray(I)?I:dr(M,!0).map(function(z){return z.coordinate}),cx:$,cy:L,innerRadius:q,outerRadius:U,key:j.key||"polar-grid",radialLines:A})}),ue(y,"renderLegend",function(){var j=y.state.formattedGraphicalItems,S=y.props,A=S.children,_=S.width,I=S.height,k=y.props.margin||{},E=_-(k.left||0)-(k.right||0),T=QS({children:A,formattedGraphicalItems:j,legendWidth:E,legendContent:u});if(!T)return null;var M=T.item,R=jj(T,GW);return P.cloneElement(M,V(V({},R),{},{chartWidth:_,chartHeight:I,margin:k,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),ue(y,"renderTooltip",function(){var j,S=y.props,A=S.children,_=S.accessibilityLayer,I=wt(A,We);if(!I)return null;var k=y.state,E=k.isTooltipActive,T=k.activeCoordinate,M=k.activePayload,R=k.activeLabel,$=k.offset,L=(j=I.props.active)!==null&&j!==void 0?j:E;return P.cloneElement(I,{viewBox:V(V({},$),{},{x:$.left,y:$.top}),active:L,label:R,payload:L?M:[],coordinate:T,accessibilityLayer:_})}),ue(y,"renderBrush",function(j){var S=y.props,A=S.margin,_=S.data,I=y.state,k=I.offset,E=I.dataStartIndex,T=I.dataEndIndex,M=I.updateId;return P.cloneElement(j,{key:j.key||"_recharts-brush",onChange:yo(y.handleBrushChange,j.props.onChange),data:_,x:Y(j.props.x)?j.props.x:k.left,y:Y(j.props.y)?j.props.y:k.top+k.height+k.brushBottom-(A.bottom||0),width:Y(j.props.width)?j.props.width:k.width,startIndex:E,endIndex:T,updateId:"brush-".concat(M)})}),ue(y,"renderReferenceElement",function(j,S,A){if(!j)return null;var _=y,I=_.clipPathId,k=y.state,E=k.xAxisMap,T=k.yAxisMap,M=k.offset,R=j.type.defaultProps||{},$=j.props,L=$.xAxisId,q=L===void 0?R.xAxisId:L,U=$.yAxisId,z=U===void 0?R.yAxisId:U;return P.cloneElement(j,{key:j.key||"".concat(S,"-").concat(A),xAxis:E[q],yAxis:T[z],viewBox:{x:M.left,y:M.top,width:M.width,height:M.height},clipPathId:I})}),ue(y,"renderActivePoints",function(j){var S=j.item,A=j.activePoint,_=j.basePoint,I=j.childIndex,k=j.isRange,E=[],T=S.props.key,M=S.item.type.defaultProps!==void 0?V(V({},S.item.type.defaultProps),S.item.props):S.item.props,R=M.activeDot,$=M.dataKey,L=V(V({index:I,dataKey:$,cx:A.x,cy:A.y,r:4,fill:wx(S.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},oe(R,!1)),Do(R));return E.push(v.renderActiveDot(R,L,"".concat(T,"-activePoint-").concat(I))),_?E.push(v.renderActiveDot(R,V(V({},L),{},{cx:_.x,cy:_.y}),"".concat(T,"-basePoint-").concat(I))):k&&E.push(null),E}),ue(y,"renderGraphicChild",function(j,S,A){var _=y.filterFormatItem(j,S,A);if(!_)return null;var I=y.getTooltipEventType(),k=y.state,E=k.isTooltipActive,T=k.tooltipAxis,M=k.activeTooltipIndex,R=k.activeLabel,$=y.props.children,L=wt($,We),q=_.props,U=q.points,z=q.isRange,F=q.baseLine,H=_.item.type.defaultProps!==void 0?V(V({},_.item.type.defaultProps),_.item.props):_.item.props,W=H.activeDot,Z=H.hide,re=H.activeBar,X=H.activeShape,ne=!!(!Z&&E&&L&&(W||re||X)),ce={};I!=="axis"&&L&&L.props.trigger==="click"?ce={onClick:yo(y.handleItemMouseEnter,j.props.onClick)}:I!=="axis"&&(ce={onMouseLeave:yo(y.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:yo(y.handleItemMouseEnter,j.props.onMouseEnter)});var G=P.cloneElement(j,V(V({},_.props),ce));function ee(ir){return typeof T.dataKey=="function"?T.dataKey(ir.payload):null}if(ne)if(M>=0){var J,D;if(T.dataKey&&!T.allowDuplicatedCategory){var he=typeof T.dataKey=="function"?ee:"payload.".concat(T.dataKey.toString());J=Lo(U,he,R),D=z&&F&&Lo(F,he,R)}else J=U?.[M],D=z&&F&&F[M];if(X||re){var Q=j.props.activeIndex!==void 0?j.props.activeIndex:M;return[P.cloneElement(j,V(V(V({},_.props),ce),{},{activeIndex:Q})),null,null]}if(!de(J))return[G].concat(ja(y.renderActivePoints({item:_,activePoint:J,basePoint:D,childIndex:M,isRange:z})))}else{var me,$e=(me=y.getItemByXY(y.state.activeCoordinate))!==null&&me!==void 0?me:{graphicalItem:G},tt=$e.graphicalItem,Pr=tt.item,Nn=Pr===void 0?j:Pr,oo=tt.childIndex,Hr=V(V(V({},_.props),ce),{},{activeIndex:oo});return[P.cloneElement(Nn,Hr),null,null]}return z?[G,null,null]:[G,null]}),ue(y,"renderCustomized",function(j,S,A){return P.cloneElement(j,V(V({key:"recharts-customized-".concat(A)},y.props),y.state))}),ue(y,"renderMap",{CartesianGrid:{handler:No,once:!0},ReferenceArea:{handler:y.renderReferenceElement},ReferenceLine:{handler:No},ReferenceDot:{handler:y.renderReferenceElement},XAxis:{handler:No},YAxis:{handler:No},Brush:{handler:y.renderBrush,once:!0},Bar:{handler:y.renderGraphicChild},Line:{handler:y.renderGraphicChild},Area:{handler:y.renderGraphicChild},Radar:{handler:y.renderGraphicChild},RadialBar:{handler:y.renderGraphicChild},Scatter:{handler:y.renderGraphicChild},Pie:{handler:y.renderGraphicChild},Funnel:{handler:y.renderGraphicChild},Tooltip:{handler:y.renderCursor,once:!0},PolarGrid:{handler:y.renderPolarGrid,once:!0},PolarAngleAxis:{handler:y.renderPolarAxis},PolarRadiusAxis:{handler:y.renderPolarAxis},Customized:{handler:y.renderCustomized}}),y.clipPathId="".concat((w=b.id)!==null&&w!==void 0?w:yn("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=QC(y.triggeredAfterMouseMove,(C=b.throttleDelay)!==null&&C!==void 0?C:1e3/60),y.state={},y}return oH(v,m),rH(v,[{key:"componentDidMount",value:function(){var w,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,C=w.children,y=w.data,j=w.height,S=w.layout,A=wt(C,We);if(A){var _=A.props.defaultIndex;if(!(typeof _!="number"||_<0||_>this.state.tooltipTicks.length-1)){var I=this.state.tooltipTicks[_]&&this.state.tooltipTicks[_].value,k=Vp(this.state,y,_,I),E=this.state.tooltipTicks[_].coordinate,T=(this.state.offset.top+j)/2,M=S==="horizontal",R=M?{x:E,y:T}:{y:E,x:T},$=this.state.formattedGraphicalItems.find(function(q){var U=q.item;return U.type.name==="Scatter"});$&&(R=V(V({},R),$.props.points[_].tooltipPosition),k=$.props.points[_].tooltipPayload);var L={activeTooltipIndex:_,isTooltipActive:!0,activeLabel:I,activePayload:k,activeCoordinate:R};this.setState(L),this.renderCursor(A),this.accessibilityManager.setIndex(_)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var y,j;this.accessibilityManager.setDetails({offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(w){jh([wt(w.children,We)],[wt(this.props.children,We)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=wt(this.props.children,We);if(w&&typeof w.props.shared=="boolean"){var C=w.props.shared?"axis":"item";return l.indexOf(C)>=0?C:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var C=this.container,y=C.getBoundingClientRect(),j=TT(y),S={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},A=y.width/C.offsetWidth||1,_=this.inRange(S.chartX,S.chartY,A);if(!_)return null;var I=this.state,k=I.xAxisMap,E=I.yAxisMap,T=this.getTooltipEventType(),M=Sj(this.state,this.props.data,this.props.layout,_);if(T!=="axis"&&k&&E){var R=Tr(k).scale,$=Tr(E).scale,L=R&&R.invert?R.invert(S.chartX):null,q=$&&$.invert?$.invert(S.chartY):null;return V(V({},S),{},{xValue:L,yValue:q},M)}return M?V(V({},S),M):null}},{key:"inRange",value:function(w,C){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,S=w/y,A=C/y;if(j==="horizontal"||j==="vertical"){var _=this.state.offset,I=S>=_.left&&S<=_.left+_.width&&A>=_.top&&A<=_.top+_.height;return I?{x:S,y:A}:null}var k=this.state,E=k.angleAxisMap,T=k.radiusAxisMap;if(E&&T){var M=Tr(E);return c1({x:S,y:A},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,C=this.getTooltipEventType(),y=wt(w,We),j={};y&&C==="axis"&&(y.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Do(this.props,this.handleOuterEvent);return V(V({},S),j)}},{key:"addListener",value:function(){ch.on(uh,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){ch.removeListener(uh,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,C,y){for(var j=this.state.formattedGraphicalItems,S=0,A=j.length;S<A;S++){var _=j[S];if(_.item===w||_.props.key===w.key||C===fr(_.item.type)&&y===_.childIndex)return _}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,C=this.state.offset,y=C.left,j=C.top,S=C.height,A=C.width;return O.default.createElement("defs",null,O.default.createElement("clipPath",{id:w},O.default.createElement("rect",{x:y,y:j,height:S,width:A})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(C,y){var j=wj(y,2),S=j[0],A=j[1];return V(V({},C),{},ue({},S,A.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(C,y){var j=wj(y,2),S=j[0],A=j[1];return V(V({},C),{},ue({},S,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[w])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(w){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[w])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(w){var C=this.state,y=C.formattedGraphicalItems,j=C.activeItem;if(y&&y.length)for(var S=0,A=y.length;S<A;S++){var _=y[S],I=_.props,k=_.item,E=k.type.defaultProps!==void 0?V(V({},k.type.defaultProps),k.props):k.props,T=fr(k.type);if(T==="Bar"){var M=(I.data||[]).find(function(q){return tD(w,q)});if(M)return{graphicalItem:_,payload:M}}else if(T==="RadialBar"){var R=(I.data||[]).find(function(q){return c1(w,q)});if(R)return{graphicalItem:_,payload:R}}else if(Fl(_,j)||ql(_,j)||Bi(_,j)){var $=Mz({graphicalItem:_,activeTooltipItem:j,itemData:E.data}),L=E.activeIndex===void 0?$:E.activeIndex;return{graphicalItem:V(V({},_),{},{childIndex:L}),payload:Bi(_,j)?E.data[$]:_.props.data[$]}}}return null}},{key:"render",value:function(){var w=this;if(!jv(this))return null;var C=this.props,y=C.children,j=C.className,S=C.width,A=C.height,_=C.style,I=C.compact,k=C.title,E=C.desc,T=jj(C,ZW),M=oe(T,!1);if(I)return O.default.createElement(ej,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.default.createElement(Sh,Dn({},M,{width:S,height:A,title:k,desc:E}),this.renderClipPath(),Sv(y,this.renderMap)));if(this.props.accessibilityLayer){var R,$;M.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,M.role=($=this.props.role)!==null&&$!==void 0?$:"application",M.onKeyDown=function(q){w.accessibilityManager.keyboardEvent(q)},M.onFocus=function(){w.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return O.default.createElement(ej,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.default.createElement("div",Dn({className:ae.default("recharts-wrapper",j),style:V({position:"relative",cursor:"default",width:S,height:A},_)},L,{ref:function(U){w.container=U}}),O.default.createElement(Sh,Dn({},M,{width:S,height:A,title:k,desc:E,style:fH}),this.renderClipPath(),Sv(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(P.Component);ue(g,"displayName",r),ue(g,"defaultProps",V({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),ue(g,"getDerivedStateFromProps",function(m,v){var b=m.dataKey,w=m.data,C=m.children,y=m.width,j=m.height,S=m.layout,A=m.stackOffset,_=m.margin,I=v.dataStartIndex,k=v.dataEndIndex;if(v.updateId===void 0){var E=Oj(m);return V(V(V({},E),{},{updateId:0},p(V(V({props:m},E),{},{updateId:0}),v)),{},{prevDataKey:b,prevData:w,prevWidth:y,prevHeight:j,prevLayout:S,prevStackOffset:A,prevMargin:_,prevChildren:C})}if(b!==v.prevDataKey||w!==v.prevData||y!==v.prevWidth||j!==v.prevHeight||S!==v.prevLayout||A!==v.prevStackOffset||!zn(_,v.prevMargin)){var T=Oj(m),M={chartX:v.chartX,chartY:v.chartY,isTooltipActive:v.isTooltipActive},R=V(V({},Sj(v,w,S)),{},{updateId:v.updateId+1}),$=V(V(V({},T),M),R);return V(V(V({},$),p(V({props:m},$),v)),{},{prevDataKey:b,prevData:w,prevWidth:y,prevHeight:j,prevLayout:S,prevStackOffset:A,prevMargin:_,prevChildren:C})}if(!jh(C,v.prevChildren)){var L,q,U,z,F=wt(C,ua),H=F&&(L=(q=F.props)===null||q===void 0?void 0:q.startIndex)!==null&&L!==void 0?L:I,W=F&&(U=(z=F.props)===null||z===void 0?void 0:z.endIndex)!==null&&U!==void 0?U:k,Z=H!==I||W!==k,re=!de(w),X=re&&!Z?v.updateId:v.updateId+1;return V(V({updateId:X},p(V(V({props:m},v),{},{updateId:X,dataStartIndex:H,dataEndIndex:W}),v)),{},{prevChildren:C,dataStartIndex:H,dataEndIndex:W})}return null}),ue(g,"renderActiveDot",function(m,v,b){var w;return P.isValidElement(m)?w=P.cloneElement(m,v):le(m)?w=m(v):w=O.default.createElement(Ea,v),O.default.createElement(fe,{className:"recharts-active-dot",key:b},w)});var x=P.forwardRef(function(v,b){return O.default.createElement(g,Dn({},v,{ref:b}))});return x.displayName=g.displayName,x},jH=Ra({chartName:"LineChart",GraphicalChild:io,axisComponents:[{axisType:"xAxis",AxisComp:pr},{axisType:"yAxis",AxisComp:Lr}],formatAxisMap:Ax}),EO=Ra({chartName:"BarChart",GraphicalChild:jr,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:pr},{axisType:"yAxis",AxisComp:Lr}],formatAxisMap:Ax}),Dx=Ra({chartName:"PieChart",GraphicalChild:Vt,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Sn},{axisType:"radiusAxis",AxisComp:Ia}],formatAxisMap:Cx,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),CH=Ra({chartName:"RadarChart",GraphicalChild:ao,axisComponents:[{axisType:"angleAxis",AxisComp:Sn},{axisType:"radiusAxis",AxisComp:Ia}],formatAxisMap:Cx,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),SH=Ra({chartName:"AreaChart",GraphicalChild:Wr,axisComponents:[{axisType:"xAxis",AxisComp:pr},{axisType:"yAxis",AxisComp:Lr}],formatAxisMap:Ax}),IO=Ra({chartName:"RadialBarChart",GraphicalChild:Ma,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:Sn},{axisType:"radiusAxis",AxisComp:Ia}],formatAxisMap:Cx,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const Nr=P.createContext(null);function zx(){const e=P.useContext(Nr);if(!e)throw new Error("useChart must be used within a ChartContainer");return e}const Bx=({config:e,children:t,className:r,height:n=300})=>{const a=Object.fromEntries(Object.entries(e).filter(([,i])=>i.color).map(([i,s])=>[`--color-${i}`,s.color]));return o.jsx(Nr.Provider,{value:{config:e},children:o.jsx("div",{className:te.twMerge(N.clsx("bg-white rounded-[12px] w-full",r)),style:a,children:o.jsx(ST,{width:"100%",height:n,children:t})})})},qt=({active:e,payload:t,label:r,labelKey:n,nameKey:a,indicator:i="dot",hideLabel:s=!1,hideIndicator:l=!1,className:c})=>{const{config:u}=zx();if(!e||!t?.length)return null;const d=String(n?t[0]?.payload?.[n]??r??"":r??"");return o.jsxs("div",{className:te.twMerge(N.clsx("bg-surface-bg border border-surface-3 rounded-[8px] shadow-e2 px-3 py-2 text-xs min-w-[8rem]",c)),children:[!s&&d&&o.jsx("p",{className:"text-high-em font-medium mb-1.5",children:d}),o.jsx("div",{className:"flex flex-col gap-1",children:t.map((f,h)=>{const p=String(a?f.payload?.[a]??f.dataKey:f.dataKey??f.name??""),x=(u[p]??{}).label??f.name??f.dataKey;return o.jsxs("div",{className:"flex items-center gap-2",children:[!l&&o.jsx("span",{className:N.clsx("shrink-0",{"h-2 w-2 rounded-[2px]":i==="dot","w-[3px] h-3.5 rounded-full":i==="line","w-[3px] h-3.5 rounded-full opacity-60":i==="dashed"}),style:{backgroundColor:`var(--color-${p})`}}),o.jsx("span",{className:"text-low-em",children:String(x??"")}),o.jsx("span",{className:"text-med-em font-medium ml-auto pl-4",children:String(f.value??"")})]},h)})})]})},Vs=({payload:e,nameKey:t,className:r})=>{const{config:n}=zx();return e?.length?o.jsx("div",{className:te.twMerge(N.clsx("flex flex-wrap items-center justify-center gap-x-6 gap-y-1 pt-3 text-xs text-low-em",r)),children:e.map((a,i)=>{const s=String(t??a.dataKey??a.value??""),c=(n[s]??n[String(a.value)]??{}).label??a.value;return o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"h-3 w-3 shrink-0 rounded-full",style:{backgroundColor:`var(--color-${s})`}}),o.jsx("span",{children:String(c??"")})]},i)})}):null},ot=({children:e,className:t})=>o.jsx("div",{className:te.twMerge(N.clsx("bg-white border border-surface-3 rounded-[12px] p-8 w-full",t)),children:e}),La=({title:e,titleIcon:t,value:r,className:n})=>o.jsxs("div",{className:N.clsx("flex flex-col",n),children:[o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&o.jsx(ie,{size:"md",color:"currentColor",children:t})]}),o.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:r})]}),OH=({className:e,...t})=>o.jsx(ot,{className:e,children:o.jsx(La,{...t})}),NH=({buttonLabel:e="New invoice",onButtonClick:t,className:r,titleIcon:n=o.jsx(B.Link,{}),...a})=>o.jsx(ot,{className:r,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(La,{...a,titleIcon:n}),o.jsx(K,{variant:"secondary",hierarchy:"primary",size:"sm",icons:"leading",leadingIcon:o.jsx(B.Add,{}),onClick:t,children:e})]})}),PH={xs:"py-1 px-5",sm:"py-2 px-5",md:"py-3 px-6",lg:"py-4 px-6"},Fx=({items:e,size:t="xs",className:r})=>o.jsx("div",{className:N.clsx("flex flex-col rounded-lg border border-surface-3 divide-y divide-surface-3 overflow-hidden",r),children:e.map((n,a)=>o.jsx(Qt,{as:"div",size:t,title:n.name,trailingText:String(n.value),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!0,className:PH[t]},a))}),AH=[{name:"Billable",value:"17.00"},{name:"Non-billable",value:"0.00",disabled:!0}],_H=({title:e="Internal costs",amount:t=0,icon:r,items:n=AH,className:a})=>o.jsxs("div",{className:N.clsx("flex flex-col gap-4",a),children:[o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[o.jsx("span",{className:"text-sm font-medium text-med-em",children:e}),o.jsxs("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:["$",t]})]}),o.jsx(ie,{size:"md",color:"currentColor",children:r??o.jsx(B.Timer,{})})]}),o.jsx(Fx,{items:n,size:"xs"})]}),kH=({items:e,size:t="md",buttonLabel:r="New invoice",onButtonClick:n,className:a})=>o.jsxs("div",{className:N.clsx("flex flex-col gap-6",a),children:[o.jsx(Fx,{items:e,size:t}),o.jsx(K,{variant:"secondary",hierarchy:"primary",size:"md",icons:"leading",leadingIcon:o.jsx(B.Add,{}),onClick:n,children:r})]}),TH=({progressTitle:e,progress:t,progressVariant:r="none",className:n,...a})=>o.jsx(ot,{className:n,children:o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(La,{...a}),o.jsxs("div",{className:"flex flex-col gap-0",children:[e&&o.jsx("span",{className:"text-base font-medium text-med-em",children:e}),o.jsx(Js,{progress:t,variant:r})]})]})}),EH=({title:e,amount:t,progress:r,circleSize:n="sm",circleShape:a="circle",circleLabel:i,className:s})=>o.jsx(ot,{className:s,children:o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),o.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),o.jsx(qn,{progress:r,size:n,shape:a,label:i})]})}),IH=({title:e,amount:t,progress:r,circleSize:n="sm",circleLabel:a,className:i})=>o.jsx(ot,{className:i,children:o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),o.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),o.jsx(qn,{progress:r,size:n,shape:"half-circle",label:a})]})}),MH=({progress:e,circleSize:t="sm",circleShape:r="circle",circleLabel:n,title1:a,amount1:i,title2:s,amount2:l,className:c})=>o.jsx(ot,{className:c,children:o.jsxs("div",{className:"flex flex-col gap-10",children:[o.jsx("div",{className:"flex justify-center",children:o.jsx(qn,{progress:e,size:t,shape:r,label:n})}),o.jsx(pe,{}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm font-medium text-med-em",children:a}),o.jsx("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:i}),o.jsx(pe,{direction:"vertical",height:"40px"}),o.jsx("span",{className:"text-sm font-medium text-med-em",children:s}),o.jsx("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:l})]})]})}),$H=({min:e=0,max:t=100,defaultValue:r=0,defaultValueEnd:n,step:a=1,variant:i="default",labels:s=[],onChange:l,className:c,disabled:u=!1})=>{const d=n!==void 0,[f,h]=P.useState(r),[p,g]=P.useState(n??t),[x,m]=P.useState(!1),[v,b]=P.useState(!1),w=P.useRef(null),C=(f-e)/(t-e)*100,y=d?(p-e)/(t-e)*100:100,j=P.useCallback(T=>{if(!w.current)return e;const M=w.current.getBoundingClientRect(),R=Math.max(0,Math.min(100,(T-M.left)/M.width*100)),$=e+R/100*(t-e),L=Math.round($/a)*a;return Math.max(e,Math.min(t,L))},[e,t,a]),S=P.useCallback(()=>{u||m(!0)},[u]),A=P.useCallback(()=>{u||b(!0)},[u]),_=P.useCallback(T=>{if(u)return;const M=j(T.clientX);if(x){const $=Math.min(M,d?p:t);h($),l&&l(d?[$,p]:$)}else if(v&&d){const $=Math.max(M,f);g($),l&&l([f,$])}},[u,j,x,v,d,f,p,t,l]),I=P.useCallback(()=>{m(!1),b(!1)},[]);P.useEffect(()=>{if(x||v)return document.addEventListener("mousemove",_),document.addEventListener("mouseup",I),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",I)}},[x,v,_,I]);const k=P.useCallback(T=>{if(u||T.target!==T.currentTarget)return;const M=j(T.clientX);if(!d)h(M),l&&l(M);else{const R=Math.abs(M-f),$=Math.abs(M-p);if(R<$){const L=Math.min(M,p);h(L),l&&l([L,p])}else{const L=Math.max(M,f);g(L),l&&l([f,L])}}},[u,j,d,f,p,l]),E=(T,M)=>{if(i==="percentage")return o.jsxs("div",{className:"absolute text-sm font-medium",style:{left:`${M}%`,transform:"translateX(-50%)",bottom:"100%",marginBottom:"12px",color:"var(--slider-text-color, #000000)"},children:[T,"%"]});if(i==="labelTop"&&s.length>0){const R=Math.round(T/t*(s.length-1)),$=s[R]||"";return o.jsx("div",{className:"absolute opacity-100 visible transition-opacity duration-200 pointer-events-none",style:{left:`${M}%`,transform:"translateX(-50%)",bottom:"100%",marginBottom:"24px"},children:o.jsx(ph,{arrowDirection:"down",children:$})})}if(i==="labelBottom"&&s.length>0){const R=Math.round(T/t*(s.length-1)),$=s[R]||"";return o.jsx("div",{className:"absolute opacity-100 visible transition-opacity duration-200 pointer-events-none",style:{left:`${M}%`,transform:"translateX(-50%)",top:"100%",marginTop:"24px"},children:o.jsx(ph,{arrowDirection:"up",children:$})})}return null};return o.jsx("div",{className:N.clsx("relative select-none py-10 w-60",u&&"opacity-50 cursor-not-allowed",c),children:o.jsxs("div",{className:"relative",style:{height:"8px"},children:[o.jsx("div",{ref:w,className:"absolute w-full rounded-full cursor-pointer",style:{height:"8px",backgroundColor:"var(--slider-track-bg, #D8DDE5)"},onClick:k}),o.jsx("div",{className:"absolute rounded-full pointer-events-none",style:{height:"8px",backgroundColor:"var(--slider-track-active, #000000)",left:`${C}%`,right:`${100-y}%`}}),o.jsx("div",{className:N.clsx("absolute cursor-grab active:cursor-grabbing",u&&"cursor-not-allowed"),style:{left:`${C}%`,top:"50%",transform:"translate(-50%, -50%)",zIndex:x?30:20},onMouseDown:S,children:o.jsx(hh,{})}),d&&o.jsx("div",{className:N.clsx("absolute cursor-grab active:cursor-grabbing",u&&"cursor-not-allowed"),style:{left:`${y}%`,top:"50%",transform:"translate(-50%, -50%)",zIndex:v?30:20},onMouseDown:A,children:o.jsx(hh,{})}),i!=="default"&&E(f,C),d&&i!=="default"&&E(p,y)]})})},RH=({min:e=0,max:t=100,sliderValue:r=0,sliderValueEnd:n,step:a=1,labels:i,onSliderChange:s,className:l,...c})=>o.jsx(ot,{className:l,children:o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(La,{...c}),o.jsx($H,{min:e,max:t,defaultValue:r,defaultValueEnd:n,step:a,variant:"labelBottom",labels:i,onChange:s})]})}),LH=({items:e,size:t="md",className:r})=>o.jsx("div",{className:N.clsx("flex flex-col rounded-lg border border-surface-3 divide-y divide-surface-3 overflow-hidden",r),children:e.map((n,a)=>o.jsx(Qt,{as:"div",size:t,title:n.title,description:n.description,leadingIcon:n.leadingIcon??o.jsx(B.I3Dcube,{}),trailingIcon:n.trailingIcon??o.jsx(B.Record,{}),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!0,showDescription:!0,showTrailingIcon:!0,showTag:!1,showTrailingText:!1,disabled:n.disabled},a))}),Up=["var(--brand-secondary-main)","var(--success-main)","var(--warning-main)","var(--danger-main)","var(--info-main)"];function qx(e,t){return e??Up[t%Up.length]}function On(e){return Object.fromEntries(e.map((t,r)=>[t.name,{label:t.label??t.name,color:qx(t.color,r)}]))}function Da(e){return Object.fromEntries(e.map((t,r)=>[`--color-${t.name}`,qx(t.color,r)]))}const DH=({title:e,amount:t,data:r,donutSize:n=120,className:a})=>{const i=On(r),s=Da(r),l=n/2,c=l-2,u=l*.55;return o.jsx(ot,{className:a,children:o.jsxs("div",{className:"flex items-center justify-between gap-6",children:[o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),o.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),o.jsx(Nr.Provider,{value:{config:i},children:o.jsx("div",{className:"shrink-0",style:{...s,width:n,height:n},children:o.jsxs(Dx,{width:n,height:n,children:[o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})}),o.jsx(Vt,{data:r,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:u,outerRadius:c,stroke:"none",children:r.map(d=>o.jsx(bn,{fill:`var(--color-${d.name})`},d.name))})]})})})]})})},zH=({title:e,titleIcon:t,data:r,donutSize:n=160,className:a})=>{const i=On(r),s=Da(r),l=n/2,c=l-2,u=l*.5;return o.jsx(ot,{className:a,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&o.jsx(ie,{size:"md",color:"currentColor",children:t})]}),o.jsx(pe,{}),o.jsx(Nr.Provider,{value:{config:i},children:o.jsxs("div",{className:"flex items-center gap-4",style:s,children:[o.jsx("div",{className:"flex flex-col flex-1 min-w-0 divide-y divide-surface-3 pr-8",children:r.map(d=>o.jsxs("div",{className:"flex items-center gap-2 py-3",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${d.name})`})}),o.jsx("span",{className:"text-xs text-low-em truncate",children:d.label??d.name})]},d.name))}),o.jsx("div",{className:"shrink-0 pl-5",style:{width:n+20,height:n},children:o.jsxs(Dx,{width:n,height:n,children:[o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})}),o.jsx(Vt,{data:r,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:u,outerRadius:c,stroke:"none",children:r.map(d=>o.jsx(bn,{fill:`var(--color-${d.name})`},d.name))})]})})]})})]})})},BH=({data:e,donutSize:t=160,className:r})=>{const n=On(e),a=Da(e),i=t/2,s=i-2,l=i*.5;return o.jsx(ot,{className:r,children:o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(Nr.Provider,{value:{config:n},children:o.jsx("div",{className:"flex justify-center",style:a,children:o.jsxs(Dx,{width:t,height:t,children:[o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})}),o.jsx(Vt,{data:e,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:l,outerRadius:s,stroke:"none",children:e.map(c=>o.jsx(bn,{fill:`var(--color-${c.name})`},c.name))})]})})}),o.jsx(pe,{}),o.jsx("div",{className:"flex items-center",style:a,children:e.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(pe,{direction:"vertical",height:"32px"}),o.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.name})`})}),o.jsx("span",{className:"text-xs text-low-em",children:c.label??c.name})]})]},c.name))})]})})},FH=({title:e,titleIcon:t,data:r,centerTitle:n,centerSubtitle:a,chartSize:i=160,className:s})=>{const l=On(r),c=Da(r),u=r.map(d=>({...d,fill:`var(--color-${d.name})`}));return o.jsx(ot,{className:s,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&o.jsx(ie,{size:"md",color:"currentColor",children:t})]}),o.jsx(pe,{}),o.jsx(Nr.Provider,{value:{config:l},children:o.jsxs("div",{className:"flex items-center gap-4",style:c,children:[o.jsx("div",{className:"flex flex-col flex-1 min-w-0 divide-y divide-surface-3 pr-8",children:r.map(d=>o.jsxs("div",{className:"flex items-center gap-2 py-3",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${d.name})`})}),o.jsx("span",{className:"text-xs text-low-em truncate",children:d.label??d.name})]},d.name))}),o.jsx("div",{className:"shrink-0 pl-5",style:{width:i+20,height:i},children:o.jsxs(IO,{width:i,height:i,data:u,innerRadius:i*.3,outerRadius:i*.52,barSize:6,barGap:4,startAngle:90,endAngle:-270,children:[(a||n)&&o.jsx(Sx,{component:({width:d,height:f})=>{const h=d/2,p=f/2;return o.jsxs("text",{textAnchor:"middle",children:[a&&o.jsx("tspan",{x:h,y:p-8,fill:"var(--low-em)",fontSize:"12",children:a}),n&&o.jsx("tspan",{x:h,y:p+16,fill:"var(--high-em)",fontSize:"24",fontWeight:"600",fontFamily:"'Space Grotesk', sans-serif",children:n})]})}}),o.jsx(Ma,{dataKey:"value",background:{fill:"var(--surface-2)"},cornerRadius:4}),o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})})]})})]})})]})})},qH=({data:e,centerTitle:t,centerSubtitle:r,chartSize:n=160,className:a})=>{const i=On(e),s=Da(e),l=e.map(c=>({...c,fill:`var(--color-${c.name})`}));return o.jsx(ot,{className:a,children:o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(Nr.Provider,{value:{config:i},children:o.jsx("div",{className:"flex justify-center",style:s,children:o.jsxs(IO,{width:n,height:n,data:l,innerRadius:n*.3,outerRadius:n*.52,barSize:6,barGap:4,startAngle:90,endAngle:-270,children:[(r||t)&&o.jsx(Sx,{component:({width:c,height:u})=>{const d=c/2,f=u/2;return o.jsxs("text",{textAnchor:"middle",children:[r&&o.jsx("tspan",{x:d,y:f-8,fill:"var(--low-em)",fontSize:"12",children:r}),t&&o.jsx("tspan",{x:d,y:f+16,fill:"var(--high-em)",fontSize:"24",fontWeight:"600",fontFamily:"'Space Grotesk', sans-serif",children:t})]})}}),o.jsx(Ma,{dataKey:"value",background:{fill:"var(--surface-2)"},cornerRadius:4}),o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})})]})})}),o.jsx(pe,{}),o.jsx("div",{className:"flex items-center",style:s,children:e.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(pe,{direction:"vertical",height:"32px"}),o.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.name})`})}),o.jsx("span",{className:"text-xs text-low-em",children:c.label??c.name})]})]},c.name))})]})})},WH=({data:e,series:t,chartSize:r=200,fillOpacity:n=.2,className:a})=>{const i=t.map(c=>({name:c.key,label:c.label,color:c.color})),s=On(i),l=Da(i);return o.jsx(ot,{className:a,children:o.jsx("div",{className:"flex flex-col gap-6",children:o.jsxs(Nr.Provider,{value:{config:s},children:[o.jsx("div",{className:"flex justify-center",style:l,children:o.jsxs(CH,{width:r,height:r,data:e,children:[o.jsx(P5,{stroke:"var(--surface-2)"}),o.jsx(Sn,{dataKey:"axis",tick:{fill:"var(--low-em)",fontSize:11}}),o.jsx(We,{content:o.jsx(qt,{indicator:"dot"})}),t.map(c=>o.jsx(ao,{dataKey:c.key,stroke:`var(--color-${c.key})`,fill:`var(--color-${c.key})`,fillOpacity:n,strokeWidth:2},c.key))]})}),o.jsx(pe,{}),o.jsx("div",{className:"flex items-center",style:l,children:t.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(pe,{direction:"vertical",height:"32px"}),o.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.key})`})}),o.jsx("span",{className:"text-xs text-low-em",children:c.label})]})]},c.key))})]})})})},Pj=4,Kp=6,HH=(e,t,r,n,a)=>{if(!r||!n||n<=0)return"";const i=Math.min(a,r/2,n/2);return`M${e+i},${t} L${e+r-i},${t} Q${e+r},${t} ${e+r},${t+i} L${e+r},${t+n} L${e},${t+n} L${e},${t+i} Q${e},${t} ${e+i},${t} Z`},fh=(e,t=Kp)=>r=>{const{x:n,y:a,width:i,height:s,fill:l}=r;return!i||!s||s<=0?null:o.jsx("path",{d:HH(n,a,i,s+e,t),fill:l})},VH=({data:e,series:t,height:r=220,barSize:n=20,stacked:a=!0,showGrid:i=!0,showYAxis:s=!0,className:l})=>{const c=t.map(d=>({name:d.key,label:d.label,color:d.color})),u=On(c);return o.jsx(ot,{className:l,children:o.jsx(Bx,{config:u,height:r,className:"rounded-none bg-transparent",children:o.jsxs(EO,{data:e,accessibilityLayer:!0,children:[i&&o.jsx(oi,{vertical:!1,stroke:"var(--surface-2)"}),o.jsx(pr,{dataKey:"label",tickLine:!1,axisLine:!1,tickMargin:16,tick:{fill:"var(--low-em)",fontSize:12}}),s&&o.jsx(Lr,{tickLine:!1,axisLine:!1,tickMargin:16,tick:{fill:"var(--low-em)",fontSize:12}}),o.jsx(We,{content:o.jsx(qt,{}),cursor:{fill:"var(--surface-2)"}}),o.jsx(Zt,{content:o.jsx(Vs,{}),verticalAlign:"top"}),t.map((d,f)=>{if(a){const h=f===0,g=f===t.length-1?fh(0):h?fh(Pj):fh(Pj,0);return o.jsx(jr,{dataKey:d.key,stackId:"stack",fill:`var(--color-${d.key})`,shape:g,barSize:n},d.key)}return o.jsx(jr,{dataKey:d.key,fill:`var(--color-${d.key})`,barSize:n,radius:[Kp,Kp,0,0]},d.key)})]})})})},UH=({data:e,chartType:t="bar",color:r,seriesLabel:n,chartHeight:a=80,showGrid:i=!0,showXAxis:s=!0,showYAxis:l=!0,className:c,...u})=>{const f=`kpiAreaGradient-${O.default.useId()}`,h=qx(r,0),p={value:{label:n,color:h}},g=u.title!==void 0||u.value!==void 0;return o.jsx(ot,{className:c,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[g&&o.jsx(La,{title:u.title??"",value:u.value??"",titleIcon:u.titleIcon}),o.jsx(Bx,{config:p,height:a,className:"rounded-none bg-transparent",children:t==="bar"?o.jsxs(EO,{data:e,accessibilityLayer:!0,children:[i&&o.jsx(oi,{vertical:!1,stroke:"var(--surface-2)"}),s&&o.jsx(pr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),o.jsx(We,{content:o.jsx(qt,{}),cursor:{fill:"var(--surface-2)"}}),o.jsx(jr,{dataKey:"value",fill:"var(--color-value)",radius:[4,4,0,0],barSize:24})]}):t==="area"?o.jsxs(SH,{data:e,accessibilityLayer:!0,children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:f,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:"var(--color-value)",stopOpacity:.2}),o.jsx("stop",{offset:"95%",stopColor:"var(--color-value)",stopOpacity:0})]})}),i&&o.jsx(oi,{vertical:!1,stroke:"var(--surface-2)"}),s&&o.jsx(pr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),l&&o.jsx(Lr,{tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8,width:40}),o.jsx(We,{content:o.jsx(qt,{})}),o.jsx(Zt,{content:o.jsx(Vs,{}),verticalAlign:"top"}),o.jsx(Wr,{dataKey:"value",stroke:"var(--color-value)",fill:`url(#${f})`,strokeWidth:2,dot:!1})]}):o.jsxs(jH,{data:e,accessibilityLayer:!0,children:[i&&o.jsx(oi,{vertical:!1,stroke:"var(--surface-2)"}),s&&o.jsx(pr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),l&&o.jsx(Lr,{tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8,width:40}),o.jsx(We,{content:o.jsx(qt,{})}),o.jsx(Zt,{content:o.jsx(Vs,{}),verticalAlign:"top"}),o.jsx(io,{dataKey:"value",stroke:"var(--color-value)",strokeWidth:2,dot:!1})]})})]})})},KH={danger:"bg-danger-main",warning:"bg-warning-main",info:"bg-info-main",success:"bg-success-main"},GH={sm:{title:"text-base",subtitle:"text-sm",iconSize:20,iconBox:"size-10"},md:{title:"text-xl",subtitle:"text-base",iconSize:28,iconBox:"size-14"},lg:{title:"text-2xl",subtitle:"text-lg",iconSize:32,iconBox:"size-16"}},MO=P.forwardRef(({alertTitle:e,descriptionHighlight:t,description:r,variant:n="danger",size:a="md",icon:i,iconSize:s,iconBoxSize:l,titleSize:c,subtitleSize:u,actionLabel:d="Abrir detalles",onAction:f,buttonVariant:h="brand",buttonHierarchy:p="primary",buttonSize:g="md",className:x,...m},v)=>{const b=GH[a],w=s??b.iconSize,C=l??b.iconBox,y=c??b.title,j=u??b.subtitle;return o.jsx("div",{ref:v,className:te.twMerge("bg-white w-full flex flex-col overflow-hidden",x),...m,children:o.jsxs("div",{className:"flex flex-col items-center text-center gap-12 p-10",children:[o.jsx("span",{className:N.clsx(C,"rounded-2xl flex items-center justify-center shrink-0",KH[n]),children:i??o.jsx(B.Warning2,{size:w,color:"white",variant:"Bold"})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:N.clsx(y,"font-semibold text-high-em"),children:e}),(t||r)&&o.jsxs("p",{className:N.clsx(j,"text-med-em"),children:[t&&o.jsx("strong",{children:t}),t&&r&&" ",r]})]}),d&&o.jsx(K,{variant:h,hierarchy:p,size:g,className:"w-full",onClick:f,children:d})]})})});MO.displayName="AlertCallout";exports.AICommentaryIcon=Yj;exports.AIMessage=r2;exports.ActivityFeed=i3;exports.AddIcon=l6;exports.AlertCallout=MO;exports.AlertDialog=f2;exports.AlertDialogAction=y2;exports.AlertDialogCancel=b2;exports.AlertDialogContent=p2;exports.AlertDialogDescription=g2;exports.AlertDialogFooter=v2;exports.AlertDialogHeader=m2;exports.AlertDialogTitle=x2;exports.AlertDialogTrigger=h2;exports.AppointmentDetail=Ro;exports.AppointmentRow=$o;exports.ArrowNarrowDownIcon=Xj;exports.AttachmentMessage=P2;exports.AuthActionWidget=RP;exports.AuthEmailVerificationWidget=zP;exports.AuthFormWidget=IP;exports.AuthSocialOptionsWidget=LP;exports.Avatar=Bt;exports.AvatarGroup=tm;exports.BREAKPOINTS=Ki;exports.Badge=Ge;exports.BookOutlined=c6;exports.Box2Icon=n6;exports.BoxIcon=a6;exports.Breadcrumb=O6;exports.BreadcrumbEllipsis=T6;exports.BreadcrumbItem=P6;exports.BreadcrumbLink=A6;exports.BreadcrumbList=N6;exports.BreadcrumbPage=_6;exports.BreadcrumbSeparator=k6;exports.Button=K;exports.ButtonDropdown=E6;exports.ButtonGroup=mr;exports.CHART_PALETTE=Up;exports.CONTAINER=$j;exports.CONTAINER_PADDING=Rj;exports.CSS_VARIABLES=Bj;exports.CalendarIcon=v6;exports.CalendarIcon2=c2;exports.Card=R6;exports.CardAction=xm;exports.ChartContainer=Bx;exports.ChartContext=Nr;exports.ChartLegendContent=Vs;exports.ChartTooltipContent=qt;exports.ChatCollapsibleCheck=w2;exports.ChatCollapsibleContainer=Qs;exports.ChatCollapsibleDialog=j2;exports.ChatCommandList=V6;exports.ChatCommandListItem=mh;exports.ChatHeader=C2;exports.ChatHistorial=O2;exports.ChatHistorialItem=S2;exports.ChatIcon=Zj;exports.ChatInputText=N2;exports.ChatLayout=vN;exports.ChatMessage=li;exports.ChatMessageOptions=xh;exports.ChatPanel=A2;exports.ChatTypingIndicator=rm;exports.Checkbox=Dr;exports.ChevronDownIcon=Jp;exports.ChevronUpIcon=em;exports.Chip=jN;exports.CircleIcon=o6;exports.ColorPalette=ON;exports.ColumnHandler=NN;exports.ColumnHeader=nm;exports.ComboBox=TN;exports.ConditionalBuilder=$A;exports.ContainerWithCompounds=Us;exports.ContextualMenu=EN;exports.CopyIcon=Zs;exports.DataArrowsOutlined=h6;exports.DatePickerInput=q3;exports.DateRangePicker=mm;exports.DeleteConfirmationModal=U2;exports.Divider=pe;exports.DragAndDropListItem=am;exports.DraggableListRow=D3;exports.Drawer=h4;exports.DropLayoutPicker=gm;exports.DropLayoutPickerContent=ym;exports.DropLayoutPickerTrigger=vm;exports.DropMenu=Wt;exports.DropModal=Wn;exports.DropModalBody=Un;exports.DropModalClose=E3;exports.DropModalContent=Hn;exports.DropModalFooter=Cm;exports.DropModalFooterActions=Kn;exports.DropModalHeader=Vn;exports.DropModalTitle=jm;exports.DropModalTrigger=wm;exports.DropPlaceholder=ci;exports.DropSizePicker=Sm;exports.DropSizePickerContent=Nm;exports.DropSizePickerTrigger=Om;exports.DropZone=_2;exports.Dropdown=Te;exports.DropdownMenu=$N;exports.Edit2Icon=u2;exports.EmptyState=ht;exports.ErrorBoundary=LN;exports.ErrorState=k2;exports.ExpressionCard=U3;exports.ExpressionPanel=RA;exports.ExpressionPanelDivider=K3;exports.EyeIcon=n2;exports.EyeOffIcon=a2;exports.FilterConditionRow=W3;exports.FilterFunnel02Icon=Qj;exports.FlashIcon=l2;exports.FloatingBar=DN;exports.Footer=nl;exports.FormFieldGroup=Yi;exports.GridDraggableItem=T2;exports.Header=rl;exports.HeaderTabs=x3;exports.Icon=ie;exports.ImageUploader=VN;exports.InfoIcon=Yp;exports.InfoLabel=KN;exports.InputField=ge;exports.InputSearch=sm;exports.InvoiceCard=HP;exports.KPIAutomationTrigger=kH;exports.KPIBarChart=VH;exports.KPICard=ot;exports.KPIChart=UH;exports.KPIDetailedMetric=_H;exports.KPIDonutChart=DH;exports.KPIPieChart=zH;exports.KPIPieMetrics=BH;exports.KPIProgressBar=TH;exports.KPIProgressCircle=EH;exports.KPIProgressHalfCircle=IH;exports.KPIProgressMetrics=MH;exports.KPIQuickActionList=LH;exports.KPIRadarMetrics=WH;exports.KPIRadialChart=FH;exports.KPIRadialMetrics=qH;exports.KPISingleValue=OH;exports.KPISingleValueAction=NH;exports.KPISingleValueContent=La;exports.KPISlider=RH;exports.KPIValueBreakdown=Fx;exports.Kanban=X3;exports.KanbanCard=xl;exports.KanbanColumn=Am;exports.Kbd=Ya;exports.LAYOUT=WO;exports.LAYOUT_SPACING=zj;exports.LabelIcon=ft;exports.LabelWithIcon=s4;exports.LabelWithTooltip=W2;exports.LayerIcon=s2;exports.LeftArrowIcon=e2;exports.Legend=Zt;exports.Link=$r;exports.ListItem=Qt;exports.LogicOperatorConnector=F3;exports.MaximizeIcon=Gs;exports.MessageProgrammingOutlined=u6;exports.Modal=al;exports.ModalBody=cl;exports.ModalClose=um;exports.ModalContent=ol;exports.ModalDescription=cm;exports.ModalFooter=ul;exports.ModalFooterActions=V2;exports.ModalHeader=sl;exports.ModalTitle=ll;exports.ModalTrigger=il;exports.ModuleCard=$3;exports.ModuleCardHeader=Pm;exports.ModuleFieldItem=R3;exports.ModuleSummaryCard=S3;exports.MoreIcon=o2;exports.NAVBAR=Dj;exports.OptionsEditor=q2;exports.PANEL_DEFAULTS=Re;exports.Panel=Uj;exports.PanelHeader=pm;exports.PanelLayout=Hj;exports.PanelMain=Kj;exports.PasswordResetWidget=$P;exports.PlanPricingCard=t3;exports.Planner=G3;exports.PlusCircleIcon=b6;exports.ProductIcon=dl;exports.ProgrammingArrowsOutlined=f6;exports.Progress=Js;exports.ProgressBar=gh;exports.ProgressCircle=qn;exports.ProgressTracker=m4;exports.ProjectActionCard=fP;exports.ProjectCard=r3;exports.ProjectCardPlan=cP;exports.ProjectOverviewCard=C3;exports.QuestionCircle=Xp;exports.QuickActions=x4;exports.Radio=v4;exports.RecoveryWidget=MP;exports.RelatedDataCard=L3;exports.RightArrowIcon=Qp;exports.SIDEBAR=Lj;exports.Section=Ks;exports.SectionFeatures=Mj;exports.SectionHero=Ij;exports.SelectableCard=n3;exports.SettingsCard=hP;exports.ShareIcon=m6;exports.Sidebar=o4;exports.SkalarLogo=To;exports.SkalarLogoNoText=Eo;exports.SlashIcon=C6;exports.SliderPointerDown=g6;exports.SliderPointerUp=x6;exports.SliderThumbIcon=hh;exports.SplitPanelLayout=Gj;exports.Stepper=a3;exports.StraightInfoIcon=Qr;exports.SupportCard=dP;exports.Switcher=fl;exports.TabbedContainer=K4;exports.Table=O4;exports.TableBody=A4;exports.TableCard=pP;exports.TableCell=vh;exports.TableColumnFilter=M4;exports.TableColumnHeader=l3;exports.TableColumnVisibility=$4;exports.TableEmptyState=c3;exports.TableHeader=P4;exports.TableHeading=I4;exports.TablePagination=E4;exports.TableProvider=s3;exports.TableRoot=N4;exports.TableRow=Io;exports.Tabs=fm;exports.Tag=Rr;exports.TextArea=hl;exports.ThemeToggle=Y4;exports.ToastComponent=w3;exports.ToastProvider=eP;exports.Toggle=Zi;exports.Tooltip=Sa;exports.Tooltip$1=We;exports.TrashIcon=Ys;exports.TypesPanel=hm;exports.TypesPanelBodyGrid=rP;exports.TypesPanelBodyList=nP;exports.TypesPanelHeader=oP;exports.TypesPanelHeaderSearch=sP;exports.UnionIcon=i2;exports.UploadImageIcon=Jj;exports.UserMenu=lP;exports.VideoPlayOutlined=d6;exports.VisualComposer=NP;exports.WidgetBuilderEdit=bA;exports.WidgetBuilderItemHoverAction=pl;exports.WidgetContainer=gn;exports.WidgetPreview=vA;exports.WidgetSidebar=qP;exports.WidgetSummaryCard=O3;exports.WorkspaceSettings=uP;exports.XMark=nt;exports.XMarkAlert=t2;exports.addSelectionColumn=H4;exports.calculateDraggedPanelPercentage=qj;exports.calculateHeaderWidths=FN;exports.calculatePanelPercentage=_o;exports.createMediaQuery=UO;exports.findPanelById=Ut;exports.getCentralWidth=XO;exports.getCurrentBreakpoint=GO;exports.getDefaultExportFromCjs=Ne;exports.getGapClass=er;exports.getTotalPanelsWidth=Wj;exports.getTotalSideWidth=ko;exports.initializePanelsState=Po;exports.matchesBreakpoint=KO;exports.parseColumnConfig=d3;exports.parseTableConfig=W4;exports.productsApiResponse=U4;exports.productsTableConfig=p3;exports.productsTableData=m3;exports.pxToCss=VO;exports.pxToRem=HO;exports.useChart=zx;exports.useContainerHeight=J6;exports.useContainerWidth=tl;exports.usePanelState=JO;exports.useSidebar=pn;exports.useTableContext=tr;exports.useToast=J4;exports.usersApiResponse=V4;exports.usersTableConfig=f3;exports.usersTableData=h3;exports.visualComposerCollision=PP;
|
|
91
|
-
//# sourceMappingURL=index-
|
|
86
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AO(e,t){if(e){if(typeof e=="string")return Hp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hp(e,t)}}function lH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cH(e){if(Array.isArray(e))return Hp(e)}function Hp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Cj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cj(Object(r),!0).forEach(function(n){ue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ue(e,t,r){return t=_O(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _O(e){var t=uH(e,"string");return wa(t)=="symbol"?t:t+""}function uH(e,t){if(wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dH={xAxis:["bottom","top"],yAxis:["left","right"]},fH={width:"100%",height:"100%"},kO={x:0,y:0};function No(e){return e}var hH=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},pH=function(t,r,n,a){var i=r.find(function(d){return d&&d.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var s=i.coordinate,l=a.radius;return H(H(H({},a),ge(a.cx,a.cy,l,s)),{},{angle:s,radius:l})}var c=i.coordinate,u=a.angle;return H(H(H({},a),ge(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return kO},Gl=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,s=(n??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(ja(l),ja(u)):l},[]);return s.length>0?s:t&&t.length&&Z(a)&&Z(i)?t.slice(a,i+1):[]};function TO(e){return e==="number"?[0,"auto"]:void 0}var Vp=function(t,r,n,a){var i=t.graphicalItems,s=t.tooltipAxis,l=Gl(r,t);return n<0||!i||!i.length||n>=l.length?null:i.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var p=f===void 0?l:f;h=Lo(p,s.dataKey,a)}else h=f&&f[n]||l[n];return h?[].concat(ja(c),[jx(u,h)]):c},[])},Sj=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},s=hH(i,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=z7(s,l,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,h=Vp(t,r,d,f),p=pH(n,l,d,i);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},mH=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=t5(d,i);return n.reduce(function(g,x){var m,v=x.type.defaultProps!==void 0?H(H({},x.type.defaultProps),x.props):x.props,b=v.type,w=v.dataKey,C=v.allowDataOverflow,y=v.allowDuplicatedCategory,j=v.scale,S=v.ticks,A=v.includeHidden,_=v[s];if(g[_])return g;var I=Gl(t.data,{graphicalItems:a.filter(function(W){var G,Q=s in W.props?W.props[s]:(G=W.type.defaultProps)===null||G===void 0?void 0:G[s];return Q===_}),dataStartIndex:c,dataEndIndex:u}),k=I.length,E,T,M;FW(v.domain,C,b)&&(E=ep(v.domain,null,C),p&&(b==="number"||j!=="auto")&&(M=ri(I,w,"category")));var R=TO(b);if(!E||E.length===0){var $,L=($=v.domain)!==null&&$!==void 0?$:R;if(w){if(E=ri(I,w,b),b==="category"&&p){var q=T_(E);y&&q?(T=E,E=_s(0,k)):y||(E=o1(L,E,x).reduce(function(W,G){return W.indexOf(G)>=0?W:[].concat(ja(W),[G])},[]))}else if(b==="category")y?E=E.filter(function(W){return W!==""&&!de(W)}):E=o1(L,E,x).reduce(function(W,G){return W.indexOf(G)>=0||G===""||de(G)?W:[].concat(ja(W),[G])},[]);else if(b==="number"){var U=H7(I,a.filter(function(W){var G,Q,ne=s in W.props?W.props[s]:(G=W.type.defaultProps)===null||G===void 0?void 0:G[s],X="hide"in W.props?W.props.hide:(Q=W.type.defaultProps)===null||Q===void 0?void 0:Q.hide;return ne===_&&(A||!X)}),w,i,d);U&&(E=U)}p&&(b==="number"||j!=="auto")&&(M=ri(I,w,"category"))}else p?E=_s(0,k):l&&l[_]&&l[_].hasStack&&b==="number"?E=h==="expand"?[0,1]:c5(l[_].stackGroups,c,u):E=e5(I,a.filter(function(W){var G=s in W.props?W.props[s]:W.type.defaultProps[s],Q="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return G===_&&(A||!Q)}),b,d,!0);if(b==="number")E=qp(f,E,_,i,S),L&&(E=ep(L,E,C));else if(b==="category"&&L){var D=L,B=E.every(function(W){return D.indexOf(W)>=0});B&&(E=D)}}return H(H({},g),{},ue({},_,H(H({},v),{},{axisType:i,domain:E,categoricalDomain:M,duplicateDomain:T,originalDomain:(m=v.domain)!==null&&m!==void 0?m:R,isCategorical:p,layout:d})))},{})},xH=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=Gl(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),p=h.length,g=t5(d,i),x=-1;return n.reduce(function(m,v){var b=v.type.defaultProps!==void 0?H(H({},v.type.defaultProps),v.props):v.props,w=b[s],C=TO("number");if(!m[w]){x++;var y;return g?y=_s(0,p):l&&l[w]&&l[w].hasStack?(y=c5(l[w].stackGroups,c,u),y=qp(f,y,w,i)):(y=ep(C,e5(h,n.filter(function(j){var S,A,_=s in j.props?j.props[s]:(S=j.type.defaultProps)===null||S===void 0?void 0:S[s],I="hide"in j.props?j.props.hide:(A=j.type.defaultProps)===null||A===void 0?void 0:A.hide;return _===w&&!I}),"number",d),a.defaultProps.allowDataOverflow),y=qp(f,y,w,i)),H(H({},m),{},ue({},w,H(H({axisType:i},a.defaultProps),{},{hide:!0,orientation:St(dH,"".concat(i,".").concat(x%2),null),domain:y,originalDomain:C,isCategorical:g,layout:d})))}return m},{})},gH=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,s=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.children,f="".concat(a,"Id"),h=gt(d,i),p={};return h&&h.length?p=mH(t,{axes:h,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):s&&s.length&&(p=xH(t,{Axis:i,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),p},vH=function(t){var r=Tr(t),n=dr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Zm(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ds(r,n)}},Oj=function(t){var r=t.children,n=t.defaultShowTooltip,a=wt(r,ua),i=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(s=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},yH=function(t){return!t||!t.length?!1:t.some(function(r){var n=fr(r&&r.type);return n&&n.indexOf("Bar")>=0})},Nj=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},bH=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,s=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,u=n.width,d=n.height,f=n.children,h=n.margin||{},p=wt(f,ua),g=wt(f,Zt),x=Object.keys(c).reduce(function(y,j){var S=c[j],A=S.orientation;return!S.mirror&&!S.hide?H(H({},y),{},ue({},A,y[A]+S.width)):y},{left:h.left||0,right:h.right||0}),m=Object.keys(s).reduce(function(y,j){var S=s[j],A=S.orientation;return!S.mirror&&!S.hide?H(H({},y),{},ue({},A,St(y,"".concat(A))+S.height)):y},{top:h.top||0,bottom:h.bottom||0}),v=H(H({},m),x),b=v.bottom;p&&(v.bottom+=p.props.height||ua.defaultProps.height),g&&r&&(v=q7(v,a,n,r));var w=u-v.left-v.right,C=d-v.top-v.bottom;return H(H({brushBottom:b},v),{},{width:Math.max(w,0),height:Math.max(C,0)})},wH=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Ra=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(v,b){var w=b.graphicalItems,C=b.stackGroups,y=b.offset,j=b.updateId,S=b.dataStartIndex,A=b.dataEndIndex,_=v.barSize,I=v.layout,k=v.barGap,E=v.barCategoryGap,T=v.maxBarSize,M=Nj(I),R=M.numericAxisName,$=M.cateAxisName,L=yH(w),q=[];return w.forEach(function(U,D){var B=Gl(v.data,{graphicalItems:[U],dataStartIndex:S,dataEndIndex:A}),W=U.type.defaultProps!==void 0?H(H({},U.type.defaultProps),U.props):U.props,G=W.dataKey,Q=W.maxBarSize,ne=W["".concat(R,"Id")],X=W["".concat($,"Id")],re={},ce=c.reduce(function(Hr,ir){var Zl,Yl,Xl=b["".concat(ir.axisType,"Map")],Wx=W["".concat(ir.axisType,"Id")];Xl&&Xl[Wx]||ir.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?xt(!1,"Specifying a(n) ".concat(ir.axisType,"Id requires a corresponding ").concat(ir.axisType,"Id on the targeted graphical component ").concat((Zl=U==null||(Yl=U.type)===null||Yl===void 0?void 0:Yl.displayName)!==null&&Zl!==void 0?Zl:"")):xt());var Hx=Xl[Wx];return H(H({},Hr),{},ue(ue({},ir.axisType,Hx),"".concat(ir.axisType,"Ticks"),dr(Hx)))},re),K=ce[$],J=ce["".concat($,"Ticks")],ee=C&&C[ne]&&C[ne].hasStack&&Y7(U,C[ne].stackGroups),z=fr(U.type).indexOf("Bar")>=0,pe=ds(K,J),Y=[],Ne=L&&B7({barSize:_,stackGroups:C,totalSize:wH(ce,$)});if(z){var $e,tt,Pr=de(Q)?T:Q,Nn=($e=(tt=ds(K,J,!0))!==null&&tt!==void 0?tt:Pr)!==null&&$e!==void 0?$e:0;Y=F7({barGap:k,barCategoryGap:E,bandSize:Nn!==pe?Nn:pe,sizeList:Ne[X],maxBarSize:Pr}),Nn!==pe&&(Y=Y.map(function(Hr){return H(H({},Hr),{},{position:H(H({},Hr.position),{},{offset:Hr.position.offset-Nn/2})})}))}var oo=U&&U.type&&U.type.getComposedData;oo&&q.push({props:H(H({},oo(H(H({},ce),{},{displayedData:B,props:v,dataKey:G,item:U,bandSize:pe,barPosition:Y,offset:y,stackedData:ee,layout:I,dataStartIndex:S,dataEndIndex:A}))),{},ue(ue(ue({key:U.key||"item-".concat(D)},R,ce[R]),$,ce[$]),"animationId",j)),childIndex:W_(U,v.children),item:U})}),q},p=function(v,b){var w=v.props,C=v.dataStartIndex,y=v.dataEndIndex,j=v.updateId;if(!jv({props:w}))return null;var S=w.children,A=w.layout,_=w.stackOffset,I=w.data,k=w.reverseStackOrder,E=Nj(A),T=E.numericAxisName,M=E.cateAxisName,R=gt(S,n),$=Z7(I,R,"".concat(T,"Id"),"".concat(M,"Id"),_,k),L=c.reduce(function(W,G){var Q="".concat(G.axisType,"Map");return H(H({},W),{},ue({},Q,gH(w,H(H({},G),{},{graphicalItems:R,stackGroups:G.axisType===T&&$,dataStartIndex:C,dataEndIndex:y}))))},{}),q=bH(H(H({},L),{},{props:w,graphicalItems:R}),b?.legendBBox);Object.keys(L).forEach(function(W){L[W]=d(w,L[W],q,W.replace("Map",""),r)});var U=L["".concat(M,"Map")],D=vH(U),B=h(w,H(H({},L),{},{dataStartIndex:C,dataEndIndex:y,updateId:j,graphicalItems:R,stackGroups:$,offset:q}));return H(H({formattedGraphicalItems:B,graphicalItems:R,offset:q,stackGroups:$},D),L)},g=(function(m){function v(b){var w,C,y;return eH(this,v),y=nH(this,v,[b]),ue(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(y,"accessibilityManager",new BW),ue(y,"handleLegendBBoxUpdate",function(j){if(j){var S=y.state,A=S.dataStartIndex,_=S.dataEndIndex,I=S.updateId;y.setState(H({legendBBox:j},p({props:y.props,dataStartIndex:A,dataEndIndex:_,updateId:I},H(H({},y.state),{},{legendBBox:j}))))}}),ue(y,"handleReceiveSyncEvent",function(j,S,A){if(y.props.syncId===j){if(A===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(S)}}),ue(y,"handleBrushChange",function(j){var S=j.startIndex,A=j.endIndex;if(S!==y.state.dataStartIndex||A!==y.state.dataEndIndex){var _=y.state.updateId;y.setState(function(){return H({dataStartIndex:S,dataEndIndex:A},p({props:y.props,dataStartIndex:S,dataEndIndex:A,updateId:_},y.state))}),y.triggerSyncEvent({dataStartIndex:S,dataEndIndex:A})}}),ue(y,"handleMouseEnter",function(j){var S=y.getMouseInfo(j);if(S){var A=H(H({},S),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var _=y.props.onMouseEnter;le(_)&&_(A,j)}}),ue(y,"triggeredAfterMouseMove",function(j){var S=y.getMouseInfo(j),A=S?H(H({},S),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var _=y.props.onMouseMove;le(_)&&_(A,j)}),ue(y,"handleItemMouseEnter",function(j){y.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),ue(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),ue(y,"handleMouseMove",function(j){j.persist(),y.throttleTriggeredAfterMouseMove(j)}),ue(y,"handleMouseLeave",function(j){y.throttleTriggeredAfterMouseMove.cancel();var S={isTooltipActive:!1};y.setState(S),y.triggerSyncEvent(S);var A=y.props.onMouseLeave;le(A)&&A(S,j)}),ue(y,"handleOuterEvent",function(j){var S=q_(j),A=St(y.props,"".concat(S));if(S&&le(A)){var _,I;/.*touch.*/i.test(S)?I=y.getMouseInfo(j.changedTouches[0]):I=y.getMouseInfo(j),A((_=I)!==null&&_!==void 0?_:{},j)}}),ue(y,"handleClick",function(j){var S=y.getMouseInfo(j);if(S){var A=H(H({},S),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var _=y.props.onClick;le(_)&&_(A,j)}}),ue(y,"handleMouseDown",function(j){var S=y.props.onMouseDown;if(le(S)){var A=y.getMouseInfo(j);S(A,j)}}),ue(y,"handleMouseUp",function(j){var S=y.props.onMouseUp;if(le(S)){var A=y.getMouseInfo(j);S(A,j)}}),ue(y,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),ue(y,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&y.handleMouseDown(j.changedTouches[0])}),ue(y,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&y.handleMouseUp(j.changedTouches[0])}),ue(y,"handleDoubleClick",function(j){var S=y.props.onDoubleClick;if(le(S)){var A=y.getMouseInfo(j);S(A,j)}}),ue(y,"handleContextMenu",function(j){var S=y.props.onContextMenu;if(le(S)){var A=y.getMouseInfo(j);S(A,j)}}),ue(y,"triggerSyncEvent",function(j){y.props.syncId!==void 0&&ch.emit(uh,y.props.syncId,j,y.eventEmitterSymbol)}),ue(y,"applySyncEvent",function(j){var S=y.props,A=S.layout,_=S.syncMethod,I=y.state.updateId,k=j.dataStartIndex,E=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)y.setState(H({dataStartIndex:k,dataEndIndex:E},p({props:y.props,dataStartIndex:k,dataEndIndex:E,updateId:I},y.state)));else if(j.activeTooltipIndex!==void 0){var T=j.chartX,M=j.chartY,R=j.activeTooltipIndex,$=y.state,L=$.offset,q=$.tooltipTicks;if(!L)return;if(typeof _=="function")R=_(q,j);else if(_==="value"){R=-1;for(var U=0;U<q.length;U++)if(q[U].value===j.activeLabel){R=U;break}}var D=H(H({},L),{},{x:L.left,y:L.top}),B=Math.min(T,D.x+D.width),W=Math.min(M,D.y+D.height),G=q[R]&&q[R].value,Q=Vp(y.state,y.props.data,R),ne=q[R]?{x:A==="horizontal"?q[R].coordinate:B,y:A==="horizontal"?W:q[R].coordinate}:kO;y.setState(H(H({},j),{},{activeLabel:G,activeCoordinate:ne,activePayload:Q,activeTooltipIndex:R}))}else y.setState(j)}),ue(y,"renderCursor",function(j){var S,A=y.state,_=A.isTooltipActive,I=A.activeCoordinate,k=A.activePayload,E=A.offset,T=A.activeTooltipIndex,M=A.tooltipAxisBandSize,R=y.getTooltipEventType(),$=(S=j.props.active)!==null&&S!==void 0?S:_,L=y.props.layout,q=j.key||"_recharts-cursor";return O.default.createElement(KW,{key:q,activeCoordinate:I,activePayload:k,activeTooltipIndex:T,chartName:r,element:j,isActive:$,layout:L,offset:E,tooltipAxisBandSize:M,tooltipEventType:R})}),ue(y,"renderPolarAxis",function(j,S,A){var _=St(j,"type.axisType"),I=St(y.state,"".concat(_,"Map")),k=j.type.defaultProps,E=k!==void 0?H(H({},k),j.props):j.props,T=I&&I[E["".concat(_,"Id")]];return P.cloneElement(j,H(H({},T),{},{className:ae.default(_,T.className),key:j.key||"".concat(S,"-").concat(A),ticks:dr(T,!0)}))}),ue(y,"renderPolarGrid",function(j){var S=j.props,A=S.radialLines,_=S.polarAngles,I=S.polarRadius,k=y.state,E=k.radiusAxisMap,T=k.angleAxisMap,M=Tr(E),R=Tr(T),$=R.cx,L=R.cy,q=R.innerRadius,U=R.outerRadius;return P.cloneElement(j,{polarAngles:Array.isArray(_)?_:dr(R,!0).map(function(D){return D.coordinate}),polarRadius:Array.isArray(I)?I:dr(M,!0).map(function(D){return D.coordinate}),cx:$,cy:L,innerRadius:q,outerRadius:U,key:j.key||"polar-grid",radialLines:A})}),ue(y,"renderLegend",function(){var j=y.state.formattedGraphicalItems,S=y.props,A=S.children,_=S.width,I=S.height,k=y.props.margin||{},E=_-(k.left||0)-(k.right||0),T=QS({children:A,formattedGraphicalItems:j,legendWidth:E,legendContent:u});if(!T)return null;var M=T.item,R=jj(T,GW);return P.cloneElement(M,H(H({},R),{},{chartWidth:_,chartHeight:I,margin:k,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),ue(y,"renderTooltip",function(){var j,S=y.props,A=S.children,_=S.accessibilityLayer,I=wt(A,We);if(!I)return null;var k=y.state,E=k.isTooltipActive,T=k.activeCoordinate,M=k.activePayload,R=k.activeLabel,$=k.offset,L=(j=I.props.active)!==null&&j!==void 0?j:E;return P.cloneElement(I,{viewBox:H(H({},$),{},{x:$.left,y:$.top}),active:L,label:R,payload:L?M:[],coordinate:T,accessibilityLayer:_})}),ue(y,"renderBrush",function(j){var S=y.props,A=S.margin,_=S.data,I=y.state,k=I.offset,E=I.dataStartIndex,T=I.dataEndIndex,M=I.updateId;return P.cloneElement(j,{key:j.key||"_recharts-brush",onChange:yo(y.handleBrushChange,j.props.onChange),data:_,x:Z(j.props.x)?j.props.x:k.left,y:Z(j.props.y)?j.props.y:k.top+k.height+k.brushBottom-(A.bottom||0),width:Z(j.props.width)?j.props.width:k.width,startIndex:E,endIndex:T,updateId:"brush-".concat(M)})}),ue(y,"renderReferenceElement",function(j,S,A){if(!j)return null;var _=y,I=_.clipPathId,k=y.state,E=k.xAxisMap,T=k.yAxisMap,M=k.offset,R=j.type.defaultProps||{},$=j.props,L=$.xAxisId,q=L===void 0?R.xAxisId:L,U=$.yAxisId,D=U===void 0?R.yAxisId:U;return P.cloneElement(j,{key:j.key||"".concat(S,"-").concat(A),xAxis:E[q],yAxis:T[D],viewBox:{x:M.left,y:M.top,width:M.width,height:M.height},clipPathId:I})}),ue(y,"renderActivePoints",function(j){var S=j.item,A=j.activePoint,_=j.basePoint,I=j.childIndex,k=j.isRange,E=[],T=S.props.key,M=S.item.type.defaultProps!==void 0?H(H({},S.item.type.defaultProps),S.item.props):S.item.props,R=M.activeDot,$=M.dataKey,L=H(H({index:I,dataKey:$,cx:A.x,cy:A.y,r:4,fill:wx(S.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},oe(R,!1)),Do(R));return E.push(v.renderActiveDot(R,L,"".concat(T,"-activePoint-").concat(I))),_?E.push(v.renderActiveDot(R,H(H({},L),{},{cx:_.x,cy:_.y}),"".concat(T,"-basePoint-").concat(I))):k&&E.push(null),E}),ue(y,"renderGraphicChild",function(j,S,A){var _=y.filterFormatItem(j,S,A);if(!_)return null;var I=y.getTooltipEventType(),k=y.state,E=k.isTooltipActive,T=k.tooltipAxis,M=k.activeTooltipIndex,R=k.activeLabel,$=y.props.children,L=wt($,We),q=_.props,U=q.points,D=q.isRange,B=q.baseLine,W=_.item.type.defaultProps!==void 0?H(H({},_.item.type.defaultProps),_.item.props):_.item.props,G=W.activeDot,Q=W.hide,ne=W.activeBar,X=W.activeShape,re=!!(!Q&&E&&L&&(G||ne||X)),ce={};I!=="axis"&&L&&L.props.trigger==="click"?ce={onClick:yo(y.handleItemMouseEnter,j.props.onClick)}:I!=="axis"&&(ce={onMouseLeave:yo(y.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:yo(y.handleItemMouseEnter,j.props.onMouseEnter)});var K=P.cloneElement(j,H(H({},_.props),ce));function J(ir){return typeof T.dataKey=="function"?T.dataKey(ir.payload):null}if(re)if(M>=0){var ee,z;if(T.dataKey&&!T.allowDuplicatedCategory){var pe=typeof T.dataKey=="function"?J:"payload.".concat(T.dataKey.toString());ee=Lo(U,pe,R),z=D&&B&&Lo(B,pe,R)}else ee=U?.[M],z=D&&B&&B[M];if(X||ne){var Y=j.props.activeIndex!==void 0?j.props.activeIndex:M;return[P.cloneElement(j,H(H(H({},_.props),ce),{},{activeIndex:Y})),null,null]}if(!de(ee))return[K].concat(ja(y.renderActivePoints({item:_,activePoint:ee,basePoint:z,childIndex:M,isRange:D})))}else{var Ne,$e=(Ne=y.getItemByXY(y.state.activeCoordinate))!==null&&Ne!==void 0?Ne:{graphicalItem:K},tt=$e.graphicalItem,Pr=tt.item,Nn=Pr===void 0?j:Pr,oo=tt.childIndex,Hr=H(H(H({},_.props),ce),{},{activeIndex:oo});return[P.cloneElement(Nn,Hr),null,null]}return D?[K,null,null]:[K,null]}),ue(y,"renderCustomized",function(j,S,A){return P.cloneElement(j,H(H({key:"recharts-customized-".concat(A)},y.props),y.state))}),ue(y,"renderMap",{CartesianGrid:{handler:No,once:!0},ReferenceArea:{handler:y.renderReferenceElement},ReferenceLine:{handler:No},ReferenceDot:{handler:y.renderReferenceElement},XAxis:{handler:No},YAxis:{handler:No},Brush:{handler:y.renderBrush,once:!0},Bar:{handler:y.renderGraphicChild},Line:{handler:y.renderGraphicChild},Area:{handler:y.renderGraphicChild},Radar:{handler:y.renderGraphicChild},RadialBar:{handler:y.renderGraphicChild},Scatter:{handler:y.renderGraphicChild},Pie:{handler:y.renderGraphicChild},Funnel:{handler:y.renderGraphicChild},Tooltip:{handler:y.renderCursor,once:!0},PolarGrid:{handler:y.renderPolarGrid,once:!0},PolarAngleAxis:{handler:y.renderPolarAxis},PolarRadiusAxis:{handler:y.renderPolarAxis},Customized:{handler:y.renderCustomized}}),y.clipPathId="".concat((w=b.id)!==null&&w!==void 0?w:yn("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=QC(y.triggeredAfterMouseMove,(C=b.throttleDelay)!==null&&C!==void 0?C:1e3/60),y.state={},y}return oH(v,m),rH(v,[{key:"componentDidMount",value:function(){var w,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var w=this.props,C=w.children,y=w.data,j=w.height,S=w.layout,A=wt(C,We);if(A){var _=A.props.defaultIndex;if(!(typeof _!="number"||_<0||_>this.state.tooltipTicks.length-1)){var I=this.state.tooltipTicks[_]&&this.state.tooltipTicks[_].value,k=Vp(this.state,y,_,I),E=this.state.tooltipTicks[_].coordinate,T=(this.state.offset.top+j)/2,M=S==="horizontal",R=M?{x:E,y:T}:{y:E,x:T},$=this.state.formattedGraphicalItems.find(function(q){var U=q.item;return U.type.name==="Scatter"});$&&(R=H(H({},R),$.props.points[_].tooltipPosition),k=$.props.points[_].tooltipPayload);var L={activeTooltipIndex:_,isTooltipActive:!0,activeLabel:I,activePayload:k,activeCoordinate:R};this.setState(L),this.renderCursor(A),this.accessibilityManager.setIndex(_)}}}},{key:"getSnapshotBeforeUpdate",value:function(w,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==w.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==w.margin){var y,j;this.accessibilityManager.setDetails({offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(w){jh([wt(w.children,We)],[wt(this.props.children,We)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=wt(this.props.children,We);if(w&&typeof w.props.shared=="boolean"){var C=w.props.shared?"axis":"item";return l.indexOf(C)>=0?C:i}return i}},{key:"getMouseInfo",value:function(w){if(!this.container)return null;var C=this.container,y=C.getBoundingClientRect(),j=TT(y),S={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},A=y.width/C.offsetWidth||1,_=this.inRange(S.chartX,S.chartY,A);if(!_)return null;var I=this.state,k=I.xAxisMap,E=I.yAxisMap,T=this.getTooltipEventType(),M=Sj(this.state,this.props.data,this.props.layout,_);if(T!=="axis"&&k&&E){var R=Tr(k).scale,$=Tr(E).scale,L=R&&R.invert?R.invert(S.chartX):null,q=$&&$.invert?$.invert(S.chartY):null;return H(H({},S),{},{xValue:L,yValue:q},M)}return M?H(H({},S),M):null}},{key:"inRange",value:function(w,C){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,S=w/y,A=C/y;if(j==="horizontal"||j==="vertical"){var _=this.state.offset,I=S>=_.left&&S<=_.left+_.width&&A>=_.top&&A<=_.top+_.height;return I?{x:S,y:A}:null}var k=this.state,E=k.angleAxisMap,T=k.radiusAxisMap;if(E&&T){var M=Tr(E);return c1({x:S,y:A},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,C=this.getTooltipEventType(),y=wt(w,We),j={};y&&C==="axis"&&(y.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var S=Do(this.props,this.handleOuterEvent);return H(H({},S),j)}},{key:"addListener",value:function(){ch.on(uh,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){ch.removeListener(uh,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,C,y){for(var j=this.state.formattedGraphicalItems,S=0,A=j.length;S<A;S++){var _=j[S];if(_.item===w||_.props.key===w.key||C===fr(_.item.type)&&y===_.childIndex)return _}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,C=this.state.offset,y=C.left,j=C.top,S=C.height,A=C.width;return O.default.createElement("defs",null,O.default.createElement("clipPath",{id:w},O.default.createElement("rect",{x:y,y:j,height:S,width:A})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(C,y){var j=wj(y,2),S=j[0],A=j[1];return H(H({},C),{},ue({},S,A.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(C,y){var j=wj(y,2),S=j[0],A=j[1];return H(H({},C),{},ue({},S,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(w){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[w])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(w){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[w])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(w){var C=this.state,y=C.formattedGraphicalItems,j=C.activeItem;if(y&&y.length)for(var S=0,A=y.length;S<A;S++){var _=y[S],I=_.props,k=_.item,E=k.type.defaultProps!==void 0?H(H({},k.type.defaultProps),k.props):k.props,T=fr(k.type);if(T==="Bar"){var M=(I.data||[]).find(function(q){return tD(w,q)});if(M)return{graphicalItem:_,payload:M}}else if(T==="RadialBar"){var R=(I.data||[]).find(function(q){return c1(w,q)});if(R)return{graphicalItem:_,payload:R}}else if(Fl(_,j)||ql(_,j)||Bi(_,j)){var $=Mz({graphicalItem:_,activeTooltipItem:j,itemData:E.data}),L=E.activeIndex===void 0?$:E.activeIndex;return{graphicalItem:H(H({},_),{},{childIndex:L}),payload:Bi(_,j)?E.data[$]:_.props.data[$]}}}return null}},{key:"render",value:function(){var w=this;if(!jv(this))return null;var C=this.props,y=C.children,j=C.className,S=C.width,A=C.height,_=C.style,I=C.compact,k=C.title,E=C.desc,T=jj(C,ZW),M=oe(T,!1);if(I)return O.default.createElement(ej,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.default.createElement(Sh,Dn({},M,{width:S,height:A,title:k,desc:E}),this.renderClipPath(),Sv(y,this.renderMap)));if(this.props.accessibilityLayer){var R,$;M.tabIndex=(R=this.props.tabIndex)!==null&&R!==void 0?R:0,M.role=($=this.props.role)!==null&&$!==void 0?$:"application",M.onKeyDown=function(q){w.accessibilityManager.keyboardEvent(q)},M.onFocus=function(){w.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return O.default.createElement(ej,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.default.createElement("div",Dn({className:ae.default("recharts-wrapper",j),style:H({position:"relative",cursor:"default",width:S,height:A},_)},L,{ref:function(U){w.container=U}}),O.default.createElement(Sh,Dn({},M,{width:S,height:A,title:k,desc:E,style:fH}),this.renderClipPath(),Sv(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(P.Component);ue(g,"displayName",r),ue(g,"defaultProps",H({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),ue(g,"getDerivedStateFromProps",function(m,v){var b=m.dataKey,w=m.data,C=m.children,y=m.width,j=m.height,S=m.layout,A=m.stackOffset,_=m.margin,I=v.dataStartIndex,k=v.dataEndIndex;if(v.updateId===void 0){var E=Oj(m);return H(H(H({},E),{},{updateId:0},p(H(H({props:m},E),{},{updateId:0}),v)),{},{prevDataKey:b,prevData:w,prevWidth:y,prevHeight:j,prevLayout:S,prevStackOffset:A,prevMargin:_,prevChildren:C})}if(b!==v.prevDataKey||w!==v.prevData||y!==v.prevWidth||j!==v.prevHeight||S!==v.prevLayout||A!==v.prevStackOffset||!zn(_,v.prevMargin)){var T=Oj(m),M={chartX:v.chartX,chartY:v.chartY,isTooltipActive:v.isTooltipActive},R=H(H({},Sj(v,w,S)),{},{updateId:v.updateId+1}),$=H(H(H({},T),M),R);return H(H(H({},$),p(H({props:m},$),v)),{},{prevDataKey:b,prevData:w,prevWidth:y,prevHeight:j,prevLayout:S,prevStackOffset:A,prevMargin:_,prevChildren:C})}if(!jh(C,v.prevChildren)){var L,q,U,D,B=wt(C,ua),W=B&&(L=(q=B.props)===null||q===void 0?void 0:q.startIndex)!==null&&L!==void 0?L:I,G=B&&(U=(D=B.props)===null||D===void 0?void 0:D.endIndex)!==null&&U!==void 0?U:k,Q=W!==I||G!==k,ne=!de(w),X=ne&&!Q?v.updateId:v.updateId+1;return H(H({updateId:X},p(H(H({props:m},v),{},{updateId:X,dataStartIndex:W,dataEndIndex:G}),v)),{},{prevChildren:C,dataStartIndex:W,dataEndIndex:G})}return null}),ue(g,"renderActiveDot",function(m,v,b){var w;return P.isValidElement(m)?w=P.cloneElement(m,v):le(m)?w=m(v):w=O.default.createElement(Ea,v),O.default.createElement(fe,{className:"recharts-active-dot",key:b},w)});var x=P.forwardRef(function(v,b){return O.default.createElement(g,Dn({},v,{ref:b}))});return x.displayName=g.displayName,x},jH=Ra({chartName:"LineChart",GraphicalChild:io,axisComponents:[{axisType:"xAxis",AxisComp:pr},{axisType:"yAxis",AxisComp:Lr}],formatAxisMap:Ax}),EO=Ra({chartName:"BarChart",GraphicalChild:jr,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:pr},{axisType:"yAxis",AxisComp:Lr}],formatAxisMap:Ax}),Dx=Ra({chartName:"PieChart",GraphicalChild:Vt,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Sn},{axisType:"radiusAxis",AxisComp:Ia}],formatAxisMap:Cx,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),CH=Ra({chartName:"RadarChart",GraphicalChild:ao,axisComponents:[{axisType:"angleAxis",AxisComp:Sn},{axisType:"radiusAxis",AxisComp:Ia}],formatAxisMap:Cx,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),SH=Ra({chartName:"AreaChart",GraphicalChild:Wr,axisComponents:[{axisType:"xAxis",AxisComp:pr},{axisType:"yAxis",AxisComp:Lr}],formatAxisMap:Ax}),IO=Ra({chartName:"RadialBarChart",GraphicalChild:Ma,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:Sn},{axisType:"radiusAxis",AxisComp:Ia}],formatAxisMap:Cx,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const Nr=P.createContext(null);function zx(){const e=P.useContext(Nr);if(!e)throw new Error("useChart must be used within a ChartContainer");return e}const Bx=({config:e,children:t,className:r,height:n=300})=>{const a=Object.fromEntries(Object.entries(e).filter(([,i])=>i.color).map(([i,s])=>[`--color-${i}`,s.color]));return o.jsx(Nr.Provider,{value:{config:e},children:o.jsx("div",{className:te.twMerge(N.clsx("bg-white rounded-[12px] w-full",r)),style:a,children:o.jsx(ST,{width:"100%",height:n,children:t})})})},qt=({active:e,payload:t,label:r,labelKey:n,nameKey:a,indicator:i="dot",hideLabel:s=!1,hideIndicator:l=!1,className:c})=>{const{config:u}=zx();if(!e||!t?.length)return null;const d=String(n?t[0]?.payload?.[n]??r??"":r??"");return o.jsxs("div",{className:te.twMerge(N.clsx("bg-surface-bg border border-surface-3 rounded-[8px] shadow-e2 px-3 py-2 text-xs min-w-[8rem]",c)),children:[!s&&d&&o.jsx("p",{className:"text-high-em font-medium mb-1.5",children:d}),o.jsx("div",{className:"flex flex-col gap-1",children:t.map((f,h)=>{const p=String(a?f.payload?.[a]??f.dataKey:f.dataKey??f.name??""),x=(u[p]??{}).label??f.name??f.dataKey;return o.jsxs("div",{className:"flex items-center gap-2",children:[!l&&o.jsx("span",{className:N.clsx("shrink-0",{"h-2 w-2 rounded-[2px]":i==="dot","w-[3px] h-3.5 rounded-full":i==="line","w-[3px] h-3.5 rounded-full opacity-60":i==="dashed"}),style:{backgroundColor:`var(--color-${p})`}}),o.jsx("span",{className:"text-low-em",children:String(x??"")}),o.jsx("span",{className:"text-med-em font-medium ml-auto pl-4",children:String(f.value??"")})]},h)})})]})},Vs=({payload:e,nameKey:t,className:r})=>{const{config:n}=zx();return e?.length?o.jsx("div",{className:te.twMerge(N.clsx("flex flex-wrap items-center justify-center gap-x-6 gap-y-1 pt-3 text-xs text-low-em",r)),children:e.map((a,i)=>{const s=String(t??a.dataKey??a.value??""),c=(n[s]??n[String(a.value)]??{}).label??a.value;return o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"h-3 w-3 shrink-0 rounded-full",style:{backgroundColor:`var(--color-${s})`}}),o.jsx("span",{children:String(c??"")})]},i)})}):null},ot=({children:e,className:t})=>o.jsx("div",{className:te.twMerge(N.clsx("bg-white border border-surface-3 rounded-[12px] p-8 w-full",t)),children:e}),La=({title:e,titleIcon:t,value:r,className:n})=>o.jsxs("div",{className:N.clsx("flex flex-col",n),children:[o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&o.jsx(ie,{size:"md",color:"currentColor",children:t})]}),o.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:r})]}),OH=({className:e,...t})=>o.jsx(ot,{className:e,children:o.jsx(La,{...t})}),NH=({buttonLabel:e="New invoice",onButtonClick:t,className:r,titleIcon:n=o.jsx(F.Link,{}),...a})=>o.jsx(ot,{className:r,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(La,{...a,titleIcon:n}),o.jsx(V,{variant:"secondary",hierarchy:"primary",size:"sm",icons:"leading",leadingIcon:o.jsx(F.Add,{}),onClick:t,children:e})]})}),PH={xs:"py-1 px-5",sm:"py-2 px-5",md:"py-3 px-6",lg:"py-4 px-6"},Fx=({items:e,size:t="xs",className:r})=>o.jsx("div",{className:N.clsx("flex flex-col rounded-lg border border-surface-3 divide-y divide-surface-3 overflow-hidden",r),children:e.map((n,a)=>o.jsx(Qt,{as:"div",size:t,title:n.name,trailingText:String(n.value),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!0,className:PH[t]},a))}),AH=[{name:"Billable",value:"17.00"},{name:"Non-billable",value:"0.00",disabled:!0}],_H=({title:e="Internal costs",amount:t=0,icon:r,items:n=AH,className:a})=>o.jsxs("div",{className:N.clsx("flex flex-col gap-4",a),children:[o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[o.jsx("span",{className:"text-sm font-medium text-med-em",children:e}),o.jsxs("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:["$",t]})]}),o.jsx(ie,{size:"md",color:"currentColor",children:r??o.jsx(F.Timer,{})})]}),o.jsx(Fx,{items:n,size:"xs"})]}),kH=({items:e,size:t="md",buttonLabel:r="New invoice",onButtonClick:n,className:a})=>o.jsxs("div",{className:N.clsx("flex flex-col gap-6",a),children:[o.jsx(Fx,{items:e,size:t}),o.jsx(V,{variant:"secondary",hierarchy:"primary",size:"md",icons:"leading",leadingIcon:o.jsx(F.Add,{}),onClick:n,children:r})]}),TH=({progressTitle:e,progress:t,progressVariant:r="none",className:n,...a})=>o.jsx(ot,{className:n,children:o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(La,{...a}),o.jsxs("div",{className:"flex flex-col gap-0",children:[e&&o.jsx("span",{className:"text-base font-medium text-med-em",children:e}),o.jsx(Js,{progress:t,variant:r})]})]})}),EH=({title:e,amount:t,progress:r,circleSize:n="sm",circleShape:a="circle",circleLabel:i,className:s})=>o.jsx(ot,{className:s,children:o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),o.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),o.jsx(qn,{progress:r,size:n,shape:a,label:i})]})}),IH=({title:e,amount:t,progress:r,circleSize:n="sm",circleLabel:a,className:i})=>o.jsx(ot,{className:i,children:o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),o.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),o.jsx(qn,{progress:r,size:n,shape:"half-circle",label:a})]})}),MH=({progress:e,circleSize:t="sm",circleShape:r="circle",circleLabel:n,title1:a,amount1:i,title2:s,amount2:l,className:c})=>o.jsx(ot,{className:c,children:o.jsxs("div",{className:"flex flex-col gap-10",children:[o.jsx("div",{className:"flex justify-center",children:o.jsx(qn,{progress:e,size:t,shape:r,label:n})}),o.jsx(he,{}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-sm font-medium text-med-em",children:a}),o.jsx("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:i}),o.jsx(he,{direction:"vertical",height:"40px"}),o.jsx("span",{className:"text-sm font-medium text-med-em",children:s}),o.jsx("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:l})]})]})}),$H=({min:e=0,max:t=100,defaultValue:r=0,defaultValueEnd:n,step:a=1,variant:i="default",labels:s=[],onChange:l,className:c,disabled:u=!1})=>{const d=n!==void 0,[f,h]=P.useState(r),[p,g]=P.useState(n??t),[x,m]=P.useState(!1),[v,b]=P.useState(!1),w=P.useRef(null),C=(f-e)/(t-e)*100,y=d?(p-e)/(t-e)*100:100,j=P.useCallback(T=>{if(!w.current)return e;const M=w.current.getBoundingClientRect(),R=Math.max(0,Math.min(100,(T-M.left)/M.width*100)),$=e+R/100*(t-e),L=Math.round($/a)*a;return Math.max(e,Math.min(t,L))},[e,t,a]),S=P.useCallback(()=>{u||m(!0)},[u]),A=P.useCallback(()=>{u||b(!0)},[u]),_=P.useCallback(T=>{if(u)return;const M=j(T.clientX);if(x){const $=Math.min(M,d?p:t);h($),l&&l(d?[$,p]:$)}else if(v&&d){const $=Math.max(M,f);g($),l&&l([f,$])}},[u,j,x,v,d,f,p,t,l]),I=P.useCallback(()=>{m(!1),b(!1)},[]);P.useEffect(()=>{if(x||v)return document.addEventListener("mousemove",_),document.addEventListener("mouseup",I),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",I)}},[x,v,_,I]);const k=P.useCallback(T=>{if(u||T.target!==T.currentTarget)return;const M=j(T.clientX);if(!d)h(M),l&&l(M);else{const R=Math.abs(M-f),$=Math.abs(M-p);if(R<$){const L=Math.min(M,p);h(L),l&&l([L,p])}else{const L=Math.max(M,f);g(L),l&&l([f,L])}}},[u,j,d,f,p,l]),E=(T,M)=>{if(i==="percentage")return o.jsxs("div",{className:"absolute text-sm font-medium",style:{left:`${M}%`,transform:"translateX(-50%)",bottom:"100%",marginBottom:"12px",color:"var(--slider-text-color, #000000)"},children:[T,"%"]});if(i==="labelTop"&&s.length>0){const R=Math.round(T/t*(s.length-1)),$=s[R]||"";return o.jsx("div",{className:"absolute opacity-100 visible transition-opacity duration-200 pointer-events-none",style:{left:`${M}%`,transform:"translateX(-50%)",bottom:"100%",marginBottom:"24px"},children:o.jsx(ph,{arrowDirection:"down",children:$})})}if(i==="labelBottom"&&s.length>0){const R=Math.round(T/t*(s.length-1)),$=s[R]||"";return o.jsx("div",{className:"absolute opacity-100 visible transition-opacity duration-200 pointer-events-none",style:{left:`${M}%`,transform:"translateX(-50%)",top:"100%",marginTop:"24px"},children:o.jsx(ph,{arrowDirection:"up",children:$})})}return null};return o.jsx("div",{className:N.clsx("relative select-none py-10 w-60",u&&"opacity-50 cursor-not-allowed",c),children:o.jsxs("div",{className:"relative",style:{height:"8px"},children:[o.jsx("div",{ref:w,className:"absolute w-full rounded-full cursor-pointer",style:{height:"8px",backgroundColor:"var(--slider-track-bg, #D8DDE5)"},onClick:k}),o.jsx("div",{className:"absolute rounded-full pointer-events-none",style:{height:"8px",backgroundColor:"var(--slider-track-active, #000000)",left:`${C}%`,right:`${100-y}%`}}),o.jsx("div",{className:N.clsx("absolute cursor-grab active:cursor-grabbing",u&&"cursor-not-allowed"),style:{left:`${C}%`,top:"50%",transform:"translate(-50%, -50%)",zIndex:x?30:20},onMouseDown:S,children:o.jsx(hh,{})}),d&&o.jsx("div",{className:N.clsx("absolute cursor-grab active:cursor-grabbing",u&&"cursor-not-allowed"),style:{left:`${y}%`,top:"50%",transform:"translate(-50%, -50%)",zIndex:v?30:20},onMouseDown:A,children:o.jsx(hh,{})}),i!=="default"&&E(f,C),d&&i!=="default"&&E(p,y)]})})},RH=({min:e=0,max:t=100,sliderValue:r=0,sliderValueEnd:n,step:a=1,labels:i,onSliderChange:s,className:l,...c})=>o.jsx(ot,{className:l,children:o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(La,{...c}),o.jsx($H,{min:e,max:t,defaultValue:r,defaultValueEnd:n,step:a,variant:"labelBottom",labels:i,onChange:s})]})}),LH=({items:e,size:t="md",className:r})=>o.jsx("div",{className:N.clsx("flex flex-col rounded-lg border border-surface-3 divide-y divide-surface-3 overflow-hidden",r),children:e.map((n,a)=>o.jsx(Qt,{as:"div",size:t,title:n.title,description:n.description,leadingIcon:n.leadingIcon??o.jsx(F.I3Dcube,{}),trailingIcon:n.trailingIcon??o.jsx(F.Record,{}),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!0,showDescription:!0,showTrailingIcon:!0,showTag:!1,showTrailingText:!1,disabled:n.disabled},a))}),Up=["var(--brand-secondary-main)","var(--success-main)","var(--warning-main)","var(--danger-main)","var(--info-main)"];function qx(e,t){return e??Up[t%Up.length]}function On(e){return Object.fromEntries(e.map((t,r)=>[t.name,{label:t.label??t.name,color:qx(t.color,r)}]))}function Da(e){return Object.fromEntries(e.map((t,r)=>[`--color-${t.name}`,qx(t.color,r)]))}const DH=({title:e,amount:t,data:r,donutSize:n=120,className:a})=>{const i=On(r),s=Da(r),l=n/2,c=l-2,u=l*.55;return o.jsx(ot,{className:a,children:o.jsxs("div",{className:"flex items-center justify-between gap-6",children:[o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),o.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),o.jsx(Nr.Provider,{value:{config:i},children:o.jsx("div",{className:"shrink-0",style:{...s,width:n,height:n},children:o.jsxs(Dx,{width:n,height:n,children:[o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})}),o.jsx(Vt,{data:r,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:u,outerRadius:c,stroke:"none",children:r.map(d=>o.jsx(bn,{fill:`var(--color-${d.name})`},d.name))})]})})})]})})},zH=({title:e,titleIcon:t,data:r,donutSize:n=160,className:a})=>{const i=On(r),s=Da(r),l=n/2,c=l-2,u=l*.5;return o.jsx(ot,{className:a,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&o.jsx(ie,{size:"md",color:"currentColor",children:t})]}),o.jsx(he,{}),o.jsx(Nr.Provider,{value:{config:i},children:o.jsxs("div",{className:"flex items-center gap-4",style:s,children:[o.jsx("div",{className:"flex flex-col flex-1 min-w-0 divide-y divide-surface-3 pr-8",children:r.map(d=>o.jsxs("div",{className:"flex items-center gap-2 py-3",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${d.name})`})}),o.jsx("span",{className:"text-xs text-low-em truncate",children:d.label??d.name})]},d.name))}),o.jsx("div",{className:"shrink-0 pl-5",style:{width:n+20,height:n},children:o.jsxs(Dx,{width:n,height:n,children:[o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})}),o.jsx(Vt,{data:r,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:u,outerRadius:c,stroke:"none",children:r.map(d=>o.jsx(bn,{fill:`var(--color-${d.name})`},d.name))})]})})]})})]})})},BH=({data:e,donutSize:t=160,className:r})=>{const n=On(e),a=Da(e),i=t/2,s=i-2,l=i*.5;return o.jsx(ot,{className:r,children:o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(Nr.Provider,{value:{config:n},children:o.jsx("div",{className:"flex justify-center",style:a,children:o.jsxs(Dx,{width:t,height:t,children:[o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})}),o.jsx(Vt,{data:e,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:l,outerRadius:s,stroke:"none",children:e.map(c=>o.jsx(bn,{fill:`var(--color-${c.name})`},c.name))})]})})}),o.jsx(he,{}),o.jsx("div",{className:"flex items-center",style:a,children:e.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(he,{direction:"vertical",height:"32px"}),o.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.name})`})}),o.jsx("span",{className:"text-xs text-low-em",children:c.label??c.name})]})]},c.name))})]})})},FH=({title:e,titleIcon:t,data:r,centerTitle:n,centerSubtitle:a,chartSize:i=160,className:s})=>{const l=On(r),c=Da(r),u=r.map(d=>({...d,fill:`var(--color-${d.name})`}));return o.jsx(ot,{className:s,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-10",children:[o.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&o.jsx(ie,{size:"md",color:"currentColor",children:t})]}),o.jsx(he,{}),o.jsx(Nr.Provider,{value:{config:l},children:o.jsxs("div",{className:"flex items-center gap-4",style:c,children:[o.jsx("div",{className:"flex flex-col flex-1 min-w-0 divide-y divide-surface-3 pr-8",children:r.map(d=>o.jsxs("div",{className:"flex items-center gap-2 py-3",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${d.name})`})}),o.jsx("span",{className:"text-xs text-low-em truncate",children:d.label??d.name})]},d.name))}),o.jsx("div",{className:"shrink-0 pl-5",style:{width:i+20,height:i},children:o.jsxs(IO,{width:i,height:i,data:u,innerRadius:i*.3,outerRadius:i*.52,barSize:6,barGap:4,startAngle:90,endAngle:-270,children:[(a||n)&&o.jsx(Sx,{component:({width:d,height:f})=>{const h=d/2,p=f/2;return o.jsxs("text",{textAnchor:"middle",children:[a&&o.jsx("tspan",{x:h,y:p-8,fill:"var(--low-em)",fontSize:"12",children:a}),n&&o.jsx("tspan",{x:h,y:p+16,fill:"var(--high-em)",fontSize:"24",fontWeight:"600",fontFamily:"'Space Grotesk', sans-serif",children:n})]})}}),o.jsx(Ma,{dataKey:"value",background:{fill:"var(--surface-2)"},cornerRadius:4}),o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})})]})})]})})]})})},qH=({data:e,centerTitle:t,centerSubtitle:r,chartSize:n=160,className:a})=>{const i=On(e),s=Da(e),l=e.map(c=>({...c,fill:`var(--color-${c.name})`}));return o.jsx(ot,{className:a,children:o.jsxs("div",{className:"flex flex-col gap-6",children:[o.jsx(Nr.Provider,{value:{config:i},children:o.jsx("div",{className:"flex justify-center",style:s,children:o.jsxs(IO,{width:n,height:n,data:l,innerRadius:n*.3,outerRadius:n*.52,barSize:6,barGap:4,startAngle:90,endAngle:-270,children:[(r||t)&&o.jsx(Sx,{component:({width:c,height:u})=>{const d=c/2,f=u/2;return o.jsxs("text",{textAnchor:"middle",children:[r&&o.jsx("tspan",{x:d,y:f-8,fill:"var(--low-em)",fontSize:"12",children:r}),t&&o.jsx("tspan",{x:d,y:f+16,fill:"var(--high-em)",fontSize:"24",fontWeight:"600",fontFamily:"'Space Grotesk', sans-serif",children:t})]})}}),o.jsx(Ma,{dataKey:"value",background:{fill:"var(--surface-2)"},cornerRadius:4}),o.jsx(We,{content:o.jsx(qt,{hideLabel:!0})})]})})}),o.jsx(he,{}),o.jsx("div",{className:"flex items-center",style:s,children:e.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(he,{direction:"vertical",height:"32px"}),o.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.name})`})}),o.jsx("span",{className:"text-xs text-low-em",children:c.label??c.name})]})]},c.name))})]})})},WH=({data:e,series:t,chartSize:r=200,fillOpacity:n=.2,className:a})=>{const i=t.map(c=>({name:c.key,label:c.label,color:c.color})),s=On(i),l=Da(i);return o.jsx(ot,{className:a,children:o.jsx("div",{className:"flex flex-col gap-6",children:o.jsxs(Nr.Provider,{value:{config:s},children:[o.jsx("div",{className:"flex justify-center",style:l,children:o.jsxs(CH,{width:r,height:r,data:e,children:[o.jsx(P5,{stroke:"var(--surface-2)"}),o.jsx(Sn,{dataKey:"axis",tick:{fill:"var(--low-em)",fontSize:11}}),o.jsx(We,{content:o.jsx(qt,{indicator:"dot"})}),t.map(c=>o.jsx(ao,{dataKey:c.key,stroke:`var(--color-${c.key})`,fill:`var(--color-${c.key})`,fillOpacity:n,strokeWidth:2},c.key))]})}),o.jsx(he,{}),o.jsx("div",{className:"flex items-center",style:l,children:t.map((c,u)=>o.jsxs(O.default.Fragment,{children:[u>0&&o.jsx(he,{direction:"vertical",height:"32px"}),o.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[o.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:o.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.key})`})}),o.jsx("span",{className:"text-xs text-low-em",children:c.label})]})]},c.key))})]})})})},Pj=4,Kp=6,HH=(e,t,r,n,a)=>{if(!r||!n||n<=0)return"";const i=Math.min(a,r/2,n/2);return`M${e+i},${t} L${e+r-i},${t} Q${e+r},${t} ${e+r},${t+i} L${e+r},${t+n} L${e},${t+n} L${e},${t+i} Q${e},${t} ${e+i},${t} Z`},fh=(e,t=Kp)=>r=>{const{x:n,y:a,width:i,height:s,fill:l}=r;return!i||!s||s<=0?null:o.jsx("path",{d:HH(n,a,i,s+e,t),fill:l})},VH=({data:e,series:t,height:r=220,barSize:n=20,stacked:a=!0,showGrid:i=!0,showYAxis:s=!0,className:l})=>{const c=t.map(d=>({name:d.key,label:d.label,color:d.color})),u=On(c);return o.jsx(ot,{className:l,children:o.jsx(Bx,{config:u,height:r,className:"rounded-none bg-transparent",children:o.jsxs(EO,{data:e,accessibilityLayer:!0,children:[i&&o.jsx(oi,{vertical:!1,stroke:"var(--surface-2)"}),o.jsx(pr,{dataKey:"label",tickLine:!1,axisLine:!1,tickMargin:16,tick:{fill:"var(--low-em)",fontSize:12}}),s&&o.jsx(Lr,{tickLine:!1,axisLine:!1,tickMargin:16,tick:{fill:"var(--low-em)",fontSize:12}}),o.jsx(We,{content:o.jsx(qt,{}),cursor:{fill:"var(--surface-2)"}}),o.jsx(Zt,{content:o.jsx(Vs,{}),verticalAlign:"top"}),t.map((d,f)=>{if(a){const h=f===0,g=f===t.length-1?fh(0):h?fh(Pj):fh(Pj,0);return o.jsx(jr,{dataKey:d.key,stackId:"stack",fill:`var(--color-${d.key})`,shape:g,barSize:n},d.key)}return o.jsx(jr,{dataKey:d.key,fill:`var(--color-${d.key})`,barSize:n,radius:[Kp,Kp,0,0]},d.key)})]})})})},UH=({data:e,chartType:t="bar",color:r,seriesLabel:n,chartHeight:a=80,showGrid:i=!0,showXAxis:s=!0,showYAxis:l=!0,className:c,...u})=>{const f=`kpiAreaGradient-${O.default.useId()}`,h=qx(r,0),p={value:{label:n,color:h}},g=u.title!==void 0||u.value!==void 0;return o.jsx(ot,{className:c,children:o.jsxs("div",{className:"flex flex-col gap-4",children:[g&&o.jsx(La,{title:u.title??"",value:u.value??"",titleIcon:u.titleIcon}),o.jsx(Bx,{config:p,height:a,className:"rounded-none bg-transparent",children:t==="bar"?o.jsxs(EO,{data:e,accessibilityLayer:!0,children:[i&&o.jsx(oi,{vertical:!1,stroke:"var(--surface-2)"}),s&&o.jsx(pr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),o.jsx(We,{content:o.jsx(qt,{}),cursor:{fill:"var(--surface-2)"}}),o.jsx(jr,{dataKey:"value",fill:"var(--color-value)",radius:[4,4,0,0],barSize:24})]}):t==="area"?o.jsxs(SH,{data:e,accessibilityLayer:!0,children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:f,x1:"0",y1:"0",x2:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:"var(--color-value)",stopOpacity:.2}),o.jsx("stop",{offset:"95%",stopColor:"var(--color-value)",stopOpacity:0})]})}),i&&o.jsx(oi,{vertical:!1,stroke:"var(--surface-2)"}),s&&o.jsx(pr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),l&&o.jsx(Lr,{tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8,width:40}),o.jsx(We,{content:o.jsx(qt,{})}),o.jsx(Zt,{content:o.jsx(Vs,{}),verticalAlign:"top"}),o.jsx(Wr,{dataKey:"value",stroke:"var(--color-value)",fill:`url(#${f})`,strokeWidth:2,dot:!1})]}):o.jsxs(jH,{data:e,accessibilityLayer:!0,children:[i&&o.jsx(oi,{vertical:!1,stroke:"var(--surface-2)"}),s&&o.jsx(pr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),l&&o.jsx(Lr,{tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8,width:40}),o.jsx(We,{content:o.jsx(qt,{})}),o.jsx(Zt,{content:o.jsx(Vs,{}),verticalAlign:"top"}),o.jsx(io,{dataKey:"value",stroke:"var(--color-value)",strokeWidth:2,dot:!1})]})})]})})},KH={danger:"bg-danger-main",warning:"bg-warning-main",info:"bg-info-main",success:"bg-success-main"},GH={sm:{title:"text-base",subtitle:"text-sm",iconSize:20,iconBox:"size-10"},md:{title:"text-xl",subtitle:"text-base",iconSize:28,iconBox:"size-14"},lg:{title:"text-2xl",subtitle:"text-lg",iconSize:32,iconBox:"size-16"}},MO=P.forwardRef(({alertTitle:e,descriptionHighlight:t,description:r,variant:n="danger",size:a="md",icon:i,iconSize:s,iconBoxSize:l,titleSize:c,subtitleSize:u,actionLabel:d="Abrir detalles",onAction:f,buttonVariant:h="brand",buttonHierarchy:p="primary",buttonSize:g="md",className:x,...m},v)=>{const b=GH[a],w=s??b.iconSize,C=l??b.iconBox,y=c??b.title,j=u??b.subtitle;return o.jsx("div",{ref:v,className:te.twMerge("bg-white w-full flex flex-col overflow-hidden",x),...m,children:o.jsxs("div",{className:"flex flex-col items-center text-center gap-12 p-10",children:[o.jsx("span",{className:N.clsx(C,"rounded-2xl flex items-center justify-center shrink-0",KH[n]),children:i??o.jsx(F.Warning2,{size:w,color:"white",variant:"Bold"})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:N.clsx(y,"font-semibold text-high-em"),children:e}),(t||r)&&o.jsxs("p",{className:N.clsx(j,"text-med-em"),children:[t&&o.jsx("strong",{children:t}),t&&r&&" ",r]})]}),d&&o.jsx(V,{variant:h,hierarchy:p,size:g,className:"w-full",onClick:f,children:d})]})})});MO.displayName="AlertCallout";exports.AICommentaryIcon=Yj;exports.AIMessage=r2;exports.ActivityFeed=i3;exports.AddIcon=l6;exports.AlertCallout=MO;exports.AlertDialog=f2;exports.AlertDialogAction=y2;exports.AlertDialogCancel=b2;exports.AlertDialogContent=p2;exports.AlertDialogDescription=g2;exports.AlertDialogFooter=v2;exports.AlertDialogHeader=m2;exports.AlertDialogTitle=x2;exports.AlertDialogTrigger=h2;exports.AppointmentDetail=Ro;exports.AppointmentRow=$o;exports.ArrowNarrowDownIcon=Xj;exports.AttachmentMessage=P2;exports.AuthActionWidget=RP;exports.AuthEmailVerificationWidget=zP;exports.AuthFormWidget=IP;exports.AuthSocialOptionsWidget=LP;exports.Avatar=Bt;exports.AvatarGroup=tm;exports.BREAKPOINTS=Ki;exports.Badge=Ge;exports.BookOutlined=c6;exports.Box2Icon=n6;exports.BoxIcon=a6;exports.Breadcrumb=O6;exports.BreadcrumbEllipsis=T6;exports.BreadcrumbItem=P6;exports.BreadcrumbLink=A6;exports.BreadcrumbList=N6;exports.BreadcrumbPage=_6;exports.BreadcrumbSeparator=k6;exports.Button=V;exports.ButtonDropdown=E6;exports.ButtonGroup=mr;exports.CHART_PALETTE=Up;exports.CONTAINER=$j;exports.CONTAINER_PADDING=Rj;exports.CSS_VARIABLES=Bj;exports.CalendarIcon=v6;exports.CalendarIcon2=c2;exports.Card=R6;exports.CardAction=xm;exports.ChartContainer=Bx;exports.ChartContext=Nr;exports.ChartLegendContent=Vs;exports.ChartTooltipContent=qt;exports.ChatCollapsibleCheck=w2;exports.ChatCollapsibleContainer=Qs;exports.ChatCollapsibleDialog=j2;exports.ChatCommandList=V6;exports.ChatCommandListItem=mh;exports.ChatHeader=C2;exports.ChatHistorial=O2;exports.ChatHistorialItem=S2;exports.ChatIcon=Zj;exports.ChatInputText=N2;exports.ChatLayout=vN;exports.ChatMessage=li;exports.ChatMessageOptions=xh;exports.ChatPanel=A2;exports.ChatTypingIndicator=rm;exports.Checkbox=Dr;exports.ChevronDownIcon=Jp;exports.ChevronUpIcon=em;exports.Chip=jN;exports.CircleIcon=o6;exports.ColorPalette=ON;exports.ColumnHandler=NN;exports.ColumnHeader=nm;exports.ComboBox=TN;exports.ConditionalBuilder=$A;exports.ContainerWithCompounds=Us;exports.ContextualMenu=EN;exports.CopyIcon=Zs;exports.DataArrowsOutlined=h6;exports.DatePickerInput=q3;exports.DateRangePicker=mm;exports.DeleteConfirmationModal=U2;exports.Divider=he;exports.DragAndDropListItem=am;exports.DraggableListRow=D3;exports.Drawer=h4;exports.DropLayoutPicker=gm;exports.DropLayoutPickerContent=ym;exports.DropLayoutPickerTrigger=vm;exports.DropMenu=Wt;exports.DropModal=Wn;exports.DropModalBody=Un;exports.DropModalClose=E3;exports.DropModalContent=Hn;exports.DropModalFooter=Cm;exports.DropModalFooterActions=Kn;exports.DropModalHeader=Vn;exports.DropModalTitle=jm;exports.DropModalTrigger=wm;exports.DropPlaceholder=ci;exports.DropSizePicker=Sm;exports.DropSizePickerContent=Nm;exports.DropSizePickerTrigger=Om;exports.DropZone=_2;exports.Dropdown=Te;exports.DropdownMenu=$N;exports.Edit2Icon=u2;exports.EmptyState=ht;exports.ErrorBoundary=LN;exports.ErrorState=k2;exports.ExpressionCard=U3;exports.ExpressionPanel=RA;exports.ExpressionPanelDivider=K3;exports.EyeIcon=n2;exports.EyeOffIcon=a2;exports.FilterConditionRow=W3;exports.FilterFunnel02Icon=Qj;exports.FlashIcon=l2;exports.FloatingBar=DN;exports.Footer=nl;exports.FormFieldGroup=Yi;exports.GridDraggableItem=T2;exports.Header=rl;exports.HeaderTabs=x3;exports.Icon=ie;exports.ImageUploader=VN;exports.InfoIcon=Yp;exports.InfoLabel=KN;exports.InputField=xe;exports.InputSearch=sm;exports.InvoiceCard=HP;exports.KPIAutomationTrigger=kH;exports.KPIBarChart=VH;exports.KPICard=ot;exports.KPIChart=UH;exports.KPIDetailedMetric=_H;exports.KPIDonutChart=DH;exports.KPIPieChart=zH;exports.KPIPieMetrics=BH;exports.KPIProgressBar=TH;exports.KPIProgressCircle=EH;exports.KPIProgressHalfCircle=IH;exports.KPIProgressMetrics=MH;exports.KPIQuickActionList=LH;exports.KPIRadarMetrics=WH;exports.KPIRadialChart=FH;exports.KPIRadialMetrics=qH;exports.KPISingleValue=OH;exports.KPISingleValueAction=NH;exports.KPISingleValueContent=La;exports.KPISlider=RH;exports.KPIValueBreakdown=Fx;exports.Kanban=X3;exports.KanbanCard=xl;exports.KanbanColumn=Am;exports.Kbd=Ya;exports.LAYOUT=WO;exports.LAYOUT_SPACING=zj;exports.LabelIcon=ft;exports.LabelWithIcon=s4;exports.LabelWithTooltip=W2;exports.LayerIcon=s2;exports.LeftArrowIcon=e2;exports.Legend=Zt;exports.Link=$r;exports.ListItem=Qt;exports.LogicOperatorConnector=F3;exports.MaximizeIcon=Gs;exports.MessageProgrammingOutlined=u6;exports.Modal=al;exports.ModalBody=cl;exports.ModalClose=um;exports.ModalContent=ol;exports.ModalDescription=cm;exports.ModalFooter=ul;exports.ModalFooterActions=V2;exports.ModalHeader=sl;exports.ModalTitle=ll;exports.ModalTrigger=il;exports.ModuleCard=$3;exports.ModuleCardHeader=Pm;exports.ModuleFieldItem=R3;exports.ModuleSummaryCard=S3;exports.MoreIcon=o2;exports.NAVBAR=Dj;exports.OptionsEditor=q2;exports.PANEL_DEFAULTS=Re;exports.Panel=Uj;exports.PanelHeader=pm;exports.PanelLayout=Hj;exports.PanelMain=Kj;exports.PasswordResetWidget=$P;exports.PlanPricingCard=t3;exports.Planner=G3;exports.PlusCircleIcon=b6;exports.ProductIcon=dl;exports.ProgrammingArrowsOutlined=f6;exports.Progress=Js;exports.ProgressBar=gh;exports.ProgressCircle=qn;exports.ProgressTracker=m4;exports.ProjectActionCard=fP;exports.ProjectCard=r3;exports.ProjectCardPlan=cP;exports.ProjectOverviewCard=C3;exports.QuestionCircle=Xp;exports.QuickActions=x4;exports.Radio=v4;exports.RecoveryWidget=MP;exports.RelatedDataCard=L3;exports.RightArrowIcon=Qp;exports.SIDEBAR=Lj;exports.Section=Ks;exports.SectionFeatures=Mj;exports.SectionHero=Ij;exports.SelectableCard=n3;exports.SettingsCard=hP;exports.ShareIcon=m6;exports.Sidebar=o4;exports.SkalarLogo=To;exports.SkalarLogoNoText=Eo;exports.SlashIcon=C6;exports.SliderPointerDown=g6;exports.SliderPointerUp=x6;exports.SliderThumbIcon=hh;exports.SplitPanelLayout=Gj;exports.Stepper=a3;exports.StraightInfoIcon=Qr;exports.SupportCard=dP;exports.Switcher=fl;exports.TabbedContainer=K4;exports.Table=O4;exports.TableBody=A4;exports.TableCard=pP;exports.TableCell=vh;exports.TableColumnFilter=M4;exports.TableColumnHeader=l3;exports.TableColumnVisibility=$4;exports.TableEmptyState=c3;exports.TableHeader=P4;exports.TableHeading=I4;exports.TablePagination=E4;exports.TableProvider=s3;exports.TableRoot=N4;exports.TableRow=Io;exports.Tabs=fm;exports.Tag=Rr;exports.TextArea=hl;exports.ThemeToggle=Y4;exports.ToastComponent=w3;exports.ToastProvider=eP;exports.Toggle=Zi;exports.Tooltip=Sa;exports.Tooltip$1=We;exports.TrashIcon=Ys;exports.TypesPanel=hm;exports.TypesPanelBodyGrid=rP;exports.TypesPanelBodyList=nP;exports.TypesPanelHeader=oP;exports.TypesPanelHeaderSearch=sP;exports.UnionIcon=i2;exports.UploadImageIcon=Jj;exports.UserMenu=lP;exports.VideoPlayOutlined=d6;exports.VisualComposer=NP;exports.WidgetBuilderEdit=bA;exports.WidgetBuilderItemHoverAction=pl;exports.WidgetContainer=gn;exports.WidgetPreview=vA;exports.WidgetSidebar=qP;exports.WidgetSummaryCard=O3;exports.WorkspaceSettings=uP;exports.XMark=nt;exports.XMarkAlert=t2;exports.addSelectionColumn=H4;exports.calculateDraggedPanelPercentage=qj;exports.calculateHeaderWidths=FN;exports.calculatePanelPercentage=_o;exports.createMediaQuery=UO;exports.findPanelById=Ut;exports.getCentralWidth=XO;exports.getCurrentBreakpoint=GO;exports.getDefaultExportFromCjs=Oe;exports.getGapClass=er;exports.getTotalPanelsWidth=Wj;exports.getTotalSideWidth=ko;exports.initializePanelsState=Po;exports.matchesBreakpoint=KO;exports.parseColumnConfig=d3;exports.parseTableConfig=W4;exports.productsApiResponse=U4;exports.productsTableConfig=p3;exports.productsTableData=m3;exports.pxToCss=VO;exports.pxToRem=HO;exports.useChart=zx;exports.useContainerHeight=J6;exports.useContainerWidth=tl;exports.usePanelState=JO;exports.useSidebar=pn;exports.useTableContext=tr;exports.useToast=J4;exports.usersApiResponse=V4;exports.usersTableConfig=f3;exports.usersTableData=h3;exports.visualComposerCollision=PP;
|
|
87
|
+
//# sourceMappingURL=index-BcY0Jg1E.cjs.map
|