@skalar-saas/design-system 0.3.13 → 0.3.14
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-BM5SGKq4.js → index-BuBsLqua.js} +2 -2
- package/dist/{index-BM5SGKq4.js.map → index-BuBsLqua.js.map} +1 -1
- package/dist/{index-Dv3pe3q3.cjs → index-C7PgPp9S.cjs} +2 -2
- package/dist/{index-Dv3pe3q3.cjs.map → index-C7PgPp9S.cjs.map} +1 -1
- package/dist/{index-XZn4-pcW.cjs → index-DheDAuUg.cjs} +3 -3
- package/dist/index-DheDAuUg.cjs.map +1 -0
- package/dist/{index-BMkSah-2.js → index-Di-V1qAb.js} +4 -4
- package/dist/{index-XZn4-pcW.cjs.map → index-Di-V1qAb.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/index-BMkSah-2.js.map +0 -1
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
Q ${u} 44, ${u+4} 44
|
|
17
17
|
L ${c-4} 44
|
|
18
18
|
Q ${c} 44, ${c} 48
|
|
19
|
-
`;return s.jsxs("div",{className:O.clsx("relative h-full cursor-col-resize",r),style:{width:9},children:[s.jsx("div",{className:"absolute top-0",style:{[d]:0,width:1,height:`calc(50% - ${48/2}px)`,backgroundColor:"var(--surface-3)"}}),s.jsx("div",{className:"absolute bottom-0",style:{[d]:0,width:1,height:`calc(50% - ${48/2}px)`,backgroundColor:"var(--surface-3)"}}),s.jsxs("div",{className:"absolute top-1/2 left-0 -translate-y-1/2",style:{width:9,height:48},children:[s.jsx("svg",{width:9,height:48,viewBox:"0 0 9 48",fill:"none",className:"absolute inset-0",children:s.jsx("path",{d:f,fill:t,stroke:"var(--surface-3)",strokeWidth:"1"})}),s.jsxs("div",{className:"absolute left-1/2 top-1/2 flex flex-col gap-[2px] items-center",style:{transform:"translate(-50%, -50%)"},children:[s.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"}),s.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"}),s.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"})]})]})]})},a2=S.default.memo(({id:e,side:t,children:r,resizable:n=!0,panelBg:a="var(--surface-1)",className:i})=>{const{panels:o,onResizeStart:l,onResize:c,onResizeEnd:u,onCloseZoneChange:d,getPanelState:f,minCentralWidth:h,containerRef:p}=g5(),v=f(e),x=P.useRef(!1),m=P.useRef(!1),g=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:v}),N=Is(o[t==="left"?"right":"left"]),A=o[t],k=A.findIndex(D=>D.id===e),I=A.filter((D,F)=>D.open?t==="right"?F>k:F<k:!1).reduce((D,F)=>D+F.width,0),_=A.filter((D,F)=>!D.open||D.id===e?!1:t==="right"?F<k:F>k).reduce((D,F)=>D+F.width,0);y.current={side:t,oppositeSideWidth:N,minCentralWidth:h,externalPanelsWidth:I,internalPanelsWidth:_,panelState:v};const E=P.useRef(c),T=P.useRef(u),R=P.useRef(d);E.current=c,T.current=u,R.current=d;const M=P.useCallback(D=>{x.current&&(m.current=!0,!g.current&&(g.current=requestAnimationFrame(()=>{g.current=null;const F=p.current;if(!F)return;const H=F.getBoundingClientRect(),G=H.width,J=D.clientX-H.left,{side:ne,oppositeSideWidth:X,minCentralWidth:re,externalPanelsWidth:ce,internalPanelsWidth:K}=y.current,ee=e2(ne,J,G,X,re,ce,K),z=ee<w.current&&v5(ee);z!==b.current&&(b.current=z,R.current(e,z)),E.current(e,ee)})))},[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:F}=y.current;!D&&F&&F.width<Qx(F.width)&&E.current(e,Qx(F.width)),m.current=!1,b.current=!1,T.current(e,D),document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",$)},[e,M]),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",M),document.addEventListener("mouseup",$)},[e,M,$,l]);if(P.useEffect(()=>()=>{g.current&&cancelAnimationFrame(g.current),document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",$)},[M,$]),P.useEffect(()=>{if(v?.open&&!v?.exiting){const D=setTimeout(()=>{C.current=!0},150);return()=>clearTimeout(D)}else v?.open||(C.current=!1)},[v?.open,v?.exiting]),!v||!v.open&&!v.exiting)return null;const q=t==="left"?"right":"left",U=()=>v.exiting?t==="left"?"animate-panel-exit":"animate-panel-exit-right":C.current?"":t==="left"?"animate-panel-enter":"animate-panel-enter-right";return s.jsxs("div",{className:O.clsx("h-full relative flex-shrink-0","transition-[width] duration-100 ease-out",v.isResizing&&"transition-none",i),style:{width:`${v.width}%`},"data-panel":e,"data-panel-side":t,"data-in-close-zone":v.inCloseZone,"data-exiting":v.exiting,children:[s.jsx("div",{className:O.clsx("absolute inset-0 overflow-hidden","transition-opacity duration-100",U(),v.inCloseZone?"opacity-50":"opacity-100"),style:{backgroundColor:a},children:r}),n&&!v.exiting&&s.jsx("div",{className:O.clsx("absolute inset-y-0 z-50",q==="right"?"right-0 translate-x-full":"left-0 -translate-x-full"),onMouseDown:L,children:s.jsx(n2,{side:q,fillColor:a})}),!n&&s.jsx("div",{className:O.clsx("absolute top-0 bottom-0 w-px bg-surface-3",q==="right"?"right-0":"left-0")})]})});a2.displayName="Panel";const i2=S.default.memo(({children:e,className:t})=>s.jsx("div",{className:O.clsx("flex-1 min-w-0 h-full overflow-hidden relative","transition-all duration-100 ease-out",t),"data-panel-main":!0,children:e}));i2.displayName="PanelMain";function Jx(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 b5(e){if(!e||typeof e!="object")return!1;const t=e;return Array.isArray(t.left)&&Array.isArray(t.right)&&t.left.every(Jx)&&t.right.every(Jx)}function w5(e){const{config:t,persist:r=!1,persistKey:n="panel-state"}=e,a=P.useMemo(()=>{const m=new Map;return t.forEach(g=>m.set(g.id,g)),m},[t]),[i,o]=P.useState(()=>ks(t,1920)),[l,c]=P.useState(!1);P.useEffect(()=>{if(r&&typeof window<"u")try{const m=localStorage.getItem(n);if(m){const g=JSON.parse(m);if(b5(g)){o(g),c(!0);return}}}catch{}typeof window<"u"&&o(ks(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=>{o(g=>{const b=Kt(g,m);if(!b)return g;const{side:w,panel:C}=b;if(C.open)return{...g,[w]:g[w].map(L=>L.id===m?{...L,exiting:!0,inCloseZone:!1}:L)};const y=w==="left"?"right":"left",j=a.get(m),N=typeof window<"u"?window.innerWidth:1920,A=j?Es(j.defaultWidth,N):20,k=g[y].filter(L=>L.open).reduce((L,q)=>L+q.width,0),I=g[w].filter(L=>L.open&&L.id!==m),_=I.reduce((L,q)=>L+q.width,0),E=100-k-Re.minCentralPercent;if(_+A<=E)return{...g,[w]:g[w].map(L=>L.id===m?{...L,open:!0,width:A}:L)};const T=I.length*Re.snapMinWidth,R=E-T,M=Math.min(A,Math.max(Re.snapMinWidth,R)),$=E-M;if(_>0&&$<_){const L=$/_;return{...g,[w]:g[w].map(q=>{if(q.id===m)return{...q,open:!0,width:M};if(q.open){const U=Math.max(Re.snapMinWidth,q.width*L);return{...q,width:U}}return q})}}return{...g,[w]:g[w].map(L=>L.id===m?{...L,open:!0,width:M}:L)}})},[a]),d=P.useCallback((m,g)=>{o(b=>{const w=Kt(b,m);if(!w)return b;const{side:C,panel:y}=w,N=b[C==="left"?"right":"left"].filter(T=>T.open).reduce((T,R)=>T+R.width,0),A=b[C].filter(T=>T.open&&T.id!==m),k=A.reduce((T,R)=>T+R.width,0),I=100-N-Re.minCentralPercent,_=g+k;if(_<=I)return{...b,[C]:b[C].map(T=>T.id===m?{...T,width:g}:T)};if(g>y.width&&k>0){const T=_-I,R=Math.max(A.length*Re.snapMinWidth,k-T),M=I-R,$=R/k;return{...b,[C]:b[C].map(L=>{if(L.id===m)return{...L,width:M};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(g,I-k)}:T)}})},[]),f=P.useCallback(m=>{o(g=>{const b=Kt(g,m);if(!b||b.panel.open)return g;const{side:w}=b,C=w==="left"?"right":"left",y=a.get(m),j=typeof window<"u"?window.innerWidth:1920,N=y?Es(y.defaultWidth,j):20,A=g[C].filter($=>$.open).reduce(($,L)=>$+L.width,0),k=g[w].filter($=>$.open&&$.id!==m),I=k.reduce(($,L)=>$+L.width,0),_=100-A-Re.minCentralPercent;if(I+N<=_)return{...g,[w]:g[w].map($=>$.id===m?{...$,open:!0,width:N}:$)};const E=k.length*Re.snapMinWidth,T=_-E,R=Math.min(N,Math.max(Re.snapMinWidth,T)),M=_-R;if(I>0&&M<I){const $=M/I;return{...g,[w]:g[w].map(L=>{if(L.id===m)return{...L,open:!0,width:R};if(L.open){const q=Math.max(Re.snapMinWidth,L.width*$);return{...L,width:q}}return L})}}return{...g,[w]:g[w].map($=>$.id===m?{...$,open:!0,width:R}:$)}})},[a]),h=P.useCallback(m=>{o(g=>{const b=Kt(g,m);if(!b||!b.panel.open||b.panel.exiting)return g;const{side:w}=b;return{...g,[w]:g[w].map(C=>C.id===m?{...C,exiting:!0,inCloseZone:!1}:C)}})},[]),p=P.useCallback((m,g)=>{o(b=>{const w=Kt(b,m);if(!w)return b;const{side:C}=w;return{...b,[C]:b[C].map(y=>y.id===m?{...y,inCloseZone:g}:y)}})},[]),v=P.useCallback(m=>{o(g=>{const b=Kt(g,m);if(!b)return g;const{side:w}=b;return{...g,[w]:g[w].map(C=>C.id===m?{...C,exiting:!0,inCloseZone:!1}:C)}}),setTimeout(()=>{o(g=>{const b=Kt(g,m);if(!b)return g;const{side:w}=b;return{...g,[w]:g[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;o(ks(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 g=m.map(b=>setTimeout(()=>{o(w=>{const C=Kt(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()=>{g.forEach(b=>clearTimeout(b))}},[i]),{panels:i,togglePanel:u,resizePanel:d,openPanel:f,closePanel:h,resetPanels:x,handleCloseZoneChange:p,handlePanelClose:v}}const s2=S.default.memo(({mainContent:e,sidePanel:t,isPanelOpen:r,onPanelExited:n,panelWidth:a=400,panelPosition:i="right",animationDuration:o=75,className:l,mainContentBg:c="bg-white",sidePanelBg:u,resizable:d=!0,minWidth:f=280,maxWidth:h=800,handleFillColor:p="var(--surface-1)",onResize:v})=>{const[x,m]=P.useState(!1),[g,b]=P.useState(r),[w,C]=P.useState(a),[y,j]=P.useState(!1),N=P.useRef(!1),A=P.useRef({clientX:0,width:0}),k=P.useRef(null),[I,_]=P.useState(0);P.useEffect(()=>{const F=k.current;if(!F)return;const H=()=>{const J=F.offsetHeight;J>0&&_(J)};H();const G=new ResizeObserver(H);return G.observe(F),()=>G.disconnect()},[g]),P.useEffect(()=>{if(r)b(!0),m(!1);else if(g){m(!0);const F=setTimeout(()=>{b(!1),m(!1),n?.()},o);return()=>clearTimeout(F)}},[r,o,g,n]);const E=P.useCallback(F=>{if(!N.current)return;const H=F.clientX-A.current.clientX,G=i==="right"?A.current.width-H:A.current.width+H,J=Math.max(f,Math.min(h,G));C(J),v?.(J)},[i,f,h,v]),T=P.useCallback(()=>{N.current&&(N.current=!1,j(!1),document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",T))},[E]),R=P.useCallback(F=>{F.preventDefault(),A.current={clientX:F.clientX,width:w},N.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 M=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":`${o}ms`,D=()=>s.jsx("div",{ref:k,className:"relative h-full transition-all ease-out",style:{width:r?`${w}px`:"0px",opacity:r?1:0,transitionDuration:U},children:g&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:O.clsx("h-full overflow-hidden",u,x?L:$),children:t}),d&&!x&&s.jsx("div",{className:O.clsx("absolute top-0 z-50",q==="right"?"right-0 translate-x-full":"left-0 -translate-x-full"),onMouseDown:R,children:s.jsx(n2,{side:q,height:I,fillColor:p})})]})});return s.jsx("div",{className:O.clsx("w-full flex flex-col",l),style:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[i==="left"&&D(),s.jsx("div",{className:O.clsx("relative flex flex-col ease-out overflow-hidden",c),style:{width:M,transition:"width",transitionDuration:U},children:s.jsx("div",{className:"relative flex-1 overflow-hidden",children:e})}),i==="right"&&D()]})})});s2.displayName="SplitPanelLayout";const o2=S.default.forwardRef(({variant:e="full",sidebar:t,className:r,children:n,...a},i)=>e==="sidebar-left"?s.jsxs("div",{ref:i,className:Q.twMerge(O.clsx("flex h-full w-full",r)),...a,children:[s.jsx("aside",{className:"h-full w-64 shrink-0 overflow-y-auto border-r border-surface-3 bg-white",children:t}),s.jsx("div",{className:"min-w-0 flex-1 overflow-auto",children:n})]}):e==="centered"?s.jsx("div",{ref:i,className:Q.twMerge(O.clsx("h-full w-full overflow-auto",r)),...a,children:s.jsx(Yi,{size:"medium",className:"h-full",children:n})}):s.jsx("div",{ref:i,className:Q.twMerge(O.clsx("h-full w-full overflow-auto",r)),...a,children:n}));o2.displayName="PageLayout";const tr=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",l2=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.jsx("mask",{id:"mask0_1135_15829",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:s.jsx("path",{d:"M20 0H0V20H20V0Z",fill:"white"})}),s.jsxs("g",{mask:"url(#mask0_1135_15829)",children:[s.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"}),s.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"}),s.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"}),s.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"})]})]}),c2=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.jsxs("g",{clipPath:"url(#clip0_1314_55824)",children:[s.jsx("mask",{id:"mask0_1314_55824",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:s.jsx("path",{d:"M19.5 0.5V19.5H0.5V0.5H19.5Z",fill:"white",stroke:"white"})}),s.jsxs("g",{mask:"url(#mask0_1314_55824)",children:[s.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"}),s.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"}),s.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"})]})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1314_55824",children:s.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),j5=({size:e,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),u2=P.forwardRef(j5),C5=({size:e,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),d2=P.forwardRef(C5),S5=({size:e,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),N5=P.forwardRef(S5),O5=({size:e=20,className:t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 27 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:s.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"})}),P5=({size:e,...t},r)=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:e,height:e,fill:"none",ref:r,...t,children:[s.jsx("g",{clipPath:"url(#a)",children:s.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"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"a",children:s.jsx("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}),A5=P.forwardRef(P5),_5=({title:e,titleId:t,size:r,...n},a)=>s.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?s.jsx("title",{id:t,children:e}):null,s.jsxs("g",{clipPath:"url(#a)",children:[s.jsx("mask",{id:"b",width:24,height:24,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"},children:s.jsx("path",{fill:"#fff",d:"M24 0H0v24h24V0Z"})}),s.jsxs("g",{fill:"#fff",mask:"url(#b)",children:[s.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"}),s.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"}),s.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"})]})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"a",children:s.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),k5=P.forwardRef(_5),it=({size:e=20,className:t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:s.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"})}),f2=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 43 43",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.jsxs("g",{clipPath:"url(#clip0_50_31011)",children:[s.jsx("path",{d:"M33.9412 3.62061H14.6738V11.6106H38.0563V7.73402C38.0563 5.46567 36.2102 3.62061 33.9412 3.62061Z",fill:"#CED9F9"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_50_31011",children:s.jsx("rect",{width:"42",height:"42",fill:"white",transform:"translate(0.5 0.5)"})})})]}),rm=({size:e=16,className:t,...r})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:s.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"})}),h2=({size:e=12,...t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:s.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"})}),p2=({size:e=20,className:t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:s.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})=>s.jsx("svg",{width:e,height:e,className:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.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"})}),nm=({size:e=24,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.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"}),s.jsx("path",{d:"M11.9941 16.3909H12.0051",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),T5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.jsx("path",{d:"M10 4.57495V17.075",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M6.45801 7.07495H4.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M7.08301 9.57495H4.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),E5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.jsx("path",{d:"M6.66667 7.25L5 8.91667L6.66667 10.5833",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M13.333 7.25L14.9997 8.91667L13.333 10.5833",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M10.8337 6.9751L9.16699 10.8585",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),I5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.jsx("path",{d:"M2.09961 5.92529H17.8996",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M7.09961 1.75854V5.80854",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M12.9004 1.75854V5.43354",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"})]}),M5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.jsx("path",{d:"M11.667 1.66675L9.16699 3.75008L11.667 5.83341",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"}),s.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"}),s.jsx("path",{d:"M8.33301 18.3334L10.833 16.2501L8.33301 14.1667",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"})]}),$5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.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"}),s.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"}),s.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"}),s.jsx("path",{d:"M5 10H15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"})]}),m2=e=>s.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{clipPath:"url(#clip0_1562_62901)",children:[s.jsx("mask",{id:"mask0_1562_62901",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"21",height:"20",children:s.jsx("path",{d:"M20.418 0H0.417969V20H20.418V0Z",fill:"white"})}),s.jsxs("g",{mask:"url(#mask0_1562_62901)",children:[s.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"}),s.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"}),s.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"})]})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1562_62901",children:s.jsx("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.417969)"})})})]}),R5=({size:e,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor",ref:r,...t,children:s.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"})}),L5=P.forwardRef(R5),wh=({size:e=36,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.jsx("defs",{children:s.jsxs("filter",{id:"filter0_dd_50_34857",x:"0",y:"0",width:"36",height:"36",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[s.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),s.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"}),s.jsx("feMorphology",{radius:"2",operator:"erode",in:"SourceAlpha",result:"effect1_dropShadow_50_34857"}),s.jsx("feOffset",{dy:"2"}),s.jsx("feGaussianBlur",{stdDeviation:"2"}),s.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"}),s.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_50_34857"}),s.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"}),s.jsx("feMorphology",{radius:"2",operator:"erode",in:"SourceAlpha",result:"effect2_dropShadow_50_34857"}),s.jsx("feOffset",{dy:"4"}),s.jsx("feGaussianBlur",{stdDeviation:"4"}),s.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"}),s.jsx("feBlend",{mode:"normal",in2:"effect1_dropShadow_50_34857",result:"effect2_dropShadow_50_34857"}),s.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_50_34857",result:"shape"})]})}),s.jsxs("g",{filter:"url(#filter0_dd_50_34857)",children:[s.jsx("circle",{cx:"18",cy:"18",r:"12",fill:"var(--slider-thumb-bg, #FFFFFF)"}),s.jsx("circle",{cx:"18",cy:"18",r:"11.5",stroke:"var(--slider-thumb-stroke, #000000)"})]})]}),D5=({size:e=20,className:t})=>s.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:s.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)"})}),z5=({size:e=20,className:t})=>s.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:s.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)"})}),Ms=({width:e=165,height:t=24,className:r})=>s.jsxs("svg",{width:e,height:t,viewBox:"0 0 165 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[s.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"}),s.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"}),s.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"}),s.jsx("path",{d:"M109.376 18.1998H116.419V23.7633H102.037V0.41433H109.347V18.1998H109.376Z",fill:"currentColor"}),s.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"}),s.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"}),s.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"}),s.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"})]}),$s=({width:e=26,height:t=25,className:r})=>s.jsxs("svg",{width:e,height:t,viewBox:"0 0 26 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[s.jsxs("g",{clipPath:"url(#clip0_2642_443540)",children:[s.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"}),s.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"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_2642_443540",children:s.jsx("rect",{width:"25.7812",height:"25.0002",fill:"currentColor"})})})]}),am=({size:e=12,...t})=>s.jsx("svg",{width:e,height:e,fill:"none",...t,viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M4.8125 2.625L9.1875 7L4.8125 11.375",stroke:"#5A606B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),B5=({size:e=20,className:t})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,className:t,viewBox:"0 0 24 24",fill:"none",children:[s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"})]}),x2=({size:e=20,className:t,...r})=>s.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:[s.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),g2=({size:e=20,className:t,...r})=>s.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:[s.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),s.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"}),s.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"}),s.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]}),F5=({size:e=13,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),q5=P.forwardRef(F5),W5=({size:e=20,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),im=P.forwardRef(W5),H5=({size:e=20,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",ref:r,fill:"none",...t,children:s.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"})}),sm=P.forwardRef(H5),v2=({size:e=20,className:t,...r})=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 11 11",fill:"currentColor",width:e,height:e,className:t,...r,children:s.jsx("path",{d:"M7.39952 1.875L0 9.27452L1.32583 10.6003L8.72543 3.20073V9.1875H10.6004V0H1.41293V1.875H7.39952Z",fill:"currentColor"})}),y2=({size:e=16,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[s.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"}),s.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"}),s.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"})]}),b2=({size:e=16,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[s.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"}),s.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"}),s.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"})]}),w2=({size:e=16,className:t,...r})=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:s.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"})}),j2=({size:e=16,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[s.jsx("path",{d:"M5.3335 1.3335V3.3335",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M10.6665 1.3335V3.3335",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2.3335 6.06006H13.6668",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"}),s.jsx("path",{d:"M7.99715 9.13314H8.00314",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M5.52938 9.13314H5.53537",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M5.52938 11.1331H5.53537",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Jo=({size:e=20,className:t,...r})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[s.jsx("path",{d:"M1 4.5V3.25C1 2.005 2.005 1 3.25 1H4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M7.5 1H8.75C9.995 1 11 2.005 11 3.25V4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M11 8V8.75C11 9.995 9.995 11 8.75 11H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M4.5 11H3.25C2.005 11 1 9.995 1 8.75V7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M9 6V5M3 6H6H9H3ZM3 6V5V6ZM3 6V7V6ZM9 6V7V6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M6 3H7M6 9V3V9ZM6 9H7H6ZM6 9H5H6ZM6 3H5H6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),C2=({size:e=20,className:t,...r})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[s.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"}),s.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"}),s.jsx("path",{d:"M1.5 11H10.5",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),el=({size:e=20,className:t,...r})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[s.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"}),s.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"})]}),tl=({size:e=20,className:t,...r})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[s.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"}),s.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"}),s.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"}),s.jsx("path",{d:"M5.16406 8.25H6.82906",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M4.75 6.25H7.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),V5=({size:e=19,...t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 10 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:s.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"})}),W=S.default.forwardRef(({variant:e="brand",hierarchy:t="primary",size:r="xs",icons:n="none",leadingIcon:a,trailingIcon:i,children:o,disabled:l=!1,className:c,isToggled:u=!1,toggledLeadingIcon:d,toggledTrailingIcon:f,borderRadius:h,color:p,loading:v=!1,...x},m)=>{const g="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=o!=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},N=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"}},k=u&&d?d:a,I=u&&f?f:i,_=k&&S.default.isValidElement(k)?S.default.cloneElement(k,{size:N,color:"currentColor"}):null,E=I&&S.default.isValidElement(I)?S.default.cloneElement(I,{size:N,color:"currentColor"}):null,T=w[e]?.[t]??w[e]?.primary??"",R=Q.twMerge(O.clsx(g,v&&"relative",T,y[r],h&&`rounded-[${h}]`,p,b,c)),M=s.jsxs(s.Fragment,{children:[(n==="leading"||n==="both")&&_&&s.jsx("span",{className:`group-disabled:!text-disabled ${A[r].leading}`,children:_}),n!=="only"&&o,n==="only"&&_&&s.jsx("span",{className:"group-disabled:!text-disabled",children:_}),(n==="trailing"||n==="both")&&E&&s.jsx("span",{className:`group-disabled:!text-disabled ${A[r].trailing}`,children:E})]});return s.jsx("button",{ref:m,className:R,disabled:l||v,...x,children:v?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:s.jsx("span",{className:"animate-spin rounded-full border-2 border-current border-t-transparent",style:{width:j[r],height:j[r]}})}),s.jsx("span",{className:"invisible inline-flex items-center",children:M})]}):M})});W.displayName="Button";const S2=P.createContext(void 0),rl=()=>{const e=P.useContext(S2);if(!e)throw new Error("useAlertContext must be used within an Alert provider");return e},U5={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"}},eg={success:"neutral",warning:"neutral",error:"danger",info:"neutral",default:"neutral"},N2=({children:e,type:t="default"})=>{const[r,n]=P.useState(!1);return s.jsx(S2.Provider,{value:{open:r,setOpen:n,type:t},children:e})};N2.displayName="AlertDialog";const O2=({children:e})=>{const{setOpen:t}=rl();return S.default.cloneElement(e,{onClick:r=>{e.props.onClick?.(r),t(!0)}})};O2.displayName="AlertDialogTrigger";const P2=P.forwardRef(({className:e,children:t,...r},n)=>{const{open:a,setOpen:i,type:o}=rl(),l=U5[o];return s.jsx(xe.Transition,{appear:!0,show:a,as:P.Fragment,children:s.jsxs(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>i(!1),children:[s.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:s.jsx("div",{className:"fixed inset-0 bg-black-uniform/20","aria-hidden":"true"})}),s.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:s.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:s.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:s.jsx(xe.Dialog.Panel,{ref:n,className:O.clsx("relative bg-surface-bg rounded-[20px] max-w-[460px] w-full",l.borderClass,"shadow-xl",e),...r,children:s.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:s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx("div",{className:"p-2",children:s.jsx(Qr,{size:24,className:O.clsx(l.iconColor),"aria-hidden":"true"})}),s.jsx("div",{className:"flex-1 min-w-0",children:t}),s.jsx("div",{className:"shrink-0",children:s.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:s.jsx(p2,{size:20})})})]})})})})})})]})})});P2.displayName="AlertDialogContent";const A2=({children:e,className:t})=>s.jsx("div",{className:O.clsx("flex items-start",t),children:e});A2.displayName="AlertDialogHeader";const _2=P.forwardRef(({className:e,...t},r)=>s.jsx(xe.Dialog.Title,{ref:r,as:"h3",className:O.clsx("font-bold text-base text-high-em",e),...t}));_2.displayName="AlertDialogTitle";const k2=P.forwardRef(({className:e,...t},r)=>s.jsx(xe.Dialog.Description,{ref:r,className:O.clsx("text-sm font-semibold leading-[22px] tracking-normal whitespace-pre-line text-med-em mt-2 mb-8",e),...t}));k2.displayName="AlertDialogDescription";const T2=({children:e,className:t})=>s.jsx("div",{className:O.clsx("mt-4 flex gap-4 mb-4",t),children:e});T2.displayName="AlertDialogFooter";const E2=({className:e,actionVariant:t,onClick:r,...n})=>{const{type:a,setOpen:i}=rl(),o=t==="secondary",l=o?"neutral":eg[a],c=eg[a]==="danger"?"secondary":"tertiary";return s.jsx(W,{variant:l,hierarchy:c,size:"md",icons:o?void 0:"trailing",trailingIcon:s.jsx(B.ArrowRight,{}),onClick:u=>{r?.(u),i(!1)},className:O.clsx(e),...n})};E2.displayName="AlertDialogAction";const I2=P.forwardRef(({className:e,onClick:t,...r},n)=>{const{setOpen:a}=rl();return s.jsx(W,{ref:n,variant:"neutral",hierarchy:"secondary",size:"md",className:O.clsx(e),onClick:i=>{t?.(i),a(!1)},...r})});I2.displayName="AlertDialogCancel";const Ye=({theme:e="surface",size:t="sm",variant:r="simple",children:n,className:a,statusState:i="success"})=>{const o="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=Q.twMerge(O.clsx("rounded-full flex-shrink-0",d[t],u[i].bg,u[i].border&&`border ${u[i].border}`,a));return s.jsx("div",{className:h})}const f=Q.twMerge(O.clsx(o,l[e][r],c[t],a));return s.jsx("div",{className:f,children:n&&s.jsx("span",{children:n})})},Ft=({size:e="md",imageUrl:t,initials:r,className:n,statusBadge:a,onClick:i})=>{const o={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=O.clsx("relative",n),u=O.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=s.jsx(s.Fragment,{children:t?s.jsx("img",{src:t,alt:r||"Avatar",className:"w-full h-full object-cover"}):s.jsx("span",{children:r})});return s.jsxs("div",{className:c,children:[i?s.jsx("button",{onClick:i,type:"button",className:u,children:f}):s.jsx("div",{className:u,children:f}),a&&s.jsx("div",{className:O.clsx("absolute",d[e]),children:s.jsx(Ye,{variant:"status",statusState:a.state||"success",statusSize:a.size||o[e]})})]})},om=({avatars:e,size:t="md",max:r=4,className:n,counterClassName:a,...i})=>{const o=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=O.clsx("flex items-center",u[t],n),h=O.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 s.jsxs("div",{className:f,...i,children:[o.map((p,v)=>s.jsx("div",{className:"relative rounded-full border-2 border-white",children:s.jsx(Ft,{...p,size:t,className:"border-0"})},v)),c&&s.jsxs("div",{className:h,children:["+",l]})]})};om.displayName="AvatarGroup";function K5({...e}){return s.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function G5({className:e,...t}){return s.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 Z5({className:e,...t}){return s.jsx("li",{"data-slot":"breadcrumb-item",className:ae.default("inline-flex items-center gap-1.5",e),...t})}function Y5({asChild:e,className:t,...r}){if(e){const{children:n,...a}=r;if(!S.isValidElement(n))return null;const i=n,o={className:ae.default("transition-colors text-low-em font-semibold",t,i.props.className),...a};return S.cloneElement(i,o)}return s.jsx("a",{"data-slot":"breadcrumb-link",className:ae.default("transition-colors text-low-em font-semibold",t),...r})}function X5({className:e,...t}){return s.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 Q5({children:e,className:t,...r}){return s.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??s.jsx(am,{color:"currentColor",size:12})})}function J5({className:e,...t}){return s.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:["...",s.jsx("span",{className:"sr-only",children:"More"})]})}const e6=({label:e,leadingIcon:t,trailingIcon:r,items:n,isActive:a=!1,className:i,dropdownClassName:o,placement:l="bottom-left",showBackdrop:c=!0})=>{const[u,d]=P.useState(!1),f=P.useRef(null),h=s.jsx("svg",{className:O.clsx("w-4 h-4 transition-transform duration-200",u&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),p=()=>{d(g=>!g)},v=g=>{g.disabled||(g.onClick(),d(!1))},x=()=>{d(!1)};P.useEffect(()=>{const g=b=>{f.current&&!f.current.contains(b.target)&&d(!1)};if(u)return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[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 s.jsxs("div",{ref:f,className:"relative",children:[s.jsx(W,{variant:"brand",hierarchy:"primary",size:"sm",icons:r||t?"both":"trailing",leadingIcon:t,trailingIcon:r||h,onClick:p,style:{outline:"none",boxShadow:"none"},className:O.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&&s.jsx("div",{className:"fixed inset-0 z-10",onClick:x}),u&&s.jsx("div",{className:O.clsx("absolute z-20 w-[150px] bg-white border border-gray-100 rounded-[16px] shadow-lg overflow-hidden",m(),o),children:s.jsx("div",{children:n.map((g,b)=>s.jsxs(S.default.Fragment,{children:[b>0&&s.jsx("div",{className:"border-t border-gray-100"}),s.jsx("button",{onClick:()=>v(g),disabled:g.disabled,className:O.clsx("w-full text-left pl-5 py-3 transition-colors duration-150 group",g.disabled?"opacity-50 cursor-not-allowed":"hover:bg-gray-50 cursor-pointer"),children:s.jsxs("div",{className:"flex items-center gap-3",children:[g.icon&&s.jsx("div",{className:"flex-shrink-0 text-primary-900",children:g.icon}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"font-medium text-primary-900",style:{fontSize:"14px"},children:g.label})})]})})]},g.id))})})]})},xr=({options:e,value:t,onChange:r,size:n="md",variant:a="neutral",disabled:i=!1,className:o,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 s.jsx("div",{className:O.clsx("inline-flex items-center",o),children:e.map((h,p)=>{const v=h.value===t,x=h.icon&&S.default.isValidElement(h.icon)?S.default.cloneElement(h.icon,{size:u[n],color:"currentColor"}):null;return s.jsxs("button",{type:"button",disabled:i,onClick:()=>r(h.value),className:O.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,!v&&!i&&f[a].hover,v&&!i&&f[a].active,i&&"pointer-events-none","disabled:text-disabled"),children:[x&&s.jsx("span",{className:h.label?"mr-2":"",children:x}),h.label]},h.value)})})},t6={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]"}},qa={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"}},r6=e=>s.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",...e,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),n6=e=>s.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",...e,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})}),Jt=({size:e="medium",checked:t=!1,indeterminate:r=!1,disabled:n=!1,className:a,...i})=>{const o=t6[e],l=P.useRef(null);return P.useEffect(()=>{l.current&&(l.current.indeterminate=r)},[r]),s.jsxs("label",{className:O.clsx("inline-flex items-center",n?"cursor-not-allowed":"cursor-pointer",a),children:[s.jsx("input",{ref:l,type:"checkbox",checked:t,disabled:n,className:"sr-only peer",...i}),s.jsxs("div",{className:O.clsx(o.wrapper,"inline-flex shrink-0 items-center justify-center border transition-colors duration-200",n?t||r?qa.disabled.checked:qa.disabled.unchecked:r?qa.indeterminate:t?qa.checked:qa.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&&s.jsx(r6,{className:o.icon}),r&&s.jsx(n6,{className:o.icon})]})]})},gr=({variant:e="neutral",size:t="md",disabled:r=!1,leadingIcon:n,trailingIcon:a,showLeadingIcon:i=!0,showTrailingIcon:o=!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",v={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&&S.default.isValidElement(n)?S.default.cloneElement(n,{size:x[t],color:"currentColor"}):null,g=o&&a&&S.default.isValidElement(a)?S.default.cloneElement(a,{size:x[t],color:"currentColor"}):null;return s.jsxs("a",{className:O.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"),v[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:[s.jsxs("span",{className:"inline-flex items-center",children:[m&&s.jsx("span",{className:v[t].leadingGap,children:m}),s.jsx("span",{children:u}),l==="inline"&&s.jsx("span",{className:v[t].trailingGap,children:g})]}),l==="end"&&s.jsx("span",{className:"shrink-0",children:g})]})},a6=({icon:e,title:t,description:r,linkText:n="Link",linkHref:a="#",checked:i=!1,onCheckboxChange:o,onLinkClick:l,className:c,disabled:u=!1})=>{const d=h=>{o&&o(h.target.checked)},f=e?S.default.cloneElement(e,{size:32,color:"var(--dark-100)"}):null;return s.jsxs("div",{className:O.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:[s.jsxs("div",{className:"flex items-center justify-between mx-8 mb-3 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[f&&s.jsx("div",{className:"shrink-0",children:f}),s.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})]}),s.jsx("div",{className:"flex-shrink-0 mt-2",children:s.jsx(Jt,{size:"large",checked:i,onChange:d,disabled:u})})]}),s.jsx("div",{className:"mx-8 mt-4 mb-3 flex-shrink-0",style:{minHeight:"50px"},children:s.jsx("p",{className:"font-inter text-[12px] leading-[1.4] text-[var(--dark-700)] line-clamp-3",style:{fontFamily:"var(--font-inter)"},children:r})}),s.jsx("div",{className:"flex-1"}),s.jsx("div",{className:"border-t border-gray-400 mb-3 flex-shrink-0"}),s.jsx("div",{className:"mx-8 mt-4 flex-shrink-0",children:s.jsx(gr,{variant:"neutral",size:"md",href:a,onClick:l,disabled:u,trailingIconPosition:"end",disableUnderline:!0,children:n})})]})},nl=S.default.forwardRef(({title:e,children:t,isCollapsed:r,onToggle:n,onClose:a,defaultCollapsed:i=!1,className:o},l)=>{const[c,u]=P.useState(i),d=r??c,f=r!==void 0,h=()=>{const v=!d;f||u(v),n?.(v)},p=Q.twMerge(O.clsx("bg-surface-2 rounded-t-3 overflow-hidden","w-[311px]",o));return s.jsxs("div",{ref:l,className:p,children:[s.jsxs("div",{className:"flex items-center justify-between px-5 h-[38px]",children:[s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:d?s.jsx(im,{}):s.jsx(sm,{}),onClick:h,"aria-label":d?"Expand":"Collapse",className:"shrink-0"}),s.jsx("div",{className:"text-sm font-semibold text-med-em flex-1 text-center",children:e}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(it,{}),onClick:a,"aria-label":"Close",className:"shrink-0"})]}),s.jsx("div",{className:"h-px bg-surface-3"}),!d&&t]})});nl.displayName="ChatCollapsibleContainer";const jh=({children:e,arrowDirection:t="down",className:r})=>s.jsxs("div",{className:O.clsx("relative inline-block",r),children:[t==="up"&&s.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)"}}),s.jsx("div",{className:O.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"&&s.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)"}})]}),al=({progress:e,className:t,variant:r="none",...n})=>{const a=Math.min(100,Math.max(0,e)),o=O.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"?s.jsx("span",{className:"font-medium text-sm text-high-em shrink-0",children:u}):r==="below"?s.jsx("p",{className:"mt-2 font-medium text-sm text-high-em text-right",children:u}):null};return s.jsxs("div",{className:"flex flex-col gap-y-2 w-full",children:[s.jsxs("div",{className:"flex items-center w-full gap-x-5",children:[s.jsxs("div",{className:O.clsx(o,r==="tooltip"&&"group cursor-pointer"),role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress: ${a}%`,...n,children:[s.jsx("div",{className:l,style:{width:`${a}%`}}),r==="tooltip"&&s.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:s.jsxs(jh,{arrowDirection:"down",children:[a,"%"]})})]}),r==="inline"&&c()]}),r==="below"&&c()]})},M2=S.default.forwardRef(({title:e="Todo:",items:t,onItemChange:r,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:o=!1,className:l},c)=>{const h=t.length>3?150:void 0,p=t.filter(b=>b.checked).length,v=t.length,x=v>0?Math.round(p/v*100):0,m=(b,w)=>{r?.(b,w)},g=s.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[s.jsxs("span",{className:"text-sm font-semibold text-med-em whitespace-nowrap",children:[typeof e=="string"?e:"Todo:"," ",p,"/",v]}),s.jsx(al,{progress:x,variant:"none",className:"h-2"})]});return s.jsx(nl,{ref:c,title:g,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:o,className:l,children:s.jsx("div",{className:"overflow-y-auto",style:h?{maxHeight:`${h}px`}:void 0,children:t.map((b,w)=>s.jsxs(S.default.Fragment,{children:[s.jsxs("label",{className:"flex items-center px-8 h-[50px] gap-6 cursor-pointer",children:[s.jsx(Jt,{size:"medium",checked:b.checked,disabled:b.disabled,onChange:C=>m(b.id,C.target.checked)}),s.jsx("span",{className:O.clsx("text-xs font-semibold text-med-em flex-1",b.checked&&"line-through"),children:b.label})]}),w<t.length-1&&s.jsx("div",{className:"h-px bg-surface-3"})]},b.id))})})});M2.displayName="ChatCollapsibleCheck";const $2=S.default.forwardRef(({title:e,children:t,actions:r=[],isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:o=!1,className:l},c)=>s.jsxs(nl,{ref:c,title:e,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:o,className:l,children:[s.jsx("div",{className:"p-8",children:s.jsx("div",{className:"text-xs font-semibold text-med-em",children:t})}),s.jsx("div",{className:"h-px bg-surface-3"}),r.length>0&&s.jsx("div",{className:"flex gap-2 p-5",children:r.map((u,d)=>s.jsx(W,{variant:u.variant||"neutral",hierarchy:u.hierarchy||"tertiary",size:"xs",onClick:u.onClick,className:"flex-1",children:u.label},d))})]}));$2.displayName="ChatCollapsibleDialog";const i6={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"},s6={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}},o6="bg-surface-3 text-disabled cursor-not-allowed",Lr=({variant:e="primary",size:t="sm",leadingIcon:r=!0,trailingIcon:n=!0,onTrailingIconClick:a,children:i,className:o,disabled:l,...c})=>{const u=s6[t];let d=null;r===!0?d=s.jsx(B.Add,{}):S.default.isValidElement(r)&&(d=r);const f=d?S.default.cloneElement(d,{size:u.icon,color:"currentColor"}):null;let h=null;n===!0?h=s.jsx(B.ArrowDown2,{}):S.default.isValidElement(n)&&(h=n);const p=h?S.default.cloneElement(h,{size:u.icon,color:"currentColor"}):null,v=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"}},g=!!f,b=!!p;return!g&&!b?m[t].both:!g&&b?m[t].left:g&&!b?m[t].right:""};return s.jsxs("button",{disabled:l,className:O.clsx("inline-flex items-center justify-center shrink-0 font-medium transition-colors duration-200","focus:outline-none",l?o6:i6[e],u.container,x(),o),...c,children:[f&&s.jsx("span",{className:"mr-1",children:f}),s.jsx("span",{children:i}),p&&s.jsx("span",{className:"ml-1 p-0.5 rounded-full",role:"button",onClick:v,children:p})]})},l6={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"}},Ch=e=>{const{variant:t,size:r="md",title:n,disabled:a=!1,className:i,onClick:o,...l}=e,c=l6[r],u=O.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 s.jsxs("button",{type:"button",disabled:a,onClick:o,className:O.clsx(u,"items-center"),...l,children:[d&&s.jsx(Lr,{size:d.size||c.tagSize,variant:d.variant||"tertiary",disabled:a,leadingIcon:!1,trailingIcon:!1,children:d.content}),s.jsx("span",{className:O.clsx(c.title,a?"text-disabled":"text-med-em","truncate",d&&"ml-5"),children:n}),f&&s.jsx("div",{className:"ml-auto",children:s.jsx(W,{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 s.jsxs("button",{type:"button",disabled:a,onClick:o,className:O.clsx(u,"flex-col justify-center items-start"),...l,children:[s.jsxs("div",{className:"flex items-center gap-5",children:[s.jsx("span",{className:O.clsx(c.title,a?"text-disabled":"text-med-em","truncate"),children:n}),d&&s.jsx(Lr,{size:d.size||c.tagSize,variant:d.variant||"tertiary",disabled:a,leadingIcon:!1,trailingIcon:!1,children:d.content})]}),f&&s.jsx("span",{className:O.clsx(c.description,a?"text-disabled":"text-low-em","truncate w-full text-left"),children:f})]})}return null},ei=({children:e,size:t="sm",className:r})=>{const n=t==="md"?"px-2 py-1 text-sm":"px-2 py-1 text-xs";return s.jsx("kbd",{className:O.clsx("bg-surface-1 rounded font-medium text-med-em",n,r),children:e})},c6={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"}},u6=({config:e})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:O.clsx("flex items-center",e.headerHeight,e.headerPadding,"bg-surface-bg"),children:s.jsx("span",{className:O.clsx(e.headerText,"text-med-em"),children:"Opciones"})}),s.jsx("div",{className:"border-t border-surface-3"})]}),d6=({config:e,category:t,onBack:r})=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:O.clsx("flex items-center gap-3",e.headerHeight,e.headerPadding,"bg-surface-bg"),children:[s.jsx(W,{size:e.buttonSize,variant:"neutral",hierarchy:"secondary",icons:"only",leadingIcon:s.jsx(B.ArrowLeft2,{}),onClick:r}),s.jsx(Lr,{size:"xs",variant:t.leadingTag.variant||"tertiary",leadingIcon:!1,trailingIcon:!1,children:t.leadingTag.content}),s.jsx("span",{className:O.clsx(e.headerText,"text-med-em"),children:t.title})]}),s.jsx("div",{className:"border-t border-surface-3"})]}),f6=({config:e})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"border-t border-surface-3"}),s.jsxs("div",{className:O.clsx("flex items-center justify-between",e.footerHeight,e.headerPadding,"bg-surface-bg"),children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(ei,{size:e.kbdSize,children:"↑"}),s.jsx(ei,{size:e.kbdSize,children:"↓"})]}),s.jsx("span",{className:O.clsx(e.footerText,"text-low-em"),children:"navegar"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ei,{size:e.kbdSize,children:"↩"}),s.jsx("span",{className:O.clsx(e.footerText,"text-low-em"),children:"seleccionar"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ei,{size:e.kbdSize,children:"esc"}),s.jsx("span",{className:O.clsx(e.footerText,"text-low-em"),children:"cerrar"})]})]})]}),h6=({categories:e=[],size:t="md",onCategorySelect:r,onItemSelect:n,onClose:a,floating:i=!1,className:o,...l})=>{const[c,u]=P.useState("categories"),[d,f]=P.useState(null),h=c6[t],p=m=>{f(m),u("items"),r?.(m.id)},v=()=>{u("categories"),f(null)},x=m=>{d&&n?.(d.id,m.id)};return s.jsxs("div",{className:O.clsx("bg-surface-bg border border-surface-3 overflow-hidden","flex flex-col w-fit",h.borderRadius,i&&"absolute z-50",o),style:{boxShadow:"0px 8px 24px -4px rgba(0, 0, 0, 0.12)"},...l,children:[c==="categories"?s.jsx(u6,{config:h}):d?s.jsx(d6,{config:h,category:d,onBack:v}):null,c==="categories"?e.map(m=>s.jsx(Ch,{variant:"type-1",size:t,title:m.title,leadingTag:m.leadingTag,trailingButton:{icon:s.jsx(B.ArrowRight2,{}),onClick:()=>p(m),variant:"neutral",hierarchy:"secondary"},onClick:()=>p(m)},m.id)):d?d.items.map(m=>s.jsx(Ch,{variant:"type-2",size:t,title:m.title,tag:m.tag,description:m.description,onClick:()=>x(m)},m.id)):null,s.jsx(f6,{config:h})]})},R2=({className:e,activeView:t="chat",onChatClick:r,onHistorialClick:n,onSettingsClick:a,onCloseClick:i,containerWidth:o=0})=>{const l=[{id:"chat",label:"Chat",icon:s.jsx(l2,{}),content:s.jsx("div",{})},{id:"historial",label:"Historial",icon:s.jsx(c2,{}),content:s.jsx("div",{})}],c=l.findIndex(f=>f.id===t),u=f=>{const h=l[f];h.id==="chat"?r?.():h.id==="historial"&&n?.()},d=o<=350?"only-icon":"line-icons";return s.jsxs("div",{className:O.clsx("flex w-full items-baseline justify-between rounded-t-lg",e),children:[s.jsx("div",{className:"flex items-center",children:s.jsx(Cm,{variant:d,tabs:l,selectedIndex:c,onChange:u,contentSpacing:"none",showBorder:!1})}),s.jsxs("div",{className:"flex items-center gap-2 pr-8 self-center",children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:a,"aria-label":"Add"}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(it,{}),onClick:i,"aria-label":"Close"})]})]})},p6={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[o,l]=P.useState(!1),c=typeof e=="number"?e:p6[e];if(n&&!o)return s.jsx("img",{src:n,alt:a,className:O.clsx("rounded-[12px]","object-cover",i),style:{width:c,height:c},onError:()=>l(!0)});if(S.default.isValidElement(t)){const u=t.props.className;return S.default.cloneElement(t,{size:c,color:r,className:O.clsx(i,typeof u=="string"?u:void 0)})}return s.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:o="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 s.jsxs("div",{className:O.clsx("flex",h,f,c),...d,children:[e&&s.jsx("span",{className:o,children:s.jsx(ie,{size:a,children:e})}),t&&s.jsx("span",{className:O.clsx(p,l),children:t}),u]})},qt={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}},We={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"}},m6={default:{...We.default,placeholder:"placeholder-placeholder text-med-em",icon:"text-high-em"},outlined:{...We.outlined,placeholder:"placeholder-placeholder text-med-em",icon:"text-high-em"},danger:{...We.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:{...We.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"}},x6={sm:{...qt.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:{...qt.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:{...qt.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"}},us={wrapper:"bg-surface-3 pointer-events-none border-transparent",input:"disabled:text-disabled disabled:placeholder-disabled",hint:"text-disabled"},me=P.forwardRef(({variant:e="default",size:t="md",label:r,hint:n,leadingIcon:a,trailingIcon:i,leadingIconColor:o,trailingIconColor:l,disabled:c,className:u,type:d,customBackground:f,placeholderColor:h,multiline:p,customFontWeight:v,fontSize:x,customFontSize:m,hintIconVariant:g,onInputClick:b,...w},C)=>{const y=m6[e],j=x6[t],N=d==="password",[A,k]=P.useState(!1),I=N&&A?"text":d,_=m||x,E={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},T=_&&E[_]||void 0,R=_&&!E[_]?{fontSize:_}:void 0,M=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=v||void 0,U=F=>{b&&(F.preventDefault(),b())},D=Q.twMerge(O.clsx("w-full bg-transparent text-placeholder focus:outline-none text-ellipsis",!p&&"h-full",p?j.textareaPadding:j.inputPadding,!v&&"font-medium",!_&&j.fontSize,y.placeholder,c&&us.input,h,T,a&&j.inputPaddingLeftWithIcon,(i||N&&!p)&&j.inputPaddingRightWithIcon,b&&"cursor-pointer pointer-events-none"));return s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-col gap-1.5",b&&"cursor-pointer",u)),onClick:U,children:[r&&s.jsx("label",{htmlFor:w.id,className:Q.twMerge(O.clsx("font-semibold text-med-em pl-[2px] truncate",j.labelFontSize)),children:r}),s.jsxs("div",{className:Q.twMerge(O.clsx("relative flex items-center border transition-colors duration-200",j.rounded,!p&&j.height,y.wrapper,c&&us.wrapper)),style:{backgroundColor:L},children:[a&&s.jsx(ie,{size:j.iconSize,className:Q.twMerge(O.clsx("absolute top-1/2 -translate-y-1/2",j.leadingIconPosition,o||y.icon)),children:a}),p?s.jsx("textarea",{ref:C,disabled:c,className:Q.twMerge(D,"resize-none overflow-hidden"),style:{fontWeight:q,...R},onInput:M,rows:1,...w}):s.jsx("input",{ref:C,disabled:c,type:I,className:D,style:{fontWeight:q,...R},...w}),!p&&N?s.jsx("button",{type:"button",onClick:()=>k(!A),className:Q.twMerge(O.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?s.jsx(g2,{size:j.iconSize}):s.jsx(x2,{size:j.iconSize})}):i?s.jsx(ie,{size:j.iconSize,className:Q.twMerge(O.clsx("absolute top-1/2 -translate-y-1/2",j.trailingIconPosition,l||y.icon)),children:i}):null]}),n&&s.jsx(ft,{icon:s.jsx(B.InfoCircle,{variant:g||"Bold"}),label:n,iconSize:j.hintIconSize,gap:1,iconColorClass:O.clsx(y.hint,c&&us.hint),labelColorClass:O.clsx(y.hint,c&&us.hint),className:Q.twMerge(O.clsx(j.hintFontSize,"font-semibold"))})]})});me.displayName="InputField";const g6={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"}},vt=({size:e="md",disabled:t=!1,showCheckbox:r=!0,showLeadingImage:n=!0,showLeadingIcon:a=!0,showDescription:i=!0,showTrailingIcon:o=!0,showTag:l=!0,showTrailingText:c=!0,title:u,description:d,customTitleColor:f,customBackgroundColor:h,customHoverColor:p,customLeadingIconColor:v,checked:x=!1,indeterminate:m=!1,onCheckboxChange:g,leadingImageUrl:b,leadingImageAlt:w="List item image",leadingIcon:C,trailingIcon:y,tagContent:j,tagVariant:N="tertiary",trailingText:A,trailingAction:k,className:I,middleContainerClassName:_,as:E="button",onClick:T,...R})=>{const M=g6[e],$=D=>{D.stopPropagation()},L=D=>{g?.(D.target.checked)},q=Q.twMerge(O.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),I),U=s.jsxs(s.Fragment,{children:[r&&s.jsx("div",{onClick:$,className:O.clsx("flex items-center",M.checkboxMargin),children:s.jsx(Jt,{size:M.checkbox,checked:x,indeterminate:m,onChange:L,disabled:t})}),s.jsxs("div",{className:Q.twMerge(O.clsx("flex items-center",M.middleGap),_),children:[n&&b&&s.jsx("div",{className:O.clsx("shrink-0",t&&"opacity-50"),children:s.jsx(ie,{size:M.leadingImage,imageUrl:b,alt:w})}),a&&s.jsx("div",{className:"shrink-0",children:s.jsx(ie,{size:M.leadingIcon,color:t?"var(--text-disabled)":v||"var(--med-em)",children:C||s.jsx(B.Element3,{})})}),s.jsxs("div",{className:"flex flex-col gap-0 justify-start items-start min-w-0 shrink mr-8",children:[s.jsx("span",{className:O.clsx(M.title,f||(t?"text-disabled":"text-med-em"),"truncate max-w-full"),children:u}),i&&d&&s.jsx("span",{className:O.clsx(M.description,t?"text-disabled":"text-low-em","truncate max-w-full"),children:d})]})]}),s.jsxs("div",{className:O.clsx("flex items-center ml-auto",M.rightGap),children:[o&&s.jsx(ie,{size:M.trailingIcon,color:t?"var(--text-disabled)":"var(--high-em)",children:y||s.jsx(B.ArrowRight2,{})}),l&&j&&s.jsx(Lr,{size:M.tag,variant:N,disabled:t,leadingIcon:!1,trailingIcon:!1,children:j}),c&&A&&s.jsx("span",{className:O.clsx(M.trailingText,t?"text-disabled":"text-low-em"),children:A}),k&&s.jsx("span",{className:"flex items-center",onClick:D=>D.stopPropagation(),children:k})]})]});return E==="div"?s.jsx("div",{className:q,onClick:T,...R,children:U}):s.jsx("button",{type:"button",disabled:t,onClick:T,className:q,...R,children:U})};function L2(e,t){const[r,n]=P.useState(e);return P.useEffect(()=>{const a=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(a)}},[e,t]),r}const v6={position:"fixed",visibility:"hidden",top:0,left:0,zIndex:50};function Na({triggerRef:e,panelRef:t,enabled:r,offset:n=8,constrain:a=!1}){const[i,o]=P.useState(v6);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,v=c.top-n-h;let x,m;p>=u.height||p>=v?(x=c.bottom+n,m=f-x-h):(m=v,x=c.top-n-Math.min(u.height,m));let g=c.right-u.width;g<h&&(g=c.left),g=Math.max(h,g),o({position:"fixed",top:x,left:g,...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 Qi({refs:e,onClose:t,enabled:r=!0}){P.useEffect(()=>{if(!r)return;const n=i=>{e.some(o=>o.current?.contains(i.target))||t()},a=i=>{e.some(o=>o.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 y6({triggerRef:e,open:t,onClose:r,constrain:n=!1,offset:a}){const i=P.useRef(null),o=Na({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:o,backdropProps:{style:{position:"fixed",inset:0,zIndex:49},onMouseDown:r}}}function il(){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 b6(){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 w6={xs:"rounded-[8px]",sm:"rounded-[12px]",md:"rounded-[16px]",lg:"rounded-[20px]"},Ht=({items:e=[],header:t,headerSize:r="xs",size:n="md",selectedIds:a=[],onSelect:i,floating:o=!1,triggerRef:l,onClose:c,className:u,...d})=>{const f=w6[n],h=!!l,p=S.default.useRef(null);Qi({refs:[p,...l?[l]:[]],onClose:c??(()=>{}),enabled:!!c});const v=Na({triggerRef:l??{current:null},panelRef:p,enabled:h}),x=s.jsxs("div",{ref:p,className:O.clsx("bg-surface-bg border border-surface-3 overflow-hidden","flex flex-col w-fit",f,!h&&o&&"absolute z-50",u),style:{boxShadow:"0px 8px 24px -4px rgba(0, 0, 0, 0.12)",...h?v:{}},...d,children:[t&&s.jsxs(s.Fragment,{children:[s.jsx(vt,{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"}),s.jsx("div",{className:"border-t border-surface-3"})]}),e.map((m,g)=>{const{id:b,showDividerAfter:w,onClick:C,onSelect:y,customBackgroundColor:j,customHoverColor:N,...A}=m,k=b?a.includes(b):!1,I=g===e.length-1;return s.jsxs(S.default.Fragment,{children:[s.jsx(vt,{size:n,onClick:_=>{y?.(),b&&i?.(b),C?.(_)},customBackgroundColor:j||"bg-surface-bg",customHoverColor:N||"hover:bg-surface-2",className:O.clsx("shrink-0",k&&"bg-surface-1",A.className),checked:k,...A}),w&&!I&&s.jsx("div",{className:"border-t border-surface-3"})]},b||g)})]});return h&&typeof document<"u"?yn.createPortal(x,document.body):x},D2=({id:e,title:t,preview:r,onClick:n,menuItems:a,className:i})=>{const[o,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 o&&document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[o]);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:O.clsx("!h-[34px]",f.className),...p&&{customTitleColor:"text-danger-em",customLeadingIconColor:"var(--danger-em)"}}})||[];return s.jsxs("div",{className:O.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:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-xs font-semibold text-med-em mb-1",children:t}),s.jsx("p",{className:"text-[10px] font-medium text-low-em",children:r})]}),a&&a.length>0&&s.jsxs("div",{className:"flex-shrink-0 relative",onClick:f=>f.stopPropagation(),children:[s.jsx(W,{ref:u,variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.More,{variant:"Linear"}),"aria-label":"Más opciones",onClick:()=>l(!o)}),o&&s.jsx("div",{ref:c,className:"absolute right-0 top-full mt-1 z-50",children:s.jsx(Ht,{items:d,size:"xs",className:"!w-[182px]",onSelect:f=>{const h=a.find(p=>p.id===f);h?.onClick&&h.onClick({}),l(!1)}})})]})]})},j6=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((o,l)=>{const c=new Date(l.timestamp);return c>=r?o.today.push(l):c>=n?o.last7Days.push(l):c>=a?o.last30Days.push(l):c>=i&&o.last90Days.push(l),o},{today:[],last7Days:[],last30Days:[],last90Days:[]})},C6=(e,t)=>{if(!t.trim())return e;const r=t.toLowerCase();return e.filter(n=>n.title.toLowerCase().includes(r))},z2=({items:e,onItemClick:t,searchPlaceholder:r="Buscar en el historial...",className:n,onSearchChange:a,emptyState:i})=>{const[o,l]=P.useState(""),c=P.useMemo(()=>{const h=C6(e,o);return j6(h)},[e,o]),u=h=>{const p=h.target.value;l(p),a?.(p)},d=(h,p)=>p.length===0?null:s.jsxs("div",{children:[s.jsx("div",{className:"px-8 py-8",children:s.jsx("h3",{className:"text-xs font-semibold text-low-em",children:h})}),p.map((v,x)=>s.jsxs(S.default.Fragment,{children:[s.jsx(D2,{id:v.id,title:v.title,preview:v.preview,menuItems:v.menuItems,onClick:()=>t?.(v)}),x<p.length-1&&s.jsx("div",{className:"border-b border-surface-2"})]},v.id))]},h),f=c.today.length===0&&c.last7Days.length===0&&c.last30Days.length===0&&c.last90Days.length===0;return s.jsxs("div",{className:O.clsx("flex flex-col",n),children:[s.jsx("div",{className:"px-8 pt-9",children:s.jsx(me,{size:"md",variant:"default",placeholder:r,leadingIcon:s.jsx(B.SearchNormal,{size:20,variant:"Linear"}),value:o,onChange:u})}),f?o?s.jsx("div",{className:"flex flex-col items-center justify-center py-12 px-8",children:s.jsxs("p",{className:"text-sm text-low-em text-center",children:['No se encontraron resultados para "',o,'"']})}):i??null:s.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)]})]})},S6=[{id:"conversation",label:"Conversación"},{id:"constructor",label:"Constructor"}],B2=({inputValue:e,onInputChange:t,onSendClick:r,placeholder:n="Input Text",variant:a="default",className:i,minLines:o=2,maxLines:l=10})=>{const[c,u]=P.useState("conversation"),d=P.useRef(null),f=20,h=o*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,g=Math.max(h,Math.min(m,p));x.style.height=`${g}px`,x.style.overflow=m>p?"auto":"hidden"},[e,h,p]);const v=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),r?.())};return s.jsxs("div",{ref:d,className:O.clsx("flex flex-col gap-3 p-4 rounded-xl bg-surface-2 border border-surface-3",i),children:[s.jsx("div",{className:"mb-1",children:s.jsx(W,{variant:"neutral",hierarchy:"quaternary",size:"xs",icons:"only",leadingIcon:s.jsx(B.Hashtag,{}),"aria-label":"Add"})}),s.jsx(bl,{variant:"default",placeholder:n,value:e,onChange:x=>t?.(x.target.value),onKeyDown:v,resize:"none",className:"[&_textarea]:!min-h-0"}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center justify-start gap-4",children:[s.jsx("div",{className:"flex items-center gap-4",children:s.jsx(W,{variant:"neutral",hierarchy:"quaternary",size:"md",borderRadius:"12px",icons:"only",leadingIcon:s.jsx(B.AddCircle,{}),"aria-label":"Add"})}),a==="default"&&s.jsx(yl,{withBorder:!0,items:S6,value:c,onChange:u,size:"ai-chat"})]}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"md",icons:"only",borderRadius:"12px",leadingIcon:s.jsx(m2,{}),onClick:r,"aria-label":"Send"})]})]})},fi=({variant:e,hierarchy:t="flat",children:r,className:n})=>s.jsx("div",{className:O.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:s.jsx("div",{className:O.clsx("chat-message-content",e==="sent"?"chat-message-sent-content":"chat-message-received-content"),children:r})}),Sh=({className:e,onCopyClick:t,onLikeClick:r,onDislikeClick:n,onRefreshClick:a})=>{const[i,o]=P.useState(!1),[l,c]=P.useState(!1),u=()=>{o(!i),r?.()},d=()=>{c(!l),n?.()};return s.jsxs("div",{className:O.clsx("inline-flex items-center gap-4",e),children:[s.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Copy message",children:s.jsx(ie,{size:"sm",children:s.jsx(B.Copy,{})})}),s.jsx("button",{onClick:u,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Like message",children:s.jsx(ie,{size:"sm",children:i?s.jsx(B.Like1,{variant:"Bold"}):s.jsx(B.Like1,{variant:"Outline"})})}),s.jsx("button",{onClick:d,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Dislike message",children:s.jsx(ie,{size:"sm",children:l?s.jsx(B.Dislike,{variant:"Bold"}):s.jsx(B.Dislike,{variant:"Outline"})})}),s.jsx("button",{onClick:a,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Refresh response",children:s.jsx(ie,{size:"sm",children:s.jsx(B.Refresh,{})})})]})},F2=({fileName:e,fileSize:t,alignment:r="left",className:n,...a})=>s.jsx("a",{href:a.href||"#",download:!0,className:O.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:s.jsxs("div",{className:"flex flex-col text-low-em",children:[s.jsx("span",{className:"font-medium text-sm",children:e}),s.jsx("span",{className:"font-normal text-sm",children:t})]})}),lm=({className:e})=>s.jsx("div",{className:O.clsx("w-full max-w-max self-start",e),children:s.jsx("div",{className:"flex items-center gap-1 px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-3 h-3 bg-low-em rounded-full animate-typing-dot",style:{animationDelay:"0ms"}}),s.jsx("span",{className:"w-3 h-3 bg-surface-4 rounded-full animate-typing-dot",style:{animationDelay:"200ms"}}),s.jsx("span",{className:"w-3 h-3 bg-low-em rounded-full animate-typing-dot",style:{animationDelay:"400ms"}})]})})}),N6=S.default.lazy(()=>Promise.resolve().then(()=>require("./index-Dv3pe3q3.cjs"))),tg=({children:e})=>s.jsx(P.Suspense,{fallback:s.jsx("span",{children:e}),children:s.jsx(N6,{children:e})}),q2=S.default.memo(({messages:e,showTypingIndicator:t=!1,children:r,className:n,borderSide:a="none",borderStyle:i="surface-3",showHeader:o=!1,headerHeight:l=56,activeView:c="chat",onChatClick:u,onHistorialClick:d,onSettingsClick:f,onCloseClick:h,containerWidth:p=0,historialItems:v=[],onHistorialItemClick:x,historialSearchPlaceholder:m,onHistorialSearchChange:g,historialEmptyState:b,showChatInput:w=!0,chatInputValue:C,onChatInputChange:y,onChatSendClick:j,chatInputPlaceholder:N="Input Text",chatInputVariant:A="default",chatInputMinLines:k=2,chatInputMaxLines:I=10,onMessageCopyClick:_,onMessageLikeClick:E,onMessageDislikeClick:T,onMessageRefreshClick:R})=>{const M=S.default.useMemo(()=>a==="none"?"":`${a==="left"?"border-l":"border-r"} ${i==="surface-3"?"border-surface-3":"border-surface-4"}`,[a,i]);return s.jsxs("div",{className:`h-full w-full flex flex-col bg-white ${M} ${n||""}`,children:[o&&s.jsxs(s.Fragment,{children:[s.jsx("div",{style:{height:`${l}px`},children:s.jsx(R2,{activeView:c,onChatClick:u,onHistorialClick:d,onSettingsClick:f,onCloseClick:h,containerWidth:p,className:"pl-8 items-end h-full"})}),s.jsx(fe,{})]}),c==="historial"?s.jsx(z2,{items:v,onItemClick:x,searchPlaceholder:m,onSearchChange:g,emptyState:b,className:"flex-1 overflow-y-auto"}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex-1 overflow-y-auto",children:e?s.jsxs("div",{className:"flex flex-col gap-10 px-9 py-6",children:[e.map(L=>s.jsx(S.default.Fragment,{children:L.attachment?s.jsxs("div",{className:`flex flex-col gap-4 ${L.variant==="sent"?"items-end":"items-start"}`,children:[s.jsxs("div",{className:`flex flex-col gap-10 ${L.variant==="sent"?"items-end":"items-start"}`,children:[s.jsx(fi,{variant:L.variant,hierarchy:"bubble",children:typeof L.content=="string"?s.jsx(tg,{children:L.content}):L.content}),s.jsx("div",{className:"w-auto max-w-[300px]",children:s.jsx(F2,{fileName:L.attachment.fileName,fileSize:L.attachment.fileSize,alignment:L.variant==="sent"?"right":"left",href:L.attachment.href})})]}),L.variant==="received"&&s.jsx(Sh,{onCopyClick:()=>_?.(L.id),onLikeClick:()=>E?.(L.id),onDislikeClick:()=>T?.(L.id),onRefreshClick:()=>R?.(L.id)})]}):s.jsxs("div",{className:`flex flex-col ${L.variant==="sent"?"items-end":"items-start"}`,children:[s.jsx(fi,{variant:L.variant,hierarchy:"bubble",children:typeof L.content=="string"?s.jsx(tg,{children:L.content}):L.content}),L.variant==="received"&&s.jsx(Sh,{onCopyClick:()=>_?.(L.id),onLikeClick:()=>E?.(L.id),onDislikeClick:()=>T?.(L.id),onRefreshClick:()=>R?.(L.id)})]})},L.id)),t&&s.jsx(lm,{})]}):r}),w&&s.jsx("div",{className:"p-4",children:s.jsx(B2,{minLines:k,maxLines:I,inputValue:C,onInputChange:y,onSendClick:j,placeholder:N,variant:A,containerWidth:p})})]})]})});q2.displayName="ChatPanel";const ht=S.default.memo(({icon:e=s.jsx(ie,{size:56,children:s.jsx(B.Box2,{})}),description:t,actionLabel:r,onAction:n,flat:a=!1,className:i,iconClassName:o,descriptionClassName:l})=>s.jsx("div",{className:O.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:s.jsxs("div",{className:"flex flex-col items-center gap-10 text-center",children:[s.jsx("span",{className:O.clsx("text-low-em",o),children:e}),t&&s.jsx("p",{className:O.clsx("text-lg font-medium text-low-em",l),children:t}),r&&s.jsx(W,{variant:"secondary",hierarchy:"primary",size:"md",icons:"leading",leadingIcon:s.jsx(B.Add,{}),onClick:n,children:r})]})}));ht.displayName="EmptyState";function O6(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),o=Math.floor(i/24);return n<60?"Just now":a<60?`${a}m ago`:i<24?`${i}h ago`:o<7?t.toLocaleDateString("en-US",{weekday:"short"}):t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}const P6=({id:e,name:t,timestamp:r,status:n,avatarUrl:a,avatarInitials:i,isActive:o=!1,onClick:l,className:c})=>s.jsxs("button",{type:"button",id:e,onClick:l,className:O.clsx("flex items-center gap-6 w-full px-8 py-8 text-left transition-colors",o?"bg-surface-2":"hover:bg-surface-1 active:bg-surface-2",c),children:[s.jsx(Ft,{size:"md",imageUrl:a,initials:i}),s.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:t}),s.jsxs("div",{className:"flex items-center gap-8 shrink-0",children:[s.jsx("span",{className:"text-xs font-medium text-high-em whitespace-nowrap",children:O6(r)}),n&&s.jsx(Ye,{variant:"status",statusState:n,size:"sm"})]})]}),rg=({items:e,activeId:t,searchValue:r="",searchPlaceholder:n="Search chats...",emptyState:a,onItemClick:i,onSearchChange:o,className:l})=>s.jsxs("div",{className:O.clsx("flex flex-col h-full",l),children:[s.jsx("div",{className:"flex items-center h-[64px] px-8 shrink-0",children:s.jsx(me,{size:"md",variant:"default",placeholder:n,trailingIcon:s.jsx(B.SearchNormal1,{variant:"Linear"}),value:r,onChange:c=>o?.(c.target.value),className:"w-full"})}),s.jsx("div",{className:"border-b border-surface-3 shrink-0"}),e.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:a??s.jsx(ht,{flat:!0,className:"bg-transparent",description:"No chats yet"})}):s.jsx("div",{className:"flex-1 overflow-y-auto",children:e.map((c,u)=>s.jsxs(S.default.Fragment,{children:[s.jsx(P6,{...c,isActive:c.id===t,onClick:()=>i?.(c)}),u<e.length-1&&s.jsx("div",{className:"border-b border-surface-3"})]},c.id))})]}),fe=({direction:e="horizontal",width:t,height:r,className:n})=>{const a=e==="horizontal"?"100%":"0.5px",i=e==="horizontal"?"0.5px":"100%",o=O.clsx(n,"bg-surface-3 items-center"),l={width:t??a,height:r??i};return s.jsx("div",{className:o,style:l})};function ng(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function A6(e){return e==="whatsapp"?s.jsx(B.Whatsapp,{size:18,variant:"Bold"}):e==="email"?s.jsx(B.Sms,{size:18,variant:"Linear"}):e==="phone"?s.jsx(B.Call,{size:18,variant:"Linear"}):null}const _6={completada:"success",pendiente:"warning",cancelada:"danger"},k6={completada:"Completada",pendiente:"Pendiente",cancelada:"Cancelada"},T6=({order:e})=>s.jsxs("div",{className:"flex flex-col gap-6 p-8 bg-surface-1 rounded-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.orderNumber}),s.jsx("span",{className:"text-xs text-low-em",children:e.date})]}),e.images&&e.images.length>0&&s.jsx("div",{className:"flex gap-4",children:e.images.slice(0,4).map((t,r)=>s.jsx("img",{src:t,alt:"",className:"w-12 h-12 rounded-4 object-cover bg-surface-2"},r))}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.time&&s.jsx("span",{className:"text-xs text-low-em",children:e.time}),s.jsx("span",{className:"text-sm font-semibold text-high-em ml-auto",children:e.price})]}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx(Ye,{variant:"simple",theme:_6[e.status],size:"sm",children:k6[e.status]}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"none",onClick:e.onViewDetails,children:"Ver detalles"})]})]}),E6=({field:e})=>s.jsxs("div",{className:"flex items-center gap-8 px-8 py-6",children:[s.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-1",children:[s.jsx("span",{className:"text-xs text-low-em",children:e.label}),s.jsx("span",{className:"text-sm font-semibold text-high-em truncate",children:e.value})]}),e.onEdit&&s.jsx(W,{variant:"neutral",hierarchy:"quaternary",size:"xs",icons:"only",leadingIcon:s.jsx(B.Edit2,{size:16,variant:"Linear"}),onClick:e.onEdit})]}),ag=({contact:e,messages:t=[],orders:r=[],isDetailOpen:n=!1,showTypingIndicator:a=!1,inputValue:i="",inputPlaceholder:o="Escribe un mensaje...",onBack:l,onCallClick:c,onVideoClick:u,onDetailOpen:d,onDetailClose:f,onInputChange:h,onSendClick:p,onMoreClick:v,className:x})=>{const m=A6(e.channel);return s.jsxs("div",{className:O.clsx("flex relative overflow-hidden h-full bg-surface-bg",x),children:[s.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-4 px-8 h-[64px] shrink-0",children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.ArrowLeft2,{size:18,variant:"Linear"}),onClick:l}),s.jsxs("button",{type:"button",className:"flex items-center gap-6 flex-1 min-w-0 text-left",onClick:d,children:[s.jsx(Ft,{size:"md",imageUrl:e.avatarUrl,initials:e.avatarInitials}),s.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),m&&s.jsx("span",{className:"text-low-em shrink-0",children:m})]}),s.jsx(xr,{size:"sm",variant:"neutral",value:"",onChange:g=>{g==="call"&&c?.(),g==="video"&&u?.()},options:[{value:"call",icon:s.jsx(B.Call,{variant:"Linear"})},{value:"video",icon:s.jsx(B.Video,{variant:"Linear"})}]}),v&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.More,{size:18,variant:"Linear"}),onClick:v})]}),s.jsx(fe,{}),s.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col gap-8 p-8",children:[t.map(g=>{const b=g.attachment?s.jsxs("div",{className:"flex flex-col gap-4",children:[g.content&&s.jsx("span",{children:g.content}),s.jsxs("a",{href:g.attachment.href??"#",className:"flex items-center gap-4 text-xs underline opacity-80",children:[s.jsx("span",{className:"font-medium",children:g.attachment.fileName}),s.jsxs("span",{children:["(",g.attachment.fileSize,")"]})]})]}):g.content;return g.variant==="received"?s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx(Ft,{size:"sm",imageUrl:e.avatarUrl,initials:e.avatarInitials}),s.jsxs("div",{className:"flex flex-col gap-2 max-w-[85%]",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-low-em",children:g.senderName}),s.jsx("span",{className:"text-xs text-low-em",children:g.timeLabel??ng(g.timestamp)})]}),s.jsx(fi,{variant:"received",hierarchy:"bubble",className:"px-8 py-6 text-high-em",children:b})]})]},g.id):s.jsxs("div",{className:"flex flex-col gap-2 max-w-[85%] self-end",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-low-em",children:g.senderName??"You"}),s.jsx("span",{className:"text-xs text-low-em",children:g.timeLabel??ng(g.timestamp)})]}),s.jsx(fi,{variant:"sent",hierarchy:"bubble",className:"px-8 py-6 text-high-em",children:b})]},g.id)}),a&&s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx(Ft,{size:"sm",imageUrl:e.avatarUrl,initials:e.avatarInitials}),s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.name}),s.jsx(lm,{className:"-ml-2"})]})]})]}),s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center gap-4 px-8 py-6 shrink-0",children:[s.jsx("div",{className:"flex-1",children:s.jsx(me,{size:"md",variant:"default",placeholder:o,value:i,onChange:g=>h?.(g.target.value)})}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Send2,{size:18,variant:"Linear"}),onClick:p})]})]}),s.jsxs("div",{className:O.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:[s.jsxs("div",{className:"flex items-center gap-6 px-8 py-6 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-6 flex-1 min-w-0",children:[s.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),m&&s.jsx("span",{className:"text-low-em shrink-0",children:m})]}),s.jsx(W,{variant:"neutral",hierarchy:"quaternary",size:"sm",icons:"only",leadingIcon:s.jsx(B.CloseCircle,{size:18,variant:"Linear"}),onClick:f})]}),s.jsx(fe,{}),s.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e.fields&&e.fields.length>0&&s.jsxs("div",{className:"flex flex-col",children:[s.jsx("div",{className:"px-8 py-6",children:s.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:"Información de contacto"})}),e.fields.map((g,b)=>s.jsxs(S.default.Fragment,{children:[s.jsx(E6,{field:g}),b<(e.fields?.length??0)-1&&s.jsx(fe,{})]},g.label))]}),e.fields&&e.fields.length>0&&r.length>0&&s.jsx(fe,{}),r.length>0&&s.jsxs("div",{className:"flex flex-col gap-8 p-8",children:[s.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:"Pedidos"}),r.map(g=>s.jsx(T6,{order:g},g.id))]})]})]})]})};function I6(e){return e==="whatsapp"?s.jsx(B.Whatsapp,{size:18,variant:"Bold"}):e==="email"?s.jsx(B.Sms,{size:18,variant:"Linear"}):e==="phone"?s.jsx(B.Call,{size:18,variant:"Linear"}):null}const M6={completada:"success",pendiente:"warning",cancelada:"danger"},$6={completada:"Completada",pendiente:"Pendiente",cancelada:"Cancelada"},R6=({order:e})=>s.jsxs("div",{className:"flex flex-col gap-6 p-8 bg-white",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(ie,{size:"sm",children:s.jsx(B.DocumentText,{variant:"Linear"})}),s.jsx("span",{className:"text-base text-high-em",children:e.orderNumber})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(ie,{size:"sm",children:s.jsx(B.Calendar,{variant:"Linear"})}),s.jsx("span",{className:"text-base text-high-em",children:e.date})]})]}),s.jsx("div",{className:"h-px bg-surface-3"}),s.jsxs("div",{className:"flex items-center gap-4",children:[e.time&&s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(ie,{size:"sm",children:s.jsx(B.Clock,{variant:"Linear"})}),s.jsx("span",{className:"text-base text-high-em",children:e.time})]}),s.jsx("span",{className:"text-base text-high-em ml-auto",children:e.price})]}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx(Ye,{variant:"outlined",theme:M6[e.status],size:"sm",children:e.statusLabel??$6[e.status]}),s.jsx(W,{variant:"secondary",hierarchy:"primary",size:"sm",icons:"none",onClick:e.onViewDetails,children:e.viewDetailsLabel??"Ver detalles"})]})]}),L6=({field:e})=>s.jsxs("div",{className:"flex items-center gap-8 px-8 py-6 bg-white",children:[s.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-1",children:[s.jsx("span",{className:"text-xs text-low-em",children:e.label}),s.jsx("span",{className:"text-sm font-semibold text-high-em truncate",children:e.value})]}),e.onEdit&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(B.Edit2,{size:16,variant:"Linear"}),onClick:e.onEdit})]}),ig=({contact:e,orders:t=[],contactSectionLabel:r="Información de contacto",ordersSectionLabel:n="Pedidos",emptyOrdersDescription:a="Sin pedidos",onClose:i,className:o})=>{const l=I6(e.channel);return s.jsxs("div",{className:O.clsx("flex flex-col h-full bg-surface-bg",o),children:[s.jsxs("div",{className:"flex items-center gap-6 px-8 h-[64px] shrink-0 bg-white",children:[s.jsx(Ft,{size:"md",imageUrl:e.avatarUrl,initials:e.avatarInitials}),s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),l&&s.jsx("span",{className:"text-low-em shrink-0",children:l})]}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(it,{size:18}),onClick:i})]}),s.jsx(fe,{}),s.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col",children:[e.fields&&e.fields.length>0&&s.jsxs("div",{className:"flex flex-col",children:[s.jsx("div",{className:"px-8 py-6 border-b border-surface-3",children:s.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:r})}),e.fields.map((c,u)=>s.jsxs(S.default.Fragment,{children:[s.jsx(L6,{field:c}),u<(e.fields?.length??0)-1&&s.jsx(fe,{})]},c.label)),s.jsx(fe,{})]}),s.jsxs("div",{className:"flex flex-col flex-1 bg-white",children:[s.jsx("div",{className:"px-8 py-6 border-b border-surface-3",children:s.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:n})}),t.length>0?s.jsx("div",{className:"flex flex-col divide-y divide-surface-3 overflow-y-auto",children:t.map(c=>s.jsx(R6,{order:c},c.id))}):s.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:s.jsx(ht,{flat:!0,description:a,className:"bg-transparent"})})]})]})]})},D6=600,z6=({conversations:e,searchPlaceholder:t,emptyListDescription:r,emptyConversationDescription:n="Selecciona una conversación",contactSectionLabel:a="Información de contacto",ordersSectionLabel:i="Pedidos",emptyOrdersDescription:o="Sin pedidos",inputPlaceholder:l="Escribe un mensaje...",inputValue:c,searchValue:u,onSearchChange:d,onSendClick:f,onInputChange:h,className:p})=>{const[v,x]=il(),m=x<D6,[g,b]=P.useState("list"),[w,C]=P.useState(null),[y,j]=P.useState(!1),N=w?e.find(_=>_.id===w)??null:null,A=e.map(({id:_,name:E,timestamp:T,status:R,avatarUrl:M,avatarInitials:$})=>({id:_,name:E,timestamp:T,status:R,avatarUrl:M,avatarInitials:$})),k=_=>{C(_),b("conversation")},I=w?e.find(_=>_.id===w)??null:null;return m?s.jsxs("div",{ref:v,className:O.clsx("flex flex-col h-full",p),children:[g==="list"&&s.jsx(rg,{items:A,activeId:w??void 0,searchPlaceholder:t,emptyState:r?s.jsx(ht,{flat:!0,className:"bg-transparent",description:r}):void 0,searchValue:u,onSearchChange:d,onItemClick:_=>k(_.id)}),g==="conversation"&&I&&s.jsx(ag,{contact:I.contact,messages:I.messages,inputPlaceholder:l,inputValue:c,onBack:()=>{b("list"),C(null)},onMoreClick:()=>b("sidebar"),onSendClick:f,onInputChange:h}),g==="sidebar"&&I&&s.jsx(ig,{contact:I.sidebarContact,orders:I.orders,contactSectionLabel:a,ordersSectionLabel:i,emptyOrdersDescription:o,onClose:()=>b("conversation")})]}):s.jsxs("div",{ref:v,className:O.clsx("flex h-full",p),children:[s.jsx("div",{className:"flex-1 min-w-0 border-r border-surface-3",children:s.jsx(rg,{items:A,activeId:w??void 0,searchPlaceholder:t,emptyState:r?s.jsx(ht,{flat:!0,className:"bg-transparent",description:r}):void 0,searchValue:u,onSearchChange:d,onItemClick:_=>{C(_.id),j(!1)}})}),N?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:O.clsx(y?"flex-1":"flex-[2]","min-w-0"),children:s.jsx(ag,{contact:N.contact,messages:N.messages,inputPlaceholder:l,inputValue:c,onBack:()=>{C(null),j(!1)},onMoreClick:()=>j(_=>!_),onSendClick:f,onInputChange:h})}),y&&s.jsx("div",{className:"flex-1 min-w-0 border-l border-surface-3",children:s.jsx(ig,{contact:N.sidebarContact,orders:N.orders,contactSectionLabel:a,ordersSectionLabel:i,emptyOrdersDescription:o,onClose:()=>j(!1)})})]}):s.jsx("div",{className:"flex-[2] min-w-0 flex items-center justify-center bg-surface-bg",children:s.jsx(ht,{flat:!0,description:n,className:"bg-transparent"})})]})},B6=({options:e,value:t,onChange:r,size:n="medium",disabled:a=!1,orientation:i="vertical",withSelectAll:o=!1,selectAllLabel:l="Select All",className:c})=>{const u=S.default.useId(),d=`${u}-select-all`,f=g=>{const b=t.includes(g)?t.filter(w=>w!==g):[...t,g];r(b)},h=e.filter(g=>!g.disabled&&!a).map(g=>g.value),p=h.filter(g=>t.includes(g)),v=h.length>0&&p.length===h.length,x=p.length>0&&!v,m=()=>{if(v)r(t.filter(g=>!h.includes(g)));else{const g=[...t];for(const b of h)g.includes(b)||g.push(b);r(g)}};return s.jsxs("div",{className:Q.twMerge(O.clsx("flex",i==="vertical"?"flex-col gap-8":"flex-row flex-wrap gap-x-8 gap-y-8",c)),children:[o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Jt,{id:d,size:n,checked:v,indeterminate:x,disabled:a,onChange:()=>m()}),s.jsx("label",{htmlFor:d,className:O.clsx("text-sm font-semibold",a?"text-disabled cursor-not-allowed":"text-high-em cursor-pointer"),children:l})]}),s.jsx("div",{className:"h-px bg-surface-3 w-full"})]}),e.map(g=>{const b=t.includes(g.value),w=a||!!g.disabled,C=`${u}-${String(g.value)}`,y=!!g.caption;return s.jsxs("div",{className:O.clsx("flex gap-6",y?"items-start":"items-center",g.className),children:[s.jsx("div",{className:O.clsx("flex items-center shrink-0",y&&"mt-0.5"),children:s.jsx(Jt,{id:C,size:n,checked:b,indeterminate:g.indeterminate??!1,disabled:w,onChange:()=>f(g.value)})}),s.jsxs("label",{htmlFor:C,className:O.clsx("flex flex-col gap-3",w?"cursor-not-allowed":"cursor-pointer"),children:[s.jsx("span",{className:O.clsx("text-sm font-medium leading-5",w?"text-disabled":"text-high-em"),children:g.label}),g.caption&&s.jsx("span",{className:O.clsx("text-xs leading-4",w?"text-disabled":"text-low-em"),children:g.caption})]})]},g.value)})]})},F6={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"}},q6={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"},W6=(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":"",H6=({size:e="md",type:t="unselected",state:r="default",children:n,leftContent:a,rightContent:i,onClick:o,className:l,showLeftContent:c=!0,showRightContent:u=!0,showText:d=!0})=>{const f=A=>{if(!S.default.isValidElement(A))return A;const k=A,I=k.props.style||{},_={...k.props,style:{...I,width:"100%",height:"100%",display:"block"},size:void 0};return S.default.cloneElement(k,_)},h=!!o&&r!=="disabled",p=!!a&&c,v=!!i&&u,x=F6[e],m=q6[r],g=W6(t,r),b=Q.twMerge("inline-flex items-center border border-solid transition-all duration-150 rounded-full font-family-inter",m,x.container,g,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=s.jsx("div",{className:w,style:{marginRight:y,width:`${C}px`,height:`${C}px`},children:p?f(a):null}),N=s.jsx("div",{className:w,style:{marginLeft:y,width:`${C}px`,height:`${C}px`},children:v?f(i):null});return s.jsxs("div",{className:b,role:h?"button":"status",onClick:h?o:void 0,tabIndex:h?0:void 0,children:[j,d&&s.jsx("span",{className:"shrink-0",children:n}),N]})},V6=["--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"],U6=()=>{if(typeof document>"u")return[];const e=[],t=getComputedStyle(document.documentElement);return V6.forEach(r=>{const n=t.getPropertyValue(r).trim();n&&e.push({name:r,value:n.toUpperCase()})}),e},K6=({colors:e})=>{const[t,r]=P.useState(e||[]),[n,a]=P.useState(0);return P.useEffect(()=>{if(e){r(e);return}r(U6())},[e,n]),P.useEffect(()=>{if(e)return;const i=new MutationObserver(o=>{o.forEach(l=>{l.type==="attributes"&&l.attributeName==="class"&&a(c=>c+1)})});return i.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>i.disconnect()},[e]),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:t.map(({name:i,value:o})=>s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"1rem",fontFamily:"monospace"},children:[s.jsx("div",{style:{width:"50px",height:"50px",backgroundColor:o,border:"1px solid #ccc",borderRadius:"4px"}}),s.jsxs("div",{children:[s.jsx("div",{style:{fontWeight:"bold"},children:i}),s.jsx("div",{children:o})]})]},i))})},G6=({disabled:e=!1,className:t,...r})=>s.jsxs("div",{className:Q.twMerge(O.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:[s.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"}),s.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"}),s.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"})]}),cm=({className:e,disabled:t=!1,onDrag:r,dragHandleProps:n,onDuplicate:a,onDelete:i,...o})=>{const[l,c]=P.useState(""),u=f=>{c(f),f==="duplicate"&&a?.(),f==="delete"&&i?.()},d=[...a?[{value:"duplicate",icon:s.jsx(el,{size:12})}]:[],...i?[{value:"delete",icon:s.jsx(tl,{size:12})}]:[]];return s.jsx("div",{className:O.clsx("border-b border-surface-3 min-h-[28px]",e),...o,children:s.jsxs("div",{className:"flex justify-center",children:[(r||n)&&s.jsx("button",{type:"button",className:O.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:s.jsx(Jo,{size:12})}),d.length>0&&s.jsx(xr,{options:d,value:l,onChange:u,size:"xs",variant:"secondary",disabled:t,buttonClassName:"rounded-none"})]})})},Z6={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}},Y6={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"}}},X6="opacity-50 bg-gray-100 cursor-not-allowed",Q6={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]"}},J6=({layout:e="text_icon",hierarchy:t="fill",variant:r="default",size:n="md",label:a,hint:i,disabled:o,leadingIcon:l,leadingAvatar:c,trailingAddon:u,options:d,value:f,onChange:h,placeholder:p,className:v,placeholderColor:x,inputTextColor:m,backgroundColor:g,chevronColor:b="currentColor",optionActiveColor:w="bg-primary-500",optionActiveTextColor:C="text-white",optionTextColor:y="text-gray-900",borderRadius:j="rounded-lg"})=>{const[N,A]=P.useState(""),k=Y6[r][t],I=Q6[n],_=Z6[e],E=N===""?d:d.filter(M=>M.label.toLowerCase().includes(N.toLowerCase())),T=Q.twMerge(O.clsx("w-full flex-1 bg-transparent focus:outline-none",k.input,x,m)),R=Q.twMerge(O.clsx("relative flex items-center gap-2 border transition-colors duration-200 focus-within:ring-2",j,I.wrapper,k.wrapper,o&&X6,g));return s.jsxs("div",{className:O.clsx("flex flex-col gap-1.5",v),children:[a&&s.jsx("label",{className:"font-medium text-sm text-gray-800",children:a}),s.jsx(xe.Combobox,{value:f,onChange:h,disabled:o,children:s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:R,children:[_.showLeadingIcon&&l&&s.jsx("div",{children:S.default.cloneElement(l,{size:I.icon,color:"currentColor"})}),_.showLeadingAvatar&&c&&s.jsx("img",{src:c,alt:"avatar",className:O.clsx("rounded-full",I.avatar)}),_.showInput&&s.jsx(xe.Combobox.Input,{className:T,placeholder:p,onChange:M=>A(M.target.value),displayValue:M=>M?.label}),_.showTrailingChevron&&!u&&s.jsx(xe.Combobox.Button,{className:O.clsx("flex items-center",{"w-full h-full justify-center":e==="only_icon"}),children:s.jsx(B.ArrowDown2,{size:I.icon,color:b})}),_.showTrailingAddon&&u&&s.jsx("div",{className:"flex-shrink-0",children:u})]}),s.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&&N!==""?s.jsx("div",{className:"relative cursor-default select-none px-4 py-2 text-gray-700",children:"Nothing found."}):E.map(M=>s.jsx(xe.Combobox.Option,{value:M,className:({active:$})=>Q.twMerge(O.clsx("relative cursor-default select-none py-2 pl-4 pr-4",$?`${w} ${C}`:y)),children:M.label},M.id))})]})}),i&&s.jsxs("div",{className:O.clsx("flex items-center gap-1.5 text-sm",k.hint),children:[s.jsx(B.InfoCircle,{size:16,color:"currentColor"}),s.jsx("span",{children:i})]})]})},eP=({items:e,trigger:t,className:r,align:n="right",offset:a=8})=>{const[i,o]=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)&&o(!1)};if(i)return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[i]);const u=d=>{d.disabled||(d.onClick(),o(!1))};return s.jsxs("div",{className:O.clsx("relative inline-block",r),children:[s.jsx("div",{ref:c,onClick:()=>o(!i),className:"cursor-pointer",children:t}),i&&s.jsx("div",{ref:l,className:O.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:s.jsx("div",{className:"py-2",children:e.map((d,f)=>s.jsxs("button",{onClick:()=>u(d),disabled:d.disabled,className:O.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&&s.jsx("span",{className:"flex-shrink-0 flex items-center justify-center relative z-10",children:d.icon}),s.jsx("span",{className:"flex-1 font-normal relative z-10",children:d.label})]},d.id))})})]})},um=S.default.memo(({children:e,tooltipContent:t,icon:r,iconColor:n="text-disabled",leadingIcon:a,leadingIconColor:i="text-disabled",iconSize:o,className:l,labelClassName:c,fontSize:u="sm",fontWeight:d="semibold",textColor:f="",onClick:h,state:p="default"})=>{const v={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"},g=v[u]||void 0,b=v[u]?void 0:u,w=o??x[u]??20,C=!!h&&p!=="disabled",y=Q.twMerge(O.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=Q.twMerge(O.clsx("flex-1 ml-6",g,m[d],p==="disabled"?"text-disabled":f||"text-med-em",c));return s.jsxs("div",{className:y,onClick:C?h:void 0,suppressHydrationWarning:!0,children:[a&&s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(ie,{size:w,className:i,children:a})}),s.jsx("span",{className:j,style:b?{fontSize:b}:void 0,children:e}),r&&t?s.jsxs(Ct.Root,{children:[s.jsx(Ct.Trigger,{asChild:!0,children:s.jsx("button",{className:O.clsx("flex items-center focus:outline-none focus-visible:ring-2 rounded-full shrink-0",n),onClick:N=>N.stopPropagation(),children:s.jsx(ie,{size:w,className:n,children:r})})}),s.jsx(Ct.Portal,{children:s.jsxs(Ct.Content,{sideOffset:5,className:O.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,s.jsx(Ct.Arrow,{className:"fill-white"})]})})]}):r?s.jsx("div",{className:O.clsx("flex items-center shrink-0",n),children:s.jsx(ie,{size:w,className:n,children:r})}):null]})});um.displayName="DragAndDropListItem";const tP={default:{...We.default,wrapper:`${We.default.wrapper} hover:cursor-pointer`,optionsPanel:"border-surface-4",label:"text-med-em",selectedValue:"text-med-em"},danger:{...We.danger,wrapper:`${We.danger.wrapper} hover:cursor-pointer`,optionsPanel:"border-danger-accent-2",label:"text-high-em",selectedValue:"text-danger-em"},outlined:{...We.outlined,wrapper:`${We.outlined.wrapper} hover:cursor-pointer`,optionsPanel:"border-surface-4",label:"text-med-em",selectedValue:"text-med-em"}},In={wrapper:"bg-surface-3 text-disabled pointer-events-none border-transparent",label:"text-disabled",selectedValue:"text-disabled",placeholder:"text-disabled",hint:"text-disabled"},rP={sm:{...qt.sm,rounded:"rounded-md",selectText:"text-xs"},md:{...qt.md,selectText:"text-sm font-medium"}},Te=({variant:e="default",size:t="md",menuSize:r,label:n,hint:a,items:i,disabled:o,placeholder:l,className:c,value:u,onChange:d,id:f,customHeight:h,customRadius:p,customPlaceholderColor:v,customBackgroundColor:x,leadingIcon:m,showLeadingIcon:g=!0,hintIconVariant:b,menuMinHeight:w,searchable:C=!1,searchPlaceholder:y})=>{const j=tP[e],N=rP[t],A=r||t,k=P.useRef(null),I=P.useRef(null),[_,E]=P.useState(!1),[T,R]=P.useState("");P.useEffect(()=>{_||R("")},[_]);const M=C&&T.trim()?i.filter(te=>String(te.title??"").toLowerCase().includes(T.trim().toLowerCase())):i,[$,L]=P.useState(null),[q,U]=P.useState(!1),D=i.find(te=>te.id===u);P.useEffect(()=>{U(!0)},[]);const F=S.default.useCallback(()=>{if(k.current&&_){const te=k.current.getBoundingClientRect(),pe=window.innerHeight-te.bottom,Y=te.top,Oe=pe<200&&Y>pe;L({top:Oe?te.top-8:te.bottom+8,left:te.left,width:te.width,openUpwards:Oe})}},[_]);P.useEffect(()=>{if(_){F();const te=z=>{I.current?.contains(z.target)||E(!1)};return window.addEventListener("scroll",te,!0),window.addEventListener("resize",F),()=>{window.removeEventListener("scroll",te,!0),window.removeEventListener("resize",F)}}},[_,F]),P.useEffect(()=>{if(!_)return;const te=z=>{k.current&&!k.current.contains(z.target)&&I.current&&!I.current.contains(z.target)&&E(!1)};return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[_]);const H=()=>{o||E(!_)},G=te=>{d(te),E(!1)},J=h?{height:h}:void 0,ne=()=>{if(p)return{borderRadius:p}},X=()=>{if(p)return{borderRadius:p}},re=v?.startsWith("var(")?{color:v}:void 0,ce=v&&!v.startsWith("var(")?v:void 0,K=x&&!x.startsWith("#")&&!x.startsWith("rgb")?x:void 0,ee=x&&(x.startsWith("#")||x.startsWith("rgb"))?{backgroundColor:x}:void 0;return s.jsxs("div",{className:O.clsx("w-full flex flex-col gap-1.5",c),children:[n&&s.jsx("label",{htmlFor:f,className:O.clsx("font-semibold truncate",N.labelFontSize,j.label,o&&In.label),children:n}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{ref:k,id:f,onClick:H,disabled:o,className:O.clsx("relative w-full cursor-default border text-left transition-colors duration-200 focus:outline-none focus-visible:ring-2","flex items-center",!h&&N.height,!x&&j.wrapper,K,o&&In.wrapper,!p&&N.rounded),style:{...J,...ne(),...ee},children:[g&&s.jsx("span",{className:O.clsx("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5",o?"text-disabled":D?j.selectedValue:j.placeholder),children:m?S.default.isValidElement(m)?S.default.cloneElement(m,{color:"currentColor"}):m:s.jsx(B.Category,{size:N.iconSize,color:"currentColor"})}),s.jsx("span",{className:O.clsx("flex-1 min-w-0 truncate",g?"pl-[36px]":t==="sm"?"pl-2.5":"pl-3.5"),children:D?s.jsx("span",{className:O.clsx(N.selectText,o?In.selectedValue:j.selectedValue),children:D.title}):s.jsx("span",{className:O.clsx(N.selectText,o?In.placeholder:j.placeholder,ce),style:re,children:l})}),s.jsx("span",{className:O.clsx("pointer-events-none flex items-center shrink-0",t==="sm"?"pr-1.5 pl-1.5":"pr-3.5"),children:_?s.jsx(B.ArrowUp2,{size:N.iconSize,color:"currentColor"}):s.jsx(B.ArrowDown2,{size:N.iconSize,color:"currentColor"})})]}),q&&_&&$&&yn.createPortal(s.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?s.jsxs("div",{className:O.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:[s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-surface-3 px-3 py-2",children:[s.jsx(B.SearchNormal1,{size:16,color:"currentColor",className:"shrink-0 text-low-em"}),s.jsx("input",{autoFocus:!0,value:T,onChange:te=>R(te.target.value),placeholder:y||"Buscar…",className:"w-full bg-transparent text-sm text-high-em placeholder:text-placeholder focus:outline-none"})]}),M.length===0?s.jsx("div",{className:"px-4 py-3 text-sm text-low-em",children:"Sin resultados"}):s.jsx(Ht,{items:M.map(({id:te,...z})=>({id:te,...z})),size:A,floating:!1,onSelect:G,selectedIds:u?[u]:[],className:"w-full overflow-y-auto !rounded-none !border-0 !bg-transparent !shadow-none"})]}):s.jsx(Ht,{items:i.map(({id:te,...z})=>({id:te,...z})),size:A,floating:!1,onSelect:G,selectedIds:u?[u]:[],className:O.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&&s.jsx(ft,{icon:s.jsx(B.InfoCircle,{variant:b}),label:a,iconSize:N.hintIconSize,gap:1,iconColorClass:O.clsx(j.hint,o&&In.hint),labelColorClass:O.clsx(j.hint,o&&In.hint),className:O.clsx(N.hintFontSize,"font-semibold")})]})};function nP({children:e,...t}){return s.jsx(xe.Menu,{as:"div",className:"relative inline-block text-left",...t,children:e})}const W2=S.default.memo(({isOver:e=!1,activeHeight:t="56px",inactiveHeight:r="0px",transitionDuration:n=150,transitionTimingFunction:a="ease-out",className:i,style:o,dropRef:l,id:c})=>s.jsx("div",{ref:l,id:c,className:i,style:{height:e?t:r,transition:`height ${n}ms ${a}`,overflow:"hidden",...o}}));W2.displayName="DropZone";const aP={backgroundImage:"repeating-linear-gradient(45deg, var(--surface-3) 0, var(--surface-3) 8px, transparent 8px, transparent 16px)"},Gn=S.default.memo(({children:e,className:t,style:r})=>s.jsx("div",{className:O.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:{...aP,...r},children:e}));Gn.displayName="DropPlaceholder";class iP 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:o="An error occurred while rendering this component.",retryLabel:l="Try again"}=this.props;return t?a?S.default.isValidElement(a)?S.default.cloneElement(a,{error:r,onRetry:this.resetError}):a:s.jsx("div",{className:"flex items-center justify-center h-full p-8",children:s.jsxs("div",{className:"text-center flex flex-col gap-6 items-center",children:[s.jsx("h3",{className:"text-lg font-semibold text-danger-main",children:i}),s.jsx("p",{className:"text-sm text-med-em",children:o}),s.jsx(W,{onClick:this.resetError,size:"sm",variant:"secondary",hierarchy:"primary",children:l})]})}):n}}const H2=S.default.memo(({icon:e=s.jsx(ie,{className:"text-danger-main",size:"2xl",children:s.jsx(B.Danger,{})}),title:t="Something went wrong",message:r,error:n,onRetry:a,retryLabel:i="Retry",showDetailsInProduction:o=!1,className:l,centered:c=!0,maxWidth:u="max-w-sm"})=>{const d=o||process.env.NODE_ENV==="development";return s.jsx(Sm,{children:s.jsx("div",{className:O.clsx("flex flex-col p-8",c&&"items-center justify-center h-full",l),children:s.jsxs("div",{className:O.clsx("text-center flex justify-center items-center flex-col gap-6",u),children:[typeof e=="string"?s.jsx("div",{className:"text-5xl",children:e}):s.jsx("div",{className:"flex justify-center",children:e}),s.jsx("h3",{className:"text-lg font-semibold text-danger-main",children:t}),r&&s.jsx("p",{className:"text-sm text-med-em mb-4",children:r}),n&&d&&s.jsxs("details",{className:"text-left",children:[s.jsx("summary",{className:"text-xs text-med-em cursor-pointer",children:"Technical details"}),s.jsxs("pre",{className:"text-xs text-danger-main p-2 rounded overflow-auto max-h-32",children:[n.message,n.stack&&`
|
|
19
|
+
`;return s.jsxs("div",{className:O.clsx("relative h-full cursor-col-resize",r),style:{width:9},children:[s.jsx("div",{className:"absolute top-0",style:{[d]:0,width:1,height:`calc(50% - ${48/2}px)`,backgroundColor:"var(--surface-3)"}}),s.jsx("div",{className:"absolute bottom-0",style:{[d]:0,width:1,height:`calc(50% - ${48/2}px)`,backgroundColor:"var(--surface-3)"}}),s.jsxs("div",{className:"absolute top-1/2 left-0 -translate-y-1/2",style:{width:9,height:48},children:[s.jsx("svg",{width:9,height:48,viewBox:"0 0 9 48",fill:"none",className:"absolute inset-0",children:s.jsx("path",{d:f,fill:t,stroke:"var(--surface-3)",strokeWidth:"1"})}),s.jsxs("div",{className:"absolute left-1/2 top-1/2 flex flex-col gap-[2px] items-center",style:{transform:"translate(-50%, -50%)"},children:[s.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"}),s.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"}),s.jsx("div",{className:"w-[2px] h-[2px] rounded-full bg-surface-4"})]})]})]})},a2=S.default.memo(({id:e,side:t,children:r,resizable:n=!0,panelBg:a="var(--surface-1)",className:i})=>{const{panels:o,onResizeStart:l,onResize:c,onResizeEnd:u,onCloseZoneChange:d,getPanelState:f,minCentralWidth:h,containerRef:p}=g5(),v=f(e),x=P.useRef(!1),m=P.useRef(!1),g=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:v}),N=Is(o[t==="left"?"right":"left"]),A=o[t],k=A.findIndex(D=>D.id===e),I=A.filter((D,F)=>D.open?t==="right"?F>k:F<k:!1).reduce((D,F)=>D+F.width,0),_=A.filter((D,F)=>!D.open||D.id===e?!1:t==="right"?F<k:F>k).reduce((D,F)=>D+F.width,0);y.current={side:t,oppositeSideWidth:N,minCentralWidth:h,externalPanelsWidth:I,internalPanelsWidth:_,panelState:v};const E=P.useRef(c),T=P.useRef(u),R=P.useRef(d);E.current=c,T.current=u,R.current=d;const M=P.useCallback(D=>{x.current&&(m.current=!0,!g.current&&(g.current=requestAnimationFrame(()=>{g.current=null;const F=p.current;if(!F)return;const H=F.getBoundingClientRect(),G=H.width,J=D.clientX-H.left,{side:ne,oppositeSideWidth:X,minCentralWidth:re,externalPanelsWidth:ce,internalPanelsWidth:K}=y.current,ee=e2(ne,J,G,X,re,ce,K),z=ee<w.current&&v5(ee);z!==b.current&&(b.current=z,R.current(e,z)),E.current(e,ee)})))},[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:F}=y.current;!D&&F&&F.width<Qx(F.width)&&E.current(e,Qx(F.width)),m.current=!1,b.current=!1,T.current(e,D),document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",$)},[e,M]),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",M),document.addEventListener("mouseup",$)},[e,M,$,l]);if(P.useEffect(()=>()=>{g.current&&cancelAnimationFrame(g.current),document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",$)},[M,$]),P.useEffect(()=>{if(v?.open&&!v?.exiting){const D=setTimeout(()=>{C.current=!0},150);return()=>clearTimeout(D)}else v?.open||(C.current=!1)},[v?.open,v?.exiting]),!v||!v.open&&!v.exiting)return null;const q=t==="left"?"right":"left",U=()=>v.exiting?t==="left"?"animate-panel-exit":"animate-panel-exit-right":C.current?"":t==="left"?"animate-panel-enter":"animate-panel-enter-right";return s.jsxs("div",{className:O.clsx("h-full relative flex-shrink-0","transition-[width] duration-100 ease-out",v.isResizing&&"transition-none",i),style:{width:`${v.width}%`},"data-panel":e,"data-panel-side":t,"data-in-close-zone":v.inCloseZone,"data-exiting":v.exiting,children:[s.jsx("div",{className:O.clsx("absolute inset-0 overflow-hidden","transition-opacity duration-100",U(),v.inCloseZone?"opacity-50":"opacity-100"),style:{backgroundColor:a},children:r}),n&&!v.exiting&&s.jsx("div",{className:O.clsx("absolute inset-y-0 z-50",q==="right"?"right-0 translate-x-full":"left-0 -translate-x-full"),onMouseDown:L,children:s.jsx(n2,{side:q,fillColor:a})}),!n&&s.jsx("div",{className:O.clsx("absolute top-0 bottom-0 w-px bg-surface-3",q==="right"?"right-0":"left-0")})]})});a2.displayName="Panel";const i2=S.default.memo(({children:e,className:t})=>s.jsx("div",{className:O.clsx("flex-1 min-w-0 h-full overflow-hidden relative","transition-all duration-100 ease-out",t),"data-panel-main":!0,children:e}));i2.displayName="PanelMain";function Jx(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 b5(e){if(!e||typeof e!="object")return!1;const t=e;return Array.isArray(t.left)&&Array.isArray(t.right)&&t.left.every(Jx)&&t.right.every(Jx)}function w5(e){const{config:t,persist:r=!1,persistKey:n="panel-state"}=e,a=P.useMemo(()=>{const m=new Map;return t.forEach(g=>m.set(g.id,g)),m},[t]),[i,o]=P.useState(()=>ks(t,1920)),[l,c]=P.useState(!1);P.useEffect(()=>{if(r&&typeof window<"u")try{const m=localStorage.getItem(n);if(m){const g=JSON.parse(m);if(b5(g)){o(g),c(!0);return}}}catch{}typeof window<"u"&&o(ks(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=>{o(g=>{const b=Kt(g,m);if(!b)return g;const{side:w,panel:C}=b;if(C.open)return{...g,[w]:g[w].map(L=>L.id===m?{...L,exiting:!0,inCloseZone:!1}:L)};const y=w==="left"?"right":"left",j=a.get(m),N=typeof window<"u"?window.innerWidth:1920,A=j?Es(j.defaultWidth,N):20,k=g[y].filter(L=>L.open).reduce((L,q)=>L+q.width,0),I=g[w].filter(L=>L.open&&L.id!==m),_=I.reduce((L,q)=>L+q.width,0),E=100-k-Re.minCentralPercent;if(_+A<=E)return{...g,[w]:g[w].map(L=>L.id===m?{...L,open:!0,width:A}:L)};const T=I.length*Re.snapMinWidth,R=E-T,M=Math.min(A,Math.max(Re.snapMinWidth,R)),$=E-M;if(_>0&&$<_){const L=$/_;return{...g,[w]:g[w].map(q=>{if(q.id===m)return{...q,open:!0,width:M};if(q.open){const U=Math.max(Re.snapMinWidth,q.width*L);return{...q,width:U}}return q})}}return{...g,[w]:g[w].map(L=>L.id===m?{...L,open:!0,width:M}:L)}})},[a]),d=P.useCallback((m,g)=>{o(b=>{const w=Kt(b,m);if(!w)return b;const{side:C,panel:y}=w,N=b[C==="left"?"right":"left"].filter(T=>T.open).reduce((T,R)=>T+R.width,0),A=b[C].filter(T=>T.open&&T.id!==m),k=A.reduce((T,R)=>T+R.width,0),I=100-N-Re.minCentralPercent,_=g+k;if(_<=I)return{...b,[C]:b[C].map(T=>T.id===m?{...T,width:g}:T)};if(g>y.width&&k>0){const T=_-I,R=Math.max(A.length*Re.snapMinWidth,k-T),M=I-R,$=R/k;return{...b,[C]:b[C].map(L=>{if(L.id===m)return{...L,width:M};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(g,I-k)}:T)}})},[]),f=P.useCallback(m=>{o(g=>{const b=Kt(g,m);if(!b||b.panel.open)return g;const{side:w}=b,C=w==="left"?"right":"left",y=a.get(m),j=typeof window<"u"?window.innerWidth:1920,N=y?Es(y.defaultWidth,j):20,A=g[C].filter($=>$.open).reduce(($,L)=>$+L.width,0),k=g[w].filter($=>$.open&&$.id!==m),I=k.reduce(($,L)=>$+L.width,0),_=100-A-Re.minCentralPercent;if(I+N<=_)return{...g,[w]:g[w].map($=>$.id===m?{...$,open:!0,width:N}:$)};const E=k.length*Re.snapMinWidth,T=_-E,R=Math.min(N,Math.max(Re.snapMinWidth,T)),M=_-R;if(I>0&&M<I){const $=M/I;return{...g,[w]:g[w].map(L=>{if(L.id===m)return{...L,open:!0,width:R};if(L.open){const q=Math.max(Re.snapMinWidth,L.width*$);return{...L,width:q}}return L})}}return{...g,[w]:g[w].map($=>$.id===m?{...$,open:!0,width:R}:$)}})},[a]),h=P.useCallback(m=>{o(g=>{const b=Kt(g,m);if(!b||!b.panel.open||b.panel.exiting)return g;const{side:w}=b;return{...g,[w]:g[w].map(C=>C.id===m?{...C,exiting:!0,inCloseZone:!1}:C)}})},[]),p=P.useCallback((m,g)=>{o(b=>{const w=Kt(b,m);if(!w)return b;const{side:C}=w;return{...b,[C]:b[C].map(y=>y.id===m?{...y,inCloseZone:g}:y)}})},[]),v=P.useCallback(m=>{o(g=>{const b=Kt(g,m);if(!b)return g;const{side:w}=b;return{...g,[w]:g[w].map(C=>C.id===m?{...C,exiting:!0,inCloseZone:!1}:C)}}),setTimeout(()=>{o(g=>{const b=Kt(g,m);if(!b)return g;const{side:w}=b;return{...g,[w]:g[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;o(ks(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 g=m.map(b=>setTimeout(()=>{o(w=>{const C=Kt(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()=>{g.forEach(b=>clearTimeout(b))}},[i]),{panels:i,togglePanel:u,resizePanel:d,openPanel:f,closePanel:h,resetPanels:x,handleCloseZoneChange:p,handlePanelClose:v}}const s2=S.default.memo(({mainContent:e,sidePanel:t,isPanelOpen:r,onPanelExited:n,panelWidth:a=400,panelPosition:i="right",animationDuration:o=75,className:l,mainContentBg:c="bg-white",sidePanelBg:u,resizable:d=!0,minWidth:f=280,maxWidth:h=800,handleFillColor:p="var(--surface-1)",onResize:v})=>{const[x,m]=P.useState(!1),[g,b]=P.useState(r),[w,C]=P.useState(a),[y,j]=P.useState(!1),N=P.useRef(!1),A=P.useRef({clientX:0,width:0}),k=P.useRef(null),[I,_]=P.useState(0);P.useEffect(()=>{const F=k.current;if(!F)return;const H=()=>{const J=F.offsetHeight;J>0&&_(J)};H();const G=new ResizeObserver(H);return G.observe(F),()=>G.disconnect()},[g]),P.useEffect(()=>{if(r)b(!0),m(!1);else if(g){m(!0);const F=setTimeout(()=>{b(!1),m(!1),n?.()},o);return()=>clearTimeout(F)}},[r,o,g,n]);const E=P.useCallback(F=>{if(!N.current)return;const H=F.clientX-A.current.clientX,G=i==="right"?A.current.width-H:A.current.width+H,J=Math.max(f,Math.min(h,G));C(J),v?.(J)},[i,f,h,v]),T=P.useCallback(()=>{N.current&&(N.current=!1,j(!1),document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",T))},[E]),R=P.useCallback(F=>{F.preventDefault(),A.current={clientX:F.clientX,width:w},N.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 M=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":`${o}ms`,D=()=>s.jsx("div",{ref:k,className:"relative h-full transition-all ease-out",style:{width:r?`${w}px`:"0px",opacity:r?1:0,transitionDuration:U},children:g&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:O.clsx("h-full overflow-hidden",u,x?L:$),children:t}),d&&!x&&s.jsx("div",{className:O.clsx("absolute top-0 z-50",q==="right"?"right-0 translate-x-full":"left-0 -translate-x-full"),onMouseDown:R,children:s.jsx(n2,{side:q,height:I,fillColor:p})})]})});return s.jsx("div",{className:O.clsx("w-full flex flex-col",l),style:{height:"100%",maxHeight:"100%",overflow:"hidden"},children:s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[i==="left"&&D(),s.jsx("div",{className:O.clsx("relative flex flex-col ease-out overflow-hidden",c),style:{width:M,transition:"width",transitionDuration:U},children:s.jsx("div",{className:"relative flex-1 overflow-hidden",children:e})}),i==="right"&&D()]})})});s2.displayName="SplitPanelLayout";const o2=S.default.forwardRef(({variant:e="full",sidebar:t,className:r,children:n,...a},i)=>e==="sidebar-left"?s.jsxs("div",{ref:i,className:Q.twMerge(O.clsx("flex h-full w-full",r)),...a,children:[s.jsx("aside",{className:"h-full w-64 shrink-0 overflow-y-auto border-r border-surface-3 bg-white",children:t}),s.jsx("div",{className:"min-w-0 flex-1 overflow-auto",children:n})]}):e==="centered"?s.jsx("div",{ref:i,className:Q.twMerge(O.clsx("h-full w-full overflow-auto",r)),...a,children:s.jsx(Yi,{size:"medium",className:"h-full",children:n})}):s.jsx("div",{ref:i,className:Q.twMerge(O.clsx("h-full w-full overflow-auto",r)),...a,children:n}));o2.displayName="PageLayout";const tr=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",l2=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.jsx("mask",{id:"mask0_1135_15829",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:s.jsx("path",{d:"M20 0H0V20H20V0Z",fill:"white"})}),s.jsxs("g",{mask:"url(#mask0_1135_15829)",children:[s.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"}),s.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"}),s.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"}),s.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"})]})]}),c2=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.jsxs("g",{clipPath:"url(#clip0_1314_55824)",children:[s.jsx("mask",{id:"mask0_1314_55824",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:s.jsx("path",{d:"M19.5 0.5V19.5H0.5V0.5H19.5Z",fill:"white",stroke:"white"})}),s.jsxs("g",{mask:"url(#mask0_1314_55824)",children:[s.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"}),s.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"}),s.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"})]})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1314_55824",children:s.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),j5=({size:e,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),u2=P.forwardRef(j5),C5=({size:e,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),d2=P.forwardRef(C5),S5=({size:e,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),N5=P.forwardRef(S5),O5=({size:e=20,className:t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 27 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:s.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"})}),P5=({size:e,...t},r)=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:e,height:e,fill:"none",ref:r,...t,children:[s.jsx("g",{clipPath:"url(#a)",children:s.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"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"a",children:s.jsx("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}),A5=P.forwardRef(P5),_5=({title:e,titleId:t,size:r,...n},a)=>s.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?s.jsx("title",{id:t,children:e}):null,s.jsxs("g",{clipPath:"url(#a)",children:[s.jsx("mask",{id:"b",width:24,height:24,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"luminance"},children:s.jsx("path",{fill:"#fff",d:"M24 0H0v24h24V0Z"})}),s.jsxs("g",{fill:"#fff",mask:"url(#b)",children:[s.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"}),s.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"}),s.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"})]})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"a",children:s.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),k5=P.forwardRef(_5),it=({size:e=20,className:t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:s.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"})}),f2=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 43 43",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.jsxs("g",{clipPath:"url(#clip0_50_31011)",children:[s.jsx("path",{d:"M33.9412 3.62061H14.6738V11.6106H38.0563V7.73402C38.0563 5.46567 36.2102 3.62061 33.9412 3.62061Z",fill:"#CED9F9"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_50_31011",children:s.jsx("rect",{width:"42",height:"42",fill:"white",transform:"translate(0.5 0.5)"})})})]}),rm=({size:e=16,className:t,...r})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:s.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"})}),h2=({size:e=12,...t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:s.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"})}),p2=({size:e=20,className:t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:s.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})=>s.jsx("svg",{width:e,height:e,className:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.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"})}),nm=({size:e=24,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.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"}),s.jsx("path",{d:"M11.9941 16.3909H12.0051",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),T5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.jsx("path",{d:"M10 4.57495V17.075",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M6.45801 7.07495H4.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M7.08301 9.57495H4.58301",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),E5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.jsx("path",{d:"M6.66667 7.25L5 8.91667L6.66667 10.5833",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M13.333 7.25L14.9997 8.91667L13.333 10.5833",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M10.8337 6.9751L9.16699 10.8585",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),I5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.jsx("path",{d:"M2.09961 5.92529H17.8996",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M7.09961 1.75854V5.80854",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M12.9004 1.75854V5.43354",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"})]}),M5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.jsx("path",{d:"M11.667 1.66675L9.16699 3.75008L11.667 5.83341",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"}),s.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"}),s.jsx("path",{d:"M8.33301 18.3334L10.833 16.2501L8.33301 14.1667",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"})]}),$5=({size:e=20,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.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"}),s.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"}),s.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"}),s.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"}),s.jsx("path",{d:"M5 10H15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"})]}),m2=e=>s.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsxs("g",{clipPath:"url(#clip0_1562_62901)",children:[s.jsx("mask",{id:"mask0_1562_62901",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"21",height:"20",children:s.jsx("path",{d:"M20.418 0H0.417969V20H20.418V0Z",fill:"white"})}),s.jsxs("g",{mask:"url(#mask0_1562_62901)",children:[s.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"}),s.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"}),s.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"})]})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1562_62901",children:s.jsx("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.417969)"})})})]}),R5=({size:e,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:"currentColor",ref:r,...t,children:s.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"})}),L5=P.forwardRef(R5),wh=({size:e=36,className:t})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[s.jsx("defs",{children:s.jsxs("filter",{id:"filter0_dd_50_34857",x:"0",y:"0",width:"36",height:"36",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[s.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),s.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"}),s.jsx("feMorphology",{radius:"2",operator:"erode",in:"SourceAlpha",result:"effect1_dropShadow_50_34857"}),s.jsx("feOffset",{dy:"2"}),s.jsx("feGaussianBlur",{stdDeviation:"2"}),s.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"}),s.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_50_34857"}),s.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"}),s.jsx("feMorphology",{radius:"2",operator:"erode",in:"SourceAlpha",result:"effect2_dropShadow_50_34857"}),s.jsx("feOffset",{dy:"4"}),s.jsx("feGaussianBlur",{stdDeviation:"4"}),s.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"}),s.jsx("feBlend",{mode:"normal",in2:"effect1_dropShadow_50_34857",result:"effect2_dropShadow_50_34857"}),s.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_50_34857",result:"shape"})]})}),s.jsxs("g",{filter:"url(#filter0_dd_50_34857)",children:[s.jsx("circle",{cx:"18",cy:"18",r:"12",fill:"var(--slider-thumb-bg, #FFFFFF)"}),s.jsx("circle",{cx:"18",cy:"18",r:"11.5",stroke:"var(--slider-thumb-stroke, #000000)"})]})]}),D5=({size:e=20,className:t})=>s.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:s.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)"})}),z5=({size:e=20,className:t})=>s.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:s.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)"})}),Ms=({width:e=165,height:t=24,className:r})=>s.jsxs("svg",{width:e,height:t,viewBox:"0 0 165 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[s.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"}),s.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"}),s.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"}),s.jsx("path",{d:"M109.376 18.1998H116.419V23.7633H102.037V0.41433H109.347V18.1998H109.376Z",fill:"currentColor"}),s.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"}),s.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"}),s.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"}),s.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"})]}),$s=({width:e=26,height:t=25,className:r})=>s.jsxs("svg",{width:e,height:t,viewBox:"0 0 26 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:[s.jsxs("g",{clipPath:"url(#clip0_2642_443540)",children:[s.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"}),s.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"})]}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_2642_443540",children:s.jsx("rect",{width:"25.7812",height:"25.0002",fill:"currentColor"})})})]}),am=({size:e=12,...t})=>s.jsx("svg",{width:e,height:e,fill:"none",...t,viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M4.8125 2.625L9.1875 7L4.8125 11.375",stroke:"#5A606B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),B5=({size:e=20,className:t})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,className:t,viewBox:"0 0 24 24",fill:"none",children:[s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"}),s.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"})]}),x2=({size:e=20,className:t,...r})=>s.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:[s.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),g2=({size:e=20,className:t,...r})=>s.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:[s.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),s.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"}),s.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"}),s.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]}),F5=({size:e=13,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),q5=P.forwardRef(F5),W5=({size:e=20,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:e,height:e,fill:"none",ref:r,...t,children:s.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"})}),im=P.forwardRef(W5),H5=({size:e=20,...t},r)=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",ref:r,fill:"none",...t,children:s.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"})}),sm=P.forwardRef(H5),v2=({size:e=20,className:t,...r})=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 11 11",fill:"currentColor",width:e,height:e,className:t,...r,children:s.jsx("path",{d:"M7.39952 1.875L0 9.27452L1.32583 10.6003L8.72543 3.20073V9.1875H10.6004V0H1.41293V1.875H7.39952Z",fill:"currentColor"})}),y2=({size:e=16,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[s.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"}),s.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"}),s.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"})]}),b2=({size:e=16,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[s.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"}),s.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"}),s.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"})]}),w2=({size:e=16,className:t,...r})=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:s.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"})}),j2=({size:e=16,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"none",width:e,height:e,className:t,...r,children:[s.jsx("path",{d:"M5.3335 1.3335V3.3335",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M10.6665 1.3335V3.3335",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M2.3335 6.06006H13.6668",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),s.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"}),s.jsx("path",{d:"M7.99715 9.13314H8.00314",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M5.52938 9.13314H5.53537",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M5.52938 11.1331H5.53537",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Jo=({size:e=20,className:t,...r})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[s.jsx("path",{d:"M1 4.5V3.25C1 2.005 2.005 1 3.25 1H4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M7.5 1H8.75C9.995 1 11 2.005 11 3.25V4.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M11 8V8.75C11 9.995 9.995 11 8.75 11H8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M4.5 11H3.25C2.005 11 1 9.995 1 8.75V7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M9 6V5M3 6H6H9H3ZM3 6V5V6ZM3 6V7V6ZM9 6V7V6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M6 3H7M6 9V3V9ZM6 9H7H6ZM6 9H5H6ZM6 3H5H6Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),C2=({size:e=20,className:t,...r})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[s.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"}),s.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"}),s.jsx("path",{d:"M1.5 11H10.5",stroke:"currentColor",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]}),el=({size:e=20,className:t,...r})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[s.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"}),s.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"})]}),tl=({size:e=20,className:t,...r})=>s.jsxs("svg",{width:e,height:e,viewBox:"0 0 12 12",fill:"none",className:t,xmlns:"http://www.w3.org/2000/svg",...r,children:[s.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"}),s.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"}),s.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"}),s.jsx("path",{d:"M5.16406 8.25H6.82906",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M4.75 6.25H7.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),V5=({size:e=19,...t})=>s.jsx("svg",{width:e,height:e,viewBox:"0 0 10 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:s.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"})}),W=S.default.forwardRef(({variant:e="brand",hierarchy:t="primary",size:r="xs",icons:n="none",leadingIcon:a,trailingIcon:i,children:o,disabled:l=!1,className:c,isToggled:u=!1,toggledLeadingIcon:d,toggledTrailingIcon:f,borderRadius:h,color:p,loading:v=!1,...x},m)=>{const g="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=o!=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},N=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"}},k=u&&d?d:a,I=u&&f?f:i,_=k&&S.default.isValidElement(k)?S.default.cloneElement(k,{size:N,color:"currentColor"}):null,E=I&&S.default.isValidElement(I)?S.default.cloneElement(I,{size:N,color:"currentColor"}):null,T=w[e]?.[t]??w[e]?.primary??"",R=Q.twMerge(O.clsx(g,v&&"relative",T,y[r],h&&`rounded-[${h}]`,p,b,c)),M=s.jsxs(s.Fragment,{children:[(n==="leading"||n==="both")&&_&&s.jsx("span",{className:`group-disabled:!text-disabled ${A[r].leading}`,children:_}),n!=="only"&&o,n==="only"&&_&&s.jsx("span",{className:"group-disabled:!text-disabled",children:_}),(n==="trailing"||n==="both")&&E&&s.jsx("span",{className:`group-disabled:!text-disabled ${A[r].trailing}`,children:E})]});return s.jsx("button",{ref:m,className:R,disabled:l||v,...x,children:v?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:s.jsx("span",{className:"animate-spin rounded-full border-2 border-current border-t-transparent",style:{width:j[r],height:j[r]}})}),s.jsx("span",{className:"invisible inline-flex items-center",children:M})]}):M})});W.displayName="Button";const S2=P.createContext(void 0),rl=()=>{const e=P.useContext(S2);if(!e)throw new Error("useAlertContext must be used within an Alert provider");return e},U5={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"}},eg={success:"neutral",warning:"neutral",error:"danger",info:"neutral",default:"neutral"},N2=({children:e,type:t="default"})=>{const[r,n]=P.useState(!1);return s.jsx(S2.Provider,{value:{open:r,setOpen:n,type:t},children:e})};N2.displayName="AlertDialog";const O2=({children:e})=>{const{setOpen:t}=rl();return S.default.cloneElement(e,{onClick:r=>{e.props.onClick?.(r),t(!0)}})};O2.displayName="AlertDialogTrigger";const P2=P.forwardRef(({className:e,children:t,...r},n)=>{const{open:a,setOpen:i,type:o}=rl(),l=U5[o];return s.jsx(xe.Transition,{appear:!0,show:a,as:P.Fragment,children:s.jsxs(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>i(!1),children:[s.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:s.jsx("div",{className:"fixed inset-0 bg-black-uniform/20","aria-hidden":"true"})}),s.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:s.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:s.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:s.jsx(xe.Dialog.Panel,{ref:n,className:O.clsx("relative bg-surface-bg rounded-[20px] max-w-[460px] w-full",l.borderClass,"shadow-xl",e),...r,children:s.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:s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx("div",{className:"p-2",children:s.jsx(Qr,{size:24,className:O.clsx(l.iconColor),"aria-hidden":"true"})}),s.jsx("div",{className:"flex-1 min-w-0",children:t}),s.jsx("div",{className:"shrink-0",children:s.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:s.jsx(p2,{size:20})})})]})})})})})})]})})});P2.displayName="AlertDialogContent";const A2=({children:e,className:t})=>s.jsx("div",{className:O.clsx("flex items-start",t),children:e});A2.displayName="AlertDialogHeader";const _2=P.forwardRef(({className:e,...t},r)=>s.jsx(xe.Dialog.Title,{ref:r,as:"h3",className:O.clsx("font-bold text-base text-high-em",e),...t}));_2.displayName="AlertDialogTitle";const k2=P.forwardRef(({className:e,...t},r)=>s.jsx(xe.Dialog.Description,{ref:r,className:O.clsx("text-sm font-semibold leading-[22px] tracking-normal whitespace-pre-line text-med-em mt-2 mb-8",e),...t}));k2.displayName="AlertDialogDescription";const T2=({children:e,className:t})=>s.jsx("div",{className:O.clsx("mt-4 flex gap-4 mb-4",t),children:e});T2.displayName="AlertDialogFooter";const E2=({className:e,actionVariant:t,onClick:r,...n})=>{const{type:a,setOpen:i}=rl(),o=t==="secondary",l=o?"neutral":eg[a],c=eg[a]==="danger"?"secondary":"tertiary";return s.jsx(W,{variant:l,hierarchy:c,size:"md",icons:o?void 0:"trailing",trailingIcon:s.jsx(B.ArrowRight,{}),onClick:u=>{r?.(u),i(!1)},className:O.clsx(e),...n})};E2.displayName="AlertDialogAction";const I2=P.forwardRef(({className:e,onClick:t,...r},n)=>{const{setOpen:a}=rl();return s.jsx(W,{ref:n,variant:"neutral",hierarchy:"secondary",size:"md",className:O.clsx(e),onClick:i=>{t?.(i),a(!1)},...r})});I2.displayName="AlertDialogCancel";const Ye=({theme:e="surface",size:t="sm",variant:r="simple",children:n,className:a,statusState:i="success"})=>{const o="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=Q.twMerge(O.clsx("rounded-full flex-shrink-0",d[t],u[i].bg,u[i].border&&`border ${u[i].border}`,a));return s.jsx("div",{className:h})}const f=Q.twMerge(O.clsx(o,l[e][r],c[t],a));return s.jsx("div",{className:f,children:n&&s.jsx("span",{children:n})})},Ft=({size:e="md",imageUrl:t,initials:r,className:n,statusBadge:a,onClick:i})=>{const o={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=O.clsx("relative",n),u=O.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=s.jsx(s.Fragment,{children:t?s.jsx("img",{src:t,alt:r||"Avatar",className:"w-full h-full object-cover"}):s.jsx("span",{children:r})});return s.jsxs("div",{className:c,children:[i?s.jsx("button",{onClick:i,type:"button",className:u,children:f}):s.jsx("div",{className:u,children:f}),a&&s.jsx("div",{className:O.clsx("absolute",d[e]),children:s.jsx(Ye,{variant:"status",statusState:a.state||"success",statusSize:a.size||o[e]})})]})},om=({avatars:e,size:t="md",max:r=4,className:n,counterClassName:a,...i})=>{const o=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=O.clsx("flex items-center",u[t],n),h=O.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 s.jsxs("div",{className:f,...i,children:[o.map((p,v)=>s.jsx("div",{className:"relative rounded-full border-2 border-white",children:s.jsx(Ft,{...p,size:t,className:"border-0"})},v)),c&&s.jsxs("div",{className:h,children:["+",l]})]})};om.displayName="AvatarGroup";function K5({...e}){return s.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function G5({className:e,...t}){return s.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 Z5({className:e,...t}){return s.jsx("li",{"data-slot":"breadcrumb-item",className:ae.default("inline-flex items-center gap-1.5",e),...t})}function Y5({asChild:e,className:t,...r}){if(e){const{children:n,...a}=r;if(!S.isValidElement(n))return null;const i=n,o={className:ae.default("transition-colors text-low-em font-semibold",t,i.props.className),...a};return S.cloneElement(i,o)}return s.jsx("a",{"data-slot":"breadcrumb-link",className:ae.default("transition-colors text-low-em font-semibold",t),...r})}function X5({className:e,...t}){return s.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 Q5({children:e,className:t,...r}){return s.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??s.jsx(am,{color:"currentColor",size:12})})}function J5({className:e,...t}){return s.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:["...",s.jsx("span",{className:"sr-only",children:"More"})]})}const e6=({label:e,leadingIcon:t,trailingIcon:r,items:n,isActive:a=!1,className:i,dropdownClassName:o,placement:l="bottom-left",showBackdrop:c=!0})=>{const[u,d]=P.useState(!1),f=P.useRef(null),h=s.jsx("svg",{className:O.clsx("w-4 h-4 transition-transform duration-200",u&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),p=()=>{d(g=>!g)},v=g=>{g.disabled||(g.onClick(),d(!1))},x=()=>{d(!1)};P.useEffect(()=>{const g=b=>{f.current&&!f.current.contains(b.target)&&d(!1)};if(u)return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[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 s.jsxs("div",{ref:f,className:"relative",children:[s.jsx(W,{variant:"brand",hierarchy:"primary",size:"sm",icons:r||t?"both":"trailing",leadingIcon:t,trailingIcon:r||h,onClick:p,style:{outline:"none",boxShadow:"none"},className:O.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&&s.jsx("div",{className:"fixed inset-0 z-10",onClick:x}),u&&s.jsx("div",{className:O.clsx("absolute z-20 w-[150px] bg-white border border-gray-100 rounded-[16px] shadow-lg overflow-hidden",m(),o),children:s.jsx("div",{children:n.map((g,b)=>s.jsxs(S.default.Fragment,{children:[b>0&&s.jsx("div",{className:"border-t border-gray-100"}),s.jsx("button",{onClick:()=>v(g),disabled:g.disabled,className:O.clsx("w-full text-left pl-5 py-3 transition-colors duration-150 group",g.disabled?"opacity-50 cursor-not-allowed":"hover:bg-gray-50 cursor-pointer"),children:s.jsxs("div",{className:"flex items-center gap-3",children:[g.icon&&s.jsx("div",{className:"flex-shrink-0 text-primary-900",children:g.icon}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"font-medium text-primary-900",style:{fontSize:"14px"},children:g.label})})]})})]},g.id))})})]})},xr=({options:e,value:t,onChange:r,size:n="md",variant:a="neutral",disabled:i=!1,className:o,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 s.jsx("div",{className:O.clsx("inline-flex items-center",o),children:e.map((h,p)=>{const v=h.value===t,x=h.icon&&S.default.isValidElement(h.icon)?S.default.cloneElement(h.icon,{size:u[n],color:"currentColor"}):null;return s.jsxs("button",{type:"button",disabled:i,onClick:()=>r(h.value),className:O.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,!v&&!i&&f[a].hover,v&&!i&&f[a].active,i&&"pointer-events-none","disabled:text-disabled"),children:[x&&s.jsx("span",{className:h.label?"mr-2":"",children:x}),h.label]},h.value)})})},t6={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]"}},qa={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"}},r6=e=>s.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",...e,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),n6=e=>s.jsx("svg",{fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",...e,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})}),Jt=({size:e="medium",checked:t=!1,indeterminate:r=!1,disabled:n=!1,className:a,...i})=>{const o=t6[e],l=P.useRef(null);return P.useEffect(()=>{l.current&&(l.current.indeterminate=r)},[r]),s.jsxs("label",{className:O.clsx("inline-flex items-center",n?"cursor-not-allowed":"cursor-pointer",a),children:[s.jsx("input",{ref:l,type:"checkbox",checked:t,disabled:n,className:"sr-only peer",...i}),s.jsxs("div",{className:O.clsx(o.wrapper,"inline-flex shrink-0 items-center justify-center border transition-colors duration-200",n?t||r?qa.disabled.checked:qa.disabled.unchecked:r?qa.indeterminate:t?qa.checked:qa.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&&s.jsx(r6,{className:o.icon}),r&&s.jsx(n6,{className:o.icon})]})]})},gr=({variant:e="neutral",size:t="md",disabled:r=!1,leadingIcon:n,trailingIcon:a,showLeadingIcon:i=!0,showTrailingIcon:o=!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",v={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&&S.default.isValidElement(n)?S.default.cloneElement(n,{size:x[t],color:"currentColor"}):null,g=o&&a&&S.default.isValidElement(a)?S.default.cloneElement(a,{size:x[t],color:"currentColor"}):null;return s.jsxs("a",{className:O.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"),v[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:[s.jsxs("span",{className:"inline-flex items-center",children:[m&&s.jsx("span",{className:v[t].leadingGap,children:m}),s.jsx("span",{children:u}),l==="inline"&&s.jsx("span",{className:v[t].trailingGap,children:g})]}),l==="end"&&s.jsx("span",{className:"shrink-0",children:g})]})},a6=({icon:e,title:t,description:r,linkText:n="Link",linkHref:a="#",checked:i=!1,onCheckboxChange:o,onLinkClick:l,className:c,disabled:u=!1})=>{const d=h=>{o&&o(h.target.checked)},f=e?S.default.cloneElement(e,{size:32,color:"var(--dark-100)"}):null;return s.jsxs("div",{className:O.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:[s.jsxs("div",{className:"flex items-center justify-between mx-8 mb-3 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[f&&s.jsx("div",{className:"shrink-0",children:f}),s.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})]}),s.jsx("div",{className:"flex-shrink-0 mt-2",children:s.jsx(Jt,{size:"large",checked:i,onChange:d,disabled:u})})]}),s.jsx("div",{className:"mx-8 mt-4 mb-3 flex-shrink-0",style:{minHeight:"50px"},children:s.jsx("p",{className:"font-inter text-[12px] leading-[1.4] text-[var(--dark-700)] line-clamp-3",style:{fontFamily:"var(--font-inter)"},children:r})}),s.jsx("div",{className:"flex-1"}),s.jsx("div",{className:"border-t border-gray-400 mb-3 flex-shrink-0"}),s.jsx("div",{className:"mx-8 mt-4 flex-shrink-0",children:s.jsx(gr,{variant:"neutral",size:"md",href:a,onClick:l,disabled:u,trailingIconPosition:"end",disableUnderline:!0,children:n})})]})},nl=S.default.forwardRef(({title:e,children:t,isCollapsed:r,onToggle:n,onClose:a,defaultCollapsed:i=!1,className:o},l)=>{const[c,u]=P.useState(i),d=r??c,f=r!==void 0,h=()=>{const v=!d;f||u(v),n?.(v)},p=Q.twMerge(O.clsx("bg-surface-2 rounded-t-3 overflow-hidden","w-[311px]",o));return s.jsxs("div",{ref:l,className:p,children:[s.jsxs("div",{className:"flex items-center justify-between px-5 h-[38px]",children:[s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:d?s.jsx(im,{}):s.jsx(sm,{}),onClick:h,"aria-label":d?"Expand":"Collapse",className:"shrink-0"}),s.jsx("div",{className:"text-sm font-semibold text-med-em flex-1 text-center",children:e}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(it,{}),onClick:a,"aria-label":"Close",className:"shrink-0"})]}),s.jsx("div",{className:"h-px bg-surface-3"}),!d&&t]})});nl.displayName="ChatCollapsibleContainer";const jh=({children:e,arrowDirection:t="down",className:r})=>s.jsxs("div",{className:O.clsx("relative inline-block",r),children:[t==="up"&&s.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)"}}),s.jsx("div",{className:O.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"&&s.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)"}})]}),al=({progress:e,className:t,variant:r="none",...n})=>{const a=Math.min(100,Math.max(0,e)),o=O.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"?s.jsx("span",{className:"font-medium text-sm text-high-em shrink-0",children:u}):r==="below"?s.jsx("p",{className:"mt-2 font-medium text-sm text-high-em text-right",children:u}):null};return s.jsxs("div",{className:"flex flex-col gap-y-2 w-full",children:[s.jsxs("div",{className:"flex items-center w-full gap-x-5",children:[s.jsxs("div",{className:O.clsx(o,r==="tooltip"&&"group cursor-pointer"),role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress: ${a}%`,...n,children:[s.jsx("div",{className:l,style:{width:`${a}%`}}),r==="tooltip"&&s.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:s.jsxs(jh,{arrowDirection:"down",children:[a,"%"]})})]}),r==="inline"&&c()]}),r==="below"&&c()]})},M2=S.default.forwardRef(({title:e="Todo:",items:t,onItemChange:r,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:o=!1,className:l},c)=>{const h=t.length>3?150:void 0,p=t.filter(b=>b.checked).length,v=t.length,x=v>0?Math.round(p/v*100):0,m=(b,w)=>{r?.(b,w)},g=s.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[s.jsxs("span",{className:"text-sm font-semibold text-med-em whitespace-nowrap",children:[typeof e=="string"?e:"Todo:"," ",p,"/",v]}),s.jsx(al,{progress:x,variant:"none",className:"h-2"})]});return s.jsx(nl,{ref:c,title:g,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:o,className:l,children:s.jsx("div",{className:"overflow-y-auto",style:h?{maxHeight:`${h}px`}:void 0,children:t.map((b,w)=>s.jsxs(S.default.Fragment,{children:[s.jsxs("label",{className:"flex items-center px-8 h-[50px] gap-6 cursor-pointer",children:[s.jsx(Jt,{size:"medium",checked:b.checked,disabled:b.disabled,onChange:C=>m(b.id,C.target.checked)}),s.jsx("span",{className:O.clsx("text-xs font-semibold text-med-em flex-1",b.checked&&"line-through"),children:b.label})]}),w<t.length-1&&s.jsx("div",{className:"h-px bg-surface-3"})]},b.id))})})});M2.displayName="ChatCollapsibleCheck";const $2=S.default.forwardRef(({title:e,children:t,actions:r=[],isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:o=!1,className:l},c)=>s.jsxs(nl,{ref:c,title:e,isCollapsed:n,onToggle:a,onClose:i,defaultCollapsed:o,className:l,children:[s.jsx("div",{className:"p-8",children:s.jsx("div",{className:"text-xs font-semibold text-med-em",children:t})}),s.jsx("div",{className:"h-px bg-surface-3"}),r.length>0&&s.jsx("div",{className:"flex gap-2 p-5",children:r.map((u,d)=>s.jsx(W,{variant:u.variant||"neutral",hierarchy:u.hierarchy||"tertiary",size:"xs",onClick:u.onClick,className:"flex-1",children:u.label},d))})]}));$2.displayName="ChatCollapsibleDialog";const i6={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"},s6={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}},o6="bg-surface-3 text-disabled cursor-not-allowed",Lr=({variant:e="primary",size:t="sm",leadingIcon:r=!0,trailingIcon:n=!0,onTrailingIconClick:a,children:i,className:o,disabled:l,...c})=>{const u=s6[t];let d=null;r===!0?d=s.jsx(B.Add,{}):S.default.isValidElement(r)&&(d=r);const f=d?S.default.cloneElement(d,{size:u.icon,color:"currentColor"}):null;let h=null;n===!0?h=s.jsx(B.ArrowDown2,{}):S.default.isValidElement(n)&&(h=n);const p=h?S.default.cloneElement(h,{size:u.icon,color:"currentColor"}):null,v=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"}},g=!!f,b=!!p;return!g&&!b?m[t].both:!g&&b?m[t].left:g&&!b?m[t].right:""};return s.jsxs("button",{disabled:l,className:O.clsx("inline-flex items-center justify-center shrink-0 font-medium transition-colors duration-200","focus:outline-none",l?o6:i6[e],u.container,x(),o),...c,children:[f&&s.jsx("span",{className:"mr-1",children:f}),s.jsx("span",{children:i}),p&&s.jsx("span",{className:"ml-1 p-0.5 rounded-full",role:"button",onClick:v,children:p})]})},l6={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"}},Ch=e=>{const{variant:t,size:r="md",title:n,disabled:a=!1,className:i,onClick:o,...l}=e,c=l6[r],u=O.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 s.jsxs("button",{type:"button",disabled:a,onClick:o,className:O.clsx(u,"items-center"),...l,children:[d&&s.jsx(Lr,{size:d.size||c.tagSize,variant:d.variant||"tertiary",disabled:a,leadingIcon:!1,trailingIcon:!1,children:d.content}),s.jsx("span",{className:O.clsx(c.title,a?"text-disabled":"text-med-em","truncate",d&&"ml-5"),children:n}),f&&s.jsx("div",{className:"ml-auto",children:s.jsx(W,{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 s.jsxs("button",{type:"button",disabled:a,onClick:o,className:O.clsx(u,"flex-col justify-center items-start"),...l,children:[s.jsxs("div",{className:"flex items-center gap-5",children:[s.jsx("span",{className:O.clsx(c.title,a?"text-disabled":"text-med-em","truncate"),children:n}),d&&s.jsx(Lr,{size:d.size||c.tagSize,variant:d.variant||"tertiary",disabled:a,leadingIcon:!1,trailingIcon:!1,children:d.content})]}),f&&s.jsx("span",{className:O.clsx(c.description,a?"text-disabled":"text-low-em","truncate w-full text-left"),children:f})]})}return null},ei=({children:e,size:t="sm",className:r})=>{const n=t==="md"?"px-2 py-1 text-sm":"px-2 py-1 text-xs";return s.jsx("kbd",{className:O.clsx("bg-surface-1 rounded font-medium text-med-em",n,r),children:e})},c6={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"}},u6=({config:e})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:O.clsx("flex items-center",e.headerHeight,e.headerPadding,"bg-surface-bg"),children:s.jsx("span",{className:O.clsx(e.headerText,"text-med-em"),children:"Opciones"})}),s.jsx("div",{className:"border-t border-surface-3"})]}),d6=({config:e,category:t,onBack:r})=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:O.clsx("flex items-center gap-3",e.headerHeight,e.headerPadding,"bg-surface-bg"),children:[s.jsx(W,{size:e.buttonSize,variant:"neutral",hierarchy:"secondary",icons:"only",leadingIcon:s.jsx(B.ArrowLeft2,{}),onClick:r}),s.jsx(Lr,{size:"xs",variant:t.leadingTag.variant||"tertiary",leadingIcon:!1,trailingIcon:!1,children:t.leadingTag.content}),s.jsx("span",{className:O.clsx(e.headerText,"text-med-em"),children:t.title})]}),s.jsx("div",{className:"border-t border-surface-3"})]}),f6=({config:e})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"border-t border-surface-3"}),s.jsxs("div",{className:O.clsx("flex items-center justify-between",e.footerHeight,e.headerPadding,"bg-surface-bg"),children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(ei,{size:e.kbdSize,children:"↑"}),s.jsx(ei,{size:e.kbdSize,children:"↓"})]}),s.jsx("span",{className:O.clsx(e.footerText,"text-low-em"),children:"navegar"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ei,{size:e.kbdSize,children:"↩"}),s.jsx("span",{className:O.clsx(e.footerText,"text-low-em"),children:"seleccionar"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ei,{size:e.kbdSize,children:"esc"}),s.jsx("span",{className:O.clsx(e.footerText,"text-low-em"),children:"cerrar"})]})]})]}),h6=({categories:e=[],size:t="md",onCategorySelect:r,onItemSelect:n,onClose:a,floating:i=!1,className:o,...l})=>{const[c,u]=P.useState("categories"),[d,f]=P.useState(null),h=c6[t],p=m=>{f(m),u("items"),r?.(m.id)},v=()=>{u("categories"),f(null)},x=m=>{d&&n?.(d.id,m.id)};return s.jsxs("div",{className:O.clsx("bg-surface-bg border border-surface-3 overflow-hidden","flex flex-col w-fit",h.borderRadius,i&&"absolute z-50",o),style:{boxShadow:"0px 8px 24px -4px rgba(0, 0, 0, 0.12)"},...l,children:[c==="categories"?s.jsx(u6,{config:h}):d?s.jsx(d6,{config:h,category:d,onBack:v}):null,c==="categories"?e.map(m=>s.jsx(Ch,{variant:"type-1",size:t,title:m.title,leadingTag:m.leadingTag,trailingButton:{icon:s.jsx(B.ArrowRight2,{}),onClick:()=>p(m),variant:"neutral",hierarchy:"secondary"},onClick:()=>p(m)},m.id)):d?d.items.map(m=>s.jsx(Ch,{variant:"type-2",size:t,title:m.title,tag:m.tag,description:m.description,onClick:()=>x(m)},m.id)):null,s.jsx(f6,{config:h})]})},R2=({className:e,activeView:t="chat",onChatClick:r,onHistorialClick:n,onSettingsClick:a,onCloseClick:i,containerWidth:o=0})=>{const l=[{id:"chat",label:"Chat",icon:s.jsx(l2,{}),content:s.jsx("div",{})},{id:"historial",label:"Historial",icon:s.jsx(c2,{}),content:s.jsx("div",{})}],c=l.findIndex(f=>f.id===t),u=f=>{const h=l[f];h.id==="chat"?r?.():h.id==="historial"&&n?.()},d=o<=350?"only-icon":"line-icons";return s.jsxs("div",{className:O.clsx("flex w-full items-baseline justify-between rounded-t-lg",e),children:[s.jsx("div",{className:"flex items-center",children:s.jsx(Cm,{variant:d,tabs:l,selectedIndex:c,onChange:u,contentSpacing:"none",showBorder:!1})}),s.jsxs("div",{className:"flex items-center gap-2 pr-8 self-center",children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:a,"aria-label":"Add"}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(it,{}),onClick:i,"aria-label":"Close"})]})]})},p6={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[o,l]=P.useState(!1),c=typeof e=="number"?e:p6[e];if(n&&!o)return s.jsx("img",{src:n,alt:a,className:O.clsx("rounded-[12px]","object-cover",i),style:{width:c,height:c},onError:()=>l(!0)});if(S.default.isValidElement(t)){const u=t.props.className;return S.default.cloneElement(t,{size:c,color:r,className:O.clsx(i,typeof u=="string"?u:void 0)})}return s.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:o="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 s.jsxs("div",{className:O.clsx("flex",h,f,c),...d,children:[e&&s.jsx("span",{className:o,children:s.jsx(ie,{size:a,children:e})}),t&&s.jsx("span",{className:O.clsx(p,l),children:t}),u]})},qt={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}},We={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"}},m6={default:{...We.default,placeholder:"placeholder-placeholder text-med-em",icon:"text-high-em"},outlined:{...We.outlined,placeholder:"placeholder-placeholder text-med-em",icon:"text-high-em"},danger:{...We.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:{...We.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"}},x6={sm:{...qt.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:{...qt.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:{...qt.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"}},us={wrapper:"bg-surface-3 pointer-events-none border-transparent",input:"disabled:text-disabled disabled:placeholder-disabled",hint:"text-disabled"},me=P.forwardRef(({variant:e="default",size:t="md",label:r,hint:n,leadingIcon:a,trailingIcon:i,leadingIconColor:o,trailingIconColor:l,disabled:c,className:u,type:d,customBackground:f,placeholderColor:h,multiline:p,customFontWeight:v,fontSize:x,customFontSize:m,hintIconVariant:g,onInputClick:b,...w},C)=>{const y=m6[e],j=x6[t],N=d==="password",[A,k]=P.useState(!1),I=N&&A?"text":d,_=m||x,E={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},T=_&&E[_]||void 0,R=_&&!E[_]?{fontSize:_}:void 0,M=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=v||void 0,U=F=>{b&&(F.preventDefault(),b())},D=Q.twMerge(O.clsx("w-full bg-transparent text-placeholder focus:outline-none text-ellipsis",!p&&"h-full",p?j.textareaPadding:j.inputPadding,!v&&"font-medium",!_&&j.fontSize,y.placeholder,c&&us.input,h,T,a&&j.inputPaddingLeftWithIcon,(i||N&&!p)&&j.inputPaddingRightWithIcon,b&&"cursor-pointer pointer-events-none"));return s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-col gap-1.5",b&&"cursor-pointer",u)),onClick:U,children:[r&&s.jsx("label",{htmlFor:w.id,className:Q.twMerge(O.clsx("font-semibold text-med-em pl-[2px] truncate",j.labelFontSize)),children:r}),s.jsxs("div",{className:Q.twMerge(O.clsx("relative flex items-center border transition-colors duration-200",j.rounded,!p&&j.height,y.wrapper,c&&us.wrapper)),style:{backgroundColor:L},children:[a&&s.jsx(ie,{size:j.iconSize,className:Q.twMerge(O.clsx("absolute top-1/2 -translate-y-1/2",j.leadingIconPosition,o||y.icon)),children:a}),p?s.jsx("textarea",{ref:C,disabled:c,className:Q.twMerge(D,"resize-none overflow-hidden"),style:{fontWeight:q,...R},onInput:M,rows:1,...w}):s.jsx("input",{ref:C,disabled:c,type:I,className:D,style:{fontWeight:q,...R},...w}),!p&&N?s.jsx("button",{type:"button",onClick:()=>k(!A),className:Q.twMerge(O.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?s.jsx(g2,{size:j.iconSize}):s.jsx(x2,{size:j.iconSize})}):i?s.jsx(ie,{size:j.iconSize,className:Q.twMerge(O.clsx("absolute top-1/2 -translate-y-1/2",j.trailingIconPosition,l||y.icon)),children:i}):null]}),n&&s.jsx(ft,{icon:s.jsx(B.InfoCircle,{variant:g||"Bold"}),label:n,iconSize:j.hintIconSize,gap:1,iconColorClass:O.clsx(y.hint,c&&us.hint),labelColorClass:O.clsx(y.hint,c&&us.hint),className:Q.twMerge(O.clsx(j.hintFontSize,"font-semibold"))})]})});me.displayName="InputField";const g6={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"}},vt=({size:e="md",disabled:t=!1,showCheckbox:r=!0,showLeadingImage:n=!0,showLeadingIcon:a=!0,showDescription:i=!0,showTrailingIcon:o=!0,showTag:l=!0,showTrailingText:c=!0,title:u,description:d,customTitleColor:f,customBackgroundColor:h,customHoverColor:p,customLeadingIconColor:v,checked:x=!1,indeterminate:m=!1,onCheckboxChange:g,leadingImageUrl:b,leadingImageAlt:w="List item image",leadingIcon:C,trailingIcon:y,tagContent:j,tagVariant:N="tertiary",trailingText:A,trailingAction:k,className:I,middleContainerClassName:_,as:E="button",onClick:T,...R})=>{const M=g6[e],$=D=>{D.stopPropagation()},L=D=>{g?.(D.target.checked)},q=Q.twMerge(O.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),I),U=s.jsxs(s.Fragment,{children:[r&&s.jsx("div",{onClick:$,className:O.clsx("flex items-center",M.checkboxMargin),children:s.jsx(Jt,{size:M.checkbox,checked:x,indeterminate:m,onChange:L,disabled:t})}),s.jsxs("div",{className:Q.twMerge(O.clsx("flex items-center",M.middleGap),_),children:[n&&b&&s.jsx("div",{className:O.clsx("shrink-0",t&&"opacity-50"),children:s.jsx(ie,{size:M.leadingImage,imageUrl:b,alt:w})}),a&&s.jsx("div",{className:"shrink-0",children:s.jsx(ie,{size:M.leadingIcon,color:t?"var(--text-disabled)":v||"var(--med-em)",children:C||s.jsx(B.Element3,{})})}),s.jsxs("div",{className:"flex flex-col gap-0 justify-start items-start min-w-0 shrink mr-8",children:[s.jsx("span",{className:O.clsx(M.title,f||(t?"text-disabled":"text-med-em"),"truncate max-w-full"),children:u}),i&&d&&s.jsx("span",{className:O.clsx(M.description,t?"text-disabled":"text-low-em","truncate max-w-full"),children:d})]})]}),s.jsxs("div",{className:O.clsx("flex items-center ml-auto",M.rightGap),children:[o&&s.jsx(ie,{size:M.trailingIcon,color:t?"var(--text-disabled)":"var(--high-em)",children:y||s.jsx(B.ArrowRight2,{})}),l&&j&&s.jsx(Lr,{size:M.tag,variant:N,disabled:t,leadingIcon:!1,trailingIcon:!1,children:j}),c&&A&&s.jsx("span",{className:O.clsx(M.trailingText,t?"text-disabled":"text-low-em"),children:A}),k&&s.jsx("span",{className:"flex items-center",onClick:D=>D.stopPropagation(),children:k})]})]});return E==="div"?s.jsx("div",{className:q,onClick:T,...R,children:U}):s.jsx("button",{type:"button",disabled:t,onClick:T,className:q,...R,children:U})};function L2(e,t){const[r,n]=P.useState(e);return P.useEffect(()=>{const a=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(a)}},[e,t]),r}const v6={position:"fixed",visibility:"hidden",top:0,left:0,zIndex:50};function Na({triggerRef:e,panelRef:t,enabled:r,offset:n=8,constrain:a=!1}){const[i,o]=P.useState(v6);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,v=c.top-n-h;let x,m;p>=u.height||p>=v?(x=c.bottom+n,m=f-x-h):(m=v,x=c.top-n-Math.min(u.height,m));let g=c.right-u.width;g<h&&(g=c.left),g=Math.max(h,g),o({position:"fixed",top:x,left:g,...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 Qi({refs:e,onClose:t,enabled:r=!0}){P.useEffect(()=>{if(!r)return;const n=i=>{e.some(o=>o.current?.contains(i.target))||t()},a=i=>{e.some(o=>o.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 y6({triggerRef:e,open:t,onClose:r,constrain:n=!1,offset:a}){const i=P.useRef(null),o=Na({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:o,backdropProps:{style:{position:"fixed",inset:0,zIndex:49},onMouseDown:r}}}function il(){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 b6(){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 w6={xs:"rounded-[8px]",sm:"rounded-[12px]",md:"rounded-[16px]",lg:"rounded-[20px]"},Ht=({items:e=[],header:t,headerSize:r="xs",size:n="md",selectedIds:a=[],onSelect:i,floating:o=!1,triggerRef:l,onClose:c,className:u,...d})=>{const f=w6[n],h=!!l,p=S.default.useRef(null);Qi({refs:[p,...l?[l]:[]],onClose:c??(()=>{}),enabled:!!c});const v=Na({triggerRef:l??{current:null},panelRef:p,enabled:h}),x=s.jsxs("div",{ref:p,className:O.clsx("bg-surface-bg border border-surface-3 overflow-hidden","flex flex-col w-fit",f,!h&&o&&"absolute z-50",u),style:{boxShadow:"0px 8px 24px -4px rgba(0, 0, 0, 0.12)",...h?v:{}},...d,children:[t&&s.jsxs(s.Fragment,{children:[s.jsx(vt,{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"}),s.jsx("div",{className:"border-t border-surface-3"})]}),e.map((m,g)=>{const{id:b,showDividerAfter:w,onClick:C,onSelect:y,customBackgroundColor:j,customHoverColor:N,...A}=m,k=b?a.includes(b):!1,I=g===e.length-1;return s.jsxs(S.default.Fragment,{children:[s.jsx(vt,{size:n,onClick:_=>{y?.(),b&&i?.(b),C?.(_)},customBackgroundColor:j||"bg-surface-bg",customHoverColor:N||"hover:bg-surface-2",className:O.clsx("shrink-0",k&&"bg-surface-1",A.className),checked:k,...A}),w&&!I&&s.jsx("div",{className:"border-t border-surface-3"})]},b||g)})]});return h&&typeof document<"u"?yn.createPortal(x,document.body):x},D2=({id:e,title:t,preview:r,onClick:n,menuItems:a,className:i})=>{const[o,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 o&&document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[o]);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:O.clsx("!h-[34px]",f.className),...p&&{customTitleColor:"text-danger-em",customLeadingIconColor:"var(--danger-em)"}}})||[];return s.jsxs("div",{className:O.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:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-xs font-semibold text-med-em mb-1",children:t}),s.jsx("p",{className:"text-[10px] font-medium text-low-em",children:r})]}),a&&a.length>0&&s.jsxs("div",{className:"flex-shrink-0 relative",onClick:f=>f.stopPropagation(),children:[s.jsx(W,{ref:u,variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.More,{variant:"Linear"}),"aria-label":"Más opciones",onClick:()=>l(!o)}),o&&s.jsx("div",{ref:c,className:"absolute right-0 top-full mt-1 z-50",children:s.jsx(Ht,{items:d,size:"xs",className:"!w-[182px]",onSelect:f=>{const h=a.find(p=>p.id===f);h?.onClick&&h.onClick({}),l(!1)}})})]})]})},j6=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((o,l)=>{const c=new Date(l.timestamp);return c>=r?o.today.push(l):c>=n?o.last7Days.push(l):c>=a?o.last30Days.push(l):c>=i&&o.last90Days.push(l),o},{today:[],last7Days:[],last30Days:[],last90Days:[]})},C6=(e,t)=>{if(!t.trim())return e;const r=t.toLowerCase();return e.filter(n=>n.title.toLowerCase().includes(r))},z2=({items:e,onItemClick:t,searchPlaceholder:r="Buscar en el historial...",className:n,onSearchChange:a,emptyState:i})=>{const[o,l]=P.useState(""),c=P.useMemo(()=>{const h=C6(e,o);return j6(h)},[e,o]),u=h=>{const p=h.target.value;l(p),a?.(p)},d=(h,p)=>p.length===0?null:s.jsxs("div",{children:[s.jsx("div",{className:"px-8 py-8",children:s.jsx("h3",{className:"text-xs font-semibold text-low-em",children:h})}),p.map((v,x)=>s.jsxs(S.default.Fragment,{children:[s.jsx(D2,{id:v.id,title:v.title,preview:v.preview,menuItems:v.menuItems,onClick:()=>t?.(v)}),x<p.length-1&&s.jsx("div",{className:"border-b border-surface-2"})]},v.id))]},h),f=c.today.length===0&&c.last7Days.length===0&&c.last30Days.length===0&&c.last90Days.length===0;return s.jsxs("div",{className:O.clsx("flex flex-col",n),children:[s.jsx("div",{className:"px-8 pt-9",children:s.jsx(me,{size:"md",variant:"default",placeholder:r,leadingIcon:s.jsx(B.SearchNormal,{size:20,variant:"Linear"}),value:o,onChange:u})}),f?o?s.jsx("div",{className:"flex flex-col items-center justify-center py-12 px-8",children:s.jsxs("p",{className:"text-sm text-low-em text-center",children:['No se encontraron resultados para "',o,'"']})}):i??null:s.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)]})]})},S6=[{id:"conversation",label:"Conversación"},{id:"constructor",label:"Constructor"}],B2=({inputValue:e,onInputChange:t,onSendClick:r,placeholder:n="Input Text",variant:a="default",className:i,minLines:o=2,maxLines:l=10})=>{const[c,u]=P.useState("conversation"),d=P.useRef(null),f=20,h=o*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,g=Math.max(h,Math.min(m,p));x.style.height=`${g}px`,x.style.overflow=m>p?"auto":"hidden"},[e,h,p]);const v=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),r?.())};return s.jsxs("div",{ref:d,className:O.clsx("flex flex-col gap-3 p-4 rounded-xl bg-surface-2 border border-surface-3",i),children:[s.jsx("div",{className:"mb-1",children:s.jsx(W,{variant:"neutral",hierarchy:"quaternary",size:"xs",icons:"only",leadingIcon:s.jsx(B.Hashtag,{}),"aria-label":"Add"})}),s.jsx(bl,{variant:"default",placeholder:n,value:e,onChange:x=>t?.(x.target.value),onKeyDown:v,resize:"none",className:"[&_textarea]:!min-h-0"}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center justify-start gap-4",children:[s.jsx("div",{className:"flex items-center gap-4",children:s.jsx(W,{variant:"neutral",hierarchy:"quaternary",size:"md",borderRadius:"12px",icons:"only",leadingIcon:s.jsx(B.AddCircle,{}),"aria-label":"Add"})}),a==="default"&&s.jsx(yl,{withBorder:!0,items:S6,value:c,onChange:u,size:"ai-chat"})]}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"md",icons:"only",borderRadius:"12px",leadingIcon:s.jsx(m2,{}),onClick:r,"aria-label":"Send"})]})]})},fi=({variant:e,hierarchy:t="flat",children:r,className:n})=>s.jsx("div",{className:O.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:s.jsx("div",{className:O.clsx("chat-message-content",e==="sent"?"chat-message-sent-content":"chat-message-received-content"),children:r})}),Sh=({className:e,onCopyClick:t,onLikeClick:r,onDislikeClick:n,onRefreshClick:a})=>{const[i,o]=P.useState(!1),[l,c]=P.useState(!1),u=()=>{o(!i),r?.()},d=()=>{c(!l),n?.()};return s.jsxs("div",{className:O.clsx("inline-flex items-center gap-4",e),children:[s.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Copy message",children:s.jsx(ie,{size:"sm",children:s.jsx(B.Copy,{})})}),s.jsx("button",{onClick:u,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Like message",children:s.jsx(ie,{size:"sm",children:i?s.jsx(B.Like1,{variant:"Bold"}):s.jsx(B.Like1,{variant:"Outline"})})}),s.jsx("button",{onClick:d,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Dislike message",children:s.jsx(ie,{size:"sm",children:l?s.jsx(B.Dislike,{variant:"Bold"}):s.jsx(B.Dislike,{variant:"Outline"})})}),s.jsx("button",{onClick:a,className:"p-1 rounded hover:bg-surface-2 transition-colors cursor-pointer text-high-em","aria-label":"Refresh response",children:s.jsx(ie,{size:"sm",children:s.jsx(B.Refresh,{})})})]})},F2=({fileName:e,fileSize:t,alignment:r="left",className:n,...a})=>s.jsx("a",{href:a.href||"#",download:!0,className:O.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:s.jsxs("div",{className:"flex flex-col text-low-em",children:[s.jsx("span",{className:"font-medium text-sm",children:e}),s.jsx("span",{className:"font-normal text-sm",children:t})]})}),lm=({className:e})=>s.jsx("div",{className:O.clsx("w-full max-w-max self-start",e),children:s.jsx("div",{className:"flex items-center gap-1 px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-3 h-3 bg-low-em rounded-full animate-typing-dot",style:{animationDelay:"0ms"}}),s.jsx("span",{className:"w-3 h-3 bg-surface-4 rounded-full animate-typing-dot",style:{animationDelay:"200ms"}}),s.jsx("span",{className:"w-3 h-3 bg-low-em rounded-full animate-typing-dot",style:{animationDelay:"400ms"}})]})})}),N6=S.default.lazy(()=>Promise.resolve().then(()=>require("./index-C7PgPp9S.cjs"))),tg=({children:e})=>s.jsx(P.Suspense,{fallback:s.jsx("span",{children:e}),children:s.jsx(N6,{children:e})}),q2=S.default.memo(({messages:e,showTypingIndicator:t=!1,children:r,className:n,borderSide:a="none",borderStyle:i="surface-3",showHeader:o=!1,headerHeight:l=56,activeView:c="chat",onChatClick:u,onHistorialClick:d,onSettingsClick:f,onCloseClick:h,containerWidth:p=0,historialItems:v=[],onHistorialItemClick:x,historialSearchPlaceholder:m,onHistorialSearchChange:g,historialEmptyState:b,showChatInput:w=!0,chatInputValue:C,onChatInputChange:y,onChatSendClick:j,chatInputPlaceholder:N="Input Text",chatInputVariant:A="default",chatInputMinLines:k=2,chatInputMaxLines:I=10,onMessageCopyClick:_,onMessageLikeClick:E,onMessageDislikeClick:T,onMessageRefreshClick:R})=>{const M=S.default.useMemo(()=>a==="none"?"":`${a==="left"?"border-l":"border-r"} ${i==="surface-3"?"border-surface-3":"border-surface-4"}`,[a,i]);return s.jsxs("div",{className:`h-full w-full flex flex-col bg-white ${M} ${n||""}`,children:[o&&s.jsxs(s.Fragment,{children:[s.jsx("div",{style:{height:`${l}px`},children:s.jsx(R2,{activeView:c,onChatClick:u,onHistorialClick:d,onSettingsClick:f,onCloseClick:h,containerWidth:p,className:"pl-8 items-end h-full"})}),s.jsx(fe,{})]}),c==="historial"?s.jsx(z2,{items:v,onItemClick:x,searchPlaceholder:m,onSearchChange:g,emptyState:b,className:"flex-1 overflow-y-auto"}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex-1 overflow-y-auto",children:e?s.jsxs("div",{className:"flex flex-col gap-10 px-9 py-6",children:[e.map(L=>s.jsx(S.default.Fragment,{children:L.attachment?s.jsxs("div",{className:`flex flex-col gap-4 ${L.variant==="sent"?"items-end":"items-start"}`,children:[s.jsxs("div",{className:`flex flex-col gap-10 ${L.variant==="sent"?"items-end":"items-start"}`,children:[s.jsx(fi,{variant:L.variant,hierarchy:"bubble",children:typeof L.content=="string"?s.jsx(tg,{children:L.content}):L.content}),s.jsx("div",{className:"w-auto max-w-[300px]",children:s.jsx(F2,{fileName:L.attachment.fileName,fileSize:L.attachment.fileSize,alignment:L.variant==="sent"?"right":"left",href:L.attachment.href})})]}),L.variant==="received"&&s.jsx(Sh,{onCopyClick:()=>_?.(L.id),onLikeClick:()=>E?.(L.id),onDislikeClick:()=>T?.(L.id),onRefreshClick:()=>R?.(L.id)})]}):s.jsxs("div",{className:`flex flex-col ${L.variant==="sent"?"items-end":"items-start"}`,children:[s.jsx(fi,{variant:L.variant,hierarchy:"bubble",children:typeof L.content=="string"?s.jsx(tg,{children:L.content}):L.content}),L.variant==="received"&&s.jsx(Sh,{onCopyClick:()=>_?.(L.id),onLikeClick:()=>E?.(L.id),onDislikeClick:()=>T?.(L.id),onRefreshClick:()=>R?.(L.id)})]})},L.id)),t&&s.jsx(lm,{})]}):r}),w&&s.jsx("div",{className:"p-4",children:s.jsx(B2,{minLines:k,maxLines:I,inputValue:C,onInputChange:y,onSendClick:j,placeholder:N,variant:A,containerWidth:p})})]})]})});q2.displayName="ChatPanel";const ht=S.default.memo(({icon:e=s.jsx(ie,{size:56,children:s.jsx(B.Box2,{})}),description:t,actionLabel:r,onAction:n,flat:a=!1,className:i,iconClassName:o,descriptionClassName:l})=>s.jsx("div",{className:O.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:s.jsxs("div",{className:"flex flex-col items-center gap-10 text-center",children:[s.jsx("span",{className:O.clsx("text-low-em",o),children:e}),t&&s.jsx("p",{className:O.clsx("text-lg font-medium text-low-em",l),children:t}),r&&s.jsx(W,{variant:"secondary",hierarchy:"primary",size:"md",icons:"leading",leadingIcon:s.jsx(B.Add,{}),onClick:n,children:r})]})}));ht.displayName="EmptyState";function O6(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),o=Math.floor(i/24);return n<60?"Just now":a<60?`${a}m ago`:i<24?`${i}h ago`:o<7?t.toLocaleDateString("en-US",{weekday:"short"}):t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}const P6=({id:e,name:t,timestamp:r,status:n,avatarUrl:a,avatarInitials:i,isActive:o=!1,onClick:l,className:c})=>s.jsxs("button",{type:"button",id:e,onClick:l,className:O.clsx("flex items-center gap-6 w-full px-8 py-8 text-left transition-colors",o?"bg-surface-2":"hover:bg-surface-1 active:bg-surface-2",c),children:[s.jsx(Ft,{size:"md",imageUrl:a,initials:i}),s.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:t}),s.jsxs("div",{className:"flex items-center gap-8 shrink-0",children:[s.jsx("span",{className:"text-xs font-medium text-high-em whitespace-nowrap",children:O6(r)}),n&&s.jsx(Ye,{variant:"status",statusState:n,size:"sm"})]})]}),rg=({items:e,activeId:t,searchValue:r="",searchPlaceholder:n="Search chats...",emptyState:a,onItemClick:i,onSearchChange:o,className:l})=>s.jsxs("div",{className:O.clsx("flex flex-col h-full",l),children:[s.jsx("div",{className:"flex items-center h-[64px] px-8 shrink-0",children:s.jsx(me,{size:"md",variant:"default",placeholder:n,trailingIcon:s.jsx(B.SearchNormal1,{variant:"Linear"}),value:r,onChange:c=>o?.(c.target.value),className:"w-full"})}),s.jsx("div",{className:"border-b border-surface-3 shrink-0"}),e.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:a??s.jsx(ht,{flat:!0,className:"bg-transparent",description:"No chats yet"})}):s.jsx("div",{className:"flex-1 overflow-y-auto",children:e.map((c,u)=>s.jsxs(S.default.Fragment,{children:[s.jsx(P6,{...c,isActive:c.id===t,onClick:()=>i?.(c)}),u<e.length-1&&s.jsx("div",{className:"border-b border-surface-3"})]},c.id))})]}),fe=({direction:e="horizontal",width:t,height:r,className:n})=>{const a=e==="horizontal"?"100%":"0.5px",i=e==="horizontal"?"0.5px":"100%",o=O.clsx(n,"bg-surface-3 items-center"),l={width:t??a,height:r??i};return s.jsx("div",{className:o,style:l})};function ng(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}function A6(e){return e==="whatsapp"?s.jsx(B.Whatsapp,{size:18,variant:"Bold"}):e==="email"?s.jsx(B.Sms,{size:18,variant:"Linear"}):e==="phone"?s.jsx(B.Call,{size:18,variant:"Linear"}):null}const _6={completada:"success",pendiente:"warning",cancelada:"danger"},k6={completada:"Completada",pendiente:"Pendiente",cancelada:"Cancelada"},T6=({order:e})=>s.jsxs("div",{className:"flex flex-col gap-6 p-8 bg-surface-1 rounded-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.orderNumber}),s.jsx("span",{className:"text-xs text-low-em",children:e.date})]}),e.images&&e.images.length>0&&s.jsx("div",{className:"flex gap-4",children:e.images.slice(0,4).map((t,r)=>s.jsx("img",{src:t,alt:"",className:"w-12 h-12 rounded-4 object-cover bg-surface-2"},r))}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.time&&s.jsx("span",{className:"text-xs text-low-em",children:e.time}),s.jsx("span",{className:"text-sm font-semibold text-high-em ml-auto",children:e.price})]}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx(Ye,{variant:"simple",theme:_6[e.status],size:"sm",children:k6[e.status]}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"none",onClick:e.onViewDetails,children:"Ver detalles"})]})]}),E6=({field:e})=>s.jsxs("div",{className:"flex items-center gap-8 px-8 py-6",children:[s.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-1",children:[s.jsx("span",{className:"text-xs text-low-em",children:e.label}),s.jsx("span",{className:"text-sm font-semibold text-high-em truncate",children:e.value})]}),e.onEdit&&s.jsx(W,{variant:"neutral",hierarchy:"quaternary",size:"xs",icons:"only",leadingIcon:s.jsx(B.Edit2,{size:16,variant:"Linear"}),onClick:e.onEdit})]}),ag=({contact:e,messages:t=[],orders:r=[],isDetailOpen:n=!1,showTypingIndicator:a=!1,inputValue:i="",inputPlaceholder:o="Escribe un mensaje...",onBack:l,onCallClick:c,onVideoClick:u,onDetailOpen:d,onDetailClose:f,onInputChange:h,onSendClick:p,onMoreClick:v,className:x})=>{const m=A6(e.channel);return s.jsxs("div",{className:O.clsx("flex relative overflow-hidden h-full bg-surface-bg",x),children:[s.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-4 px-8 h-[64px] shrink-0",children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.ArrowLeft2,{size:18,variant:"Linear"}),onClick:l}),s.jsxs("button",{type:"button",className:"flex items-center gap-6 flex-1 min-w-0 text-left",onClick:d,children:[s.jsx(Ft,{size:"md",imageUrl:e.avatarUrl,initials:e.avatarInitials}),s.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),m&&s.jsx("span",{className:"text-low-em shrink-0",children:m})]}),s.jsx(xr,{size:"sm",variant:"neutral",value:"",onChange:g=>{g==="call"&&c?.(),g==="video"&&u?.()},options:[{value:"call",icon:s.jsx(B.Call,{variant:"Linear"})},{value:"video",icon:s.jsx(B.Video,{variant:"Linear"})}]}),v&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.More,{size:18,variant:"Linear"}),onClick:v})]}),s.jsx(fe,{}),s.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col gap-8 p-8",children:[t.map(g=>{const b=g.attachment?s.jsxs("div",{className:"flex flex-col gap-4",children:[g.content&&s.jsx("span",{children:g.content}),s.jsxs("a",{href:g.attachment.href??"#",className:"flex items-center gap-4 text-xs underline opacity-80",children:[s.jsx("span",{className:"font-medium",children:g.attachment.fileName}),s.jsxs("span",{children:["(",g.attachment.fileSize,")"]})]})]}):g.content;return g.variant==="received"?s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx(Ft,{size:"sm",imageUrl:e.avatarUrl,initials:e.avatarInitials}),s.jsxs("div",{className:"flex flex-col gap-2 max-w-[85%]",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-low-em",children:g.senderName}),s.jsx("span",{className:"text-xs text-low-em",children:g.timeLabel??ng(g.timestamp)})]}),s.jsx(fi,{variant:"received",hierarchy:"bubble",className:"px-8 py-6 text-high-em",children:b})]})]},g.id):s.jsxs("div",{className:"flex flex-col gap-2 max-w-[85%] self-end",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-low-em",children:g.senderName??"You"}),s.jsx("span",{className:"text-xs text-low-em",children:g.timeLabel??ng(g.timestamp)})]}),s.jsx(fi,{variant:"sent",hierarchy:"bubble",className:"px-8 py-6 text-high-em",children:b})]},g.id)}),a&&s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx(Ft,{size:"sm",imageUrl:e.avatarUrl,initials:e.avatarInitials}),s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.name}),s.jsx(lm,{className:"-ml-2"})]})]})]}),s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center gap-4 px-8 py-6 shrink-0",children:[s.jsx("div",{className:"flex-1",children:s.jsx(me,{size:"md",variant:"default",placeholder:o,value:i,onChange:g=>h?.(g.target.value)})}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Send2,{size:18,variant:"Linear"}),onClick:p})]})]}),s.jsxs("div",{className:O.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:[s.jsxs("div",{className:"flex items-center gap-6 px-8 py-6 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-6 flex-1 min-w-0",children:[s.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),m&&s.jsx("span",{className:"text-low-em shrink-0",children:m})]}),s.jsx(W,{variant:"neutral",hierarchy:"quaternary",size:"sm",icons:"only",leadingIcon:s.jsx(B.CloseCircle,{size:18,variant:"Linear"}),onClick:f})]}),s.jsx(fe,{}),s.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e.fields&&e.fields.length>0&&s.jsxs("div",{className:"flex flex-col",children:[s.jsx("div",{className:"px-8 py-6",children:s.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:"Información de contacto"})}),e.fields.map((g,b)=>s.jsxs(S.default.Fragment,{children:[s.jsx(E6,{field:g}),b<(e.fields?.length??0)-1&&s.jsx(fe,{})]},g.label))]}),e.fields&&e.fields.length>0&&r.length>0&&s.jsx(fe,{}),r.length>0&&s.jsxs("div",{className:"flex flex-col gap-8 p-8",children:[s.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:"Pedidos"}),r.map(g=>s.jsx(T6,{order:g},g.id))]})]})]})]})};function I6(e){return e==="whatsapp"?s.jsx(B.Whatsapp,{size:18,variant:"Bold"}):e==="email"?s.jsx(B.Sms,{size:18,variant:"Linear"}):e==="phone"?s.jsx(B.Call,{size:18,variant:"Linear"}):null}const M6={completada:"success",pendiente:"warning",cancelada:"danger"},$6={completada:"Completada",pendiente:"Pendiente",cancelada:"Cancelada"},R6=({order:e})=>s.jsxs("div",{className:"flex flex-col gap-6 p-8 bg-white",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(ie,{size:"sm",children:s.jsx(B.DocumentText,{variant:"Linear"})}),s.jsx("span",{className:"text-base text-high-em",children:e.orderNumber})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(ie,{size:"sm",children:s.jsx(B.Calendar,{variant:"Linear"})}),s.jsx("span",{className:"text-base text-high-em",children:e.date})]})]}),s.jsx("div",{className:"h-px bg-surface-3"}),s.jsxs("div",{className:"flex items-center gap-4",children:[e.time&&s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(ie,{size:"sm",children:s.jsx(B.Clock,{variant:"Linear"})}),s.jsx("span",{className:"text-base text-high-em",children:e.time})]}),s.jsx("span",{className:"text-base text-high-em ml-auto",children:e.price})]}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx(Ye,{variant:"outlined",theme:M6[e.status],size:"sm",children:e.statusLabel??$6[e.status]}),s.jsx(W,{variant:"secondary",hierarchy:"primary",size:"sm",icons:"none",onClick:e.onViewDetails,children:e.viewDetailsLabel??"Ver detalles"})]})]}),L6=({field:e})=>s.jsxs("div",{className:"flex items-center gap-8 px-8 py-6 bg-white",children:[s.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-1",children:[s.jsx("span",{className:"text-xs text-low-em",children:e.label}),s.jsx("span",{className:"text-sm font-semibold text-high-em truncate",children:e.value})]}),e.onEdit&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(B.Edit2,{size:16,variant:"Linear"}),onClick:e.onEdit})]}),ig=({contact:e,orders:t=[],contactSectionLabel:r="Información de contacto",ordersSectionLabel:n="Pedidos",emptyOrdersDescription:a="Sin pedidos",onClose:i,className:o})=>{const l=I6(e.channel);return s.jsxs("div",{className:O.clsx("flex flex-col h-full bg-surface-bg",o),children:[s.jsxs("div",{className:"flex items-center gap-6 px-8 h-[64px] shrink-0 bg-white",children:[s.jsx(Ft,{size:"md",imageUrl:e.avatarUrl,initials:e.avatarInitials}),s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"flex-1 min-w-0 truncate text-base font-semibold text-high-em",children:e.name}),l&&s.jsx("span",{className:"text-low-em shrink-0",children:l})]}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(it,{size:18}),onClick:i})]}),s.jsx(fe,{}),s.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col",children:[e.fields&&e.fields.length>0&&s.jsxs("div",{className:"flex flex-col",children:[s.jsx("div",{className:"px-8 py-6 border-b border-surface-3",children:s.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:r})}),e.fields.map((c,u)=>s.jsxs(S.default.Fragment,{children:[s.jsx(L6,{field:c}),u<(e.fields?.length??0)-1&&s.jsx(fe,{})]},c.label)),s.jsx(fe,{})]}),s.jsxs("div",{className:"flex flex-col flex-1 bg-white",children:[s.jsx("div",{className:"px-8 py-6 border-b border-surface-3",children:s.jsx("span",{className:"text-xs font-semibold text-low-em uppercase tracking-wide",children:n})}),t.length>0?s.jsx("div",{className:"flex flex-col divide-y divide-surface-3 overflow-y-auto",children:t.map(c=>s.jsx(R6,{order:c},c.id))}):s.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:s.jsx(ht,{flat:!0,description:a,className:"bg-transparent"})})]})]})]})},D6=600,z6=({conversations:e,searchPlaceholder:t,emptyListDescription:r,emptyConversationDescription:n="Selecciona una conversación",contactSectionLabel:a="Información de contacto",ordersSectionLabel:i="Pedidos",emptyOrdersDescription:o="Sin pedidos",inputPlaceholder:l="Escribe un mensaje...",inputValue:c,searchValue:u,onSearchChange:d,onSendClick:f,onInputChange:h,className:p})=>{const[v,x]=il(),m=x<D6,[g,b]=P.useState("list"),[w,C]=P.useState(null),[y,j]=P.useState(!1),N=w?e.find(_=>_.id===w)??null:null,A=e.map(({id:_,name:E,timestamp:T,status:R,avatarUrl:M,avatarInitials:$})=>({id:_,name:E,timestamp:T,status:R,avatarUrl:M,avatarInitials:$})),k=_=>{C(_),b("conversation")},I=w?e.find(_=>_.id===w)??null:null;return m?s.jsxs("div",{ref:v,className:O.clsx("flex flex-col h-full",p),children:[g==="list"&&s.jsx(rg,{items:A,activeId:w??void 0,searchPlaceholder:t,emptyState:r?s.jsx(ht,{flat:!0,className:"bg-transparent",description:r}):void 0,searchValue:u,onSearchChange:d,onItemClick:_=>k(_.id)}),g==="conversation"&&I&&s.jsx(ag,{contact:I.contact,messages:I.messages,inputPlaceholder:l,inputValue:c,onBack:()=>{b("list"),C(null)},onMoreClick:()=>b("sidebar"),onSendClick:f,onInputChange:h}),g==="sidebar"&&I&&s.jsx(ig,{contact:I.sidebarContact,orders:I.orders,contactSectionLabel:a,ordersSectionLabel:i,emptyOrdersDescription:o,onClose:()=>b("conversation")})]}):s.jsxs("div",{ref:v,className:O.clsx("flex h-full",p),children:[s.jsx("div",{className:"flex-1 min-w-0 border-r border-surface-3",children:s.jsx(rg,{items:A,activeId:w??void 0,searchPlaceholder:t,emptyState:r?s.jsx(ht,{flat:!0,className:"bg-transparent",description:r}):void 0,searchValue:u,onSearchChange:d,onItemClick:_=>{C(_.id),j(!1)}})}),N?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:O.clsx(y?"flex-1":"flex-[2]","min-w-0"),children:s.jsx(ag,{contact:N.contact,messages:N.messages,inputPlaceholder:l,inputValue:c,onBack:()=>{C(null),j(!1)},onMoreClick:()=>j(_=>!_),onSendClick:f,onInputChange:h})}),y&&s.jsx("div",{className:"flex-1 min-w-0 border-l border-surface-3",children:s.jsx(ig,{contact:N.sidebarContact,orders:N.orders,contactSectionLabel:a,ordersSectionLabel:i,emptyOrdersDescription:o,onClose:()=>j(!1)})})]}):s.jsx("div",{className:"flex-[2] min-w-0 flex items-center justify-center bg-surface-bg",children:s.jsx(ht,{flat:!0,description:n,className:"bg-transparent"})})]})},B6=({options:e,value:t,onChange:r,size:n="medium",disabled:a=!1,orientation:i="vertical",withSelectAll:o=!1,selectAllLabel:l="Select All",className:c})=>{const u=S.default.useId(),d=`${u}-select-all`,f=g=>{const b=t.includes(g)?t.filter(w=>w!==g):[...t,g];r(b)},h=e.filter(g=>!g.disabled&&!a).map(g=>g.value),p=h.filter(g=>t.includes(g)),v=h.length>0&&p.length===h.length,x=p.length>0&&!v,m=()=>{if(v)r(t.filter(g=>!h.includes(g)));else{const g=[...t];for(const b of h)g.includes(b)||g.push(b);r(g)}};return s.jsxs("div",{className:Q.twMerge(O.clsx("flex",i==="vertical"?"flex-col gap-8":"flex-row flex-wrap gap-x-8 gap-y-8",c)),children:[o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Jt,{id:d,size:n,checked:v,indeterminate:x,disabled:a,onChange:()=>m()}),s.jsx("label",{htmlFor:d,className:O.clsx("text-sm font-semibold",a?"text-disabled cursor-not-allowed":"text-high-em cursor-pointer"),children:l})]}),s.jsx("div",{className:"h-px bg-surface-3 w-full"})]}),e.map(g=>{const b=t.includes(g.value),w=a||!!g.disabled,C=`${u}-${String(g.value)}`,y=!!g.caption;return s.jsxs("div",{className:O.clsx("flex gap-6",y?"items-start":"items-center",g.className),children:[s.jsx("div",{className:O.clsx("flex items-center shrink-0",y&&"mt-0.5"),children:s.jsx(Jt,{id:C,size:n,checked:b,indeterminate:g.indeterminate??!1,disabled:w,onChange:()=>f(g.value)})}),s.jsxs("label",{htmlFor:C,className:O.clsx("flex flex-col gap-3",w?"cursor-not-allowed":"cursor-pointer"),children:[s.jsx("span",{className:O.clsx("text-sm font-medium leading-5",w?"text-disabled":"text-high-em"),children:g.label}),g.caption&&s.jsx("span",{className:O.clsx("text-xs leading-4",w?"text-disabled":"text-low-em"),children:g.caption})]})]},g.value)})]})},F6={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"}},q6={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"},W6=(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":"",H6=({size:e="md",type:t="unselected",state:r="default",children:n,leftContent:a,rightContent:i,onClick:o,className:l,showLeftContent:c=!0,showRightContent:u=!0,showText:d=!0})=>{const f=A=>{if(!S.default.isValidElement(A))return A;const k=A,I=k.props.style||{},_={...k.props,style:{...I,width:"100%",height:"100%",display:"block"},size:void 0};return S.default.cloneElement(k,_)},h=!!o&&r!=="disabled",p=!!a&&c,v=!!i&&u,x=F6[e],m=q6[r],g=W6(t,r),b=Q.twMerge("inline-flex items-center border border-solid transition-all duration-150 rounded-full font-family-inter",m,x.container,g,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=s.jsx("div",{className:w,style:{marginRight:y,width:`${C}px`,height:`${C}px`},children:p?f(a):null}),N=s.jsx("div",{className:w,style:{marginLeft:y,width:`${C}px`,height:`${C}px`},children:v?f(i):null});return s.jsxs("div",{className:b,role:h?"button":"status",onClick:h?o:void 0,tabIndex:h?0:void 0,children:[j,d&&s.jsx("span",{className:"shrink-0",children:n}),N]})},V6=["--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"],U6=()=>{if(typeof document>"u")return[];const e=[],t=getComputedStyle(document.documentElement);return V6.forEach(r=>{const n=t.getPropertyValue(r).trim();n&&e.push({name:r,value:n.toUpperCase()})}),e},K6=({colors:e})=>{const[t,r]=P.useState(e||[]),[n,a]=P.useState(0);return P.useEffect(()=>{if(e){r(e);return}r(U6())},[e,n]),P.useEffect(()=>{if(e)return;const i=new MutationObserver(o=>{o.forEach(l=>{l.type==="attributes"&&l.attributeName==="class"&&a(c=>c+1)})});return i.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>i.disconnect()},[e]),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:t.map(({name:i,value:o})=>s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"1rem",fontFamily:"monospace"},children:[s.jsx("div",{style:{width:"50px",height:"50px",backgroundColor:o,border:"1px solid #ccc",borderRadius:"4px"}}),s.jsxs("div",{children:[s.jsx("div",{style:{fontWeight:"bold"},children:i}),s.jsx("div",{children:o})]})]},i))})},G6=({disabled:e=!1,className:t,...r})=>s.jsxs("div",{className:Q.twMerge(O.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:[s.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"}),s.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"}),s.jsx("div",{className:"w-[2.6px] h-[3px] rounded-full bg-surface-3"})]}),cm=({className:e,disabled:t=!1,onDrag:r,dragHandleProps:n,onDuplicate:a,onDelete:i,...o})=>{const[l,c]=P.useState(""),u=f=>{c(f),f==="duplicate"&&a?.(),f==="delete"&&i?.()},d=[...a?[{value:"duplicate",icon:s.jsx(el,{size:12})}]:[],...i?[{value:"delete",icon:s.jsx(tl,{size:12})}]:[]];return s.jsx("div",{className:O.clsx("border-b border-surface-3 min-h-[28px]",e),...o,children:s.jsxs("div",{className:"flex justify-center",children:[(r||n)&&s.jsx("button",{type:"button",className:O.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:s.jsx(Jo,{size:12})}),d.length>0&&s.jsx(xr,{options:d,value:l,onChange:u,size:"xs",variant:"secondary",disabled:t,buttonClassName:"rounded-none"})]})})},Z6={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}},Y6={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"}}},X6="opacity-50 bg-gray-100 cursor-not-allowed",Q6={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]"}},J6=({layout:e="text_icon",hierarchy:t="fill",variant:r="default",size:n="md",label:a,hint:i,disabled:o,leadingIcon:l,leadingAvatar:c,trailingAddon:u,options:d,value:f,onChange:h,placeholder:p,className:v,placeholderColor:x,inputTextColor:m,backgroundColor:g,chevronColor:b="currentColor",optionActiveColor:w="bg-primary-500",optionActiveTextColor:C="text-white",optionTextColor:y="text-gray-900",borderRadius:j="rounded-lg"})=>{const[N,A]=P.useState(""),k=Y6[r][t],I=Q6[n],_=Z6[e],E=N===""?d:d.filter(M=>M.label.toLowerCase().includes(N.toLowerCase())),T=Q.twMerge(O.clsx("w-full flex-1 bg-transparent focus:outline-none",k.input,x,m)),R=Q.twMerge(O.clsx("relative flex items-center gap-2 border transition-colors duration-200 focus-within:ring-2",j,I.wrapper,k.wrapper,o&&X6,g));return s.jsxs("div",{className:O.clsx("flex flex-col gap-1.5",v),children:[a&&s.jsx("label",{className:"font-medium text-sm text-gray-800",children:a}),s.jsx(xe.Combobox,{value:f,onChange:h,disabled:o,children:s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:R,children:[_.showLeadingIcon&&l&&s.jsx("div",{children:S.default.cloneElement(l,{size:I.icon,color:"currentColor"})}),_.showLeadingAvatar&&c&&s.jsx("img",{src:c,alt:"avatar",className:O.clsx("rounded-full",I.avatar)}),_.showInput&&s.jsx(xe.Combobox.Input,{className:T,placeholder:p,onChange:M=>A(M.target.value),displayValue:M=>M?.label}),_.showTrailingChevron&&!u&&s.jsx(xe.Combobox.Button,{className:O.clsx("flex items-center",{"w-full h-full justify-center":e==="only_icon"}),children:s.jsx(B.ArrowDown2,{size:I.icon,color:b})}),_.showTrailingAddon&&u&&s.jsx("div",{className:"flex-shrink-0",children:u})]}),s.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&&N!==""?s.jsx("div",{className:"relative cursor-default select-none px-4 py-2 text-gray-700",children:"Nothing found."}):E.map(M=>s.jsx(xe.Combobox.Option,{value:M,className:({active:$})=>Q.twMerge(O.clsx("relative cursor-default select-none py-2 pl-4 pr-4",$?`${w} ${C}`:y)),children:M.label},M.id))})]})}),i&&s.jsxs("div",{className:O.clsx("flex items-center gap-1.5 text-sm",k.hint),children:[s.jsx(B.InfoCircle,{size:16,color:"currentColor"}),s.jsx("span",{children:i})]})]})},eP=({items:e,trigger:t,className:r,align:n="right",offset:a=8})=>{const[i,o]=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)&&o(!1)};if(i)return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[i]);const u=d=>{d.disabled||(d.onClick(),o(!1))};return s.jsxs("div",{className:O.clsx("relative inline-block",r),children:[s.jsx("div",{ref:c,onClick:()=>o(!i),className:"cursor-pointer",children:t}),i&&s.jsx("div",{ref:l,className:O.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:s.jsx("div",{className:"py-2",children:e.map((d,f)=>s.jsxs("button",{onClick:()=>u(d),disabled:d.disabled,className:O.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&&s.jsx("span",{className:"flex-shrink-0 flex items-center justify-center relative z-10",children:d.icon}),s.jsx("span",{className:"flex-1 font-normal relative z-10",children:d.label})]},d.id))})})]})},um=S.default.memo(({children:e,tooltipContent:t,icon:r,iconColor:n="text-disabled",leadingIcon:a,leadingIconColor:i="text-disabled",iconSize:o,className:l,labelClassName:c,fontSize:u="sm",fontWeight:d="semibold",textColor:f="",onClick:h,state:p="default"})=>{const v={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"},g=v[u]||void 0,b=v[u]?void 0:u,w=o??x[u]??20,C=!!h&&p!=="disabled",y=Q.twMerge(O.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=Q.twMerge(O.clsx("flex-1 ml-6",g,m[d],p==="disabled"?"text-disabled":f||"text-med-em",c));return s.jsxs("div",{className:y,onClick:C?h:void 0,suppressHydrationWarning:!0,children:[a&&s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(ie,{size:w,className:i,children:a})}),s.jsx("span",{className:j,style:b?{fontSize:b}:void 0,children:e}),r&&t?s.jsxs(Ct.Root,{children:[s.jsx(Ct.Trigger,{asChild:!0,children:s.jsx("button",{className:O.clsx("flex items-center focus:outline-none focus-visible:ring-2 rounded-full shrink-0",n),onClick:N=>N.stopPropagation(),children:s.jsx(ie,{size:w,className:n,children:r})})}),s.jsx(Ct.Portal,{children:s.jsxs(Ct.Content,{sideOffset:5,className:O.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,s.jsx(Ct.Arrow,{className:"fill-white"})]})})]}):r?s.jsx("div",{className:O.clsx("flex items-center shrink-0",n),children:s.jsx(ie,{size:w,className:n,children:r})}):null]})});um.displayName="DragAndDropListItem";const tP={default:{...We.default,wrapper:`${We.default.wrapper} hover:cursor-pointer`,optionsPanel:"border-surface-4",label:"text-med-em",selectedValue:"text-med-em"},danger:{...We.danger,wrapper:`${We.danger.wrapper} hover:cursor-pointer`,optionsPanel:"border-danger-accent-2",label:"text-high-em",selectedValue:"text-danger-em"},outlined:{...We.outlined,wrapper:`${We.outlined.wrapper} hover:cursor-pointer`,optionsPanel:"border-surface-4",label:"text-med-em",selectedValue:"text-med-em"}},In={wrapper:"bg-surface-3 text-disabled pointer-events-none border-transparent",label:"text-disabled",selectedValue:"text-disabled",placeholder:"text-disabled",hint:"text-disabled"},rP={sm:{...qt.sm,rounded:"rounded-md",selectText:"text-xs"},md:{...qt.md,selectText:"text-sm font-medium"}},Te=({variant:e="default",size:t="md",menuSize:r,label:n,hint:a,items:i,disabled:o,placeholder:l,className:c,value:u,onChange:d,id:f,customHeight:h,customRadius:p,customPlaceholderColor:v,customBackgroundColor:x,leadingIcon:m,showLeadingIcon:g=!0,hintIconVariant:b,menuMinHeight:w,searchable:C=!1,searchPlaceholder:y})=>{const j=tP[e],N=rP[t],A=r||t,k=P.useRef(null),I=P.useRef(null),[_,E]=P.useState(!1),[T,R]=P.useState("");P.useEffect(()=>{_||R("")},[_]);const M=C&&T.trim()?i.filter(te=>String(te.title??"").toLowerCase().includes(T.trim().toLowerCase())):i,[$,L]=P.useState(null),[q,U]=P.useState(!1),D=i.find(te=>te.id===u);P.useEffect(()=>{U(!0)},[]);const F=S.default.useCallback(()=>{if(k.current&&_){const te=k.current.getBoundingClientRect(),pe=window.innerHeight-te.bottom,Y=te.top,Oe=pe<200&&Y>pe;L({top:Oe?te.top-8:te.bottom+8,left:te.left,width:te.width,openUpwards:Oe})}},[_]);P.useEffect(()=>{if(_){F();const te=z=>{I.current?.contains(z.target)||E(!1)};return window.addEventListener("scroll",te,!0),window.addEventListener("resize",F),()=>{window.removeEventListener("scroll",te,!0),window.removeEventListener("resize",F)}}},[_,F]),P.useEffect(()=>{if(!_)return;const te=z=>{k.current&&!k.current.contains(z.target)&&I.current&&!I.current.contains(z.target)&&E(!1)};return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[_]);const H=()=>{o||E(!_)},G=te=>{d(te),E(!1)},J=h?{height:h}:void 0,ne=()=>{if(p)return{borderRadius:p}},X=()=>{if(p)return{borderRadius:p}},re=v?.startsWith("var(")?{color:v}:void 0,ce=v&&!v.startsWith("var(")?v:void 0,K=x&&!x.startsWith("#")&&!x.startsWith("rgb")?x:void 0,ee=x&&(x.startsWith("#")||x.startsWith("rgb"))?{backgroundColor:x}:void 0;return s.jsxs("div",{className:O.clsx("w-full flex flex-col gap-1.5",c),children:[n&&s.jsx("label",{htmlFor:f,className:O.clsx("font-semibold truncate",N.labelFontSize,j.label,o&&In.label),children:n}),s.jsxs("div",{className:"relative",children:[s.jsxs("button",{ref:k,id:f,onClick:H,disabled:o,className:O.clsx("relative w-full cursor-default border text-left transition-colors duration-200 focus:outline-none focus-visible:ring-2","flex items-center",!h&&N.height,!x&&j.wrapper,K,o&&In.wrapper,!p&&N.rounded),style:{...J,...ne(),...ee},children:[g&&s.jsx("span",{className:O.clsx("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3.5",o?"text-disabled":D?j.selectedValue:j.placeholder),children:m?S.default.isValidElement(m)?S.default.cloneElement(m,{color:"currentColor"}):m:s.jsx(B.Category,{size:N.iconSize,color:"currentColor"})}),s.jsx("span",{className:O.clsx("flex-1 min-w-0 truncate",g?"pl-[36px]":t==="sm"?"pl-2.5":"pl-3.5"),children:D?s.jsx("span",{className:O.clsx(N.selectText,o?In.selectedValue:j.selectedValue),children:D.title}):s.jsx("span",{className:O.clsx(N.selectText,o?In.placeholder:j.placeholder,ce),style:re,children:l})}),s.jsx("span",{className:O.clsx("pointer-events-none flex items-center shrink-0",t==="sm"?"pr-1.5 pl-1.5":"pr-3.5"),children:_?s.jsx(B.ArrowUp2,{size:N.iconSize,color:"currentColor"}):s.jsx(B.ArrowDown2,{size:N.iconSize,color:"currentColor"})})]}),q&&_&&$&&yn.createPortal(s.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?s.jsxs("div",{className:O.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:[s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-surface-3 px-3 py-2",children:[s.jsx(B.SearchNormal1,{size:16,color:"currentColor",className:"shrink-0 text-low-em"}),s.jsx("input",{autoFocus:!0,value:T,onChange:te=>R(te.target.value),placeholder:y||"Buscar…",className:"w-full bg-transparent text-sm text-high-em placeholder:text-placeholder focus:outline-none"})]}),M.length===0?s.jsx("div",{className:"px-4 py-3 text-sm text-low-em",children:"Sin resultados"}):s.jsx(Ht,{items:M.map(({id:te,...z})=>({id:te,...z})),size:A,floating:!1,onSelect:G,selectedIds:u?[u]:[],className:"w-full overflow-y-auto !rounded-none !border-0 !bg-transparent !shadow-none"})]}):s.jsx(Ht,{items:i.map(({id:te,...z})=>({id:te,...z})),size:A,floating:!1,onSelect:G,selectedIds:u?[u]:[],className:O.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&&s.jsx(ft,{icon:s.jsx(B.InfoCircle,{variant:b}),label:a,iconSize:N.hintIconSize,gap:1,iconColorClass:O.clsx(j.hint,o&&In.hint),labelColorClass:O.clsx(j.hint,o&&In.hint),className:O.clsx(N.hintFontSize,"font-semibold")})]})};function nP({children:e,...t}){return s.jsx(xe.Menu,{as:"div",className:"relative inline-block text-left",...t,children:e})}const W2=S.default.memo(({isOver:e=!1,activeHeight:t="56px",inactiveHeight:r="0px",transitionDuration:n=150,transitionTimingFunction:a="ease-out",className:i,style:o,dropRef:l,id:c})=>s.jsx("div",{ref:l,id:c,className:i,style:{height:e?t:r,transition:`height ${n}ms ${a}`,overflow:"hidden",...o}}));W2.displayName="DropZone";const aP={backgroundImage:"repeating-linear-gradient(45deg, var(--surface-3) 0, var(--surface-3) 8px, transparent 8px, transparent 16px)"},Gn=S.default.memo(({children:e,className:t,style:r})=>s.jsx("div",{className:O.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:{...aP,...r},children:e}));Gn.displayName="DropPlaceholder";class iP 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:o="An error occurred while rendering this component.",retryLabel:l="Try again"}=this.props;return t?a?S.default.isValidElement(a)?S.default.cloneElement(a,{error:r,onRetry:this.resetError}):a:s.jsx("div",{className:"flex items-center justify-center h-full p-8",children:s.jsxs("div",{className:"text-center flex flex-col gap-6 items-center",children:[s.jsx("h3",{className:"text-lg font-semibold text-danger-main",children:i}),s.jsx("p",{className:"text-sm text-med-em",children:o}),s.jsx(W,{onClick:this.resetError,size:"sm",variant:"secondary",hierarchy:"primary",children:l})]})}):n}}const H2=S.default.memo(({icon:e=s.jsx(ie,{className:"text-danger-main",size:"2xl",children:s.jsx(B.Danger,{})}),title:t="Something went wrong",message:r,error:n,onRetry:a,retryLabel:i="Retry",showDetailsInProduction:o=!1,className:l,centered:c=!0,maxWidth:u="max-w-sm"})=>{const d=o||process.env.NODE_ENV==="development";return s.jsx(Sm,{children:s.jsx("div",{className:O.clsx("flex flex-col p-8",c&&"items-center justify-center h-full",l),children:s.jsxs("div",{className:O.clsx("text-center flex justify-center items-center flex-col gap-6",u),children:[typeof e=="string"?s.jsx("div",{className:"text-5xl",children:e}):s.jsx("div",{className:"flex justify-center",children:e}),s.jsx("h3",{className:"text-lg font-semibold text-danger-main",children:t}),r&&s.jsx("p",{className:"text-sm text-med-em mb-4",children:r}),n&&d&&s.jsxs("details",{className:"text-left",children:[s.jsx("summary",{className:"text-xs text-med-em cursor-pointer",children:"Technical details"}),s.jsxs("pre",{className:"text-xs text-danger-main p-2 rounded overflow-auto max-h-32",children:[n.message,n.stack&&`
|
|
20
20
|
|
|
21
|
-
${n.stack}`]})]}),a&&s.jsx(W,{onClick:a,variant:"secondary",hierarchy:"secondary",size:"sm",children:i})]})})})});H2.displayName="ErrorState";const sP=({groups:e,className:t,width:r,height:n})=>{const a=O.clsx("flex","items-center","justify-center","p-1 bg-brand-primary-main-special rounded-8 border border-brand-primary-accent-special gap-2"),[i,o]=P.useState(null);P.useEffect(()=>{const c=u=>{u.target?.closest("[data-floatingbar-dropdown]")||o(null)};if(i)return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[i]);const l={width:r,height:n};return s.jsx("div",{style:l,className:O.clsx("flex items-center gap-4 w-fit",t),children:e.map((c,u)=>s.jsx("div",{className:a,children:c.map(d=>s.jsx("div",{className:"relative",children:d.type==="dropdown"?s.jsxs("div",{"data-floatingbar-dropdown":d.id,className:"relative gap-4",children:[s.jsx(W,{variant:d.variant||"brand",hierarchy:d.hierarchy||"secondary",size:d.size||"sm",icons:d.label&&d.leadingIcon?"both":"trailing",leadingIcon:d.label?d.leadingIcon:void 0,trailingIcon:i===d.id?s.jsx(sm,{}):s.jsx(im,{}),onClick:()=>o(i===d.id?null:d.id),disabled:d.disabled,style:{outline:"none",boxShadow:"none"},className:O.clsx(d.className,i===d.id&&"bg-brand-primary-accent-special"),children:d.label?d.label:S.default.isValidElement(d.leadingIcon)?S.default.cloneElement(d.leadingIcon,{size:18,color:"currentColor"}):d.leadingIcon}),i===d.id&&s.jsx(Ht,{floating:!0,size:d.dropMenuSize||"sm",selectedIds:d.selectedIds,items:d.items.map(f=>({id:f.id,title:f.label,leadingIcon:f.icon,showLeadingIcon:!!f.icon,showDescription:d.showDescription??!1,showTrailingIcon:d.showTrailingIcon??!1,showTrailingText:d.showTrailingText??!1,trailingText:f.trailingText,showTag:d.showTag??!1,showCheckbox:d.showCheckbox??!1,disabled:f.disabled,showDividerAfter:f.showDividerAfter,onClick:()=>{f.onClick(),o(null)},...f.destructive&&{customTitleColor:d.destructiveColor||"text-danger-em"}})),className:O.clsx("bottom-full mb-4",d.dropMenuClassName)})]}):s.jsx(W,{variant:d.variant||"brand",hierarchy:d.hierarchy||"secondary",size:d.size||"sm",icons:d.label?d.leadingIcon&&d.trailingIcon?"both":d.leadingIcon?"leading":d.trailingIcon?"trailing":void 0:"only",leadingIcon:d.leadingIcon,trailingIcon:d.trailingIcon,onClick:d.onClick,disabled:d.disabled,style:{outline:"none",boxShadow:"none"},className:O.clsx(d.className,d.isActive&&"bg-brand-primary-accent-special"),children:d.label})},d.id))},u))})},V2=({icon:e,text:t,onClick:r,className:n=""})=>{const a=()=>{r&&r()};return s.jsxs("div",{className:O.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&&s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(ie,{size:20,color:"var(--low-em)",children:e})}),t&&s.jsx("span",{className:"font-inter font-semibold text-[10px] text-low-em mt-1",children:t})]})},dm=e=>e?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[e]:"",fm=e=>e?{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"}[e]:"",oP={sm:"h-13",md:"h-14",lg:"h-[60px]"},U2=({gap:e=4,justify:t,align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex",tr(e),dm(t),fm(r),n),...i,children:a}),K2=({gap:e=4,justify:t="center",align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex h-full",tr(e),dm(t),fm(r),n),...i,children:a}),G2=({gap:e=5,justify:t="end",align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex",tr(e),dm(t),fm(r),n),...i,children:a}),lP={always:"flex",desktop:"hidden lg:flex",none:"hidden"},sl=e=>{const{className:t,bordered:r=!0,size:n="lg",logoVariant:a="with-text",showLogo:i="always",children:o,logoSectionGap:l=6,leftWidth:c,centerWidth:u,rightWidth:d,centerFullHeight:f=!0,showCenterOnMobile:h=!1,...p}=e,v=S.default.Children.toArray(o).find(g=>S.default.isValidElement(g)&&g.type===U2),x=S.default.Children.toArray(o).find(g=>S.default.isValidElement(g)&&g.type===K2),m=S.default.Children.toArray(o).find(g=>S.default.isValidElement(g)&&g.type===G2);return s.jsx("header",{className:ae.default("relative w-full bg-white",r&&"border-b border-surface-4",t),...p,children:s.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",oP[n]),children:[s.jsxs("div",{className:ae.default("flex items-center",c!==void 0?"lg:pl-8!":"shrink-0",tr(l)),style:c!==void 0?{width:`${c}%`}:void 0,children:[i!=="none"&&s.jsx("div",{className:ae.default("items-center",lP[i]),children:a==="with-text"?s.jsx(Ms,{height:25,className:"text-black"}):s.jsx($s,{height:25,className:"text-black"})}),v]}),x&&s.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}),s.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})]})})};sl.LeftContent=U2;sl.Center=K2;sl.Right=G2;function cP(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,o=a>0?a:t,l=100-i-o;return{leftWidth:i,centerWidth:l,rightWidth:o}}const Z2=e=>e?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[e]:"",Y2=e=>e?{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"}[e]:"",uP={sm:"h-13",md:"h-14",lg:"h-[60px]"},X2=({gap:e=4,justify:t,align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex",tr(e),Z2(t),Y2(r),n),...i,children:a}),Q2=({gap:e=4,justify:t="end",align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex",tr(e),Z2(t),Y2(r),n),...i,children:a}),ol=e=>{const{className:t,bordered:r=!0,size:n="md",logoVariant:a="no-text",showLogo:i="always",children:o,logoSectionGap:l=6,leftWidth:c,rightWidth:u,...d}=e,f=S.default.Children.toArray(o).find(p=>S.default.isValidElement(p)&&p.type===X2),h=S.default.Children.toArray(o).find(p=>S.default.isValidElement(p)&&p.type===Q2);return s.jsxs("footer",{className:ae.default("relative w-full bg-white",r&&"border-t border-surface-4",t),...d,children:[s.jsxs("div",{className:"flex flex-col gap-8 px-container-mobile py-8 lg:hidden",children:[i!=="none"&&s.jsx("div",{className:"flex items-center",children:a==="with-text"?s.jsx(Ms,{height:22,className:"text-black"}):s.jsx($s,{height:22,className:"text-black"})}),f&&s.jsx("div",{className:"flex items-center",children:f}),h&&s.jsx("div",{className:"flex items-center gap-4 px-0",children:h})]}),s.jsxs("div",{className:ae.default("hidden lg:flex items-center justify-between lg:px-container-desktop",uP[n]),children:[s.jsxs("div",{className:ae.default("flex items-center shrink-0",tr(l)),style:c!==void 0?{width:`${c}%`}:void 0,children:[i!=="none"&&s.jsx("div",{className:"flex items-center",children:a==="with-text"?s.jsx(Ms,{height:22,className:"text-black"}):s.jsx($s,{height:22,className:"text-black"})}),f]}),s.jsx("div",{className:"flex items-center shrink-0 ml-auto",style:u!==void 0?{width:`${u}%`}:void 0,children:h})]})]})};ol.Left=X2;ol.Right=Q2;ol.displayName="Footer";const ll=P.forwardRef(({onSearch:e,debounceMs:t=300,isLoading:r=!1,showClearButton:n=!0,errorMessage:a,suggestions:i=[],onSuggestionClick:o,placeholder:l="Search...",value:c,onChange:u,disabled:d=!1,id:f,name:h,autoComplete:p,maxLength:v,required:x,onBlur:m,onFocus:g,onInvalid:b,"aria-label":w="Search",className:C,size:y,...j},N)=>{const[A,k]=P.useState(""),[I,_]=P.useState(!1),[E,T]=P.useState(-1),R=P.useRef(null),M=c!==void 0,$=M?c:A,L=L2($,t);P.useEffect(()=>{L&&e&&e(L)},[L,e]),P.useEffect(()=>{const X=re=>{R.current&&!R.current.contains(re.target)&&_(!1)};return document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}},[]);const q=X=>{const re=X.target.value;M||k(re),u&&u(X),re&&i.length>0?(_(!0),T(-1)):_(!1)},U=X=>{if(X.key==="Enter"){if(X.preventDefault(),I&&E>=0&&E<i.length){const re=i[E];H(re)}else e&&$&&e($);_(!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"&&(_(!1),T(-1))},D=X=>{$&&i.length>0&&_(!0),g&&g(X)},F=()=>{const X={target:{value:""}};M||k(""),u&&u(X),_(!1),T(-1)},H=X=>{const re={target:{value:X}};M||k(X),u&&u(re),o&&o(X),_(!1),T(-1)},G=a?"danger":"default",J=r?s.jsx(B.ArrowRotateRight,{color:"currentColor",size:16,className:"animate-spin text-primary-500"}):$&&n&&s.jsx("button",{type:"button",onClick:F,className:"text-gray-500 hover:text-gray-700 focus:outline-none transition-colors","aria-label":"Clear search",children:s.jsx(B.CloseCircle,{color:"currentColor",size:16})}),ne=i.filter(X=>X.toLowerCase().includes($.toLowerCase()));return s.jsxs("div",{className:"relative w-full",ref:R,children:[s.jsx(me,{ref:N,className:O.clsx("w-full text-placeholder",C),value:$,onChange:q,onKeyDown:U,onFocus:D,onBlur:m,onInvalid:b,variant:G,hint:a,leadingIcon:s.jsx(B.SearchNormal1,{color:"currentColor",size:16}),trailingIcon:J,placeholder:l,disabled:d,id:f,name:h,autoComplete:p,maxLength:v,required:x,"aria-label":w,...j}),I&&ne.length>0&&s.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)=>s.jsx("div",{className:O.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:()=>H(X),role:"option","aria-selected":re===E,children:X},re))})]})});ll.displayName="InputSearch";const hm=s5,sg=Object.keys(hm).filter(e=>/^[A-Z]/.test(e)).sort((e,t)=>e.localeCompare(t)),pm=({name:e,size:t=20,color:r="currentColor",className:n})=>{if(!e)return null;const a=hm[e];return a?s.jsx(a,{size:t,color:r,className:n}):null};pm.displayName="IconByName";const ds=5,og=56,cl=({value:e,onChange:t,searchPlaceholder:r="Buscar icono",gridHeight:n=280,className:a})=>{const[i,o]=S.default.useState(""),l=L2(i,150),c=S.default.useRef(null),u=S.default.useMemo(()=>{const h=l.trim().toLowerCase();return h?sg.filter(p=>p.toLowerCase().includes(h)):sg},[l]),d=Math.ceil(u.length/ds),f=Bj.useVirtualizer({count:d,getScrollElement:()=>c.current,estimateSize:()=>og,overscan:6});return S.default.useEffect(()=>{f.scrollToOffset(0)},[l,f]),s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-col gap-3",a)),children:[s.jsx(ll,{placeholder:r,value:i,onChange:h=>o(h.target.value)}),u.length===0?s.jsx("div",{style:{height:n},className:"flex items-center justify-center",children:s.jsx("span",{className:"text-sm text-low-em",children:"Sin resultados"})}):s.jsx("div",{ref:c,className:"ds-scrollbar overflow-y-auto",style:{height:n},children:s.jsx("div",{style:{height:f.getTotalSize(),position:"relative",width:"100%"},children:f.getVirtualItems().map(h=>{const p=h.index*ds,v=u.slice(p,p+ds);return s.jsx("div",{className:"absolute left-0 top-0 grid w-full place-items-center gap-2",style:{gridTemplateColumns:`repeat(${ds}, minmax(0, 1fr))`,height:og,transform:`translateY(${h.start}px)`},children:v.map(x=>{const m=hm[x];if(!m)return null;const g=e===x;return s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(m,{}),title:x,"aria-label":x,"aria-pressed":g,onClick:()=>t(x),className:O.clsx(g&&"bg-info-accent-2 hover:bg-info-accent-2 text-high-em")},x)})},h.key)})})})]})};cl.displayName="IconPicker";const J2=S.default.createContext(void 0);function eC(){const e=S.default.useContext(J2);if(!e)throw new Error("Must be used inside DropIconPicker");return e}const tC=({children:e,value:t,onChange:r})=>{const[n,a]=S.default.useState(!1),i=S.default.useRef(null);return s.jsx(J2.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};tC.displayName="DropIconPicker";const rC=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=eC();return S.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};rC.displayName="DropIconPickerTrigger";const nC=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=eC(),o=S.default.useRef(null),l=Na({triggerRef:i,panelRef:o,enabled:t});return Qi({refs:[i,o],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u"?null:yn.createPortal(s.jsx("div",{ref:o,className:O.clsx("w-[320px] rounded-xl border border-surface-3 bg-white p-4",e),style:l,children:s.jsx(cl,{value:n,onChange:c=>{a(c),r(!1)}})}),document.body)};nC.displayName="DropIconPickerContent";const dP={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"}},fP={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}},lg={container:"opacity-50 cursor-not-allowed pointer-events-none",dropZone:"cursor-not-allowed"},hP=({onImageSelected:e,variant:t="default",size:r="md",className:n,acceptedFileTypes:a="image/*",maxFileSize:i,disabled:o=!1,initialPreviewUrl:l})=>{const c=P.useRef(null),u=P.useRef(0),[d,f]=P.useState(!1),[h,p]=P.useState(l||null),[v,x]=P.useState(!1),[m,g]=P.useState(null),b=dP[t],w=fP[r],C=T=>{if(i&&T.size>i){const R=(i/1048576).toFixed(1);g(`File size must be less than ${R}MB`);return}if(!T.type.startsWith("image/")){g("Please select a valid image file");return}g(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])},N=T=>{T.preventDefault(),o||f(!0)},A=T=>{T.preventDefault(),!o&&(u.current+=1,f(!0))},k=T=>{T.preventDefault(),u.current-=1,u.current<=0&&(f(!1),u.current=0)},I=T=>{T.stopPropagation(),c.current?.click()},_=()=>{o||x(!0)},E=()=>{x(!1)};return s.jsx("div",{className:O.clsx("flex flex-col",n),children:s.jsx("div",{className:O.clsx(b.container,w.container,o&&lg.container),children:s.jsxs("div",{className:O.clsx(b.dropZone,w.dropZone,"cursor-pointer relative",o&&lg.dropZone,d&&!h&&"bg-black/20"),onDrop:o?void 0:j,onDragOver:o?void 0:N,onDragEnter:o?void 0:A,onDragLeave:o?void 0:k,onClick:o?void 0:I,children:[h?s.jsxs("div",{className:O.clsx("absolute inset-0 overflow-hidden transition-all duration-200",w.preview),onMouseEnter:_,onMouseLeave:E,children:[s.jsx("img",{src:h,alt:"Preview",className:O.clsx("w-full h-full object-cover transition-all duration-200",v&&"brightness-90")}),v&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center transition-all duration-200",children:s.jsx(W,{onClick:I,variant:"neutral",size:"xs",disabled:o,children:"Change Image"})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:O.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:s.jsx(f2,{size:w.iconSize,className:O.clsx(o&&"text-disabled")})}),s.jsx("div",{className:O.clsx("text-center text-[11px] font-body font-medium leading-tight tracking-normal whitespace-normal break-words",o&&"text-disabled"),children:"Drag your image to start uploading"}),s.jsxs("div",{className:"my-2 w-full flex items-center justify-center",children:[s.jsx("span",{className:"border-t w-1/2 mx-2 border-low-em"}),s.jsx("span",{className:O.clsx("text-xs ml-2 mr-2",d?"text-med-em":"text-high-em",o&&"text-disabled"),children:"OR"}),s.jsx("span",{className:"border-t w-1/2 mx-2 border-low-em"})]})]}),!h&&s.jsx(W,{onClick:I,variant:"neutral",size:"xs",className:"mt-1",disabled:o,children:"Browse"}),s.jsx("input",{type:"file",accept:a,ref:c,className:"hidden",onChange:y,disabled:o})]})})})},pP={default:{background:"bg-surface-2",iconColor:"text-[var(--med-em)]",titleColor:"text-high-em",descriptionColor:"text-med-em"},danger:{background:"bg-danger-accent-1",iconColor:"text-[var(--danger-main)]",titleColor:"text-danger-main",descriptionColor:"text-danger-main"},success:{background:"bg-success-accent-1",iconColor:"text-[var(--success-main)]",titleColor:"text-success-em",descriptionColor:"text-success-em"}},mP=({variant:e="default",title:t,description:r,icon:n,className:a})=>{const i=pP[e],l=(u=>{const d=u.match(/text-\[var\(--([^)]+)\)\]/);if(d)return`var(--${d[1]})`})(i.iconColor),c=()=>n&&S.default.isValidElement(n)?S.default.cloneElement(n,{color:l}):s.jsx(B.Warning2,{size:12,variant:"Outline",color:l});return s.jsxs("div",{className:O.clsx("flex flex-col gap-0.5 px-8 py-4 rounded-xl",i.background,a),children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-shrink-0",children:c()}),s.jsx("span",{className:O.clsx("text-[12px] font-semibold leading-tight",i.titleColor),children:t})]}),s.jsx("span",{className:O.clsx("text-[10px] font-medium leading-tight mt-2",i.descriptionColor),children:r})]})},Oa=({children:e,content:t,side:r="top",sideOffset:n=5,showArrow:a=!0,className:i,maxWidth:o="max-w-xs",delayDuration:l,disabled:c=!1,primaryButton:u,secondaryButton:d,customBackground:f,customTextColor:h,customFontSize:p})=>{if(c)return e;const v=u||d,x={};return f&&(x.backgroundColor=f),h&&(x.color=h),p&&(x.fontSize=p),s.jsxs(Ct.Root,{delayDuration:l,children:[s.jsx(Ct.Trigger,{asChild:!0,children:e}),s.jsx(Ct.Portal,{children:s.jsxs(Ct.Content,{side:r,sideOffset:n,className:O.clsx("z-50 overflow-hidden rounded-6 p-6 shadow-e2",!f&&"bg-surface-bg",!h&&"text-high-em",!p&&"text-xs","font-medium",o,"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:[s.jsxs("div",{className:O.clsx(v&&"flex flex-col gap-8"),children:[s.jsx("div",{children:t}),v&&s.jsxs("div",{className:"flex gap-4 items-center w-full",children:[u&&s.jsx(W,{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&&s.jsx(W,{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&&s.jsx(Ct.Arrow,{className:f?void 0:"fill-surface-bg",style:f?{fill:f}:void 0})]})})]})},xP=256,gP=64,aC=P.createContext(null);function bn(){const e=P.useContext(aC);if(!e)throw new Error("useSidebar must be used within <Sidebar>");return e}const iC=P.forwardRef(({collapsed:e,defaultCollapsed:t=!1,onCollapsedChange:r,keyboardShortcut:n=!0,className:a,children:i,...o},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=v=>{(v.metaKey||v.ctrlKey)&&v.key.toLowerCase()==="b"&&(v.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n,h]),s.jsx(aC.Provider,{value:{collapsed:d,toggle:h,setCollapsed:f},children:s.jsx(zj.TooltipProvider,{delayDuration:300,children:s.jsx("aside",{ref:l,"data-state":d?"collapsed":"expanded",style:{width:d?gP:xP},className:Q.twMerge(O.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)),...o,children:i})})})});iC.displayName="Sidebar";function vP({className:e,children:t,...r}){return s.jsx("div",{className:Q.twMerge("flex flex-col gap-[8px] p-[12px]",e),...r,children:t})}const yP="[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 bP({className:e,children:t,...r}){return s.jsx("div",{className:Q.twMerge(O.clsx("flex min-h-0 flex-1 flex-col gap-[4px] overflow-y-auto px-[12px]",yP,e)),...r,children:t})}function wP({className:e,children:t,...r}){return s.jsx("div",{className:Q.twMerge("mt-auto flex flex-col gap-[8px] p-[12px]",e),...r,children:t})}function jP({placeholder:e="Buscar...",...t}){const{collapsed:r}=bn();return r?s.jsx(Oa,{content:"Buscar",side:"right",children:s.jsx(W,{"aria-label":"Buscar",variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(B.SearchNormal1,{color:"currentColor"}),className:"h-[40px] w-[40px] !rounded-[10px] focus:ring-0"})}):s.jsx(ll,{placeholder:e,...t})}function CP({className:e,children:t,...r}){return s.jsx("div",{className:Q.twMerge("flex flex-col gap-[2px]",e),...r,children:t})}function SP({className:e,children:t,...r}){const{collapsed:n}=bn();return n?null:s.jsx("div",{className:Q.twMerge("px-[10px] pt-[14px] pb-[4px] text-[11px] font-medium tracking-wide text-low-em uppercase",e),...r,children:t})}const sC=P.forwardRef(({icon:e,label:t,active:r,trailing:n,className:a,...i},o)=>{const{collapsed:l}=bn(),c=s.jsxs("button",{ref:o,"aria-label":t,"data-active":r||void 0,className:Q.twMerge(O.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:[s.jsx("span",{className:"flex h-[20px] w-[20px] shrink-0 items-center justify-center",children:e}),!l&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t}),!l&&n]});return l?s.jsx(Oa,{content:t,side:"right",children:c}):c});sC.displayName="Sidebar.Item";function NP({children:e}){const{collapsed:t}=bn();return t?null:s.jsx(s.Fragment,{children:e})}function OP({name:e,email:t,avatarUrl:r,initials:n,onClick:a}){const{collapsed:i}=bn();return i?s.jsx(Oa,{content:e,side:"right",children:s.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:s.jsx(Ft,{size:"sm",imageUrl:r,initials:n})})}):s.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:[s.jsx(Ft,{size:"sm",imageUrl:r,initials:n}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm font-medium text-high-em",children:e}),t&&s.jsx("span",{className:"block truncate text-xs text-low-em",children:t})]}),s.jsx(B.ArrowUp2,{size:16,color:"var(--low-em)",className:"shrink-0"})]})}function PP({className:e,...t}){const{collapsed:r,toggle:n}=bn();return s.jsx(W,{"aria-label":r?"Expandir menú":"Colapsar menú",variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(B.ArrowLeft2,{color:"currentColor",className:r?"rotate-180":void 0}),onClick:n,className:Q.twMerge("h-[40px] w-[40px] shrink-0 !rounded-[10px] focus:ring-0",e),...t})}const AP=Object.assign(iC,{Header:vP,Content:bP,Footer:wP,Search:jP,Group:CP,GroupLabel:SP,Item:sC,Card:NP,User:OP,Trigger:PP}),_P=({label:e,kind:t="link",icon:r,editControl:n,onRemove:a,dragHandleRef:i,dragHandleProps:o,floating:l})=>s.jsxs("div",{className:O.clsx("flex min-h-[50px] items-center gap-1 rounded-lg border border-surface-3 bg-surface-1 pr-3",l&&"shadow-lg"),children:[s.jsx("button",{ref:i,type:"button","aria-label":"Reordenar",className:"flex shrink-0 cursor-grab items-center px-3 py-4 active:cursor-grabbing focus:outline-none",...o,children:s.jsx(B.HambergerMenu,{size:18,color:"var(--high-em)"})}),t==="divider"?s.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3 pl-1 pr-2",children:[s.jsx("span",{className:"shrink-0 text-xs font-medium uppercase tracking-wide text-low-em",children:"Divisor"}),s.jsx(fe,{className:"flex-1"})]}):t==="section"?s.jsx("span",{className:"min-w-0 flex-1 truncate pl-1 text-xs font-semibold uppercase tracking-wide text-low-em",children:e}):s.jsx(vt,{as:"div",size:"sm",title:e,showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!!r,leadingIcon:r,className:"min-w-0 flex-1 bg-transparent pl-0 pr-0 hover:bg-transparent active:bg-transparent"}),(n||a)&&s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[n,a&&s.jsx(W,{"aria-label":"Eliminar",variant:"danger",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Trash,{}),onClick:a})]})]}),kP=({isSorting:e,wasDragging:t})=>!(e||t),TP=({id:e,label:t,kind:r,icon:n,depth:a,indentationWidth:i,editControl:o,onRemove:l})=>{const{attributes:c,listeners:u,setNodeRef:d,setActivatorNodeRef:f,transform:h,transition:p,isDragging:v}=Ve.useSortable({id:e,animateLayoutChanges:kP}),x={transform:Yo.CSS.Translate.toString(h),transition:p,paddingLeft:a*i};return s.jsx("div",{ref:d,style:x,className:O.clsx("w-full",v&&"z-10"),children:v?s.jsx(Gn,{className:"h-[50px]"}):s.jsx(_P,{label:t,kind:r,icon:n,editControl:o,onRemove:l,dragHandleRef:f,dragHandleProps:{...c,...u}})})},EP={sm:"max-w-[300px] w-full",md:"w-[32rem]",lg:"w-[40rem]"},mm={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"}},oC=P.createContext(void 0),wn=()=>{const e=P.useContext(oC);if(!e)throw new Error("useDropModalContext must be used within a DropModal");return e},un=({children:e,size:t="md",padding:r,open:n,onClose:a,triggerRef:i})=>{const[o,l]=P.useState(!1),c=P.useRef(null),u=n!==void 0,d=u?n:o,f=p=>{u||l(p),p||a?.()},h=i??c;return s.jsx(oC.Provider,{value:{open:d,setOpen:f,size:t,padding:r??t,triggerRef:h},children:e})};un.displayName="DropModal";const ul=({children:e})=>{const{setOpen:t,open:r,triggerRef:n}=wn();return S.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),t(!r)}})};ul.displayName="DropModalTrigger";const dn=P.forwardRef(({children:e,className:t},r)=>{const{open:n,setOpen:a,size:i,triggerRef:o}=wn(),l=()=>a(!1),{panelRef:c,portalStyle:u,backdropProps:d}=y6({triggerRef:o,open:n,onClose:l,constrain:!0});return!n||typeof document>"u"?null:yn.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{...d}),s.jsx("div",{ref:f=>{c.current=f,typeof r=="function"?r(f):r&&(r.current=f)},role:"dialog","aria-modal":"true",className:O.clsx("bg-white rounded-2xl shadow-xl flex flex-col border border-surface-3 overflow-hidden",EP[i],t),style:u,children:e})]}),document.body)});dn.displayName="DropModalContent";const fn=({children:e,disabled:t=!1,className:r,leftIcon:n,onLeftAction:a,leftButtonRef:i,rightIcon:o,onRightAction:l,rightButtonRef:c})=>{const{setOpen:u,padding:d}=wn(),f=mm[d];return s.jsxs("header",{className:O.clsx("flex items-center border-b border-surface-3 shrink-0 rounded-t-xl",f.header,r),children:[s.jsx(W,{ref:i,variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",className:O.clsx("cursor-pointer",!n&&"invisible"),leadingIcon:n&&s.jsx(ie,{size:"sm",children:n}),onClick:a,disabled:t||!a}),s.jsx("div",{className:"flex-1 flex justify-center items-center",children:e}),s.jsx(W,{ref:c,variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",className:"cursor-pointer",leadingIcon:s.jsx(ie,{size:"sm",children:o??s.jsx(it,{className:"text-high-em"})}),onClick:l??(()=>u(!1)),disabled:t})]})};fn.displayName="DropModalHeader";const xm=P.forwardRef(({className:e,...t},r)=>s.jsx("h3",{ref:r,className:O.clsx("font-semibold text-xs leading-tight text-center text-high-em",e),...t}));xm.displayName="DropModalTitle";const hn=({children:e,className:t,padding:r})=>{const{padding:n}=wn(),a=mm[n],i=r??!t;return s.jsx("main",{className:O.clsx(i&&a.body,"flex-1 overflow-y-auto",t),children:e})};hn.displayName="DropModalBody";const gm=({className:e,children:t,...r})=>{const{padding:n}=wn(),a=mm[n];return s.jsx("footer",{className:O.clsx("flex items-center border-t border-surface-3 shrink-0",a.footer,e),...r,children:t})};gm.displayName="DropModalFooter";const pn=({cancelButton:e,saveButton:t,className:r})=>{const{setOpen:n,size:a}=wn(),i=a==="sm",o=(l,c)=>{l.onClick?.(c),l.closeOnClick!==!1&&n(!1)};return s.jsx(gm,{className:O.clsx(i?"flex-row gap-5":"justify-end",r),children:s.jsxs("div",{className:O.clsx("flex",i?"flex-row gap-5 w-full justify-end":"gap-5"),children:[e&&s.jsx(W,{variant:e.variant||"neutral",hierarchy:e.hierarchy||"primary",size:e.size||"xs",...e,className:e.className,onClick:l=>o(e,l),children:e.label}),t&&s.jsx(W,{variant:t.variant||"secondary",hierarchy:t.hierarchy||"primary",size:t.size||"xs",...t,className:t.className,onClick:l=>o(t,l),children:t.label})]})})};pn.displayName="DropModalFooterActions";const lC=({children:e})=>{const{setOpen:t}=wn();return S.default.cloneElement(e,{onClick:r=>{e.props.onClick?.(r),t(!1)}})};lC.displayName="DropModalClose";const IP=({item:e,labelOnly:t,onSave:r})=>{const[n,a]=S.default.useState(e.label),[i,o]=S.default.useState(e.icon??""),[l,c]=S.default.useState(e.action??""),[u,d]=S.default.useState(!1);return S.default.useEffect(()=>{a(e.label),o(e.icon??""),c(e.action??""),d(!1)},[e.label,e.icon,e.action]),s.jsxs(un,{size:"sm",children:[s.jsx(ul,{children:s.jsx(W,{"aria-label":"Editar",variant:"neutral",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Edit2,{})})}),s.jsxs(dn,{className:"!w-72",children:[s.jsx(fn,{children:t?"Editar sección":"Editar ítem"}),s.jsx(hn,{padding:!0,children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(me,{label:"Nombre",placeholder:t?"Nombre de la sección":"Nombre del ítem",value:n,onChange:f=>a(f.target.value),type:"text"}),!t&&s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-high-em",children:"Icono"}),s.jsx(W,{variant:"neutral",hierarchy:"tertiary",size:"md",icons:"only",leadingIcon:i?s.jsx(pm,{name:i}):s.jsx(B.Gallery,{}),onClick:()=>d(f=>!f),"aria-label":"Elegir icono"}),u&&s.jsx(cl,{value:i||void 0,onChange:f=>{o(f),d(!1)},gridHeight:168})]})]})}),s.jsx(pn,{cancelButton:{label:"Cancelar",closeOnClick:!0},saveButton:{label:"Guardar",closeOnClick:!0,onClick:()=>r({label:n,icon:i||void 0,action:l||void 0})}})]})]})};function cC(e,t=null,r=0){return e.reduce((n,a,i)=>[...n,{...a,parentId:t,depth:r,index:i},...cC(a.children??[],a.id,r+1)],[])}function Wa(e){return cC(e)}function ic(e){const t="root",r={id:t,children:[]},n={[String(t)]:r},a=e.map(o=>({...o,children:[]}));for(const o of a){const l=o.parentId??t,c=n[String(l)]??a.find(u=>u.id===l);n[String(o.id)]=o,c?.children.push(o)}const i=o=>{const l={id:o.id,label:o.label};return o.kind!==void 0&&(l.kind=o.kind),o.icon!==void 0&&(l.icon=o.icon),o.action!==void 0&&(l.action=o.action),o.children&&o.children.length>0&&(l.children=o.children.map(i)),l};return r.children.map(i)}function cg(e,t){const r=[...t];return e.filter(n=>n.parentId!=null&&r.includes(n.parentId)?(n.children?.length&&r.push(n.id),!1):!0)}function MP(e,t,r,n,a,i){const o=e.findIndex(({id:w})=>w===r),l=e.findIndex(({id:w})=>w===t),c=e[l],u=Ve.arrayMove(e,l,o),d=u[o-1],f=u[o+1],h=Math.round(n/a),p=c.depth+h,v=!!d&&d.kind!=="section"&&d.kind!=="divider";let x=d?v?d.depth+1:d.depth:0;i!=null&&(x=Math.min(x,i));const m=f?f.depth:0;let g=p;return p>=x?g=x:p<m&&(g=m),{depth:g,maxDepth:x,minDepth:m,parentId:b()};function b(){return g===0||!d?null:g===d.depth?d.parentId:g>d.depth?d.id:u.slice(0,o).reverse().find(C=>C.depth===g)?.parentId??null}}const $P=({items:e,onChange:t,indentationWidth:r=24,maxDepth:n,editable:a=!1,iconOptions:i,renderIcon:o,className:l})=>{const[c,u]=S.default.useState(null),[d,f]=S.default.useState(null),[h,p]=S.default.useState(0),v=S.default.useMemo(()=>{const _=Wa(e);return c!=null?cg(_,[c]):_},[e,c]),x=S.default.useMemo(()=>{if(c==null)return 0;const _=Wa(e),E=_.findIndex(M=>M.id===c);if(E===-1)return 0;const T=_[E].depth;let R=T;for(let M=E+1;M<_.length&&_[M].depth>T;M++)_[M].depth>R&&(R=_[M].depth);return R-T},[e,c]),m=n==null?void 0:Math.max(0,n-x),g=c!=null&&d!=null?MP(v,c,d,h,r,m):null,b=S.default.useMemo(()=>v.map(({id:_})=>_),[v]),w=Be.useSensors(Be.useSensor(Be.PointerSensor,{activationConstraint:{distance:8}})),C=()=>{u(null),f(null),p(0)},y=({active:_})=>{u(_.id),f(_.id)},j=({delta:_})=>p(_.x),N=({over:_})=>f(_?.id??null),A=({active:_,over:E})=>{if(C(),!g||!E)return;const{depth:T,parentId:R}=g,M=Wa(e).map(U=>({...U})),$=M.findIndex(({id:U})=>U===E.id),L=M.findIndex(({id:U})=>U===_.id);if(L===-1)return;M[L]={...M[L],depth:T,parentId:R};const q=Ve.arrayMove(M,L,$);t(ic(q))},k=(_,E)=>{const T=Wa(e).map(R=>R.id===_?{...R,label:E.label,icon:E.icon,action:E.action}:R);t(ic(T))},I=_=>{const E=Wa(e),T=cg(E,[_]).filter(R=>R.id!==_);t(ic(T))};return s.jsx(Be.DndContext,{sensors:w,collisionDetection:Be.closestCenter,measuring:{droppable:{strategy:Be.MeasuringStrategy.Always}},onDragStart:y,onDragMove:j,onDragOver:N,onDragEnd:A,onDragCancel:C,children:s.jsx(Ve.SortableContext,{items:b,strategy:Ve.verticalListSortingStrategy,children:s.jsx("div",{className:Q.twMerge(O.clsx("flex w-full flex-col gap-2",l)),children:v.map(_=>s.jsx(TP,{id:_.id,label:_.label,kind:_.kind,icon:_.icon&&o?o(_.icon):void 0,depth:_.id===c&&g?g.depth:_.depth,indentationWidth:r,editControl:a&&_.kind!=="divider"?s.jsx(IP,{item:_,iconOptions:i,labelOnly:_.kind==="section",onSave:E=>k(_.id,E)}):void 0,onRemove:a?()=>I(_.id):void 0},_.id))})})})},vm=({title:e,defaultOpen:t=!1,children:r})=>{const[n,a]=S.default.useState(t);return s.jsxs("div",{className:"overflow-hidden rounded-lg border border-surface-3",children:[s.jsx(vt,{as:"button",size:"sm",title:e,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingText:!1,showTrailingIcon:!0,trailingIcon:n?s.jsx(B.ArrowUp2,{}):s.jsx(B.ArrowDown2,{}),onClick:()=>a(i=>!i),customTitleColor:"text-high-em",className:"w-full min-w-0 bg-surface-1"}),n&&s.jsx("div",{className:"border-t border-surface-3 p-4",children:r})]})},RP=({title:e,items:t,renderIcon:r,defaultCollapsed:n,addLabel:a="Añadir al menú",onAdd:i})=>{const[o,l]=S.default.useState(new Set),c=d=>l(f=>{const h=new Set(f);return h.has(d)?h.delete(d):h.add(d),h}),u=()=>{const d=t.filter(f=>o.has(f.id));d.length!==0&&(i(d),l(new Set))};return s.jsx(vm,{title:e,defaultOpen:!n,children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("div",{className:"ds-scrollbar flex max-h-[200px] flex-col gap-1 overflow-y-auto",children:t.length===0?s.jsx("span",{className:"px-2 py-2 text-xs text-low-em",children:"Sin ítems"}):t.map(d=>{const f=!!(d.icon&&r);return s.jsx(vt,{as:"button",size:"sm",title:d.label,showCheckbox:!0,checked:o.has(d.id),onCheckboxChange:()=>c(d.id),showLeadingImage:!1,showDescription:!1,showTag:!1,showTrailingText:!1,showTrailingIcon:!1,showLeadingIcon:f,leadingIcon:f?r(d.icon):void 0,onClick:()=>c(d.id),className:"w-full min-w-0 rounded-md",style:{paddingLeft:8,paddingRight:8}},d.id)})}),s.jsx("div",{className:"flex justify-end",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),disabled:o.size===0,onClick:u,children:a})})]})})};function LP(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const DP=({title:e,defaultCollapsed:t,onAdd:r})=>{const[n,a]=S.default.useState(""),[i,o]=S.default.useState(""),l=()=>{n.trim()&&(r({id:`custom_${LP()}`,label:n.trim(),action:i.trim()||void 0}),a(""),o(""))};return s.jsx(vm,{title:e,defaultOpen:!t,children:s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(me,{label:"Nombre",placeholder:"Texto del enlace",value:n,onChange:c=>a(c.target.value),type:"text"}),s.jsx(me,{label:"URL / acción",placeholder:"https://… o /ruta",value:i,onChange:c=>o(c.target.value),type:"text"}),s.jsx("div",{className:"flex justify-end",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),disabled:!n.trim(),onClick:l,children:"Añadir al menú"})})]})})};function ug(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const zP=({title:e,defaultCollapsed:t,onAdd:r})=>{const[n,a]=S.default.useState(""),i=()=>{n.trim()&&(r({id:`section_${ug()}`,kind:"section",label:n.trim()}),a(""))},o=()=>r({id:`divider_${ug()}`,kind:"divider",label:""});return s.jsx(vm,{title:e,defaultOpen:!t,children:s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(me,{label:"Sección",placeholder:"Nombre de la sección",value:n,onChange:l=>a(l.target.value),type:"text"}),s.jsx("div",{className:"flex justify-end",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),disabled:!n.trim(),onClick:i,children:"Añadir sección"})}),s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("span",{className:"text-sm text-med-em",children:"Divisor"}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),onClick:o,children:"Añadir divisor"})]})]})})};function BP(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const FP=({groups:e,onAdd:t,customGroup:r,structuralGroup:n,renderIcon:a,className:i})=>{const o=l=>t(l.map(c=>({...c,id:`${c.id}_${BP()}`})));return s.jsxs("div",{className:Q.twMerge(O.clsx("flex w-full flex-col gap-3",i)),children:[e.map((l,c)=>s.jsx(RP,{title:l.title,items:l.items,renderIcon:a,defaultCollapsed:c!==0,onAdd:o},l.id)),n&&s.jsx(zP,{title:n.title??"Estructura",defaultCollapsed:!0,onAdd:l=>t([l])}),r&&s.jsx(DP,{title:r.title??"Personalizado",defaultCollapsed:!0,onAdd:l=>t([l])})]})},qP=({items:e,activeId:t,onSelect:r,renderIcon:n,className:a})=>{const[i,o]=S.default.useState(new Set),l=u=>o(d=>{const f=new Set(d),h=String(u);return f.has(h)?f.delete(h):f.add(h),f}),c=(u,d)=>{if(u.kind==="divider")return s.jsx(fe,{className:"my-2"},u.id);if(u.kind==="section")return s.jsx("span",{className:"px-3 pb-1 pt-4 text-xs font-semibold uppercase tracking-wide text-low-em",children:u.label},u.id);const f=!!u.children?.length,h=t!=null&&u.id===t,p=!!(u.icon&&n),v=!!u.action,x=i.has(String(u.id)),m=f?s.jsx(W,{"aria-label":x?"Contraer":"Expandir",variant:"neutral",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:x?s.jsx(B.ArrowDown2,{}):s.jsx(B.ArrowRight2,{}),onClick:()=>l(u.id)}):void 0;return s.jsxs(S.default.Fragment,{children:[s.jsx(vt,{as:f?"div":"button",size:"sm",title:u.label,showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTag:!1,showTrailingText:!1,showTrailingIcon:!1,showLeadingIcon:p,leadingIcon:p?n(u.icon):void 0,customLeadingIconColor:h?"var(--high-em)":void 0,customTitleColor:h?"text-high-em":"text-med-em",customBackgroundColor:h?"bg-surface-2":void 0,onClick:()=>{!f||v?r?.(u.id,u):l(u.id)},style:{paddingLeft:12+d*16,paddingRight:12},className:"w-full min-w-0 rounded-lg",trailingAction:m}),f&&x&&u.children.map(g=>c(g,d+1))]},u.id)};return s.jsx("nav",{className:Q.twMerge(O.clsx("flex w-full flex-col gap-0.5",a)),children:e.map(u=>c(u,0))})},uC=({options:e,onChange:t,label:r,addLabel:n="Add option",labelPlaceholder:a="Label",valuePlaceholder:i="value",emptyHint:o="No options yet.",disabled:l=!1,className:c})=>{const u=(h,p)=>t(e.map((v,x)=>x===h?{...v,...p}:v)),d=()=>t([...e,{value:"",label:""}]),f=h=>t(e.filter((p,v)=>v!==h));return s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-col gap-3",c)),children:[r&&s.jsx("span",{className:"text-xs font-semibold text-med-em",children:r}),e.length===0?s.jsx("p",{className:"text-xs text-med-em",children:o}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map((h,p)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1",children:s.jsx(me,{size:"sm",value:h.label,placeholder:a,disabled:l,onChange:v=>u(p,{label:v.target.value}),onBlur:()=>{!h.value&&h.label&&u(p,{value:h.label})}})}),s.jsx("div",{className:"w-28",children:s.jsx(me,{size:"sm",value:h.value,placeholder:i,disabled:l,onChange:v=>u(p,{value:v.target.value})})}),s.jsx(W,{variant:"neutral",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Trash,{size:16}),"aria-label":"Remove option",disabled:l,onClick:()=>f(p)})]},p))}),s.jsx("div",{children:s.jsx(W,{variant:"neutral",hierarchy:"tertiary",size:"xs",icons:"leading",leadingIcon:s.jsx(B.Add,{}),disabled:l,onClick:d,children:n})})]})};uC.displayName="OptionsEditor";const WP=({icon:e,children:t,isActive:r=!1,className:n,customFontSize:a,customIconSize:i,...o})=>{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 s.jsxs("button",{className:O.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),...o,children:[s.jsx("span",{style:{color:"var(--med-em)"},children:S.default.isValidElement(e)&&S.default.cloneElement(e,{size:d,color:"currentColor"})}),s.jsx("span",{className:O.clsx("text-med-em",c),style:u,children:t})]})},HP=s.jsx(nm,{}),dC=({children:e,tooltipContent:t,icon:r,iconColor:n="text-disabled",labelClassName:a,className:i,customFontSize:o,customIconSize:l})=>{const c={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},u=o&&c[o]||void 0,d=o&&!c[o]?{fontSize:o}:void 0,f=l||16,h=r??HP;return s.jsxs("div",{className:O.clsx("flex items-center gap-2",i),children:[s.jsx("span",{className:O.clsx(a,u),style:d,children:e}),s.jsx(Oa,{content:t,children:s.jsx("button",{type:"button",className:O.clsx("bg-surface-bg flex items-center focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary-main rounded-full",n),children:S.default.cloneElement(h,{size:f,color:"currentColor"})})})]})},VP=({items:e,variant:t="neutral",size:r="md",orientation:n="vertical",withDividers:a=!1,disableUnderline:i=!1,className:o})=>s.jsx("div",{className:Q.twMerge(O.clsx("flex",n==="vertical"?"flex-col items-start":"flex-row flex-wrap items-center",!a&&"gap-8",o)),children:e.map((l,c)=>s.jsxs(S.default.Fragment,{children:[s.jsx(gr,{href:l.href,variant:l.variant??t,size:l.size??r,disabled:l.disabled,leadingIcon:l.leadingIcon,trailingIcon:l.trailingIcon,trailingIconPosition:l.trailingIconPosition,showLeadingIcon:l.showLeadingIcon,showTrailingIcon:l.showTrailingIcon,disableUnderline:l.disableUnderline??i,target:l.target,rel:l.rel,onClick:l.onClick,className:l.className,children:l.label}),a&&c<e.length-1&&s.jsx(fe,{direction:n==="vertical"?"horizontal":"vertical",...n==="horizontal"?{height:"16px"}:{}})]},c))}),UP={sm:"max-w-[300px] w-full",md:"w-[32rem]",lg:"w-[40rem]"},ym={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"}},fC=P.createContext(void 0),jn=()=>{const e=P.useContext(fC);if(!e)throw new Error("useModalContext must be used within a Modal provider");return e},dl=({children:e,size:t="md",padding:r})=>{const[n,a]=P.useState(!1);return s.jsx(fC.Provider,{value:{open:n,setOpen:a,size:t,padding:r??t},children:e})};dl.displayName="Modal";const fl=({children:e})=>{const{setOpen:t}=jn();return S.default.cloneElement(e,{onClick:r=>{e.props.onClick&&e.props.onClick(r),t(!0)}})};fl.displayName="ModalTrigger";const hl=P.forwardRef(({children:e,className:t,...r},n)=>{const{open:a,setOpen:i,size:o}=jn();return s.jsx(xe.Transition,{appear:!0,show:a,as:P.Fragment,children:s.jsxs(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>i(!1),children:[s.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:s.jsx("div",{className:"fixed inset-0 bg-black-uniform/30","aria-hidden":"true"})}),s.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:s.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:s.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:s.jsx(xe.Dialog.Panel,{ref:n,className:O.clsx("bg-white rounded-2xl shadow-xl flex flex-col border border-surface-3 text-left transform transition-all",UP[o],t),...r,children:e})})})})]})})});hl.displayName="ModalContent";const pl=({children:e,onBack:t,disabled:r=!1,className:n})=>{const{setOpen:a,padding:i}=jn(),o=ym[i];return s.jsxs("header",{className:O.clsx("flex items-center border-b border-surface-3 shrink-0",o.header,n),children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",className:O.clsx("cursor-pointer",!t&&"invisible"),onClick:t,size:"sm",icons:"only",disabled:r||!t,leadingIcon:s.jsx(h2,{className:"text-high-em"})}),s.jsx("div",{className:"flex-1 flex justify-center items-center",children:e}),s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(it,{className:"text-high-em"}),onClick:()=>a(!1),disabled:r})]})};pl.displayName="ModalHeader";const ml=P.forwardRef(({className:e,...t},r)=>s.jsx(xe.Dialog.Title,{ref:r,as:"h3",className:O.clsx("font-semibold text-base leading-tight text-center text-high-em",e),...t}));ml.displayName="ModalTitle";const bm=P.forwardRef(({className:e,...t},r)=>s.jsx(xe.Dialog.Description,{ref:r,className:O.clsx("text-sm text-high-em",e),...t}));bm.displayName="ModalDescription";const xl=({children:e,className:t})=>{const{padding:r}=jn(),n=ym[r];return s.jsx("main",{className:O.clsx(n.body,"flex-1 overflow-y-auto",t),children:e})};xl.displayName="ModalBody";const gl=({className:e,children:t,...r})=>{const{padding:n}=jn(),a=ym[n];return s.jsx("footer",{className:O.clsx("flex items-center border-t border-surface-3 shrink-0",a.footer,e),...r,children:t})};gl.displayName="ModalFooter";const hC=({backButton:e,cancelButton:t,acceptButton:r,className:n})=>{const{setOpen:a,size:i}=jn(),o=i==="sm",l=(c,u)=>{c.onClick&&c.onClick(u),c.closeOnClick!==!1&&a(!1)};return s.jsxs(gl,{className:O.clsx(o?"flex-row gap-8":"justify-between",n),children:[e&&!o&&s.jsx(W,{variant:e.variant||"neutral",hierarchy:e.hierarchy||"secondary",size:e.size||"md",...e,onClick:c=>l(e,c),children:e.label}),!e&&!o&&s.jsx("div",{}),s.jsxs("div",{className:O.clsx("flex",o?"flex-row gap-8 w-full":"gap-8"),children:[t&&s.jsx(W,{variant:t.variant||"neutral",hierarchy:t.hierarchy||"primary",size:t.size||"md",...t,className:Q.twMerge(o?"w-full":"w-32",t.className),onClick:c=>l(t,c),children:t.label}),r&&s.jsx(W,{variant:r.variant||"secondary",hierarchy:r.hierarchy||"primary",size:r.size||"md",...r,className:Q.twMerge(o?"w-full":"w-32",r.className),onClick:c=>l(r,c),children:r.label})]})]})};hC.displayName="ModalFooterActions";const wm=({children:e})=>{const{setOpen:t}=jn();return S.default.cloneElement(e,{onClick:r=>{e.props.onClick&&e.props.onClick(r),t(!1)}})};wm.displayName="ModalClose";function KP(e,t){return e.split(t).reduce((r,n,a,i)=>(r.push(s.jsx("span",{className:"font-normal",children:n},`part-${a}`)),a<i.length-1&&r.push(s.jsx("span",{className:"font-bold",children:t},`bold-${a}`)),r),[])}function pC({trigger:e,title:t,description:r,confirmationText:n,confirmationLabel:a,confirmButtonLabel:i,cancelButtonLabel:o="Cancel",onConfirm:l,loading:c=!1}){const[u,d]=P.useState(""),f=u.trim()===n,h=()=>d(""),p=S.default.isValidElement(e)?e:null;return s.jsxs(dl,{children:[p?s.jsx(fl,{children:p}):null,s.jsxs(hl,{children:[s.jsx(pl,{disabled:c,children:s.jsx(ml,{children:t})}),s.jsxs(xl,{children:[s.jsx(bm,{children:r}),s.jsx("div",{className:"mt-6",children:s.jsx(me,{label:KP(a,n),placeholder:n,value:u,onChange:v=>d(v.target.value),disabled:c,variant:"outlined",size:"md"})})]}),s.jsxs(gl,{className:"justify-end gap-3",children:[s.jsx(wm,{children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"md",disabled:c,onClick:h,children:o})}),s.jsx(W,{variant:"danger",hierarchy:"primary",size:"md",onClick:()=>{f&&!c&&l()},disabled:!f,loading:c,children:i})]})]})]})}pC.displayName="DeleteConfirmationModal";const mC=P.createContext(void 0),jm=()=>{const e=P.useContext(mC);if(!e)throw new Error("Drawer subcomponents must be used within <Drawer>");return e},GP={sm:"w-64",md:"w-72",lg:"w-80",xl:"w-96"},dg={right:"translate-x-full",left:"-translate-x-full"},ZP={right:"right-0",left:"left-0"},xC=({open:e,onOpenChange:t,side:r="right",children:n})=>s.jsx(mC.Provider,{value:{onOpenChange:t,side:r},children:s.jsx(xe.Transition,{show:e,as:P.Fragment,children:s.jsx(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>t(!1),children:n})})});xC.displayName="Drawer";const gC=({className:e})=>{const{onOpenChange:t}=jm();return s.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:s.jsx("div",{className:Q.twMerge(O.clsx("fixed inset-0 bg-black-uniform/30",e)),"aria-hidden":"true",onClick:()=>t(!1)})})};gC.displayName="DrawerOverlay";const vC=({width:e="md",className:t,children:r})=>{const{side:n}=jm();return s.jsx(xe.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:dg[n],enterTo:"translate-x-0",leave:"ease-in duration-200",leaveFrom:"translate-x-0",leaveTo:dg[n],children:s.jsx(xe.Dialog.Panel,{className:Q.twMerge(O.clsx("fixed top-0 bottom-0 h-full flex flex-col bg-white shadow-e2 transform",GP[e],ZP[n],t)),children:r})})};vC.displayName="DrawerPanel";const yC=({children:e,className:t,height:r=60,title:n})=>s.jsxs("div",{style:{height:r},className:Q.twMerge(O.clsx("flex items-center justify-between shrink-0 px-8 border-b border-surface-3",t)),children:[n&&s.jsx("span",{className:"text-sm font-semibold text-high-em",children:n}),e]});yC.displayName="DrawerHeader";const bC=({children:e,className:t})=>s.jsx("div",{className:Q.twMerge(O.clsx("flex-1",t)),children:e});bC.displayName="DrawerContent";const wC=({children:e,className:t})=>e?s.jsx("div",{className:Q.twMerge(O.clsx("shrink-0 border-t border-surface-3 py-6 px-8",t)),children:e}):null;wC.displayName="DrawerFooter";const jC=({children:e,size:t="sm"})=>{const{onOpenChange:r}=jm();return e?S.default.cloneElement(e,{onClick:n=>{e.props.onClick?.(n),r(!1)}}):s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:t,icons:"only",leadingIcon:s.jsx(it,{className:"text-high-em"}),onClick:()=>r(!1)})};jC.displayName="DrawerClose";const YP=Object.assign(xC,{Overlay:gC,Panel:vC,Header:yC,Content:bC,Footer:wC,Close:jC});function CC({planName:e,price:t,billingPeriod:r="month",priceContent:n,description:a,ctaLabel:i="Switch Plan",onCtaClick:o,features:l,featuresTitle:c="Features",featuresSubtitle:u="Everything in our plan includes",isRecommended:d=!1,recommendedLabel:f="Recommended",recommendedIcon:h,loading:p=!1,ctaVariant:v="neutral",ctaHierarchy:x="primary",sectionColor:m="bg-white",sectionTextColor:g,className:b}){return s.jsxs("div",{className:Q.twMerge(O.clsx("relative w-full flex flex-col",b)),children:[d&&s.jsx("div",{className:"absolute -top-9 left-1/2 -translate-x-1/2 z-10 whitespace-nowrap",children:s.jsx(Ye,{size:"lg",theme:"surface",variant:"outlined",children:s.jsx(ft,{icon:h,label:f,iconSize:14,gap:3,iconColorClass:"text-med-em",labelColorClass:"text-med-em text-xs font-semibold"})})}),s.jsxs("div",{className:"bg-surface-2 border border-surface-3 rounded-8 overflow-hidden w-full flex flex-col flex-1",children:[s.jsxs("div",{className:O.clsx("flex items-start justify-between p-8 border-b border-surface-3",m),children:[s.jsx("span",{className:O.clsx("text-xl font-semibold",g??"text-high-em"),children:e}),s.jsx("div",{className:"flex items-baseline gap-4",children:n??s.jsxs(s.Fragment,{children:[s.jsx("span",{className:O.clsx("text-2xl font-bold leading-none",g??"text-high-em"),children:t}),r&&s.jsxs("span",{className:O.clsx("text-sm",g??"text-high-em"),children:["/ ",r]})]})})]}),s.jsxs("div",{className:O.clsx("flex flex-col gap-8 p-8 border-b border-surface-3",m),children:[s.jsx("p",{className:O.clsx("text-sm leading-relaxed",g??"text-high-em"),children:a}),s.jsx(W,{variant:v,hierarchy:x,size:"md",className:"w-full",onClick:o,loading:p,children:i})]}),s.jsxs("div",{className:"flex flex-col gap-8 p-8 bg-surface-bg flex-1",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xl font-bold text-high-em",children:c}),s.jsx("p",{className:"text-sm text-high-em",children:u})]}),s.jsx("ul",{className:"flex flex-col gap-8",children:l.map(w=>s.jsxs("li",{className:"flex items-center gap-8",children:[s.jsx("span",{className:"text-low-em shrink-0",children:s.jsx(B.TickCircle,{size:14,color:"currentColor"})}),s.jsx("span",{className:"text-sm text-low-em",children:w})]},w))})]})]})]})}CC.displayName="PlanPricingCard";const vl=({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",o={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=S.default.isValidElement(n)?S.default.cloneElement(n,{size:l[t],color:"currentColor"}):null;return s.jsx("div",{className:O.clsx(i,o[t],c[e][r],a),children:u})},SC=S.default.forwardRef(({title:e,companyImage:t,badgeStatus:r,badgeStatusState:n,onButtonAction:a,actionButtonRef:i,stackLabel:o,powerLabel:l,calendarLabel:c,link1Label:u,link1Href:d,link2Label:f,link2Href:h,link2Status:p,onCardClick:v,className:x,...m},g)=>{const b=O.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=Q.twMerge(O.clsx(b,x)),C={success:"success",warning:"warning",danger:"danger",disabled:"disabled"};return s.jsxs("div",{ref:g,className:w,...m,children:[s.jsxs("div",{className:"flex-row flex justify-between",children:[s.jsx("div",{className:"flex",children:s.jsx(ie,{className:"!rounded-4",size:"2xl",imageUrl:t})}),s.jsx("div",{className:"flex w-fit",children:s.jsx(W,{ref:i,size:"sm",leadingIcon:s.jsx(ie,{children:s.jsx(y2,{})}),icons:"only",hierarchy:"secondary",variant:"neutral",onClick:a})})]}),s.jsxs("div",{className:"flex-col flex justify-between gap-4",children:[s.jsxs("div",{className:"flex gap-5 items-center",children:[s.jsx("span",{className:"text-high-em font-semibold",children:e}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ye,{variant:"simple",theme:C[n],children:r})})]}),s.jsxs("div",{className:"flex flex-row gap-4",children:[s.jsx(ft,{label:o,labelSize:"sm",iconSize:"sm",gap:4,icon:s.jsx(b2,{})}),s.jsx(ft,{label:l,labelSize:"sm",iconSize:"sm",gap:4,icon:s.jsx(w2,{})}),s.jsx(ft,{label:c,labelSize:"sm",iconSize:"sm",gap:4,icon:s.jsx(j2,{})})]})]}),s.jsx(fe,{direction:"horizontal"}),s.jsxs("div",{className:"flex-row flex justify-between gap-8",children:[s.jsxs("div",{className:"flex w-1/2 flex-col gap-2",children:[s.jsx("span",{className:"text-sm text-low-em",children:"Subdomain"}),s.jsx("div",{className:"flex-row flex center items-center gap-4",children:s.jsx(gr,{href:d,className:"w-fit",variant:"neutral",children:u})})]}),s.jsxs("div",{className:"flex w-1/2 flex-col gap-2",children:[s.jsx("span",{className:"text-sm text-low-em",children:"Database"}),s.jsxs("div",{className:"flex-row flex center items-center gap-4",children:[s.jsx(Ye,{variant:"status",statusState:p,statusSize:"xs"}),s.jsx(gr,{href:h,trailingIcon:s.jsx(v2,{}),className:"w-fit",variant:"neutral",children:f})]})]})]})]})});SC.displayName="ProjectCard";const Nh=({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",o=O.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=O.clsx(i,r);return s.jsxs("div",{className:"flex flex-col gap-y-2 w-full",children:[s.jsxs("div",{className:"flex items-center w-full gap-x-5",children:[s.jsx("div",{className:o}),s.jsx("div",{className:l,role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress: ${a}%`,...n,children:s.jsx("div",{className:"h-full rounded-full transition-all duration-300 ease-out bg-black",style:{width:`${a}%`}})})]}),t&&s.jsx("p",{className:"mt-2 font-medium text-sm text-left text-low-em",children:t})]})},sc={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"}},XP={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}},Zn=({progress:e,size:t="md",variant:r="primary",shape:n="circle",showLabel:a=!0,label:i,className:o,ariaLabel:l,id:c,...u})=>{const d=Math.min(100,Math.max(0,e)),f=S.default.useId(),h=c||`progress-circle-${f}`,p=i?`${h}-label`:void 0,v=sc[t],x=XP[r],m=()=>l||(i?`Progreso: ${i}, ${d}% completado`:`Progreso: ${d}% completado`),g=v.size,b=(g-v.strokeWidth)/2,w=2*Math.PI*b,C=w-d/100*w,y=()=>n==="circle"?sc[t].container:sc[t].halfCircle,j=()=>s.jsxs("svg",{width:g,height:g,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:[s.jsx("circle",{cx:g/2,cy:g/2,r:b,stroke:"currentColor",strokeWidth:v.strokeWidth,fill:"none",className:x.track,opacity:x.opacity}),s.jsx("circle",{cx:g/2,cy:g/2,r:b,stroke:"currentColor",strokeWidth:v.strokeWidth,fill:"none",className:x.fill,strokeDasharray:w,strokeDashoffset:C,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),N=()=>{const A=v.strokeWidth,k=g,I=g/2+A,_=(g-v.strokeWidth)/2,E=A/2,T=I-A/2,R=g-A/2,M=I-A/2,$=Math.PI*_*2,L=$-d/100*$;return s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:`0 0 ${k} ${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:[s.jsx("path",{d:`M${E},${T} A${_},${_} 0 1,1 ${R},${M}`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:v.strokeWidth,stroke:"currentColor",className:x.track,opacity:x.opacity}),s.jsx("path",{d:`M${E},${T} A${_},${_} 0 1,1 ${R},${M}`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:v.strokeWidth,stroke:"currentColor",className:x.fill,strokeDasharray:$,strokeDashoffset:L,style:{transition:"stroke-dashoffset 0.3s ease-in-out"}})]})};return s.jsxs("div",{className:O.clsx("relative inline-flex items-center justify-center",y(),o),id:h,...u,children:[n==="circle"?j():N(),a&&n==="circle"&&s.jsxs("div",{className:O.clsx("absolute inset-0 flex flex-col items-center justify-center","leading-none"),children:[i&&s.jsx("span",{id:p,className:O.clsx(v.labelFontSize,x.label),children:i}),s.jsx("span",{className:O.clsx(v.fontSize,v.lineHeight,x.progressLabel),style:{fontFamily:"var(--font-space-grotesk)"},children:`${d}%`})]}),a&&n==="half-circle"&&s.jsxs("div",{className:O.clsx("absolute left-0 right-0 flex flex-col items-center justify-center",i?v.halfCircleLabelPosition:"top-1/2",i&&v.labelSpace),children:[i&&s.jsx("span",{id:p,className:O.clsx(v.labelFontSize,x.label),children:i}),s.jsx("span",{className:O.clsx(v.fontSize,v.lineHeight,x.progressLabel),style:{fontFamily:"var(--font-space-grotesk)"},children:`${d}%`})]})]})},QP=({currentStep:e,totalSteps:t,currentStepProgress:r=0,stepDescriptions:n=[],title:a,subtitle:i,className:o,collapsed:l,onToggleCollapse:c,onClose:u,onlyProgressCircle:d=!1})=>{const[f,h]=S.default.useState(l??!0);S.default.useEffect(()=>{typeof l=="boolean"&&h(l)},[l]);const p=()=>{const m=!f;h(m),c&&c(m)},v=S.default.useMemo(()=>Array.from({length:t},(m,g)=>{const b=g+1;let w;return b<e?w=100:w=0,{progress:w,description:n[g]||`Step ${b}`}}),[e,t,n]),x=t>0?Math.round((e-1)/t*100+r/t):0;return d?s.jsx(Zn,{progress:x,size:"xs",showLabel:!0,ariaLabel:`Overall progress: ${x}%`,className:o}):s.jsxs(pt.motion.div,{className:O.clsx("bg-white overflow-hidden",o),role:"region","aria-label":`Progress tracker${f?"":" - expanded"}`,layout:!0,animate:{height:f?61:130},transition:{duration:.3,ease:"easeInOut"},children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-2 gap-3",children:[s.jsx(pt.motion.div,{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:p,layout:!0,children:s.jsx(pt.AnimatePresence,{mode:"wait",children:f?s.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:v.map((m,g)=>s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Nh,{progress:m.progress})},g))},"collapsed-content"):s.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&&s.jsx("h3",{className:"text-[16px] text-dark-100 font-semibold",children:a}),i&&s.jsx("p",{className:"text-sm text-dark-700",children:i})]},"expanded-title")})}),s.jsxs("div",{className:"flex items-center gap-9 py-4 px-6",children:[s.jsx(Zn,{progress:x,size:"xs",showLabel:!0,ariaLabel:`Overall progress: ${x}%`}),s.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:s.jsx(pt.motion.div,{style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},animate:{rotate:f?0:180},transition:{duration:.2},children:s.jsx(B.ArrowDown2,{size:16,color:"black"})})}),s.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:s.jsx(it,{size:16})})]})]}),s.jsx(pt.AnimatePresence,{children:!f&&s.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:s.jsx("div",{className:"pt-2 pb-4 px-8",children:s.jsx(pt.motion.div,{className:"flex gap-3 w-full",initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.2},children:v.map((m,g)=>{const w=g+1===e;return s.jsx(pt.motion.div,{className:"w-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15+g*.05,duration:.2,ease:"easeOut"},children:s.jsxs("div",{children:[s.jsx(Nh,{progress:m.progress}),(m.progress!==0||w)&&m.description&&s.jsx("div",{className:"text-sm text-[#2F343C] mt-3 font-semibold",children:m.description}),m.progress===0&&!w&&m.description&&s.jsx("div",{className:"text-sm text-[#5A606B] mt-3 font-semibold",children:m.description})]})},g)})})})})})]})},JP=({actions:e,borderless:t=!1,loading:r=!1,className:n})=>r?s.jsx("div",{className:Q.twMerge(O.clsx("flex flex-col bg-surface-1",!t&&"border border-surface-3 rounded-lg overflow-hidden",n)),children:s.jsx("div",{className:"flex flex-col gap-6 p-6",children:Array.from({length:4}).map((a,i)=>s.jsx("div",{className:"h-36 rounded-lg bg-surface-2 animate-pulse"},i))})}):s.jsx("div",{className:Q.twMerge(O.clsx("flex flex-col bg-surface-1",!t&&"border border-surface-3 rounded-lg overflow-hidden",n)),children:s.jsx("div",{className:"flex flex-col gap-6 p-6",children:e.map(a=>s.jsx(W,{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))})}),e4={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]"}},Mn={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"}},t4=({size:e="medium",checked:t=!1,disabled:r=!1,className:n,...a})=>{const i=e4[e];return s.jsxs("label",{className:O.clsx("inline-flex items-center",r?"cursor-not-allowed":"cursor-pointer",n),children:[s.jsx("input",{type:"radio",checked:t,disabled:r,className:"sr-only peer",...a}),s.jsx("div",{className:O.clsx(i.wrapper,"rounded-full border transition-colors duration-200",t&&"inline-flex items-center justify-center",Mn.focus,r?t?Mn.disabled.checked:Mn.disabled.unchecked:t?Mn.checked:Mn.unchecked,!r&&"peer-hover:border-low-em"),children:t&&s.jsx("div",{className:O.clsx(i.dot,"rounded-full",r?Mn.disabled.dot:"bg-black")})})]})},r4={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}},NC=S.default.forwardRef(({icon:e,title:t,description:r,selected:n=!1,size:a="md",trailingIcon:i,className:o,...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=r4[a],p=(v,x)=>S.default.isValidElement(v)?S.default.cloneElement(v,{size:x,color:"currentColor"}):v;return s.jsxs("button",{ref:c,type:"button",role:"radio","aria-checked":n,className:Q.twMerge(O.clsx(u,h.card,d,o)),...l,children:[s.jsx("span",{className:O.clsx("flex shrink-0 items-center justify-center",h.iconBox,h.iconRadius,f),children:p(e,h.icon)}),s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("span",{className:"text-sm font-medium text-high-em",children:t}),r&&s.jsx("span",{className:"text-xs text-low-em",children:r})]}),n&&i&&s.jsx("span",{className:"shrink-0 text-brand-secondary-main",children:p(i,h.trailing)})]})});NC.displayName="SelectableCard";const n4={success:"bg-success-main",warning:"bg-warning-main",error:"bg-danger-main",info:"bg-info-em"},fg={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"}},a4={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"}},OC=({steps:e,current:t,variant:r="numbered",lineStyle:n="solid",colorVariant:a,indicatorGap:i,stepGap:o,itemClassName:l,className:c})=>{const u=a?fg[a]:fg.brand,d=a?a4[a]:null;return s.jsx("ol",{className:Q.twMerge("flex flex-col",c),children:e.map((f,h)=>{const p=h<t?"done":h===t?"current":"pending",v=h===e.length-1,x=r==="dot",m=n==="dashed",g=x?d?d[p]:f.status?n4[f.status]:"bg-surface-3":null;return s.jsxs("li",{className:Q.twMerge("flex",i??"gap-3",l),children:[s.jsxs("div",{className:"flex flex-col items-center self-stretch",children:[x?s.jsx("span",{className:O.clsx("size-2.5 shrink-0 rounded-full mt-1.5",g)}):s.jsx("span",{className:O.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")}),!v&&(m?s.jsx("span",{className:"w-0 border-l-2 border-dashed border-surface-3 grow my-1"}):s.jsx("span",{className:O.clsx("my-1 w-px grow",h<t?u.line:"bg-surface-3")}))]}),s.jsxs("div",{className:O.clsx(x?"pt-0":"pt-3",!v&&(o??(x?"pb-4":"pb-6"))),children:[s.jsx("p",{className:O.clsx("text-sm",x?"text-med-em":O.clsx(p==="current"&&"font-medium text-high-em",p==="done"&&"text-med-em",p==="pending"&&"text-low-em")),children:f.title}),f.caption&&s.jsx("p",{className:"text-xs text-low-em mt-0.5",children:f.caption})]})]},`${f.title}-${h}`)})})},i4={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]"}},yl=({items:e,value:t,onChange:r,size:n="md",variant:a="default",itemGap:i,withBorder:o=!1,className:l})=>{const c=i4[n],u=a==="surface";return s.jsx("div",{className:O.clsx("inline-flex items-center p-1",u?"bg-surface-bg":"bg-surface-2",c.wrapper,i??c.gap,o&&"border border-surface-4",l),children:e.map(d=>{const f=d.id===t;return s.jsx("button",{onClick:()=>r(d.id),className:O.clsx("font-semibold transition-colors duration-200",c.button,f?O.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)})})},s4=[{id:"all",label:"All"},{id:"success",label:"Success"},{id:"warning",label:"Warnings"},{id:"error",label:"Errors"}],PC=P.forwardRef(({entries:e,showSwitcher:t=!0,filterItems:r=s4,switcherSize:n="sm",switcherVariant:a="surface",switcherItemGap:i="gap-x-8",variant:o="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:v,...x},m)=>{const[g,b]=P.useState(r[0]?.id??"all"),C=(g==="all"?e:e.filter(y=>y.status===g)).map(y=>({title:y.description,caption:y.timestamp,status:y.status}));return s.jsxs("div",{ref:m,className:Q.twMerge("bg-white border border-surface-3 w-full max-w-sm flex flex-col overflow-hidden",v),...x,children:[t&&s.jsx("div",{className:"bg-surface-bg px-4 py-2 border-b border-surface-2 overflow-x-auto ds-scrollbar shrink-0",children:s.jsx(yl,{items:r,value:g,onChange:y=>b(String(y)),size:n,variant:a,itemGap:i})}),s.jsx("div",{className:Q.twMerge("flex-1 min-h-0 overflow-y-auto ds-scrollbar",p),children:C.length===0?s.jsx("p",{className:"text-sm text-low-em py-8 text-center",children:"No activity found"}):s.jsx(OC,{steps:C,current:h??C.length,variant:o,lineStyle:l,colorVariant:c,stepGap:u,indicatorGap:d,itemClassName:f})})]})});PC.displayName="ActivityFeed";const AC=S.default.createContext(null),rr=()=>{const e=S.default.useContext(AC);if(!e)throw new Error("useTableContext must be used within a TableProvider");return e},_C=({children:e,value:t})=>S.default.createElement(AC.Provider,{value:t},e),o4=48,l4=({columns:e,data:t,tableLayout:r={},children:n,className:a,...i})=>{const o=S.default.useRef(null),[l,c]=S.default.useState(()=>!i.sortBy||!i.sortDirection?[]:[{id:i.sortBy,desc:i.sortDirection==="desc"}]),[u,d]=S.default.useState(()=>{const y={};return i.selectedRows?.forEach(j=>{y[String(j)]=!0}),y}),[f,h]=S.default.useState(i.searchValue||""),[p,v]=S.default.useState(()=>({pageIndex:(i.currentPage||1)-1,pageSize:i.itemsPerPage||10})),[x,m]=S.default.useState({});S.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]),S.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]),S.default.useEffect(()=>{i.searchValue!==f&&h(i.searchValue||"")},[i.searchValue,f]),S.default.useEffect(()=>{if(i.currentPage){const y=i.currentPage-1;y!==p.pageIndex&&v(j=>({...j,pageIndex:y}))}},[i.currentPage,p.pageIndex]);const g=S.default.useMemo(()=>{const y=e.map(j=>{const N=j.id==="__select"||j.type==="select",A=i.selectColumnSize??o4,k={id:j.id,header:j.header,accessorKey:j.id,enableSorting:j.sortable??!1,enableColumnFilter:j.filterable??!1,size:N?A:j.size,minSize:N?A:j.minSize,maxSize:N?A:j.maxSize,enableResizing:!0,meta:{align:j.align,hasExplicitSize:N||j.size!==void 0}};return j.component?k.cell=({row:I,getValue:_})=>{const E=j.component,T=j.accessor?j.accessor(I.original):_();return S.default.createElement(E,{value:T,row:I.original,rowIndex:I.index,...j.componentProps})}:j.cell?k.cell=({row:I})=>j.cell(I.original):j.accessor?k.cell=({row:I})=>j.accessor(I.original):k.cell=({getValue:I})=>I(),k});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=Er.useReactTable({data:t,columns:g,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 N=j[0];N?i.onSortChange?.(N.id,N.desc?"desc":"asc"):i.onSortChange?.("",null)},onRowSelectionChange:y=>{const j=typeof y=="function"?y(u):y;d(j);const N=new Set;Object.keys(j).forEach(A=>{if(j[A]){const k=Number(A);N.add(isNaN(k)?A:k)}}),i.onSelectionChange?.(N)},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;v(j),i.onPageChange?.(j.pageIndex+1)},getCoreRowModel:Er.getCoreRowModel(),getSortedRowModel:Er.getSortedRowModel(),getFilteredRowModel:Er.getFilteredRowModel(),getPaginationRowModel:i.showPagination?Er.getPaginationRowModel():void 0,manualPagination:!1,manualSorting:!1,getRowId:(y,j)=>String(i.getRowId?.(y,j)??j)}),w=S.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 s.jsx(_C,{value:{table:b,tableLayout:w,parentRef:o,emptyStateTitle:i.emptyStateTitle,emptyStateDescription:i.emptyStateDescription,showClearFiltersButton:i.showClearFiltersButton??!0,resetAllFilters:C},children:s.jsx("div",{className:O.clsx("w-full min-w-0 flex flex-col",a),children:n})})},c4=({children:e,className:t,noFooter:r=!1})=>{const{tableLayout:n,parentRef:a,table:i}=rr(),{virtualized:o,width:l}=n,c=i.getFilteredRowModel().rows.length===0;return o?s.jsx("div",{ref:a,className:O.clsx("bg-surface-0 border-x border-surface-4 overflow-auto w-full min-w-full table ds-scrollbar",t),style:{height:"400px"},children:s.jsx("table",{className:O.clsx("w-full",l==="fixed"&&"table-fixed",l==="auto"&&"table-auto"),children:e})}):s.jsx("div",{className:O.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:s.jsxs("table",{className:O.clsx(!c&&l!=="fixed"&&"min-w-max","w-full",l==="fixed"&&"table-fixed",l==="auto"&&"table-auto"),"data-slot":"data-table",children:[l==="fixed"&&s.jsx("colgroup",{children:i.getAllLeafColumns().map(u=>s.jsx("col",{style:u.id==="__select"?{width:`${u.getSize()}px`,maxWidth:`${u.getSize()}px`}:void 0},u.id))}),e]})})},Rs=({children:e,className:t,style:r,isTBody:n=!0})=>{const{tableLayout:a}=rr(),{rowBorder:i,rowHeight:o}=a,l=o&&n?{...r,height:`${o}px`}:r;return s.jsx("tr",{className:O.clsx("bg-white hover:bg-surface-2 transition-colors",i&&"border-b border-surface-4 last:border-b-0",t),style:l,children:e})},kC=({header:e,className:t})=>{const{table:r,tableLayout:n}=rr(),{headerBackground:a,dense:i,cellBorder:o,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 s.jsx("th",{className:O.clsx(i?"px-2 py-2":"px-3 py-3",a&&"bg-surface-1","align-middle relative",o&&"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:s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(Jt,{className:"",checked:r.getIsAllPageRowsSelected(),onChange:r.getToggleAllPageRowsSelectedHandler(),indeterminate:r.getIsSomePageRowsSelected(),size:"small"})})});const v=s.jsxs("th",{className:O.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",o&&"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:[s.jsx("div",{className:"align-middle gap-2 min-w-0",children:s.jsx("span",{className:O.clsx("text-xs font-medium leading-[18px] truncate capitalize text-low-em",h&&"font-semibold"),children:Er.flexRender(e.column.columnDef.header,e.getContext())})}),f&&s.jsx("div",{className:"align-middle flex-shrink-0",children:s.jsx(hg,{direction:f==="desc"?"desc":"asc"})}),d.getCanFilter()&&s.jsx("div",{className:"align-middle flex-shrink-0",children:s.jsx(pg,{})})]});return p?s.jsxs("th",{className:O.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",o&&"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:[s.jsxs("div",{className:"flex items-center justify-center flex-row gap-2",children:[s.jsx("div",{className:"align-middle gap-2 min-w-0",children:s.jsx("span",{className:O.clsx("text-xs font-medium leading-[18px] truncate capitalize text-low-em",h&&"font-semibold"),children:Er.flexRender(e.column.columnDef.header,e.getContext())})}),f&&s.jsx("div",{className:"align-middle flex-shrink-0",children:s.jsx(hg,{direction:f==="desc"?"desc":"asc"})}),d.getCanFilter()&&s.jsx("div",{className:"align-middle flex-shrink-0",children:s.jsx(pg,{})})]}),s.jsx("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:O.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")})]}):v},hg=({direction:e})=>e?s.jsx(u2,{className:O.clsx("text-low-em",e==="asc"&&"rotate-180"),size:12}):null,pg=()=>s.jsx(d2,{className:"text-low-em",size:12}),u4=({className:e})=>{const{table:t,tableLayout:r}=rr(),{headerBackground:n,headerBorder:a}=r;return s.jsx("thead",{className:O.clsx(n&&"bg-surface-1",a&&"border-b border-surface-4",e),children:t.getHeaderGroups().map(i=>s.jsx(Rs,{isTBody:!1,children:i.headers.map(o=>s.jsx(kC,{header:o},o.id))},i.id))})},Oh=({cell:e,className:t})=>{const{tableLayout:r}=rr(),{cellAlign:n}=r,a=e.row,i=a.getIsSelected();return e.column.id==="__select"?s.jsx("td",{className:O.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:s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(Jt,{checked:i,onChange:a.getToggleSelectedHandler(),size:"small"})})}):s.jsx("td",{className:O.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:Er.flexRender(e.column.columnDef.cell,e.getContext())})},TC=({title:e="No data available.",className:t,colSpan:r=1})=>s.jsx("tr",{className:O.clsx("w-full",t),children:s.jsx("td",{colSpan:r,children:s.jsx(ht,{description:e,flat:!0,className:"rounded-b-2xl"})})}),d4=({className:e})=>{const{table:t,tableLayout:r,parentRef:n,emptyStateTitle:a,resetAllFilters:i}=rr(),{virtualized:o}=r;if(t.getFilteredRowModel().rows.length===0)return s.jsx("tbody",{className:O.clsx(r.rowBorder&&"divide-y divide-surface-4",r.dense&&"text-sm",e),children:s.jsx(TC,{title:a,colSpan:t.getAllColumns().length})});if(!o)return s.jsx("tbody",{className:O.clsx(r.rowBorder&&"divide-y divide-surface-4",r.dense&&"text-sm",e),children:t.getRowModel().rows.map(f=>s.jsx(Rs,{children:f.getVisibleCells().map(h=>s.jsx(Oh,{cell:h},h.id))},f.id))});const c=Bj.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 s.jsx("tbody",{className:O.clsx("relative",r.dense&&"text-sm",e),style:{height:`${d}px`},children:u.map(f=>{const h=t.getRowModel().rows[f.index];return s.jsx(Rs,{style:{position:"absolute",top:0,left:0,width:"100%",height:`${f.size}px`,transform:`translateY(${f.start}px)`},children:h.getVisibleCells().map(p=>s.jsx(Oh,{cell:p},p.id))},f.key)})})},f4=(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},EC=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"}),h4=e=>e.map(t=>EC(t)),p4=(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}},m4=({showPagination:e=!0,totalItems:t,className:r,sizes:n=[10,20,50,100],footerBackground:a=!0,noBorder:i=!1,actions:o})=>{const{table:l}=rr(),[c,u]=il(),d=u<500,f=l.getState().pagination,h=l.getPageCount(),p=l.getCanPreviousPage(),v=l.getCanNextPage(),x=N=>{const A=f4(N,h)-1;l.setPageIndex(A)},m=N=>{l.setPageSize(Number(N))},g=()=>l.previousPage(),b=()=>l.nextPage(),w=l.getFilteredRowModel().rows.length,{total:C}=p4(f.pageIndex,f.pageSize,t,w),y=h4(n),j=f.pageSize;return!e||w===0?null:s.jsxs("div",{ref:c,className:O.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:[s.jsxs("div",{className:O.clsx("items-center flex-row shrink-0 gap-4",d?"hidden":"flex"),children:[s.jsx("span",{className:O.clsx("text-low-em text-sm font-semibold",d?"hidden":"block"),children:"Showing"}),s.jsx(Te,{className:"!w-[68px]",size:"sm",variant:"outlined",value:String(j),items:y,onChange:m,showLeadingIcon:!1,customHeight:"28px",customRadius:"8px",menuSize:"sm"}),s.jsx("span",{className:O.clsx("text-med-em text-sm font-semibold",d?"hidden":"block"),children:`/ ${String(C)}`})]}),s.jsxs("div",{className:O.clsx("flex flex-row items-center gap-4",d?"w-full justify-between":"w-auto justify-end"),children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("span",{className:O.clsx("text-med-em text-sm font-semibold whitespace-nowrap",d?"hidden":"block"),children:"Go To Page"}),s.jsx(Te,{className:"!w-[68px]",size:"sm",variant:"outlined",value:String(f.pageIndex+1),items:Array.from({length:h||1},(N,A)=>EC(A+1)),onChange:x,showLeadingIcon:!1,customHeight:"28px",customRadius:"8px",menuSize:"sm"}),s.jsxs("span",{className:"text-med-em text-sm font-semibold whitespace-nowrap",children:["of ",h||1]})]}),s.jsx("div",{className:"px-4 flex items-center",children:s.jsx("span",{className:"w-0 border-l border-gray-300 h-[33px]"})}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(W,{onClick:g,disabled:!p,variant:"neutral",hierarchy:"tertiary",size:"sm",children:"Previous"}),s.jsx(W,{onClick:b,disabled:!v,variant:"brand",hierarchy:"primary",size:"sm",children:"Next"})]})]}),o&&s.jsx("div",{className:"flex items-center gap-x-4 flex-shrink-0",children:o})]})},x4=({title:e,search:t,actions:r,className:n})=>s.jsxs("div",{className:O.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&&s.jsx("div",{className:"flex-shrink-0 text-xl font-semibold text-high-em leading-[30px]",children:e}),t&&s.jsx("div",{className:"flex-1",children:s.jsx(me,{value:t.value??"",onChange:a=>t.onChange(a.target.value),placeholder:t.placeholder??"Search...",size:"md",leadingIcon:s.jsx(B.SearchNormal1,{size:16})})}),r&&s.jsx("div",{className:"flex items-center gap-x-4 flex-shrink-0",children:r})]}),g4=({columnId:e,className:t,options:r,title:n})=>{const{table:a}=rr(),i=a.getColumn(e),[o,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 s.jsxs("select",{value:o,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm",children:[s.jsx("option",{value:"",children:"All"}),r?.map((p,v)=>s.jsx("option",{value:String(p.value),children:p.label},v))]});case"number":return s.jsx("input",{type:"number",value:o,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 s.jsx("input",{type:"date",value:o,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"});case"boolean":return s.jsxs("select",{value:o,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm",children:[s.jsx("option",{value:"",children:"All"}),s.jsx("option",{value:"true",children:"Yes"}),s.jsx("option",{value:"false",children:"No"})]});case"text":default:return s.jsx("input",{type:"text",value:o,onChange:p=>f(p.target.value),placeholder:`Filter ${d}...`,className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"})}};return s.jsxs("div",{className:O.clsx("p-2 border-t border-gray-200",t),children:[s.jsx("div",{className:"text-xs font-medium text-gray-700 mb-1",children:d}),h()]})},v4=({className:e,trigger:t,position:r="right"})=>{const{table:n}=rr(),[a,i]=P.useState(!1),o=n.getAllColumns().filter(h=>h.id!=="__select"&&h.getCanHide());if(o.length===0)return null;const l=h=>{o.forEach(p=>{p.getCanHide()&&p.toggleVisibility(h)})},c=o.every(h=>h.getIsVisible()),u=o.some(h=>h.getIsVisible()),d=s.jsxs(W,{variant:"neutral",hierarchy:"tertiary",size:"sm",className:"flex items-center gap-2",children:[s.jsx(B.Eye,{size:"16"}),"Columns",s.jsx(B.ArrowDown2,{size:"16"})]}),f=r==="right"?"right-0 origin-top-right":"left-0 origin-top-left";return s.jsxs("div",{className:O.clsx("relative inline-block text-left",e),children:[s.jsx("div",{onClick:()=>i(!a),children:t||d}),a&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),s.jsx("div",{className:O.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:s.jsxs("div",{className:"py-1",children:[s.jsx("div",{className:"px-4 py-2 border-b border-gray-200",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Column Visibility"}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>l(!0),className:"text-xs text-blue-600 hover:text-blue-800",disabled:c,children:"All"}),s.jsx("span",{className:"text-gray-300",children:"|"}),s.jsx("button",{onClick:()=>l(!1),className:"text-xs text-blue-600 hover:text-blue-800",disabled:!u,children:"None"})]})]})}),s.jsx("div",{className:"max-h-60 overflow-y-auto",children:o.map(h=>{const p=h.getIsVisible(),v=typeof h.columnDef.header=="string"?h.columnDef.header:h.id;return s.jsxs("div",{className:"px-4 py-2 hover:bg-gray-50 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(Jt,{checked:p,onChange:h.getToggleVisibilityHandler(),size:"small"}),s.jsx("label",{htmlFor:`column-${h.id}`,className:"ml-2 text-sm text-gray-700 cursor-pointer",onClick:x=>{x.stopPropagation(),h.toggleVisibility()},children:v})]}),s.jsx("button",{onClick:x=>{x.stopPropagation(),h.toggleVisibility()},className:"p-1 rounded hover:bg-gray-200",children:p?s.jsx(B.Eye,{size:"16",className:"text-gray-600"}):s.jsx(B.EyeSlash,{size:"16",className:"text-gray-400"})})]},h.id)})})]})})]})]})},y4=({value:e,config:t})=>{const r=t?.size||"sm";return s.jsx(Ft,{size:r,initials:String(e||"")})},b4=({value:e,config:t})=>{const r=t?.size||"xs",n=t?.variantMap||{},a=t?.variant||"secondary",i=String(e||"").toLowerCase(),o=n[i]||a;return s.jsx(Lr,{variant:o,size:r,children:String(e||"")})},w4=({value:e})=>{const t=String(e||"");return s.jsx("a",{href:`mailto:${t}`,className:"text-primary-900 hover:underline",children:t})},mg=({value:e})=>s.jsx("span",{children:String(e||"")}),j4=({value:e})=>{const t=typeof e=="number"?e:parseFloat(String(e||"0"));return s.jsx("span",{children:t.toLocaleString()})},C4=({value:e})=>{if(!e)return s.jsx("span",{children:"-"});const t=e instanceof Date?e:new Date(String(e));return s.jsx("span",{children:t.toLocaleDateString()})},S4=({value:e})=>{const t=!!e;return s.jsx("span",{className:t?"text-success-600":"text-gray-400",children:t?"✓":"✗"})},N4={avatar:y4,tag:b4,email:w4,text:mg,number:j4,date:C4,boolean:S4,custom:mg};function IC(e){const t=N4[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 O4(e){return e.map(t=>IC(t))}function P4(e){return[{id:"__select",header:"",type:"select",width:"w-16"},...e]}const MC={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}},$C=[{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}],A4={config:MC,data:$C},RC={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}},LC=[{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"}],_4={config:RC,data:LC},xg={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"}},oc={none:"",xs:"mt-2",sm:"mt-4",md:"mt-6",lg:"mt-8",xl:"mt-12"},Cm=({variant:e="line",tabs:t,className:r,selectedIndex:n,onChange:a,customPaddingBottom:i,contentSpacing:o="sm",fullHeight:l=!1,iconLabelGap:c=4,iconSize:u=16,showBorder:d=!0,headerHeight:f,tabPaddingX:h,tabListClassName:p,lazy:v=!1,responsive:x})=>{const m=S.default.useRef(null),g=S.default.useRef(0),b=S.default.useRef(!1),[w,C]=S.default.useState(!1);S.default.useLayoutEffect(()=>{if(!x)return;const $=m.current;if(!$)return;const L=()=>{b.current||(g.current=$.scrollWidth);const U=$.clientWidth,D=g.current,F=b.current?U<D+24:U<D;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",N=e!=="only-icon"&&!y,A=e==="only-icon"||y,k=e==="line-icons"||e==="only-icon"?xg.line:xg[e],I=d?k.list:k.list.replace(/border-b\s+border-surface-3/g,"").trim(),_={};f&&(_.height=`${f}px`,_.alignItems="flex-end");const E=()=>typeof o=="number"?"":o in oc?oc[o]:oc.sm,T=typeof o=="number"?{marginTop:`${o}px`}:{},R=l?{height:"100%",maxHeight:"100%",overflow:"hidden",display:"flex",flexDirection:"column"}:{},M=l?{height:"100%",maxHeight:"100%",flex:1}:{};return s.jsx("div",{className:O.clsx("w-full",r),style:R,children:s.jsxs(xe.Tab.Group,{selectedIndex:n,onChange:a,as:"div",className:l?"flex flex-col overflow-hidden":void 0,style:M,children:[s.jsx(xe.Tab.List,{ref:m,className:O.clsx(I,p),style:_,children:t.map($=>s.jsx(xe.Tab,{title:A?$.label:void 0,className:({selected:L})=>O.clsx(k.tab,x&&"shrink-0",L?k.selected:k.unselected),style:{...i?{paddingBottom:i}:{},...h!==void 0?{paddingLeft:`${h}px`,paddingRight:`${h}px`}:{}},children:({selected:L})=>{const q=L&&$.selectedIcon?$.selectedIcon:$.icon;return s.jsxs("div",{className:O.clsx("flex items-center",tr(c)),children:[j&&q&&S.default.isValidElement(q)&&S.default.cloneElement(q,{size:u,color:"currentColor"}),N&&s.jsx("span",{className:"whitespace-nowrap",children:$.label})]})}},$.id))}),s.jsx(xe.Tab.Panels,{className:E(),style:l?{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden",...T}:T,children:t.map($=>s.jsx(xe.Tab.Panel,{unmount:v,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:o=!1,lazy:l=!1,loading:c=!1,className:u})=>{const[d,f]=S.default.useState(e[0]?.id);S.default.useEffect(()=>{if(t!==void 0)return;e.some(g=>g.id===d)||f(e[0]?.id)},[e,t,d]);const h=t??d,p=m=>{const g=e[m]?.id;g!==void 0&&(f(g),r?.(g))},v=Math.max(0,e.findIndex(m=>m.id===h));if(e.length===0&&!c)return null;if(c)return s.jsxs("div",{className:O.clsx("overflow-hidden",o&&"h-full",!i&&"border border-surface-3 rounded-lg",u),children:[s.jsxs("div",{className:"flex items-center gap-8 p-6 bg-surface-bg border-b border-surface-3",children:[s.jsx("div",{className:"h-24 w-48 rounded-md bg-surface-2 animate-pulse"}),s.jsx("div",{className:"h-24 w-40 rounded-md bg-surface-2 animate-pulse"})]}),s.jsx("div",{className:O.clsx("flex items-center justify-center bg-white",o?"min-h-full":"min-h-[160px]"),children:s.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?s.jsx("div",{className:O.clsx("p-6 bg-white",o&&"min-h-full"),children:m.content}):s.jsx("div",{className:O.clsx("flex items-center justify-center bg-white",o?"min-h-full":"min-h-[160px]"),children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),onClick:()=>a?.(m.id),children:n})})}));return s.jsx("div",{className:O.clsx("overflow-hidden",o&&"h-full",!i&&"border border-surface-3 rounded-lg",u),children:s.jsx(Cm,{variant:"pill",tabs:x,selectedIndex:v,onChange:p,tabListClassName:"bg-surface-bg border-b border-surface-3 p-6",contentSpacing:"none",fullHeight:o,lazy:l})})},DC=({tabs:e,className:t,selectedIndex:r,onChange:n,onAddTab:a,onArrowRightClick:i,onCloseTab:o,tabWidth:l,scrollDistance:c=300})=>{const u=P.useRef(null),[d,f]=P.useState(!1),[h,p]=P.useState(!1),v=()=>{if(!u.current)return;const{scrollLeft:g,scrollWidth:b,clientWidth:w}=u.current;f(g>0),p(g<b-w-1)};P.useEffect(()=>{v();const g=u.current;if(g){g.addEventListener("scroll",v);const b=new ResizeObserver(v);return b.observe(g),()=>{g.removeEventListener("scroll",v),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 s.jsx("div",{className:O.clsx("w-full h-full",t),children:s.jsx(xe.Tab.Group,{className:"h-full w-full",selectedIndex:r,onChange:n,children:s.jsxs("div",{className:"relative flex items-center border-x border-surface-3 h-full w-full",children:[d&&s.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:s.jsx(ie,{className:"text-med-em",size:"xs",children:s.jsx(B.ArrowLeft2,{})})}),s.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:s.jsx(xe.Tab.List,{className:"flex min-w-full h-full ",children:e.map((g,b)=>s.jsx(xe.Tab,{as:"div",className:({selected:w})=>O.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})=>s.jsxs("div",{className:"flex items-center justify-between gap-8 p-8 w-full",children:[s.jsx("span",{className:`!truncate text-sm text-high-em font-medium ${w?"text-high-em":"text-low-em"}`,children:g.label}),g.closeable&&w&&o&&s.jsx(W,{onClick:C=>{C.stopPropagation(),o(b)},className:"cursor-pointer",leadingIcon:s.jsx(ie,{size:"xs",className:"text-med-em",children:s.jsx(it,{})}),"aria-label":"Close tab",icons:"only",variant:"neutral",hierarchy:"secondary"})]})},g.id))})}),s.jsxs("div",{className:"flex items-center h-full",children:[h&&s.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:s.jsx(ie,{className:"text-low-em",size:"xs",children:s.jsx(B.ArrowRight2,{})})}),a&&s.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:s.jsx(ie,{className:"text-low-em",size:12,children:s.jsx(B.Add,{})})})]})]})})})};DC.displayName="HeaderTabs";const T4={default:{...We.default,placeholder:"placeholder-placeholder",text:"text-med-em"},danger:{...We.danger,placeholder:"placeholder-danger-em",text:"text-danger-em"}},E4={sm:{...qt.sm,fontSize:"text-xs"},md:{...qt.md,fontSize:"text-sm"},lg:{...qt.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"},bl=({variant:e="default",size:t="md",label:r,hint:n,hintIconVariant:a,disabled:i,resize:o="vertical",className:l,customFontWeight:c,customBackground:u,...d})=>{const f=T4[e],h=E4[t],p=c||void 0,v=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 s.jsxs("div",{className:O.clsx("flex flex-col gap-1.5",l),children:[r&&s.jsx("label",{htmlFor:d.id,className:O.clsx("font-semibold text-med-em",h.labelFontSize,i&&$n.label),children:r}),s.jsx("div",{className:O.clsx("relative flex items-center border rounded-xl transition-colors duration-200 flex-1",!u&&f.wrapper,i&&$n.wrapper),style:{backgroundColor:v},children:s.jsx("textarea",{disabled:i,className:O.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[o],i&&$n.text,i&&$n.placeholder),style:{fontWeight:p},...d})}),n&&s.jsx(ft,{icon:s.jsx(B.InfoCircle,{variant:a}),label:n,iconSize:h.hintIconSize,gap:1,iconColorClass:O.clsx(f.hint,i&&$n.hint),labelColorClass:O.clsx(f.hint,i&&$n.hint),className:O.clsx(h.hintFontSize,"font-semibold")})]})};function I4({theme:e="light",onToggle:t,className:r}){return s.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"?s.jsx("span",{children:"Light Mode"}):s.jsx("span",{children:"Dark Mode"})})}const M4="bg-white rounded-[20px] shadow-xl py-6 px-10 flex items-center gap-6 max-w-md leading-10",$4={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"},zC=18,BC="text-base font-bold text-high-em leading-10",FC="text-sm text-high-em leading-9",qC=(e,t)=>Q.twMerge(M4,$4[e||"default"],t),WC=P.forwardRef((e,t)=>{const{title:r,description:n,variant:a="default",action:i,onOpenChange:o,duration:l=5e3,children:c,icon:u,className:d,iconSize:f=zC,...h}=e,p=a!=="custom"||u;return s.jsxs(kt.Root,{ref:t,duration:l,onOpenChange:o,className:qC(a,d),...h,children:[p&&s.jsx("div",{children:a==="custom"&&u?u:s.jsx(rm,{size:f})}),s.jsxs("div",{className:"flex-1",children:[r&&s.jsx(kt.Title,{className:BC,children:r}),n&&s.jsx(kt.Description,{className:FC,children:n})]}),i&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-px h-8 bg-surface-3"}),s.jsx(kt.Action,{asChild:!0,altText:i.label,onClick:i.onClick,children:s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"quaternary",size:"md",icons:"none",children:i.label})})]}),s.jsx(kt.Close,{asChild:!0,className:"shrink-0 flex items-center justify-center",children:s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(it,{className:"text-high-em",size:8})})}),c]})});WC.displayName="Toast";const HC=P.createContext(null),R4=()=>{const e=P.useContext(HC);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},L4=({children:e})=>{const[t,r]=P.useState([]),n=P.useCallback(i=>{const{title:o,description:l,variant:c="default",action:u,duration:d=5e3}=i,f={id:Math.random().toString(36).substr(2,9),title:o,description:l,variant:c,action:u,duration:d};r(h=>[...h,f])},[]),a=P.useCallback((i,o)=>{i||r(l=>l.filter(c=>c.id!==o))},[]);return s.jsx(HC.Provider,{value:{toast:n},children:s.jsxs(kt.Provider,{swipeDirection:"right",children:[e,s.jsx(kt.Viewport,{className:"fixed top-5 right-5 z-[999] flex flex-col gap-4 w-full max-w-[400px]"}),t.map(i=>s.jsxs(kt.Root,{duration:i.duration,onOpenChange:o=>a(o,i.id),className:qC(i.variant),children:[i.variant!=="custom"&&s.jsx("div",{className:"shrink-0 w-10 h-12 flex items-center justify-center",children:s.jsx(rm,{size:zC})}),s.jsxs("div",{className:"flex-1",children:[i.title&&s.jsx(kt.Title,{className:BC,children:i.title}),i.description&&s.jsx(kt.Description,{className:FC,children:i.description})]}),i.action&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-px h-12 bg-surface-3"}),s.jsx(kt.Action,{asChild:!0,altText:i.action.label,onClick:i.action.onClick,children:s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"quaternary",size:"md",icons:"none",children:i.action.label})})]}),s.jsx(kt.Close,{asChild:!0,className:"shrink-0 flex items-center justify-center",children:s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(it,{className:"text-high-em",size:8})})})]},i.id))]})})},D4={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"},Pa=({size:e="medium",checked:t,disabled:r,className:n,...a})=>{const i=D4[e];return s.jsxs("label",{className:O.clsx("relative inline-flex items-center",r?Vr.disabled:"cursor-pointer",n),children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",checked:t,disabled:r,...a}),s.jsx("div",{className:O.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:s.jsx("div",{className:O.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)})})]})},z4=({options:e,value:t,onChange:r,size:n="medium",disabled:a=!1,orientation:i="vertical",togglePosition:o="right",className:l})=>{const c=S.default.useId(),u=d=>{const f=t.includes(d)?t.filter(h=>h!==d):[...t,d];r(f)};return s.jsx("div",{className:Q.twMerge(O.clsx("flex",i==="vertical"?"flex-col gap-8":"flex-row flex-wrap gap-x-8 gap-y-8",l)),children:e.map(d=>{const f=t.includes(d.value),h=a||!!d.disabled,p=`${c}-${String(d.value)}`,v=!!d.caption,x=s.jsx("div",{className:O.clsx("flex items-center shrink-0",v&&"mt-0.5"),children:s.jsx(Pa,{id:p,size:n,checked:f,disabled:h,onChange:()=>u(d.value)})}),m=s.jsxs("label",{htmlFor:p,className:O.clsx("flex flex-col flex-1 min-w-0 gap-3",h?"cursor-not-allowed":"cursor-pointer"),children:[s.jsx("span",{className:O.clsx("text-sm font-medium leading-5",h?"text-disabled":"text-high-em"),children:d.label}),d.caption&&s.jsx("span",{className:O.clsx("text-xs leading-4",h?"text-disabled":"text-low-em"),children:d.caption})]});return s.jsx("div",{className:O.clsx("flex gap-6",o==="right"&&"justify-between",v?"items-start":"items-center",d.className),children:o==="left"?s.jsxs(s.Fragment,{children:[x,m]}):s.jsxs(s.Fragment,{children:[m,x]})},d.value)})})},Sm=S.default.memo(({children:e,className:t,borderSide:r="none",borderStyle:n="surface-3"})=>{const a=S.default.useMemo(()=>r==="none"?"":`${r==="left"?"border-l":"border-r"} ${n==="surface-3"?"border-surface-3":"border-surface-4"}`,[r,n]);return s.jsx("div",{className:`h-full w-full flex flex-col ${a} ${t||""}`,children:e})});Sm.displayName="TypesPanel";const B4=({categories:e=[],onItemClick:t,renderItem:r,className:n=""})=>{const a=i=>{t&&t(i)};return s.jsxs("div",{className:`px-6 py-8 flex-1 overflow-y-auto ${n}`,children:[e.map((i,o)=>s.jsxs("div",{className:"mb-8 last:mb-0",children:[s.jsx("h3",{className:"font-inter font-semibold text-sm text-med-em mb-8",children:i.title}),s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(70px,1fr))] gap-6",children:i.items.map(l=>s.jsx(S.default.Fragment,{children:r?r(l,{onClick:()=>a(l.id)}):s.jsx(V2,{icon:l.icon,text:l.label,onClick:()=>a(l.id)})},l.id))}),o<e.length-1&&s.jsx("div",{className:"mt-8",children:s.jsx(fe,{})})]},i.id)),e.length===0&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-sm text-med-em",children:"No hay elementos en esta categoría"})})]})},F4=({categories:e=[],onItemClick:t,renderItem:r,className:n=""})=>{const a=i=>{t&&t(i)};return s.jsx(Ct.Provider,{delayDuration:300,children:s.jsxs("div",{className:`px-6 py-8 flex-1 overflow-y-auto ${n}`,children:[e.map((i,o)=>s.jsxs("div",{className:"mb-8 last:mb-0",children:[s.jsx("h3",{className:"font-inter font-semibold text-sm text-med-em mb-8",children:i.title}),s.jsx("div",{className:"flex flex-col gap-6",children:i.items.map(l=>s.jsx(S.default.Fragment,{children:r?r(l,{onClick:()=>a(l.id)}):s.jsx(um,{leadingIcon:s.jsx(B.HambergerMenu,{size:20}),leadingIconColor:"text-disabled",icon:s.jsx(nm,{}),iconColor:"text-disabled",tooltipContent:`Add ${l.label} field type`,onClick:()=>a(l.id),children:l.label})},l.id))}),o<e.length-1&&s.jsx("div",{className:"mt-8",children:s.jsx(fe,{})})]},i.id)),e.length===0&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-sm text-med-em",children:"No hay elementos en esta categoría"})})]})})},q4=[{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}],W4=[{value:"list",icon:s.jsx(B.Task,{})},{value:"grid",icon:s.jsx(B.Category,{})}],H4=({className:e="",selectedType:t,onTypeChange:r,selectedView:n,onViewChange:a,actions:i,categories:o,placeholder:l="All",showLabel:c=!0})=>{const[u,d]=P.useState("basicos"),[f,h]=P.useState("list"),p=t!==void 0?t:u,v=n!==void 0?n:f,x=g=>{r?r(g):d(g)},m=g=>{a?a(g):h(g)};return s.jsx(Ct.Provider,{delayDuration:300,children:s.jsxs("div",{className:`flex flex-col ${e}`,children:[c&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"px-6 pt-9 pb-8 flex items-center justify-between",children:[s.jsx(dC,{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&&s.jsx("div",{children:i})]}),s.jsx(fe,{})]}),s.jsxs("div",{className:`flex items-center justify-between gap-4 px-6 ${c?"py-8":"py-4"}`,children:[s.jsx("div",{className:"flex-1",children:s.jsx(Te,{items:o?o.map(g=>({id:g.id,title:g.title,showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1,className:"!h-[34px]"})):q4.map(g=>({...g,showLeadingIcon:!1,className:"!h-[34px]"})),value:p,onChange:x,placeholder:l,size:"md",menuSize:"sm",leadingIcon:s.jsx(B.SearchNormal1,{size:16}),showLeadingIcon:!0})}),s.jsx(xr,{options:W4,value:v,onChange:m,size:"sm"})]}),s.jsx(fe,{})]})})},V4=({className:e="",searchQuery:t,onSearchChange:r,searchPlaceholder:n="Search...",selectedView:a,onViewChange:i,viewOptions:o=[],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,v=P.useCallback(m=>{const g=m.target.value;r?r(g):u(g)},[r]),x=m=>{i?i(m):f(m)};return s.jsxs("div",{className:`flex flex-col ${e}`,children:[s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center justify-between gap-4 py-8 px-6",children:[s.jsx("div",{className:"flex-1",children:s.jsx(me,{type:"search",placeholder:n,value:h,onChange:v,trailingIcon:s.jsx(B.SearchNormal1,{size:16,color:"currentColor"})})}),s.jsx(xr,{options:o,value:p,onChange:x,size:l})]}),s.jsx(fe,{})]})},Nm=({title:e,backButton:t,actions:r,className:n})=>s.jsxs("div",{className:O.clsx("flex items-center gap-2","h-[56px] px-4","border-b border-surface-3",n),children:[t&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(B.ArrowLeft2,{}),"aria-label":t["aria-label"]||"Go back",onClick:t.onClick,className:"shrink-0"}),s.jsxs("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[s.jsx("h2",{className:O.clsx("text-sm font-semibold leading-[22px]","text-high-em","truncate"),children:e}),r&&s.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})]})]});Nm.displayName="PanelHeader";const U4=({user:e,sections:t,align:r="right",offset:n=8,className:a,avatarSize:i="md"})=>{const[o,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(o)return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[o]);const d=h=>{!h.disabled&&h.onClick&&(h.onClick(),l(!1))},f=(h,p)=>{h.switch?.onChange&&h.switch.onChange(p)};return s.jsxs("div",{className:O.clsx("relative inline-block",a),children:[s.jsx("div",{ref:u,onClick:()=>l(!o),className:"cursor-pointer",children:s.jsx(Ft,{size:i,imageUrl:e.avatar,initials:e.initials||e.name.charAt(0),statusBadge:e.statusBadge})}),o&&s.jsxs("div",{ref:c,className:O.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:[s.jsxs("div",{className:"px-10 py-8 border-b border-surface-3",children:[s.jsx("p",{className:"text-sm font-semibold text-high-em",children:e.name}),e.email&&s.jsx("p",{className:"text-xs text-low-em mt-1",children:e.email})]}),s.jsx("div",{className:"py-3",children:t.map((h,p)=>s.jsxs(S.default.Fragment,{children:[h.map(v=>s.jsxs("button",{onClick:()=>d(v),disabled:v.disabled||!!v.switch,className:O.clsx("w-full px-10 py-4 text-left text-sm flex items-center gap-3 transition-colors",!v.switch&&"hover:bg-surface-1",v.destructive?"text-danger-main":"text-high-em",v.disabled&&"opacity-50 cursor-not-allowed"),children:[v.icon&&s.jsx("span",{className:"flex-shrink-0 flex items-center justify-center text-current",children:v.icon}),s.jsx("span",{className:"flex-1 font-normal",children:v.label}),v.trailing&&s.jsx("span",{className:"flex-shrink-0",children:v.trailing}),!v.trailing&&v.badge&&s.jsx(Ye,{theme:v.badge.theme||"success",size:"xs",variant:"simple",children:v.badge.label}),!v.trailing&&v.switch&&s.jsx(Pa,{size:"small",checked:v.switch.checked,onChange:x=>f(v,x.target.checked),onClick:x=>x.stopPropagation()})]},v.id)),p<t.length-1&&s.jsx("div",{className:"my-3 border-t border-surface-3"})]},p))})]})]})},Om=({selected:e,onSelect:t,disabled:r=!1,onCancel:n,onAccept:a,extraMonth:i=!1,pickType:o="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,v=b=>{h(b),t&&t(b)},x=()=>{h(void 0),n&&n()},m=()=>{a&&a(p)},g=o==="range"?{mode:"range",selected:p,onSelect:v}:{mode:"single",selected:p?.from,onSelect:b=>v(b?{from:b}:void 0)};return s.jsxs("div",{className:Q.twMerge(O.clsx("font-family-inter bg-white border border-surface-3 rounded-[20px] w-fit",r&&"opacity-50 pointer-events-none",l)),children:[s.jsx(a5.DayPicker,{...g,disabled:r,numberOfMonths:i?2:1,showOutsideDays:!0,className:"datepicker-calendar p-2.5",components:{Chevron:({orientation:b})=>b==="left"?s.jsx(B.ArrowLeft2,{size:16,color:"var(--high-em)"}):s.jsx(B.ArrowRight2,{size:16,color:"var(--high-em)"})}}),d&&s.jsx("div",{className:"border-t border-surface-3 px-2.5 py-2.5 pl-5 self-end justify-end",children:s.jsxs("div",{className:"flex gap-2 self-end justify-end",children:[s.jsx(W,{className:"mr-8",variant:"neutral",size:"sm",hierarchy:"secondary",onClick:x,disabled:r,children:c}),s.jsx(W,{variant:"brand",size:"sm",hierarchy:"primary",onClick:m,disabled:r,children:u})]})})]})},Pm=({className:e,icon:t,label:r,description:n,actions:a,iconType:i="default",iconVariant:o="secondary",iconSize:l="sm",linkProps:c,badge:u,bottomContent:d,labelInlineContent:f,contentGap:h=2,classNameActions:p,...v})=>s.jsxs("div",{className:O.clsx("flex flex-row gap-8 items-center",e),...v,children:[t&&s.jsx(vl,{type:i,variant:o,size:l,children:t}),s.jsxs("div",{className:O.clsx("flex flex-1 flex-col",tr(h)),children:[s.jsxs("div",{className:O.clsx("flex flex-row",u?"justify-between gap-2":""),children:[s.jsxs("div",{className:"flex flex-row gap-6 items-center",children:[c?s.jsx(gr,{className:"w-fit",...c,children:r}):s.jsx("span",{className:"text-high-em text-md font-medium",children:r}),f&&s.jsx("div",{children:f})]}),u&&s.jsx("div",{children:u})]}),n&&s.jsx("span",{className:"text-med-em text-sm font-normal",children:n}),d&&s.jsx("div",{children:d})]}),a&&s.jsx("div",{className:O.clsx("flex gap-8",p),children:a})]}),K4=({className:e,planLabel:t,priceLabel:r,timeLabel:n,nextPaymentLabel:a,dateLabel:i,items:o,buttonLabel1:l,onClickButton1:c,buttonLabel2:u,onClickButton2:d,...f})=>s.jsxs("div",{className:O.clsx("flex flex-col border border-surface-3 rounded-8 w-full",e),...f,children:[s.jsxs("div",{className:"flex flex-row px-10 py-8 border-b border-b-surface-3 gap-8",children:[s.jsxs("div",{className:"flex flex-col flex-1 gap-4",children:[s.jsx("span",{className:"flex text-med-em font-medium text-sm",children:t}),s.jsxs("div",{className:"flex flex-row items-center gap-6",children:[s.jsx("span",{className:"text-high-em font-semibold text-3xl font-family-space-grotesk",children:r}),s.jsxs("span",{className:"text-med-em text-sm font-normal",children:["/ ",n]})]})]}),s.jsxs("div",{className:"flex flex-col self-center ",children:[s.jsx("span",{className:"font-normal text-xs text-right text-med-em",children:a}),s.jsx("span",{className:"text-md text-right font-medium text-high-em",children:i})]})]}),s.jsxs("ul",{className:"flex flex-col p-10 gap-12",children:[s.jsx("div",{className:"flex flex-col gap-10",children:o.map((h,p)=>s.jsx(S.default.Fragment,{children:s.jsx("li",{children:s.jsx(Pm,{icon:h.icon,iconType:"default",iconVariant:"secondary",iconSize:"sm",label:h.itemLabel,badge:s.jsx(Ye,{variant:"simple",theme:h.badgeTheme,children:h.badge}),bottomContent:s.jsx(al,{progress:h.progress})})})},p))}),s.jsxs("div",{className:"flex flex-row gap-6",children:[s.jsx(W,{className:"w-1/2",size:"md",variant:"brand",hierarchy:"primary",onClick:c,children:l}),s.jsx(W,{className:"w-1/2",size:"md",variant:"neutral",hierarchy:"tertiary",onClick:d,children:u})]})]})]}),G4=({className:e,title:t,subtitle:r,actionButtonLabel:n,actionButtonLabelOnClick:a,extraComponent:i,items:o,...l})=>s.jsxs("div",{className:O.clsx("flex flex-col border border-surface-3 rounded-8 w-full",e),...l,children:[s.jsxs("div",{className:"flex flex-row px-10 py-8 border-b border-b-surface-3",children:[s.jsxs("div",{className:"flex flex-1 flex-col content-center",children:[s.jsx("h3",{className:"text-high-em font-semibold",children:t}),s.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]}),n&&s.jsx("div",{className:"flex self-center",children:s.jsx(W,{size:"sm",variant:"neutral",hierarchy:"tertiary",onClick:a,children:n})})]}),s.jsxs("div",{className:"flex flex-col p-10 gap-10",children:[s.jsx("div",{className:"flex flex-col gap-6",children:o.map((c,u)=>s.jsxs(S.default.Fragment,{children:[u>0&&s.jsx(fe,{}),s.jsx(Pm,{icon:c.icon,label:c.label,description:c.description,actions:(c.buttonLabel||c.buttonIcon)&&s.jsx(W,{size:"sm",onClick:c.buttonOnClick,...c.buttonLabel?{variant:"neutral",hierarchy:"tertiary"}:{icons:"only",variant:"neutral",hierarchy:"secondary",leadingIcon:c.buttonIcon||s.jsx(am,{})},children:c.buttonLabel})})]},u))}),i&&s.jsx("div",{className:"flex flex-1",children:i})]})]}),Z4=({className:e,title:t,subtitle:r,buttonItems:n,...a})=>s.jsxs("div",{className:O.clsx("flex flex-col gap-8 p-8 bg-surface-1 rounded-8 w-full",e),...a,children:[s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("h3",{className:"text-high-em font-semibold text-xl",children:t}),s.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]}),s.jsx("div",{className:"flex flex-col gap-4",children:n.map((i,o)=>s.jsx(W,{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"}},o))})]}),VC=({className:e,icon:t,projectName:r,dbLabel:n,statusLabel:a,statusState:i,stats:o,...l})=>s.jsxs("div",{className:O.clsx("flex flex-col border border-surface-3 rounded-8 bg-white w-full",e),...l,children:[s.jsxs("div",{className:"flex flex-col gap-6 px-10 py-8 border-b border-b-surface-3",children:[s.jsxs("div",{className:"flex items-center gap-5",children:[s.jsx("span",{className:"flex size-12 shrink-0 items-center justify-center rounded-5 bg-surface-2 text-high-em",children:s.jsx(ie,{size:"sm-md",children:t})}),s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx("span",{className:"text-high-em font-semibold truncate",children:r}),s.jsx("span",{className:"text-med-em text-sm",children:n})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ye,{variant:"status",statusState:i,statusSize:"xs"}),s.jsx("span",{className:"text-med-em text-sm",children:a})]})]}),s.jsx("div",{className:"flex flex-col gap-6 px-10 py-8",children:o.map((c,u)=>s.jsxs(S.default.Fragment,{children:[u>0&&s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"text-med-em text-sm",children:c.label}),c.badgeTheme?s.jsx(Ye,{variant:"simple",theme:c.badgeTheme,children:c.value}):s.jsx("span",{className:"text-high-em font-medium",children:c.value})]})]},u))})]});VC.displayName="ProjectOverviewCard";const lc={showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!0},UC=({className:e,icon:t,name:r,statusLabel:n,statusTheme:a="surface",fieldsLabel:i,updatedLabel:o,onView:l,onDuplicate:c,onDelete:u,viewLabel:d="Ver",duplicateLabel:f="Duplicar",deleteLabel:h="Eliminar",...p})=>{const[v,x]=P.useState(!1),m=P.useRef(null),g=()=>x(!1),b=[{...lc,id:"view",title:d,leadingIcon:s.jsx(B.Eye,{}),onSelect:()=>{g(),l?.()}},{...lc,id:"duplicate",title:f,leadingIcon:s.jsx(B.Copy,{}),onSelect:()=>{g(),c?.()}},{...lc,id:"delete",title:h,leadingIcon:s.jsx(B.Trash,{}),customTitleColor:"text-danger-em",onSelect:()=>{g(),u?.()}}];return s.jsxs("div",{role:l?"button":void 0,onClick:l,className:Q.twMerge(O.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:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[s.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-4 bg-surface-2 text-high-em",children:s.jsx(ie,{size:"sm",children:t})}),s.jsx("span",{className:"truncate font-semibold text-high-em",children:r})]}),s.jsxs("div",{className:"relative shrink-0",children:[s.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:s.jsx(B.More,{size:20,color:"currentColor",className:"rotate-90"})}),v&&s.jsx(Ht,{size:"xs",triggerRef:m,onClose:g,items:b})]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[s.jsx(ft,{icon:s.jsx(B.Hashtag,{}),label:i,labelSize:"sm",iconSize:"sm",gap:4}),o&&s.jsx(ft,{icon:s.jsx(B.Clock,{}),label:o,labelSize:"sm",iconSize:"sm",gap:4}),s.jsx(Ye,{variant:"simple",theme:a,children:n})]})]})};UC.displayName="ModuleSummaryCard";const cc={showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!0},KC=({className:e,icon:t,name:r,typeLabel:n,moduleLabel:a,updatedLabel:i,statusLabel:o,statusTheme:l="surface",onView:c,onDuplicate:u,onDelete:d,viewLabel:f="Ver",duplicateLabel:h="Duplicar",deleteLabel:p="Eliminar",...v})=>{const[x,m]=P.useState(!1),g=P.useRef(null),b=()=>m(!1),w=[c&&{...cc,id:"view",title:f,leadingIcon:s.jsx(B.Eye,{}),onSelect:()=>{b(),c()}},u&&{...cc,id:"duplicate",title:h,leadingIcon:s.jsx(B.Copy,{}),onSelect:()=>{b(),u()}},d&&{...cc,id:"delete",title:p,leadingIcon:s.jsx(B.Trash,{}),customTitleColor:"text-danger-em",onSelect:()=>{b(),d()}}].filter(Boolean),C=w.length>0;return s.jsxs("div",{role:c?"button":void 0,onClick:c,className:Q.twMerge(O.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)),...v,children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[s.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-4 bg-surface-2 text-high-em",children:s.jsx(ie,{size:"sm",children:t})}),s.jsx("span",{className:"truncate font-semibold text-high-em",children:r})]}),C&&s.jsxs("div",{className:"relative shrink-0",children:[s.jsx("button",{ref:g,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:s.jsx(B.More,{size:20,color:"currentColor",className:"rotate-90"})}),x&&s.jsx(Ht,{size:"xs",triggerRef:g,onClose:b,items:w})]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[s.jsx(ft,{icon:s.jsx(B.Category,{}),label:n,labelSize:"sm",iconSize:"sm",gap:4}),a&&s.jsx(ft,{icon:s.jsx(B.Box,{}),label:a,labelSize:"sm",iconSize:"sm",gap:4}),i&&s.jsx(ft,{icon:s.jsx(B.Clock,{}),label:i,labelSize:"sm",iconSize:"sm",gap:4}),s.jsx(Ye,{variant:"simple",theme:l,children:o})]})]})};KC.displayName="WidgetSummaryCard";const wl=P.forwardRef(({className:e,title:t,description:r,icon:n,isDragging:a=!1,onMaximize:i,onTextBlock:o,onEdit:l,onCopy:c,onTrash:u,...d},f)=>{const[h,p]=P.useState("icon1"),v=m=>{switch(p(m),m){case"maximize":i?.();break;case"text-block":o?.();break;case"edit":l?.();break;case"copy":c?.();break;case"trash":u?.();break}},x=[...i?[{value:"maximize",icon:s.jsx(ie,{size:12,children:s.jsx(Jo,{})})}]:[],...o?[{value:"text-block",label:t}]:[],...l?[{value:"edit",icon:s.jsx(ie,{size:12,children:s.jsx(C2,{})})}]:[],...c?[{value:"copy",icon:s.jsx(ie,{size:12,children:s.jsx(el,{})})}]:[],...u?[{value:"trash",icon:s.jsx(ie,{size:12,children:s.jsx(tl,{})})}]:[]];return s.jsxs("div",{ref:f,className:O.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:[s.jsxs("div",{className:"flex flex-row p-4 gap-4",children:[s.jsx("div",{children:s.jsx(vl,{variant:"secondary",size:"sm",children:n})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-high-em font-semibold text-sm font-family-space-grotesk",children:t}),s.jsx("span",{className:"text-med-em text-xs font-normal",children:r})]})]}),s.jsx("div",{className:"absolute inset-0 m-auto hidden w-fit h-fit p-4 group-hover:block",children:s.jsx(xr,{options:x,value:h,onChange:v,size:"xs",variant:"brand"})})]})});wl.displayName="WidgetBuilderItemHoverAction";const Y4=({className:e,title:t,subtitle:r,image:n,imageAlt:a="Project image",actionButtons:i=[],labelIcons:o=[],...l})=>{const[c,u]=S.default.useState(!1);return s.jsxs("div",{className:O.clsx("flex flex-col rounded-2xl w-full border border-surface-3 h-full",e),...l,children:[s.jsxs("div",{className:"relative w-full h-48 overflow-hidden rounded-t-2xl",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[s.jsx("img",{src:n,alt:a,className:"w-full h-full object-cover"}),i.length>0&&c&&s.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&&s.jsx("div",{className:O.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)=>s.jsx(W,{variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:d.icon,size:"md",onClick:d.onClick,"aria-label":d.ariaLabel,className:"z-10 cursor-pointer"},f))})]}),s.jsxs("div",{className:"flex flex-col py-6 px-8 gap-3 bg-white rounded-b-2xl flex-1",children:[s.jsx("span",{className:"font-semibold text-high-em text-md line-clamp-1",children:t}),s.jsx("span",{className:"text-low-em text-sm font-normal line-clamp-3",children:r}),o.length>0&&s.jsx("div",{className:"flex flex-row gap-8",children:o.map((d,f)=>s.jsx(ft,{gap:4,iconSize:"sm",labelSize:"sm",icon:d.icon,label:d.label},f))})]})]})},X4=({className:e,title:t,subtitle:r,icon:n,iconType:a="default",iconVariant:i="secondary",iconSize:o="sm",headerActions:l,children:c,footerText:u,footerActions:d,footerVariant:f="default",classNameHeader:h,classNameBody:p,classNameFooter:v,...x})=>{const m=t||r||l||n,g=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 s.jsxs("div",{className:O.clsx("flex flex-col bg-white border rounded-8 w-full",e,b[f]),...x,children:[m&&s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-row gap-8 p-8 justify-between items-center",c&&"pb-0"),h),children:[s.jsxs("div",{className:"flex flex-row gap-8 items-center flex-1",children:[n&&s.jsx(vl,{type:a,variant:i,size:o,children:n}),(t||r)&&s.jsxs("div",{className:"flex flex-col gap-2",children:[t&&s.jsx("h3",{className:"text-high-em font-semibold text-md",children:t}),r&&s.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]})]}),l&&s.jsx("div",{className:"flex items-center",children:l})]}),c&&s.jsx("div",{className:Q.twMerge(O.clsx("p-8",m),p),children:c}),g&&s.jsxs("div",{className:Q.twMerge(O.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]),v),children:[u&&s.jsx("div",{className:"text-sm text-low-em",children:u}),d&&s.jsx("div",{children:d})]})]})},Q4=({title:e,columns:t,rows:r,onChange:n,className:a,...i})=>{const o=`1fr repeat(${t.length}, auto)`,l=(c,u,d)=>s.jsx(Jt,{size:"small",checked:c.checked[d]??!1,disabled:c.disabled?.[d]??!1,onChange:f=>n(u,d,f.target.checked)});return s.jsxs("div",{className:Q.twMerge("bg-white border border-surface-3 rounded-8 w-full overflow-hidden px-6",a),...i,children:[s.jsxs("div",{className:"hidden sm:grid gap-x-6",style:{gridTemplateColumns:o},children:[s.jsx("div",{className:"flex items-center py-6",children:e&&s.jsx("h3",{className:"text-base text-high-em font-normal",children:e})}),t.map(c=>s.jsx("div",{className:"flex items-center justify-center py-6 text-base text-med-em",children:c},c)),s.jsx("div",{className:"col-span-full",children:s.jsx(fe,{})}),r.map((c,u)=>s.jsxs(S.default.Fragment,{children:[s.jsx("div",{className:"flex items-center py-5",children:s.jsx("span",{className:"text-sm text-high-em",children:c.label})}),t.map((d,f)=>s.jsx("div",{className:"flex items-center justify-center py-5",children:l(c,u,f)},f)),u<r.length-1&&s.jsx("div",{className:"col-span-full",children:s.jsx(fe,{})})]},u))]}),s.jsxs("div",{className:"flex flex-col sm:hidden",children:[e&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"py-6",children:s.jsx("h3",{className:"text-base text-high-em font-normal",children:e})}),s.jsx(fe,{})]}),r.map((c,u)=>s.jsxs(S.default.Fragment,{children:[s.jsxs("div",{className:"flex flex-col gap-4 py-5",children:[s.jsx("span",{className:"text-sm text-high-em",children:c.label}),s.jsx("div",{className:"flex flex-col gap-3",children:t.map((d,f)=>s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-med-em",children:d}),l(c,u,f)]},f))})]}),u<r.length-1&&s.jsx(fe,{})]},u))]})]})},gg=({size:e=20,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:e,height:e,className:t,...r,children:[s.jsx("path",{fill:"currentColor",d:"M4 8H12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{fill:"currentColor",d:"M8 12V4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),vg=({size:e=20,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",fill:"none",width:e,height:e,className:t,...r,children:[s.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"}),s.jsx("path",{d:"M6 1V11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),J4=[[4],[2,2],[3,1],[1,3],[2,1,1],[1,2,1],[1,1,2],[1,1,1,1]];function eA(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function tA(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 GC=P.createContext(void 0);function ZC(){const e=P.useContext(GC);if(!e)throw new Error("Must be used inside DropLayoutPicker");return e}const Am=({children:e,value:t,onChange:r})=>{const[n,a]=P.useState(!1),i=P.useRef(null);return s.jsx(GC.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};Am.displayName="DropLayoutPicker";const _m=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=ZC();return S.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};_m.displayName="DropLayoutPickerTrigger";const km=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=ZC(),o=P.useRef(null),[l,c]=P.useState(null),u=Na({triggerRef:i,panelRef:o,enabled:t});return Qi({refs:[i,o],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u"?null:yn.createPortal(s.jsxs("div",{ref:o,className:O.clsx("bg-white rounded-xl border border-surface-3 flex flex-col","min-w-[280px]",e),style:u,children:[s.jsx("div",{className:"p-5",children:s.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Column Layout"})}),s.jsx("div",{className:"border-t border-surface-3"}),s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-4 gap-3",children:J4.map((d,f)=>{const h=eA(d,n),p=l===f;return s.jsx("div",{className:O.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:s.jsx("div",{className:"flex gap-0.5 h-full",children:d.map((v,x)=>s.jsx("div",{className:O.clsx("bg-info-accent-3 rounded-sm",tA(v))},x))})},f)})})})]}),document.body)};km.displayName="DropLayoutPickerContent";const Ji=({className:e,bodyClassName:t,disabled:r=!1,onMaximize:n,dragHandleProps:a,onGrid:i,onAdd:o,onCopy:l,onTrash:c,onAddWidget:u,layout:d,onLayoutChange:f,children:h,...p})=>{const[v,x]=P.useState(""),m=y=>{x(y),y==="grid"&&i?.(),y==="add"&&o?.(),y==="copy"&&l?.(),y==="trash"&&c?.()},g=d!==void 0&&f!==void 0,b=[...!g&&i?[{value:"grid",icon:s.jsx(vg,{size:12})}]:[],...o?[{value:"add",icon:s.jsx(gg,{size:12})}]:[]],w=[...l?[{value:"copy",icon:s.jsx(el,{size:12})}]:[],...c?[{value:"trash",icon:s.jsx(tl,{size:12})}]:[]],C=n||a||b.length>0||g;return s.jsxs("div",{className:O.clsx("relative flex flex-col border border-surface-3 w-full",e),...p,children:[s.jsxs("div",{className:"bg-surface-2 flex justify-between border-b border-surface-3 min-h-[28px]",children:[C&&s.jsxs("div",{className:"flex",children:[(n||a)&&s.jsx("button",{type:"button",className:O.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:s.jsx(Jo,{size:12})}),b.length>0&&s.jsx(xr,{options:b,value:v,onChange:m,size:"xs",variant:"secondary",disabled:r,buttonClassName:"rounded-none"}),g&&d&&f&&s.jsxs(Am,{value:d,onChange:f,children:[s.jsx(_m,{children:s.jsx("button",{type:"button",className:O.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:s.jsx(vg,{size:12})})}),s.jsx(km,{})]})]}),w.length>0&&s.jsx(xr,{options:w,value:v,onChange:m,size:"xs",variant:"secondary",disabled:r,buttonClassName:"rounded-none"})]}),s.jsxs("div",{className:O.clsx("flex flex-col p-4 gap-4 h-full",t),children:[s.jsx("div",{className:"flex flex-col gap-4",children:h}),u&&s.jsx("div",{className:"flex justify-center",children:s.jsx(W,{size:"sm",variant:"neutral",hierarchy:"secondary",icons:"only",leadingIcon:s.jsx(gg,{}),onClick:u})})]})]})},YC=e=>"grid-cols-4",XC=(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"}},rA=["maximize","grid","add","copy","trash","addWidget"],nA=["maximize","text-block","edit","copy","trash"],aA=({widget:e,index:t,columnId:r,sectionId:n,onWidgetAction:a,widgetActionSet:i,renderWidgetIcon:o})=>{const{attributes:l,listeners:c,setNodeRef:u,isDragging:d}=Ve.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 s.jsx("div",{ref:u,"data-vc-widget":e.id,style:{display:d?"none":void 0,cursor:"grab",touchAction:"none"},...l,...c,children:s.jsx(wl,{ref:f,title:e.title,description:e.description,icon:o?.(e)??s.jsx(ie,{}),onMaximize:h("maximize"),onTextBlock:h("text-block"),onEdit:h("edit"),onCopy:h("copy"),onTrash:h("trash")})})},iA=({widget:e,index:t,columnId:r,sectionId:n,onSectionAction:a,sectionActionSet:i,onColumnAction:o,onWidgetAction:l,widgetActionSet:c,renderWidgetIcon:u,onLayoutChange:d})=>{const{attributes:f,listeners:h,setNodeRef:p,isDragging:v}=Ve.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=YC(x.layout),g=w=>a&&i.has(w)?()=>a(w,x.id):void 0,b=x.columns.map(w=>`vc-col-${w.id}`);return s.jsx("div",{ref:p,"data-vc-widget":e.id,style:{display:v?"none":void 0,touchAction:"none"},...f,children:s.jsx(Ji,{bodyClassName:"bg-white",onMaximize:g("maximize"),dragHandleProps:h,onGrid:g("grid"),onAdd:g("add"),onCopy:g("copy"),onTrash:g("trash"),layout:d?x.layout:void 0,onLayoutChange:d?w=>d(x.id,w):void 0,children:s.jsx(Ve.SortableContext,{items:b,strategy:Ve.horizontalListSortingStrategy,children:s.jsx("div",{className:O.clsx("grid gap-4",m),children:x.columns.map((w,C)=>{const y=XC(x.layout,C);return s.jsx(QC,{column:w,sectionId:x.id,sectionLayout:x.layout,columnSpan:y,onColumnAction:o,onWidgetAction:l,widgetActionSet:c,renderWidgetIcon:u,onSectionAction:a,sectionActionSet:i,onLayoutChange:d},w.id)})})})})})},QC=({column:e,sectionId:t,sectionLayout:r,columnSpan:n,onColumnAction:a,onWidgetAction:i,widgetActionSet:o,renderWidgetIcon:l,onSectionAction:c,sectionActionSet:u,onLayoutChange:d})=>{const{setNodeRef:f,listeners:h,attributes:p,transform:v,isDragging:x}=Ve.useSortable({id:`vc-col-${e.id}`,data:{type:"vc-column",columnId:e.id,sectionId:t},animateLayoutChanges:()=>!1}),[m,g]=P.useState(!1),[b,w]=P.useState(null);Be.useDndMonitor({onDragOver(A){const k=A.over?.data.current??{},I=k.columnId===e.id;g(I),w(I&&typeof k.widgetIndex=="number"?k.widgetIndex:null)},onDragEnd(){g(!1),w(null)},onDragCancel(){g(!1),w(null)}});const C=m,y=A=>a?()=>a(A,e.id,t):void 0,j=[...e.widgets].sort((A,k)=>A.position-k.position),N=j.map(A=>`vc-widget-${A.id}`);return s.jsxs("div",{ref:f,"data-droppable-id":`vc-col-${e.id}`,...p,style:{transform:Yo.CSS.Translate.toString(v),transition:x?"none":"transform 150ms ease",opacity:x?0:1},className:O.clsx(n,"flex flex-col",r.length>1&&"border border-surface-3"),children:[r.length>1&&s.jsx(cm,{onDrag:y("drag"),dragHandleProps:h,onDuplicate:y("duplicate"),onDelete:y("delete")}),s.jsxs("div",{className:O.clsx("flex flex-col gap-4 p-4","min-h-[200px]","bg-white"),children:[s.jsxs(Ve.SortableContext,{items:N,strategy:Ve.verticalListSortingStrategy,children:[j.map((A,k)=>s.jsxs(S.default.Fragment,{children:[C&&b===k&&s.jsx(Gn,{}),A.type==="nested-row"?s.jsx(iA,{widget:A,index:k,columnId:e.id,sectionId:t,onSectionAction:c,sectionActionSet:u,onColumnAction:a,onWidgetAction:i,widgetActionSet:o,renderWidgetIcon:l,onLayoutChange:d}):s.jsx(aA,{widget:A,index:k,columnId:e.id,sectionId:t,onWidgetAction:i,widgetActionSet:o,renderWidgetIcon:l})]},A.id)),C&&(b===null||b>=j.length)&&s.jsx(Gn,{})]}),!C&&(j.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:y("drag")})}):s.jsx("div",{className:"flex items-center justify-center pt-2",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:y("drag")})}))]})]})},sA=({emptyStateDescription:e})=>{const{setNodeRef:t,isOver:r}=Be.useDroppable({id:"vc-empty-state",data:{isEmpty:!0}});return s.jsx("div",{ref:t,className:"w-64",children:s.jsx(Ji,{bodyClassName:O.clsx("bg-white",r&&"!bg-surface-1"),disabled:!0,onMaximize:()=>{},onGrid:()=>{},onAdd:()=>{},onCopy:()=>{},onTrash:()=>{},onAddWidget:()=>{},children:s.jsx(ht,{flat:!0,description:e,className:"bg-transparent"})})})},oA=()=>{const{setNodeRef:e}=Be.useDroppable({id:"vc-new-row",data:{isNewRow:!0}});return s.jsx("div",{ref:e,className:"mt-4 min-h-[0px]"})},lA=({onWidgetDrop:e,onColumnReorder:t,onSectionReorder:r})=>(Be.useDndMonitor({onDragEnd(n){const{active:a,over:i}=n;if(!i?.id||typeof i.id!="string")return;const o=i.id,l=i.data.current??{},c=a.data.current??{};if(c.type==="vc-column"){let u;o.startsWith("vc-col-")?u=o.replace("vc-col-",""):o.startsWith("vc-widget-")&&(u=l.columnId),t&&u&&u!==c.columnId&&t(c.columnId,c.sectionId,u);return}if(c.type==="vc-section"){r&&o&&!o.startsWith("vc-")&&r(c.sectionId,o);return}if(o==="vc-empty-state")e?.("__empty__","__empty__",0,c);else if(o==="vc-new-row")e?.("__new_row__","__new_row__",-1,c);else if(o.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(o.startsWith("vc-col-")){const{columnId:u,sectionId:d}=l;u&&d&&e?.(u,d,-1,c)}}}),null),cA=({section:e,sectionActionSet:t,widgetActionSet:r,onSectionAction:n,onColumnAction:a,onWidgetAction:i,renderWidgetIcon:o,onWidgetDrop:l,onLayoutChange:c})=>{const{setNodeRef:u,listeners:d,attributes:f,transform:h,isDragging:p}=Ve.useSortable({id:e.id,data:{type:"vc-section",sectionId:e.id},animateLayoutChanges:()=>!1}),v=YC(e.layout),x=g=>n&&t.has(g)?()=>n(g,e.id):void 0,m=e.columns.map(g=>`vc-col-${g.id}`);return s.jsx("div",{ref:u,...f,style:{transform:Yo.CSS.Translate.toString(h),transition:p?"none":"transform 150ms ease",opacity:p?0:1},children:s.jsx(Ji,{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?g=>c(e.id,g):void 0,children:s.jsx(Ve.SortableContext,{items:m,strategy:Ve.horizontalListSortingStrategy,children:s.jsx("div",{className:O.clsx("grid gap-4",v),children:e.columns.map((g,b)=>{const w=XC(e.layout,b);return l?s.jsx(QC,{column:g,sectionId:e.id,sectionLayout:e.layout,columnSpan:w,onColumnAction:a,onWidgetAction:i,widgetActionSet:r,renderWidgetIcon:o,onSectionAction:n,sectionActionSet:t,onLayoutChange:c},g.id):s.jsxs("div",{"data-droppable-id":`vc-col-${g.id}`,className:O.clsx(w,"flex flex-col",e.layout.length>1&&"border border-surface-3"),children:[e.layout.length>1&&s.jsx(cm,{onDrag:a?()=>a("drag",g.id,e.id):void 0,onDuplicate:a?()=>a("duplicate",g.id,e.id):void 0,onDelete:a?()=>a("delete",g.id,e.id):void 0}),s.jsxs("div",{className:"flex flex-col gap-4 p-4 min-h-[120px] bg-white",children:[g.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 s.jsx(wl,{title:C.title,description:C.description,icon:o?.(C)??s.jsx(ie,{}),onMaximize:y("maximize"),onTextBlock:y("text-block"),onEdit:y("edit"),onCopy:y("copy"),onTrash:y("trash")},C.id)}),g.widgets.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:a?()=>a("drag",g.id,e.id):void 0})}):s.jsx("div",{className:"flex items-center justify-center pt-2",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:a?()=>a("drag",g.id,e.id):void 0})})]})]},g.id)})})})})})},uA=({className:e,data:t,emptyStateDescription:r="No sections yet",onSectionAction:n,sectionActions:a,onColumnAction:i,onWidgetAction:o,widgetActions:l,renderWidgetIcon:c,onWidgetDrop:u,onLayoutChange:d,onColumnReorder:f,onSectionReorder:h,...p})=>{const v=[...t?.sections??[]].sort((b,w)=>b.position-w.position),x=new Set(n?a??rA:[]),m=new Set(o?l??nA:[]),g=v.map(b=>b.id);return s.jsxs("div",{className:O.clsx("flex flex-col w-full h-full",e),...p,children:[(u||f||h)&&s.jsx(lA,{onWidgetDrop:u,onColumnReorder:f,onSectionReorder:h}),s.jsx("div",{className:O.clsx("flex-1 bg-surface-bg",v.length===0?"flex items-center justify-center p-8":"flex flex-col gap-4 p-8"),children:v.length===0?u?s.jsx(sA,{emptyStateDescription:r}):s.jsx("div",{className:"w-64",children:s.jsx(Ji,{bodyClassName:"bg-white",disabled:!0,onMaximize:()=>{},onGrid:()=>{},onAdd:()=>{},onCopy:()=>{},onTrash:()=>{},onAddWidget:()=>{},children:s.jsx(ht,{flat:!0,description:r,className:"bg-transparent"})})}):s.jsxs(s.Fragment,{children:[s.jsx(Ve.SortableContext,{items:g,strategy:Ve.verticalListSortingStrategy,children:v.map(b=>s.jsx(cA,{section:b,sectionActionSet:x,widgetActionSet:m,onSectionAction:n,onColumnAction:i,onWidgetAction:o,renderWidgetIcon:c,onWidgetDrop:u,onLayoutChange:d,onColumnReorder:f},b.id))}),u&&s.jsx(oA,{})]})})]})},dA=e=>{const t=Be.pointerWithin(e);if(t.length===0)return Be.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},o=[...t].sort((c,u)=>i(c)-i(u))[0];if(String(o.id).startsWith("vc-col-")&&a){const c=o.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[o]},Ls=2;function fA(e,t,r,n){const a=e%Ls,i=Math.floor(e/Ls),o=t!==null&&a<=t.colIdx&&i<=t.rowIdx,l=a<r&&i<n;return{colIdx:a,rowIdx:i,isHovered:o,isActive:l}}function hA(e,t){return O.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 pA(){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 JC=P.createContext(void 0);function e3(){const e=P.useContext(JC);if(!e)throw new Error("Must be used inside DropSizePicker");return e}const yg=({value:e,onChange:t})=>{const[r,n]=P.useState(!1),a=P.useRef(null);return P.useEffect(()=>{if(!r)return;const i=o=>{a.current?.contains(o.target)||n(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[r]),s.jsxs("div",{ref:a,className:"flex-1 relative",children:[s.jsxs("button",{type:"button",onClick:()=>n(i=>!i),className:O.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:[s.jsx("span",{className:"flex-1 text-sm font-medium text-med-em text-left",children:e}),s.jsx("span",{className:"text-med-em flex items-center shrink-0",children:r?s.jsx(B.ArrowUp2,{size:16,color:"currentColor"}):s.jsx(B.ArrowDown2,{size:16,color:"currentColor"})})]}),r&&s.jsx(Ht,{floating:!0,size:"sm",items:pA().map(i=>({...i,className:"!min-w-0",onSelect:()=>{t(Number(i.id)),n(!1)}})),selectedIds:[String(e)],className:"w-full top-full mt-1"})]})},t3=({value:e,onChange:t})=>{const[r,n]=P.useState(null),{cols:a,rows:i}=e;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3 p-5",children:[s.jsx("span",{className:"text-med-em flex items-center shrink-0",children:s.jsx(B.RowHorizontal,{size:16,color:"currentColor"})}),s.jsx(yg,{value:a,onChange:o=>t({cols:o,rows:i})})]}),s.jsxs("div",{className:"flex items-center gap-3 p-5",children:[s.jsx("span",{className:"text-med-em flex items-center shrink-0",children:s.jsx(B.RowVertical,{size:16,color:"currentColor"})}),s.jsx(yg,{value:i,onChange:o=>t({cols:a,rows:o})})]}),s.jsx("div",{className:"border-t border-surface-3"}),s.jsx("div",{className:"p-5 flex justify-center",children:s.jsx("div",{className:"grid grid-cols-2 gap-3",children:Array.from({length:Ls*Ls},(o,l)=>{const{colIdx:c,rowIdx:u,isHovered:d,isActive:f}=fA(l,r,a,i);return s.jsx("div",{className:hA(d,f),onMouseEnter:()=>n({colIdx:c,rowIdx:u}),onMouseLeave:()=>n(null),onClick:()=>t({cols:c+1,rows:u+1})},l)})})})]})},Tm=({children:e,value:t,onChange:r})=>{const[n,a]=P.useState(!1),i=P.useRef(null);return s.jsx(JC.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};Tm.displayName="DropSizePicker";const Em=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=e3();return S.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};Em.displayName="DropSizePickerTrigger";const Im=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=e3(),o=P.useRef(null),l=Na({triggerRef:i,panelRef:o,enabled:t});return Qi({refs:[i,o],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u"?null:yn.createPortal(s.jsxs("div",{ref:o,className:O.clsx("bg-white rounded-xl border border-surface-3 flex flex-col","min-w-[200px]",e),style:l,children:[s.jsx("div",{className:"p-5",children:s.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Size"})}),s.jsx("div",{className:"border-t border-surface-3"}),s.jsx(t3,{value:n,onChange:a})]}),document.body)};Im.displayName="DropSizePickerContent";const r3=({value:e,onChange:t,className:r,showTitle:n=!0})=>s.jsxs("div",{className:O.clsx("flex flex-col",r),children:[n&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"p-5",children:s.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Size"})}),s.jsx("div",{className:"border-t border-surface-3"})]}),s.jsx(t3,{value:e,onChange:t})]});r3.displayName="SizePicker";const mA={1:"w-[400px] h-[400px]","2h":"w-[825px] h-[400px]","2w":"w-[400px] h-[825px]",4:"w-[825px] h-[825px]"},Cn=({size:e="1",title:t,actions:r,children:n,className:a,classNameHeader:i,classNameBody:o,clipBody:l=!1})=>{const c=t||r;return s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-col bg-white border border-surface-3 rounded-6",mA[e]),a),children:[c&&s.jsxs("div",{className:Q.twMerge(O.clsx("flex items-center justify-between p-8 border-b border-surface-3"),i),children:[t&&s.jsx("h3",{className:"text-med-em font-semibold text-xl",children:t}),r&&s.jsx("div",{className:"flex items-center gap-4",children:r})]}),s.jsx("div",{className:Q.twMerge(O.clsx("flex-1 p-8 overflow-auto",l&&"overflow-hidden"),o),children:n})]})},xA=({mode:e,title:t,actions:r,onSubmit:n,onSettings:a,className:i,texts:o})=>{const[l,c]=P.useState(""),[u,d]=P.useState(""),[f,h]=P.useState(""),[p,v]=P.useState(""),[x,m]=P.useState(!1),[g,b]=P.useState(!1),w=e==="signup",C=o?.heading??"¡Automatiza!",y=o?.subheading??"Vende y gestiona con inteligencia",j=o?.namePlaceholder??"Nombre",N=o?.emailPlaceholder??"Correo",A=o?.passwordPlaceholder??(w?"Nueva contraseña":"Contraseña"),k=o?.confirmPasswordPlaceholder??"Confirmar contraseña",I=o?.submitLabel??"Continuar",_=E=>{E.preventDefault();const T={email:u,password:f,...w&&{name:l,confirmPassword:p}};n?.(T)};return s.jsx(Cn,{size:"1",className:i,title:t??(w?"Regístrarse":"Iniciar sesión"),actions:r===null?void 0:r??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:a}),children:s.jsxs("form",{onSubmit:_,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[!w&&s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:C}),s.jsx("span",{className:"text-high-em text-md self-center",children:y})]}),w&&s.jsx(me,{type:"text",name:"name",autoComplete:"name",value:l,onChange:E=>c(E.target.value),placeholder:j,required:!0}),s.jsx(me,{type:"email",name:"email",autoComplete:"email",value:u,onChange:E=>d(E.target.value),placeholder:N,required:!0}),s.jsx(me,{type:x?"text":"password",name:"password",autoComplete:w?"new-password":"current-password",value:f,onChange:E=>h(E.target.value),placeholder:A,trailingIcon:s.jsx(ie,{children:x?s.jsx(B.Eye,{onClick:()=>m(!1),className:"cursor-pointer"}):s.jsx(B.EyeSlash,{onClick:()=>m(!0),className:"cursor-pointer"})}),required:!0}),w&&s.jsx(me,{type:g?"text":"password",name:"confirmPassword",autoComplete:"new-password",value:p,onChange:E=>v(E.target.value),placeholder:k,trailingIcon:s.jsx(ie,{children:g?s.jsx(B.Eye,{onClick:()=>b(!1),className:"cursor-pointer"}):s.jsx(B.EyeSlash,{onClick:()=>b(!0),className:"cursor-pointer"})}),required:!0}),s.jsx(W,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:I})]})})},gA=({title:e="Recuperación",actions:t,step:r,type:n="password",onSubmit:a,onBackToLogin:i,onSettings:o,className:l,texts:c})=>{const[u,d]=P.useState(""),f=C=>{C.preventDefault(),a?.(u)},h=r==="email",p=n==="account",v=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"),g=c?.submitLabel??"Continuar",b=c?.backToLoginPrompt??"¿Todo bien? ",w=c?.backToLoginLabel??"Iniciar sesión";return s.jsx(Cn,{size:"1",className:l,title:e,actions:t===null?void 0:t??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:o}),children:s.jsxs("form",{onSubmit:f,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[s.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:v}),s.jsx(me,{type:h?"email":"text",value:u,onChange:C=>d(C.target.value),placeholder:x,hint:m,required:!0}),s.jsx(W,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:g}),s.jsxs("div",{className:"text-center text-sm gap-4",children:[s.jsx("span",{className:"text-med-em text-sm font-semibold",children:b}),s.jsx(gr,{onClick:i,size:"sm",variant:"info",className:"cursor-pointer font-semibold",children:w})]})]})})},vA=({title:e="Recuperación",actions:t,onSubmit:r,onBackToLogin:n,onSettings:a,className:i,texts:o})=>{const[l,c]=P.useState(""),[u,d]=P.useState(""),[f,h]=P.useState(!1),[p,v]=P.useState(!1),x=o?.heading??"Cambiar contraseña",m=o?.passwordPlaceholder??"Nueva contraseña",g=o?.confirmPasswordPlaceholder??"Confirmar contraseña",b=o?.submitLabel??"Continuar",w=o?.backToLoginPrompt??"¿Todo bien? ",C=o?.backToLoginLabel??"Iniciar sesión",y=j=>{j.preventDefault(),r?.(l,u)};return s.jsx(Cn,{size:"1",className:i,title:e,actions:t===null?void 0:t??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:a}),children:s.jsxs("form",{onSubmit:y,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[s.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:x}),s.jsx(me,{type:f?"text":"password",value:l,onChange:j=>c(j.target.value),placeholder:m,trailingIcon:s.jsx(ie,{children:f?s.jsx(B.Eye,{onClick:()=>h(!1),className:"cursor-pointer"}):s.jsx(B.EyeSlash,{onClick:()=>h(!0),className:"cursor-pointer"})}),required:!0}),s.jsx(me,{type:p?"text":"password",value:u,onChange:j=>d(j.target.value),placeholder:g,trailingIcon:s.jsx(ie,{children:p?s.jsx(B.Eye,{onClick:()=>v(!1),className:"cursor-pointer"}):s.jsx(B.EyeSlash,{onClick:()=>v(!0),className:"cursor-pointer"})}),required:!0}),s.jsx(W,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:b}),s.jsxs("div",{className:"text-center text-sm gap-4",children:[s.jsx("span",{className:"text-med-em text-sm font-semibold",children:w}),s.jsx(gr,{onClick:n,size:"md",variant:"info",className:"cursor-pointer font-semibold",children:C})]})]})})},yA=({title:e="Autenticación",actions:t,onRecover:r,onSettings:n,className:a,texts:i})=>{const o=i?.prompt??"¿Olvidaste tu contraseña?",l=i?.recoverLabel??"Recuperar";return s.jsx(Cn,{size:"1",className:a,title:e,actions:t===null?void 0:t??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:n}),children:s.jsxs("div",{className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[s.jsx("span",{className:"text-med-em text-md self-center font-semibold",children:o}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"lg",onClick:r,className:"w-full",children:l})]})})},bA=({title:e="Autenticación",actions:t,onGoogleSignIn:r,onAppleSignIn:n,onAction:a,onSettings:i,actionPrompt:o="¿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 s.jsx(Cn,{size:"1",className:c,title:e,actions:t===null?void 0:t??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:i}),children:s.jsxs("div",{className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"lg",icons:"leading",leadingIcon:s.jsx(ie,{children:s.jsx(B.Google,{})}),onClick:r,className:"w-full",children:d}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"lg",icons:"leading",leadingIcon:s.jsx(ie,{children:s.jsx(B.Apple,{})}),onClick:n,children:f}),s.jsx(fe,{}),s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx("span",{className:"text-med-em text-md font-semibold text-center",children:o}),s.jsx(W,{variant:"secondary",hierarchy:"primary",size:"lg",onClick:a,className:"w-full",children:l})]})]})})},wA=({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)},o=(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 s.jsx("div",{className:"flex gap-3 justify-center",children:r.map((c,u)=>s.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=>o(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))})},jA=({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:o,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 s.jsxs(Cn,{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??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:c}),children:[s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:t}),s.jsx("span",{className:"text-high-em text-md self-center text-center",children:r})]}),s.jsx(wA,{length:n,onComplete:i}),s.jsx(W,{type:"button",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",onClick:o,children:f}),s.jsxs("div",{className:"text-center",children:[s.jsx("span",{className:"text-med-em text-sm font-semibold",children:h}),s.jsx(gr,{onClick:l,size:"md",variant:"info",className:"cursor-pointer font-semibold",children:p})]})]})},Mm=({title:e="Module",onSettingsClick:t,className:r,showSettings:n=!0})=>s.jsx("div",{className:O.clsx("drag-handle px-6 py-4 border-b border-surface-3 bg-surface-1 cursor-move rounded-t-xl",r),children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex gap-5 items-center",children:[s.jsx(B.Grid5,{size:24,color:"var(--high-em)"}),s.jsx("h2",{className:"text-[16px] font-semibold text-med-em flex-1 text-center",children:e})]}),n&&s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("button",{onClick:t,className:"p-1 hover:bg-surface-2 rounded transition-colors","aria-label":"Configure module",type:"button",children:s.jsx(B.Setting,{size:24,color:"var(--high-em)"})})})]})}),n3=({title:e="Module",onSettingsClick:t,showSettings:r=!0,children:n,className:a,minWidth:i=300,maxWidth:o=300,emptyState:l})=>{const c=S.default.Children.count(n)>0;return s.jsxs("div",{className:O.clsx("bg-white rounded-xl border border-surface-3 overflow-hidden",a),style:{minWidth:`${i}px`,maxWidth:`${o}px`},children:[s.jsx(Mm,{title:e,onSettingsClick:t,showSettings:r}),s.jsx("div",{className:"overflow-hidden",style:{minHeight:"200px"},children:c?n:l})]})};Mm.displayName="ModuleCardHeader";n3.displayName="ModuleCard";const a3=S.default.forwardRef(({type:e,label:t="New Field",description:r="Description",isSelected:n=!1,isLast:a=!1,onClick:i,onDelete:o,showActions:l=!0,className:c,dragHandleProps:u,innerRef:d,style:f},h)=>{const[p,v]=S.default.useState(!1),x=p&&l,m=d||h;return s.jsxs("div",{ref:m,style:f,className:O.clsx("relative",c),children:[s.jsx("div",{onClick:i,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:O.clsx("w-full text-left m-0 cursor-pointer overflow-hidden",n?"bg-surface-3":"hover:bg-surface-1"),children:s.jsx("div",{className:"pr-6",children:s.jsxs("div",{className:"flex justify-between items-center overflow-hidden min-h-[60px]",children:[s.jsxs("div",{className:"flex min-w-0 flex-1 justify-start items-stretch self-stretch",children:[s.jsx("div",{className:"self-stretch flex overflow-hidden transition-all duration-200 ease-out",style:{width:x?"30px":"0px",opacity:x?1:0},children:s.jsxs("div",{onClick:g=>g.stopPropagation(),className:"flex flex-col w-[30px] h-full shrink-0",children:[s.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:s.jsx(B.HambergerMenu,{size:17,color:"var(--high-em)"})}),o&&s.jsx("button",{type:"button",onClick:g=>{g.stopPropagation(),o()},className:"flex flex-1 items-center justify-center hover:bg-surface-2 transition-colors","aria-label":"Delete field",children:s.jsx(B.Trash,{size:17,color:"var(--high-em)",variant:"Linear"})})]})}),s.jsxs("div",{className:"flex min-w-0 flex-col justify-center transition-all duration-200 ease-out",style:{paddingLeft:x?"0px":"24px"},children:[s.jsx("div",{className:"truncate text-[16px] font-semibold text-med-em",children:e}),s.jsx("div",{className:"truncate text-[10px] font-medium tracking-wide mb-1 text-low-em",children:r})]})]}),s.jsx("div",{className:"shrink-0 max-w-[45%] truncate pl-4 text-sm font-medium text-low-em",children:t})]})})}),!a&&s.jsx("div",{className:"border-b border-surface-3"})]})});a3.displayName="ModuleFieldItem";const i3=({title:e="Módulos",items:t=[],className:r,onExportClick:n,minWidth:a=250,maxWidth:i=300,opacity:o=.7})=>s.jsxs("div",{className:O.clsx("bg-white rounded-xl border border-surface-3 overflow-hidden",r),style:{minWidth:`${a}px`,maxWidth:`${i}px`,opacity:o},children:[s.jsx("div",{className:"px-6 py-4 border-b border-surface-3 bg-surface-2 rounded-t-xl",children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex gap-5 items-center",children:[s.jsx(B.Grid5,{size:24,color:"var(--low-em)"}),s.jsx("h2",{className:"text-xl font-semibold text-low-em flex-1 text-center",children:e})]}),n&&s.jsx("button",{type:"button",onClick:n,className:"hover:bg-surface-3 rounded p-1 transition-colors","aria-label":"Export data",children:s.jsx(B.ExportSquare,{size:24,color:"var(--low-em)"})})]})}),s.jsxs("div",{className:"max-h-[600px] overflow-y-auto overflow-x-hidden",children:[t.map((l,c)=>{const u=c===t.length-1;return s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-full text-left transition-all duration-200 m-0 cursor-not-allowed",children:s.jsx("div",{className:"my-6 mx-8",children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex justify-start gap-5 items-center",children:[s.jsx(B.HambergerMenu,{size:20,color:"var(--low-em)"}),s.jsx(B.Component,{size:20,color:"var(--low-em)"}),s.jsx("div",{className:"text-xs font-semibold tracking-wide mb-1 text-low-em",children:l.type})]}),s.jsx("div",{className:"text-sm font-medium truncate text-low-em",children:l.label})]})})}),!u&&s.jsx("div",{className:"border-b border-surface-3"})]},l.id)}),t.length===0&&s.jsx("div",{className:"py-12 px-8 flex items-center justify-center",children:s.jsx("p",{className:"text-sm text-low-em text-center",children:"No related data"})})]})]});i3.displayName="RelatedDataCard";const CA=({widgetCount:e,visibleCount:t,icon:r,tooltipContent:n})=>s.jsx("div",{className:"border-b border-gray-200",children:s.jsxs("div",{className:"p-8 flex items-center justify-between",children:[s.jsxs("span",{className:" font-semibold text-sm text-dark-100",style:{fontFamily:"var(--font-space-grotesk)"},children:["Widgets (",e,")"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:O.clsx("text-sm font-semibold",t===0?"text-low-em":"text-success-main"),children:[t," visible"]}),r&&n&&s.jsx(Oa,{content:n,side:"bottom",children:s.jsx("div",{children:r})}),r&&!n&&r]})]})}),SA=({value:e,onChange:t,placeholder:r})=>s.jsx("div",{className:"p-8 flex flex-col gap-4 ",children:s.jsx(me,{type:"search",placeholder:r||"Search",value:e,onChange:t,trailingIcon:s.jsx(B.SearchNormal1,{size:16,color:"currentColor"})})}),NA=({items:e,searchPlaceholder:t="Search",showSearch:r=!0,headerIcon:n,headerTooltip:a,onItemClick:i,className:o,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,v=e.filter(m=>m.isVisible).length,x=m=>{i?.(m)};return s.jsx(Ct.Provider,{delayDuration:200,children:s.jsxs("div",{className:O.clsx("h-full w-full flex flex-col",c,u,o),children:[s.jsx(CA,{widgetCount:p,visibleCount:v,icon:n,tooltipContent:a}),r&&s.jsx(SA,{value:d,onChange:m=>f(m.target.value),placeholder:t}),s.jsx(fe,{}),s.jsx("div",{className:"flex-1 overflow-y-auto p-8 flex flex-col gap-8",children:h.length>0?h.map(m=>s.jsx(vt,{title:m.title,description:m.description,leadingIcon:s.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:O.clsx(m.isSelected&&"bg-surface-2"),className:O.clsx("py-6 rounded-xl",m.isSelected&&"border border-surface-3",m.isVisible&&"border border-surface-3",l),onClick:()=>x(m)},m.id)):s.jsxs("div",{className:"flex flex-col items-center justify-center p-10 text-center gap-10",children:[s.jsx(ie,{size:"lg",children:s.jsx(B.Box2,{})}),s.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"})]})})]})})},OA={paid:"success",pending:"warning",overdue:"danger",cancelled:"surface"},bg=({label:e,value:t})=>s.jsxs("div",{className:"flex flex-row",children:[s.jsx("span",{className:"text-low-em text-base w-[110px] shrink-0",children:e}),s.jsx("span",{className:"text-high-em text-base font-bold",children:t})]}),PA=({title:e,status:t,fields:r,onMenuClick:n,className:a})=>{const i=t.charAt(0).toUpperCase()+t.slice(1),o=Math.ceil(r.length/2),l=r.slice(0,o),c=r.slice(o);return s.jsxs("div",{className:O.clsx("bg-white border border-surface-3 rounded-2xl p-10 flex flex-col gap-8",a),children:[s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-8",children:[s.jsx("span",{className:"text-high-em font-semibold text-xl",children:e}),s.jsx(Ye,{theme:OA[t],variant:"simple",size:"lg",children:i})]}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(B.More,{variant:"Linear"}),onClick:n})]}),s.jsx("span",{className:"text-med-em text-sm -mt-2",children:"Summary"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[s.jsx("div",{className:"flex flex-col gap-8",children:l.map(u=>s.jsx(bg,{...u},u.label))}),s.jsx("div",{className:"flex flex-col gap-8",children:c.map(u=>s.jsx(bg,{...u},u.label))})]})]})},AA=e=>s.jsx(it,{size:12}),s3=({item:e,onTitleChange:t,onDataSourceChange:r,onDelete:n,onDragStart:a,onDragOver:i,onDrop:o,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 s.jsxs("div",{draggable:!0,onDragStart:a,onDragOver:h=>{h.preventDefault(),i?.(h)},onDrop:o,onDragEnd:l,className:O.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:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{size:"md",children:s.jsx(B.HambergerMenu,{})}),className:"cursor-grab active:cursor-grabbing shrink-0 text-disabled","aria-label":"Drag to reorder"}),(u==="both"||u==="input")&&s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(me,{type:"text",label:"Title",placeholder:"Column title",value:e.title,onChange:h=>t(h.target.value)})}),(u==="both"||u==="dropdown")&&s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Te,{label:"Data source",placeholder:"Select",value:e.dataSource,showLeadingIcon:!1,menuSize:"sm",items:f,onChange:r})}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(AA,{}),className:"shrink-0","aria-label":"Delete row",onClick:n})]})},_A=({title:e,contextMenu:t,backButton:r,onAction:n})=>{const[a,i]=P.useState(!1),o=P.useRef(null),l=t&&t.length>0;return P.useEffect(()=>{if(!a)return;const c=u=>{o.current&&!o.current.contains(u.target)&&i(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[a]),s.jsx(Nm,{title:e,backButton:r,actions:l?s.jsxs("div",{ref:o,className:"relative",children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(B.More,{size:16}),"aria-label":"More options",onClick:()=>i(c=>!c)}),a&&s.jsx(Ht,{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})},kA=({field:e,onChange:t})=>s.jsx(me,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value),type:"text"}),TA=({field:e,onChange:t})=>s.jsx(bl,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value)}),jl=e=>e.map(t=>({id:t.id,title:t.label,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1})),EA=({field:e,onChange:t})=>s.jsx(Te,{menuSize:"sm",label:e.label,placeholder:e.placeholder,value:e.value??"",showLeadingIcon:!1,items:jl(e.options??[]),onChange:t}),IA=({field:e,onChange:t})=>s.jsxs("div",{className:"flex items-center justify-between gap-4 py-1",children:[e.label&&s.jsx("span",{className:"text-sm font-semibold text-high-em flex-1",children:e.label}),s.jsx(Pa,{size:"small",checked:e.value??!1,onChange:r=>t(r.target.checked)})]}),MA=({field:e,onChange:t})=>{const r=e.dropdowns??[],n=(a,i)=>{t(r.map((o,l)=>l===a?{...o,value:i}:o))};return s.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&s.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),s.jsx("div",{className:"flex gap-6",children:r.map((a,i)=>s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Te,{menuSize:"sm",label:e.showLabels!==!1?a.label:void 0,placeholder:a.placeholder,value:a.value??"",showLeadingIcon:!1,items:jl(a.options),onChange:o=>n(i,o)})},a.id))})]})},$A=({field:e,onAction:t})=>{const r=e.items??[],[n,a]=P.useState(null),i=P.useRef(new Map),o=P.useRef(null);return s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[e.label&&s.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),e.addAction&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(B.Add,{size:14}),"aria-label":"Add item",onClick:()=>t?.(e.addAction)})]}),r.length>0&&s.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&&(o.current=i.current.get(l.id)??null),s.jsx(vt,{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?s.jsxs("div",{ref:d=>{i.current.set(l.id,d)},className:"relative",onMouseDown:d=>d.stopPropagation(),children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(B.More,{size:14}),"aria-label":"Item options",onClick:()=>a(u?null:l.id)}),u&&s.jsx(Ht,{triggerRef:o,size:"xs",items:c,className:"min-w-[160px]",onClose:()=>a(null)})]}):void 0,className:"rounded-none"},l.id)})})]})},RA=({field:e,onChange:t,onAction:r})=>{const n=e.items??[],a=P.useRef(null),[i,o]=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 s.jsxs("div",{className:"flex flex-col gap-6",children:[e.label&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),e.addAction&&s.jsx(W,{variant:"neutral",hierarchy:"tertiary",size:"xs",icons:"leading",leadingIcon:s.jsx(B.Add,{}),onClick:()=>r?.(e.addAction),children:"Add"})]}),s.jsx("div",{className:"flex flex-col gap-6",children:n.map(u=>s.jsx(s3,{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&&o(u.id)},onDrop:()=>{if(!a.current||a.current===u.id){a.current=null,o(null);return}r?.(`reorder:${a.current}:${u.id}`),a.current=null,o(null)},onDragEnd:()=>{a.current=null,o(null)}},u.id))})]})},LA=({field:e,onChange:t})=>{const r=e.value??{cols:1,rows:1};return s.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.label&&s.jsx("label",{className:"text-xs font-semibold text-med-em",children:e.label}),s.jsxs(Tm,{value:r,onChange:t,children:[s.jsx(Em,{children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",className:"w-full",children:e.placeholder??`${r.cols}×${r.rows}`})}),s.jsx(Im,{})]})]})},Se={showCheckbox:!1,showLeadingIcon:!1},o3=[{...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)"}],l3=Object.fromEntries(o3.map(e=>[e.id,e.title])),DA={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 zA(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 BA({handler:e,selected:t,incomplete:r,onClick:n}){const a=e.event.charAt(0).toUpperCase()+e.event.slice(1),i=r?"Incomplete selection":l3[e.action]??e.action;return s.jsx("div",{className:t?"rounded-md bg-surface-3":"",onClick:o=>n(o.currentTarget),children:s.jsx(vt,{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 s.jsxs("div",{className:"flex items-center gap-3 py-3",children:[s.jsx("span",{className:"w-28 shrink-0 text-xs text-med-em",children:e}),s.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 s.jsx(me,{...i,size:a,value:e??"",onChange:o=>t?.(o.target.value),placeholder:r,disabled:n,className:"font-mono"})}const FA=[{id:"ms",title:"ms",showCheckbox:!1,showLeadingIcon:!1},{id:"s",title:"s",showCheckbox:!1,showLeadingIcon:!1}];function qA({value:e,onChange:t}){return s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx("div",{className:"w-16 shrink-0",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:FA,value:e.unit,onChange:r=>t({...e,unit:r})})}),s.jsx(me,{size:"md",type:"number",value:String(e.value),onChange:r=>t({...e,value:Number(r.target.value)}),placeholder:"0"})]})}function WA({value:e,onChange:t}){return s.jsx(Te,{size:"md",showLeadingIcon:!1,items:o3,value:e,onChange:r=>t(r)})}const HA=[{...Se,id:"info",title:"Info"},{...Se,id:"success",title:"Success"},{...Se,id:"warning",title:"Warning"},{...Se,id:"error",title:"Error"}],VA=[{...Se,id:"csv",title:"CSV"},{...Se,id:"json",title:"JSON"}],wg=[{...Se,id:"",title:"No available methods"}];function Fe(e,t,r,n){t({...e,[r]:n})}function UA({action:e,config:t,onChange:r,availableQueries:n=[],availableComponents:a=[],availableApps:i=[],availablePages:o=[],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=o.map(p=>({...Se,id:p,title:p})),h=l.map(p=>({...Se,id:p,title:p}));switch(e){case"controlQuery":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Query",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:c.length?c:[{...Se,id:"",title:"— select —"}],value:String(t.query??""),onChange:p=>Fe(t,r,"query",p)})}),s.jsx(Ie,{label:"Method",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:wg,value:"",onChange:()=>{},disabled:!0})})]});case"controlComponent":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Component",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:u.length?u:[{...Se,id:"",title:"— select —"}],value:String(t.component??""),onChange:p=>Fe(t,r,"component",p)})}),s.jsx(Ie,{label:"Method",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:wg,value:"",onChange:()=>{},disabled:!0})})]});case"runScript":return s.jsx(Ie,{label:"Script",children:s.jsx(bl,{size:"md",value:String(t.script??""),onChange:p=>Fe(t,r,"script",p.target.value),placeholder:"// write your script here",resize:"vertical"})});case"goToApp":return s.jsx(Ie,{label:"App",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:d.length?d:[{...Se,id:"",title:"— select —"}],value:String(t.app??""),onChange:p=>Fe(t,r,"app",p)})});case"goToPage":return s.jsx(Ie,{label:"Page",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:f.length?f:[{...Se,id:"",title:"— select —"}],value:String(t.page??""),onChange:p=>Fe(t,r,"page",p)})});case"goToUrl":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"URL",children:s.jsx(Zr,{value:String(t.url??""),onChange:p=>Fe(t,r,"url",p),placeholder:"https://..."})}),s.jsx(Ie,{label:"New tab",children:s.jsx(Pa,{checked:!!t.newTab,onChange:p=>Fe(t,r,"newTab",p.target.checked)})})]});case"showNotification":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Title",children:s.jsx(me,{size:"md",value:String(t.title??""),onChange:p=>Fe(t,r,"title",p.target.value),placeholder:"Notification title"})}),s.jsx(Ie,{label:"Message",children:s.jsx(me,{size:"md",value:String(t.message??""),onChange:p=>Fe(t,r,"message",p.target.value),placeholder:"Message"})}),s.jsx(Ie,{label:"Type",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:HA,value:String(t.type??"info"),onChange:p=>Fe(t,r,"type",p)})}),s.jsx(Ie,{label:"Duration (ms)",children:s.jsx(me,{size:"md",type:"number",value:String(t.duration??3e3),onChange:p=>Fe(t,r,"duration",Number(p.target.value))})})]});case"setVariable":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Variable",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:h.length?h:[{...Se,id:"",title:"— select —"}],value:String(t.variable??""),onChange:p=>Fe(t,r,"variable",p)})}),s.jsx(Ie,{label:"Value",children:s.jsx(Zr,{value:String(t.value??""),onChange:p=>Fe(t,r,"value",p)})})]});case"setUrlParameters":return s.jsx(Ie,{label:"Params",children:s.jsx(Zr,{value:String(t.params??""),onChange:p=>Fe(t,r,"params",p),placeholder:"{{ { key: value } }}"})});case"setLocalStorage":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Key",children:s.jsx(me,{size:"md",value:String(t.key??""),onChange:p=>Fe(t,r,"key",p.target.value),placeholder:"storage_key"})}),s.jsx(Ie,{label:"Value",children:s.jsx(Zr,{value:String(t.value??""),onChange:p=>Fe(t,r,"value",p)})})]});case"copyToClipboard":return s.jsx(Ie,{label:"Value",children:s.jsx(Zr,{value:String(t.value??""),onChange:p=>Fe(t,r,"value",p)})});case"exportData":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Data",children:s.jsx(Zr,{value:String(t.data??""),onChange:p=>Fe(t,r,"data",p)})}),s.jsx(Ie,{label:"File name",children:s.jsx(me,{size:"md",value:String(t.fileName??""),onChange:p=>Fe(t,r,"fileName",p.target.value),placeholder:"export"})}),s.jsx(Ie,{label:"File type",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:VA,value:String(t.fileType??"csv"),onChange:p=>Fe(t,r,"fileType",p)})})]});case"confetti":return s.jsx("p",{className:"py-2 text-xs text-low-em",children:"No configuration needed."});default:return null}}function KA({handler:e,open:t,onClose:r,onSave:n,triggerRef:a,availableQueries:i,availableComponents:o,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),v=`${l3[d.action]??d.action} options`;function x(m){f(g=>g&&{...g,action:m,config:{...DA[m]}})}return s.jsx(un,{open:t,onClose:r,triggerRef:a,size:"sm",children:s.jsxs(dn,{className:"max-h-[80vh] !w-112",children:[s.jsx(fn,{onRightAction:r,children:s.jsxs(xm,{children:["Edit ",h," handler"]})}),s.jsxs(hn,{className:"flex flex-col gap-0 p-10",children:[s.jsx(Ie,{label:"Action",children:s.jsx(WA,{value:d.action,onChange:x})}),d.action!=="confetti"&&s.jsxs("div",{className:"mt-4 mb-2",children:[s.jsx(fe,{}),s.jsx("span",{className:"text-xs font-medium text-low-em",children:v})]}),s.jsx(UA,{action:d.action,config:d.config,onChange:m=>f(g=>g&&{...g,config:m}),availableQueries:i,availableComponents:o,availableApps:l,availablePages:c,availableVariables:u}),s.jsxs("div",{className:"mt-4 mb-2",children:[s.jsx(fe,{}),s.jsx("span",{className:"text-xs font-medium text-low-em",children:"Advanced"})]}),s.jsx(Ie,{label:"Only run when",children:s.jsx(Zr,{value:d.onlyRunWhen??"",onChange:m=>f(g=>g&&{...g,onlyRunWhen:m}),placeholder:"{{ !!example.value }}"})}),s.jsx(Ie,{label:"Debounce",children:s.jsx(qA,{value:d.debounce??{unit:"ms",value:0},onChange:m=>f(g=>g&&{...g,debounce:m})})})]}),s.jsx(pn,{cancelButton:{label:"Cancel",closeOnClick:!1,onClick:r},saveButton:{label:"Save",closeOnClick:!1,onClick:()=>{d&&n(d),r()}}})]})})}function GA(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}function ZA({field:e,onChange:t}){const r=e.value??[],n=e.resources??{},[a,i]=P.useState(null),[o,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:GA(),event:"click",action:"controlQuery",config:{query:"",method:""}};t([...r,x]),f(x.id,u.current)}function v(x){t(r.map(m=>m.id===x.id?x:m))}return s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs font-medium text-med-em",children:"Event handlers"}),s.jsx(W,{ref:u,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:s.jsx(B.Add,{size:14}),onClick:p})]}),r.length===0?s.jsx("p",{className:"px-3 py-2 text-xs text-low-em",children:"No event handlers"}):s.jsx("div",{className:"flex flex-col",children:r.map(x=>s.jsx(BA,{handler:x,selected:a===x.id,incomplete:zA(x),onClick:m=>f(x.id,m)},x.id))}),s.jsx(KA,{open:o,handler:d,onClose:h,onSave:v,triggerRef:c,availableQueries:n.availableQueries,availableComponents:n.availableComponents,availableApps:n.availableApps,availablePages:n.availablePages,availableVariables:n.availableVariables})]})}const YA=({subField:e,onChange:t})=>{switch(e.type){case"text":return s.jsx(me,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value),type:"text"});case"toggle":return s.jsxs("div",{className:"flex items-center justify-between gap-4 py-1",children:[e.label&&s.jsx("span",{className:"text-sm font-semibold text-high-em flex-1",children:e.label}),s.jsx(Pa,{size:"small",checked:e.value??!1,onChange:r=>t(r.target.checked)})]});case"dropdown":return s.jsx(Te,{menuSize:"sm",label:e.label,placeholder:e.placeholder,value:e.value??"",showLeadingIcon:!1,items:jl(e.options??[]),onChange:r=>t(r)});default:return null}},XA=({field:e,onChange:t})=>{const r=e.items??[],n=(a,i,o)=>t(r.map(l=>l.id!==a?l:{...l,subFields:l.subFields.map(c=>c.id!==i?c:{...c,value:o})}));return s.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&s.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.label}),s.jsxs("div",{className:"flex flex-col rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:[r.length===0&&s.jsx(ht,{flat:!0,description:"No items",className:"py-6 px-4"}),r.map(a=>s.jsxs(un,{size:"sm",children:[s.jsx(ul,{children:s.jsx(vt,{size:"sm",title:a.title,description:a.description,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!!a.description,showTag:!1,showTrailingText:!1,showTrailingIcon:!1})}),s.jsxs(dn,{className:"!w-72",children:[s.jsx(fn,{children:a.title}),s.jsx(hn,{padding:!0,className:"ds-scrollbar overflow-y-auto max-h-80",children:s.jsx("div",{className:"flex flex-col gap-4",children:a.subFields.map(i=>s.jsx(YA,{subField:i,onChange:o=>n(a.id,i.id,o)},i.id))})}),s.jsx(pn,{saveButton:{label:"Done",closeOnClick:!0}})]})]},a.id))]})]})};function jg(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const QA=({field:e,onChange:t,onAction:r})=>{const n=e.value??[],[a,i]=P.useState(n[0]?.id??""),[o,l]=P.useState(!1),[c,u]=P.useState(""),[d,f]=P.useState(!1),[h,p]=P.useState([]),v=P.useRef(null),x=P.useRef(null),m=n.find(w=>w.id===a)??n[0],g=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:jg(),typeId:w.id,label:w.label};t(n.map(y=>y.id!==m.id?y:{...y,components:[...y.components,C]}))};return n.length===0?s.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&s.jsx("span",{className:"text-xs font-semibold text-high-em",children:e.label}),s.jsx("div",{className:"flex items-center justify-center rounded-lg border border-surface-3 h-10",children:s.jsx("span",{className:"text-xs text-low-em",children:"No tabs configured"})})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[e.label&&s.jsx("span",{className:"text-xs font-semibold text-high-em",children:e.label}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(W,{ref:x,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:s.jsx(B.Edit2,{size:14}),onClick:()=>{p(n.map(w=>({...w}))),f(!0)}}),s.jsx(W,{ref:v,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:s.jsx(B.Add,{size:14}),onClick:()=>{u(""),l(!0)}})]})]}),n.length>1&&s.jsx(yl,{size:"sm",items:n.map(w=>({id:w.id,label:w.label})),value:a,onChange:i}),s.jsx("div",{className:"flex flex-col rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:m.components.length===0?s.jsx(ht,{flat:!0,description:"No components",className:"py-6 px-4"}):m.components.map(w=>s.jsx(vt,{size:"sm",title:w.label,trailingText:g(w.typeId),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showTag:!1,showTrailingText:!0,showTrailingIcon:!0,onClick:()=>r?.(`open-component::${m.id}::${w.id}`)},w.id))}),s.jsx(un,{open:d,onClose:()=>f(!1),triggerRef:x,size:"sm",children:s.jsxs(dn,{className:"!w-72",children:[s.jsx(fn,{children:"Edit tabs"}),s.jsx(hn,{padding:!0,className:"ds-scrollbar overflow-y-auto",children:s.jsxs("div",{className:"flex flex-col gap-3",children:[h.map((w,C)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(me,{value:w.label,placeholder:"Tab label",onChange:y=>p(h.map((j,N)=>N!==C?j:{...j,label:y.target.value}))}),s.jsx(W,{size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:s.jsx(B.Trash,{size:14}),disabled:h.length<=1,onClick:()=>p(h.filter((y,j)=>j!==C))})]},w.id)),s.jsx(W,{size:"sm",variant:"neutral",hierarchy:"tertiary",icons:"leading",leadingIcon:s.jsx(B.Add,{size:14}),onClick:()=>p([...h,{id:jg(),label:"New tab",components:[]}]),children:"Add tab"})]})}),s.jsx(pn,{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(N=>N.id===y.id);return j?{...j,label:y.label}:y});t(C),w.includes(a)&&i(C[0]?.id??""),f(!1)}}})]})}),s.jsx(un,{open:o,onClose:()=>l(!1),triggerRef:v,size:"sm",children:s.jsxs(dn,{className:"!w-72",children:[s.jsx(fn,{children:"Add component"}),s.jsx(hn,{children:s.jsx(Te,{menuSize:"sm",label:"Type",placeholder:"Select a component",value:c,showLeadingIcon:!1,items:jl(e.options??[]),onChange:u})}),s.jsx(pn,{cancelButton:{label:"Cancel",closeOnClick:!0},saveButton:{label:"Add",disabled:!c,closeOnClick:!1,onClick:()=>{b(),l(!1)}}})]})})]})},JA=({field:e,onChange:t,onAction:r})=>{switch(e.type){case"text":return s.jsx(kA,{field:e,onChange:t});case"textarea":return s.jsx(TA,{field:e,onChange:t});case"dropdown":return s.jsx(EA,{field:e,onChange:t});case"toggle":return s.jsx(IA,{field:e,onChange:t});case"multi-dropdown":return s.jsx(MA,{field:e,onChange:t});case"list":return s.jsx($A,{field:e,onAction:r});case"draggable-list":return s.jsx(RA,{field:e,onChange:t,onAction:r});case"size-picker":return s.jsx(LA,{field:e,onChange:t});case"event-handlers":return s.jsx(ZA,{field:e,onChange:t});case"modal-list":return s.jsx(XA,{field:e,onChange:t});case"component-tree":return s.jsx(QA,{field:e,onChange:t,onAction:r});default:return null}},e_=({section:e,onFieldChange:t,onAction:r})=>s.jsxs("div",{className:"flex flex-col gap-6",children:[e.title&&s.jsx("h3",{className:"text-sm font-semibold text-high-em",children:e.title}),e.fields.map(n=>s.jsx(JA,{field:n,onChange:a=>t(n.id,a),onAction:r},n.id))]}),t_=({title:e="Preview",children:t,defaultOpen:r=!1,className:n})=>{const[a,i]=P.useState(r);return s.jsxs("div",{className:O.clsx("flex flex-col bg-surface-2 rounded-xl",n),children:[s.jsxs("button",{type:"button",onClick:()=>i(o=>!o),className:"flex items-center justify-between w-full h-[38px] px-4 cursor-pointer",children:[s.jsx("span",{className:"text-xs font-semibold text-med-em",children:e}),s.jsx(ie,{size:"sm",children:a?s.jsx(B.ArrowUp2,{}):s.jsx(B.ArrowDown2,{})})]}),s.jsx("div",{className:O.clsx("grid transition-all duration-200",a?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"px-4 pb-4",children:t})})})]})};function r_(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 n_=({config:e,onChange:t,onAction:r,backButton:n,className:a})=>{const i=(o,l,c)=>{t({...e,sections:e.sections.map(u=>u.id!==o?u:{...u,fields:u.fields.map(d=>d.id!==l?d:r_(d,c))})})};return s.jsxs("div",{className:O.clsx("h-full w-full flex flex-col bg-white",a),children:[s.jsx("div",{className:"shrink-0",children:s.jsx(_A,{title:e.title,contextMenu:e.contextMenu,backButton:n,onAction:r})}),s.jsx("div",{className:"flex-1 overflow-y-auto ds-scrollbar flex flex-col p-8 gap-6",children:e.sections.map((o,l)=>s.jsxs(S.default.Fragment,{children:[s.jsx(e_,{section:o,onFieldChange:(c,u)=>i(o.id,c,u),onAction:r}),l<e.sections.length-1&&s.jsx(fe,{})]},o.id))})]})},a_=[{id:"And",title:"And",showCheckbox:!1,showLeadingIcon:!1},{id:"Or",title:"Or",showCheckbox:!1,showLeadingIcon:!1}];function i_({position:e}){return s.jsx("div",{className:O.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 s_(e){if(!S.default.isValidElement(e))return!1;const t=e;return typeof t.type=="string"&&!t.props.children}function c3({children:e,operator:t,onChange:r,dropdownIndex:n=0,dropdownBg:a="bg-white"}){const i=S.default.Children.toArray(e);return i.length<=1?s.jsx(s.Fragment,{children:i}):s.jsx("div",{className:"grid grid-cols-[75px_1fr] gap-x-3 gap-y-2.5 auto-rows-[minmax(60px,auto)]",children:i.map((o,l)=>s.jsxs(P.Fragment,{children:[s.jsxs("div",{className:"relative flex items-center justify-center",children:[l>0&&s.jsx("div",{className:"absolute left-[26.5px] top-[-5px] bottom-1/2 border-l border-surface-4 z-0"}),l<i.length-1&&s.jsx("div",{className:"absolute left-[26.5px] top-1/2 bottom-[-5px] border-l border-surface-4 z-0"}),!s_(o)&&s.jsx(i_,{position:l<=n?"above":"below"}),(l===n||n<0&&l===0)&&s.jsx("div",{className:O.clsx("absolute left-0 z-10 py-6",n<0?"bottom-[60%]":"top-[60%]",a),children:s.jsx(Te,{items:a_,value:t.value,size:"sm",menuSize:"sm",showLeadingIcon:!1,className:"min-w-[60px]",onChange:c=>r(t.id,c)})})]}),s.jsx("div",{className:"flex items-stretch self-stretch min-w-0",children:o})]},l))})}const o_={default:{...We.default,wrapper:`${We.default.wrapper} hover:cursor-pointer`,text:"text-med-em"},outlined:{...We.outlined,wrapper:`${We.outlined.wrapper} hover:cursor-pointer`,text:"text-med-em"},danger:{...We.danger,wrapper:`${We.danger.wrapper} hover:cursor-pointer`,text:"text-danger-em"},success:{...We.success,wrapper:`${We.success.wrapper} hover:cursor-pointer`,text:"text-success-em"}},l_={sm:{...qt.sm,text:"text-xs",padding:"px-3"},md:{...qt.md,text:"text-sm font-medium",padding:"px-3.5"},lg:{...qt.lg,text:"text-base",padding:"px-4"}},Ha={wrapper:"bg-surface-3 pointer-events-none border-transparent",text:"text-disabled"};function Ph(e){if(!e)return;const t=new Date(e);return isNaN(t.getTime())?void 0:t}function Cg(e){return e?e.toISOString().split("T")[0]:""}function uc(e){const t=Ph(e);return t?t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):""}function u3({pickType:e="single",from:t="",to:r="",placeholder:n="Select date...",disabled:a=!1,size:i="md",variant:o="default",label:l,hint:c,hintIconVariant:u,className:d,icon:f,iconColor:h="var(--med-em)",onAccept:p}){const[v,x]=P.useState(!1),m=P.useRef(null),g=P.useRef(null),b=P.useCallback(()=>x(!1),[]);Qi({refs:[m,g],onClose:b,enabled:v});const w=Na({triggerRef:m,panelRef:g,enabled:v}),C=l_[i],y=o_[o],j=e==="range"&&(t||r)?[uc(t),uc(r)].filter(Boolean).join(" → "):uc(t),N={from:Ph(t),to:e==="range"?Ph(r):void 0},A=a?Ha.text:j?y.text:y.placeholder;return s.jsxs("div",{className:O.clsx("flex flex-col gap-1.5 w-full",d),children:[l&&s.jsx("label",{className:O.clsx("font-semibold truncate",C.labelFontSize,a?Ha.text:y.text),children:l}),s.jsxs("button",{ref:m,type:"button",disabled:a,onClick:()=>!a&&x(k=>!k),className:O.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?Ha.wrapper:y.wrapper),children:[s.jsx("span",{className:O.clsx("flex-1 min-w-0 truncate text-left",C.text,A),children:j||n}),s.jsx("span",{className:O.clsx("shrink-0 flex items-center",i==="sm"?"pl-1.5":"pl-2"),children:s.jsx(ie,{size:C.iconSize,color:h,children:f??s.jsx(B.Calendar,{})})})]}),c&&s.jsx(ft,{icon:s.jsx(B.InfoCircle,{variant:u||"Bold"}),label:c,iconSize:C.hintIconSize,gap:1,iconColorClass:O.clsx(a?Ha.text:y.hint),labelColorClass:O.clsx(a?Ha.text:y.hint),className:O.clsx(C.hintFontSize,"font-semibold")}),v&&yn.createPortal(s.jsx("div",{ref:g,style:w,children:s.jsx(Om,{selected:N,pickType:e,onAccept:k=>{p(Cg(k?.from),e==="range"?Cg(k?.to):void 0),x(!1)},onCancel:()=>x(!1)})}),document.body)]})}function c_(e,t){if(!(!e.operator||!e.fieldType))return t.operatorsByFieldType[e.fieldType]?.find(r=>r.id===e.operator)}function u_(e){return e==="between"?["",""]:e==="multi-or"||e==="multi-and"?[""]:[]}function fs({inputType:e,value:t,placeholder:r,valueOptions:n,fieldItems:a,onChange:i}){return e==="dropdown"?s.jsx(Te,{items:n,value:t||void 0,placeholder:r,showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:i}):e==="field"?s.jsx(Te,{items:a,value:t||void 0,placeholder:r,showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:i}):e==="date"?s.jsx(u3,{pickType:"single",from:t,placeholder:r,onAccept:o=>i(o)}):s.jsx(me,{type:e,value:t,placeholder:r,size:"md",onChange:o=>i(o.target.value)})}function d_({operatorConfig:e,values:t,valueOptions:r,fieldItems:n,onValuesChange:a}){if(!e||e.valueMode==="none")return null;const i=e.valueMode,o=e.valueInputType??"dropdown";if(i==="single")return s.jsx("div",{className:"grow shrink-0 basis-[200px]",children:s.jsx(fs,{inputType:o,value:t[0]??"",placeholder:"Select value...",valueOptions:r,fieldItems:n,onChange:u=>a([u])})});if(i==="between")return s.jsxs("div",{className:"flex items-center gap-8 grow shrink-0 basis-[200px] min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(fs,{inputType:o,value:t[0]??"",placeholder:"From...",valueOptions:r,fieldItems:n,onChange:u=>{const d=[...t];d[0]=u,a(d)}})}),(e.separator??",")!==""&&s.jsx("span",{className:"text-xs font-medium text-low-em shrink-0 select-none",children:e.separator??","}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(fs,{inputType:o,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 s.jsxs("div",{className:"flex items-center gap-8 grow shrink-0 basis-[200px] flex-wrap",children:[t.map((u,d)=>s.jsxs(S.default.Fragment,{children:[d>0&&s.jsx("span",{className:"text-xs font-medium text-low-em shrink-0 select-none",children:l}),s.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[s.jsx("div",{className:"min-w-[120px] flex-1",children:s.jsx(fs,{inputType:o,value:u,placeholder:"Select...",valueOptions:r,fieldItems:n,onChange:f=>{const h=[...t];h[d]=f,a(h)}})}),c&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx("span",{className:"contents",children:s.jsx(ie,{size:"xs",children:s.jsx(it,{})})}),onClick:()=>a(t.filter((f,h)=>h!==d)),"aria-label":"Remove value"})]})]},d)),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{size:14,children:s.jsx(B.Add,{})}),onClick:()=>a([...t,""]),"aria-label":"Add value"})]})}function d3({condition:e,config:t,onChange:r,onDelete:n=()=>{}}){const a=c_(e,t),i=t.fields.map(({fieldType:f,...h})=>h),o=e.fieldType?(t.operatorsByFieldType[e.fieldType]??[]).map(({valueMode:f,valueInputType:h,connector:p,separator:v,...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?u_(h.valueMode):[]})}function u(f){r({...e,values:f})}const d=!a||a.valueMode==="none";return s.jsxs("div",{className:"flex items-stretch gap-8 w-full border border-surface-3 rounded-xl p-5",children:[s.jsxs("div",{className:"flex flex-wrap flex-1 items-center gap-8 min-w-0",children:[s.jsx("div",{className:"grow shrink-0 basis-40",children:s.jsx(Te,{items:i,value:e.field||void 0,placeholder:"Field...",showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:l})}),s.jsx("div",{className:"grow shrink-0 basis-[130px]",children:s.jsx(Te,{items:o,value:e.operator||void 0,placeholder:"Operator...",showLeadingIcon:!1,size:"md",menuSize:"sm",disabled:!e.field,onChange:c})}),a?.connector==="arrow"&&s.jsx("span",{className:"shrink-0",children:s.jsx(ie,{size:"sm",color:"var(--med-em)",children:s.jsx(B.ArrowRight,{})})}),s.jsx(d_,{operatorConfig:a,values:e.values,valueOptions:t.valueOptions,fieldItems:i,onValuesChange:u}),d&&s.jsx("div",{className:"flex-1"})]}),e.showDelete&&s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx("span",{className:"contents",children:s.jsx(ie,{size:"xs",children:s.jsx(it,{})})}),onClick:()=>n(e.id),"aria-label":"Delete condition"})})]})}const f_={xs:"text-xs",sm:"text-sm",md:"text-base"};function f3({title:e,children:t,footer:r,headerAction:n,className:a,titleClassName:i,headerClassName:o,contentClassName:l,titleSize:c="sm",defaultPadding:u=!1}){return s.jsxs("div",{className:O.clsx("flex flex-col bg-white rounded-2xl border border-surface-3",a),children:[s.jsxs("div",{className:Q.twMerge(O.clsx("flex items-center shrink-0 py-4 px-8 border-b border-surface-3",o)),children:[s.jsx("h3",{className:O.clsx("font-semibold text-high-em flex-1",f_[c],i),children:e}),n]}),s.jsx("div",{className:Q.twMerge(O.clsx("flex-1 overflow-y-auto p-5",u&&"p-8",l)),children:t}),r&&s.jsx("div",{className:"shrink-0 flex items-center justify-end gap-2 px-8 pb-6",children:r})]})}function h_({title:e,conditions:t,config:r,operator:n,onOperatorChange:a,onChange:i,onDelete:o,onAddAnd:l,onAddOr:c,dropdownIndex:u=0,className:d}){const f=s.jsx(ie,{children:s.jsx(B.Add,{})}),h=[...l?[{value:"and",icon:f,label:"And"}]:[],...c?[{value:"or",icon:f,label:"Or"}]:[]],p=h.length>0?s.jsx(xr,{options:h,value:"",size:"sm",variant:"neutral",onChange:v=>{v==="and"&&l?.(),v==="or"&&c?.()}}):void 0;return s.jsx(f3,{title:e,footer:p,className:d,children:s.jsx("div",{className:"p-5",children:s.jsx(c3,{operator:n,onChange:a,dropdownIndex:u,children:t.map(v=>s.jsx(d3,{condition:v,config:r,onChange:i,onDelete:o},v.id))})})})}const p_=[{id:"if",title:"If",showCheckbox:!1,showLeadingIcon:!1},{id:"if-else",title:"If / Else",showCheckbox:!1,showLeadingIcon:!1}],m_={when:"When",then:"Then","else-if":"Else If",else:"Else"},h3=70,x_=10;function g_(){return s.jsx("div",{className:"relative h-[23px] shrink-0",style:{width:h3},children:s.jsx("div",{className:"absolute left-4 top-0 w-14 h-full border-l border-b border-surface-4 rounded-bl-xl"})})}function v_({name:e,onNameChange:t,type:r,onTypeChange:n,branches:a,onAddElseIf:i,onRemoveBranch:o,className:l}){return s.jsxs("div",{className:O.clsx("flex flex-col gap-10",l),children:[s.jsxs("div",{className:"flex items-end gap-5",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(me,{label:"Name",value:e,size:"md",onChange:c=>t(c.target.value)})}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Te,{items:p_,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&&!!o;return s.jsxs("div",{className:O.clsx("flex items-start gap-2",!f&&"ml-[var(--indent-mobile)] md:ml-[var(--indent-desktop)]"),style:f?void 0:{"--indent-mobile":`${(d-1)*x_}px`,"--indent-desktop":`${(d-1)*h3}px`},children:[!f&&s.jsx("div",{className:"hidden md:block shrink-0",children:s.jsx(g_,{})}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(h_,{title:m_[c.type],...c.panel})}),h&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx("span",{className:"contents",children:s.jsx(ie,{size:"xs",children:s.jsx(it,{})})}),onClick:()=>o(c.id),"aria-label":"Remove branch"})]},c.id)}),i&&s.jsx("div",{children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",leadingIcon:s.jsx(ie,{size:14,children:s.jsx(B.Add,{})}),onClick:i,children:"Add Else If"})})]})}const p3=({name:e,expression:t,inputField:r,className:n})=>{const[a,i]=S.default.useState(!1),o=S.default.useRef(null),l=!!t?.options?.length;function c(){l&&i(d=>!d)}function u(d){t?.onSelect?.(d),i(!1)}return s.jsxs("div",{className:O.clsx("flex flex-col p-4 gap-4 border border-surface-4 rounded-xl",n),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-semibold text-high-em truncate pr-2",children:e}),t&&s.jsxs(s.Fragment,{children:[s.jsx("span",{ref:o,className:"inline-flex shrink-0",children:s.jsx(Lr,{size:"sm",variant:"quaternary",leadingIcon:!1,trailingIcon:!1,className:"font-semibold cursor-pointer",onClick:c,children:t.label})}),l&&a&&s.jsx(Ht,{items:t.options,selectedIds:t.selectedId?[t.selectedId]:[],size:"xs",triggerRef:o,onSelect:u,onClose:()=>i(!1)})]})]}),r!==void 0&&s.jsx(me,{...r})]})};function m3({operator:e,className:t}){return e?s.jsxs("div",{className:`flex items-center gap-5 ${t??""}`,children:[s.jsx(fe,{className:"flex-1"}),s.jsx(Ye,{size:"md",theme:"surface",variant:"simple",className:"shrink-0",children:e}),s.jsx(fe,{className:"flex-1"})]}):s.jsx("div",{className:`flex items-center gap-5 ${t??""}`,children:s.jsx(fe,{className:"flex-1"})})}function y_({title:e,items:t,operator:r,onAdd:n,onDelete:a,onClose:i,className:o}){const l=n?s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"xs",icons:"leading",leadingIcon:s.jsx(ie,{children:s.jsx(B.Add,{})}),onClick:n,children:"Add expression"}):void 0;return s.jsx(f3,{title:e,footer:l,titleSize:"xs",headerClassName:"px-4 py-2 bg-surface-2",contentClassName:"p-4",headerAction:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(ie,{size:"xs",children:s.jsx(it,{})}),onClick:i,"aria-label":"Close"}),className:Q.twMerge(O.clsx("rounded-lg overflow-hidden",o)),children:s.jsx("div",{className:"flex flex-col gap-3",children:t.map((c,u)=>{const{id:d,...f}=c,h=u===t.length-1;return s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(p3,{className:"flex-1",...f}),a&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx("span",{className:"contents",children:s.jsx(ie,{size:"xs",children:s.jsx(it,{})})}),onClick:()=>a(d),"aria-label":"Remove expression"})]}),!h&&s.jsx(m3,{operator:r})]},d)})})})}const b_={confirmed:{theme:"success",label:"Confirmed"},pending:{theme:"warning",label:"Pending"},"no-show":{theme:"danger",label:"No-show"},cancelled:{theme:"surface",label:"Cancelled"}},Ds=({time:e,title:t,description:r,status:n,isSelected:a=!1,className:i,...o})=>{const l=b_[n];return s.jsxs("div",{className:Q.twMerge(O.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)),...o,children:[s.jsx("span",{className:O.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}),s.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-semibold text-med-em truncate",children:t}),s.jsx("span",{className:"text-xs text-low-em truncate",children:r})]}),l&&s.jsx(Ye,{theme:l.theme,variant:"outlined",size:"sm",className:"shrink-0",children:l.label})]})};Ds.displayName="AppointmentRow";const zs=({name:e,age:t,gender:r,tags:n,fields:a,onEdit:i,className:o})=>s.jsxs("div",{className:Q.twMerge("p-6 flex flex-col gap-6 flex-1 overflow-y-auto",o),children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-med-em",children:e}),s.jsxs("p",{className:"text-xs text-low-em",children:[r," · ",t," yrs"]}),n&&n.length>0&&s.jsx("div",{className:"flex flex-wrap gap-6 py-4",children:n.map(l=>s.jsx(Lr,{variant:"tertiary",size:"xs",leadingIcon:!1,trailingIcon:!1,children:l},l))})]}),i&&s.jsx(W,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:s.jsx(B.Edit2,{}),onClick:i,"aria-label":"Edit"})]}),a&&a.length>0&&s.jsx("div",{className:"flex flex-col",children:a.map(({label:l,value:c},u)=>s.jsxs("div",{className:"flex items-baseline gap-6 px-5 py-4",children:[s.jsx("span",{className:"text-xs text-low-em tracking-wide shrink-0",children:l}),s.jsx("span",{className:"text-xs text-med-em font-medium",children:c??"—"})]},`${l}-${u}`))})]});zs.displayName="AppointmentDetail";const w_=480,x3=({appointments:e,selectedId:t,detail:r,onSelectAppointment:n,showDetail:a=!0,showDatePicker:i=!1,selectedDate:o,onDateChange:l,datePickerType:c="single",className:u,...d})=>{const f=e.findIndex(x=>x.id===t),[h,p]=il(),v=p!==1/0&&p<w_;return s.jsxs(dl,{size:"md",padding:"sm",children:[s.jsxs("div",{ref:h,className:Q.twMerge(O.clsx("bg-surface-1 shadow-e2 overflow-hidden",v?"flex flex-col w-full":"flex flex-row",u)),...d,children:[s.jsxs("div",{className:O.clsx("flex flex-col min-h-0 h-full",!v&&a?"w-1/2":"w-full"),children:[i&&s.jsx("div",{className:O.clsx("shrink-0 flex justify-center bg-white border-b border-surface-3",!v&&a&&"border-r border-surface-3",!v&&a&&f===0&&"rounded-br-lg"),children:s.jsx(Om,{selected:o,pickType:c,onSelect:l,showFooter:!1,className:"rounded-none border-0"})}),s.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[s.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 g=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:g,onClick:()=>n?.(x.id),className:O.clsx(g?"bg-surface-1 border-transparent":[!v&&a&&"border-r border-surface-3",!v&&b&&"rounded-br-lg",!v&&w&&"rounded-tr-lg border-t border-surface-3"])};return v?s.jsx(fl,{children:s.jsx(Ds,{...C})},x.id):s.jsx(Ds,{...C},x.id)})}),!v&&a&&s.jsx("div",{className:"flex-1 border-r border-surface-3"}),v&&s.jsx("div",{className:"flex-1"})]})]}),!v&&a&&s.jsx("div",{className:"w-1/2 bg-surface-1 flex flex-col min-w-0",children:r?s.jsx(zs,{...r}):s.jsx(ht,{flat:!0,description:"Select an appointment to view details",className:"!bg-transparent h-full"})})]}),s.jsxs(hl,{children:[s.jsx(pl,{children:s.jsx(ml,{children:r?.name??"Details"})}),s.jsx(xl,{children:r?s.jsx(zs,{...r}):s.jsx(ht,{flat:!0,description:"Select an appointment to view details",className:"!bg-transparent h-full"})})]})]})};x3.displayName="Planner";const Cl=({title:e,description:t,status:r,statusTheme:n,avatars:a,quickActions:i=[],variant:o="neutral",onCheck:l,onDelete:c,className:u,...d})=>s.jsxs("div",{className:Q.twMerge(O.clsx("bg-white rounded-xl border border-surface-3 shadow-e1 p-4 flex flex-col gap-4",o==="secondary"&&"bg-surface-2",u)),...d,children:[s.jsx("div",{className:"text-sm font-semibold text-high-em truncate",children:e}),t!=null&&s.jsx("div",{className:"text-xs text-med-em leading-snug line-clamp-3",children:t}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ye,{theme:n,size:"sm",variant:"simple",children:r}),a&&a.length>0&&s.jsx(om,{avatars:a,size:"xs",max:3}),i.length>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[i.includes("check")&&s.jsx(W,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:s.jsx(B.TickCircle,{}),onClick:f=>{f.stopPropagation(),l?.()},"aria-label":"Mark complete"}),i.includes("delete")&&s.jsx(W,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:s.jsx(B.Trash,{}),onClick:f=>{f.stopPropagation(),c?.()},"aria-label":"Delete"})]})]})]});Cl.displayName="KanbanCard";const j_={red:{theme:"danger",statusState:"danger"},orange:{theme:"warning",statusState:"warning"},green:{theme:"success",statusState:"success"},gray:{theme:"surface",statusState:"disabled"}},g3=({card:e,columnName:t,statusTheme:r,variant:n,onCardClick:a})=>{const{attributes:i,listeners:o,setNodeRef:l,transform:c,transition:u,isDragging:d}=Ve.useSortable({id:e.id,data:{id:e.id,columnName:t},animateLayoutChanges:()=>!1});return s.jsxs("div",{ref:l,style:{transform:Yo.CSS.Transform.toString(c),transition:u},className:O.clsx("touch-none",d?"relative cursor-grabbing":"cursor-grab"),onClick:()=>a?.(e.id),...i,...o,children:[d&&s.jsx(Gn,{className:"absolute inset-0"}),s.jsx("div",{className:O.clsx(d&&"invisible"),children:s.jsx(Cl,{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})})]})};g3.displayName="DraggableCard";const v3=({columnName:e})=>{const{setNodeRef:t}=Be.useDroppable({id:`endzone-${e}`,data:{columnName:e,isEndZone:!0}});return s.jsx("div",{ref:t,className:"flex-1 min-h-8"})};v3.displayName="KanbanEndZone";const $m=({name:e,statusColor:t,cards:r,showCounter:n=!1,onAddCard:a,variant:i,emptyState:o="No items yet",onCardClick:l,className:c,fullHeight:u=!1})=>{const{setNodeRef:d}=Be.useDroppable({id:e,data:{columnName:e}}),{theme:f,statusState:h}=j_[t];return s.jsxs("div",{ref:d,className:Q.twMerge(O.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:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ye,{variant:"status",size:"xs",statusState:h}),s.jsx("span",{className:"text-base font-semibold text-high-em truncate",children:e}),n&&s.jsxs("span",{className:"text-lg font-semibold text-low-em",children:["(",r.length,")"]})]}),a&&s.jsx(W,{icons:"only",hierarchy:"secondary",variant:"neutral",size:"xs",leadingIcon:s.jsx(B.Add,{}),onClick:a,"aria-label":`Add card to ${e}`})]}),s.jsx(Ve.SortableContext,{items:r.map(p=>p.id),strategy:Ve.verticalListSortingStrategy,children:s.jsx("div",{className:O.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?s.jsx(ht,{flat:!0,description:o,className:"!bg-transparent h-full"}):s.jsxs(s.Fragment,{children:[r.map(p=>s.jsx(g3,{card:p,columnName:e,statusTheme:f,variant:i,onCardClick:l},p.id)),s.jsx(v3,{columnName:e})]})})}),a&&s.jsx(W,{hierarchy:"secondary",variant:"neutral",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{}),className:"w-full justify-center",onClick:a,children:"Add Task"})]})};$m.displayName="KanbanColumn";const C_={red:"danger",orange:"warning",green:"success",gray:"surface"},S_=e=>{const t=Be.pointerWithin(e);return t.length>0?t:Be.rectIntersection(e)},y3=({columns:e,data:t,fieldMap:r,showCounter:n,variant:a,emptyState:i,columnClassName:o,fullHeight:l,onAddCard:c,onCardCheck:u,onCardDelete:d,onCardMove:f,onCardClick:h,className:p,...v})=>{const[x,m]=P.useState(null),[g,b]=P.useState(null),w=g??t,C=Be.useSensors(Be.useSensor(Be.PointerSensor,{activationConstraint:{distance:8}})),y=T=>w.filter(R=>R[r.status]===T).map(R=>{const M=String(R[r.id]??"");return{id:M,title:String(R[r.title]??""),description:r.description?R[r.description]:void 0,status:T,avatars:r.avatars?R[r.avatars]:void 0,quickActions:r.quickActions,onCheck:u?()=>u(M):void 0,onDelete:d?()=>d(M):void 0}}),N=e.flatMap(T=>y(T.name)).find(T=>T.id===x)??null,A=N?e.find(T=>y(T.name).some(R=>R.id===x))?.name:void 0,k=T=>{m(String(T.active.id)),b([...t])},I=T=>{const{active:R,over:M}=T;if(!M)return;const $=String(R.id),L=String(M.id);if($===L)return;const q=M.data.current?.columnName;q!=null&&b(U=>{const D=U??t,F=D.findIndex(ne=>String(ne[r.id])===$);if(F<0)return U;const H={...D[F],[r.status]:q},G=D.filter((ne,X)=>X!==F),J=G.findIndex(ne=>String(ne[r.id])===L);if(J>=0)G.splice(J,0,H);else{let ne=-1;G.forEach((X,re)=>{X[r.status]===q&&(ne=re)}),G.splice(ne+1,0,H)}return G})},_=T=>{const R=g;if(m(null),b(null),!R)return;const M=String(T.active.id),$=R.find(U=>String(U[r.id])===M);if(!$)return;const L=String($[r.status]??""),q=Math.max(0,R.filter(U=>U[r.status]===$[r.status]).findIndex(U=>String(U[r.id])===M));f?.(M,L,q)},E=()=>{m(null),b(null)};return s.jsxs(Be.DndContext,{sensors:C,collisionDetection:S_,onDragStart:k,onDragOver:I,onDragEnd:_,onDragCancel:E,children:[s.jsx("div",{className:Q.twMerge(O.clsx("flex flex-row gap-4 p-4 overflow-x-auto ds-scrollbar",l&&"h-full",p)),...v,children:e.map(T=>s.jsx($m,{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:o,fullHeight:l},T.name))}),s.jsx(Be.DragOverlay,{dropAnimation:null,children:N&&A&&s.jsx(Cl,{title:N.title,description:N.description,status:N.status,statusTheme:C_[e.find(T=>T.name===A).statusColor],avatars:N.avatars,quickActions:N.quickActions,variant:a,className:"rotate-1 shadow-e3"})})]})};y3.displayName="Kanban";var hs=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 dc,Sg;function yt(){if(Sg)return dc;Sg=1;var e=Array.isArray;return dc=e,dc}var fc,Ng;function b3(){if(Ng)return fc;Ng=1;var e=typeof hs=="object"&&hs&&hs.Object===Object&&hs;return fc=e,fc}var hc,Og;function nr(){if(Og)return hc;Og=1;var e=b3(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return hc=r,hc}var pc,Pg;function es(){if(Pg)return pc;Pg=1;var e=nr(),t=e.Symbol;return pc=t,pc}var mc,Ag;function N_(){if(Ag)return mc;Ag=1;var e=es(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(o){var l=r.call(o,a),c=o[a];try{o[a]=void 0;var u=!0}catch{}var d=n.call(o);return u&&(l?o[a]=c:delete o[a]),d}return mc=i,mc}var xc,_g;function O_(){if(_g)return xc;_g=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return xc=r,xc}var gc,kg;function Nr(){if(kg)return gc;kg=1;var e=es(),t=N_(),r=O_(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?a:n:i&&i in Object(l)?t(l):r(l)}return gc=o,gc}var vc,Tg;function Or(){if(Tg)return vc;Tg=1;function e(t){return t!=null&&typeof t=="object"}return vc=e,vc}var yc,Eg;function Aa(){if(Eg)return yc;Eg=1;var e=Nr(),t=Or(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return yc=n,yc}var bc,Ig;function Rm(){if(Ig)return bc;Ig=1;var e=yt(),t=Aa(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){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)||o!=null&&i in Object(o)}return bc=a,bc}var wc,Mg;function zr(){if(Mg)return wc;Mg=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return wc=e,wc}var jc,$g;function Lm(){if($g)return jc;$g=1;var e=Nr(),t=zr(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==n||c==a||c==r||c==i}return jc=o,jc}var Cc,Rg;function P_(){if(Rg)return Cc;Rg=1;var e=nr(),t=e["__core-js_shared__"];return Cc=t,Cc}var Sc,Lg;function A_(){if(Lg)return Sc;Lg=1;var e=P_(),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 Sc=r,Sc}var Nc,Dg;function w3(){if(Dg)return Nc;Dg=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 Nc=r,Nc}var Oc,zg;function __(){if(zg)return Oc;zg=1;var e=Lm(),t=A_(),r=zr(),n=w3(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.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 Oc=f,Oc}var Pc,Bg;function k_(){if(Bg)return Pc;Bg=1;function e(t,r){return t?.[r]}return Pc=e,Pc}var Ac,Fg;function Sn(){if(Fg)return Ac;Fg=1;var e=__(),t=k_();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return Ac=r,Ac}var _c,qg;function Sl(){if(qg)return _c;qg=1;var e=Sn(),t=e(Object,"create");return _c=t,_c}var kc,Wg;function T_(){if(Wg)return kc;Wg=1;var e=Sl();function t(){this.__data__=e?e(null):{},this.size=0}return kc=t,kc}var Tc,Hg;function E_(){if(Hg)return Tc;Hg=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Tc=e,Tc}var Ec,Vg;function I_(){if(Vg)return Ec;Vg=1;var e=Sl(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;if(e){var l=o[i];return l===t?void 0:l}return n.call(o,i)?o[i]:void 0}return Ec=a,Ec}var Ic,Ug;function M_(){if(Ug)return Ic;Ug=1;var e=Sl(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return Ic=n,Ic}var Mc,Kg;function $_(){if(Kg)return Mc;Kg=1;var e=Sl(),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 Mc=r,Mc}var $c,Gg;function R_(){if(Gg)return $c;Gg=1;var e=T_(),t=E_(),r=I_(),n=M_(),a=$_();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[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,Zg;function L_(){if(Zg)return Rc;Zg=1;function e(){this.__data__=[],this.size=0}return Rc=e,Rc}var Lc,Yg;function Dm(){if(Yg)return Lc;Yg=1;function e(t,r){return t===r||t!==t&&r!==r}return Lc=e,Lc}var Dc,Xg;function Nl(){if(Xg)return Dc;Xg=1;var e=Dm();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return Dc=t,Dc}var zc,Qg;function D_(){if(Qg)return zc;Qg=1;var e=Nl(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,o=e(i,a);if(o<0)return!1;var l=i.length-1;return o==l?i.pop():r.call(i,o,1),--this.size,!0}return zc=n,zc}var Bc,Jg;function z_(){if(Jg)return Bc;Jg=1;var e=Nl();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return Bc=t,Bc}var Fc,ev;function B_(){if(ev)return Fc;ev=1;var e=Nl();function t(r){return e(this.__data__,r)>-1}return Fc=t,Fc}var qc,tv;function F_(){if(tv)return qc;tv=1;var e=Nl();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 qc=t,qc}var Wc,rv;function Ol(){if(rv)return Wc;rv=1;var e=L_(),t=D_(),r=z_(),n=B_(),a=F_();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[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,Wc=i,Wc}var Hc,nv;function zm(){if(nv)return Hc;nv=1;var e=Sn(),t=nr(),r=e(t,"Map");return Hc=r,Hc}var Vc,av;function q_(){if(av)return Vc;av=1;var e=R_(),t=Ol(),r=zm();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Vc=n,Vc}var Uc,iv;function W_(){if(iv)return Uc;iv=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Uc=e,Uc}var Kc,sv;function Pl(){if(sv)return Kc;sv=1;var e=W_();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return Kc=t,Kc}var Gc,ov;function H_(){if(ov)return Gc;ov=1;var e=Pl();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Gc=t,Gc}var Zc,lv;function V_(){if(lv)return Zc;lv=1;var e=Pl();function t(r){return e(this,r).get(r)}return Zc=t,Zc}var Yc,cv;function U_(){if(cv)return Yc;cv=1;var e=Pl();function t(r){return e(this,r).has(r)}return Yc=t,Yc}var Xc,uv;function K_(){if(uv)return Xc;uv=1;var e=Pl();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 Xc=t,Xc}var Qc,dv;function Bm(){if(dv)return Qc;dv=1;var e=q_(),t=H_(),r=V_(),n=U_(),a=K_();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[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,Qc=i,Qc}var Jc,fv;function j3(){if(fv)return Jc;fv=1;var e=Bm(),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 o=arguments,l=a?a.apply(this,o):o[0],c=i.cache;if(c.has(l))return c.get(l);var u=n.apply(this,o);return i.cache=c.set(l,u)||c,u};return i.cache=new(r.Cache||e),i}return r.Cache=e,Jc=r,Jc}var eu,hv;function G_(){if(hv)return eu;hv=1;var e=j3(),t=500;function r(n){var a=e(n,function(o){return i.size===t&&i.clear(),o}),i=a.cache;return a}return eu=r,eu}var tu,pv;function Z_(){if(pv)return tu;pv=1;var e=G_(),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(o,l,c,u){i.push(c?u.replace(r,"$1"):l||o)}),i});return tu=n,tu}var ru,mv;function Fm(){if(mv)return ru;mv=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 ru=e,ru}var nu,xv;function Y_(){if(xv)return nu;xv=1;var e=es(),t=Fm(),r=yt(),n=Aa(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function o(l){if(typeof l=="string")return l;if(r(l))return t(l,o)+"";if(n(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return nu=o,nu}var au,gv;function C3(){if(gv)return au;gv=1;var e=Y_();function t(r){return r==null?"":e(r)}return au=t,au}var iu,vv;function S3(){if(vv)return iu;vv=1;var e=yt(),t=Rm(),r=Z_(),n=C3();function a(i,o){return e(i)?i:t(i,o)?[i]:r(n(i))}return iu=a,iu}var su,yv;function Al(){if(yv)return su;yv=1;var e=Aa();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return su=t,su}var ou,bv;function qm(){if(bv)return ou;bv=1;var e=S3(),t=Al();function r(n,a){a=e(a,n);for(var i=0,o=a.length;n!=null&&i<o;)n=n[t(a[i++])];return i&&i==o?n:void 0}return ou=r,ou}var lu,wv;function N3(){if(wv)return lu;wv=1;var e=qm();function t(r,n,a){var i=r==null?void 0:e(r,n);return i===void 0?a:i}return lu=t,lu}var X_=N3();const Nt=Ne(X_);var cu,jv;function Q_(){if(jv)return cu;jv=1;function e(t){return t==null}return cu=e,cu}var J_=Q_();const de=Ne(J_);var uu,Cv;function e8(){if(Cv)return uu;Cv=1;var e=Nr(),t=yt(),r=Or(),n="[object String]";function a(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return uu=a,uu}var t8=e8();const mn=Ne(t8);var r8=Lm();const le=Ne(r8);var n8=zr();const _a=Ne(n8);var ps={exports:{}},ye={};var Sv;function a8(){if(Sv)return ye;Sv=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"),o=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"),v;v=Symbol.for("react.module.reference");function x(m){if(typeof m=="object"&&m!==null){var g=m.$$typeof;switch(g){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 o:case c:case h:case f:case i:return m;default:return g}}case t:return g}}}return ye.ContextConsumer=o,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)===o},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===o||m.$$typeof===c||m.$$typeof===v||m.getModuleId!==void 0)},ye.typeOf=x,ye}var be={};var Nv;function i8(){return Nv||(Nv=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"),o=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"),v=!1,x=!1,m=!1,g=!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||g||Y===p||v||x||m||typeof Y=="object"&&Y!==null&&(Y.$$typeof===h||Y.$$typeof===f||Y.$$typeof===i||Y.$$typeof===o||Y.$$typeof===c||Y.$$typeof===w||Y.getModuleId!==void 0))}function y(Y){if(typeof Y=="object"&&Y!==null){var Oe=Y.$$typeof;switch(Oe){case e:var $e=Y.type;switch($e){case r:case a:case n:case u:case d:return $e;default:var nt=$e&&$e.$$typeof;switch(nt){case l:case o:case c:case h:case f:case i:return nt;default:return Oe}}case t:return Oe}}}var j=o,N=i,A=e,k=c,I=r,_=h,E=f,T=t,R=a,M=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 F(Y){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(Y){return y(Y)===o}function G(Y){return y(Y)===i}function J(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 ee(Y){return y(Y)===a}function te(Y){return y(Y)===n}function z(Y){return y(Y)===u}function pe(Y){return y(Y)===d}be.ContextConsumer=j,be.ContextProvider=N,be.Element=A,be.ForwardRef=k,be.Fragment=I,be.Lazy=_,be.Memo=E,be.Portal=T,be.Profiler=R,be.StrictMode=M,be.Suspense=$,be.SuspenseList=L,be.isAsyncMode=D,be.isConcurrentMode=F,be.isContextConsumer=H,be.isContextProvider=G,be.isElement=J,be.isForwardRef=ne,be.isFragment=X,be.isLazy=re,be.isMemo=ce,be.isPortal=K,be.isProfiler=ee,be.isStrictMode=te,be.isSuspense=z,be.isSuspenseList=pe,be.isValidElementType=C,be.typeOf=y})()),be}var Ov;function s8(){return Ov||(Ov=1,process.env.NODE_ENV==="production"?ps.exports=a8():ps.exports=i8()),ps.exports}var o8=s8(),du,Pv;function O3(){if(Pv)return du;Pv=1;var e=Nr(),t=Or(),r="[object Number]";function n(a){return typeof a=="number"||t(a)&&e(a)==r}return du=n,du}var fu,Av;function l8(){if(Av)return fu;Av=1;var e=O3();function t(r){return e(r)&&r!=+r}return fu=t,fu}var c8=l8();const ka=Ne(c8);var u8=O3();const d8=Ne(u8);var tt=function(t){return t===0?0:t>0?1:-1},en=function(t){return mn(t)&&t.indexOf("%")===t.length-1},Z=function(t){return d8(t)&&!ka(t)},f8=function(t){return de(t)},Ze=function(t){return Z(t)||mn(t)},h8=0,Nn=function(t){var r=++h8;return"".concat(t||"").concat(r)},ut=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)&&!mn(t))return n;var i;if(en(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return ka(i)&&(i=n),a&&i>r&&(i=r),i},Ir=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},p8=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 Bs(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Nt(n,t))===r})}var m8=function(t,r){return Z(t)&&Z(r)?t-r:mn(t)&&mn(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Vn(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 Ah(e){"@babel/helpers - typeof";return Ah=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},Ah(e)}var x8=["viewBox","children"],g8=["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"],_v=["points","pathLength"],hu={svg:x8,polygon:_v,polyline:_v},Wm=["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"],Fs=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(P.isValidElement(t)&&(n=t.props),!_a(n))return null;var a={};return Object.keys(n).forEach(function(i){Wm.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},v8=function(t,r,n){return function(a){return t(r,n,a),null}},vr=function(t,r,n){if(!_a(t)||Ah(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];Wm.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=v8(o,r,n))}),a},y8=["children"],b8=["children"];function kv(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}function _h(e){"@babel/helpers - typeof";return _h=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},_h(e)}var Tv={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"},hr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Ev=null,pu=null,Hm=function e(t){if(t===Ev&&Array.isArray(pu))return pu;var r=[];return P.Children.forEach(t,function(n){de(n)||(o8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),pu=r,Ev=t,r};function gt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return hr(a)}):n=[hr(t)],Hm(e).forEach(function(a){var i=Nt(a,"type.displayName")||Nt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function jt(e,t){var r=gt(e,t);return r&&r[0]}var Iv=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)},j8=["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"],C8=function(t){return t&&t.type&&mn(t.type)&&j8.indexOf(t.type)>=0},P3=function(t){return t&&_h(t)==="object"&&"clipDot"in t},S8=function(t,r,n,a){var i,o=(i=hu?.[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!le(t)&&(a&&o.includes(r)||g8.includes(r))||n&&Wm.includes(r)},se=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(P.isValidElement(t)&&(a=t.props),!_a(a))return null;var i={};return Object.keys(a).forEach(function(o){var l;S8((l=a)===null||l===void 0?void 0:l[o],o,r,n)&&(i[o]=a[o])}),i},kh=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 Mv(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!Mv(i,o))return!1}return!0},Mv=function(t,r){if(de(t)&&de(r))return!0;if(!de(t)&&!de(r)){var n=t.props||{},a=n.children,i=kv(n,y8),o=r.props||{},l=o.children,c=kv(o,b8);return a&&l?Vn(i,c)&&kh(a,l):!a&&!l?Vn(i,c):!1}return!1},$v=function(t,r){var n=[],a={};return Hm(t).forEach(function(i,o){if(C8(i))n.push(i);else if(i){var l=hr(i.type),c=r[l]||{},u=c.handler,d=c.once;if(u&&(!d||!a[l])){var f=u(i,l,o);n.push(f),a[l]=!0}}}),n},N8=function(t){var r=t&&t.type;return r&&Tv[r]?Tv[r]:null},O8=function(t,r){return Hm(r).indexOf(t)},P8=["children","width","height","viewBox","className","style","title","desc"];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 A8(e,t){if(e==null)return{};var r=_8(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 _8(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){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,l=e.title,c=e.desc,u=A8(e,P8),d=a||{width:r,height:n,x:0,y:0},f=ae.default("recharts-surface",i);return S.default.createElement("svg",Th({},se(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),S.default.createElement("title",null,l),S.default.createElement("desc",null,c),t)}var k8=["children","className"];function Ih(){return Ih=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},Ih.apply(this,arguments)}function T8(e,t){if(e==null)return{};var r=E8(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 E8(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 he=S.default.forwardRef(function(e,t){var r=e.children,n=e.className,a=T8(e,k8),i=ae.default("recharts-layer",n);return S.default.createElement("g",Ih({className:i},se(a,!0),{ref:t}),r)}),I8=process.env.NODE_ENV!=="production",It=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(I8&&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 o=0;console.warn(r.replace(/%s/g,function(){return a[o++]}))}},mu,Rv;function M8(){if(Rv)return mu;Rv=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 o=Array(i);++a<i;)o[a]=t[a+r];return o}return mu=e,mu}var xu,Lv;function $8(){if(Lv)return xu;Lv=1;var e=M8();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 xu=t,xu}var gu,Dv;function A3(){if(Dv)return gu;Dv=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+a+i+"]");function c(u){return l.test(u)}return gu=c,gu}var vu,zv;function R8(){if(zv)return vu;zv=1;function e(t){return t.split("")}return vu=e,vu}var yu,Bv;function L8(){if(Bv)return yu;Bv=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",o="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",v=u+"?",x="["+i+"]?",m="(?:"+p+"(?:"+[d,f,h].join("|")+")"+x+v+")*",g=x+v+m,b="(?:"+[d+l+"?",l,f,h,o].join("|")+")",w=RegExp(c+"(?="+c+")|"+b+g,"g");function C(y){return y.match(w)||[]}return yu=C,yu}var bu,Fv;function D8(){if(Fv)return bu;Fv=1;var e=R8(),t=A3(),r=L8();function n(a){return t(a)?r(a):e(a)}return bu=n,bu}var wu,qv;function z8(){if(qv)return wu;qv=1;var e=$8(),t=A3(),r=D8(),n=C3();function a(i){return function(o){o=n(o);var l=t(o)?r(o):void 0,c=l?l[0]:o.charAt(0),u=l?e(l,1).join(""):o.slice(1);return c[i]()+u}}return wu=a,wu}var ju,Wv;function B8(){if(Wv)return ju;Wv=1;var e=z8(),t=e("toUpperCase");return ju=t,ju}var F8=B8();const _l=Ne(F8);function ke(e){return function(){return e}}const _3=Math.cos,qs=Math.sin,Vt=Math.sqrt,Ws=Math.PI,kl=2*Ws,Mh=Math.PI,$h=2*Mh,Yr=1e-6,q8=$h-Yr;function k3(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function W8(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return k3;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 H8{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?k3:W8(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,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}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 o=this._x1,l=this._y1,c=n-t,u=a-r,d=o-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-o,v=a-l,x=c*c+u*u,m=p*p+v*v,g=Math.sqrt(x),b=Math.sqrt(h),w=i*Math.tan((Mh-Math.acos((x+h-m)/(2*g*b)))/2),C=w/b,y=w/g;Math.abs(C-1)>Yr&&this._append`L${t+C*d},${r+C*f}`,this._append`A${i},${i},0,0,${+(f*p>d*v)},${this._x1=t+y*c},${this._y1=r+y*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,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^o,h=o?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%$h+$h),h>q8?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>=Mh)},${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 Vm(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 H8(t)}function Um(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function T3(e){this._context=e}T3.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 Tl(e){return new T3(e)}function E3(e){return e[0]}function I3(e){return e[1]}function M3(e,t){var r=ke(!0),n=null,a=Tl,i=null,o=Vm(l);e=typeof e=="function"?e:e===void 0?E3:ke(e),t=typeof t=="function"?t:t===void 0?I3:ke(t);function l(c){var u,d=(c=Um(c)).length,f,h=!1,p;for(n==null&&(i=a(p=o())),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 ms(e,t,r){var n=null,a=ke(!0),i=null,o=Tl,l=null,c=Vm(u);e=typeof e=="function"?e:e===void 0?E3:ke(+e),t=typeof t=="function"?t:ke(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?I3:ke(+r);function u(f){var h,p,v,x=(f=Um(f)).length,m,g=!1,b,w=new Array(x),C=new Array(x);for(i==null&&(l=o(b=c())),h=0;h<=x;++h){if(!(h<x&&a(m=f[h],h,f))===g)if(g=!g)p=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),v=h-1;v>=p;--v)l.point(w[v],C[v]);l.lineEnd(),l.areaEnd()}g&&(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 M3().defined(a).curve(o).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?(o=f,i!=null&&(l=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=l=null:l=o(i=f),u):i},u}class $3{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 V8(e){return new $3(e,!0)}function U8(e){return new $3(e,!1)}const Km={draw(e,t){const r=Vt(t/Ws);e.moveTo(r,0),e.arc(0,0,r,0,kl)}},K8={draw(e,t){const r=Vt(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()}},R3=Vt(1/3),G8=R3*2,Z8={draw(e,t){const r=Vt(t/G8),n=r*R3;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Y8={draw(e,t){const r=Vt(t),n=-r/2;e.rect(n,n,r,r)}},X8=.8908130915292852,L3=qs(Ws/10)/qs(7*Ws/10),Q8=qs(kl/10)*L3,J8=-_3(kl/10)*L3,e9={draw(e,t){const r=Vt(t*X8),n=Q8*r,a=J8*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=kl*i/5,l=_3(o),c=qs(o);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*a,c*n+l*a)}e.closePath()}},Cu=Vt(3),t9={draw(e,t){const r=-Vt(t/(Cu*3));e.moveTo(0,r*2),e.lineTo(-Cu*r,-r),e.lineTo(Cu*r,-r),e.closePath()}},Pt=-.5,At=Vt(3)/2,Rh=1/Vt(12),r9=(Rh/2+1)*3,n9={draw(e,t){const r=Vt(t/r9),n=r/2,a=r*Rh,i=n,o=r*Rh+r,l=-i,c=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(l,c),e.lineTo(Pt*n-At*a,At*n+Pt*a),e.lineTo(Pt*i-At*o,At*i+Pt*o),e.lineTo(Pt*l-At*c,At*l+Pt*c),e.lineTo(Pt*n+At*a,Pt*a-At*n),e.lineTo(Pt*i+At*o,Pt*o-At*i),e.lineTo(Pt*l+At*c,Pt*c-At*l),e.closePath()}};function a9(e,t){let r=null,n=Vm(a);e=typeof e=="function"?e:ke(e||Km),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 Hs(){}function Vs(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 D3(e){this._context=e}D3.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:Vs(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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function i9(e){return new D3(e)}function z3(e){this._context=e}z3.prototype={areaStart:Hs,areaEnd:Hs,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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function s9(e){return new z3(e)}function B3(e){this._context=e}B3.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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function o9(e){return new B3(e)}function F3(e){this._context=e}F3.prototype={areaStart:Hs,areaEnd:Hs,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 l9(e){return new F3(e)}function Hv(e){return e<0?-1:1}function Vv(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),l=(i*a+o*n)/(n+a);return(Hv(i)+Hv(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function Uv(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Su(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,l=(i-n)/3;e._context.bezierCurveTo(n+l,a+l*t,i-l,o-l*r,i,o)}function Us(e){this._context=e}Us.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:Su(this,this._t0,Uv(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,Su(this,Uv(this,r=Vv(this,e,t)),r);break;default:Su(this,this._t0,r=Vv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function q3(e){this._context=new W3(e)}(q3.prototype=Object.create(Us.prototype)).point=function(e,t){Us.prototype.point.call(this,t,e)};function W3(e){this._context=e}W3.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 c9(e){return new Us(e)}function u9(e){return new q3(e)}function H3(e){this._context=e}H3.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=Kv(e),a=Kv(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(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 Kv(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[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 d9(e){return new H3(e)}function El(e,t){this._context=e,this._t=t}El.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 f9(e){return new El(e,.5)}function h9(e){return new El(e,0)}function p9(e){return new El(e,1)}function Yn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,l=i.length;r<o;++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 Lh(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function m9(e,t){return e[t]}function x9(e){const t=[];return t.key=e,t}function g9(){var e=ke([]),t=Lh,r=Yn,n=m9;function a(i){var o=Array.from(e.apply(this,arguments),x9),l,c=o.length,u=-1,d;for(const f of i)for(l=0,++u;l<c;++l)(o[l][u]=[0,+n(f,o[l].key,u,i)]).data=f;for(l=0,d=Um(t(o));l<c;++l)o[d[l]].index=l;return r(o,d),o}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?Lh:typeof i=="function"?i:ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??Yn,a):r},a}function v9(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}Yn(e,t)}}function y9(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,l=0;o<a;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}Yn(e,t)}}function b9(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var l=0,c=0,u=0;l<o;++l){for(var d=e[t[l]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,v=0;v<l;++v){var x=e[t[v]],m=x[n][1]||0,g=x[n-1][1]||0;p+=m-g}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,Yn(e,t)}}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)}var w9=["type","size","sizeType"];function Dh(){return Dh=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},Dh.apply(this,arguments)}function Gv(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 Zv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(r),!0).forEach(function(n){j9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j9(e,t,r){return t=C9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C9(e){var t=S9(e,"string");return hi(t)=="symbol"?t:t+""}function S9(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 N9(e,t){if(e==null)return{};var r=O9(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 O9(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 V3={symbolCircle:Km,symbolCross:K8,symbolDiamond:Z8,symbolSquare:Y8,symbolStar:e9,symbolTriangle:t9,symbolWye:n9},P9=Math.PI/180,A9=function(t){var r="symbol".concat(_l(t));return V3[r]||Km},_9=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*P9;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}},k9=function(t,r){V3["symbol".concat(_l(t))]=r},Gm=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,l=o===void 0?"area":o,c=N9(t,w9),u=Zv(Zv({},c),{},{type:n,size:i,sizeType:l}),d=function(){var m=A9(n),g=a9().type(m).size(_9(i,l,n));return g()},f=u.className,h=u.cx,p=u.cy,v=se(u,!0);return h===+h&&p===+p&&i===+i?S.default.createElement("path",Dh({},v,{className:ae.default("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};Gm.registerSymbol=k9;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 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 Yv(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 T9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yv(Object(r),!0).forEach(function(n){pi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I9(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,K3(n.key),n)}}function M9(e,t,r){return t&&I9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $9(e,t,r){return t=Ks(t),R9(e,U3()?Reflect.construct(t,r||[],Ks(e).constructor):t.apply(e,r))}function R9(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 L9(e)}function L9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U3=function(){return!!e})()}function Ks(e){return Ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ks(e)}function D9(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&&Bh(e,t)}function Bh(e,t){return Bh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Bh(e,t)}function pi(e,t,r){return t=K3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K3(e){var t=z9(e,"string");return Xn(t)=="symbol"?t:t+""}function z9(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 _t=32,Zm=(function(e){function t(){return E9(this,t),$9(this,t,arguments)}return D9(t,e),M9(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=_t/2,o=_t/6,l=_t/3,c=n.inactive?a:n.color;if(n.type==="plainline")return S.default.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:_t,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return S.default.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
|
|
21
|
+
${n.stack}`]})]}),a&&s.jsx(W,{onClick:a,variant:"secondary",hierarchy:"secondary",size:"sm",children:i})]})})})});H2.displayName="ErrorState";const sP=({groups:e,className:t,width:r,height:n})=>{const a=O.clsx("flex","items-center","justify-center","p-1 bg-brand-primary-main-special rounded-8 border border-brand-primary-accent-special gap-2"),[i,o]=P.useState(null);P.useEffect(()=>{const c=u=>{u.target?.closest("[data-floatingbar-dropdown]")||o(null)};if(i)return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[i]);const l={width:r,height:n};return s.jsx("div",{style:l,className:O.clsx("flex items-center gap-4 w-fit",t),children:e.map((c,u)=>s.jsx("div",{className:a,children:c.map(d=>s.jsx("div",{className:"relative",children:d.type==="dropdown"?s.jsxs("div",{"data-floatingbar-dropdown":d.id,className:"relative gap-4",children:[s.jsx(W,{variant:d.variant||"brand",hierarchy:d.hierarchy||"secondary",size:d.size||"sm",icons:d.label&&d.leadingIcon?"both":"trailing",leadingIcon:d.label?d.leadingIcon:void 0,trailingIcon:i===d.id?s.jsx(sm,{}):s.jsx(im,{}),onClick:()=>o(i===d.id?null:d.id),disabled:d.disabled,style:{outline:"none",boxShadow:"none"},className:O.clsx(d.className,i===d.id&&"bg-brand-primary-accent-special"),children:d.label?d.label:S.default.isValidElement(d.leadingIcon)?S.default.cloneElement(d.leadingIcon,{size:18,color:"currentColor"}):d.leadingIcon}),i===d.id&&s.jsx(Ht,{floating:!0,size:d.dropMenuSize||"sm",selectedIds:d.selectedIds,items:d.items.map(f=>({id:f.id,title:f.label,leadingIcon:f.icon,showLeadingIcon:!!f.icon,showDescription:d.showDescription??!1,showTrailingIcon:d.showTrailingIcon??!1,showTrailingText:d.showTrailingText??!1,trailingText:f.trailingText,showTag:d.showTag??!1,showCheckbox:d.showCheckbox??!1,disabled:f.disabled,showDividerAfter:f.showDividerAfter,onClick:()=>{f.onClick(),o(null)},...f.destructive&&{customTitleColor:d.destructiveColor||"text-danger-em"}})),className:O.clsx("bottom-full mb-4",d.dropMenuClassName)})]}):s.jsx(W,{variant:d.variant||"brand",hierarchy:d.hierarchy||"secondary",size:d.size||"sm",icons:d.label?d.leadingIcon&&d.trailingIcon?"both":d.leadingIcon?"leading":d.trailingIcon?"trailing":void 0:"only",leadingIcon:d.leadingIcon,trailingIcon:d.trailingIcon,onClick:d.onClick,disabled:d.disabled,style:{outline:"none",boxShadow:"none"},className:O.clsx(d.className,d.isActive&&"bg-brand-primary-accent-special"),children:d.label})},d.id))},u))})},V2=({icon:e,text:t,onClick:r,className:n=""})=>{const a=()=>{r&&r()};return s.jsxs("div",{className:O.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&&s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(ie,{size:20,color:"var(--low-em)",children:e})}),t&&s.jsx("span",{className:"font-inter font-semibold text-[10px] text-low-em mt-1",children:t})]})},dm=e=>e?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[e]:"",fm=e=>e?{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"}[e]:"",oP={sm:"h-13",md:"h-14",lg:"h-[60px]"},U2=({gap:e=4,justify:t,align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex",tr(e),dm(t),fm(r),n),...i,children:a}),K2=({gap:e=4,justify:t="center",align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex h-full",tr(e),dm(t),fm(r),n),...i,children:a}),G2=({gap:e=5,justify:t="end",align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex",tr(e),dm(t),fm(r),n),...i,children:a}),lP={always:"flex",desktop:"hidden lg:flex",none:"hidden"},sl=e=>{const{className:t,bordered:r=!0,size:n="lg",logoVariant:a="with-text",showLogo:i="always",children:o,logoSectionGap:l=6,leftWidth:c,centerWidth:u,rightWidth:d,centerFullHeight:f=!0,showCenterOnMobile:h=!1,...p}=e,v=S.default.Children.toArray(o).find(g=>S.default.isValidElement(g)&&g.type===U2),x=S.default.Children.toArray(o).find(g=>S.default.isValidElement(g)&&g.type===K2),m=S.default.Children.toArray(o).find(g=>S.default.isValidElement(g)&&g.type===G2);return s.jsx("header",{className:ae.default("relative w-full bg-white",r&&"border-b border-surface-4",t),...p,children:s.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",oP[n]),children:[s.jsxs("div",{className:ae.default("flex items-center",c!==void 0?"lg:pl-8!":"shrink-0",tr(l)),style:c!==void 0?{width:`${c}%`}:void 0,children:[i!=="none"&&s.jsx("div",{className:ae.default("items-center",lP[i]),children:a==="with-text"?s.jsx(Ms,{height:25,className:"text-black"}):s.jsx($s,{height:25,className:"text-black"})}),v]}),x&&s.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}),s.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})]})})};sl.LeftContent=U2;sl.Center=K2;sl.Right=G2;function cP(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,o=a>0?a:t,l=100-i-o;return{leftWidth:i,centerWidth:l,rightWidth:o}}const Z2=e=>e?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[e]:"",Y2=e=>e?{start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"}[e]:"",uP={sm:"h-13",md:"h-14",lg:"h-[60px]"},X2=({gap:e=4,justify:t,align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex",tr(e),Z2(t),Y2(r),n),...i,children:a}),Q2=({gap:e=4,justify:t="end",align:r="center",className:n,children:a,...i})=>s.jsx("div",{className:ae.default("flex",tr(e),Z2(t),Y2(r),n),...i,children:a}),ol=e=>{const{className:t,bordered:r=!0,size:n="md",logoVariant:a="no-text",showLogo:i="always",children:o,logoSectionGap:l=6,leftWidth:c,rightWidth:u,...d}=e,f=S.default.Children.toArray(o).find(p=>S.default.isValidElement(p)&&p.type===X2),h=S.default.Children.toArray(o).find(p=>S.default.isValidElement(p)&&p.type===Q2);return s.jsxs("footer",{className:ae.default("relative w-full bg-white",r&&"border-t border-surface-4",t),...d,children:[s.jsxs("div",{className:"flex flex-col gap-8 px-container-mobile py-8 lg:hidden",children:[i!=="none"&&s.jsx("div",{className:"flex items-center",children:a==="with-text"?s.jsx(Ms,{height:22,className:"text-black"}):s.jsx($s,{height:22,className:"text-black"})}),f&&s.jsx("div",{className:"flex items-center",children:f}),h&&s.jsx("div",{className:"flex items-center gap-4 px-0",children:h})]}),s.jsxs("div",{className:ae.default("hidden lg:flex items-center justify-between lg:px-container-desktop",uP[n]),children:[s.jsxs("div",{className:ae.default("flex items-center shrink-0",tr(l)),style:c!==void 0?{width:`${c}%`}:void 0,children:[i!=="none"&&s.jsx("div",{className:"flex items-center",children:a==="with-text"?s.jsx(Ms,{height:22,className:"text-black"}):s.jsx($s,{height:22,className:"text-black"})}),f]}),s.jsx("div",{className:"flex items-center shrink-0 ml-auto",style:u!==void 0?{width:`${u}%`}:void 0,children:h})]})]})};ol.Left=X2;ol.Right=Q2;ol.displayName="Footer";const ll=P.forwardRef(({onSearch:e,debounceMs:t=300,isLoading:r=!1,showClearButton:n=!0,errorMessage:a,suggestions:i=[],onSuggestionClick:o,placeholder:l="Search...",value:c,onChange:u,disabled:d=!1,id:f,name:h,autoComplete:p,maxLength:v,required:x,onBlur:m,onFocus:g,onInvalid:b,"aria-label":w="Search",className:C,size:y,...j},N)=>{const[A,k]=P.useState(""),[I,_]=P.useState(!1),[E,T]=P.useState(-1),R=P.useRef(null),M=c!==void 0,$=M?c:A,L=L2($,t);P.useEffect(()=>{L&&e&&e(L)},[L,e]),P.useEffect(()=>{const X=re=>{R.current&&!R.current.contains(re.target)&&_(!1)};return document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}},[]);const q=X=>{const re=X.target.value;M||k(re),u&&u(X),re&&i.length>0?(_(!0),T(-1)):_(!1)},U=X=>{if(X.key==="Enter"){if(X.preventDefault(),I&&E>=0&&E<i.length){const re=i[E];H(re)}else e&&$&&e($);_(!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"&&(_(!1),T(-1))},D=X=>{$&&i.length>0&&_(!0),g&&g(X)},F=()=>{const X={target:{value:""}};M||k(""),u&&u(X),_(!1),T(-1)},H=X=>{const re={target:{value:X}};M||k(X),u&&u(re),o&&o(X),_(!1),T(-1)},G=a?"danger":"default",J=r?s.jsx(B.ArrowRotateRight,{color:"currentColor",size:16,className:"animate-spin text-primary-500"}):$&&n&&s.jsx("button",{type:"button",onClick:F,className:"text-gray-500 hover:text-gray-700 focus:outline-none transition-colors","aria-label":"Clear search",children:s.jsx(B.CloseCircle,{color:"currentColor",size:16})}),ne=i.filter(X=>X.toLowerCase().includes($.toLowerCase()));return s.jsxs("div",{className:"relative w-full",ref:R,children:[s.jsx(me,{ref:N,className:O.clsx("w-full text-placeholder",C),value:$,onChange:q,onKeyDown:U,onFocus:D,onBlur:m,onInvalid:b,variant:G,hint:a,leadingIcon:s.jsx(B.SearchNormal1,{color:"currentColor",size:16}),trailingIcon:J,placeholder:l,disabled:d,id:f,name:h,autoComplete:p,maxLength:v,required:x,"aria-label":w,...j}),I&&ne.length>0&&s.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)=>s.jsx("div",{className:O.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:()=>H(X),role:"option","aria-selected":re===E,children:X},re))})]})});ll.displayName="InputSearch";const hm=s5,sg=Object.keys(hm).filter(e=>/^[A-Z]/.test(e)).sort((e,t)=>e.localeCompare(t)),pm=({name:e,size:t=20,color:r="currentColor",className:n})=>{if(!e)return null;const a=hm[e];return a?s.jsx(a,{size:t,color:r,className:n}):null};pm.displayName="IconByName";const ds=5,og=56,cl=({value:e,onChange:t,searchPlaceholder:r="Buscar icono",gridHeight:n=280,className:a})=>{const[i,o]=S.default.useState(""),l=L2(i,150),c=S.default.useRef(null),u=S.default.useMemo(()=>{const h=l.trim().toLowerCase();return h?sg.filter(p=>p.toLowerCase().includes(h)):sg},[l]),d=Math.ceil(u.length/ds),f=Bj.useVirtualizer({count:d,getScrollElement:()=>c.current,estimateSize:()=>og,overscan:6});return S.default.useEffect(()=>{f.scrollToOffset(0)},[l,f]),s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-col gap-3",a)),children:[s.jsx(ll,{placeholder:r,value:i,onChange:h=>o(h.target.value)}),u.length===0?s.jsx("div",{style:{height:n},className:"flex items-center justify-center",children:s.jsx("span",{className:"text-sm text-low-em",children:"Sin resultados"})}):s.jsx("div",{ref:c,className:"ds-scrollbar overflow-y-auto",style:{height:n},children:s.jsx("div",{style:{height:f.getTotalSize(),position:"relative",width:"100%"},children:f.getVirtualItems().map(h=>{const p=h.index*ds,v=u.slice(p,p+ds);return s.jsx("div",{className:"absolute left-0 top-0 grid w-full place-items-center gap-2",style:{gridTemplateColumns:`repeat(${ds}, minmax(0, 1fr))`,height:og,transform:`translateY(${h.start}px)`},children:v.map(x=>{const m=hm[x];if(!m)return null;const g=e===x;return s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(m,{}),title:x,"aria-label":x,"aria-pressed":g,onClick:()=>t(x),className:O.clsx(g&&"bg-info-accent-2 hover:bg-info-accent-2 text-high-em")},x)})},h.key)})})})]})};cl.displayName="IconPicker";const J2=S.default.createContext(void 0);function eC(){const e=S.default.useContext(J2);if(!e)throw new Error("Must be used inside DropIconPicker");return e}const tC=({children:e,value:t,onChange:r})=>{const[n,a]=S.default.useState(!1),i=S.default.useRef(null);return s.jsx(J2.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};tC.displayName="DropIconPicker";const rC=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=eC();return S.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};rC.displayName="DropIconPickerTrigger";const nC=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=eC(),o=S.default.useRef(null),l=Na({triggerRef:i,panelRef:o,enabled:t});return Qi({refs:[i,o],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u"?null:yn.createPortal(s.jsx("div",{ref:o,className:O.clsx("w-[320px] rounded-xl border border-surface-3 bg-white p-4",e),style:l,children:s.jsx(cl,{value:n,onChange:c=>{a(c),r(!1)}})}),document.body)};nC.displayName="DropIconPickerContent";const dP={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"}},fP={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}},lg={container:"opacity-50 cursor-not-allowed pointer-events-none",dropZone:"cursor-not-allowed"},hP=({onImageSelected:e,variant:t="default",size:r="md",className:n,acceptedFileTypes:a="image/*",maxFileSize:i,disabled:o=!1,initialPreviewUrl:l})=>{const c=P.useRef(null),u=P.useRef(0),[d,f]=P.useState(!1),[h,p]=P.useState(l||null),[v,x]=P.useState(!1),[m,g]=P.useState(null),b=dP[t],w=fP[r],C=T=>{if(i&&T.size>i){const R=(i/1048576).toFixed(1);g(`File size must be less than ${R}MB`);return}if(!T.type.startsWith("image/")){g("Please select a valid image file");return}g(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])},N=T=>{T.preventDefault(),o||f(!0)},A=T=>{T.preventDefault(),!o&&(u.current+=1,f(!0))},k=T=>{T.preventDefault(),u.current-=1,u.current<=0&&(f(!1),u.current=0)},I=T=>{T.stopPropagation(),c.current?.click()},_=()=>{o||x(!0)},E=()=>{x(!1)};return s.jsx("div",{className:O.clsx("flex flex-col",n),children:s.jsx("div",{className:O.clsx(b.container,w.container,o&&lg.container),children:s.jsxs("div",{className:O.clsx(b.dropZone,w.dropZone,"cursor-pointer relative",o&&lg.dropZone,d&&!h&&"bg-black/20"),onDrop:o?void 0:j,onDragOver:o?void 0:N,onDragEnter:o?void 0:A,onDragLeave:o?void 0:k,onClick:o?void 0:I,children:[h?s.jsxs("div",{className:O.clsx("absolute inset-0 overflow-hidden transition-all duration-200",w.preview),onMouseEnter:_,onMouseLeave:E,children:[s.jsx("img",{src:h,alt:"Preview",className:O.clsx("w-full h-full object-cover transition-all duration-200",v&&"brightness-90")}),v&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center transition-all duration-200",children:s.jsx(W,{onClick:I,variant:"neutral",size:"xs",disabled:o,children:"Change Image"})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:O.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:s.jsx(f2,{size:w.iconSize,className:O.clsx(o&&"text-disabled")})}),s.jsx("div",{className:O.clsx("text-center text-[11px] font-body font-medium leading-tight tracking-normal whitespace-normal break-words",o&&"text-disabled"),children:"Drag your image to start uploading"}),s.jsxs("div",{className:"my-2 w-full flex items-center justify-center",children:[s.jsx("span",{className:"border-t w-1/2 mx-2 border-low-em"}),s.jsx("span",{className:O.clsx("text-xs ml-2 mr-2",d?"text-med-em":"text-high-em",o&&"text-disabled"),children:"OR"}),s.jsx("span",{className:"border-t w-1/2 mx-2 border-low-em"})]})]}),!h&&s.jsx(W,{onClick:I,variant:"neutral",size:"xs",className:"mt-1",disabled:o,children:"Browse"}),s.jsx("input",{type:"file",accept:a,ref:c,className:"hidden",onChange:y,disabled:o})]})})})},pP={default:{background:"bg-surface-2",iconColor:"text-[var(--med-em)]",titleColor:"text-high-em",descriptionColor:"text-med-em"},danger:{background:"bg-danger-accent-1",iconColor:"text-[var(--danger-main)]",titleColor:"text-danger-main",descriptionColor:"text-danger-main"},success:{background:"bg-success-accent-1",iconColor:"text-[var(--success-main)]",titleColor:"text-success-em",descriptionColor:"text-success-em"}},mP=({variant:e="default",title:t,description:r,icon:n,className:a})=>{const i=pP[e],l=(u=>{const d=u.match(/text-\[var\(--([^)]+)\)\]/);if(d)return`var(--${d[1]})`})(i.iconColor),c=()=>n&&S.default.isValidElement(n)?S.default.cloneElement(n,{color:l}):s.jsx(B.Warning2,{size:12,variant:"Outline",color:l});return s.jsxs("div",{className:O.clsx("flex flex-col gap-0.5 px-8 py-4 rounded-xl",i.background,a),children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-shrink-0",children:c()}),s.jsx("span",{className:O.clsx("text-[12px] font-semibold leading-tight",i.titleColor),children:t})]}),s.jsx("span",{className:O.clsx("text-[10px] font-medium leading-tight mt-2",i.descriptionColor),children:r})]})},Oa=({children:e,content:t,side:r="top",sideOffset:n=5,showArrow:a=!0,className:i,maxWidth:o="max-w-xs",delayDuration:l,disabled:c=!1,primaryButton:u,secondaryButton:d,customBackground:f,customTextColor:h,customFontSize:p})=>{if(c)return e;const v=u||d,x={};return f&&(x.backgroundColor=f),h&&(x.color=h),p&&(x.fontSize=p),s.jsxs(Ct.Root,{delayDuration:l,children:[s.jsx(Ct.Trigger,{asChild:!0,children:e}),s.jsx(Ct.Portal,{children:s.jsxs(Ct.Content,{side:r,sideOffset:n,className:O.clsx("z-50 overflow-hidden rounded-6 p-6 shadow-e2",!f&&"bg-surface-bg",!h&&"text-high-em",!p&&"text-xs","font-medium",o,"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:[s.jsxs("div",{className:O.clsx(v&&"flex flex-col gap-8"),children:[s.jsx("div",{children:t}),v&&s.jsxs("div",{className:"flex gap-4 items-center w-full",children:[u&&s.jsx(W,{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&&s.jsx(W,{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&&s.jsx(Ct.Arrow,{className:f?void 0:"fill-surface-bg",style:f?{fill:f}:void 0})]})})]})},xP=256,gP=64,aC=P.createContext(null);function bn(){const e=P.useContext(aC);if(!e)throw new Error("useSidebar must be used within <Sidebar>");return e}const iC=P.forwardRef(({collapsed:e,defaultCollapsed:t=!1,onCollapsedChange:r,keyboardShortcut:n=!0,className:a,children:i,...o},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=v=>{(v.metaKey||v.ctrlKey)&&v.key.toLowerCase()==="b"&&(v.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[n,h]),s.jsx(aC.Provider,{value:{collapsed:d,toggle:h,setCollapsed:f},children:s.jsx(zj.TooltipProvider,{delayDuration:300,children:s.jsx("aside",{ref:l,"data-state":d?"collapsed":"expanded",style:{width:d?gP:xP},className:Q.twMerge(O.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)),...o,children:i})})})});iC.displayName="Sidebar";function vP({className:e,children:t,...r}){return s.jsx("div",{className:Q.twMerge("flex flex-col gap-[8px] p-[12px]",e),...r,children:t})}const yP="[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 bP({className:e,children:t,...r}){return s.jsx("div",{className:Q.twMerge(O.clsx("flex min-h-0 flex-1 flex-col gap-[4px] overflow-y-auto px-[12px]",yP,e)),...r,children:t})}function wP({className:e,children:t,...r}){return s.jsx("div",{className:Q.twMerge("mt-auto flex flex-col gap-[8px] p-[12px]",e),...r,children:t})}function jP({placeholder:e="Buscar...",...t}){const{collapsed:r}=bn();return r?s.jsx(Oa,{content:"Buscar",side:"right",children:s.jsx(W,{"aria-label":"Buscar",variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(B.SearchNormal1,{color:"currentColor"}),className:"h-[40px] w-[40px] !rounded-[10px] focus:ring-0"})}):s.jsx(ll,{placeholder:e,...t})}function CP({className:e,children:t,...r}){return s.jsx("div",{className:Q.twMerge("flex flex-col gap-[2px]",e),...r,children:t})}function SP({className:e,children:t,...r}){const{collapsed:n}=bn();return n?null:s.jsx("div",{className:Q.twMerge("px-[10px] pt-[14px] pb-[4px] text-[11px] font-medium tracking-wide text-low-em uppercase",e),...r,children:t})}const sC=P.forwardRef(({icon:e,label:t,active:r,trailing:n,className:a,...i},o)=>{const{collapsed:l}=bn(),c=s.jsxs("button",{ref:o,"aria-label":t,"data-active":r||void 0,className:Q.twMerge(O.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:[s.jsx("span",{className:"flex h-[20px] w-[20px] shrink-0 items-center justify-center",children:e}),!l&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t}),!l&&n]});return l?s.jsx(Oa,{content:t,side:"right",children:c}):c});sC.displayName="Sidebar.Item";function NP({children:e}){const{collapsed:t}=bn();return t?null:s.jsx(s.Fragment,{children:e})}function OP({name:e,email:t,avatarUrl:r,initials:n,onClick:a}){const{collapsed:i}=bn();return i?s.jsx(Oa,{content:e,side:"right",children:s.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:s.jsx(Ft,{size:"sm",imageUrl:r,initials:n})})}):s.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:[s.jsx(Ft,{size:"sm",imageUrl:r,initials:n}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm font-medium text-high-em",children:e}),t&&s.jsx("span",{className:"block truncate text-xs text-low-em",children:t})]}),s.jsx(B.ArrowUp2,{size:16,color:"var(--low-em)",className:"shrink-0"})]})}function PP({className:e,...t}){const{collapsed:r,toggle:n}=bn();return s.jsx(W,{"aria-label":r?"Expandir menú":"Colapsar menú",variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(B.ArrowLeft2,{color:"currentColor",className:r?"rotate-180":void 0}),onClick:n,className:Q.twMerge("h-[40px] w-[40px] shrink-0 !rounded-[10px] focus:ring-0",e),...t})}const AP=Object.assign(iC,{Header:vP,Content:bP,Footer:wP,Search:jP,Group:CP,GroupLabel:SP,Item:sC,Card:NP,User:OP,Trigger:PP}),_P=({label:e,kind:t="link",icon:r,editControl:n,onRemove:a,dragHandleRef:i,dragHandleProps:o,floating:l})=>s.jsxs("div",{className:O.clsx("flex min-h-[50px] items-center gap-1 rounded-lg border border-surface-3 bg-surface-1 pr-3",l&&"shadow-lg"),children:[s.jsx("button",{ref:i,type:"button","aria-label":"Reordenar",className:"flex shrink-0 cursor-grab items-center px-3 py-4 active:cursor-grabbing focus:outline-none",...o,children:s.jsx(B.HambergerMenu,{size:18,color:"var(--high-em)"})}),t==="divider"?s.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3 pl-1 pr-2",children:[s.jsx("span",{className:"shrink-0 text-xs font-medium uppercase tracking-wide text-low-em",children:"Divisor"}),s.jsx(fe,{className:"flex-1"})]}):t==="section"?s.jsx("span",{className:"min-w-0 flex-1 truncate pl-1 text-xs font-semibold uppercase tracking-wide text-low-em",children:e}):s.jsx(vt,{as:"div",size:"sm",title:e,showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!!r,leadingIcon:r,className:"min-w-0 flex-1 bg-transparent pl-0 pr-0 hover:bg-transparent active:bg-transparent"}),(n||a)&&s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[n,a&&s.jsx(W,{"aria-label":"Eliminar",variant:"danger",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Trash,{}),onClick:a})]})]}),kP=({isSorting:e,wasDragging:t})=>!(e||t),TP=({id:e,label:t,kind:r,icon:n,depth:a,indentationWidth:i,editControl:o,onRemove:l})=>{const{attributes:c,listeners:u,setNodeRef:d,setActivatorNodeRef:f,transform:h,transition:p,isDragging:v}=Ve.useSortable({id:e,animateLayoutChanges:kP}),x={transform:Yo.CSS.Translate.toString(h),transition:p,paddingLeft:a*i};return s.jsx("div",{ref:d,style:x,className:O.clsx("w-full",v&&"z-10"),children:v?s.jsx(Gn,{className:"h-[50px]"}):s.jsx(_P,{label:t,kind:r,icon:n,editControl:o,onRemove:l,dragHandleRef:f,dragHandleProps:{...c,...u}})})},EP={sm:"max-w-[300px] w-full",md:"w-[32rem]",lg:"w-[40rem]"},mm={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"}},oC=P.createContext(void 0),wn=()=>{const e=P.useContext(oC);if(!e)throw new Error("useDropModalContext must be used within a DropModal");return e},un=({children:e,size:t="md",padding:r,open:n,onClose:a,triggerRef:i})=>{const[o,l]=P.useState(!1),c=P.useRef(null),u=n!==void 0,d=u?n:o,f=p=>{u||l(p),p||a?.()},h=i??c;return s.jsx(oC.Provider,{value:{open:d,setOpen:f,size:t,padding:r??t,triggerRef:h},children:e})};un.displayName="DropModal";const ul=({children:e})=>{const{setOpen:t,open:r,triggerRef:n}=wn();return S.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),t(!r)}})};ul.displayName="DropModalTrigger";const dn=P.forwardRef(({children:e,className:t},r)=>{const{open:n,setOpen:a,size:i,triggerRef:o}=wn(),l=()=>a(!1),{panelRef:c,portalStyle:u,backdropProps:d}=y6({triggerRef:o,open:n,onClose:l,constrain:!0});return!n||typeof document>"u"?null:yn.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{...d}),s.jsx("div",{ref:f=>{c.current=f,typeof r=="function"?r(f):r&&(r.current=f)},role:"dialog","aria-modal":"true",className:O.clsx("bg-white rounded-2xl shadow-xl flex flex-col border border-surface-3 overflow-hidden",EP[i],t),style:u,children:e})]}),document.body)});dn.displayName="DropModalContent";const fn=({children:e,disabled:t=!1,className:r,leftIcon:n,onLeftAction:a,leftButtonRef:i,rightIcon:o,onRightAction:l,rightButtonRef:c})=>{const{setOpen:u,padding:d}=wn(),f=mm[d];return s.jsxs("header",{className:O.clsx("flex items-center border-b border-surface-3 shrink-0 rounded-t-xl",f.header,r),children:[s.jsx(W,{ref:i,variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",className:O.clsx("cursor-pointer",!n&&"invisible"),leadingIcon:n&&s.jsx(ie,{size:"sm",children:n}),onClick:a,disabled:t||!a}),s.jsx("div",{className:"flex-1 flex justify-center items-center",children:e}),s.jsx(W,{ref:c,variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",className:"cursor-pointer",leadingIcon:s.jsx(ie,{size:"sm",children:o??s.jsx(it,{className:"text-high-em"})}),onClick:l??(()=>u(!1)),disabled:t})]})};fn.displayName="DropModalHeader";const xm=P.forwardRef(({className:e,...t},r)=>s.jsx("h3",{ref:r,className:O.clsx("font-semibold text-xs leading-tight text-center text-high-em",e),...t}));xm.displayName="DropModalTitle";const hn=({children:e,className:t,padding:r})=>{const{padding:n}=wn(),a=mm[n],i=r??!t;return s.jsx("main",{className:O.clsx(i&&a.body,"flex-1 overflow-y-auto",t),children:e})};hn.displayName="DropModalBody";const gm=({className:e,children:t,...r})=>{const{padding:n}=wn(),a=mm[n];return s.jsx("footer",{className:O.clsx("flex items-center border-t border-surface-3 shrink-0",a.footer,e),...r,children:t})};gm.displayName="DropModalFooter";const pn=({cancelButton:e,saveButton:t,className:r})=>{const{setOpen:n,size:a}=wn(),i=a==="sm",o=(l,c)=>{l.onClick?.(c),l.closeOnClick!==!1&&n(!1)};return s.jsx(gm,{className:O.clsx(i?"flex-row gap-5":"justify-end",r),children:s.jsxs("div",{className:O.clsx("flex",i?"flex-row gap-5 w-full justify-end":"gap-5"),children:[e&&s.jsx(W,{variant:e.variant||"neutral",hierarchy:e.hierarchy||"primary",size:e.size||"xs",...e,className:e.className,onClick:l=>o(e,l),children:e.label}),t&&s.jsx(W,{variant:t.variant||"secondary",hierarchy:t.hierarchy||"primary",size:t.size||"xs",...t,className:t.className,onClick:l=>o(t,l),children:t.label})]})})};pn.displayName="DropModalFooterActions";const lC=({children:e})=>{const{setOpen:t}=wn();return S.default.cloneElement(e,{onClick:r=>{e.props.onClick?.(r),t(!1)}})};lC.displayName="DropModalClose";const IP=({item:e,labelOnly:t,onSave:r})=>{const[n,a]=S.default.useState(e.label),[i,o]=S.default.useState(e.icon??""),[l,c]=S.default.useState(e.action??""),[u,d]=S.default.useState(!1);return S.default.useEffect(()=>{a(e.label),o(e.icon??""),c(e.action??""),d(!1)},[e.label,e.icon,e.action]),s.jsxs(un,{size:"sm",children:[s.jsx(ul,{children:s.jsx(W,{"aria-label":"Editar",variant:"neutral",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Edit2,{})})}),s.jsxs(dn,{className:"!w-72",children:[s.jsx(fn,{children:t?"Editar sección":"Editar ítem"}),s.jsx(hn,{padding:!0,children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(me,{label:"Nombre",placeholder:t?"Nombre de la sección":"Nombre del ítem",value:n,onChange:f=>a(f.target.value),type:"text"}),!t&&s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-high-em",children:"Icono"}),s.jsx(W,{variant:"neutral",hierarchy:"tertiary",size:"md",icons:"only",leadingIcon:i?s.jsx(pm,{name:i}):s.jsx(B.Gallery,{}),onClick:()=>d(f=>!f),"aria-label":"Elegir icono"}),u&&s.jsx(cl,{value:i||void 0,onChange:f=>{o(f),d(!1)},gridHeight:168})]})]})}),s.jsx(pn,{cancelButton:{label:"Cancelar",closeOnClick:!0},saveButton:{label:"Guardar",closeOnClick:!0,onClick:()=>r({label:n,icon:i||void 0,action:l||void 0})}})]})]})};function cC(e,t=null,r=0){return e.reduce((n,a,i)=>[...n,{...a,parentId:t,depth:r,index:i},...cC(a.children??[],a.id,r+1)],[])}function Wa(e){return cC(e)}function ic(e){const t="root",r={id:t,children:[]},n={[String(t)]:r},a=e.map(o=>({...o,children:[]}));for(const o of a){const l=o.parentId??t,c=n[String(l)]??a.find(u=>u.id===l);n[String(o.id)]=o,c?.children.push(o)}const i=o=>{const l={id:o.id,label:o.label};return o.kind!==void 0&&(l.kind=o.kind),o.icon!==void 0&&(l.icon=o.icon),o.action!==void 0&&(l.action=o.action),o.children&&o.children.length>0&&(l.children=o.children.map(i)),l};return r.children.map(i)}function cg(e,t){const r=[...t];return e.filter(n=>n.parentId!=null&&r.includes(n.parentId)?(n.children?.length&&r.push(n.id),!1):!0)}function MP(e,t,r,n,a,i){const o=e.findIndex(({id:w})=>w===r),l=e.findIndex(({id:w})=>w===t),c=e[l],u=Ve.arrayMove(e,l,o),d=u[o-1],f=u[o+1],h=Math.round(n/a),p=c.depth+h,v=!!d&&d.kind!=="section"&&d.kind!=="divider";let x=d?v?d.depth+1:d.depth:0;i!=null&&(x=Math.min(x,i));const m=f?f.depth:0;let g=p;return p>=x?g=x:p<m&&(g=m),{depth:g,maxDepth:x,minDepth:m,parentId:b()};function b(){return g===0||!d?null:g===d.depth?d.parentId:g>d.depth?d.id:u.slice(0,o).reverse().find(C=>C.depth===g)?.parentId??null}}const $P=({items:e,onChange:t,indentationWidth:r=24,maxDepth:n,editable:a=!1,iconOptions:i,renderIcon:o,className:l})=>{const[c,u]=S.default.useState(null),[d,f]=S.default.useState(null),[h,p]=S.default.useState(0),v=S.default.useMemo(()=>{const _=Wa(e);return c!=null?cg(_,[c]):_},[e,c]),x=S.default.useMemo(()=>{if(c==null)return 0;const _=Wa(e),E=_.findIndex(M=>M.id===c);if(E===-1)return 0;const T=_[E].depth;let R=T;for(let M=E+1;M<_.length&&_[M].depth>T;M++)_[M].depth>R&&(R=_[M].depth);return R-T},[e,c]),m=n==null?void 0:Math.max(0,n-x),g=c!=null&&d!=null?MP(v,c,d,h,r,m):null,b=S.default.useMemo(()=>v.map(({id:_})=>_),[v]),w=Be.useSensors(Be.useSensor(Be.PointerSensor,{activationConstraint:{distance:8}})),C=()=>{u(null),f(null),p(0)},y=({active:_})=>{u(_.id),f(_.id)},j=({delta:_})=>p(_.x),N=({over:_})=>f(_?.id??null),A=({active:_,over:E})=>{if(C(),!g||!E)return;const{depth:T,parentId:R}=g,M=Wa(e).map(U=>({...U})),$=M.findIndex(({id:U})=>U===E.id),L=M.findIndex(({id:U})=>U===_.id);if(L===-1)return;M[L]={...M[L],depth:T,parentId:R};const q=Ve.arrayMove(M,L,$);t(ic(q))},k=(_,E)=>{const T=Wa(e).map(R=>R.id===_?{...R,label:E.label,icon:E.icon,action:E.action}:R);t(ic(T))},I=_=>{const E=Wa(e),T=cg(E,[_]).filter(R=>R.id!==_);t(ic(T))};return s.jsx(Be.DndContext,{sensors:w,collisionDetection:Be.closestCenter,measuring:{droppable:{strategy:Be.MeasuringStrategy.Always}},onDragStart:y,onDragMove:j,onDragOver:N,onDragEnd:A,onDragCancel:C,children:s.jsx(Ve.SortableContext,{items:b,strategy:Ve.verticalListSortingStrategy,children:s.jsx("div",{className:Q.twMerge(O.clsx("flex w-full flex-col gap-2",l)),children:v.map(_=>s.jsx(TP,{id:_.id,label:_.label,kind:_.kind,icon:_.icon&&o?o(_.icon):void 0,depth:_.id===c&&g?g.depth:_.depth,indentationWidth:r,editControl:a&&_.kind!=="divider"?s.jsx(IP,{item:_,iconOptions:i,labelOnly:_.kind==="section",onSave:E=>k(_.id,E)}):void 0,onRemove:a?()=>I(_.id):void 0},_.id))})})})},vm=({title:e,defaultOpen:t=!1,children:r})=>{const[n,a]=S.default.useState(t);return s.jsxs("div",{className:"overflow-hidden rounded-lg border border-surface-3",children:[s.jsx(vt,{as:"button",size:"sm",title:e,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingText:!1,showTrailingIcon:!0,trailingIcon:n?s.jsx(B.ArrowUp2,{}):s.jsx(B.ArrowDown2,{}),onClick:()=>a(i=>!i),customTitleColor:"text-high-em",className:"w-full min-w-0 bg-surface-1"}),n&&s.jsx("div",{className:"border-t border-surface-3 p-4",children:r})]})},RP=({title:e,items:t,renderIcon:r,defaultCollapsed:n,addLabel:a="Añadir al menú",onAdd:i})=>{const[o,l]=S.default.useState(new Set),c=d=>l(f=>{const h=new Set(f);return h.has(d)?h.delete(d):h.add(d),h}),u=()=>{const d=t.filter(f=>o.has(f.id));d.length!==0&&(i(d),l(new Set))};return s.jsx(vm,{title:e,defaultOpen:!n,children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("div",{className:"ds-scrollbar flex max-h-[200px] flex-col gap-1 overflow-y-auto",children:t.length===0?s.jsx("span",{className:"px-2 py-2 text-xs text-low-em",children:"Sin ítems"}):t.map(d=>{const f=!!(d.icon&&r);return s.jsx(vt,{as:"button",size:"sm",title:d.label,showCheckbox:!0,checked:o.has(d.id),onCheckboxChange:()=>c(d.id),showLeadingImage:!1,showDescription:!1,showTag:!1,showTrailingText:!1,showTrailingIcon:!1,showLeadingIcon:f,leadingIcon:f?r(d.icon):void 0,onClick:()=>c(d.id),className:"w-full min-w-0 rounded-md",style:{paddingLeft:8,paddingRight:8}},d.id)})}),s.jsx("div",{className:"flex justify-end",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),disabled:o.size===0,onClick:u,children:a})})]})})};function LP(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const DP=({title:e,defaultCollapsed:t,onAdd:r})=>{const[n,a]=S.default.useState(""),[i,o]=S.default.useState(""),l=()=>{n.trim()&&(r({id:`custom_${LP()}`,label:n.trim(),action:i.trim()||void 0}),a(""),o(""))};return s.jsx(vm,{title:e,defaultOpen:!t,children:s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(me,{label:"Nombre",placeholder:"Texto del enlace",value:n,onChange:c=>a(c.target.value),type:"text"}),s.jsx(me,{label:"URL / acción",placeholder:"https://… o /ruta",value:i,onChange:c=>o(c.target.value),type:"text"}),s.jsx("div",{className:"flex justify-end",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),disabled:!n.trim(),onClick:l,children:"Añadir al menú"})})]})})};function ug(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const zP=({title:e,defaultCollapsed:t,onAdd:r})=>{const[n,a]=S.default.useState(""),i=()=>{n.trim()&&(r({id:`section_${ug()}`,kind:"section",label:n.trim()}),a(""))},o=()=>r({id:`divider_${ug()}`,kind:"divider",label:""});return s.jsx(vm,{title:e,defaultOpen:!t,children:s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx(me,{label:"Sección",placeholder:"Nombre de la sección",value:n,onChange:l=>a(l.target.value),type:"text"}),s.jsx("div",{className:"flex justify-end",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),disabled:!n.trim(),onClick:i,children:"Añadir sección"})}),s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("span",{className:"text-sm text-med-em",children:"Divisor"}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),onClick:o,children:"Añadir divisor"})]})]})})};function BP(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const FP=({groups:e,onAdd:t,customGroup:r,structuralGroup:n,renderIcon:a,className:i})=>{const o=l=>t(l.map(c=>({...c,id:`${c.id}_${BP()}`})));return s.jsxs("div",{className:Q.twMerge(O.clsx("flex w-full flex-col gap-3",i)),children:[e.map((l,c)=>s.jsx(RP,{title:l.title,items:l.items,renderIcon:a,defaultCollapsed:c!==0,onAdd:o},l.id)),n&&s.jsx(zP,{title:n.title??"Estructura",defaultCollapsed:!0,onAdd:l=>t([l])}),r&&s.jsx(DP,{title:r.title??"Personalizado",defaultCollapsed:!0,onAdd:l=>t([l])})]})},qP=({items:e,activeId:t,onSelect:r,renderIcon:n,className:a})=>{const[i,o]=S.default.useState(new Set),l=u=>o(d=>{const f=new Set(d),h=String(u);return f.has(h)?f.delete(h):f.add(h),f}),c=(u,d)=>{if(u.kind==="divider")return s.jsx(fe,{className:"my-2"},u.id);if(u.kind==="section")return s.jsx("span",{className:"px-3 pb-1 pt-4 text-xs font-semibold uppercase tracking-wide text-low-em",children:u.label},u.id);const f=!!u.children?.length,h=t!=null&&u.id===t,p=!!(u.icon&&n),v=!!u.action,x=i.has(String(u.id)),m=f?s.jsx(W,{"aria-label":x?"Contraer":"Expandir",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:x?s.jsx(B.ArrowDown2,{}):s.jsx(B.ArrowRight2,{}),onClick:()=>l(u.id)}):void 0;return s.jsxs(S.default.Fragment,{children:[s.jsx(vt,{as:f?"div":"button",size:"sm",title:u.label,showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTag:!1,showTrailingText:!1,showTrailingIcon:!1,showLeadingIcon:p,leadingIcon:p?n(u.icon):void 0,customLeadingIconColor:h?"var(--high-em)":void 0,customTitleColor:h?"text-high-em":"text-med-em",customBackgroundColor:h?"bg-surface-2":void 0,onClick:()=>{!f||v?r?.(u.id,u):l(u.id)},style:{paddingLeft:12+d*16,paddingRight:12},className:"w-full min-w-0 rounded-lg",trailingAction:m}),f&&x&&u.children.map(g=>c(g,d+1))]},u.id)};return s.jsx("nav",{className:Q.twMerge(O.clsx("flex w-full flex-col gap-0.5",a)),children:e.map(u=>c(u,0))})},uC=({options:e,onChange:t,label:r,addLabel:n="Add option",labelPlaceholder:a="Label",valuePlaceholder:i="value",emptyHint:o="No options yet.",disabled:l=!1,className:c})=>{const u=(h,p)=>t(e.map((v,x)=>x===h?{...v,...p}:v)),d=()=>t([...e,{value:"",label:""}]),f=h=>t(e.filter((p,v)=>v!==h));return s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-col gap-3",c)),children:[r&&s.jsx("span",{className:"text-xs font-semibold text-med-em",children:r}),e.length===0?s.jsx("p",{className:"text-xs text-med-em",children:o}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map((h,p)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1",children:s.jsx(me,{size:"sm",value:h.label,placeholder:a,disabled:l,onChange:v=>u(p,{label:v.target.value}),onBlur:()=>{!h.value&&h.label&&u(p,{value:h.label})}})}),s.jsx("div",{className:"w-28",children:s.jsx(me,{size:"sm",value:h.value,placeholder:i,disabled:l,onChange:v=>u(p,{value:v.target.value})})}),s.jsx(W,{variant:"neutral",hierarchy:"tertiary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Trash,{size:16}),"aria-label":"Remove option",disabled:l,onClick:()=>f(p)})]},p))}),s.jsx("div",{children:s.jsx(W,{variant:"neutral",hierarchy:"tertiary",size:"xs",icons:"leading",leadingIcon:s.jsx(B.Add,{}),disabled:l,onClick:d,children:n})})]})};uC.displayName="OptionsEditor";const WP=({icon:e,children:t,isActive:r=!1,className:n,customFontSize:a,customIconSize:i,...o})=>{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 s.jsxs("button",{className:O.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),...o,children:[s.jsx("span",{style:{color:"var(--med-em)"},children:S.default.isValidElement(e)&&S.default.cloneElement(e,{size:d,color:"currentColor"})}),s.jsx("span",{className:O.clsx("text-med-em",c),style:u,children:t})]})},HP=s.jsx(nm,{}),dC=({children:e,tooltipContent:t,icon:r,iconColor:n="text-disabled",labelClassName:a,className:i,customFontSize:o,customIconSize:l})=>{const c={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},u=o&&c[o]||void 0,d=o&&!c[o]?{fontSize:o}:void 0,f=l||16,h=r??HP;return s.jsxs("div",{className:O.clsx("flex items-center gap-2",i),children:[s.jsx("span",{className:O.clsx(a,u),style:d,children:e}),s.jsx(Oa,{content:t,children:s.jsx("button",{type:"button",className:O.clsx("bg-surface-bg flex items-center focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary-main rounded-full",n),children:S.default.cloneElement(h,{size:f,color:"currentColor"})})})]})},VP=({items:e,variant:t="neutral",size:r="md",orientation:n="vertical",withDividers:a=!1,disableUnderline:i=!1,className:o})=>s.jsx("div",{className:Q.twMerge(O.clsx("flex",n==="vertical"?"flex-col items-start":"flex-row flex-wrap items-center",!a&&"gap-8",o)),children:e.map((l,c)=>s.jsxs(S.default.Fragment,{children:[s.jsx(gr,{href:l.href,variant:l.variant??t,size:l.size??r,disabled:l.disabled,leadingIcon:l.leadingIcon,trailingIcon:l.trailingIcon,trailingIconPosition:l.trailingIconPosition,showLeadingIcon:l.showLeadingIcon,showTrailingIcon:l.showTrailingIcon,disableUnderline:l.disableUnderline??i,target:l.target,rel:l.rel,onClick:l.onClick,className:l.className,children:l.label}),a&&c<e.length-1&&s.jsx(fe,{direction:n==="vertical"?"horizontal":"vertical",...n==="horizontal"?{height:"16px"}:{}})]},c))}),UP={sm:"max-w-[300px] w-full",md:"w-[32rem]",lg:"w-[40rem]"},ym={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"}},fC=P.createContext(void 0),jn=()=>{const e=P.useContext(fC);if(!e)throw new Error("useModalContext must be used within a Modal provider");return e},dl=({children:e,size:t="md",padding:r})=>{const[n,a]=P.useState(!1);return s.jsx(fC.Provider,{value:{open:n,setOpen:a,size:t,padding:r??t},children:e})};dl.displayName="Modal";const fl=({children:e})=>{const{setOpen:t}=jn();return S.default.cloneElement(e,{onClick:r=>{e.props.onClick&&e.props.onClick(r),t(!0)}})};fl.displayName="ModalTrigger";const hl=P.forwardRef(({children:e,className:t,...r},n)=>{const{open:a,setOpen:i,size:o}=jn();return s.jsx(xe.Transition,{appear:!0,show:a,as:P.Fragment,children:s.jsxs(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>i(!1),children:[s.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:s.jsx("div",{className:"fixed inset-0 bg-black-uniform/30","aria-hidden":"true"})}),s.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:s.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:s.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:s.jsx(xe.Dialog.Panel,{ref:n,className:O.clsx("bg-white rounded-2xl shadow-xl flex flex-col border border-surface-3 text-left transform transition-all",UP[o],t),...r,children:e})})})})]})})});hl.displayName="ModalContent";const pl=({children:e,onBack:t,disabled:r=!1,className:n})=>{const{setOpen:a,padding:i}=jn(),o=ym[i];return s.jsxs("header",{className:O.clsx("flex items-center border-b border-surface-3 shrink-0",o.header,n),children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",className:O.clsx("cursor-pointer",!t&&"invisible"),onClick:t,size:"sm",icons:"only",disabled:r||!t,leadingIcon:s.jsx(h2,{className:"text-high-em"})}),s.jsx("div",{className:"flex-1 flex justify-center items-center",children:e}),s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(it,{className:"text-high-em"}),onClick:()=>a(!1),disabled:r})]})};pl.displayName="ModalHeader";const ml=P.forwardRef(({className:e,...t},r)=>s.jsx(xe.Dialog.Title,{ref:r,as:"h3",className:O.clsx("font-semibold text-base leading-tight text-center text-high-em",e),...t}));ml.displayName="ModalTitle";const bm=P.forwardRef(({className:e,...t},r)=>s.jsx(xe.Dialog.Description,{ref:r,className:O.clsx("text-sm text-high-em",e),...t}));bm.displayName="ModalDescription";const xl=({children:e,className:t})=>{const{padding:r}=jn(),n=ym[r];return s.jsx("main",{className:O.clsx(n.body,"flex-1 overflow-y-auto",t),children:e})};xl.displayName="ModalBody";const gl=({className:e,children:t,...r})=>{const{padding:n}=jn(),a=ym[n];return s.jsx("footer",{className:O.clsx("flex items-center border-t border-surface-3 shrink-0",a.footer,e),...r,children:t})};gl.displayName="ModalFooter";const hC=({backButton:e,cancelButton:t,acceptButton:r,className:n})=>{const{setOpen:a,size:i}=jn(),o=i==="sm",l=(c,u)=>{c.onClick&&c.onClick(u),c.closeOnClick!==!1&&a(!1)};return s.jsxs(gl,{className:O.clsx(o?"flex-row gap-8":"justify-between",n),children:[e&&!o&&s.jsx(W,{variant:e.variant||"neutral",hierarchy:e.hierarchy||"secondary",size:e.size||"md",...e,onClick:c=>l(e,c),children:e.label}),!e&&!o&&s.jsx("div",{}),s.jsxs("div",{className:O.clsx("flex",o?"flex-row gap-8 w-full":"gap-8"),children:[t&&s.jsx(W,{variant:t.variant||"neutral",hierarchy:t.hierarchy||"primary",size:t.size||"md",...t,className:Q.twMerge(o?"w-full":"w-32",t.className),onClick:c=>l(t,c),children:t.label}),r&&s.jsx(W,{variant:r.variant||"secondary",hierarchy:r.hierarchy||"primary",size:r.size||"md",...r,className:Q.twMerge(o?"w-full":"w-32",r.className),onClick:c=>l(r,c),children:r.label})]})]})};hC.displayName="ModalFooterActions";const wm=({children:e})=>{const{setOpen:t}=jn();return S.default.cloneElement(e,{onClick:r=>{e.props.onClick&&e.props.onClick(r),t(!1)}})};wm.displayName="ModalClose";function KP(e,t){return e.split(t).reduce((r,n,a,i)=>(r.push(s.jsx("span",{className:"font-normal",children:n},`part-${a}`)),a<i.length-1&&r.push(s.jsx("span",{className:"font-bold",children:t},`bold-${a}`)),r),[])}function pC({trigger:e,title:t,description:r,confirmationText:n,confirmationLabel:a,confirmButtonLabel:i,cancelButtonLabel:o="Cancel",onConfirm:l,loading:c=!1}){const[u,d]=P.useState(""),f=u.trim()===n,h=()=>d(""),p=S.default.isValidElement(e)?e:null;return s.jsxs(dl,{children:[p?s.jsx(fl,{children:p}):null,s.jsxs(hl,{children:[s.jsx(pl,{disabled:c,children:s.jsx(ml,{children:t})}),s.jsxs(xl,{children:[s.jsx(bm,{children:r}),s.jsx("div",{className:"mt-6",children:s.jsx(me,{label:KP(a,n),placeholder:n,value:u,onChange:v=>d(v.target.value),disabled:c,variant:"outlined",size:"md"})})]}),s.jsxs(gl,{className:"justify-end gap-3",children:[s.jsx(wm,{children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"md",disabled:c,onClick:h,children:o})}),s.jsx(W,{variant:"danger",hierarchy:"primary",size:"md",onClick:()=>{f&&!c&&l()},disabled:!f,loading:c,children:i})]})]})]})}pC.displayName="DeleteConfirmationModal";const mC=P.createContext(void 0),jm=()=>{const e=P.useContext(mC);if(!e)throw new Error("Drawer subcomponents must be used within <Drawer>");return e},GP={sm:"w-64",md:"w-72",lg:"w-80",xl:"w-96"},dg={right:"translate-x-full",left:"-translate-x-full"},ZP={right:"right-0",left:"left-0"},xC=({open:e,onOpenChange:t,side:r="right",children:n})=>s.jsx(mC.Provider,{value:{onOpenChange:t,side:r},children:s.jsx(xe.Transition,{show:e,as:P.Fragment,children:s.jsx(xe.Dialog,{as:"div",className:"relative z-50",onClose:()=>t(!1),children:n})})});xC.displayName="Drawer";const gC=({className:e})=>{const{onOpenChange:t}=jm();return s.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:s.jsx("div",{className:Q.twMerge(O.clsx("fixed inset-0 bg-black-uniform/30",e)),"aria-hidden":"true",onClick:()=>t(!1)})})};gC.displayName="DrawerOverlay";const vC=({width:e="md",className:t,children:r})=>{const{side:n}=jm();return s.jsx(xe.Transition.Child,{as:P.Fragment,enter:"ease-out duration-300",enterFrom:dg[n],enterTo:"translate-x-0",leave:"ease-in duration-200",leaveFrom:"translate-x-0",leaveTo:dg[n],children:s.jsx(xe.Dialog.Panel,{className:Q.twMerge(O.clsx("fixed top-0 bottom-0 h-full flex flex-col bg-white shadow-e2 transform",GP[e],ZP[n],t)),children:r})})};vC.displayName="DrawerPanel";const yC=({children:e,className:t,height:r=60,title:n})=>s.jsxs("div",{style:{height:r},className:Q.twMerge(O.clsx("flex items-center justify-between shrink-0 px-8 border-b border-surface-3",t)),children:[n&&s.jsx("span",{className:"text-sm font-semibold text-high-em",children:n}),e]});yC.displayName="DrawerHeader";const bC=({children:e,className:t})=>s.jsx("div",{className:Q.twMerge(O.clsx("flex-1",t)),children:e});bC.displayName="DrawerContent";const wC=({children:e,className:t})=>e?s.jsx("div",{className:Q.twMerge(O.clsx("shrink-0 border-t border-surface-3 py-6 px-8",t)),children:e}):null;wC.displayName="DrawerFooter";const jC=({children:e,size:t="sm"})=>{const{onOpenChange:r}=jm();return e?S.default.cloneElement(e,{onClick:n=>{e.props.onClick?.(n),r(!1)}}):s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:t,icons:"only",leadingIcon:s.jsx(it,{className:"text-high-em"}),onClick:()=>r(!1)})};jC.displayName="DrawerClose";const YP=Object.assign(xC,{Overlay:gC,Panel:vC,Header:yC,Content:bC,Footer:wC,Close:jC});function CC({planName:e,price:t,billingPeriod:r="month",priceContent:n,description:a,ctaLabel:i="Switch Plan",onCtaClick:o,features:l,featuresTitle:c="Features",featuresSubtitle:u="Everything in our plan includes",isRecommended:d=!1,recommendedLabel:f="Recommended",recommendedIcon:h,loading:p=!1,ctaVariant:v="neutral",ctaHierarchy:x="primary",sectionColor:m="bg-white",sectionTextColor:g,className:b}){return s.jsxs("div",{className:Q.twMerge(O.clsx("relative w-full flex flex-col",b)),children:[d&&s.jsx("div",{className:"absolute -top-9 left-1/2 -translate-x-1/2 z-10 whitespace-nowrap",children:s.jsx(Ye,{size:"lg",theme:"surface",variant:"outlined",children:s.jsx(ft,{icon:h,label:f,iconSize:14,gap:3,iconColorClass:"text-med-em",labelColorClass:"text-med-em text-xs font-semibold"})})}),s.jsxs("div",{className:"bg-surface-2 border border-surface-3 rounded-8 overflow-hidden w-full flex flex-col flex-1",children:[s.jsxs("div",{className:O.clsx("flex items-start justify-between p-8 border-b border-surface-3",m),children:[s.jsx("span",{className:O.clsx("text-xl font-semibold",g??"text-high-em"),children:e}),s.jsx("div",{className:"flex items-baseline gap-4",children:n??s.jsxs(s.Fragment,{children:[s.jsx("span",{className:O.clsx("text-2xl font-bold leading-none",g??"text-high-em"),children:t}),r&&s.jsxs("span",{className:O.clsx("text-sm",g??"text-high-em"),children:["/ ",r]})]})})]}),s.jsxs("div",{className:O.clsx("flex flex-col gap-8 p-8 border-b border-surface-3",m),children:[s.jsx("p",{className:O.clsx("text-sm leading-relaxed",g??"text-high-em"),children:a}),s.jsx(W,{variant:v,hierarchy:x,size:"md",className:"w-full",onClick:o,loading:p,children:i})]}),s.jsxs("div",{className:"flex flex-col gap-8 p-8 bg-surface-bg flex-1",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xl font-bold text-high-em",children:c}),s.jsx("p",{className:"text-sm text-high-em",children:u})]}),s.jsx("ul",{className:"flex flex-col gap-8",children:l.map(w=>s.jsxs("li",{className:"flex items-center gap-8",children:[s.jsx("span",{className:"text-low-em shrink-0",children:s.jsx(B.TickCircle,{size:14,color:"currentColor"})}),s.jsx("span",{className:"text-sm text-low-em",children:w})]},w))})]})]})]})}CC.displayName="PlanPricingCard";const vl=({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",o={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=S.default.isValidElement(n)?S.default.cloneElement(n,{size:l[t],color:"currentColor"}):null;return s.jsx("div",{className:O.clsx(i,o[t],c[e][r],a),children:u})},SC=S.default.forwardRef(({title:e,companyImage:t,badgeStatus:r,badgeStatusState:n,onButtonAction:a,actionButtonRef:i,stackLabel:o,powerLabel:l,calendarLabel:c,link1Label:u,link1Href:d,link2Label:f,link2Href:h,link2Status:p,onCardClick:v,className:x,...m},g)=>{const b=O.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=Q.twMerge(O.clsx(b,x)),C={success:"success",warning:"warning",danger:"danger",disabled:"disabled"};return s.jsxs("div",{ref:g,className:w,...m,children:[s.jsxs("div",{className:"flex-row flex justify-between",children:[s.jsx("div",{className:"flex",children:s.jsx(ie,{className:"!rounded-4",size:"2xl",imageUrl:t})}),s.jsx("div",{className:"flex w-fit",children:s.jsx(W,{ref:i,size:"sm",leadingIcon:s.jsx(ie,{children:s.jsx(y2,{})}),icons:"only",hierarchy:"secondary",variant:"neutral",onClick:a})})]}),s.jsxs("div",{className:"flex-col flex justify-between gap-4",children:[s.jsxs("div",{className:"flex gap-5 items-center",children:[s.jsx("span",{className:"text-high-em font-semibold",children:e}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ye,{variant:"simple",theme:C[n],children:r})})]}),s.jsxs("div",{className:"flex flex-row gap-4",children:[s.jsx(ft,{label:o,labelSize:"sm",iconSize:"sm",gap:4,icon:s.jsx(b2,{})}),s.jsx(ft,{label:l,labelSize:"sm",iconSize:"sm",gap:4,icon:s.jsx(w2,{})}),s.jsx(ft,{label:c,labelSize:"sm",iconSize:"sm",gap:4,icon:s.jsx(j2,{})})]})]}),s.jsx(fe,{direction:"horizontal"}),s.jsxs("div",{className:"flex-row flex justify-between gap-8",children:[s.jsxs("div",{className:"flex w-1/2 flex-col gap-2",children:[s.jsx("span",{className:"text-sm text-low-em",children:"Subdomain"}),s.jsx("div",{className:"flex-row flex center items-center gap-4",children:s.jsx(gr,{href:d,className:"w-fit",variant:"neutral",children:u})})]}),s.jsxs("div",{className:"flex w-1/2 flex-col gap-2",children:[s.jsx("span",{className:"text-sm text-low-em",children:"Database"}),s.jsxs("div",{className:"flex-row flex center items-center gap-4",children:[s.jsx(Ye,{variant:"status",statusState:p,statusSize:"xs"}),s.jsx(gr,{href:h,trailingIcon:s.jsx(v2,{}),className:"w-fit",variant:"neutral",children:f})]})]})]})]})});SC.displayName="ProjectCard";const Nh=({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",o=O.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=O.clsx(i,r);return s.jsxs("div",{className:"flex flex-col gap-y-2 w-full",children:[s.jsxs("div",{className:"flex items-center w-full gap-x-5",children:[s.jsx("div",{className:o}),s.jsx("div",{className:l,role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Progress: ${a}%`,...n,children:s.jsx("div",{className:"h-full rounded-full transition-all duration-300 ease-out bg-black",style:{width:`${a}%`}})})]}),t&&s.jsx("p",{className:"mt-2 font-medium text-sm text-left text-low-em",children:t})]})},sc={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"}},XP={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}},Zn=({progress:e,size:t="md",variant:r="primary",shape:n="circle",showLabel:a=!0,label:i,className:o,ariaLabel:l,id:c,...u})=>{const d=Math.min(100,Math.max(0,e)),f=S.default.useId(),h=c||`progress-circle-${f}`,p=i?`${h}-label`:void 0,v=sc[t],x=XP[r],m=()=>l||(i?`Progreso: ${i}, ${d}% completado`:`Progreso: ${d}% completado`),g=v.size,b=(g-v.strokeWidth)/2,w=2*Math.PI*b,C=w-d/100*w,y=()=>n==="circle"?sc[t].container:sc[t].halfCircle,j=()=>s.jsxs("svg",{width:g,height:g,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:[s.jsx("circle",{cx:g/2,cy:g/2,r:b,stroke:"currentColor",strokeWidth:v.strokeWidth,fill:"none",className:x.track,opacity:x.opacity}),s.jsx("circle",{cx:g/2,cy:g/2,r:b,stroke:"currentColor",strokeWidth:v.strokeWidth,fill:"none",className:x.fill,strokeDasharray:w,strokeDashoffset:C,strokeLinecap:"round",style:{transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),N=()=>{const A=v.strokeWidth,k=g,I=g/2+A,_=(g-v.strokeWidth)/2,E=A/2,T=I-A/2,R=g-A/2,M=I-A/2,$=Math.PI*_*2,L=$-d/100*$;return s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:`0 0 ${k} ${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:[s.jsx("path",{d:`M${E},${T} A${_},${_} 0 1,1 ${R},${M}`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:v.strokeWidth,stroke:"currentColor",className:x.track,opacity:x.opacity}),s.jsx("path",{d:`M${E},${T} A${_},${_} 0 1,1 ${R},${M}`,fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:v.strokeWidth,stroke:"currentColor",className:x.fill,strokeDasharray:$,strokeDashoffset:L,style:{transition:"stroke-dashoffset 0.3s ease-in-out"}})]})};return s.jsxs("div",{className:O.clsx("relative inline-flex items-center justify-center",y(),o),id:h,...u,children:[n==="circle"?j():N(),a&&n==="circle"&&s.jsxs("div",{className:O.clsx("absolute inset-0 flex flex-col items-center justify-center","leading-none"),children:[i&&s.jsx("span",{id:p,className:O.clsx(v.labelFontSize,x.label),children:i}),s.jsx("span",{className:O.clsx(v.fontSize,v.lineHeight,x.progressLabel),style:{fontFamily:"var(--font-space-grotesk)"},children:`${d}%`})]}),a&&n==="half-circle"&&s.jsxs("div",{className:O.clsx("absolute left-0 right-0 flex flex-col items-center justify-center",i?v.halfCircleLabelPosition:"top-1/2",i&&v.labelSpace),children:[i&&s.jsx("span",{id:p,className:O.clsx(v.labelFontSize,x.label),children:i}),s.jsx("span",{className:O.clsx(v.fontSize,v.lineHeight,x.progressLabel),style:{fontFamily:"var(--font-space-grotesk)"},children:`${d}%`})]})]})},QP=({currentStep:e,totalSteps:t,currentStepProgress:r=0,stepDescriptions:n=[],title:a,subtitle:i,className:o,collapsed:l,onToggleCollapse:c,onClose:u,onlyProgressCircle:d=!1})=>{const[f,h]=S.default.useState(l??!0);S.default.useEffect(()=>{typeof l=="boolean"&&h(l)},[l]);const p=()=>{const m=!f;h(m),c&&c(m)},v=S.default.useMemo(()=>Array.from({length:t},(m,g)=>{const b=g+1;let w;return b<e?w=100:w=0,{progress:w,description:n[g]||`Step ${b}`}}),[e,t,n]),x=t>0?Math.round((e-1)/t*100+r/t):0;return d?s.jsx(Zn,{progress:x,size:"xs",showLabel:!0,ariaLabel:`Overall progress: ${x}%`,className:o}):s.jsxs(pt.motion.div,{className:O.clsx("bg-white overflow-hidden",o),role:"region","aria-label":`Progress tracker${f?"":" - expanded"}`,layout:!0,animate:{height:f?61:130},transition:{duration:.3,ease:"easeInOut"},children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-2 gap-3",children:[s.jsx(pt.motion.div,{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:p,layout:!0,children:s.jsx(pt.AnimatePresence,{mode:"wait",children:f?s.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:v.map((m,g)=>s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Nh,{progress:m.progress})},g))},"collapsed-content"):s.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&&s.jsx("h3",{className:"text-[16px] text-dark-100 font-semibold",children:a}),i&&s.jsx("p",{className:"text-sm text-dark-700",children:i})]},"expanded-title")})}),s.jsxs("div",{className:"flex items-center gap-9 py-4 px-6",children:[s.jsx(Zn,{progress:x,size:"xs",showLabel:!0,ariaLabel:`Overall progress: ${x}%`}),s.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:s.jsx(pt.motion.div,{style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},animate:{rotate:f?0:180},transition:{duration:.2},children:s.jsx(B.ArrowDown2,{size:16,color:"black"})})}),s.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:s.jsx(it,{size:16})})]})]}),s.jsx(pt.AnimatePresence,{children:!f&&s.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:s.jsx("div",{className:"pt-2 pb-4 px-8",children:s.jsx(pt.motion.div,{className:"flex gap-3 w-full",initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.2},children:v.map((m,g)=>{const w=g+1===e;return s.jsx(pt.motion.div,{className:"w-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15+g*.05,duration:.2,ease:"easeOut"},children:s.jsxs("div",{children:[s.jsx(Nh,{progress:m.progress}),(m.progress!==0||w)&&m.description&&s.jsx("div",{className:"text-sm text-[#2F343C] mt-3 font-semibold",children:m.description}),m.progress===0&&!w&&m.description&&s.jsx("div",{className:"text-sm text-[#5A606B] mt-3 font-semibold",children:m.description})]})},g)})})})})})]})},JP=({actions:e,borderless:t=!1,loading:r=!1,className:n})=>r?s.jsx("div",{className:Q.twMerge(O.clsx("flex flex-col bg-surface-1",!t&&"border border-surface-3 rounded-lg overflow-hidden",n)),children:s.jsx("div",{className:"flex flex-col gap-6 p-6",children:Array.from({length:4}).map((a,i)=>s.jsx("div",{className:"h-36 rounded-lg bg-surface-2 animate-pulse"},i))})}):s.jsx("div",{className:Q.twMerge(O.clsx("flex flex-col bg-surface-1",!t&&"border border-surface-3 rounded-lg overflow-hidden",n)),children:s.jsx("div",{className:"flex flex-col gap-6 p-6",children:e.map(a=>s.jsx(W,{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))})}),e4={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]"}},Mn={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"}},t4=({size:e="medium",checked:t=!1,disabled:r=!1,className:n,...a})=>{const i=e4[e];return s.jsxs("label",{className:O.clsx("inline-flex items-center",r?"cursor-not-allowed":"cursor-pointer",n),children:[s.jsx("input",{type:"radio",checked:t,disabled:r,className:"sr-only peer",...a}),s.jsx("div",{className:O.clsx(i.wrapper,"rounded-full border transition-colors duration-200",t&&"inline-flex items-center justify-center",Mn.focus,r?t?Mn.disabled.checked:Mn.disabled.unchecked:t?Mn.checked:Mn.unchecked,!r&&"peer-hover:border-low-em"),children:t&&s.jsx("div",{className:O.clsx(i.dot,"rounded-full",r?Mn.disabled.dot:"bg-black")})})]})},r4={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}},NC=S.default.forwardRef(({icon:e,title:t,description:r,selected:n=!1,size:a="md",trailingIcon:i,className:o,...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=r4[a],p=(v,x)=>S.default.isValidElement(v)?S.default.cloneElement(v,{size:x,color:"currentColor"}):v;return s.jsxs("button",{ref:c,type:"button",role:"radio","aria-checked":n,className:Q.twMerge(O.clsx(u,h.card,d,o)),...l,children:[s.jsx("span",{className:O.clsx("flex shrink-0 items-center justify-center",h.iconBox,h.iconRadius,f),children:p(e,h.icon)}),s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("span",{className:"text-sm font-medium text-high-em",children:t}),r&&s.jsx("span",{className:"text-xs text-low-em",children:r})]}),n&&i&&s.jsx("span",{className:"shrink-0 text-brand-secondary-main",children:p(i,h.trailing)})]})});NC.displayName="SelectableCard";const n4={success:"bg-success-main",warning:"bg-warning-main",error:"bg-danger-main",info:"bg-info-em"},fg={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"}},a4={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"}},OC=({steps:e,current:t,variant:r="numbered",lineStyle:n="solid",colorVariant:a,indicatorGap:i,stepGap:o,itemClassName:l,className:c})=>{const u=a?fg[a]:fg.brand,d=a?a4[a]:null;return s.jsx("ol",{className:Q.twMerge("flex flex-col",c),children:e.map((f,h)=>{const p=h<t?"done":h===t?"current":"pending",v=h===e.length-1,x=r==="dot",m=n==="dashed",g=x?d?d[p]:f.status?n4[f.status]:"bg-surface-3":null;return s.jsxs("li",{className:Q.twMerge("flex",i??"gap-3",l),children:[s.jsxs("div",{className:"flex flex-col items-center self-stretch",children:[x?s.jsx("span",{className:O.clsx("size-2.5 shrink-0 rounded-full mt-1.5",g)}):s.jsx("span",{className:O.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")}),!v&&(m?s.jsx("span",{className:"w-0 border-l-2 border-dashed border-surface-3 grow my-1"}):s.jsx("span",{className:O.clsx("my-1 w-px grow",h<t?u.line:"bg-surface-3")}))]}),s.jsxs("div",{className:O.clsx(x?"pt-0":"pt-3",!v&&(o??(x?"pb-4":"pb-6"))),children:[s.jsx("p",{className:O.clsx("text-sm",x?"text-med-em":O.clsx(p==="current"&&"font-medium text-high-em",p==="done"&&"text-med-em",p==="pending"&&"text-low-em")),children:f.title}),f.caption&&s.jsx("p",{className:"text-xs text-low-em mt-0.5",children:f.caption})]})]},`${f.title}-${h}`)})})},i4={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]"}},yl=({items:e,value:t,onChange:r,size:n="md",variant:a="default",itemGap:i,withBorder:o=!1,className:l})=>{const c=i4[n],u=a==="surface";return s.jsx("div",{className:O.clsx("inline-flex items-center p-1",u?"bg-surface-bg":"bg-surface-2",c.wrapper,i??c.gap,o&&"border border-surface-4",l),children:e.map(d=>{const f=d.id===t;return s.jsx("button",{onClick:()=>r(d.id),className:O.clsx("font-semibold transition-colors duration-200",c.button,f?O.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)})})},s4=[{id:"all",label:"All"},{id:"success",label:"Success"},{id:"warning",label:"Warnings"},{id:"error",label:"Errors"}],PC=P.forwardRef(({entries:e,showSwitcher:t=!0,filterItems:r=s4,switcherSize:n="sm",switcherVariant:a="surface",switcherItemGap:i="gap-x-8",variant:o="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:v,...x},m)=>{const[g,b]=P.useState(r[0]?.id??"all"),C=(g==="all"?e:e.filter(y=>y.status===g)).map(y=>({title:y.description,caption:y.timestamp,status:y.status}));return s.jsxs("div",{ref:m,className:Q.twMerge("bg-white border border-surface-3 w-full max-w-sm flex flex-col overflow-hidden",v),...x,children:[t&&s.jsx("div",{className:"bg-surface-bg px-4 py-2 border-b border-surface-2 overflow-x-auto ds-scrollbar shrink-0",children:s.jsx(yl,{items:r,value:g,onChange:y=>b(String(y)),size:n,variant:a,itemGap:i})}),s.jsx("div",{className:Q.twMerge("flex-1 min-h-0 overflow-y-auto ds-scrollbar",p),children:C.length===0?s.jsx("p",{className:"text-sm text-low-em py-8 text-center",children:"No activity found"}):s.jsx(OC,{steps:C,current:h??C.length,variant:o,lineStyle:l,colorVariant:c,stepGap:u,indicatorGap:d,itemClassName:f})})]})});PC.displayName="ActivityFeed";const AC=S.default.createContext(null),rr=()=>{const e=S.default.useContext(AC);if(!e)throw new Error("useTableContext must be used within a TableProvider");return e},_C=({children:e,value:t})=>S.default.createElement(AC.Provider,{value:t},e),o4=48,l4=({columns:e,data:t,tableLayout:r={},children:n,className:a,...i})=>{const o=S.default.useRef(null),[l,c]=S.default.useState(()=>!i.sortBy||!i.sortDirection?[]:[{id:i.sortBy,desc:i.sortDirection==="desc"}]),[u,d]=S.default.useState(()=>{const y={};return i.selectedRows?.forEach(j=>{y[String(j)]=!0}),y}),[f,h]=S.default.useState(i.searchValue||""),[p,v]=S.default.useState(()=>({pageIndex:(i.currentPage||1)-1,pageSize:i.itemsPerPage||10})),[x,m]=S.default.useState({});S.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]),S.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]),S.default.useEffect(()=>{i.searchValue!==f&&h(i.searchValue||"")},[i.searchValue,f]),S.default.useEffect(()=>{if(i.currentPage){const y=i.currentPage-1;y!==p.pageIndex&&v(j=>({...j,pageIndex:y}))}},[i.currentPage,p.pageIndex]);const g=S.default.useMemo(()=>{const y=e.map(j=>{const N=j.id==="__select"||j.type==="select",A=i.selectColumnSize??o4,k={id:j.id,header:j.header,accessorKey:j.id,enableSorting:j.sortable??!1,enableColumnFilter:j.filterable??!1,size:N?A:j.size,minSize:N?A:j.minSize,maxSize:N?A:j.maxSize,enableResizing:!0,meta:{align:j.align,hasExplicitSize:N||j.size!==void 0}};return j.component?k.cell=({row:I,getValue:_})=>{const E=j.component,T=j.accessor?j.accessor(I.original):_();return S.default.createElement(E,{value:T,row:I.original,rowIndex:I.index,...j.componentProps})}:j.cell?k.cell=({row:I})=>j.cell(I.original):j.accessor?k.cell=({row:I})=>j.accessor(I.original):k.cell=({getValue:I})=>I(),k});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=Er.useReactTable({data:t,columns:g,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 N=j[0];N?i.onSortChange?.(N.id,N.desc?"desc":"asc"):i.onSortChange?.("",null)},onRowSelectionChange:y=>{const j=typeof y=="function"?y(u):y;d(j);const N=new Set;Object.keys(j).forEach(A=>{if(j[A]){const k=Number(A);N.add(isNaN(k)?A:k)}}),i.onSelectionChange?.(N)},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;v(j),i.onPageChange?.(j.pageIndex+1)},getCoreRowModel:Er.getCoreRowModel(),getSortedRowModel:Er.getSortedRowModel(),getFilteredRowModel:Er.getFilteredRowModel(),getPaginationRowModel:i.showPagination?Er.getPaginationRowModel():void 0,manualPagination:!1,manualSorting:!1,getRowId:(y,j)=>String(i.getRowId?.(y,j)??j)}),w=S.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 s.jsx(_C,{value:{table:b,tableLayout:w,parentRef:o,emptyStateTitle:i.emptyStateTitle,emptyStateDescription:i.emptyStateDescription,showClearFiltersButton:i.showClearFiltersButton??!0,resetAllFilters:C},children:s.jsx("div",{className:O.clsx("w-full min-w-0 flex flex-col",a),children:n})})},c4=({children:e,className:t,noFooter:r=!1})=>{const{tableLayout:n,parentRef:a,table:i}=rr(),{virtualized:o,width:l}=n,c=i.getFilteredRowModel().rows.length===0;return o?s.jsx("div",{ref:a,className:O.clsx("bg-surface-0 border-x border-surface-4 overflow-auto w-full min-w-full table ds-scrollbar",t),style:{height:"400px"},children:s.jsx("table",{className:O.clsx("w-full",l==="fixed"&&"table-fixed",l==="auto"&&"table-auto"),children:e})}):s.jsx("div",{className:O.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:s.jsxs("table",{className:O.clsx(!c&&l!=="fixed"&&"min-w-max","w-full",l==="fixed"&&"table-fixed",l==="auto"&&"table-auto"),"data-slot":"data-table",children:[l==="fixed"&&s.jsx("colgroup",{children:i.getAllLeafColumns().map(u=>s.jsx("col",{style:u.id==="__select"?{width:`${u.getSize()}px`,maxWidth:`${u.getSize()}px`}:void 0},u.id))}),e]})})},Rs=({children:e,className:t,style:r,isTBody:n=!0})=>{const{tableLayout:a}=rr(),{rowBorder:i,rowHeight:o}=a,l=o&&n?{...r,height:`${o}px`}:r;return s.jsx("tr",{className:O.clsx("bg-white hover:bg-surface-2 transition-colors",i&&"border-b border-surface-4 last:border-b-0",t),style:l,children:e})},kC=({header:e,className:t})=>{const{table:r,tableLayout:n}=rr(),{headerBackground:a,dense:i,cellBorder:o,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 s.jsx("th",{className:O.clsx(i?"px-2 py-2":"px-3 py-3",a&&"bg-surface-1","align-middle relative",o&&"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:s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(Jt,{className:"",checked:r.getIsAllPageRowsSelected(),onChange:r.getToggleAllPageRowsSelectedHandler(),indeterminate:r.getIsSomePageRowsSelected(),size:"small"})})});const v=s.jsxs("th",{className:O.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",o&&"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:[s.jsx("div",{className:"align-middle gap-2 min-w-0",children:s.jsx("span",{className:O.clsx("text-xs font-medium leading-[18px] truncate capitalize text-low-em",h&&"font-semibold"),children:Er.flexRender(e.column.columnDef.header,e.getContext())})}),f&&s.jsx("div",{className:"align-middle flex-shrink-0",children:s.jsx(hg,{direction:f==="desc"?"desc":"asc"})}),d.getCanFilter()&&s.jsx("div",{className:"align-middle flex-shrink-0",children:s.jsx(pg,{})})]});return p?s.jsxs("th",{className:O.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",o&&"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:[s.jsxs("div",{className:"flex items-center justify-center flex-row gap-2",children:[s.jsx("div",{className:"align-middle gap-2 min-w-0",children:s.jsx("span",{className:O.clsx("text-xs font-medium leading-[18px] truncate capitalize text-low-em",h&&"font-semibold"),children:Er.flexRender(e.column.columnDef.header,e.getContext())})}),f&&s.jsx("div",{className:"align-middle flex-shrink-0",children:s.jsx(hg,{direction:f==="desc"?"desc":"asc"})}),d.getCanFilter()&&s.jsx("div",{className:"align-middle flex-shrink-0",children:s.jsx(pg,{})})]}),s.jsx("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:O.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")})]}):v},hg=({direction:e})=>e?s.jsx(u2,{className:O.clsx("text-low-em",e==="asc"&&"rotate-180"),size:12}):null,pg=()=>s.jsx(d2,{className:"text-low-em",size:12}),u4=({className:e})=>{const{table:t,tableLayout:r}=rr(),{headerBackground:n,headerBorder:a}=r;return s.jsx("thead",{className:O.clsx(n&&"bg-surface-1",a&&"border-b border-surface-4",e),children:t.getHeaderGroups().map(i=>s.jsx(Rs,{isTBody:!1,children:i.headers.map(o=>s.jsx(kC,{header:o},o.id))},i.id))})},Oh=({cell:e,className:t})=>{const{tableLayout:r}=rr(),{cellAlign:n}=r,a=e.row,i=a.getIsSelected();return e.column.id==="__select"?s.jsx("td",{className:O.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:s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(Jt,{checked:i,onChange:a.getToggleSelectedHandler(),size:"small"})})}):s.jsx("td",{className:O.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:Er.flexRender(e.column.columnDef.cell,e.getContext())})},TC=({title:e="No data available.",className:t,colSpan:r=1})=>s.jsx("tr",{className:O.clsx("w-full",t),children:s.jsx("td",{colSpan:r,children:s.jsx(ht,{description:e,flat:!0,className:"rounded-b-2xl"})})}),d4=({className:e})=>{const{table:t,tableLayout:r,parentRef:n,emptyStateTitle:a,resetAllFilters:i}=rr(),{virtualized:o}=r;if(t.getFilteredRowModel().rows.length===0)return s.jsx("tbody",{className:O.clsx(r.rowBorder&&"divide-y divide-surface-4",r.dense&&"text-sm",e),children:s.jsx(TC,{title:a,colSpan:t.getAllColumns().length})});if(!o)return s.jsx("tbody",{className:O.clsx(r.rowBorder&&"divide-y divide-surface-4",r.dense&&"text-sm",e),children:t.getRowModel().rows.map(f=>s.jsx(Rs,{children:f.getVisibleCells().map(h=>s.jsx(Oh,{cell:h},h.id))},f.id))});const c=Bj.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 s.jsx("tbody",{className:O.clsx("relative",r.dense&&"text-sm",e),style:{height:`${d}px`},children:u.map(f=>{const h=t.getRowModel().rows[f.index];return s.jsx(Rs,{style:{position:"absolute",top:0,left:0,width:"100%",height:`${f.size}px`,transform:`translateY(${f.start}px)`},children:h.getVisibleCells().map(p=>s.jsx(Oh,{cell:p},p.id))},f.key)})})},f4=(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},EC=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"}),h4=e=>e.map(t=>EC(t)),p4=(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}},m4=({showPagination:e=!0,totalItems:t,className:r,sizes:n=[10,20,50,100],footerBackground:a=!0,noBorder:i=!1,actions:o})=>{const{table:l}=rr(),[c,u]=il(),d=u<500,f=l.getState().pagination,h=l.getPageCount(),p=l.getCanPreviousPage(),v=l.getCanNextPage(),x=N=>{const A=f4(N,h)-1;l.setPageIndex(A)},m=N=>{l.setPageSize(Number(N))},g=()=>l.previousPage(),b=()=>l.nextPage(),w=l.getFilteredRowModel().rows.length,{total:C}=p4(f.pageIndex,f.pageSize,t,w),y=h4(n),j=f.pageSize;return!e||w===0?null:s.jsxs("div",{ref:c,className:O.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:[s.jsxs("div",{className:O.clsx("items-center flex-row shrink-0 gap-4",d?"hidden":"flex"),children:[s.jsx("span",{className:O.clsx("text-low-em text-sm font-semibold",d?"hidden":"block"),children:"Showing"}),s.jsx(Te,{className:"!w-[68px]",size:"sm",variant:"outlined",value:String(j),items:y,onChange:m,showLeadingIcon:!1,customHeight:"28px",customRadius:"8px",menuSize:"sm"}),s.jsx("span",{className:O.clsx("text-med-em text-sm font-semibold",d?"hidden":"block"),children:`/ ${String(C)}`})]}),s.jsxs("div",{className:O.clsx("flex flex-row items-center gap-4",d?"w-full justify-between":"w-auto justify-end"),children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("span",{className:O.clsx("text-med-em text-sm font-semibold whitespace-nowrap",d?"hidden":"block"),children:"Go To Page"}),s.jsx(Te,{className:"!w-[68px]",size:"sm",variant:"outlined",value:String(f.pageIndex+1),items:Array.from({length:h||1},(N,A)=>EC(A+1)),onChange:x,showLeadingIcon:!1,customHeight:"28px",customRadius:"8px",menuSize:"sm"}),s.jsxs("span",{className:"text-med-em text-sm font-semibold whitespace-nowrap",children:["of ",h||1]})]}),s.jsx("div",{className:"px-4 flex items-center",children:s.jsx("span",{className:"w-0 border-l border-gray-300 h-[33px]"})}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(W,{onClick:g,disabled:!p,variant:"neutral",hierarchy:"tertiary",size:"sm",children:"Previous"}),s.jsx(W,{onClick:b,disabled:!v,variant:"brand",hierarchy:"primary",size:"sm",children:"Next"})]})]}),o&&s.jsx("div",{className:"flex items-center gap-x-4 flex-shrink-0",children:o})]})},x4=({title:e,search:t,actions:r,className:n})=>s.jsxs("div",{className:O.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&&s.jsx("div",{className:"flex-shrink-0 text-xl font-semibold text-high-em leading-[30px]",children:e}),t&&s.jsx("div",{className:"flex-1",children:s.jsx(me,{value:t.value??"",onChange:a=>t.onChange(a.target.value),placeholder:t.placeholder??"Search...",size:"md",leadingIcon:s.jsx(B.SearchNormal1,{size:16})})}),r&&s.jsx("div",{className:"flex items-center gap-x-4 flex-shrink-0",children:r})]}),g4=({columnId:e,className:t,options:r,title:n})=>{const{table:a}=rr(),i=a.getColumn(e),[o,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 s.jsxs("select",{value:o,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm",children:[s.jsx("option",{value:"",children:"All"}),r?.map((p,v)=>s.jsx("option",{value:String(p.value),children:p.label},v))]});case"number":return s.jsx("input",{type:"number",value:o,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 s.jsx("input",{type:"date",value:o,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"});case"boolean":return s.jsxs("select",{value:o,onChange:p=>f(p.target.value),className:"w-full border border-gray-300 rounded px-2 py-1 text-sm",children:[s.jsx("option",{value:"",children:"All"}),s.jsx("option",{value:"true",children:"Yes"}),s.jsx("option",{value:"false",children:"No"})]});case"text":default:return s.jsx("input",{type:"text",value:o,onChange:p=>f(p.target.value),placeholder:`Filter ${d}...`,className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"})}};return s.jsxs("div",{className:O.clsx("p-2 border-t border-gray-200",t),children:[s.jsx("div",{className:"text-xs font-medium text-gray-700 mb-1",children:d}),h()]})},v4=({className:e,trigger:t,position:r="right"})=>{const{table:n}=rr(),[a,i]=P.useState(!1),o=n.getAllColumns().filter(h=>h.id!=="__select"&&h.getCanHide());if(o.length===0)return null;const l=h=>{o.forEach(p=>{p.getCanHide()&&p.toggleVisibility(h)})},c=o.every(h=>h.getIsVisible()),u=o.some(h=>h.getIsVisible()),d=s.jsxs(W,{variant:"neutral",hierarchy:"tertiary",size:"sm",className:"flex items-center gap-2",children:[s.jsx(B.Eye,{size:"16"}),"Columns",s.jsx(B.ArrowDown2,{size:"16"})]}),f=r==="right"?"right-0 origin-top-right":"left-0 origin-top-left";return s.jsxs("div",{className:O.clsx("relative inline-block text-left",e),children:[s.jsx("div",{onClick:()=>i(!a),children:t||d}),a&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),s.jsx("div",{className:O.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:s.jsxs("div",{className:"py-1",children:[s.jsx("div",{className:"px-4 py-2 border-b border-gray-200",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-sm font-medium text-gray-900",children:"Column Visibility"}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>l(!0),className:"text-xs text-blue-600 hover:text-blue-800",disabled:c,children:"All"}),s.jsx("span",{className:"text-gray-300",children:"|"}),s.jsx("button",{onClick:()=>l(!1),className:"text-xs text-blue-600 hover:text-blue-800",disabled:!u,children:"None"})]})]})}),s.jsx("div",{className:"max-h-60 overflow-y-auto",children:o.map(h=>{const p=h.getIsVisible(),v=typeof h.columnDef.header=="string"?h.columnDef.header:h.id;return s.jsxs("div",{className:"px-4 py-2 hover:bg-gray-50 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(Jt,{checked:p,onChange:h.getToggleVisibilityHandler(),size:"small"}),s.jsx("label",{htmlFor:`column-${h.id}`,className:"ml-2 text-sm text-gray-700 cursor-pointer",onClick:x=>{x.stopPropagation(),h.toggleVisibility()},children:v})]}),s.jsx("button",{onClick:x=>{x.stopPropagation(),h.toggleVisibility()},className:"p-1 rounded hover:bg-gray-200",children:p?s.jsx(B.Eye,{size:"16",className:"text-gray-600"}):s.jsx(B.EyeSlash,{size:"16",className:"text-gray-400"})})]},h.id)})})]})})]})]})},y4=({value:e,config:t})=>{const r=t?.size||"sm";return s.jsx(Ft,{size:r,initials:String(e||"")})},b4=({value:e,config:t})=>{const r=t?.size||"xs",n=t?.variantMap||{},a=t?.variant||"secondary",i=String(e||"").toLowerCase(),o=n[i]||a;return s.jsx(Lr,{variant:o,size:r,children:String(e||"")})},w4=({value:e})=>{const t=String(e||"");return s.jsx("a",{href:`mailto:${t}`,className:"text-primary-900 hover:underline",children:t})},mg=({value:e})=>s.jsx("span",{children:String(e||"")}),j4=({value:e})=>{const t=typeof e=="number"?e:parseFloat(String(e||"0"));return s.jsx("span",{children:t.toLocaleString()})},C4=({value:e})=>{if(!e)return s.jsx("span",{children:"-"});const t=e instanceof Date?e:new Date(String(e));return s.jsx("span",{children:t.toLocaleDateString()})},S4=({value:e})=>{const t=!!e;return s.jsx("span",{className:t?"text-success-600":"text-gray-400",children:t?"✓":"✗"})},N4={avatar:y4,tag:b4,email:w4,text:mg,number:j4,date:C4,boolean:S4,custom:mg};function IC(e){const t=N4[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 O4(e){return e.map(t=>IC(t))}function P4(e){return[{id:"__select",header:"",type:"select",width:"w-16"},...e]}const MC={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}},$C=[{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}],A4={config:MC,data:$C},RC={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}},LC=[{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"}],_4={config:RC,data:LC},xg={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"}},oc={none:"",xs:"mt-2",sm:"mt-4",md:"mt-6",lg:"mt-8",xl:"mt-12"},Cm=({variant:e="line",tabs:t,className:r,selectedIndex:n,onChange:a,customPaddingBottom:i,contentSpacing:o="sm",fullHeight:l=!1,iconLabelGap:c=4,iconSize:u=16,showBorder:d=!0,headerHeight:f,tabPaddingX:h,tabListClassName:p,lazy:v=!1,responsive:x})=>{const m=S.default.useRef(null),g=S.default.useRef(0),b=S.default.useRef(!1),[w,C]=S.default.useState(!1);S.default.useLayoutEffect(()=>{if(!x)return;const $=m.current;if(!$)return;const L=()=>{b.current||(g.current=$.scrollWidth);const U=$.clientWidth,D=g.current,F=b.current?U<D+24:U<D;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",N=e!=="only-icon"&&!y,A=e==="only-icon"||y,k=e==="line-icons"||e==="only-icon"?xg.line:xg[e],I=d?k.list:k.list.replace(/border-b\s+border-surface-3/g,"").trim(),_={};f&&(_.height=`${f}px`,_.alignItems="flex-end");const E=()=>typeof o=="number"?"":o in oc?oc[o]:oc.sm,T=typeof o=="number"?{marginTop:`${o}px`}:{},R=l?{height:"100%",maxHeight:"100%",overflow:"hidden",display:"flex",flexDirection:"column"}:{},M=l?{height:"100%",maxHeight:"100%",flex:1}:{};return s.jsx("div",{className:O.clsx("w-full",r),style:R,children:s.jsxs(xe.Tab.Group,{selectedIndex:n,onChange:a,as:"div",className:l?"flex flex-col overflow-hidden":void 0,style:M,children:[s.jsx(xe.Tab.List,{ref:m,className:O.clsx(I,p),style:_,children:t.map($=>s.jsx(xe.Tab,{title:A?$.label:void 0,className:({selected:L})=>O.clsx(k.tab,x&&"shrink-0",L?k.selected:k.unselected),style:{...i?{paddingBottom:i}:{},...h!==void 0?{paddingLeft:`${h}px`,paddingRight:`${h}px`}:{}},children:({selected:L})=>{const q=L&&$.selectedIcon?$.selectedIcon:$.icon;return s.jsxs("div",{className:O.clsx("flex items-center",tr(c)),children:[j&&q&&S.default.isValidElement(q)&&S.default.cloneElement(q,{size:u,color:"currentColor"}),N&&s.jsx("span",{className:"whitespace-nowrap",children:$.label})]})}},$.id))}),s.jsx(xe.Tab.Panels,{className:E(),style:l?{display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"hidden",...T}:T,children:t.map($=>s.jsx(xe.Tab.Panel,{unmount:v,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:o=!1,lazy:l=!1,loading:c=!1,className:u})=>{const[d,f]=S.default.useState(e[0]?.id);S.default.useEffect(()=>{if(t!==void 0)return;e.some(g=>g.id===d)||f(e[0]?.id)},[e,t,d]);const h=t??d,p=m=>{const g=e[m]?.id;g!==void 0&&(f(g),r?.(g))},v=Math.max(0,e.findIndex(m=>m.id===h));if(e.length===0&&!c)return null;if(c)return s.jsxs("div",{className:O.clsx("overflow-hidden",o&&"h-full",!i&&"border border-surface-3 rounded-lg",u),children:[s.jsxs("div",{className:"flex items-center gap-8 p-6 bg-surface-bg border-b border-surface-3",children:[s.jsx("div",{className:"h-24 w-48 rounded-md bg-surface-2 animate-pulse"}),s.jsx("div",{className:"h-24 w-40 rounded-md bg-surface-2 animate-pulse"})]}),s.jsx("div",{className:O.clsx("flex items-center justify-center bg-white",o?"min-h-full":"min-h-[160px]"),children:s.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?s.jsx("div",{className:O.clsx("p-6 bg-white",o&&"min-h-full"),children:m.content}):s.jsx("div",{className:O.clsx("flex items-center justify-center bg-white",o?"min-h-full":"min-h-[160px]"),children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{size:16}),onClick:()=>a?.(m.id),children:n})})}));return s.jsx("div",{className:O.clsx("overflow-hidden",o&&"h-full",!i&&"border border-surface-3 rounded-lg",u),children:s.jsx(Cm,{variant:"pill",tabs:x,selectedIndex:v,onChange:p,tabListClassName:"bg-surface-bg border-b border-surface-3 p-6",contentSpacing:"none",fullHeight:o,lazy:l})})},DC=({tabs:e,className:t,selectedIndex:r,onChange:n,onAddTab:a,onArrowRightClick:i,onCloseTab:o,tabWidth:l,scrollDistance:c=300})=>{const u=P.useRef(null),[d,f]=P.useState(!1),[h,p]=P.useState(!1),v=()=>{if(!u.current)return;const{scrollLeft:g,scrollWidth:b,clientWidth:w}=u.current;f(g>0),p(g<b-w-1)};P.useEffect(()=>{v();const g=u.current;if(g){g.addEventListener("scroll",v);const b=new ResizeObserver(v);return b.observe(g),()=>{g.removeEventListener("scroll",v),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 s.jsx("div",{className:O.clsx("w-full h-full",t),children:s.jsx(xe.Tab.Group,{className:"h-full w-full",selectedIndex:r,onChange:n,children:s.jsxs("div",{className:"relative flex items-center border-x border-surface-3 h-full w-full",children:[d&&s.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:s.jsx(ie,{className:"text-med-em",size:"xs",children:s.jsx(B.ArrowLeft2,{})})}),s.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:s.jsx(xe.Tab.List,{className:"flex min-w-full h-full ",children:e.map((g,b)=>s.jsx(xe.Tab,{as:"div",className:({selected:w})=>O.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})=>s.jsxs("div",{className:"flex items-center justify-between gap-8 p-8 w-full",children:[s.jsx("span",{className:`!truncate text-sm text-high-em font-medium ${w?"text-high-em":"text-low-em"}`,children:g.label}),g.closeable&&w&&o&&s.jsx(W,{onClick:C=>{C.stopPropagation(),o(b)},className:"cursor-pointer",leadingIcon:s.jsx(ie,{size:"xs",className:"text-med-em",children:s.jsx(it,{})}),"aria-label":"Close tab",icons:"only",variant:"neutral",hierarchy:"secondary"})]})},g.id))})}),s.jsxs("div",{className:"flex items-center h-full",children:[h&&s.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:s.jsx(ie,{className:"text-low-em",size:"xs",children:s.jsx(B.ArrowRight2,{})})}),a&&s.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:s.jsx(ie,{className:"text-low-em",size:12,children:s.jsx(B.Add,{})})})]})]})})})};DC.displayName="HeaderTabs";const T4={default:{...We.default,placeholder:"placeholder-placeholder",text:"text-med-em"},danger:{...We.danger,placeholder:"placeholder-danger-em",text:"text-danger-em"}},E4={sm:{...qt.sm,fontSize:"text-xs"},md:{...qt.md,fontSize:"text-sm"},lg:{...qt.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"},bl=({variant:e="default",size:t="md",label:r,hint:n,hintIconVariant:a,disabled:i,resize:o="vertical",className:l,customFontWeight:c,customBackground:u,...d})=>{const f=T4[e],h=E4[t],p=c||void 0,v=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 s.jsxs("div",{className:O.clsx("flex flex-col gap-1.5",l),children:[r&&s.jsx("label",{htmlFor:d.id,className:O.clsx("font-semibold text-med-em",h.labelFontSize,i&&$n.label),children:r}),s.jsx("div",{className:O.clsx("relative flex items-center border rounded-xl transition-colors duration-200 flex-1",!u&&f.wrapper,i&&$n.wrapper),style:{backgroundColor:v},children:s.jsx("textarea",{disabled:i,className:O.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[o],i&&$n.text,i&&$n.placeholder),style:{fontWeight:p},...d})}),n&&s.jsx(ft,{icon:s.jsx(B.InfoCircle,{variant:a}),label:n,iconSize:h.hintIconSize,gap:1,iconColorClass:O.clsx(f.hint,i&&$n.hint),labelColorClass:O.clsx(f.hint,i&&$n.hint),className:O.clsx(h.hintFontSize,"font-semibold")})]})};function I4({theme:e="light",onToggle:t,className:r}){return s.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"?s.jsx("span",{children:"Light Mode"}):s.jsx("span",{children:"Dark Mode"})})}const M4="bg-white rounded-[20px] shadow-xl py-6 px-10 flex items-center gap-6 max-w-md leading-10",$4={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"},zC=18,BC="text-base font-bold text-high-em leading-10",FC="text-sm text-high-em leading-9",qC=(e,t)=>Q.twMerge(M4,$4[e||"default"],t),WC=P.forwardRef((e,t)=>{const{title:r,description:n,variant:a="default",action:i,onOpenChange:o,duration:l=5e3,children:c,icon:u,className:d,iconSize:f=zC,...h}=e,p=a!=="custom"||u;return s.jsxs(kt.Root,{ref:t,duration:l,onOpenChange:o,className:qC(a,d),...h,children:[p&&s.jsx("div",{children:a==="custom"&&u?u:s.jsx(rm,{size:f})}),s.jsxs("div",{className:"flex-1",children:[r&&s.jsx(kt.Title,{className:BC,children:r}),n&&s.jsx(kt.Description,{className:FC,children:n})]}),i&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-px h-8 bg-surface-3"}),s.jsx(kt.Action,{asChild:!0,altText:i.label,onClick:i.onClick,children:s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"quaternary",size:"md",icons:"none",children:i.label})})]}),s.jsx(kt.Close,{asChild:!0,className:"shrink-0 flex items-center justify-center",children:s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(it,{className:"text-high-em",size:8})})}),c]})});WC.displayName="Toast";const HC=P.createContext(null),R4=()=>{const e=P.useContext(HC);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},L4=({children:e})=>{const[t,r]=P.useState([]),n=P.useCallback(i=>{const{title:o,description:l,variant:c="default",action:u,duration:d=5e3}=i,f={id:Math.random().toString(36).substr(2,9),title:o,description:l,variant:c,action:u,duration:d};r(h=>[...h,f])},[]),a=P.useCallback((i,o)=>{i||r(l=>l.filter(c=>c.id!==o))},[]);return s.jsx(HC.Provider,{value:{toast:n},children:s.jsxs(kt.Provider,{swipeDirection:"right",children:[e,s.jsx(kt.Viewport,{className:"fixed top-5 right-5 z-[999] flex flex-col gap-4 w-full max-w-[400px]"}),t.map(i=>s.jsxs(kt.Root,{duration:i.duration,onOpenChange:o=>a(o,i.id),className:qC(i.variant),children:[i.variant!=="custom"&&s.jsx("div",{className:"shrink-0 w-10 h-12 flex items-center justify-center",children:s.jsx(rm,{size:zC})}),s.jsxs("div",{className:"flex-1",children:[i.title&&s.jsx(kt.Title,{className:BC,children:i.title}),i.description&&s.jsx(kt.Description,{className:FC,children:i.description})]}),i.action&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-px h-12 bg-surface-3"}),s.jsx(kt.Action,{asChild:!0,altText:i.action.label,onClick:i.action.onClick,children:s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"quaternary",size:"md",icons:"none",children:i.action.label})})]}),s.jsx(kt.Close,{asChild:!0,className:"shrink-0 flex items-center justify-center",children:s.jsx(W,{className:"cursor-pointer",variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(it,{className:"text-high-em",size:8})})})]},i.id))]})})},D4={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"},Pa=({size:e="medium",checked:t,disabled:r,className:n,...a})=>{const i=D4[e];return s.jsxs("label",{className:O.clsx("relative inline-flex items-center",r?Vr.disabled:"cursor-pointer",n),children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",checked:t,disabled:r,...a}),s.jsx("div",{className:O.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:s.jsx("div",{className:O.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)})})]})},z4=({options:e,value:t,onChange:r,size:n="medium",disabled:a=!1,orientation:i="vertical",togglePosition:o="right",className:l})=>{const c=S.default.useId(),u=d=>{const f=t.includes(d)?t.filter(h=>h!==d):[...t,d];r(f)};return s.jsx("div",{className:Q.twMerge(O.clsx("flex",i==="vertical"?"flex-col gap-8":"flex-row flex-wrap gap-x-8 gap-y-8",l)),children:e.map(d=>{const f=t.includes(d.value),h=a||!!d.disabled,p=`${c}-${String(d.value)}`,v=!!d.caption,x=s.jsx("div",{className:O.clsx("flex items-center shrink-0",v&&"mt-0.5"),children:s.jsx(Pa,{id:p,size:n,checked:f,disabled:h,onChange:()=>u(d.value)})}),m=s.jsxs("label",{htmlFor:p,className:O.clsx("flex flex-col flex-1 min-w-0 gap-3",h?"cursor-not-allowed":"cursor-pointer"),children:[s.jsx("span",{className:O.clsx("text-sm font-medium leading-5",h?"text-disabled":"text-high-em"),children:d.label}),d.caption&&s.jsx("span",{className:O.clsx("text-xs leading-4",h?"text-disabled":"text-low-em"),children:d.caption})]});return s.jsx("div",{className:O.clsx("flex gap-6",o==="right"&&"justify-between",v?"items-start":"items-center",d.className),children:o==="left"?s.jsxs(s.Fragment,{children:[x,m]}):s.jsxs(s.Fragment,{children:[m,x]})},d.value)})})},Sm=S.default.memo(({children:e,className:t,borderSide:r="none",borderStyle:n="surface-3"})=>{const a=S.default.useMemo(()=>r==="none"?"":`${r==="left"?"border-l":"border-r"} ${n==="surface-3"?"border-surface-3":"border-surface-4"}`,[r,n]);return s.jsx("div",{className:`h-full w-full flex flex-col ${a} ${t||""}`,children:e})});Sm.displayName="TypesPanel";const B4=({categories:e=[],onItemClick:t,renderItem:r,className:n=""})=>{const a=i=>{t&&t(i)};return s.jsxs("div",{className:`px-6 py-8 flex-1 overflow-y-auto ${n}`,children:[e.map((i,o)=>s.jsxs("div",{className:"mb-8 last:mb-0",children:[s.jsx("h3",{className:"font-inter font-semibold text-sm text-med-em mb-8",children:i.title}),s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(70px,1fr))] gap-6",children:i.items.map(l=>s.jsx(S.default.Fragment,{children:r?r(l,{onClick:()=>a(l.id)}):s.jsx(V2,{icon:l.icon,text:l.label,onClick:()=>a(l.id)})},l.id))}),o<e.length-1&&s.jsx("div",{className:"mt-8",children:s.jsx(fe,{})})]},i.id)),e.length===0&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-sm text-med-em",children:"No hay elementos en esta categoría"})})]})},F4=({categories:e=[],onItemClick:t,renderItem:r,className:n=""})=>{const a=i=>{t&&t(i)};return s.jsx(Ct.Provider,{delayDuration:300,children:s.jsxs("div",{className:`px-6 py-8 flex-1 overflow-y-auto ${n}`,children:[e.map((i,o)=>s.jsxs("div",{className:"mb-8 last:mb-0",children:[s.jsx("h3",{className:"font-inter font-semibold text-sm text-med-em mb-8",children:i.title}),s.jsx("div",{className:"flex flex-col gap-6",children:i.items.map(l=>s.jsx(S.default.Fragment,{children:r?r(l,{onClick:()=>a(l.id)}):s.jsx(um,{leadingIcon:s.jsx(B.HambergerMenu,{size:20}),leadingIconColor:"text-disabled",icon:s.jsx(nm,{}),iconColor:"text-disabled",tooltipContent:`Add ${l.label} field type`,onClick:()=>a(l.id),children:l.label})},l.id))}),o<e.length-1&&s.jsx("div",{className:"mt-8",children:s.jsx(fe,{})})]},i.id)),e.length===0&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-sm text-med-em",children:"No hay elementos en esta categoría"})})]})})},q4=[{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}],W4=[{value:"list",icon:s.jsx(B.Task,{})},{value:"grid",icon:s.jsx(B.Category,{})}],H4=({className:e="",selectedType:t,onTypeChange:r,selectedView:n,onViewChange:a,actions:i,categories:o,placeholder:l="All",showLabel:c=!0})=>{const[u,d]=P.useState("basicos"),[f,h]=P.useState("list"),p=t!==void 0?t:u,v=n!==void 0?n:f,x=g=>{r?r(g):d(g)},m=g=>{a?a(g):h(g)};return s.jsx(Ct.Provider,{delayDuration:300,children:s.jsxs("div",{className:`flex flex-col ${e}`,children:[c&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"px-6 pt-9 pb-8 flex items-center justify-between",children:[s.jsx(dC,{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&&s.jsx("div",{children:i})]}),s.jsx(fe,{})]}),s.jsxs("div",{className:`flex items-center justify-between gap-4 px-6 ${c?"py-8":"py-4"}`,children:[s.jsx("div",{className:"flex-1",children:s.jsx(Te,{items:o?o.map(g=>({id:g.id,title:g.title,showCheckbox:!1,showLeadingIcon:!1,showTrailingIcon:!1,className:"!h-[34px]"})):q4.map(g=>({...g,showLeadingIcon:!1,className:"!h-[34px]"})),value:p,onChange:x,placeholder:l,size:"md",menuSize:"sm",leadingIcon:s.jsx(B.SearchNormal1,{size:16}),showLeadingIcon:!0})}),s.jsx(xr,{options:W4,value:v,onChange:m,size:"sm"})]}),s.jsx(fe,{})]})})},V4=({className:e="",searchQuery:t,onSearchChange:r,searchPlaceholder:n="Search...",selectedView:a,onViewChange:i,viewOptions:o=[],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,v=P.useCallback(m=>{const g=m.target.value;r?r(g):u(g)},[r]),x=m=>{i?i(m):f(m)};return s.jsxs("div",{className:`flex flex-col ${e}`,children:[s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center justify-between gap-4 py-8 px-6",children:[s.jsx("div",{className:"flex-1",children:s.jsx(me,{type:"search",placeholder:n,value:h,onChange:v,trailingIcon:s.jsx(B.SearchNormal1,{size:16,color:"currentColor"})})}),s.jsx(xr,{options:o,value:p,onChange:x,size:l})]}),s.jsx(fe,{})]})},Nm=({title:e,backButton:t,actions:r,className:n})=>s.jsxs("div",{className:O.clsx("flex items-center gap-2","h-[56px] px-4","border-b border-surface-3",n),children:[t&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(B.ArrowLeft2,{}),"aria-label":t["aria-label"]||"Go back",onClick:t.onClick,className:"shrink-0"}),s.jsxs("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[s.jsx("h2",{className:O.clsx("text-sm font-semibold leading-[22px]","text-high-em","truncate"),children:e}),r&&s.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})]})]});Nm.displayName="PanelHeader";const U4=({user:e,sections:t,align:r="right",offset:n=8,className:a,avatarSize:i="md"})=>{const[o,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(o)return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[o]);const d=h=>{!h.disabled&&h.onClick&&(h.onClick(),l(!1))},f=(h,p)=>{h.switch?.onChange&&h.switch.onChange(p)};return s.jsxs("div",{className:O.clsx("relative inline-block",a),children:[s.jsx("div",{ref:u,onClick:()=>l(!o),className:"cursor-pointer",children:s.jsx(Ft,{size:i,imageUrl:e.avatar,initials:e.initials||e.name.charAt(0),statusBadge:e.statusBadge})}),o&&s.jsxs("div",{ref:c,className:O.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:[s.jsxs("div",{className:"px-10 py-8 border-b border-surface-3",children:[s.jsx("p",{className:"text-sm font-semibold text-high-em",children:e.name}),e.email&&s.jsx("p",{className:"text-xs text-low-em mt-1",children:e.email})]}),s.jsx("div",{className:"py-3",children:t.map((h,p)=>s.jsxs(S.default.Fragment,{children:[h.map(v=>s.jsxs("button",{onClick:()=>d(v),disabled:v.disabled||!!v.switch,className:O.clsx("w-full px-10 py-4 text-left text-sm flex items-center gap-3 transition-colors",!v.switch&&"hover:bg-surface-1",v.destructive?"text-danger-main":"text-high-em",v.disabled&&"opacity-50 cursor-not-allowed"),children:[v.icon&&s.jsx("span",{className:"flex-shrink-0 flex items-center justify-center text-current",children:v.icon}),s.jsx("span",{className:"flex-1 font-normal",children:v.label}),v.trailing&&s.jsx("span",{className:"flex-shrink-0",children:v.trailing}),!v.trailing&&v.badge&&s.jsx(Ye,{theme:v.badge.theme||"success",size:"xs",variant:"simple",children:v.badge.label}),!v.trailing&&v.switch&&s.jsx(Pa,{size:"small",checked:v.switch.checked,onChange:x=>f(v,x.target.checked),onClick:x=>x.stopPropagation()})]},v.id)),p<t.length-1&&s.jsx("div",{className:"my-3 border-t border-surface-3"})]},p))})]})]})},Om=({selected:e,onSelect:t,disabled:r=!1,onCancel:n,onAccept:a,extraMonth:i=!1,pickType:o="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,v=b=>{h(b),t&&t(b)},x=()=>{h(void 0),n&&n()},m=()=>{a&&a(p)},g=o==="range"?{mode:"range",selected:p,onSelect:v}:{mode:"single",selected:p?.from,onSelect:b=>v(b?{from:b}:void 0)};return s.jsxs("div",{className:Q.twMerge(O.clsx("font-family-inter bg-white border border-surface-3 rounded-[20px] w-fit",r&&"opacity-50 pointer-events-none",l)),children:[s.jsx(a5.DayPicker,{...g,disabled:r,numberOfMonths:i?2:1,showOutsideDays:!0,className:"datepicker-calendar p-2.5",components:{Chevron:({orientation:b})=>b==="left"?s.jsx(B.ArrowLeft2,{size:16,color:"var(--high-em)"}):s.jsx(B.ArrowRight2,{size:16,color:"var(--high-em)"})}}),d&&s.jsx("div",{className:"border-t border-surface-3 px-2.5 py-2.5 pl-5 self-end justify-end",children:s.jsxs("div",{className:"flex gap-2 self-end justify-end",children:[s.jsx(W,{className:"mr-8",variant:"neutral",size:"sm",hierarchy:"secondary",onClick:x,disabled:r,children:c}),s.jsx(W,{variant:"brand",size:"sm",hierarchy:"primary",onClick:m,disabled:r,children:u})]})})]})},Pm=({className:e,icon:t,label:r,description:n,actions:a,iconType:i="default",iconVariant:o="secondary",iconSize:l="sm",linkProps:c,badge:u,bottomContent:d,labelInlineContent:f,contentGap:h=2,classNameActions:p,...v})=>s.jsxs("div",{className:O.clsx("flex flex-row gap-8 items-center",e),...v,children:[t&&s.jsx(vl,{type:i,variant:o,size:l,children:t}),s.jsxs("div",{className:O.clsx("flex flex-1 flex-col",tr(h)),children:[s.jsxs("div",{className:O.clsx("flex flex-row",u?"justify-between gap-2":""),children:[s.jsxs("div",{className:"flex flex-row gap-6 items-center",children:[c?s.jsx(gr,{className:"w-fit",...c,children:r}):s.jsx("span",{className:"text-high-em text-md font-medium",children:r}),f&&s.jsx("div",{children:f})]}),u&&s.jsx("div",{children:u})]}),n&&s.jsx("span",{className:"text-med-em text-sm font-normal",children:n}),d&&s.jsx("div",{children:d})]}),a&&s.jsx("div",{className:O.clsx("flex gap-8",p),children:a})]}),K4=({className:e,planLabel:t,priceLabel:r,timeLabel:n,nextPaymentLabel:a,dateLabel:i,items:o,buttonLabel1:l,onClickButton1:c,buttonLabel2:u,onClickButton2:d,...f})=>s.jsxs("div",{className:O.clsx("flex flex-col border border-surface-3 rounded-8 w-full",e),...f,children:[s.jsxs("div",{className:"flex flex-row px-10 py-8 border-b border-b-surface-3 gap-8",children:[s.jsxs("div",{className:"flex flex-col flex-1 gap-4",children:[s.jsx("span",{className:"flex text-med-em font-medium text-sm",children:t}),s.jsxs("div",{className:"flex flex-row items-center gap-6",children:[s.jsx("span",{className:"text-high-em font-semibold text-3xl font-family-space-grotesk",children:r}),s.jsxs("span",{className:"text-med-em text-sm font-normal",children:["/ ",n]})]})]}),s.jsxs("div",{className:"flex flex-col self-center ",children:[s.jsx("span",{className:"font-normal text-xs text-right text-med-em",children:a}),s.jsx("span",{className:"text-md text-right font-medium text-high-em",children:i})]})]}),s.jsxs("ul",{className:"flex flex-col p-10 gap-12",children:[s.jsx("div",{className:"flex flex-col gap-10",children:o.map((h,p)=>s.jsx(S.default.Fragment,{children:s.jsx("li",{children:s.jsx(Pm,{icon:h.icon,iconType:"default",iconVariant:"secondary",iconSize:"sm",label:h.itemLabel,badge:s.jsx(Ye,{variant:"simple",theme:h.badgeTheme,children:h.badge}),bottomContent:s.jsx(al,{progress:h.progress})})})},p))}),s.jsxs("div",{className:"flex flex-row gap-6",children:[s.jsx(W,{className:"w-1/2",size:"md",variant:"brand",hierarchy:"primary",onClick:c,children:l}),s.jsx(W,{className:"w-1/2",size:"md",variant:"neutral",hierarchy:"tertiary",onClick:d,children:u})]})]})]}),G4=({className:e,title:t,subtitle:r,actionButtonLabel:n,actionButtonLabelOnClick:a,extraComponent:i,items:o,...l})=>s.jsxs("div",{className:O.clsx("flex flex-col border border-surface-3 rounded-8 w-full",e),...l,children:[s.jsxs("div",{className:"flex flex-row px-10 py-8 border-b border-b-surface-3",children:[s.jsxs("div",{className:"flex flex-1 flex-col content-center",children:[s.jsx("h3",{className:"text-high-em font-semibold",children:t}),s.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]}),n&&s.jsx("div",{className:"flex self-center",children:s.jsx(W,{size:"sm",variant:"neutral",hierarchy:"tertiary",onClick:a,children:n})})]}),s.jsxs("div",{className:"flex flex-col p-10 gap-10",children:[s.jsx("div",{className:"flex flex-col gap-6",children:o.map((c,u)=>s.jsxs(S.default.Fragment,{children:[u>0&&s.jsx(fe,{}),s.jsx(Pm,{icon:c.icon,label:c.label,description:c.description,actions:(c.buttonLabel||c.buttonIcon)&&s.jsx(W,{size:"sm",onClick:c.buttonOnClick,...c.buttonLabel?{variant:"neutral",hierarchy:"tertiary"}:{icons:"only",variant:"neutral",hierarchy:"secondary",leadingIcon:c.buttonIcon||s.jsx(am,{})},children:c.buttonLabel})})]},u))}),i&&s.jsx("div",{className:"flex flex-1",children:i})]})]}),Z4=({className:e,title:t,subtitle:r,buttonItems:n,...a})=>s.jsxs("div",{className:O.clsx("flex flex-col gap-8 p-8 bg-surface-1 rounded-8 w-full",e),...a,children:[s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("h3",{className:"text-high-em font-semibold text-xl",children:t}),s.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]}),s.jsx("div",{className:"flex flex-col gap-4",children:n.map((i,o)=>s.jsx(W,{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"}},o))})]}),VC=({className:e,icon:t,projectName:r,dbLabel:n,statusLabel:a,statusState:i,stats:o,...l})=>s.jsxs("div",{className:O.clsx("flex flex-col border border-surface-3 rounded-8 bg-white w-full",e),...l,children:[s.jsxs("div",{className:"flex flex-col gap-6 px-10 py-8 border-b border-b-surface-3",children:[s.jsxs("div",{className:"flex items-center gap-5",children:[s.jsx("span",{className:"flex size-12 shrink-0 items-center justify-center rounded-5 bg-surface-2 text-high-em",children:s.jsx(ie,{size:"sm-md",children:t})}),s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx("span",{className:"text-high-em font-semibold truncate",children:r}),s.jsx("span",{className:"text-med-em text-sm",children:n})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ye,{variant:"status",statusState:i,statusSize:"xs"}),s.jsx("span",{className:"text-med-em text-sm",children:a})]})]}),s.jsx("div",{className:"flex flex-col gap-6 px-10 py-8",children:o.map((c,u)=>s.jsxs(S.default.Fragment,{children:[u>0&&s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"text-med-em text-sm",children:c.label}),c.badgeTheme?s.jsx(Ye,{variant:"simple",theme:c.badgeTheme,children:c.value}):s.jsx("span",{className:"text-high-em font-medium",children:c.value})]})]},u))})]});VC.displayName="ProjectOverviewCard";const lc={showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!0},UC=({className:e,icon:t,name:r,statusLabel:n,statusTheme:a="surface",fieldsLabel:i,updatedLabel:o,onView:l,onDuplicate:c,onDelete:u,viewLabel:d="Ver",duplicateLabel:f="Duplicar",deleteLabel:h="Eliminar",...p})=>{const[v,x]=P.useState(!1),m=P.useRef(null),g=()=>x(!1),b=[{...lc,id:"view",title:d,leadingIcon:s.jsx(B.Eye,{}),onSelect:()=>{g(),l?.()}},{...lc,id:"duplicate",title:f,leadingIcon:s.jsx(B.Copy,{}),onSelect:()=>{g(),c?.()}},{...lc,id:"delete",title:h,leadingIcon:s.jsx(B.Trash,{}),customTitleColor:"text-danger-em",onSelect:()=>{g(),u?.()}}];return s.jsxs("div",{role:l?"button":void 0,onClick:l,className:Q.twMerge(O.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:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[s.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-4 bg-surface-2 text-high-em",children:s.jsx(ie,{size:"sm",children:t})}),s.jsx("span",{className:"truncate font-semibold text-high-em",children:r})]}),s.jsxs("div",{className:"relative shrink-0",children:[s.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:s.jsx(B.More,{size:20,color:"currentColor",className:"rotate-90"})}),v&&s.jsx(Ht,{size:"xs",triggerRef:m,onClose:g,items:b})]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[s.jsx(ft,{icon:s.jsx(B.Hashtag,{}),label:i,labelSize:"sm",iconSize:"sm",gap:4}),o&&s.jsx(ft,{icon:s.jsx(B.Clock,{}),label:o,labelSize:"sm",iconSize:"sm",gap:4}),s.jsx(Ye,{variant:"simple",theme:a,children:n})]})]})};UC.displayName="ModuleSummaryCard";const cc={showCheckbox:!1,showLeadingImage:!1,showDescription:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!1,showLeadingIcon:!0},KC=({className:e,icon:t,name:r,typeLabel:n,moduleLabel:a,updatedLabel:i,statusLabel:o,statusTheme:l="surface",onView:c,onDuplicate:u,onDelete:d,viewLabel:f="Ver",duplicateLabel:h="Duplicar",deleteLabel:p="Eliminar",...v})=>{const[x,m]=P.useState(!1),g=P.useRef(null),b=()=>m(!1),w=[c&&{...cc,id:"view",title:f,leadingIcon:s.jsx(B.Eye,{}),onSelect:()=>{b(),c()}},u&&{...cc,id:"duplicate",title:h,leadingIcon:s.jsx(B.Copy,{}),onSelect:()=>{b(),u()}},d&&{...cc,id:"delete",title:p,leadingIcon:s.jsx(B.Trash,{}),customTitleColor:"text-danger-em",onSelect:()=>{b(),d()}}].filter(Boolean),C=w.length>0;return s.jsxs("div",{role:c?"button":void 0,onClick:c,className:Q.twMerge(O.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)),...v,children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[s.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-4 bg-surface-2 text-high-em",children:s.jsx(ie,{size:"sm",children:t})}),s.jsx("span",{className:"truncate font-semibold text-high-em",children:r})]}),C&&s.jsxs("div",{className:"relative shrink-0",children:[s.jsx("button",{ref:g,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:s.jsx(B.More,{size:20,color:"currentColor",className:"rotate-90"})}),x&&s.jsx(Ht,{size:"xs",triggerRef:g,onClose:b,items:w})]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[s.jsx(ft,{icon:s.jsx(B.Category,{}),label:n,labelSize:"sm",iconSize:"sm",gap:4}),a&&s.jsx(ft,{icon:s.jsx(B.Box,{}),label:a,labelSize:"sm",iconSize:"sm",gap:4}),i&&s.jsx(ft,{icon:s.jsx(B.Clock,{}),label:i,labelSize:"sm",iconSize:"sm",gap:4}),s.jsx(Ye,{variant:"simple",theme:l,children:o})]})]})};KC.displayName="WidgetSummaryCard";const wl=P.forwardRef(({className:e,title:t,description:r,icon:n,isDragging:a=!1,onMaximize:i,onTextBlock:o,onEdit:l,onCopy:c,onTrash:u,...d},f)=>{const[h,p]=P.useState("icon1"),v=m=>{switch(p(m),m){case"maximize":i?.();break;case"text-block":o?.();break;case"edit":l?.();break;case"copy":c?.();break;case"trash":u?.();break}},x=[...i?[{value:"maximize",icon:s.jsx(ie,{size:12,children:s.jsx(Jo,{})})}]:[],...o?[{value:"text-block",label:t}]:[],...l?[{value:"edit",icon:s.jsx(ie,{size:12,children:s.jsx(C2,{})})}]:[],...c?[{value:"copy",icon:s.jsx(ie,{size:12,children:s.jsx(el,{})})}]:[],...u?[{value:"trash",icon:s.jsx(ie,{size:12,children:s.jsx(tl,{})})}]:[]];return s.jsxs("div",{ref:f,className:O.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:[s.jsxs("div",{className:"flex flex-row p-4 gap-4",children:[s.jsx("div",{children:s.jsx(vl,{variant:"secondary",size:"sm",children:n})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-high-em font-semibold text-sm font-family-space-grotesk",children:t}),s.jsx("span",{className:"text-med-em text-xs font-normal",children:r})]})]}),s.jsx("div",{className:"absolute inset-0 m-auto hidden w-fit h-fit p-4 group-hover:block",children:s.jsx(xr,{options:x,value:h,onChange:v,size:"xs",variant:"brand"})})]})});wl.displayName="WidgetBuilderItemHoverAction";const Y4=({className:e,title:t,subtitle:r,image:n,imageAlt:a="Project image",actionButtons:i=[],labelIcons:o=[],...l})=>{const[c,u]=S.default.useState(!1);return s.jsxs("div",{className:O.clsx("flex flex-col rounded-2xl w-full border border-surface-3 h-full",e),...l,children:[s.jsxs("div",{className:"relative w-full h-48 overflow-hidden rounded-t-2xl",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[s.jsx("img",{src:n,alt:a,className:"w-full h-full object-cover"}),i.length>0&&c&&s.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&&s.jsx("div",{className:O.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)=>s.jsx(W,{variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:d.icon,size:"md",onClick:d.onClick,"aria-label":d.ariaLabel,className:"z-10 cursor-pointer"},f))})]}),s.jsxs("div",{className:"flex flex-col py-6 px-8 gap-3 bg-white rounded-b-2xl flex-1",children:[s.jsx("span",{className:"font-semibold text-high-em text-md line-clamp-1",children:t}),s.jsx("span",{className:"text-low-em text-sm font-normal line-clamp-3",children:r}),o.length>0&&s.jsx("div",{className:"flex flex-row gap-8",children:o.map((d,f)=>s.jsx(ft,{gap:4,iconSize:"sm",labelSize:"sm",icon:d.icon,label:d.label},f))})]})]})},X4=({className:e,title:t,subtitle:r,icon:n,iconType:a="default",iconVariant:i="secondary",iconSize:o="sm",headerActions:l,children:c,footerText:u,footerActions:d,footerVariant:f="default",classNameHeader:h,classNameBody:p,classNameFooter:v,...x})=>{const m=t||r||l||n,g=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 s.jsxs("div",{className:O.clsx("flex flex-col bg-white border rounded-8 w-full",e,b[f]),...x,children:[m&&s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-row gap-8 p-8 justify-between items-center",c&&"pb-0"),h),children:[s.jsxs("div",{className:"flex flex-row gap-8 items-center flex-1",children:[n&&s.jsx(vl,{type:a,variant:i,size:o,children:n}),(t||r)&&s.jsxs("div",{className:"flex flex-col gap-2",children:[t&&s.jsx("h3",{className:"text-high-em font-semibold text-md",children:t}),r&&s.jsx("span",{className:"text-med-em text-sm font-normal",children:r})]})]}),l&&s.jsx("div",{className:"flex items-center",children:l})]}),c&&s.jsx("div",{className:Q.twMerge(O.clsx("p-8",m),p),children:c}),g&&s.jsxs("div",{className:Q.twMerge(O.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]),v),children:[u&&s.jsx("div",{className:"text-sm text-low-em",children:u}),d&&s.jsx("div",{children:d})]})]})},Q4=({title:e,columns:t,rows:r,onChange:n,className:a,...i})=>{const o=`1fr repeat(${t.length}, auto)`,l=(c,u,d)=>s.jsx(Jt,{size:"small",checked:c.checked[d]??!1,disabled:c.disabled?.[d]??!1,onChange:f=>n(u,d,f.target.checked)});return s.jsxs("div",{className:Q.twMerge("bg-white border border-surface-3 rounded-8 w-full overflow-hidden px-6",a),...i,children:[s.jsxs("div",{className:"hidden sm:grid gap-x-6",style:{gridTemplateColumns:o},children:[s.jsx("div",{className:"flex items-center py-6",children:e&&s.jsx("h3",{className:"text-base text-high-em font-normal",children:e})}),t.map(c=>s.jsx("div",{className:"flex items-center justify-center py-6 text-base text-med-em",children:c},c)),s.jsx("div",{className:"col-span-full",children:s.jsx(fe,{})}),r.map((c,u)=>s.jsxs(S.default.Fragment,{children:[s.jsx("div",{className:"flex items-center py-5",children:s.jsx("span",{className:"text-sm text-high-em",children:c.label})}),t.map((d,f)=>s.jsx("div",{className:"flex items-center justify-center py-5",children:l(c,u,f)},f)),u<r.length-1&&s.jsx("div",{className:"col-span-full",children:s.jsx(fe,{})})]},u))]}),s.jsxs("div",{className:"flex flex-col sm:hidden",children:[e&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"py-6",children:s.jsx("h3",{className:"text-base text-high-em font-normal",children:e})}),s.jsx(fe,{})]}),r.map((c,u)=>s.jsxs(S.default.Fragment,{children:[s.jsxs("div",{className:"flex flex-col gap-4 py-5",children:[s.jsx("span",{className:"text-sm text-high-em",children:c.label}),s.jsx("div",{className:"flex flex-col gap-3",children:t.map((d,f)=>s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm text-med-em",children:d}),l(c,u,f)]},f))})]}),u<r.length-1&&s.jsx(fe,{})]},u))]})]})},gg=({size:e=20,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:e,height:e,className:t,...r,children:[s.jsx("path",{fill:"currentColor",d:"M4 8H12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{fill:"currentColor",d:"M8 12V4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),vg=({size:e=20,className:t,...r})=>s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",fill:"none",width:e,height:e,className:t,...r,children:[s.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"}),s.jsx("path",{d:"M6 1V11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]}),J4=[[4],[2,2],[3,1],[1,3],[2,1,1],[1,2,1],[1,1,2],[1,1,1,1]];function eA(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function tA(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 GC=P.createContext(void 0);function ZC(){const e=P.useContext(GC);if(!e)throw new Error("Must be used inside DropLayoutPicker");return e}const Am=({children:e,value:t,onChange:r})=>{const[n,a]=P.useState(!1),i=P.useRef(null);return s.jsx(GC.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};Am.displayName="DropLayoutPicker";const _m=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=ZC();return S.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};_m.displayName="DropLayoutPickerTrigger";const km=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=ZC(),o=P.useRef(null),[l,c]=P.useState(null),u=Na({triggerRef:i,panelRef:o,enabled:t});return Qi({refs:[i,o],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u"?null:yn.createPortal(s.jsxs("div",{ref:o,className:O.clsx("bg-white rounded-xl border border-surface-3 flex flex-col","min-w-[280px]",e),style:u,children:[s.jsx("div",{className:"p-5",children:s.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Column Layout"})}),s.jsx("div",{className:"border-t border-surface-3"}),s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-4 gap-3",children:J4.map((d,f)=>{const h=eA(d,n),p=l===f;return s.jsx("div",{className:O.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:s.jsx("div",{className:"flex gap-0.5 h-full",children:d.map((v,x)=>s.jsx("div",{className:O.clsx("bg-info-accent-3 rounded-sm",tA(v))},x))})},f)})})})]}),document.body)};km.displayName="DropLayoutPickerContent";const Ji=({className:e,bodyClassName:t,disabled:r=!1,onMaximize:n,dragHandleProps:a,onGrid:i,onAdd:o,onCopy:l,onTrash:c,onAddWidget:u,layout:d,onLayoutChange:f,children:h,...p})=>{const[v,x]=P.useState(""),m=y=>{x(y),y==="grid"&&i?.(),y==="add"&&o?.(),y==="copy"&&l?.(),y==="trash"&&c?.()},g=d!==void 0&&f!==void 0,b=[...!g&&i?[{value:"grid",icon:s.jsx(vg,{size:12})}]:[],...o?[{value:"add",icon:s.jsx(gg,{size:12})}]:[]],w=[...l?[{value:"copy",icon:s.jsx(el,{size:12})}]:[],...c?[{value:"trash",icon:s.jsx(tl,{size:12})}]:[]],C=n||a||b.length>0||g;return s.jsxs("div",{className:O.clsx("relative flex flex-col border border-surface-3 w-full",e),...p,children:[s.jsxs("div",{className:"bg-surface-2 flex justify-between border-b border-surface-3 min-h-[28px]",children:[C&&s.jsxs("div",{className:"flex",children:[(n||a)&&s.jsx("button",{type:"button",className:O.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:s.jsx(Jo,{size:12})}),b.length>0&&s.jsx(xr,{options:b,value:v,onChange:m,size:"xs",variant:"secondary",disabled:r,buttonClassName:"rounded-none"}),g&&d&&f&&s.jsxs(Am,{value:d,onChange:f,children:[s.jsx(_m,{children:s.jsx("button",{type:"button",className:O.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:s.jsx(vg,{size:12})})}),s.jsx(km,{})]})]}),w.length>0&&s.jsx(xr,{options:w,value:v,onChange:m,size:"xs",variant:"secondary",disabled:r,buttonClassName:"rounded-none"})]}),s.jsxs("div",{className:O.clsx("flex flex-col p-4 gap-4 h-full",t),children:[s.jsx("div",{className:"flex flex-col gap-4",children:h}),u&&s.jsx("div",{className:"flex justify-center",children:s.jsx(W,{size:"sm",variant:"neutral",hierarchy:"secondary",icons:"only",leadingIcon:s.jsx(gg,{}),onClick:u})})]})]})},YC=e=>"grid-cols-4",XC=(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"}},rA=["maximize","grid","add","copy","trash","addWidget"],nA=["maximize","text-block","edit","copy","trash"],aA=({widget:e,index:t,columnId:r,sectionId:n,onWidgetAction:a,widgetActionSet:i,renderWidgetIcon:o})=>{const{attributes:l,listeners:c,setNodeRef:u,isDragging:d}=Ve.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 s.jsx("div",{ref:u,"data-vc-widget":e.id,style:{display:d?"none":void 0,cursor:"grab",touchAction:"none"},...l,...c,children:s.jsx(wl,{ref:f,title:e.title,description:e.description,icon:o?.(e)??s.jsx(ie,{}),onMaximize:h("maximize"),onTextBlock:h("text-block"),onEdit:h("edit"),onCopy:h("copy"),onTrash:h("trash")})})},iA=({widget:e,index:t,columnId:r,sectionId:n,onSectionAction:a,sectionActionSet:i,onColumnAction:o,onWidgetAction:l,widgetActionSet:c,renderWidgetIcon:u,onLayoutChange:d})=>{const{attributes:f,listeners:h,setNodeRef:p,isDragging:v}=Ve.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=YC(x.layout),g=w=>a&&i.has(w)?()=>a(w,x.id):void 0,b=x.columns.map(w=>`vc-col-${w.id}`);return s.jsx("div",{ref:p,"data-vc-widget":e.id,style:{display:v?"none":void 0,touchAction:"none"},...f,children:s.jsx(Ji,{bodyClassName:"bg-white",onMaximize:g("maximize"),dragHandleProps:h,onGrid:g("grid"),onAdd:g("add"),onCopy:g("copy"),onTrash:g("trash"),layout:d?x.layout:void 0,onLayoutChange:d?w=>d(x.id,w):void 0,children:s.jsx(Ve.SortableContext,{items:b,strategy:Ve.horizontalListSortingStrategy,children:s.jsx("div",{className:O.clsx("grid gap-4",m),children:x.columns.map((w,C)=>{const y=XC(x.layout,C);return s.jsx(QC,{column:w,sectionId:x.id,sectionLayout:x.layout,columnSpan:y,onColumnAction:o,onWidgetAction:l,widgetActionSet:c,renderWidgetIcon:u,onSectionAction:a,sectionActionSet:i,onLayoutChange:d},w.id)})})})})})},QC=({column:e,sectionId:t,sectionLayout:r,columnSpan:n,onColumnAction:a,onWidgetAction:i,widgetActionSet:o,renderWidgetIcon:l,onSectionAction:c,sectionActionSet:u,onLayoutChange:d})=>{const{setNodeRef:f,listeners:h,attributes:p,transform:v,isDragging:x}=Ve.useSortable({id:`vc-col-${e.id}`,data:{type:"vc-column",columnId:e.id,sectionId:t},animateLayoutChanges:()=>!1}),[m,g]=P.useState(!1),[b,w]=P.useState(null);Be.useDndMonitor({onDragOver(A){const k=A.over?.data.current??{},I=k.columnId===e.id;g(I),w(I&&typeof k.widgetIndex=="number"?k.widgetIndex:null)},onDragEnd(){g(!1),w(null)},onDragCancel(){g(!1),w(null)}});const C=m,y=A=>a?()=>a(A,e.id,t):void 0,j=[...e.widgets].sort((A,k)=>A.position-k.position),N=j.map(A=>`vc-widget-${A.id}`);return s.jsxs("div",{ref:f,"data-droppable-id":`vc-col-${e.id}`,...p,style:{transform:Yo.CSS.Translate.toString(v),transition:x?"none":"transform 150ms ease",opacity:x?0:1},className:O.clsx(n,"flex flex-col",r.length>1&&"border border-surface-3"),children:[r.length>1&&s.jsx(cm,{onDrag:y("drag"),dragHandleProps:h,onDuplicate:y("duplicate"),onDelete:y("delete")}),s.jsxs("div",{className:O.clsx("flex flex-col gap-4 p-4","min-h-[200px]","bg-white"),children:[s.jsxs(Ve.SortableContext,{items:N,strategy:Ve.verticalListSortingStrategy,children:[j.map((A,k)=>s.jsxs(S.default.Fragment,{children:[C&&b===k&&s.jsx(Gn,{}),A.type==="nested-row"?s.jsx(iA,{widget:A,index:k,columnId:e.id,sectionId:t,onSectionAction:c,sectionActionSet:u,onColumnAction:a,onWidgetAction:i,widgetActionSet:o,renderWidgetIcon:l,onLayoutChange:d}):s.jsx(aA,{widget:A,index:k,columnId:e.id,sectionId:t,onWidgetAction:i,widgetActionSet:o,renderWidgetIcon:l})]},A.id)),C&&(b===null||b>=j.length)&&s.jsx(Gn,{})]}),!C&&(j.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:y("drag")})}):s.jsx("div",{className:"flex items-center justify-center pt-2",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:y("drag")})}))]})]})},sA=({emptyStateDescription:e})=>{const{setNodeRef:t,isOver:r}=Be.useDroppable({id:"vc-empty-state",data:{isEmpty:!0}});return s.jsx("div",{ref:t,className:"w-64",children:s.jsx(Ji,{bodyClassName:O.clsx("bg-white",r&&"!bg-surface-1"),disabled:!0,onMaximize:()=>{},onGrid:()=>{},onAdd:()=>{},onCopy:()=>{},onTrash:()=>{},onAddWidget:()=>{},children:s.jsx(ht,{flat:!0,description:e,className:"bg-transparent"})})})},oA=()=>{const{setNodeRef:e}=Be.useDroppable({id:"vc-new-row",data:{isNewRow:!0}});return s.jsx("div",{ref:e,className:"mt-4 min-h-[0px]"})},lA=({onWidgetDrop:e,onColumnReorder:t,onSectionReorder:r})=>(Be.useDndMonitor({onDragEnd(n){const{active:a,over:i}=n;if(!i?.id||typeof i.id!="string")return;const o=i.id,l=i.data.current??{},c=a.data.current??{};if(c.type==="vc-column"){let u;o.startsWith("vc-col-")?u=o.replace("vc-col-",""):o.startsWith("vc-widget-")&&(u=l.columnId),t&&u&&u!==c.columnId&&t(c.columnId,c.sectionId,u);return}if(c.type==="vc-section"){r&&o&&!o.startsWith("vc-")&&r(c.sectionId,o);return}if(o==="vc-empty-state")e?.("__empty__","__empty__",0,c);else if(o==="vc-new-row")e?.("__new_row__","__new_row__",-1,c);else if(o.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(o.startsWith("vc-col-")){const{columnId:u,sectionId:d}=l;u&&d&&e?.(u,d,-1,c)}}}),null),cA=({section:e,sectionActionSet:t,widgetActionSet:r,onSectionAction:n,onColumnAction:a,onWidgetAction:i,renderWidgetIcon:o,onWidgetDrop:l,onLayoutChange:c})=>{const{setNodeRef:u,listeners:d,attributes:f,transform:h,isDragging:p}=Ve.useSortable({id:e.id,data:{type:"vc-section",sectionId:e.id},animateLayoutChanges:()=>!1}),v=YC(e.layout),x=g=>n&&t.has(g)?()=>n(g,e.id):void 0,m=e.columns.map(g=>`vc-col-${g.id}`);return s.jsx("div",{ref:u,...f,style:{transform:Yo.CSS.Translate.toString(h),transition:p?"none":"transform 150ms ease",opacity:p?0:1},children:s.jsx(Ji,{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?g=>c(e.id,g):void 0,children:s.jsx(Ve.SortableContext,{items:m,strategy:Ve.horizontalListSortingStrategy,children:s.jsx("div",{className:O.clsx("grid gap-4",v),children:e.columns.map((g,b)=>{const w=XC(e.layout,b);return l?s.jsx(QC,{column:g,sectionId:e.id,sectionLayout:e.layout,columnSpan:w,onColumnAction:a,onWidgetAction:i,widgetActionSet:r,renderWidgetIcon:o,onSectionAction:n,sectionActionSet:t,onLayoutChange:c},g.id):s.jsxs("div",{"data-droppable-id":`vc-col-${g.id}`,className:O.clsx(w,"flex flex-col",e.layout.length>1&&"border border-surface-3"),children:[e.layout.length>1&&s.jsx(cm,{onDrag:a?()=>a("drag",g.id,e.id):void 0,onDuplicate:a?()=>a("duplicate",g.id,e.id):void 0,onDelete:a?()=>a("delete",g.id,e.id):void 0}),s.jsxs("div",{className:"flex flex-col gap-4 p-4 min-h-[120px] bg-white",children:[g.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 s.jsx(wl,{title:C.title,description:C.description,icon:o?.(C)??s.jsx(ie,{}),onMaximize:y("maximize"),onTextBlock:y("text-block"),onEdit:y("edit"),onCopy:y("copy"),onTrash:y("trash")},C.id)}),g.widgets.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:a?()=>a("drag",g.id,e.id):void 0})}):s.jsx("div",{className:"flex items-center justify-center pt-2",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(B.Add,{}),onClick:a?()=>a("drag",g.id,e.id):void 0})})]})]},g.id)})})})})})},uA=({className:e,data:t,emptyStateDescription:r="No sections yet",onSectionAction:n,sectionActions:a,onColumnAction:i,onWidgetAction:o,widgetActions:l,renderWidgetIcon:c,onWidgetDrop:u,onLayoutChange:d,onColumnReorder:f,onSectionReorder:h,...p})=>{const v=[...t?.sections??[]].sort((b,w)=>b.position-w.position),x=new Set(n?a??rA:[]),m=new Set(o?l??nA:[]),g=v.map(b=>b.id);return s.jsxs("div",{className:O.clsx("flex flex-col w-full h-full",e),...p,children:[(u||f||h)&&s.jsx(lA,{onWidgetDrop:u,onColumnReorder:f,onSectionReorder:h}),s.jsx("div",{className:O.clsx("flex-1 bg-surface-bg",v.length===0?"flex items-center justify-center p-8":"flex flex-col gap-4 p-8"),children:v.length===0?u?s.jsx(sA,{emptyStateDescription:r}):s.jsx("div",{className:"w-64",children:s.jsx(Ji,{bodyClassName:"bg-white",disabled:!0,onMaximize:()=>{},onGrid:()=>{},onAdd:()=>{},onCopy:()=>{},onTrash:()=>{},onAddWidget:()=>{},children:s.jsx(ht,{flat:!0,description:r,className:"bg-transparent"})})}):s.jsxs(s.Fragment,{children:[s.jsx(Ve.SortableContext,{items:g,strategy:Ve.verticalListSortingStrategy,children:v.map(b=>s.jsx(cA,{section:b,sectionActionSet:x,widgetActionSet:m,onSectionAction:n,onColumnAction:i,onWidgetAction:o,renderWidgetIcon:c,onWidgetDrop:u,onLayoutChange:d,onColumnReorder:f},b.id))}),u&&s.jsx(oA,{})]})})]})},dA=e=>{const t=Be.pointerWithin(e);if(t.length===0)return Be.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},o=[...t].sort((c,u)=>i(c)-i(u))[0];if(String(o.id).startsWith("vc-col-")&&a){const c=o.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[o]},Ls=2;function fA(e,t,r,n){const a=e%Ls,i=Math.floor(e/Ls),o=t!==null&&a<=t.colIdx&&i<=t.rowIdx,l=a<r&&i<n;return{colIdx:a,rowIdx:i,isHovered:o,isActive:l}}function hA(e,t){return O.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 pA(){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 JC=P.createContext(void 0);function e3(){const e=P.useContext(JC);if(!e)throw new Error("Must be used inside DropSizePicker");return e}const yg=({value:e,onChange:t})=>{const[r,n]=P.useState(!1),a=P.useRef(null);return P.useEffect(()=>{if(!r)return;const i=o=>{a.current?.contains(o.target)||n(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[r]),s.jsxs("div",{ref:a,className:"flex-1 relative",children:[s.jsxs("button",{type:"button",onClick:()=>n(i=>!i),className:O.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:[s.jsx("span",{className:"flex-1 text-sm font-medium text-med-em text-left",children:e}),s.jsx("span",{className:"text-med-em flex items-center shrink-0",children:r?s.jsx(B.ArrowUp2,{size:16,color:"currentColor"}):s.jsx(B.ArrowDown2,{size:16,color:"currentColor"})})]}),r&&s.jsx(Ht,{floating:!0,size:"sm",items:pA().map(i=>({...i,className:"!min-w-0",onSelect:()=>{t(Number(i.id)),n(!1)}})),selectedIds:[String(e)],className:"w-full top-full mt-1"})]})},t3=({value:e,onChange:t})=>{const[r,n]=P.useState(null),{cols:a,rows:i}=e;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3 p-5",children:[s.jsx("span",{className:"text-med-em flex items-center shrink-0",children:s.jsx(B.RowHorizontal,{size:16,color:"currentColor"})}),s.jsx(yg,{value:a,onChange:o=>t({cols:o,rows:i})})]}),s.jsxs("div",{className:"flex items-center gap-3 p-5",children:[s.jsx("span",{className:"text-med-em flex items-center shrink-0",children:s.jsx(B.RowVertical,{size:16,color:"currentColor"})}),s.jsx(yg,{value:i,onChange:o=>t({cols:a,rows:o})})]}),s.jsx("div",{className:"border-t border-surface-3"}),s.jsx("div",{className:"p-5 flex justify-center",children:s.jsx("div",{className:"grid grid-cols-2 gap-3",children:Array.from({length:Ls*Ls},(o,l)=>{const{colIdx:c,rowIdx:u,isHovered:d,isActive:f}=fA(l,r,a,i);return s.jsx("div",{className:hA(d,f),onMouseEnter:()=>n({colIdx:c,rowIdx:u}),onMouseLeave:()=>n(null),onClick:()=>t({cols:c+1,rows:u+1})},l)})})})]})},Tm=({children:e,value:t,onChange:r})=>{const[n,a]=P.useState(!1),i=P.useRef(null);return s.jsx(JC.Provider,{value:{open:n,setOpen:a,value:t,onChange:r,triggerRef:i},children:e})};Tm.displayName="DropSizePicker";const Em=({children:e})=>{const{open:t,setOpen:r,triggerRef:n}=e3();return S.default.cloneElement(e,{ref:n,onClick:a=>{e.props.onClick?.(a),r(!t)}})};Em.displayName="DropSizePickerTrigger";const Im=({className:e})=>{const{open:t,setOpen:r,value:n,onChange:a,triggerRef:i}=e3(),o=P.useRef(null),l=Na({triggerRef:i,panelRef:o,enabled:t});return Qi({refs:[i,o],onClose:()=>r(!1),enabled:t}),!t||typeof document>"u"?null:yn.createPortal(s.jsxs("div",{ref:o,className:O.clsx("bg-white rounded-xl border border-surface-3 flex flex-col","min-w-[200px]",e),style:l,children:[s.jsx("div",{className:"p-5",children:s.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Size"})}),s.jsx("div",{className:"border-t border-surface-3"}),s.jsx(t3,{value:n,onChange:a})]}),document.body)};Im.displayName="DropSizePickerContent";const r3=({value:e,onChange:t,className:r,showTitle:n=!0})=>s.jsxs("div",{className:O.clsx("flex flex-col",r),children:[n&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"p-5",children:s.jsx("span",{className:"text-xs font-semibold text-high-em",children:"Size"})}),s.jsx("div",{className:"border-t border-surface-3"})]}),s.jsx(t3,{value:e,onChange:t})]});r3.displayName="SizePicker";const mA={1:"w-[400px] h-[400px]","2h":"w-[825px] h-[400px]","2w":"w-[400px] h-[825px]",4:"w-[825px] h-[825px]"},Cn=({size:e="1",title:t,actions:r,children:n,className:a,classNameHeader:i,classNameBody:o,clipBody:l=!1})=>{const c=t||r;return s.jsxs("div",{className:Q.twMerge(O.clsx("flex flex-col bg-white border border-surface-3 rounded-6",mA[e]),a),children:[c&&s.jsxs("div",{className:Q.twMerge(O.clsx("flex items-center justify-between p-8 border-b border-surface-3"),i),children:[t&&s.jsx("h3",{className:"text-med-em font-semibold text-xl",children:t}),r&&s.jsx("div",{className:"flex items-center gap-4",children:r})]}),s.jsx("div",{className:Q.twMerge(O.clsx("flex-1 p-8 overflow-auto",l&&"overflow-hidden"),o),children:n})]})},xA=({mode:e,title:t,actions:r,onSubmit:n,onSettings:a,className:i,texts:o})=>{const[l,c]=P.useState(""),[u,d]=P.useState(""),[f,h]=P.useState(""),[p,v]=P.useState(""),[x,m]=P.useState(!1),[g,b]=P.useState(!1),w=e==="signup",C=o?.heading??"¡Automatiza!",y=o?.subheading??"Vende y gestiona con inteligencia",j=o?.namePlaceholder??"Nombre",N=o?.emailPlaceholder??"Correo",A=o?.passwordPlaceholder??(w?"Nueva contraseña":"Contraseña"),k=o?.confirmPasswordPlaceholder??"Confirmar contraseña",I=o?.submitLabel??"Continuar",_=E=>{E.preventDefault();const T={email:u,password:f,...w&&{name:l,confirmPassword:p}};n?.(T)};return s.jsx(Cn,{size:"1",className:i,title:t??(w?"Regístrarse":"Iniciar sesión"),actions:r===null?void 0:r??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:a}),children:s.jsxs("form",{onSubmit:_,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[!w&&s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:C}),s.jsx("span",{className:"text-high-em text-md self-center",children:y})]}),w&&s.jsx(me,{type:"text",name:"name",autoComplete:"name",value:l,onChange:E=>c(E.target.value),placeholder:j,required:!0}),s.jsx(me,{type:"email",name:"email",autoComplete:"email",value:u,onChange:E=>d(E.target.value),placeholder:N,required:!0}),s.jsx(me,{type:x?"text":"password",name:"password",autoComplete:w?"new-password":"current-password",value:f,onChange:E=>h(E.target.value),placeholder:A,trailingIcon:s.jsx(ie,{children:x?s.jsx(B.Eye,{onClick:()=>m(!1),className:"cursor-pointer"}):s.jsx(B.EyeSlash,{onClick:()=>m(!0),className:"cursor-pointer"})}),required:!0}),w&&s.jsx(me,{type:g?"text":"password",name:"confirmPassword",autoComplete:"new-password",value:p,onChange:E=>v(E.target.value),placeholder:k,trailingIcon:s.jsx(ie,{children:g?s.jsx(B.Eye,{onClick:()=>b(!1),className:"cursor-pointer"}):s.jsx(B.EyeSlash,{onClick:()=>b(!0),className:"cursor-pointer"})}),required:!0}),s.jsx(W,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:I})]})})},gA=({title:e="Recuperación",actions:t,step:r,type:n="password",onSubmit:a,onBackToLogin:i,onSettings:o,className:l,texts:c})=>{const[u,d]=P.useState(""),f=C=>{C.preventDefault(),a?.(u)},h=r==="email",p=n==="account",v=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"),g=c?.submitLabel??"Continuar",b=c?.backToLoginPrompt??"¿Todo bien? ",w=c?.backToLoginLabel??"Iniciar sesión";return s.jsx(Cn,{size:"1",className:l,title:e,actions:t===null?void 0:t??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:o}),children:s.jsxs("form",{onSubmit:f,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[s.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:v}),s.jsx(me,{type:h?"email":"text",value:u,onChange:C=>d(C.target.value),placeholder:x,hint:m,required:!0}),s.jsx(W,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:g}),s.jsxs("div",{className:"text-center text-sm gap-4",children:[s.jsx("span",{className:"text-med-em text-sm font-semibold",children:b}),s.jsx(gr,{onClick:i,size:"sm",variant:"info",className:"cursor-pointer font-semibold",children:w})]})]})})},vA=({title:e="Recuperación",actions:t,onSubmit:r,onBackToLogin:n,onSettings:a,className:i,texts:o})=>{const[l,c]=P.useState(""),[u,d]=P.useState(""),[f,h]=P.useState(!1),[p,v]=P.useState(!1),x=o?.heading??"Cambiar contraseña",m=o?.passwordPlaceholder??"Nueva contraseña",g=o?.confirmPasswordPlaceholder??"Confirmar contraseña",b=o?.submitLabel??"Continuar",w=o?.backToLoginPrompt??"¿Todo bien? ",C=o?.backToLoginLabel??"Iniciar sesión",y=j=>{j.preventDefault(),r?.(l,u)};return s.jsx(Cn,{size:"1",className:i,title:e,actions:t===null?void 0:t??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:a}),children:s.jsxs("form",{onSubmit:y,className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[s.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:x}),s.jsx(me,{type:f?"text":"password",value:l,onChange:j=>c(j.target.value),placeholder:m,trailingIcon:s.jsx(ie,{children:f?s.jsx(B.Eye,{onClick:()=>h(!1),className:"cursor-pointer"}):s.jsx(B.EyeSlash,{onClick:()=>h(!0),className:"cursor-pointer"})}),required:!0}),s.jsx(me,{type:p?"text":"password",value:u,onChange:j=>d(j.target.value),placeholder:g,trailingIcon:s.jsx(ie,{children:p?s.jsx(B.Eye,{onClick:()=>v(!1),className:"cursor-pointer"}):s.jsx(B.EyeSlash,{onClick:()=>v(!0),className:"cursor-pointer"})}),required:!0}),s.jsx(W,{type:"submit",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",children:b}),s.jsxs("div",{className:"text-center text-sm gap-4",children:[s.jsx("span",{className:"text-med-em text-sm font-semibold",children:w}),s.jsx(gr,{onClick:n,size:"md",variant:"info",className:"cursor-pointer font-semibold",children:C})]})]})})},yA=({title:e="Autenticación",actions:t,onRecover:r,onSettings:n,className:a,texts:i})=>{const o=i?.prompt??"¿Olvidaste tu contraseña?",l=i?.recoverLabel??"Recuperar";return s.jsx(Cn,{size:"1",className:a,title:e,actions:t===null?void 0:t??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:n}),children:s.jsxs("div",{className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[s.jsx("span",{className:"text-med-em text-md self-center font-semibold",children:o}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"lg",onClick:r,className:"w-full",children:l})]})})},bA=({title:e="Autenticación",actions:t,onGoogleSignIn:r,onAppleSignIn:n,onAction:a,onSettings:i,actionPrompt:o="¿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 s.jsx(Cn,{size:"1",className:c,title:e,actions:t===null?void 0:t??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:i}),children:s.jsxs("div",{className:"flex flex-col gap-8 p-8 h-full mx-auto justify-center max-w-74",children:[s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"lg",icons:"leading",leadingIcon:s.jsx(ie,{children:s.jsx(B.Google,{})}),onClick:r,className:"w-full",children:d}),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"lg",icons:"leading",leadingIcon:s.jsx(ie,{children:s.jsx(B.Apple,{})}),onClick:n,children:f}),s.jsx(fe,{}),s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx("span",{className:"text-med-em text-md font-semibold text-center",children:o}),s.jsx(W,{variant:"secondary",hierarchy:"primary",size:"lg",onClick:a,className:"w-full",children:l})]})]})})},wA=({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)},o=(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 s.jsx("div",{className:"flex gap-3 justify-center",children:r.map((c,u)=>s.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=>o(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))})},jA=({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:o,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 s.jsxs(Cn,{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??s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{children:s.jsx(B.Setting,{})}),onClick:c}),children:[s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h2",{className:"text-high-em font-semibold text-2xl self-center",children:t}),s.jsx("span",{className:"text-high-em text-md self-center text-center",children:r})]}),s.jsx(wA,{length:n,onComplete:i}),s.jsx(W,{type:"button",variant:"secondary",hierarchy:"primary",size:"lg",className:"w-full",onClick:o,children:f}),s.jsxs("div",{className:"text-center",children:[s.jsx("span",{className:"text-med-em text-sm font-semibold",children:h}),s.jsx(gr,{onClick:l,size:"md",variant:"info",className:"cursor-pointer font-semibold",children:p})]})]})},Mm=({title:e="Module",onSettingsClick:t,className:r,showSettings:n=!0})=>s.jsx("div",{className:O.clsx("drag-handle px-6 py-4 border-b border-surface-3 bg-surface-1 cursor-move rounded-t-xl",r),children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex gap-5 items-center",children:[s.jsx(B.Grid5,{size:24,color:"var(--high-em)"}),s.jsx("h2",{className:"text-[16px] font-semibold text-med-em flex-1 text-center",children:e})]}),n&&s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("button",{onClick:t,className:"p-1 hover:bg-surface-2 rounded transition-colors","aria-label":"Configure module",type:"button",children:s.jsx(B.Setting,{size:24,color:"var(--high-em)"})})})]})}),n3=({title:e="Module",onSettingsClick:t,showSettings:r=!0,children:n,className:a,minWidth:i=300,maxWidth:o=300,emptyState:l})=>{const c=S.default.Children.count(n)>0;return s.jsxs("div",{className:O.clsx("bg-white rounded-xl border border-surface-3 overflow-hidden",a),style:{minWidth:`${i}px`,maxWidth:`${o}px`},children:[s.jsx(Mm,{title:e,onSettingsClick:t,showSettings:r}),s.jsx("div",{className:"overflow-hidden",style:{minHeight:"200px"},children:c?n:l})]})};Mm.displayName="ModuleCardHeader";n3.displayName="ModuleCard";const a3=S.default.forwardRef(({type:e,label:t="New Field",description:r="Description",isSelected:n=!1,isLast:a=!1,onClick:i,onDelete:o,showActions:l=!0,className:c,dragHandleProps:u,innerRef:d,style:f},h)=>{const[p,v]=S.default.useState(!1),x=p&&l,m=d||h;return s.jsxs("div",{ref:m,style:f,className:O.clsx("relative",c),children:[s.jsx("div",{onClick:i,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:O.clsx("w-full text-left m-0 cursor-pointer overflow-hidden",n?"bg-surface-3":"hover:bg-surface-1"),children:s.jsx("div",{className:"pr-6",children:s.jsxs("div",{className:"flex justify-between items-center overflow-hidden min-h-[60px]",children:[s.jsxs("div",{className:"flex min-w-0 flex-1 justify-start items-stretch self-stretch",children:[s.jsx("div",{className:"self-stretch flex overflow-hidden transition-all duration-200 ease-out",style:{width:x?"30px":"0px",opacity:x?1:0},children:s.jsxs("div",{onClick:g=>g.stopPropagation(),className:"flex flex-col w-[30px] h-full shrink-0",children:[s.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:s.jsx(B.HambergerMenu,{size:17,color:"var(--high-em)"})}),o&&s.jsx("button",{type:"button",onClick:g=>{g.stopPropagation(),o()},className:"flex flex-1 items-center justify-center hover:bg-surface-2 transition-colors","aria-label":"Delete field",children:s.jsx(B.Trash,{size:17,color:"var(--high-em)",variant:"Linear"})})]})}),s.jsxs("div",{className:"flex min-w-0 flex-col justify-center transition-all duration-200 ease-out",style:{paddingLeft:x?"0px":"24px"},children:[s.jsx("div",{className:"truncate text-[16px] font-semibold text-med-em",children:e}),s.jsx("div",{className:"truncate text-[10px] font-medium tracking-wide mb-1 text-low-em",children:r})]})]}),s.jsx("div",{className:"shrink-0 max-w-[45%] truncate pl-4 text-sm font-medium text-low-em",children:t})]})})}),!a&&s.jsx("div",{className:"border-b border-surface-3"})]})});a3.displayName="ModuleFieldItem";const i3=({title:e="Módulos",items:t=[],className:r,onExportClick:n,minWidth:a=250,maxWidth:i=300,opacity:o=.7})=>s.jsxs("div",{className:O.clsx("bg-white rounded-xl border border-surface-3 overflow-hidden",r),style:{minWidth:`${a}px`,maxWidth:`${i}px`,opacity:o},children:[s.jsx("div",{className:"px-6 py-4 border-b border-surface-3 bg-surface-2 rounded-t-xl",children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex gap-5 items-center",children:[s.jsx(B.Grid5,{size:24,color:"var(--low-em)"}),s.jsx("h2",{className:"text-xl font-semibold text-low-em flex-1 text-center",children:e})]}),n&&s.jsx("button",{type:"button",onClick:n,className:"hover:bg-surface-3 rounded p-1 transition-colors","aria-label":"Export data",children:s.jsx(B.ExportSquare,{size:24,color:"var(--low-em)"})})]})}),s.jsxs("div",{className:"max-h-[600px] overflow-y-auto overflow-x-hidden",children:[t.map((l,c)=>{const u=c===t.length-1;return s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-full text-left transition-all duration-200 m-0 cursor-not-allowed",children:s.jsx("div",{className:"my-6 mx-8",children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex justify-start gap-5 items-center",children:[s.jsx(B.HambergerMenu,{size:20,color:"var(--low-em)"}),s.jsx(B.Component,{size:20,color:"var(--low-em)"}),s.jsx("div",{className:"text-xs font-semibold tracking-wide mb-1 text-low-em",children:l.type})]}),s.jsx("div",{className:"text-sm font-medium truncate text-low-em",children:l.label})]})})}),!u&&s.jsx("div",{className:"border-b border-surface-3"})]},l.id)}),t.length===0&&s.jsx("div",{className:"py-12 px-8 flex items-center justify-center",children:s.jsx("p",{className:"text-sm text-low-em text-center",children:"No related data"})})]})]});i3.displayName="RelatedDataCard";const CA=({widgetCount:e,visibleCount:t,icon:r,tooltipContent:n})=>s.jsx("div",{className:"border-b border-gray-200",children:s.jsxs("div",{className:"p-8 flex items-center justify-between",children:[s.jsxs("span",{className:" font-semibold text-sm text-dark-100",style:{fontFamily:"var(--font-space-grotesk)"},children:["Widgets (",e,")"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:O.clsx("text-sm font-semibold",t===0?"text-low-em":"text-success-main"),children:[t," visible"]}),r&&n&&s.jsx(Oa,{content:n,side:"bottom",children:s.jsx("div",{children:r})}),r&&!n&&r]})]})}),SA=({value:e,onChange:t,placeholder:r})=>s.jsx("div",{className:"p-8 flex flex-col gap-4 ",children:s.jsx(me,{type:"search",placeholder:r||"Search",value:e,onChange:t,trailingIcon:s.jsx(B.SearchNormal1,{size:16,color:"currentColor"})})}),NA=({items:e,searchPlaceholder:t="Search",showSearch:r=!0,headerIcon:n,headerTooltip:a,onItemClick:i,className:o,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,v=e.filter(m=>m.isVisible).length,x=m=>{i?.(m)};return s.jsx(Ct.Provider,{delayDuration:200,children:s.jsxs("div",{className:O.clsx("h-full w-full flex flex-col",c,u,o),children:[s.jsx(CA,{widgetCount:p,visibleCount:v,icon:n,tooltipContent:a}),r&&s.jsx(SA,{value:d,onChange:m=>f(m.target.value),placeholder:t}),s.jsx(fe,{}),s.jsx("div",{className:"flex-1 overflow-y-auto p-8 flex flex-col gap-8",children:h.length>0?h.map(m=>s.jsx(vt,{title:m.title,description:m.description,leadingIcon:s.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:O.clsx(m.isSelected&&"bg-surface-2"),className:O.clsx("py-6 rounded-xl",m.isSelected&&"border border-surface-3",m.isVisible&&"border border-surface-3",l),onClick:()=>x(m)},m.id)):s.jsxs("div",{className:"flex flex-col items-center justify-center p-10 text-center gap-10",children:[s.jsx(ie,{size:"lg",children:s.jsx(B.Box2,{})}),s.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"})]})})]})})},OA={paid:"success",pending:"warning",overdue:"danger",cancelled:"surface"},bg=({label:e,value:t})=>s.jsxs("div",{className:"flex flex-row",children:[s.jsx("span",{className:"text-low-em text-base w-[110px] shrink-0",children:e}),s.jsx("span",{className:"text-high-em text-base font-bold",children:t})]}),PA=({title:e,status:t,fields:r,onMenuClick:n,className:a})=>{const i=t.charAt(0).toUpperCase()+t.slice(1),o=Math.ceil(r.length/2),l=r.slice(0,o),c=r.slice(o);return s.jsxs("div",{className:O.clsx("bg-white border border-surface-3 rounded-2xl p-10 flex flex-col gap-8",a),children:[s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-8",children:[s.jsx("span",{className:"text-high-em font-semibold text-xl",children:e}),s.jsx(Ye,{theme:OA[t],variant:"simple",size:"lg",children:i})]}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"md",icons:"only",leadingIcon:s.jsx(B.More,{variant:"Linear"}),onClick:n})]}),s.jsx("span",{className:"text-med-em text-sm -mt-2",children:"Summary"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[s.jsx("div",{className:"flex flex-col gap-8",children:l.map(u=>s.jsx(bg,{...u},u.label))}),s.jsx("div",{className:"flex flex-col gap-8",children:c.map(u=>s.jsx(bg,{...u},u.label))})]})]})},AA=e=>s.jsx(it,{size:12}),s3=({item:e,onTitleChange:t,onDataSourceChange:r,onDelete:n,onDragStart:a,onDragOver:i,onDrop:o,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 s.jsxs("div",{draggable:!0,onDragStart:a,onDragOver:h=>{h.preventDefault(),i?.(h)},onDrop:o,onDragEnd:l,className:O.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:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{size:"md",children:s.jsx(B.HambergerMenu,{})}),className:"cursor-grab active:cursor-grabbing shrink-0 text-disabled","aria-label":"Drag to reorder"}),(u==="both"||u==="input")&&s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(me,{type:"text",label:"Title",placeholder:"Column title",value:e.title,onChange:h=>t(h.target.value)})}),(u==="both"||u==="dropdown")&&s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Te,{label:"Data source",placeholder:"Select",value:e.dataSource,showLeadingIcon:!1,menuSize:"sm",items:f,onChange:r})}),s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx(AA,{}),className:"shrink-0","aria-label":"Delete row",onClick:n})]})},_A=({title:e,contextMenu:t,backButton:r,onAction:n})=>{const[a,i]=P.useState(!1),o=P.useRef(null),l=t&&t.length>0;return P.useEffect(()=>{if(!a)return;const c=u=>{o.current&&!o.current.contains(u.target)&&i(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[a]),s.jsx(Nm,{title:e,backButton:r,actions:l?s.jsxs("div",{ref:o,className:"relative",children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(B.More,{size:16}),"aria-label":"More options",onClick:()=>i(c=>!c)}),a&&s.jsx(Ht,{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})},kA=({field:e,onChange:t})=>s.jsx(me,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value),type:"text"}),TA=({field:e,onChange:t})=>s.jsx(bl,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value)}),jl=e=>e.map(t=>({id:t.id,title:t.label,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!1,showTag:!1,showTrailingIcon:!1,showTrailingText:!1})),EA=({field:e,onChange:t})=>s.jsx(Te,{menuSize:"sm",label:e.label,placeholder:e.placeholder,value:e.value??"",showLeadingIcon:!1,items:jl(e.options??[]),onChange:t}),IA=({field:e,onChange:t})=>s.jsxs("div",{className:"flex items-center justify-between gap-4 py-1",children:[e.label&&s.jsx("span",{className:"text-sm font-semibold text-high-em flex-1",children:e.label}),s.jsx(Pa,{size:"small",checked:e.value??!1,onChange:r=>t(r.target.checked)})]}),MA=({field:e,onChange:t})=>{const r=e.dropdowns??[],n=(a,i)=>{t(r.map((o,l)=>l===a?{...o,value:i}:o))};return s.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&s.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),s.jsx("div",{className:"flex gap-6",children:r.map((a,i)=>s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Te,{menuSize:"sm",label:e.showLabels!==!1?a.label:void 0,placeholder:a.placeholder,value:a.value??"",showLeadingIcon:!1,items:jl(a.options),onChange:o=>n(i,o)})},a.id))})]})},$A=({field:e,onAction:t})=>{const r=e.items??[],[n,a]=P.useState(null),i=P.useRef(new Map),o=P.useRef(null);return s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[e.label&&s.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),e.addAction&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(B.Add,{size:14}),"aria-label":"Add item",onClick:()=>t?.(e.addAction)})]}),r.length>0&&s.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&&(o.current=i.current.get(l.id)??null),s.jsx(vt,{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?s.jsxs("div",{ref:d=>{i.current.set(l.id,d)},className:"relative",onMouseDown:d=>d.stopPropagation(),children:[s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(B.More,{size:14}),"aria-label":"Item options",onClick:()=>a(u?null:l.id)}),u&&s.jsx(Ht,{triggerRef:o,size:"xs",items:c,className:"min-w-[160px]",onClose:()=>a(null)})]}):void 0,className:"rounded-none"},l.id)})})]})},RA=({field:e,onChange:t,onAction:r})=>{const n=e.items??[],a=P.useRef(null),[i,o]=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 s.jsxs("div",{className:"flex flex-col gap-6",children:[e.label&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-semibold text-med-em",children:e.label}),e.addAction&&s.jsx(W,{variant:"neutral",hierarchy:"tertiary",size:"xs",icons:"leading",leadingIcon:s.jsx(B.Add,{}),onClick:()=>r?.(e.addAction),children:"Add"})]}),s.jsx("div",{className:"flex flex-col gap-6",children:n.map(u=>s.jsx(s3,{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&&o(u.id)},onDrop:()=>{if(!a.current||a.current===u.id){a.current=null,o(null);return}r?.(`reorder:${a.current}:${u.id}`),a.current=null,o(null)},onDragEnd:()=>{a.current=null,o(null)}},u.id))})]})},LA=({field:e,onChange:t})=>{const r=e.value??{cols:1,rows:1};return s.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.label&&s.jsx("label",{className:"text-xs font-semibold text-med-em",children:e.label}),s.jsxs(Tm,{value:r,onChange:t,children:[s.jsx(Em,{children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",className:"w-full",children:e.placeholder??`${r.cols}×${r.rows}`})}),s.jsx(Im,{})]})]})},Se={showCheckbox:!1,showLeadingIcon:!1},o3=[{...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)"}],l3=Object.fromEntries(o3.map(e=>[e.id,e.title])),DA={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 zA(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 BA({handler:e,selected:t,incomplete:r,onClick:n}){const a=e.event.charAt(0).toUpperCase()+e.event.slice(1),i=r?"Incomplete selection":l3[e.action]??e.action;return s.jsx("div",{className:t?"rounded-md bg-surface-3":"",onClick:o=>n(o.currentTarget),children:s.jsx(vt,{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 s.jsxs("div",{className:"flex items-center gap-3 py-3",children:[s.jsx("span",{className:"w-28 shrink-0 text-xs text-med-em",children:e}),s.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 s.jsx(me,{...i,size:a,value:e??"",onChange:o=>t?.(o.target.value),placeholder:r,disabled:n,className:"font-mono"})}const FA=[{id:"ms",title:"ms",showCheckbox:!1,showLeadingIcon:!1},{id:"s",title:"s",showCheckbox:!1,showLeadingIcon:!1}];function qA({value:e,onChange:t}){return s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx("div",{className:"w-16 shrink-0",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:FA,value:e.unit,onChange:r=>t({...e,unit:r})})}),s.jsx(me,{size:"md",type:"number",value:String(e.value),onChange:r=>t({...e,value:Number(r.target.value)}),placeholder:"0"})]})}function WA({value:e,onChange:t}){return s.jsx(Te,{size:"md",showLeadingIcon:!1,items:o3,value:e,onChange:r=>t(r)})}const HA=[{...Se,id:"info",title:"Info"},{...Se,id:"success",title:"Success"},{...Se,id:"warning",title:"Warning"},{...Se,id:"error",title:"Error"}],VA=[{...Se,id:"csv",title:"CSV"},{...Se,id:"json",title:"JSON"}],wg=[{...Se,id:"",title:"No available methods"}];function Fe(e,t,r,n){t({...e,[r]:n})}function UA({action:e,config:t,onChange:r,availableQueries:n=[],availableComponents:a=[],availableApps:i=[],availablePages:o=[],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=o.map(p=>({...Se,id:p,title:p})),h=l.map(p=>({...Se,id:p,title:p}));switch(e){case"controlQuery":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Query",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:c.length?c:[{...Se,id:"",title:"— select —"}],value:String(t.query??""),onChange:p=>Fe(t,r,"query",p)})}),s.jsx(Ie,{label:"Method",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:wg,value:"",onChange:()=>{},disabled:!0})})]});case"controlComponent":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Component",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:u.length?u:[{...Se,id:"",title:"— select —"}],value:String(t.component??""),onChange:p=>Fe(t,r,"component",p)})}),s.jsx(Ie,{label:"Method",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:wg,value:"",onChange:()=>{},disabled:!0})})]});case"runScript":return s.jsx(Ie,{label:"Script",children:s.jsx(bl,{size:"md",value:String(t.script??""),onChange:p=>Fe(t,r,"script",p.target.value),placeholder:"// write your script here",resize:"vertical"})});case"goToApp":return s.jsx(Ie,{label:"App",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:d.length?d:[{...Se,id:"",title:"— select —"}],value:String(t.app??""),onChange:p=>Fe(t,r,"app",p)})});case"goToPage":return s.jsx(Ie,{label:"Page",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:f.length?f:[{...Se,id:"",title:"— select —"}],value:String(t.page??""),onChange:p=>Fe(t,r,"page",p)})});case"goToUrl":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"URL",children:s.jsx(Zr,{value:String(t.url??""),onChange:p=>Fe(t,r,"url",p),placeholder:"https://..."})}),s.jsx(Ie,{label:"New tab",children:s.jsx(Pa,{checked:!!t.newTab,onChange:p=>Fe(t,r,"newTab",p.target.checked)})})]});case"showNotification":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Title",children:s.jsx(me,{size:"md",value:String(t.title??""),onChange:p=>Fe(t,r,"title",p.target.value),placeholder:"Notification title"})}),s.jsx(Ie,{label:"Message",children:s.jsx(me,{size:"md",value:String(t.message??""),onChange:p=>Fe(t,r,"message",p.target.value),placeholder:"Message"})}),s.jsx(Ie,{label:"Type",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:HA,value:String(t.type??"info"),onChange:p=>Fe(t,r,"type",p)})}),s.jsx(Ie,{label:"Duration (ms)",children:s.jsx(me,{size:"md",type:"number",value:String(t.duration??3e3),onChange:p=>Fe(t,r,"duration",Number(p.target.value))})})]});case"setVariable":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Variable",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:h.length?h:[{...Se,id:"",title:"— select —"}],value:String(t.variable??""),onChange:p=>Fe(t,r,"variable",p)})}),s.jsx(Ie,{label:"Value",children:s.jsx(Zr,{value:String(t.value??""),onChange:p=>Fe(t,r,"value",p)})})]});case"setUrlParameters":return s.jsx(Ie,{label:"Params",children:s.jsx(Zr,{value:String(t.params??""),onChange:p=>Fe(t,r,"params",p),placeholder:"{{ { key: value } }}"})});case"setLocalStorage":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Key",children:s.jsx(me,{size:"md",value:String(t.key??""),onChange:p=>Fe(t,r,"key",p.target.value),placeholder:"storage_key"})}),s.jsx(Ie,{label:"Value",children:s.jsx(Zr,{value:String(t.value??""),onChange:p=>Fe(t,r,"value",p)})})]});case"copyToClipboard":return s.jsx(Ie,{label:"Value",children:s.jsx(Zr,{value:String(t.value??""),onChange:p=>Fe(t,r,"value",p)})});case"exportData":return s.jsxs(s.Fragment,{children:[s.jsx(Ie,{label:"Data",children:s.jsx(Zr,{value:String(t.data??""),onChange:p=>Fe(t,r,"data",p)})}),s.jsx(Ie,{label:"File name",children:s.jsx(me,{size:"md",value:String(t.fileName??""),onChange:p=>Fe(t,r,"fileName",p.target.value),placeholder:"export"})}),s.jsx(Ie,{label:"File type",children:s.jsx(Te,{size:"md",showLeadingIcon:!1,items:VA,value:String(t.fileType??"csv"),onChange:p=>Fe(t,r,"fileType",p)})})]});case"confetti":return s.jsx("p",{className:"py-2 text-xs text-low-em",children:"No configuration needed."});default:return null}}function KA({handler:e,open:t,onClose:r,onSave:n,triggerRef:a,availableQueries:i,availableComponents:o,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),v=`${l3[d.action]??d.action} options`;function x(m){f(g=>g&&{...g,action:m,config:{...DA[m]}})}return s.jsx(un,{open:t,onClose:r,triggerRef:a,size:"sm",children:s.jsxs(dn,{className:"max-h-[80vh] !w-112",children:[s.jsx(fn,{onRightAction:r,children:s.jsxs(xm,{children:["Edit ",h," handler"]})}),s.jsxs(hn,{className:"flex flex-col gap-0 p-10",children:[s.jsx(Ie,{label:"Action",children:s.jsx(WA,{value:d.action,onChange:x})}),d.action!=="confetti"&&s.jsxs("div",{className:"mt-4 mb-2",children:[s.jsx(fe,{}),s.jsx("span",{className:"text-xs font-medium text-low-em",children:v})]}),s.jsx(UA,{action:d.action,config:d.config,onChange:m=>f(g=>g&&{...g,config:m}),availableQueries:i,availableComponents:o,availableApps:l,availablePages:c,availableVariables:u}),s.jsxs("div",{className:"mt-4 mb-2",children:[s.jsx(fe,{}),s.jsx("span",{className:"text-xs font-medium text-low-em",children:"Advanced"})]}),s.jsx(Ie,{label:"Only run when",children:s.jsx(Zr,{value:d.onlyRunWhen??"",onChange:m=>f(g=>g&&{...g,onlyRunWhen:m}),placeholder:"{{ !!example.value }}"})}),s.jsx(Ie,{label:"Debounce",children:s.jsx(qA,{value:d.debounce??{unit:"ms",value:0},onChange:m=>f(g=>g&&{...g,debounce:m})})})]}),s.jsx(pn,{cancelButton:{label:"Cancel",closeOnClick:!1,onClick:r},saveButton:{label:"Save",closeOnClick:!1,onClick:()=>{d&&n(d),r()}}})]})})}function GA(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}function ZA({field:e,onChange:t}){const r=e.value??[],n=e.resources??{},[a,i]=P.useState(null),[o,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:GA(),event:"click",action:"controlQuery",config:{query:"",method:""}};t([...r,x]),f(x.id,u.current)}function v(x){t(r.map(m=>m.id===x.id?x:m))}return s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[s.jsx("span",{className:"text-xs font-medium text-med-em",children:"Event handlers"}),s.jsx(W,{ref:u,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:s.jsx(B.Add,{size:14}),onClick:p})]}),r.length===0?s.jsx("p",{className:"px-3 py-2 text-xs text-low-em",children:"No event handlers"}):s.jsx("div",{className:"flex flex-col",children:r.map(x=>s.jsx(BA,{handler:x,selected:a===x.id,incomplete:zA(x),onClick:m=>f(x.id,m)},x.id))}),s.jsx(KA,{open:o,handler:d,onClose:h,onSave:v,triggerRef:c,availableQueries:n.availableQueries,availableComponents:n.availableComponents,availableApps:n.availableApps,availablePages:n.availablePages,availableVariables:n.availableVariables})]})}const YA=({subField:e,onChange:t})=>{switch(e.type){case"text":return s.jsx(me,{label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:r=>t(r.target.value),type:"text"});case"toggle":return s.jsxs("div",{className:"flex items-center justify-between gap-4 py-1",children:[e.label&&s.jsx("span",{className:"text-sm font-semibold text-high-em flex-1",children:e.label}),s.jsx(Pa,{size:"small",checked:e.value??!1,onChange:r=>t(r.target.checked)})]});case"dropdown":return s.jsx(Te,{menuSize:"sm",label:e.label,placeholder:e.placeholder,value:e.value??"",showLeadingIcon:!1,items:jl(e.options??[]),onChange:r=>t(r)});default:return null}},XA=({field:e,onChange:t})=>{const r=e.items??[],n=(a,i,o)=>t(r.map(l=>l.id!==a?l:{...l,subFields:l.subFields.map(c=>c.id!==i?c:{...c,value:o})}));return s.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&s.jsx("span",{className:"text-sm font-semibold text-high-em",children:e.label}),s.jsxs("div",{className:"flex flex-col rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:[r.length===0&&s.jsx(ht,{flat:!0,description:"No items",className:"py-6 px-4"}),r.map(a=>s.jsxs(un,{size:"sm",children:[s.jsx(ul,{children:s.jsx(vt,{size:"sm",title:a.title,description:a.description,showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showDescription:!!a.description,showTag:!1,showTrailingText:!1,showTrailingIcon:!1})}),s.jsxs(dn,{className:"!w-72",children:[s.jsx(fn,{children:a.title}),s.jsx(hn,{padding:!0,className:"ds-scrollbar overflow-y-auto max-h-80",children:s.jsx("div",{className:"flex flex-col gap-4",children:a.subFields.map(i=>s.jsx(YA,{subField:i,onChange:o=>n(a.id,i.id,o)},i.id))})}),s.jsx(pn,{saveButton:{label:"Done",closeOnClick:!0}})]})]},a.id))]})]})};function jg(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}const QA=({field:e,onChange:t,onAction:r})=>{const n=e.value??[],[a,i]=P.useState(n[0]?.id??""),[o,l]=P.useState(!1),[c,u]=P.useState(""),[d,f]=P.useState(!1),[h,p]=P.useState([]),v=P.useRef(null),x=P.useRef(null),m=n.find(w=>w.id===a)??n[0],g=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:jg(),typeId:w.id,label:w.label};t(n.map(y=>y.id!==m.id?y:{...y,components:[...y.components,C]}))};return n.length===0?s.jsxs("div",{className:"flex flex-col gap-2",children:[e.label&&s.jsx("span",{className:"text-xs font-semibold text-high-em",children:e.label}),s.jsx("div",{className:"flex items-center justify-center rounded-lg border border-surface-3 h-10",children:s.jsx("span",{className:"text-xs text-low-em",children:"No tabs configured"})})]}):s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[e.label&&s.jsx("span",{className:"text-xs font-semibold text-high-em",children:e.label}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(W,{ref:x,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:s.jsx(B.Edit2,{size:14}),onClick:()=>{p(n.map(w=>({...w}))),f(!0)}}),s.jsx(W,{ref:v,size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:s.jsx(B.Add,{size:14}),onClick:()=>{u(""),l(!0)}})]})]}),n.length>1&&s.jsx(yl,{size:"sm",items:n.map(w=>({id:w.id,label:w.label})),value:a,onChange:i}),s.jsx("div",{className:"flex flex-col rounded-lg border border-surface-3 overflow-hidden divide-y divide-surface-3",children:m.components.length===0?s.jsx(ht,{flat:!0,description:"No components",className:"py-6 px-4"}):m.components.map(w=>s.jsx(vt,{size:"sm",title:w.label,trailingText:g(w.typeId),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showTag:!1,showTrailingText:!0,showTrailingIcon:!0,onClick:()=>r?.(`open-component::${m.id}::${w.id}`)},w.id))}),s.jsx(un,{open:d,onClose:()=>f(!1),triggerRef:x,size:"sm",children:s.jsxs(dn,{className:"!w-72",children:[s.jsx(fn,{children:"Edit tabs"}),s.jsx(hn,{padding:!0,className:"ds-scrollbar overflow-y-auto",children:s.jsxs("div",{className:"flex flex-col gap-3",children:[h.map((w,C)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(me,{value:w.label,placeholder:"Tab label",onChange:y=>p(h.map((j,N)=>N!==C?j:{...j,label:y.target.value}))}),s.jsx(W,{size:"xs",variant:"neutral",hierarchy:"tertiary",icons:"only",leadingIcon:s.jsx(B.Trash,{size:14}),disabled:h.length<=1,onClick:()=>p(h.filter((y,j)=>j!==C))})]},w.id)),s.jsx(W,{size:"sm",variant:"neutral",hierarchy:"tertiary",icons:"leading",leadingIcon:s.jsx(B.Add,{size:14}),onClick:()=>p([...h,{id:jg(),label:"New tab",components:[]}]),children:"Add tab"})]})}),s.jsx(pn,{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(N=>N.id===y.id);return j?{...j,label:y.label}:y});t(C),w.includes(a)&&i(C[0]?.id??""),f(!1)}}})]})}),s.jsx(un,{open:o,onClose:()=>l(!1),triggerRef:v,size:"sm",children:s.jsxs(dn,{className:"!w-72",children:[s.jsx(fn,{children:"Add component"}),s.jsx(hn,{children:s.jsx(Te,{menuSize:"sm",label:"Type",placeholder:"Select a component",value:c,showLeadingIcon:!1,items:jl(e.options??[]),onChange:u})}),s.jsx(pn,{cancelButton:{label:"Cancel",closeOnClick:!0},saveButton:{label:"Add",disabled:!c,closeOnClick:!1,onClick:()=>{b(),l(!1)}}})]})})]})},JA=({field:e,onChange:t,onAction:r})=>{switch(e.type){case"text":return s.jsx(kA,{field:e,onChange:t});case"textarea":return s.jsx(TA,{field:e,onChange:t});case"dropdown":return s.jsx(EA,{field:e,onChange:t});case"toggle":return s.jsx(IA,{field:e,onChange:t});case"multi-dropdown":return s.jsx(MA,{field:e,onChange:t});case"list":return s.jsx($A,{field:e,onAction:r});case"draggable-list":return s.jsx(RA,{field:e,onChange:t,onAction:r});case"size-picker":return s.jsx(LA,{field:e,onChange:t});case"event-handlers":return s.jsx(ZA,{field:e,onChange:t});case"modal-list":return s.jsx(XA,{field:e,onChange:t});case"component-tree":return s.jsx(QA,{field:e,onChange:t,onAction:r});default:return null}},e_=({section:e,onFieldChange:t,onAction:r})=>s.jsxs("div",{className:"flex flex-col gap-6",children:[e.title&&s.jsx("h3",{className:"text-sm font-semibold text-high-em",children:e.title}),e.fields.map(n=>s.jsx(JA,{field:n,onChange:a=>t(n.id,a),onAction:r},n.id))]}),t_=({title:e="Preview",children:t,defaultOpen:r=!1,className:n})=>{const[a,i]=P.useState(r);return s.jsxs("div",{className:O.clsx("flex flex-col bg-surface-2 rounded-xl",n),children:[s.jsxs("button",{type:"button",onClick:()=>i(o=>!o),className:"flex items-center justify-between w-full h-[38px] px-4 cursor-pointer",children:[s.jsx("span",{className:"text-xs font-semibold text-med-em",children:e}),s.jsx(ie,{size:"sm",children:a?s.jsx(B.ArrowUp2,{}):s.jsx(B.ArrowDown2,{})})]}),s.jsx("div",{className:O.clsx("grid transition-all duration-200",a?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"px-4 pb-4",children:t})})})]})};function r_(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 n_=({config:e,onChange:t,onAction:r,backButton:n,className:a})=>{const i=(o,l,c)=>{t({...e,sections:e.sections.map(u=>u.id!==o?u:{...u,fields:u.fields.map(d=>d.id!==l?d:r_(d,c))})})};return s.jsxs("div",{className:O.clsx("h-full w-full flex flex-col bg-white",a),children:[s.jsx("div",{className:"shrink-0",children:s.jsx(_A,{title:e.title,contextMenu:e.contextMenu,backButton:n,onAction:r})}),s.jsx("div",{className:"flex-1 overflow-y-auto ds-scrollbar flex flex-col p-8 gap-6",children:e.sections.map((o,l)=>s.jsxs(S.default.Fragment,{children:[s.jsx(e_,{section:o,onFieldChange:(c,u)=>i(o.id,c,u),onAction:r}),l<e.sections.length-1&&s.jsx(fe,{})]},o.id))})]})},a_=[{id:"And",title:"And",showCheckbox:!1,showLeadingIcon:!1},{id:"Or",title:"Or",showCheckbox:!1,showLeadingIcon:!1}];function i_({position:e}){return s.jsx("div",{className:O.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 s_(e){if(!S.default.isValidElement(e))return!1;const t=e;return typeof t.type=="string"&&!t.props.children}function c3({children:e,operator:t,onChange:r,dropdownIndex:n=0,dropdownBg:a="bg-white"}){const i=S.default.Children.toArray(e);return i.length<=1?s.jsx(s.Fragment,{children:i}):s.jsx("div",{className:"grid grid-cols-[75px_1fr] gap-x-3 gap-y-2.5 auto-rows-[minmax(60px,auto)]",children:i.map((o,l)=>s.jsxs(P.Fragment,{children:[s.jsxs("div",{className:"relative flex items-center justify-center",children:[l>0&&s.jsx("div",{className:"absolute left-[26.5px] top-[-5px] bottom-1/2 border-l border-surface-4 z-0"}),l<i.length-1&&s.jsx("div",{className:"absolute left-[26.5px] top-1/2 bottom-[-5px] border-l border-surface-4 z-0"}),!s_(o)&&s.jsx(i_,{position:l<=n?"above":"below"}),(l===n||n<0&&l===0)&&s.jsx("div",{className:O.clsx("absolute left-0 z-10 py-6",n<0?"bottom-[60%]":"top-[60%]",a),children:s.jsx(Te,{items:a_,value:t.value,size:"sm",menuSize:"sm",showLeadingIcon:!1,className:"min-w-[60px]",onChange:c=>r(t.id,c)})})]}),s.jsx("div",{className:"flex items-stretch self-stretch min-w-0",children:o})]},l))})}const o_={default:{...We.default,wrapper:`${We.default.wrapper} hover:cursor-pointer`,text:"text-med-em"},outlined:{...We.outlined,wrapper:`${We.outlined.wrapper} hover:cursor-pointer`,text:"text-med-em"},danger:{...We.danger,wrapper:`${We.danger.wrapper} hover:cursor-pointer`,text:"text-danger-em"},success:{...We.success,wrapper:`${We.success.wrapper} hover:cursor-pointer`,text:"text-success-em"}},l_={sm:{...qt.sm,text:"text-xs",padding:"px-3"},md:{...qt.md,text:"text-sm font-medium",padding:"px-3.5"},lg:{...qt.lg,text:"text-base",padding:"px-4"}},Ha={wrapper:"bg-surface-3 pointer-events-none border-transparent",text:"text-disabled"};function Ph(e){if(!e)return;const t=new Date(e);return isNaN(t.getTime())?void 0:t}function Cg(e){return e?e.toISOString().split("T")[0]:""}function uc(e){const t=Ph(e);return t?t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):""}function u3({pickType:e="single",from:t="",to:r="",placeholder:n="Select date...",disabled:a=!1,size:i="md",variant:o="default",label:l,hint:c,hintIconVariant:u,className:d,icon:f,iconColor:h="var(--med-em)",onAccept:p}){const[v,x]=P.useState(!1),m=P.useRef(null),g=P.useRef(null),b=P.useCallback(()=>x(!1),[]);Qi({refs:[m,g],onClose:b,enabled:v});const w=Na({triggerRef:m,panelRef:g,enabled:v}),C=l_[i],y=o_[o],j=e==="range"&&(t||r)?[uc(t),uc(r)].filter(Boolean).join(" → "):uc(t),N={from:Ph(t),to:e==="range"?Ph(r):void 0},A=a?Ha.text:j?y.text:y.placeholder;return s.jsxs("div",{className:O.clsx("flex flex-col gap-1.5 w-full",d),children:[l&&s.jsx("label",{className:O.clsx("font-semibold truncate",C.labelFontSize,a?Ha.text:y.text),children:l}),s.jsxs("button",{ref:m,type:"button",disabled:a,onClick:()=>!a&&x(k=>!k),className:O.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?Ha.wrapper:y.wrapper),children:[s.jsx("span",{className:O.clsx("flex-1 min-w-0 truncate text-left",C.text,A),children:j||n}),s.jsx("span",{className:O.clsx("shrink-0 flex items-center",i==="sm"?"pl-1.5":"pl-2"),children:s.jsx(ie,{size:C.iconSize,color:h,children:f??s.jsx(B.Calendar,{})})})]}),c&&s.jsx(ft,{icon:s.jsx(B.InfoCircle,{variant:u||"Bold"}),label:c,iconSize:C.hintIconSize,gap:1,iconColorClass:O.clsx(a?Ha.text:y.hint),labelColorClass:O.clsx(a?Ha.text:y.hint),className:O.clsx(C.hintFontSize,"font-semibold")}),v&&yn.createPortal(s.jsx("div",{ref:g,style:w,children:s.jsx(Om,{selected:N,pickType:e,onAccept:k=>{p(Cg(k?.from),e==="range"?Cg(k?.to):void 0),x(!1)},onCancel:()=>x(!1)})}),document.body)]})}function c_(e,t){if(!(!e.operator||!e.fieldType))return t.operatorsByFieldType[e.fieldType]?.find(r=>r.id===e.operator)}function u_(e){return e==="between"?["",""]:e==="multi-or"||e==="multi-and"?[""]:[]}function fs({inputType:e,value:t,placeholder:r,valueOptions:n,fieldItems:a,onChange:i}){return e==="dropdown"?s.jsx(Te,{items:n,value:t||void 0,placeholder:r,showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:i}):e==="field"?s.jsx(Te,{items:a,value:t||void 0,placeholder:r,showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:i}):e==="date"?s.jsx(u3,{pickType:"single",from:t,placeholder:r,onAccept:o=>i(o)}):s.jsx(me,{type:e,value:t,placeholder:r,size:"md",onChange:o=>i(o.target.value)})}function d_({operatorConfig:e,values:t,valueOptions:r,fieldItems:n,onValuesChange:a}){if(!e||e.valueMode==="none")return null;const i=e.valueMode,o=e.valueInputType??"dropdown";if(i==="single")return s.jsx("div",{className:"grow shrink-0 basis-[200px]",children:s.jsx(fs,{inputType:o,value:t[0]??"",placeholder:"Select value...",valueOptions:r,fieldItems:n,onChange:u=>a([u])})});if(i==="between")return s.jsxs("div",{className:"flex items-center gap-8 grow shrink-0 basis-[200px] min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(fs,{inputType:o,value:t[0]??"",placeholder:"From...",valueOptions:r,fieldItems:n,onChange:u=>{const d=[...t];d[0]=u,a(d)}})}),(e.separator??",")!==""&&s.jsx("span",{className:"text-xs font-medium text-low-em shrink-0 select-none",children:e.separator??","}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(fs,{inputType:o,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 s.jsxs("div",{className:"flex items-center gap-8 grow shrink-0 basis-[200px] flex-wrap",children:[t.map((u,d)=>s.jsxs(S.default.Fragment,{children:[d>0&&s.jsx("span",{className:"text-xs font-medium text-low-em shrink-0 select-none",children:l}),s.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[s.jsx("div",{className:"min-w-[120px] flex-1",children:s.jsx(fs,{inputType:o,value:u,placeholder:"Select...",valueOptions:r,fieldItems:n,onChange:f=>{const h=[...t];h[d]=f,a(h)}})}),c&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx("span",{className:"contents",children:s.jsx(ie,{size:"xs",children:s.jsx(it,{})})}),onClick:()=>a(t.filter((f,h)=>h!==d)),"aria-label":"Remove value"})]})]},d)),s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"sm",icons:"only",leadingIcon:s.jsx(ie,{size:14,children:s.jsx(B.Add,{})}),onClick:()=>a([...t,""]),"aria-label":"Add value"})]})}function d3({condition:e,config:t,onChange:r,onDelete:n=()=>{}}){const a=c_(e,t),i=t.fields.map(({fieldType:f,...h})=>h),o=e.fieldType?(t.operatorsByFieldType[e.fieldType]??[]).map(({valueMode:f,valueInputType:h,connector:p,separator:v,...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?u_(h.valueMode):[]})}function u(f){r({...e,values:f})}const d=!a||a.valueMode==="none";return s.jsxs("div",{className:"flex items-stretch gap-8 w-full border border-surface-3 rounded-xl p-5",children:[s.jsxs("div",{className:"flex flex-wrap flex-1 items-center gap-8 min-w-0",children:[s.jsx("div",{className:"grow shrink-0 basis-40",children:s.jsx(Te,{items:i,value:e.field||void 0,placeholder:"Field...",showLeadingIcon:!1,size:"md",menuSize:"sm",onChange:l})}),s.jsx("div",{className:"grow shrink-0 basis-[130px]",children:s.jsx(Te,{items:o,value:e.operator||void 0,placeholder:"Operator...",showLeadingIcon:!1,size:"md",menuSize:"sm",disabled:!e.field,onChange:c})}),a?.connector==="arrow"&&s.jsx("span",{className:"shrink-0",children:s.jsx(ie,{size:"sm",color:"var(--med-em)",children:s.jsx(B.ArrowRight,{})})}),s.jsx(d_,{operatorConfig:a,values:e.values,valueOptions:t.valueOptions,fieldItems:i,onValuesChange:u}),d&&s.jsx("div",{className:"flex-1"})]}),e.showDelete&&s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx("span",{className:"contents",children:s.jsx(ie,{size:"xs",children:s.jsx(it,{})})}),onClick:()=>n(e.id),"aria-label":"Delete condition"})})]})}const f_={xs:"text-xs",sm:"text-sm",md:"text-base"};function f3({title:e,children:t,footer:r,headerAction:n,className:a,titleClassName:i,headerClassName:o,contentClassName:l,titleSize:c="sm",defaultPadding:u=!1}){return s.jsxs("div",{className:O.clsx("flex flex-col bg-white rounded-2xl border border-surface-3",a),children:[s.jsxs("div",{className:Q.twMerge(O.clsx("flex items-center shrink-0 py-4 px-8 border-b border-surface-3",o)),children:[s.jsx("h3",{className:O.clsx("font-semibold text-high-em flex-1",f_[c],i),children:e}),n]}),s.jsx("div",{className:Q.twMerge(O.clsx("flex-1 overflow-y-auto p-5",u&&"p-8",l)),children:t}),r&&s.jsx("div",{className:"shrink-0 flex items-center justify-end gap-2 px-8 pb-6",children:r})]})}function h_({title:e,conditions:t,config:r,operator:n,onOperatorChange:a,onChange:i,onDelete:o,onAddAnd:l,onAddOr:c,dropdownIndex:u=0,className:d}){const f=s.jsx(ie,{children:s.jsx(B.Add,{})}),h=[...l?[{value:"and",icon:f,label:"And"}]:[],...c?[{value:"or",icon:f,label:"Or"}]:[]],p=h.length>0?s.jsx(xr,{options:h,value:"",size:"sm",variant:"neutral",onChange:v=>{v==="and"&&l?.(),v==="or"&&c?.()}}):void 0;return s.jsx(f3,{title:e,footer:p,className:d,children:s.jsx("div",{className:"p-5",children:s.jsx(c3,{operator:n,onChange:a,dropdownIndex:u,children:t.map(v=>s.jsx(d3,{condition:v,config:r,onChange:i,onDelete:o},v.id))})})})}const p_=[{id:"if",title:"If",showCheckbox:!1,showLeadingIcon:!1},{id:"if-else",title:"If / Else",showCheckbox:!1,showLeadingIcon:!1}],m_={when:"When",then:"Then","else-if":"Else If",else:"Else"},h3=70,x_=10;function g_(){return s.jsx("div",{className:"relative h-[23px] shrink-0",style:{width:h3},children:s.jsx("div",{className:"absolute left-4 top-0 w-14 h-full border-l border-b border-surface-4 rounded-bl-xl"})})}function v_({name:e,onNameChange:t,type:r,onTypeChange:n,branches:a,onAddElseIf:i,onRemoveBranch:o,className:l}){return s.jsxs("div",{className:O.clsx("flex flex-col gap-10",l),children:[s.jsxs("div",{className:"flex items-end gap-5",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(me,{label:"Name",value:e,size:"md",onChange:c=>t(c.target.value)})}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Te,{items:p_,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&&!!o;return s.jsxs("div",{className:O.clsx("flex items-start gap-2",!f&&"ml-[var(--indent-mobile)] md:ml-[var(--indent-desktop)]"),style:f?void 0:{"--indent-mobile":`${(d-1)*x_}px`,"--indent-desktop":`${(d-1)*h3}px`},children:[!f&&s.jsx("div",{className:"hidden md:block shrink-0",children:s.jsx(g_,{})}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(h_,{title:m_[c.type],...c.panel})}),h&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx("span",{className:"contents",children:s.jsx(ie,{size:"xs",children:s.jsx(it,{})})}),onClick:()=>o(c.id),"aria-label":"Remove branch"})]},c.id)}),i&&s.jsx("div",{children:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",leadingIcon:s.jsx(ie,{size:14,children:s.jsx(B.Add,{})}),onClick:i,children:"Add Else If"})})]})}const p3=({name:e,expression:t,inputField:r,className:n})=>{const[a,i]=S.default.useState(!1),o=S.default.useRef(null),l=!!t?.options?.length;function c(){l&&i(d=>!d)}function u(d){t?.onSelect?.(d),i(!1)}return s.jsxs("div",{className:O.clsx("flex flex-col p-4 gap-4 border border-surface-4 rounded-xl",n),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs font-semibold text-high-em truncate pr-2",children:e}),t&&s.jsxs(s.Fragment,{children:[s.jsx("span",{ref:o,className:"inline-flex shrink-0",children:s.jsx(Lr,{size:"sm",variant:"quaternary",leadingIcon:!1,trailingIcon:!1,className:"font-semibold cursor-pointer",onClick:c,children:t.label})}),l&&a&&s.jsx(Ht,{items:t.options,selectedIds:t.selectedId?[t.selectedId]:[],size:"xs",triggerRef:o,onSelect:u,onClose:()=>i(!1)})]})]}),r!==void 0&&s.jsx(me,{...r})]})};function m3({operator:e,className:t}){return e?s.jsxs("div",{className:`flex items-center gap-5 ${t??""}`,children:[s.jsx(fe,{className:"flex-1"}),s.jsx(Ye,{size:"md",theme:"surface",variant:"simple",className:"shrink-0",children:e}),s.jsx(fe,{className:"flex-1"})]}):s.jsx("div",{className:`flex items-center gap-5 ${t??""}`,children:s.jsx(fe,{className:"flex-1"})})}function y_({title:e,items:t,operator:r,onAdd:n,onDelete:a,onClose:i,className:o}){const l=n?s.jsx(W,{variant:"neutral",hierarchy:"primary",size:"xs",icons:"leading",leadingIcon:s.jsx(ie,{children:s.jsx(B.Add,{})}),onClick:n,children:"Add expression"}):void 0;return s.jsx(f3,{title:e,footer:l,titleSize:"xs",headerClassName:"px-4 py-2 bg-surface-2",contentClassName:"p-4",headerAction:s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"xs",icons:"only",leadingIcon:s.jsx(ie,{size:"xs",children:s.jsx(it,{})}),onClick:i,"aria-label":"Close"}),className:Q.twMerge(O.clsx("rounded-lg overflow-hidden",o)),children:s.jsx("div",{className:"flex flex-col gap-3",children:t.map((c,u)=>{const{id:d,...f}=c,h=u===t.length-1;return s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(p3,{className:"flex-1",...f}),a&&s.jsx(W,{variant:"neutral",hierarchy:"secondary",size:"sm",icons:"only",leadingIcon:s.jsx("span",{className:"contents",children:s.jsx(ie,{size:"xs",children:s.jsx(it,{})})}),onClick:()=>a(d),"aria-label":"Remove expression"})]}),!h&&s.jsx(m3,{operator:r})]},d)})})})}const b_={confirmed:{theme:"success",label:"Confirmed"},pending:{theme:"warning",label:"Pending"},"no-show":{theme:"danger",label:"No-show"},cancelled:{theme:"surface",label:"Cancelled"}},Ds=({time:e,title:t,description:r,status:n,isSelected:a=!1,className:i,...o})=>{const l=b_[n];return s.jsxs("div",{className:Q.twMerge(O.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)),...o,children:[s.jsx("span",{className:O.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}),s.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-semibold text-med-em truncate",children:t}),s.jsx("span",{className:"text-xs text-low-em truncate",children:r})]}),l&&s.jsx(Ye,{theme:l.theme,variant:"outlined",size:"sm",className:"shrink-0",children:l.label})]})};Ds.displayName="AppointmentRow";const zs=({name:e,age:t,gender:r,tags:n,fields:a,onEdit:i,className:o})=>s.jsxs("div",{className:Q.twMerge("p-6 flex flex-col gap-6 flex-1 overflow-y-auto",o),children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-med-em",children:e}),s.jsxs("p",{className:"text-xs text-low-em",children:[r," · ",t," yrs"]}),n&&n.length>0&&s.jsx("div",{className:"flex flex-wrap gap-6 py-4",children:n.map(l=>s.jsx(Lr,{variant:"tertiary",size:"xs",leadingIcon:!1,trailingIcon:!1,children:l},l))})]}),i&&s.jsx(W,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:s.jsx(B.Edit2,{}),onClick:i,"aria-label":"Edit"})]}),a&&a.length>0&&s.jsx("div",{className:"flex flex-col",children:a.map(({label:l,value:c},u)=>s.jsxs("div",{className:"flex items-baseline gap-6 px-5 py-4",children:[s.jsx("span",{className:"text-xs text-low-em tracking-wide shrink-0",children:l}),s.jsx("span",{className:"text-xs text-med-em font-medium",children:c??"—"})]},`${l}-${u}`))})]});zs.displayName="AppointmentDetail";const w_=480,x3=({appointments:e,selectedId:t,detail:r,onSelectAppointment:n,showDetail:a=!0,showDatePicker:i=!1,selectedDate:o,onDateChange:l,datePickerType:c="single",className:u,...d})=>{const f=e.findIndex(x=>x.id===t),[h,p]=il(),v=p!==1/0&&p<w_;return s.jsxs(dl,{size:"md",padding:"sm",children:[s.jsxs("div",{ref:h,className:Q.twMerge(O.clsx("bg-surface-1 shadow-e2 overflow-hidden",v?"flex flex-col w-full":"flex flex-row",u)),...d,children:[s.jsxs("div",{className:O.clsx("flex flex-col min-h-0 h-full",!v&&a?"w-1/2":"w-full"),children:[i&&s.jsx("div",{className:O.clsx("shrink-0 flex justify-center bg-white border-b border-surface-3",!v&&a&&"border-r border-surface-3",!v&&a&&f===0&&"rounded-br-lg"),children:s.jsx(Om,{selected:o,pickType:c,onSelect:l,showFooter:!1,className:"rounded-none border-0"})}),s.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[s.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 g=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:g,onClick:()=>n?.(x.id),className:O.clsx(g?"bg-surface-1 border-transparent":[!v&&a&&"border-r border-surface-3",!v&&b&&"rounded-br-lg",!v&&w&&"rounded-tr-lg border-t border-surface-3"])};return v?s.jsx(fl,{children:s.jsx(Ds,{...C})},x.id):s.jsx(Ds,{...C},x.id)})}),!v&&a&&s.jsx("div",{className:"flex-1 border-r border-surface-3"}),v&&s.jsx("div",{className:"flex-1"})]})]}),!v&&a&&s.jsx("div",{className:"w-1/2 bg-surface-1 flex flex-col min-w-0",children:r?s.jsx(zs,{...r}):s.jsx(ht,{flat:!0,description:"Select an appointment to view details",className:"!bg-transparent h-full"})})]}),s.jsxs(hl,{children:[s.jsx(pl,{children:s.jsx(ml,{children:r?.name??"Details"})}),s.jsx(xl,{children:r?s.jsx(zs,{...r}):s.jsx(ht,{flat:!0,description:"Select an appointment to view details",className:"!bg-transparent h-full"})})]})]})};x3.displayName="Planner";const Cl=({title:e,description:t,status:r,statusTheme:n,avatars:a,quickActions:i=[],variant:o="neutral",onCheck:l,onDelete:c,className:u,...d})=>s.jsxs("div",{className:Q.twMerge(O.clsx("bg-white rounded-xl border border-surface-3 shadow-e1 p-4 flex flex-col gap-4",o==="secondary"&&"bg-surface-2",u)),...d,children:[s.jsx("div",{className:"text-sm font-semibold text-high-em truncate",children:e}),t!=null&&s.jsx("div",{className:"text-xs text-med-em leading-snug line-clamp-3",children:t}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ye,{theme:n,size:"sm",variant:"simple",children:r}),a&&a.length>0&&s.jsx(om,{avatars:a,size:"xs",max:3}),i.length>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[i.includes("check")&&s.jsx(W,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:s.jsx(B.TickCircle,{}),onClick:f=>{f.stopPropagation(),l?.()},"aria-label":"Mark complete"}),i.includes("delete")&&s.jsx(W,{icons:"only",hierarchy:"tertiary",variant:"neutral",size:"xs",leadingIcon:s.jsx(B.Trash,{}),onClick:f=>{f.stopPropagation(),c?.()},"aria-label":"Delete"})]})]})]});Cl.displayName="KanbanCard";const j_={red:{theme:"danger",statusState:"danger"},orange:{theme:"warning",statusState:"warning"},green:{theme:"success",statusState:"success"},gray:{theme:"surface",statusState:"disabled"}},g3=({card:e,columnName:t,statusTheme:r,variant:n,onCardClick:a})=>{const{attributes:i,listeners:o,setNodeRef:l,transform:c,transition:u,isDragging:d}=Ve.useSortable({id:e.id,data:{id:e.id,columnName:t},animateLayoutChanges:()=>!1});return s.jsxs("div",{ref:l,style:{transform:Yo.CSS.Transform.toString(c),transition:u},className:O.clsx("touch-none",d?"relative cursor-grabbing":"cursor-grab"),onClick:()=>a?.(e.id),...i,...o,children:[d&&s.jsx(Gn,{className:"absolute inset-0"}),s.jsx("div",{className:O.clsx(d&&"invisible"),children:s.jsx(Cl,{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})})]})};g3.displayName="DraggableCard";const v3=({columnName:e})=>{const{setNodeRef:t}=Be.useDroppable({id:`endzone-${e}`,data:{columnName:e,isEndZone:!0}});return s.jsx("div",{ref:t,className:"flex-1 min-h-8"})};v3.displayName="KanbanEndZone";const $m=({name:e,statusColor:t,cards:r,showCounter:n=!1,onAddCard:a,variant:i,emptyState:o="No items yet",onCardClick:l,className:c,fullHeight:u=!1})=>{const{setNodeRef:d}=Be.useDroppable({id:e,data:{columnName:e}}),{theme:f,statusState:h}=j_[t];return s.jsxs("div",{ref:d,className:Q.twMerge(O.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:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ye,{variant:"status",size:"xs",statusState:h}),s.jsx("span",{className:"text-base font-semibold text-high-em truncate",children:e}),n&&s.jsxs("span",{className:"text-lg font-semibold text-low-em",children:["(",r.length,")"]})]}),a&&s.jsx(W,{icons:"only",hierarchy:"secondary",variant:"neutral",size:"xs",leadingIcon:s.jsx(B.Add,{}),onClick:a,"aria-label":`Add card to ${e}`})]}),s.jsx(Ve.SortableContext,{items:r.map(p=>p.id),strategy:Ve.verticalListSortingStrategy,children:s.jsx("div",{className:O.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?s.jsx(ht,{flat:!0,description:o,className:"!bg-transparent h-full"}):s.jsxs(s.Fragment,{children:[r.map(p=>s.jsx(g3,{card:p,columnName:e,statusTheme:f,variant:i,onCardClick:l},p.id)),s.jsx(v3,{columnName:e})]})})}),a&&s.jsx(W,{hierarchy:"secondary",variant:"neutral",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{}),className:"w-full justify-center",onClick:a,children:"Add Task"})]})};$m.displayName="KanbanColumn";const C_={red:"danger",orange:"warning",green:"success",gray:"surface"},S_=e=>{const t=Be.pointerWithin(e);return t.length>0?t:Be.rectIntersection(e)},y3=({columns:e,data:t,fieldMap:r,showCounter:n,variant:a,emptyState:i,columnClassName:o,fullHeight:l,onAddCard:c,onCardCheck:u,onCardDelete:d,onCardMove:f,onCardClick:h,className:p,...v})=>{const[x,m]=P.useState(null),[g,b]=P.useState(null),w=g??t,C=Be.useSensors(Be.useSensor(Be.PointerSensor,{activationConstraint:{distance:8}})),y=T=>w.filter(R=>R[r.status]===T).map(R=>{const M=String(R[r.id]??"");return{id:M,title:String(R[r.title]??""),description:r.description?R[r.description]:void 0,status:T,avatars:r.avatars?R[r.avatars]:void 0,quickActions:r.quickActions,onCheck:u?()=>u(M):void 0,onDelete:d?()=>d(M):void 0}}),N=e.flatMap(T=>y(T.name)).find(T=>T.id===x)??null,A=N?e.find(T=>y(T.name).some(R=>R.id===x))?.name:void 0,k=T=>{m(String(T.active.id)),b([...t])},I=T=>{const{active:R,over:M}=T;if(!M)return;const $=String(R.id),L=String(M.id);if($===L)return;const q=M.data.current?.columnName;q!=null&&b(U=>{const D=U??t,F=D.findIndex(ne=>String(ne[r.id])===$);if(F<0)return U;const H={...D[F],[r.status]:q},G=D.filter((ne,X)=>X!==F),J=G.findIndex(ne=>String(ne[r.id])===L);if(J>=0)G.splice(J,0,H);else{let ne=-1;G.forEach((X,re)=>{X[r.status]===q&&(ne=re)}),G.splice(ne+1,0,H)}return G})},_=T=>{const R=g;if(m(null),b(null),!R)return;const M=String(T.active.id),$=R.find(U=>String(U[r.id])===M);if(!$)return;const L=String($[r.status]??""),q=Math.max(0,R.filter(U=>U[r.status]===$[r.status]).findIndex(U=>String(U[r.id])===M));f?.(M,L,q)},E=()=>{m(null),b(null)};return s.jsxs(Be.DndContext,{sensors:C,collisionDetection:S_,onDragStart:k,onDragOver:I,onDragEnd:_,onDragCancel:E,children:[s.jsx("div",{className:Q.twMerge(O.clsx("flex flex-row gap-4 p-4 overflow-x-auto ds-scrollbar",l&&"h-full",p)),...v,children:e.map(T=>s.jsx($m,{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:o,fullHeight:l},T.name))}),s.jsx(Be.DragOverlay,{dropAnimation:null,children:N&&A&&s.jsx(Cl,{title:N.title,description:N.description,status:N.status,statusTheme:C_[e.find(T=>T.name===A).statusColor],avatars:N.avatars,quickActions:N.quickActions,variant:a,className:"rotate-1 shadow-e3"})})]})};y3.displayName="Kanban";var hs=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 dc,Sg;function yt(){if(Sg)return dc;Sg=1;var e=Array.isArray;return dc=e,dc}var fc,Ng;function b3(){if(Ng)return fc;Ng=1;var e=typeof hs=="object"&&hs&&hs.Object===Object&&hs;return fc=e,fc}var hc,Og;function nr(){if(Og)return hc;Og=1;var e=b3(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return hc=r,hc}var pc,Pg;function es(){if(Pg)return pc;Pg=1;var e=nr(),t=e.Symbol;return pc=t,pc}var mc,Ag;function N_(){if(Ag)return mc;Ag=1;var e=es(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(o){var l=r.call(o,a),c=o[a];try{o[a]=void 0;var u=!0}catch{}var d=n.call(o);return u&&(l?o[a]=c:delete o[a]),d}return mc=i,mc}var xc,_g;function O_(){if(_g)return xc;_g=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return xc=r,xc}var gc,kg;function Nr(){if(kg)return gc;kg=1;var e=es(),t=N_(),r=O_(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?a:n:i&&i in Object(l)?t(l):r(l)}return gc=o,gc}var vc,Tg;function Or(){if(Tg)return vc;Tg=1;function e(t){return t!=null&&typeof t=="object"}return vc=e,vc}var yc,Eg;function Aa(){if(Eg)return yc;Eg=1;var e=Nr(),t=Or(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return yc=n,yc}var bc,Ig;function Rm(){if(Ig)return bc;Ig=1;var e=yt(),t=Aa(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){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)||o!=null&&i in Object(o)}return bc=a,bc}var wc,Mg;function zr(){if(Mg)return wc;Mg=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return wc=e,wc}var jc,$g;function Lm(){if($g)return jc;$g=1;var e=Nr(),t=zr(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==n||c==a||c==r||c==i}return jc=o,jc}var Cc,Rg;function P_(){if(Rg)return Cc;Rg=1;var e=nr(),t=e["__core-js_shared__"];return Cc=t,Cc}var Sc,Lg;function A_(){if(Lg)return Sc;Lg=1;var e=P_(),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 Sc=r,Sc}var Nc,Dg;function w3(){if(Dg)return Nc;Dg=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 Nc=r,Nc}var Oc,zg;function __(){if(zg)return Oc;zg=1;var e=Lm(),t=A_(),r=zr(),n=w3(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.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 Oc=f,Oc}var Pc,Bg;function k_(){if(Bg)return Pc;Bg=1;function e(t,r){return t?.[r]}return Pc=e,Pc}var Ac,Fg;function Sn(){if(Fg)return Ac;Fg=1;var e=__(),t=k_();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return Ac=r,Ac}var _c,qg;function Sl(){if(qg)return _c;qg=1;var e=Sn(),t=e(Object,"create");return _c=t,_c}var kc,Wg;function T_(){if(Wg)return kc;Wg=1;var e=Sl();function t(){this.__data__=e?e(null):{},this.size=0}return kc=t,kc}var Tc,Hg;function E_(){if(Hg)return Tc;Hg=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Tc=e,Tc}var Ec,Vg;function I_(){if(Vg)return Ec;Vg=1;var e=Sl(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;if(e){var l=o[i];return l===t?void 0:l}return n.call(o,i)?o[i]:void 0}return Ec=a,Ec}var Ic,Ug;function M_(){if(Ug)return Ic;Ug=1;var e=Sl(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return Ic=n,Ic}var Mc,Kg;function $_(){if(Kg)return Mc;Kg=1;var e=Sl(),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 Mc=r,Mc}var $c,Gg;function R_(){if(Gg)return $c;Gg=1;var e=T_(),t=E_(),r=I_(),n=M_(),a=$_();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[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,Zg;function L_(){if(Zg)return Rc;Zg=1;function e(){this.__data__=[],this.size=0}return Rc=e,Rc}var Lc,Yg;function Dm(){if(Yg)return Lc;Yg=1;function e(t,r){return t===r||t!==t&&r!==r}return Lc=e,Lc}var Dc,Xg;function Nl(){if(Xg)return Dc;Xg=1;var e=Dm();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return Dc=t,Dc}var zc,Qg;function D_(){if(Qg)return zc;Qg=1;var e=Nl(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,o=e(i,a);if(o<0)return!1;var l=i.length-1;return o==l?i.pop():r.call(i,o,1),--this.size,!0}return zc=n,zc}var Bc,Jg;function z_(){if(Jg)return Bc;Jg=1;var e=Nl();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return Bc=t,Bc}var Fc,ev;function B_(){if(ev)return Fc;ev=1;var e=Nl();function t(r){return e(this.__data__,r)>-1}return Fc=t,Fc}var qc,tv;function F_(){if(tv)return qc;tv=1;var e=Nl();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 qc=t,qc}var Wc,rv;function Ol(){if(rv)return Wc;rv=1;var e=L_(),t=D_(),r=z_(),n=B_(),a=F_();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[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,Wc=i,Wc}var Hc,nv;function zm(){if(nv)return Hc;nv=1;var e=Sn(),t=nr(),r=e(t,"Map");return Hc=r,Hc}var Vc,av;function q_(){if(av)return Vc;av=1;var e=R_(),t=Ol(),r=zm();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Vc=n,Vc}var Uc,iv;function W_(){if(iv)return Uc;iv=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Uc=e,Uc}var Kc,sv;function Pl(){if(sv)return Kc;sv=1;var e=W_();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return Kc=t,Kc}var Gc,ov;function H_(){if(ov)return Gc;ov=1;var e=Pl();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Gc=t,Gc}var Zc,lv;function V_(){if(lv)return Zc;lv=1;var e=Pl();function t(r){return e(this,r).get(r)}return Zc=t,Zc}var Yc,cv;function U_(){if(cv)return Yc;cv=1;var e=Pl();function t(r){return e(this,r).has(r)}return Yc=t,Yc}var Xc,uv;function K_(){if(uv)return Xc;uv=1;var e=Pl();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 Xc=t,Xc}var Qc,dv;function Bm(){if(dv)return Qc;dv=1;var e=q_(),t=H_(),r=V_(),n=U_(),a=K_();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[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,Qc=i,Qc}var Jc,fv;function j3(){if(fv)return Jc;fv=1;var e=Bm(),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 o=arguments,l=a?a.apply(this,o):o[0],c=i.cache;if(c.has(l))return c.get(l);var u=n.apply(this,o);return i.cache=c.set(l,u)||c,u};return i.cache=new(r.Cache||e),i}return r.Cache=e,Jc=r,Jc}var eu,hv;function G_(){if(hv)return eu;hv=1;var e=j3(),t=500;function r(n){var a=e(n,function(o){return i.size===t&&i.clear(),o}),i=a.cache;return a}return eu=r,eu}var tu,pv;function Z_(){if(pv)return tu;pv=1;var e=G_(),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(o,l,c,u){i.push(c?u.replace(r,"$1"):l||o)}),i});return tu=n,tu}var ru,mv;function Fm(){if(mv)return ru;mv=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 ru=e,ru}var nu,xv;function Y_(){if(xv)return nu;xv=1;var e=es(),t=Fm(),r=yt(),n=Aa(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function o(l){if(typeof l=="string")return l;if(r(l))return t(l,o)+"";if(n(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return nu=o,nu}var au,gv;function C3(){if(gv)return au;gv=1;var e=Y_();function t(r){return r==null?"":e(r)}return au=t,au}var iu,vv;function S3(){if(vv)return iu;vv=1;var e=yt(),t=Rm(),r=Z_(),n=C3();function a(i,o){return e(i)?i:t(i,o)?[i]:r(n(i))}return iu=a,iu}var su,yv;function Al(){if(yv)return su;yv=1;var e=Aa();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return su=t,su}var ou,bv;function qm(){if(bv)return ou;bv=1;var e=S3(),t=Al();function r(n,a){a=e(a,n);for(var i=0,o=a.length;n!=null&&i<o;)n=n[t(a[i++])];return i&&i==o?n:void 0}return ou=r,ou}var lu,wv;function N3(){if(wv)return lu;wv=1;var e=qm();function t(r,n,a){var i=r==null?void 0:e(r,n);return i===void 0?a:i}return lu=t,lu}var X_=N3();const Nt=Ne(X_);var cu,jv;function Q_(){if(jv)return cu;jv=1;function e(t){return t==null}return cu=e,cu}var J_=Q_();const de=Ne(J_);var uu,Cv;function e8(){if(Cv)return uu;Cv=1;var e=Nr(),t=yt(),r=Or(),n="[object String]";function a(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return uu=a,uu}var t8=e8();const mn=Ne(t8);var r8=Lm();const le=Ne(r8);var n8=zr();const _a=Ne(n8);var ps={exports:{}},ye={};var Sv;function a8(){if(Sv)return ye;Sv=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"),o=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"),v;v=Symbol.for("react.module.reference");function x(m){if(typeof m=="object"&&m!==null){var g=m.$$typeof;switch(g){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 o:case c:case h:case f:case i:return m;default:return g}}case t:return g}}}return ye.ContextConsumer=o,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)===o},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===o||m.$$typeof===c||m.$$typeof===v||m.getModuleId!==void 0)},ye.typeOf=x,ye}var be={};var Nv;function i8(){return Nv||(Nv=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"),o=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"),v=!1,x=!1,m=!1,g=!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||g||Y===p||v||x||m||typeof Y=="object"&&Y!==null&&(Y.$$typeof===h||Y.$$typeof===f||Y.$$typeof===i||Y.$$typeof===o||Y.$$typeof===c||Y.$$typeof===w||Y.getModuleId!==void 0))}function y(Y){if(typeof Y=="object"&&Y!==null){var Oe=Y.$$typeof;switch(Oe){case e:var $e=Y.type;switch($e){case r:case a:case n:case u:case d:return $e;default:var nt=$e&&$e.$$typeof;switch(nt){case l:case o:case c:case h:case f:case i:return nt;default:return Oe}}case t:return Oe}}}var j=o,N=i,A=e,k=c,I=r,_=h,E=f,T=t,R=a,M=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 F(Y){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(Y){return y(Y)===o}function G(Y){return y(Y)===i}function J(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 ee(Y){return y(Y)===a}function te(Y){return y(Y)===n}function z(Y){return y(Y)===u}function pe(Y){return y(Y)===d}be.ContextConsumer=j,be.ContextProvider=N,be.Element=A,be.ForwardRef=k,be.Fragment=I,be.Lazy=_,be.Memo=E,be.Portal=T,be.Profiler=R,be.StrictMode=M,be.Suspense=$,be.SuspenseList=L,be.isAsyncMode=D,be.isConcurrentMode=F,be.isContextConsumer=H,be.isContextProvider=G,be.isElement=J,be.isForwardRef=ne,be.isFragment=X,be.isLazy=re,be.isMemo=ce,be.isPortal=K,be.isProfiler=ee,be.isStrictMode=te,be.isSuspense=z,be.isSuspenseList=pe,be.isValidElementType=C,be.typeOf=y})()),be}var Ov;function s8(){return Ov||(Ov=1,process.env.NODE_ENV==="production"?ps.exports=a8():ps.exports=i8()),ps.exports}var o8=s8(),du,Pv;function O3(){if(Pv)return du;Pv=1;var e=Nr(),t=Or(),r="[object Number]";function n(a){return typeof a=="number"||t(a)&&e(a)==r}return du=n,du}var fu,Av;function l8(){if(Av)return fu;Av=1;var e=O3();function t(r){return e(r)&&r!=+r}return fu=t,fu}var c8=l8();const ka=Ne(c8);var u8=O3();const d8=Ne(u8);var tt=function(t){return t===0?0:t>0?1:-1},en=function(t){return mn(t)&&t.indexOf("%")===t.length-1},Z=function(t){return d8(t)&&!ka(t)},f8=function(t){return de(t)},Ze=function(t){return Z(t)||mn(t)},h8=0,Nn=function(t){var r=++h8;return"".concat(t||"").concat(r)},ut=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)&&!mn(t))return n;var i;if(en(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return ka(i)&&(i=n),a&&i>r&&(i=r),i},Ir=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},p8=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 Bs(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Nt(n,t))===r})}var m8=function(t,r){return Z(t)&&Z(r)?t-r:mn(t)&&mn(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Vn(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 Ah(e){"@babel/helpers - typeof";return Ah=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},Ah(e)}var x8=["viewBox","children"],g8=["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"],_v=["points","pathLength"],hu={svg:x8,polygon:_v,polyline:_v},Wm=["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"],Fs=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(P.isValidElement(t)&&(n=t.props),!_a(n))return null;var a={};return Object.keys(n).forEach(function(i){Wm.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},v8=function(t,r,n){return function(a){return t(r,n,a),null}},vr=function(t,r,n){if(!_a(t)||Ah(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];Wm.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=v8(o,r,n))}),a},y8=["children"],b8=["children"];function kv(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}function _h(e){"@babel/helpers - typeof";return _h=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},_h(e)}var Tv={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"},hr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Ev=null,pu=null,Hm=function e(t){if(t===Ev&&Array.isArray(pu))return pu;var r=[];return P.Children.forEach(t,function(n){de(n)||(o8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),pu=r,Ev=t,r};function gt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return hr(a)}):n=[hr(t)],Hm(e).forEach(function(a){var i=Nt(a,"type.displayName")||Nt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function jt(e,t){var r=gt(e,t);return r&&r[0]}var Iv=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)},j8=["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"],C8=function(t){return t&&t.type&&mn(t.type)&&j8.indexOf(t.type)>=0},P3=function(t){return t&&_h(t)==="object"&&"clipDot"in t},S8=function(t,r,n,a){var i,o=(i=hu?.[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!le(t)&&(a&&o.includes(r)||g8.includes(r))||n&&Wm.includes(r)},se=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(P.isValidElement(t)&&(a=t.props),!_a(a))return null;var i={};return Object.keys(a).forEach(function(o){var l;S8((l=a)===null||l===void 0?void 0:l[o],o,r,n)&&(i[o]=a[o])}),i},kh=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 Mv(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!Mv(i,o))return!1}return!0},Mv=function(t,r){if(de(t)&&de(r))return!0;if(!de(t)&&!de(r)){var n=t.props||{},a=n.children,i=kv(n,y8),o=r.props||{},l=o.children,c=kv(o,b8);return a&&l?Vn(i,c)&&kh(a,l):!a&&!l?Vn(i,c):!1}return!1},$v=function(t,r){var n=[],a={};return Hm(t).forEach(function(i,o){if(C8(i))n.push(i);else if(i){var l=hr(i.type),c=r[l]||{},u=c.handler,d=c.once;if(u&&(!d||!a[l])){var f=u(i,l,o);n.push(f),a[l]=!0}}}),n},N8=function(t){var r=t&&t.type;return r&&Tv[r]?Tv[r]:null},O8=function(t,r){return Hm(r).indexOf(t)},P8=["children","width","height","viewBox","className","style","title","desc"];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 A8(e,t){if(e==null)return{};var r=_8(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 _8(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){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,l=e.title,c=e.desc,u=A8(e,P8),d=a||{width:r,height:n,x:0,y:0},f=ae.default("recharts-surface",i);return S.default.createElement("svg",Th({},se(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),S.default.createElement("title",null,l),S.default.createElement("desc",null,c),t)}var k8=["children","className"];function Ih(){return Ih=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},Ih.apply(this,arguments)}function T8(e,t){if(e==null)return{};var r=E8(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 E8(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 he=S.default.forwardRef(function(e,t){var r=e.children,n=e.className,a=T8(e,k8),i=ae.default("recharts-layer",n);return S.default.createElement("g",Ih({className:i},se(a,!0),{ref:t}),r)}),I8=process.env.NODE_ENV!=="production",It=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(I8&&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 o=0;console.warn(r.replace(/%s/g,function(){return a[o++]}))}},mu,Rv;function M8(){if(Rv)return mu;Rv=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 o=Array(i);++a<i;)o[a]=t[a+r];return o}return mu=e,mu}var xu,Lv;function $8(){if(Lv)return xu;Lv=1;var e=M8();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 xu=t,xu}var gu,Dv;function A3(){if(Dv)return gu;Dv=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+a+i+"]");function c(u){return l.test(u)}return gu=c,gu}var vu,zv;function R8(){if(zv)return vu;zv=1;function e(t){return t.split("")}return vu=e,vu}var yu,Bv;function L8(){if(Bv)return yu;Bv=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",o="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",v=u+"?",x="["+i+"]?",m="(?:"+p+"(?:"+[d,f,h].join("|")+")"+x+v+")*",g=x+v+m,b="(?:"+[d+l+"?",l,f,h,o].join("|")+")",w=RegExp(c+"(?="+c+")|"+b+g,"g");function C(y){return y.match(w)||[]}return yu=C,yu}var bu,Fv;function D8(){if(Fv)return bu;Fv=1;var e=R8(),t=A3(),r=L8();function n(a){return t(a)?r(a):e(a)}return bu=n,bu}var wu,qv;function z8(){if(qv)return wu;qv=1;var e=$8(),t=A3(),r=D8(),n=C3();function a(i){return function(o){o=n(o);var l=t(o)?r(o):void 0,c=l?l[0]:o.charAt(0),u=l?e(l,1).join(""):o.slice(1);return c[i]()+u}}return wu=a,wu}var ju,Wv;function B8(){if(Wv)return ju;Wv=1;var e=z8(),t=e("toUpperCase");return ju=t,ju}var F8=B8();const _l=Ne(F8);function ke(e){return function(){return e}}const _3=Math.cos,qs=Math.sin,Vt=Math.sqrt,Ws=Math.PI,kl=2*Ws,Mh=Math.PI,$h=2*Mh,Yr=1e-6,q8=$h-Yr;function k3(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function W8(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return k3;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 H8{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?k3:W8(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,o){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+o}`}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 o=this._x1,l=this._y1,c=n-t,u=a-r,d=o-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-o,v=a-l,x=c*c+u*u,m=p*p+v*v,g=Math.sqrt(x),b=Math.sqrt(h),w=i*Math.tan((Mh-Math.acos((x+h-m)/(2*g*b)))/2),C=w/b,y=w/g;Math.abs(C-1)>Yr&&this._append`L${t+C*d},${r+C*f}`,this._append`A${i},${i},0,0,${+(f*p>d*v)},${this._x1=t+y*c},${this._y1=r+y*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,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^o,h=o?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%$h+$h),h>q8?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>=Mh)},${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 Vm(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 H8(t)}function Um(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function T3(e){this._context=e}T3.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 Tl(e){return new T3(e)}function E3(e){return e[0]}function I3(e){return e[1]}function M3(e,t){var r=ke(!0),n=null,a=Tl,i=null,o=Vm(l);e=typeof e=="function"?e:e===void 0?E3:ke(e),t=typeof t=="function"?t:t===void 0?I3:ke(t);function l(c){var u,d=(c=Um(c)).length,f,h=!1,p;for(n==null&&(i=a(p=o())),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 ms(e,t,r){var n=null,a=ke(!0),i=null,o=Tl,l=null,c=Vm(u);e=typeof e=="function"?e:e===void 0?E3:ke(+e),t=typeof t=="function"?t:ke(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?I3:ke(+r);function u(f){var h,p,v,x=(f=Um(f)).length,m,g=!1,b,w=new Array(x),C=new Array(x);for(i==null&&(l=o(b=c())),h=0;h<=x;++h){if(!(h<x&&a(m=f[h],h,f))===g)if(g=!g)p=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),v=h-1;v>=p;--v)l.point(w[v],C[v]);l.lineEnd(),l.areaEnd()}g&&(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 M3().defined(a).curve(o).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?(o=f,i!=null&&(l=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=l=null:l=o(i=f),u):i},u}class $3{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 V8(e){return new $3(e,!0)}function U8(e){return new $3(e,!1)}const Km={draw(e,t){const r=Vt(t/Ws);e.moveTo(r,0),e.arc(0,0,r,0,kl)}},K8={draw(e,t){const r=Vt(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()}},R3=Vt(1/3),G8=R3*2,Z8={draw(e,t){const r=Vt(t/G8),n=r*R3;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Y8={draw(e,t){const r=Vt(t),n=-r/2;e.rect(n,n,r,r)}},X8=.8908130915292852,L3=qs(Ws/10)/qs(7*Ws/10),Q8=qs(kl/10)*L3,J8=-_3(kl/10)*L3,e9={draw(e,t){const r=Vt(t*X8),n=Q8*r,a=J8*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=kl*i/5,l=_3(o),c=qs(o);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*a,c*n+l*a)}e.closePath()}},Cu=Vt(3),t9={draw(e,t){const r=-Vt(t/(Cu*3));e.moveTo(0,r*2),e.lineTo(-Cu*r,-r),e.lineTo(Cu*r,-r),e.closePath()}},Pt=-.5,At=Vt(3)/2,Rh=1/Vt(12),r9=(Rh/2+1)*3,n9={draw(e,t){const r=Vt(t/r9),n=r/2,a=r*Rh,i=n,o=r*Rh+r,l=-i,c=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(l,c),e.lineTo(Pt*n-At*a,At*n+Pt*a),e.lineTo(Pt*i-At*o,At*i+Pt*o),e.lineTo(Pt*l-At*c,At*l+Pt*c),e.lineTo(Pt*n+At*a,Pt*a-At*n),e.lineTo(Pt*i+At*o,Pt*o-At*i),e.lineTo(Pt*l+At*c,Pt*c-At*l),e.closePath()}};function a9(e,t){let r=null,n=Vm(a);e=typeof e=="function"?e:ke(e||Km),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 Hs(){}function Vs(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 D3(e){this._context=e}D3.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:Vs(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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function i9(e){return new D3(e)}function z3(e){this._context=e}z3.prototype={areaStart:Hs,areaEnd:Hs,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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function s9(e){return new z3(e)}function B3(e){this._context=e}B3.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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function o9(e){return new B3(e)}function F3(e){this._context=e}F3.prototype={areaStart:Hs,areaEnd:Hs,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 l9(e){return new F3(e)}function Hv(e){return e<0?-1:1}function Vv(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),l=(i*a+o*n)/(n+a);return(Hv(i)+Hv(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function Uv(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Su(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,l=(i-n)/3;e._context.bezierCurveTo(n+l,a+l*t,i-l,o-l*r,i,o)}function Us(e){this._context=e}Us.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:Su(this,this._t0,Uv(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,Su(this,Uv(this,r=Vv(this,e,t)),r);break;default:Su(this,this._t0,r=Vv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function q3(e){this._context=new W3(e)}(q3.prototype=Object.create(Us.prototype)).point=function(e,t){Us.prototype.point.call(this,t,e)};function W3(e){this._context=e}W3.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 c9(e){return new Us(e)}function u9(e){return new q3(e)}function H3(e){this._context=e}H3.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=Kv(e),a=Kv(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(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 Kv(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[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 d9(e){return new H3(e)}function El(e,t){this._context=e,this._t=t}El.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 f9(e){return new El(e,.5)}function h9(e){return new El(e,0)}function p9(e){return new El(e,1)}function Yn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,l=i.length;r<o;++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 Lh(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function m9(e,t){return e[t]}function x9(e){const t=[];return t.key=e,t}function g9(){var e=ke([]),t=Lh,r=Yn,n=m9;function a(i){var o=Array.from(e.apply(this,arguments),x9),l,c=o.length,u=-1,d;for(const f of i)for(l=0,++u;l<c;++l)(o[l][u]=[0,+n(f,o[l].key,u,i)]).data=f;for(l=0,d=Um(t(o));l<c;++l)o[d[l]].index=l;return r(o,d),o}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?Lh:typeof i=="function"?i:ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??Yn,a):r},a}function v9(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}Yn(e,t)}}function y9(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,l=0;o<a;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}Yn(e,t)}}function b9(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var l=0,c=0,u=0;l<o;++l){for(var d=e[t[l]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,v=0;v<l;++v){var x=e[t[v]],m=x[n][1]||0,g=x[n-1][1]||0;p+=m-g}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,Yn(e,t)}}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)}var w9=["type","size","sizeType"];function Dh(){return Dh=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},Dh.apply(this,arguments)}function Gv(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 Zv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(r),!0).forEach(function(n){j9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function j9(e,t,r){return t=C9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C9(e){var t=S9(e,"string");return hi(t)=="symbol"?t:t+""}function S9(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 N9(e,t){if(e==null)return{};var r=O9(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 O9(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 V3={symbolCircle:Km,symbolCross:K8,symbolDiamond:Z8,symbolSquare:Y8,symbolStar:e9,symbolTriangle:t9,symbolWye:n9},P9=Math.PI/180,A9=function(t){var r="symbol".concat(_l(t));return V3[r]||Km},_9=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*P9;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}},k9=function(t,r){V3["symbol".concat(_l(t))]=r},Gm=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,l=o===void 0?"area":o,c=N9(t,w9),u=Zv(Zv({},c),{},{type:n,size:i,sizeType:l}),d=function(){var m=A9(n),g=a9().type(m).size(_9(i,l,n));return g()},f=u.className,h=u.cx,p=u.cy,v=se(u,!0);return h===+h&&p===+p&&i===+i?S.default.createElement("path",Dh({},v,{className:ae.default("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};Gm.registerSymbol=k9;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 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 Yv(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 T9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yv(Object(r),!0).forEach(function(n){pi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I9(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,K3(n.key),n)}}function M9(e,t,r){return t&&I9(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $9(e,t,r){return t=Ks(t),R9(e,U3()?Reflect.construct(t,r||[],Ks(e).constructor):t.apply(e,r))}function R9(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 L9(e)}function L9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U3=function(){return!!e})()}function Ks(e){return Ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ks(e)}function D9(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&&Bh(e,t)}function Bh(e,t){return Bh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Bh(e,t)}function pi(e,t,r){return t=K3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K3(e){var t=z9(e,"string");return Xn(t)=="symbol"?t:t+""}function z9(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 _t=32,Zm=(function(e){function t(){return E9(this,t),$9(this,t,arguments)}return D9(t,e),M9(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=_t/2,o=_t/6,l=_t/3,c=n.inactive?a:n.color;if(n.type==="plainline")return S.default.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:_t,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return S.default.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
|
|
22
22
|
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
|
|
23
23
|
H`).concat(_t,"M").concat(2*l,",").concat(i,`
|
|
24
24
|
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return S.default.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(_t/8,"h").concat(_t,"v").concat(_t*3/4,"h").concat(-_t,"z"),className:"recharts-legend-icon"});if(S.default.isValidElement(n.legendIcon)){var u=T9({},n);return delete u.legendIcon,S.default.cloneElement(n.legendIcon,u)}return S.default.createElement(Gm,{fill:c,cx:i,cy:i,size:_t,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,d={x:0,y:0,width:_t,height:_t},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,v){var x=p.formatter||c,m=ae.default(pi(pi({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",p.inactive));if(p.type==="none")return null;var g=le(p.value)?null:p.value;It(!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 S.default.createElement("li",zh({className:m,style:f,key:"legend-item-".concat(v)},vr(n.props,p,v)),S.default.createElement(Eh,{width:o,height:o,viewBox:d,style:h},n.renderIcon(p)),S.default.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},x?x(g,p,v):g))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return S.default.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(P.PureComponent);pi(Zm,"displayName","Legend");pi(Zm,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Nu,Xv;function B9(){if(Xv)return Nu;Xv=1;var e=Ol();function t(){this.__data__=new e,this.size=0}return Nu=t,Nu}var Ou,Qv;function F9(){if(Qv)return Ou;Qv=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Ou=e,Ou}var Pu,Jv;function q9(){if(Jv)return Pu;Jv=1;function e(t){return this.__data__.get(t)}return Pu=e,Pu}var Au,ey;function W9(){if(ey)return Au;ey=1;function e(t){return this.__data__.has(t)}return Au=e,Au}var _u,ty;function H9(){if(ty)return _u;ty=1;var e=Ol(),t=zm(),r=Bm(),n=200;function a(i,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<n-1)return c.push([i,o]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(i,o),this.size=l.size,this}return _u=a,_u}var ku,ry;function G3(){if(ry)return ku;ry=1;var e=Ol(),t=B9(),r=F9(),n=q9(),a=W9(),i=H9();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,ku=o,ku}var Tu,ny;function V9(){if(ny)return Tu;ny=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Tu=t,Tu}var Eu,ay;function U9(){if(ay)return Eu;ay=1;function e(t){return this.__data__.has(t)}return Eu=e,Eu}var Iu,iy;function Z3(){if(iy)return Iu;iy=1;var e=Bm(),t=V9(),r=U9();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Iu=n,Iu}var Mu,sy;function Y3(){if(sy)return Mu;sy=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 Mu=e,Mu}var $u,oy;function X3(){if(oy)return $u;oy=1;function e(t,r){return t.has(r)}return $u=e,$u}var Ru,ly;function Q3(){if(ly)return Ru;ly=1;var e=Z3(),t=Y3(),r=X3(),n=1,a=2;function i(o,l,c,u,d,f){var h=c&n,p=o.length,v=l.length;if(p!=v&&!(h&&v>p))return!1;var x=f.get(o),m=f.get(l);if(x&&m)return x==l&&m==o;var g=-1,b=!0,w=c&a?new e:void 0;for(f.set(o,l),f.set(l,o);++g<p;){var C=o[g],y=l[g];if(u)var j=h?u(y,C,g,l,o,f):u(C,y,g,o,l,f);if(j!==void 0){if(j)continue;b=!1;break}if(w){if(!t(l,function(N,A){if(!r(w,A)&&(C===N||d(C,N,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(o),f.delete(l),b}return Ru=i,Ru}var Lu,cy;function K9(){if(cy)return Lu;cy=1;var e=nr(),t=e.Uint8Array;return Lu=t,Lu}var Du,uy;function G9(){if(uy)return Du;uy=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,i){n[++r]=[i,a]}),n}return Du=e,Du}var zu,dy;function Ym(){if(dy)return zu;dy=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return zu=e,zu}var Bu,fy;function Z9(){if(fy)return Bu;fy=1;var e=es(),t=K9(),r=Dm(),n=Q3(),a=G9(),i=Ym(),o=1,l=2,c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",v="[object Set]",x="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",w=e?e.prototype:void 0,C=w?w.valueOf:void 0;function y(j,N,A,k,I,_,E){switch(A){case b:if(j.byteLength!=N.byteLength||j.byteOffset!=N.byteOffset)return!1;j=j.buffer,N=N.buffer;case g:return!(j.byteLength!=N.byteLength||!_(new t(j),new t(N)));case c:case u:case h:return r(+j,+N);case d:return j.name==N.name&&j.message==N.message;case p:case x:return j==N+"";case f:var T=a;case v:var R=k&o;if(T||(T=i),j.size!=N.size&&!R)return!1;var M=E.get(j);if(M)return M==N;k|=l,E.set(j,N);var $=n(T(j),T(N),k,I,_,E);return E.delete(j),$;case m:if(C)return C.call(j)==C.call(N)}return!1}return Bu=y,Bu}var Fu,hy;function J3(){if(hy)return Fu;hy=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 Fu=e,Fu}var qu,py;function Y9(){if(py)return qu;py=1;var e=J3(),t=yt();function r(n,a,i){var o=a(n);return t(n)?o:e(o,i(n))}return qu=r,qu}var Wu,my;function X9(){if(my)return Wu;my=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,o=[];++n<a;){var l=t[n];r(l,n,t)&&(o[i++]=l)}return o}return Wu=e,Wu}var Hu,xy;function Q9(){if(xy)return Hu;xy=1;function e(){return[]}return Hu=e,Hu}var Vu,gy;function J9(){if(gy)return Vu;gy=1;var e=X9(),t=Q9(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),e(a(o),function(l){return n.call(o,l)}))}:t;return Vu=i,Vu}var Uu,vy;function ek(){if(vy)return Uu;vy=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return Uu=e,Uu}var Ku,yy;function tk(){if(yy)return Ku;yy=1;var e=Nr(),t=Or(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return Ku=n,Ku}var Gu,by;function Xm(){if(by)return Gu;by=1;var e=tk(),t=Or(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(o){return t(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return Gu=i,Gu}var ti={exports:{}},Zu,wy;function rk(){if(wy)return Zu;wy=1;function e(){return!1}return Zu=e,Zu}ti.exports;var jy;function eS(){return jy||(jy=1,(function(e,t){var r=nr(),n=rk(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;e.exports=u})(ti,ti.exports)),ti.exports}var Yu,Cy;function Qm(){if(Cy)return Yu;Cy=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 Yu=r,Yu}var Xu,Sy;function Jm(){if(Sy)return Xu;Sy=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Xu=t,Xu}var Qu,Ny;function nk(){if(Ny)return Qu;Ny=1;var e=Nr(),t=Jm(),r=Or(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",v="[object String]",x="[object WeakMap]",m="[object ArrayBuffer]",g="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",C="[object Int8Array]",y="[object Int16Array]",j="[object Int32Array]",N="[object Uint8Array]",A="[object Uint8ClampedArray]",k="[object Uint16Array]",I="[object Uint32Array]",_={};_[b]=_[w]=_[C]=_[y]=_[j]=_[N]=_[A]=_[k]=_[I]=!0,_[n]=_[a]=_[m]=_[i]=_[g]=_[o]=_[l]=_[c]=_[u]=_[d]=_[f]=_[h]=_[p]=_[v]=_[x]=!1;function E(T){return r(T)&&t(T.length)&&!!_[e(T)]}return Qu=E,Qu}var Ju,Oy;function tS(){if(Oy)return Ju;Oy=1;function e(t){return function(r){return t(r)}}return Ju=e,Ju}var ri={exports:{}};ri.exports;var Py;function ak(){return Py||(Py=1,(function(e,t){var r=b3(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,l=(function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(ri,ri.exports)),ri.exports}var ed,Ay;function rS(){if(Ay)return ed;Ay=1;var e=nk(),t=tS(),r=ak(),n=r&&r.isTypedArray,a=n?t(n):e;return ed=a,ed}var td,_y;function ik(){if(_y)return td;_y=1;var e=ek(),t=Xm(),r=yt(),n=eS(),a=Qm(),i=rS(),o=Object.prototype,l=o.hasOwnProperty;function c(u,d){var f=r(u),h=!f&&t(u),p=!f&&!h&&n(u),v=!f&&!h&&!p&&i(u),x=f||h||p||v,m=x?e(u.length,String):[],g=m.length;for(var b in u)(d||l.call(u,b))&&!(x&&(b=="length"||p&&(b=="offset"||b=="parent")||v&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||a(b,g)))&&m.push(b);return m}return td=c,td}var rd,ky;function sk(){if(ky)return rd;ky=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return rd=t,rd}var nd,Ty;function nS(){if(Ty)return nd;Ty=1;function e(t,r){return function(n){return t(r(n))}}return nd=e,nd}var ad,Ey;function ok(){if(Ey)return ad;Ey=1;var e=nS(),t=e(Object.keys,Object);return ad=t,ad}var id,Iy;function lk(){if(Iy)return id;Iy=1;var e=sk(),t=ok(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var o=[];for(var l in Object(i))n.call(i,l)&&l!="constructor"&&o.push(l);return o}return id=a,id}var sd,My;function ts(){if(My)return sd;My=1;var e=Lm(),t=Jm();function r(n){return n!=null&&t(n.length)&&!e(n)}return sd=r,sd}var od,$y;function Il(){if($y)return od;$y=1;var e=ik(),t=lk(),r=ts();function n(a){return r(a)?e(a):t(a)}return od=n,od}var ld,Ry;function ck(){if(Ry)return ld;Ry=1;var e=Y9(),t=J9(),r=Il();function n(a){return e(a,r,t)}return ld=n,ld}var cd,Ly;function uk(){if(Ly)return cd;Ly=1;var e=ck(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,o,l,c,u,d){var f=l&t,h=e(i),p=h.length,v=e(o),x=v.length;if(p!=x&&!f)return!1;for(var m=p;m--;){var g=h[m];if(!(f?g in o:n.call(o,g)))return!1}var b=d.get(i),w=d.get(o);if(b&&w)return b==o&&w==i;var C=!0;d.set(i,o),d.set(o,i);for(var y=f;++m<p;){g=h[m];var j=i[g],N=o[g];if(c)var A=f?c(N,j,g,o,i,d):c(j,N,g,i,o,d);if(!(A===void 0?j===N||u(j,N,l,c,d):A)){C=!1;break}y||(y=g=="constructor")}if(C&&!y){var k=i.constructor,I=o.constructor;k!=I&&"constructor"in i&&"constructor"in o&&!(typeof k=="function"&&k instanceof k&&typeof I=="function"&&I instanceof I)&&(C=!1)}return d.delete(i),d.delete(o),C}return cd=a,cd}var ud,Dy;function dk(){if(Dy)return ud;Dy=1;var e=Sn(),t=nr(),r=e(t,"DataView");return ud=r,ud}var dd,zy;function fk(){if(zy)return dd;zy=1;var e=Sn(),t=nr(),r=e(t,"Promise");return dd=r,dd}var fd,By;function aS(){if(By)return fd;By=1;var e=Sn(),t=nr(),r=e(t,"Set");return fd=r,fd}var hd,Fy;function hk(){if(Fy)return hd;Fy=1;var e=Sn(),t=nr(),r=e(t,"WeakMap");return hd=r,hd}var pd,qy;function pk(){if(qy)return pd;qy=1;var e=dk(),t=zm(),r=fk(),n=aS(),a=hk(),i=Nr(),o=w3(),l="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",p=o(e),v=o(t),x=o(r),m=o(n),g=o(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?o(y):"";if(j)switch(j){case p:return h;case v:return l;case x:return u;case m:return d;case g:return f}return C}),pd=b,pd}var md,Wy;function mk(){if(Wy)return md;Wy=1;var e=G3(),t=Q3(),r=Z9(),n=uk(),a=pk(),i=yt(),o=eS(),l=rS(),c=1,u="[object Arguments]",d="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function v(x,m,g,b,w,C){var y=i(x),j=i(m),N=y?d:a(x),A=j?d:a(m);N=N==u?f:N,A=A==u?f:A;var k=N==f,I=A==f,_=N==A;if(_&&o(x)){if(!o(m))return!1;y=!0,k=!1}if(_&&!k)return C||(C=new e),y||l(x)?t(x,m,g,b,w,C):r(x,m,N,g,b,w,C);if(!(g&c)){var E=k&&p.call(x,"__wrapped__"),T=I&&p.call(m,"__wrapped__");if(E||T){var R=E?x.value():x,M=T?m.value():m;return C||(C=new e),w(R,M,g,b,C)}}return _?(C||(C=new e),n(x,m,g,b,w,C)):!1}return md=v,md}var xd,Hy;function ex(){if(Hy)return xd;Hy=1;var e=mk(),t=Or();function r(n,a,i,o,l){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,i,o,r,l)}return xd=r,xd}var gd,Vy;function xk(){if(Vy)return gd;Vy=1;var e=G3(),t=ex(),r=1,n=2;function a(i,o,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],v=i[p],x=h[1];if(f&&h[2]){if(v===void 0&&!(p in i))return!1}else{var m=new e;if(c)var g=c(v,x,p,i,o,m);if(!(g===void 0?t(x,v,r|n,c,m):g))return!1}}return!0}return gd=a,gd}var vd,Uy;function iS(){if(Uy)return vd;Uy=1;var e=zr();function t(r){return r===r&&!e(r)}return vd=t,vd}var yd,Ky;function gk(){if(Ky)return yd;Ky=1;var e=iS(),t=Il();function r(n){for(var a=t(n),i=a.length;i--;){var o=a[i],l=n[o];a[i]=[o,l,e(l)]}return a}return yd=r,yd}var bd,Gy;function sS(){if(Gy)return bd;Gy=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return bd=e,bd}var wd,Zy;function vk(){if(Zy)return wd;Zy=1;var e=xk(),t=gk(),r=sS();function n(a){var i=t(a);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(o){return o===a||e(o,a,i)}}return wd=n,wd}var jd,Yy;function yk(){if(Yy)return jd;Yy=1;function e(t,r){return t!=null&&r in Object(t)}return jd=e,jd}var Cd,Xy;function bk(){if(Xy)return Cd;Xy=1;var e=S3(),t=Xm(),r=yt(),n=Qm(),a=Jm(),i=Al();function o(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 Cd=o,Cd}var Sd,Qy;function wk(){if(Qy)return Sd;Qy=1;var e=yk(),t=bk();function r(n,a){return n!=null&&t(n,a,e)}return Sd=r,Sd}var Nd,Jy;function jk(){if(Jy)return Nd;Jy=1;var e=ex(),t=N3(),r=wk(),n=Rm(),a=iS(),i=sS(),o=Al(),l=1,c=2;function u(d,f){return n(d)&&a(f)?i(o(d),f):function(h){var p=t(h,d);return p===void 0&&p===f?r(h,d):e(f,p,l|c)}}return Nd=u,Nd}var Od,eb;function Ta(){if(eb)return Od;eb=1;function e(t){return t}return Od=e,Od}var Pd,tb;function Ck(){if(tb)return Pd;tb=1;function e(t){return function(r){return r?.[t]}}return Pd=e,Pd}var Ad,rb;function Sk(){if(rb)return Ad;rb=1;var e=qm();function t(r){return function(n){return e(n,r)}}return Ad=t,Ad}var _d,nb;function Nk(){if(nb)return _d;nb=1;var e=Ck(),t=Sk(),r=Rm(),n=Al();function a(i){return r(i)?e(n(i)):t(i)}return _d=a,_d}var kd,ab;function ar(){if(ab)return kd;ab=1;var e=vk(),t=jk(),r=Ta(),n=yt(),a=Nk();function i(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):a(o)}return kd=i,kd}var Td,ib;function oS(){if(ib)return Td;ib=1;function e(t,r,n,a){for(var i=t.length,o=n+(a?1:-1);a?o--:++o<i;)if(r(t[o],o,t))return o;return-1}return Td=e,Td}var Ed,sb;function Ok(){if(sb)return Ed;sb=1;function e(t){return t!==t}return Ed=e,Ed}var Id,ob;function Pk(){if(ob)return Id;ob=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 Id=e,Id}var Md,lb;function Ak(){if(lb)return Md;lb=1;var e=oS(),t=Ok(),r=Pk();function n(a,i,o){return i===i?r(a,i,o):e(a,t,o)}return Md=n,Md}var $d,cb;function _k(){if(cb)return $d;cb=1;var e=Ak();function t(r,n){var a=r==null?0:r.length;return!!a&&e(r,n,0)>-1}return $d=t,$d}var Rd,ub;function kk(){if(ub)return Rd;ub=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 Rd=e,Rd}var Ld,db;function Tk(){if(db)return Ld;db=1;function e(){}return Ld=e,Ld}var Dd,fb;function Ek(){if(fb)return Dd;fb=1;var e=aS(),t=Tk(),r=Ym(),n=1/0,a=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return Dd=a,Dd}var zd,hb;function Ik(){if(hb)return zd;hb=1;var e=Z3(),t=_k(),r=kk(),n=X3(),a=Ek(),i=Ym(),o=200;function l(c,u,d){var f=-1,h=t,p=c.length,v=!0,x=[],m=x;if(d)v=!1,h=r;else if(p>=o){var g=u?null:a(c);if(g)return i(g);v=!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,v&&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 zd=l,zd}var Bd,pb;function Mk(){if(pb)return Bd;pb=1;var e=ar(),t=Ik();function r(n,a){return n&&n.length?t(n,e(a,2)):[]}return Bd=r,Bd}var $k=Mk();const mb=Ne($k);function lS(e,t,r){return t===!0?mb(e,r):le(t)?mb(e,t):e}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)}var Rk=["ref"];function xb(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?xb(Object(r),!0).forEach(function(n){Ml(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gb(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,uS(n.key),n)}}function Dk(e,t,r){return t&&gb(e.prototype,t),r&&gb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function zk(e,t,r){return t=Gs(t),Bk(e,cS()?Reflect.construct(t,r||[],Gs(e).constructor):t.apply(e,r))}function Bk(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 Fk(e)}function Fk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cS=function(){return!!e})()}function Gs(e){return Gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gs(e)}function qk(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&&Fh(e,t)}function Fh(e,t){return Fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fh(e,t)}function Ml(e,t,r){return t=uS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uS(e){var t=Wk(e,"string");return Qn(t)=="symbol"?t:t+""}function Wk(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 Hk(e,t){if(e==null)return{};var r=Vk(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 Vk(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 Uk(e){return e.value}function Kk(e,t){if(S.default.isValidElement(e))return S.default.cloneElement(e,t);if(typeof e=="function")return S.default.createElement(e,t);t.ref;var r=Hk(t,Rk);return S.default.createElement(Zm,r)}var vb=1,Yt=(function(e){function t(){var r;Lk(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=zk(this,t,[].concat(a)),Ml(r,"lastBoundingBox",{width:-1,height:-1}),r}return qk(t,e),Dk(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)>vb||Math.abs(a.height-this.lastBoundingBox.height)>vb)&&(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,o=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(o==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=o==="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 v=this.getBBoxSnapshot();h={top:((d||0)-v.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,o=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,d=a.payload,f=or(or({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return S.default.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},Kk(i,or(or({},this.props),{},{payload:lS(d,u,Uk)})))}}],[{key:"getWithHeight",value:function(n,a){var i=or(or({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&Z(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])})(P.PureComponent);Ml(Yt,"displayName","Legend");Ml(Yt,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Fd,yb;function Gk(){if(yb)return Fd;yb=1;var e=es(),t=Xm(),r=yt(),n=e?e.isConcatSpreadable:void 0;function a(i){return r(i)||t(i)||!!(n&&i&&i[n])}return Fd=a,Fd}var qd,bb;function dS(){if(bb)return qd;bb=1;var e=J3(),t=Gk();function r(n,a,i,o,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,o,l):e(l,d):o||(l[l.length]=d)}return l}return qd=r,qd}var Wd,wb;function Zk(){if(wb)return Wd;wb=1;function e(t){return function(r,n,a){for(var i=-1,o=Object(r),l=a(r),c=l.length;c--;){var u=l[t?c:++i];if(n(o[u],u,o)===!1)break}return r}}return Wd=e,Wd}var Hd,jb;function Yk(){if(jb)return Hd;jb=1;var e=Zk(),t=e();return Hd=t,Hd}var Vd,Cb;function fS(){if(Cb)return Vd;Cb=1;var e=Yk(),t=Il();function r(n,a){return n&&e(n,a,t)}return Vd=r,Vd}var Ud,Sb;function Xk(){if(Sb)return Ud;Sb=1;var e=ts();function t(r,n){return function(a,i){if(a==null)return a;if(!e(a))return r(a,i);for(var o=a.length,l=n?o:-1,c=Object(a);(n?l--:++l<o)&&i(c[l],l,c)!==!1;);return a}}return Ud=t,Ud}var Kd,Nb;function tx(){if(Nb)return Kd;Nb=1;var e=fS(),t=Xk(),r=t(e);return Kd=r,Kd}var Gd,Ob;function hS(){if(Ob)return Gd;Ob=1;var e=tx(),t=ts();function r(n,a){var i=-1,o=t(n)?Array(n.length):[];return e(n,function(l,c,u){o[++i]=a(l,c,u)}),o}return Gd=r,Gd}var Zd,Pb;function Qk(){if(Pb)return Zd;Pb=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Zd=e,Zd}var Yd,Ab;function Jk(){if(Ab)return Yd;Ab=1;var e=Aa();function t(r,n){if(r!==n){var a=r!==void 0,i=r===null,o=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||!o)return 1;if(!i&&!l&&!f&&r<n||f&&a&&o&&!i&&!l||u&&a&&o||!c&&o||!d)return-1}return 0}return Yd=t,Yd}var Xd,_b;function eT(){if(_b)return Xd;_b=1;var e=Jk();function t(r,n,a){for(var i=-1,o=r.criteria,l=n.criteria,c=o.length,u=a.length;++i<c;){var d=e(o[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 Xd=t,Xd}var Qd,kb;function tT(){if(kb)return Qd;kb=1;var e=Fm(),t=qm(),r=ar(),n=hS(),a=Qk(),i=tS(),o=eT(),l=Ta(),c=yt();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 v=n(d,function(x,m,g){var b=e(f,function(w){return w(x)});return{criteria:b,index:++p,value:x}});return a(v,function(x,m){return o(x,m,h)})}return Qd=u,Qd}var Jd,Tb;function rT(){if(Tb)return Jd;Tb=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 Jd=e,Jd}var ef,Eb;function nT(){if(Eb)return ef;Eb=1;var e=rT(),t=Math.max;function r(n,a,i){return a=t(a===void 0?n.length-1:a,0),function(){for(var o=arguments,l=-1,c=t(o.length-a,0),u=Array(c);++l<c;)u[l]=o[a+l];l=-1;for(var d=Array(a+1);++l<a;)d[l]=o[l];return d[a]=i(u),e(n,this,d)}}return ef=r,ef}var tf,Ib;function aT(){if(Ib)return tf;Ib=1;function e(t){return function(){return t}}return tf=e,tf}var rf,Mb;function pS(){if(Mb)return rf;Mb=1;var e=Sn(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return rf=t,rf}var nf,$b;function iT(){if($b)return nf;$b=1;var e=aT(),t=pS(),r=Ta(),n=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return nf=n,nf}var af,Rb;function sT(){if(Rb)return af;Rb=1;var e=800,t=16,r=Date.now;function n(a){var i=0,o=0;return function(){var l=r(),c=t-(l-o);if(o=l,c>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return af=n,af}var sf,Lb;function oT(){if(Lb)return sf;Lb=1;var e=iT(),t=sT(),r=t(e);return sf=r,sf}var of,Db;function lT(){if(Db)return of;Db=1;var e=Ta(),t=nT(),r=oT();function n(a,i){return r(t(a,i,e),a+"")}return of=n,of}var lf,zb;function $l(){if(zb)return lf;zb=1;var e=Dm(),t=ts(),r=Qm(),n=zr();function a(i,o,l){if(!n(l))return!1;var c=typeof o;return(c=="number"?t(l)&&r(o,l.length):c=="string"&&o in l)?e(l[o],i):!1}return lf=a,lf}var cf,Bb;function cT(){if(Bb)return cf;Bb=1;var e=dS(),t=tT(),r=lT(),n=$l(),a=r(function(i,o){if(i==null)return[];var l=o.length;return l>1&&n(i,o[0],o[1])?o=[]:l>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(i,e(o,1),[])});return cf=a,cf}var uT=cT();const rx=Ne(uT);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 qh(){return qh=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},qh.apply(this,arguments)}function dT(e,t){return mT(e)||pT(e,t)||hT(e,t)||fT()}function fT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -84,4 +84,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84
84
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hH(e,t){if(e){if(typeof e=="string")return Zp(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 Zp(e,t)}}function pH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mH(e){if(Array.isArray(e))return Zp(e)}function Zp(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 Yp=function(t,r,n,a,i){var o=gt(t,qx),l=gt(t,Ql),c=[].concat(_j(o),_j(l)),u=gt(t,ec),d="".concat(a,"Id"),f=a[0],h=r;if(c.length&&(h=c.reduce(function(x,m){if(m.props[d]===n&&Qt(m.props,"extendDomain")&&Z(m.props[f])){var g=m.props[f];return[Math.min(x[0],g),Math.max(x[1],g)]}return x},h)),u.length){var p="".concat(f,"1"),v="".concat(f,"2");h=u.reduce(function(x,m){if(m.props[d]===n&&Qt(m.props,"extendDomain")&&Z(m.props[p])&&Z(m.props[v])){var g=m.props[p],b=m.props[v];return[Math.min(x[0],g,b),Math.max(x[1],g,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},xh={exports:{}},kj;function xH(){return kj||(kj=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),v=r?r+u:u;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],p]:c._events[v].push(p):(c._events[v]=p,c._eventsCount++),c}function o(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,v=new Array(p);h<p;h++)v[h]=f[h].fn;return v},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,v){var x=r?r+u:u;if(!this._events[x])return!1;var m=this._events[x],g=arguments.length,b,w;if(m.fn){switch(m.once&&this.removeListener(u,m.fn,void 0,!0),g){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,v),!0}for(w=1,b=new Array(g-1);w<g;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),g){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(g-1);y<g;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 o(this,p),this;var v=this._events[p];if(v.fn)v.fn===d&&(!h||v.once)&&(!f||v.context===f)&&o(this,p);else{for(var x=0,m=[],g=v.length;x<g;x++)(v[x].fn!==d||h&&!v[x].once||f&&v[x].context!==f)&&m.push(v[x]);m.length?this._events[p]=m.length===1?m[0]:m:o(this,p)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=r?r+u:u,this._events[d]&&o(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})(xh)),xh.exports}var gH=xH();const vH=Ne(gH);var gh=new vH,vh="recharts.syncMouseEvents";function Gi(e){"@babel/helpers - typeof";return Gi=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},Gi(e)}function yH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bH(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,KO(n.key),n)}}function wH(e,t,r){return t&&bH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yh(e,t,r){return t=KO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KO(e){var t=jH(e,"string");return Gi(t)=="symbol"?t:t+""}function jH(e,t){if(Gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var CH=(function(){function e(){yH(this,e),yh(this,"activeIndex",0),yh(this,"coordinateList",[]),yh(this,"layout","horizontal")}return wH(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,l=o===void 0?null:o,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,o=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=o+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])})();function SH(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 NH(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 GO(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=ge(t,r,n,a),l=ge(t,r,n,i);return{points:[o,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function OH(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=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,o=p.y}else return GO(t);return[{x:n,y:a},{x:i,y:o}]}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 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 As(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){PH(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 PH(e,t,r){return t=AH(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AH(e){var t=_H(e,"string");return Zi(t)=="symbol"?t:t+""}function _H(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 kH(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=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||!o||h!=="ScatterChart"&&a!=="axis")return null;var v,x=ln;if(h==="ScatterChart")v=o,x=nz;else if(h==="BarChart")v=NH(f,o,c,d),x=Ix;else if(f==="radial"){var m=GO(o),g=m.cx,b=m.cy,w=m.radius,C=m.startAngle,y=m.endAngle;v={cx:g,cy:b,startAngle:C,endAngle:y,innerRadius:w,outerRadius:w},x=DN}else v={points:OH(f,o,c)},x=ln;var j=As(As(As(As({stroke:"#ccc",pointerEvents:"none"},c),v),se(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 TH=["item"],EH=["children","className","width","height","style","compact","title","desc"];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 Hn(){return Hn=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},Hn.apply(this,arguments)}function Ej(e,t){return $H(e)||MH(e,t)||YO(e,t)||IH()}function IH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
85
85
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,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&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function $H(e){if(Array.isArray(e))return e}function Ij(e,t){if(e==null)return{};var r=RH(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 RH(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 LH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DH(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,XO(n.key),n)}}function zH(e,t,r){return t&&DH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BH(e,t,r){return t=Go(t),FH(e,ZO()?Reflect.construct(t,r||[],Go(e).constructor):t.apply(e,r))}function FH(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 qH(e)}function qH(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZO=function(){return!!e})()}function Go(e){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Go(e)}function WH(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&&Xp(e,t)}function Xp(e,t){return Xp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Xp(e,t)}function Sa(e){return UH(e)||VH(e)||YO(e)||HH()}function HH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
86
86
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YO(e,t){if(e){if(typeof e=="string")return Qp(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 Qp(e,t)}}function VH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UH(e){if(Array.isArray(e))return Qp(e)}function Qp(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 Mj(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?Mj(Object(r),!0).forEach(function(n){ue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mj(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ue(e,t,r){return t=XO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XO(e){var t=KH(e,"string");return Ca(t)=="symbol"?t:t+""}function KH(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(t==="string"?String:Number)(e)}var GH={xAxis:["bottom","top"],yAxis:["left","right"]},ZH={width:"100%",height:"100%"},QO={x:0,y:0};function _s(e){return e}var YH=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},XH=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 o=i.coordinate,l=a.radius;return V(V(V({},a),ge(a.cx,a.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,u=a.angle;return V(V(V({},a),ge(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return QO},tc=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(Sa(l),Sa(u)):l},[]);return o.length>0?o:t&&t.length&&Z(a)&&Z(i)?t.slice(a,i+1):[]};function JO(e){return e==="number"?[0,"auto"]:void 0}var Jp=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,l=tc(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(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?l:f;h=Bs(p,o.dataKey,a)}else h=f&&f[n]||l[n];return h?[].concat(Sa(c),[_x(u,h)]):c},[])},$j=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=YH(i,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=j$(o,l,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,h=Jp(t,r,d,f),p=XH(n,l,d,i);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},QH=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=CN(d,i);return n.reduce(function(v,x){var m,g=x.type.defaultProps!==void 0?V(V({},x.type.defaultProps),x.props):x.props,b=g.type,w=g.dataKey,C=g.allowDataOverflow,y=g.allowDuplicatedCategory,j=g.scale,N=g.ticks,A=g.includeHidden,k=g[o];if(v[k])return v;var I=tc(t.data,{graphicalItems:a.filter(function(H){var G,J=o in H.props?H.props[o]:(G=H.type.defaultProps)===null||G===void 0?void 0:G[o];return J===k}),dataStartIndex:c,dataEndIndex:u}),_=I.length,E,T,R;SH(g.domain,C,b)&&(E=lp(g.domain,null,C),p&&(b==="number"||j!=="auto")&&(R=si(I,w,"category")));var M=JO(b);if(!E||E.length===0){var $,L=($=g.domain)!==null&&$!==void 0?$:M;if(w){if(E=si(I,w,b),b==="category"&&p){var q=p8(E);y&&q?(T=E,E=Io(0,_)):y||(E=g1(L,E,x).reduce(function(H,G){return H.indexOf(G)>=0?H:[].concat(Sa(H),[G])},[]))}else if(b==="category")y?E=E.filter(function(H){return H!==""&&!de(H)}):E=g1(L,E,x).reduce(function(H,G){return H.indexOf(G)>=0||G===""||de(G)?H:[].concat(Sa(H),[G])},[]);else if(b==="number"){var U=P$(I,a.filter(function(H){var G,J,ne=o in H.props?H.props[o]:(G=H.type.defaultProps)===null||G===void 0?void 0:G[o],X="hide"in H.props?H.props.hide:(J=H.type.defaultProps)===null||J===void 0?void 0:J.hide;return ne===k&&(A||!X)}),w,i,d);U&&(E=U)}p&&(b==="number"||j!=="auto")&&(R=si(I,w,"category"))}else p?E=Io(0,_):l&&l[k]&&l[k].hasStack&&b==="number"?E=h==="expand"?[0,1]:TN(l[k].stackGroups,c,u):E=jN(I,a.filter(function(H){var G=o in H.props?H.props[o]:H.type.defaultProps[o],J="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return G===k&&(A||!J)}),b,d,!0);if(b==="number")E=Yp(f,E,k,i,N),L&&(E=lp(L,E,C));else if(b==="category"&&L){var D=L,F=E.every(function(H){return D.indexOf(H)>=0});F&&(E=D)}}return V(V({},v),{},ue({},k,V(V({},g),{},{axisType:i,domain:E,categoricalDomain:R,duplicateDomain:T,originalDomain:(m=g.domain)!==null&&m!==void 0?m:M,isCategorical:p,layout:d})))},{})},JH=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=tc(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),p=h.length,v=CN(d,i),x=-1;return n.reduce(function(m,g){var b=g.type.defaultProps!==void 0?V(V({},g.type.defaultProps),g.props):g.props,w=b[o],C=JO("number");if(!m[w]){x++;var y;return v?y=Io(0,p):l&&l[w]&&l[w].hasStack?(y=TN(l[w].stackGroups,c,u),y=Yp(f,y,w,i)):(y=lp(C,jN(h,n.filter(function(j){var N,A,k=o in j.props?j.props[o]:(N=j.type.defaultProps)===null||N===void 0?void 0:N[o],I="hide"in j.props?j.props.hide:(A=j.type.defaultProps)===null||A===void 0?void 0:A.hide;return k===w&&!I}),"number",d),a.defaultProps.allowDataOverflow),y=Yp(f,y,w,i)),V(V({},m),{},ue({},w,V(V({axisType:i},a.defaultProps),{},{hide:!0,orientation:Nt(GH,"".concat(i,".").concat(x%2),null),domain:y,originalDomain:C,isCategorical:v,layout:d})))}return m},{})},eV=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=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=QH(t,{axes:h,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(p=JH(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),p},tV=function(t){var r=Ir(t),n=fr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:rx(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:mo(r,n)}},Rj=function(t){var r=t.children,n=t.defaultShowTooltip,a=jt(r,fa),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},rV=function(t){return!t||!t.length?!1:t.some(function(r){var n=hr(r&&r.type);return n&&n.indexOf("Bar")>=0})},Lj=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"}},nV=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=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=jt(f,fa),v=jt(f,Yt),x=Object.keys(c).reduce(function(y,j){var N=c[j],A=N.orientation;return!N.mirror&&!N.hide?V(V({},y),{},ue({},A,y[A]+N.width)):y},{left:h.left||0,right:h.right||0}),m=Object.keys(o).reduce(function(y,j){var N=o[j],A=N.orientation;return!N.mirror&&!N.hide?V(V({},y),{},ue({},A,Nt(y,"".concat(A))+N.height)):y},{top:h.top||0,bottom:h.bottom||0}),g=V(V({},m),x),b=g.bottom;p&&(g.bottom+=p.props.height||fa.defaultProps.height),v&&r&&(g=N$(g,a,n,r));var w=u-g.left-g.right,C=d-g.top-g.bottom;return V(V({brushBottom:b},g),{},{width:Math.max(w,0),height:Math.max(C,0)})},aV=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},za=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(g,b){var w=b.graphicalItems,C=b.stackGroups,y=b.offset,j=b.updateId,N=b.dataStartIndex,A=b.dataEndIndex,k=g.barSize,I=g.layout,_=g.barGap,E=g.barCategoryGap,T=g.maxBarSize,R=Lj(I),M=R.numericAxisName,$=R.cateAxisName,L=rV(w),q=[];return w.forEach(function(U,D){var F=tc(g.data,{graphicalItems:[U],dataStartIndex:N,dataEndIndex:A}),H=U.type.defaultProps!==void 0?V(V({},U.type.defaultProps),U.props):U.props,G=H.dataKey,J=H.maxBarSize,ne=H["".concat(M,"Id")],X=H["".concat($,"Id")],re={},ce=c.reduce(function(Hr,sr){var rc,nc,ac=b["".concat(sr.axisType,"Map")],Yx=H["".concat(sr.axisType,"Id")];ac&&ac[Yx]||sr.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?xt(!1,"Specifying a(n) ".concat(sr.axisType,"Id requires a corresponding ").concat(sr.axisType,"Id on the targeted graphical component ").concat((rc=U==null||(nc=U.type)===null||nc===void 0?void 0:nc.displayName)!==null&&rc!==void 0?rc:"")):xt());var Xx=ac[Yx];return V(V({},Hr),{},ue(ue({},sr.axisType,Xx),"".concat(sr.axisType,"Ticks"),fr(Xx)))},re),K=ce[$],ee=ce["".concat($,"Ticks")],te=C&&C[ne]&&C[ne].hasStack&&I$(U,C[ne].stackGroups),z=hr(U.type).indexOf("Bar")>=0,pe=mo(K,ee),Y=[],Oe=L&&C$({barSize:k,stackGroups:C,totalSize:aV(ce,$)});if(z){var $e,nt,_r=de(J)?T:J,En=($e=(nt=mo(K,ee,!0))!==null&&nt!==void 0?nt:_r)!==null&&$e!==void 0?$e:0;Y=S$({barGap:_,barCategoryGap:E,bandSize:En!==pe?En:pe,sizeList:Oe[X],maxBarSize:_r}),En!==pe&&(Y=Y.map(function(Hr){return V(V({},Hr),{},{position:V(V({},Hr.position),{},{offset:Hr.position.offset-En/2})})}))}var cs=U&&U.type&&U.type.getComposedData;cs&&q.push({props:V(V({},cs(V(V({},ce),{},{displayedData:F,props:g,dataKey:G,item:U,bandSize:pe,barPosition:Y,offset:y,stackedData:te,layout:I,dataStartIndex:N,dataEndIndex:A}))),{},ue(ue(ue({key:U.key||"item-".concat(D)},M,ce[M]),$,ce[$]),"animationId",j)),childIndex:O8(U,g.children),item:U})}),q},p=function(g,b){var w=g.props,C=g.dataStartIndex,y=g.dataEndIndex,j=g.updateId;if(!Iv({props:w}))return null;var N=w.children,A=w.layout,k=w.stackOffset,I=w.data,_=w.reverseStackOrder,E=Lj(A),T=E.numericAxisName,R=E.cateAxisName,M=gt(N,n),$=E$(I,M,"".concat(T,"Id"),"".concat(R,"Id"),k,_),L=c.reduce(function(H,G){var J="".concat(G.axisType,"Map");return V(V({},H),{},ue({},J,eV(w,V(V({},G),{},{graphicalItems:M,stackGroups:G.axisType===T&&$,dataStartIndex:C,dataEndIndex:y}))))},{}),q=nV(V(V({},L),{},{props:w,graphicalItems:M}),b?.legendBBox);Object.keys(L).forEach(function(H){L[H]=d(w,L[H],q,H.replace("Map",""),r)});var U=L["".concat(R,"Map")],D=tV(U),F=h(w,V(V({},L),{},{dataStartIndex:C,dataEndIndex:y,updateId:j,graphicalItems:M,stackGroups:$,offset:q}));return V(V({formattedGraphicalItems:F,graphicalItems:M,offset:q,stackGroups:$},D),L)},v=(function(m){function g(b){var w,C,y;return LH(this,g),y=BH(this,g,[b]),ue(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(y,"accessibilityManager",new CH),ue(y,"handleLegendBBoxUpdate",function(j){if(j){var N=y.state,A=N.dataStartIndex,k=N.dataEndIndex,I=N.updateId;y.setState(V({legendBBox:j},p({props:y.props,dataStartIndex:A,dataEndIndex:k,updateId:I},V(V({},y.state),{},{legendBBox:j}))))}}),ue(y,"handleReceiveSyncEvent",function(j,N,A){if(y.props.syncId===j){if(A===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(N)}}),ue(y,"handleBrushChange",function(j){var N=j.startIndex,A=j.endIndex;if(N!==y.state.dataStartIndex||A!==y.state.dataEndIndex){var k=y.state.updateId;y.setState(function(){return V({dataStartIndex:N,dataEndIndex:A},p({props:y.props,dataStartIndex:N,dataEndIndex:A,updateId:k},y.state))}),y.triggerSyncEvent({dataStartIndex:N,dataEndIndex:A})}}),ue(y,"handleMouseEnter",function(j){var N=y.getMouseInfo(j);if(N){var A=V(V({},N),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var k=y.props.onMouseEnter;le(k)&&k(A,j)}}),ue(y,"triggeredAfterMouseMove",function(j){var N=y.getMouseInfo(j),A=N?V(V({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var k=y.props.onMouseMove;le(k)&&k(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 N={isTooltipActive:!1};y.setState(N),y.triggerSyncEvent(N);var A=y.props.onMouseLeave;le(A)&&A(N,j)}),ue(y,"handleOuterEvent",function(j){var N=N8(j),A=Nt(y.props,"".concat(N));if(N&&le(A)){var k,I;/.*touch.*/i.test(N)?I=y.getMouseInfo(j.changedTouches[0]):I=y.getMouseInfo(j),A((k=I)!==null&&k!==void 0?k:{},j)}}),ue(y,"handleClick",function(j){var N=y.getMouseInfo(j);if(N){var A=V(V({},N),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var k=y.props.onClick;le(k)&&k(A,j)}}),ue(y,"handleMouseDown",function(j){var N=y.props.onMouseDown;if(le(N)){var A=y.getMouseInfo(j);N(A,j)}}),ue(y,"handleMouseUp",function(j){var N=y.props.onMouseUp;if(le(N)){var A=y.getMouseInfo(j);N(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 N=y.props.onDoubleClick;if(le(N)){var A=y.getMouseInfo(j);N(A,j)}}),ue(y,"handleContextMenu",function(j){var N=y.props.onContextMenu;if(le(N)){var A=y.getMouseInfo(j);N(A,j)}}),ue(y,"triggerSyncEvent",function(j){y.props.syncId!==void 0&&gh.emit(vh,y.props.syncId,j,y.eventEmitterSymbol)}),ue(y,"applySyncEvent",function(j){var N=y.props,A=N.layout,k=N.syncMethod,I=y.state.updateId,_=j.dataStartIndex,E=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)y.setState(V({dataStartIndex:_,dataEndIndex:E},p({props:y.props,dataStartIndex:_,dataEndIndex:E,updateId:I},y.state)));else if(j.activeTooltipIndex!==void 0){var T=j.chartX,R=j.chartY,M=j.activeTooltipIndex,$=y.state,L=$.offset,q=$.tooltipTicks;if(!L)return;if(typeof k=="function")M=k(q,j);else if(k==="value"){M=-1;for(var U=0;U<q.length;U++)if(q[U].value===j.activeLabel){M=U;break}}var D=V(V({},L),{},{x:L.left,y:L.top}),F=Math.min(T,D.x+D.width),H=Math.min(R,D.y+D.height),G=q[M]&&q[M].value,J=Jp(y.state,y.props.data,M),ne=q[M]?{x:A==="horizontal"?q[M].coordinate:F,y:A==="horizontal"?H:q[M].coordinate}:QO;y.setState(V(V({},j),{},{activeLabel:G,activeCoordinate:ne,activePayload:J,activeTooltipIndex:M}))}else y.setState(j)}),ue(y,"renderCursor",function(j){var N,A=y.state,k=A.isTooltipActive,I=A.activeCoordinate,_=A.activePayload,E=A.offset,T=A.activeTooltipIndex,R=A.tooltipAxisBandSize,M=y.getTooltipEventType(),$=(N=j.props.active)!==null&&N!==void 0?N:k,L=y.props.layout,q=j.key||"_recharts-cursor";return S.default.createElement(kH,{key:q,activeCoordinate:I,activePayload:_,activeTooltipIndex:T,chartName:r,element:j,isActive:$,layout:L,offset:E,tooltipAxisBandSize:R,tooltipEventType:M})}),ue(y,"renderPolarAxis",function(j,N,A){var k=Nt(j,"type.axisType"),I=Nt(y.state,"".concat(k,"Map")),_=j.type.defaultProps,E=_!==void 0?V(V({},_),j.props):j.props,T=I&&I[E["".concat(k,"Id")]];return P.cloneElement(j,V(V({},T),{},{className:ae.default(k,T.className),key:j.key||"".concat(N,"-").concat(A),ticks:fr(T,!0)}))}),ue(y,"renderPolarGrid",function(j){var N=j.props,A=N.radialLines,k=N.polarAngles,I=N.polarRadius,_=y.state,E=_.radiusAxisMap,T=_.angleAxisMap,R=Ir(E),M=Ir(T),$=M.cx,L=M.cy,q=M.innerRadius,U=M.outerRadius;return P.cloneElement(j,{polarAngles:Array.isArray(k)?k:fr(M,!0).map(function(D){return D.coordinate}),polarRadius:Array.isArray(I)?I:fr(R,!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,N=y.props,A=N.children,k=N.width,I=N.height,_=y.props.margin||{},E=k-(_.left||0)-(_.right||0),T=bN({children:A,formattedGraphicalItems:j,legendWidth:E,legendContent:u});if(!T)return null;var R=T.item,M=Ij(T,TH);return P.cloneElement(R,V(V({},M),{},{chartWidth:k,chartHeight:I,margin:_,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),ue(y,"renderTooltip",function(){var j,N=y.props,A=N.children,k=N.accessibilityLayer,I=jt(A,He);if(!I)return null;var _=y.state,E=_.isTooltipActive,T=_.activeCoordinate,R=_.activePayload,M=_.activeLabel,$=_.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:M,payload:L?R:[],coordinate:T,accessibilityLayer:k})}),ue(y,"renderBrush",function(j){var N=y.props,A=N.margin,k=N.data,I=y.state,_=I.offset,E=I.dataStartIndex,T=I.dataEndIndex,R=I.updateId;return P.cloneElement(j,{key:j.key||"_recharts-brush",onChange:js(y.handleBrushChange,j.props.onChange),data:k,x:Z(j.props.x)?j.props.x:_.left,y:Z(j.props.y)?j.props.y:_.top+_.height+_.brushBottom-(A.bottom||0),width:Z(j.props.width)?j.props.width:_.width,startIndex:E,endIndex:T,updateId:"brush-".concat(R)})}),ue(y,"renderReferenceElement",function(j,N,A){if(!j)return null;var k=y,I=k.clipPathId,_=y.state,E=_.xAxisMap,T=_.yAxisMap,R=_.offset,M=j.type.defaultProps||{},$=j.props,L=$.xAxisId,q=L===void 0?M.xAxisId:L,U=$.yAxisId,D=U===void 0?M.yAxisId:U;return P.cloneElement(j,{key:j.key||"".concat(N,"-").concat(A),xAxis:E[q],yAxis:T[D],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:I})}),ue(y,"renderActivePoints",function(j){var N=j.item,A=j.activePoint,k=j.basePoint,I=j.childIndex,_=j.isRange,E=[],T=N.props.key,R=N.item.type.defaultProps!==void 0?V(V({},N.item.type.defaultProps),N.item.props):N.item.props,M=R.activeDot,$=R.dataKey,L=V(V({index:I,dataKey:$,cx:A.x,cy:A.y,r:4,fill:Ax(N.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},se(M,!1)),Fs(M));return E.push(g.renderActiveDot(M,L,"".concat(T,"-activePoint-").concat(I))),k?E.push(g.renderActiveDot(M,V(V({},L),{},{cx:k.x,cy:k.y}),"".concat(T,"-basePoint-").concat(I))):_&&E.push(null),E}),ue(y,"renderGraphicChild",function(j,N,A){var k=y.filterFormatItem(j,N,A);if(!k)return null;var I=y.getTooltipEventType(),_=y.state,E=_.isTooltipActive,T=_.tooltipAxis,R=_.activeTooltipIndex,M=_.activeLabel,$=y.props.children,L=jt($,He),q=k.props,U=q.points,D=q.isRange,F=q.baseLine,H=k.item.type.defaultProps!==void 0?V(V({},k.item.type.defaultProps),k.item.props):k.item.props,G=H.activeDot,J=H.hide,ne=H.activeBar,X=H.activeShape,re=!!(!J&&E&&L&&(G||ne||X)),ce={};I!=="axis"&&L&&L.props.trigger==="click"?ce={onClick:js(y.handleItemMouseEnter,j.props.onClick)}:I!=="axis"&&(ce={onMouseLeave:js(y.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:js(y.handleItemMouseEnter,j.props.onMouseEnter)});var K=P.cloneElement(j,V(V({},k.props),ce));function ee(sr){return typeof T.dataKey=="function"?T.dataKey(sr.payload):null}if(re)if(R>=0){var te,z;if(T.dataKey&&!T.allowDuplicatedCategory){var pe=typeof T.dataKey=="function"?ee:"payload.".concat(T.dataKey.toString());te=Bs(U,pe,M),z=D&&F&&Bs(F,pe,M)}else te=U?.[R],z=D&&F&&F[R];if(X||ne){var Y=j.props.activeIndex!==void 0?j.props.activeIndex:R;return[P.cloneElement(j,V(V(V({},k.props),ce),{},{activeIndex:Y})),null,null]}if(!de(te))return[K].concat(Sa(y.renderActivePoints({item:k,activePoint:te,basePoint:z,childIndex:R,isRange:D})))}else{var Oe,$e=(Oe=y.getItemByXY(y.state.activeCoordinate))!==null&&Oe!==void 0?Oe:{graphicalItem:K},nt=$e.graphicalItem,_r=nt.item,En=_r===void 0?j:_r,cs=nt.childIndex,Hr=V(V(V({},k.props),ce),{},{activeIndex:cs});return[P.cloneElement(En,Hr),null,null]}return D?[K,null,null]:[K,null]}),ue(y,"renderCustomized",function(j,N,A){return P.cloneElement(j,V(V({key:"recharts-customized-".concat(A)},y.props),y.state))}),ue(y,"renderMap",{CartesianGrid:{handler:_s,once:!0},ReferenceArea:{handler:y.renderReferenceElement},ReferenceLine:{handler:_s},ReferenceDot:{handler:y.renderReferenceElement},XAxis:{handler:_s},YAxis:{handler:_s},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:Nn("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=bS(y.triggeredAfterMouseMove,(C=b.throttleDelay)!==null&&C!==void 0?C:1e3/60),y.state={},y}return WH(g,m),zH(g,[{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,N=w.layout,A=jt(C,He);if(A){var k=A.props.defaultIndex;if(!(typeof k!="number"||k<0||k>this.state.tooltipTicks.length-1)){var I=this.state.tooltipTicks[k]&&this.state.tooltipTicks[k].value,_=Jp(this.state,y,k,I),E=this.state.tooltipTicks[k].coordinate,T=(this.state.offset.top+j)/2,R=N==="horizontal",M=R?{x:E,y:T}:{y:E,x:T},$=this.state.formattedGraphicalItems.find(function(q){var U=q.item;return U.type.name==="Scatter"});$&&(M=V(V({},M),$.props.points[k].tooltipPosition),_=$.props.points[k].tooltipPayload);var L={activeTooltipIndex:k,isTooltipActive:!0,activeLabel:I,activePayload:_,activeCoordinate:M};this.setState(L),this.renderCursor(A),this.accessibilityManager.setIndex(k)}}}},{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){kh([jt(w.children,He)],[jt(this.props.children,He)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var w=jt(this.props.children,He);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=pE(y),N={chartX:Math.round(w.pageX-j.left),chartY:Math.round(w.pageY-j.top)},A=y.width/C.offsetWidth||1,k=this.inRange(N.chartX,N.chartY,A);if(!k)return null;var I=this.state,_=I.xAxisMap,E=I.yAxisMap,T=this.getTooltipEventType(),R=$j(this.state,this.props.data,this.props.layout,k);if(T!=="axis"&&_&&E){var M=Ir(_).scale,$=Ir(E).scale,L=M&&M.invert?M.invert(N.chartX):null,q=$&&$.invert?$.invert(N.chartY):null;return V(V({},N),{},{xValue:L,yValue:q},R)}return R?V(V({},N),R):null}},{key:"inRange",value:function(w,C){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,N=w/y,A=C/y;if(j==="horizontal"||j==="vertical"){var k=this.state.offset,I=N>=k.left&&N<=k.left+k.width&&A>=k.top&&A<=k.top+k.height;return I?{x:N,y:A}:null}var _=this.state,E=_.angleAxisMap,T=_.radiusAxisMap;if(E&&T){var R=Ir(E);return b1({x:N,y:A},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var w=this.props.children,C=this.getTooltipEventType(),y=jt(w,He),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 N=Fs(this.props,this.handleOuterEvent);return V(V({},N),j)}},{key:"addListener",value:function(){gh.on(vh,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){gh.removeListener(vh,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(w,C,y){for(var j=this.state.formattedGraphicalItems,N=0,A=j.length;N<A;N++){var k=j[N];if(k.item===w||k.props.key===w.key||C===hr(k.item.type)&&y===k.childIndex)return k}return null}},{key:"renderClipPath",value:function(){var w=this.clipPathId,C=this.state.offset,y=C.left,j=C.top,N=C.height,A=C.width;return S.default.createElement("defs",null,S.default.createElement("clipPath",{id:w},S.default.createElement("rect",{x:y,y:j,height:N,width:A})))}},{key:"getXScales",value:function(){var w=this.state.xAxisMap;return w?Object.entries(w).reduce(function(C,y){var j=Ej(y,2),N=j[0],A=j[1];return V(V({},C),{},ue({},N,A.scale))},{}):null}},{key:"getYScales",value:function(){var w=this.state.yAxisMap;return w?Object.entries(w).reduce(function(C,y){var j=Ej(y,2),N=j[0],A=j[1];return V(V({},C),{},ue({},N,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 N=0,A=y.length;N<A;N++){var k=y[N],I=k.props,_=k.item,E=_.type.defaultProps!==void 0?V(V({},_.type.defaultProps),_.props):_.props,T=hr(_.type);if(T==="Bar"){var R=(I.data||[]).find(function(q){return DD(w,q)});if(R)return{graphicalItem:k,payload:R}}else if(T==="RadialBar"){var M=(I.data||[]).find(function(q){return b1(w,q)});if(M)return{graphicalItem:k,payload:M}}else if(Gl(k,j)||Zl(k,j)||Wi(k,j)){var $=gB({graphicalItem:k,activeTooltipItem:j,itemData:E.data}),L=E.activeIndex===void 0?$:E.activeIndex;return{graphicalItem:V(V({},k),{},{childIndex:L}),payload:Wi(k,j)?E.data[$]:k.props.data[$]}}}return null}},{key:"render",value:function(){var w=this;if(!Iv(this))return null;var C=this.props,y=C.children,j=C.className,N=C.width,A=C.height,k=C.style,I=C.compact,_=C.title,E=C.desc,T=Ij(C,EH),R=se(T,!1);if(I)return S.default.createElement(dj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.default.createElement(Eh,Hn({},R,{width:N,height:A,title:_,desc:E}),this.renderClipPath(),$v(y,this.renderMap)));if(this.props.accessibilityLayer){var M,$;R.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,R.role=($=this.props.role)!==null&&$!==void 0?$:"application",R.onKeyDown=function(q){w.accessibilityManager.keyboardEvent(q)},R.onFocus=function(){w.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return S.default.createElement(dj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},S.default.createElement("div",Hn({className:ae.default("recharts-wrapper",j),style:V({position:"relative",cursor:"default",width:N,height:A},k)},L,{ref:function(U){w.container=U}}),S.default.createElement(Eh,Hn({},R,{width:N,height:A,title:_,desc:E,style:ZH}),this.renderClipPath(),$v(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(P.Component);ue(v,"displayName",r),ue(v,"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(v,"getDerivedStateFromProps",function(m,g){var b=m.dataKey,w=m.data,C=m.children,y=m.width,j=m.height,N=m.layout,A=m.stackOffset,k=m.margin,I=g.dataStartIndex,_=g.dataEndIndex;if(g.updateId===void 0){var E=Rj(m);return V(V(V({},E),{},{updateId:0},p(V(V({props:m},E),{},{updateId:0}),g)),{},{prevDataKey:b,prevData:w,prevWidth:y,prevHeight:j,prevLayout:N,prevStackOffset:A,prevMargin:k,prevChildren:C})}if(b!==g.prevDataKey||w!==g.prevData||y!==g.prevWidth||j!==g.prevHeight||N!==g.prevLayout||A!==g.prevStackOffset||!Vn(k,g.prevMargin)){var T=Rj(m),R={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},M=V(V({},$j(g,w,N)),{},{updateId:g.updateId+1}),$=V(V(V({},T),R),M);return V(V(V({},$),p(V({props:m},$),g)),{},{prevDataKey:b,prevData:w,prevWidth:y,prevHeight:j,prevLayout:N,prevStackOffset:A,prevMargin:k,prevChildren:C})}if(!kh(C,g.prevChildren)){var L,q,U,D,F=jt(C,fa),H=F&&(L=(q=F.props)===null||q===void 0?void 0:q.startIndex)!==null&&L!==void 0?L:I,G=F&&(U=(D=F.props)===null||D===void 0?void 0:D.endIndex)!==null&&U!==void 0?U:_,J=H!==I||G!==_,ne=!de(w),X=ne&&!J?g.updateId:g.updateId+1;return V(V({updateId:X},p(V(V({props:m},g),{},{updateId:X,dataStartIndex:H,dataEndIndex:G}),g)),{},{prevChildren:C,dataStartIndex:H,dataEndIndex:G})}return null}),ue(v,"renderActiveDot",function(m,g,b){var w;return P.isValidElement(m)?w=P.cloneElement(m,g):le(m)?w=m(g):w=S.default.createElement($a,g),S.default.createElement(he,{className:"recharts-active-dot",key:b},w)});var x=P.forwardRef(function(g,b){return S.default.createElement(v,Hn({},g,{ref:b}))});return x.displayName=v.displayName,x},iV=za({chartName:"LineChart",GraphicalChild:ls,axisComponents:[{axisType:"xAxis",AxisComp:mr},{axisType:"yAxis",AxisComp:Dr}],formatAxisMap:$x}),e5=za({chartName:"BarChart",GraphicalChild:Sr,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:mr},{axisType:"yAxis",AxisComp:Dr}],formatAxisMap:$x}),Vx=za({chartName:"PieChart",GraphicalChild:Ut,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:kn},{axisType:"radiusAxis",AxisComp:Ra}],formatAxisMap:kx,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),sV=za({chartName:"RadarChart",GraphicalChild:os,axisComponents:[{axisType:"angleAxis",AxisComp:kn},{axisType:"radiusAxis",AxisComp:Ra}],formatAxisMap:kx,defaultProps:{layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),oV=za({chartName:"AreaChart",GraphicalChild:Wr,axisComponents:[{axisType:"xAxis",AxisComp:mr},{axisType:"yAxis",AxisComp:Dr}],formatAxisMap:$x}),t5=za({chartName:"RadialBarChart",GraphicalChild:La,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:kn},{axisType:"radiusAxis",AxisComp:Ra}],formatAxisMap:kx,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const Ar=P.createContext(null);function Ux(){const e=P.useContext(Ar);if(!e)throw new Error("useChart must be used within a ChartContainer");return e}const Kx=({config:e,children:t,className:r,height:n=300})=>{const a=Object.fromEntries(Object.entries(e).filter(([,i])=>i.color).map(([i,o])=>[`--color-${i}`,o.color]));return s.jsx(Ar.Provider,{value:{config:e},children:s.jsx("div",{className:Q.twMerge(O.clsx("bg-white rounded-[12px] w-full",r)),style:a,children:s.jsx(oE,{width:"100%",height:n,children:t})})})},Wt=({active:e,payload:t,label:r,labelKey:n,nameKey:a,indicator:i="dot",hideLabel:o=!1,hideIndicator:l=!1,className:c})=>{const{config:u}=Ux();if(!e||!t?.length)return null;const d=String(n?t[0]?.payload?.[n]??r??"":r??"");return s.jsxs("div",{className:Q.twMerge(O.clsx("bg-surface-bg border border-surface-3 rounded-[8px] shadow-e2 px-3 py-2 text-xs min-w-[8rem]",c)),children:[!o&&d&&s.jsx("p",{className:"text-high-em font-medium mb-1.5",children:d}),s.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 s.jsxs("div",{className:"flex items-center gap-2",children:[!l&&s.jsx("span",{className:O.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})`}}),s.jsx("span",{className:"text-low-em",children:String(x??"")}),s.jsx("span",{className:"text-med-em font-medium ml-auto pl-4",children:String(f.value??"")})]},h)})})]})},Zo=({payload:e,nameKey:t,className:r})=>{const{config:n}=Ux();return e?.length?s.jsx("div",{className:Q.twMerge(O.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 o=String(t??a.dataKey??a.value??""),c=(n[o]??n[String(a.value)]??{}).label??a.value;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"h-3 w-3 shrink-0 rounded-full",style:{backgroundColor:`var(--color-${o})`}}),s.jsx("span",{children:String(c??"")})]},i)})}):null},lt=({children:e,className:t})=>s.jsx("div",{className:Q.twMerge(O.clsx("bg-white border border-surface-3 rounded-[12px] p-8 w-full",t)),children:e}),Ba=({title:e,titleIcon:t,value:r,className:n})=>s.jsxs("div",{className:O.clsx("flex flex-col",n),children:[s.jsxs("div",{className:"flex items-center justify-between gap-10",children:[s.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&s.jsx(ie,{size:"md",color:"currentColor",children:t})]}),s.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:r})]}),lV=({className:e,...t})=>s.jsx(lt,{className:e,children:s.jsx(Ba,{...t})}),cV=({buttonLabel:e="New invoice",onButtonClick:t,className:r,titleIcon:n=s.jsx(B.Link,{}),...a})=>s.jsx(lt,{className:r,children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(Ba,{...a,titleIcon:n}),s.jsx(W,{variant:"secondary",hierarchy:"primary",size:"sm",icons:"leading",leadingIcon:s.jsx(B.Add,{}),onClick:t,children:e})]})}),uV={xs:"py-1 px-5",sm:"py-2 px-5",md:"py-3 px-6",lg:"py-4 px-6"},Gx=({items:e,size:t="xs",className:r})=>s.jsx("div",{className:O.clsx("flex flex-col rounded-lg border border-surface-3 divide-y divide-surface-3 overflow-hidden",r),children:e.map((n,a)=>s.jsx(vt,{as:"div",size:t,title:n.name,trailingText:String(n.value),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!1,showTrailingIcon:!1,showTag:!1,showTrailingText:!0,className:uV[t]},a))}),dV=[{name:"Billable",value:"17.00"},{name:"Non-billable",value:"0.00",disabled:!0}],fV=({title:e="Internal costs",amount:t=0,icon:r,items:n=dV,className:a})=>s.jsxs("div",{className:O.clsx("flex flex-col gap-4",a),children:[s.jsxs("div",{className:"flex items-center justify-between gap-10",children:[s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-medium text-med-em",children:e}),s.jsxs("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:["$",t]})]}),s.jsx(ie,{size:"md",color:"currentColor",children:r??s.jsx(B.Timer,{})})]}),s.jsx(Gx,{items:n,size:"xs"})]}),hV=({items:e,size:t="md",buttonLabel:r="New invoice",onButtonClick:n,className:a})=>s.jsxs("div",{className:O.clsx("flex flex-col gap-6",a),children:[s.jsx(Gx,{items:e,size:t}),s.jsx(W,{variant:"secondary",hierarchy:"primary",size:"md",icons:"leading",leadingIcon:s.jsx(B.Add,{}),onClick:n,children:r})]}),pV=({progressTitle:e,progress:t,progressVariant:r="none",className:n,...a})=>s.jsx(lt,{className:n,children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(Ba,{...a}),s.jsxs("div",{className:"flex flex-col gap-0",children:[e&&s.jsx("span",{className:"text-base font-medium text-med-em",children:e}),s.jsx(al,{progress:t,variant:r})]})]})}),mV=({title:e,amount:t,progress:r,circleSize:n="sm",circleShape:a="circle",circleLabel:i,className:o})=>s.jsx(lt,{className:o,children:s.jsxs("div",{className:"flex items-center justify-between gap-10",children:[s.jsxs("div",{className:"flex flex-col gap-0",children:[s.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),s.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),s.jsx(Zn,{progress:r,size:n,shape:a,label:i})]})}),xV=({title:e,amount:t,progress:r,circleSize:n="sm",circleLabel:a,className:i})=>s.jsx(lt,{className:i,children:s.jsxs("div",{className:"flex items-center justify-between gap-10",children:[s.jsxs("div",{className:"flex flex-col gap-0",children:[s.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),s.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),s.jsx(Zn,{progress:r,size:n,shape:"half-circle",label:a})]})}),gV=({progress:e,circleSize:t="sm",circleShape:r="circle",circleLabel:n,title1:a,amount1:i,title2:o,amount2:l,className:c})=>s.jsx(lt,{className:c,children:s.jsxs("div",{className:"flex flex-col gap-10",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(Zn,{progress:e,size:t,shape:r,label:n})}),s.jsx(fe,{}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium text-med-em",children:a}),s.jsx("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:i}),s.jsx(fe,{direction:"vertical",height:"40px"}),s.jsx("span",{className:"text-sm font-medium text-med-em",children:o}),s.jsx("span",{className:"text-xl font-semibold text-high-em font-space-grotesk",children:l})]})]})}),vV=({min:e=0,max:t=100,defaultValue:r=0,defaultValueEnd:n,step:a=1,variant:i="default",labels:o=[],onChange:l,className:c,disabled:u=!1})=>{const d=n!==void 0,[f,h]=P.useState(r),[p,v]=P.useState(n??t),[x,m]=P.useState(!1),[g,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 R=w.current.getBoundingClientRect(),M=Math.max(0,Math.min(100,(T-R.left)/R.width*100)),$=e+M/100*(t-e),L=Math.round($/a)*a;return Math.max(e,Math.min(t,L))},[e,t,a]),N=P.useCallback(()=>{u||m(!0)},[u]),A=P.useCallback(()=>{u||b(!0)},[u]),k=P.useCallback(T=>{if(u)return;const R=j(T.clientX);if(x){const $=Math.min(R,d?p:t);h($),l&&l(d?[$,p]:$)}else if(g&&d){const $=Math.max(R,f);v($),l&&l([f,$])}},[u,j,x,g,d,f,p,t,l]),I=P.useCallback(()=>{m(!1),b(!1)},[]);P.useEffect(()=>{if(x||g)return document.addEventListener("mousemove",k),document.addEventListener("mouseup",I),()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",I)}},[x,g,k,I]);const _=P.useCallback(T=>{if(u||T.target!==T.currentTarget)return;const R=j(T.clientX);if(!d)h(R),l&&l(R);else{const M=Math.abs(R-f),$=Math.abs(R-p);if(M<$){const L=Math.min(R,p);h(L),l&&l([L,p])}else{const L=Math.max(R,f);v(L),l&&l([f,L])}}},[u,j,d,f,p,l]),E=(T,R)=>{if(i==="percentage")return s.jsxs("div",{className:"absolute text-sm font-medium",style:{left:`${R}%`,transform:"translateX(-50%)",bottom:"100%",marginBottom:"12px",color:"var(--slider-text-color, #000000)"},children:[T,"%"]});if(i==="labelTop"&&o.length>0){const M=Math.round(T/t*(o.length-1)),$=o[M]||"";return s.jsx("div",{className:"absolute opacity-100 visible transition-opacity duration-200 pointer-events-none",style:{left:`${R}%`,transform:"translateX(-50%)",bottom:"100%",marginBottom:"24px"},children:s.jsx(jh,{arrowDirection:"down",children:$})})}if(i==="labelBottom"&&o.length>0){const M=Math.round(T/t*(o.length-1)),$=o[M]||"";return s.jsx("div",{className:"absolute opacity-100 visible transition-opacity duration-200 pointer-events-none",style:{left:`${R}%`,transform:"translateX(-50%)",top:"100%",marginTop:"24px"},children:s.jsx(jh,{arrowDirection:"up",children:$})})}return null};return s.jsx("div",{className:O.clsx("relative select-none py-10 w-60",u&&"opacity-50 cursor-not-allowed",c),children:s.jsxs("div",{className:"relative",style:{height:"8px"},children:[s.jsx("div",{ref:w,className:"absolute w-full rounded-full cursor-pointer",style:{height:"8px",backgroundColor:"var(--slider-track-bg, #D8DDE5)"},onClick:_}),s.jsx("div",{className:"absolute rounded-full pointer-events-none",style:{height:"8px",backgroundColor:"var(--slider-track-active, #000000)",left:`${C}%`,right:`${100-y}%`}}),s.jsx("div",{className:O.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:N,children:s.jsx(wh,{})}),d&&s.jsx("div",{className:O.clsx("absolute cursor-grab active:cursor-grabbing",u&&"cursor-not-allowed"),style:{left:`${y}%`,top:"50%",transform:"translate(-50%, -50%)",zIndex:g?30:20},onMouseDown:A,children:s.jsx(wh,{})}),i!=="default"&&E(f,C),d&&i!=="default"&&E(p,y)]})})},yV=({min:e=0,max:t=100,sliderValue:r=0,sliderValueEnd:n,step:a=1,labels:i,onSliderChange:o,className:l,...c})=>s.jsx(lt,{className:l,children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(Ba,{...c}),s.jsx(vV,{min:e,max:t,defaultValue:r,defaultValueEnd:n,step:a,variant:"labelBottom",labels:i,onChange:o})]})}),bV=({items:e,size:t="md",className:r})=>s.jsx("div",{className:O.clsx("flex flex-col rounded-lg border border-surface-3 divide-y divide-surface-3 overflow-hidden",r),children:e.map((n,a)=>s.jsx(vt,{as:"div",size:t,title:n.title,description:n.description,leadingIcon:n.leadingIcon??s.jsx(B.I3Dcube,{}),trailingIcon:n.trailingIcon??s.jsx(B.Record,{}),showCheckbox:!1,showLeadingImage:!1,showLeadingIcon:!0,showDescription:!0,showTrailingIcon:!0,showTag:!1,showTrailingText:!1,disabled:n.disabled},a))}),em=["var(--brand-secondary-main)","var(--success-main)","var(--warning-main)","var(--danger-main)","var(--info-main)"];function Zx(e,t){return e??em[t%em.length]}function Tn(e){return Object.fromEntries(e.map((t,r)=>[t.name,{label:t.label??t.name,color:Zx(t.color,r)}]))}function Fa(e){return Object.fromEntries(e.map((t,r)=>[`--color-${t.name}`,Zx(t.color,r)]))}const wV=({title:e,amount:t,data:r,donutSize:n=120,className:a})=>{const i=Tn(r),o=Fa(r),l=n/2,c=l-2,u=l*.55;return s.jsx(lt,{className:a,children:s.jsxs("div",{className:"flex items-center justify-between gap-6",children:[s.jsxs("div",{className:"flex flex-col gap-0",children:[s.jsx("span",{className:"text-xl font-medium text-med-em",children:e}),s.jsx("span",{className:"text-2xl font-semibold text-high-em font-space-grotesk",children:t})]}),s.jsx(Ar.Provider,{value:{config:i},children:s.jsx("div",{className:"shrink-0",style:{...o,width:n,height:n},children:s.jsxs(Vx,{width:n,height:n,children:[s.jsx(He,{content:s.jsx(Wt,{hideLabel:!0})}),s.jsx(Ut,{data:r,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:u,outerRadius:c,stroke:"none",children:r.map(d=>s.jsx(On,{fill:`var(--color-${d.name})`},d.name))})]})})})]})})},jV=({title:e,titleIcon:t,data:r,donutSize:n=160,className:a})=>{const i=Tn(r),o=Fa(r),l=n/2,c=l-2,u=l*.5;return s.jsx(lt,{className:a,children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-10",children:[s.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&s.jsx(ie,{size:"md",color:"currentColor",children:t})]}),s.jsx(fe,{}),s.jsx(Ar.Provider,{value:{config:i},children:s.jsxs("div",{className:"flex items-center gap-4",style:o,children:[s.jsx("div",{className:"flex flex-col flex-1 min-w-0 divide-y divide-surface-3 pr-8",children:r.map(d=>s.jsxs("div",{className:"flex items-center gap-2 py-3",children:[s.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:s.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${d.name})`})}),s.jsx("span",{className:"text-xs text-low-em truncate",children:d.label??d.name})]},d.name))}),s.jsx("div",{className:"shrink-0 pl-5",style:{width:n+20,height:n},children:s.jsxs(Vx,{width:n,height:n,children:[s.jsx(He,{content:s.jsx(Wt,{hideLabel:!0})}),s.jsx(Ut,{data:r,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:u,outerRadius:c,stroke:"none",children:r.map(d=>s.jsx(On,{fill:`var(--color-${d.name})`},d.name))})]})})]})})]})})},CV=({data:e,donutSize:t=160,className:r})=>{const n=Tn(e),a=Fa(e),i=t/2,o=i-2,l=i*.5;return s.jsx(lt,{className:r,children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(Ar.Provider,{value:{config:n},children:s.jsx("div",{className:"flex justify-center",style:a,children:s.jsxs(Vx,{width:t,height:t,children:[s.jsx(He,{content:s.jsx(Wt,{hideLabel:!0})}),s.jsx(Ut,{data:e,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:l,outerRadius:o,stroke:"none",children:e.map(c=>s.jsx(On,{fill:`var(--color-${c.name})`},c.name))})]})})}),s.jsx(fe,{}),s.jsx("div",{className:"flex items-center",style:a,children:e.map((c,u)=>s.jsxs(S.default.Fragment,{children:[u>0&&s.jsx(fe,{direction:"vertical",height:"32px"}),s.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[s.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:s.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.name})`})}),s.jsx("span",{className:"text-xs text-low-em",children:c.label??c.name})]})]},c.name))})]})})},SV=({title:e,titleIcon:t,data:r,centerTitle:n,centerSubtitle:a,chartSize:i=160,className:o})=>{const l=Tn(r),c=Fa(r),u=r.map(d=>({...d,fill:`var(--color-${d.name})`}));return s.jsx(lt,{className:o,children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-10",children:[s.jsx("span",{className:"text-lg font-medium text-med-em leading-snug",children:e}),t&&s.jsx(ie,{size:"md",color:"currentColor",children:t})]}),s.jsx(fe,{}),s.jsx(Ar.Provider,{value:{config:l},children:s.jsxs("div",{className:"flex items-center gap-4",style:c,children:[s.jsx("div",{className:"flex flex-col flex-1 min-w-0 divide-y divide-surface-3 pr-8",children:r.map(d=>s.jsxs("div",{className:"flex items-center gap-2 py-3",children:[s.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:s.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${d.name})`})}),s.jsx("span",{className:"text-xs text-low-em truncate",children:d.label??d.name})]},d.name))}),s.jsx("div",{className:"shrink-0 pl-5",style:{width:i+20,height:i},children:s.jsxs(t5,{width:i,height:i,data:u,innerRadius:i*.3,outerRadius:i*.52,barSize:6,barGap:4,startAngle:90,endAngle:-270,children:[(a||n)&&s.jsx(Tx,{component:({width:d,height:f})=>{const h=d/2,p=f/2;return s.jsxs("text",{textAnchor:"middle",children:[a&&s.jsx("tspan",{x:h,y:p-8,fill:"var(--low-em)",fontSize:"12",children:a}),n&&s.jsx("tspan",{x:h,y:p+16,fill:"var(--high-em)",fontSize:"24",fontWeight:"600",fontFamily:"'Space Grotesk', sans-serif",children:n})]})}}),s.jsx(La,{dataKey:"value",background:{fill:"var(--surface-2)"},cornerRadius:4}),s.jsx(He,{content:s.jsx(Wt,{hideLabel:!0})})]})})]})})]})})},NV=({data:e,centerTitle:t,centerSubtitle:r,chartSize:n=160,className:a})=>{const i=Tn(e),o=Fa(e),l=e.map(c=>({...c,fill:`var(--color-${c.name})`}));return s.jsx(lt,{className:a,children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(Ar.Provider,{value:{config:i},children:s.jsx("div",{className:"flex justify-center",style:o,children:s.jsxs(t5,{width:n,height:n,data:l,innerRadius:n*.3,outerRadius:n*.52,barSize:6,barGap:4,startAngle:90,endAngle:-270,children:[(r||t)&&s.jsx(Tx,{component:({width:c,height:u})=>{const d=c/2,f=u/2;return s.jsxs("text",{textAnchor:"middle",children:[r&&s.jsx("tspan",{x:d,y:f-8,fill:"var(--low-em)",fontSize:"12",children:r}),t&&s.jsx("tspan",{x:d,y:f+16,fill:"var(--high-em)",fontSize:"24",fontWeight:"600",fontFamily:"'Space Grotesk', sans-serif",children:t})]})}}),s.jsx(La,{dataKey:"value",background:{fill:"var(--surface-2)"},cornerRadius:4}),s.jsx(He,{content:s.jsx(Wt,{hideLabel:!0})})]})})}),s.jsx(fe,{}),s.jsx("div",{className:"flex items-center",style:o,children:e.map((c,u)=>s.jsxs(S.default.Fragment,{children:[u>0&&s.jsx(fe,{direction:"vertical",height:"32px"}),s.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[s.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:s.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.name})`})}),s.jsx("span",{className:"text-xs text-low-em",children:c.label??c.name})]})]},c.name))})]})})},OV=({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})),o=Tn(i),l=Fa(i);return s.jsx(lt,{className:a,children:s.jsx("div",{className:"flex flex-col gap-6",children:s.jsxs(Ar.Provider,{value:{config:o},children:[s.jsx("div",{className:"flex justify-center",style:l,children:s.jsxs(sV,{width:r,height:r,data:e,children:[s.jsx(ZN,{stroke:"var(--surface-2)"}),s.jsx(kn,{dataKey:"axis",tick:{fill:"var(--low-em)",fontSize:11}}),s.jsx(He,{content:s.jsx(Wt,{indicator:"dot"})}),t.map(c=>s.jsx(os,{dataKey:c.key,stroke:`var(--color-${c.key})`,fill:`var(--color-${c.key})`,fillOpacity:n,strokeWidth:2},c.key))]})}),s.jsx(fe,{}),s.jsx("div",{className:"flex items-center",style:l,children:t.map((c,u)=>s.jsxs(S.default.Fragment,{children:[u>0&&s.jsx(fe,{direction:"vertical",height:"32px"}),s.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2",children:[s.jsx("svg",{className:"h-2.5 w-2.5 shrink-0",viewBox:"0 0 10 10","aria-hidden":!0,children:s.jsx("circle",{cx:"5",cy:"5",r:"5",fill:`var(--color-${c.key})`})}),s.jsx("span",{className:"text-xs text-low-em",children:c.label})]})]},c.key))})]})})})},Dj=4,tm=6,PV=(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`},bh=(e,t=tm)=>r=>{const{x:n,y:a,width:i,height:o,fill:l}=r;return!i||!o||o<=0?null:s.jsx("path",{d:PV(n,a,i,o+e,t),fill:l})},AV=({data:e,series:t,height:r=220,barSize:n=20,stacked:a=!0,showGrid:i=!0,showYAxis:o=!0,className:l})=>{const c=t.map(d=>({name:d.key,label:d.label,color:d.color})),u=Tn(c);return s.jsx(lt,{className:l,children:s.jsx(Kx,{config:u,height:r,className:"rounded-none bg-transparent",children:s.jsxs(e5,{data:e,accessibilityLayer:!0,children:[i&&s.jsx(ui,{vertical:!1,stroke:"var(--surface-2)"}),s.jsx(mr,{dataKey:"label",tickLine:!1,axisLine:!1,tickMargin:16,tick:{fill:"var(--low-em)",fontSize:12}}),o&&s.jsx(Dr,{tickLine:!1,axisLine:!1,tickMargin:16,tick:{fill:"var(--low-em)",fontSize:12}}),s.jsx(He,{content:s.jsx(Wt,{}),cursor:{fill:"var(--surface-2)"}}),s.jsx(Yt,{content:s.jsx(Zo,{}),verticalAlign:"top"}),t.map((d,f)=>{if(a){const h=f===0,v=f===t.length-1?bh(0):h?bh(Dj):bh(Dj,0);return s.jsx(Sr,{dataKey:d.key,stackId:"stack",fill:`var(--color-${d.key})`,shape:v,barSize:n},d.key)}return s.jsx(Sr,{dataKey:d.key,fill:`var(--color-${d.key})`,barSize:n,radius:[tm,tm,0,0]},d.key)})]})})})},_V=({data:e,chartType:t="bar",color:r,seriesLabel:n,chartHeight:a=80,showGrid:i=!0,showXAxis:o=!0,showYAxis:l=!0,className:c,...u})=>{const f=`kpiAreaGradient-${S.default.useId()}`,h=Zx(r,0),p={value:{label:n,color:h}},v=u.title!==void 0||u.value!==void 0;return s.jsx(lt,{className:c,children:s.jsxs("div",{className:"flex flex-col gap-4",children:[v&&s.jsx(Ba,{title:u.title??"",value:u.value??"",titleIcon:u.titleIcon}),s.jsx(Kx,{config:p,height:a,className:"rounded-none bg-transparent",children:t==="bar"?s.jsxs(e5,{data:e,accessibilityLayer:!0,children:[i&&s.jsx(ui,{vertical:!1,stroke:"var(--surface-2)"}),o&&s.jsx(mr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),s.jsx(He,{content:s.jsx(Wt,{}),cursor:{fill:"var(--surface-2)"}}),s.jsx(Sr,{dataKey:"value",fill:"var(--color-value)",radius:[4,4,0,0],barSize:24})]}):t==="area"?s.jsxs(oV,{data:e,accessibilityLayer:!0,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:f,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",stopColor:"var(--color-value)",stopOpacity:.2}),s.jsx("stop",{offset:"95%",stopColor:"var(--color-value)",stopOpacity:0})]})}),i&&s.jsx(ui,{vertical:!1,stroke:"var(--surface-2)"}),o&&s.jsx(mr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),l&&s.jsx(Dr,{tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8,width:40}),s.jsx(He,{content:s.jsx(Wt,{})}),s.jsx(Yt,{content:s.jsx(Zo,{}),verticalAlign:"top"}),s.jsx(Wr,{dataKey:"value",stroke:"var(--color-value)",fill:`url(#${f})`,strokeWidth:2,dot:!1})]}):s.jsxs(iV,{data:e,accessibilityLayer:!0,children:[i&&s.jsx(ui,{vertical:!1,stroke:"var(--surface-2)"}),o&&s.jsx(mr,{dataKey:"label",tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8}),l&&s.jsx(Dr,{tickLine:!1,axisLine:!1,tick:{fill:"var(--low-em)",fontSize:10},tickMargin:8,width:40}),s.jsx(He,{content:s.jsx(Wt,{})}),s.jsx(Yt,{content:s.jsx(Zo,{}),verticalAlign:"top"}),s.jsx(ls,{dataKey:"value",stroke:"var(--color-value)",strokeWidth:2,dot:!1})]})})]})})},kV={danger:"bg-danger-main",warning:"bg-warning-main",info:"bg-info-main",success:"bg-success-main"},TV={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"}},r5=P.forwardRef(({alertTitle:e,descriptionHighlight:t,description:r,variant:n="danger",size:a="md",icon:i,iconSize:o,iconBoxSize:l,titleSize:c,subtitleSize:u,actionLabel:d="Abrir detalles",onAction:f,buttonVariant:h="brand",buttonHierarchy:p="primary",buttonSize:v="md",className:x,...m},g)=>{const b=TV[a],w=o??b.iconSize,C=l??b.iconBox,y=c??b.title,j=u??b.subtitle;return s.jsx("div",{ref:g,className:Q.twMerge("bg-white w-full flex flex-col overflow-hidden",x),...m,children:s.jsxs("div",{className:"flex flex-col items-center text-center gap-12 p-10",children:[s.jsx("span",{className:O.clsx(C,"rounded-2xl flex items-center justify-center shrink-0",kV[n]),children:i??s.jsx(B.Warning2,{size:w,color:"white",variant:"Bold"})}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("p",{className:O.clsx(y,"font-semibold text-high-em"),children:e}),(t||r)&&s.jsxs("p",{className:O.clsx(j,"text-med-em"),children:[t&&s.jsx("strong",{children:t}),t&&r&&" ",r]})]}),d&&s.jsx(W,{variant:h,hierarchy:p,size:v,className:"w-full",onClick:f,children:d})]})})});r5.displayName="AlertCallout";exports.AICommentaryIcon=c2;exports.AIMessage=m2;exports.ActivityFeed=PC;exports.AddIcon=k5;exports.AlertCallout=r5;exports.AlertDialog=N2;exports.AlertDialogAction=E2;exports.AlertDialogCancel=I2;exports.AlertDialogContent=P2;exports.AlertDialogDescription=k2;exports.AlertDialogFooter=T2;exports.AlertDialogHeader=A2;exports.AlertDialogTitle=_2;exports.AlertDialogTrigger=O2;exports.AppointmentDetail=zs;exports.AppointmentRow=Ds;exports.ArrowNarrowDownIcon=u2;exports.AttachmentMessage=F2;exports.AuthActionWidget=yA;exports.AuthEmailVerificationWidget=jA;exports.AuthFormWidget=xA;exports.AuthSocialOptionsWidget=bA;exports.Avatar=Ft;exports.AvatarGroup=om;exports.BREAKPOINTS=Xi;exports.Badge=Ye;exports.BookOutlined=T5;exports.Box2Icon=N5;exports.BoxIcon=O5;exports.Breadcrumb=K5;exports.BreadcrumbEllipsis=J5;exports.BreadcrumbItem=Z5;exports.BreadcrumbLink=Y5;exports.BreadcrumbList=G5;exports.BreadcrumbPage=X5;exports.BreadcrumbSeparator=Q5;exports.Button=W;exports.ButtonDropdown=e6;exports.ButtonGroup=xr;exports.CHART_PALETTE=em;exports.CONTAINER=Kj;exports.CONTAINER_PADDING=Gj;exports.CSS_VARIABLES=Qj;exports.CalendarIcon=B5;exports.CalendarIcon2=j2;exports.Card=a6;exports.CardAction=Pm;exports.ChartContainer=Kx;exports.ChartContext=Ar;exports.ChartLegendContent=Zo;exports.ChartTooltipContent=Wt;exports.ChatCollapsibleCheck=M2;exports.ChatCollapsibleContainer=nl;exports.ChatCollapsibleDialog=$2;exports.ChatCommandList=h6;exports.ChatCommandListItem=Ch;exports.ChatHeader=R2;exports.ChatHistorial=z2;exports.ChatHistorialItem=D2;exports.ChatIcon=l2;exports.ChatInputText=B2;exports.ChatLayout=z6;exports.ChatMessage=fi;exports.ChatMessageOptions=Sh;exports.ChatPanel=q2;exports.ChatTypingIndicator=lm;exports.Checkbox=Jt;exports.CheckboxGroup=B6;exports.ChevronDownIcon=im;exports.ChevronUpIcon=sm;exports.Chip=H6;exports.CircleIcon=A5;exports.ColorPalette=K6;exports.ColumnHandler=G6;exports.ColumnHeader=cm;exports.ComboBox=J6;exports.ConditionalBuilder=v_;exports.ContainerWithCompounds=Yi;exports.ContextualMenu=eP;exports.CopyIcon=el;exports.DataArrowsOutlined=$5;exports.DatePickerInput=u3;exports.DateRangePicker=Om;exports.DeleteConfirmationModal=pC;exports.Divider=fe;exports.DragAndDropListItem=um;exports.DraggableListRow=s3;exports.Drawer=YP;exports.DropIconPicker=tC;exports.DropIconPickerContent=nC;exports.DropIconPickerTrigger=rC;exports.DropLayoutPicker=Am;exports.DropLayoutPickerContent=km;exports.DropLayoutPickerTrigger=_m;exports.DropMenu=Ht;exports.DropModal=un;exports.DropModalBody=hn;exports.DropModalClose=lC;exports.DropModalContent=dn;exports.DropModalFooter=gm;exports.DropModalFooterActions=pn;exports.DropModalHeader=fn;exports.DropModalTitle=xm;exports.DropModalTrigger=ul;exports.DropPlaceholder=Gn;exports.DropSizePicker=Tm;exports.DropSizePickerContent=Im;exports.DropSizePickerTrigger=Em;exports.DropZone=W2;exports.Dropdown=Te;exports.DropdownMenu=nP;exports.Edit2Icon=C2;exports.EmptyState=ht;exports.ErrorBoundary=iP;exports.ErrorState=H2;exports.ExpressionCard=p3;exports.ExpressionPanel=y_;exports.ExpressionPanelDivider=m3;exports.EyeIcon=x2;exports.EyeOffIcon=g2;exports.FilterConditionRow=d3;exports.FilterFunnel02Icon=d2;exports.FlashIcon=w2;exports.FloatingBar=sP;exports.Footer=ol;exports.FormFieldGroup=Ji;exports.GridDraggableItem=V2;exports.Header=sl;exports.HeaderTabs=DC;exports.Icon=ie;exports.IconByName=pm;exports.IconPicker=cl;exports.ImageUploader=hP;exports.InfoIcon=rm;exports.InfoLabel=mP;exports.InputField=me;exports.InputSearch=ll;exports.InvoiceCard=PA;exports.KPIAutomationTrigger=hV;exports.KPIBarChart=AV;exports.KPICard=lt;exports.KPIChart=_V;exports.KPIDetailedMetric=fV;exports.KPIDonutChart=wV;exports.KPIPieChart=jV;exports.KPIPieMetrics=CV;exports.KPIProgressBar=pV;exports.KPIProgressCircle=mV;exports.KPIProgressHalfCircle=xV;exports.KPIProgressMetrics=gV;exports.KPIQuickActionList=bV;exports.KPIRadarMetrics=OV;exports.KPIRadialChart=SV;exports.KPIRadialMetrics=NV;exports.KPISingleValue=lV;exports.KPISingleValueAction=cV;exports.KPISingleValueContent=Ba;exports.KPISlider=yV;exports.KPIValueBreakdown=Gx;exports.Kanban=y3;exports.KanbanCard=Cl;exports.KanbanColumn=$m;exports.Kbd=ei;exports.LAYOUT=d5;exports.LAYOUT_SPACING=Xj;exports.LabelIcon=ft;exports.LabelWithIcon=WP;exports.LabelWithTooltip=dC;exports.LayerIcon=b2;exports.LeftArrowIcon=h2;exports.Legend=Yt;exports.Link=gr;exports.LinkGroup=VP;exports.ListItem=vt;exports.LogicOperatorConnector=c3;exports.MaximizeIcon=Jo;exports.MenuBuilder=$P;exports.MenuItemsPanel=FP;exports.MessageProgrammingOutlined=E5;exports.Modal=dl;exports.ModalBody=xl;exports.ModalClose=wm;exports.ModalContent=hl;exports.ModalDescription=bm;exports.ModalFooter=gl;exports.ModalFooterActions=hC;exports.ModalHeader=pl;exports.ModalTitle=ml;exports.ModalTrigger=fl;exports.ModuleCard=n3;exports.ModuleCardHeader=Mm;exports.ModuleFieldItem=a3;exports.ModuleSummaryCard=UC;exports.MoreIcon=y2;exports.NAVBAR=Yj;exports.NavSidebar=qP;exports.OptionsEditor=uC;exports.PANEL_DEFAULTS=Re;exports.PageLayout=o2;exports.Panel=a2;exports.PanelHeader=Nm;exports.PanelLayout=r2;exports.PanelMain=i2;exports.PasswordResetWidget=vA;exports.PlanPricingCard=CC;exports.Planner=x3;exports.PlusCircleIcon=q5;exports.ProductIcon=vl;exports.ProgrammingArrowsOutlined=M5;exports.Progress=al;exports.ProgressBar=Nh;exports.ProgressCircle=Zn;exports.ProgressTracker=QP;exports.ProjectActionCard=Y4;exports.ProjectCard=SC;exports.ProjectCardPlan=K4;exports.ProjectOverviewCard=VC;exports.QuestionCircle=nm;exports.QuickActions=JP;exports.Radio=t4;exports.RecoveryWidget=gA;exports.RelatedDataCard=i3;exports.RightArrowIcon=am;exports.SIDEBAR=Zj;exports.Section=Qo;exports.SectionFeatures=Uj;exports.SectionHero=Vj;exports.SelectableCard=NC;exports.SettingsCard=X4;exports.ShareIcon=L5;exports.Sidebar=AP;exports.SizePicker=r3;exports.SkalarLogo=Ms;exports.SkalarLogoNoText=$s;exports.SlashIcon=V5;exports.SliderPointerDown=z5;exports.SliderPointerUp=D5;exports.SliderThumbIcon=wh;exports.SplitPanelLayout=s2;exports.Stepper=OC;exports.StraightInfoIcon=Qr;exports.SupportCard=Z4;exports.Switcher=yl;exports.TabbedContainer=k4;exports.Table=l4;exports.TableBody=d4;exports.TableCard=Q4;exports.TableCell=Oh;exports.TableColumnFilter=g4;exports.TableColumnHeader=kC;exports.TableColumnVisibility=v4;exports.TableEmptyState=TC;exports.TableHeader=u4;exports.TableHeading=x4;exports.TablePagination=m4;exports.TableProvider=_C;exports.TableRoot=c4;exports.TableRow=Rs;exports.Tabs=Cm;exports.Tag=Lr;exports.TextArea=bl;exports.ThemeToggle=I4;exports.ToastComponent=WC;exports.ToastProvider=L4;exports.Toggle=Pa;exports.ToggleGroup=z4;exports.Tooltip=Oa;exports.Tooltip$1=He;exports.TrashIcon=tl;exports.TypesPanel=Sm;exports.TypesPanelBodyGrid=B4;exports.TypesPanelBodyList=F4;exports.TypesPanelHeader=H4;exports.TypesPanelHeaderSearch=V4;exports.UnionIcon=v2;exports.UploadImageIcon=f2;exports.UserMenu=U4;exports.VideoPlayOutlined=I5;exports.VisualComposer=uA;exports.WidgetBuilderEdit=n_;exports.WidgetBuilderItemHoverAction=wl;exports.WidgetContainer=Cn;exports.WidgetPreview=t_;exports.WidgetSidebar=NA;exports.WidgetSummaryCard=KC;exports.WorkspaceSettings=G4;exports.XMark=it;exports.XMarkAlert=p2;exports.addSelectionColumn=P4;exports.calculateDraggedPanelPercentage=e2;exports.calculateHeaderWidths=cP;exports.calculatePanelPercentage=Es;exports.createMediaQuery=p5;exports.findPanelById=Kt;exports.getCentralWidth=y5;exports.getCurrentBreakpoint=x5;exports.getDefaultExportFromCjs=Ne;exports.getGapClass=tr;exports.getTotalPanelsWidth=t2;exports.getTotalSideWidth=Is;exports.initializePanelsState=ks;exports.matchesBreakpoint=m5;exports.parseColumnConfig=IC;exports.parseTableConfig=O4;exports.productsApiResponse=_4;exports.productsTableConfig=RC;exports.productsTableData=LC;exports.pxToCss=h5;exports.pxToRem=f5;exports.useChart=Ux;exports.useContainerHeight=b6;exports.useContainerWidth=il;exports.usePanelState=w5;exports.useSidebar=bn;exports.useTableContext=rr;exports.useToast=R4;exports.usersApiResponse=A4;exports.usersTableConfig=MC;exports.usersTableData=$C;exports.visualComposerCollision=dA;
|
|
87
|
-
//# sourceMappingURL=index-
|
|
87
|
+
//# sourceMappingURL=index-DheDAuUg.cjs.map
|