cortex-react-components 2.16.1 → 2.16.2

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.
Files changed (87) hide show
  1. package/dist/{chunk-XQ3XV5DH.mjs → chunk-2HWSTGAP.mjs} +1 -1
  2. package/dist/{chunk-DDQWJGAN.mjs → chunk-3LRDESQ6.mjs} +1 -1
  3. package/dist/{chunk-PHQMSVOB.mjs → chunk-4AC6KKXQ.mjs} +1 -1
  4. package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
  5. package/dist/{chunk-O54IXEY5.mjs → chunk-6MSM3CZ6.mjs} +1 -1
  6. package/dist/{chunk-VDFRWGXR.mjs → chunk-6PS55VJZ.mjs} +1 -1
  7. package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  8. package/dist/{chunk-CJDUN6R4.mjs → chunk-DKRRVTCV.mjs} +1 -1
  9. package/dist/{chunk-6VRPQKAK.mjs → chunk-DMCFEJ2C.mjs} +1 -1
  10. package/dist/{chunk-R5SXUWYU.mjs → chunk-ISQS7QYK.mjs} +1 -1
  11. package/dist/{chunk-LLP4EFT4.mjs → chunk-L5NPH5RX.mjs} +1 -1
  12. package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
  13. package/dist/{chunk-4ZWGVKVT.mjs → chunk-NIIQPCQO.mjs} +1 -1
  14. package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
  15. package/dist/{chunk-ZEALRBXW.mjs → chunk-RK3L6MAM.mjs} +1 -1
  16. package/dist/{chunk-HSQAHQNP.mjs → chunk-TKCFCYEQ.mjs} +1 -1
  17. package/dist/chunk-U6E6BMAF.mjs +1 -0
  18. package/dist/{chunk-LQX37M4T.mjs → chunk-UPDEVKI7.mjs} +1 -1
  19. package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  20. package/dist/{chunk-UEBQJNVT.mjs → chunk-ZGQC6O62.mjs} +1 -1
  21. package/dist/components/Chat/ChatInterface.js +6 -6
  22. package/dist/components/Chat/ChatInterface.mjs +1 -1
  23. package/dist/components/Chat/CopilotInterface.js +3 -3
  24. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  25. package/dist/components/Chat/demo-long-messages.js +3 -3
  26. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  27. package/dist/components/Chat/demo-tests.js +3 -3
  28. package/dist/components/Chat/demo-tests.mjs +1 -1
  29. package/dist/components/Chat/demo.js +3 -3
  30. package/dist/components/Chat/demo.mjs +1 -1
  31. package/dist/components/Chat/example-usage.js +6 -6
  32. package/dist/components/Chat/example-usage.mjs +1 -1
  33. package/dist/components/Chat/example-with-vercel-ai.js +3 -3
  34. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  35. package/dist/components/Chat/index.js +7 -7
  36. package/dist/components/Chat/index.mjs +1 -1
  37. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  38. package/dist/components/DeliveryLead/index.mjs +1 -1
  39. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  40. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  41. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  42. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  43. package/dist/components/DigitalColleagues/index.mjs +1 -1
  44. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  45. package/dist/components/Foundary/MainPage.mjs +1 -1
  46. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  47. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  48. package/dist/components/Foundary/Views/index.mjs +1 -1
  49. package/dist/components/Foundary/index.mjs +1 -1
  50. package/dist/components/HeaderFooter/Header.mjs +1 -1
  51. package/dist/components/HeaderFooter/index.mjs +1 -1
  52. package/dist/components/Heros/PostHero/index.mjs +1 -1
  53. package/dist/components/Heros/RenderHero.mjs +1 -1
  54. package/dist/components/Heros/index.mjs +1 -1
  55. package/dist/components/Layouts/index.mjs +1 -1
  56. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  57. package/dist/components/Menus/SidebarRight.mjs +1 -1
  58. package/dist/components/Menus/index.mjs +1 -1
  59. package/dist/components/Projects/EpicsView.mjs +1 -1
  60. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  61. package/dist/components/Projects/ProjectPage.mjs +1 -1
  62. package/dist/components/Projects/ProjectView.mjs +1 -1
  63. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  64. package/dist/components/Projects/index.mjs +1 -1
  65. package/dist/components/dc-temp/index.mjs +1 -1
  66. package/dist/components/index.js +10 -10
  67. package/dist/components/index.mjs +1 -1
  68. package/dist/components/ui/index.mjs +1 -1
  69. package/dist/components/ui/sidebar.mjs +1 -1
  70. package/dist/index.js +11 -11
  71. package/dist/index.mjs +1 -1
  72. package/dist/metafile-cjs.json +1 -1
  73. package/dist/metafile-esm.json +1 -1
  74. package/dist/pages/Blog.mjs +1 -1
  75. package/dist/pages/Documentation.mjs +1 -1
  76. package/dist/pages/IndexPage.mjs +1 -1
  77. package/dist/pages/Intranet.mjs +1 -1
  78. package/dist/pages/LandingPage.mjs +1 -1
  79. package/dist/pages/Page.mjs +1 -1
  80. package/dist/pages/Publish.mjs +1 -1
  81. package/dist/pages/Website.mjs +1 -1
  82. package/dist/sections/BlogListSection.mjs +1 -1
  83. package/dist/sections/PageSections.mjs +1 -1
  84. package/dist/sections/ServiceSection.mjs +1 -1
  85. package/dist/sections/index.mjs +1 -1
  86. package/package.json +1 -1
  87. package/dist/chunk-OGAY4DL2.mjs +0 -1
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as C}from"./chunk-7GSXNSLD.mjs";import{a as N}from"./chunk-4UIARERB.mjs";import{a as E,f as T}from"./chunk-D4IMQTVU.mjs";import{a as M}from"./chunk-L5JPAKPM.mjs";import{a as L,b as I,c as H,d as k}from"./chunk-KY7WQYN4.mjs";import{b as _}from"./chunk-ZUA4KNIR.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{a as P}from"./chunk-FRWX5YES.mjs";import*as o from"react";import{Slot as g}from"@radix-ui/react-slot";import{cva as A}from"class-variance-authority";import{PanelLeft as O}from"lucide-react";import{jsx as r,jsxs as S}from"react/jsx-runtime";var G="sidebar:state",K=60*60*24*7,V="16rem",$="18rem",U="3rem",W="b",B=o.createContext(null);function w(){let a=o.useContext(B);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}var j=o.forwardRef(({defaultOpen:a=!0,open:e,onOpenChange:t,className:i,style:d,children:s,...p},m)=>{let c=P(),[u,b]=o.useState(!1),[v,D]=o.useState(a),f=e??v,h=o.useCallback(l=>{if(t)return t?.(typeof l=="function"?l(f):l);D(l),document.cookie=`${G}=${f}; path=/; max-age=${K}`},[t,f]),x=o.useCallback(()=>c?b(l=>!l):h(l=>!l),[c,h,b]);o.useEffect(()=>{let l=R=>{R.key===W&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),x())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[x]);let y=f?"expanded":"collapsed",z=o.useMemo(()=>({state:y,open:f,setOpen:h,isMobile:c,openMobile:u,setOpenMobile:b,toggleSidebar:x}),[y,f,h,c,u,b,x]);return r(B.Provider,{value:z,children:r(L,{delayDuration:0,children:r("div",{style:{"--sidebar-width":V,"--sidebar-width-icon":U,...d},className:n("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:m,...p,children:s})})})});j.displayName="SidebarProvider";var q=o.forwardRef(({side:a="left",variant:e="sidebar",collapsible:t="offcanvas",className:i,children:d,...s},p)=>{let{isMobile:m,state:c,openMobile:u,setOpenMobile:b}=w();return t==="none"?r("div",{className:n("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:p,...s,children:d}):m?r(E,{open:u,onOpenChange:b,...s,children:r(T,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":$},side:a,children:r("div",{className:"flex h-full w-full flex-col",children:d})})}):S("div",{ref:p,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?t:"","data-variant":e,"data-side":a,children:[r("div",{className:n("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r("div",{className:n("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:r("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:d})})]})});q.displayName="Sidebar";var F=o.forwardRef(({className:a,onClick:e,...t},i)=>{let{toggleSidebar:d}=w();return S(_,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("h-7 w-7",a),onClick:s=>{e?.(s),d()},...t,children:[r(O,{}),r("span",{className:"sr-only",children:"Toggle Sidebar"})]})});F.displayName="SidebarTrigger";var X=o.forwardRef(({className:a,...e},t)=>{let{toggleSidebar:i}=w();return r("button",{ref:t,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:n("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...e})});X.displayName="SidebarRail";var Y=o.forwardRef(({className:a,...e},t)=>r("main",{ref:t,className:n("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...e}));Y.displayName="SidebarInset";var J=o.forwardRef(({className:a,...e},t)=>r(M,{ref:t,"data-sidebar":"input",className:n("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",a),...e}));J.displayName="SidebarInput";var Q=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"header",className:n("flex flex-col gap-2 p-2",a),...e}));Q.displayName="SidebarHeader";var Z=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",a),...e}));Z.displayName="SidebarFooter";var ee=o.forwardRef(({className:a,...e},t)=>r(N,{ref:t,"data-sidebar":"separator",className:n("mx-2 w-auto bg-sidebar-border",a),...e}));ee.displayName="SidebarSeparator";var ae=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"content",className:n("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",a),...e}));ae.displayName="SidebarContent";var te=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col p-2",a),...e}));te.displayName="SidebarGroup";var oe=o.forwardRef(({className:a,asChild:e=!1,...t},i)=>r(e?g:"div",{ref:i,"data-sidebar":"group-label",className:n("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...t}));oe.displayName="SidebarGroupLabel";var re=o.forwardRef(({className:a,asChild:e=!1,...t},i)=>r(e?g:"button",{ref:i,"data-sidebar":"group-action",className:n("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...t}));re.displayName="SidebarGroupAction";var ne=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"group-content",className:n("w-full text-sm",a),...e}));ne.displayName="SidebarGroupContent";var ie=o.forwardRef(({className:a,...e},t)=>r("ul",{ref:t,"data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",a),...e}));ie.displayName="SidebarMenu";var de=o.forwardRef(({className:a,...e},t)=>r("li",{ref:t,"data-sidebar":"menu-item",className:n("group/menu-item relative",a),...e}));de.displayName="SidebarMenuItem";var se=A("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),le=o.forwardRef(({asChild:a=!1,isActive:e=!1,variant:t="default",size:i="default",tooltip:d,className:s,...p},m)=>{let c=a?g:"button",{isMobile:u,state:b}=w(),v=r(c,{ref:m,"data-sidebar":"menu-button","data-size":i,"data-active":e,className:n(se({variant:t,size:i}),s),...p});return d?(typeof d=="string"&&(d={children:d}),S(I,{children:[r(H,{asChild:!0,children:v}),r(k,{side:"right",align:"center",hidden:b!=="collapsed"||u,...d})]})):v});le.displayName="SidebarMenuButton";var ce=o.forwardRef(({className:a,asChild:e=!1,showOnHover:t=!1,...i},d)=>r(e?g:"button",{ref:d,"data-sidebar":"menu-action",className:n("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",a),...i}));ce.displayName="SidebarMenuAction";var be=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"menu-badge",className:n("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...e}));be.displayName="SidebarMenuBadge";var pe=o.forwardRef(({className:a,showIcon:e=!1,...t},i)=>{let d=o.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return S("div",{ref:i,"data-sidebar":"menu-skeleton",className:n("rounded-md h-8 flex gap-2 px-2 items-center",a),...t,children:[e&&r(C,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r(C,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":d}})]})});pe.displayName="SidebarMenuSkeleton";var ue=o.forwardRef(({className:a,...e},t)=>r("ul",{ref:t,"data-sidebar":"menu-sub",className:n("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...e}));ue.displayName="SidebarMenuSub";var fe=o.forwardRef(({...a},e)=>r("li",{ref:e,...a}));fe.displayName="SidebarMenuSubItem";var me=o.forwardRef(({asChild:a=!1,size:e="md",isActive:t,className:i,...d},s)=>r(a?g:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":e,"data-active":t,className:n("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...d}));me.displayName="SidebarMenuSubButton";export{w as a,j as b,q as c,F as d,X as e,Y as f,J as g,Q as h,Z as i,ee as j,ae as k,te as l,oe as m,re as n,ne as o,ie as p,de as q,le as r,ce as s,be as t,pe as u,ue as v,fe as w,me as x};
4
+ import{a as N}from"./chunk-4UIARERB.mjs";import{a as E,f as T}from"./chunk-D4IMQTVU.mjs";import{a as C}from"./chunk-7GSXNSLD.mjs";import{a as M}from"./chunk-L5JPAKPM.mjs";import{a as L,b as I,c as H,d as k}from"./chunk-KY7WQYN4.mjs";import{b as _}from"./chunk-ZUA4KNIR.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{a as P}from"./chunk-FRWX5YES.mjs";import*as o from"react";import{Slot as g}from"@radix-ui/react-slot";import{cva as A}from"class-variance-authority";import{PanelLeft as O}from"lucide-react";import{jsx as r,jsxs as S}from"react/jsx-runtime";var G="sidebar:state",K=60*60*24*7,V="16rem",$="18rem",U="3rem",W="b",B=o.createContext(null);function w(){let a=o.useContext(B);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}var j=o.forwardRef(({defaultOpen:a=!0,open:e,onOpenChange:t,className:i,style:d,children:s,...p},m)=>{let c=P(),[u,b]=o.useState(!1),[v,D]=o.useState(a),f=e??v,h=o.useCallback(l=>{if(t)return t?.(typeof l=="function"?l(f):l);D(l),document.cookie=`${G}=${f}; path=/; max-age=${K}`},[t,f]),x=o.useCallback(()=>c?b(l=>!l):h(l=>!l),[c,h,b]);o.useEffect(()=>{let l=R=>{R.key===W&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),x())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[x]);let y=f?"expanded":"collapsed",z=o.useMemo(()=>({state:y,open:f,setOpen:h,isMobile:c,openMobile:u,setOpenMobile:b,toggleSidebar:x}),[y,f,h,c,u,b,x]);return r(B.Provider,{value:z,children:r(L,{delayDuration:0,children:r("div",{style:{"--sidebar-width":V,"--sidebar-width-icon":U,...d},className:n("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:m,...p,children:s})})})});j.displayName="SidebarProvider";var q=o.forwardRef(({side:a="left",variant:e="sidebar",collapsible:t="offcanvas",className:i,children:d,...s},p)=>{let{isMobile:m,state:c,openMobile:u,setOpenMobile:b}=w();return t==="none"?r("div",{className:n("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:p,...s,children:d}):m?r(E,{open:u,onOpenChange:b,...s,children:r(T,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":$},side:a,children:r("div",{className:"flex h-full w-full flex-col",children:d})})}):S("div",{ref:p,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?t:"","data-variant":e,"data-side":a,children:[r("div",{className:n("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r("div",{className:n("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:r("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:d})})]})});q.displayName="Sidebar";var F=o.forwardRef(({className:a,onClick:e,...t},i)=>{let{toggleSidebar:d}=w();return S(_,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("h-7 w-7",a),onClick:s=>{e?.(s),d()},...t,children:[r(O,{}),r("span",{className:"sr-only",children:"Toggle Sidebar"})]})});F.displayName="SidebarTrigger";var X=o.forwardRef(({className:a,...e},t)=>{let{toggleSidebar:i}=w();return r("button",{ref:t,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:n("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...e})});X.displayName="SidebarRail";var Y=o.forwardRef(({className:a,...e},t)=>r("main",{ref:t,className:n("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...e}));Y.displayName="SidebarInset";var J=o.forwardRef(({className:a,...e},t)=>r(M,{ref:t,"data-sidebar":"input",className:n("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",a),...e}));J.displayName="SidebarInput";var Q=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"header",className:n("flex flex-col gap-2 p-2",a),...e}));Q.displayName="SidebarHeader";var Z=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",a),...e}));Z.displayName="SidebarFooter";var ee=o.forwardRef(({className:a,...e},t)=>r(N,{ref:t,"data-sidebar":"separator",className:n("mx-2 w-auto bg-sidebar-border",a),...e}));ee.displayName="SidebarSeparator";var ae=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"content",className:n("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",a),...e}));ae.displayName="SidebarContent";var te=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col p-2",a),...e}));te.displayName="SidebarGroup";var oe=o.forwardRef(({className:a,asChild:e=!1,...t},i)=>r(e?g:"div",{ref:i,"data-sidebar":"group-label",className:n("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...t}));oe.displayName="SidebarGroupLabel";var re=o.forwardRef(({className:a,asChild:e=!1,...t},i)=>r(e?g:"button",{ref:i,"data-sidebar":"group-action",className:n("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...t}));re.displayName="SidebarGroupAction";var ne=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"group-content",className:n("w-full text-sm",a),...e}));ne.displayName="SidebarGroupContent";var ie=o.forwardRef(({className:a,...e},t)=>r("ul",{ref:t,"data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",a),...e}));ie.displayName="SidebarMenu";var de=o.forwardRef(({className:a,...e},t)=>r("li",{ref:t,"data-sidebar":"menu-item",className:n("group/menu-item relative",a),...e}));de.displayName="SidebarMenuItem";var se=A("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),le=o.forwardRef(({asChild:a=!1,isActive:e=!1,variant:t="default",size:i="default",tooltip:d,className:s,...p},m)=>{let c=a?g:"button",{isMobile:u,state:b}=w(),v=r(c,{ref:m,"data-sidebar":"menu-button","data-size":i,"data-active":e,className:n(se({variant:t,size:i}),s),...p});return d?(typeof d=="string"&&(d={children:d}),S(I,{children:[r(H,{asChild:!0,children:v}),r(k,{side:"right",align:"center",hidden:b!=="collapsed"||u,...d})]})):v});le.displayName="SidebarMenuButton";var ce=o.forwardRef(({className:a,asChild:e=!1,showOnHover:t=!1,...i},d)=>r(e?g:"button",{ref:d,"data-sidebar":"menu-action",className:n("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",a),...i}));ce.displayName="SidebarMenuAction";var be=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"menu-badge",className:n("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...e}));be.displayName="SidebarMenuBadge";var pe=o.forwardRef(({className:a,showIcon:e=!1,...t},i)=>{let d=o.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return S("div",{ref:i,"data-sidebar":"menu-skeleton",className:n("rounded-md h-8 flex gap-2 px-2 items-center",a),...t,children:[e&&r(C,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r(C,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":d}})]})});pe.displayName="SidebarMenuSkeleton";var ue=o.forwardRef(({className:a,...e},t)=>r("ul",{ref:t,"data-sidebar":"menu-sub",className:n("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...e}));ue.displayName="SidebarMenuSub";var fe=o.forwardRef(({...a},e)=>r("li",{ref:e,...a}));fe.displayName="SidebarMenuSubItem";var me=o.forwardRef(({asChild:a=!1,size:e="md",isActive:t,className:i,...d},s)=>r(a?g:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":e,"data-active":t,className:n("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...d}));me.displayName="SidebarMenuSubButton";export{w as a,j as b,q as c,F as d,X as e,Y as f,J as g,Q as h,Z as i,ee as j,ae as k,te as l,oe as m,re as n,ne as o,ie as p,de as q,le as r,ce as s,be as t,pe as u,ue as v,fe as w,me as x};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a}from"./chunk-Q5NHYYRS.mjs";import{a as r}from"./chunk-UWEU6TLS.mjs";import{useState as l}from"react";import{ChevronDown as c,ChevronUp as v,List as b}from"lucide-react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function f({submissions:t,onSubmit:o,isLoading:n=!1,customerProjectPairs:m}){let[s,d]=l(!1);return e("div",{className:"min-h-screen ",children:i("div",{className:"container mx-auto p-4 max-w-6xl",children:[i("div",{className:"mb-8",children:[e("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),e("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),e("div",{className:"mb-8",children:e(r,{onSubmit:o,customerProjectPairs:m})}),i("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[i("button",{onClick:()=>d(!s),className:"w-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[i("div",{className:"flex items-center gap-3",children:[e(b,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}),e("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),i("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",t.length,")"]})]}),e("div",{className:"flex items-center gap-2",children:s?e(v,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}):e(c,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),s&&e("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:e(a,{submissions:t,isLoading:n})})]})]})})}export{f as a};
4
+ import{a as r}from"./chunk-UWEU6TLS.mjs";import{a}from"./chunk-Q5NHYYRS.mjs";import{useState as l}from"react";import{ChevronDown as c,ChevronUp as v,List as b}from"lucide-react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function f({submissions:t,onSubmit:o,isLoading:n=!1,customerProjectPairs:m}){let[s,d]=l(!1);return e("div",{className:"min-h-screen ",children:i("div",{className:"container mx-auto p-4 max-w-6xl",children:[i("div",{className:"mb-8",children:[e("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),e("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),e("div",{className:"mb-8",children:e(r,{onSubmit:o,customerProjectPairs:m})}),i("div",{className:"rounded-xl shadow-lg bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[i("button",{onClick:()=>d(!s),className:"w-full px-6 py-4 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors",children:[i("div",{className:"flex items-center gap-3",children:[e(b,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}),e("h2",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),i("span",{className:"text-sm text-gray-500 dark:text-zinc-400",children:["(",t.length,")"]})]}),e("div",{className:"flex items-center gap-2",children:s?e(v,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"}):e(c,{className:"h-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),s&&e("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:e(a,{submissions:t,isLoading:n})})]})]})})}export{f as a};
@@ -3,19 +3,19 @@
3
3
  "use client"
4
4
  'use client';
5
5
 
6
- "use strict";var ro=Object.create;var Be=Object.defineProperty;var ao=Object.getOwnPropertyDescriptor;var no=Object.getOwnPropertyNames;var so=Object.getPrototypeOf,io=Object.prototype.hasOwnProperty;var lo=(e,t)=>{for(var o in t)Be(e,o,{get:t[o],enumerable:!0})},pt=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of no(t))!io.call(e,s)&&s!==o&&Be(e,s,{get:()=>t[s],enumerable:!(a=ao(t,s))||a.enumerable});return e};var $=(e,t,o)=>(o=e!=null?ro(so(e)):{},pt(t||!e||!e.__esModule?Be(o,"default",{value:e,enumerable:!0}):o,e)),co=e=>pt(Be({},"__esModule",{value:!0}),e);var ar={};lo(ar,{ChatInterface:()=>rr});module.exports=co(ar);var J=require("react"),fe=$(require("motion/react-client")),A=require("lucide-react");var ze=$(require("react")),X=$(require("@radix-ui/react-avatar"));var xt=require("clsx");var Je="-",po=e=>{let t=mo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{let i=l.split(Je);return i[0]===""&&i.length!==1&&i.shift(),gt(i,t)||uo(l)},getConflictingClassGroupIds:(l,i)=>{let p=o[l]||[];return i&&a[l]?[...p,...a[l]]:p}}},gt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),s=a?gt(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(Je);return t.validators.find(({validator:l})=>l(n))?.classGroupId},ut=/^\[(.+)\]$/,uo=e=>{if(ut.test(e)){let t=ut.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},mo=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return fo(Object.entries(e.classGroups),o).forEach(([n,l])=>{Ke(l,a,n,t)}),a},Ke=(e,t,o,a)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:mt(t,s);n.classGroupId=o;return}if(typeof s=="function"){if(go(s)){Ke(s(a),t,o,a);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([n,l])=>{Ke(l,mt(t,n),o,a)})})},mt=(e,t)=>{let o=e;return t.split(Je).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},go=e=>e.isThemeGetter,fo=(e,t)=>t?e.map(([o,a])=>{let s=a.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,i])=>[t+l,i])):n);return[o,s]}):e,bo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,s=(n,l)=>{o.set(n,l),t++,t>e&&(t=0,a=o,o=new Map)};return{get(n){let l=o.get(n);if(l!==void 0)return l;if((l=a.get(n))!==void 0)return s(n,l),l},set(n,l){o.has(n)?o.set(n,l):s(n,l)}}},ft="!",vo=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,s=t[0],n=t.length,l=i=>{let p=[],f=0,y=0,m;for(let x=0;x<i.length;x++){let R=i[x];if(f===0){if(R===s&&(a||i.slice(x,x+n)===t)){p.push(i.slice(y,x)),y=x+n;continue}if(R==="/"){m=x;continue}}R==="["?f++:R==="]"&&f--}let v=p.length===0?i:i.substring(y),S=v.startsWith(ft),P=S?v.substring(1):v,w=m&&m>y?m-y:void 0;return{modifiers:p,hasImportantModifier:S,baseClassName:P,maybePostfixModifierPosition:w}};return o?i=>o({className:i,parseClassName:l}):l},ho=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},yo=e=>({cache:bo(e.cacheSize),parseClassName:vo(e),...po(e)}),xo=/\s+/,Co=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(xo),i="";for(let p=l.length-1;p>=0;p-=1){let f=l[p],{modifiers:y,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:S}=o(f),P=!!S,w=a(P?v.substring(0,S):v);if(!w){if(!P){i=f+(i.length>0?" "+i:i);continue}if(w=a(v),!w){i=f+(i.length>0?" "+i:i);continue}P=!1}let x=ho(y).join(":"),R=m?x+ft:x,B=R+w;if(n.includes(B))continue;n.push(B);let C=s(w,P);for(let L=0;L<C.length;++L){let ce=C[L];n.push(R+ce)}i=f+(i.length>0?" "+i:i)}return i};function wo(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=bt(t))&&(a&&(a+=" "),a+=o);return a}var bt=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=bt(e[a]))&&(o&&(o+=" "),o+=t);return o};function No(e,...t){let o,a,s,n=l;function l(p){let f=t.reduce((y,m)=>m(y),e());return o=yo(f),a=o.cache.get,s=o.cache.set,n=i,i(p)}function i(p){let f=a(p);if(f)return f;let y=Co(p,o);return s(p,y),y}return function(){return n(wo.apply(null,arguments))}}var k=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},vt=/^\[(?:([a-He-]+):)?(.+)\]$/i,ko=/^\d+\/\d+$/,To=new Set(["px","full","screen"]),Po=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ro=/\d+(%|px|He?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|He?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ao=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,So=/^(inset_)?-?((\d+)?\.?(\d+)[a-He]+|0)_-?((\d+)?\.?(\d+)[a-He]+|0)/,Mo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Q=e=>ve(e)||To.has(e)||ko.test(e),ne=e=>he(e,"length",Oo),ve=e=>!!e&&!Number.isNaN(Number(e)),qe=e=>he(e,"number",ve),Ne=e=>!!e&&Number.isInteger(Number(e)),Io=e=>e.endsWith("%")&&ve(e.slice(0,-1)),g=e=>vt.test(e),se=e=>Po.test(e),Lo=new Set(["length","size","percentage"]),Do=e=>he(e,Lo,ht),Eo=e=>he(e,"position",ht),Bo=new Set(["image","url"]),zo=e=>he(e,Bo,Vo),Ho=e=>he(e,"",Fo),ke=()=>!0,he=(e,t,o)=>{let a=vt.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},Oo=e=>Ro.test(e)&&!Ao.test(e),ht=()=>!1,Fo=e=>So.test(e),Vo=e=>Mo.test(e);var $o=()=>{let e=k("colors"),t=k("spacing"),o=k("blur"),a=k("brightness"),s=k("borderColor"),n=k("borderRadius"),l=k("borderSpacing"),i=k("borderWidth"),p=k("contrast"),f=k("grayscale"),y=k("hueRotate"),m=k("invert"),v=k("gap"),S=k("gradientColorStops"),P=k("gradientColorStopPositions"),w=k("inset"),x=k("margin"),R=k("opacity"),B=k("padding"),C=k("saturate"),L=k("scale"),ce=k("sepia"),We=k("skew"),Ce=k("space"),Me=k("translate"),de=()=>["auto","contain","none"],Ie=()=>["auto","hidden","clip","visible","scroll"],we=()=>["auto",g,t],N=()=>[g,t],Le=()=>["",Q,ne],be=()=>["auto",ve,g],De=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],Ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],d=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",g],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[ve,g];return{cacheSize:500,separator:":",theme:{colors:[ke],spacing:[Q,ne],blur:["none","",se,g],brightness:b(),borderColor:[e],borderRadius:["none","","full",se,g],borderSpacing:N(),borderWidth:Le(),contrast:b(),grayscale:M(),hueRotate:b(),invert:M(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Io,ne],inset:we(),margin:we(),opacity:b(),padding:N(),saturate:b(),scale:b(),sepia:M(),skew:b(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",g]}],container:["container"],columns:[{columns:[se]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...De(),g]}],overflow:[{overflow:Ie()}],"overflow-x":[{"overflow-x":Ie()}],"overflow-y":[{"overflow-y":Ie()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],He:[{He:["auto",Ne,g]}],basis:[{basis:we()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",g]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",Ne,g]}],"grid-cols":[{"grid-cols":[ke]}],"col-start-end":[{col:["auto",{span:["full",Ne,g]},g]}],"col-start":[{"col-start":be()}],"col-end":[{"col-end":be()}],"grid-rows":[{"grid-rows":[ke]}],"row-start-end":[{row:["auto",{span:[Ne,g]},g]}],"row-start":[{"row-start":be()}],"row-end":[{"row-end":be()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",g]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",g]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...d()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...d(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...d(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],He:[{He:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Ce]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",g,t]}],"min-w":[{"min-w":[g,t,"min","max","fit"]}],"max-w":[{"max-w":[g,t,"none","full","min","max","fit","prose",{screen:[se]},se]}],h:[{h:[g,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[g,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[g,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[g,t,"auto","min","max","fit"]}],"font-size":[{text:["base",se,ne]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",qe]}],"font-family":[{font:[ke]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",g]}],"line-clamp":[{"line-clamp":["none",ve,qe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Q,g]}],"list-image":[{"list-image":["none",g]}],"list-style-type":[{list:["none","disc","decimal",g]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Q,ne]}],"underline-offset":[{"underline-offset":["auto",Q,g]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",g]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...De(),Eo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Do]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","He","br","b","bl","l","tl"]},zo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-He":[{"rounded-He":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-He":[{"border-He":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:pe()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-He":[{"border-He":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[Q,g]}],"outline-w":[{outline:[Q,ne]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[Q,ne]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",se,Ho]}],"shadow-color":[{shadow:[ke]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...Ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ee()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",se,g]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[m]}],saturate:[{saturate:[C]}],sepia:[{sepia:[ce]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",g]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",g]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",g]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Ne,g]}],"translate-x":[{"translate-x":[Me]}],"translate-y":[{"translate-y":[Me]}],"skew-x":[{"skew-x":[We]}],"skew-y":[{"skew-y":[We]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",g]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",g]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-He":[{"scroll-He":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",g]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Q,ne,qe]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","He","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-He","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-He":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-He","border-w-b","border-w-l"],"border-w-x":["border-w-He","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-He","border-color-b","border-color-l"],"border-color-x":["border-color-He","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-He","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var yt=No($o);function c(...e){return yt((0,xt.clsx)(e))}var He=require("react/jsx-runtime"),Te=ze.forwardRef(({className:e,...t},o)=>(0,He.jsx)(X.Root,{ref:o,className:c("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Te.displayName=X.Root.displayName;var Uo=ze.forwardRef(({className:e,...t},o)=>(0,He.jsx)(X.Image,{ref:o,className:c("aspect-square h-full w-full",e),...t}));Uo.displayName=X.Image.displayName;var Pe=ze.forwardRef(({className:e,...t},o)=>(0,He.jsx)(X.Fallback,{ref:o,className:c("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Pe.displayName=X.Fallback.displayName;var Ct=require("@radix-ui/react-slot"),wt=require("class-variance-authority"),Nt=$(require("react")),Go=(0,wt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),V=Nt.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...s},n)=>(0,He.jsx)(e?Ct.Slot:"button",{className:c(Go({className:t,size:o,variant:a})),ref:n,...s}));V.displayName="Button";var ue=$(require("react"));var _=ue.forwardRef(({className:e,...t},o)=>(0,He.jsx)("div",{ref:o,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));_.displayName="Card";var Y=ue.forwardRef(({className:e,...t},o)=>(0,He.jsx)("div",{ref:o,className:c("flex flex-col space-y-1.5 p-6",e),...t}));Y.displayName="CardHeader";var Z=ue.forwardRef(({className:e,...t},o)=>(0,He.jsx)("div",{ref:o,className:c("font-semibold leading-none tracking-tight",e),...t}));Z.displayName="CardTitle";var Qe=ue.forwardRef(({className:e,...t},o)=>(0,He.jsx)("div",{ref:o,className:c("text-sm text-muted-foreground",e),...t}));Qe.displayName="CardDescription";var q=ue.forwardRef(({className:e,...t},o)=>(0,He.jsx)("div",{ref:o,className:c("p-6 pt-0",e),...t}));q.displayName="CardContent";var Re=ue.forwardRef(({className:e,...t},o)=>(0,He.jsx)("div",{ref:o,className:c("flex items-center p-6 pt-0",e),...t}));Re.displayName="CardFooter";var Tt=$(require("react"));var Xe=Tt.forwardRef(({className:e,type:t,...o},a)=>(0,He.jsx)("input",{type:t,className:c("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));Xe.displayName="Input";var Ye=$(require("react")),U=$(require("@radix-ui/react-scroll-area"));var Ze=Ye.forwardRef(({className:e,children:t,...o},a)=>(0,He.jsxs)(U.Root,{ref:a,className:c("relative overflow-hidden",e),...o,children:[(0,He.jsx)(U.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,He.jsx)(Rt,{}),(0,He.jsx)(U.Corner,{})]}));Ze.displayName=U.Root.displayName;var Rt=Ye.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,He.jsx)(U.ScrollAreaScrollbar,{ref:a,orientation:t,className:c("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,He.jsx)(U.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Rt.displayName=U.ScrollAreaScrollbar.displayName;var jo=(0,wt.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ee({className:e,variant:t,...o}){return(0,He.jsx)("div",{className:c(jo({variant:t}),e),...o})}var K=require("motion/react");var Mt={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function et(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function It({capabilities:e,isOpen:t,onToggle:o,onActionSelect:a,onContextChange:s,colorScheme:n=Mt,className:l}){let[i,p]=(0,J.useState)([]),[f,y]=(0,J.useState)([]),m=i[i.length-1],v=m?.children||e,S=(C,L)=>{switch(C.type){case"category":return n.categories[L%n.categories.length];case"list":return n.lists[L%n.lists.length];case"item":return n.items[L%n.items.length];default:return n.primary}},P=(0,J.useMemo)(()=>({path:i,selectedItems:f,filters:{}}),[i,f]);(0,J.useEffect)(()=>{s&&s(P)},[P,s]);let w=C=>{C.type==="category"||C.type==="list"?p([...i,C]):C.type==="item"&&y([...f,C])},x=()=>{p(i.slice(0,-1))},R=C=>{p(i.slice(0,C+1))},B=()=>m?.actions?m.actions:[];return t?(0,He.jsxs)("div",{className:c("w-full",l),children:[(0,He.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,He.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,He.jsx)(K.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:x,className:c("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,He.jsx)(A.ChevronLeft,{className:c("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,He.jsx)("h4",{className:"font-medium text-sm",children:m?.name||"Capabilities"})]}),(0,He.jsx)(K.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:o,className:c("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,He.jsx)(A.X,{className:c("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,He.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,He.jsx)(K.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>p([]),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,He.jsxs)("span",{className:"relative",children:["Capabilities",(0,He.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),i.map((C,L)=>(0,He.jsxs)("div",{className:"flex items-center gap-1",children:[(0,He.jsx)(A.ChevronRight,{className:"h-2 w-2"}),(0,He.jsx)(K.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>R(L),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,He.jsxs)("span",{className:"relative",children:[C.name,(0,He.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,He.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,He.jsx)(K.AnimatePresence,{mode:"wait",children:(0,He.jsx)(K.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:m?.type==="list"&&m.data?(0,He.jsx)(qo,{data:m.data,onItemSelect:C=>y([...f,C]),colorScheme:n}):(0,He.jsx)(Wo,{capabilities:v,onSelect:w,colorScheme:n})},m?.id||"root")})})]}):(0,He.jsxs)(V,{onClick:o,size:"sm",variant:"outline",className:"rounded-full",children:[(0,He.jsx)(A.Menu,{className:"h-4 w-4"}),(0,He.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Wo({capabilities:e,onSelect:t,colorScheme:o}){return(0,He.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,s)=>(0,He.jsx)(_o,{capability:a,onClick:()=>t(a),color:o.categories[s%o.categories.length]},a.id))})}function _o({capability:e,onClick:t,selected:o,color:a}){return(0,He.jsxs)(K.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:c("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",o&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,He.jsx)("div",{className:c("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a)}),(0,He.jsxs)("span",{className:"truncate relative",children:[e.name,(0,He.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,He.jsx)(A.ChevronRight,{className:c("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,He.jsx)(ee,{variant:"secondary",className:c("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function qo({data:e,onItemSelect:t,colorScheme:o}){return(0,He.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,s)=>(0,He.jsxs)(K.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:c("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(a),children:[(0,He.jsx)("div",{className:c("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o.items[s%o.items.length])}),(0,He.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,He.jsxs)("span",{className:"truncate relative font-medium",children:[a.title,(0,He.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),a.subtitle&&(0,He.jsx)("div",{className:c("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:a.subtitle})]}),a.value&&(0,He.jsx)(ee,{variant:"secondary",className:c("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:a.value})]},a.id))})}var Et=require("date-fns");function Lt({taskId:e,polling:t=!0,system:o="payload"}){let[a,s]=(0,J.useState)(null),[n,l]=(0,J.useState)(!1),[i,p]=(0,J.useState)(null),f=async(m=!0)=>{if(e){m&&l(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let S=await v.json();s(S)}catch(v){console.error("Error fetching task:",v),p(v instanceof Error?v:new Error("Unknown error occurred"))}finally{m&&l(!1)}}},y=()=>f(!1);return(0,J.useEffect)(()=>{e&&f(!0);let m=null;return e&&t&&(m=setInterval(y,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:a,loading:n,error:i}}var Ko=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Jo=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Bt({data:e}){let{id:t,system:o,fetchLatest:a,taskData:s,error:n}=e||{};if(!t)return null;let l=null,i=!0,p=n,f=a!==void 0?a:!0;if(l=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:a,system:o,fetchLatest:f,taskData:l,error:p}),f){let{task:S,loading:P,error:w}=Lt({taskId:t,system:o});l=S,i=P,p=w}else i=!1;let y=Ko(l?.status||"todo"),m=Jo(l?.status||"todo"),v=l?.dateLogged||new Date().toISOString();try{let S=new Date(l?.dateLogged||"");isNaN(S.getTime())||(v=(0,Et.formatDistanceToNow)(S,{addSuffix:!0}))}catch{}return(0,He.jsxs)(_,{className:c("w-full max-w-md shadow-md",p&&"border border-destructive"),children:[(0,He.jsxs)(Y,{className:"pb-2",children:[(0,He.jsxs)("div",{className:"flex justify-between items-start",children:[(0,He.jsx)(Z,{className:"text-lg font-semibold",children:i?"Loading...":l?.name||"Task"}),(0,He.jsx)(ee,{className:`${y}`,children:m})]}),l?.project&&(0,He.jsxs)(Qe,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,He.jsx)(q,{className:"pb-2",children:i?(0,He.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):p?(0,He.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,He.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,He.jsx)(Re,{className:"pt-2 flex items-center justify-between",children:(0,He.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,He.jsx)(A.Clock,{className:"h-3 w-3 mr-1"}),(0,He.jsxs)("span",{children:["Created ",v]}),(0,He.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,He.jsxs)("span",{children:["Task #",t]})]})})]})}function Ot({artefact:e,taskId:t,taskData:o,loading:a=!1,error:s=null}){let n=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=n.dateLogged;try{let i=new Date(n.dateLogged);isNaN(i.getTime())||(l=(0,Et.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,He.jsxs)(_,{className:"w-full max-w-md shadow-md",children:[(0,He.jsx)(Y,{className:"pb-2",children:(0,He.jsx)("div",{className:"flex justify-between items-start",children:(0,He.jsx)(Z,{className:"text-lg font-semibold",children:a?"Loading...":n.name})})}),(0,He.jsx)(q,{className:"pb-2",children:a?(0,He.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,He.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,He.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,He.jsx)(Re,{className:"pt-2 flex items-center justify-between",children:(0,He.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,He.jsx)(A.Clock,{className:"h-3 w-3 mr-1"}),(0,He.jsxs)("span",{children:["Created ",l]}),(0,He.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,He.jsxs)("span",{children:["Task #",n.id]})]})})]})}var Vt=$(require("react"));var Ft=({isOpen:e=!0,authUrl:t,onClose:o,onSuccess:a,description:s="This endpoint requires authentication to sync functions."})=>{let[n,l]=(0,J.useState)(!1),[i,p]=(0,J.useState)(""),f=()=>{if(!t){p("No authentication URL provided");return}l(!0),p("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!m){p("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let v=setInterval(()=>{try{m.closed&&(clearInterval(v),l(!1),a(),o())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(v),l(!1),p("Authentication timed out. Please try again."))},6e5)}catch{p("Failed to open authentication window"),l(!1)}},y=async()=>{try{await navigator.clipboard.writeText(t),p("")}catch{p("Failed to copy URL to clipboard")}};return e?(0,He.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center He-[1000]",children:(0,He.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,He.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,He.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),i&&(0,He.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:i}),(0,He.jsxs)("div",{className:"flex gap-2",children:[(0,He.jsx)("button",{onClick:f,disabled:n||!t,className:`
6
+ "use strict";var ro=Object.create;var Ee=Object.defineProperty;var ao=Object.getOwnPropertyDescriptor;var no=Object.getOwnPropertyNames;var so=Object.getPrototypeOf,io=Object.prototype.hasOwnProperty;var lo=(e,t)=>{for(var o in t)Ee(e,o,{get:t[o],enumerable:!0})},pt=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of no(t))!io.call(e,s)&&s!==o&&Ee(e,s,{get:()=>t[s],enumerable:!(a=ao(t,s))||a.enumerable});return e};var $=(e,t,o)=>(o=e!=null?ro(so(e)):{},pt(t||!e||!e.__esModule?Ee(o,"default",{value:e,enumerable:!0}):o,e)),co=e=>pt(Ee({},"__esModule",{value:!0}),e);var ar={};lo(ar,{ChatInterface:()=>rr});module.exports=co(ar);var J=require("react"),fe=$(require("motion/react-client")),A=require("lucide-react");var Be=$(require("react")),X=$(require("@radix-ui/react-avatar"));var xt=require("clsx");var Ke="-",po=e=>{let t=mo(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{let i=l.split(Ke);return i[0]===""&&i.length!==1&&i.shift(),gt(i,t)||uo(l)},getConflictingClassGroupIds:(l,i)=>{let p=o[l]||[];return i&&a[l]?[...p,...a[l]]:p}}},gt=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),s=a?gt(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;let n=e.join(Ke);return t.validators.find(({validator:l})=>l(n))?.classGroupId},ut=/^\[(.+)\]$/,uo=e=>{if(ut.test(e)){let t=ut.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},mo=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return fo(Object.entries(e.classGroups),o).forEach(([n,l])=>{qe(l,a,n,t)}),a},qe=(e,t,o,a)=>{e.forEach(s=>{if(typeof s=="string"){let n=s===""?t:mt(t,s);n.classGroupId=o;return}if(typeof s=="function"){if(go(s)){qe(s(a),t,o,a);return}t.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([n,l])=>{qe(l,mt(t,n),o,a)})})},mt=(e,t)=>{let o=e;return t.split(Ke).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},go=e=>e.isThemeGetter,fo=(e,t)=>t?e.map(([o,a])=>{let s=a.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,i])=>[t+l,i])):n);return[o,s]}):e,bo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,s=(n,l)=>{o.set(n,l),t++,t>e&&(t=0,a=o,o=new Map)};return{get(n){let l=o.get(n);if(l!==void 0)return l;if((l=a.get(n))!==void 0)return s(n,l),l},set(n,l){o.has(n)?o.set(n,l):s(n,l)}}},ft="!",vo=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,s=t[0],n=t.length,l=i=>{let p=[],f=0,y=0,m;for(let x=0;x<i.length;x++){let R=i[x];if(f===0){if(R===s&&(a||i.slice(x,x+n)===t)){p.push(i.slice(y,x)),y=x+n;continue}if(R==="/"){m=x;continue}}R==="["?f++:R==="]"&&f--}let v=p.length===0?i:i.substring(y),S=v.startsWith(ft),P=S?v.substring(1):v,w=m&&m>y?m-y:void 0;return{modifiers:p,hasImportantModifier:S,baseClassName:P,maybePostfixModifierPosition:w}};return o?i=>o({className:i,parseClassName:l}):l},ho=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},yo=e=>({cache:bo(e.cacheSize),parseClassName:vo(e),...po(e)}),xo=/\s+/,Co=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:s}=t,n=[],l=e.trim().split(xo),i="";for(let p=l.length-1;p>=0;p-=1){let f=l[p],{modifiers:y,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:S}=o(f),P=!!S,w=a(P?v.substring(0,S):v);if(!w){if(!P){i=f+(i.length>0?" "+i:i);continue}if(w=a(v),!w){i=f+(i.length>0?" "+i:i);continue}P=!1}let x=ho(y).join(":"),R=m?x+ft:x,B=R+w;if(n.includes(B))continue;n.push(B);let C=s(w,P);for(let L=0;L<C.length;++L){let ce=C[L];n.push(R+ce)}i=f+(i.length>0?" "+i:i)}return i};function wo(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=bt(t))&&(a&&(a+=" "),a+=o);return a}var bt=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=bt(e[a]))&&(o&&(o+=" "),o+=t);return o};function No(e,...t){let o,a,s,n=l;function l(p){let f=t.reduce((y,m)=>m(y),e());return o=yo(f),a=o.cache.get,s=o.cache.set,n=i,i(p)}function i(p){let f=a(p);if(f)return f;let y=Co(p,o);return s(p,y),y}return function(){return n(wo.apply(null,arguments))}}var k=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},vt=/^\[(?:([a-ze-]+):)?(.+)\]$/i,ko=/^\d+\/\d+$/,To=new Set(["px","full","screen"]),Po=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ro=/\d+(%|px|ze?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|ze?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ao=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,So=/^(inset_)?-?((\d+)?\.?(\d+)[a-ze]+|0)_-?((\d+)?\.?(\d+)[a-ze]+|0)/,Mo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Q=e=>ve(e)||To.has(e)||ko.test(e),ne=e=>he(e,"length",Oo),ve=e=>!!e&&!Number.isNaN(Number(e)),_e=e=>he(e,"number",ve),Ne=e=>!!e&&Number.isInteger(Number(e)),Io=e=>e.endsWith("%")&&ve(e.slice(0,-1)),g=e=>vt.test(e),se=e=>Po.test(e),Lo=new Set(["length","size","percentage"]),Do=e=>he(e,Lo,ht),Eo=e=>he(e,"position",ht),Bo=new Set(["image","url"]),zo=e=>he(e,Bo,Vo),Ho=e=>he(e,"",Fo),ke=()=>!0,he=(e,t,o)=>{let a=vt.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},Oo=e=>Ro.test(e)&&!Ao.test(e),ht=()=>!1,Fo=e=>So.test(e),Vo=e=>Mo.test(e);var $o=()=>{let e=k("colors"),t=k("spacing"),o=k("blur"),a=k("brightness"),s=k("borderColor"),n=k("borderRadius"),l=k("borderSpacing"),i=k("borderWidth"),p=k("contrast"),f=k("grayscale"),y=k("hueRotate"),m=k("invert"),v=k("gap"),S=k("gradientColorStops"),P=k("gradientColorStopPositions"),w=k("inset"),x=k("margin"),R=k("opacity"),B=k("padding"),C=k("saturate"),L=k("scale"),ce=k("sepia"),je=k("skew"),Ce=k("space"),Se=k("translate"),de=()=>["auto","contain","none"],Me=()=>["auto","hidden","clip","visible","scroll"],we=()=>["auto",g,t],N=()=>[g,t],Ie=()=>["",Q,ne],be=()=>["auto",ve,g],Le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],pe=()=>["solid","dashed","dotted","double","none"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],d=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",g],E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[ve,g];return{cacheSize:500,separator:":",theme:{colors:[ke],spacing:[Q,ne],blur:["none","",se,g],brightness:b(),borderColor:[e],borderRadius:["none","","full",se,g],borderSpacing:N(),borderWidth:Ie(),contrast:b(),grayscale:M(),hueRotate:b(),invert:M(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Io,ne],inset:we(),margin:we(),opacity:b(),padding:N(),saturate:b(),scale:b(),sepia:M(),skew:b(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",g]}],container:["container"],columns:[{columns:[se]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Le(),g]}],overflow:[{overflow:Me()}],"overflow-x":[{"overflow-x":Me()}],"overflow-y":[{"overflow-y":Me()}],overscroll:[{overscroll:de()}],"overscroll-x":[{"overscroll-x":de()}],"overscroll-y":[{"overscroll-y":de()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],ze:[{ze:["auto",Ne,g]}],basis:[{basis:we()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",g]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",Ne,g]}],"grid-cols":[{"grid-cols":[ke]}],"col-start-end":[{col:["auto",{span:["full",Ne,g]},g]}],"col-start":[{"col-start":be()}],"col-end":[{"col-end":be()}],"grid-rows":[{"grid-rows":[ke]}],"row-start-end":[{row:["auto",{span:[Ne,g]},g]}],"row-start":[{"row-start":be()}],"row-end":[{"row-end":be()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",g]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",g]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...d()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...d(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...d(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],ze:[{ze:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Ce]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",g,t]}],"min-w":[{"min-w":[g,t,"min","max","fit"]}],"max-w":[{"max-w":[g,t,"none","full","min","max","fit","prose",{screen:[se]},se]}],h:[{h:[g,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[g,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[g,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[g,t,"auto","min","max","fit"]}],"font-size":[{text:["base",se,ne]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_e]}],"font-family":[{font:[ke]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",g]}],"line-clamp":[{"line-clamp":["none",ve,_e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Q,g]}],"list-image":[{"list-image":["none",g]}],"list-style-type":[{list:["none","disc","decimal",g]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Q,ne]}],"underline-offset":[{"underline-offset":["auto",Q,g]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",g]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Le(),Eo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Do]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","ze","br","b","bl","l","tl"]},zo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-to-pos":[{to:[P]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-ze":[{"rounded-ze":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-ze":[{"border-ze":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...pe(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:pe()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-ze":[{"border-ze":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...pe()]}],"outline-offset":[{"outline-offset":[Q,g]}],"outline-w":[{outline:[Q,ne]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[Q,ne]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",se,Ho]}],"shadow-color":[{shadow:[ke]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...De(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":De()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",se,g]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[m]}],saturate:[{saturate:[C]}],sepia:[{sepia:[ce]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",g]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",g]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",g]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[Ne,g]}],"translate-x":[{"translate-x":[Se]}],"translate-y":[{"translate-y":[Se]}],"skew-x":[{"skew-x":[je]}],"skew-y":[{"skew-y":[je]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",g]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",g]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-ze":[{"scroll-ze":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",g]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Q,ne,_e]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","ze","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-ze","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-ze":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-ze","border-w-b","border-w-l"],"border-w-x":["border-w-ze","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-ze","border-color-b","border-color-l"],"border-color-x":["border-color-ze","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-ze","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var yt=No($o);function c(...e){return yt((0,xt.clsx)(e))}var ze=require("react/jsx-runtime"),Te=Be.forwardRef(({className:e,...t},o)=>(0,ze.jsx)(X.Root,{ref:o,className:c("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Te.displayName=X.Root.displayName;var Uo=Be.forwardRef(({className:e,...t},o)=>(0,ze.jsx)(X.Image,{ref:o,className:c("aspect-square h-full w-full",e),...t}));Uo.displayName=X.Image.displayName;var Pe=Be.forwardRef(({className:e,...t},o)=>(0,ze.jsx)(X.Fallback,{ref:o,className:c("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Pe.displayName=X.Fallback.displayName;var Ct=require("@radix-ui/react-slot"),wt=require("class-variance-authority"),Nt=$(require("react")),Go=(0,wt.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),V=Nt.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...s},n)=>(0,ze.jsx)(e?Ct.Slot:"button",{className:c(Go({className:t,size:o,variant:a})),ref:n,...s}));V.displayName="Button";var ue=$(require("react"));var _=ue.forwardRef(({className:e,...t},o)=>(0,ze.jsx)("div",{ref:o,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));_.displayName="Card";var Y=ue.forwardRef(({className:e,...t},o)=>(0,ze.jsx)("div",{ref:o,className:c("flex flex-col space-y-1.5 p-6",e),...t}));Y.displayName="CardHeader";var Z=ue.forwardRef(({className:e,...t},o)=>(0,ze.jsx)("div",{ref:o,className:c("font-semibold leading-none tracking-tight",e),...t}));Z.displayName="CardTitle";var Je=ue.forwardRef(({className:e,...t},o)=>(0,ze.jsx)("div",{ref:o,className:c("text-sm text-muted-foreground",e),...t}));Je.displayName="CardDescription";var q=ue.forwardRef(({className:e,...t},o)=>(0,ze.jsx)("div",{ref:o,className:c("p-6 pt-0",e),...t}));q.displayName="CardContent";var Re=ue.forwardRef(({className:e,...t},o)=>(0,ze.jsx)("div",{ref:o,className:c("flex items-center p-6 pt-0",e),...t}));Re.displayName="CardFooter";var Tt=$(require("react"));var Qe=Tt.forwardRef(({className:e,type:t,...o},a)=>(0,ze.jsx)("input",{type:t,className:c("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));Qe.displayName="Input";var Xe=$(require("react")),U=$(require("@radix-ui/react-scroll-area"));var Ye=Xe.forwardRef(({className:e,children:t,...o},a)=>(0,ze.jsxs)(U.Root,{ref:a,className:c("relative overflow-hidden",e),...o,children:[(0,ze.jsx)(U.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ze.jsx)(Rt,{}),(0,ze.jsx)(U.Corner,{})]}));Ye.displayName=U.Root.displayName;var Rt=Xe.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,ze.jsx)(U.ScrollAreaScrollbar,{ref:a,orientation:t,className:c("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,ze.jsx)(U.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Rt.displayName=U.ScrollAreaScrollbar.displayName;var jo=(0,wt.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ee({className:e,variant:t,...o}){return(0,ze.jsx)("div",{className:c(jo({variant:t}),e),...o})}var K=require("motion/react");var Mt={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]};function Ze(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function It({capabilities:e,isOpen:t,onToggle:o,onActionSelect:a,onContextChange:s,colorScheme:n=Mt,className:l}){let[i,p]=(0,J.useState)([]),[f,y]=(0,J.useState)([]),m=i[i.length-1],v=m?.children||e,S=(C,L)=>{switch(C.type){case"category":return n.categories[L%n.categories.length];case"list":return n.lists[L%n.lists.length];case"item":return n.items[L%n.items.length];default:return n.primary}},P=(0,J.useMemo)(()=>({path:i,selectedItems:f,filters:{}}),[i,f]);(0,J.useEffect)(()=>{s&&s(P)},[P,s]);let w=C=>{C.type==="category"||C.type==="list"?p([...i,C]):C.type==="item"&&y([...f,C])},x=()=>{p(i.slice(0,-1))},R=C=>{p(i.slice(0,C+1))},B=()=>m?.actions?m.actions:[];return t?(0,ze.jsxs)("div",{className:c("w-full",l),children:[(0,ze.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ze.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,ze.jsx)(K.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:x,className:c("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ze.jsx)(A.ChevronLeft,{className:c("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ze.jsx)("h4",{className:"font-medium text-sm",children:m?.name||"Capabilities"})]}),(0,ze.jsx)(K.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:o,className:c("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ze.jsx)(A.X,{className:c("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,ze.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ze.jsx)(K.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>p([]),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ze.jsxs)("span",{className:"relative",children:["Capabilities",(0,ze.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),i.map((C,L)=>(0,ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ze.jsx)(A.ChevronRight,{className:"h-2 w-2"}),(0,ze.jsx)(K.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>R(L),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ze.jsxs)("span",{className:"relative",children:[C.name,(0,ze.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,ze.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,ze.jsx)(K.AnimatePresence,{mode:"wait",children:(0,ze.jsx)(K.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:m?.type==="list"&&m.data?(0,ze.jsx)(qo,{data:m.data,onItemSelect:C=>y([...f,C]),colorScheme:n}):(0,ze.jsx)(Wo,{capabilities:v,onSelect:w,colorScheme:n})},m?.id||"root")})})]}):(0,ze.jsxs)(V,{onClick:o,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ze.jsx)(A.Menu,{className:"h-4 w-4"}),(0,ze.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Wo({capabilities:e,onSelect:t,colorScheme:o}){return(0,ze.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,s)=>(0,ze.jsx)(_o,{capability:a,onClick:()=>t(a),color:o.categories[s%o.categories.length]},a.id))})}function _o({capability:e,onClick:t,selected:o,color:a}){return(0,ze.jsxs)(K.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:c("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",o&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,ze.jsx)("div",{className:c("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a)}),(0,ze.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ze.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,ze.jsx)(A.ChevronRight,{className:c("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,ze.jsx)(ee,{variant:"secondary",className:c("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function qo({data:e,onItemSelect:t,colorScheme:o}){return(0,ze.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,s)=>(0,ze.jsxs)(K.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:c("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(a),children:[(0,ze.jsx)("div",{className:c("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o.items[s%o.items.length])}),(0,ze.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ze.jsxs)("span",{className:"truncate relative font-medium",children:[a.title,(0,ze.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),a.subtitle&&(0,ze.jsx)("div",{className:c("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:a.subtitle})]}),a.value&&(0,ze.jsx)(ee,{variant:"secondary",className:c("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:a.value})]},a.id))})}var Et=require("date-fns");function Lt({taskId:e,polling:t=!0,system:o="payload"}){let[a,s]=(0,J.useState)(null),[n,l]=(0,J.useState)(!1),[i,p]=(0,J.useState)(null),f=async(m=!0)=>{if(e){m&&l(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let S=await v.json();s(S)}catch(v){console.error("Error fetching task:",v),p(v instanceof Error?v:new Error("Unknown error occurred"))}finally{m&&l(!1)}}},y=()=>f(!1);return(0,J.useEffect)(()=>{e&&f(!0);let m=null;return e&&t&&(m=setInterval(y,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:a,loading:n,error:i}}var Ko=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Jo=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Bt({data:e}){let{id:t,system:o,fetchLatest:a,taskData:s,error:n}=e||{};if(!t)return null;let l=null,i=!0,p=n,f=a!==void 0?a:!0;if(l=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:a,system:o,fetchLatest:f,taskData:l,error:p}),f){let{task:S,loading:P,error:w}=Lt({taskId:t,system:o});l=S,i=P,p=w}else i=!1;let y=Ko(l?.status||"todo"),m=Jo(l?.status||"todo"),v=l?.dateLogged||new Date().toISOString();try{let S=new Date(l?.dateLogged||"");isNaN(S.getTime())||(v=(0,Et.formatDistanceToNow)(S,{addSuffix:!0}))}catch{}return(0,ze.jsxs)(_,{className:c("w-full max-w-md shadow-md",p&&"border border-destructive"),children:[(0,ze.jsxs)(Y,{className:"pb-2",children:[(0,ze.jsxs)("div",{className:"flex justify-between items-start",children:[(0,ze.jsx)(Z,{className:"text-lg font-semibold",children:i?"Loading...":l?.name||"Task"}),(0,ze.jsx)(ee,{className:`${y}`,children:m})]}),l?.project&&(0,ze.jsxs)(Je,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,ze.jsx)(q,{className:"pb-2",children:i?(0,ze.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):p?(0,ze.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ze.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,ze.jsx)(Re,{className:"pt-2 flex items-center justify-between",children:(0,ze.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ze.jsx)(A.Clock,{className:"h-3 w-3 mr-1"}),(0,ze.jsxs)("span",{children:["Created ",v]}),(0,ze.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ze.jsxs)("span",{children:["Task #",t]})]})})]})}function Ot({artefact:e,taskId:t,taskData:o,loading:a=!1,error:s=null}){let n=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=n.dateLogged;try{let i=new Date(n.dateLogged);isNaN(i.getTime())||(l=(0,Et.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,ze.jsxs)(_,{className:"w-full max-w-md shadow-md",children:[(0,ze.jsx)(Y,{className:"pb-2",children:(0,ze.jsx)("div",{className:"flex justify-between items-start",children:(0,ze.jsx)(Z,{className:"text-lg font-semibold",children:a?"Loading...":n.name})})}),(0,ze.jsx)(q,{className:"pb-2",children:a?(0,ze.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,ze.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ze.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,ze.jsx)(Re,{className:"pt-2 flex items-center justify-between",children:(0,ze.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ze.jsx)(A.Clock,{className:"h-3 w-3 mr-1"}),(0,ze.jsxs)("span",{children:["Created ",l]}),(0,ze.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ze.jsxs)("span",{children:["Task #",n.id]})]})})]})}var Vt=$(require("react"));var Ft=({isOpen:e=!0,authUrl:t,onClose:o,onSuccess:a,description:s="This endpoint requires authentication to sync functions."})=>{let[n,l]=(0,J.useState)(!1),[i,p]=(0,J.useState)(""),f=()=>{if(!t){p("No authentication URL provided");return}l(!0),p("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!m){p("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let v=setInterval(()=>{try{m.closed&&(clearInterval(v),l(!1),a(),o())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(v),l(!1),p("Authentication timed out. Please try again."))},6e5)}catch{p("Failed to open authentication window"),l(!1)}},y=async()=>{try{await navigator.clipboard.writeText(t),p("")}catch{p("Failed to copy URL to clipboard")}};return e?(0,ze.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center ze-[1000]",children:(0,ze.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,ze.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,ze.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),i&&(0,ze.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:i}),(0,ze.jsxs)("div",{className:"flex gap-2",children:[(0,ze.jsx)("button",{onClick:f,disabled:n||!t,className:`
7
7
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
8
8
  ${n||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
9
- `,children:n?"Authenticating...":"Authenticate"}),(0,He.jsx)("button",{onClick:y,disabled:!t,className:`
9
+ `,children:n?"Authenticating...":"Authenticate"}),(0,ze.jsx)("button",{onClick:y,disabled:!t,className:`
10
10
  px-4 py-2 text-white border-none rounded text-sm
11
11
  ${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
12
- `,children:"Copy URL"}),(0,He.jsx)("button",{onClick:o,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var ot=({toolPart:e,index:t,addToolResult:o})=>{let[a,s]=Vt.default.useState(!0),n=()=>{o(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,He.jsxs)("div",{className:"mb-2",children:[(0,He.jsx)(Ft,{isOpen:a,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:n,description:e.output?.reason||e.input?.reason}),!a&&(0,He.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,He.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,He.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,He.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,He.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var $t=require("marked"),Ut=$(require("react-markdown"));function Qo(e){return $t.marked.lexer(e).map(o=>o.raw)}var Gt=(0,J.memo)(({content:e})=>(0,He.jsx)(Ut.default,{children:e}),(e,t)=>e.content===t.content);Gt.displayName="MemoizedMarkdownBlock";var rt=(0,J.memo)(({content:e,id:t})=>(0,J.useMemo)(()=>Qo(e),[e]).map((a,s)=>(0,He.jsx)(Gt,{content:a},`${t}-block_${s}`)));rt.displayName="PartText";var nt=$(require("react"));var Wt=({isOpen:e=!0,reason:t,onClose:o,onApprove:a,onDeny:s,title:n="Approval Required"})=>{let[l,i]=(0,J.useState)(!1),p=()=>{i(!0),a(),o()},f=()=>{i(!0),s(),o()},y=()=>{i(!0),s(),o()};return e?(0,He.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,He.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:n}),(0,He.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,He.jsxs)("div",{className:"flex gap-2",children:[(0,He.jsx)("button",{onClick:p,disabled:l,className:`
12
+ `,children:"Copy URL"}),(0,ze.jsx)("button",{onClick:o,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var tt=({toolPart:e,index:t,addToolResult:o})=>{let[a,s]=Vt.default.useState(!0),n=()=>{o(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,ze.jsxs)("div",{className:"mb-2",children:[(0,ze.jsx)(Ft,{isOpen:a,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:n,description:e.output?.reason||e.input?.reason}),!a&&(0,ze.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,ze.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,ze.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,ze.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,ze.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var $t=require("marked"),Ut=$(require("react-markdown"));function Qo(e){return $t.marked.lexer(e).map(o=>o.raw)}var Gt=(0,J.memo)(({content:e})=>(0,ze.jsx)(Ut.default,{children:e}),(e,t)=>e.content===t.content);Gt.displayName="MemoizedMarkdownBlock";var ot=(0,J.memo)(({content:e,id:t})=>(0,J.useMemo)(()=>Qo(e),[e]).map((a,s)=>(0,ze.jsx)(Gt,{content:a},`${t}-block_${s}`)));ot.displayName="PartText";var at=$(require("react"));var Wt=({isOpen:e=!0,reason:t,onClose:o,onApprove:a,onDeny:s,title:n="Approval Required"})=>{let[l,i]=(0,J.useState)(!1),p=()=>{i(!0),a(),o()},f=()=>{i(!0),s(),o()},y=()=>{i(!0),s(),o()};return e?(0,ze.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,ze.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:n}),(0,ze.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,ze.jsxs)("div",{className:"flex gap-2",children:[(0,ze.jsx)("button",{onClick:p,disabled:l,className:`
13
13
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
14
14
  ${l?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
15
- `,children:l?"Processing...":"Approve"}),(0,He.jsx)("button",{onClick:f,disabled:l,className:`
15
+ `,children:l?"Processing...":"Approve"}),(0,ze.jsx)("button",{onClick:f,disabled:l,className:`
16
16
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
17
17
  ${l?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
18
- `,children:l?"Processing...":"Deny"}),(0,He.jsx)("button",{onClick:y,disabled:l,className:`
18
+ `,children:l?"Processing...":"Deny"}),(0,ze.jsx)("button",{onClick:y,disabled:l,className:`
19
19
  px-4 py-2 text-white border-none rounded text-sm
20
20
  ${l?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
21
- `,children:"Cancel"})]})]}):null};var _t=({toolPart:e,index:t,addToolResult:o})=>{let[a,s]=nt.default.useState(!0),[n,l]=nt.default.useState(null),i=()=>{o(e.input?.toolCallId,e.input?.tool,"Approved"),s(!1),l("approve")},p=()=>{o(e.input?.toolCallId,e.input?.tool,"Denied"),s(!1),l("deny")};switch(e.state){case"input-available":return(0,He.jsxs)("div",{className:"mb-2",children:[(0,He.jsx)(Wt,{isOpen:a,onApprove:i,onDeny:p,onClose:()=>s(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,He.jsxs)(He.Fragment,{children:[n==="approve"&&(0,He.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,He.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,He.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,He.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),n==="deny"&&(0,He.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,He.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,He.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,He.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,He.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var st=require("@radix-ui/react-use-controllable-state");var xe=$(require("@radix-ui/react-collapsible")),Oe=xe.Root,Fe=xe.CollapsibleTrigger,Ve=xe.CollapsibleContent;var Kt=require("streamdown"),Se=(0,J.memo)(({className:e,...t})=>(0,He.jsx)(Kt.Streamdown,{className:c("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Se.displayName="Response";var Qt=(0,J.createContext)(null),Xo=()=>{let e=(0,J.useContext)(Qt);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},Yo=1e3,Zo=1e3,it=(0,J.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:s,duration:n,children:l,...i})=>{let[p,f]=(0,st.useControllableState)({prop:o,defaultProp:a,onChange:s}),[y,m]=(0,st.useControllableState)({prop:n,defaultProp:0}),[v,S]=(0,J.useState)(!1),[P,w]=(0,J.useState)(null);(0,J.useEffect)(()=>{t?P===null&&w(Date.now()):P!==null&&(m(Math.ceil((Date.now()-P)/Zo)),w(null))},[t,P,m]),(0,J.useEffect)(()=>{if(a&&!t&&p&&!v){let R=setTimeout(()=>{f(!1),S(!0)},Yo);return()=>clearTimeout(R)}},[t,p,a,f,v]);let x=R=>{f(R)};return(0,He.jsx)(Qt.Provider,{value:{isStreaming:t,isOpen:p,setIsOpen:f,duration:y},children:(0,He.jsx)(Oe,{className:c("not-prose mb-4",e),onOpenChange:x,open:p,...i,children:l})})}),er=(e,t)=>e||t===0?(0,He.jsx)("p",{children:"Thinking..."}):t===void 0?(0,He.jsx)("p",{children:"Thought for a few seconds"}):(0,He.jsxs)("p",{children:["Thought for ",t," seconds"]}),lt=(0,J.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:s,duration:n}=Xo();return(0,He.jsx)(Fe,{className:c("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)($e.BrainIcon,{className:"size-4"}),er(a,n),(0,He.jsx)($e.ChevronDownIcon,{className:c("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),ct=(0,J.memo)(({className:e,children:t,...o})=>(0,He.jsx)(Ve,{className:c("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,He.jsx)(Se,{className:"grid gap-2",children:t})}));it.displayName="Reasoning";lt.displayName="ReasoningTrigger";ct.displayName="ReasoningContent";var dt=require("react-syntax-highlighter"),Ge=require("react-syntax-highlighter/dist/esm/styles/prism"),tr=(0,J.createContext)({code:""}),je=({code:e,language:t,showLineNumbers:o=!1,className:a,children:s,...n})=>(0,He.jsx)(tr.Provider,{value:{code:e},children:(0,He.jsx)("div",{className:c("relative w-full overflow-hidden rounded-md border bg-background text-foreground",a),...n,children:(0,He.jsxs)("div",{className:"relative",children:[(0,He.jsx)(dt.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Ge.oneLight,children:e}),(0,He.jsx)(dt.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Ge.oneDark,children:e}),s&&(0,He.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:s})]})})});var Yt=({className:e,...t})=>(0,He.jsx)(Oe,{className:c("not-prose mb-4 w-full rounded-md border",e),...t}),or=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,He.jsxs)(ee,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,He.jsx)(A.CircleIcon,{className:"size-4"}),"input-available":(0,He.jsx)(A.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,He.jsx)(A.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,He.jsx)(A.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Zt=({className:e,type:t,state:o,...a})=>(0,He.jsxs)(Fe,{className:c("flex w-full items-center justify-between gap-4 p-3",e),...a,children:[(0,He.jsxs)("div",{className:"flex items-center gap-2",children:[(0,He.jsx)(A.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,He.jsx)("span",{className:"font-medium text-sm",children:t}),or(o)]}),(0,He.jsx)(A.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),eo=({className:e,...t})=>(0,He.jsx)(Ve,{className:c("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),to=({className:e,input:t,...o})=>(0,He.jsxs)("div",{className:c("space-y-2 overflow-hidden p-4",e),...o,children:[(0,He.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,He.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,He.jsx)(je,{code:JSON.stringify(t,null,2),language:"json"})})]}),oo=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let s=(0,He.jsx)("div",{children:t});return typeof t=="object"?s=(0,He.jsx)(je,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(s=(0,He.jsx)(je,{code:t,language:"json"})),(0,He.jsxs)("div",{className:c("space-y-2 p-4",e),...a,children:[(0,He.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,He.jsxs)("div",{className:c("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,He.jsx)("div",{children:o}),s]})]})};function rr({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:s,fileUploads:n,isDragOver:l,enableFileUpload:i,onInputChange:p,addToolResult:f,onSendMessage:y,onKeyPress:m,onFileUpload:v,onRemoveFile:S,onDragOver:P,className:w}){let x=(0,J.useRef)(null),R=(0,J.useRef)(null),B=(0,J.useRef)(null),[C,L]=(0,J.useState)(!1),[ce,We]=(0,J.useState)({path:[],selectedItems:[],filters:{}});(0,J.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,J.useEffect)(()=>{C&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[C]);let Ce=()=>et(ce),Me=()=>{let d=[];return s.forEach(M=>{M.actions&&M.actions.forEach(E=>{d.push({label:E.label,action:()=>de(E.id,{path:[M],selectedItems:[],filters:{}})})}),M.children&&M.children.forEach(E=>{E.type==="list"&&E.data&&d.push({label:`View ${E.name}`,action:()=>L(!0)})})}),d.slice(0,5)},de=(d,M)=>{console.log("Capability action:",d,M);let E=`Executing ${d} with context: ${JSON.stringify(M.path.map(b=>b.name))}`;L(!1)},Ie=et({path:[],selectedItems:[],filters:{}}),we=d=>{v(d.target.files),d.target.files&&(d.target.value="")},N=d=>{d.preventDefault(),P(!0)},Le=d=>{d.preventDefault(),P(!1)},be=d=>{d.preventDefault(),P(!1),v(d.dataTransfer.files)},De=d=>{if(d===0)return"0 Bytes";let M=1024,E=["Bytes","KB","MB","GB"],b=Math.floor(Math.log(d)/Math.log(M));return parseFloat((d/Math.pow(M,b)).toFixed(2))+" "+E[b]},pe=d=>d.startsWith("image/")?(0,He.jsx)(A.Image,{className:"h-4 w-4"}):d.startsWith("text/")?(0,He.jsx)(A.FileText,{className:"h-4 w-4"}):(0,He.jsx)(A.File,{className:"h-4 w-4"}),Ee=d=>{let M=d.role==="assistant",E=d.role==="user";return(0,He.jsxs)("div",{className:c("flex my-2 items-start gap-3",E?"flex-row-reverse":""),children:[(0,He.jsx)(Te,{className:"h-8 w-8 shrink-0",children:(0,He.jsx)(Pe,{className:c(E?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:E?(0,He.jsx)(A.User,{className:"h-4 w-4"}):(0,He.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,He.jsx)("div",{className:c("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",E?"bg-primary text-primary-foreground":"bg-muted"),children:d.parts.map((b,I)=>{if(b.type==="text")return(0,He.jsx)(rt,{id:d.id,content:b.text},`${d.id}-text`);if(b.type==="file"){let h=b;return(0,He.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,He.jsxs)("div",{className:"flex items-center gap-2",children:[pe(h.mediaType||"application/octet-stream"),(0,He.jsx)("div",{className:"flex-1 min-w-0",children:(0,He.jsx)("p",{className:"text-sm font-medium truncate",children:h.filename||h.url?.split("/").pop()||"File"})}),h.url&&(0,He.jsx)(V,{variant:"ghost",size:"sm",onClick:()=>window.open(h.url,"_blank"),className:"h-8 w-8 p-0",children:(0,He.jsx)(A.Download,{className:"h-4 w-4"})})]})},I)}if(b.type.startsWith("tool-")){let h=b,ae=b.type.replace("tool-","");if(ae==="task")switch(h.state){case"input-available":return(0,He.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},I);case"output-available":return(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsx)(Bt,{data:{id:h.output?.id||h.input?.id,fetchLatest:!1,taskData:h.output||h.input}})},I);case"output-error":return(0,He.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",h.errorText]},I);default:return null}if(b.type==="tool-requestEndpointLogin")return(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsx)(ot,{toolPart:h,index:I,addToolResult:f??(()=>{})})},I);if(b.type==="tool-authenticate")return(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsx)(ot,{toolPart:h,index:I,addToolResult:f??(()=>{})})},I);if(b.type==="tool-requestApproval")return(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsx)(_t,{toolPart:h,index:I,addToolResult:f??(()=>{})})},I);if(ae==="artefact")switch(h.state){case"input-available":return(0,He.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},I);case"output-available":return(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsx)(Ot,{artefact:h.output?.description||"",taskId:h.output?.id||h.input?.id,taskData:h.output||h.input})},I);case"output-error":return(0,He.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",h.errorText]},I);default:return null}return(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsxs)(_,{className:"w-full max-w-md",children:[(0,He.jsx)(Y,{children:(0,He.jsx)(Z,{className:"text-lg",children:ae})}),(0,He.jsxs)(q,{children:[h.state==="input-available"&&(0,He.jsxs)("p",{className:"text-sm",children:["Processing ",ae,"..."]}),h.state==="output-available"&&(0,He.jsx)("pre",{className:"text-sm",children:JSON.stringify(h.output,null,2)}),h.state==="output-error"&&(0,He.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",h.errorText]})]})]})},I)}if(b.type.startsWith("data-")){let h=b,ae=b.type.replace("data-","");return ae==="reference"?(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsx)(_,{className:"w-full",children:(0,He.jsx)(q,{className:"p-4",children:(0,He.jsx)("div",{className:"space-y-2",children:h.data?.references?.map((j,_e)=>(0,He.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,He.jsx)(ee,{variant:"outline",children:j.type||"link"}),(0,He.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,He.jsx)("p",{className:"text-sm font-medium truncate",children:j.title}),j.description&&(0,He.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:j.description})]}),j.url&&(0,He.jsx)(V,{variant:"ghost",size:"sm",onClick:()=>window.open(j.url,"_blank"),className:"h-8 w-8 p-0",children:(0,He.jsx)(A.ExternalLink,{className:"h-4 w-4"})})]},_e))})})})},I):ae==="menu"?(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsxs)(_,{className:"w-full",children:[(0,He.jsx)(Y,{children:(0,He.jsx)(Z,{className:"text-lg",children:h.data?.title})}),(0,He.jsx)(q,{children:(0,He.jsx)("div",{className:"space-y-2",children:h.data?.items?.map((j,_e)=>(0,He.jsx)(V,{variant:"outline",className:"w-full justify-start",onClick:j.action,children:(0,He.jsxs)("div",{className:"text-left",children:[(0,He.jsx)("p",{className:"font-medium",children:j.label}),j.description&&(0,He.jsx)("p",{className:"text-xs text-muted-foreground",children:j.description})]})},_e))})})]})},I):(0,He.jsx)("div",{className:"mb-2",children:(0,He.jsxs)(_,{className:"w-full max-w-md",children:[(0,He.jsx)(Y,{children:(0,He.jsx)(Z,{className:"text-lg",children:ae})}),(0,He.jsx)(q,{children:(0,He.jsx)("pre",{className:"text-sm",children:JSON.stringify(h.data,null,2)})})]})},I)}if(b.type==="reasoning")return(0,He.jsxs)(it,{className:"w-full",isStreaming:status==="streaming"&&I===d.parts.length-1&&d.id===e.He(-1)?.id,children:[(0,He.jsx)(lt,{}),(0,He.jsx)(ct,{children:b.text})]},`${d.id}-${I}`);if(b.type==="dynamic-tool")return(0,He.jsxs)(Yt,{defaultOpen:!0,children:[(0,He.jsx)(Zt,{type:`tool-${b.toolName}`,state:b.state}),(0,He.jsxs)(eo,{children:[(0,He.jsx)(to,{input:b.input}),(0,He.jsx)(oo,{output:(0,He.jsx)(Se,{children:String(b.output)}),errorText:b.errorText})]})]},`${d.id}-${I}`)})})]})};return(0,He.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${w||""}`,children:[(0,He.jsxs)(Ze,{ref:R,className:"flex-1 p-4 bg-background border-0",onDragOver:N,onDragLeave:Le,onDrop:be,children:[(0,He.jsxs)("div",{className:c("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,He.jsx)(fe.animate,{children:e.map(d=>(0,He.jsx)(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:c("flex gap-3",d.role==="user"?"flex-row-reverse":"flex-row"),children:Ee(d)},d.id))}),C&&(0,He.jsxs)(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,He.jsx)(Te,{className:"h-8 w-8",children:(0,He.jsx)(Pe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,He.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,He.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,He.jsx)(It,{capabilities:s,isOpen:C,onToggle:()=>L(!C),onActionSelect:de,className:"w-full"})})]}),o&&(0,He.jsxs)(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,He.jsx)(Te,{className:"h-8 w-8",children:(0,He.jsx)(Pe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,He.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,He.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,He.jsxs)("div",{className:"flex space-x-1",children:[(0,He.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,He.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,He.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,He.jsx)("div",{ref:x})]}),n.length>0&&(0,He.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,He.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(d=>(0,He.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[pe(d.file.type),(0,He.jsx)("span",{className:"text-sm font-medium",children:d.file.name}),(0,He.jsx)("span",{className:"text-xs text-muted-foreground",children:De(d.file.size)}),(0,He.jsx)(V,{variant:"ghost",size:"sm",onClick:()=>S(d.id),className:"h-6 w-6 p-0",children:(0,He.jsx)(A.X,{className:"h-4 w-4"})})]},d.id))})}),(0,He.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,He.jsxs)("div",{className:"flex gap-3",children:[(0,He.jsx)(Xe,{value:t,onChange:d=>p(d.target.value),onKeyPress:m,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),i&&(0,He.jsx)(V,{variant:"outline",size:"icon",onClick:()=>B.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,He.jsx)(A.Paperclip,{className:"h-4 w-4"})}),(0,He.jsx)(V,{onClick:y,disabled:!t.trim()&&n.length===0||o,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,He.jsx)(A.Send,{className:"h-4 w-4"})})]}),(0,He.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,He.jsxs)(V,{onClick:()=>L(!C),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,He.jsx)(A.Menu,{className:"h-3 w-3 mr-1"}),C?"Hide":"Show"," Capabilities"]}),(0,He.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Ce().map((d,M)=>(0,He.jsx)(V,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>de(d.id,ce),children:d.label},`context-${d.id}`)),Ce().length===0&&Me().map((d,M)=>(0,He.jsx)(V,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:d.action,children:d.label},`suggestion-${M}`))]})]}),i&&(0,He.jsx)("input",{ref:B,type:"file",multiple:!0,onChange:we,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
21
+ `,children:"Cancel"})]})]}):null};var _t=({toolPart:e,index:t,addToolResult:o})=>{let[a,s]=at.default.useState(!0),[n,l]=at.default.useState(null),i=()=>{o(e.input?.toolCallId,e.input?.tool,"Approved"),s(!1),l("approve")},p=()=>{o(e.input?.toolCallId,e.input?.tool,"Denied"),s(!1),l("deny")};switch(e.state){case"input-available":return(0,ze.jsxs)("div",{className:"mb-2",children:[(0,ze.jsx)(Wt,{isOpen:a,onApprove:i,onDeny:p,onClose:()=>s(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,ze.jsxs)(ze.Fragment,{children:[n==="approve"&&(0,ze.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,ze.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,ze.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,ze.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),n==="deny"&&(0,ze.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,ze.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,ze.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,ze.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,ze.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var st=require("@radix-ui/react-use-controllable-state");var xe=$(require("@radix-ui/react-collapsible")),He=xe.Root,Oe=xe.CollapsibleTrigger,Fe=xe.CollapsibleContent;var Kt=require("streamdown"),nt=(0,J.memo)(({className:e,...t})=>(0,ze.jsx)(Kt.Streamdown,{className:c("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);nt.displayName="Response";var Qt=(0,J.createContext)(null),Xo=()=>{let e=(0,J.useContext)(Qt);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},Yo=1e3,Zo=1e3,it=(0,J.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:s,duration:n,children:l,...i})=>{let[p,f]=(0,st.useControllableState)({prop:o,defaultProp:a,onChange:s}),[y,m]=(0,st.useControllableState)({prop:n,defaultProp:0}),[v,S]=(0,J.useState)(!1),[P,w]=(0,J.useState)(null);(0,J.useEffect)(()=>{t?P===null&&w(Date.now()):P!==null&&(m(Math.ceil((Date.now()-P)/Zo)),w(null))},[t,P,m]),(0,J.useEffect)(()=>{if(a&&!t&&p&&!v){let R=setTimeout(()=>{f(!1),S(!0)},Yo);return()=>clearTimeout(R)}},[t,p,a,f,v]);let x=R=>{f(R)};return(0,ze.jsx)(Qt.Provider,{value:{isStreaming:t,isOpen:p,setIsOpen:f,duration:y},children:(0,ze.jsx)(He,{className:c("not-prose mb-4",e),onOpenChange:x,open:p,...i,children:l})})}),er=(e,t)=>e||t===0?(0,ze.jsx)("p",{children:"Thinking..."}):t===void 0?(0,ze.jsx)("p",{children:"Thought for a few seconds"}):(0,ze.jsxs)("p",{children:["Thought for ",t," seconds"]}),lt=(0,J.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:s,duration:n}=Xo();return(0,ze.jsx)(Oe,{className:c("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(A.BrainIcon,{className:"size-4"}),er(a,n),(0,ze.jsx)(A.ChevronDownIcon,{className:c("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),ct=(0,J.memo)(({className:e,children:t,...o})=>(0,ze.jsx)(Fe,{className:c("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,ze.jsx)(nt,{className:"grid gap-2",children:t})}));it.displayName="Reasoning";lt.displayName="ReasoningTrigger";ct.displayName="ReasoningContent";var dt=require("react-syntax-highlighter"),Ue=require("react-syntax-highlighter/dist/esm/styles/prism"),tr=(0,$e.createContext)({code:""}),Ge=({code:e,language:t,showLineNumbers:o=!1,className:a,children:s,...n})=>(0,ze.jsx)(tr.Provider,{value:{code:e},children:(0,ze.jsx)("div",{className:c("relative w-full overflow-hidden rounded-md border bg-background text-foreground",a),...n,children:(0,ze.jsxs)("div",{className:"relative",children:[(0,ze.jsx)(dt.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Ue.oneLight,children:e}),(0,ze.jsx)(dt.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Ue.oneDark,children:e}),s&&(0,ze.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:s})]})})});var Yt=({className:e,...t})=>(0,ze.jsx)(He,{className:c("not-prose mb-4 w-full rounded-md border",e),...t}),or=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,ze.jsxs)(ee,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,ze.jsx)(A.CircleIcon,{className:"size-4"}),"input-available":(0,ze.jsx)(A.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,ze.jsx)(A.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,ze.jsx)(A.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Zt=({className:e,type:t,state:o,...a})=>(0,ze.jsxs)(Oe,{className:c("flex w-full items-center justify-between gap-4 p-3",e),...a,children:[(0,ze.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ze.jsx)(A.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,ze.jsx)("span",{className:"font-medium text-sm",children:t}),or(o)]}),(0,ze.jsx)(A.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),eo=({className:e,...t})=>(0,ze.jsx)(Fe,{className:c("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),to=({className:e,input:t,...o})=>(0,ze.jsxs)("div",{className:c("space-y-2 overflow-hidden p-4",e),...o,children:[(0,ze.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,ze.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,ze.jsx)(Ge,{code:JSON.stringify(t,null,2),language:"json"})})]}),oo=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let s=(0,ze.jsx)("div",{children:t});return typeof t=="object"?s=(0,ze.jsx)(Ge,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(s=(0,ze.jsx)(Ge,{code:t,language:"json"})),(0,ze.jsxs)("div",{className:c("space-y-2 p-4",e),...a,children:[(0,ze.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,ze.jsxs)("div",{className:c("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,ze.jsx)("div",{children:o}),s]})]})};function rr({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:s,fileUploads:n,isDragOver:l,enableFileUpload:i,onInputChange:p,addToolResult:f,onSendMessage:y,onKeyPress:m,onFileUpload:v,onRemoveFile:S,onDragOver:P,className:w}){let x=(0,J.useRef)(null),R=(0,J.useRef)(null),B=(0,J.useRef)(null),[C,L]=(0,J.useState)(!1),[ce,je]=(0,J.useState)({path:[],selectedItems:[],filters:{}});(0,J.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,J.useEffect)(()=>{C&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[C]);let Ce=()=>Ze(ce),Se=()=>{let d=[];return s.forEach(M=>{M.actions&&M.actions.forEach(E=>{d.push({label:E.label,action:()=>de(E.id,{path:[M],selectedItems:[],filters:{}})})}),M.children&&M.children.forEach(E=>{E.type==="list"&&E.data&&d.push({label:`View ${E.name}`,action:()=>L(!0)})})}),d.slice(0,5)},de=(d,M)=>{console.log("Capability action:",d,M);let E=`Executing ${d} with context: ${JSON.stringify(M.path.map(b=>b.name))}`;L(!1)},Me=Ze({path:[],selectedItems:[],filters:{}}),we=d=>{v(d.target.files),d.target.files&&(d.target.value="")},N=d=>{d.preventDefault(),P(!0)},Ie=d=>{d.preventDefault(),P(!1)},be=d=>{d.preventDefault(),P(!1),v(d.dataTransfer.files)},Le=d=>{if(d===0)return"0 Bytes";let M=1024,E=["Bytes","KB","MB","GB"],b=Math.floor(Math.log(d)/Math.log(M));return parseFloat((d/Math.pow(M,b)).toFixed(2))+" "+E[b]},pe=d=>d.startsWith("image/")?(0,ze.jsx)(A.Image,{className:"h-4 w-4"}):d.startsWith("text/")?(0,ze.jsx)(A.FileText,{className:"h-4 w-4"}):(0,ze.jsx)(A.File,{className:"h-4 w-4"}),De=d=>{let M=d.role==="assistant",E=d.role==="user";return(0,ze.jsxs)("div",{className:c("flex my-2 items-start gap-3",E?"flex-row-reverse":""),children:[(0,ze.jsx)(Te,{className:"h-8 w-8 shrink-0",children:(0,ze.jsx)(Pe,{className:c(E?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:E?(0,ze.jsx)(A.User,{className:"h-4 w-4"}):(0,ze.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,ze.jsx)("div",{className:c("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",E?"bg-primary text-primary-foreground":"bg-muted"),children:d.parts.map((b,I)=>{if(b.type==="text")return(0,ze.jsx)(ot,{id:d.id,content:b.text},`${d.id}-text`);if(b.type==="file"){let h=b;return(0,ze.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,ze.jsxs)("div",{className:"flex items-center gap-2",children:[pe(h.mediaType||"application/octet-stream"),(0,ze.jsx)("div",{className:"flex-1 min-w-0",children:(0,ze.jsx)("p",{className:"text-sm font-medium truncate",children:h.filename||h.url?.split("/").pop()||"File"})}),h.url&&(0,ze.jsx)(V,{variant:"ghost",size:"sm",onClick:()=>window.open(h.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ze.jsx)(A.Download,{className:"h-4 w-4"})})]})},I)}if(b.type.startsWith("tool-")){let h=b,ae=b.type.replace("tool-","");if(ae==="task")switch(h.state){case"input-available":return(0,ze.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},I);case"output-available":return(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsx)(Bt,{data:{id:h.output?.id||h.input?.id,fetchLatest:!1,taskData:h.output||h.input}})},I);case"output-error":return(0,ze.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",h.errorText]},I);default:return null}if(b.type==="tool-requestEndpointLogin")return(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsx)(tt,{toolPart:h,index:I,addToolResult:f??(()=>{})})},I);if(b.type==="tool-authenticate")return(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsx)(tt,{toolPart:h,index:I,addToolResult:f??(()=>{})})},I);if(b.type==="tool-requestApproval")return(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsx)(_t,{toolPart:h,index:I,addToolResult:f??(()=>{})})},I);if(ae==="artefact")switch(h.state){case"input-available":return(0,ze.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},I);case"output-available":return(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsx)(Ot,{artefact:h.output?.description||"",taskId:h.output?.id||h.input?.id,taskData:h.output||h.input})},I);case"output-error":return(0,ze.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",h.errorText]},I);default:return null}return(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsxs)(_,{className:"w-full max-w-md",children:[(0,ze.jsx)(Y,{children:(0,ze.jsx)(Z,{className:"text-lg",children:ae})}),(0,ze.jsxs)(q,{children:[h.state==="input-available"&&(0,ze.jsxs)("p",{className:"text-sm",children:["Processing ",ae,"..."]}),h.state==="output-available"&&(0,ze.jsx)("pre",{className:"text-sm",children:JSON.stringify(h.output,null,2)}),h.state==="output-error"&&(0,ze.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",h.errorText]})]})]})},I)}if(b.type.startsWith("data-")){let h=b,ae=b.type.replace("data-","");return ae==="reference"?(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsx)(_,{className:"w-full",children:(0,ze.jsx)(q,{className:"p-4",children:(0,ze.jsx)("div",{className:"space-y-2",children:h.data?.references?.map((j,We)=>(0,ze.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,ze.jsx)(ee,{variant:"outline",children:j.type||"link"}),(0,ze.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ze.jsx)("p",{className:"text-sm font-medium truncate",children:j.title}),j.description&&(0,ze.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:j.description})]}),j.url&&(0,ze.jsx)(V,{variant:"ghost",size:"sm",onClick:()=>window.open(j.url,"_blank"),className:"h-8 w-8 p-0",children:(0,ze.jsx)(A.ExternalLink,{className:"h-4 w-4"})})]},We))})})})},I):ae==="menu"?(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsxs)(_,{className:"w-full",children:[(0,ze.jsx)(Y,{children:(0,ze.jsx)(Z,{className:"text-lg",children:h.data?.title})}),(0,ze.jsx)(q,{children:(0,ze.jsx)("div",{className:"space-y-2",children:h.data?.items?.map((j,We)=>(0,ze.jsx)(V,{variant:"outline",className:"w-full justify-start",onClick:j.action,children:(0,ze.jsxs)("div",{className:"text-left",children:[(0,ze.jsx)("p",{className:"font-medium",children:j.label}),j.description&&(0,ze.jsx)("p",{className:"text-xs text-muted-foreground",children:j.description})]})},We))})})]})},I):(0,ze.jsx)("div",{className:"mb-2",children:(0,ze.jsxs)(_,{className:"w-full max-w-md",children:[(0,ze.jsx)(Y,{children:(0,ze.jsx)(Z,{className:"text-lg",children:ae})}),(0,ze.jsx)(q,{children:(0,ze.jsx)("pre",{className:"text-sm",children:JSON.stringify(h.data,null,2)})})]})},I)}if(b.type==="reasoning")return(0,ze.jsxs)(it,{className:"w-full",isStreaming:status==="streaming"&&I===d.parts.length-1&&d.id===e.at(-1)?.id,children:[(0,ze.jsx)(lt,{}),(0,ze.jsx)(ct,{children:b.text})]},`${d.id}-${I}`);if(b.type==="dynamic-tool")return(0,ze.jsxs)(Yt,{defaultOpen:!0,children:[(0,ze.jsx)(Zt,{type:`tool-${b.toolName}`,state:b.state}),(0,ze.jsxs)(eo,{children:[(0,ze.jsx)(to,{input:b.input}),(0,ze.jsx)(oo,{output:b.output,errorText:b.errorText})]})]},`${d.id}-${I}`)})})]})};return(0,ze.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${w||""}`,children:[(0,ze.jsxs)(Ye,{ref:R,className:"flex-1 p-4 bg-background border-0",onDragOver:N,onDragLeave:Ie,onDrop:be,children:[(0,ze.jsxs)("div",{className:c("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,ze.jsx)(fe.animate,{children:e.map(d=>(0,ze.jsx)(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:c("flex gap-3",d.role==="user"?"flex-row-reverse":"flex-row"),children:De(d)},d.id))}),C&&(0,ze.jsxs)(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,ze.jsx)(Te,{className:"h-8 w-8",children:(0,ze.jsx)(Pe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ze.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,ze.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ze.jsx)(It,{capabilities:s,isOpen:C,onToggle:()=>L(!C),onActionSelect:de,className:"w-full"})})]}),o&&(0,ze.jsxs)(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,ze.jsx)(Te,{className:"h-8 w-8",children:(0,ze.jsx)(Pe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ze.jsx)(A.Bot,{className:"h-4 w-4"})})}),(0,ze.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ze.jsxs)("div",{className:"flex space-x-1",children:[(0,ze.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,ze.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,ze.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,ze.jsx)("div",{ref:x})]}),n.length>0&&(0,ze.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,ze.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(d=>(0,ze.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[pe(d.file.type),(0,ze.jsx)("span",{className:"text-sm font-medium",children:d.file.name}),(0,ze.jsx)("span",{className:"text-xs text-muted-foreground",children:Le(d.file.size)}),(0,ze.jsx)(V,{variant:"ghost",size:"sm",onClick:()=>S(d.id),className:"h-6 w-6 p-0",children:(0,ze.jsx)(A.X,{className:"h-4 w-4"})})]},d.id))})}),(0,ze.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,ze.jsxs)("div",{className:"flex gap-3",children:[(0,ze.jsx)(Qe,{value:t,onChange:d=>p(d.target.value),onKeyPress:m,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),i&&(0,ze.jsx)(V,{variant:"outline",size:"icon",onClick:()=>B.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ze.jsx)(A.Paperclip,{className:"h-4 w-4"})}),(0,ze.jsx)(V,{onClick:y,disabled:!t.trim()&&n.length===0||o,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,ze.jsx)(A.Send,{className:"h-4 w-4"})})]}),(0,ze.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,ze.jsxs)(V,{onClick:()=>L(!C),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,ze.jsx)(A.Menu,{className:"h-3 w-3 mr-1"}),C?"Hide":"Show"," Capabilities"]}),(0,ze.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Ce().map((d,M)=>(0,ze.jsx)(V,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>de(d.id,ce),children:d.label},`context-${d.id}`)),Ce().length===0&&Se().map((d,M)=>(0,ze.jsx)(V,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:d.action,children:d.label},`suggestion-${M}`))]})]}),i&&(0,ze.jsx)("input",{ref:B,type:"file",multiple:!0,onChange:we,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
@@ -1 +1 @@
1
- import{a}from"../../chunk-OGAY4DL2.mjs";import"../../chunk-5Y6FKL5W.mjs";import"../../chunk-EW6KWAHS.mjs";import"../../chunk-UGBDJDPW.mjs";import"../../chunk-ZN7NNMB7.mjs";import"../../chunk-3BG2SCNC.mjs";import"../../chunk-6OT5PQXV.mjs";import"../../chunk-SIL7AP7H.mjs";import"../../chunk-QM5FOQHG.mjs";import"../../chunk-6OCLRAHU.mjs";import"../../chunk-2LINLX4S.mjs";import"../../chunk-DBY4SXQI.mjs";import"../../chunk-I2PVJQQR.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-Q2DPE66H.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as ChatInterface};
1
+ import{a}from"../../chunk-U6E6BMAF.mjs";import"../../chunk-5Y6FKL5W.mjs";import"../../chunk-EW6KWAHS.mjs";import"../../chunk-UGBDJDPW.mjs";import"../../chunk-ZN7NNMB7.mjs";import"../../chunk-3BG2SCNC.mjs";import"../../chunk-6OT5PQXV.mjs";import"../../chunk-SIL7AP7H.mjs";import"../../chunk-QM5FOQHG.mjs";import"../../chunk-6OCLRAHU.mjs";import"../../chunk-2LINLX4S.mjs";import"../../chunk-I2PVJQQR.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-DBY4SXQI.mjs";import"../../chunk-Q2DPE66H.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as ChatInterface};