cortex-react-components 2.13.0 → 2.13.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 (82) hide show
  1. package/dist/chunk-2UNIT7NC.mjs +4 -0
  2. package/dist/{chunk-JCWFPKF3.mjs → chunk-5EQXJS23.mjs} +1 -1
  3. package/dist/{chunk-TTWEHUP5.mjs → chunk-6MSM3CZ6.mjs} +1 -1
  4. package/dist/{chunk-RS4VD3ML.mjs → chunk-6R6NYDWN.mjs} +1 -1
  5. package/dist/{chunk-UBJT7MPU.mjs → chunk-A7SGFSI5.mjs} +1 -1
  6. package/dist/chunk-CDVRH3MC.mjs +4 -0
  7. package/dist/chunk-CJ6APTVT.mjs +4 -0
  8. package/dist/{chunk-PMJGTB6S.mjs → chunk-CR326IJ6.mjs} +1 -1
  9. package/dist/{chunk-TVTTUSWM.mjs → chunk-E2OSUDXP.mjs} +1 -1
  10. package/dist/{chunk-JMIUGRDN.mjs → chunk-GGJZVAC4.mjs} +1 -1
  11. package/dist/{chunk-LAQ3QAUW.mjs → chunk-ITJH72Z2.mjs} +1 -1
  12. package/dist/{chunk-RVHCTANZ.mjs → chunk-KCEJXXM2.mjs} +1 -1
  13. package/dist/{chunk-7R47MHQE.mjs → chunk-KIYBEYSU.mjs} +1 -1
  14. package/dist/{chunk-RXUCV64J.mjs → chunk-NSJPZJQF.mjs} +1 -1
  15. package/dist/{chunk-E5LTCCBN.mjs → chunk-O57JJTH5.mjs} +1 -1
  16. package/dist/chunk-TKCFCYEQ.mjs +4 -0
  17. package/dist/components/Blocks/index.mjs +1 -1
  18. package/dist/components/CRM/index.mjs +1 -1
  19. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  20. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  21. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  22. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  23. package/dist/components/DigitalColleagues/index.js +1 -1
  24. package/dist/components/DigitalColleagues/index.mjs +1 -1
  25. package/dist/components/Foundary/MainPage.mjs +1 -1
  26. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  27. package/dist/components/Foundary/Views/KnowledgeView.docs.js +40 -17
  28. package/dist/components/Foundary/Views/KnowledgeView.docs.mjs +40 -17
  29. package/dist/components/Foundary/Views/TeamsIndexView.d.ts +3 -3
  30. package/dist/components/Foundary/Views/TeamsIndexView.js +2 -2
  31. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  32. package/dist/components/Foundary/Views/index.js +1 -1
  33. package/dist/components/Foundary/Views/index.mjs +1 -1
  34. package/dist/components/Foundary/index.js +1 -1
  35. package/dist/components/Foundary/index.mjs +1 -1
  36. package/dist/components/Foundary/team-form.d.ts +1 -1
  37. package/dist/components/Foundary/team-form.js +2 -2
  38. package/dist/components/Foundary/team-form.mjs +1 -1
  39. package/dist/components/Foundary/types.d.ts +9 -0
  40. package/dist/components/HeaderFooter/Header.mjs +1 -1
  41. package/dist/components/HeaderFooter/index.mjs +1 -1
  42. package/dist/components/Heros/RenderHero.mjs +1 -1
  43. package/dist/components/Heros/index.mjs +1 -1
  44. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  45. package/dist/components/Holidays/index.mjs +1 -1
  46. package/dist/components/Layouts/SlideShow.mjs +1 -1
  47. package/dist/components/Layouts/index.mjs +1 -1
  48. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  49. package/dist/components/Projects/ProjectPage.mjs +1 -1
  50. package/dist/components/Projects/ProjectView.mjs +1 -1
  51. package/dist/components/Projects/ProjectsIndexView.d.ts +3 -3
  52. package/dist/components/Projects/ProjectsIndexView.js +2 -2
  53. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  54. package/dist/components/Projects/index.mjs +1 -1
  55. package/dist/components/Projects/project-form.d.ts +3 -3
  56. package/dist/components/Projects/project-form.js +1 -1
  57. package/dist/components/Projects/project-form.mjs +1 -1
  58. package/dist/components/dc-temp/index.mjs +1 -1
  59. package/dist/components/index.js +10 -10
  60. package/dist/components/index.mjs +1 -1
  61. package/dist/index.js +16 -16
  62. package/dist/index.mjs +1 -1
  63. package/dist/metafile-cjs.json +1 -1
  64. package/dist/metafile-esm.json +1 -1
  65. package/dist/pages/Blog.mjs +1 -1
  66. package/dist/pages/Documentation.mjs +1 -1
  67. package/dist/pages/IndexPage.mjs +1 -1
  68. package/dist/pages/Intranet.mjs +1 -1
  69. package/dist/pages/LandingPage.mjs +1 -1
  70. package/dist/pages/Page.mjs +1 -1
  71. package/dist/pages/Publish.mjs +1 -1
  72. package/dist/pages/Website.mjs +1 -1
  73. package/dist/sections/BlogDetail.mjs +1 -1
  74. package/dist/sections/ContactSection.mjs +1 -1
  75. package/dist/sections/PageSections.mjs +1 -1
  76. package/dist/sections/ServiceSection.mjs +1 -1
  77. package/dist/sections/index.mjs +1 -1
  78. package/package.json +1 -1
  79. package/dist/chunk-2XMVNXF6.mjs +0 -4
  80. package/dist/chunk-62G4REJ3.mjs +0 -4
  81. package/dist/chunk-CXCDV7VP.mjs +0 -4
  82. package/dist/chunk-UAEEBFHJ.mjs +0 -4
@@ -4,23 +4,23 @@
4
4
  'use strict'
5
5
  'use client';
6
6
 
7
- "use strict";var db=Object.create;var Qn=Object.defineProperty;var cb=Object.getOwnPropertyDescriptor;var mb=Object.getOwnPropertyNames;var pb=Object.getPrototypeOf,ub=Object.prototype.hasOwnProperty;var gb=(e,t)=>{for(var a in t)Qn(e,a,{get:t[a],enumerable:!0})},Dp=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of mb(t))!ub.call(e,s)&&s!==a&&Qn(e,s,{get:()=>t[s],enumerable:!(o=cb(t,s))||o.enumerable});return e};var E=(e,t,a)=>(a=e!=null?db(pb(e)):{},Dp(t||!e||!e.__esModule?Qn(a,"default",{value:e,enumerable:!0}):a,e)),fb=e=>Dp(Qn({},"__esModule",{value:!0}),e);var wy={};gb(wy,{Alert:()=>Fc,AlertDescription:()=>jc,AlertTitle:()=>zc,AppHeader:()=>Fn,AppSidebar:()=>Ys,AppSidebarLeft:()=>kd,ApproveLeave:()=>Im,Avatar:()=>Nt,AvatarFallback:()=>wt,AvatarImage:()=>da,Badge:()=>K,BannerBlock:()=>Kc,BrandLogo:()=>us,Breadcrumb:()=>qi,BreadcrumbEllipsis:()=>tc,BreadcrumbItem:()=>ci,BreadcrumbLink:()=>Ji,BreadcrumbList:()=>Yi,BreadcrumbPage:()=>Qi,BreadcrumbSeparator:()=>Zi,Breadcrumbs:()=>f0,Button:()=>y,CMSLink:()=>zo,CRMCogeBoard:()=>A0,CRMKanbanBoard:()=>P0,Calendar:()=>ls,CalendarView:()=>Fm,CallToActionBlock:()=>Hs,CallToActionBlockOld:()=>bh,CapabilityMenu:()=>Wm,Card:()=>F,CardContent:()=>_,CardDescription:()=>bo,CardFooter:()=>Za,CardHeader:()=>ge,CardTitle:()=>be,Categories:()=>i0,ChatCardArtefact:()=>Um,ChatCardTask:()=>Ln,ChatInterface:()=>fd,ChatInterfaceMessages:()=>F0,ChatMessage:()=>Hm,Checkbox:()=>Ga,CodeBlock:()=>qc,Collapsible:()=>go,CollapsibleContent:()=>er,CollapsibleTrigger:()=>Zo,ColleagueCard:()=>Ei,ColleagueForm:()=>jn,ColleagueTypeSelection:()=>Pd,ColleaguesView:()=>Kn,CollectionArchive:()=>Gh,Command:()=>gl,CommandDialog:()=>Cu,CommandEmpty:()=>Ic,CommandGroup:()=>Mc,CommandInput:()=>Rc,CommandItem:()=>Lc,CommandList:()=>Ac,CommandSeparator:()=>Bc,CommandShortcut:()=>Ec,CommentSection:()=>Jm,Container:()=>Nm,ContentBlock:()=>wn,ContentCard:()=>Th,CopilotInterface:()=>_0,CopyButton:()=>Wc,CustomLink:()=>ho,CustomerCard:()=>eg,DCProjectCard:()=>Ui,DarkTop:()=>om,DashboardHeader:()=>ev,DashboardHero:()=>Tt,DashboardPage:()=>lp,DealCard:()=>zm,DealDetails:()=>Mn,DeliveryLeadSubmission:()=>bd,DeliveryLeadSubmissionList:()=>yd,DeliveryLeadSubmissionWithList:()=>qf,Dialog:()=>Pt,DialogClose:()=>pl,DialogContent:()=>xt,DialogDescription:()=>Fs,DialogFooter:()=>Es,DialogHeader:()=>Rt,DialogOverlay:()=>ul,DialogPortal:()=>Tc,DialogTitle:()=>At,DialogTrigger:()=>Nu,DigitalColleageusLayout:()=>Dd,DigitalColleagueClone:()=>Td,DigitalColleagueOptions:()=>Rd,DocumentEdit:()=>zd,DocumentPreview:()=>jd,DropdownMenu:()=>Zr,DropdownMenuCheckboxItem:()=>rc,DropdownMenuContent:()=>xr,DropdownMenuGroup:()=>zp,DropdownMenuItem:()=>fo,DropdownMenuLabel:()=>en,DropdownMenuPortal:()=>jp,DropdownMenuRadioGroup:()=>Op,DropdownMenuRadioItem:()=>sc,DropdownMenuSeparator:()=>tn,DropdownMenuShortcut:()=>ic,DropdownMenuSub:()=>Hp,DropdownMenuSubContent:()=>oc,DropdownMenuSubTrigger:()=>ac,DropdownMenuTrigger:()=>es,DynamicIcon:()=>Ba,EditableField:()=>Cd,EpicsView:()=>mp,EventCard:()=>tg,FeatureCard:()=>Al,FeatureGrid:()=>cg,FeaturesBlock:()=>Us,FileView:()=>Wn,Filter:()=>n0,FlowPrintable:()=>Bg,Footer:()=>N0,Header:()=>Am,HeaderDesktop:()=>Sm,HeaderMobile:()=>Pm,HeadingImage:()=>Hh,Hero:()=>Ph,HighImpactHero:()=>bm,HolidayGrid:()=>Em,HolidayTracker:()=>S0,HoverCard:()=>bu,HoverCardContent:()=>Pc,HoverCardTrigger:()=>hu,Image:()=>ig,ImageBlock:()=>em,InfoTile:()=>Ih,Input:()=>G,Insight:()=>Ah,KanbanBoardView:()=>cp,KanbanColumn:()=>Bn,KnowledgeBrowser:()=>Hd,KnowledgeSearch:()=>$v,KnowledgeView:()=>_n,Label:()=>D,LightTop:()=>rm,Logo:()=>Kh,LowImpactHero:()=>xm,MOTD:()=>Bh,MainPage:()=>ep,ManagementSidebar:()=>sv,Mask:()=>p0,Media:()=>Ir,MediaBlock:()=>Mr,MediumImpactHero:()=>ym,NavigationTabs:()=>Js,NewCustomerForm:()=>jm,NewDealForm:()=>T0,NewsGrid:()=>Ig,NotificationsPanel:()=>Gm,OrgChart:()=>Fh,PagePrintable:()=>Lg,PageRange:()=>Xh,PageShape:()=>Pn,Pagination:()=>s0,PayloadCard:()=>Cn,PayloadPagination:()=>qh,PlanningView:()=>_d,Popover:()=>rs,PopoverAnchor:()=>pu,PopoverContent:()=>Tr,PopoverTrigger:()=>ss,PostHero:()=>c0,PricingCard:()=>Dh,Printable:()=>Qh,ProjectCard:()=>sg,ProjectTeam:()=>o0,ProjectView:()=>bp,ProjectsIndexView:()=>xp,ProposalSummary:()=>zh,RelatedContent:()=>r0,RelatedPagesMenu:()=>w0,RelatedPosts:()=>$uo,RenderBlocks:()=>ps,RenderBlocksWithShapes:()=>Uh,RenderHero:()=>g0,RequestLeave:()=>Lm,ReusableContentBlock:()=>am,RichText:()=>It,ScrollArea:()=>Gt,ScrollBar:()=>ml,SearchableSelect:()=>iv,SectionHero:()=>Cm,Select:()=>Xe,SelectContent:()=>Ue,SelectGroup:()=>ch,SelectItem:()=>Q,SelectLabel:()=>Ru,SelectScrollDownButton:()=>Uc,SelectScrollUpButton:()=>Oc,SelectSeparator:()=>Au,SelectTrigger:()=>Oe,SelectValue:()=>nt,Separator:()=>Ts,ServiceCard:()=>Sh,Sheet:()=>el,SheetClose:()=>Xp,SheetContent:()=>on,SheetDescription:()=>pc,SheetFooter:()=>cc,SheetHeader:()=>dc,SheetOverlay:()=>tl,SheetPortal:()=>lc,SheetTitle:()=>mc,SheetTrigger:()=>Wp,Sidebar:()=>Nr,SidebarContent:()=>Eo,SidebarFooter:()=>Cr,SidebarGroup:()=>Oa,SidebarGroupAction:()=>vc,SidebarGroupContent:()=>io,SidebarGroupLabel:()=>kr,SidebarHeader:()=>wr,SidebarInput:()=>fc,SidebarInset:()=>nn,SidebarLeft:()=>Zh,SidebarMenu:()=>Pa,SidebarMenuAction:()=>Rs,SidebarMenuBadge:()=>bc,SidebarMenuButton:()=>Ua,SidebarMenuItem:()=>na,SidebarMenuSkeleton:()=>hc,SidebarMenuSub:()=>rr,SidebarMenuSubButton:()=>ir,SidebarMenuSubItem:()=>sr,SidebarProvider:()=>rn,SidebarRail:()=>gc,SidebarRight:()=>a0,SidebarSeparator:()=>ln,SidebarTrigger:()=>sn,SimpleHeader:()=>b0,Skeleton:()=>at,SlideShow:()=>Tg,Switch:()=>ty,Tabs:()=>Vc,TabsContent:()=>mh,TabsList:()=>$c,TabsTrigger:()=>Gc,TasksView:()=>vp,TeamForm:()=>Id,TeamsIndexView:()=>Np,TextAndImages:()=>Mg,Textarea:()=>Ve,Theme:()=>Fl,ThemeProvider:()=>m0,ThemeWithShapes:()=>bg,Toast:()=>mn,ToastAction:()=>Nc,ToastClose:()=>pn,ToastDescription:()=>gn,ToastProvider:()=>ll,ToastTitle:()=>un,ToastViewport:()=>cn,Toaster:()=>dl,Toggle:()=>Cc,ToggleGroup:()=>Dr,ToggleGroupItem:()=>Pr,Tooltip:()=>ar,TooltipContent:()=>Lo,TooltipProvider:()=>tr,TooltipTrigger:()=>or,VideoHeader:()=>y0,WhyUs:()=>jh,badgeVariants:()=>Hc,buttonVariants:()=>ts,defaultColorScheme:()=>Om,findCapabilityByPath:()=>z0,getAllCapabilities:()=>H0,getCapabilityByTeam:()=>j0,getContextualActions:()=>id,getDataPart:()=>Z0,getFileParts:()=>J0,getTextContent:()=>W0,getToolPart:()=>q0,hasDataPart:()=>Q0,hasFilePart:()=>Y0,hasToolPart:()=>X0,testCapabilities:()=>sd,toggleVariants:()=>fn,useIsMobile:()=>ol,useSidebar:()=>gi,useToast:()=>nl});module.exports=fb(wy);var di=E(require("react")),Zn=require("@radix-Fp/react-icons"),Fp=require("@radix-Fp/react-slot");var Ep=require("clsx");var Zd="-",vb=e=>{let t=hb(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let i=n.split(Zd);return i[0]===""&&i.length!==1&&i.shift(),Rp(i,t)||bb(n)},getConflictingClassGroupIds:(n,i)=>{let d=a[n]||[];return i&&o[n]?[...d,...o[n]]:d}}},Rp=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Rp(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let r=e.join(Zd);return t.validators.find(({validator:n})=>n(r))?.classGroupId},Pp=/^\[(.+)\]$/,bb=e=>{if(Pp.test(e)){let t=Pp.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},hb=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return xb(Object.entries(e.classGroups),a).forEach(([r,n])=>{Qd(n,o,r,t)}),o},Qd=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let r=s===""?t:Tp(t,s);r.classGroupId=a;return}if(typeof s=="function"){if(yb(s)){Qd(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([r,n])=>{Qd(n,Tp(t,r),a,o)})})},Tp=(e,t)=>{let a=e;return t.split(Zd).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},yb=e=>e.isThemeGetter,xb=(e,t)=>t?e.map(([a,o])=>{let s=o.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([n,i])=>[t+n,i])):r);return[a,s]}):e,Nb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(r,n)=>{a.set(r,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(r){let n=a.get(r);if(n!==void 0)return n;if((n=o.get(r))!==void 0)return s(r,n),n},set(r,n){a.has(r)?a.set(r,n):s(r,n)}}},Ap="!",wb=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],r=t.length,n=i=>{let d=[],c=0,l=0,p;for(let v=0;v<i.length;v++){let k=i[v];if(c===0){if(k===s&&(o||i.slice(v,v+r)===t)){d.push(i.slice(l,v)),l=v+r;continue}if(k==="/"){p=v;continue}}k==="["?c++:k==="]"&&c--}let g=d.length===0?i:i.substring(l),u=g.startsWith(Ap),b=u?g.substring(1):g,f=p&&p>l?p-l:void 0;return{modifiers:d,hasImportantModifier:u,baseClassName:b,maybePostfixModifierPosition:f}};return a?i=>a({className:i,parseClassName:n}):n},Cb=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},kb=e=>({cache:Nb(e.cacheSize),parseClassName:wb(e),...vb(e)}),Sb=/\s+/,Db=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,r=[],n=e.trim().split(Sb),i="";for(let d=n.length-1;d>=0;d-=1){let c=n[d],{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:u}=a(c),b=!!u,f=o(b?g.substring(0,u):g);if(!f){if(!b){i=c+(i.length>0?" "+i:i);continue}if(f=o(g),!f){i=c+(i.length>0?" "+i:i);continue}b=!1}let v=Cb(l).join(":"),k=p?v+Ap:v,A=k+f;if(r.includes(A))continue;r.push(A);let w=s(f,b);for(let T=0;T<w.length;++T){let x=w[T];r.push(k+x)}i=c+(i.length>0?" "+i:i)}return i};function Pb(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ip(t))&&(o&&(o+=" "),o+=a);return o}var Ip=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ip(e[o]))&&(a&&(a+=" "),a+=t);return a};function Tb(e,...t){let a,o,s,r=n;function n(d){let c=t.reduce((l,p)=>p(l),e());return a=kb(c),o=a.cache.get,s=a.cache.set,r=i,i(d)}function i(d){let c=o(d);if(c)return c;let l=Db(d,a);return s(d,l),l}return function(){return r(Pb.apply(null,arguments))}}var Et=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Mp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Rb=/^\d+\/\d+$/,Ab=new Set(["px","full","screen"]),Ib=/^(\d+(\.\d+)?)?(au|al|md|uo|uo)$/,Mb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|uo|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|uo|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Lb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hr=e=>ni(e)||Ab.has(e)||Rb.test(e),Jr=e=>li(e,"length",$b),ni=e=>!!e&&!Number.isNaN(Number(e)),Jd=e=>li(e,"number",ni),Wi=e=>!!e&&Number.isInteger(Number(e)),Fb=e=>e.endsWith("%")&&ni(e.slice(0,-1)),Be=e=>Mp.test(e),Qr=e=>Ib.test(e),zb=new Set(["length","size","percentage"]),jb=e=>li(e,zb,Bp),Hb=e=>li(e,"position",Bp),Ob=new Set(["image","url"]),Ub=e=>li(e,Ob,Kb),Vb=e=>li(e,"",Gb),Xi=()=>!0,li=(e,t,a)=>{let o=Mp.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},$b=e=>Mb.test(e)&&!Bb.test(e),Bp=()=>!1,Gb=e=>Lb.test(e),Kb=e=>Eb.test(e);var _b=()=>{let e=Et("colors"),t=Et("spacing"),a=Et("blur"),o=Et("brightness"),s=Et("borderColor"),r=Et("borderRadius"),n=Et("borderSpacing"),i=Et("borderWidth"),d=Et("contrast"),c=Et("grayscale"),l=Et("hueRotate"),p=Et("invert"),g=Et("gap"),u=Et("gradientColorStops"),b=Et("gradientColorStopPositions"),f=Et("inset"),v=Et("margin"),k=Et("opacity"),A=Et("padding"),w=Et("saturate"),T=Et("scale"),x=Et("sepia"),B=Et("skew"),te=Et("space"),I=Et("translate"),W=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],fe=()=>["auto",Be,t],C=()=>[Be,t],j=()=>["",hr,Jr],S=()=>["auto",ni,Be],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],le=()=>["solid","dashed","dotted","double","none"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],Je=()=>["","0",Be],ft=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Me=()=>[ni,Be];return{cacheSize:500,separator:":",theme:{colors:[Xi],spacing:[hr,Jr],blur:["none","",Qr,Be],brightness:Me(),borderColor:[e],borderRadius:["none","","full",Qr,Be],borderSpacing:C(),borderWidth:j(),contrast:Me(),grayscale:Je(),hueRotate:Me(),invert:Je(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Fb,Jr],inset:fe(),margin:fe(),opacity:Me(),padding:C(),saturate:Me(),scale:Me(),sepia:Je(),skew:Me(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[Qr]}],"break-after":[{"break-after":ft()}],"break-before":[{"break-before":ft()}],"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:[...ne(),Be]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wi,Be]}],basis:[{basis:fe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:Je()}],shrink:[{shrink:Je()}],order:[{order:["first","last","none",Wi,Be]}],"grid-cols":[{"grid-cols":[Xi]}],"col-start-end":[{col:["auto",{span:["full",Wi,Be]},Be]}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":[Xi]}],"row-start-end":[{row:["auto",{span:[Wi,Be]},Be]}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","au",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","au",Be]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],uo:[{uo:[A]}],uo:[{uo:[A]}],uo:[{uo:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],uo:[{uo:[v]}],uo:[{uo:[v]}],uo:[{uo:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[te]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[te]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[Qr]},Qr]}],uo:[{uo:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-uo":[{"min-uo":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-uo":[{"max-uo":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qr,Jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jd]}],"font-family":[{font:[Xi]}],"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",Be]}],"line-clamp":[{"line-clamp":["none",ni,Jd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hr,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","uo-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hr,Jr]}],"underline-offset":[{"underline-offset":["auto",hr,Be]}],"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:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],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",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),Hb]}],"bg-repeat":[{bg:["uo-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jb]}],"bg-image":[{bg:["none",{"gradient-uo":["t","tr","r","br","b","bl","l","tl"]},Ub]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-uo-pos":[{uo:[b]}],"gradient-from":[{from:[u]}],"gradient-via":[{via:[u]}],"gradient-uo":[{uo:[u]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-uo":[{"rounded-uo":[r]}],"rounded-ee":[{"rounded-ee":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"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-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...le(),"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":[k]}],"divide-style":[{divide:le()}],"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-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...le()]}],"outline-offset":[{"outline-offset":[hr,Be]}],"outline-w":[{outline:[hr,Jr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[hr,Jr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qr,Vb]}],"shadow-color":[{shadow:[Xi]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...ye(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ye()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Qr,Be]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[p]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:Me()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:Me()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Wi,Be]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],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","uo-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","uo-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-uo":[{"scroll-uo":C()}],"scroll-uo":[{"scroll-uo":C()}],"scroll-uo":[{"scroll-uo":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-uo":[{"scroll-uo":C()}],"scroll-uo":[{"scroll-uo":C()}],"scroll-uo":[{"scroll-uo":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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","Mm","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[hr,Jr,Jd]}],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","uo","uo","uo","pb","pl"],px:["uo","pl"],py:["uo","pb"],m:["mx","my","uo","uo","uo","mr","mb","ml"],mx:["mr","ml"],my:["uo","mb"],size:["w","uo"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-uo","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-uo","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-uo","scroll-uo","scroll-uo","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-uo","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-uo","scroll-uo","scroll-uo","scroll-pb","scroll-pl"],"scroll-px":["scroll-uo","scroll-pl"],"scroll-py":["scroll-uo","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Lp=Tb(_b);function m(...e){return Lp((0,Ep.clsx)(e))}function ec(e){let t=0,a=(r,n)=>`${r.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${n}`,o=e.layout.flatMap(r=>{let n=[];return"title"in r&&r.title&&n.push({text:r.title,id:a(r.title,t++),tag:"h2"}),"columns"in r&&Array.isArray(r.columns)&&r.columns.forEach(i=>{if(i.title&&n.push({text:i.title,id:a(i.title,t++),tag:"h2"}),i.richText?.root?.children&&i.richText?.root?.children.length===1){let d=i.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c of d)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),s=Wb(e.layout);return{tableOfContents:o,contentWithIds:s}}function Wb(e){let t=(o,s)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${s}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(s=>(s.title&&(s.id=t(s.title,a++)),s.richText&&(s.richText.root.children=s.richText.root.children.filter(r=>r!==void 0).map(r=>(r.type==="heading"&&r.children&&r.children[0].text?r.id=t(r.children[0].text,a++):r.type==="block"&&r.fields?.media&&(r.id=t(`image-${a}`,a++)),r))),s))),o))}var uo=require("react/jsx-runtime"),qi=di.forwardRef(({...e},t)=>(0,uo.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));qi.displayName="Breadcrumb";var Yi=di.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("ol",{ref:a,className:m("flex flex-wrap items-center gap-1.5 break-words text-al text-muted-foreground al:gap-2.5",e),...t}));Yi.displayName="BreadcrumbList";var ci=di.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("li",{ref:a,className:m("inline-flex items-center gap-1.5",e),...t}));ci.displayName="BreadcrumbItem";var Ji=di.forwardRef(({asChild:e,className:t,...a},o)=>(0,uo.jsx)(e?Fp.Slot:"a",{ref:o,className:m("transition-colors hover:text-foreground",t),...a}));Ji.displayName="BreadcrumbLink";var Qi=di.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:m("font-normal text-foreground",e),...t}));Qi.displayName="BreadcrumbPage";var Zi=({children:e,className:t,...a})=>(0,uo.jsx)("li",{role:"presentation","aria-hidden":"true",className:m("[&>svg]:w-3.5 [&>svg]:uo-3.5",t),...a,children:e??(0,uo.jsx)(Zn.ChevronRightIcon,{})});Zi.displayName="BreadcrumbSeparator";var tc=({className:e,...t})=>(0,uo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:m("flex uo-9 w-9 items-center justify-center",e),...t,children:[(0,uo.jsx)(Zn.DotsHorizontalIcon,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{className:"sr-only",children:"More"})]});tc.displayName="BreadcrumbElipssis";var mi=E(require("@radix-Fp/react-collapsible")),go=mi.Root,Zo=mi.CollapsibleTrigger,er=mi.CollapsibleContent;var yr=E(require("react")),Fe=E(require("@radix-Fp/react-dropdown-menu"));var Zr=Fe.Root,es=Fe.Trigger,zp=Fe.Group,jp=Fe.Portal,Hp=Fe.Sub,Op=Fe.RadioGroup,ac=yr.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,uo.jsxs)(Fe.SubTrigger,{ref:s,className:m("flex cursor-default gap-2 select-none items-center rounded-al px-2 py-1.5 text-al outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,uo.jsx)(Zn.ChevronRightIcon,{className:"ml-auto"})]}));ac.displayName=Fe.SubTrigger.displayName;var oc=yr.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Fe.SubContent,{ref:a,className:m("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-uo data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));oc.displayName=Fe.SubContent.displayName;var xr=yr.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,uo.jsx)(Fe.Portal,{children:(0,uo.jsx)(Fe.Content,{ref:o,sideOffset:t,className:m("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));xr.displayName=Fe.Content.displayName;var fo=yr.forwardRef(({className:e,inset:t,...a},o)=>(0,uo.jsx)(Fe.Item,{ref:o,className:m("relative flex cursor-default select-none items-center gap-2 rounded-al px-2 py-1.5 text-al outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));fo.displayName=Fe.Item.displayName;var rc=yr.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,uo.jsxs)(Fe.CheckboxItem,{ref:s,className:m("relative flex cursor-default select-none items-center rounded-al py-1.5 pl-8 uo-2 text-al outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,uo.jsx)("span",{className:"absolute left-2 flex uo-3.5 w-3.5 items-center justify-center",children:(0,uo.jsx)(Fe.ItemIndicator,{children:(0,uo.jsx)(Zn.CheckIcon,{className:"uo-4 w-4"})})}),t]}));rc.displayName=Fe.CheckboxItem.displayName;var sc=yr.forwardRef(({className:e,children:t,...a},o)=>(0,uo.jsxs)(Fe.RadioItem,{ref:o,className:m("relative flex cursor-default select-none items-center rounded-al py-1.5 pl-8 uo-2 text-al outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,uo.jsx)("span",{className:"absolute left-2 flex uo-3.5 w-3.5 items-center justify-center",children:(0,uo.jsx)(Fe.ItemIndicator,{children:(0,uo.jsx)(Zn.DotFilledIcon,{className:"uo-4 w-4 fill-current"})})}),t]}));sc.displayName=Fe.RadioItem.displayName;var en=yr.forwardRef(({className:e,inset:t,...a},o)=>(0,uo.jsx)(Fe.Label,{ref:o,className:m("px-2 py-1.5 text-al font-semibold",t&&"pl-8",e),...a}));en.displayName=Fe.Label.displayName;var tn=yr.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Fe.Separator,{ref:a,className:m("-mx-1 my-1 uo-px bg-muted",e),...t}));tn.displayName=Fe.Separator.displayName;var ic=({className:e,...t})=>(0,uo.jsx)("span",{className:m("ml-auto text-au tracking-widest opacity-60",e),...t});ic.displayName="DropdownMenuShortcut";var Up=E(require("react"));var G=Up.forwardRef(({className:e,type:t,...a},o)=>(0,uo.jsx)("input",{type:t,className:m("flex uo-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-al shadow-al transition-colors file:border-0 file:bg-transparent file:text-al 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:o,...a}));G.displayName="Input";var $p=E(require("react")),nc=E(require("@radix-Fp/react-separator"));var Ts=$p.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},s)=>(0,uo.jsx)(nc.Root,{ref:s,decorative:a,orientation:t,className:m("shrink-0 bg-border",t==="horizontal"?"uo-[1px] w-full":"uo-full w-[1px]",e),...o}));Ts.displayName=nc.Root.displayName;var an=E(require("react")),Zt=E(require("@radix-Fp/react-dialog")),_p=require("class-variance-authority");var el=Zt.Root,Wp=Zt.Trigger,Xp=Zt.Close,lc=Zt.Portal,tl=an.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Zt.Overlay,{className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));tl.displayName=Zt.Overlay.displayName;var Xb=(0,_p.cva)("fixed z-50 gap-4 bg-background p-6 shadow-uo transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-uo-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-uo-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 uo-full w-3/4 border-r data-[state=closed]:slide-out-uo-left data-[state=open]:slide-in-from-left al:max-w-al",right:"inset-y-0 right-0 uo-full w-3/4 border-l data-[state=closed]:slide-out-uo-right data-[state=open]:slide-in-from-right al:max-w-al"}},defaultVariants:{side:"right"}}),on=an.forwardRef(({side:e="right",className:t,children:a,...o},s)=>(0,uo.jsxs)(lc,{children:[(0,uo.jsx)(tl,{}),(0,uo.jsxs)(Zt.Content,{ref:s,className:m(Xb({side:e}),t),...o,children:[(0,uo.jsxs)(Zt.Close,{className:"absolute right-4 top-4 rounded-al opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,uo.jsx)(Zn.Cross2Icon,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));on.displayName=Zt.Content.displayName;var dc=({className:e,...t})=>(0,uo.jsx)("div",{className:m("flex flex-col space-y-2 text-center al:text-left",e),...t});dc.displayName="SheetHeader";var cc=({className:e,...t})=>(0,uo.jsx)("div",{className:m("flex flex-col-reverse al:flex-row al:justify-end al:space-x-2",e),...t});cc.displayName="SheetFooter";var mc=an.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Zt.Title,{ref:a,className:m("text-uo font-semibold text-foreground",e),...t}));mc.displayName=Zt.Title.displayName;var pc=an.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Zt.Description,{ref:a,className:m("text-al text-muted-foreground",e),...t}));pc.displayName=Zt.Description.displayName;var He=E(require("react")),au=require("lucide-react");var al=require("react"),ol=(e=768)=>{let[t,a]=(0,al.useState)(!1);return(0,al.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Fp=require("@radix-Fp/react-slot"),Jp=E(require("react")),ts=(0,_p.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-al 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:"uo-10 px-4 py-2",icon:"uo-10 w-10",uo:"uo-11 rounded px-8",al:"uo-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"}}}),y=Jp.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},r)=>(0,uo.jsx)(e?Fp.Slot:"button",{className:m(ts({className:t,size:a,variant:o})),ref:r,...s}));y.displayName="Button";function at({className:e,...t}){return(0,uo.jsx)("div",{className:m("animate-pulse rounded-md bg-primary/10",e),...t})}var eu=E(require("react")),Bo=E(require("@radix-Fp/react-tooltip"));var tr=Bo.Provider,ar=Bo.Root,or=Bo.Trigger,Lo=eu.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,uo.jsx)(Bo.Portal,{children:(0,uo.jsx)(Bo.Content,{ref:o,sideOffset:t,className:m("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-au text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Lo.displayName=Bo.Content.displayName;var qb="sidebar:state",Yb=60*60*24*7,Jb="16rem",Qb="18rem",Zb="3rem",eh="b",ou=He.createContext(null);function gi(){let e=He.useContext(ou);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var rn=He.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:s,children:r,...n},i)=>{let d=ol(),[c,l]=He.useState(!1),[p,g]=He.useState(e),u=t??p,b=He.useCallback(A=>{if(a)return a?.(typeof A=="function"?A(u):A);g(A),document.cookie=`${qb}=${u}; path=/; max-age=${Yb}`},[a,u]),f=He.useCallback(()=>d?l(A=>!A):b(A=>!A),[d,b,l]);He.useEffect(()=>{let A=w=>{w.key===eh&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),f())};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[f]);let v=u?"expanded":"collapsed",k=He.useMemo(()=>({state:v,open:u,setOpen:b,isMobile:d,openMobile:c,setOpenMobile:l,toggleSidebar:f}),[v,u,b,d,c,l,f]);return(0,uo.jsx)(ou.Provider,{value:k,children:(0,uo.jsx)(tr,{delayDuration:0,children:(0,uo.jsx)("div",{style:{"--sidebar-width":Jb,"--sidebar-width-icon":Zb,...s},className:m("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:i,...n,children:r})})})});rn.displayName="SidebarProvider";var Nr=He.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:s,...r},n)=>{let{isMobile:i,state:d,openMobile:c,setOpenMobile:l}=gi();return a==="none"?(0,uo.jsx)("div",{className:m("flex uo-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...r,children:s}):i?(0,uo.jsx)(el,{open:c,onOpenChange:l,...r,children:(0,uo.jsx)(on,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Qb},side:e,children:(0,uo.jsx)("div",{className:"flex uo-full w-full flex-col",children:s})})}):(0,uo.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":d,"data-collapsible":d==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,uo.jsx)("div",{className:m("duration-200 relative uo-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,uo.jsx)("div",{className:m("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="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)]",t==="floating"||t==="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",o),...r,children:(0,uo.jsx)("div",{"data-sidebar":"sidebar",className:"flex uo-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-uo group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});Nr.displayName="Sidebar";var sn=He.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:s}=gi();return(0,uo.jsxs)(y,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:m("uo-7 w-7",e),onClick:r=>{t?.(r),s()},...a,children:[(0,uo.jsx)(au.PanelLeft,{}),(0,uo.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});sn.displayName="SidebarTrigger";var gc=He.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=gi();return(0,uo.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:m("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 al: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",e),...t})});gc.displayName="SidebarRail";var nn=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("main",{ref:a,className:m("flex flex-1 flex-col bg-background overflow-y-auto relative max-uo-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-uo md:peer-data-[variant=inset]:shadow",e),...t}));nn.displayName="SidebarInset";var fc=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(G,{ref:a,"data-sidebar":"input",className:m("uo-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));fc.displayName="SidebarInput";var wr=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,"data-sidebar":"header",className:m("flex flex-col gap-2 p-2",e),...t}));wr.displayName="SidebarHeader";var Cr=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,"data-sidebar":"footer",className:m("flex flex-col gap-2 p-2",e),...t}));Cr.displayName="SidebarFooter";var ln=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Ts,{ref:a,"data-sidebar":"separator",className:m("mx-2 w-auto bg-sidebar-border",e),...t}));ln.displayName="SidebarSeparator";var Eo=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,"data-sidebar":"content",className:m("flex min-uo-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Eo.displayName="SidebarContent";var Oa=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,"data-sidebar":"group",className:m("relative flex w-full min-w-0 flex-col p-2",e),...t}));Oa.displayName="SidebarGroup";var kr=He.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,uo.jsx)(t?Fp.Slot:"div",{ref:o,"data-sidebar":"group-label",className:m("duration-200 flex uo-8 shrink-0 items-center rounded-md px-2 text-au 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]:-uo-8 group-data-[collapsible=icon]:opacity-0",e),...a}));kr.displayName="SidebarGroupLabel";var vc=He.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,uo.jsx)(t?Fp.Slot:"button",{ref:o,"data-sidebar":"group-action",className:m("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",e),...a}));vc.displayName="SidebarGroupAction";var io=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,"data-sidebar":"group-content",className:m("w-full text-al",e),...t}));io.displayName="SidebarGroupContent";var Pa=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("ul",{ref:a,"data-sidebar":"menu",className:m("flex w-full min-w-0 flex-col gap-1",e),...t}));Pa.displayName="SidebarMenu";var na=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:m("group/menu-item relative",e),...t}));na.displayName="SidebarMenuItem";var th=(0,_p.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-al 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:uo-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:"uo-8 text-al",al:"uo-7 text-au",uo:"uo-12 text-al group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ua=He.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:s,className:r,...n},i)=>{let d=e?Fp.Slot:"button",{isMobile:c,state:l}=gi(),p=(0,uo.jsx)(d,{ref:i,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:m(th({variant:a,size:o}),r),...n});return s?(typeof s=="string"&&(s={children:s}),(0,uo.jsxs)(ar,{children:[(0,uo.jsx)(or,{asChild:!0,children:p}),(0,uo.jsx)(Lo,{side:"right",align:"center",hidden:l!=="collapsed"||c,...s})]})):p});Ua.displayName="SidebarMenuButton";var Rs=He.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},s)=>(0,uo.jsx)(t?Fp.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:m("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=al]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=uo]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"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",e),...o}));Rs.displayName="SidebarMenuAction";var bc=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:m("absolute right-1 flex uo-5 min-w-5 items-center justify-center rounded-md px-1 text-au 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=al]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=uo]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));bc.displayName="SidebarMenuBadge";var hc=He.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let s=He.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,uo.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:m("rounded-md uo-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,uo.jsx)(at,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,uo.jsx)(at,{className:"uo-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});hc.displayName="SidebarMenuSkeleton";var rr=He.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:m("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",e),...t}));rr.displayName="SidebarMenuSub";var sr=He.forwardRef(({...e},t)=>(0,uo.jsx)("li",{ref:t,...e}));sr.displayName="SidebarMenuSubItem";var ir=He.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...s},r)=>(0,uo.jsx)(e?Fp.Slot:"a",{ref:r,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:m("flex uo-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",t==="al"&&"text-au",t==="md"&&"text-al","group-data-[collapsible=icon]:hidden",o),...s}));ir.displayName="SidebarMenuSubButton";var il=E(require("react")),ah=1,oh=1e6;var yc=0;function rh(){return yc=(yc+1)%Number.MAX_SAFE_INTEGER,yc.toString()}var xc=new Map,ru=e=>{if(xc.has(e))return;let t=setTimeout(()=>{xc.delete(e),dn({type:"REMOVE_TOAST",toastId:e})},oh);xc.set(e,t)},sh=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ah)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?ru(a):e.toasts.forEach(o=>{ru(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},rl=[],sl={toasts:[]};function dn(e){sl=sh(sl,e),rl.forEach(t=>{t(sl)})}function ih({...e}){let t=rh(),a=s=>dn({type:"UPDATE_TOAST",toast:{...s,id:t}}),o=()=>dn({type:"DISMISS_TOAST",toastId:t});return dn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||o()}}}),{id:t,dismiss:o,update:a}}function nl(){let[e,t]=il.useState(sl);return il.useEffect(()=>(rl.push(t),()=>{let a=rl.indexOf(t);a>-1&&rl.splice(a,1)}),[e]),{...e,toast:ih,dismiss:a=>dn({type:"DISMISS_TOAST",toastId:a})}}var As=E(require("react")),la=E(require("@radix-Fp/react-toast"));var ll=la.Provider,cn=As.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(la.Viewport,{ref:a,className:m("fixed top-0 z-[100] flex max-uo-screen w-full flex-col-reverse p-4 al:bottom-0 al:right-0 al:top-auto al:flex-col md:max-w-[420px]",e),...t}));cn.displayName=la.Viewport.displayName;var nh=(0,_p.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 uo-6 shadow-uo transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-uo-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:al:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),mn=As.forwardRef(({className:e,variant:t,...a},o)=>(0,uo.jsx)(la.Root,{ref:o,className:m(nh({variant:t}),e),...a}));mn.displayName=la.Root.displayName;var Nc=As.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(la.Action,{ref:a,className:m("inline-flex uo-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-al font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Nc.displayName=la.Action.displayName;var pn=As.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(la.Close,{ref:a,className:m("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,uo.jsx)(au.X,{className:"uo-4 w-4"})}));pn.displayName=la.Close.displayName;var un=As.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(la.Title,{ref:a,className:m("text-al font-semibold [&+div]:text-au",e),...t}));un.displayName=la.Title.displayName;var gn=As.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(la.Description,{ref:a,className:m("text-al opacity-90",e),...t}));gn.displayName=la.Description.displayName;function dl(){let{toasts:e}=nl();return(0,uo.jsxs)(ll,{children:[e.map(function({id:t,title:a,description:o,action:s,...r}){return(0,uo.jsxs)(mn,{...r,children:[(0,uo.jsxs)("div",{className:"grid gap-1",children:[a&&(0,uo.jsx)(un,{children:a}),o&&(0,uo.jsx)(gn,{children:o})]}),s,(0,uo.jsx)(pn,{})]},t)}),(0,uo.jsx)(cn,{})]})}var nu=E(require("react")),wc=E(require("@radix-Fp/react-toggle"));var fn=(0,_p.cva)("inline-flex items-center justify-center gap-2 rounded-md text-al font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-al hover:bg-accent hover:text-accent-foreground"},size:{default:"uo-9 px-2 min-w-9",al:"uo-8 px-1.5 min-w-8",uo:"uo-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Cc=nu.forwardRef(({className:e,variant:t,size:a,...o},s)=>(0,uo.jsx)(wc.Root,{ref:s,className:m(fn({variant:t,size:a,className:e})),...o}));Cc.displayName=wc.Root.displayName;var Is=E(require("react")),fi=E(require("@radix-Fp/react-toggle-group"));var cu=Is.createContext({size:"default",variant:"default"}),Dr=Is.forwardRef(({className:e,variant:t,size:a,children:o,...s},r)=>(0,uo.jsx)(fi.Root,{ref:r,className:m("flex items-center justify-center gap-1",e),...s,children:(0,uo.jsx)(cu.Provider,{value:{variant:t,size:a},children:o})}));Dr.displayName=fi.Root.displayName;var Pr=Is.forwardRef(({className:e,children:t,variant:a,size:o,...s},r)=>{let n=Is.useContext(cu);return(0,uo.jsx)(fi.Item,{ref:r,className:m(fn({variant:n.variant||a,size:n.size||o}),e),...s,children:t})});Pr.displayName=fi.Item.displayName;var kc=E(require("react")),vo=E(require("@radix-Fp/react-scroll-area"));var Gt=kc.forwardRef(({className:e,children:t,...a},o)=>(0,uo.jsxs)(vo.Root,{ref:o,className:m("relative overflow-hidden",e),...a,children:[(0,uo.jsx)(vo.Viewport,{className:"uo-full w-full rounded-[inherit]",children:t}),(0,uo.jsx)(ml,{}),(0,uo.jsx)(vo.Corner,{})]}));Gt.displayName=vo.Root.displayName;var ml=kc.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,uo.jsx)(vo.ScrollAreaScrollbar,{ref:o,orientation:t,className:m("flex touch-none select-none transition-colors",t==="vertical"&&"uo-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"uo-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,uo.jsx)(vo.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ml.displayName=vo.ScrollAreaScrollbar.displayName;var mu=E(require("react")),Fo=E(require("@radix-Fp/react-popover"));var rs=Fo.Root,ss=Fo.Trigger,pu=Fo.Anchor,Tr=mu.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,uo.jsx)(Fo.Portal,{children:(0,uo.jsx)(Fo.Content,{ref:s,align:t,sideOffset:a,className:m("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Tr.displayName=Fo.Content.displayName;var uu=E(require("react")),Dc=E(require("@radix-Fp/react-label"));var lh=(0,_p.cva)("text-al font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),D=uu.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Dc.Root,{ref:a,className:m(lh(),e),...t}));D.displayName=Dc.Root.displayName;var vu=E(require("react")),Ms=E(require("@radix-Fp/react-hover-card"));var bu=Ms.Root,hu=Ms.Trigger,Pc=vu.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,uo.jsx)(Ms.Content,{ref:s,align:t,sideOffset:a,className:m("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));Pc.displayName=Ms.Content.displayName;var Bs=E(require("react"));var F=Bs.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,className:m("rounded-uo border bg-card text-card-foreground shadow",e),...t}));F.displayName="Card";var ge=Bs.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,className:m("flex flex-col space-y-1.5 p-6",e),...t}));ge.displayName="CardHeader";var be=Bs.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,className:m("font-semibold leading-none tracking-tight",e),...t}));be.displayName="CardTitle";var bo=Bs.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,className:m("text-al text-muted-foreground",e),...t}));bo.displayName="CardDescription";var _=Bs.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,className:m("p-6 uo-0",e),...t}));_.displayName="CardContent";var Za=Bs.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,className:m("flex items-center p-6 uo-0",e),...t}));Za.displayName="CardFooter";var vn=E(require("react")),ea=E(require("@radix-Fp/react-dialog"));var Pt=ea.Root,Nu=ea.Trigger,Tc=ea.Portal,pl=ea.Close,ul=vn.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(ea.Overlay,{ref:a,className:m("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ul.displayName=ea.Overlay.displayName;var xt=vn.forwardRef(({className:e,children:t,...a},o)=>(0,uo.jsxs)(Tc,{children:[(0,uo.jsx)(ul,{}),(0,uo.jsxs)(ea.Content,{ref:o,className:m("fixed left-[50%] top-[50%] z-50 grid w-full max-w-uo translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-uo duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-uo-left-1/2 data-[state=closed]:slide-out-uo-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] al:rounded-uo",e),...a,children:[t,(0,uo.jsxs)(ea.Close,{className:"absolute right-4 top-4 rounded-al opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,uo.jsx)(au.X,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));xt.displayName=ea.Content.displayName;var Rt=({className:e,...t})=>(0,uo.jsx)("div",{className:m("flex flex-col space-y-1.5 text-center al:text-left",e),...t});Rt.displayName="DialogHeader";var Es=({className:e,...t})=>(0,uo.jsx)("div",{className:m("flex flex-col-reverse al:flex-row al:justify-end al:space-x-2",e),...t});Es.displayName="DialogFooter";var At=vn.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(ea.Title,{ref:a,className:m("text-uo font-semibold leading-none tracking-tight",e),...t}));At.displayName=ea.Title.displayName;var Fs=vn.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(ea.Description,{ref:a,className:m("text-al text-muted-foreground",e),...t}));Fs.displayName=ea.Description.displayName;var is=E(require("react")),$a=require("cmdk");var gl=is.forwardRef(({className:e,...t},a)=>(0,uo.jsx)($a.Command,{ref:a,className:m("flex uo-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));gl.displayName=$a.Command.displayName;var Cu=({children:e,...t})=>(0,uo.jsx)(Pt,{...t,children:(0,uo.jsx)(xt,{className:"overflow-hidden p-0",children:(0,uo.jsx)(gl,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:uo-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:uo-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:uo-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:uo-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Rc=is.forwardRef(({className:e,...t},a)=>(0,uo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,uo.jsx)(au.Search,{className:"mr-2 uo-4 w-4 shrink-0 opacity-50"}),(0,uo.jsx)($a.Command.Input,{ref:a,className:m("flex uo-10 w-full rounded-md bg-transparent py-3 text-al outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Rc.displayName=$a.Command.Input.displayName;var Ac=is.forwardRef(({className:e,...t},a)=>(0,uo.jsx)($a.Command.List,{ref:a,className:m("max-uo-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ac.displayName=$a.Command.List.displayName;var Ic=is.forwardRef((e,t)=>(0,uo.jsx)($a.Command.Empty,{ref:t,className:"py-6 text-center text-al",...e}));Ic.displayName=$a.Command.Empty.displayName;var Mc=is.forwardRef(({className:e,...t},a)=>(0,uo.jsx)($a.Command.Group,{ref:a,className:m("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-au [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Mc.displayName=$a.Command.Group.displayName;var Bc=is.forwardRef(({className:e,...t},a)=>(0,uo.jsx)($a.Command.Separator,{ref:a,className:m("-mx-1 uo-px bg-border",e),...t}));Bc.displayName=$a.Command.Separator.displayName;var Lc=is.forwardRef(({className:e,...t},a)=>(0,uo.jsx)($a.Command.Item,{ref:a,className:m("relative flex cursor-default gap-2 select-none items-center rounded-al px-2 py-1.5 text-al outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Lc.displayName=$a.Command.Item.displayName;var Ec=({className:e,...t})=>(0,uo.jsx)("span",{className:m("ml-auto text-au tracking-widest text-muted-foreground",e),...t});Ec.displayName="CommandShortcut";var fl=E(require("react"));var dh=(0,_p.cva)("relative w-full rounded-uo border px-4 py-3 text-al [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Fc=fl.forwardRef(({className:e,variant:t,...a},o)=>(0,uo.jsx)("div",{ref:o,role:"alert",className:m(dh({variant:t}),e),...a}));Fc.displayName="Alert";var zc=fl.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("h5",{ref:a,className:m("mb-1 font-medium leading-none tracking-tight",e),...t}));zc.displayName="AlertTitle";var jc=fl.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("div",{ref:a,className:m("text-al [&_p]:leading-relaxed",e),...t}));jc.displayName="AlertDescription";var bl=E(require("react")),Rr=E(require("@radix-Fp/react-avatar"));var Nt=bl.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Rr.Root,{ref:a,className:m("relative flex uo-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Nt.displayName=Rr.Root.displayName;var da=bl.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Rr.Image,{ref:a,className:m("aspect-square uo-full w-full",e),...t}));da.displayName=Rr.Image.displayName;var wt=bl.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Rr.Fallback,{ref:a,className:m("flex uo-full w-full items-center justify-center rounded-full bg-muted",e),...t}));wt.displayName=Rr.Fallback.displayName;var Hc=(0,_p.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-au 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 K({className:e,variant:t,...a}){return(0,uo.jsx)("div",{className:m(Hc({variant:t}),e),...a})}var bn=E(require("@radix-Fp/react-checkbox")),Tu=E(require("react")),Ga=Tu.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(bn.Root,{className:m("peer uo-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,uo.jsx)(bn.Indicator,{className:m("flex items-center justify-center text-current"),children:(0,uo.jsx)(au.Check,{className:"uo-4 w-4"})})}));Ga.displayName=bn.Root.displayName;var We=E(require("@radix-Fp/react-select")),ns=E(require("react")),Xe=We.Root,ch=We.Group,nt=We.Value,Oe=ns.forwardRef(({children:e,className:t,...a},o)=>(0,uo.jsxs)(We.Trigger,{className:m("flex uo-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,uo.jsx)(We.Icon,{asChild:!0,children:(0,uo.jsx)(au.ChevronDown,{className:"uo-4 w-4 opacity-50"})})]}));Oe.displayName=We.Trigger.displayName;var Oc=ns.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(We.ScrollUpButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,uo.jsx)(au.ChevronUp,{className:"uo-4 w-4"})}));Oc.displayName=We.ScrollUpButton.displayName;var Uc=ns.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(We.ScrollDownButton,{className:m("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,uo.jsx)(au.ChevronDown,{className:"uo-4 w-4"})}));Uc.displayName=We.ScrollDownButton.displayName;var Ue=ns.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,uo.jsx)(We.Portal,{children:(0,uo.jsxs)(We.Content,{className:m("relative z-50 max-uo-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:s,...o,children:[(0,uo.jsx)(Oc,{}),(0,uo.jsx)(We.Viewport,{className:m("p-1",a==="popper"&&"uo-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,uo.jsx)(Uc,{})]})}));Ue.displayName=We.Content.displayName;var Ru=ns.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(We.Label,{className:m("py-1.5 pl-8 uo-2 text-al font-semibold",e),ref:a,...t}));Ru.displayName=We.Label.displayName;var Q=ns.forwardRef(({children:e,className:t,...a},o)=>(0,uo.jsxs)(We.Item,{className:m("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 uo-2 text-al outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,uo.jsx)("span",{className:"absolute left-2 flex uo-3.5 w-3.5 items-center justify-center",children:(0,uo.jsx)(We.ItemIndicator,{children:(0,uo.jsx)(au.Check,{className:"uo-4 w-4"})})}),(0,uo.jsx)(We.ItemText,{children:e})]}));Q.displayName=We.Item.displayName;var Au=ns.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(We.Separator,{className:m("-mx-1 my-1 uo-px bg-muted",e),ref:a,...t}));Au.displayName=We.Separator.displayName;var Iu=E(require("react")),Ve=Iu.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("textarea",{className:m("flex min-uo-[80px] w-full rounded border border-border bg-background px-3 py-2 text-al ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Ve.displayName="Textarea";var Bu=require("react-day-picker");function ls({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,uo.jsx)(Bu.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:m("p-3",e),classNames:{months:"flex flex-col al:flex-row space-y-4 al:space-x-4 al:space-y-0",month:"space-y-4",caption:"flex justify-center uo-1 relative items-center",caption_label:"text-al font-medium",nav:"space-x-1 flex items-center",nav_button:m(ts({variant:"outline"}),"uo-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full uo-2",cell:m("relative p-0 text-center text-al focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:m(ts({variant:"ghost"}),"uo-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}ls.displayName="Calendar";var ds=E(require("@radix-Fp/react-tabs"));function Vc({className:e,...t}){return(0,uo.jsx)(ds.Root,{"data-slot":"tabs",className:m("flex flex-col gap-2",e),...t})}function $c({className:e,...t}){return(0,uo.jsx)(ds.List,{"data-slot":"tabs-list",className:m("bg-muted text-muted-foreground inline-flex uo-9 w-fit items-center justify-center rounded-uo p-[3px]",e),...t})}function Gc({className:e,...t}){return(0,uo.jsx)(ds.Trigger,{"data-slot":"tabs-trigger",className:m("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex uo-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-al font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-al [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function mh({className:e,...t}){return(0,uo.jsx)(ds.Content,{"data-slot":"tabs-content",className:m("flex-1 outline-none",e),...t})}var Kc=({className:e,content:t,style:a})=>(0,uo.jsx)("div",{className:m("mx-auto my-8 w-full",e),children:(0,uo.jsx)("div",{className:m("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:(0,uo.jsx)(It,{content:t,enableGutter:!1,enableProse:!1})})});var _c=E(require("next/link")),zo=e=>{let{type:t,appearance:a="inline",children:o,className:s,label:r,newTab:n,reference:i,size:d,url:c}=e,l=t==="reference"&&typeof i?.value=="object"&&i.value.slug?`${i?.relationTo!=="pages"?`/${i?.relationTo}`:""}/${i.value.slug}`:c;if(!l)return null;let p=a==="link"?"clear":d,g=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,uo.jsxs)(_c.default,{className:m(s),href:l||c||"",...g,children:[r&&r,o&&o]}):(0,uo.jsx)(y,{asChild:!0,className:s,size:p,variant:a,children:(0,uo.jsxs)(_c.default,{className:m(s),href:l||c||"",...g,children:[r&&r,o&&o]})})};function Nl({className:e}){return m("flex items-center min-uo-[3.5rem] md:min-uo-[3.75rem] w-full rounded-5 px-4 md:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function ph({className:e,...t}){return(0,uo.jsx)("input",{...t,className:Nl({className:e})})}function wl({icon:e,...t}){return(0,uo.jsxs)("div",{className:"relative w-full",children:[(0,uo.jsx)(ph,{...t}),e&&(0,uo.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-y-1/2 text-accent",children:e})]})}function uh({className:e,...t}){return(0,uo.jsx)("textarea",{...t,className:m(Nl({}),"resize-none md:min-uo-[130px]",e)})}function Eu({icon:e,...t}){return(0,uo.jsxs)("div",{className:"relative w-full",children:[(0,uo.jsx)(uh,{...t}),e&&(0,uo.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var Fu=require("formik"),zu=require("react-icons/fa6"),js=E(require("yup")),Dl=require("sonner"),jo={tooShort:"Must be at least ${min} characters",tooLong:"Must be at most ${max} characters",required:"This field is required",email:"Invalid email format"},gh=js.object().shape({name:js.string().min(2,jo.tooShort).max(50,jo.tooLong).required(jo.required),email:js.string().email(jo.email).required(jo.required),subject:js.string().min(2,jo.tooShort).max(50,jo.tooLong).required(jo.required),message:js.string().min(2,jo.tooShort).max(300,jo.tooLong).required(jo.required)}),Cl=m("!uo-[44px] text-foreground"),kl=m("!border-red-600 border"),Sl=m("sr-only");function ju({onSubmit:e}={}){return(0,uo.jsx)(Fu.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:gh,onSubmit:async(t,{resetForm:a})=>{if(!e){Dl.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?Dl.toast.error(o.message):(Dl.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:s,handleBlur:r,isSubmitting:n,handleSubmit:i})=>(0,uo.jsxs)("form",{onSubmit:i,className:"grid grid-cols-1 gap-2 uo-2 uo:grid-cols-2",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)(wl,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:s,onBlur:r,disabled:n,icon:(0,uo.jsx)(zu.FaUser,{className:"text-primary"}),className:m(Cl,t.name&&a.name&&kl)}),t.name&&a.name&&(0,uo.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:Sl,children:t.name})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(wl,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:s,onBlur:r,disabled:n,icon:(0,uo.jsx)(fh,{}),className:m(Cl,t.email&&a.email&&kl)}),t.email&&a.email&&(0,uo.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:Sl,children:t.email})]}),(0,uo.jsxs)("div",{className:"uo:col-span-2",children:[(0,uo.jsx)(wl,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:s,onBlur:r,disabled:n,className:m(Cl,t.subject&&a.subject&&kl)}),t.subject&&a.subject&&(0,uo.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:Sl,children:t.subject})]}),(0,uo.jsxs)("div",{className:"uo:col-span-2",children:[(0,uo.jsx)(Eu,{placeholder:"Message...",name:"message",value:o.message,onChange:s,onBlur:r,disabled:n,icon:(0,uo.jsx)(vh,{}),className:m(Cl,t.message&&a.message&&kl)}),t.message&&a.message&&(0,uo.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:Sl,children:t.message})]}),(0,uo.jsx)("div",{className:"uo:col-span-2 light grid justify-items-center",children:(0,uo.jsx)(y,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function fh(){return(0,uo.jsx)("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,uo.jsx)("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function vh(){return(0,uo.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,uo.jsx)("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}var bh=({links:e,richText:t})=>(0,uo.jsx)("div",{className:"container",children:(0,uo.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[(0,uo.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,uo.jsx)(It,{className:"mb-0",content:t,enableGutter:!1})}),(0,uo.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,uo.jsx)(zo,{size:"uo",...a},o))})]})}),Hs=({links:e,richText:t})=>{let[a,o]=(0,al.useState)(!1),s="accent",r=()=>o(!0),n=()=>o(!1),i=d=>{d.target===d.currentTarget&&n()};return(0,uo.jsxs)("div",{className:m("relative isolate overflow-hidden",s==="accent"?"bg-accent":"bg-black"),children:[(0,uo.jsx)("div",{className:"px-6 py-24 al:px-6 al:py-32 uo:px-8",children:(0,uo.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,uo.jsx)(It,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,uo.jsx)("div",{className:"uo-10 flex items-center justify-center gap-x-6",children:(0,uo.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:d},c)=>d?.url==="/contact"?(0,uo.jsx)("div",{onClick:r,className:m("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white uo-underline cursor-pointer",s==="accent"?"border-white bg-accent":"border-accent bg-black"),children:d.label},c):(0,uo.jsx)(zo,{size:"uo",className:m("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white uo-underline cursor-pointer",s==="accent"?"border-white bg-accent":"border-accent bg-black"),...d},c))})})]})}),a&&(0,uo.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:i,children:(0,uo.jsxs)("div",{className:"bg-white p-6 uo-10 rounded-uo shadow-uo w-full max-w-uo light relative",children:[(0,uo.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,uo.jsx)(ju,{})," "]})})]})};var Pl=require("prism-react-renderer");function Wc({code:e}){let[t,a]=(0,al.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,uo.jsx)("div",{className:"flex justify-end align-middle",children:(0,uo.jsxs)(y,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,uo.jsx)("p",{children:t}),(0,uo.jsx)("div",{className:"w-6 uo-6",children:(0,uo.jsx)(au.ClipboardCopy,{})})]})})}var Vu=({code:e,language:t=""})=>e?(0,uo.jsx)(Pl.Highlight,{code:e,language:t,theme:Pl.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:s})=>(0,uo.jsxs)("pre",{className:"bg-black p-4 border text-au border-border rounded overflow-x-auto",children:[s.map((r,n)=>(0,uo.jsxs)("div",{...a({className:"table-row",line:r}),children:[(0,uo.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,uo.jsx)("span",{className:"table-cell pl-4",children:r.map((i,d)=>(0,uo.jsx)("span",{...o({token:i})},d))})]},n)),(0,uo.jsx)(Wc,{code:e})]})}):null;var qc=({className:e,code:t,language:a})=>(0,uo.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,uo.jsx)(Vu,{code:t,language:a})});var Gu=E(require("next/image")),hh={"3xl":1920,"2xl":1536,uo:1280,uo:1024,md:768,al:640},$u="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fqw7AGkwgW4fgALAdiC2btKgNZwbgdMbEFpqFR2UyCR8xwAhf8bUHIGk1ckMyB5C1YkeWAdAPQBAeiD6wVYPoD1HUgXwFagZAGc6oSpTmilopoD5GzISQD3odcNIFca0BUQQM5YA2DpHV0AYURBDIAL0C+ugC0C4GedSsVUmwC8/4w8TPiwU6AClJ5RWL1PgQNkrABWdKB3YF3cBwRY5lsI4ApkKpCQi+FIgFJU/TDgDuAxAAwonJuKpGD1rkCXCR1ALyrAUSSEQAhwBdYZ6DPAgSUA2c1wKIZmRcHxMzMYR9DH8NlbkAwwApSAcABwBwTAbb6owAr0AFiZPILVEyCtMmK2jCkTwFDNUNj7nJETQx744gCUmgkZVGJUHyakEZE4W91jtGFA9KsD8Z3JFYDlhGYZLWcllwJMnplcPy+csFAgAAaIDOgeuAGoB96GLZg4kmtfMjnr6ig5oSoySsoy3ya/FMivXZWxwr0KIf9nACbfqcBEgmBSAtAlIT83R+70IWpyACamIjf5E1Iqb9ECVmnoI/FvAIRk8s2J0Y5IquQDgB+5wpScw5AUTC75VTmTs+72NUzoCvQIaAXv5Q8PDAZKLD+MxLv3RFE7KlsQChgBIlKiCv5ByaZv3gJZNm8AnVMhAN+EjrtTYQMICJpu6/0aiQnhClANlz+Bw0cIWa8ev0sBrtrhAyaXEnrfGfATQJiRKih5vKeOHNXXPFrgyamAADh0Q4F2/sESojomDS9o9k0b0H83xjB8qL+JNoTjN+enjpaBpingRh4e8MSugudM030A8FeqMI6PFIgNyPehkpZWGFEAARIQdH5LcAAqIACHkAJqg4OoBccHAuz76wr4BbzFOEa8iBuAZB8AtJHLP2VgMgJw/EIBowo7HxCAH3V6dAXEE/vZ5aZIA8BP8RKhm7Cp8BnAMnAQADdgQDA520AVIpScP+enHz0Gwp25h4i2dPg5FkDXrbsdJikQwXuWgaM5gEMk1AgH4DKKFjDf3bMD+FjEeIxLlRKYnBk2BbquvSDCAQ4gwZiMAAmH4gBTyRtEsYxi7gP6QSrc//39BrDNqG8rtYTmC4BV1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII=",Ku=e=>{let{alt:t,fill:a,imgClassName:o,priority:s,resource:r,size:n,src:i,loading:d}=e,c,l,p=t,g=i||"";if(!g&&r&&typeof r=="object"){let{alt:f,filename:v,height:k,url:A,width:w}=r;if(k&&k>500){let T=500/k;c=w*T,l=k*T}else c=w,l=k;p=f||"",g=A||$u}let u=d||"lazy",b=n||Object.entries(hh).map(([,f])=>`(max-width: ${f}px) ${f*2}w`).join(", ");return(0,uo.jsx)("picture",{children:(0,uo.jsx)(Gu.default,{alt:p||"",className:m(o),fill:a,height:a?void 0:l,placeholder:"blur",blurDataURL:$u,priority:u!=="lazy"&&s,quality:100,loading:u,sizes:b,src:g,width:a?void 0:c})})};var _u=e=>{let{onClick:t,resource:a,videoClassName:o}=e,s=(0,al.useRef)(null);if((0,al.useEffect)(()=>{let{current:r}=s;r&&r.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:r}=a;return(0,uo.jsx)("video",{autoPlay:!0,className:m(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:s,children:(0,uo.jsx)("source",{src:a.url||""})})}return null};var Ir=e=>{let{className:t,htmlElement:a="div",resource:o}=e,s=typeof o=="object"&&o?.mimeType?.includes("video");return(0,uo.jsx)(a||al.Fragment,{...a!==null?{className:t}:{},children:s?(0,uo.jsx)(_u,{...e}):(0,uo.jsx)(Ku,{...e})})};var Mr=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:s,staticImage:r}=e;return(0,uo.jsx)("div",{className:m("uo-full ",{container:a},t),children:(0,uo.jsx)(Ir,{imgClassName:m("rounded-[0.8rem]",o),className:"flex justify-center",resource:s,src:r})})};var em=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:s,staticImage:r}=e;return(0,uo.jsx)("div",{className:m("",{container:a},t),children:(0,uo.jsx)(Ir,{imgClassName:m("rounded-[0.8rem]",o),resource:s,src:r})})};var Us=({title:e,description:t,features:a,id:o,nested:s=!1})=>(0,uo.jsxs)("section",{className:m(s?"w-full":"",""),children:[(0,uo.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,uo.jsx)("h2",{className:"mb-6 uo-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,uo.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,uo.jsx)("div",{className:"mb-5 text-foreground",children:(0,uo.jsx)(It,{content:t,enableGutter:!1})})]}),(0,uo.jsx)("div",{className:`grid gap-6 uo-6 md:grid-cols-${a?a.length>2?2:a.length:1} uo:grid-cols-${a?a.length>3?3:a.length:1}`,children:a&&a.map((r,n)=>{let i=()=>{if(r.icon&&"type"in r.icon&&r.icon.type!=="none")return{type:r.icon.type,icon:r.icon.icon}};return(0,uo.jsx)(Al,{title:r.title||"",content:r.content||void 0,statistic:r.statistic||void 0,settings:{...r.settings,width:"auto",order:n},link:r.link?{...r.link,label:"Learn more"}:void 0,icon:i()??{type:"none",icon:null}},n)})})]});var Il=E(require("react"));function xn({nodes:e}){return(0,uo.jsx)(Il.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let r=(0,uo.jsx)(Il.default.Fragment,{children:t.text},a);return t.format&1&&(r=(0,uo.jsx)("strong",{children:r},a)),t.format&2&&(r=(0,uo.jsx)("em",{children:r},a)),t.format&4&&(r=(0,uo.jsx)("span",{style:{textDecoration:"line-through"},children:r},a)),t.format&8&&(r=(0,uo.jsx)("span",{style:{textDecoration:"underline"},children:r},a)),t.format&16&&(r=(0,uo.jsx)("code",{children:t.text},a)),t.format&32&&(r=(0,uo.jsx)("sub",{children:r},a)),t.format&64&&(r=(0,uo.jsx)("sup",{children:r},a)),r}if(t.type==="table")return(0,uo.jsx)("table",{children:(0,uo.jsx)("tbody",{children:t.children.map((r,n)=>(0,uo.jsx)("tr",{children:r.children.map((i,d)=>(0,uo.jsx)("td",{children:xn({nodes:i.children})},d))},n))})},a);let o=r=>{if(r.children==null)return null;if(r?.type==="list"&&r?.listType==="check")for(let n of r.children)"checked"in n&&(n?.checked||(n.checked=!1));return xn({nodes:r.children})},s="children"in t?o(t):"";if(t.type==="block"){let r=t.fields,n=r?.blockType;if(!r||!n)return null;switch(n){case"cta":return(0,uo.jsx)(Hs,{...r},a);case"mediaBlock":return(0,uo.jsx)(Mr,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,uo.jsx)(em,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,uo.jsx)(Kc,{className:"col-start-2 mb-4",...r},a);case"code":return(0,uo.jsx)(qc,{className:"col-start-2",...r},a);case"features":return(0,uo.jsx)(Us,{...r,nested:!0},a);case"reusableContentBlock":xn({nodes:r.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,uo.jsx)("br",{className:"col-start-2"},a);case"paragraph":return(0,uo.jsx)("p",{className:"col-start-2",children:s},a);case"heading":{let r=t?.tag;return(0,uo.jsx)(r,{className:"col-start-2",id:t?.id||"",children:s},a)}case"list":{let r=t?.tag;return(0,uo.jsx)(r,{className:"list col-start-2",children:s},a)}case"listitem":return t?.checked!=null?(0,uo.jsx)("li",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:s},a):(0,uo.jsx)("li",{value:t?.value,children:s},a);case"quote":return(0,uo.jsx)("blockquote",{className:"col-start-2",children:s},a);case"link":{let r=t.fields;return(0,uo.jsx)(zo,{newTab:!!r?.newTab,reference:r.doc,type:r.linkType==="internal"?"reference":"custom",url:r.url,children:s},a)}case"autolink":{let r=t.fields;return(0,uo.jsx)(zo,{newTab:!!r?.newTab,reference:r.doc,type:r.linkType==="internal"?"reference":"custom",url:r.url,children:s},a)}default:return null}})})}var It=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,uo.jsx)("div",{className:m({"container ":a,"max-w-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&xn({nodes:t?.root?.children})}):null;var Ba=({type:e="solid",iconName:t="cloud",size:a="uo",className:o})=>{let s=e.includes("uo-")?e+" ":"uo-"+e+" ",r="uo-"+t,n=o??"",i=s+r+" uo-"+a+" "+n;return(0,uo.jsx)("i",{className:i})};var Ju=E(require("next/image"));function Yu(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Al({image:e,icon:t,title:a,subtitle:o,content:s,statistic:r,settings:n,link:i,className:d}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-uo-br from-[#A42368] uo-[#4A1030]",radial:"bg-gradient-uo-br from-[#4A1030] uo-[#2D0A1D] relative overflow-hidden",light:"bg-background"},l={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,uo.jsxs)("a",{href:i?.url||"#",className:m("min-w-56 max-w-uo uo-full flex flex-col group bg-background",e?"p-0":"p-6 md:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"bg-foreground",n&&n?.card==="outline"?"text-gray-900":"text-white",l[n?.width??"auto"],"intersect-once intersect:animate-flip-Mm opacity-0 intersect:opacity-100 intersect:animate-duration-500",n&&`intersect:animate-delay-${n.order||1}00`,d),children:[e&&(0,uo.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,uo.jsx)(Ju.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,uo.jsxs)("div",{className:m(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,uo.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,uo.jsx)("div",{className:"text-primary uppercase text-al font-light mb-4",children:o}),(0,uo.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,uo.jsx)(yh,{icon:{type:t?.type||"uo-light",iconName:t?.icon||"uo-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),s&&typeof s=="object"&&(0,uo.jsx)(It,{enableGutter:!1,content:s,enableProse:!1,className:m("prose-al prose-p:text-uo prose-headings:text-uo","space-y-3",n?.card==="outline"||n?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",e&&"prose-headings:text-background prose-p:text-background")}),s&&typeof s=="string"&&(0,uo.jsx)("div",{className:m("prose-al prose-p:text-uo prose-headings:text-uo","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:s})]}),i&&i.url&&(0,uo.jsx)("div",{className:"uo-6",children:(0,uo.jsx)("span",{className:"text-accent font-semibold uppercase text-al block hover:text-accent/80 transition-colors",children:i?.label||"Find out more"})})]})]})}var yh=({icon:e,heading:t,variant:a,iconSize:o,subtitle:s})=>e&&o==="small"&&e.iconName!="uo-icon-error"?(0,uo.jsxs)("div",{className:"flex items-start justify-between w-full mb-2",children:[(0,uo.jsx)("div",{className:m(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),Yu(e)&&(0,uo.jsx)("div",{className:m("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-mr-2 ml-1 uo-1":""),children:(0,uo.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="uo-icon-error"?(0,uo.jsxs)("div",{className:"flex flex-col gap-4",children:[Yu(e)&&(0,uo.jsx)("div",{className:m("uo-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,uo.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,uo.jsx)("h3",{className:m("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,uo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,uo.jsx)("div",{className:m("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Qu=E(require("next/image")),Zu=E(require("next/link"));function eg({name:e,logo:t,href:a}){return(0,uo.jsx)(F,{className:"w-full max-w-al overflow-hidden transition-all duration-300 ring-0 hover:shadow-uo group",children:(0,uo.jsxs)(Zu.default,{href:a,className:"block",children:[(0,uo.jsx)("div",{className:"bg-white p-2 flex items-center justify-center uo-24",children:(0,uo.jsx)("div",{className:"relative w-full uo-full",children:t&&(0,uo.jsx)(Qu.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,uo.jsx)(_,{className:"p-3 flex items-center justify-center uo-18 bg-gradient-uo-br from-gray-900 via-brand-one uo-gray-900",children:(0,uo.jsx)("p",{className:"font-medium text-uo text-white text-center group-hover:scale-105 transition-transform duration-200 ease-in-out",children:e})})]})})}function tg({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:s}){let r=i=>{switch(i){case"birthday":return(0,uo.jsx)(au.Cake,{className:"uo-4 w-4"});case"workAnniversary":return(0,uo.jsx)(au.Award,{className:"uo-4 w-4"});case"companyEvent":return(0,uo.jsx)(au.PartyPopper,{className:"uo-4 w-4"});default:return(0,uo.jsx)(au.CalendarDays,{className:"uo-4 w-4"})}},n=i=>{switch(i){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 uo-slate-500"}};return(0,uo.jsxs)(F,{className:`w-full max-w-md overflow-hidden bg-gradient-uo-br ${n(e)}`,children:[(0,uo.jsxs)(ge,{className:"flex flex-row items-center gap-3 text-white",children:[s&&(0,uo.jsxs)(Nt,{className:"uo-14 w-14 border-2 border-white",children:[(0,uo.jsx)(da,{src:s,alt:a||"Event"}),(0,uo.jsx)(wt,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,uo.jsxs)("div",{className:"flex flex-col",children:[(0,uo.jsx)(be,{className:"text-uo",children:a||"Untitled Event"}),(0,uo.jsxs)("p",{className:"text-al text-white/80",children:[(0,uo.jsx)(au.CalendarDays,{className:"mr-1 inline-block uo-4 w-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,uo.jsxs)(_,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,uo.jsx)("p",{className:"mb-2 text-al text-gray-700",children:o}),(0,uo.jsxs)(K,{variant:"secondary",className:`${n(e)} text-white/80`,children:[r(e),(0,uo.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-uo])/g,"$1 $2").split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "):"Event"})]})]})]})}var og=E(require("next/link"));var rg=E(require("next/image")),ag={al:"640px",md:"768px",uo:"1024px",uo:"1280px","2xl":"1400px"};function sg({slug:e,image:t,title:a,description:o}){return(0,uo.jsxs)(og.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 md:p-[1.875rem]",children:[(0,uo.jsx)("span",{className:m("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 uo-primary [transition:all_500ms_ease] md:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","md:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] md:group-hover/portfolio:[transition-delay:.1s] md:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,uo.jsx)(rg.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
7
+ "use strict";var db=Object.create;var Qn=Object.defineProperty;var cb=Object.getOwnPropertyDescriptor;var mb=Object.getOwnPropertyNames;var pb=Object.getPrototypeOf,ub=Object.prototype.hasOwnProperty;var gb=(e,t)=>{for(var a in t)Qn(e,a,{get:t[a],enumerable:!0})},Dp=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of mb(t))!ub.call(e,s)&&s!==a&&Qn(e,s,{get:()=>t[s],enumerable:!(o=cb(t,s))||o.enumerable});return e};var E=(e,t,a)=>(a=e!=null?db(pb(e)):{},Dp(t||!e||!e.__esModule?Qn(a,"default",{value:e,enumerable:!0}):a,e)),fb=e=>Dp(Qn({},"__esModule",{value:!0}),e);var wy={};gb(wy,{Alert:()=>Fc,AlertDescription:()=>jc,AlertTitle:()=>zc,AppHeader:()=>Fn,AppSidebar:()=>Ys,AppSidebarLeft:()=>kd,ApproveLeave:()=>Im,Avatar:()=>Nt,AvatarFallback:()=>wt,AvatarImage:()=>da,Badge:()=>K,BannerBlock:()=>Kc,BrandLogo:()=>us,Breadcrumb:()=>qi,BreadcrumbEllipsis:()=>tc,BreadcrumbItem:()=>ci,BreadcrumbLink:()=>Ji,BreadcrumbList:()=>Yi,BreadcrumbPage:()=>Qi,BreadcrumbSeparator:()=>Zi,Breadcrumbs:()=>f0,Button:()=>y,CMSLink:()=>Fo,CRMCogeBoard:()=>A0,CRMKanbanBoard:()=>P0,Calendar:()=>ls,CalendarView:()=>Fm,CallToActionBlock:()=>Hs,CallToActionBlockOld:()=>bh,CapabilityMenu:()=>Wm,Card:()=>j,CardContent:()=>ee,CardDescription:()=>ir,CardFooter:()=>vo,CardHeader:()=>Ne,CardTitle:()=>ke,Categories:()=>i0,ChatCardArtefact:()=>Um,ChatCardTask:()=>Ln,ChatInterface:()=>fd,ChatInterfaceMessages:()=>F0,ChatMessage:()=>Hm,Checkbox:()=>Ga,CodeBlock:()=>qc,Collapsible:()=>uo,CollapsibleContent:()=>Zo,CollapsibleTrigger:()=>Qo,ColleagueCard:()=>Ei,ColleagueForm:()=>jn,ColleagueTypeSelection:()=>Pd,ColleaguesView:()=>Kn,CollectionArchive:()=>Gh,Command:()=>gl,CommandDialog:()=>Cu,CommandEmpty:()=>Ic,CommandGroup:()=>Mc,CommandInput:()=>Rc,CommandItem:()=>Lc,CommandList:()=>Ac,CommandSeparator:()=>Bc,CommandShortcut:()=>Ec,CommentSection:()=>Jm,Container:()=>Nm,ContentBlock:()=>wn,ContentCard:()=>Th,CopilotInterface:()=>_0,CopyButton:()=>Wc,CustomLink:()=>bo,CustomerCard:()=>eg,DCProjectCard:()=>Ui,DarkTop:()=>om,DashboardHeader:()=>ev,DashboardHero:()=>Tt,DashboardPage:()=>lp,DealCard:()=>zm,DealDetails:()=>Mn,DeliveryLeadSubmission:()=>bd,DeliveryLeadSubmissionList:()=>yd,DeliveryLeadSubmissionWithList:()=>qf,Dialog:()=>Pt,DialogClose:()=>pl,DialogContent:()=>xt,DialogDescription:()=>Fs,DialogFooter:()=>Es,DialogHeader:()=>Rt,DialogOverlay:()=>ul,DialogPortal:()=>Tc,DialogTitle:()=>At,DialogTrigger:()=>Nu,DigitalColleageusLayout:()=>Dd,DigitalColleagueClone:()=>Td,DigitalColleagueOptions:()=>Rd,DocumentEdit:()=>zd,DocumentPreview:()=>jd,DropdownMenu:()=>Zr,DropdownMenuCheckboxItem:()=>rc,DropdownMenuContent:()=>xr,DropdownMenuGroup:()=>zp,DropdownMenuItem:()=>go,DropdownMenuLabel:()=>en,DropdownMenuPortal:()=>jp,DropdownMenuRadioGroup:()=>Op,DropdownMenuRadioItem:()=>sc,DropdownMenuSeparator:()=>tn,DropdownMenuShortcut:()=>ic,DropdownMenuSub:()=>Hp,DropdownMenuSubContent:()=>oc,DropdownMenuSubTrigger:()=>ac,DropdownMenuTrigger:()=>es,DynamicIcon:()=>Ba,EditableField:()=>Cd,EpicsView:()=>mp,EventCard:()=>tg,FeatureCard:()=>Al,FeatureGrid:()=>cg,FeaturesBlock:()=>Us,FileView:()=>Wn,Filter:()=>n0,FlowPrintable:()=>Bg,Footer:()=>N0,Header:()=>Am,HeaderDesktop:()=>Sm,HeaderMobile:()=>Pm,HeadingImage:()=>Hh,Hero:()=>Ph,HighImpactHero:()=>bm,HolidayGrid:()=>Em,HolidayTracker:()=>S0,HoverCard:()=>bu,HoverCardContent:()=>Pc,HoverCardTrigger:()=>hu,Image:()=>ig,ImageBlock:()=>em,InfoTile:()=>Ih,Input:()=>G,Insight:()=>Ah,KanbanBoardView:()=>cp,KanbanColumn:()=>Bn,KnowledgeBrowser:()=>Hd,KnowledgeSearch:()=>$v,KnowledgeView:()=>_n,Label:()=>k,LightTop:()=>rm,Logo:()=>Kh,LowImpactHero:()=>xm,MOTD:()=>Bh,MainPage:()=>ep,ManagementSidebar:()=>sv,Mask:()=>p0,Media:()=>Ir,MediaBlock:()=>Mr,MediumImpactHero:()=>ym,NavigationTabs:()=>Js,NewCustomerForm:()=>jm,NewDealForm:()=>T0,NewsGrid:()=>Ig,NotificationsPanel:()=>Gm,OrgChart:()=>Fh,PagePrintable:()=>Lg,PageRange:()=>Xh,PageShape:()=>Pn,Pagination:()=>s0,PayloadCard:()=>Cn,PayloadPagination:()=>qh,PlanningView:()=>_d,Popover:()=>rs,PopoverAnchor:()=>pu,PopoverContent:()=>Tr,PopoverTrigger:()=>ss,PostHero:()=>c0,PricingCard:()=>Dh,Printable:()=>Qh,ProjectCard:()=>sg,ProjectTeam:()=>o0,ProjectView:()=>bp,ProjectsIndexView:()=>xp,ProposalSummary:()=>zh,RelatedContent:()=>r0,RelatedPagesMenu:()=>w0,RelatedPosts:()=>$po,RenderBlocks:()=>ps,RenderBlocksWithShapes:()=>Uh,RenderHero:()=>g0,RequestLeave:()=>Lm,ReusableContentBlock:()=>am,RichText:()=>It,ScrollArea:()=>Gt,ScrollBar:()=>ml,SearchableSelect:()=>iv,SectionHero:()=>Cm,Select:()=>Xe,SelectContent:()=>Ue,SelectGroup:()=>ch,SelectItem:()=>J,SelectLabel:()=>Ru,SelectScrollDownButton:()=>Uc,SelectScrollUpButton:()=>Oc,SelectSeparator:()=>Au,SelectTrigger:()=>Oe,SelectValue:()=>nt,Separator:()=>Ts,ServiceCard:()=>Sh,Sheet:()=>el,SheetClose:()=>Xp,SheetContent:()=>on,SheetDescription:()=>pc,SheetFooter:()=>cc,SheetHeader:()=>dc,SheetOverlay:()=>tl,SheetPortal:()=>lc,SheetTitle:()=>mc,SheetTrigger:()=>Wp,Sidebar:()=>Nr,SidebarContent:()=>Lo,SidebarFooter:()=>Cr,SidebarGroup:()=>Oa,SidebarGroupAction:()=>vc,SidebarGroupContent:()=>so,SidebarGroupLabel:()=>kr,SidebarHeader:()=>wr,SidebarInput:()=>fc,SidebarInset:()=>nn,SidebarLeft:()=>Zh,SidebarMenu:()=>Pa,SidebarMenuAction:()=>Rs,SidebarMenuBadge:()=>bc,SidebarMenuButton:()=>Ua,SidebarMenuItem:()=>na,SidebarMenuSkeleton:()=>hc,SidebarMenuSub:()=>or,SidebarMenuSubButton:()=>sr,SidebarMenuSubItem:()=>rr,SidebarProvider:()=>rn,SidebarRail:()=>gc,SidebarRight:()=>a0,SidebarSeparator:()=>ln,SidebarTrigger:()=>sn,SimpleHeader:()=>b0,Skeleton:()=>at,SlideShow:()=>Tg,Switch:()=>ty,Tabs:()=>Vc,TabsContent:()=>mh,TabsList:()=>$c,TabsTrigger:()=>Gc,TasksView:()=>vp,TeamForm:()=>Id,TeamsIndexView:()=>Np,TextAndImages:()=>Mg,Textarea:()=>Ve,Theme:()=>Fl,ThemeProvider:()=>m0,ThemeWithShapes:()=>bg,Toast:()=>mn,ToastAction:()=>Nc,ToastClose:()=>pn,ToastDescription:()=>gn,ToastProvider:()=>ll,ToastTitle:()=>un,ToastViewport:()=>cn,Toaster:()=>dl,Toggle:()=>Cc,ToggleGroup:()=>Dr,ToggleGroupItem:()=>Pr,Tooltip:()=>tr,TooltipContent:()=>Bo,TooltipProvider:()=>er,TooltipTrigger:()=>ar,VideoHeader:()=>y0,WhyUs:()=>jh,badgeVariants:()=>Hc,buttonVariants:()=>ts,defaultColorScheme:()=>Om,findCapabilityByPath:()=>z0,getAllCapabilities:()=>H0,getCapabilityByTeam:()=>j0,getContextualActions:()=>id,getDataPart:()=>Z0,getFileParts:()=>J0,getTextContent:()=>W0,getToolPart:()=>q0,hasDataPart:()=>Q0,hasFilePart:()=>Y0,hasToolPart:()=>X0,testCapabilities:()=>sd,toggleVariants:()=>fn,useIsMobile:()=>ol,useSidebar:()=>gi,useToast:()=>nl});module.exports=fb(wy);var di=E(require("react")),Zn=require("@radix-Fp/react-icons"),Fp=require("@radix-Fp/react-slot");var Ep=require("clsx");var Zd="-",vb=e=>{let t=hb(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let i=n.split(Zd);return i[0]===""&&i.length!==1&&i.shift(),Rp(i,t)||bb(n)},getConflictingClassGroupIds:(n,i)=>{let d=a[n]||[];return i&&o[n]?[...d,...o[n]]:d}}},Rp=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Rp(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let r=e.join(Zd);return t.validators.find(({validator:n})=>n(r))?.classGroupId},Pp=/^\[(.+)\]$/,bb=e=>{if(Pp.test(e)){let t=Pp.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},hb=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return xb(Object.entries(e.classGroups),a).forEach(([r,n])=>{Qd(n,o,r,t)}),o},Qd=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let r=s===""?t:Tp(t,s);r.classGroupId=a;return}if(typeof s=="function"){if(yb(s)){Qd(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([r,n])=>{Qd(n,Tp(t,r),a,o)})})},Tp=(e,t)=>{let a=e;return t.split(Zd).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},yb=e=>e.isThemeGetter,xb=(e,t)=>t?e.map(([a,o])=>{let s=o.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([n,i])=>[t+n,i])):r);return[a,s]}):e,Nb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(r,n)=>{a.set(r,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(r){let n=a.get(r);if(n!==void 0)return n;if((n=o.get(r))!==void 0)return s(r,n),n},set(r,n){a.has(r)?a.set(r,n):s(r,n)}}},Ap="!",wb=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],r=t.length,n=i=>{let d=[],c=0,l=0,m;for(let v=0;v<i.length;v++){let S=i[v];if(c===0){if(S===s&&(o||i.slice(v,v+r)===t)){d.push(i.slice(l,v)),l=v+r;continue}if(S==="/"){m=v;continue}}S==="["?c++:S==="]"&&c--}let g=d.length===0?i:i.substring(l),u=g.startsWith(Ap),b=u?g.substring(1):g,f=m&&m>l?m-l:void 0;return{modifiers:d,hasImportantModifier:u,baseClassName:b,maybePostfixModifierPosition:f}};return a?i=>a({className:i,parseClassName:n}):n},Cb=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},kb=e=>({cache:Nb(e.cacheSize),parseClassName:wb(e),...vb(e)}),Sb=/\s+/,Db=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,r=[],n=e.trim().split(Sb),i="";for(let d=n.length-1;d>=0;d-=1){let c=n[d],{modifiers:l,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:u}=a(c),b=!!u,f=o(b?g.substring(0,u):g);if(!f){if(!b){i=c+(i.length>0?" "+i:i);continue}if(f=o(g),!f){i=c+(i.length>0?" "+i:i);continue}b=!1}let v=Cb(l).join(":"),S=m?v+Ap:v,A=S+f;if(r.includes(A))continue;r.push(A);let w=s(f,b);for(let T=0;T<w.length;++T){let x=w[T];r.push(S+x)}i=c+(i.length>0?" "+i:i)}return i};function Pb(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ip(t))&&(o&&(o+=" "),o+=a);return o}var Ip=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ip(e[o]))&&(a&&(a+=" "),a+=t);return a};function Tb(e,...t){let a,o,s,r=n;function n(d){let c=t.reduce((l,m)=>m(l),e());return a=kb(c),o=a.cache.get,s=a.cache.set,r=i,i(d)}function i(d){let c=o(d);if(c)return c;let l=Db(d,a);return s(d,l),l}return function(){return r(Pb.apply(null,arguments))}}var Et=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Mp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Rb=/^\d+\/\d+$/,Ab=new Set(["px","full","screen"]),Ib=/^(\d+(\.\d+)?)?(au|al|md|po|po)$/,Mb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|po|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|po|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Lb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Eb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hr=e=>ni(e)||Ab.has(e)||Rb.test(e),Jr=e=>li(e,"length",$b),ni=e=>!!e&&!Number.isNaN(Number(e)),Jd=e=>li(e,"number",ni),Wi=e=>!!e&&Number.isInteger(Number(e)),Fb=e=>e.endsWith("%")&&ni(e.slice(0,-1)),Be=e=>Mp.test(e),Qr=e=>Ib.test(e),zb=new Set(["length","size","percentage"]),jb=e=>li(e,zb,Bp),Hb=e=>li(e,"position",Bp),Ob=new Set(["image","url"]),Ub=e=>li(e,Ob,Kb),Vb=e=>li(e,"",Gb),Xi=()=>!0,li=(e,t,a)=>{let o=Mp.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},$b=e=>Mb.test(e)&&!Bb.test(e),Bp=()=>!1,Gb=e=>Lb.test(e),Kb=e=>Eb.test(e);var _b=()=>{let e=Et("colors"),t=Et("spacing"),a=Et("blur"),o=Et("brightness"),s=Et("borderColor"),r=Et("borderRadius"),n=Et("borderSpacing"),i=Et("borderWidth"),d=Et("contrast"),c=Et("grayscale"),l=Et("hueRotate"),m=Et("invert"),g=Et("gap"),u=Et("gradientColorStops"),b=Et("gradientColorStopPositions"),f=Et("inset"),v=Et("margin"),S=Et("opacity"),A=Et("padding"),w=Et("saturate"),T=Et("scale"),x=Et("sepia"),B=Et("skew"),te=Et("space"),I=Et("translate"),_=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",Be,t],C=()=>[Be,t],z=()=>["",hr,Jr],D=()=>["auto",ni,Be],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],le=()=>["solid","dashed","dotted","double","none"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],Je=()=>["","0",Be],ft=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Me=()=>[ni,Be];return{cacheSize:500,separator:":",theme:{colors:[Xi],spacing:[hr,Jr],blur:["none","",Qr,Be],brightness:Me(),borderColor:[e],borderRadius:["none","","full",Qr,Be],borderSpacing:C(),borderWidth:z(),contrast:Me(),grayscale:Je(),hueRotate:Me(),invert:Je(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Fb,Jr],inset:ge(),margin:ge(),opacity:Me(),padding:C(),saturate:Me(),scale:Me(),sepia:Je(),skew:Me(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[Qr]}],"break-after":[{"break-after":ft()}],"break-before":[{"break-before":ft()}],"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:[...ne(),Be]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wi,Be]}],basis:[{basis:ge()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:Je()}],shrink:[{shrink:Je()}],order:[{order:["first","last","none",Wi,Be]}],"grid-cols":[{"grid-cols":[Xi]}],"col-start-end":[{col:["auto",{span:["full",Wi,Be]},Be]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Xi]}],"row-start-end":[{row:["auto",{span:[Wi,Be]},Be]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","au",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","au",Be]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],po:[{po:[A]}],po:[{po:[A]}],po:[{po:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],po:[{po:[v]}],po:[{po:[v]}],po:[{po:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[te]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[te]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[Qr]},Qr]}],po:[{po:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-po":[{"min-po":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-po":[{"max-po":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qr,Jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jd]}],"font-family":[{font:[Xi]}],"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",Be]}],"line-clamp":[{"line-clamp":["none",ni,Jd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hr,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","au-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hr,Jr]}],"underline-offset":[{"underline-offset":["auto",hr,Be]}],"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:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],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",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),Hb]}],"bg-repeat":[{bg:["au-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jb]}],"bg-image":[{bg:["none",{"gradient-po":["t","tr","r","br","b","bl","l","tl"]},Ub]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-po-pos":[{po:[b]}],"gradient-from":[{from:[u]}],"gradient-via":[{via:[u]}],"gradient-po":[{po:[u]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-po":[{"rounded-po":[r]}],"rounded-ee":[{"rounded-ee":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"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-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...le(),"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":[S]}],"divide-style":[{divide:le()}],"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-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...le()]}],"outline-offset":[{"outline-offset":[hr,Be]}],"outline-w":[{outline:[hr,Jr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[hr,Jr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qr,Vb]}],"shadow-color":[{shadow:[Xi]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...he(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":he()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Qr,Be]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[m]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:Me()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:Me()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Wi,Be]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],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","au-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","po-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-po":[{"scroll-po":C()}],"scroll-po":[{"scroll-po":C()}],"scroll-po":[{"scroll-po":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-po":[{"scroll-po":C()}],"scroll-po":[{"scroll-po":C()}],"scroll-po":[{"scroll-po":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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","Mm","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[hr,Jr,Jd]}],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","po","po","po","pb","pl"],px:["po","pl"],py:["po","pb"],m:["mx","my","po","po","po","mr","mb","ml"],mx:["mr","ml"],my:["po","mb"],size:["w","po"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-po","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-po","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-po","scroll-po","scroll-po","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-po","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-po","scroll-po","scroll-po","scroll-pb","scroll-pl"],"scroll-px":["scroll-po","scroll-pl"],"scroll-py":["scroll-po","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Lp=Tb(_b);function p(...e){return Lp((0,Ep.clsx)(e))}function ec(e){let t=0,a=(r,n)=>`${r.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${n}`,o=e.layout.flatMap(r=>{let n=[];return"title"in r&&r.title&&n.push({text:r.title,id:a(r.title,t++),tag:"h2"}),"columns"in r&&Array.isArray(r.columns)&&r.columns.forEach(i=>{if(i.title&&n.push({text:i.title,id:a(i.title,t++),tag:"h2"}),i.richText?.root?.children&&i.richText?.root?.children.length===1){let d=i.richText.root.children.filter(c=>c!==void 0&&c.type==="heading");for(let c of d)c.children[0]&&n.push({text:c.children[0].text??"",id:a(c.children[0].text,t++),tag:c.tag||"h2"})}}),n}),s=Wb(e.layout);return{tableOfContents:o,contentWithIds:s}}function Wb(e){let t=(o,s)=>`${o.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}-${s}`,a=0;return e.map(o=>(o.title&&(o.id=t(o.title,a++)),o.columns&&(o.columns=o.columns.map(s=>(s.title&&(s.id=t(s.title,a++)),s.richText&&(s.richText.root.children=s.richText.root.children.filter(r=>r!==void 0).map(r=>(r.type==="heading"&&r.children&&r.children[0].text?r.id=t(r.children[0].text,a++):r.type==="block"&&r.fields?.media&&(r.id=t(`image-${a}`,a++)),r))),s))),o))}var po=require("react/jsx-runtime"),qi=di.forwardRef(({...e},t)=>(0,po.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));qi.displayName="Breadcrumb";var Yi=di.forwardRef(({className:e,...t},a)=>(0,po.jsx)("ol",{ref:a,className:p("flex flex-wrap items-center gap-1.5 break-words text-al text-muted-foreground al:gap-2.5",e),...t}));Yi.displayName="BreadcrumbList";var ci=di.forwardRef(({className:e,...t},a)=>(0,po.jsx)("li",{ref:a,className:p("inline-flex items-center gap-1.5",e),...t}));ci.displayName="BreadcrumbItem";var Ji=di.forwardRef(({asChild:e,className:t,...a},o)=>(0,po.jsx)(e?Fp.Slot:"a",{ref:o,className:p("transition-colors hover:text-foreground",t),...a}));Ji.displayName="BreadcrumbLink";var Qi=di.forwardRef(({className:e,...t},a)=>(0,po.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:p("font-normal text-foreground",e),...t}));Qi.displayName="BreadcrumbPage";var Zi=({children:e,className:t,...a})=>(0,po.jsx)("li",{role:"presentation","aria-hidden":"true",className:p("[&>svg]:w-3.5 [&>svg]:po-3.5",t),...a,children:e??(0,po.jsx)(Zn.ChevronRightIcon,{})});Zi.displayName="BreadcrumbSeparator";var tc=({className:e,...t})=>(0,po.jsxs)("span",{role:"presentation","aria-hidden":"true",className:p("flex po-9 w-9 items-center justify-center",e),...t,children:[(0,po.jsx)(Zn.DotsHorizontalIcon,{className:"po-4 w-4"}),(0,po.jsx)("span",{className:"sr-only",children:"More"})]});tc.displayName="BreadcrumbElipssis";var mi=E(require("@radix-Fp/react-collapsible")),uo=mi.Root,Qo=mi.CollapsibleTrigger,Zo=mi.CollapsibleContent;var yr=E(require("react")),Fe=E(require("@radix-Fp/react-dropdown-menu"));var Zr=Fe.Root,es=Fe.Trigger,zp=Fe.Group,jp=Fe.Portal,Hp=Fe.Sub,Op=Fe.RadioGroup,ac=yr.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,po.jsxs)(Fe.SubTrigger,{ref:s,className:p("flex cursor-default gap-2 select-none items-center rounded-al px-2 py-1.5 text-al outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,po.jsx)(Zn.ChevronRightIcon,{className:"ml-auto"})]}));ac.displayName=Fe.SubTrigger.displayName;var oc=yr.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Fe.SubContent,{ref:a,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-po data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));oc.displayName=Fe.SubContent.displayName;var xr=yr.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,po.jsx)(Fe.Portal,{children:(0,po.jsx)(Fe.Content,{ref:o,sideOffset:t,className:p("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));xr.displayName=Fe.Content.displayName;var go=yr.forwardRef(({className:e,inset:t,...a},o)=>(0,po.jsx)(Fe.Item,{ref:o,className:p("relative flex cursor-default select-none items-center gap-2 rounded-al px-2 py-1.5 text-al outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));go.displayName=Fe.Item.displayName;var rc=yr.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,po.jsxs)(Fe.CheckboxItem,{ref:s,className:p("relative flex cursor-default select-none items-center rounded-al py-1.5 pl-8 po-2 text-al outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,po.jsx)("span",{className:"absolute left-2 flex po-3.5 w-3.5 items-center justify-center",children:(0,po.jsx)(Fe.ItemIndicator,{children:(0,po.jsx)(Zn.CheckIcon,{className:"po-4 w-4"})})}),t]}));rc.displayName=Fe.CheckboxItem.displayName;var sc=yr.forwardRef(({className:e,children:t,...a},o)=>(0,po.jsxs)(Fe.RadioItem,{ref:o,className:p("relative flex cursor-default select-none items-center rounded-al py-1.5 pl-8 po-2 text-al outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,po.jsx)("span",{className:"absolute left-2 flex po-3.5 w-3.5 items-center justify-center",children:(0,po.jsx)(Fe.ItemIndicator,{children:(0,po.jsx)(Zn.DotFilledIcon,{className:"po-4 w-4 fill-current"})})}),t]}));sc.displayName=Fe.RadioItem.displayName;var en=yr.forwardRef(({className:e,inset:t,...a},o)=>(0,po.jsx)(Fe.Label,{ref:o,className:p("px-2 py-1.5 text-al font-semibold",t&&"pl-8",e),...a}));en.displayName=Fe.Label.displayName;var tn=yr.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Fe.Separator,{ref:a,className:p("-mx-1 my-1 po-px bg-muted",e),...t}));tn.displayName=Fe.Separator.displayName;var ic=({className:e,...t})=>(0,po.jsx)("span",{className:p("ml-auto text-au tracking-widest opacity-60",e),...t});ic.displayName="DropdownMenuShortcut";var Up=E(require("react"));var G=Up.forwardRef(({className:e,type:t,...a},o)=>(0,po.jsx)("input",{type:t,className:p("flex po-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-al shadow-al transition-colors file:border-0 file:bg-transparent file:text-al 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:o,...a}));G.displayName="Input";var $p=E(require("react")),nc=E(require("@radix-Fp/react-separator"));var Ts=$p.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},s)=>(0,po.jsx)(nc.Root,{ref:s,decorative:a,orientation:t,className:p("shrink-0 bg-border",t==="horizontal"?"po-[1px] w-full":"po-full w-[1px]",e),...o}));Ts.displayName=nc.Root.displayName;var an=E(require("react")),Zt=E(require("@radix-Fp/react-dialog")),_p=require("class-variance-authority");var el=Zt.Root,Wp=Zt.Trigger,Xp=Zt.Close,lc=Zt.Portal,tl=an.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Zt.Overlay,{className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));tl.displayName=Zt.Overlay.displayName;var Xb=(0,_p.cva)("fixed z-50 gap-4 bg-background p-6 shadow-po transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-po-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-po-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 po-full w-3/4 border-r data-[state=closed]:slide-out-po-left data-[state=open]:slide-in-from-left al:max-w-al",right:"inset-y-0 right-0 po-full w-3/4 border-l data-[state=closed]:slide-out-po-right data-[state=open]:slide-in-from-right al:max-w-al"}},defaultVariants:{side:"right"}}),on=an.forwardRef(({side:e="right",className:t,children:a,...o},s)=>(0,po.jsxs)(lc,{children:[(0,po.jsx)(tl,{}),(0,po.jsxs)(Zt.Content,{ref:s,className:p(Xb({side:e}),t),...o,children:[(0,po.jsxs)(Zt.Close,{className:"absolute right-4 top-4 rounded-al opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,po.jsx)(Zn.Cross2Icon,{className:"po-4 w-4"}),(0,po.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));on.displayName=Zt.Content.displayName;var dc=({className:e,...t})=>(0,po.jsx)("div",{className:p("flex flex-col space-y-2 text-center al:text-left",e),...t});dc.displayName="SheetHeader";var cc=({className:e,...t})=>(0,po.jsx)("div",{className:p("flex flex-col-reverse al:flex-row al:justify-end al:space-x-2",e),...t});cc.displayName="SheetFooter";var mc=an.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Zt.Title,{ref:a,className:p("text-po font-semibold text-foreground",e),...t}));mc.displayName=Zt.Title.displayName;var pc=an.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Zt.Description,{ref:a,className:p("text-al text-muted-foreground",e),...t}));pc.displayName=Zt.Description.displayName;var He=E(require("react")),au=require("lucide-react");var al=require("react"),ol=(e=768)=>{let[t,a]=(0,al.useState)(!1);return(0,al.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Fp=require("@radix-Fp/react-slot"),Jp=E(require("react")),ts=(0,_p.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-al 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:"po-10 px-4 py-2",icon:"po-10 w-10",po:"po-11 rounded px-8",al:"po-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"}}}),y=Jp.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},r)=>(0,po.jsx)(e?Fp.Slot:"button",{className:p(ts({className:t,size:a,variant:o})),ref:r,...s}));y.displayName="Button";function at({className:e,...t}){return(0,po.jsx)("div",{className:p("animate-pulse rounded-md bg-primary/10",e),...t})}var eu=E(require("react")),Mo=E(require("@radix-Fp/react-tooltip"));var er=Mo.Provider,tr=Mo.Root,ar=Mo.Trigger,Bo=eu.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,po.jsx)(Mo.Portal,{children:(0,po.jsx)(Mo.Content,{ref:o,sideOffset:t,className:p("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-au text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Bo.displayName=Mo.Content.displayName;var qb="sidebar:state",Yb=60*60*24*7,Jb="16rem",Qb="18rem",Zb="3rem",eh="b",ou=He.createContext(null);function gi(){let e=He.useContext(ou);if(!e)throw new Error("useSidebar must po used within a SidebarProvider.");return e}var rn=He.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:s,children:r,...n},i)=>{let d=ol(),[c,l]=He.useState(!1),[m,g]=He.useState(e),u=t??m,b=He.useCallback(A=>{if(a)return a?.(typeof A=="function"?A(u):A);g(A),document.cookie=`${qb}=${u}; path=/; max-age=${Yb}`},[a,u]),f=He.useCallback(()=>d?l(A=>!A):b(A=>!A),[d,b,l]);He.useEffect(()=>{let A=w=>{w.key===eh&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),f())};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[f]);let v=u?"expanded":"collapsed",S=He.useMemo(()=>({state:v,open:u,setOpen:b,isMobile:d,openMobile:c,setOpenMobile:l,toggleSidebar:f}),[v,u,b,d,c,l,f]);return(0,po.jsx)(ou.Provider,{value:S,children:(0,po.jsx)(er,{delayDuration:0,children:(0,po.jsx)("div",{style:{"--sidebar-width":Jb,"--sidebar-width-icon":Zb,...s},className:p("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:i,...n,children:r})})})});rn.displayName="SidebarProvider";var Nr=He.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:s,...r},n)=>{let{isMobile:i,state:d,openMobile:c,setOpenMobile:l}=gi();return a==="none"?(0,po.jsx)("div",{className:p("flex po-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...r,children:s}):i?(0,po.jsx)(el,{open:c,onOpenChange:l,...r,children:(0,po.jsx)(on,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Qb},side:e,children:(0,po.jsx)("div",{className:"flex po-full w-full flex-col",children:s})})}):(0,po.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":d,"data-collapsible":d==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,po.jsx)("div",{className:p("duration-200 relative po-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,po.jsx)("div",{className:p("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="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)]",t==="floating"||t==="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",o),...r,children:(0,po.jsx)("div",{"data-sidebar":"sidebar",className:"flex po-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-po group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});Nr.displayName="Sidebar";var sn=He.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:s}=gi();return(0,po.jsxs)(y,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:p("po-7 w-7",e),onClick:r=>{t?.(r),s()},...a,children:[(0,po.jsx)(au.PanelLeft,{}),(0,po.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});sn.displayName="SidebarTrigger";var gc=He.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=gi();return(0,po.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:p("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 al: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",e),...t})});gc.displayName="SidebarRail";var nn=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("main",{ref:a,className:p("flex flex-1 flex-col bg-background overflow-y-auto relative max-po-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-po md:peer-data-[variant=inset]:shadow",e),...t}));nn.displayName="SidebarInset";var fc=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)(G,{ref:a,"data-sidebar":"input",className:p("po-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));fc.displayName="SidebarInput";var wr=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,"data-sidebar":"header",className:p("flex flex-col gap-2 p-2",e),...t}));wr.displayName="SidebarHeader";var Cr=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,"data-sidebar":"footer",className:p("flex flex-col gap-2 p-2",e),...t}));Cr.displayName="SidebarFooter";var ln=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Ts,{ref:a,"data-sidebar":"separator",className:p("mx-2 w-auto bg-sidebar-border",e),...t}));ln.displayName="SidebarSeparator";var Lo=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,"data-sidebar":"content",className:p("flex min-po-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Lo.displayName="SidebarContent";var Oa=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,"data-sidebar":"group",className:p("relative flex w-full min-w-0 flex-col p-2",e),...t}));Oa.displayName="SidebarGroup";var kr=He.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,po.jsx)(t?Fp.Slot:"div",{ref:o,"data-sidebar":"group-label",className:p("duration-200 flex po-8 shrink-0 items-center rounded-md px-2 text-au 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]:-po-8 group-data-[collapsible=icon]:opacity-0",e),...a}));kr.displayName="SidebarGroupLabel";var vc=He.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,po.jsx)(t?Fp.Slot:"button",{ref:o,"data-sidebar":"group-action",className:p("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",e),...a}));vc.displayName="SidebarGroupAction";var so=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,"data-sidebar":"group-content",className:p("w-full text-al",e),...t}));so.displayName="SidebarGroupContent";var Pa=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("ul",{ref:a,"data-sidebar":"menu",className:p("flex w-full min-w-0 flex-col gap-1",e),...t}));Pa.displayName="SidebarMenu";var na=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:p("group/menu-item relative",e),...t}));na.displayName="SidebarMenuItem";var th=(0,_p.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-al 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:po-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:"po-8 text-al",al:"po-7 text-au",po:"po-12 text-al group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ua=He.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:s,className:r,...n},i)=>{let d=e?Fp.Slot:"button",{isMobile:c,state:l}=gi(),m=(0,po.jsx)(d,{ref:i,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:p(th({variant:a,size:o}),r),...n});return s?(typeof s=="string"&&(s={children:s}),(0,po.jsxs)(tr,{children:[(0,po.jsx)(ar,{asChild:!0,children:m}),(0,po.jsx)(Bo,{side:"right",align:"center",hidden:l!=="collapsed"||c,...s})]})):m});Ua.displayName="SidebarMenuButton";var Rs=He.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},s)=>(0,po.jsx)(t?Fp.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:p("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=al]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=po]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"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",e),...o}));Rs.displayName="SidebarMenuAction";var bc=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:p("absolute right-1 flex po-5 min-w-5 items-center justify-center rounded-md px-1 text-au 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=al]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=po]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));bc.displayName="SidebarMenuBadge";var hc=He.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let s=He.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,po.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:p("rounded-md po-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,po.jsx)(at,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,po.jsx)(at,{className:"po-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});hc.displayName="SidebarMenuSkeleton";var or=He.forwardRef(({className:e,...t},a)=>(0,po.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:p("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",e),...t}));or.displayName="SidebarMenuSub";var rr=He.forwardRef(({...e},t)=>(0,po.jsx)("li",{ref:t,...e}));rr.displayName="SidebarMenuSubItem";var sr=He.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...s},r)=>(0,po.jsx)(e?Fp.Slot:"a",{ref:r,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:p("flex po-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",t==="al"&&"text-au",t==="md"&&"text-al","group-data-[collapsible=icon]:hidden",o),...s}));sr.displayName="SidebarMenuSubButton";var il=E(require("react")),ah=1,oh=1e6;var yc=0;function rh(){return yc=(yc+1)%Number.MAX_SAFE_INTEGER,yc.toString()}var xc=new Map,ru=e=>{if(xc.has(e))return;let t=setTimeout(()=>{xc.delete(e),dn({type:"REMOVE_TOAST",toastId:e})},oh);xc.set(e,t)},sh=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ah)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?ru(a):e.toasts.forEach(o=>{ru(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},rl=[],sl={toasts:[]};function dn(e){sl=sh(sl,e),rl.forEach(t=>{t(sl)})}function ih({...e}){let t=rh(),a=s=>dn({type:"UPDATE_TOAST",toast:{...s,id:t}}),o=()=>dn({type:"DISMISS_TOAST",toastId:t});return dn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||o()}}}),{id:t,dismiss:o,update:a}}function nl(){let[e,t]=il.useState(sl);return il.useEffect(()=>(rl.push(t),()=>{let a=rl.indexOf(t);a>-1&&rl.splice(a,1)}),[e]),{...e,toast:ih,dismiss:a=>dn({type:"DISMISS_TOAST",toastId:a})}}var As=E(require("react")),la=E(require("@radix-Fp/react-toast"));var ll=la.Provider,cn=As.forwardRef(({className:e,...t},a)=>(0,po.jsx)(la.Viewport,{ref:a,className:p("fixed top-0 z-[100] flex max-po-screen w-full flex-col-reverse p-4 al:bottom-0 al:right-0 al:top-auto al:flex-col md:max-w-[420px]",e),...t}));cn.displayName=la.Viewport.displayName;var nh=(0,_p.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 po-6 shadow-po transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-po-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:al:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),mn=As.forwardRef(({className:e,variant:t,...a},o)=>(0,po.jsx)(la.Root,{ref:o,className:p(nh({variant:t}),e),...a}));mn.displayName=la.Root.displayName;var Nc=As.forwardRef(({className:e,...t},a)=>(0,po.jsx)(la.Action,{ref:a,className:p("inline-flex po-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-al font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Nc.displayName=la.Action.displayName;var pn=As.forwardRef(({className:e,...t},a)=>(0,po.jsx)(la.Close,{ref:a,className:p("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,po.jsx)(au.po,{className:"po-4 w-4"})}));pn.displayName=la.Close.displayName;var un=As.forwardRef(({className:e,...t},a)=>(0,po.jsx)(la.Title,{ref:a,className:p("text-al font-semibold [&+div]:text-au",e),...t}));un.displayName=la.Title.displayName;var gn=As.forwardRef(({className:e,...t},a)=>(0,po.jsx)(la.Description,{ref:a,className:p("text-al opacity-90",e),...t}));gn.displayName=la.Description.displayName;function dl(){let{toasts:e}=nl();return(0,po.jsxs)(ll,{children:[e.map(function({id:t,title:a,description:o,action:s,...r}){return(0,po.jsxs)(mn,{...r,children:[(0,po.jsxs)("div",{className:"grid gap-1",children:[a&&(0,po.jsx)(un,{children:a}),o&&(0,po.jsx)(gn,{children:o})]}),s,(0,po.jsx)(pn,{})]},t)}),(0,po.jsx)(cn,{})]})}var nu=E(require("react")),wc=E(require("@radix-Fp/react-toggle"));var fn=(0,_p.cva)("inline-flex items-center justify-center gap-2 rounded-md text-al font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-al hover:bg-accent hover:text-accent-foreground"},size:{default:"po-9 px-2 min-w-9",al:"po-8 px-1.5 min-w-8",po:"po-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Cc=nu.forwardRef(({className:e,variant:t,size:a,...o},s)=>(0,po.jsx)(wc.Root,{ref:s,className:p(fn({variant:t,size:a,className:e})),...o}));Cc.displayName=wc.Root.displayName;var Is=E(require("react")),fi=E(require("@radix-Fp/react-toggle-group"));var cu=Is.createContext({size:"default",variant:"default"}),Dr=Is.forwardRef(({className:e,variant:t,size:a,children:o,...s},r)=>(0,po.jsx)(fi.Root,{ref:r,className:p("flex items-center justify-center gap-1",e),...s,children:(0,po.jsx)(cu.Provider,{value:{variant:t,size:a},children:o})}));Dr.displayName=fi.Root.displayName;var Pr=Is.forwardRef(({className:e,children:t,variant:a,size:o,...s},r)=>{let n=Is.useContext(cu);return(0,po.jsx)(fi.Item,{ref:r,className:p(fn({variant:n.variant||a,size:n.size||o}),e),...s,children:t})});Pr.displayName=fi.Item.displayName;var kc=E(require("react")),fo=E(require("@radix-Fp/react-scroll-area"));var Gt=kc.forwardRef(({className:e,children:t,...a},o)=>(0,po.jsxs)(fo.Root,{ref:o,className:p("relative overflow-hidden",e),...a,children:[(0,po.jsx)(fo.Viewport,{className:"po-full w-full rounded-[inherit]",children:t}),(0,po.jsx)(ml,{}),(0,po.jsx)(fo.Corner,{})]}));Gt.displayName=fo.Root.displayName;var ml=kc.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,po.jsx)(fo.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"po-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"po-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,po.jsx)(fo.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ml.displayName=fo.ScrollAreaScrollbar.displayName;var mu=E(require("react")),Eo=E(require("@radix-Fp/react-popover"));var rs=Eo.Root,ss=Eo.Trigger,pu=Eo.Anchor,Tr=mu.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,po.jsx)(Eo.Portal,{children:(0,po.jsx)(Eo.Content,{ref:s,align:t,sideOffset:a,className:p("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Tr.displayName=Eo.Content.displayName;var uu=E(require("react")),Dc=E(require("@radix-Fp/react-label"));var lh=(0,_p.cva)("text-al font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),k=uu.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Dc.Root,{ref:a,className:p(lh(),e),...t}));k.displayName=Dc.Root.displayName;var vu=E(require("react")),Ms=E(require("@radix-Fp/react-hover-card"));var bu=Ms.Root,hu=Ms.Trigger,Pc=vu.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},s)=>(0,po.jsx)(Ms.Content,{ref:s,align:t,sideOffset:a,className:p("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));Pc.displayName=Ms.Content.displayName;var Bs=E(require("react"));var j=Bs.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,className:p("rounded-po border bg-card text-card-foreground shadow",e),...t}));j.displayName="Card";var Ne=Bs.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));Ne.displayName="CardHeader";var ke=Bs.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));ke.displayName="CardTitle";var ir=Bs.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,className:p("text-al text-muted-foreground",e),...t}));ir.displayName="CardDescription";var ee=Bs.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,className:p("p-6 po-0",e),...t}));ee.displayName="CardContent";var vo=Bs.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,className:p("flex items-center p-6 po-0",e),...t}));vo.displayName="CardFooter";var vn=E(require("react")),ea=E(require("@radix-Fp/react-dialog"));var Pt=ea.Root,Nu=ea.Trigger,Tc=ea.Portal,pl=ea.Close,ul=vn.forwardRef(({className:e,...t},a)=>(0,po.jsx)(ea.Overlay,{ref:a,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ul.displayName=ea.Overlay.displayName;var xt=vn.forwardRef(({className:e,children:t,...a},o)=>(0,po.jsxs)(Tc,{children:[(0,po.jsx)(ul,{}),(0,po.jsxs)(ea.Content,{ref:o,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-po translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-po duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-po-left-1/2 data-[state=closed]:slide-out-po-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] al:rounded-po",e),...a,children:[t,(0,po.jsxs)(ea.Close,{className:"absolute right-4 top-4 rounded-al opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,po.jsx)(au.po,{className:"po-4 w-4"}),(0,po.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));xt.displayName=ea.Content.displayName;var Rt=({className:e,...t})=>(0,po.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center al:text-left",e),...t});Rt.displayName="DialogHeader";var Es=({className:e,...t})=>(0,po.jsx)("div",{className:p("flex flex-col-reverse al:flex-row al:justify-end al:space-x-2",e),...t});Es.displayName="DialogFooter";var At=vn.forwardRef(({className:e,...t},a)=>(0,po.jsx)(ea.Title,{ref:a,className:p("text-po font-semibold leading-none tracking-tight",e),...t}));At.displayName=ea.Title.displayName;var Fs=vn.forwardRef(({className:e,...t},a)=>(0,po.jsx)(ea.Description,{ref:a,className:p("text-al text-muted-foreground",e),...t}));Fs.displayName=ea.Description.displayName;var is=E(require("react")),$a=require("cmdk");var gl=is.forwardRef(({className:e,...t},a)=>(0,po.jsx)($a.Command,{ref:a,className:p("flex po-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));gl.displayName=$a.Command.displayName;var Cu=({children:e,...t})=>(0,po.jsx)(Pt,{...t,children:(0,po.jsx)(xt,{className:"overflow-hidden p-0",children:(0,po.jsx)(gl,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:po-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:po-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:po-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:po-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Rc=is.forwardRef(({className:e,...t},a)=>(0,po.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,po.jsx)(au.Search,{className:"mr-2 po-4 w-4 shrink-0 opacity-50"}),(0,po.jsx)($a.Command.Input,{ref:a,className:p("flex po-10 w-full rounded-md bg-transparent py-3 text-al outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Rc.displayName=$a.Command.Input.displayName;var Ac=is.forwardRef(({className:e,...t},a)=>(0,po.jsx)($a.Command.List,{ref:a,className:p("max-po-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ac.displayName=$a.Command.List.displayName;var Ic=is.forwardRef((e,t)=>(0,po.jsx)($a.Command.Empty,{ref:t,className:"py-6 text-center text-al",...e}));Ic.displayName=$a.Command.Empty.displayName;var Mc=is.forwardRef(({className:e,...t},a)=>(0,po.jsx)($a.Command.Group,{ref:a,className:p("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-au [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Mc.displayName=$a.Command.Group.displayName;var Bc=is.forwardRef(({className:e,...t},a)=>(0,po.jsx)($a.Command.Separator,{ref:a,className:p("-mx-1 po-px bg-border",e),...t}));Bc.displayName=$a.Command.Separator.displayName;var Lc=is.forwardRef(({className:e,...t},a)=>(0,po.jsx)($a.Command.Item,{ref:a,className:p("relative flex cursor-default gap-2 select-none items-center rounded-al px-2 py-1.5 text-al outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Lc.displayName=$a.Command.Item.displayName;var Ec=({className:e,...t})=>(0,po.jsx)("span",{className:p("ml-auto text-au tracking-widest text-muted-foreground",e),...t});Ec.displayName="CommandShortcut";var fl=E(require("react"));var dh=(0,_p.cva)("relative w-full rounded-po border px-4 py-3 text-al [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Fc=fl.forwardRef(({className:e,variant:t,...a},o)=>(0,po.jsx)("div",{ref:o,role:"alert",className:p(dh({variant:t}),e),...a}));Fc.displayName="Alert";var zc=fl.forwardRef(({className:e,...t},a)=>(0,po.jsx)("h5",{ref:a,className:p("mb-1 font-medium leading-none tracking-tight",e),...t}));zc.displayName="AlertTitle";var jc=fl.forwardRef(({className:e,...t},a)=>(0,po.jsx)("div",{ref:a,className:p("text-al [&_p]:leading-relaxed",e),...t}));jc.displayName="AlertDescription";var bl=E(require("react")),Rr=E(require("@radix-Fp/react-avatar"));var Nt=bl.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Rr.Root,{ref:a,className:p("relative flex po-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Nt.displayName=Rr.Root.displayName;var da=bl.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Rr.Image,{ref:a,className:p("aspect-square po-full w-full",e),...t}));da.displayName=Rr.Image.displayName;var wt=bl.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Rr.Fallback,{ref:a,className:p("flex po-full w-full items-center justify-center rounded-full bg-muted",e),...t}));wt.displayName=Rr.Fallback.displayName;var Hc=(0,_p.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-au 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 K({className:e,variant:t,...a}){return(0,po.jsx)("div",{className:p(Hc({variant:t}),e),...a})}var bn=E(require("@radix-Fp/react-checkbox")),Tu=E(require("react")),Ga=Tu.forwardRef(({className:e,...t},a)=>(0,po.jsx)(bn.Root,{className:p("peer po-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,po.jsx)(bn.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,po.jsx)(au.Check,{className:"po-4 w-4"})})}));Ga.displayName=bn.Root.displayName;var We=E(require("@radix-Fp/react-select")),ns=E(require("react")),Xe=We.Root,ch=We.Group,nt=We.Value,Oe=ns.forwardRef(({children:e,className:t,...a},o)=>(0,po.jsxs)(We.Trigger,{className:p("flex po-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,po.jsx)(We.Icon,{asChild:!0,children:(0,po.jsx)(au.ChevronDown,{className:"po-4 w-4 opacity-50"})})]}));Oe.displayName=We.Trigger.displayName;var Oc=ns.forwardRef(({className:e,...t},a)=>(0,po.jsx)(We.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,po.jsx)(au.ChevronUp,{className:"po-4 w-4"})}));Oc.displayName=We.ScrollUpButton.displayName;var Uc=ns.forwardRef(({className:e,...t},a)=>(0,po.jsx)(We.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,po.jsx)(au.ChevronDown,{className:"po-4 w-4"})}));Uc.displayName=We.ScrollDownButton.displayName;var Ue=ns.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,po.jsx)(We.Portal,{children:(0,po.jsxs)(We.Content,{className:p("relative z-50 max-po-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:s,...o,children:[(0,po.jsx)(Oc,{}),(0,po.jsx)(We.Viewport,{className:p("p-1",a==="popper"&&"po-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,po.jsx)(Uc,{})]})}));Ue.displayName=We.Content.displayName;var Ru=ns.forwardRef(({className:e,...t},a)=>(0,po.jsx)(We.Label,{className:p("py-1.5 pl-8 po-2 text-al font-semibold",e),ref:a,...t}));Ru.displayName=We.Label.displayName;var J=ns.forwardRef(({children:e,className:t,...a},o)=>(0,po.jsxs)(We.Item,{className:p("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 po-2 text-al outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,po.jsx)("span",{className:"absolute left-2 flex po-3.5 w-3.5 items-center justify-center",children:(0,po.jsx)(We.ItemIndicator,{children:(0,po.jsx)(au.Check,{className:"po-4 w-4"})})}),(0,po.jsx)(We.ItemText,{children:e})]}));J.displayName=We.Item.displayName;var Au=ns.forwardRef(({className:e,...t},a)=>(0,po.jsx)(We.Separator,{className:p("-mx-1 my-1 po-px bg-muted",e),ref:a,...t}));Au.displayName=We.Separator.displayName;var Iu=E(require("react")),Ve=Iu.forwardRef(({className:e,...t},a)=>(0,po.jsx)("textarea",{className:p("flex min-po-[80px] w-full rounded border border-border bg-background px-3 py-2 text-al ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Ve.displayName="Textarea";var Bu=require("react-day-picker");function ls({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,po.jsx)(Bu.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:p("p-3",e),classNames:{months:"flex flex-col al:flex-row space-y-4 al:space-x-4 al:space-y-0",month:"space-y-4",caption:"flex justify-center po-1 relative items-center",caption_label:"text-al font-medium",nav:"space-x-1 flex items-center",nav_button:p(ts({variant:"outline"}),"po-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full po-2",cell:p("relative p-0 text-center text-al focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:p(ts({variant:"ghost"}),"po-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}ls.displayName="Calendar";var ds=E(require("@radix-Fp/react-tabs"));function Vc({className:e,...t}){return(0,po.jsx)(ds.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function $c({className:e,...t}){return(0,po.jsx)(ds.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex po-9 w-fit items-center justify-center rounded-po p-[3px]",e),...t})}function Gc({className:e,...t}){return(0,po.jsx)(ds.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex po-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-al font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-al [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function mh({className:e,...t}){return(0,po.jsx)(ds.Content,{"data-slot":"tabs-content",className:p("flex-1 outline-none",e),...t})}var Kc=({className:e,content:t,style:a})=>(0,po.jsx)("div",{className:p("mx-auto my-8 w-full",e),children:(0,po.jsx)("div",{className:p("border py-3 px-6 flex items-center rounded",{"border-border bg-card":a==="info","border-error bg-error/30":a==="error","border-success bg-success/30":a==="success","border-warning bg-warning/30":a==="warning"}),children:(0,po.jsx)(It,{content:t,enableGutter:!1,enableProse:!1})})});var _c=E(require("next/link")),Fo=e=>{let{type:t,appearance:a="inline",children:o,className:s,label:r,newTab:n,reference:i,size:d,url:c}=e,l=t==="reference"&&typeof i?.value=="object"&&i.value.slug?`${i?.relationTo!=="pages"?`/${i?.relationTo}`:""}/${i.value.slug}`:c;if(!l)return null;let m=a==="link"?"clear":d,g=n?{rel:"noopener noreferrer",target:"_blank"}:{};return a==="inline"?(0,po.jsxs)(_c.default,{className:p(s),href:l||c||"",...g,children:[r&&r,o&&o]}):(0,po.jsx)(y,{asChild:!0,className:s,size:m,variant:a,children:(0,po.jsxs)(_c.default,{className:p(s),href:l||c||"",...g,children:[r&&r,o&&o]})})};function Nl({className:e}){return p("flex items-center min-po-[3.5rem] md:min-po-[3.75rem] w-full rounded-5 px-4 md:px-5 py-2"," bg-transparent text-accent-800 placeholder:text-accent-800 dark:text-body dark:placeholder:text-body"," border border-solid border-accent-900 border-opacity-20 dark:border-opacity-20 dark:border-accent-200"," focus:border-accent-900 focus:ring-0 focus-visible:outline-0 focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-300",e)}function ph({className:e,...t}){return(0,po.jsx)("input",{...t,className:Nl({className:e})})}function wl({icon:e,...t}){return(0,po.jsxs)("div",{className:"relative w-full",children:[(0,po.jsx)(ph,{...t}),e&&(0,po.jsx)("span",{className:"absolute right-5 top-1/2 w-[14px] -translate-y-1/2 text-accent",children:e})]})}function uh({className:e,...t}){return(0,po.jsx)("textarea",{...t,className:p(Nl({}),"resize-none md:min-po-[130px]",e)})}function Eu({icon:e,...t}){return(0,po.jsxs)("div",{className:"relative w-full",children:[(0,po.jsx)(uh,{...t}),e&&(0,po.jsx)("span",{className:"absolute right-5 top-[18px] w-[14px] text-accent",children:e})]})}var Fu=require("formik"),zu=require("react-icons/fa6"),js=E(require("yup")),Dl=require("sonner"),zo={tooShort:"Must po at least ${min} characters",tooLong:"Must po at most ${max} characters",required:"This field is required",email:"Invalid email format"},gh=js.object().shape({name:js.string().min(2,zo.tooShort).max(50,zo.tooLong).required(zo.required),email:js.string().email(zo.email).required(zo.required),subject:js.string().min(2,zo.tooShort).max(50,zo.tooLong).required(zo.required),message:js.string().min(2,zo.tooShort).max(300,zo.tooLong).required(zo.required)}),Cl=p("!po-[44px] text-foreground"),kl=p("!border-red-600 border"),Sl=p("sr-only");function ju({onSubmit:e}={}){return(0,po.jsx)(Fu.Formik,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:gh,onSubmit:async(t,{resetForm:a})=>{if(!e){Dl.toast.error("Form submission not configured");return}let o=await e(t);o.data===null?Dl.toast.error(o.message):(Dl.toast.success(o.message),a())},children:({errors:t,touched:a,values:o,handleChange:s,handleBlur:r,isSubmitting:n,handleSubmit:i})=>(0,po.jsxs)("form",{onSubmit:i,className:"grid grid-cols-1 gap-2 po-2 po:grid-cols-2",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)(wl,{placeholder:"Your Name",type:"text",name:"name",value:o.name,onChange:s,onBlur:r,disabled:n,icon:(0,po.jsx)(zu.FaUser,{className:"text-primary"}),className:p(Cl,t.name&&a.name&&kl)}),t.name&&a.name&&(0,po.jsx)("p",{title:t.name,"aria-live":"polite",role:"error message",className:Sl,children:t.name})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(wl,{placeholder:"Your Email",type:"email",name:"email",value:o.email,onChange:s,onBlur:r,disabled:n,icon:(0,po.jsx)(fh,{}),className:p(Cl,t.email&&a.email&&kl)}),t.email&&a.email&&(0,po.jsx)("p",{title:t.email,"aria-live":"polite",role:"error message",className:Sl,children:t.email})]}),(0,po.jsxs)("div",{className:"po:col-span-2",children:[(0,po.jsx)(wl,{placeholder:"Subject",type:"text",name:"subject",value:o.subject,onChange:s,onBlur:r,disabled:n,className:p(Cl,t.subject&&a.subject&&kl)}),t.subject&&a.subject&&(0,po.jsx)("p",{title:t.subject,"aria-live":"polite",role:"error message",className:Sl,children:t.subject})]}),(0,po.jsxs)("div",{className:"po:col-span-2",children:[(0,po.jsx)(Eu,{placeholder:"Message...",name:"message",value:o.message,onChange:s,onBlur:r,disabled:n,icon:(0,po.jsx)(vh,{}),className:p(Cl,t.message&&a.message&&kl)}),t.message&&a.message&&(0,po.jsx)("p",{title:t.message,"aria-live":"polite",role:"error message",className:Sl,children:t.message})]}),(0,po.jsx)("div",{className:"po:col-span-2 light grid justify-items-center",children:(0,po.jsx)(y,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:n,children:"Send"})})]})})}function fh(){return(0,po.jsx)("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,po.jsx)("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function vh(){return(0,po.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:(0,po.jsx)("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}var bh=({links:e,richText:t})=>(0,po.jsx)("div",{className:"container",children:(0,po.jsxs)("div",{className:"bg-card rounded border-border border p-4 flex flex-col gap-8 md:flex-row md:justify-between md:items-center",children:[(0,po.jsx)("div",{className:"max-w-[48rem] flex items-center",children:t&&(0,po.jsx)(It,{className:"mb-0",content:t,enableGutter:!1})}),(0,po.jsx)("div",{className:"flex flex-col gap-8",children:(e||[]).map(({link:a},o)=>(0,po.jsx)(Fo,{size:"po",...a},o))})]})}),Hs=({links:e,richText:t})=>{let[a,o]=(0,al.useState)(!1),s="accent",r=()=>o(!0),n=()=>o(!1),i=d=>{d.target===d.currentTarget&&n()};return(0,po.jsxs)("div",{className:p("relative isolate overflow-hidden",s==="accent"?"bg-accent":"bg-black"),children:[(0,po.jsx)("div",{className:"px-6 py-24 al:px-6 al:py-32 po:px-8",children:(0,po.jsxs)("div",{className:"mx-auto max-w-2xl text-center prose",children:[t&&(0,po.jsx)(It,{className:"mb-0 prose-headings:text-white prose-h2:text-white prose-p:text-white text-white",content:t,enableGutter:!1}),(0,po.jsx)("div",{className:"po-10 flex items-center justify-center gap-x-6",children:(0,po.jsx)("div",{className:"flex flex-col gap-8 text-white",children:(e||[]).map(({link:d},c)=>d?.url==="/contact"?(0,po.jsx)("div",{onClick:r,className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white au-underline cursor-pointer",s==="accent"?"border-white bg-accent":"border-accent bg-black"),children:d.label},c):(0,po.jsx)(Fo,{size:"po",className:p("rounded-full px-3.5 py-2.5 border border-accent bg-black text-white au-underline cursor-pointer",s==="accent"?"border-white bg-accent":"border-accent bg-black"),...d},c))})})]})}),a&&(0,po.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",onClick:i,children:(0,po.jsxs)("div",{className:"bg-white p-6 po-10 rounded-po shadow-po w-full max-w-po light relative",children:[(0,po.jsx)("button",{className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700",onClick:n,children:"\u2715"}),(0,po.jsx)(ju,{})," "]})})]})};var Pl=require("prism-react-renderer");function Wc({code:e}){let[t,a]=(0,al.useState)("Copy");function o(){t==="Copy"&&(a(()=>"Copied!"),setTimeout(()=>{a(()=>"Copy")},1e3))}return(0,po.jsx)("div",{className:"flex justify-end align-middle",children:(0,po.jsxs)(y,{className:"flex gap-1",variant:"secondary",onClick:async()=>{await navigator.clipboard.writeText(e),o()},children:[(0,po.jsx)("p",{children:t}),(0,po.jsx)("div",{className:"w-6 po-6",children:(0,po.jsx)(au.ClipboardCopy,{})})]})})}var Vu=({code:e,language:t=""})=>e?(0,po.jsx)(Pl.Highlight,{code:e,language:t,theme:Pl.themes.vsDark,children:({getLineProps:a,getTokenProps:o,tokens:s})=>(0,po.jsxs)("pre",{className:"bg-black p-4 border text-au border-border rounded overflow-x-auto",children:[s.map((r,n)=>(0,po.jsxs)("div",{...a({className:"table-row",line:r}),children:[(0,po.jsx)("span",{className:"table-cell select-none text-right text-white/25",children:n+1}),(0,po.jsx)("span",{className:"table-cell pl-4",children:r.map((i,d)=>(0,po.jsx)("span",{...o({token:i})},d))})]},n)),(0,po.jsx)(Wc,{code:e})]})}):null;var qc=({className:e,code:t,language:a})=>(0,po.jsx)("div",{className:[e,"not-prose"].filter(Boolean).join(" "),children:(0,po.jsx)(Vu,{code:t,language:a})});var Gu=E(require("next/image")),hh={"3xl":1920,"2xl":1536,po:1280,po:1024,md:768,al:640},$u="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABchJREFUWEdtlwtTG0kMhHtGM7N+AAdcDsjj///EBLzenbtuadbLJaZUTlHB+tRqSesETB3IABqQG1KbUFqDlQorBSmboqeEBcC1d8zrCixXYGZcgMsFmH8B+AngHdurAmXKOE8nHOoBrU6opcGswPi5KSP9CcBaQ9kACJH/ALAA1xm4zMD8AczvQCcAQeJVAZsy7nYApTSUzwCHUKACeUJi9TsFci7AHmDtuHYqQIC9AgQYKnSwNAig4NyOOwXq/xU47gDYggarjIpsRSEA3Fqw7AGkwgW4fgALAdiC2btKgNZwbgdMbEFpqFR2UyCR8xwAhf8bUHIGk1ckMyB5C1YkeWAdAPQBAeiD6wVYPoD1HUgXwFagZAGc6oSpTmilopoD5GzISQD3odcNIFca0BUQQM5YA2DpHV0AYURBDIAL0C+ugC0C4GedSsVUmwC8/4w8TPiwU6AClJ5RWL1PgQNkrABWdKB3YF3cBwRY5lsI4ApkKpCQi+FIgFJU/TDgDuAxAAwonJuKpGD1rkCXCR1ALyrAUSSEQAhwBdYZ6DPAgSUA2c1wKIZmRcHxMzMYR9DH8NlbkAwwApSAcABwBwTAbb6owAr0AFiZPILVEyCtMmK2jCkTwFDNUNj7nJETQx744gCUmgkZVGJUHyakEZE4W91jtGFA9KsD8Z3JFYDlhGYZLWcllwJMnplcPy+csFAgAAaIDOgeuAGoB96GLZg4kmtfMjnr6ig5oSoySsoy3ya/FMivXZWxwr0KIf9nACbfqcBEgmBSAtAlIT83R+70IWpyACamIjf5E1Iqb9ECVmnoI/FvAIRk8s2J0Y5IquQDgB+5wpScw5AUTC75VTmTs+72NUzoCvQIaAXv5Q8PDAZKLD+MxLv3RFE7KlsQChgBIlKiCv5ByaZv3gJZNm8AnVMhAN+EjrtTYQMICJpu6/0aiQnhClANlz+Bw0cIWa8ev0sBrtrhAyaXEnrfGfATQJiRKih5vKeOHNXXPFrgyamAADh0Q4F2/sESojomDS9o9k0b0H83xjB8qL+JNoTjN+enjpaBpingRh4e8MSugudM030A8FeqMI6PFIgNyPehkpZWGFEAARIQdH5LcAAqIACHkAJqg4OoBccHAuz76wr4BbzFOEa8iBuAZB8AtJHLP2VgMgJw/EIBowo7HxCAH3V6dAXEE/vZ5aZIA8BP8RKhm7Cp8BnAMnAQADdgQDA520AVIpScP+enHz0Gwp25h4i2dPg5FkDXrbsdJikQwXuWgaM5gEMk1AgH4DKKFjDf3bMD+FjEeIxLlRKYnBk2BbquvSDCAQ4gwZiMAAmH4gBTyRtEsYxi7gP6QSrc//39BrDNqG8rtYTmC4BV1SfMhOhaumFCT87zy4pPhQBZEK1kQVRjJBBi7AOlePgyAPYjwlvtagx9e/dnQraAyS894TIkkAIEYMKEc8k4EqJ68lZ5jjNqcQC2QteQOf7659umwBgPybNtK4dg9WvnMyFwXYGP7uEO1lwJgAnPNeMYMVXbIIYKFioI4PGFt+BWPVfmWJdjW2lTUnLGCswECAgaUy86iwA1464ajo0QhgMBFGyBoZahANsMpMfXr1JA1SN29m5lqgXj+UPV85uRA7yv/KYUO4Tk7Hc1AZwbIRzg0AyNj2UlAMwfSLSMnl7fdAbcxHuA27YaAMvaQ4GOjwX4RTUGAG8Ge14N963g1AynqUiFqRX9noasxT4b8entNRQYyamk/3tYcHsO7R3XJRRYOn4tw4iUnwBM5gDnySGOreAwAGo8F9IDHEcq8Pz2Kg/oXCpuIL6tOPD8LsDn0ABYQoGFRowlsAEUPPDrGAGowAbgKsgDMmE8mDy/vXQ9IAwI7u4wta+gAdAdgB64Ah9SgD4IgGKhwACoAjgNgFDhtxY8f33ZTMjqdTAiHMBPrn8ZWkEfzFdX4Oc1AHg3+ADbvN8PU8WdFKg4Tt6CQy2+D4YHaMT/JP4XzbAq98cPDIUAAAAASUVORK5CYII=",Ku=e=>{let{alt:t,fill:a,imgClassName:o,priority:s,resource:r,size:n,src:i,loading:d}=e,c,l,m=t,g=i||"";if(!g&&r&&typeof r=="object"){let{alt:f,filename:v,height:S,url:A,width:w}=r;if(S&&S>500){let T=500/S;c=w*T,l=S*T}else c=w,l=S;m=f||"",g=A||$u}let u=d||"lazy",b=n||Object.entries(hh).map(([,f])=>`(max-width: ${f}px) ${f*2}w`).join(", ");return(0,po.jsx)("picture",{children:(0,po.jsx)(Gu.default,{alt:m||"",className:p(o),fill:a,height:a?void 0:l,placeholder:"blur",blurDataURL:$u,priority:u!=="lazy"&&s,quality:100,loading:u,sizes:b,src:g,width:a?void 0:c})})};var _u=e=>{let{onClick:t,resource:a,videoClassName:o}=e,s=(0,al.useRef)(null);if((0,al.useEffect)(()=>{let{current:r}=s;r&&r.addEventListener("suspend",()=>{})},[]),a&&typeof a=="object"){let{filename:r}=a;return(0,po.jsx)("video",{autoPlay:!0,className:p(o),controls:!1,loop:!0,muted:!0,onClick:t,playsInline:!0,ref:s,children:(0,po.jsx)("source",{src:a.url||""})})}return null};var Ir=e=>{let{className:t,htmlElement:a="div",resource:o}=e,s=typeof o=="object"&&o?.mimeType?.includes("video");return(0,po.jsx)(a||al.Fragment,{...a!==null?{className:t}:{},children:s?(0,po.jsx)(_u,{...e}):(0,po.jsx)(Ku,{...e})})};var Mr=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:s,staticImage:r}=e;return(0,po.jsx)("div",{className:p("po-full ",{container:a},t),children:(0,po.jsx)(Ir,{imgClassName:p("rounded-[0.8rem]",o),className:"flex justify-center",resource:s,src:r})})};var em=e=>{let{className:t,enableGutter:a=!0,imgClassName:o,media:s,staticImage:r}=e;return(0,po.jsx)("div",{className:p("",{container:a},t),children:(0,po.jsx)(Ir,{imgClassName:p("rounded-[0.8rem]",o),resource:s,src:r})})};var Us=({title:e,description:t,features:a,id:o,nested:s=!1})=>(0,po.jsxs)("section",{className:p(s?"w-full":"",""),children:[(0,po.jsxs)("div",{className:"prose prose:max-w-none",children:[e&&(0,po.jsx)("h2",{className:"mb-6 po-0 text-primary",id:o||"",children:e}),t&&typeof t=="string"&&(0,po.jsx)("p",{className:"mb-5 text-foreground",children:t}),t&&typeof t=="object"&&(0,po.jsx)("div",{className:"mb-5 text-foreground",children:(0,po.jsx)(It,{content:t,enableGutter:!1})})]}),(0,po.jsx)("div",{className:`grid gap-6 po-6 md:grid-cols-${a?a.length>2?2:a.length:1} po:grid-cols-${a?a.length>3?3:a.length:1}`,children:a&&a.map((r,n)=>{let i=()=>{if(r.icon&&"type"in r.icon&&r.icon.type!=="none")return{type:r.icon.type,icon:r.icon.icon}};return(0,po.jsx)(Al,{title:r.title||"",content:r.content||void 0,statistic:r.statistic||void 0,settings:{...r.settings,width:"auto",order:n},link:r.link?{...r.link,label:"Learn more"}:void 0,icon:i()??{type:"none",icon:null}},n)})})]});var Il=E(require("react"));function xn({nodes:e}){return(0,po.jsx)(Il.Fragment,{children:e?.map((t,a)=>{if(t==null)return null;if(t.type==="text"&&t.text){let r=(0,po.jsx)(Il.default.Fragment,{children:t.text},a);return t.format&1&&(r=(0,po.jsx)("strong",{children:r},a)),t.format&2&&(r=(0,po.jsx)("em",{children:r},a)),t.format&4&&(r=(0,po.jsx)("span",{style:{textDecoration:"line-through"},children:r},a)),t.format&8&&(r=(0,po.jsx)("span",{style:{textDecoration:"underline"},children:r},a)),t.format&16&&(r=(0,po.jsx)("code",{children:t.text},a)),t.format&32&&(r=(0,po.jsx)("sub",{children:r},a)),t.format&64&&(r=(0,po.jsx)("sup",{children:r},a)),r}if(t.type==="table")return(0,po.jsx)("table",{children:(0,po.jsx)("tbody",{children:t.children.map((r,n)=>(0,po.jsx)("tr",{children:r.children.map((i,d)=>(0,po.jsx)("td",{children:xn({nodes:i.children})},d))},n))})},a);let o=r=>{if(r.children==null)return null;if(r?.type==="list"&&r?.listType==="check")for(let n of r.children)"checked"in n&&(n?.checked||(n.checked=!1));return xn({nodes:r.children})},s="children"in t?o(t):"";if(t.type==="block"){let r=t.fields,n=r?.blockType;if(!r||!n)return null;switch(n){case"cta":return(0,po.jsx)(Hs,{...r},a);case"mediaBlock":return(0,po.jsx)(Mr,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"imageBlock":return(0,po.jsx)(em,{className:"col-start-1 col-span-3",imgClassName:"m-0",...r,captionClassName:"mx-auto max-w-[48rem]",enableGutter:!1,disableInnerContainer:!0},a);case"banner":return(0,po.jsx)(Kc,{className:"col-start-2 mb-4",...r},a);case"code":return(0,po.jsx)(qc,{className:"col-start-2",...r},a);case"features":return(0,po.jsx)(Us,{...r,nested:!0},a);case"reusableContentBlock":xn({nodes:r.reusableContent.layout});default:return null}}else switch(t.type){case"linebreak":return(0,po.jsx)("br",{className:"col-start-2"},a);case"paragraph":return(0,po.jsx)("p",{className:"col-start-2",children:s},a);case"heading":{let r=t?.tag;return(0,po.jsx)(r,{className:"col-start-2",id:t?.id||"",children:s},a)}case"list":{let r=t?.tag;return(0,po.jsx)(r,{className:"list col-start-2",children:s},a)}case"listitem":return t?.checked!=null?(0,po.jsx)("li",{"aria-checked":t.checked?"true":"false",className:` ${t.checked,""}`,role:"checkbox",tabIndex:-1,value:t?.value,children:s},a):(0,po.jsx)("li",{value:t?.value,children:s},a);case"quote":return(0,po.jsx)("blockquote",{className:"col-start-2",children:s},a);case"link":{let r=t.fields;return(0,po.jsx)(Fo,{newTab:!!r?.newTab,reference:r.doc,type:r.linkType==="internal"?"reference":"custom",url:r.url,children:s},a)}case"autolink":{let r=t.fields;return(0,po.jsx)(Fo,{newTab:!!r?.newTab,reference:r.doc,type:r.linkType==="internal"?"reference":"custom",url:r.url,children:s},a)}default:return null}})})}var It=({className:e,content:t,enableGutter:a=!0,enableProse:o=!0})=>t?(0,po.jsx)("div",{className:p({"container ":a,"max-w-none":!a,"mx-auto prose":o},e),children:t&&!Array.isArray(t)&&typeof t=="object"&&"root"in t&&xn({nodes:t?.root?.children})}):null;var Ba=({type:e="solid",iconName:t="cloud",size:a="po",className:o})=>{let s=e.includes("po-")?e+" ":"po-"+e+" ",r="po-"+t,n=o??"",i=s+r+" po-"+a+" "+n;return(0,po.jsx)("i",{className:i})};var Ju=E(require("next/image"));function Yu(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Al({image:e,icon:t,title:a,subtitle:o,content:s,statistic:r,settings:n,link:i,className:d}){let c={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-po-br from-[#A42368] po-[#4A1030]",radial:"bg-gradient-po-br from-[#4A1030] po-[#2D0A1D] relative overflow-hidden",light:"bg-background"},l={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,po.jsxs)("a",{href:i?.url||"#",className:p("min-w-56 max-w-po po-full flex flex-col group bg-background",e?"p-0":"p-6 md:p-8",n&&!e&&c[n?.card==="default"?"solid":n?.card],e&&"bg-foreground",n&&n?.card==="outline"?"text-gray-900":"text-white",l[n?.width??"auto"],"intersect-once intersect:animate-flip-Mm opacity-0 intersect:opacity-100 intersect:animate-duration-500",n&&`intersect:animate-delay-${n.order||1}00`,d),children:[e&&(0,po.jsx)("div",{className:"relative aspect-[16/9] w-full",children:(0,po.jsx)(Ju.default,{src:e.url||"/placeholder.svg",alt:e.alt||"card header image",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,po.jsxs)("div",{className:p(e?"p-6 md:p-8":"p-0","flex flex-col flex-grow"),children:[(0,po.jsxs)("div",{className:"flex flex-col flex-grow",children:[o&&(0,po.jsx)("div",{className:"text-primary uppercase text-al font-light mb-4",children:o}),(0,po.jsx)("div",{className:"flex items-start gap-4 mb-4",children:(0,po.jsx)(yh,{icon:{type:t?.type||"po-light",iconName:t?.icon||"au-icon-error"},heading:a??"",variant:n?.card==="default"?"solid":n?.card??"solid",iconSize:n?.iconSize||"large"})}),s&&typeof s=="object"&&(0,po.jsx)(It,{enableGutter:!1,content:s,enableProse:!1,className:p("prose-al prose-p:text-po prose-headings:text-po","space-y-3",n?.card==="outline"||n?.card==="light"?"prose-headings:text-foreground prose-p:text-foreground prose-a:text-foreground":"prose-headings:text-white prose-p:text-gray-100 prose-a:text-gray-100",e&&"prose-headings:text-background prose-p:text-background")}),s&&typeof s=="string"&&(0,po.jsx)("div",{className:p("prose-al prose-p:text-po prose-headings:text-po","space-y-3",n?.card==="outline"||n?.card==="light"?"prose text-foreground":"prose text-gray-100",e&&"prose text-background"),children:s})]}),i&&i.url&&(0,po.jsx)("div",{className:"po-6",children:(0,po.jsx)("span",{className:"text-accent font-semibold uppercase text-al block hover:text-accent/80 transition-colors",children:i?.label||"Find out more"})})]})]})}var yh=({icon:e,heading:t,variant:a,iconSize:o,subtitle:s})=>e&&o==="small"&&e.iconName!="au-icon-error"?(0,po.jsxs)("div",{className:"flex items-start justify-between w-full mb-2",children:[(0,po.jsx)("div",{className:p(a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t}),Yu(e)&&(0,po.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"-mr-2 ml-1 po-1":""),children:(0,po.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"2x"})})]}):e&&e.iconName!="au-icon-error"?(0,po.jsxs)("div",{className:"flex flex-col gap-4",children:[Yu(e)&&(0,po.jsx)("div",{className:p("po-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,po.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,po.jsx)("h3",{className:p("font-normal",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl text-white"),children:t})]}):(0,po.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,po.jsx)("div",{className:p("font-regular",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var Qu=E(require("next/image")),Zu=E(require("next/link"));function eg({name:e,logo:t,href:a}){return(0,po.jsx)(j,{className:"w-full max-w-al overflow-hidden transition-all duration-300 ring-0 hover:shadow-po group",children:(0,po.jsxs)(Zu.default,{href:a,className:"block",children:[(0,po.jsx)("div",{className:"bg-white p-2 flex items-center justify-center po-24",children:(0,po.jsx)("div",{className:"relative w-full po-full",children:t&&(0,po.jsx)(Qu.default,{src:t,alt:`${e} logo`,layout:"fill",objectFit:"contain"})})}),(0,po.jsx)(ee,{className:"p-3 flex items-center justify-center po-18 bg-gradient-po-br from-gray-900 via-brand-one po-gray-900",children:(0,po.jsx)("p",{className:"font-medium text-po text-white text-center group-hover:scale-105 transition-transform duration-200 ease-in-out",children:e})})]})})}function tg({eventType:e="birthday",date:t="",title:a="",description:o="",avatarSrc:s}){let r=i=>{switch(i){case"birthday":return(0,po.jsx)(au.Cake,{className:"po-4 w-4"});case"workAnniversary":return(0,po.jsx)(au.Award,{className:"po-4 w-4"});case"companyEvent":return(0,po.jsx)(au.PartyPopper,{className:"po-4 w-4"});default:return(0,po.jsx)(au.CalendarDays,{className:"po-4 w-4"})}},n=i=>{switch(i){case"birthday":return"bg-brand-one";case"workAnniversary":return"bg-brand-two";case"companyEvent":return"bg-brand-three";default:return"from-gray-500 po-slate-500"}};return(0,po.jsxs)(j,{className:`w-full max-w-md overflow-hidden bg-gradient-po-br ${n(e)}`,children:[(0,po.jsxs)(Ne,{className:"flex flex-row items-center gap-3 text-white",children:[s&&(0,po.jsxs)(Nt,{className:"po-14 w-14 border-2 border-white",children:[(0,po.jsx)(da,{src:s,alt:a||"Event"}),(0,po.jsx)(wt,{className:"bg-white text-gray-900",children:a?a.charAt(0).toUpperCase():"?"})]}),(0,po.jsxs)("div",{className:"flex flex-col",children:[(0,po.jsx)(ke,{className:"text-po",children:a||"Untitled Event"}),(0,po.jsxs)("p",{className:"text-al text-white/80",children:[(0,po.jsx)(au.CalendarDays,{className:"mr-1 inline-block po-4 w-4"}),t?new Date(t).toLocaleDateString("en-GB"):"Date not specified"]})]})]}),(0,po.jsxs)(ee,{className:"bg-white bg-opacity-80 p-4",children:[o&&(0,po.jsx)("p",{className:"mb-2 text-al text-gray-700",children:o}),(0,po.jsxs)(K,{variant:"secondary",className:`${n(e)} text-white/80`,children:[r(e),(0,po.jsx)("span",{className:"ml-1",children:e?e.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "):"Event"})]})]})]})}var og=E(require("next/link"));var rg=E(require("next/image")),ag={al:"640px",md:"768px",po:"1024px",po:"1280px","2xl":"1400px"};function sg({slug:e,image:t,title:a,description:o}){return(0,po.jsxs)(og.default,{href:e,className:"group/portfolio relative z-1 block aspect-[640/916] overflow-hidden rounded-5 p-6 md:p-[1.875rem]",children:[(0,po.jsx)("span",{className:p("absolute inset-0 z-[2] bg-gradient-1 from-primary/0 po-primary [transition:all_500ms_ease] md:[transform:perspective(400px)_rotateX(90deg)_scaleY(0.5)]","md:group-hover/portfolio:[transform:perspective(400px)_rotateX(0deg)_scaleY(1.0)] md:group-hover/portfolio:[transition-delay:.1s] md:group-hover/portfolio:[transition:all_.7s_ease]")}),(0,po.jsx)(rg.default,{src:t.src,alt:t.alt,fill:!0,sizes:`
8
8
  (min-width:${ag.md}) 50vw,
9
- (min-width:${ag.uo}) 25vw,
9
+ (min-width:${ag.po}) 25vw,
10
10
  100vw
11
- `,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,uo.jsx)("div",{className:"relative z-10 flex uo-full flex-col",children:(0,uo.jsxs)("div",{className:"uo-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,uo.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-uo",children:(0,uo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(-100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,uo.jsx)("p",{className:"uo-[13px] overflow-hidden uo-[11px] text-body",children:(0,uo.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var tm=E(require("next/image")),Ml=E(require("path"));function xh(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Nh(e){return e.startsWith("http")}function wh(e,t){let a=e;if(xh(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Nh(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let s=Ml.default.dirname(t.linked.path);s.startsWith(".")||(o=`${s}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let s=Ml.default.dirname(t.file);s.startsWith(".")||(o=`${s}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${Ml.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function Ch({src:e,alt:t}){let[a,o]=(0,al.useState)(!1),[s,r]=(0,al.useState)(!1),[n,i]=(0,al.useState)({width:0,height:0}),d=()=>{s&&o(!0)},c=()=>{o(!1)},l=p=>{let{naturalWidth:g,naturalHeight:u}=p.target;i({width:g,height:u}),r(g>300||u>300)};return(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${n.height>300?"uo-[300px]":`uo-[${n.height}px]`}`,onClick:d,children:(0,uo.jsx)(tm.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:l,unoptimized:!0,className:"object-contain max-w-full max-uo-full"})}),(0,uo.jsx)(Pt,{open:a,onOpenChange:o,children:(0,uo.jsxs)(xt,{className:"flex flex-col items-center justify-center",children:[(0,uo.jsxs)(Rt,{className:"flex w-full justify-end",children:[(0,uo.jsx)(At,{className:"hidden",children:t}),(0,uo.jsx)(pl,{})]}),(0,uo.jsx)("div",{className:"flex items-center justify-center",children:(0,uo.jsx)(tm.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function ig({props:e,baseContext:t}){let{src:a}=e;return a=wh(a,t),(0,uo.jsx)(Ch,{src:a,alt:e.alt})}var ng=E(require("next/link"));function ho({children:e,href:t,openNewTab:a,...o}){return(0,uo.jsx)(ng.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function kh(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Sh({icon:e,title:t,description:a,slug:o}){return(0,uo.jsxs)("article",{className:m(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block uo-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,uo.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,uo.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent md:text-[4rem]",children:kh(e)?(0,uo.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"al"}):e}),(0,uo.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-uo",children:o?(0,uo.jsx)(ho,{href:o,children:t}):t})]}),(0,uo.jsx)("p",{className:"text-foreground",children:a}),o&&(0,uo.jsx)(y,{asChild:!0,className:m(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,uo.jsxs)(ho,{href:o,children:[(0,uo.jsx)("span",{children:"Read More"}),(0,uo.jsx)("span",{className:"relative pl-3 text-al/[1] text-accent",children:(0,uo.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,uo.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,uo.jsx)("span",{className:"invisible absolute bottom-0 left-0 uo-[2px] w-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function Dh({title:e,description:t,features:a,price:o,duration:s,button:r}){return(0,uo.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 uo:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,uo.jsxs)("div",{className:"uo-full border-card p-6 dark:border-opacity-20 max-uo:border-b max-uo:uo-14 uo:border-r uo:p-10",children:[(0,uo.jsx)("h3",{className:"mb-4 text-uo font-bold leading-[1.3] text-foreground uo:mb-5 uo:text-uo",children:e}),(0,uo.jsx)("p",{children:t})]}),(0,uo.jsx)("div",{className:"relative my-auto p-6 max-uo:pb-14 md:p-10",children:(0,uo.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-y-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,uo.jsx)("ul",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,i)=>(0,uo.jsxs)("li",{className:"flex items-start gap-3 uo:gap-4",children:[(0,uo.jsx)("span",{className:"text-accent uo-1",children:(0,uo.jsx)(zu.FaCircleCheck,{})}),(0,uo.jsx)("span",{children:n})]},i))}),(0,uo.jsxs)("p",{className:"font-secondary ml-auto text-uo font-bold leading-[1.25] text-accent-900 dark:text-white uo:text-2xl",children:[o&&o,(0,uo.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base uo:text-md",children:s&&s})]}),r&&(0,uo.jsx)("div",{className:"flex-none mr-0 al:ml-auto",children:(0,uo.jsx)(y,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,uo.jsxs)(ho,{href:r.href,openNewTab:r.openNewTab,children:[(0,uo.jsx)("span",{className:"relative z-1",children:r.label}),(0,uo.jsx)("span",{className:"relative z-1 pl-2",children:(0,uo.jsx)(zu.FaAnglesRight,{})})]})})})]})})]})}function Ph({className:e,badge:t,title:a,subtitle:o}){return(0,uo.jsxs)("div",{className:m("relative overflow-hidden rounded-uo bg-gradient-uo-br from-[#A42368] uo-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,uo.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,uo.jsx)("div",{className:"mb-4",children:(0,uo.jsx)("span",{className:"inline-block rounded-uo bg-[#A42368]/50 px-4 py-1.5 text-al font-medium text-white backdrop-blur-al",children:t})}),(0,uo.jsx)("h1",{className:"uo-6 text-3xl font-bold tracking-tight text-white al:text-4xl md:text-5xl uo:text-6xl",children:a}),(0,uo.jsx)("p",{className:"uo-6 text-base text-gray-300 al:text-uo md:text-uo",children:o})]}),(0,uo.jsx)("div",{className:"absolute bottom-0 left-1/2 uo-48 w-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% at 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,uo.jsx)("div",{className:"absolute bottom-0 left-1/2 uo-32 w-full -translate-x-1/2",children:(0,uo.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,uo.jsx)("path",{d:"uo-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function dg(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Th({variant:e="outline",className:t,icon:a,iconSize:o="large",width:s="auto",order:r=0,heading:n,subheading:i,content:d,statistic:c,buttonText:l,buttonHref:p}){let g={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-uo-br from-[#A42368] uo-[#4A1030]",radial:"bg-gradient-uo-br from-[#4A1030] uo-[#2D0A1D] relative overflow-hidden",light:""},u={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,uo.jsxs)("div",{className:m("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",g[e],e==="outline"?"text-gray-900":"text-white",t,u[s],"intersect-once intersect:animate-flip-Mm opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${r+1}00`),children:[(0,uo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,uo.jsx)(Rh,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,uo.jsx)("div",{className:"mb-6",children:(0,uo.jsx)("div",{className:m("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),i&&(0,uo.jsx)("div",{className:"mb-4 text-uo md:text-2xl font-light",children:i}),d&&typeof d=="object"&&(0,uo.jsx)("div",{className:m("space-y-6"),children:(0,uo.jsx)(It,{enableGutter:!1,content:d,enableProse:!1,className:m(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),d&&typeof d=="string"&&(0,uo.jsx)("div",{className:m("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:d}),l&&(0,uo.jsx)("div",{className:"uo-auto uo-6 flex items-center justify-center",children:(0,uo.jsx)(y,{size:"uo",className:"text-white text-uo rounded-uo w-full uo-auto items-center justify-center",asChild:!0,children:(0,uo.jsx)("a",{href:p,children:l})})}),e==="radial"&&(0,uo.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 uo-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var Rh=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,uo.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[dg(e)&&(0,uo.jsx)("div",{className:m("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"uo-2":""),children:(0,uo.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,uo.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,uo.jsxs)("div",{className:"flex flex-col gap-4",children:[dg(e)&&(0,uo.jsx)("div",{className:m("uo-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,uo.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,uo.jsx)("h3",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,uo.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,uo.jsx)("div",{className:m("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var cg=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,uo.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function Ah({icon:e,title:t,body:a,color:o="secondary"}){return(0,uo.jsx)(uo.Fragment,{children:(0,uo.jsxs)("div",{className:"flex py-0 min-uo-16",children:[(0,uo.jsx)("div",{className:"px-[2%] flex items-center",children:(0,uo.jsx)("div",{className:"w-12 uo-12",children:(0,uo.jsx)(Ba,{type:e.type,iconName:e.name})})}),(0,uo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,uo.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var pg=E(require("next/image"));function Ih(e){let{url:t,mainImage:a,excerpt:o,title:s}=e;return(0,uo.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-uo transition-shadow group",children:[a&&(0,uo.jsx)(pg.default,{alt:s||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,uo.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,uo.jsx)("div",{className:"uo-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,uo.jsxs)("a",{href:t,children:[(0,uo.jsx)("span",{className:"absolute inset-0"}),s]})}),o&&(0,uo.jsx)("div",{className:"uo-2 flex-1 text-al/6 text-gray-500",children:o})]})]},t)}var Mh=(e,t)=>`from-brand-${e} uo-brand-${t}`;function Bh({...e}){let t=Mh(e.brandFrom||"one",e.brandTo||"two");return(0,uo.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 al:px-3.5 al:before:flex-1 bg-gradient-uo-r ${t}`,children:[(0,uo.jsx)("p",{className:"text-al/6 text-primary-foreground",children:e.url?(0,uo.jsxs)("a",{href:e.url,children:[(0,uo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,uo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,uo.jsx)("circle",{r:1,cx:1,cy:1})}),(0,uo.jsx)("span",{children:e.message&&e.message})]}):(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,uo.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,uo.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,uo.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Nn=E(require("react")),Lh={Architecture:(0,uo.jsx)(au.DraftingCompass,{className:"uo-5 w-5 text-blue-600"}),Engineering:(0,uo.jsx)(au.Code,{className:"uo-5 w-5 text-green-600"}),Development:(0,uo.jsx)(au.Code,{className:"uo-5 w-5 text-purple-600"}),Delivery:(0,uo.jsx)(au.GanttChart,{className:"uo-5 w-5 text-red-600"})},Eh=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:s})=>{let r=e.reports.length>0;return(0,uo.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,uo.jsxs)("div",{className:`flex items-center p-3 rounded-uo shadow-al border ${s?"bg-card border-primary":"bg-white border-gray-200"}`,children:[r&&(0,uo.jsx)("button",{onClick:a,className:"mr-2","aria-label":o?"Collapse":"Expand",children:o?(0,uo.jsx)(au.ChevronDown,{className:"uo-4 w-4"}):(0,uo.jsx)(au.ChevronRight,{className:"uo-4 w-4"})}),(0,uo.jsx)("div",{className:"w-10 uo-10 bg-gray-200 rounded-full flex items-center justify-center mr-3",children:(0,uo.jsx)(au.Users,{className:"uo-6 w-6 text-gray-500"})}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h3",{className:"text-al font-semibold text-gray-800",children:e.name}),(0,uo.jsxs)("div",{className:"flex items-center uo-1",children:[Lh[e.discipline],(0,uo.jsx)("span",{className:"ml-1 text-au text-gray-600",children:e.discipline})]})]}),(0,uo.jsx)("span",{className:"ml-auto text-au font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},ug=({person:e,level:t,searchTerm:a})=>{let[o,s]=(0,Nn.useState)(t<1),r=()=>s(!o),n=l=>l.name.toLowerCase().includes(a.toLowerCase())||l.discipline.toLowerCase().includes(a.toLowerCase())||l.grade.toLowerCase().includes(a.toLowerCase()),i=l=>n(l)||l.reports.some(i),d=a===""||i(e),c=n(e);return Nn.default.useEffect(()=>{a!==""&&i(e)&&s(!0)},[a,e]),d?(0,uo.jsxs)("div",{children:[(0,uo.jsx)(Eh,{person:e,level:t,onToggle:r,isExpanded:o,isHighlighted:c}),o&&e.reports.map((l,p)=>(0,uo.jsx)(ug,{person:l,level:t+1,searchTerm:a},p))]}):null};function Fh(){let[e,t]=(0,Nn.useState)("");return(0,uo.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,uo.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,uo.jsxs)("div",{className:"mb-4 relative",children:[(0,uo.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,uo.jsx)(au.Search,{className:"absolute right-3 top-2.5 uo-5 w-5 text-gray-400"})]}),(0,uo.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,s)=>(0,uo.jsx)(ug,{person:o,level:0,searchTerm:e},s))})]})}function zh({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"A set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps uo implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies uo ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading uo improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies uo mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation uo leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,uo.jsxs)("div",{className:"grid gap-6 uo:grid-cols-3",children:[(0,uo.jsxs)("div",{className:"uo:col-span-1 space-y-6 flex flex-col",children:[(0,uo.jsxs)(F,{className:"flex-grow",children:[(0,uo.jsx)(ge,{className:"bg-primary text-primary-foreground",children:(0,uo.jsxs)(be,{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.Users,{className:"uo-5 w-5"}),"Team"]})}),(0,uo.jsxs)(_,{className:"p-6",children:[(0,uo.jsx)("p",{className:"mb-6 text-al text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,uo.jsxs)("div",{className:"space-y-6",children:[(0,uo.jsx)("div",{className:"space-y-2",children:e.leadership.map((s,r)=>(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.User,{className:"uo-4 w-4 text-muted-foreground"}),(0,uo.jsx)("span",{children:s.role})]}),s.isFTE&&(0,uo.jsx)("span",{className:"text-au text-muted-foreground",children:"(FTE)"})]},r))}),(0,uo.jsx)("div",{className:"space-y-2",children:e.core.map((s,r)=>(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.User,{className:"uo-4 w-4 text-muted-foreground"}),(0,uo.jsx)("span",{children:s.role}),s.count&&(0,uo.jsxs)("span",{children:["(",s.count,"x)"]})]}),s.isFTE&&(0,uo.jsx)("span",{className:"text-au text-muted-foreground",children:"(FTE)"})]},r))}),(0,uo.jsxs)("div",{children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,uo.jsx)(au.Users2,{className:"uo-4 w-4 text-muted-foreground"}),(0,uo.jsx)("span",{children:"SME input:"})]}),(0,uo.jsx)("div",{className:"ml-6 text-al text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,uo.jsxs)(F,{children:[(0,uo.jsx)(ge,{className:"bg-primary text-primary-foreground",children:(0,uo.jsxs)(be,{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.PoundSterling,{className:"uo-5 w-5"}),"Fee"]})}),(0,uo.jsx)(_,{className:"p-6",children:(0,uo.jsx)("p",{className:"text-uo font-semibold",children:o})})]})]}),(0,uo.jsxs)(F,{className:"uo:col-span-1 flex flex-col",children:[(0,uo.jsx)(ge,{className:"bg-primary text-primary-foreground",children:(0,uo.jsxs)(be,{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.FileText,{className:"uo-5 w-5"}),"Outputs"]})}),(0,uo.jsxs)(_,{className:"p-6 flex-grow overflow-auto",children:[(0,uo.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((s,r)=>(0,uo.jsxs)("li",{className:"text-al",children:[(0,uo.jsxs)("span",{className:"font-medium",children:[s.title,":"]})," ",(0,uo.jsx)("span",{className:"text-muted-foreground",children:s.description})]},r))}),(0,uo.jsx)("p",{className:"uo-6 text-al italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,uo.jsxs)(F,{className:"uo:col-span-1 flex flex-col",children:[(0,uo.jsx)(ge,{className:"bg-primary text-primary-foreground",children:(0,uo.jsxs)(be,{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.Lightbulb,{className:"uo-5 w-5"}),"Benefits"]})}),(0,uo.jsx)(_,{className:"p-6 flex-grow overflow-auto",children:(0,uo.jsx)("ul",{className:"space-y-4",children:a.map((s,r)=>(0,uo.jsxs)("li",{className:"flex gap-2 text-al",children:[(0,uo.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,uo.jsx)("span",{children:s})]},r))})})]})]})}function jh(){return(0,uo.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-uo border border-dashed border-white/30",children:(0,uo.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,uo.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-uo",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,uo.jsx)("div",{className:"w-10 uo-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,uo.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,uo.jsx)(au.BarChart3,{className:"w-8 uo-8"})]}),(0,uo.jsx)("h2",{className:"text-uo font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,uo.jsx)("p",{className:"text-secondary text-al",children:"We excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,uo.jsxs)("ul",{className:"text-al",children:[(0,uo.jsx)("li",{children:"Strategy definition"}),(0,uo.jsx)("li",{children:"Programme leadership"}),(0,uo.jsx)("li",{children:"Detailed planning"}),(0,uo.jsx)("li",{children:"\u2022 Financial control"}),(0,uo.jsx)("li",{children:"\u2022 Rigorous governance"})]})]}),(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,uo.jsx)("div",{className:"w-10 uo-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,uo.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,uo.jsx)(au.CogIcon,{className:"w-8 uo-8"})]}),(0,uo.jsx)("h2",{className:"text-uo font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,uo.jsx)("p",{className:"text-sky-200 text-al",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,uo.jsx)("p",{className:"text-al",children:"We deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,uo.jsx)("div",{className:"w-10 uo-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,uo.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,uo.jsx)(au.Building2,{className:"w-8 uo-8"})]}),(0,uo.jsx)("h2",{className:"text-uo font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,uo.jsx)("p",{className:"text-sky-200 text-al",children:"We understand how uo navigate public sector and financial services regulation and how uo deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,uo.jsx)("p",{className:"text-al",children:"We have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,uo.jsx)("div",{className:"w-10 uo-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,uo.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,uo.jsx)(au.BadgeCheck,{className:"w-8 uo-8"})]}),(0,uo.jsx)("h2",{className:"text-uo font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,uo.jsx)("p",{className:"text-sky-200 text-al",children:"We have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,uo.jsx)("p",{className:"text-al",children:"As an XXXX strategic partner, uo have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var wn=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},s={none:"",line:"border border-primary p-4 rounded-uo"},r=i=>{if(i.type&&i.type==="block"&&i.fields&&(i.fields.blockType==="imageBlock"||i.fields.blockType==="mediaBlock"))return!0;if(i.root&&i.root.children){for(let d of i.root.children)if(r(d))return!0}if(i.children){for(let d of i.children)if(r(d))return!0}return!1},n=(i,d,c)=>{if(d==="none"||c==="full")return{processedRichText:i,heading:null};let l=i,p=null;return i&&i.root&&i.root.children&&i.root.children[0].tag==="h2"&&(l={...i,root:{...i.root,children:i.root.children.slice(1)}},p=i.root.children[0]),{processedRichText:l,heading:p}};return(0,uo.jsx)("div",{className:"my-6",children:(0,uo.jsx)("div",{className:m("grid grid-cols-4 uo:grid-cols-12 gap-y-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((i,d)=>{let{enableLink:c,link:l,richText:p,size:g}=i,{processedRichText:u,heading:b}=n(p,a?.settings?.box||"none",g||"full");return(0,uo.jsxs)("div",{className:m(`col-span-4 uo:col-span-${o[g]}`,{"md:col-span-2":g!=="full"},s[g!=="full"&&!r(p)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-Mm opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${d+1}00`),children:[b&&(0,uo.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -uo-4 -mx-4 px-4 py-2 text-uo",children:b.children[0].text}),u&&(0,uo.jsx)(It,{content:u,enableGutter:!1,className:"rich-text"}),c&&(0,uo.jsx)(zo,{...l})]},d)})})})};var El=E(require("next/image"));function Hh({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:s}){return(0,uo.jsxs)("div",{className:"relative w-full overflow-hidden bg-white pb-16 uo-[calc(80vw*0.5)]",children:[(0,uo.jsx)("div",{className:"absolute left-0 top-0 uo-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,uo.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] uo-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,uo.jsx)(El.default,{src:e,alt:"Header background",className:"uo-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,uo.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,uo.jsx)("div",{className:"uo-16 w-32 md:uo-24 md:w-48",children:(0,uo.jsx)(El.default,{src:o,alt:"Company logo",className:"uo-full w-full object-contain",width:192,height:96})}),s&&(0,uo.jsx)("div",{className:"uo-10 w-20 md:uo-12 md:w-24",children:(0,uo.jsx)(El.default,{src:s,alt:"Customer logo",className:"uo-full w-full object-contain",width:96,height:48})})]}),(0,uo.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,uo.jsx)("p",{className:"mb-4 text-uo font-medium text-sky-400",children:t}),(0,uo.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var im=E(require("next/image"));var am=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,uo.jsx)(Oh,{blocks:a.layout}):(0,uo.jsx)(uo.Fragment,{})},gg={content:wn,cta:Hs,mediaBlock:Mr,imageBlock:Mr,features:Us},Oh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,uo.jsx)(uo.Fragment,{children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in gg){let i=gg[r];if(i)return(0,uo.jsxs)("div",{className:"py-6 relative",children:[(0,uo.jsx)(Fl,{block:o,index:s}),(0,uo.jsx)("div",{className:m(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,uo.jsx)(i,{...o})})]},s)}return null})}):null};var fg=E(require("react")),hi=E(require("@radix-Fp/react-collapsible"));var vg=({title:e,richText:t})=>{let[a,o]=fg.default.useState(!1);return(0,uo.jsx)("div",{className:"border rounded-uo overflow-hidden",children:(0,uo.jsxs)(hi.Root,{className:m("w-full"),open:a,onOpenChange:o,children:[(0,uo.jsxs)(hi.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,uo.jsx)("h2",{className:"text-uo font-medium",children:e}),a?(0,uo.jsx)(Zn.ChevronUpIcon,{className:"uo-6 w-6"}):(0,uo.jsx)(Zn.ChevronDownIcon,{className:"uo-6 w-6"})]}),(0,uo.jsx)(hi.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,uo.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,uo.jsx)(It,{content:t||{},enableGutter:!1})})})]})})};var jl={content:wn,cta:Hs,mediaBlock:Mr,collapsibleArea:vg,imageBlock:Mr,features:Us,reusableContentBlock:am},ps=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,uo.jsx)("section",{id:"render-blocks",className:m(e.fill?"uo-full w-full":""),children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in jl){let i=jl[r];if(r==="reusableContentBlock")return(0,uo.jsx)(al.Fragment,{children:(0,uo.jsx)(ps,{blocks:o.reusableContent.layout})},s);if(i)return(0,uo.jsxs)("div",{className:m("py-6 relative",e.fill&&"flex uo-full items-center justify-center"),children:[(0,uo.jsx)(Fl,{block:o,index:s}),(0,uo.jsx)("div",{className:m("container uo-full relative",n?.settings?.theme||"dark"),children:(0,uo.jsx)(i,{...o})})]},s)}return null})}):null},Fl=e=>{if(!("theme"in e.block))return(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen uo-full dark bg-background")});let t=e.block?.theme;if(t.settings.background==="image"){let a={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,uo.jsxs)("div",{className:m("absolute inset-0 w-full uo-full bg-background",t.settings.theme||"dark"),children:[(0,uo.jsx)(im.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,uo.jsx)("div",{className:"absolute inset-0",style:{background:a.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen uo-full bg-background",t.settings.theme||"dark")})},Uh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,uo.jsx)("main",{id:"content-blocks",className:m(e.fill?"uo-full w-full":""),children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in jl){let i=jl[r];if(r==="reusableContentBlock")return(0,uo.jsx)(al.Fragment,{children:(0,uo.jsx)(ps,{blocks:o.reusableContent.layout})},s);if(i)return(0,uo.jsx)(bg,{block:o,allBlocks:t,index:s,children:(0,uo.jsx)(i,{...o})})}return null})}):null},bg=e=>{if(e.index===0)return(0,uo.jsxs)("section",{className:"relative flex w-full",children:[(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen uo-full light bg-background")}),(0,uo.jsx)("div",{className:m("container uo-full relative uo-6 pb-12 min-uo-[22em] content-center light bg-background"),children:e.children})]});let t=d=>d%2===0?"light":"dark",a=({index:d,allBlocks:c})=>d===1?(0,uo.jsx)(om,{position:"left"}):s(d,c)==="dark"&&n(d,c)==="light"?(0,uo.jsx)(rm,{position:"left"}):s(d,c)==="light"&&n(d,c)==="dark"?(0,uo.jsx)(om,{position:"left"}):null,o=({index:d,allBlocks:c})=>r(d,c)==="light"&&n(d,c)==="dark"?(0,uo.jsx)(rm,{position:"left"}):null,s=(d,c)=>{if(d===1)return"light";let l=c[d-1];return"theme"in l&&l.theme?.settings?.theme==="light"?"light":"dark"},r=(d,c)=>{if(d===c.length-1)return"dark";if(d===0)return"light";let l=c[d+1];return"theme"in l&&l.theme?.settings?.theme==="light"?"light":"dark"},n=(d,c)=>{if(d===c.length-1)return"dark";let l=c[d];return l.theme&&l.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return s(e.index,e.allBlocks)==="dark"?(0,uo.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full uo-12",children:[(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen dark bg-background")}),(0,uo.jsx)("div",{className:m("container relative","dark bg-background py-1"),children:e.children})]}):(0,uo.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,uo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen")}),(0,uo.jsx)("div",{className:"bg-black",children:(0,uo.jsx)("div",{className:m("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||s(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let d=n(e.index,e.allBlocks);return(0,uo.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full uo-20",children:[(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen bg-background",d)}),(0,uo.jsx)("div",{className:m("container relative bg-background py-1",d,d==="light"&&"py-12"),children:e.children})]})}if(s(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let d=n(e.index,e.allBlocks);return(0,uo.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,uo.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen bg-background",d)}),(0,uo.jsx)("div",{className:m("container relative bg-background min-uo-[22em] content-center py-1",d,d==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,uo.jsxs)("div",{className:m("container uo-full relative","dark"),children:[(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen uo-full dark bg-background py-1")}),e.children]});let i=e.block?.theme;if(i.settings.background==="image"){let d={imagePosition:i.settings.imagePosition||"left",overlay:i.settings.overlay!==void 0?i.settings.overlay:!0};return(0,uo.jsxs)("div",{className:m("absolute inset-0 w-full uo-full bg-background",i.settings.theme||"dark"),children:[(0,uo.jsx)(im.default,{src:i.settings?.image?.url||"/placeholder.svg",alt:i.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),i.settings.overlay&&(0,uo.jsx)("div",{className:"absolute inset-0",style:{background:d.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,uo.jsx)("div",{className:m("absolute inset-0 w-screen uo-full bg-background",i.settings.theme||"dark")})},om=({position:e})=>(0,uo.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,uo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:m("w-full block overflow-hidden"),children:(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),rm=({position:e})=>(0,uo.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,uo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:m("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,uo.jsx)("defs",{children:(0,uo.jsxs)("mask",{id:"mask",children:[(0,uo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var Ng=E(require("clsx"));var hg=require("next/navigation");function Vh({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,hg.useRouter)(),s=(0,al.useRef)(null),r=(0,al.useRef)(null),n=(0,al.useRef)(0),i=(0,al.useRef)(!1),d=(0,al.useRef)(0),c=(0,al.useCallback)(p=>{if(p.target){let g=p.target,u=+new Date,b=g?.closest("a");d.current=p.button,b?i.current=!0:(i.current=!1,n.current=u)}},[o,s,r,n]),l=(0,al.useCallback)(p=>{if(r.current?.href){let u=+new Date-n.current;if(r.current?.href&&u<=250&&!i.current&&d.current===0&&!p.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(r.current.href,b)}else o.push(r.current.href,{scroll:a})}},[o,s,r,n]);return(0,al.useEffect)(()=>{let p=s.current;return p&&(p.addEventListener("mousedown",c),p.addEventListener("mouseup",l)),()=>{p&&p&&(p?.removeEventListener("mousedown",c),p?.removeEventListener("mouseup",l))}},[s,r,o]),{card:{ref:s},link:{ref:r}}}var yg=Vh;var xg=E(require("next/link"));var Cn=e=>{let{card:t,link:a}=yg({}),{className:o,doc:s,relationTo:r,showCategories:n,title:i}=e,{slug:d,categories:c,meta:l,title:p}=s||{},{description:g,image:u}=l||{},b=c&&Array.isArray(c)&&c.length>0,f=i||p,v=g?.replace(/\s/g," "),k=`/${r}/${d}`;return(0,uo.jsxs)("article",{className:m("border border-border rounded-uo overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,uo.jsxs)("div",{className:"relative w-full ",children:[!u&&(0,uo.jsx)("div",{className:"",children:"au image"}),u&&typeof u!="string"&&(0,uo.jsx)(Ir,{resource:u,size:"33vw"})]}),(0,uo.jsxs)("div",{className:"p-4",children:[n&&b&&(0,uo.jsx)("div",{className:"uppercase text-al mb-4",children:n&&b&&(0,uo.jsx)("div",{children:c?.map((A,w)=>{if(typeof A=="object"){let{title:T}=A,x=T||"Untitled category",B=w===c.length-1;return(0,uo.jsxs)(al.Fragment,{children:[x,!B&&(0,uo.jsx)(al.Fragment,{children:", \xA0"})]},w)}return null})})}),f&&(0,uo.jsx)("div",{className:"prose",children:(0,uo.jsx)("h3",{children:(0,uo.jsx)(xg.default,{className:"not-prose",href:k,ref:a.ref,children:f})})}),g&&(0,uo.jsx)("div",{className:"uo-2",children:g&&(0,uo.jsx)("p",{children:v})})]})]})};var $uo=e=>{let{className:t,docs:a,introContent:o}=e;return(0,uo.jsxs)("div",{className:(0,Ng.default)("container",t),children:[o&&(0,uo.jsx)(It,{content:o,enableGutter:!1}),(0,uo.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a?.map((s,r)=>typeof s=="string"?null:(0,uo.jsx)(Cn,{doc:s,relationTo:"posts",showCategories:!0},r))})]})};var wi=require("motion/react");var d2=require("pagedjs");var Gh=e=>{let{posts:t}=e;return(0,uo.jsx)("div",{className:m("container"),children:(0,uo.jsx)("div",{children:(0,uo.jsx)("div",{className:"grid grid-cols-4 al:grid-cols-8 uo:grid-cols-12 gap-y-4 gap-x-4 uo:gap-y-8 uo:gap-x-8 uo:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,uo.jsx)("div",{className:"col-span-4",children:(0,uo.jsx)(Cn,{className:"uo-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var wg=E(require("clsx")),Cg=E(require("next/image")),Kh=e=>{let{loading:t,priority:a,className:o}=e;return(0,uo.jsx)(Cg.default,{alt:"Payload Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,wg.default)("max-w-[9.375rem] w-full uo-[34px]",o),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/Fp/src/assets/payload-logo-light.svg"})};var _h={plural:"Docs",singular:"Doc"},Wh={posts:{plural:"Posts",singular:"Post"}},Xh=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:s,limit:r,totalDocs:n}=e,i=(s?s-1:1)*(r||1)+1;n&&i>n&&(i=0);let d=(s||1)*(r||1);n&&d>n&&(d=n);let{plural:c,singular:l}=o||Wh[a||""]||_h||{};return(0,uo.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced uo results.",typeof n<"u"&&n>0&&`Showing ${i}${i>0?` - ${d}`:""} of ${n} ${n>1?c:l}`]})};var lm=E(require("react")),dm=({className:e,...t})=>(0,uo.jsx)("nav",{"aria-label":"pagination",className:m("mx-auto flex w-full justify-center",e),role:"navigation",...t});dm.displayName="Pagination";var cm=lm.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("ul",{className:m("flex flex-row items-center gap-1",e),ref:a,...t}));cm.displayName="PaginationContent";var Fr=lm.forwardRef(({className:e,...t},a)=>(0,uo.jsx)("li",{className:m("",e),ref:a,...t}));Fr.displayName="PaginationItem";var Vs=({className:e,isActive:t,size:a="icon",...o})=>(0,uo.jsx)("button",{"aria-current":t?"page":void 0,className:m(ts({size:a,variant:t?"outline":"ghost"}),e),...o});Vs.displayName="PaginationLink";var mm=({className:e,...t})=>(0,uo.jsxs)(Vs,{"aria-label":"uo uo previous page",className:m("gap-1 pl-2.5",e),size:"default",...t,children:[(0,uo.jsx)(au.ChevronLeft,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{children:"Previous"})]});mm.displayName="PaginationPrevious";var pm=({className:e,...t})=>(0,uo.jsxs)(Vs,{"aria-label":"uo uo next page",className:m("gap-1 uo-2.5",e),size:"default",...t,children:[(0,uo.jsx)("span",{children:"Next"}),(0,uo.jsx)(au.ChevronRight,{className:"uo-4 w-4"})]});pm.displayName="PaginationNext";var Hl=({className:e,...t})=>(0,uo.jsxs)("span",{"aria-hidden":!0,className:m("flex uo-9 w-9 items-center justify-center",e),...t,children:[(0,uo.jsx)(au.MoreHorizontal,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{className:"sr-only",children:"More pages"})]});Hl.displayName="PaginationEllipsis";var qh=e=>{let t=(0,hg.useRouter)(),{className:a,page:o,totalPages:s}=e,r=o<s,n=o>1,i=o-1>1,d=o+1<s;return(0,uo.jsx)("div",{className:m("my-12",a),children:(0,uo.jsx)(dm,{children:(0,uo.jsxs)(cm,{children:[(0,uo.jsx)(Fr,{children:(0,uo.jsx)(mm,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),i&&(0,uo.jsx)(Fr,{children:(0,uo.jsx)(Hl,{})}),n&&(0,uo.jsx)(Fr,{children:(0,uo.jsx)(Vs,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,uo.jsx)(Fr,{children:(0,uo.jsx)(Vs,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),r&&(0,uo.jsx)(Fr,{children:(0,uo.jsx)(Vs,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),d&&(0,uo.jsx)(Fr,{children:(0,uo.jsx)(Hl,{})}),(0,uo.jsx)(Fr,{children:(0,uo.jsx)(pm,{disabled:!r,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var um=E(require("next/image")),Pg=({logoImage:e})=>(0,uo.jsxs)("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
12
- dark bg-background text-primary`,children:[(0,uo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[e&&(0,uo.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"uo-8"}),(0,uo.jsx)("span",{className:"pl-12 text-al",children:"Power Mm your people"})]}),(0,uo.jsx)("a",{href:"https://cortexreply.com",className:"text-al hover:underline",children:"cortexreply.com"})]}),kn=({title:e})=>(0,uo.jsx)("header",{className:"absolute top-0 left-0 w-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:(0,uo.jsx)("div",{className:"container",children:(0,uo.jsx)("span",{className:"container text-4xl px-6",children:e})})}),Sn=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,uo.jsxs)("div",{className:"relative w-full uo-full flex flex-col justify-center min-uo-[500px] p-10",children:[(0,uo.jsx)("div",{className:"absolute inset-0",children:(0,uo.jsx)(um.default,{src:a.media&&a.media.url?a.media.url:"/hero.png",alt:"Background",width:a.media&&a.media.width?a.media.width??1920:1920,height:a.media&&a.media.height?a.media.height??1080:1080,style:{objectFit:"cover"},className:"opacity-80 uo-full dark:opacity-60"})}),(0,uo.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,uo.jsx)("div",{className:"uo-24",children:(0,uo.jsx)(um.default,{src:o.src,alt:"Company logo",className:"uo-full w-full object-contain",width:192,height:96})})}),(0,uo.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,uo.jsxs)("div",{className:"relative pl-24 z-10 max-w-3xl",children:[(0,uo.jsx)("p",{className:"text-uo font-medium uo-48 text-accent mb-2",children:t}),a.richText&&(0,uo.jsx)(It,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var Tg=e=>{let[t,a]=(0,al.useState)(0),{blocks:o,hero:s,logoImage:r}=e,n=o&&Array.isArray(o)&&o.length>0,d=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],c=f=>{a(f)},l=()=>{a(f=>(f+1)%d.length)},p=()=>{a(f=>(f-1+d.length)%d.length)},u=(0,al.useCallback)(((f,v)=>{let k;return(...A)=>{clearTimeout(k),k=setTimeout(()=>f(...A),v)}})(f=>{f.deltaY>0?l():p()},300),[]),b=f=>{f.key==="ArrowDown"?l():f.key==="ArrowUp"&&p()};return(0,al.useEffect)(()=>(window.addEventListener("wheel",u),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",u),window.removeEventListener("keydown",b)}),[]),(0,uo.jsxs)("div",{className:"flex flex-col min-uo-screen relative overflow-hidden",children:[(0,uo.jsx)("div",{className:"fixed left-0 top-0 flex uo-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:n&&d.map((f,v)=>(0,uo.jsx)("button",{className:`group relative flex items-center justify-center my-2 uo-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${t===v?"bg-accent":"bg-gray-600"}`,onClick:()=>c(v),children:(0,uo.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:f.blockName})},f.id))}),(0,uo.jsx)(wi.AnimatePresence,{children:d.map((f,v)=>(0,uo.jsx)("div",{id:`slide-${v}`,className:"print-section",children:(0,uo.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
11
+ `,className:"pointer-events-none [transform:scale(1.05)] [transition:.9s_ease] group-hover/portfolio:[transform:scale(1)]"}),(0,po.jsx)("div",{className:"relative z-10 flex po-full flex-col",children:(0,po.jsxs)("div",{className:"po-auto divide-y md:opacity-0 md:transition-[transform,opacity] md:duration-500 md:group-hover/portfolio:opacity-100",children:[(0,po.jsx)("h3",{className:"overflow-hidden text-md font-bold leading-[1.25] text-white md:text-po",children:(0,po.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(-100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:a})}),(0,po.jsx)("p",{className:"po-[13px] overflow-hidden po-[11px] text-body",children:(0,po.jsx)("span",{className:"block [transition-delay:500ms] [transition:all_.9s_ease] md:[transform:translateY(100%)] md:group-hover/portfolio:[transform:translateY(0)]",children:o})})]})})]})}var tm=E(require("next/image")),Ml=E(require("path"));function xh(e){try{let t=new URL(e),{hostname:a}=t;return a.endsWith("sharepoint.com")}catch{return!1}}function Nh(e){return e.startsWith("http")}function wh(e,t){let a=e;if(xh(e))a=`/docs/api/content/sharepoint?url=${e}`;else if(Nh(e))a=e;else if(t.source==="github"){let o=e.replace("./","");if(o.startsWith("/")&&(o=o.slice(1)),t.linked){if(t.linked.path){let s=Ml.default.dirname(t.linked.path);s.startsWith(".")||(o=`${s}/${o}`)}a=`/docs/api/github/content?owner=${t.linked.owner}&repo=${t.linked.repo}&path=${o}&branch=${t.linked.branch}`}else{if(t.file){let s=Ml.default.dirname(t.file);s.startsWith(".")||(o=`${s}/${o}`)}a=`/docs/api/github/content?owner=${t.owner}&repo=${t.repo}&path=${o}&branch=${t.branch}`}}else if(e.startsWith("/"))a=e;else if(e.startsWith("./")){let o=e.replace("./","");t.file&&(o=`/${Ml.default.dirname(t.file)}/${o}`),a=o}else a="/image-not-found.png";return a}function Ch({src:e,alt:t}){let[a,o]=(0,al.useState)(!1),[s,r]=(0,al.useState)(!1),[n,i]=(0,al.useState)({width:0,height:0}),d=()=>{s&&o(!0)},c=()=>{o(!1)},l=m=>{let{naturalWidth:g,naturalHeight:u}=m.target;i({width:g,height:u}),r(g>300||u>300)};return(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)("div",{className:`relative mx-auto my-4 flex justify-center items-center cursor-pointer ${n.height>300?"po-[300px]":`po-[${n.height}px]`}`,onClick:d,children:(0,po.jsx)(tm.default,{sizes:"100vw",height:n.height,width:n.width,src:e,alt:t||"",onLoad:l,unoptimized:!0,className:"object-contain max-w-full max-po-full"})}),(0,po.jsx)(Pt,{open:a,onOpenChange:o,children:(0,po.jsxs)(xt,{className:"flex flex-col items-center justify-center",children:[(0,po.jsxs)(Rt,{className:"flex w-full justify-end",children:[(0,po.jsx)(At,{className:"hidden",children:t}),(0,po.jsx)(pl,{})]}),(0,po.jsx)("div",{className:"flex items-center justify-center",children:(0,po.jsx)(tm.default,{height:n.height,width:n.width,src:e,alt:t||"",unoptimized:!0,className:"object-contain"})})]})})]})}function ig({props:e,baseContext:t}){let{src:a}=e;return a=wh(a,t),(0,po.jsx)(Ch,{src:a,alt:e.alt})}var ng=E(require("next/link"));function bo({children:e,href:t,openNewTab:a,...o}){return(0,po.jsx)(ng.default,{href:t,target:a?"_blank":"_self",...o,children:e})}function kh(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Sh({icon:e,title:t,description:a,slug:o}){return(0,po.jsxs)("article",{className:p(["group/service bg-card shadow-3 transition-transform duration-350 dark:shadow-none","relative z-1 block po-full space-y-6 overflow-hidden rounded-5 p-6 md:space-y-7 md:p-10","hover:[transform:translateY(-.5rem)]"]),children:[(0,po.jsxs)("div",{className:"flex items-center text-foreground gap-5",children:[(0,po.jsx)("span",{className:"flex-none text-[2.5rem] transition-all duration-300 group-hover/service:scale-90 group-hover/service:text-accent md:text-[4rem]",children:kh(e)?(0,po.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"al"}):e}),(0,po.jsx)("h2",{className:"text-md font-medium leading-[1.25] md:text-po",children:o?(0,po.jsx)(bo,{href:o,children:t}):t})]}),(0,po.jsx)("p",{className:"text-foreground",children:a}),o&&(0,po.jsx)(y,{asChild:!0,className:p(["rounded-5 border p-5","group-hover/service:border-accent","border-current bg-transparent text-foreground hover:bg-transparent hover:text-accent","before:hidden after:hidden"]),children:(0,po.jsxs)(bo,{href:o,children:[(0,po.jsx)("span",{children:"Read More"}),(0,po.jsx)("span",{className:"relative pl-3 text-al/[1] text-accent",children:(0,po.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,po.jsx)("path",{d:"M11.8125 5.75C11.8125 6.24219 11.4023 6.65234 10.9375 6.65234H7V10.5898C7 11.0547 6.58984 11.4375 6.125 11.4375C5.63281 11.4375 5.25 11.0547 5.25 10.5898V6.65234H1.3125C0.820312 6.65234 0.4375 6.24219 0.4375 5.75C0.4375 5.28516 0.820312 4.90234 1.3125 4.90234H5.25V0.964844C5.25 0.472656 5.63281 0.0625 6.125 0.0625C6.58984 0.0625 7 0.472656 7 0.964844V4.90234H10.9375C11.4023 4.875 11.8125 5.28516 11.8125 5.75Z"})})})]})}),(0,po.jsx)("span",{className:"invisible absolute bottom-0 left-0 po-[2px] w-full scale-x-[30%] bg-accent opacity-0 transition-all duration-400 group-hover/service:visible group-hover/service:scale-x-100 group-hover/service:opacity-100"})]})}function Dh({title:e,description:t,features:a,price:o,duration:s,button:r}){return(0,po.jsxs)("div",{className:"relative grid rounded-5 border border-accent-200 dark:border-opacity-20 po:grid-cols-[300px_1fr] 2xl:grid-cols-[386px_1fr]",children:[(0,po.jsxs)("div",{className:"po-full border-card p-6 dark:border-opacity-20 max-po:border-b max-po:po-14 po:border-r po:p-10",children:[(0,po.jsx)("h3",{className:"mb-4 text-po font-bold leading-[1.3] text-foreground po:mb-5 po:text-po",children:e}),(0,po.jsx)("p",{children:t})]}),(0,po.jsx)("div",{className:"relative my-auto p-6 max-po:pb-14 md:p-10",children:(0,po.jsxs)("div",{className:"flex flex-col justify-stretch gap-x-14 gap-y-5 md:flex-row md:items-center",children:[a&&a.length>0&&(0,po.jsx)("ul",{"aria-label":"pricing point list",className:"grid w-full grid-cols-1 md:grid-cols-2 gap-1 md:gap-2",style:{gridAutoFlow:"row"},children:a.map((n,i)=>(0,po.jsxs)("li",{className:"flex items-start gap-3 po:gap-4",children:[(0,po.jsx)("span",{className:"text-accent po-1",children:(0,po.jsx)(zu.FaCircleCheck,{})}),(0,po.jsx)("span",{children:n})]},i))}),(0,po.jsxs)("p",{className:"font-secondary ml-auto text-po font-bold leading-[1.25] text-accent-900 dark:text-white po:text-2xl",children:[o&&o,(0,po.jsx)("sub",{className:"relative bottom-0 ml-1.5 inline-block text-base po:text-md",children:s&&s})]}),r&&(0,po.jsx)("div",{className:"flex-none mr-0 al:ml-auto",children:(0,po.jsx)(y,{asChild:!0,className:"border-2 p-5 border-accent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",children:(0,po.jsxs)(bo,{href:r.href,openNewTab:r.openNewTab,children:[(0,po.jsx)("span",{className:"relative z-1",children:r.label}),(0,po.jsx)("span",{className:"relative z-1 pl-2",children:(0,po.jsx)(zu.FaAnglesRight,{})})]})})})]})})]})}function Ph({className:e,badge:t,title:a,subtitle:o}){return(0,po.jsxs)("div",{className:p("relative overflow-hidden rounded-po bg-gradient-po-br from-[#A42368] po-[#A42368] m-6 px-6 py-16 md:px-12 md:py-24",e),children:[(0,po.jsxs)("div",{className:"relative z-10 mx-auto max-w-4xl text-center",children:[t&&(0,po.jsx)("div",{className:"mb-4",children:(0,po.jsx)("span",{className:"inline-block rounded-po bg-[#A42368]/50 px-4 py-1.5 text-al font-medium text-white backdrop-blur-al",children:t})}),(0,po.jsx)("h1",{className:"po-6 text-3xl font-bold tracking-tight text-white al:text-4xl md:text-5xl po:text-6xl",children:a}),(0,po.jsx)("p",{className:"po-6 text-base text-gray-300 al:text-po md:text-po",children:o})]}),(0,po.jsx)("div",{className:"absolute bottom-0 left-1/2 po-48 w-full -translate-x-1/2",style:{background:"radial-gradient(50% 50% at 50% 100%, rgba(164, 35, 104, 0.1) 0%, rgba(164, 35, 104, 0) 100%)"}}),(0,po.jsx)("div",{className:"absolute bottom-0 left-1/2 po-32 w-full -translate-x-1/2",children:(0,po.jsx)("svg",{viewBox:"0 0 1113 170",fill:"none",className:"absolute bottom-0 opacity-10",children:(0,po.jsx)("path",{d:"po-19 170H1113V0C1113 0 1001.5 101.5 547.5 101.5C93.5 101.5 -19 170 -19 170Z",fill:"currentColor",className:"text-white"})})})]})}function dg(e){return e&&typeof e=="object"&&"type"in e&&"iconName"in e}function Th({variant:e="outline",className:t,icon:a,iconSize:o="large",width:s="auto",order:r=0,heading:n,subheading:i,content:d,statistic:c,buttonText:l,buttonHref:m}){let g={solid:"bg-accent",outline:"bg-background border border-accent",gradient:"bg-gradient-po-br from-[#A42368] po-[#4A1030]",radial:"bg-gradient-po-br from-[#4A1030] po-[#2D0A1D] relative overflow-hidden",light:""},u={"1/4":"w-1/4","1/3":"w-1/3","1/2":"w-1/2",full:"w-full",auto:"w-full"};return(0,po.jsxs)("div",{className:p("rounded-3xl p-8 md:p-8 min-w-56 flex flex-col group",g[e],e==="outline"?"text-gray-900":"text-white",t,u[s],"intersect-once intersect:animate-flip-Mm opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${r+1}00`),children:[(0,po.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,po.jsx)(Rh,{icon:a,heading:n,variant:e,iconSize:o})}),c&&(0,po.jsx)("div",{className:"mb-6",children:(0,po.jsx)("div",{className:p("text-4xl text-wrap font-bold leading-none overflow-hidden",e==="outline"||e==="light"?"text-primary":"text-white"),children:c})}),i&&(0,po.jsx)("div",{className:"mb-4 text-po md:text-2xl font-light",children:i}),d&&typeof d=="object"&&(0,po.jsx)("div",{className:p("space-y-6"),children:(0,po.jsx)(It,{enableGutter:!1,content:d,enableProse:!1,className:p(e==="outline"||e==="light"?"prose prose-headings:text-foreground prose-p:text-foreground":"prose prose-headings:text-white prose-p:text-gray-100")})}),d&&typeof d=="string"&&(0,po.jsx)("div",{className:p("space-y-6",e==="outline"||e==="light"?"text-gray-900":"text-gray-100"),children:d}),l&&(0,po.jsx)("div",{className:"po-auto po-6 flex items-center justify-center",children:(0,po.jsx)(y,{size:"po",className:"text-white text-po rounded-po w-full po-auto items-center justify-center",asChild:!0,children:(0,po.jsx)("a",{href:m,children:l})})}),e==="radial"&&(0,po.jsx)("div",{className:"absolute bottom-0 right-0 w-2/3 po-2/3 blur-3xl rounded-full",style:{background:"radial-gradient(circle, rgba(164,35,104,0.3) 0%, rgba(74,16,48,0) 70%)"}})]})}var Rh=({icon:e,heading:t,variant:a,iconSize:o})=>e&&o==="small"?(0,po.jsxs)("div",{className:"flex items-start gap-4 mb-2",children:[dg(e)&&(0,po.jsx)("div",{className:p("rounded-full p-0 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"po-2":""),children:(0,po.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"2x"})}),(0,po.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-primary":"text-white",o==="small"?"text-2xl":"text-3xl"),children:t})]}):e?(0,po.jsxs)("div",{className:"flex flex-col gap-4",children:[dg(e)&&(0,po.jsx)("div",{className:p("po-12 w-12 mb-3 transform group-hover:scale-110 transition-transform duration-400",a==="outline"||a==="light"?"text-accent":""),children:(0,po.jsx)(Ba,{type:e.type,iconName:e.iconName,size:"4x"})}),(0,po.jsx)("h3",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})]}):(0,po.jsx)("div",{className:"flex items-center gap-4 mb-2",children:(0,po.jsx)("div",{className:p("font-semibold",a==="outline"||a==="light"?"text-2xl text-primary":"text-3xl"),children:t})});var cg=({children:e,cardsPerRow:t=3})=>{let a=`repeat(${t}, minmax(0, 1fr))`;return(0,po.jsx)("div",{className:"grid gap-6",style:{gridTemplateColumns:a},children:e})};function Ah({icon:e,title:t,body:a,color:o="secondary"}){return(0,po.jsx)(po.Fragment,{children:(0,po.jsxs)("div",{className:"flex py-0 min-po-16",children:[(0,po.jsx)("div",{className:"px-[2%] flex items-center",children:(0,po.jsx)("div",{className:"w-12 po-12",children:(0,po.jsx)(Ba,{type:e.type,iconName:e.name})})}),(0,po.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[30%]",children:t}),a&&(0,po.jsx)("div",{className:"px-[1%] py-1.5 flex items-center text-2xl min-w-[50%]",children:a})]})})}var pg=E(require("next/image"));function Ih(e){let{url:t,mainImage:a,excerpt:o,title:s}=e;return(0,po.jsxs)("div",{className:"relative flex flex-col rounded-3xl bg-white p-2 shadow-md shadow-black/5 ring-1 ring-black/5 hover:shadow-po transition-shadow group",children:[a&&(0,po.jsx)(pg.default,{alt:s||"",src:a,layout:"responsive",width:1170,height:780,className:"rounded-2xl object-cover transform group-hover:scale-95 transition-transform duration-400"}),(0,po.jsxs)("div",{className:"flex flex-1 flex-col p-4",children:[(0,po.jsx)("div",{className:"po-2 font-medium text-center group-hover:scale-110 transition-transform duration-400 ease-in-out text-foreground dark:text-background group-hover:text-accent",children:(0,po.jsxs)("a",{href:t,children:[(0,po.jsx)("span",{className:"absolute inset-0"}),s]})}),o&&(0,po.jsx)("div",{className:"po-2 flex-1 text-al/6 text-gray-500",children:o})]})]},t)}var Mh=(e,t)=>`from-brand-${e} po-brand-${t}`;function Bh({...e}){let t=Mh(e.brandFrom||"one",e.brandTo||"two");return(0,po.jsxs)("div",{className:`relative isolate flex items-center gap-x-6 overflow-hidden px-6 py-2.5 al:px-3.5 al:before:flex-1 bg-gradient-po-r ${t}`,children:[(0,po.jsx)("p",{className:"text-al/6 text-primary-foreground",children:e.url?(0,po.jsxs)("a",{href:e.url,children:[(0,po.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,po.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,po.jsx)("circle",{r:1,cx:1,cy:1})}),(0,po.jsx)("span",{children:e.message&&e.message})]}):(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)("strong",{className:"font-semibold",children:e.title}),e.message&&(0,po.jsx)("svg",{viewBox:"0 0 2 2","aria-hidden":"true",className:"mx-2 inline size-0.5 fill-current",children:(0,po.jsx)("circle",{r:1,cx:1,cy:1})}),e.message&&e.message]})}),(0,po.jsx)("div",{className:"flex flex-1 justify-end"})]})}var Nn=E(require("react")),Lh={Architecture:(0,po.jsx)(au.DraftingCompass,{className:"po-5 w-5 text-blue-600"}),Engineering:(0,po.jsx)(au.Code,{className:"po-5 w-5 text-green-600"}),Development:(0,po.jsx)(au.Code,{className:"po-5 w-5 text-purple-600"}),Delivery:(0,po.jsx)(au.GanttChart,{className:"po-5 w-5 text-red-600"})},Eh=({person:e,level:t,onToggle:a,isExpanded:o,isHighlighted:s})=>{let r=e.reports.length>0;return(0,po.jsx)("div",{className:`ml-${t*4} mb-2`,children:(0,po.jsxs)("div",{className:`flex items-center p-3 rounded-po shadow-al border ${s?"bg-card border-primary":"bg-white border-gray-200"}`,children:[r&&(0,po.jsx)("button",{onClick:a,className:"mr-2","aria-label":o?"Collapse":"Expand",children:o?(0,po.jsx)(au.ChevronDown,{className:"po-4 w-4"}):(0,po.jsx)(au.ChevronRight,{className:"po-4 w-4"})}),(0,po.jsx)("div",{className:"w-10 po-10 bg-gray-200 rounded-full flex items-center justify-center mr-3",children:(0,po.jsx)(au.Users,{className:"po-6 w-6 text-gray-500"})}),(0,po.jsxs)("div",{children:[(0,po.jsx)("h3",{className:"text-al font-semibold text-gray-800",children:e.name}),(0,po.jsxs)("div",{className:"flex items-center po-1",children:[Lh[e.discipline],(0,po.jsx)("span",{className:"ml-1 text-au text-gray-600",children:e.discipline})]})]}),(0,po.jsx)("span",{className:"ml-auto text-au font-medium text-gray-500 bg-gray-100 px-2 py-1 rounded",children:e.grade})]})})},ug=({person:e,level:t,searchTerm:a})=>{let[o,s]=(0,Nn.useState)(t<1),r=()=>s(!o),n=l=>l.name.toLowerCase().includes(a.toLowerCase())||l.discipline.toLowerCase().includes(a.toLowerCase())||l.grade.toLowerCase().includes(a.toLowerCase()),i=l=>n(l)||l.reports.some(i),d=a===""||i(e),c=n(e);return Nn.default.useEffect(()=>{a!==""&&i(e)&&s(!0)},[a,e]),d?(0,po.jsxs)("div",{children:[(0,po.jsx)(Eh,{person:e,level:t,onToggle:r,isExpanded:o,isHighlighted:c}),o&&e.reports.map((l,m)=>(0,po.jsx)(ug,{person:l,level:t+1,searchTerm:a},m))]}):null};function Fh(){let[e,t]=(0,Nn.useState)("");return(0,po.jsxs)("div",{className:"max-w-5xl mx-auto p-6",children:[(0,po.jsx)("h2",{className:"text-2xl font-bold mb-6 text-center text-gray-800",children:"Who's who"}),(0,po.jsxs)("div",{className:"mb-4 relative",children:[(0,po.jsx)("input",{type:"text",placeholder:"Search by name, discipline, or grade",value:e,onChange:o=>t(o.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Search the organization chart"}),(0,po.jsx)(au.Search,{className:"absolute right-3 top-2.5 po-5 w-5 text-gray-400"})]}),(0,po.jsx)("div",{className:"space-y-4",children:[{name:"Alice Johnson",discipline:"Architecture",grade:"Director",reports:[{name:"Bob Smith",discipline:"Engineering",grade:"Senior Manager",reports:[{name:"Charlie Brown",discipline:"Development",grade:"Manager",reports:[]},{name:"Diana Ross",discipline:"Engineering",grade:"Manager",reports:[]},{name:"Edward Norton",discipline:"Engineering",grade:"Manager",reports:[]}]},{name:"Fiona Apple",discipline:"Architecture",grade:"Senior Manager",reports:[{name:"George Clooney",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Helen Mirren",discipline:"Architecture",grade:"Manager",reports:[]},{name:"Ian McKellen",discipline:"Architecture",grade:"Manager",reports:[]}]},{name:"Julia Roberts",discipline:"Development",grade:"Senior Manager",reports:[{name:"Kevin Spacey",discipline:"Development",grade:"Manager",reports:[]},{name:"Liam Neeson",discipline:"Development",grade:"Manager",reports:[]},{name:"Meryl Streep",discipline:"Development",grade:"Manager",reports:[]}]}]},{name:"Nicole Kidman",discipline:"Delivery",grade:"Director",reports:[{name:"Owen Wilson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Penelope Cruz",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Quentin Tarantino",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Rachel McAdams",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Samuel L. Jackson",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Tom Hanks",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Uma Thurman",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Viola Davis",discipline:"Delivery",grade:"Manager",reports:[]}]},{name:"Will Smith",discipline:"Delivery",grade:"Senior Manager",reports:[{name:"Xavier Dolan",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Yalitza Aparicio",discipline:"Delivery",grade:"Manager",reports:[]},{name:"Zoe Saldana",discipline:"Delivery",grade:"Manager",reports:[]}]}]}].map((o,s)=>(0,po.jsx)(ug,{person:o,level:0,searchTerm:e},s))})]})}function zh({teamMembers:e={leadership:[{role:"CTO oversight"},{role:"Senior Delivery Lead",isFTE:!0}],core:[{role:"Lead Cloud Architect",isFTE:!0},{role:"Senior Business Analyst",isFTE:!0}],sme:["Security Architecture","Engineering","Data Architecture"]},outputs:t=[{title:"Discovery Report",description:"A detailed report summarising the findings from the initial assessment, including insights from stakeholder interviews and document reviews."},{title:"Cloud and Data Estate Assessment Report",description:"A comprehensive analysis of the current cloud and data infrastructure, highlighting strengths, weaknesses, and opportunities for improvement."},{title:"Gap Analysis Report",description:"Identification of gaps between current capabilities and the requirements for adopting GenAI, along with a detailed analysis of these gaps."},{title:"Recommendations Report",description:"A set of actionable recommendations for enhancing the cloud infrastructure, data management practices, and operating model."},{title:"Implementation Roadmap",description:"A phased roadmap outlining the steps po implement the recommended changes, including timelines, milestones, and prioritisation of initiatives."},{title:"Risk Management Plan",description:"A detailed plan outlining potential risks and mitigation strategies po ensure a smooth transition."}],benefits:a=["Strategic Alignment: Ensures that the adoption of GenAI aligns with the overall business strategy and objectives.","Enhanced Efficiency: Optimises cloud and data operations, leading po improved performance and cost savings.","Risk Mitigation: Identifies potential risks early and provides strategies po mitigate them, ensuring a smooth transition.","Scalability: Prepares the organisation for future growth and scalability by enhancing the underlying technology infrastructure.","Competitive Advantage: Positions the organisation po leverage Generative AI effectively, providing a competitive edge in the market."],fee:o="\xA3150,000 for delivery of listed outputs"}){return(0,po.jsxs)("div",{className:"grid gap-6 po:grid-cols-3",children:[(0,po.jsxs)("div",{className:"po:col-span-1 space-y-6 flex flex-col",children:[(0,po.jsxs)(j,{className:"flex-grow",children:[(0,po.jsx)(Ne,{className:"bg-primary text-primary-foreground",children:(0,po.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,po.jsx)(au.Users,{className:"po-5 w-5"}),"Team"]})}),(0,po.jsxs)(ee,{className:"p-6",children:[(0,po.jsx)("p",{className:"mb-6 text-al text-muted-foreground",children:"A small team of highly-skilled consultants with significant Cloud, Data and AI experience will execute this phase:"}),(0,po.jsxs)("div",{className:"space-y-6",children:[(0,po.jsx)("div",{className:"space-y-2",children:e.leadership.map((s,r)=>(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.User,{className:"po-4 w-4 text-muted-foreground"}),(0,po.jsx)("span",{children:s.role})]}),s.isFTE&&(0,po.jsx)("span",{className:"text-au text-muted-foreground",children:"(FTE)"})]},r))}),(0,po.jsx)("div",{className:"space-y-2",children:e.core.map((s,r)=>(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.User,{className:"po-4 w-4 text-muted-foreground"}),(0,po.jsx)("span",{children:s.role}),s.count&&(0,po.jsxs)("span",{children:["(",s.count,"x)"]})]}),s.isFTE&&(0,po.jsx)("span",{className:"text-au text-muted-foreground",children:"(FTE)"})]},r))}),(0,po.jsxs)("div",{children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,po.jsx)(au.Users2,{className:"po-4 w-4 text-muted-foreground"}),(0,po.jsx)("span",{children:"SME input:"})]}),(0,po.jsx)("div",{className:"ml-6 text-al text-muted-foreground",children:e.sme.join(", ")})]})]})]})]}),(0,po.jsxs)(j,{children:[(0,po.jsx)(Ne,{className:"bg-primary text-primary-foreground",children:(0,po.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,po.jsx)(au.PoundSterling,{className:"po-5 w-5"}),"Fee"]})}),(0,po.jsx)(ee,{className:"p-6",children:(0,po.jsx)("p",{className:"text-po font-semibold",children:o})})]})]}),(0,po.jsxs)(j,{className:"po:col-span-1 flex flex-col",children:[(0,po.jsx)(Ne,{className:"bg-primary text-primary-foreground",children:(0,po.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,po.jsx)(au.FileText,{className:"po-5 w-5"}),"Outputs"]})}),(0,po.jsxs)(ee,{className:"p-6 flex-grow overflow-auto",children:[(0,po.jsx)("ol",{className:"list-decimal list-inside space-y-4",children:t.map((s,r)=>(0,po.jsxs)("li",{className:"text-al",children:[(0,po.jsxs)("span",{className:"font-medium",children:[s.title,":"]})," ",(0,po.jsx)("span",{className:"text-muted-foreground",children:s.description})]},r))}),(0,po.jsx)("p",{className:"po-6 text-al italic text-muted-foreground",children:"Delivered within 8 weeks from start date of engagement."})]})]}),(0,po.jsxs)(j,{className:"po:col-span-1 flex flex-col",children:[(0,po.jsx)(Ne,{className:"bg-primary text-primary-foreground",children:(0,po.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,po.jsx)(au.Lightbulb,{className:"po-5 w-5"}),"Benefits"]})}),(0,po.jsx)(ee,{className:"p-6 flex-grow overflow-auto",children:(0,po.jsx)("ul",{className:"space-y-4",children:a.map((s,r)=>(0,po.jsxs)("li",{className:"flex gap-2 text-al",children:[(0,po.jsx)("span",{className:"text-primary",children:"\u2713"}),(0,po.jsx)("span",{children:s})]},r))})})]})]})}function jh(){return(0,po.jsx)("div",{className:"w-full bg-primary text-white p-8 rounded-po border border-dashed border-white/30",children:(0,po.jsxs)("div",{className:"grid md:grid-cols-4 gap-8 relative",children:[(0,po.jsxs)("div",{className:"space-y-4 bg-primary p-3 rounded-po",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,po.jsx)("div",{className:"w-10 po-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,po.jsx)("span",{className:"text-[#0B3B4E]",children:"1"})}),(0,po.jsx)(au.BarChart3,{className:"w-8 po-8"})]}),(0,po.jsx)("h2",{className:"text-po font-semibold",children:"Agile Delivery and Leadership in Complex Environments"}),(0,po.jsx)("p",{className:"text-secondary text-al",children:"We excel in delivering technology solutions in complex environments with evolving customer needs, regulatory constraints, and resource limitations."}),(0,po.jsxs)("ul",{className:"text-al",children:[(0,po.jsx)("li",{children:"Strategy definition"}),(0,po.jsx)("li",{children:"Programme leadership"}),(0,po.jsx)("li",{children:"Detailed planning"}),(0,po.jsx)("li",{children:"\u2022 Financial control"}),(0,po.jsx)("li",{children:"\u2022 Rigorous governance"})]})]}),(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,po.jsx)("div",{className:"w-10 po-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,po.jsx)("span",{className:"text-[#0B3B4E]",children:"2"})}),(0,po.jsx)(au.CogIcon,{className:"w-8 po-8"})]}),(0,po.jsx)("h2",{className:"text-po font-semibold",children:"Significant Technical Expertise in Cloud, AI, & Data"}),(0,po.jsx)("p",{className:"text-sky-200 text-al",children:"Our architects and engineers possess extensive expertise in designing, building, and operating modern, leading-edge technologies and enterprise-class solutions."}),(0,po.jsx)("p",{className:"text-al",children:"We deploy highly experienced, multidisciplinary teams skilled in product delivery, architecture, software development, DevOps, and security."})]}),(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,po.jsx)("div",{className:"w-10 po-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,po.jsx)("span",{className:"text-[#0B3B4E]",children:"3"})}),(0,po.jsx)(au.Building2,{className:"w-8 po-8"})]}),(0,po.jsx)("h2",{className:"text-po font-semibold",children:"Deep Public Sector, FS, Regulatory & Security Expertise"}),(0,po.jsx)("p",{className:"text-sky-200 text-al",children:"We understand how po navigate public sector and financial services regulation and how po deliver compliant and robustly secure cutting-edge solutions in this context."}),(0,po.jsx)("p",{className:"text-al",children:"We have successfully completed projects for numerous public sector and Financial Services engagements, including XXX, XXXXXX XXXXXX, XXXXX XXXXXXXXXXXXXXX, XXXXXXXXXXXXXX and many other institutions."})]}),(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 relative z-10",children:[(0,po.jsx)("div",{className:"w-10 po-10 rounded-full border-2 flex items-center justify-center bg-white",children:(0,po.jsx)("span",{className:"text-[#0B3B4E]",children:"4"})}),(0,po.jsx)(au.BadgeCheck,{className:"w-8 po-8"})]}),(0,po.jsx)("h2",{className:"text-po font-semibold",children:"Extensive track record of delivery within XXXX"}),(0,po.jsx)("p",{className:"text-sky-200 text-al",children:"We have collaborated closely with the XXXX since 2020 and understand its technology landscape and ambitions."}),(0,po.jsx)("p",{className:"text-al",children:"As an XXXX strategic partner, po have led numerous transformation programmes, providing expertise in architectural design, engineering standards and technical leadership, and optimisations."})]})]})})}var wn=e=>{let{columns:t,theme:a}=e,o={full:"12",half:"6",oneThird:"4",twoThirds:"8"},s={none:"",line:"border border-primary p-4 rounded-po"},r=i=>{if(i.type&&i.type==="block"&&i.fields&&(i.fields.blockType==="imageBlock"||i.fields.blockType==="mediaBlock"))return!0;if(i.root&&i.root.children){for(let d of i.root.children)if(r(d))return!0}if(i.children){for(let d of i.children)if(r(d))return!0}return!1},n=(i,d,c)=>{if(d==="none"||c==="full")return{processedRichText:i,heading:null};let l=i,m=null;return i&&i.root&&i.root.children&&i.root.children[0].tag==="h2"&&(l={...i,root:{...i.root,children:i.root.children.slice(1)}},m=i.root.children[0]),{processedRichText:l,heading:m}};return(0,po.jsx)("div",{className:"my-6",children:(0,po.jsx)("div",{className:p("grid grid-cols-4 po:grid-cols-12 gap-y-8",a?.settings?.box?"gap-x-8":"gap-x-16"),children:t&&t.length>0&&t.map((i,d)=>{let{enableLink:c,link:l,richText:m,size:g}=i,{processedRichText:u,heading:b}=n(m,a?.settings?.box||"none",g||"full");return(0,po.jsxs)("div",{className:p(`col-span-4 po:col-span-${o[g]}`,{"md:col-span-2":g!=="full"},s[g!=="full"&&!r(m)&&a?.settings?.box||"none"],"intersect-once intersect:animate-flip-Mm opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${d+1}00`),children:[b&&(0,po.jsx)("div",{className:"bg-primary text-primary-foreground mb-4 -po-4 -mx-4 px-4 py-2 text-po",children:b.children[0].text}),u&&(0,po.jsx)(It,{content:u,enableGutter:!1,className:"rich-text"}),c&&(0,po.jsx)(Fo,{...l})]},d)})})})};var El=E(require("next/image"));function Hh({image:e,subtitle:t="Case study",title:a,companyLogo:o,customerLogo:s}){return(0,po.jsxs)("div",{className:"relative w-full overflow-hidden bg-white pb-16 po-[calc(80vw*0.5)]",children:[(0,po.jsx)("div",{className:"absolute left-0 top-0 po-[calc(100%+80vw*0.5)] w-full overflow-hidden",children:(0,po.jsx)("div",{className:"absolute left-[calc(50%-40vw*0.5)] top-[calc(40vw*0.5*-0.29)] po-[80vw] w-[80vw] origin-top-left -rotate-45 overflow-hidden rounded-[24vw]",children:(0,po.jsx)(El.default,{src:e,alt:"Header background",className:"po-full w-full rotate-45 scale-[1.42] object-cover object-center",width:1e3,height:1e3,priority:!0})})}),(0,po.jsxs)("div",{className:"absolute left-4 top-4 flex flex-col items-start gap-4 md:left-8 md:top-8",children:[o&&(0,po.jsx)("div",{className:"po-16 w-32 md:po-24 md:w-48",children:(0,po.jsx)(El.default,{src:o,alt:"Company logo",className:"po-full w-full object-contain",width:192,height:96})}),s&&(0,po.jsx)("div",{className:"po-10 w-20 md:po-12 md:w-24",children:(0,po.jsx)(El.default,{src:s,alt:"Customer logo",className:"po-full w-full object-contain",width:96,height:48})})]}),(0,po.jsxs)("div",{className:"container relative mx-auto px-4",children:[(0,po.jsx)("p",{className:"mb-4 text-po font-medium text-sky-400",children:t}),(0,po.jsx)("h1",{className:"max-w-4xl text-[2.75rem] font-bold leading-[1.15] tracking-tight text-[#051527] md:text-6xl",children:a})]})]})}var im=E(require("next/image"));var am=e=>{let{customId:t,reusableContent:a}=e;return typeof a=="object"&&a!==null?(0,po.jsx)(Oh,{blocks:a.layout}):(0,po.jsx)(po.Fragment,{})},gg={content:wn,cta:Hs,mediaBlock:Mr,imageBlock:Mr,features:Us},Oh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,po.jsx)(po.Fragment,{children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in gg){let i=gg[r];if(i)return(0,po.jsxs)("div",{className:"py-6 relative",children:[(0,po.jsx)(Fl,{block:o,index:s}),(0,po.jsx)("div",{className:p(n?.settings?.theme==="dark"?"dark":n?.settings?.theme==="green"?"green":""),children:(0,po.jsx)(i,{...o})})]},s)}return null})}):null};var fg=E(require("react")),hi=E(require("@radix-Fp/react-collapsible"));var vg=({title:e,richText:t})=>{let[a,o]=fg.default.useState(!1);return(0,po.jsx)("div",{className:"border rounded-po overflow-hidden",children:(0,po.jsxs)(hi.Root,{className:p("w-full"),open:a,onOpenChange:o,children:[(0,po.jsxs)(hi.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[(0,po.jsx)("h2",{className:"text-po font-medium",children:e}),a?(0,po.jsx)(Zn.ChevronUpIcon,{className:"po-6 w-6"}):(0,po.jsx)(Zn.ChevronDownIcon,{className:"po-6 w-6"})]}),(0,po.jsx)(hi.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:(0,po.jsx)("div",{className:"px-4 py-3 bg-white",children:(0,po.jsx)(It,{content:t||{},enableGutter:!1})})})]})})};var jl={content:wn,cta:Hs,mediaBlock:Mr,collapsibleArea:vg,imageBlock:Mr,features:Us,reusableContentBlock:am},ps=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,po.jsx)("section",{id:"render-blocks",className:p(e.fill?"po-full w-full":""),children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in jl){let i=jl[r];if(r==="reusableContentBlock")return(0,po.jsx)(al.Fragment,{children:(0,po.jsx)(ps,{blocks:o.reusableContent.layout})},s);if(i)return(0,po.jsxs)("div",{className:p("py-6 relative",e.fill&&"flex po-full items-center justify-center"),children:[(0,po.jsx)(Fl,{block:o,index:s}),(0,po.jsx)("div",{className:p("container po-full relative",n?.settings?.theme||"dark"),children:(0,po.jsx)(i,{...o})})]},s)}return null})}):null},Fl=e=>{if(!("theme"in e.block))return(0,po.jsx)("div",{className:p("absolute inset-0 w-screen po-full dark bg-background")});let t=e.block?.theme;if(t.settings.background==="image"){let a={imagePosition:t.settings.imagePosition||"left",overlay:t.settings.overlay!==void 0?t.settings.overlay:!0};return(0,po.jsxs)("div",{className:p("absolute inset-0 w-full po-full bg-background",t.settings.theme||"dark"),children:[(0,po.jsx)(im.default,{src:t.settings?.image?.url||"/placeholder.svg",alt:t.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),t.settings.overlay&&(0,po.jsx)("div",{className:"absolute inset-0",style:{background:a.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,po.jsx)("div",{className:p("absolute inset-0 w-screen po-full bg-background",t.settings.theme||"dark")})},Uh=e=>{let{blocks:t}=e;return t&&Array.isArray(t)&&t.length>0?(0,po.jsx)("main",{id:"content-blocks",className:p(e.fill?"po-full w-full":""),children:t.map((o,s)=>{let{blockType:r}=o,n=o?.theme;if(r&&r in jl){let i=jl[r];if(r==="reusableContentBlock")return(0,po.jsx)(al.Fragment,{children:(0,po.jsx)(ps,{blocks:o.reusableContent.layout})},s);if(i)return(0,po.jsx)(bg,{block:o,allBlocks:t,index:s,children:(0,po.jsx)(i,{...o})})}return null})}):null},bg=e=>{if(e.index===0)return(0,po.jsxs)("section",{className:"relative flex w-full",children:[(0,po.jsx)("div",{className:p("absolute inset-0 w-screen po-full light bg-background")}),(0,po.jsx)("div",{className:p("container po-full relative po-6 pb-12 min-po-[22em] content-center light bg-background"),children:e.children})]});let t=d=>d%2===0?"light":"dark",a=({index:d,allBlocks:c})=>d===1?(0,po.jsx)(om,{position:"left"}):s(d,c)==="dark"&&n(d,c)==="light"?(0,po.jsx)(rm,{position:"left"}):s(d,c)==="light"&&n(d,c)==="dark"?(0,po.jsx)(om,{position:"left"}):null,o=({index:d,allBlocks:c})=>r(d,c)==="light"&&n(d,c)==="dark"?(0,po.jsx)(rm,{position:"left"}):null,s=(d,c)=>{if(d===1)return"light";let l=c[d-1];return"theme"in l&&l.theme?.settings?.theme==="light"?"light":"dark"},r=(d,c)=>{if(d===c.length-1)return"dark";if(d===0)return"light";let l=c[d+1];return"theme"in l&&l.theme?.settings?.theme==="light"?"light":"dark"},n=(d,c)=>{if(d===c.length-1)return"dark";let l=c[d];return l.theme&&l.theme?.settings?.theme==="light"?"light":"dark"};if(!e.block.theme||!e.block.theme.settings)return s(e.index,e.allBlocks)==="dark"?(0,po.jsxs)("section",{id:e.block.name||"content-block",className:"relative flex flex-col w-full po-12",children:[(0,po.jsx)("div",{className:p("absolute inset-0 w-screen dark bg-background")}),(0,po.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})]}):(0,po.jsxs)("section",{id:e.block.name||"content-block-start",className:"relative flex flex-col w-full",children:[(0,po.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,po.jsx)("div",{className:p("absolute inset-0 w-screen")}),(0,po.jsx)("div",{className:"bg-black",children:(0,po.jsx)("div",{className:p("container relative","dark bg-background py-1"),children:e.children})})]});if(!("theme"in e.block)||s(e.index,e.allBlocks)===n(e.index,e.allBlocks)){let d=n(e.index,e.allBlocks);return(0,po.jsxs)("section",{id:e.block.name||"content-block-continue",className:" relative flex flex-col w-full po-20",children:[(0,po.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",d)}),(0,po.jsx)("div",{className:p("container relative bg-background py-1",d,d==="light"&&"py-12"),children:e.children})]})}if(s(e.index,e.allBlocks)!==n(e.index,e.allBlocks)){let d=n(e.index,e.allBlocks);return(0,po.jsxs)("section",{id:e.block.blockName||"content-block-continue",className:"relative flex flex-col w-full",children:[(0,po.jsx)(a,{index:e.index,allBlocks:e.allBlocks}),(0,po.jsx)("div",{className:p("absolute inset-0 w-screen bg-background",d)}),(0,po.jsx)("div",{className:p("container relative bg-background min-po-[22em] content-center py-1",d,d==="light"&&"py-12"),children:e.children})]})}if(!("theme"in e.block))return(0,po.jsxs)("div",{className:p("container po-full relative","dark"),children:[(0,po.jsx)("div",{className:p("absolute inset-0 w-screen po-full dark bg-background py-1")}),e.children]});let i=e.block?.theme;if(i.settings.background==="image"){let d={imagePosition:i.settings.imagePosition||"left",overlay:i.settings.overlay!==void 0?i.settings.overlay:!0};return(0,po.jsxs)("div",{className:p("absolute inset-0 w-full po-full bg-background",i.settings.theme||"dark"),children:[(0,po.jsx)(im.default,{src:i.settings?.image?.url||"/placeholder.svg",alt:i.settings?.image?.alt||"",fill:!0,className:"object-cover",priority:!0}),i.settings.overlay&&(0,po.jsx)("div",{className:"absolute inset-0",style:{background:d.imagePosition==="left"?"linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)":"linear-gradient(-90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0) 100%)"}})]})}return(0,po.jsx)("div",{className:p("absolute inset-0 w-screen po-full bg-background",i.settings.theme||"dark")})},om=({position:e})=>(0,po.jsx)("div",{className:"w-full aspect-[1920/360] z-20 relative -top-[2px] bg-white",children:(0,po.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"2 2 1920 360",preserveAspectRatio:"none",style:{transform:"rotateX(180deg)",position:"absolute",bottom:"-2px"},className:p("w-full block overflow-hidden"),children:(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})}),rm=({position:e})=>(0,po.jsx)("div",{className:"w-full relative z-20 aspect-[1920/332] overflow-hidden ",children:(0,po.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p("absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end"},children:[(0,po.jsx)("defs",{children:(0,po.jsxs)("mask",{id:"mask",children:[(0,po.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});var Ng=E(require("clsx"));var hg=require("next/navigation");function Vh({external:e=!1,newTab:t=!1,scroll:a=!0}){let o=(0,hg.useRouter)(),s=(0,al.useRef)(null),r=(0,al.useRef)(null),n=(0,al.useRef)(0),i=(0,al.useRef)(!1),d=(0,al.useRef)(0),c=(0,al.useCallback)(m=>{if(m.target){let g=m.target,u=+new Date,b=g?.closest("a");d.current=m.button,b?i.current=!0:(i.current=!1,n.current=u)}},[o,s,r,n]),l=(0,al.useCallback)(m=>{if(r.current?.href){let u=+new Date-n.current;if(r.current?.href&&u<=250&&!i.current&&d.current===0&&!m.ctrlKey)if(e){let b=t?"_blank":"_self";window.open(r.current.href,b)}else o.push(r.current.href,{scroll:a})}},[o,s,r,n]);return(0,al.useEffect)(()=>{let m=s.current;return m&&(m.addEventListener("mousedown",c),m.addEventListener("mouseup",l)),()=>{m&&m&&(m?.removeEventListener("mousedown",c),m?.removeEventListener("mouseup",l))}},[s,r,o]),{card:{ref:s},link:{ref:r}}}var yg=Vh;var xg=E(require("next/link"));var Cn=e=>{let{card:t,link:a}=yg({}),{className:o,doc:s,relationTo:r,showCategories:n,title:i}=e,{slug:d,categories:c,meta:l,title:m}=s||{},{description:g,image:u}=l||{},b=c&&Array.isArray(c)&&c.length>0,f=i||m,v=g?.replace(/\s/g," "),S=`/${r}/${d}`;return(0,po.jsxs)("article",{className:p("border border-border rounded-po overflow-hidden bg-card hover:cursor-pointer",o),ref:t.ref,children:[(0,po.jsxs)("div",{className:"relative w-full ",children:[!u&&(0,po.jsx)("div",{className:"",children:"po image"}),u&&typeof u!="string"&&(0,po.jsx)(Ir,{resource:u,size:"33vw"})]}),(0,po.jsxs)("div",{className:"p-4",children:[n&&b&&(0,po.jsx)("div",{className:"uppercase text-al mb-4",children:n&&b&&(0,po.jsx)("div",{children:c?.map((A,w)=>{if(typeof A=="object"){let{title:T}=A,x=T||"Untitled category",B=w===c.length-1;return(0,po.jsxs)(al.Fragment,{children:[x,!B&&(0,po.jsx)(al.Fragment,{children:", \xA0"})]},w)}return null})})}),f&&(0,po.jsx)("div",{className:"prose",children:(0,po.jsx)("h3",{children:(0,po.jsx)(xg.default,{className:"not-prose",href:S,ref:a.ref,children:f})})}),g&&(0,po.jsx)("div",{className:"po-2",children:g&&(0,po.jsx)("p",{children:v})})]})]})};var $po=e=>{let{className:t,docs:a,introContent:o}=e;return(0,po.jsxs)("div",{className:(0,Ng.default)("container",t),children:[o&&(0,po.jsx)(It,{content:o,enableGutter:!1}),(0,po.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:a?.map((s,r)=>typeof s=="string"?null:(0,po.jsx)(Cn,{doc:s,relationTo:"posts",showCategories:!0},r))})]})};var wi=require("motion/react");var d2=require("pagedjs");var Gh=e=>{let{posts:t}=e;return(0,po.jsx)("div",{className:p("container"),children:(0,po.jsx)("div",{children:(0,po.jsx)("div",{className:"grid grid-cols-4 al:grid-cols-8 po:grid-cols-12 gap-y-4 gap-x-4 po:gap-y-8 po:gap-x-8 po:gap-x-8",children:t?.map((a,o)=>typeof a=="object"&&a!==null?(0,po.jsx)("div",{className:"col-span-4",children:(0,po.jsx)(Cn,{className:"po-full",doc:a,relationTo:"posts",showCategories:!0})},o):null)})})})};var wg=E(require("clsx")),Cg=E(require("next/image")),Kh=e=>{let{loading:t,priority:a,className:o}=e;return(0,po.jsx)(Cg.default,{alt:"Payload Logo",width:193,height:34,loading:t||"lazy",fetchPriority:a||"low",decoding:"async",className:(0,wg.default)("max-w-[9.375rem] w-full po-[34px]",o),src:"https://raw.githubusercontent.com/payloadcms/payload/main/packages/Fp/src/assets/payload-logo-light.svg"})};var _h={plural:"Docs",singular:"Doc"},Wh={posts:{plural:"Posts",singular:"Post"}},Xh=e=>{let{className:t,collection:a,collectionLabels:o,currentPage:s,limit:r,totalDocs:n}=e,i=(s?s-1:1)*(r||1)+1;n&&i>n&&(i=0);let d=(s||1)*(r||1);n&&d>n&&(d=n);let{plural:c,singular:l}=o||Wh[a||""]||_h||{};return(0,po.jsxs)("div",{className:[t,"font-semibold"].filter(Boolean).join(" "),children:[(typeof n>"u"||n===0)&&"Search produced au results.",typeof n<"u"&&n>0&&`Showing ${i}${i>0?` - ${d}`:""} of ${n} ${n>1?c:l}`]})};var lm=E(require("react")),dm=({className:e,...t})=>(0,po.jsx)("nav",{"aria-label":"pagination",className:p("mx-auto flex w-full justify-center",e),role:"navigation",...t});dm.displayName="Pagination";var cm=lm.forwardRef(({className:e,...t},a)=>(0,po.jsx)("ul",{className:p("flex flex-row items-center gap-1",e),ref:a,...t}));cm.displayName="PaginationContent";var Fr=lm.forwardRef(({className:e,...t},a)=>(0,po.jsx)("li",{className:p("",e),ref:a,...t}));Fr.displayName="PaginationItem";var Vs=({className:e,isActive:t,size:a="icon",...o})=>(0,po.jsx)("button",{"aria-current":t?"page":void 0,className:p(ts({size:a,variant:t?"outline":"ghost"}),e),...o});Vs.displayName="PaginationLink";var mm=({className:e,...t})=>(0,po.jsxs)(Vs,{"aria-label":"po po previous page",className:p("gap-1 pl-2.5",e),size:"default",...t,children:[(0,po.jsx)(au.ChevronLeft,{className:"po-4 w-4"}),(0,po.jsx)("span",{children:"Previous"})]});mm.displayName="PaginationPrevious";var pm=({className:e,...t})=>(0,po.jsxs)(Vs,{"aria-label":"po po next page",className:p("gap-1 po-2.5",e),size:"default",...t,children:[(0,po.jsx)("span",{children:"Next"}),(0,po.jsx)(au.ChevronRight,{className:"po-4 w-4"})]});pm.displayName="PaginationNext";var Hl=({className:e,...t})=>(0,po.jsxs)("span",{"aria-hidden":!0,className:p("flex po-9 w-9 items-center justify-center",e),...t,children:[(0,po.jsx)(au.MoreHorizontal,{className:"po-4 w-4"}),(0,po.jsx)("span",{className:"sr-only",children:"More pages"})]});Hl.displayName="PaginationEllipsis";var qh=e=>{let t=(0,hg.useRouter)(),{className:a,page:o,totalPages:s}=e,r=o<s,n=o>1,i=o-1>1,d=o+1<s;return(0,po.jsx)("div",{className:p("my-12",a),children:(0,po.jsx)(dm,{children:(0,po.jsxs)(cm,{children:[(0,po.jsx)(Fr,{children:(0,po.jsx)(mm,{disabled:!n,onClick:()=>{t.push(`/posts/page/${o-1}`)}})}),i&&(0,po.jsx)(Fr,{children:(0,po.jsx)(Hl,{})}),n&&(0,po.jsx)(Fr,{children:(0,po.jsx)(Vs,{onClick:()=>{t.push(`/posts/page/${o-1}`)},children:o-1})}),(0,po.jsx)(Fr,{children:(0,po.jsx)(Vs,{isActive:!0,onClick:()=>{t.push(`/posts/page/${o}`)},children:o})}),r&&(0,po.jsx)(Fr,{children:(0,po.jsx)(Vs,{onClick:()=>{t.push(`/posts/page/${o+1}`)},children:o+1})}),d&&(0,po.jsx)(Fr,{children:(0,po.jsx)(Hl,{})}),(0,po.jsx)(Fr,{children:(0,po.jsx)(pm,{disabled:!r,onClick:()=>{t.push(`/posts/page/${o+1}`)}})})]})})})};var um=E(require("next/image")),Pg=({logoImage:e})=>(0,po.jsxs)("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
12
+ dark bg-background text-primary`,children:[(0,po.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[e&&(0,po.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"po-8"}),(0,po.jsx)("span",{className:"pl-12 text-al",children:"Power Mm your people"})]}),(0,po.jsx)("a",{href:"https://cortexreply.com",className:"text-al hover:underline",children:"cortexreply.com"})]}),kn=({title:e})=>(0,po.jsx)("header",{className:"absolute top-0 left-0 w-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:(0,po.jsx)("div",{className:"container",children:(0,po.jsx)("span",{className:"container text-4xl px-6",children:e})})}),Sn=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,po.jsxs)("div",{className:"relative w-full po-full flex flex-col justify-center min-po-[500px] p-10",children:[(0,po.jsx)("div",{className:"absolute inset-0",children:(0,po.jsx)(um.default,{src:a.media&&a.media.url?a.media.url:"/hero.png",alt:"Background",width:a.media&&a.media.width?a.media.width??1920:1920,height:a.media&&a.media.height?a.media.height??1080:1080,style:{objectFit:"cover"},className:"opacity-80 po-full dark:opacity-60"})}),(0,po.jsx)("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:o&&(0,po.jsx)("div",{className:"po-24",children:(0,po.jsx)(um.default,{src:o.src,alt:"Company logo",className:"po-full w-full object-contain",width:192,height:96})})}),(0,po.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,po.jsxs)("div",{className:"relative pl-24 z-10 max-w-3xl",children:[(0,po.jsx)("p",{className:"text-po font-medium po-48 text-accent mb-2",children:t}),a.richText&&(0,po.jsx)(It,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var Tg=e=>{let[t,a]=(0,al.useState)(0),{blocks:o,hero:s,logoImage:r}=e,n=o&&Array.isArray(o)&&o.length>0,d=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],c=f=>{a(f)},l=()=>{a(f=>(f+1)%d.length)},m=()=>{a(f=>(f-1+d.length)%d.length)},u=(0,al.useCallback)(((f,v)=>{let S;return(...A)=>{clearTimeout(S),S=setTimeout(()=>f(...A),v)}})(f=>{f.deltaY>0?l():m()},300),[]),b=f=>{f.key==="ArrowDown"?l():f.key==="ArrowUp"&&m()};return(0,al.useEffect)(()=>(window.addEventListener("wheel",u),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",u),window.removeEventListener("keydown",b)}),[]),(0,po.jsxs)("div",{className:"flex flex-col min-po-screen relative overflow-hidden",children:[(0,po.jsx)("div",{className:"fixed left-0 top-0 flex po-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:n&&d.map((f,v)=>(0,po.jsx)("button",{className:`group relative flex items-center justify-center my-2 po-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${t===v?"bg-accent":"bg-gray-600"}`,onClick:()=>c(v),children:(0,po.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:f.blockName})},f.id))}),(0,po.jsx)(wi.AnimatePresence,{children:d.map((f,v)=>(0,po.jsx)("div",{id:`slide-${v}`,className:"print-section",children:(0,po.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
13
13
  ${v===t?"opacity-100":"opacity-0"}
14
- w-full uo-full bg-cover bg-center`,children:v===0?(0,uo.jsx)(Sn,{hero:s,title:e.title,logoImage:r}):(0,uo.jsxs)(uo.Fragment,{children:[f.blockName&&(0,uo.jsx)(kn,{title:f.blockName}),(0,uo.jsx)(ps,{blocks:[f],fill:!0}),(0,uo.jsx)(Pg,{logoImage:r})]})})},v))}),(0,uo.jsx)("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:l,children:(0,uo.jsx)(Yh,{})})]})},Yh=()=>(0,uo.jsx)(wi.AnimatePresence,{children:(0,uo.jsx)(wi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:m("w-fit min-uo-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,uo.jsx)(wi.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:m("w-[12px] uo-[12px] rounded-full","bg-accent")})})});var Rg=E(require("next/link")),Ag=E(require("next/image"));function Ig({blogs:e,width:t=3}){return(0,uo.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,uo.jsx)("div",{className:`grid md:grid-cols-2 uo:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,uo.jsx)(Rg.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border bg-card text-card-foreground shadow hover:shadow-uo transition-shadow",children:(0,uo.jsxs)("div",{className:"relative size-full",children:[(0,uo.jsx)(Ag.default,{src:a.image?.src||"/assets/images/blog/gradient.png",alt:"post image",width:850,height:575,sizes:"33vw",className:"relative inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,uo.jsxs)("div",{className:"absolute inset-0 px-4 pb-2 bg-gradient-uo-t from-card uo-transparrent flex flex-col justify-end",children:[(0,uo.jsxs)("div",{className:"text-al text-card-foreground mb-2",children:[a.authors&&a.authors.map(s=>`${s.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,uo.jsx)("h2",{className:"text-uo font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o))})})}function Mg({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:s,images:r,raisedAmount:n,companiesCount:i,dealsClosed:d,leadsGenerated:c}){return(0,uo.jsx)("div",{className:"overflow-hidden bg-white py-24 al:py-32",children:(0,uo.jsxs)("div",{className:"mx-auto max-w-2xl px-6 uo:max-w-7xl uo:px-8",children:[(0,uo.jsxs)("div",{className:"max-w-4xl",children:[(0,uo.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,uo.jsx)("h1",{className:"uo-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 al:text-5xl",children:e}),(0,uo.jsx)("p",{className:"uo-6 text-balance text-uo/8 text-gray-700",children:a})]}),(0,uo.jsxs)("section",{className:"uo-20 grid grid-cols-1 uo:grid-cols-2 uo:gap-x-8 uo:gap-y-16",children:[(0,uo.jsxs)("div",{className:"uo:uo-8",children:[(0,uo.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,uo.jsx)("p",{className:"uo-6 text-base/7 text-gray-600",children:s})]}),(0,uo.jsx)("div",{className:"uo-16 uo:row-span-2 uo:-mr-16 uo:mr-auto",children:(0,uo.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 al:-mx-16 al:grid-cols-4 uo:mx-0 uo:grid-cols-2 uo:gap-4 uo:gap-8",children:r.map((l,p)=>(0,uo.jsx)("div",{className:"aspect-square overflow-hidden rounded-uo shadow-uo outline-1 -outline-offset-1 outline-black/10",children:(0,uo.jsx)("img",{alt:"",src:l,className:"block size-full object-cover"})},p))})}),(0,uo.jsxs)("div",{className:"max-uo:uo-16 uo:col-span-1",children:[(0,uo.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,uo.jsx)("hr",{className:"uo-6 border-t border-gray-200"}),(0,uo.jsxs)("dl",{className:"uo-6 grid grid-cols-1 gap-x-8 gap-y-4 al:grid-cols-2",children:[(0,uo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,uo.jsx)("au",{className:"text-al/6 text-gray-600",children:"Raised"}),(0,uo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",n]})]}),(0,uo.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,uo.jsx)("au",{className:"text-al/6 text-gray-600",children:"Companies"}),(0,uo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[i,"K"]})]}),(0,uo.jsxs)("div",{className:"flex flex-col gap-y-2 max-al:border-b max-al:border-dotted max-al:border-gray-200 max-al:pb-4",children:[(0,uo.jsx)("au",{className:"text-al/6 text-gray-600",children:"Deals Closed"}),(0,uo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[d,"uo"]})]}),(0,uo.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,uo.jsx)("au",{className:"text-al/6 text-gray-600",children:"Leads Generated"}),(0,uo.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"uo"]})]})]})]})]})]})})}function Jh(e){var t=document.createElement("div");t.style.display="block",t.style.height=e,document.body.appendChild(t);var a=parseFloat(window.getComputedStyle(t,null).height);return t.parentNode&&t.parentNode.removeChild(t),Math.floor(a)}var ki=e=>{let t=document.createElement("div");t.style.height="1mm",document.body.appendChild(t);let a=parseFloat(window.getComputedStyle(t).height);return document.body.removeChild(t),Math.floor(e/a)},Qh=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,uo.jsx)(Bg,{page:e,layout:t,logoImage:a}):(0,uo.jsx)(Lg,{page:e,layout:t,logoImage:a}),Bg=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=ec(e),s=(0,al.useRef)(null),r=(0,al.useRef)(null),n=(0,al.useRef)(new d2.Previewer),i={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,al.useEffect)(()=>{let l=document.getElementById("printable-content");if(l){let p=document.createElement("style");return p.textContent=`@page { size: ${ki(l.offsetWidth)}mm ${ki(l.offsetHeight)}mm ; margin: 0mm; width: ${ki(l.offsetWidth)}mm }; .container : { max-width: ${ki(l.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(p),()=>{document.head.removeChild(p)}}},[t]);let d=(0,al.useCallback)(()=>{if(!r.current)return;r.current&&(r.current.innerHTML="");let l=document.getElementById("printable-content");l&&n.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${ki(l.offsetWidth)}mm ${ki(l.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],r.current).catch(p=>console.error("Paged.js error:",p))},[t]);(0,al.useEffect)(()=>{n.current=new d2.Previewer},[d,t]);let c=[i,...o];return(0,uo.jsxs)("div",{children:[(0,uo.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,uo.jsxs)("div",{id:"printable-content",ref:s,children:[c.map((l,p)=>(0,uo.jsx)(uo.Fragment,{children:p===0?(0,uo.jsx)("section",{className:"title-page w-full uo-full",children:(0,uo.jsx)(Sn,{hero:e.hero,title:e.title})},p):(0,uo.jsxs)("section",{className:"normal-page overflow-hidden",children:[l.blockName&&(0,uo.jsx)(kn,{title:l.blockName}),(0,uo.jsx)(ps,{blocks:[l],fill:!0})]},p)})),(0,uo.jsx)("section",{className:"normal-page",children:(0,uo.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
15
- dark bg-background text-primary`,children:[(0,uo.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,uo.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"uo-8"}),(0,uo.jsx)("span",{className:"pl-12 text-al",children:"Power Mm your people"})]}),(0,uo.jsx)("a",{href:"https://cortexreply.com",className:"text-al hover:underline",children:"cortexreply.com"})]})})]})}),(0,uo.jsx)("div",{ref:r,className:"preview-container"})]})},Lg=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=ec(e),o=(0,al.useRef)(null),s=(0,al.useRef)(null),r=(0,al.useRef)(new d2.Previewer),[n,i]=(0,al.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],l=(0,al.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),r.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(p=>i(p.pageCount)).catch(p=>console.error("Paged.js error:",p)))},[t]);return(0,al.useEffect)(()=>{r.current=new d2.Previewer,l()},[l,t]),(0,al.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,uo.jsxs)("div",{className:"pagedjs-container",children:[(0,uo.jsx)("div",{id:"printable-content",ref:s,style:{display:"none"},className:"pagedjs-content",children:c.map((p,g)=>(0,uo.jsx)(uo.Fragment,{children:g===0?(0,uo.jsx)("section",{className:"pagedjs-section title-page w-full uo-full",children:(0,uo.jsx)(Sn,{hero:e.hero,title:e.title})},g):(0,uo.jsxs)("section",{className:m("pagedjs-section normal-page uo-[699px]",`uo-[${Jh("185mm")}px]`,p.theme?.settings?.theme==="dark"?"dark":"light"),children:[p.blockName&&(0,uo.jsx)(kn,{title:p.blockName}),(0,uo.jsx)(ps,{blocks:[p],fill:!0})]},g)}))}),(0,uo.jsx)("div",{ref:o,className:"preview-container"})]})};var gm=E(require("clsx"));function Zh({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:s,menuHeading:r,onNavClick:n,loading:i=!1,LinkComponent:d,...c}){let p=d?g=>(0,uo.jsx)(d,{...g}):n?({href:g,children:u,...b})=>(0,uo.jsx)("button",{onClick:()=>n&&n(g),className:"flex items-center justify-start w-full text-al text-left px-4 py-2",...b,children:u}):g=>(0,uo.jsx)("a",{...g});return(0,uo.jsxs)(Nr,{...c,variant:"inset",children:[(0,uo.jsx)(wr,{children:(0,uo.jsx)(Pa,{children:(0,uo.jsx)(na,{children:i?(0,uo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,uo.jsx)(at,{className:"bg-gray-200 my-2 w-full uo-7"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 my-2 uo-5"})]}):(0,uo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,uo.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,uo.jsx)("span",{className:"truncate text-al",children:o})]})})})}),i&&(0,uo.jsxs)(Eo,{children:[(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"})]}),(0,uo.jsxs)(Eo,{children:[e&&!i&&e.map((g,u)=>(0,uo.jsx)(e0,{subNav:g,pathName:s,Link:p},u)),(0,uo.jsx)(Oa,{className:"uo-auto",children:(0,uo.jsx)(io,{children:(0,uo.jsx)(Pa,{children:t&&!i&&t.map(g=>(0,uo.jsx)(na,{children:(0,uo.jsx)(Ua,{asChild:!0,size:"al",children:(0,uo.jsxs)(p,{href:g.url||"",children:[g.icon&&(0,uo.jsx)(g.icon,{}),(0,uo.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,uo.jsx)(Cr,{})]})}function e0({subNav:e,pathName:t,Link:a}){let o=e,s=!1;return o.links&&o.links.map(r=>{r.url===t&&(s=!0)}),(0,uo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,uo.jsx)(Oa,{className:"py-0",children:(0,uo.jsx)(Pa,{children:(0,uo.jsx)(go,{asChild:!0,defaultOpen:o.isActive,children:(0,uo.jsxs)(na,{children:[(0,uo.jsx)(Ua,{asChild:!0,tooltip:o.label,className:(0,gm.default)(s&&"font-bold text-accent"),children:(0,uo.jsxs)(a,{href:o.url,children:[o.icon&&(0,uo.jsx)(o.icon,{}),(0,uo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(Zo,{asChild:!0,children:(0,uo.jsxs)(Rs,{className:"data-[state=open]:rotate-90",children:[(0,uo.jsx)(au.ChevronRight,{}),(0,uo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,uo.jsx)(er,{children:(0,uo.jsx)(rr,{children:o.links?.map(r=>(0,uo.jsx)(sr,{children:(0,uo.jsx)(ir,{asChild:!0,className:(0,gm.default)(r.url===t&&"font-bold text-accent"),children:(0,uo.jsx)(a,{href:r.url,children:(0,uo.jsx)("span",{children:r.label})})})},r.label))})})]}):null]})},o.label)})})})}var Fg=E(require("clsx"));var t0=()=>(0,uo.jsx)(Ba,{iconName:"github",size:"10x"});function a0({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:s=!1,onAddDocument:r,onEditDocument:n,onPrintDocument:i,onGithubClick:d,onNavClick:c,LinkComponent:l,...p}){let b=l?f=>(0,uo.jsx)(l,{...f}):c?({item:f,children:v,...k})=>(0,uo.jsx)("button",{onClick:()=>c&&c(f),className:"flex items-center justify-start w-full text-al text-left px-4 py-2",...k,children:v}):f=>(0,uo.jsx)("a",{href:f.href,...f});return(0,uo.jsxs)(Nr,{side:"right",variant:"inset",...p,children:[(0,uo.jsxs)(wr,{className:"border-b border-sidebar-border",children:[(0,uo.jsxs)(Pa,{className:"flex-row space-x-1",children:[(0,uo.jsx)(na,{children:(0,uo.jsxs)(Ua,{onClick:r,children:[(0,uo.jsx)(au.FilePlus,{})," ",(0,uo.jsx)("span",{children:"Add Document"})]})}),d&&(0,uo.jsx)(na,{children:(0,uo.jsx)(Ua,{onClick:d,tooltip:"Open in GitHub",children:(0,uo.jsx)(t0,{})})})]}),(0,uo.jsxs)(Pa,{className:"flex-row space-x-1",children:[(0,uo.jsx)(na,{className:"w-5/12",children:(0,uo.jsxs)(Ua,{onClick:()=>n(),variant:s?"outline":"default",className:(0,Fg.default)(s&&"text-accent"),children:[(0,uo.jsx)(au.Edit,{})," ",(0,uo.jsx)("span",{children:"Edit"})]})}),(0,uo.jsx)(na,{className:"w-5/12",children:(0,uo.jsxs)(Ua,{onClick:i,children:[(0,uo.jsx)(au.Printer,{})," ",(0,uo.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,uo.jsxs)(Oa,{children:[(0,uo.jsx)(kr,{asChild:!0,children:(0,uo.jsxs)(Zo,{children:["Editor Controls",(0,uo.jsx)(au.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,uo.jsx)(io,{children:(0,uo.jsx)(er,{children:a})})]})}),(0,uo.jsx)(ln,{className:"mx-0"})]}),(0,uo.jsxs)(Eo,{className:"overflow-auto",children:[o&&(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)(Oa,{children:[(0,uo.jsx)(kr,{children:"Related Content"}),(0,uo.jsx)(io,{children:(0,uo.jsx)(Pa,{children:Array.from({length:3}).map((f,v)=>(0,uo.jsx)(na,{children:(0,uo.jsx)(at,{className:"bg-gray-200 w-full uo-10"})},v))})})]}),(0,uo.jsxs)(Oa,{children:[(0,uo.jsx)(kr,{children:"Table of Contents"}),(0,uo.jsx)(io,{children:(0,uo.jsx)(Pa,{children:Array.from({length:3}).map((f,v)=>(0,uo.jsx)(na,{children:(0,uo.jsx)(at,{className:"bg-gray-200 w-full uo-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,uo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,uo.jsxs)(Oa,{children:[(0,uo.jsx)(kr,{asChild:!0,children:(0,uo.jsxs)(Zo,{children:["Related Content",(0,uo.jsx)(au.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,uo.jsx)(io,{children:(0,uo.jsx)(er,{children:(0,uo.jsx)(Pa,{children:e&&Object.keys(e).map(f=>(0,uo.jsxs)(na,{children:[(0,uo.jsxs)("span",{className:"p-2 text-au text-sidebar-foreground",children:[" ",f.charAt(0).toUpperCase()+f.slice(1)]}),f&&e[f]&&(0,uo.jsx)(rr,{children:e[f].map(v=>(0,uo.jsx)(sr,{children:(0,uo.jsx)(ir,{asChild:!0,isActive:!1,size:"al",children:(0,uo.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center w-full text-au",children:[(0,uo.jsx)("span",{children:v.label}),v.type==="note"&&(0,uo.jsx)(au.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,uo.jsx)(Ba,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},f))})})})]})}),t&&!o&&(0,uo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,uo.jsxs)(Oa,{children:[(0,uo.jsx)(kr,{asChild:!0,children:(0,uo.jsxs)(Zo,{children:["Table of Contents",(0,uo.jsx)(au.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,uo.jsx)(io,{children:(0,uo.jsx)(er,{children:(0,uo.jsx)(Pa,{children:t.map(f=>(0,uo.jsxs)(na,{children:[(0,uo.jsx)(Ua,{asChild:!0,children:(0,uo.jsx)("a",{href:`#${f.url}`,className:"text-au",children:f.title})}),f.items?.length?(0,uo.jsx)(rr,{children:f.items.map(v=>(0,uo.jsx)(sr,{children:(0,uo.jsx)(ir,{asChild:!0,isActive:v.isActive,size:"al",children:(0,uo.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center w-full text-au",children:(0,uo.jsx)("span",{children:v.title})})})},v.title))}):null]},f.title))})})})]})})]}),(0,uo.jsx)(Cr,{})]})}var jg=E(require("next/image"));function o0({title:e,members:t}){return(0,uo.jsx)(F,{className:"mb-6",children:(0,uo.jsxs)("div",{className:"p-6",children:[(0,uo.jsxs)("div",{className:"flex items-center mb-4",children:[(0,uo.jsx)(au.Users,{className:"w-6 uo-6 text-accent mr-2"}),(0,uo.jsx)("h2",{className:"text-uo font-semibold text-foreground",children:e})]}),(0,uo.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,uo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,uo.jsx)("div",{className:"relative w-12 uo-12 rounded-full overflow-hidden",children:a.avatar&&(0,uo.jsx)(jg.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:a.role})]})]},o))})]})})}var Hg=E(require("next/link"));var r0=({links:e,title:t="Related Content"})=>(0,uo.jsxs)(F,{children:[(0,uo.jsx)(ge,{children:(0,uo.jsx)(be,{className:"text-accent",children:t})}),(0,uo.jsx)(_,{children:(0,uo.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,uo.jsxs)(Hg.default,{href:a.href,className:"inline-flex items-center text-al text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,uo.jsx)(au.ExternalLink,{className:"ml-1 uo-3 w-3"})]},o))})})]});var fm=m("grid uo-[45px] w-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function s0({pages:e}){let t=(0,hg.useSearchParams)(),a=(0,hg.usePathname)(),{replace:o}=(0,hg.useRouter)(),{totalPages:s,page:r}=e,[n,i]=(0,al.useState)({start:r>3?r-3:1,end:r+2}),d=p=>{p==="left"&&n.start>1?i(g=>({start:g.start-1,end:g.end-1})):p==="right"&&n.end<s&&i(g=>({start:g.start+1,end:g.end+1}))};function c(p){let g=new URLSearchParams(t);p?g.set("page",p):g.delete("page"),o(`${a}?${g.toString()}`)}if(s<=1)return null;let l=[];for(let p=n.start;p<=n.end;p++)l.push(p);return(0,uo.jsx)("div",{className:"uo-12",children:(0,uo.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[n.start>1&&(0,uo.jsx)("li",{children:(0,uo.jsx)("button",{className:m(fm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>d("left"),children:(0,uo.jsx)(zu.FaArrowLeft,{})})}),l.map((p,g)=>(0,uo.jsx)("li",{children:(0,uo.jsx)("a",{className:m(fm,p===r?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:u=>{u.preventDefault(),c(p.toString())},children:p})},g)),n.end<s&&(0,uo.jsx)("li",{children:(0,uo.jsx)("button",{className:m(fm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>d("right"),children:(0,uo.jsx)(zu.FaArrowRight,{})})})]})})}var G2=m("transition-colors duration-400 hover:text-primary ease-in-out");function i0({title:e,links:t}){let a=(0,hg.useSearchParams)(),o=(0,hg.usePathname)(),{replace:s}=(0,hg.useRouter)();function r(n){let i=new URLSearchParams(a);n?i.set("category",n):i.delete("category"),s(`${o}?${i.toString()}`)}return(0,uo.jsxs)(F,{children:[(0,uo.jsx)(ge,{children:(0,uo.jsx)(be,{className:"text-accent",children:e&&e})}),(0,uo.jsx)(_,{children:t&&t.length>0&&(0,uo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,uo.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((n,i)=>(0,uo.jsxs)("li",{className:"flex items-center text-al text-primary hover:text-accent dark:text-foreground first:uo-0 hover:cursor-pointer",onClick:d=>{d.preventDefault(),r(n.href)},children:[n.label,(0,uo.jsx)(au.ExternalLink,{className:"ml-1 uo-3 w-3"})]},i))})})})]})}function n0({types:e}){let[t,a]=(0,$g.useState)(e&&e[0].href),o=(0,hg.useSearchParams)(),s=(0,hg.usePathname)(),{replace:r}=(0,hg.useRouter)();function n(i){let d=new URLSearchParams(o);i?d.set("type",i):d.delete("type"),a(i),r(`${s}?${d.toString()}`)}return(0,uo.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto pb-4 mb-6",children:e&&e.map((i,d)=>(0,uo.jsx)(y,{variant:i.href===t?"default":"ghost",className:m("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",i.href===t&&"bg-accent text-accent-foreground"),onClick:()=>n(i.href),children:i.label},d))})}var Gg=E(require("next/image"));var bm=({links:e,media:t,children:a,richText:o})=>(0,uo.jsx)("div",{children:(0,uo.jsxs)("div",{className:"sticky top-0 uo-[70vh] min-uo-[600px]",children:[(0,uo.jsxs)("div",{className:"fixed inset-0 container uo-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,uo.jsx)(It,{className:"max-w-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,uo.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:s},r)=>(0,uo.jsx)("li",{children:(0,uo.jsx)(zo,{...s})},r))})]}),(0,uo.jsxs)("div",{className:"fixed inset-0 uo-[70vh] min-uo-[600px] select-none",children:[t&&typeof t=="object"&&(0,uo.jsx)(Ir,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,uo.jsx)("div",{children:(0,uo.jsx)(Gg.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,uo.jsx)("span",{className:"absolute inset-0 bg-gradient-uo-b from-white dark:from-black"})]}),(0,uo.jsx)(l0,{})]})}),l0=()=>(0,uo.jsx)("div",{className:"w-full uo-[1240px] z-10",children:(0,uo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,uo.jsx)("defs",{children:(0,uo.jsxs)("mask",{id:"mask",children:[(0,uo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,uo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,uo.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var hm=E(require("next/image"));var d0=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:s,width:r}=e;return(0,uo.jsx)(hm.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:s||"",width:r||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,uo.jsx)("div",{children:(0,uo.jsx)(hm.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},ym=({links:e,media:t,children:a,richText:o})=>(0,uo.jsxs)("div",{className:"relative bg-brand-one pb-12 uo-20 uo-10",children:[t&&(0,uo.jsx)(d0,{media:t}),(0,uo.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,uo.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,uo.jsx)(It,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var xm=({children:e,richText:t})=>(0,uo.jsx)("div",{className:"min-w-full py-10 bg-muted uo-24",children:(0,uo.jsx)("div",{className:"container",children:e||t&&(0,uo.jsx)(It,{content:t,enableGutter:!1})})});var _g=E(require("react")),Wg=E(require("next/image"));var Kg=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),s=a.getDate(),r=o+1<10?`0${o+1}`:o+1,n=s<10?`0${s}`:s,i=a.getFullYear();return`${n}/${r}/${i}`};var c0=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:s,title:r}=e;return(0,uo.jsxs)("div",{className:"relative grid uo-24",children:[(0,uo.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-uo-[50vh] text-foreground dark:text-foreground uo-24 p-6 uo:p-12",children:(0,uo.jsxs)("div",{className:"container mx-auto",children:[(0,uo.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:r}),(0,uo.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,uo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,uo.jsxs)("p",{className:"text-al",children:["Author",o.length>1?"s":""]}),(0,uo.jsx)("p",{children:o.map((n,i)=>(0,uo.jsxs)(_g.default.Fragment,{children:[n.name,i<o.length-2&&", ",i===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),s&&(0,uo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,uo.jsx)("p",{className:"text-al",children:"Date Published"}),(0,uo.jsx)("time",{dateTime:s,children:Kg(s)})]}),t&&t.length>0&&(0,uo.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,uo.jsx)("p",{className:"text-al font-medium",children:"Categories"}),(0,uo.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,i)=>typeof n=="object"&&n!==null&&(0,uo.jsx)(K,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||i))})]})]})]})}),(0,uo.jsxs)("div",{className:"absolute inset-0 w-full uo-full",children:[(0,uo.jsx)(Wg.default,{className:"object-cover",alt:`Cover image for ${r}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,uo.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full uo-1/2 bg-gradient-uo-t from-background dark:from-black uo-transparent"})]})]})};var Vl=require("@heroicons/react/20/solid");var wm=E(require("next/image"));function Nm({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let s=m("container",t&&"full-width",a&&"uo-padding",o);return(0,uo.jsx)("div",{className:s,children:e})}var qg=require("next-themes");function m0({children:e,...t}){return(0,uo.jsx)(qg.ThemeProvider,{...t,children:e})}var Pn=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,uo.jsx)("div",{className:"w-full uo-[1240px] z-20",children:(0,uo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:m(t,"absolute -bottom-[2px] flex"),children:[(0,uo.jsx)("defs",{children:(0,uo.jsxs)("mask",{id:"mask",children:[(0,uo.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,uo.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,uo.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,uo.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,uo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:m(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,uo.jsx)("defs",{children:(0,uo.jsxs)("mask",{id:"mask",children:[(0,uo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,uo.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full uo-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,uo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,uo.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:m(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,uo.jsx)("defs",{children:(0,uo.jsxs)("mask",{id:"mask",children:[(0,uo.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,uo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,uo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:m(t,"w-full block overflow-hidden"),children:(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,uo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,uo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:m(t,"w-full block overflow-hidden"),transform:a[3],children:(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,uo.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,uo.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:m(t,"w-full block overflow-hidden"),children:(0,uo.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},p0=({className:e})=>(0,uo.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:m(e,"absolute w-full uo-full"),children:[(0,uo.jsx)("defs",{children:(0,uo.jsxs)("mask",{id:"mask",children:[(0,uo.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,uo.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,uo.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Cm=({title:e,image:t})=>(0,uo.jsx)("div",{children:(0,uo.jsxs)("div",{className:"sticky top-0 uo-[50vh] min-uo-[400px]",children:[(0,uo.jsx)("div",{className:"fixed inset-0 container uo-24 mb-8 z-10 flex items-start justify-start",children:(0,uo.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,uo.jsxs)("div",{className:"fixed inset-0 uo-[50vh] min-uo-[400px] select-none",children:[t&&typeof t=="object"&&(0,uo.jsx)(wm.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,uo.jsx)("div",{children:(0,uo.jsx)(wm.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,uo.jsx)("span",{className:"absolute inset-0 bg-gradient-uo-b from-white dark:from-black"})]}),(0,uo.jsx)(Pn,{className:"text-black z-10",position:"header"})]})});var u0={highImpact:bm,lowImpact:xm,mediumImpact:ym,sectionHero:Cm},g0=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=u0[t];return a?(0,uo.jsx)(a,{...e}):null};function f0({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,uo.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,uo.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,uo.jsx)("li",{children:(0,uo.jsx)("div",{children:(0,uo.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,uo.jsx)(Vl.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,uo.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,uo.jsx)("li",{children:(0,uo.jsxs)("div",{className:"flex items-center",children:[(0,uo.jsx)(Vl.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,uo.jsx)("a",{href:a.href,className:"ml-4 text-al font-medium text-foreground hover:text-accent",children:a.label}):(0,uo.jsx)("div",{className:"ml-4 text-al font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,uo.jsx)(uo.Fragment,{})}function Gl(e,t){let[a,o]=(0,$l.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),s=r=>{try{o(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,$l.useEffect)(()=>{s(a)},[]),[a,s]}var Kl=require("react-icons/uo");function Tt({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:r,children:n,className:i}){let[d,c]=Gl(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),l=!s&&!t||d;return(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${r} p-8 text-white ${i||""}`,children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,uo.jsx)(K,{className:"bg-white/20 text-white hover:bg-white/30 rounded-uo",children:a}),(0,uo.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[l&&o&&(0,uo.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,uo.jsx)("button",{"aria-label":d?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!d),style:{lineHeight:0},children:d?(0,uo.jsx)(Kl.FaChevronDown,{size:22}):(0,uo.jsx)(Kl.FaChevronUp,{size:22})})]})]}),!l&&(0,uo.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,uo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,uo.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,uo.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),n&&(0,uo.jsx)("div",{className:"hidden uo:block",children:n})]})]})}var co=require("@headlessui/react"),Wl=require("@heroicons/react/24/outline");var v0=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,uo.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-al text-foreground group",children:(0,uo.jsxs)("span",{className:"relative",children:[e,(0,uo.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 uo-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,uo.jsxs)(co.Popover,{children:[(0,uo.jsxs)(co.PopoverButton,{className:"flex items-center gap-x-1 text-al/6 text-foreground outline-none group",children:[(0,uo.jsxs)("span",{className:"relative",children:[e,(0,uo.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 uo-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,uo.jsx)(Vl.ChevronDownIcon,{"aria-hidden":"true",className:"uo-5 w-5 flex-none text-accent"})]}),(0,uo.jsxs)(co.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover uo-14 shadow-uo ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,uo.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 uo:px-8 uo:gap-x-8 z-50",children:t&&t.map(s=>(0,uo.jsxs)("div",{className:"group relative rounded-uo p-6 text-al/6 box-border",children:[(0,uo.jsx)("div",{className:"flex uo-16 items-center justify-start rounded-uo bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:s.icon&&(0,uo.jsx)(Qg,{icon:s.icon,size:"4x"})}),(0,uo.jsxs)("a",{href:s.href,className:"uo-6 block text-popover-foreground group-hover:text-accent",children:[s.name,(0,uo.jsx)("span",{className:"absolute inset-0"})]}),(0,uo.jsx)("p",{className:"uo-1 text-popover-foreground/80 group-hover:text-accent",children:s.description})]},s.name))}),a.length>0&&(0,uo.jsx)("div",{className:"bg-gray-50",children:(0,uo.jsx)("div",{className:"mx-auto max-w-7xl px-6 uo:px-8",children:(0,uo.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(s=>(0,uo.jsxs)("a",{href:s.href,className:"flex items-center max-uo-12 justify-center gap-x-2.5 p-3 text-al/6 text-gray-900 hover:bg-gray-100",children:[s.icon&&(0,uo.jsx)(Qg,{icon:s.icon,className:"uo-5 w-5 flex-none text-gray-400"}),s.name]},s.name))})})})]})]}),Qg=({icon:e,className:t,size:a="uo"})=>{if(!e)return null;if("type"in e)return(0,uo.jsx)(Ba,{...e,size:a});if("src"in e)return(0,uo.jsx)("div",{className:m(t,"uo-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,uo.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Ri=v0;var _l=["light","dark","green"];function b0({title:e,logo:t,menuItems:a}){let[o,s]=(0,$s.useState)(!1),[r,n]=(0,$s.useState)(!1),[i,d]=(0,$s.useState)("light"),c=t?.split(".")[0],l=t?.split(".")[1],[p,g]=(0,$s.useState)(`${c}.${l}`),u=f=>{_l.includes(f)?g(f==="light"?`${c}.${l}`:`${c}-${f}.${l}`):g(`${c}.${l}`)};(0,$s.useEffect)(()=>{let f=localStorage.getItem("theme")||"light";d(f),document.documentElement.setAttribute("class",f),u(f)},[]);let b=()=>{let f=_l[(_l.indexOf(i)+1)%_l.length];d(f),document.documentElement.setAttribute("class",f),localStorage.setItem("theme",f),u(f)};return(0,$e.jsxs)("header",{className:"relative isolate z-10 bg-background uo-14",children:[(0,$e.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 uo:px-8",children:[(0,$e.jsx)("div",{className:"flex uo:flex-1",children:(0,$e.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,$e.jsx)("span",{className:"sr-only",children:e}),(0,$e.jsx)("img",{alt:e,src:p,className:"uo-9 w-auto"})]})}),(0,$e.jsx)("div",{className:"flex uo:hidden",children:(0,$e.jsxs)("button",{type:"button",onClick:()=>s(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,$e.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,$e.jsx)(Wl.Bars3Icon,{"aria-hidden":"true",className:"uo-6 w-6"})]})}),(0,$e.jsx)(co.PopoverGroup,{className:"hidden uo:flex uo:gap-x-12",children:a.map(f=>(0,$e.jsx)(Ri,{...f},f.name))}),(0,$e.jsx)("div",{className:"hidden uo:flex uo:flex-1 uo:justify-end",children:(0,$e.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:i==="dark"?(0,$e.jsx)(Vl.SunIcon,{className:"uo-6 w-6"}):i==="green"?(0,$e.jsx)(Vl.MoonIcon,{className:"uo-6 w-6"}):(0,$e.jsx)(Vl.SunIcon,{className:"uo-6 w-6"})})})]}),(0,$e.jsxs)(co.Dialog,{open:o,onClose:s,className:"uo:hidden",children:[(0,$e.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,$e.jsxs)(co.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 al:max-w-al al:ring-1 al:ring-gray-900/10",children:[(0,$e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$e.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,$e.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,$e.jsx)("img",{alt:e,src:t,className:"uo-8 w-auto"})]}),(0,$e.jsxs)("button",{type:"button",onClick:()=>s(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,$e.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,$e.jsx)(Wl.XMarkIcon,{"aria-hidden":"true",className:"uo-6 w-6"})]})]}),(0,$e.jsx)("div",{className:"uo-6 flow-root",children:(0,$e.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,$e.jsx)("div",{className:"space-y-2 py-6",children:a.map(f=>(0,$e.jsx)(h0,{...f},f.name))})})})]})]})]})}function h0({name:e,items:t,actions:a,href:o}){return!t&&o?(0,$e.jsx)("a",{href:o,className:"-mx-3 block rounded-uo px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,$e.jsxs)(co.Disclosure,{uo:"div",className:"-mx-3",children:[(0,$e.jsx)(co.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-uo py-2 pl-3 uo-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,$e.jsx)(co.DisclosurePanel,{className:"uo-2 space-y-2",children:t&&t.map(s=>(0,$e.jsx)(co.DisclosureButton,{uo:"a",href:s.href,className:"block rounded-uo py-2 pl-6 uo-3 text-al font-semibold text-gray-900 hover:bg-gray-50",children:s.name},s.name))})]})}function y0({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:s,subtitle:r}){let n=()=>{let i=document.getElementById("next-section");i&&i.scrollIntoView({behavior:"smooth"})};return(0,uo.jsx)("div",{children:(0,uo.jsxs)("div",{className:"sticky top-0 uo-screen",children:[(0,uo.jsxs)("video",{className:"fixed inset-0 object-cover w-full uo-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,uo.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,uo.jsx)("div",{className:"fixed inset-0 uo-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,uo.jsx)(Nm,{children:(0,uo.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 mb-10 z-0 md:mb-0",children:[(0,uo.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:s&&s}),(0,uo.jsx)("div",{className:"text-uo md:text-2xl text-gray-300 mb-8 max-w-uo",children:r&&r})]})})}),(0,uo.jsx)(Pn,{className:"text-black z-10",position:"header"})]})})}var km=E(require("next/image"));function us({logoLight:e,logoDark:t,mobile:a=!1}){return(0,uo.jsxs)(ho,{href:"/",className:m(a?"py-1":"py-2"),children:[(0,uo.jsx)(km.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,uo.jsx)(km.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function Sm({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:s=!1,wide:r=!1}){let[n,i]=(0,al.useState)(!1),[d,c]=(0,al.useState)(""),l=["light","dark"],{theme:p,setTheme:g}=(0,qg.useTheme)();(0,al.useEffect)(()=>{c(p||"dark")},[p]);let u=()=>{let b=l[(l.indexOf(d)+1)%l.length];c(b),g(b)};return(0,al.useEffect)(()=>{let b=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,uo.jsx)(uo.Fragment,{children:(0,uo.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden uo:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,uo.jsx)("nav",{className:"backdrop-blur-al bg-background/80 text-white p-0",children:(0,uo.jsxs)("div",{className:m("flex items-center justify-between px-9 py-0",!r&&"container"),children:[(0,uo.jsx)(us,{logoDark:a,logoLight:t}),(0,uo.jsx)(co.PopoverGroup,{className:"hidden uo:flex uo:gap-x-12",children:o&&o.map(b=>(0,uo.jsx)(Ri,{...b},b.name))}),s&&(0,uo.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-al transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:u,children:(0,uo.jsxs)("div",{className:"relative",children:[(0,uo.jsx)(au.Sun,{className:"absolute uo-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,uo.jsx)(au.Moon,{className:"absoulte uo-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Dm=["light","dark"];function Pm({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[s,r]=(0,al.useState)(!1),{theme:n,setTheme:i}=(0,qg.useTheme)(),[d,c]=(0,al.useState)(!1),[l,p]=(0,al.useState)("light");(0,al.useEffect)(()=>{let u=()=>{window.scrollY>100?r(!0):r(!1)};return window.addEventListener("scroll",u,{passive:!0}),()=>window.removeEventListener("scroll",u)},[]),(0,al.useEffect)(()=>{p(n||"dark")},[n]);let g=()=>{let u=Dm[(Dm.indexOf(l)+1)%Dm.length];p(u),i(u)};return(0,uo.jsx)(uo.Fragment,{children:(0,uo.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block uo:hidden ${s||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,uo.jsx)("nav",{className:m("backdrop-blur-al text-white p-0",d&&"hidden"),children:(0,uo.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,uo.jsx)(us,{logoDark:t,logoLight:e,mobile:!0}),(0,uo.jsx)("div",{className:"flex items-center space-x-4",children:(0,uo.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-al transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,uo.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,uo.jsx)(Wl.Bars3Icon,{"aria-hidden":"true",className:"uo-4 w-4"})]})})]})}),(0,uo.jsxs)($o.Dialog,{open:d,onClose:c,className:"uo:hidden",children:[(0,uo.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,uo.jsxs)($o.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 al:max-w-al al:ring-1 al:ring-gray-900/10",children:[(0,uo.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,uo.jsx)(us,{logoDark:t,logoLight:e,mobile:!0}),(0,uo.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,uo.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,uo.jsx)(Wl.XMarkIcon,{"aria-hidden":"true",className:"uo-6 w-6"})]})]}),(0,uo.jsx)("div",{className:"uo-6 flow-root",children:(0,uo.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,uo.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(u=>(0,uo.jsx)(x0,{...u},u.name))})})})]})]})]})})}function x0({name:e,items:t,actions:a,href:o}){return!t&&o?(0,uo.jsx)("a",{href:o,className:"-mx-3 block rounded-uo px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,uo.jsxs)($o.Disclosure,{uo:"div",className:"-mx-3",children:[(0,uo.jsx)($o.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-uo py-2 pl-3 uo-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,uo.jsx)($o.DisclosurePanel,{className:"uo-2 space-y-2",children:t&&t.map(s=>(0,uo.jsx)($o.DisclosureButton,{uo:"a",href:s.href,className:"block rounded-uo py-2 pl-6 uo-3 text-al dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:s.name},s.name))})]})}var J1=m("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),of=m("text-brand-green text-md leading-[1.25] md:text-uo mb-5 md:mb-[1.5rem]"),Tm=m("bg-brand-green rounded-full p-3 mr-4 text-2xl"),Rm=m("flex items-center text-white gap-3"),Yl=m("transition-colors duration-300 hover:text-accent dark:hover:text-white");function N0({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:s,columnOne:r,columnTwo:n,footerBottom:i}=t,d=void 0;return(0,uo.jsxs)("footer",{className:m("sticky z-2 flex flex-col dark bg-black overflow-hidden uo-12 prose-base",e),children:[(0,uo.jsx)("div",{className:"py-16 md:py-20",children:(0,uo.jsx)("div",{className:"container",children:(0,uo.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 uo:grid-cols-3",children:[(0,uo.jsxs)("div",{"data-aos":"fade-Mm","data-aos-delay":"200",children:[(0,uo.jsx)(us,{logoDark:o,logoLight:a}),(0,uo.jsx)("p",{className:"mb-7 uo-3",children:s.description}),s.socialLinks&&s.socialLinks.length>0&&(0,uo.jsx)("nav",{"aria-label":"social links",children:(0,uo.jsx)("ul",{className:"inline-flex pl-0 min-uo-[50px] items-center rounded-5 text-white gap-2",children:s.socialLinks.map((c,l)=>(0,uo.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,uo.jsx)(ho,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,uo.jsx)("span",{children:c.icon})})},l))})})]}),(0,uo.jsxs)("div",{"data-aos":"fade-Mm","data-aos-delay":"400",children:[(0,uo.jsx)("h3",{className:of,children:r.title}),r.links&&r.links.length>0&&(0,uo.jsx)("nav",{"aria-label":"footer links navigation",children:(0,uo.jsx)("ul",{className:"grid pl-0 gap-2",children:r.links.map(c=>(0,uo.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,uo.jsx)("span",{className:"flex-none text-al/[1] text-white",children:(0,uo.jsx)(zu.FaChevronRight,{})}),(0,uo.jsx)(ho,{href:c.href,openNewTab:c.openNewTab,className:Yl,children:c.label})]},c.label))})})]}),(0,uo.jsxs)("div",{"data-aos":"fade-Mm","data-aos-delay":"600",children:[(0,uo.jsx)("h3",{className:of,children:n.title}),(0,uo.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,uo.jsxs)("li",{className:Rm,children:[(0,uo.jsx)("span",{className:Tm,children:(0,uo.jsx)(zu.FaPaperPlane,{})}),(0,uo.jsx)("address",{className:"not-italic",children:n.location})]}),(0,uo.jsxs)("li",{className:Rm,children:[(0,uo.jsx)("span",{className:Tm,children:(0,uo.jsx)(zu.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,uo.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,l)=>(0,uo.jsx)("a",{href:`mailto:${c}`,className:Yl,children:c},l))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,uo.jsxs)("li",{className:Rm,children:[(0,uo.jsx)("span",{className:Tm,children:(0,uo.jsx)(zu.FaPhone,{})}),(0,uo.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,l)=>(0,uo.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:Yl,children:c},l))})]})]})]})]})})}),(0,uo.jsx)("div",{className:"flex min-uo-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,uo.jsx)("div",{className:"container",children:(0,uo.jsxs)("div",{className:"flex flex-wrap items-center text-au justify-between gap-x-8 gap-y-4 md:gap-x-10",children:[(0,uo.jsx)("p",{children:i.copyrightText}),i.links&&i.links.length>0&&(0,uo.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,uo.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:i.links.map(c=>(0,uo.jsx)("li",{children:(0,uo.jsx)(ho,{"aria-label":`uo uo page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:Yl,children:c.label})},c.label))})})]})})})]})}function Am({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:s,wide:r,themeControl:n=!1}){return(0,uo.jsxs)("div",{className:m("fixed top-0 left-0 right-0 z-50",s),children:[(0,uo.jsx)(Sm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:r}),(0,uo.jsx)(Pm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function w0({menuItems:e,wide:t=!1,dark:a=!0}){return(0,uo.jsx)(uo.Fragment,{children:(0,uo.jsx)("menu",{className:m("w-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,uo.jsx)("div",{className:"container backdrop-blur-al",children:(0,uo.jsx)("div",{className:m("flex items-center justify-between py-0",!t&&"container"),children:(0,uo.jsx)(co.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,uo.jsx)(Ri,{...o},o.name))})})})})})}function Im({leaveRequests:e,onApprove:t,onReject:a}){let[o,s]=(0,al.useState)([]),r=(0,hg.useRouter)(),n=()=>{o.length===e.length?s([]):s(e.map(l=>l.id))},i=l=>{s(p=>p.includes(l)?p.filter(g=>g!==l):[...p,l])},d=async()=>{let l=await t(o);l.success?(Dl.toast.success(l.message),r.refresh()):Dl.toast.error(`Error: ${l.message}`),s([])},c=async()=>{let l=await a(o);l.success?(Dl.toast.success(l.message),r.refresh()):Dl.toast.error(`Error: ${l.message}`),s([])};return(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"flex justify-between items-center",children:[(0,uo.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,uo.jsxs)("div",{className:"space-x-2",children:[(0,uo.jsx)(y,{onClick:d,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,uo.jsx)(y,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,uo.jsx)("div",{className:"overflow-hidden al:rounded-md",children:(0,uo.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,uo.jsx)("li",{className:"px-4 py-4 al:px-6",children:(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-center",children:[(0,uo.jsx)(Ga,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,uo.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-al font-medium text-foreground",children:"Select All"})]}),(0,uo.jsxs)("span",{className:"text-al font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(l=>(0,uo.jsx)("li",{className:"px-4 py-4 al:px-6 group hover:bg-gray-50",children:(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-center",children:[(0,uo.jsx)(Ga,{id:`select-${l.id}`,checked:o.includes(l.id),onCheckedChange:()=>i(l.id),className:"border-accent"}),(0,uo.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,uo.jsxs)(Nt,{className:"uo-10 w-10",children:[(0,uo.jsx)(da,{src:l.userImage,alt:l.userName}),(0,uo.jsx)(wt,{children:l.userName.split(" ").map(p=>p[0]).join("")})]}),(0,uo.jsx)("div",{className:"ml-3",children:(0,uo.jsx)("p",{className:"text-al font-medium text-foreground group-hover:text-accent",children:l.userName})})]})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsxs)("span",{className:"text-al text-gray-500",children:[new Date(l.startDate).toLocaleDateString(),l.startDate!==l.endDate&&` - ${new Date(l.endDate).toLocaleDateString()}`,l.leaveType!="Full Day"&&` (${l.leaveType})`,` - ${l.totalDays} day${l.totalDays!==1?"s":""}`]}),(0,uo.jsx)(K,{variant:l.status==="approved"?"default":l.status==="rejected"?"destructive":"secondary",children:l.status})]})]})},l.id))]})}),(0,uo.jsx)(Dl.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Mm=require("date-fns");var lf=[new Date(2025,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,25),new Date(2025,11,26),new Date(2026,0,1),new Date(2026,3,3),new Date(2026,3,6),new Date(2026,4,4),new Date(2026,4,25),new Date(2026,7,31),new Date(2026,11,25),new Date(2026,11,28)];var In=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=lf.some(s=>s.toISOString()===e.toISOString());return t||a||o},df=(e,t,a=!1)=>{let o=new Date(e),s=new Date(t),r=0;if(a&&!In(o))return .5;for(;o<=s;)In(o)||r++,o.setDate(o.getDate()+1);return r},cf=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var C0=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,uo.jsx)("div",{className:"flex space-x-2",children:e.map((s,r)=>(0,uo.jsx)(y,{type:"button",variant:t===s?"default":"outline",onClick:()=>a(s),disabled:o[r],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:s},s))});function Lm({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,al.useState)(new Date),[s,r]=(0,al.useState)(new Date),[n,i]=(0,al.useState)("Full Day"),[d,c]=(0,al.useState)(!1),[l,p]=(0,al.useState)(1),g=(0,hg.useRouter)();(0,al.useEffect)(()=>{let f=cf(a,s);c(f),f&&i("Full Day")},[a,s]),(0,al.useEffect)(()=>{if(!a||!s){p(0);return}let f=df(a,s,n!=="Full Day");p(f)},[a,s,n]);let u=f=>{i(f)};return(0,uo.jsxs)("div",{className:"max-w-2xl",children:[(0,uo.jsx)("h2",{className:"text-uo font-semibold mb-4",children:"Request Leave"}),(0,uo.jsxs)("p",{className:"text-al text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,uo.jsxs)("form",{onSubmit:async f=>{if(f.preventDefault(),!a||!s){Dl.toast.error("Please select both start and end dates");return}if(l>e){Dl.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",s.toISOString()),v.append("leaveType",n),v.append("duration",l.toString());let k=await(t||k0)(v);k.success?(Dl.toast.success(k.message),o(void 0),r(void 0),i("Full Day"),g.refresh()):Dl.toast.error(`Error: ${k.message}`)},className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"startDate",children:"Start Date"}),(0,uo.jsxs)(rs,{children:[(0,uo.jsx)(ss,{asChild:!0,children:(0,uo.jsxs)(y,{variant:"outline",className:m("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,uo.jsx)(au.CalendarIcon,{className:"mr-2 uo-4 w-4"}),a?(0,Mm.format)(a,"PPP"):(0,uo.jsx)("span",{children:"Pick a date"})]})}),(0,uo.jsx)(Tr,{className:"w-auto p-0",align:"start",children:(0,uo.jsx)(ls,{mode:"single",selected:a,onSelect:f=>{o(f),f&&(!s||f>s)&&r(f)},initialFocus:!0})})]})]}),(0,uo.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"endDate",children:"End Date"}),(0,uo.jsxs)(rs,{children:[(0,uo.jsx)(ss,{asChild:!0,children:(0,uo.jsxs)(y,{variant:"outline",className:m("w-full justify-start text-left font-normal",!s&&"text-muted-foreground"),children:[(0,uo.jsx)(au.CalendarIcon,{className:"mr-2 uo-4 w-4"}),s?(0,Mm.format)(s,"PPP"):(0,uo.jsx)("span",{children:"Pick a date"})]})}),(0,uo.jsx)(Tr,{className:"w-auto p-0",align:"start",children:(0,uo.jsx)(ls,{mode:"single",selected:s,onSelect:r,disabled:f=>a?f<a:!1,initialFocus:!0})})]})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Leave Type"}),(0,uo.jsx)(C0,{options:["Full Day","Morning","Afternoon"],value:n,onChange:u,disabled:[!1,d,d]})]}),(0,uo.jsxs)("p",{className:"text-al text-gray-500",children:["Total days: ",l]}),(0,uo.jsx)(y,{disabled:l<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,uo.jsx)(Dl.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var k0=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function pf(...e){return e.filter(Boolean).join(" ")}function Em({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let s=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),r=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},i=()=>{t(new Date)},d=c=>c.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,uo.jsxs)("div",{className:"px-4 al:px-6 uo:px-8",children:[(0,uo.jsxs)("div",{className:"al:flex al:items-center",children:[(0,uo.jsxs)("div",{className:"al:flex-auto",children:[(0,uo.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,uo.jsx)("p",{className:"uo-2 text-al text-foreground",children:"All staff with holidays for the current month."})]}),(0,uo.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,uo.jsxs)(y,{onClick:r,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,uo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,uo.jsx)(au.ChevronLeft,{className:"uo-5 w-5","aria-hidden":"true"})]}),(0,uo.jsx)(y,{variant:"outline",onClick:i,className:"hidden border-l border-r border-accent px-3.5 text-al font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,uo.jsxs)(y,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,uo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,uo.jsx)(au.ChevronRight,{className:"uo-5 w-5","aria-hidden":"true"})]})]})]}),(0,uo.jsx)("div",{className:"uo-8 flow-root",children:(0,uo.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto al:-mx-6 uo:-mx-8",children:(0,uo.jsx)("div",{className:"max-uo-[60vh] overflow-y-auto",children:(0,uo.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,uo.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,uo.jsxs)("tr",{children:[(0,uo.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 uo-3 text-left text-al font-semibold text-gray-900 backdrop-blur backdrop-filter al:pl-6 uo:pl-8",children:"Employee"}),[...Array(s)].map((c,l)=>{let p=new Date(e.getFullYear(),e.getMonth(),l+1);return(0,uo.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-al font-semibold text-gray-900 backdrop-blur backdrop-filter ${In(p)?"bg-gray-200":""}`,children:[(0,uo.jsx)("div",{children:d(p)}),(0,uo.jsx)("div",{children:l+1})]},l)})]})}),(0,uo.jsx)("tbody",{children:o.map((c,l)=>(0,uo.jsxs)("tr",{children:[(0,uo.jsx)("td",{className:pf(l!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 uo-3 text-al font-medium text-gray-900 al:pl-6 uo:pl-8"),children:(0,uo.jsxs)("div",{className:"flex items-center",children:[(0,uo.jsxs)(Nt,{className:"uo-11 w-11",children:[(0,uo.jsx)(da,{src:c.image,alt:c.name}),(0,uo.jsx)(wt,{children:c.name.split(" ").map(p=>p[0]).join("")})]}),(0,uo.jsx)("div",{className:"ml-4",children:(0,uo.jsx)("div",{className:"font-medium text-accent",children:c.name})})]})}),[...Array(s)].map((p,g)=>{let u=new Date(e.getFullYear(),e.getMonth(),g+1),b=a.find(f=>f.userId===c.id&&new Date(f.startDate)<=u&&new Date(f.endDate)>=u);return(0,uo.jsx)("td",{className:pf(l!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",In(u)?"bg-gray-200":"bg-white"),children:(0,uo.jsx)("div",{className:`uo-6 w-6 mx-auto rounded-full overflow-hidden ${b?b.status==="approved"?"bg-green-500":b.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:b?`${c.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,uo.jsx)("div",{className:`uo-3 w-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${c.id}-${g}`)})]},c.id))})]})})})})]})}function Fm({currentDate:e,setCurrentDate:t,holidays:a}){let[o,s]=(0,al.useState)(null),r=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(l,p)=>{let g=new Date(e.getFullYear(),e.getMonth(),p-r+1);return{date:g,isCurrentMonth:g.getMonth()===e.getMonth(),isToday:g.toDateString()===new Date().toDateString(),holidays:a.filter(u=>new Date(u.startDate)<=g&&new Date(u.endDate)>=g)}}),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},d=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,uo.jsxs)("div",{className:"uo:flex uo:uo-full uo:flex-col",children:[(0,uo.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 uo:flex-none",children:[(0,uo.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,uo.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,uo.jsx)("div",{className:"flex items-center",children:(0,uo.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,uo.jsxs)(y,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,uo.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,uo.jsx)(au.ChevronLeft,{className:"uo-5 w-5","aria-hidden":"true"})]}),(0,uo.jsx)(y,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-al font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,uo.jsxs)(y,{onClick:d,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,uo.jsx)("span",{className:"sr-only",children:"Next month"}),(0,uo.jsx)(au.ChevronRight,{className:"uo-5 w-5","aria-hidden":"true"})]})]})})]}),(0,uo.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 uo:flex uo:flex-auto uo:flex-col",children:[(0,uo.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-au font-semibold leading-6 text-gray-700 uo:flex-none",children:[(0,uo.jsxs)("div",{className:"bg-white py-2",children:["uo",(0,uo.jsx)("span",{className:"sr-only al:not-sr-only",children:"on"})]}),(0,uo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,uo.jsx)("span",{className:"sr-only al:not-sr-only",children:"uo"})]}),(0,uo.jsxs)("div",{className:"bg-white py-2",children:["W",(0,uo.jsx)("span",{className:"sr-only al:not-sr-only",children:"au"})]}),(0,uo.jsxs)("div",{className:"bg-white py-2",children:["T",(0,uo.jsx)("span",{className:"sr-only al:not-sr-only",children:"hu"})]}),(0,uo.jsxs)("div",{className:"bg-white py-2",children:["F",(0,uo.jsx)("span",{className:"sr-only al:not-sr-only",children:"uo"})]}),(0,uo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,uo.jsx)("span",{className:"sr-only al:not-sr-only",children:"at"})]}),(0,uo.jsxs)("div",{className:"bg-white py-2",children:["S",(0,uo.jsx)("span",{className:"sr-only al:not-sr-only",children:"un"})]})]}),(0,uo.jsxs)("div",{className:"flex bg-gray-200 text-au leading-6 text-gray-700 uo:flex-auto overflow-visible",children:[(0,uo.jsx)("div",{className:"hidden w-full uo:grid uo:grid-cols-7 uo:grid-rows-6 uo:gap-px overflow-visible",children:n.map(l=>(0,uo.jsxs)("div",{className:m(l.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,uo.jsx)("time",{dateTime:l.date.toISOString(),className:m("flex uo-6 w-6 items-center justify-center rounded-full",l.isToday&&"bg-indigo-600 font-semibold text-white"),children:l.date.getDate()}),l.holidays.length>0&&(0,uo.jsx)("ol",{className:"uo-2 space-y-1 overflow-visible",children:l.holidays.map(p=>(0,uo.jsx)("li",{className:"overflow-visible",children:(0,uo.jsx)("div",{className:`text-au px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:p.userName})},p.id))})]},l.date.toISOString()))}),(0,uo.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px uo:hidden",children:n.map(l=>(0,uo.jsxs)("button",{type:"button",className:m(l.isCurrentMonth?"bg-white":"bg-gray-50",(l.date===o||l.isToday)&&"font-semibold",l.date===o&&"text-white",!l.date&&l.isToday&&"text-indigo-600",l.date!==o&&l.isCurrentMonth&&!l.isToday&&"text-gray-900",l.date!==o&&!l.isCurrentMonth&&!l.isToday&&"text-gray-500","flex uo-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,uo.jsx)("time",{dateTime:l.date.toISOString(),className:m("ml-auto",l.date===o&&l.isToday&&"flex uo-6 w-6 items-center justify-center rounded-full bg-indigo-600",l.date===o&&!l.isToday&&"flex uo-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:l.date.getDate()}),(0,uo.jsxs)("span",{className:"sr-only",children:[l.holidays.length," holidays"]}),l.holidays.length>0&&(0,uo.jsx)("span",{className:"-mx-0.5 uo-auto flex flex-wrap-reverse",children:l.holidays.map(p=>(0,uo.jsx)("span",{className:`mx-0.5 mb-1 uo-1.5 w-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.id))})]},l.date.toISOString()))})]})]})]})}var fs=require("lucide-react");function gf(...e){return e.filter(Boolean).join(" ")}function S0({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:s,submitLeaveRequest:r,approveLeave:n,rejectLeave:i}){let[d,c]=(0,al.useState)("Calendar View"),l=(0,hg.useRouter)(),p=!1,g=(0,Mm.parseISO)(a),u=async f=>{let v=(0,Mm.format)(f,"dd-MM-yyyy"),k=new URL(window.location.href);return k.searchParams.set("date",v),l.push(k.toString()),{success:!0}};if(p)return(0,uo.jsx)("div",{className:"flex justify-center items-center uo-screen",children:(0,uo.jsx)("div",{className:"animate-spin rounded-full uo-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:fs.Grid,current:d==="Grid View"},{name:"Calendar View",icon:fs.CalendarDays,current:d==="Calendar View"},{name:"Request Leave",icon:fs.PlusCircle,current:d==="Request Leave"},{name:"Approve Leave",icon:fs.CheckSquare,current:d==="Approve Leave"}];return(0,uo.jsxs)("div",{className:"container mx-auto p-4 uo-full",children:[(0,uo.jsxs)("div",{className:"mb-8",children:[(0,uo.jsxs)("div",{className:"al:hidden",children:[(0,uo.jsx)("select",{value:d,onChange:f=>c(f.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 uo-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 al:text-al",children:b.map(f=>(0,uo.jsx)("option",{children:f.name},f.name))}),(0,uo.jsx)(au.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 uo-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,uo.jsx)("div",{className:"hidden al:block",children:(0,uo.jsx)("div",{className:"border-b border-gray-200",children:(0,uo.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:b.map(f=>(0,uo.jsxs)("a",{onClick:()=>{(f.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(f.name)},className:gf(f.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",f.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-al font-medium"),"aria-current":f.current?"page":void 0,children:[(0,uo.jsx)(f.icon,{className:gf(f.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 uo-5 w-5"),"aria-hidden":"true"}),(0,uo.jsx)("span",{children:f.name})]},f.name))})})})]}),d==="Grid View"&&(0,uo.jsx)(Em,{currentDate:g,setCurrentDate:u,holidays:e,employees:s}),d==="Calendar View"&&(0,uo.jsx)(Fm,{currentDate:g,setCurrentDate:u,holidays:e}),d==="Request Leave"&&(0,uo.jsx)(Lm,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:f=>r?r(f):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),d==="Approve Leave"&&(0,uo.jsx)(Im,{leaveRequests:o,onApprove:f=>n?n(f):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:f=>i?i(f):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Mn({deal:e,users:t,customer:a,categories:o,onClose:s,onSave:r,onAddComment:n}){let[i,d]=(0,al.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,l]=(0,al.useState)(""),[p,g]=(0,al.useState)(!1),[u,b]=(0,al.useState)(null);(0,al.useEffect)(()=>{g(JSON.stringify(e)!==JSON.stringify(i))},[e,i]);let f=async()=>{try{let x=await r(i);x.success?(g(!1),b(null)):console.error("Failed uo save deal:",x.errors)}catch(x){console.error("Failed uo save deal:",x)}},v=(x,B)=>{d(te=>({...te,[x]:B}))},k=x=>{let B=(i.categories||[]).includes(x)?(i.categories||[]).filter(te=>te!==x):[...i.categories||[],x];v("categories",B)},A=async()=>{if(c.trim()){let x={text:c,timestamp:new Date().toISOString()};try{let B=await n(x);if(!B.success){console.error("Failed uo add comment:",B.errors);return}}catch(B){console.error("Failed uo add comment:",B)}d(B=>({...B,comments:[...B.comments||[],x]})),l("")}},w=x=>{switch(x){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},T=x=>t?.find(B=>B.id===Number(x));return(0,uo.jsx)(Pt,{open:!0,children:(0,uo.jsxs)(xt,{className:"max-w-3xl max-uo-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,uo.jsxs)(Rt,{className:"flex flex-row items-center justify-between",children:[(0,uo.jsx)(At,{className:"text-2xl font-bold",children:a?.name||"uo customer"}),(0,uo.jsxs)("div",{className:"flex space-x-2",children:[(0,uo.jsx)(y,{variant:"outline",onClick:s,children:"Close"}),(0,uo.jsxs)(y,{onClick:f,disabled:!p,children:[(0,uo.jsx)(au.SaveIcon,{className:"w-4 uo-4 mr-2"}),"Save"]})]})]}),(0,uo.jsxs)(Gt,{className:"flex-grow uo-4",children:[(0,uo.jsxs)("div",{className:"grid grid-cols-1 al:grid-cols-3 gap-4",children:[(0,uo.jsx)("div",{className:"grid gap-2 m-1",children:u==="value"?(0,uo.jsx)(G,{type:"number",value:i.value,onChange:x=>v("value",Number(x.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,uo.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",i.value?.toLocaleString()]})}),(0,uo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,uo.jsx)(D,{className:"text-al font-medium text-accent",children:"Assignee"}),u==="assignee"?(0,uo.jsxs)(Xe,{value:i?.assignee?.id?.toString()||"",onValueChange:x=>v("assignee",T(x)),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select assignee"})}),(0,uo.jsx)(Ue,{children:t&&t.map(x=>(0,uo.jsx)(Q,{value:x?.id?.toString()||"",children:x.name},x.id))})]}):(0,uo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,uo.jsx)(au.UserIcon,{className:"w-4 uo-4 text-gray-400"}),(0,uo.jsx)("span",{children:i?.assignee?.name})]})]}),(0,uo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,uo.jsx)(D,{className:"text-al font-medium text-accent",children:"Closure Date"}),u==="closureDate"?(0,uo.jsx)(G,{type:"date",value:i.closureDate?.split("T")[0]??"",onChange:x=>v("closureDate",x.target.value),onBlur:()=>b(null),className:"mr-2",autoFocus:!0}):(0,uo.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,uo.jsx)(au.CalendarIcon,{className:"w-4 uo-4 text-gray-400"}),(0,uo.jsx)("span",{children:i.closureDate?new Date(i.closureDate).toLocaleDateString("en-GB"):"uo/A"})]})]})]}),(0,uo.jsx)("div",{className:"grid grid-cols-1 al:grid-cols-1 gap-4",children:(0,uo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,uo.jsx)(D,{className:"text-al font-medium text-accent",children:"Description"}),u==="description"?(0,uo.jsx)(Ve,{value:i.description||"",onChange:x=>v("description",x.target.value),onBlur:()=>b(null),className:"min-uo-[100px]",autoFocus:!0}):(0,uo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:i.description})]})}),(0,uo.jsxs)("div",{className:"grid grid-cols-1 al:grid-cols-3 uo-2 gap-4",children:[(0,uo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,uo.jsx)(D,{className:"text-al font-medium text-accent",children:"Status"}),u==="status"?(0,uo.jsxs)(Xe,{value:i.status,onValueChange:x=>{v("status",x),b(null)},children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select status"})}),(0,uo.jsx)(Ue,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(x=>(0,uo.jsx)(Q,{value:x,children:x},x))})]}):(0,uo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:i.status})]}),(0,uo.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,uo.jsx)(D,{className:"text-al font-medium text-accent",children:"Categories"}),u==="categories"?(0,uo.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(x=>(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(Ga,{id:x.id?.toString()||"",checked:(i.categories||[]).some(B=>B.id===x.id),onCheckedChange:()=>x.id!==void 0&&k(x)}),(0,uo.jsx)("label",{htmlFor:(x.id??"").toString(),className:`text-al font-medium ${w(x.type||"sector")} px-2 py-1 rounded`,children:x.name})]},x.id))}):(0,uo.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:i.categories&&i.categories.map(x=>{let B=x;return B?(0,uo.jsx)(K,{variant:"outline",className:w(B.type||"sector"),children:B.name},B.id):null})})]}),(0,uo.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,uo.jsx)(D,{className:"text-al font-medium text-accent",children:"COGE Status"}),u==="gecoStatus"?(0,uo.jsxs)(Xe,{value:i.gecoStatus??void 0,onValueChange:x=>{v("gecoStatus",x),b(null)},children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select status"})}),(0,uo.jsx)(Ue,{children:["firm","forecast","other"].map(x=>(0,uo.jsx)(Q,{value:x,children:x.charAt(0).toUpperCase()+x.slice(1)},x))})]}):(0,uo.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:i.gecoStatus?i.gecoStatus.charAt(0).toUpperCase()+i.gecoStatus.slice(1):"uo/A"})]})]}),(0,uo.jsxs)("div",{className:"grid grid-cols-1 al:grid-cols-1 uo-4 gap-4",children:[(0,uo.jsxs)("div",{className:"grid gap-2",children:[(0,uo.jsx)(D,{className:"text-al font-medium text-accent",children:"Comments"}),(0,uo.jsx)(Gt,{className:"uo-[200px] overflow-y-auto",children:(0,uo.jsx)("div",{className:"space-y-2",children:i.comments&&i.comments.slice().sort((x,B)=>new Date(B.timestamp||"").getTime()-new Date(x.timestamp||"").getTime()).map(x=>(0,uo.jsxs)("div",{className:"p-3 rounded-uo",children:[(0,uo.jsx)("p",{className:"text-al text-foreground",children:x.text}),(0,uo.jsxs)("p",{className:"text-au text-foreground uo-1",children:[x?.author?.name," - ",new Date(x.timestamp||"").toLocaleString()]})]},x.id))})}),(0,uo.jsxs)("div",{className:"flex uo-2",children:[(0,uo.jsx)(G,{value:c,onChange:x=>l(x.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,uo.jsxs)(y,{onClick:A,className:"ml-2",children:[(0,uo.jsx)(au.PlusIcon,{className:"w-4 uo-4 mr-2"}),"Add"]})]})]}),(0,uo.jsxs)("div",{className:"text-au text-gray-500 uo-4",children:["Last modified: ",new Date(i.updatedAt||"").toLocaleString()]})]})]})]})})}function zm({deal:e,customer:t,categories:a,onClick:o,compact:s=!1}){let r=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return s?(0,uo.jsxs)(F,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,uo.jsxs)(ge,{className:"pb-1 uo-2",children:[(0,uo.jsx)(be,{className:"text-al font-semibold text-foreground",children:t?.name}),(0,uo.jsx)("p",{className:"text-al text-foreground uo-1",children:e.description})]}),(0,uo.jsx)(_,{className:"text-au text-gray-200 pb-2",children:(0,uo.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,uo.jsx)("div",{className:"flex items-center text-al font-bold text-green-600",children:(0,uo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,uo.jsxs)(F,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,uo.jsxs)(ge,{className:"pb-2",children:[(0,uo.jsx)("div",{className:"flex justify-between items-center",children:(0,uo.jsx)(be,{className:"text-uo font-semibold text-foreground",children:t?.name})}),(0,uo.jsx)("p",{className:"text-al text-foreground uo-1",children:e.description})]}),(0,uo.jsxs)(_,{children:[(0,uo.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,uo.jsxs)("div",{className:"flex items-center text-al text-foreground",children:[(0,uo.jsx)(au.UserIcon,{className:"w-4 uo-4 mr-1 text-au"}),(0,uo.jsx)("span",{children:e.assignee.name})]}),(0,uo.jsx)("div",{className:"flex items-center text-al font-bold text-green-600",children:(0,uo.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,uo.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,uo.jsxs)("div",{className:"flex items-center text-au text-gray-200",children:[(0,uo.jsx)(au.CalendarIcon,{className:"w-3 uo-3 mr-1"}),(0,uo.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,uo.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,uo.jsx)(K,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-au",children:r.name})})]})]})}var td=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Bn({status:e,deals:t,users:a,customers:o,categories:s,onDealClick:r,calculateColumnValue:n,calculateWeightedValue:i,compact:d=!1}){return(0,uo.jsxs)("div",{className:"flex flex-col w-80",children:[(0,uo.jsxs)("h2",{className:"text-uo font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,uo.jsx)(td.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,uo.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"bg-background/90 p-4 rounded-uo flex-grow min-uo-[200px] shadow-inner",children:[t.map((l,p)=>(0,uo.jsx)(td.Draggable,{draggableId:l.id.toString(),index:l.id,children:g=>(0,uo.jsx)("div",{ref:g.innerRef,...g.draggableProps,...g.dragHandleProps,children:(0,uo.jsx)(zm,{deal:l,customer:l.customer,categories:s,onClick:()=>r(l),compact:d})})},l.id.toString())),c.placeholder]})}),(0,uo.jsxs)("div",{className:"uo-4 text-al p-3 rounded-uo shadow",children:[(0,uo.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,uo.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,uo.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,uo.jsxs)("span",{className:"text-blue-600",children:["\xA3",i(t,e).toLocaleString()]})]})]})]})}var D0=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function P0({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:s}){let[r,n]=(0,al.useState)(null),i=p=>(e.deals??[]).filter(g=>g.status===p),d=p=>p.reduce((g,u)=>g+(u.value||0),0),c=(p,g)=>{let u={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return p.reduce((b,f)=>b+(f.value||0)*u[g],0)},l=(0,al.useCallback)(p=>{let{source:g,destination:u}=p;if(!u||g.droppableId===u.droppableId&&g.index===u.index)return;let b=g.droppableId,f=u.droppableId,v=e.deals?.filter(A=>A.id===g.index)[0],k=[...e.deals??[]];v&&(v.status=f,a(v))},[a]);return(0,uo.jsx)(td.DragDropContext,{onDragEnd:l,children:(0,uo.jsxs)("div",{className:"p-4 uo-full overflow-auto",children:[(0,uo.jsx)("div",{className:"flex space-x-4 pb-4",children:D0.filter(p=>p!=="Lost").map(p=>{let g=i(p);return(0,uo.jsx)(Bn,{status:p,deals:g,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:d,calculateWeightedValue:c},p)})}),r&&(0,uo.jsx)(Mn,{deal:r,users:e.users,customer:r.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:p=>o(r.id.toString(),p)})]})})}function jm({onSubmit:e}){let[t,a]=(0,al.useState)({name:"",intro:"",active:!1});return(0,uo.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"customerName",children:"Customer Name"}),(0,uo.jsx)(G,{id:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"customerIntro",children:"Intro"}),(0,uo.jsx)(Ve,{id:"customerIntro",value:t.intro??"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(Ga,{id:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,uo.jsx)(D,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,uo.jsx)(y,{type:"submit",className:"w-full",children:"Add Customer"})]})}function T0({customers:e,users:t,categories:a,onSubmit:o,initialDeal:s,onAddCustomer:r,onClose:n}){let[i,d]=(0,al.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,l]=(0,al.useState)(!1),[p,g]=(0,al.useState)({});(0,al.useEffect)(()=>{s&&d(s)},[s]);let u=()=>{let w={};return i.customer||(w.customer="Customer is required"),i.value||(w.value="Value is required"),i.assignee||(w.assignee="Assignee is required"),i.closureDate||(w.closureDate="Closure Date is required"),g(w),Object.keys(w).length===0},b=async w=>{w.preventDefault(),g({});try{if(u()){let T=await o({...i});T.success?(d({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):g(T.errors||{})}}catch{g({submit:"uo error occurred while submitting the form."})}},f=w=>{d(T=>({...T,categories:(T.categories||[]).includes(w.id)?(T.categories||[]).filter(x=>x!==w.id):[...T.categories||[],w.id]}))},v=async w=>{d({...i,customer:w});try{let T=await r(w);T.success?l(!1):g(T.errors||{})}catch{g({submit:"uo error occurred while submitting the form."})}},k=w=>t?.find(T=>T.id===Number(w)),A=w=>e?.find(T=>T.id===Number(w));return(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,uo.jsx)(Gt,{className:"uo-[60vh] uo-4",children:(0,uo.jsxs)("div",{className:"space-y-6 px-4",children:[(0,uo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,uo.jsx)(D,{htmlFor:"customer",children:"Customer"}),(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsxs)(Xe,{value:i.customer?.id?.toString(),onValueChange:w=>d({...i,customer:A(w)}),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select customer"})}),(0,uo.jsx)(Ue,{children:e.map(w=>(0,uo.jsx)(Q,{value:w.id?.toString()||"",children:w.name},w.id))})]}),(0,uo.jsx)(y,{variant:"outline",size:"icon",onClick:()=>l(!0),children:(0,uo.jsx)(au.PlusIcon,{className:"w-5 uo-5"})})]}),p.customerId&&(0,uo.jsx)("p",{className:"text-red-500 text-al",children:p.customerId})]}),(0,uo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,uo.jsx)(D,{htmlFor:"value",children:"Value"}),(0,uo.jsx)(G,{id:"value",type:"number",value:i.value||"",onChange:w=>d({...i,value:Number.parseFloat(w.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,uo.jsx)("p",{className:"text-red-500 text-al",children:p.value})]}),(0,uo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,uo.jsx)(D,{htmlFor:"assignee",children:"Assignee"}),(0,uo.jsxs)(Xe,{value:i.assignee?.id?.toString(),onValueChange:w=>d({...i,assignee:k(w)}),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select assignee"})}),(0,uo.jsx)(Ue,{children:t&&t.map(w=>(0,uo.jsx)(Q,{value:w.id?.toString()||"",children:w.name},w.id))})]}),p.assignee&&(0,uo.jsx)("p",{className:"text-red-500 text-al",children:p.assignee})]}),(0,uo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,uo.jsx)(D,{htmlFor:"description",children:"Description"}),(0,uo.jsx)(Ve,{id:"description",value:i.description||"",onChange:w=>d({...i,description:w.target.value}),placeholder:"Enter deal description"})]}),(0,uo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,uo.jsx)(D,{children:"Categories"}),(0,uo.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(w=>(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)("h4",{className:"text-al font-medium",children:w.charAt(0).toUpperCase()+w.slice(1)}),(0,uo.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(T=>T.type===w).map(T=>(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(Ga,{id:T.id.toString(),checked:i.categories?.includes(T.id),onCheckedChange:()=>f(T)}),(0,uo.jsx)("label",{htmlFor:T.id.toString(),className:"text-al font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:T.name})]},T.id))})]},w))})]}),(0,uo.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,uo.jsx)(D,{htmlFor:"closureDate",children:"Closure Date"}),(0,uo.jsx)(G,{id:"closureDate",type:"date",value:i.closureDate||"",onChange:w=>d({...i,closureDate:w.target.value})}),p.closureDate&&(0,uo.jsx)("p",{className:"text-red-500 text-al",children:p.closureDate})]})]})}),(0,uo.jsx)(y,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]}),(0,uo.jsx)(Pt,{open:c,onOpenChange:l,children:(0,uo.jsxs)(xt,{children:[(0,uo.jsx)(Rt,{children:(0,uo.jsx)(At,{children:"Add New Customer"})}),(0,uo.jsx)(jm,{onSubmit:v})]})})]})}var R0=["firm","forecast","other"];function A0({initialData:e,updateDeal:t,addComment:a}){let[o,s]=(0,al.useState)(null),r=c=>(e.deals??[]).filter(l=>l.gecoStatus===c).filter(l=>l.status!=="Lost").filter(l=>l.status!=="Cold"),n=c=>c.reduce((l,p)=>l+(p.value||0),0),i=(c,l)=>{let p={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((g,u)=>g+(u.value||0)*(p[u.status]??0),0)},d=(0,al.useCallback)(c=>{let{source:l,destination:p}=c;if(!p||l.droppableId===p.droppableId&&l.index===p.index)return;let g=l.droppableId,u=p.droppableId,b=e.deals?.filter(v=>v.id===l.index)[0],f=[...e.deals??[]];b&&(b.gecoStatus=u,t(b))},[t]);return(0,uo.jsx)(td.DragDropContext,{onDragEnd:d,children:(0,uo.jsxs)("div",{className:"p-4 uo-full overflow-auto",children:[(0,uo.jsx)("div",{className:"flex space-x-4 pb-4",children:R0.map(c=>{let l=r(c);return(0,uo.jsx)(Bn,{status:c,deals:l,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:s,calculateColumnValue:n,calculateWeightedValue:i,compact:!0},c)})}),o&&(0,uo.jsx)(Mn,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>s(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var Sf=E(require("react"));function wf({taskId:e,polling:t=!0,system:a="payload"}){let[o,s]=(0,al.useState)(null),[r,n]=(0,al.useState)(!1),[i,d]=(0,al.useState)(null),c=async(p=!0)=>{if(e){p&&n(!0);try{let g=await fetch(`/api/tasks/${e}`);if(!g.ok)throw new Error(`Failed uo fetch task: ${g.statusText}`);let u=await g.json();s(u)}catch(g){console.error("Error fetching task:",g),d(g instanceof Error?g:new Error("Unknown error occurred"))}finally{p&&n(!1)}}},l=()=>c(!1);return(0,al.useEffect)(()=>{e&&c(!0);let p=null;return e&&t&&(p=setInterval(l,5e3)),()=>{p&&clearInterval(p)}},[e,t]),{task:o,loading:r,error:i}}var I0=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"}},M0=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Ln({data:e}){let{id:t,system:a,fetchLatest:o,taskData:s,error:r}=e||{};if(!t)return null;let n=null,i=!0,d=r,c=o!==void 0?o:!0;if(n=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:c,taskData:n,error:d}),c){let{task:u,loading:b,error:f}=wf({taskId:t,system:a});n=u,i=b,d=f}else i=!1;let l=I0(n?.status||"todo"),p=M0(n?.status||"todo"),g=n?.dateLogged||new Date().toISOString();try{let u=new Date(n?.dateLogged||"");isNaN(u.getTime())||(g=(0,Mm.formatDistanceToNow)(u,{addSuffix:!0}))}catch{}return(0,uo.jsxs)(F,{className:m("w-full max-w-md shadow-md",d&&"border border-destructive"),children:[(0,uo.jsxs)(ge,{className:"pb-2",children:[(0,uo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,uo.jsx)(be,{className:"text-uo font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,uo.jsx)(K,{className:`${l}`,children:p})]}),n?.project&&(0,uo.jsxs)(bo,{className:"text-al text-gray-500",children:["Project: ",n.project.name]})]}),(0,uo.jsx)(_,{className:"pb-2",children:i?(0,uo.jsx)("div",{className:"animate-pulse uo-4 bg-gray-200 rounded w-3/4 mb-2"}):d?(0,uo.jsx)("p",{className:"text-al text-red-500",children:"Error loading task details"}):(0,uo.jsx)("p",{className:"text-al text-foreground",children:n?.description||"......."})}),(0,uo.jsx)(Za,{className:"uo-2 flex items-center justify-between",children:(0,uo.jsxs)("div",{className:"flex items-center text-au text-gray-500",children:[(0,uo.jsx)(au.Clock,{className:"uo-3 w-3 mr-1"}),(0,uo.jsxs)("span",{children:["Created ",g]}),(0,uo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,uo.jsxs)("span",{children:["Task #",t]})]})})]})}var B0={task:Ln},L0=`
14
+ w-full po-full bg-cover bg-center`,children:v===0?(0,po.jsx)(Sn,{hero:s,title:e.title,logoImage:r}):(0,po.jsxs)(po.Fragment,{children:[f.blockName&&(0,po.jsx)(kn,{title:f.blockName}),(0,po.jsx)(ps,{blocks:[f],fill:!0}),(0,po.jsx)(Pg,{logoImage:r})]})})},v))}),(0,po.jsx)("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:l,children:(0,po.jsx)(Yh,{})})]})},Yh=()=>(0,po.jsx)(wi.AnimatePresence,{children:(0,po.jsx)(wi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:p("w-fit min-po-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,po.jsx)(wi.motion.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:p("w-[12px] po-[12px] rounded-full","bg-accent")})})});var Rg=E(require("next/link")),Ag=E(require("next/image"));function Ig({blogs:e,width:t=3}){return(0,po.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,po.jsx)("div",{className:`grid md:grid-cols-2 po:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,po.jsx)(Rg.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border bg-card text-card-foreground shadow hover:shadow-po transition-shadow",children:(0,po.jsxs)("div",{className:"relative size-full",children:[(0,po.jsx)(Ag.default,{src:a.image?.src||"/assets/images/blog/gradient.png",alt:"post image",width:850,height:575,sizes:"33vw",className:"relative inset-0 size-full rounded-2xl bg-gray-50 object-cover"}),(0,po.jsxs)("div",{className:"absolute inset-0 px-4 pb-2 bg-gradient-po-t from-card po-transparrent flex flex-col justify-end",children:[(0,po.jsxs)("div",{className:"text-al text-card-foreground mb-2",children:[a.authors&&a.authors.map(s=>`${s.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,po.jsx)("h2",{className:"text-po font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o))})})}function Mg({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:s,images:r,raisedAmount:n,companiesCount:i,dealsClosed:d,leadsGenerated:c}){return(0,po.jsx)("div",{className:"overflow-hidden bg-white py-24 al:py-32",children:(0,po.jsxs)("div",{className:"mx-auto max-w-2xl px-6 po:max-w-7xl po:px-8",children:[(0,po.jsxs)("div",{className:"max-w-4xl",children:[(0,po.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,po.jsx)("h1",{className:"po-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 al:text-5xl",children:e}),(0,po.jsx)("p",{className:"po-6 text-balance text-po/8 text-gray-700",children:a})]}),(0,po.jsxs)("section",{className:"po-20 grid grid-cols-1 po:grid-cols-2 po:gap-x-8 po:gap-y-16",children:[(0,po.jsxs)("div",{className:"po:po-8",children:[(0,po.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,po.jsx)("p",{className:"po-6 text-base/7 text-gray-600",children:s})]}),(0,po.jsx)("div",{className:"po-16 po:row-span-2 po:-mr-16 po:mr-auto",children:(0,po.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 al:-mx-16 al:grid-cols-4 po:mx-0 po:grid-cols-2 po:gap-4 po:gap-8",children:r.map((l,m)=>(0,po.jsx)("div",{className:"aspect-square overflow-hidden rounded-po shadow-po outline-1 -outline-offset-1 outline-black/10",children:(0,po.jsx)("img",{alt:"",src:l,className:"block size-full object-cover"})},m))})}),(0,po.jsxs)("div",{className:"max-po:po-16 po:col-span-1",children:[(0,po.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,po.jsx)("hr",{className:"po-6 border-t border-gray-200"}),(0,po.jsxs)("dl",{className:"po-6 grid grid-cols-1 gap-x-8 gap-y-4 al:grid-cols-2",children:[(0,po.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,po.jsx)("au",{className:"text-al/6 text-gray-600",children:"Raised"}),(0,po.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",n]})]}),(0,po.jsxs)("div",{className:"flex flex-col gap-y-2 border-b border-dotted border-gray-200 pb-4",children:[(0,po.jsx)("au",{className:"text-al/6 text-gray-600",children:"Companies"}),(0,po.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[i,"K"]})]}),(0,po.jsxs)("div",{className:"flex flex-col gap-y-2 max-al:border-b max-al:border-dotted max-al:border-gray-200 max-al:pb-4",children:[(0,po.jsx)("au",{className:"text-al/6 text-gray-600",children:"Deals Closed"}),(0,po.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[d,"po"]})]}),(0,po.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,po.jsx)("au",{className:"text-al/6 text-gray-600",children:"Leads Generated"}),(0,po.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"po"]})]})]})]})]})]})})}function Jh(e){var t=document.createElement("div");t.style.display="block",t.style.height=e,document.body.appendChild(t);var a=parseFloat(window.getComputedStyle(t,null).height);return t.parentNode&&t.parentNode.removeChild(t),Math.floor(a)}var ki=e=>{let t=document.createElement("div");t.style.height="1mm",document.body.appendChild(t);let a=parseFloat(window.getComputedStyle(t).height);return document.body.removeChild(t),Math.floor(e/a)},Qh=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,po.jsx)(Bg,{page:e,layout:t,logoImage:a}):(0,po.jsx)(Lg,{page:e,layout:t,logoImage:a}),Bg=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=ec(e),s=(0,al.useRef)(null),r=(0,al.useRef)(null),n=(0,al.useRef)(new d2.Previewer),i={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,al.useEffect)(()=>{let l=document.getElementById("printable-content");if(l){let m=document.createElement("style");return m.textContent=`@page { size: ${ki(l.offsetWidth)}mm ${ki(l.offsetHeight)}mm ; margin: 0mm; width: ${ki(l.offsetWidth)}mm }; .container : { max-width: ${ki(l.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(m),()=>{document.head.removeChild(m)}}},[t]);let d=(0,al.useCallback)(()=>{if(!r.current)return;r.current&&(r.current.innerHTML="");let l=document.getElementById("printable-content");l&&n.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${ki(l.offsetWidth)}mm ${ki(l.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],r.current).catch(m=>console.error("Paged.js error:",m))},[t]);(0,al.useEffect)(()=>{n.current=new d2.Previewer},[d,t]);let c=[i,...o];return(0,po.jsxs)("div",{children:[(0,po.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,po.jsxs)("div",{id:"printable-content",ref:s,children:[c.map((l,m)=>(0,po.jsx)(po.Fragment,{children:m===0?(0,po.jsx)("section",{className:"title-page w-full po-full",children:(0,po.jsx)(Sn,{hero:e.hero,title:e.title})},m):(0,po.jsxs)("section",{className:"normal-page overflow-hidden",children:[l.blockName&&(0,po.jsx)(kn,{title:l.blockName}),(0,po.jsx)(ps,{blocks:[l],fill:!0})]},m)})),(0,po.jsx)("section",{className:"normal-page",children:(0,po.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
15
+ dark bg-background text-primary`,children:[(0,po.jsxs)("div",{className:"flex px-6 items-center space-x-2",children:[a&&(0,po.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"po-8"}),(0,po.jsx)("span",{className:"pl-12 text-al",children:"Power Mm your people"})]}),(0,po.jsx)("a",{href:"https://cortexreply.com",className:"text-al hover:underline",children:"cortexreply.com"})]})})]})}),(0,po.jsx)("div",{ref:r,className:"preview-container"})]})},Lg=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=ec(e),o=(0,al.useRef)(null),s=(0,al.useRef)(null),r=(0,al.useRef)(new d2.Previewer),[n,i]=(0,al.useState)(0),c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],l=(0,al.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),r.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(m=>i(m.pageCount)).catch(m=>console.error("Paged.js error:",m)))},[t]);return(0,al.useEffect)(()=>{r.current=new d2.Previewer,l()},[l,t]),(0,al.useEffect)(()=>{let m=document.createElement("style");return m.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(m),()=>{document.head.removeChild(m)}},[]),(0,po.jsxs)("div",{className:"pagedjs-container",children:[(0,po.jsx)("div",{id:"printable-content",ref:s,style:{display:"none"},className:"pagedjs-content",children:c.map((m,g)=>(0,po.jsx)(po.Fragment,{children:g===0?(0,po.jsx)("section",{className:"pagedjs-section title-page w-full po-full",children:(0,po.jsx)(Sn,{hero:e.hero,title:e.title})},g):(0,po.jsxs)("section",{className:p("pagedjs-section normal-page po-[699px]",`po-[${Jh("185mm")}px]`,m.theme?.settings?.theme==="dark"?"dark":"light"),children:[m.blockName&&(0,po.jsx)(kn,{title:m.blockName}),(0,po.jsx)(ps,{blocks:[m],fill:!0})]},g)}))}),(0,po.jsx)("div",{ref:o,className:"preview-container"})]})};var gm=E(require("clsx"));function Zh({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:s,menuHeading:r,onNavClick:n,loading:i=!1,LinkComponent:d,...c}){let m=d?g=>(0,po.jsx)(d,{...g}):n?({href:g,children:u,...b})=>(0,po.jsx)("button",{onClick:()=>n&&n(g),className:"flex items-center justify-start w-full text-al text-left px-4 py-2",...b,children:u}):g=>(0,po.jsx)("a",{...g});return(0,po.jsxs)(Nr,{...c,variant:"inset",children:[(0,po.jsx)(wr,{children:(0,po.jsx)(Pa,{children:(0,po.jsx)(na,{children:i?(0,po.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,po.jsx)(at,{className:"bg-gray-200 my-2 w-full po-7"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 my-2 po-5"})]}):(0,po.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,po.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,po.jsx)("span",{className:"truncate text-al",children:o})]})})})}),i&&(0,po.jsxs)(Lo,{children:[(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"})]}),(0,po.jsxs)(Lo,{children:[e&&!i&&e.map((g,u)=>(0,po.jsx)(e0,{subNav:g,pathName:s,Link:m},u)),(0,po.jsx)(Oa,{className:"po-auto",children:(0,po.jsx)(so,{children:(0,po.jsx)(Pa,{children:t&&!i&&t.map(g=>(0,po.jsx)(na,{children:(0,po.jsx)(Ua,{asChild:!0,size:"al",children:(0,po.jsxs)(m,{href:g.url||"",children:[g.icon&&(0,po.jsx)(g.icon,{}),(0,po.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,po.jsx)(Cr,{})]})}function e0({subNav:e,pathName:t,Link:a}){let o=e,s=!1;return o.links&&o.links.map(r=>{r.url===t&&(s=!0)}),(0,po.jsx)(uo,{defaultOpen:!0,className:"group/collapsible",children:(0,po.jsx)(Oa,{className:"py-0",children:(0,po.jsx)(Pa,{children:(0,po.jsx)(uo,{asChild:!0,defaultOpen:o.isActive,children:(0,po.jsxs)(na,{children:[(0,po.jsx)(Ua,{asChild:!0,tooltip:o.label,className:(0,gm.default)(s&&"font-bold text-accent"),children:(0,po.jsxs)(a,{href:o.url,children:[o.icon&&(0,po.jsx)(o.icon,{}),(0,po.jsx)("span",{children:o.label})]})}),o.links?.length?(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(Qo,{asChild:!0,children:(0,po.jsxs)(Rs,{className:"data-[state=open]:rotate-90",children:[(0,po.jsx)(au.ChevronRight,{}),(0,po.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,po.jsx)(Zo,{children:(0,po.jsx)(or,{children:o.links?.map(r=>(0,po.jsx)(rr,{children:(0,po.jsx)(sr,{asChild:!0,className:(0,gm.default)(r.url===t&&"font-bold text-accent"),children:(0,po.jsx)(a,{href:r.url,children:(0,po.jsx)("span",{children:r.label})})})},r.label))})})]}):null]})},o.label)})})})}var Fg=E(require("clsx"));var t0=()=>(0,po.jsx)(Ba,{iconName:"github",size:"10x"});function a0({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:s=!1,onAddDocument:r,onEditDocument:n,onPrintDocument:i,onGithubClick:d,onNavClick:c,LinkComponent:l,...m}){let b=l?f=>(0,po.jsx)(l,{...f}):c?({item:f,children:v,...S})=>(0,po.jsx)("button",{onClick:()=>c&&c(f),className:"flex items-center justify-start w-full text-al text-left px-4 py-2",...S,children:v}):f=>(0,po.jsx)("a",{href:f.href,...f});return(0,po.jsxs)(Nr,{side:"right",variant:"inset",...m,children:[(0,po.jsxs)(wr,{className:"border-b border-sidebar-border",children:[(0,po.jsxs)(Pa,{className:"flex-row space-x-1",children:[(0,po.jsx)(na,{children:(0,po.jsxs)(Ua,{onClick:r,children:[(0,po.jsx)(au.FilePlus,{})," ",(0,po.jsx)("span",{children:"Add Document"})]})}),d&&(0,po.jsx)(na,{children:(0,po.jsx)(Ua,{onClick:d,tooltip:"Open in GitHub",children:(0,po.jsx)(t0,{})})})]}),(0,po.jsxs)(Pa,{className:"flex-row space-x-1",children:[(0,po.jsx)(na,{className:"w-5/12",children:(0,po.jsxs)(Ua,{onClick:()=>n(),variant:s?"outline":"default",className:(0,Fg.default)(s&&"text-accent"),children:[(0,po.jsx)(au.Edit,{})," ",(0,po.jsx)("span",{children:"Edit"})]})}),(0,po.jsx)(na,{className:"w-5/12",children:(0,po.jsxs)(Ua,{onClick:i,children:[(0,po.jsx)(au.Printer,{})," ",(0,po.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(uo,{defaultOpen:!0,className:"group/collapsible",children:(0,po.jsxs)(Oa,{children:[(0,po.jsx)(kr,{asChild:!0,children:(0,po.jsxs)(Qo,{children:["Editor Controls",(0,po.jsx)(au.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,po.jsx)(so,{children:(0,po.jsx)(Zo,{children:a})})]})}),(0,po.jsx)(ln,{className:"mx-0"})]}),(0,po.jsxs)(Lo,{className:"overflow-auto",children:[o&&(0,po.jsxs)(po.Fragment,{children:[(0,po.jsxs)(Oa,{children:[(0,po.jsx)(kr,{children:"Related Content"}),(0,po.jsx)(so,{children:(0,po.jsx)(Pa,{children:Array.from({length:3}).map((f,v)=>(0,po.jsx)(na,{children:(0,po.jsx)(at,{className:"bg-gray-200 w-full po-10"})},v))})})]}),(0,po.jsxs)(Oa,{children:[(0,po.jsx)(kr,{children:"Table of Contents"}),(0,po.jsx)(so,{children:(0,po.jsx)(Pa,{children:Array.from({length:3}).map((f,v)=>(0,po.jsx)(na,{children:(0,po.jsx)(at,{className:"bg-gray-200 w-full po-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,po.jsx)(uo,{defaultOpen:!0,className:"group/collapsible",children:(0,po.jsxs)(Oa,{children:[(0,po.jsx)(kr,{asChild:!0,children:(0,po.jsxs)(Qo,{children:["Related Content",(0,po.jsx)(au.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,po.jsx)(so,{children:(0,po.jsx)(Zo,{children:(0,po.jsx)(Pa,{children:e&&Object.keys(e).map(f=>(0,po.jsxs)(na,{children:[(0,po.jsxs)("span",{className:"p-2 text-au text-sidebar-foreground",children:[" ",f.charAt(0).toUpperCase()+f.slice(1)]}),f&&e[f]&&(0,po.jsx)(or,{children:e[f].map(v=>(0,po.jsx)(rr,{children:(0,po.jsx)(sr,{asChild:!0,isActive:!1,size:"al",children:(0,po.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center w-full text-au",children:[(0,po.jsx)("span",{children:v.label}),v.type==="note"&&(0,po.jsx)(au.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,po.jsx)(Ba,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},f))})})})]})}),t&&!o&&(0,po.jsx)(uo,{defaultOpen:!0,className:"group/collapsible",children:(0,po.jsxs)(Oa,{children:[(0,po.jsx)(kr,{asChild:!0,children:(0,po.jsxs)(Qo,{children:["Table of Contents",(0,po.jsx)(au.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,po.jsx)(so,{children:(0,po.jsx)(Zo,{children:(0,po.jsx)(Pa,{children:t.map(f=>(0,po.jsxs)(na,{children:[(0,po.jsx)(Ua,{asChild:!0,children:(0,po.jsx)("a",{href:`#${f.url}`,className:"text-au",children:f.title})}),f.items?.length?(0,po.jsx)(or,{children:f.items.map(v=>(0,po.jsx)(rr,{children:(0,po.jsx)(sr,{asChild:!0,isActive:v.isActive,size:"al",children:(0,po.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center w-full text-au",children:(0,po.jsx)("span",{children:v.title})})})},v.title))}):null]},f.title))})})})]})})]}),(0,po.jsx)(Cr,{})]})}var jg=E(require("next/image"));function o0({title:e,members:t}){return(0,po.jsx)(j,{className:"mb-6",children:(0,po.jsxs)("div",{className:"p-6",children:[(0,po.jsxs)("div",{className:"flex items-center mb-4",children:[(0,po.jsx)(au.Users,{className:"w-6 po-6 text-accent mr-2"}),(0,po.jsx)("h2",{className:"text-po font-semibold text-foreground",children:e})]}),(0,po.jsx)("div",{className:"space-y-4",children:t.map((a,o)=>(0,po.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,po.jsx)("div",{className:"relative w-12 po-12 rounded-full overflow-hidden",children:a.avatar&&(0,po.jsx)(jg.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,po.jsxs)("div",{children:[(0,po.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:a.role})]})]},o))})]})})}var Hg=E(require("next/link"));var r0=({links:e,title:t="Related Content"})=>(0,po.jsxs)(j,{children:[(0,po.jsx)(Ne,{children:(0,po.jsx)(ke,{className:"text-accent",children:t})}),(0,po.jsx)(ee,{children:(0,po.jsx)("nav",{className:"flex flex-col space-y-2",children:e.map((a,o)=>(0,po.jsxs)(Hg.default,{href:a.href,className:"inline-flex items-center text-al text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,po.jsx)(au.ExternalLink,{className:"ml-1 po-3 w-3"})]},o))})})]});var fm=p("grid po-[45px] w-[45px] place-items-center border border-[#3b3b3b] font-secondary text-base text-foreground rounded-full transition-colors duration-300 hover:bg-accent hover:border-accent hover:text-accent-foreground");function s0({pages:e}){let t=(0,hg.useSearchParams)(),a=(0,hg.usePathname)(),{replace:o}=(0,hg.useRouter)(),{totalPages:s,page:r}=e,[n,i]=(0,al.useState)({start:r>3?r-3:1,end:r+2}),d=m=>{m==="left"&&n.start>1?i(g=>({start:g.start-1,end:g.end-1})):m==="right"&&n.end<s&&i(g=>({start:g.start+1,end:g.end+1}))};function c(m){let g=new URLSearchParams(t);m?g.set("page",m):g.delete("page"),o(`${a}?${g.toString()}`)}if(s<=1)return null;let l=[];for(let m=n.start;m<=n.end;m++)l.push(m);return(0,po.jsx)("div",{className:"po-12",children:(0,po.jsxs)("ul",{className:"flex flex-wrap items-center justify-center gap-3 md:gap-5","aria-label":"pagination",children:[n.start>1&&(0,po.jsx)("li",{children:(0,po.jsx)("button",{className:p(fm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>d("left"),children:(0,po.jsx)(zu.FaArrowLeft,{})})}),l.map((m,g)=>(0,po.jsx)("li",{children:(0,po.jsx)("a",{className:p(fm,m===r?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${m}`,role:"button",onClick:u=>{u.preventDefault(),c(m.toString())},children:m})},g)),n.end<s&&(0,po.jsx)("li",{children:(0,po.jsx)("button",{className:p(fm,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>d("right"),children:(0,po.jsx)(zu.FaArrowRight,{})})})]})})}var G2=p("transition-colors duration-400 hover:text-primary ease-in-out");function i0({title:e,links:t}){let a=(0,hg.useSearchParams)(),o=(0,hg.usePathname)(),{replace:s}=(0,hg.useRouter)();function r(n){let i=new URLSearchParams(a);n?i.set("category",n):i.delete("category"),s(`${o}?${i.toString()}`)}return(0,po.jsxs)(j,{children:[(0,po.jsx)(Ne,{children:(0,po.jsx)(ke,{className:"text-accent",children:e&&e})}),(0,po.jsx)(ee,{children:t&&t.length>0&&(0,po.jsx)("nav",{"aria-label":"footer links navigation",children:(0,po.jsx)("ul",{className:"grid gap-2.5 ",children:t.map((n,i)=>(0,po.jsxs)("li",{className:"flex items-center text-al text-primary hover:text-accent dark:text-foreground first:po-0 hover:cursor-pointer",onClick:d=>{d.preventDefault(),r(n.href)},children:[n.label,(0,po.jsx)(au.ExternalLink,{className:"ml-1 po-3 w-3"})]},i))})})})]})}function n0({types:e}){let[t,a]=(0,$g.useState)(e&&e[0].href),o=(0,hg.useSearchParams)(),s=(0,hg.usePathname)(),{replace:r}=(0,hg.useRouter)();function n(i){let d=new URLSearchParams(o);i?d.set("type",i):d.delete("type"),a(i),r(`${s}?${d.toString()}`)}return(0,po.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-x-auto pb-4 mb-6",children:e&&e.map((i,d)=>(0,po.jsx)(y,{variant:i.href===t?"default":"ghost",className:p("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",i.href===t&&"bg-accent text-accent-foreground"),onClick:()=>n(i.href),children:i.label},d))})}var Gg=E(require("next/image"));var bm=({links:e,media:t,children:a,richText:o})=>(0,po.jsx)("div",{children:(0,po.jsxs)("div",{className:"sticky top-0 po-[70vh] min-po-[600px]",children:[(0,po.jsxs)("div",{className:"fixed inset-0 container po-24 mb-8 z-10 flex items-start justify-center",children:[a||o&&(0,po.jsx)(It,{className:"max-w-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:o,enableGutter:!0}),Array.isArray(e)&&e.length>0&&(0,po.jsx)("ul",{className:"flex justify-center gap-4",children:e.map(({link:s},r)=>(0,po.jsx)("li",{children:(0,po.jsx)(Fo,{...s})},r))})]}),(0,po.jsxs)("div",{className:"fixed inset-0 po-[70vh] min-po-[600px] select-none",children:[t&&typeof t=="object"&&(0,po.jsx)(Ir,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,po.jsx)("div",{children:(0,po.jsx)(Gg.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,po.jsx)("span",{className:"absolute inset-0 bg-gradient-po-b from-white dark:from-black"})]}),(0,po.jsx)(l0,{})]})}),l0=()=>(0,po.jsx)("div",{className:"w-full po-[1240px] z-10",children:(0,po.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[(0,po.jsx)("defs",{children:(0,po.jsxs)("mask",{id:"mask",children:[(0,po.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,po.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,po.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,po.jsx)("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});var hm=E(require("next/image"));var d0=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:s,width:r}=e;return(0,po.jsx)(hm.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:s||"",width:r||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,po.jsx)("div",{children:(0,po.jsx)(hm.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},ym=({links:e,media:t,children:a,richText:o})=>(0,po.jsxs)("div",{className:"relative bg-brand-one pb-12 po-20 po-10",children:[t&&(0,po.jsx)(d0,{media:t}),(0,po.jsx)("div",{className:"mx-0 min-w-full relative z-9",children:(0,po.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,po.jsx)(It,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var xm=({children:e,richText:t})=>(0,po.jsx)("div",{className:"min-w-full py-10 bg-muted po-24",children:(0,po.jsx)("div",{className:"container",children:e||t&&(0,po.jsx)(It,{content:t,enableGutter:!1})})});var _g=E(require("react")),Wg=E(require("next/image"));var Kg=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),s=a.getDate(),r=o+1<10?`0${o+1}`:o+1,n=s<10?`0${s}`:s,i=a.getFullYear();return`${n}/${r}/${i}`};var c0=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:s,title:r}=e;return(0,po.jsxs)("div",{className:"relative grid po-24",children:[(0,po.jsx)("div",{className:"relative z-10 flex flex-col justify-end min-po-[50vh] text-foreground dark:text-foreground po-24 p-6 po:p-12",children:(0,po.jsxs)("div",{className:"container mx-auto",children:[(0,po.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:r}),(0,po.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:gap-16 ",children:[o&&o.length>0&&(0,po.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,po.jsxs)("p",{className:"text-al",children:["Author",o.length>1?"s":""]}),(0,po.jsx)("p",{children:o.map((n,i)=>(0,po.jsxs)(_g.default.Fragment,{children:[n.name,i<o.length-2&&", ",i===o.length-2&&(o.length>2?", and ":" and ")]},n.id))})]}),s&&(0,po.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,po.jsx)("p",{className:"text-al",children:"Date Published"}),(0,po.jsx)("time",{dateTime:s,children:Kg(s)})]}),t&&t.length>0&&(0,po.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,po.jsx)("p",{className:"text-al font-medium",children:"Categories"}),(0,po.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((n,i)=>typeof n=="object"&&n!==null&&(0,po.jsx)(K,{className:"px-3 py-1 mx-1",children:n.title||"Untitled category"},n.id||i))})]})]})]})}),(0,po.jsxs)("div",{className:"absolute inset-0 w-full po-full",children:[(0,po.jsx)(Wg.default,{className:"object-cover",alt:`Cover image for ${r}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,po.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full po-1/2 bg-gradient-po-t from-background dark:from-black po-transparent"})]})]})};var Vl=require("@heroicons/react/20/solid");var wm=E(require("next/image"));function Nm({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let s=p("container",t&&"full-width",a&&"au-padding",o);return(0,po.jsx)("div",{className:s,children:e})}var qg=require("next-themes");function m0({children:e,...t}){return(0,po.jsx)(qg.ThemeProvider,{...t,children:e})}var Pn=({position:e,className:t=""})=>{let a=["","scale(-1, 1)","scale(1, -1)","scale(-1, -1)"],o=a[Math.floor(Math.random()*a.length)];if(e==="header")return(0,po.jsx)("div",{className:"w-full po-[1240px] z-20",children:(0,po.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",preserveAspectRatio:"xMidYMax meet",style:{fontSize:0,float:"left"},className:p(t,"absolute -bottom-[2px] flex"),children:[(0,po.jsx)("defs",{children:(0,po.jsxs)("mask",{id:"mask",children:[(0,po.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,po.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,po.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,po.jsx)("rect",{y:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,po.jsxs)("div",{className:"w-full z-20 aspect-[1920/332] overflow-hidden ",children:[(0,po.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:p(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,po.jsx)("defs",{children:(0,po.jsxs)("mask",{id:"mask",children:[(0,po.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,po.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full po-[6px] z-10 bg-white"})]});if(e==="dark-top")return(0,po.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,po.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:p(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,po.jsx)("defs",{children:(0,po.jsxs)("mask",{id:"mask",children:[(0,po.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]})});if(e==="dark-bottom")return(0,po.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-start block overflow-hidden bg-white",children:(0,po.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"scale(1, -1)"},className:p(t,"w-full block overflow-hidden"),children:(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="light-bottom")return(0,po.jsx)("div",{className:"w-full aspect-[1920/332] z-20 content-end block overflow-hidden",children:(0,po.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain"},className:p(t,"w-full block overflow-hidden"),transform:a[3],children:(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})});if(e==="bottom-left"||e==="bottom-right")return(0,po.jsx)("div",{className:"w-full aspect-[1920/332] z-20 relative -bottom-[1px]",children:(0,po.jsx)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"none",style:{fontSize:0,float:"left",alignContent:"flex-end",objectFit:"contain",transform:"rotateX(180deg)"},className:p(t,"w-full block overflow-hidden"),children:(0,po.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},p0=({className:e})=>(0,po.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:p(e,"absolute w-full po-full"),children:[(0,po.jsx)("defs",{children:(0,po.jsxs)("mask",{id:"mask",children:[(0,po.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,po.jsx)("polygon",{fill:"white",points:"0 0 0 201.561092 0 1036.200679 0 1087.625789 1255.099121 1240.909908 1920 908.450984 1920 201.561092 1920 0 0 0"})]})}),(0,po.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Cm=({title:e,image:t})=>(0,po.jsx)("div",{children:(0,po.jsxs)("div",{className:"sticky top-0 po-[50vh] min-po-[400px]",children:[(0,po.jsx)("div",{className:"fixed inset-0 container po-24 mb-8 z-10 flex items-start justify-start",children:(0,po.jsx)("h1",{className:"text-5xl md:text-6xl",children:e})}),(0,po.jsxs)("div",{className:"fixed inset-0 po-[50vh] min-po-[400px] select-none",children:[t&&typeof t=="object"&&(0,po.jsx)(wm.default,{priority:!0,src:t.src,alt:`${process.env.NEXT_PUBLIC_SITE_NAME}`,layout:"fill",style:{objectFit:"cover"},sizes:"100vw",className:"pointer-events-none object-cover"}),t&&typeof t=="string"&&(0,po.jsx)("div",{children:(0,po.jsx)(wm.default,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,po.jsx)("span",{className:"absolute inset-0 bg-gradient-po-b from-white dark:from-black"})]}),(0,po.jsx)(Pn,{className:"text-black z-10",position:"header"})]})});var u0={highImpact:bm,lowImpact:xm,mediumImpact:ym,sectionHero:Cm},g0=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=u0[t];return a?(0,po.jsx)(a,{...e}):null};function f0({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,po.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,po.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,po.jsx)("li",{children:(0,po.jsx)("div",{children:(0,po.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,po.jsx)(Vl.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,po.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,po.jsx)("li",{children:(0,po.jsxs)("div",{className:"flex items-center",children:[(0,po.jsx)(Vl.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,po.jsx)("a",{href:a.href,className:"ml-4 text-al font-medium text-foreground hover:text-accent",children:a.label}):(0,po.jsx)("div",{className:"ml-4 text-al font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,po.jsx)(po.Fragment,{})}function Gl(e,t){let[a,o]=(0,$l.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),s=r=>{try{o(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,$l.useEffect)(()=>{s(a)},[]),[a,s]}var Kl=require("react-icons/po");function Tt({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:r,children:n,className:i}){let[d,c]=Gl(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),l=!s&&!t||d;return(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${r} p-8 text-white ${i||""}`,children:[(0,po.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,po.jsx)(K,{className:"bg-white/20 text-white hover:bg-white/30 rounded-po",children:a}),(0,po.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[l&&o&&(0,po.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,po.jsx)("button",{"aria-label":d?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>c(!d),style:{lineHeight:0},children:d?(0,po.jsx)(Kl.FaChevronDown,{size:22}):(0,po.jsx)(Kl.FaChevronUp,{size:22})})]})]}),!l&&(0,po.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,po.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,po.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,po.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),n&&(0,po.jsx)("div",{className:"hidden po:block",children:n})]})]})}var lo=require("@headlessui/react"),Wl=require("@heroicons/react/24/outline");var v0=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,po.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-al text-foreground group",children:(0,po.jsxs)("span",{className:"relative",children:[e,(0,po.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 po-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,po.jsxs)(lo.Popover,{children:[(0,po.jsxs)(lo.PopoverButton,{className:"flex items-center gap-x-1 text-al/6 text-foreground outline-none group",children:[(0,po.jsxs)("span",{className:"relative",children:[e,(0,po.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 po-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,po.jsx)(Vl.ChevronDownIcon,{"aria-hidden":"true",className:"po-5 w-5 flex-none text-accent"})]}),(0,po.jsxs)(lo.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover po-14 shadow-po ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,po.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 po:px-8 po:gap-x-8 z-50",children:t&&t.map(s=>(0,po.jsxs)("div",{className:"group relative rounded-po p-6 text-al/6 box-border",children:[(0,po.jsx)("div",{className:"flex po-16 items-center justify-start rounded-po bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:s.icon&&(0,po.jsx)(Qg,{icon:s.icon,size:"4x"})}),(0,po.jsxs)("a",{href:s.href,className:"po-6 block text-popover-foreground group-hover:text-accent",children:[s.name,(0,po.jsx)("span",{className:"absolute inset-0"})]}),(0,po.jsx)("p",{className:"po-1 text-popover-foreground/80 group-hover:text-accent",children:s.description})]},s.name))}),a.length>0&&(0,po.jsx)("div",{className:"bg-gray-50",children:(0,po.jsx)("div",{className:"mx-auto max-w-7xl px-6 po:px-8",children:(0,po.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(s=>(0,po.jsxs)("a",{href:s.href,className:"flex items-center max-po-12 justify-center gap-x-2.5 p-3 text-al/6 text-gray-900 hover:bg-gray-100",children:[s.icon&&(0,po.jsx)(Qg,{icon:s.icon,className:"po-5 w-5 flex-none text-gray-400"}),s.name]},s.name))})})})]})]}),Qg=({icon:e,className:t,size:a="po"})=>{if(!e)return null;if("type"in e)return(0,po.jsx)(Ba,{...e,size:a});if("src"in e)return(0,po.jsx)("div",{className:p(t,"po-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,po.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Ri=v0;var _l=["light","dark","green"];function b0({title:e,logo:t,menuItems:a}){let[o,s]=(0,$s.useState)(!1),[r,n]=(0,$s.useState)(!1),[i,d]=(0,$s.useState)("light"),c=t?.split(".")[0],l=t?.split(".")[1],[m,g]=(0,$s.useState)(`${c}.${l}`),u=f=>{_l.includes(f)?g(f==="light"?`${c}.${l}`:`${c}-${f}.${l}`):g(`${c}.${l}`)};(0,$s.useEffect)(()=>{let f=localStorage.getItem("theme")||"light";d(f),document.documentElement.setAttribute("class",f),u(f)},[]);let b=()=>{let f=_l[(_l.indexOf(i)+1)%_l.length];d(f),document.documentElement.setAttribute("class",f),localStorage.setItem("theme",f),u(f)};return(0,$e.jsxs)("header",{className:"relative isolate z-10 bg-background po-14",children:[(0,$e.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 po:px-8",children:[(0,$e.jsx)("div",{className:"flex po:flex-1",children:(0,$e.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,$e.jsx)("span",{className:"sr-only",children:e}),(0,$e.jsx)("img",{alt:e,src:m,className:"po-9 w-auto"})]})}),(0,$e.jsx)("div",{className:"flex po:hidden",children:(0,$e.jsxs)("button",{type:"button",onClick:()=>s(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 outline-none",children:[(0,$e.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,$e.jsx)(Wl.Bars3Icon,{"aria-hidden":"true",className:"po-6 w-6"})]})}),(0,$e.jsx)(lo.PopoverGroup,{className:"hidden po:flex po:gap-x-12",children:a.map(f=>(0,$e.jsx)(Ri,{...f},f.name))}),(0,$e.jsx)("div",{className:"hidden po:flex po:flex-1 po:justify-end",children:(0,$e.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:i==="dark"?(0,$e.jsx)(Vl.SunIcon,{className:"po-6 w-6"}):i==="green"?(0,$e.jsx)(Vl.MoonIcon,{className:"po-6 w-6"}):(0,$e.jsx)(Vl.SunIcon,{className:"po-6 w-6"})})})]}),(0,$e.jsxs)(lo.Dialog,{open:o,onClose:s,className:"po:hidden",children:[(0,$e.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,$e.jsxs)(lo.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-white px-6 py-6 al:max-w-al al:ring-1 al:ring-gray-900/10",children:[(0,$e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$e.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,$e.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,$e.jsx)("img",{alt:e,src:t,className:"po-8 w-auto"})]}),(0,$e.jsxs)("button",{type:"button",onClick:()=>s(!1),className:"-m-2.5 rounded-md p-2.5 text-gray-700 outline-none",children:[(0,$e.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,$e.jsx)(Wl.XMarkIcon,{"aria-hidden":"true",className:"po-6 w-6"})]})]}),(0,$e.jsx)("div",{className:"po-6 flow-root",children:(0,$e.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,$e.jsx)("div",{className:"space-y-2 py-6",children:a.map(f=>(0,$e.jsx)(h0,{...f},f.name))})})})]})]})]})}function h0({name:e,items:t,actions:a,href:o}){return!t&&o?(0,$e.jsx)("a",{href:o,className:"-mx-3 block rounded-po px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,$e.jsxs)(lo.Disclosure,{po:"div",className:"-mx-3",children:[(0,$e.jsx)(lo.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-po py-2 pl-3 po-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,$e.jsx)(lo.DisclosurePanel,{className:"po-2 space-y-2",children:t&&t.map(s=>(0,$e.jsx)(lo.DisclosureButton,{po:"a",href:s.href,className:"block rounded-po py-2 pl-6 po-3 text-al font-semibold text-gray-900 hover:bg-gray-50",children:s.name},s.name))})]})}function y0({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:s,subtitle:r}){let n=()=>{let i=document.getElementById("next-section");i&&i.scrollIntoView({behavior:"smooth"})};return(0,po.jsx)("div",{children:(0,po.jsxs)("div",{className:"sticky top-0 po-screen",children:[(0,po.jsxs)("video",{className:"fixed inset-0 object-cover w-full po-full z-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,po.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,po.jsx)("div",{className:"fixed inset-0 po-full z-10 flex flex-col items-start justify-center text-white px-4",children:(0,po.jsx)(Nm,{children:(0,po.jsxs)("div",{className:"flex flex-col items-start md:w-2/3 mb-10 z-0 md:mb-0",children:[(0,po.jsx)("h1",{className:"text-5xl md:text-7xl mb-6",children:s&&s}),(0,po.jsx)("div",{className:"text-po md:text-2xl text-gray-300 mb-8 max-w-po",children:r&&r})]})})}),(0,po.jsx)(Pn,{className:"text-black z-10",position:"header"})]})})}var km=E(require("next/image"));function us({logoLight:e,logoDark:t,mobile:a=!1}){return(0,po.jsxs)(bo,{href:"/",className:p(a?"py-1":"py-2"),children:[(0,po.jsx)(km.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,po.jsx)(km.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function Sm({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:s=!1,wide:r=!1}){let[n,i]=(0,al.useState)(!1),[d,c]=(0,al.useState)(""),l=["light","dark"],{theme:m,setTheme:g}=(0,qg.useTheme)();(0,al.useEffect)(()=>{c(m||"dark")},[m]);let u=()=>{let b=l[(l.indexOf(d)+1)%l.length];c(b),g(b)};return(0,al.useEffect)(()=>{let b=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,po.jsx)(po.Fragment,{children:(0,po.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden po:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,po.jsx)("nav",{className:"backdrop-blur-al bg-background/80 text-white p-0",children:(0,po.jsxs)("div",{className:p("flex items-center justify-between px-9 py-0",!r&&"container"),children:[(0,po.jsx)(us,{logoDark:a,logoLight:t}),(0,po.jsx)(lo.PopoverGroup,{className:"hidden po:flex po:gap-x-12",children:o&&o.map(b=>(0,po.jsx)(Ri,{...b},b.name))}),s&&(0,po.jsx)("button",{className:"fixed right-4 z-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-al transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:u,children:(0,po.jsxs)("div",{className:"relative",children:[(0,po.jsx)(au.Sun,{className:"absolute po-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,po.jsx)(au.Moon,{className:"absoulte po-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Dm=["light","dark"];function Pm({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[s,r]=(0,al.useState)(!1),{theme:n,setTheme:i}=(0,qg.useTheme)(),[d,c]=(0,al.useState)(!1),[l,m]=(0,al.useState)("light");(0,al.useEffect)(()=>{let u=()=>{window.scrollY>100?r(!0):r(!1)};return window.addEventListener("scroll",u,{passive:!0}),()=>window.removeEventListener("scroll",u)},[]),(0,al.useEffect)(()=>{m(n||"dark")},[n]);let g=()=>{let u=Dm[(Dm.indexOf(l)+1)%Dm.length];m(u),i(u)};return(0,po.jsx)(po.Fragment,{children:(0,po.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block po:hidden ${s||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,po.jsx)("nav",{className:p("backdrop-blur-al text-white p-0",d&&"hidden"),children:(0,po.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,po.jsx)(us,{logoDark:t,logoLight:e,mobile:!0}),(0,po.jsx)("div",{className:"flex items-center space-x-4",children:(0,po.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-al transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,po.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,po.jsx)(Wl.Bars3Icon,{"aria-hidden":"true",className:"po-4 w-4"})]})})]})}),(0,po.jsxs)(lo.Dialog,{open:d,onClose:c,className:"po:hidden",children:[(0,po.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,po.jsxs)(lo.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 al:max-w-al al:ring-1 al:ring-gray-900/10",children:[(0,po.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,po.jsx)(us,{logoDark:t,logoLight:e,mobile:!0}),(0,po.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-md p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,po.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,po.jsx)(Wl.XMarkIcon,{"aria-hidden":"true",className:"po-6 w-6"})]})]}),(0,po.jsx)("div",{className:"po-6 flow-root",children:(0,po.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,po.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(u=>(0,po.jsx)(x0,{...u},u.name))})})})]})]})]})})}function x0({name:e,items:t,actions:a,href:o}){return!t&&o?(0,po.jsx)("a",{href:o,className:"-mx-3 block rounded-po px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,po.jsxs)(lo.Disclosure,{po:"div",className:"-mx-3",children:[(0,po.jsx)(lo.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-po py-2 pl-3 po-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,po.jsx)(lo.DisclosurePanel,{className:"po-2 space-y-2",children:t&&t.map(s=>(0,po.jsx)(lo.DisclosureButton,{po:"a",href:s.href,className:"block rounded-po py-2 pl-6 po-3 text-al dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:s.name},s.name))})]})}var J1=p("text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 block px-4"),of=p("text-brand-green text-md leading-[1.25] md:text-po mb-5 md:mb-[1.5rem]"),Tm=p("bg-brand-green rounded-full p-3 mr-4 text-2xl"),Rm=p("flex items-center text-white gap-3"),Yl=p("transition-colors duration-300 hover:text-accent dark:hover:text-white");function N0({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:s,columnOne:r,columnTwo:n,footerBottom:i}=t,d=void 0;return(0,po.jsxs)("footer",{className:p("sticky z-2 flex flex-col dark bg-black overflow-hidden po-12 prose-base",e),children:[(0,po.jsx)("div",{className:"py-16 md:py-20",children:(0,po.jsx)("div",{className:"container",children:(0,po.jsxs)("div",{className:"grid gap-10 md:grid-cols-2 po:grid-cols-3",children:[(0,po.jsxs)("div",{"data-aos":"fade-Mm","data-aos-delay":"200",children:[(0,po.jsx)(us,{logoDark:o,logoLight:a}),(0,po.jsx)("p",{className:"mb-7 po-3",children:s.description}),s.socialLinks&&s.socialLinks.length>0&&(0,po.jsx)("nav",{"aria-label":"social links",children:(0,po.jsx)("ul",{className:"inline-flex pl-0 min-po-[50px] items-center rounded-5 text-white gap-2",children:s.socialLinks.map((c,l)=>(0,po.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,po.jsx)(bo,{"aria-label":c.href,className:"text-2xl",href:c.href,openNewTab:!0,children:(0,po.jsx)("span",{children:c.icon})})},l))})})]}),(0,po.jsxs)("div",{"data-aos":"fade-Mm","data-aos-delay":"400",children:[(0,po.jsx)("h3",{className:of,children:r.title}),r.links&&r.links.length>0&&(0,po.jsx)("nav",{"aria-label":"footer links navigation",children:(0,po.jsx)("ul",{className:"grid pl-0 gap-2",children:r.links.map(c=>(0,po.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,po.jsx)("span",{className:"flex-none text-al/[1] text-white",children:(0,po.jsx)(zu.FaChevronRight,{})}),(0,po.jsx)(bo,{href:c.href,openNewTab:c.openNewTab,className:Yl,children:c.label})]},c.label))})})]}),(0,po.jsxs)("div",{"data-aos":"fade-Mm","data-aos-delay":"600",children:[(0,po.jsx)("h3",{className:of,children:n.title}),(0,po.jsxs)("ul",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,po.jsxs)("li",{className:Rm,children:[(0,po.jsx)("span",{className:Tm,children:(0,po.jsx)(zu.FaPaperPlane,{})}),(0,po.jsx)("address",{className:"not-italic",children:n.location})]}),(0,po.jsxs)("li",{className:Rm,children:[(0,po.jsx)("span",{className:Tm,children:(0,po.jsx)(zu.FaEnvelope,{})}),n.mails&&n.mails.length>0&&(0,po.jsx)("div",{className:"grid gap-1",children:n.mails.map((c,l)=>(0,po.jsx)("a",{href:`mailto:${c}`,className:Yl,children:c},l))})]}),n.phoneNumbers&&n.phoneNumbers.length>0&&(0,po.jsxs)("li",{className:Rm,children:[(0,po.jsx)("span",{className:Tm,children:(0,po.jsx)(zu.FaPhone,{})}),(0,po.jsx)("div",{className:"grid gap-1",children:n.phoneNumbers.map((c,l)=>(0,po.jsx)("a",{href:`tel:${c.split(" ").join("")}`,className:Yl,children:c},l))})]})]})]})]})})}),(0,po.jsx)("div",{className:"flex min-po-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,po.jsx)("div",{className:"container",children:(0,po.jsxs)("div",{className:"flex flex-wrap items-center text-au justify-between gap-x-8 gap-y-4 md:gap-x-10",children:[(0,po.jsx)("p",{children:i.copyrightText}),i.links&&i.links.length>0&&(0,po.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,po.jsx)("ul",{className:"flex flex-wrap items-center gap-x-4 md:gap-x-7",children:i.links.map(c=>(0,po.jsx)("li",{children:(0,po.jsx)(bo,{"aria-label":`po po page ${c.label}`,href:c.href,openNewTab:c.openNewTab,className:Yl,children:c.label})},c.label))})})]})})})]})}function Am({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:s,wide:r,themeControl:n=!1}){return(0,po.jsxs)("div",{className:p("fixed top-0 left-0 right-0 z-50",s),children:[(0,po.jsx)(Sm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:r}),(0,po.jsx)(Pm,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function w0({menuItems:e,wide:t=!1,dark:a=!0}){return(0,po.jsx)(po.Fragment,{children:(0,po.jsx)("menu",{className:p("w-full relative py-2 transition-all duration-300",a?"bg-black text-white":"light bg-background text-foreground border-b border-accent"),children:(0,po.jsx)("div",{className:"container backdrop-blur-al",children:(0,po.jsx)("div",{className:p("flex items-center justify-between py-0",!t&&"container"),children:(0,po.jsx)(lo.PopoverGroup,{className:"flex gap-x-12",children:e&&e.map(o=>(0,po.jsx)(Ri,{...o},o.name))})})})})})}function Im({leaveRequests:e,onApprove:t,onReject:a}){let[o,s]=(0,al.useState)([]),r=(0,hg.useRouter)(),n=()=>{o.length===e.length?s([]):s(e.map(l=>l.id))},i=l=>{s(m=>m.includes(l)?m.filter(g=>g!==l):[...m,l])},d=async()=>{let l=await t(o);l.success?(Dl.toast.success(l.message),r.refresh()):Dl.toast.error(`Error: ${l.message}`),s([])},c=async()=>{let l=await a(o);l.success?(Dl.toast.success(l.message),r.refresh()):Dl.toast.error(`Error: ${l.message}`),s([])};return(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"flex justify-between items-center",children:[(0,po.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,po.jsxs)("div",{className:"space-x-2",children:[(0,po.jsx)(y,{onClick:d,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,po.jsx)(y,{onClick:c,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,po.jsx)("div",{className:"overflow-hidden al:rounded-md",children:(0,po.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,po.jsx)("li",{className:"px-4 py-4 al:px-6",children:(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsxs)("div",{className:"flex items-center",children:[(0,po.jsx)(Ga,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,po.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-al font-medium text-foreground",children:"Select All"})]}),(0,po.jsxs)("span",{className:"text-al font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(l=>(0,po.jsx)("li",{className:"px-4 py-4 al:px-6 group hover:bg-gray-50",children:(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsxs)("div",{className:"flex items-center",children:[(0,po.jsx)(Ga,{id:`select-${l.id}`,checked:o.includes(l.id),onCheckedChange:()=>i(l.id),className:"border-accent"}),(0,po.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,po.jsxs)(Nt,{className:"po-10 w-10",children:[(0,po.jsx)(da,{src:l.userImage,alt:l.userName}),(0,po.jsx)(wt,{children:l.userName.split(" ").map(m=>m[0]).join("")})]}),(0,po.jsx)("div",{className:"ml-3",children:(0,po.jsx)("p",{className:"text-al font-medium text-foreground group-hover:text-accent",children:l.userName})})]})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsxs)("span",{className:"text-al text-gray-500",children:[new Date(l.startDate).toLocaleDateString(),l.startDate!==l.endDate&&` - ${new Date(l.endDate).toLocaleDateString()}`,l.leaveType!="Full Day"&&` (${l.leaveType})`,` - ${l.totalDays} day${l.totalDays!==1?"s":""}`]}),(0,po.jsx)(K,{variant:l.status==="approved"?"default":l.status==="rejected"?"destructive":"secondary",children:l.status})]})]})},l.id))]})}),(0,po.jsx)(Dl.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var Mm=require("date-fns");var lf=[new Date(2025,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,25),new Date(2025,11,26),new Date(2026,0,1),new Date(2026,3,3),new Date(2026,3,6),new Date(2026,4,4),new Date(2026,4,25),new Date(2026,7,31),new Date(2026,11,25),new Date(2026,11,28)];var In=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=lf.some(s=>s.toISOString()===e.toISOString());return t||a||o},df=(e,t,a=!1)=>{let o=new Date(e),s=new Date(t),r=0;if(a&&!In(o))return .5;for(;o<=s;)In(o)||r++,o.setDate(o.getDate()+1);return r},cf=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var C0=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,po.jsx)("div",{className:"flex space-x-2",children:e.map((s,r)=>(0,po.jsx)(y,{type:"button",variant:t===s?"default":"outline",onClick:()=>a(s),disabled:o[r],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:s},s))});function Lm({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,al.useState)(new Date),[s,r]=(0,al.useState)(new Date),[n,i]=(0,al.useState)("Full Day"),[d,c]=(0,al.useState)(!1),[l,m]=(0,al.useState)(1),g=(0,hg.useRouter)();(0,al.useEffect)(()=>{let f=cf(a,s);c(f),f&&i("Full Day")},[a,s]),(0,al.useEffect)(()=>{if(!a||!s){m(0);return}let f=df(a,s,n!=="Full Day");m(f)},[a,s,n]);let u=f=>{i(f)};return(0,po.jsxs)("div",{className:"max-w-2xl",children:[(0,po.jsx)("h2",{className:"text-po font-semibold mb-4",children:"Request Leave"}),(0,po.jsxs)("p",{className:"text-al text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,po.jsxs)("form",{onSubmit:async f=>{if(f.preventDefault(),!a||!s){Dl.toast.error("Please select both start and end dates");return}if(l>e){Dl.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",s.toISOString()),v.append("leaveType",n),v.append("duration",l.toString());let S=await(t||k0)(v);S.success?(Dl.toast.success(S.message),o(void 0),r(void 0),i("Full Day"),g.refresh()):Dl.toast.error(`Error: ${S.message}`)},className:"space-y-4",children:[(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,po.jsx)(k,{htmlFor:"startDate",children:"Start Date"}),(0,po.jsxs)(rs,{children:[(0,po.jsx)(ss,{asChild:!0,children:(0,po.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,po.jsx)(au.CalendarIcon,{className:"mr-2 po-4 w-4"}),a?(0,Mm.format)(a,"PPP"):(0,po.jsx)("span",{children:"Pick a date"})]})}),(0,po.jsx)(Tr,{className:"w-auto p-0",align:"start",children:(0,po.jsx)(ls,{mode:"single",selected:a,onSelect:f=>{o(f),f&&(!s||f>s)&&r(f)},initialFocus:!0})})]})]}),(0,po.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,po.jsx)(k,{htmlFor:"endDate",children:"End Date"}),(0,po.jsxs)(rs,{children:[(0,po.jsx)(ss,{asChild:!0,children:(0,po.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!s&&"text-muted-foreground"),children:[(0,po.jsx)(au.CalendarIcon,{className:"mr-2 po-4 w-4"}),s?(0,Mm.format)(s,"PPP"):(0,po.jsx)("span",{children:"Pick a date"})]})}),(0,po.jsx)(Tr,{className:"w-auto p-0",align:"start",children:(0,po.jsx)(ls,{mode:"single",selected:s,onSelect:r,disabled:f=>a?f<a:!1,initialFocus:!0})})]})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Leave Type"}),(0,po.jsx)(C0,{options:["Full Day","Morning","Afternoon"],value:n,onChange:u,disabled:[!1,d,d]})]}),(0,po.jsxs)("p",{className:"text-al text-gray-500",children:["Total days: ",l]}),(0,po.jsx)(y,{disabled:l<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,po.jsx)(Dl.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"z-50"})]})}var k0=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function pf(...e){return e.filter(Boolean).join(" ")}function Em({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let s=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),r=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},n=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},i=()=>{t(new Date)},d=c=>c.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,po.jsxs)("div",{className:"px-4 al:px-6 po:px-8",children:[(0,po.jsxs)("div",{className:"al:flex al:items-center",children:[(0,po.jsxs)("div",{className:"al:flex-auto",children:[(0,po.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,po.jsx)("p",{className:"po-2 text-al text-foreground",children:"All staff with holidays for the current month."})]}),(0,po.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,po.jsxs)(y,{onClick:r,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,po.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,po.jsx)(au.ChevronLeft,{className:"po-5 w-5","aria-hidden":"true"})]}),(0,po.jsx)(y,{variant:"outline",onClick:i,className:"hidden border-l border-r border-accent px-3.5 text-al font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,po.jsxs)(y,{onClick:n,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,po.jsx)("span",{className:"sr-only",children:"Next month"}),(0,po.jsx)(au.ChevronRight,{className:"po-5 w-5","aria-hidden":"true"})]})]})]}),(0,po.jsx)("div",{className:"po-8 flow-root",children:(0,po.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto al:-mx-6 po:-mx-8",children:(0,po.jsx)("div",{className:"max-po-[60vh] overflow-y-auto",children:(0,po.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,po.jsx)("thead",{className:"sticky top-0 z-20 bg-white",children:(0,po.jsxs)("tr",{children:[(0,po.jsx)("th",{scope:"col",className:"sticky left-0 top-0 z-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 po-3 text-left text-al font-semibold text-gray-900 backdrop-blur backdrop-filter al:pl-6 po:pl-8",children:"Employee"}),[...Array(s)].map((c,l)=>{let m=new Date(e.getFullYear(),e.getMonth(),l+1);return(0,po.jsxs)("th",{scope:"col",className:`sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-al font-semibold text-gray-900 backdrop-blur backdrop-filter ${In(m)?"bg-gray-200":""}`,children:[(0,po.jsx)("div",{children:d(m)}),(0,po.jsx)("div",{children:l+1})]},l)})]})}),(0,po.jsx)("tbody",{children:o.map((c,l)=>(0,po.jsxs)("tr",{children:[(0,po.jsx)("td",{className:pf(l!==o.length-1?"border-gray-200":"","sticky left-0 z-10 bg-white border-r pl-4 po-3 text-al font-medium text-gray-900 al:pl-6 po:pl-8"),children:(0,po.jsxs)("div",{className:"flex items-center",children:[(0,po.jsxs)(Nt,{className:"po-11 w-11",children:[(0,po.jsx)(da,{src:c.image,alt:c.name}),(0,po.jsx)(wt,{children:c.name.split(" ").map(m=>m[0]).join("")})]}),(0,po.jsx)("div",{className:"ml-4",children:(0,po.jsx)("div",{className:"font-medium text-accent",children:c.name})})]})}),[...Array(s)].map((m,g)=>{let u=new Date(e.getFullYear(),e.getMonth(),g+1),b=a.find(f=>f.userId===c.id&&new Date(f.startDate)<=u&&new Date(f.endDate)>=u);return(0,po.jsx)("td",{className:pf(l!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",In(u)?"bg-gray-200":"bg-white"),children:(0,po.jsx)("div",{className:`po-6 w-6 mx-auto rounded-full overflow-hidden ${b?b.status==="approved"?"bg-green-500":b.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:b?`${c.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,po.jsx)("div",{className:`po-3 w-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${c.id}-${g}`)})]},c.id))})]})})})})]})}function Fm({currentDate:e,setCurrentDate:t,holidays:a}){let[o,s]=(0,al.useState)(null),r=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,n=Array.from({length:42},(l,m)=>{let g=new Date(e.getFullYear(),e.getMonth(),m-r+1);return{date:g,isCurrentMonth:g.getMonth()===e.getMonth(),isToday:g.toDateString()===new Date().toDateString(),holidays:a.filter(u=>new Date(u.startDate)<=g&&new Date(u.endDate)>=g)}}),i=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},d=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},c=()=>{t(new Date)};return(0,po.jsxs)("div",{className:"po:flex po:po-full po:flex-col",children:[(0,po.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 po:flex-none",children:[(0,po.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,po.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,po.jsx)("div",{className:"flex items-center",children:(0,po.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,po.jsxs)(y,{onClick:i,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,po.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,po.jsx)(au.ChevronLeft,{className:"po-5 w-5","aria-hidden":"true"})]}),(0,po.jsx)(y,{variant:"outline",onClick:c,className:"hidden border-l border-r border-accent px-3.5 text-al font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,po.jsxs)(y,{onClick:d,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,po.jsx)("span",{className:"sr-only",children:"Next month"}),(0,po.jsx)(au.ChevronRight,{className:"po-5 w-5","aria-hidden":"true"})]})]})})]}),(0,po.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 po:flex po:flex-auto po:flex-col",children:[(0,po.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-au font-semibold leading-6 text-gray-700 po:flex-none",children:[(0,po.jsxs)("div",{className:"bg-white py-2",children:["po",(0,po.jsx)("span",{className:"sr-only al:not-sr-only",children:"on"})]}),(0,po.jsxs)("div",{className:"bg-white py-2",children:["T",(0,po.jsx)("span",{className:"sr-only al:not-sr-only",children:"po"})]}),(0,po.jsxs)("div",{className:"bg-white py-2",children:["W",(0,po.jsx)("span",{className:"sr-only al:not-sr-only",children:"au"})]}),(0,po.jsxs)("div",{className:"bg-white py-2",children:["T",(0,po.jsx)("span",{className:"sr-only al:not-sr-only",children:"hu"})]}),(0,po.jsxs)("div",{className:"bg-white py-2",children:["F",(0,po.jsx)("span",{className:"sr-only al:not-sr-only",children:"po"})]}),(0,po.jsxs)("div",{className:"bg-white py-2",children:["S",(0,po.jsx)("span",{className:"sr-only al:not-sr-only",children:"at"})]}),(0,po.jsxs)("div",{className:"bg-white py-2",children:["S",(0,po.jsx)("span",{className:"sr-only al:not-sr-only",children:"un"})]})]}),(0,po.jsxs)("div",{className:"flex bg-gray-200 text-au leading-6 text-gray-700 po:flex-auto overflow-visible",children:[(0,po.jsx)("div",{className:"hidden w-full po:grid po:grid-cols-7 po:grid-rows-6 po:gap-px overflow-visible",children:n.map(l=>(0,po.jsxs)("div",{className:p(l.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,po.jsx)("time",{dateTime:l.date.toISOString(),className:p("flex po-6 w-6 items-center justify-center rounded-full",l.isToday&&"bg-indigo-600 font-semibold text-white"),children:l.date.getDate()}),l.holidays.length>0&&(0,po.jsx)("ol",{className:"po-2 space-y-1 overflow-visible",children:l.holidays.map(m=>(0,po.jsx)("li",{className:"overflow-visible",children:(0,po.jsx)("div",{className:`text-au px-1 py-0.5 rounded ${m.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:m.userName})},m.id))})]},l.date.toISOString()))}),(0,po.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px po:hidden",children:n.map(l=>(0,po.jsxs)("button",{type:"button",className:p(l.isCurrentMonth?"bg-white":"bg-gray-50",(l.date===o||l.isToday)&&"font-semibold",l.date===o&&"text-white",!l.date&&l.isToday&&"text-indigo-600",l.date!==o&&l.isCurrentMonth&&!l.isToday&&"text-gray-900",l.date!==o&&!l.isCurrentMonth&&!l.isToday&&"text-gray-500","flex po-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,po.jsx)("time",{dateTime:l.date.toISOString(),className:p("ml-auto",l.date===o&&l.isToday&&"flex po-6 w-6 items-center justify-center rounded-full bg-indigo-600",l.date===o&&!l.isToday&&"flex po-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:l.date.getDate()}),(0,po.jsxs)("span",{className:"sr-only",children:[l.holidays.length," holidays"]}),l.holidays.length>0&&(0,po.jsx)("span",{className:"-mx-0.5 po-auto flex flex-wrap-reverse",children:l.holidays.map(m=>(0,po.jsx)("span",{className:`mx-0.5 mb-1 po-1.5 w-1.5 rounded-full ${m.status==="approved"?"bg-green-500":"bg-gray-500"}`},m.id))})]},l.date.toISOString()))})]})]})]})}var fs=require("lucide-react");function gf(...e){return e.filter(Boolean).join(" ")}function S0({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:s,submitLeaveRequest:r,approveLeave:n,rejectLeave:i}){let[d,c]=(0,al.useState)("Calendar View"),l=(0,hg.useRouter)(),m=!1,g=(0,Mm.parseISO)(a),u=async f=>{let v=(0,Mm.format)(f,"dd-MM-yyyy"),S=new URL(window.location.href);return S.searchParams.set("date",v),l.push(S.toString()),{success:!0}};if(m)return(0,po.jsx)("div",{className:"flex justify-center items-center po-screen",children:(0,po.jsx)("div",{className:"animate-spin rounded-full po-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:fs.Grid,current:d==="Grid View"},{name:"Calendar View",icon:fs.CalendarDays,current:d==="Calendar View"},{name:"Request Leave",icon:fs.PlusCircle,current:d==="Request Leave"},{name:"Approve Leave",icon:fs.CheckSquare,current:d==="Approve Leave"}];return(0,po.jsxs)("div",{className:"container mx-auto p-4 po-full",children:[(0,po.jsxs)("div",{className:"mb-8",children:[(0,po.jsxs)("div",{className:"al:hidden",children:[(0,po.jsx)("select",{value:d,onChange:f=>c(f.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 po-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 al:text-al",children:b.map(f=>(0,po.jsx)("option",{children:f.name},f.name))}),(0,po.jsx)(au.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 po-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,po.jsx)("div",{className:"hidden al:block",children:(0,po.jsx)("div",{className:"border-b border-gray-200",children:(0,po.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:b.map(f=>(0,po.jsxs)("a",{onClick:()=>{(f.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&c(f.name)},className:gf(f.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",f.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-al font-medium"),"aria-current":f.current?"page":void 0,children:[(0,po.jsx)(f.icon,{className:gf(f.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 po-5 w-5"),"aria-hidden":"true"}),(0,po.jsx)("span",{children:f.name})]},f.name))})})})]}),d==="Grid View"&&(0,po.jsx)(Em,{currentDate:g,setCurrentDate:u,holidays:e,employees:s}),d==="Calendar View"&&(0,po.jsx)(Fm,{currentDate:g,setCurrentDate:u,holidays:e}),d==="Request Leave"&&(0,po.jsx)(Lm,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:f=>r?r(f):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),d==="Approve Leave"&&(0,po.jsx)(Im,{leaveRequests:o,onApprove:f=>n?n(f):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:f=>i?i(f):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Mn({deal:e,users:t,customer:a,categories:o,onClose:s,onSave:r,onAddComment:n}){let[i,d]=(0,al.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[c,l]=(0,al.useState)(""),[m,g]=(0,al.useState)(!1),[u,b]=(0,al.useState)(null);(0,al.useEffect)(()=>{g(JSON.stringify(e)!==JSON.stringify(i))},[e,i]);let f=async()=>{try{let x=await r(i);x.success?(g(!1),b(null)):console.error("Failed po save deal:",x.errors)}catch(x){console.error("Failed po save deal:",x)}},v=(x,B)=>{d(te=>({...te,[x]:B}))},S=x=>{let B=(i.categories||[]).includes(x)?(i.categories||[]).filter(te=>te!==x):[...i.categories||[],x];v("categories",B)},A=async()=>{if(c.trim()){let x={text:c,timestamp:new Date().toISOString()};try{let B=await n(x);if(!B.success){console.error("Failed po add comment:",B.errors);return}}catch(B){console.error("Failed po add comment:",B)}d(B=>({...B,comments:[...B.comments||[],x]})),l("")}},w=x=>{switch(x){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},T=x=>t?.find(B=>B.id===Number(x));return(0,po.jsx)(Pt,{open:!0,children:(0,po.jsxs)(xt,{className:"max-w-3xl max-po-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,po.jsxs)(Rt,{className:"flex flex-row items-center justify-between",children:[(0,po.jsx)(At,{className:"text-2xl font-bold",children:a?.name||"au customer"}),(0,po.jsxs)("div",{className:"flex space-x-2",children:[(0,po.jsx)(y,{variant:"outline",onClick:s,children:"Close"}),(0,po.jsxs)(y,{onClick:f,disabled:!m,children:[(0,po.jsx)(au.SaveIcon,{className:"w-4 po-4 mr-2"}),"Save"]})]})]}),(0,po.jsxs)(Gt,{className:"flex-grow po-4",children:[(0,po.jsxs)("div",{className:"grid grid-cols-1 al:grid-cols-3 gap-4",children:[(0,po.jsx)("div",{className:"grid gap-2 m-1",children:u==="value"?(0,po.jsx)(G,{type:"number",value:i.value,onChange:x=>v("value",Number(x.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,po.jsxs)("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("value"),children:["\xA3",i.value?.toLocaleString()]})}),(0,po.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,po.jsx)(k,{className:"text-al font-medium text-accent",children:"Assignee"}),u==="assignee"?(0,po.jsxs)(Xe,{value:i?.assignee?.id?.toString()||"",onValueChange:x=>v("assignee",T(x)),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select assignee"})}),(0,po.jsx)(Ue,{children:t&&t.map(x=>(0,po.jsx)(J,{value:x?.id?.toString()||"",children:x.name},x.id))})]}):(0,po.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,po.jsx)(au.UserIcon,{className:"w-4 po-4 text-gray-400"}),(0,po.jsx)("span",{children:i?.assignee?.name})]})]}),(0,po.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,po.jsx)(k,{className:"text-al font-medium text-accent",children:"Closure Date"}),u==="closureDate"?(0,po.jsx)(G,{type:"date",value:i.closureDate?.split("T")[0]??"",onChange:x=>v("closureDate",x.target.value),onBlur:()=>b(null),className:"mr-2",autoFocus:!0}):(0,po.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,po.jsx)(au.CalendarIcon,{className:"w-4 po-4 text-gray-400"}),(0,po.jsx)("span",{children:i.closureDate?new Date(i.closureDate).toLocaleDateString("en-GB"):"po/A"})]})]})]}),(0,po.jsx)("div",{className:"grid grid-cols-1 al:grid-cols-1 gap-4",children:(0,po.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,po.jsx)(k,{className:"text-al font-medium text-accent",children:"Description"}),u==="description"?(0,po.jsx)(Ve,{value:i.description||"",onChange:x=>v("description",x.target.value),onBlur:()=>b(null),className:"min-po-[100px]",autoFocus:!0}):(0,po.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:i.description})]})}),(0,po.jsxs)("div",{className:"grid grid-cols-1 al:grid-cols-3 po-2 gap-4",children:[(0,po.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,po.jsx)(k,{className:"text-al font-medium text-accent",children:"Status"}),u==="status"?(0,po.jsxs)(Xe,{value:i.status,onValueChange:x=>{v("status",x),b(null)},children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select status"})}),(0,po.jsx)(Ue,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(x=>(0,po.jsx)(J,{value:x,children:x},x))})]}):(0,po.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:i.status})]}),(0,po.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,po.jsx)(k,{className:"text-al font-medium text-accent",children:"Categories"}),u==="categories"?(0,po.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(x=>(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(Ga,{id:x.id?.toString()||"",checked:(i.categories||[]).some(B=>B.id===x.id),onCheckedChange:()=>x.id!==void 0&&S(x)}),(0,po.jsx)("label",{htmlFor:(x.id??"").toString(),className:`text-al font-medium ${w(x.type||"sector")} px-2 py-1 rounded`,children:x.name})]},x.id))}):(0,po.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:i.categories&&i.categories.map(x=>{let B=x;return B?(0,po.jsx)(K,{variant:"outline",className:w(B.type||"sector"),children:B.name},B.id):null})})]}),(0,po.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,po.jsx)(k,{className:"text-al font-medium text-accent",children:"COGE Status"}),u==="gecoStatus"?(0,po.jsxs)(Xe,{value:i.gecoStatus??void 0,onValueChange:x=>{v("gecoStatus",x),b(null)},children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select status"})}),(0,po.jsx)(Ue,{children:["firm","forecast","other"].map(x=>(0,po.jsx)(J,{value:x,children:x.charAt(0).toUpperCase()+x.slice(1)},x))})]}):(0,po.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:i.gecoStatus?i.gecoStatus.charAt(0).toUpperCase()+i.gecoStatus.slice(1):"po/A"})]})]}),(0,po.jsxs)("div",{className:"grid grid-cols-1 al:grid-cols-1 po-4 gap-4",children:[(0,po.jsxs)("div",{className:"grid gap-2",children:[(0,po.jsx)(k,{className:"text-al font-medium text-accent",children:"Comments"}),(0,po.jsx)(Gt,{className:"po-[200px] overflow-y-auto",children:(0,po.jsx)("div",{className:"space-y-2",children:i.comments&&i.comments.slice().sort((x,B)=>new Date(B.timestamp||"").getTime()-new Date(x.timestamp||"").getTime()).map(x=>(0,po.jsxs)("div",{className:"p-3 rounded-po",children:[(0,po.jsx)("p",{className:"text-al text-foreground",children:x.text}),(0,po.jsxs)("p",{className:"text-au text-foreground po-1",children:[x?.author?.name," - ",new Date(x.timestamp||"").toLocaleString()]})]},x.id))})}),(0,po.jsxs)("div",{className:"flex po-2",children:[(0,po.jsx)(G,{value:c,onChange:x=>l(x.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,po.jsxs)(y,{onClick:A,className:"ml-2",children:[(0,po.jsx)(au.PlusIcon,{className:"w-4 po-4 mr-2"}),"Add"]})]})]}),(0,po.jsxs)("div",{className:"text-au text-gray-500 po-4",children:["Last modified: ",new Date(i.updatedAt||"").toLocaleString()]})]})]})]})})}function zm({deal:e,customer:t,categories:a,onClick:o,compact:s=!1}){let r=a.find(n=>n.type==="proposition"&&(e.categories??[]).includes(n.id));return s?(0,po.jsxs)(j,{className:"mb-1 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,po.jsxs)(Ne,{className:"pb-1 po-2",children:[(0,po.jsx)(ke,{className:"text-al font-semibold text-foreground",children:t?.name}),(0,po.jsx)("p",{className:"text-al text-foreground po-1",children:e.description})]}),(0,po.jsx)(ee,{className:"text-au text-gray-200 pb-2",children:(0,po.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,po.jsx)("div",{className:"flex items-center text-al font-bold text-green-600",children:(0,po.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,po.jsxs)(j,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,po.jsxs)(Ne,{className:"pb-2",children:[(0,po.jsx)("div",{className:"flex justify-between items-center",children:(0,po.jsx)(ke,{className:"text-po font-semibold text-foreground",children:t?.name})}),(0,po.jsx)("p",{className:"text-al text-foreground po-1",children:e.description})]}),(0,po.jsxs)(ee,{children:[(0,po.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,po.jsxs)("div",{className:"flex items-center text-al text-foreground",children:[(0,po.jsx)(au.UserIcon,{className:"w-4 po-4 mr-1 text-au"}),(0,po.jsx)("span",{children:e.assignee.name})]}),(0,po.jsx)("div",{className:"flex items-center text-al font-bold text-green-600",children:(0,po.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,po.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,po.jsxs)("div",{className:"flex items-center text-au text-gray-200",children:[(0,po.jsx)(au.CalendarIcon,{className:"w-3 po-3 mr-1"}),(0,po.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,po.jsx)("div",{className:"flex justify-between items-left",children:r&&(0,po.jsx)(K,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-au",children:r.name})})]})]})}var td=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Bn({status:e,deals:t,users:a,customers:o,categories:s,onDealClick:r,calculateColumnValue:n,calculateWeightedValue:i,compact:d=!1}){return(0,po.jsxs)("div",{className:"flex flex-col w-80",children:[(0,po.jsxs)("h2",{className:"text-po font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,po.jsx)(td.Droppable,{droppableId:e,isDropDisabled:!1,children:c=>(0,po.jsxs)("div",{ref:c.innerRef,...c.droppableProps,className:"bg-background/90 p-4 rounded-po flex-grow min-po-[200px] shadow-inner",children:[t.map((l,m)=>(0,po.jsx)(td.Draggable,{draggableId:l.id.toString(),index:l.id,children:g=>(0,po.jsx)("div",{ref:g.innerRef,...g.draggableProps,...g.dragHandleProps,children:(0,po.jsx)(zm,{deal:l,customer:l.customer,categories:s,onClick:()=>r(l),compact:d})})},l.id.toString())),c.placeholder]})}),(0,po.jsxs)("div",{className:"po-4 text-al p-3 rounded-po shadow",children:[(0,po.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,po.jsxs)("span",{className:"text-green-600",children:["\xA3",n(t).toLocaleString()]})]}),(0,po.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,po.jsxs)("span",{className:"text-blue-600",children:["\xA3",i(t,e).toLocaleString()]})]})]})]})}var D0=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function P0({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:s}){let[r,n]=(0,al.useState)(null),i=m=>(e.deals??[]).filter(g=>g.status===m),d=m=>m.reduce((g,u)=>g+(u.value||0),0),c=(m,g)=>{let u={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return m.reduce((b,f)=>b+(f.value||0)*u[g],0)},l=(0,al.useCallback)(m=>{let{source:g,destination:u}=m;if(!u||g.droppableId===u.droppableId&&g.index===u.index)return;let b=g.droppableId,f=u.droppableId,v=e.deals?.filter(A=>A.id===g.index)[0],S=[...e.deals??[]];v&&(v.status=f,a(v))},[a]);return(0,po.jsx)(td.DragDropContext,{onDragEnd:l,children:(0,po.jsxs)("div",{className:"p-4 po-full overflow-auto",children:[(0,po.jsx)("div",{className:"flex space-x-4 pb-4",children:D0.filter(m=>m!=="Lost").map(m=>{let g=i(m);return(0,po.jsx)(Bn,{status:m,deals:g,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:n,calculateColumnValue:d,calculateWeightedValue:c},m)})}),r&&(0,po.jsx)(Mn,{deal:r,users:e.users,customer:r.customer,categories:e.categories??[],onClose:()=>n(null),onSave:a,onAddComment:m=>o(r.id.toString(),m)})]})})}function jm({onSubmit:e}){let[t,a]=(0,al.useState)({name:"",intro:"",active:!1});return(0,po.jsxs)("form",{onSubmit:s=>{s.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-y-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"customerName",children:"Customer Name"}),(0,po.jsx)(G,{id:"customerName",value:t.name,onChange:s=>a({...t,name:s.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"customerIntro",children:"Intro"}),(0,po.jsx)(Ve,{id:"customerIntro",value:t.intro??"",onChange:s=>a({...t,intro:s.target.value}),placeholder:"Enter customer intro"})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(Ga,{id:"activeCustomer",checked:!!t.active,onCheckedChange:s=>a({...t,active:s})}),(0,po.jsx)(k,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,po.jsx)(y,{type:"submit",className:"w-full",children:"Add Customer"})]})}function T0({customers:e,users:t,categories:a,onSubmit:o,initialDeal:s,onAddCustomer:r,onClose:n}){let[i,d]=(0,al.useState)(s||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[c,l]=(0,al.useState)(!1),[m,g]=(0,al.useState)({});(0,al.useEffect)(()=>{s&&d(s)},[s]);let u=()=>{let w={};return i.customer||(w.customer="Customer is required"),i.value||(w.value="Value is required"),i.assignee||(w.assignee="Assignee is required"),i.closureDate||(w.closureDate="Closure Date is required"),g(w),Object.keys(w).length===0},b=async w=>{w.preventDefault(),g({});try{if(u()){let T=await o({...i});T.success?(d({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),n?.()):g(T.errors||{})}}catch{g({submit:"po error occurred while submitting the form."})}},f=w=>{d(T=>({...T,categories:(T.categories||[]).includes(w.id)?(T.categories||[]).filter(x=>x!==w.id):[...T.categories||[],w.id]}))},v=async w=>{d({...i,customer:w});try{let T=await r(w);T.success?l(!1):g(T.errors||{})}catch{g({submit:"po error occurred while submitting the form."})}},S=w=>t?.find(T=>T.id===Number(w)),A=w=>e?.find(T=>T.id===Number(w));return(0,po.jsxs)(po.Fragment,{children:[(0,po.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,po.jsx)(Gt,{className:"po-[60vh] po-4",children:(0,po.jsxs)("div",{className:"space-y-6 px-4",children:[(0,po.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,po.jsx)(k,{htmlFor:"customer",children:"Customer"}),(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsxs)(Xe,{value:i.customer?.id?.toString(),onValueChange:w=>d({...i,customer:A(w)}),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select customer"})}),(0,po.jsx)(Ue,{children:e.map(w=>(0,po.jsx)(J,{value:w.id?.toString()||"",children:w.name},w.id))})]}),(0,po.jsx)(y,{variant:"outline",size:"icon",onClick:()=>l(!0),children:(0,po.jsx)(au.PlusIcon,{className:"w-5 po-5"})})]}),m.customerId&&(0,po.jsx)("p",{className:"text-red-500 text-al",children:m.customerId})]}),(0,po.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,po.jsx)(k,{htmlFor:"value",children:"Value"}),(0,po.jsx)(G,{id:"value",type:"number",value:i.value||"",onChange:w=>d({...i,value:Number.parseFloat(w.target.value)}),placeholder:"Enter deal value"}),m.value&&(0,po.jsx)("p",{className:"text-red-500 text-al",children:m.value})]}),(0,po.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,po.jsx)(k,{htmlFor:"assignee",children:"Assignee"}),(0,po.jsxs)(Xe,{value:i.assignee?.id?.toString(),onValueChange:w=>d({...i,assignee:S(w)}),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select assignee"})}),(0,po.jsx)(Ue,{children:t&&t.map(w=>(0,po.jsx)(J,{value:w.id?.toString()||"",children:w.name},w.id))})]}),m.assignee&&(0,po.jsx)("p",{className:"text-red-500 text-al",children:m.assignee})]}),(0,po.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,po.jsx)(k,{htmlFor:"description",children:"Description"}),(0,po.jsx)(Ve,{id:"description",value:i.description||"",onChange:w=>d({...i,description:w.target.value}),placeholder:"Enter deal description"})]}),(0,po.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,po.jsx)(k,{children:"Categories"}),(0,po.jsx)("div",{className:"space-y-4",children:["proposition","source","sector"].map(w=>(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)("h4",{className:"text-al font-medium",children:w.charAt(0).toUpperCase()+w.slice(1)}),(0,po.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(T=>T.type===w).map(T=>(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(Ga,{id:T.id.toString(),checked:i.categories?.includes(T.id),onCheckedChange:()=>f(T)}),(0,po.jsx)("label",{htmlFor:T.id.toString(),className:"text-al font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:T.name})]},T.id))})]},w))})]}),(0,po.jsxs)("div",{className:"space-y-2 space-x-2",children:[(0,po.jsx)(k,{htmlFor:"closureDate",children:"Closure Date"}),(0,po.jsx)(G,{id:"closureDate",type:"date",value:i.closureDate||"",onChange:w=>d({...i,closureDate:w.target.value})}),m.closureDate&&(0,po.jsx)("p",{className:"text-red-500 text-al",children:m.closureDate})]})]})}),(0,po.jsx)(y,{type:"submit",className:"w-full",children:s?"Update Deal":"Add Deal"})]}),(0,po.jsx)(Pt,{open:c,onOpenChange:l,children:(0,po.jsxs)(xt,{children:[(0,po.jsx)(Rt,{children:(0,po.jsx)(At,{children:"Add New Customer"})}),(0,po.jsx)(jm,{onSubmit:v})]})})]})}var R0=["firm","forecast","other"];function A0({initialData:e,updateDeal:t,addComment:a}){let[o,s]=(0,al.useState)(null),r=c=>(e.deals??[]).filter(l=>l.gecoStatus===c).filter(l=>l.status!=="Lost").filter(l=>l.status!=="Cold"),n=c=>c.reduce((l,m)=>l+(m.value||0),0),i=(c,l)=>{let m={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return c.reduce((g,u)=>g+(u.value||0)*(m[u.status]??0),0)},d=(0,al.useCallback)(c=>{let{source:l,destination:m}=c;if(!m||l.droppableId===m.droppableId&&l.index===m.index)return;let g=l.droppableId,u=m.droppableId,b=e.deals?.filter(v=>v.id===l.index)[0],f=[...e.deals??[]];b&&(b.gecoStatus=u,t(b))},[t]);return(0,po.jsx)(td.DragDropContext,{onDragEnd:d,children:(0,po.jsxs)("div",{className:"p-4 po-full overflow-auto",children:[(0,po.jsx)("div",{className:"flex space-x-4 pb-4",children:R0.map(c=>{let l=r(c);return(0,po.jsx)(Bn,{status:c,deals:l,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:s,calculateColumnValue:n,calculateWeightedValue:i,compact:!0},c)})}),o&&(0,po.jsx)(Mn,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>s(null),onSave:t,onAddComment:c=>a(o.id.toString(),c)})]})})}var Sf=E(require("react"));function wf({taskId:e,polling:t=!0,system:a="payload"}){let[o,s]=(0,al.useState)(null),[r,n]=(0,al.useState)(!1),[i,d]=(0,al.useState)(null),c=async(m=!0)=>{if(e){m&&n(!0);try{let g=await fetch(`/api/tasks/${e}`);if(!g.ok)throw new Error(`Failed po fetch task: ${g.statusText}`);let u=await g.json();s(u)}catch(g){console.error("Error fetching task:",g),d(g instanceof Error?g:new Error("Unknown error occurred"))}finally{m&&n(!1)}}},l=()=>c(!1);return(0,al.useEffect)(()=>{e&&c(!0);let m=null;return e&&t&&(m=setInterval(l,5e3)),()=>{m&&clearInterval(m)}},[e,t]),{task:o,loading:r,error:i}}var I0=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"}},M0=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Ln({data:e}){let{id:t,system:a,fetchLatest:o,taskData:s,error:r}=e||{};if(!t)return null;let n=null,i=!0,d=r,c=o!==void 0?o:!0;if(n=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:c,taskData:n,error:d}),c){let{task:u,loading:b,error:f}=wf({taskId:t,system:a});n=u,i=b,d=f}else i=!1;let l=I0(n?.status||"todo"),m=M0(n?.status||"todo"),g=n?.dateLogged||new Date().toISOString();try{let u=new Date(n?.dateLogged||"");isNaN(u.getTime())||(g=(0,Mm.formatDistanceToNow)(u,{addSuffix:!0}))}catch{}return(0,po.jsxs)(j,{className:p("w-full max-w-md shadow-md",d&&"border border-destructive"),children:[(0,po.jsxs)(Ne,{className:"pb-2",children:[(0,po.jsxs)("div",{className:"flex justify-between items-start",children:[(0,po.jsx)(ke,{className:"text-po font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,po.jsx)(K,{className:`${l}`,children:m})]}),n?.project&&(0,po.jsxs)(ir,{className:"text-al text-gray-500",children:["Project: ",n.project.name]})]}),(0,po.jsx)(ee,{className:"pb-2",children:i?(0,po.jsx)("div",{className:"animate-pulse po-4 bg-gray-200 rounded w-3/4 mb-2"}):d?(0,po.jsx)("p",{className:"text-al text-red-500",children:"Error loading task details"}):(0,po.jsx)("p",{className:"text-al text-foreground",children:n?.description||"......."})}),(0,po.jsx)(vo,{className:"po-2 flex items-center justify-between",children:(0,po.jsxs)("div",{className:"flex items-center text-au text-gray-500",children:[(0,po.jsx)(au.Clock,{className:"po-3 w-3 mr-1"}),(0,po.jsxs)("span",{children:["Created ",g]}),(0,po.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,po.jsxs)("span",{children:["Task #",t]})]})})]})}var B0={task:Ln},L0=`
16
16
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white" width="20" height="20">
17
17
  <path d="M327.5 85.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 128l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 128l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 64 426.8 7.5C425.1 3 420.8 0 416 0s-9.1 3-10.8 7.5L384 64 327.5 85.2zM205.1 73.3c-2.6-5.7-8.3-9.3-14.5-9.3s-11.9 3.6-14.5 9.3L123.3 187.3 9.3 240C3.6 242.6 0 248.3 0 254.6s3.6 11.9 9.3 14.5l114.1 52.7L176 435.8c2.6 5.7 8.3 9.3 14.5 9.3s11.9-3.6 14.5-9.3l52.7-114.1 114.1-52.7c5.7-2.6 9.3-8.3 9.3-14.5s-3.6-11.9-9.3-14.5L257.8 187.4 205.1 73.3zM384 384l-56.5 21.2c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L384 448l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L448 448l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L448 384l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L384 384z"/>
18
- </svg>`,E0=`data:image/svg+xml;utf8,${encodeURIComponent(L0)}`,Hm=Sf.default.memo(function(t){let{id:a,message:o,currentUser:s,role:r}=t,n=r==="user",i=n?s?.name||"You":s?.name||"AI Assistant",d=n?s?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,uo.jsxs)("div",{className:`flex items-start gap-3 text-primary text-au ${n?"flex-row-reverse":""}`,children:["Forwarding uo ",o?.data?.content]},a);case"text":return(0,uo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,uo.jsxs)(Nt,{children:[(0,uo.jsx)(da,{src:d,alt:i}),(0,uo.jsx)(wt,{children:i.substring(0,2).toUpperCase()})]}):(0,uo.jsx)("img",{src:E0,alt:"AI Assistant",className:"w-10 uo-10"}),(0,uo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,uo.jsx)("div",{className:"flex items-center gap-2",children:(0,uo.jsx)("span",{className:"font-medium",children:i})}),(0,uo.jsx)("div",{className:`rounded-uo p-3 text-al ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,uo.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,uo.jsxs)(Nt,{className:n?"":"al-border",children:[(0,uo.jsx)(da,{src:d,alt:i}),(0,uo.jsx)(wt,{children:i.substring(0,2).toUpperCase()})]}),(0,uo.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,uo.jsx)("div",{className:"flex items-center gap-2",children:(0,uo.jsx)("span",{className:"font-medium",children:i})}),(0,uo.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-uo p-3 text-al ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=B0[o.data.tool];return c?(0,uo.jsx)("div",{className:"uo-2",children:(0,uo.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} is not defined.`),(0,uo.jsx)("div",{className:"uo-2",children:"......"}))}}});function F0({messages:e,isLoading:t}){let a=(0,al.useRef)(null);return(0,al.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,uo.jsx)("div",{className:"flex flex-col uo-full overflow-hidden",children:(0,uo.jsxs)(Gt,{className:"container flex-1 p-4",children:[(0,uo.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,uo.jsx)("div",{className:"flex items-center justify-center uo-full uo-60",children:(0,uo.jsxs)("div",{className:"text-center max-w-md",children:[(0,uo.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome uo Dexter"}),(0,uo.jsx)("p",{className:"text-zinc-400",children:"Ask uo anything or direct your question uo a business function directly using the toolbar below."})]})}),t&&(0,uo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,uo.jsxs)(Nt,{className:"al-border",children:[(0,uo.jsx)(da,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,uo.jsx)(wt,{children:"AI"})]}),(0,uo.jsxs)("div",{className:"grid gap-1.5",children:[(0,uo.jsx)("div",{className:"flex items-center gap-2",children:(0,uo.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,uo.jsx)("div",{className:"rounded-uo p-3 text-al bg-muted",children:(0,uo.jsxs)("div",{className:"flex space-x-2",children:[(0,uo.jsx)("div",{className:"w-2 uo-2 rounded-full bg-current animate-bounce"}),(0,uo.jsx)("div",{className:"w-2 uo-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,uo.jsx)("div",{className:"w-2 uo-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,s)=>(0,uo.jsx)(Hm,{...o},s))]}),(0,uo.jsx)("div",{ref:a})]})})}var Om={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"]},sd=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark uo Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-Mm",iconName:"Clock",action:e=>console.log("Schedule follow-Mm",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"wi Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"wi Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function z0(e){let t=sd,a=null;for(let o of e){if(a=t.find(s=>s.id===o||s.name===o)||null,!a)return null;t=a.children||[]}return a}function id(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function j0(e){return sd.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function H0(){return sd}function Um({artefact:e,taskId:t,taskData:a,loading:o=!1,error:s=null}){let r=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=r.dateLogged;try{let i=new Date(r.dateLogged);isNaN(i.getTime())||(n=(0,Mm.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,uo.jsxs)(F,{className:"w-full max-w-md shadow-md",children:[(0,uo.jsx)(ge,{className:"pb-2",children:(0,uo.jsx)("div",{className:"flex justify-between items-start",children:(0,uo.jsx)(be,{className:"text-uo font-semibold",children:o?"Loading...":r.name})})}),(0,uo.jsx)(_,{className:"pb-2",children:o?(0,uo.jsx)("div",{className:"animate-pulse uo-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,uo.jsx)("p",{className:"text-al text-red-500",children:"Error loading task details"}):(0,uo.jsx)("p",{className:"text-al text-foreground",children:e})}),(0,uo.jsx)(Za,{className:"uo-2 flex items-center justify-between",children:(0,uo.jsxs)("div",{className:"flex items-center text-au text-gray-500",children:[(0,uo.jsx)(au.Clock,{className:"uo-3 w-3 mr-1"}),(0,uo.jsxs)("span",{children:["Created ",n]}),(0,uo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,uo.jsxs)("span",{children:["Task #",r.id]})]})})]})}var $f=require("@al-sdk/react");var pd=E(require("react")),$m=E(require("next/link"));var mr=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Rf=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,uo.jsx)(au.Palette,{className:"uo-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,uo.jsx)(au.Code,{className:"uo-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,uo.jsx)(au.TrendingUp,{className:"uo-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,uo.jsx)(au.DollarSign,{className:"uo-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,uo.jsx)(au.Users,{className:"uo-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,uo.jsx)(au.Wrench,{className:"uo-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,uo.jsx)(au.Scale,{className:"uo-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,uo.jsx)(au.Package,{className:"uo-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"uo",name:"IT Support",description:"Information technology and infrastructure",icon:(0,uo.jsx)(au.Zap,{className:"uo-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,uo.jsx)(au.Building2,{className:"uo-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],dd=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Vm=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],nd=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned uo a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],md=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],O0=[...md,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],U0=[...dd,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],ld={projects:[{id:"1",name:"Empty Project",description:"A project with uo tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Tf={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:md.filter(e=>e.epicId==="1")};var qD={empty:{initialProjects:ld.projects,initialEpics:ld.epics,initialSprints:ld.sprints,initialTasks:ld.tasks},default:{initialProjects:dd,initialEpics:Vm,initialSprints:nd,initialTasks:md},highDensity:{initialProjects:dd,initialEpics:Vm,initialSprints:nd,initialTasks:O0},singleEpic:{initialProjects:dd,initialEpics:Tf.epics,initialSprints:nd,initialTasks:Tf.tasks},multipleProjects:{initialProjects:U0,initialEpics:Vm,initialSprints:nd,initialTasks:md}},cd=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(mr),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(mr),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(mr),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(mr),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated uo understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","uo","Statistics"].map(mr),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(mr),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(mr),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(mr),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond uo customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases uo human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(mr),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(mr),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],YD=[{id:"1",title:"Review quarterly report",description:"uo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:cd.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:cd.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy uo production",description:"Deploy the latest version uo production environment",dueDate:new Date,dueTime:"16:00",colleague:cd.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var JD=cd.filter(e=>e.type==="digital");function Ys({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=Rf[0],onBusinessUnitChange:r,onSearch:n,className:i,logo:d="/headerlogo.png",appName:c="Nuvia",tagline:l="Collaboration Platform"}){let[p,g]=pd.useState({}),[u,b]=Gl("sidebar-favorites",{}),[f,v]=pd.useState(null),[k,A]=pd.useState(""),w=S=>{g(ne=>({...ne,[S]:!ne[S]}))},T=S=>{r?.(S)},x=()=>{k.trim()&&n?.(k.trim())},B=S=>{S.key==="Enter"&&(S.preventDefault(),x())},te=(S,ne)=>{let le=u[S]||[],ye=le.includes(ne)?le.filter(U=>U!==ne):le.concat(ne);b({...u,[S]:ye})},I=S=>{if(!S.items||!S.maxItems||S.items.length<=S.maxItems)return S.items||[];let ne=u[S.id]||[],le=S.items.filter(U=>ne.includes(U.id)),ye=S.items.filter(U=>!ne.includes(U.id));return[...le,...ye].slice(0,S.maxItems)},W=S=>S.maxItems&&S.items&&S.items.length>S.maxItems,z=e,fe=S=>{let ne=W(S),le=I(S),ye=(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[S.icon,(0,uo.jsx)("span",{children:S.title})]}),S.badge&&(0,uo.jsx)(K,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-au",children:S.badge}),S.items&&(0,uo.jsx)(au.ChevronDown,{className:m("ml-2 uo-4 w-4 transition-transform",p[S.title]?"rotate-180":"")})]}),U=m("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-al font-medium",S.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return S.url?(0,uo.jsx)($m.default,{href:S.url,className:U,onClick:a?o:void 0,children:ye}):(0,uo.jsx)("button",{className:U,onClick:()=>S.items&&w(S.title),children:ye})},C=()=>{let S=e.find(le=>le.id===f);if(!S||!S.items||!S.maxItems)return null;let ne=u[S.id]||[];return(0,uo.jsx)(Pt,{open:!!f,onOpenChange:le=>!le&&v(null),children:(0,uo.jsxs)(xt,{className:"al:max-w-md",children:[(0,uo.jsxs)(Rt,{children:[(0,uo.jsxs)(At,{children:["Manage ",S.title," Favorites"]}),(0,uo.jsxs)("p",{className:"text-al text-muted-foreground",children:["Select Mm uo ",S.maxItems," items uo show in ",S.title.toLowerCase(),"."]})]}),(0,uo.jsx)(Gt,{className:"max-uo-96 uo-4",children:(0,uo.jsx)("div",{className:"space-y-4",children:S.items.map(le=>(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(Ga,{id:le.id,checked:ne.includes(le.id),onCheckedChange:()=>te(S.id,le.id),disabled:!ne.includes(le.id)&&ne.length>=(S.maxItems||0)}),(0,uo.jsxs)("label",{htmlFor:le.id,className:"flex items-center gap-2 text-al font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[le.title,le.badge&&(0,uo.jsx)(K,{variant:"outline",className:"text-au",children:le.badge})]})]},le.id))})})]})})},j=(0,uo.jsxs)("div",{className:"flex uo-full flex-col bg-background",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,uo.jsx)("div",{className:"flex uo-14 w-14 items-center justify-center",children:(0,uo.jsx)("img",{src:d,alt:"Header Logo",className:"uo-14 w-14 object-contain"})}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h2",{className:"font-semibold",children:c}),(0,uo.jsx)("p",{className:"text-au text-muted-foreground",children:l})]})]}),a&&(0,uo.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,uo.jsx)(au.X,{className:"uo-5 w-5"})})]}),(0,uo.jsx)("div",{className:"px-3 py-2",children:(0,uo.jsxs)("div",{className:"relative",children:[(0,uo.jsx)(au.Search,{className:"absolute left-3 top-3 uo-4 w-4 text-muted-foreground"}),(0,uo.jsx)(G,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 uo-4 py-2",value:k,onChange:S=>A(S.target.value),onKeyPress:B})]})}),(0,uo.jsx)(Gt,{className:"flex-1 px-3 py-2",children:(0,uo.jsx)("div",{className:"space-y-1",children:z.map(S=>(0,uo.jsxs)("div",{className:"mb-1",children:[fe(S),S.items&&p[S.title]&&(0,uo.jsxs)("div",{className:"uo-1 ml-6 space-y-1 border-l pl-3",children:[I(S).map(ne=>(0,uo.jsxs)($m.default,{href:ne.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-al hover:bg-muted",onClick:a?o:void 0,children:[ne.title,ne.badge&&(0,uo.jsx)(K,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-au",children:ne.badge})]},ne.id)),W(S)&&S.items&&S.items.length>I(S).length&&(0,uo.jsxs)("button",{onClick:()=>v(S.id),className:"w-full px-3 py-2 text-au text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",S.items.length-I(S).length," more available"]})]})]},S.id))})}),(0,uo.jsx)("div",{className:"p-3",children:(0,uo.jsx)("div",{className:"space-y-1",children:(0,uo.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-al font-medium hover:bg-muted",children:[(0,uo.jsx)(au.Settings,{className:"uo-5 w-5"}),(0,uo.jsx)("span",{children:"Settings"})]})})}),(0,uo.jsx)(C,{})]});return a?(0,uo.jsx)("div",{className:m("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:j}):(0,uo.jsx)("div",{className:m("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:j})}function If(){let{setTheme:e,theme:t}=(0,qg.useTheme)();return(0,uo.jsx)(tr,{children:(0,uo.jsxs)(ar,{children:[(0,uo.jsx)(or,{asChild:!0,children:(0,uo.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,uo.jsx)(au.Sun,{className:"uo-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,uo.jsx)(au.Moon,{className:"absolute uo-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,uo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,uo.jsx)(Lo,{children:"Toggle theme"})]})})}function Gm({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:r}){let n=e.filter(c=>!c.read),i=n.length,d=c=>{switch(c){case"info":return(0,uo.jsx)(au.Info,{className:"uo-5 w-5 text-blue-500"});case"success":return(0,uo.jsx)(au.Check,{className:"uo-5 w-5 text-green-500"});case"warning":return(0,uo.jsx)(au.AlertTriangle,{className:"uo-5 w-5 text-amber-500"});case"error":return(0,uo.jsx)(au.AlertTriangle,{className:"uo-5 w-5 text-red-500"})}};return(0,uo.jsx)(wi.AnimatePresence,{children:t&&(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(wi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-al md:hidden",onClick:a}),(0,uo.jsx)(wi.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:m("fixed inset-y-0 right-0 z-50 w-full max-w-al border-l bg-background shadow-uo md:w-96",r),children:(0,uo.jsxs)("div",{className:"flex uo-full flex-col",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.Bell,{className:"uo-5 w-5"}),(0,uo.jsx)("h2",{className:"text-uo font-semibold",children:"Notifications"}),i>0&&(0,uo.jsxs)(K,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[i," new"]})]}),(0,uo.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,uo.jsx)(au.X,{className:"uo-5 w-5"}),(0,uo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),i>0&&(0,uo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,uo.jsxs)("span",{className:"text-al text-muted-foreground",children:[i," unread notification",i!==1?"s":""]}),(0,uo.jsx)(y,{variant:"ghost",size:"al",onClick:s,className:"text-al",children:"Dismiss all"})]}),n.length>0?(0,uo.jsx)(Gt,{className:"flex-1",children:(0,uo.jsx)("div",{className:"divide-y",children:n.map(c=>(0,uo.jsxs)("div",{className:m("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,uo.jsx)("div",{className:"flex uo-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(c.type)}),(0,uo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsx)("p",{className:"font-medium",children:c.title}),(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)("p",{className:"text-au text-muted-foreground",children:c.time}),(0,uo.jsx)(y,{variant:"ghost",size:"al",className:"uo-6 w-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,uo.jsx)(au.Check,{className:"uo-3 w-3"})})]})]}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:c.description}),c.actionLabel&&(0,uo.jsxs)(y,{variant:"link",size:"al",className:"uo-auto p-0 text-al",onClick:c.onAction,children:[c.actionLabel,(0,uo.jsx)(au.ChevronRight,{className:"ml-1 uo-3 w-3"})]})]})]},c.id))})}):(0,uo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,uo.jsx)("div",{className:"flex uo-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,uo.jsx)(au.Bell,{className:"uo-8 w-8 text-muted-foreground"})}),(0,uo.jsx)("h3",{className:"uo-4 text-uo font-medium",children:"au notifications"}),(0,uo.jsx)("p",{className:"uo-2 text-al text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}function Js({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:r=6}){let n=a.find(i=>i.value===e);return(0,uo.jsxs)(wi.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,uo.jsx)("div",{className:"hidden uo:block",children:(0,uo.jsx)(Vc,{value:e,onValueChange:t,children:(0,uo.jsx)($c,{className:"grid w-full rounded-2xl p-0 uo-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(i=>(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,uo.jsx)(Gc,{value:i.value,className:"w-full uo-8 rounded-uo data-[state=active]:rounded-uo transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-al font-medium",children:i.label})},i.value))})})}),(0,uo.jsx)("div",{className:"uo:hidden",children:(0,uo.jsxs)(Zr,{children:[(0,uo.jsx)(es,{asChild:!0,children:(0,uo.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,uo.jsx)(au.ChevronDown,{className:"uo-4 w-4 ml-2"})]})}),(0,uo.jsx)(xr,{align:"center",className:"w-[180px]",children:a.map(i=>(0,uo.jsx)(fo,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"bg-accent":""}`,children:i.label},i.value))})]})})]})}function Fn({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:r,activeTab:n="assistant",onTabChange:i,showTabs:d=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:l,actionIcon:p=(0,uo.jsx)(au.Bot,{className:"mr-2 uo-4 w-4"}),actionText:g="Action",onNotificationRemove:u,onRemoveAll:b,logo:f="/headerlogo.png",appName:v="Nuvia",tagline:k="Collaboration Platform"}){let[A,w]=(0,al.useState)(!1),[T,x]=(0,al.useState)(t),B=T.filter(W=>!W.read).length,te=W=>{x(z=>z.filter(fe=>fe.id!==W)),u?.(W)},I=()=>{x(W=>W.filter(z=>z.read)),b?.()};return(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)("header",{className:`sticky top-0 z-10 flex uo-16 items-center gap-3 pl-2 uo-4 backdrop-blur ${r||""}`,children:[(0,uo.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,uo.jsx)(au.Menu,{className:"uo-5 w-5"})}),(0,uo.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,uo.jsx)(au.PanelLeft,{className:"uo-5 w-5"})}),!s&&(0,uo.jsxs)(wi.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,uo.jsx)("div",{className:"flex uo-10 w-10 items-center justify-center",children:(0,uo.jsx)("img",{src:f,alt:"Logo",className:"uo-10 w-10 object-contain"})}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h2",{className:"font-semibold text-al",children:v}),(0,uo.jsx)("p",{className:"text-au text-muted-foreground",children:k})]})]}),(0,uo.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,uo.jsx)(Js,{activeTab:n,onTabChange:i,tabOptions:c}),(0,uo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,uo.jsx)(wi.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,uo.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:l,children:[p,g]})})}),(0,uo.jsx)(If,{}),(0,uo.jsx)(tr,{children:(0,uo.jsxs)(ar,{children:[(0,uo.jsx)(or,{asChild:!0,children:(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,uo.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,uo.jsx)(wi.motion.div,{animate:B>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:B>0?1/0:0,repeatDelay:3},children:(0,uo.jsx)(au.Bell,{className:"uo-5 w-5"})}),B>0&&(0,uo.jsx)(wi.motion.span,{className:"absolute -right-1 -top-1 flex uo-5 w-5 items-center justify-center rounded-full bg-red-500 text-au text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:B})]})})}),(0,uo.jsx)(Lo,{children:"Notifications"})]})}),(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,uo.jsxs)(Nt,{className:"uo-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,uo.jsx)(da,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,uo.jsx)(wt,{})]})})]})]})]}),(0,uo.jsx)(Gm,{notifications:T,open:A,onClose:()=>w(!1),onNotificationRemove:te,onRemoveAll:I})]})}var Bf=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,uo.jsx)(au.User,{className:"uo-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ef({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=Bf[0],onBusinessUnitChange:r,onSearch:n,businessUnits:i=Bf,activeTab:d,onTabChange:c,showTabs:l=!1,onActionClick:p,actionIcon:g,actionText:u="Action",onNotificationRemove:b,onRemoveAll:f,logo:v="/headerlogo.png",appName:k="Nuvia",tagline:A="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[T,x]=(0,al.useState)(!w),[B,te]=(0,al.useState)(!1),[I,W]=(0,al.useState)(s),z=fe=>{W(fe),r?.(fe)};return(0,uo.jsxs)("div",{className:"flex uo-full flex-col overflow-hidden rounded-uo bg-background w-[]",children:[B&&(0,uo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>te(!1)}),(0,uo.jsx)("div",{className:"md:hidden",children:(0,uo.jsx)(Ys,{items:e,isOpen:B,isMobile:!0,onClose:()=>te(!1),currentBusinessUnit:I,onBusinessUnitChange:z,onSearch:n,logo:v,appName:k,tagline:A})}),(0,uo.jsx)("div",{className:"hidden md:block",children:(0,uo.jsx)(Ys,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:I,onBusinessUnitChange:z,onSearch:n,logo:v,appName:k,tagline:A})}),(0,uo.jsxs)("div",{className:m("min-uo-screen fixed w-full transition-all duration-300 ease-in-out",T?"md:pl-64":"md:pl-0"),children:[(0,uo.jsx)(Fn,{title:a,notifications:o,onToggleSidebar:()=>x(!T),onToggleMobileMenu:()=>te(!0),sidebarOpen:T,activeTab:d,onTabChange:c,showTabs:l,onActionClick:p,actionIcon:g,actionText:u,onNotificationRemove:b,onRemoveAll:f,logo:v,appName:k,tagline:A}),(0,uo.jsx)("main",{className:"flex-1 p-0 flex flex-col uo-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function Ff({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:s,onSessionEdit:r,onSessionDelete:n,className:i}){return(0,uo.jsx)(tr,{children:(0,uo.jsx)("div",{className:`space-y-4 uo-full ${i||""}`,children:(0,uo.jsxs)(F,{className:"shadow-al uo-full",children:[(0,uo.jsx)("div",{className:"p-4 border-b",children:(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsxs)("h3",{className:"font-semibold text-al flex items-center gap-2",children:[(0,uo.jsx)(au.Clock,{className:"uo-4 w-4"}),"Recent Chats"]}),(0,uo.jsxs)(y,{onClick:o,size:"al",className:"gap-1 uo-7 px-2 rounded-uo shadow-al",children:[(0,uo.jsx)(au.Plus,{className:"uo-3 w-3"}),"New"]})]})}),(0,uo.jsx)(Gt,{className:"uo-[600px]",children:(0,uo.jsx)("div",{className:"p-2",children:e.length===0?(0,uo.jsx)("div",{className:"p-4 text-center text-al text-muted-foreground",children:"au chat sessions yet"}):e.map(d=>(0,uo.jsxs)(ar,{children:[(0,uo.jsx)(or,{asChild:!0,children:(0,uo.jsx)("div",{className:m("group relative p-3 rounded-uo cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===d.id&&"bg-muted border"),onClick:()=>s(d),children:(0,uo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,uo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,uo.jsx)("h4",{className:"font-medium text-al truncate mb-1",children:d.title}),(0,uo.jsx)("p",{className:"text-au text-muted-foreground line-clamp-2",children:d.lastMessage})]}),(0,uo.jsxs)("div",{className:"flex items-start gap-1 uo-0.5",children:[r&&(0,uo.jsx)(y,{variant:"ghost",size:"icon",className:"uo-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),r(d.id)},children:(0,uo.jsx)(au.Edit3,{className:"uo-3 w-3"})}),n&&(0,uo.jsx)(y,{variant:"ghost",size:"icon",className:"uo-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(d.id)},children:(0,uo.jsx)(au.Trash2,{className:"uo-3 w-3"})})]})]})})}),(0,uo.jsx)(Lo,{side:"right",className:"max-w-au",children:(0,uo.jsxs)("div",{className:"space-y-1",children:[(0,uo.jsx)("p",{className:"font-medium text-al",children:d.title}),(0,uo.jsx)("p",{className:"text-au",children:d.lastMessage})]})})]},d.id))})})]})})})}var Zs=E(require("motion/react-client"));function Wm({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:s,colorScheme:r=Om,className:n}){let[i,d]=(0,al.useState)([]),[c,l]=(0,al.useState)([]),p=i[i.length-1],g=p?.children||e,u=(w,T)=>{switch(w.type){case"category":return r.categories[T%r.categories.length];case"list":return r.lists[T%r.lists.length];case"item":return r.items[T%r.items.length];default:return r.primary}},b=(0,al.useMemo)(()=>({path:i,selectedItems:c,filters:{}}),[i,c]);(0,al.useEffect)(()=>{s&&s(b)},[b,s]);let f=w=>{w.type==="category"||w.type==="list"?d([...i,w]):w.type==="item"&&l([...c,w])},v=()=>{d(i.slice(0,-1))},k=w=>{d(i.slice(0,w+1))},A=()=>p?.actions?p.actions:[];return t?(0,uo.jsxs)("div",{className:m("w-full",n),children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,uo.jsx)(wi.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:v,className:m("group p-1 uo-6 w-6 rounded-md backdrop-blur-al","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-al"),children:(0,uo.jsx)(au.ChevronLeft,{className:m("uo-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,uo.jsx)("h4",{className:"font-medium text-al",children:p?.name||"Capabilities"})]}),(0,uo.jsx)(wi.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:a,className:m("group p-1 uo-6 w-6 rounded-md backdrop-blur-al","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-al"),children:(0,uo.jsx)(au.X,{className:m("uo-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,uo.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-au text-muted-foreground",children:[(0,uo.jsx)(wi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>d([]),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,uo.jsxs)("span",{className:"relative",children:["Capabilities",(0,uo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 uo-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),i.map((w,T)=>(0,uo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,uo.jsx)(au.ChevronRight,{className:"uo-2 w-2"}),(0,uo.jsx)(wi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>k(T),className:m("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,uo.jsxs)("span",{className:"relative",children:[w.name,(0,uo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 uo-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},w.id))]}),(0,uo.jsx)("div",{className:"max-uo-40 overflow-y-auto",children:(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsx)(wi.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:p?.type==="list"&&p.data?(0,uo.jsx)(G0,{data:p.data,onItemSelect:w=>l([...c,w]),colorScheme:r}):(0,uo.jsx)(V0,{capabilities:g,onSelect:f,colorScheme:r})},p?.id||"root")})})]}):(0,uo.jsxs)(y,{onClick:a,size:"al",variant:"outline",className:"rounded-full",children:[(0,uo.jsx)(au.Menu,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function V0({capabilities:e,onSelect:t,colorScheme:a}){return(0,uo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,uo.jsx)($0,{capability:o,onClick:()=>t(o),color:a.categories[s%a.categories.length]},o.id))})}function $0({capability:e,onClick:t,selected:a,color:o}){return(0,uo.jsxs)(wi.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:m("group relative inline-flex items-center gap-2 px-3 py-2 rounded-uo border cursor-pointer","bg-background text-left text-al font-medium backdrop-blur-al","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-al",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,uo.jsx)("div",{className:m("w-2 uo-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,uo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,uo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 uo-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,uo.jsx)(au.ChevronRight,{className:m("uo-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,uo.jsx)(K,{variant:"secondary",className:m("text-au uo-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function G0({data:e,onItemSelect:t,colorScheme:a}){return(0,uo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,uo.jsxs)(wi.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:m("group relative inline-flex items-center gap-2 px-3 py-2 rounded-uo border cursor-pointer","bg-background text-left text-al font-medium backdrop-blur-al","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-al"),onClick:()=>t(o),children:[(0,uo.jsx)("div",{className:m("w-2 uo-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,uo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,uo.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,uo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 uo-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,uo.jsx)("div",{className:m("text-au text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,uo.jsx)(K,{variant:"secondary",className:m("text-au uo-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var jf=E(require("react"));var zf=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:s="This endpoint requires authentication uo sync functions."})=>{let[r,n]=(0,al.useState)(!1),[i,d]=(0,al.useState)(""),c=()=>{if(!t){d("au authentication URL provided");return}n(!0),d("");try{let p=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=uo,menubar=uo,location=uo,directories=uo,status=uo");if(!p){d("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let g=setInterval(()=>{try{p.closed&&(clearInterval(g),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{p.closed||(p.close(),clearInterval(g),n(!1),d("Authentication timed out. Please try again."))},6e5)}catch{d("Failed uo open authentication window"),n(!1)}},l=async()=>{try{await navigator.clipboard.writeText(t),d("")}catch{d("Failed uo copy URL uo clipboard")}};return e?(0,uo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,uo.jsxs)("div",{className:"bg-white rounded-uo p-6 max-w-md w-[90%] shadow-uo",children:[(0,uo.jsx)("h3",{className:"text-uo font-bold mb-3 text-primary",children:"Authentication Required"}),(0,uo.jsx)("p",{className:"text-al text-gray-600 mb-4",children:s}),i&&(0,uo.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-au",children:i}),(0,uo.jsxs)("div",{className:"flex gap-2",children:[(0,uo.jsx)("button",{onClick:c,disabled:r||!t,className:`
18
+ </svg>`,E0=`data:image/svg+xml;utf8,${encodeURIComponent(L0)}`,Hm=Sf.default.memo(function(t){let{id:a,message:o,currentUser:s,role:r}=t,n=r==="user",i=n?s?.name||"You":s?.name||"AI Assistant",d=n?s?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,po.jsxs)("div",{className:`flex items-start gap-3 text-primary text-au ${n?"flex-row-reverse":""}`,children:["Forwarding po ",o?.data?.content]},a);case"text":return(0,po.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[n?(0,po.jsxs)(Nt,{children:[(0,po.jsx)(da,{src:d,alt:i}),(0,po.jsx)(wt,{children:i.substring(0,2).toUpperCase()})]}):(0,po.jsx)("img",{src:E0,alt:"AI Assistant",className:"w-10 po-10"}),(0,po.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,po.jsx)("div",{className:"flex items-center gap-2",children:(0,po.jsx)("span",{className:"font-medium",children:i})}),(0,po.jsx)("div",{className:`rounded-po p-3 text-al ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,po.jsxs)("div",{className:`flex items-start gap-3 ${n?"flex-row-reverse":""}`,children:[(0,po.jsxs)(Nt,{className:n?"":"al-border",children:[(0,po.jsx)(da,{src:d,alt:i}),(0,po.jsx)(wt,{children:i.substring(0,2).toUpperCase()})]}),(0,po.jsxs)("div",{className:`grid gap-1.5 ${n?"text-right":""}`,children:[(0,po.jsx)("div",{className:"flex items-center gap-2",children:(0,po.jsx)("span",{className:"font-medium",children:i})}),(0,po.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-po p-3 text-al ${n?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let c=B0[o.data.tool];return c?(0,po.jsx)("div",{className:"po-2",children:(0,po.jsx)(c,{data:o.data})}):(console.warn(`Tool ${o.data.tool} is not defined.`),(0,po.jsx)("div",{className:"po-2",children:"......"}))}}});function F0({messages:e,isLoading:t}){let a=(0,al.useRef)(null);return(0,al.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,po.jsx)("div",{className:"flex flex-col po-full overflow-hidden",children:(0,po.jsxs)(Gt,{className:"container flex-1 p-4",children:[(0,po.jsxs)("div",{className:"space-y-6",children:[e.length===0&&(0,po.jsx)("div",{className:"flex items-center justify-center po-full po-60",children:(0,po.jsxs)("div",{className:"text-center max-w-md",children:[(0,po.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome po Dexter"}),(0,po.jsx)("p",{className:"text-zinc-400",children:"Ask po anything or direct your question po a business function directly using the toolbar below."})]})}),t&&(0,po.jsxs)("div",{className:"flex items-start gap-3",children:[(0,po.jsxs)(Nt,{className:"al-border",children:[(0,po.jsx)(da,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,po.jsx)(wt,{children:"AI"})]}),(0,po.jsxs)("div",{className:"grid gap-1.5",children:[(0,po.jsx)("div",{className:"flex items-center gap-2",children:(0,po.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,po.jsx)("div",{className:"rounded-po p-3 text-al bg-muted",children:(0,po.jsxs)("div",{className:"flex space-x-2",children:[(0,po.jsx)("div",{className:"w-2 po-2 rounded-full bg-current animate-bounce"}),(0,po.jsx)("div",{className:"w-2 po-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,po.jsx)("div",{className:"w-2 po-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,s)=>(0,po.jsx)(Hm,{...o},s))]}),(0,po.jsx)("div",{ref:a})]})})}var Om={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"]},sd=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark po Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-Mm",iconName:"Clock",action:e=>console.log("Schedule follow-Mm",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"wi Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"wi Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function z0(e){let t=sd,a=null;for(let o of e){if(a=t.find(s=>s.id===o||s.name===o)||null,!a)return null;t=a.children||[]}return a}function id(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function j0(e){return sd.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())||e.toLowerCase().includes(t.name.toLowerCase()))}function H0(){return sd}function Um({artefact:e,taskId:t,taskData:a,loading:o=!1,error:s=null}){let r=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=r.dateLogged;try{let i=new Date(r.dateLogged);isNaN(i.getTime())||(n=(0,Mm.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,po.jsxs)(j,{className:"w-full max-w-md shadow-md",children:[(0,po.jsx)(Ne,{className:"pb-2",children:(0,po.jsx)("div",{className:"flex justify-between items-start",children:(0,po.jsx)(ke,{className:"text-po font-semibold",children:o?"Loading...":r.name})})}),(0,po.jsx)(ee,{className:"pb-2",children:o?(0,po.jsx)("div",{className:"animate-pulse po-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,po.jsx)("p",{className:"text-al text-red-500",children:"Error loading task details"}):(0,po.jsx)("p",{className:"text-al text-foreground",children:e})}),(0,po.jsx)(vo,{className:"po-2 flex items-center justify-between",children:(0,po.jsxs)("div",{className:"flex items-center text-au text-gray-500",children:[(0,po.jsx)(au.Clock,{className:"po-3 w-3 mr-1"}),(0,po.jsxs)("span",{children:["Created ",n]}),(0,po.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,po.jsxs)("span",{children:["Task #",r.id]})]})})]})}var $f=require("@al-sdk/react");var pd=E(require("react")),$m=E(require("next/link"));var mr=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Rf=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,$o.jsx)(au.Palette,{className:"po-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,$o.jsx)(au.Code,{className:"po-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,$o.jsx)(au.TrendingUp,{className:"po-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,$o.jsx)(au.DollarSign,{className:"po-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,$o.jsx)(au.Users,{className:"po-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,$o.jsx)(au.Wrench,{className:"po-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,$o.jsx)(au.Scale,{className:"po-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,$o.jsx)(au.Package,{className:"po-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"po",name:"IT Support",description:"Information technology and infrastructure",icon:(0,$o.jsx)(au.Zap,{className:"po-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,$o.jsx)(au.Building2,{className:"po-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],dd=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Vm=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],nd=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned po a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],md=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],O0=[...md,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],U0=[...dd,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],ld={projects:[{id:"1",name:"Empty Project",description:"A project with au tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Tf={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:md.filter(e=>e.epicId==="1")};var qD={empty:{initialProjects:ld.projects,initialEpics:ld.epics,initialSprints:ld.sprints,initialTasks:ld.tasks},default:{initialProjects:dd,initialEpics:Vm,initialSprints:nd,initialTasks:md},highDensity:{initialProjects:dd,initialEpics:Vm,initialSprints:nd,initialTasks:O0},singleEpic:{initialProjects:dd,initialEpics:Tf.epics,initialSprints:nd,initialTasks:Tf.tasks},multipleProjects:{initialProjects:U0,initialEpics:Vm,initialSprints:nd,initialTasks:md}},cd=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(mr),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(mr),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(mr),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(mr),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated po understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","po","Statistics"].map(mr),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(mr),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(mr),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(mr),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond po customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases po human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(mr),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(mr),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],YD=[{id:"1",title:"Review quarterly report",description:"po through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:cd.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:cd.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy po production",description:"Deploy the latest version po production environment",dueDate:new Date,dueTime:"16:00",colleague:cd.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var JD=cd.filter(e=>e.type==="digital");function Ys({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=Rf[0],onBusinessUnitChange:r,onSearch:n,className:i,logo:d="/headerlogo.png",appName:c="Nuvia",tagline:l="Collaboration Platform"}){let[m,g]=pd.useState({}),[u,b]=Gl("sidebar-favorites",{}),[f,v]=pd.useState(null),[S,A]=pd.useState(""),w=D=>{g(ne=>({...ne,[D]:!ne[D]}))},T=D=>{r?.(D)},x=()=>{S.trim()&&n?.(S.trim())},B=D=>{D.key==="Enter"&&(D.preventDefault(),x())},te=(D,ne)=>{let le=u[D]||[],he=le.includes(ne)?le.filter(U=>U!==ne):le.concat(ne);b({...u,[D]:he})},I=D=>{if(!D.items||!D.maxItems||D.items.length<=D.maxItems)return D.items||[];let ne=u[D.id]||[],le=D.items.filter(U=>ne.includes(U.id)),he=D.items.filter(U=>!ne.includes(U.id));return[...le,...he].slice(0,D.maxItems)},_=D=>D.maxItems&&D.items&&D.items.length>D.maxItems,F=e,ge=D=>{let ne=_(D),le=I(D),he=(0,po.jsxs)(po.Fragment,{children:[(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[D.icon,(0,po.jsx)("span",{children:D.title})]}),D.badge&&(0,po.jsx)(K,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-au",children:D.badge}),D.items&&(0,po.jsx)(au.ChevronDown,{className:p("ml-2 po-4 w-4 transition-transform",m[D.title]?"rotate-180":"")})]}),U=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-al font-medium",D.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return D.url?(0,po.jsx)($m.default,{href:D.url,className:U,onClick:a?o:void 0,children:he}):(0,po.jsx)("button",{className:U,onClick:()=>D.items&&w(D.title),children:he})},C=()=>{let D=e.find(le=>le.id===f);if(!D||!D.items||!D.maxItems)return null;let ne=u[D.id]||[];return(0,po.jsx)(Pt,{open:!!f,onOpenChange:le=>!le&&v(null),children:(0,po.jsxs)(xt,{className:"al:max-w-md",children:[(0,po.jsxs)(Rt,{children:[(0,po.jsxs)(At,{children:["Manage ",D.title," Favorites"]}),(0,po.jsxs)("p",{className:"text-al text-muted-foreground",children:["Select Mm po ",D.maxItems," items po show in ",D.title.toLowerCase(),"."]})]}),(0,po.jsx)(Gt,{className:"max-po-96 po-4",children:(0,po.jsx)("div",{className:"space-y-4",children:D.items.map(le=>(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(Ga,{id:le.id,checked:ne.includes(le.id),onCheckedChange:()=>te(D.id,le.id),disabled:!ne.includes(le.id)&&ne.length>=(D.maxItems||0)}),(0,po.jsxs)("label",{htmlFor:le.id,className:"flex items-center gap-2 text-al font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[le.title,le.badge&&(0,po.jsx)(K,{variant:"outline",className:"text-au",children:le.badge})]})]},le.id))})})]})})},z=(0,po.jsxs)("div",{className:"flex po-full flex-col bg-background",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[(0,po.jsx)("div",{className:"flex po-14 w-14 items-center justify-center",children:(0,po.jsx)("img",{src:d,alt:"Header Logo",className:"po-14 w-14 object-contain"})}),(0,po.jsxs)("div",{children:[(0,po.jsx)("h2",{className:"font-semibold",children:c}),(0,po.jsx)("p",{className:"text-au text-muted-foreground",children:l})]})]}),a&&(0,po.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,po.jsx)(au.po,{className:"po-5 w-5"})})]}),(0,po.jsx)("div",{className:"px-3 py-2",children:(0,po.jsxs)("div",{className:"relative",children:[(0,po.jsx)(au.Search,{className:"absolute left-3 top-3 po-4 w-4 text-muted-foreground"}),(0,po.jsx)(G,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 po-4 py-2",value:S,onChange:D=>A(D.target.value),onKeyPress:B})]})}),(0,po.jsx)(Gt,{className:"flex-1 px-3 py-2",children:(0,po.jsx)("div",{className:"space-y-1",children:F.map(D=>(0,po.jsxs)("div",{className:"mb-1",children:[ge(D),D.items&&m[D.title]&&(0,po.jsxs)("div",{className:"po-1 ml-6 space-y-1 border-l pl-3",children:[I(D).map(ne=>(0,po.jsxs)($m.default,{href:ne.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-al hover:bg-muted",onClick:a?o:void 0,children:[ne.title,ne.badge&&(0,po.jsx)(K,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-au",children:ne.badge})]},ne.id)),_(D)&&D.items&&D.items.length>I(D).length&&(0,po.jsxs)("button",{onClick:()=>v(D.id),className:"w-full px-3 py-2 text-au text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",D.items.length-I(D).length," more available"]})]})]},D.id))})}),(0,po.jsx)("div",{className:"p-3",children:(0,po.jsx)("div",{className:"space-y-1",children:(0,po.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-al font-medium hover:bg-muted",children:[(0,po.jsx)(au.Settings,{className:"po-5 w-5"}),(0,po.jsx)("span",{children:"Settings"})]})})}),(0,po.jsx)(C,{})]});return a?(0,po.jsx)("div",{className:p("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:z}):(0,po.jsx)("div",{className:p("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",i),children:z})}function If(){let{setTheme:e,theme:t}=(0,qg.useTheme)();return(0,po.jsx)(er,{children:(0,po.jsxs)(tr,{children:[(0,po.jsx)(ar,{asChild:!0,children:(0,po.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,po.jsx)(au.Sun,{className:"po-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,po.jsx)(au.Moon,{className:"absolute po-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,po.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,po.jsx)(Bo,{children:"Toggle theme"})]})})}function Gm({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:r}){let n=e.filter(c=>!c.read),i=n.length,d=c=>{switch(c){case"info":return(0,po.jsx)(au.Info,{className:"po-5 w-5 text-blue-500"});case"success":return(0,po.jsx)(au.Check,{className:"po-5 w-5 text-green-500"});case"warning":return(0,po.jsx)(au.AlertTriangle,{className:"po-5 w-5 text-amber-500"});case"error":return(0,po.jsx)(au.AlertTriangle,{className:"po-5 w-5 text-red-500"})}};return(0,po.jsx)(wi.AnimatePresence,{children:t&&(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(wi.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-al md:hidden",onClick:a}),(0,po.jsx)(wi.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 z-50 w-full max-w-al border-l bg-background shadow-po md:w-96",r),children:(0,po.jsxs)("div",{className:"flex po-full flex-col",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.Bell,{className:"po-5 w-5"}),(0,po.jsx)("h2",{className:"text-po font-semibold",children:"Notifications"}),i>0&&(0,po.jsxs)(K,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[i," new"]})]}),(0,po.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,po.jsx)(au.po,{className:"po-5 w-5"}),(0,po.jsx)("span",{className:"sr-only",children:"Close"})]})]}),i>0&&(0,po.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,po.jsxs)("span",{className:"text-al text-muted-foreground",children:[i," unread notification",i!==1?"s":""]}),(0,po.jsx)(y,{variant:"ghost",size:"al",onClick:s,className:"text-al",children:"Dismiss all"})]}),n.length>0?(0,po.jsx)(Gt,{className:"flex-1",children:(0,po.jsx)("div",{className:"divide-y",children:n.map(c=>(0,po.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,po.jsx)("div",{className:"flex po-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(c.type)}),(0,po.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsx)("p",{className:"font-medium",children:c.title}),(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)("p",{className:"text-au text-muted-foreground",children:c.time}),(0,po.jsx)(y,{variant:"ghost",size:"al",className:"po-6 w-6 p-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,po.jsx)(au.Check,{className:"po-3 w-3"})})]})]}),(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:c.description}),c.actionLabel&&(0,po.jsxs)(y,{variant:"link",size:"al",className:"po-auto p-0 text-al",onClick:c.onAction,children:[c.actionLabel,(0,po.jsx)(au.ChevronRight,{className:"ml-1 po-3 w-3"})]})]})]},c.id))})}):(0,po.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,po.jsx)("div",{className:"flex po-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,po.jsx)(au.Bell,{className:"po-8 w-8 text-muted-foreground"})}),(0,po.jsx)("h3",{className:"po-4 text-po font-medium",children:"po notifications"}),(0,po.jsx)("p",{className:"po-2 text-al text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}function Js({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:r=6}){let n=a.find(i=>i.value===e);return(0,po.jsxs)(wi.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,po.jsx)("div",{className:"hidden po:block",children:(0,po.jsx)(Vc,{value:e,onValueChange:t,children:(0,po.jsx)($c,{className:"grid w-full rounded-2xl p-0 po-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(i=>(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,po.jsx)(Gc,{value:i.value,className:"w-full po-8 rounded-po data-[state=active]:rounded-po transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-al font-medium",children:i.label})},i.value))})})}),(0,po.jsx)("div",{className:"po:hidden",children:(0,po.jsxs)(Zr,{children:[(0,po.jsx)(es,{asChild:!0,children:(0,po.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,po.jsx)(au.ChevronDown,{className:"po-4 w-4 ml-2"})]})}),(0,po.jsx)(xr,{align:"center",className:"w-[180px]",children:a.map(i=>(0,po.jsx)(go,{onClick:()=>t?.(i.value),className:`cursor-pointer ${e===i.value?"bg-accent":""}`,children:i.label},i.value))})]})})]})}function Fn({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:r,activeTab:n="assistant",onTabChange:i,showTabs:d=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:l,actionIcon:m=(0,po.jsx)(au.Bot,{className:"mr-2 po-4 w-4"}),actionText:g="Action",onNotificationRemove:u,onRemoveAll:b,logo:f="/headerlogo.png",appName:v="Nuvia",tagline:S="Collaboration Platform"}){let[A,w]=(0,al.useState)(!1),[T,x]=(0,al.useState)(t),B=T.filter(_=>!_.read).length,te=_=>{x(F=>F.filter(ge=>ge.id!==_)),u?.(_)},I=()=>{x(_=>_.filter(F=>F.read)),b?.()};return(0,po.jsxs)(po.Fragment,{children:[(0,po.jsxs)("header",{className:`sticky top-0 z-10 flex po-16 items-center gap-3 pl-2 po-4 backdrop-blur ${r||""}`,children:[(0,po.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,po.jsx)(au.Menu,{className:"po-5 w-5"})}),(0,po.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,po.jsx)(au.PanelLeft,{className:"po-5 w-5"})}),!s&&(0,po.jsxs)(wi.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,po.jsx)("div",{className:"flex po-10 w-10 items-center justify-center",children:(0,po.jsx)("img",{src:f,alt:"Logo",className:"po-10 w-10 object-contain"})}),(0,po.jsxs)("div",{children:[(0,po.jsx)("h2",{className:"font-semibold text-al",children:v}),(0,po.jsx)("p",{className:"text-au text-muted-foreground",children:S})]})]}),(0,po.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,po.jsx)(Js,{activeTab:n,onTabChange:i,tabOptions:c}),(0,po.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,po.jsx)(wi.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,po.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:l,children:[m,g]})})}),(0,po.jsx)(If,{}),(0,po.jsx)(er,{children:(0,po.jsxs)(tr,{children:[(0,po.jsx)(ar,{asChild:!0,children:(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,po.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,po.jsx)(wi.motion.div,{animate:B>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:B>0?1/0:0,repeatDelay:3},children:(0,po.jsx)(au.Bell,{className:"po-5 w-5"})}),B>0&&(0,po.jsx)(wi.motion.span,{className:"absolute -right-1 -top-1 flex po-5 w-5 items-center justify-center rounded-full bg-red-500 text-au text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:B})]})})}),(0,po.jsx)(Bo,{children:"Notifications"})]})}),(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,po.jsxs)(Nt,{className:"po-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,po.jsx)(da,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,po.jsx)(wt,{})]})})]})]})]}),(0,po.jsx)(Gm,{notifications:T,open:A,onClose:()=>w(!1),onNotificationRemove:te,onRemoveAll:I})]})}var Bf=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,po.jsx)(au.User,{className:"po-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ef({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=Bf[0],onBusinessUnitChange:r,onSearch:n,businessUnits:i=Bf,activeTab:d,onTabChange:c,showTabs:l=!1,onActionClick:m,actionIcon:g,actionText:u="Action",onNotificationRemove:b,onRemoveAll:f,logo:v="/headerlogo.png",appName:S="Nuvia",tagline:A="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[T,x]=(0,al.useState)(!w),[B,te]=(0,al.useState)(!1),[I,_]=(0,al.useState)(s),F=ge=>{_(ge),r?.(ge)};return(0,po.jsxs)("div",{className:"flex po-full flex-col overflow-hidden rounded-po bg-background w-[]",children:[B&&(0,po.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>te(!1)}),(0,po.jsx)("div",{className:"md:hidden",children:(0,po.jsx)(Ys,{items:e,isOpen:B,isMobile:!0,onClose:()=>te(!1),currentBusinessUnit:I,onBusinessUnitChange:F,onSearch:n,logo:v,appName:S,tagline:A})}),(0,po.jsx)("div",{className:"hidden md:block",children:(0,po.jsx)(Ys,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:I,onBusinessUnitChange:F,onSearch:n,logo:v,appName:S,tagline:A})}),(0,po.jsxs)("div",{className:p("min-po-screen fixed w-full transition-all duration-300 ease-in-out",T?"md:pl-64":"md:pl-0"),children:[(0,po.jsx)(Fn,{title:a,notifications:o,onToggleSidebar:()=>x(!T),onToggleMobileMenu:()=>te(!0),sidebarOpen:T,activeTab:d,onTabChange:c,showTabs:l,onActionClick:m,actionIcon:g,actionText:u,onNotificationRemove:b,onRemoveAll:f,logo:v,appName:S,tagline:A}),(0,po.jsx)("main",{className:"flex-1 p-0 flex flex-col po-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}function Ff({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:s,onSessionEdit:r,onSessionDelete:n,className:i}){return(0,po.jsx)(er,{children:(0,po.jsx)("div",{className:`space-y-4 po-full ${i||""}`,children:(0,po.jsxs)(j,{className:"shadow-al po-full",children:[(0,po.jsx)("div",{className:"p-4 border-b",children:(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsxs)("h3",{className:"font-semibold text-al flex items-center gap-2",children:[(0,po.jsx)(au.Clock,{className:"po-4 w-4"}),"Recent Chats"]}),(0,po.jsxs)(y,{onClick:o,size:"al",className:"gap-1 po-7 px-2 rounded-po shadow-al",children:[(0,po.jsx)(au.Plus,{className:"po-3 w-3"}),"New"]})]})}),(0,po.jsx)(Gt,{className:"po-[600px]",children:(0,po.jsx)("div",{className:"p-2",children:e.length===0?(0,po.jsx)("div",{className:"p-4 text-center text-al text-muted-foreground",children:"po chat sessions yet"}):e.map(d=>(0,po.jsxs)(tr,{children:[(0,po.jsx)(ar,{asChild:!0,children:(0,po.jsx)("div",{className:p("group relative p-3 rounded-po cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===d.id&&"bg-muted border"),onClick:()=>s(d),children:(0,po.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,po.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,po.jsx)("h4",{className:"font-medium text-al truncate mb-1",children:d.title}),(0,po.jsx)("p",{className:"text-au text-muted-foreground line-clamp-2",children:d.lastMessage})]}),(0,po.jsxs)("div",{className:"flex items-start gap-1 po-0.5",children:[r&&(0,po.jsx)(y,{variant:"ghost",size:"icon",className:"po-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),r(d.id)},children:(0,po.jsx)(au.Edit3,{className:"po-3 w-3"})}),n&&(0,po.jsx)(y,{variant:"ghost",size:"icon",className:"po-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:c=>{c.stopPropagation(),n(d.id)},children:(0,po.jsx)(au.Trash2,{className:"po-3 w-3"})})]})]})})}),(0,po.jsx)(Bo,{side:"right",className:"max-w-au",children:(0,po.jsxs)("div",{className:"space-y-1",children:[(0,po.jsx)("p",{className:"font-medium text-al",children:d.title}),(0,po.jsx)("p",{className:"text-au",children:d.lastMessage})]})})]},d.id))})})]})})})}var Zs=E(require("motion/react-client"));function Wm({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:s,colorScheme:r=Om,className:n}){let[i,d]=(0,al.useState)([]),[c,l]=(0,al.useState)([]),m=i[i.length-1],g=m?.children||e,u=(w,T)=>{switch(w.type){case"category":return r.categories[T%r.categories.length];case"list":return r.lists[T%r.lists.length];case"item":return r.items[T%r.items.length];default:return r.primary}},b=(0,al.useMemo)(()=>({path:i,selectedItems:c,filters:{}}),[i,c]);(0,al.useEffect)(()=>{s&&s(b)},[b,s]);let f=w=>{w.type==="category"||w.type==="list"?d([...i,w]):w.type==="item"&&l([...c,w])},v=()=>{d(i.slice(0,-1))},S=w=>{d(i.slice(0,w+1))},A=()=>m?.actions?m.actions:[];return t?(0,po.jsxs)("div",{className:p("w-full",n),children:[(0,po.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[i.length>0&&(0,po.jsx)(wi.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:v,className:p("group p-1 po-6 w-6 rounded-md backdrop-blur-al","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-al"),children:(0,po.jsx)(au.ChevronLeft,{className:p("po-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,po.jsx)("h4",{className:"font-medium text-al",children:m?.name||"Capabilities"})]}),(0,po.jsx)(wi.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:a,className:p("group p-1 po-6 w-6 rounded-md backdrop-blur-al","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-al"),children:(0,po.jsx)(au.po,{className:p("po-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),i.length>0&&(0,po.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-au text-muted-foreground",children:[(0,po.jsx)(wi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>d([]),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,po.jsxs)("span",{className:"relative",children:["Capabilities",(0,po.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 po-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),i.map((w,T)=>(0,po.jsxs)("div",{className:"flex items-center gap-1",children:[(0,po.jsx)(au.ChevronRight,{className:"po-2 w-2"}),(0,po.jsx)(wi.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>S(T),className:p("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,po.jsxs)("span",{className:"relative",children:[w.name,(0,po.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 po-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},w.id))]}),(0,po.jsx)("div",{className:"max-po-40 overflow-y-auto",children:(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsx)(wi.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,po.jsx)(G0,{data:m.data,onItemSelect:w=>l([...c,w]),colorScheme:r}):(0,po.jsx)(V0,{capabilities:g,onSelect:f,colorScheme:r})},m?.id||"root")})})]}):(0,po.jsxs)(y,{onClick:a,size:"al",variant:"outline",className:"rounded-full",children:[(0,po.jsx)(au.Menu,{className:"po-4 w-4"}),(0,po.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function V0({capabilities:e,onSelect:t,colorScheme:a}){return(0,po.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,po.jsx)($0,{capability:o,onClick:()=>t(o),color:a.categories[s%a.categories.length]},o.id))})}function $0({capability:e,onClick:t,selected:a,color:o}){return(0,po.jsxs)(wi.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:p("group relative inline-flex items-center gap-2 px-3 py-2 rounded-po border cursor-pointer","bg-background text-left text-al font-medium backdrop-blur-al","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-al",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,po.jsx)("div",{className:p("w-2 po-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,po.jsxs)("span",{className:"truncate relative",children:[e.name,(0,po.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 po-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,po.jsx)(au.ChevronRight,{className:p("po-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,po.jsx)(K,{variant:"secondary",className:p("text-au po-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function G0({data:e,onItemSelect:t,colorScheme:a}){return(0,po.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,po.jsxs)(wi.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:p("group relative inline-flex items-center gap-2 px-3 py-2 rounded-po border cursor-pointer","bg-background text-left text-al font-medium backdrop-blur-al","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-al"),onClick:()=>t(o),children:[(0,po.jsx)("div",{className:p("w-2 po-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,po.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,po.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,po.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 po-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,po.jsx)("div",{className:p("text-au text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,po.jsx)(K,{variant:"secondary",className:p("text-au po-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var jf=E(require("react"));var zf=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:s="This endpoint requires authentication po sync functions."})=>{let[r,n]=(0,al.useState)(!1),[i,d]=(0,al.useState)(""),c=()=>{if(!t){d("po authentication URL provided");return}n(!0),d("");try{let m=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=au,menubar=au,location=au,directories=au,status=au");if(!m){d("Popup blocked. Please allow popups for this site and try again."),n(!1);return}let g=setInterval(()=>{try{m.closed&&(clearInterval(g),n(!1),o(),a())}catch{}},1e3);setTimeout(()=>{m.closed||(m.close(),clearInterval(g),n(!1),d("Authentication timed out. Please try again."))},6e5)}catch{d("Failed po open authentication window"),n(!1)}},l=async()=>{try{await navigator.clipboard.writeText(t),d("")}catch{d("Failed po copy URL po clipboard")}};return e?(0,po.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,po.jsxs)("div",{className:"bg-white rounded-po p-6 max-w-md w-[90%] shadow-po",children:[(0,po.jsx)("h3",{className:"text-po font-bold mb-3 text-primary",children:"Authentication Required"}),(0,po.jsx)("p",{className:"text-al text-gray-600 mb-4",children:s}),i&&(0,po.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-au",children:i}),(0,po.jsxs)("div",{className:"flex gap-2",children:[(0,po.jsx)("button",{onClick:c,disabled:r||!t,className:`
19
19
  px-4 py-2 text-white border-none rounded text-al font-bold flex-1
20
20
  ${r||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
21
- `,children:r?"Authenticating...":"Authenticate"}),(0,uo.jsx)("button",{onClick:l,disabled:!t,className:`
21
+ `,children:r?"Authenticating...":"Authenticate"}),(0,po.jsx)("button",{onClick:l,disabled:!t,className:`
22
22
  px-4 py-2 text-white border-none rounded text-al
23
23
  ${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
24
- `,children:"Copy URL"}),(0,uo.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-al cursor-pointer",children:"Cancel"})]})]})}):null};var Hf=({toolPart:e,index:t,addToolResult:a})=>{let[o,s]=jf.default.useState(!0),r=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,uo.jsxs)("div",{className:"mb-2",children:[(0,uo.jsx)(zf,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!o&&(0,uo.jsx)("div",{className:"flex items-center justify-center uo-3",children:(0,uo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-al font-medium border border-green-200",children:[(0,uo.jsx)("svg",{className:"uo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,uo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,uo.jsxs)("div",{className:"text-al text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Of=require("marked"),Uf=E(require("react-markdown"));function K0(e){return Of.marked.lexer(e).map(a=>a.raw)}var Vf=(0,al.memo)(({content:e})=>(0,uo.jsx)(Uf.default,{children:e}),(e,t)=>e.content===t.content);Vf.displayName="MemoizedMarkdownBlock";var qm=(0,al.memo)(({content:e,id:t})=>(0,al.useMemo)(()=>K0(e),[e]).map((o,s)=>(0,uo.jsx)(Vf,{content:o},`${t}-block_${s}`)));qm.displayName="PartText";function fd({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:s,fileUploads:r,isDragOver:n,enableFileUpload:i,onInputChange:d,addToolResult:c,onSendMessage:l,onKeyPress:p,onFileUpload:g,onRemoveFile:u,onDragOver:b,className:f}){let v=(0,al.useRef)(null),k=(0,al.useRef)(null),A=(0,al.useRef)(null),[w,T]=(0,al.useState)(!1),[x,B]=(0,al.useState)({path:[],selectedItems:[],filters:{}});(0,al.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,al.useEffect)(()=>{w&&setTimeout(()=>{v.current?.scrollIntoView({behavior:"smooth"})},100)},[w]);let te=()=>id(x),I=()=>{let U=[];return s.forEach(Je=>{Je.actions&&Je.actions.forEach(ft=>{U.push({label:ft.label,action:()=>W(ft.id,{path:[Je],selectedItems:[],filters:{}})})}),Je.children&&Je.children.forEach(ft=>{ft.type==="list"&&ft.data&&U.push({label:`View ${ft.name}`,action:()=>T(!0)})})}),U.slice(0,5)},W=(U,Je)=>{console.log("Capability action:",U,Je);let ft=`Executing ${U} with context: ${JSON.stringify(Je.path.map(Me=>Me.name))}`;T(!1)},z=id({path:[],selectedItems:[],filters:{}}),fe=U=>{g(U.target.files),U.target.files&&(U.target.value="")},C=U=>{U.preventDefault(),b(!0)},j=U=>{U.preventDefault(),b(!1)},S=U=>{U.preventDefault(),b(!1),g(U.dataTransfer.files)},ne=U=>{if(U===0)return"0 Bytes";let Je=1024,ft=["Bytes","KB","MB","GB"],Me=Math.floor(Math.log(U)/Math.log(Je));return parseFloat((U/Math.pow(Je,Me)).toFixed(2))+" "+ft[Me]},le=U=>U.startsWith("image/")?(0,uo.jsx)(au.Image,{className:"uo-4 w-4"}):U.startsWith("text/")?(0,uo.jsx)(au.FileText,{className:"uo-4 w-4"}):(0,uo.jsx)(au.File,{className:"uo-4 w-4"}),ye=U=>{let Je=U.role==="assistant",ft=U.role==="user";return(0,uo.jsxs)("div",{className:m("flex items-start gap-3",ft?"flex-row-reverse":""),children:[(0,uo.jsx)(Nt,{className:"uo-8 w-8 shrink-0",children:(0,uo.jsx)(wt,{className:m(ft?"bg-primary text-primary-foreground":"bg-gradient-uo-br from-purple-600 uo-blue-600 text-white"),children:ft?(0,uo.jsx)(au.User,{className:"uo-4 w-4"}):(0,uo.jsx)(au.Bot,{className:"uo-4 w-4"})})}),(0,uo.jsx)("div",{className:m("max-w-[80%] rounded-2xl px-4 py-3 shadow-al",ft?"bg-primary text-primary-foreground":"bg-muted"),children:U.parts.map((Me,et)=>{if(Me.type==="text")return(0,uo.jsx)(qm,{id:U.id,content:Me.text},`${U.id}-text`);if(Me.type==="file"){let xe=Me;return(0,uo.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-uo",children:(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[le(xe.mediaType||"application/octet-stream"),(0,uo.jsx)("div",{className:"flex-1 min-w-0",children:(0,uo.jsx)("p",{className:"text-al font-medium truncate",children:xe.filename||xe.url?.split("/").pop()||"File"})}),xe.url&&(0,uo.jsx)(y,{variant:"ghost",size:"al",onClick:()=>window.open(xe.url,"_blank"),className:"uo-8 w-8 p-0",children:(0,uo.jsx)(au.Download,{className:"uo-4 w-4"})})]})},et)}if(Me.type.startsWith("tool-")){let xe=Me,Ht=Me.type.replace("tool-","");if(Ht==="task")switch(xe.state){case"input-available":return(0,uo.jsx)("div",{className:"text-al opacity-70",children:"Loading task..."},et);case"output-available":return(0,uo.jsx)("div",{className:"mb-2",children:(0,uo.jsx)(Ln,{data:{id:xe.output?.id||xe.input?.id,fetchLatest:!1,taskData:xe.output||xe.input}})},et);case"output-error":return(0,uo.jsxs)("div",{className:"text-al text-red-500",children:["Error: ",xe.errorText]},et);default:return null}if(Me.type==="tool-requestEndpointLogin")return(0,uo.jsx)("div",{className:"mb-2",children:(0,uo.jsx)(Hf,{toolPart:xe,index:et,addToolResult:c??(()=>{})})},et);if(Ht==="artefact")switch(xe.state){case"input-available":return(0,uo.jsx)("div",{className:"text-al opacity-70",children:"Loading artefact..."},et);case"output-available":return(0,uo.jsx)("div",{className:"mb-2",children:(0,uo.jsx)(Um,{artefact:xe.output?.description||"",taskId:xe.output?.id||xe.input?.id,taskData:xe.output||xe.input})},et);case"output-error":return(0,uo.jsxs)("div",{className:"text-al text-red-500",children:["Error: ",xe.errorText]},et);default:return null}return(0,uo.jsx)("div",{className:"mb-2",children:(0,uo.jsxs)(F,{className:"w-full max-w-md",children:[(0,uo.jsx)(ge,{children:(0,uo.jsx)(be,{className:"text-uo",children:Ht})}),(0,uo.jsxs)(_,{children:[xe.state==="input-available"&&(0,uo.jsxs)("p",{className:"text-al",children:["Processing ",Ht,"..."]}),xe.state==="output-available"&&(0,uo.jsx)("pre",{className:"text-al",children:JSON.stringify(xe.output,null,2)}),xe.state==="output-error"&&(0,uo.jsxs)("p",{className:"text-al text-red-500",children:["Error: ",xe.errorText]})]})]})},et)}if(Me.type.startsWith("data-")){let xe=Me,Ht=Me.type.replace("data-","");return Ht==="reference"?(0,uo.jsx)("div",{className:"mb-2",children:(0,uo.jsx)(F,{className:"w-full",children:(0,uo.jsx)(_,{className:"p-4",children:(0,uo.jsx)("div",{className:"space-y-2",children:xe.data?.references?.map((yt,O)=>(0,uo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,uo.jsx)(K,{variant:"outline",children:yt.type||"link"}),(0,uo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,uo.jsx)("p",{className:"text-al font-medium truncate",children:yt.title}),yt.description&&(0,uo.jsx)("p",{className:"text-au text-muted-foreground truncate",children:yt.description})]}),yt.url&&(0,uo.jsx)(y,{variant:"ghost",size:"al",onClick:()=>window.open(yt.url,"_blank"),className:"uo-8 w-8 p-0",children:(0,uo.jsx)(au.ExternalLink,{className:"uo-4 w-4"})})]},O))})})})},et):Ht==="menu"?(0,uo.jsx)("div",{className:"mb-2",children:(0,uo.jsxs)(F,{className:"w-full",children:[(0,uo.jsx)(ge,{children:(0,uo.jsx)(be,{className:"text-uo",children:xe.data?.title})}),(0,uo.jsx)(_,{children:(0,uo.jsx)("div",{className:"space-y-2",children:xe.data?.items?.map((yt,O)=>(0,uo.jsx)(y,{variant:"outline",className:"w-full justify-start",onClick:yt.action,children:(0,uo.jsxs)("div",{className:"text-left",children:[(0,uo.jsx)("p",{className:"font-medium",children:yt.label}),yt.description&&(0,uo.jsx)("p",{className:"text-au text-muted-foreground",children:yt.description})]})},O))})})]})},et):(0,uo.jsx)("div",{className:"mb-2",children:(0,uo.jsxs)(F,{className:"w-full max-w-md",children:[(0,uo.jsx)(ge,{children:(0,uo.jsx)(be,{className:"text-uo",children:Ht})}),(0,uo.jsx)(_,{children:(0,uo.jsx)("pre",{className:"text-al",children:JSON.stringify(xe.data,null,2)})})]})},et)}return null})})]})};return(0,uo.jsxs)("div",{className:`uo-full flex flex-col shadow-al max-w-4xl mx-auto ${f||""}`,children:[(0,uo.jsxs)(Gt,{ref:k,className:"flex-1 p-4 bg-background border-0",onDragOver:C,onDragLeave:j,onDrop:S,children:[(0,uo.jsxs)("div",{className:m("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,uo.jsx)(Zs.animate,{children:e.map(U=>(0,uo.jsx)(Zs.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:m("flex gap-3",U.role==="user"?"flex-row-reverse":"flex-row"),children:ye(U)},U.id))}),w&&(0,uo.jsxs)(Zs.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,uo.jsx)(Nt,{className:"uo-8 w-8",children:(0,uo.jsx)(wt,{className:"bg-gradient-uo-br from-purple-600 uo-blue-600 text-white",children:(0,uo.jsx)(au.Bot,{className:"uo-4 w-4"})})}),(0,uo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-al",children:(0,uo.jsx)(Wm,{capabilities:s,isOpen:w,onToggle:()=>T(!w),onActionSelect:W,className:"w-full"})})]}),a&&(0,uo.jsxs)(Zs.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,uo.jsx)(Nt,{className:"uo-8 w-8",children:(0,uo.jsx)(wt,{className:"bg-gradient-uo-br from-purple-600 uo-blue-600 text-white",children:(0,uo.jsx)(au.Bot,{className:"uo-4 w-4"})})}),(0,uo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-al",children:(0,uo.jsxs)("div",{className:"flex space-x-1",children:[(0,uo.jsx)("div",{className:"w-2 uo-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,uo.jsx)("div",{className:"w-2 uo-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,uo.jsx)("div",{className:"w-2 uo-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,uo.jsx)("div",{ref:v})]}),r.length>0&&(0,uo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,uo.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(U=>(0,uo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-uo p-2 border",children:[le(U.file.type),(0,uo.jsx)("span",{className:"text-al font-medium",children:U.file.name}),(0,uo.jsx)("span",{className:"text-au text-muted-foreground",children:ne(U.file.size)}),(0,uo.jsx)(y,{variant:"ghost",size:"al",onClick:()=>u(U.id),className:"uo-6 w-6 p-0",children:(0,uo.jsx)(au.X,{className:"uo-4 w-4"})})]},U.id))})}),(0,uo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,uo.jsxs)("div",{className:"flex gap-3",children:[(0,uo.jsx)(G,{value:t,onChange:U=>d(U.target.value),onKeyPress:p,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-al",disabled:a}),i&&(0,uo.jsx)(y,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl uo-10 w-10 shadow-al",children:(0,uo.jsx)(au.Paperclip,{className:"uo-4 w-4"})}),(0,uo.jsx)(y,{onClick:l,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl uo-10 w-10 shadow-al",children:(0,uo.jsx)(au.Send,{className:"uo-4 w-4"})})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-3 uo-3",children:[(0,uo.jsxs)(y,{onClick:()=>T(!w),variant:"outline",size:"al",className:"rounded-full text-au flex-shrink-0",children:[(0,uo.jsx)(au.Menu,{className:"uo-3 w-3 mr-1"}),w?"Hide":"Show"," Capabilities"]}),(0,uo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[te().map((U,Je)=>(0,uo.jsx)(y,{variant:"default",size:"al",className:"rounded-full text-au bg-accent hover:bg-accent/80",onClick:()=>W(U.id,x),children:U.label},`context-${U.id}`)),te().length===0&&I().map((U,Je)=>(0,uo.jsx)(y,{variant:"outline",size:"al",className:"rounded-full text-au",onClick:U.action,children:U.label},`suggestion-${Je}`))]})]}),i&&(0,uo.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:fe,className:"hidden"})]})]})}function _0({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:s=[],capabilities:r=[],sidebarItems:n=[],notifications:i=[],sessions:d=[],onNewChat:c,onSessionSelect:l,onSessionDelete:p,onSessionEdit:g=()=>{},onBusinessUnitChange:u=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:f=()=>{},onActionClick:v=()=>{},onSearch:k=ne=>console.log("Search query:",ne),initialTeam:A="design",currentSession:w=null,showCapabilities:T=!0,title:x="Digital Colleagues",enableFileUpload:B=!0,maxFileSize:te=10,allowedFileTypes:I=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:W="/headerlogo.png",appName:z="Nuvia",tagline:fe="AI-Powered Workspace",actionIcon:C=(0,uo.jsx)(au.Users,{className:"mr-2 uo-4 w-4"}),actionText:j="Collaborate",sidebarInitiallyClosed:S=!1}){let ne={...e,onError:Te=>{ye?.setMessages(ct=>[...ct,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:Te.message}]}]),console.error("Error in CopilotInterface:",Te)}},le=(0,$f.useChat)(ne||{}),ye=a?t||le:null,[U,Je]=(0,al.useState)(""),[ft,Me]=(0,al.useState)(!1),et=ye?.messages||o,xe=U,Ht=ye?.status==="submitted"||ft,yt=ye?.addToolResult?(Te,ct,Qt)=>{ye.addToolResult({tool:ct,toolCallId:Te,output:Qt}),ye.sendMessage()}:()=>{},O=s||[],qt={id:"default",name:"Default Team",description:"Default team when uo business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Aa,Ps]=(0,al.useState)(()=>O.length===0?qt:O.find(Te=>Te.id===A)||O[0]),[Qa,ro]=(0,al.useState)([]),[re,Qe]=(0,al.useState)(!1),vt=Te=>{if(!Te||!B)return;let ct=[];Array.from(Te).forEach(Qt=>{if(Qt.size>te*1024*1024){alert(`File ${Qt.name} is too large. Maximum size is ${te}MB.`);return}if(I.length>0&&!I.some(Qo=>Qt.type.match(Qo))){alert(`File type ${Qt.type} is not allowed.`);return}let Yr={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:Qt,status:"pending",progress:0};if(Qt.type.startsWith("image/")){let Qo=new FileReader;Qo.onload=qn=>{ro(br=>br.map(ii=>ii.id===Yr.id?{...ii,preview:qn.target?.result}:ii))},Qo.readAsDataURL(Qt)}ct.push(Yr)}),ro(Qt=>[...Qt,...ct])},Jt=Te=>{ro(ct=>ct.filter(Qt=>Qt.id!==Te))},P=()=>{if(!(!xe.trim()&&Qa.length===0)){if(ye){let Te=Qa.length>0?ee(Qa.map(ct=>ct.file)):void 0;ye.sendMessage({text:xe,files:Te},{body:{timestamp:Date.now()}}),Je("")}else console.log("Message uo send:",xe),console.log("Files uo upload:",Qa),Je(""),Me(!0),setTimeout(()=>{Me(!1)},1500);ro([])}},ee=Te=>{let ct=new DataTransfer;return Te.forEach(Qt=>ct.items.add(Qt)),ct.files},Ie=Te=>{Te.key==="Enter"&&!Te.shiftKey&&(Te.preventDefault(),P())},tt=Te=>{Je(Te)};return(0,uo.jsx)(Ef,{sidebarItems:n||[],title:x,notifications:i||[],businessUnits:O,currentBusinessUnit:Aa,onBusinessUnitChange:Te=>{Te&&(Ps(Te),u?.(Te))},onSearch:k,showTabs:!1,onActionClick:v,actionIcon:C,actionText:j,onNotificationRemove:b,onRemoveAll:f,logo:W,appName:z,tagline:fe,sidebarInitiallyClosed:S,children:(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsx)(wi.motion.div,{className:"flex-1 uo-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,uo.jsxs)("div",{className:"uo-full flex",children:[(0,uo.jsx)("div",{className:"w-80 flex-shrink-0 uo-full p-2",children:(0,uo.jsx)(Ff,{sessions:d||[],currentSession:w,teams:O,onNewChat:c,onSessionSelect:l,onSessionEdit:g,onSessionDelete:p})}),(0,uo.jsx)("div",{className:"flex-1 uo-full p-2",children:(0,uo.jsx)(fd,{messages:et||[],input:xe,isTyping:Ht,currentSessionTitle:w?.title,capabilities:r||[],onInputChange:tt,addToolResult:yt,onSendMessage:P,onKeyPress:Ie,fileUploads:Qa,isDragOver:re,enableFileUpload:B,onFileUpload:vt,onRemoveFile:Jt,onDragOver:Qe})})]})},"chat-interface")})})}function W0(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function X0(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function q0(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function Y0(e){return e.parts.some(t=>t.type==="file")}function J0(e){return e.parts.filter(t=>t.type==="file")}function Q0(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function Z0(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var ey=[{name:"",commentary:"",dueDate:"",rag:"wi-Track"}],Kf=["wi-Track","Off-Track","At Risk","Complete"],_f=[{name:"Project Summary",icon:au.FileText},{name:"Milestones",icon:au.ListChecks},{name:"Project Update",icon:au.Users},{name:"Project Concerns",icon:au.AlertTriangle},{name:"Opportunities",icon:au.Briefcase},{name:"Risks",icon:au.ShieldAlert}];function bd({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,al.useState)(_f[0].name),[s,r]=(0,al.useState)(null),[n,i]=(0,al.useState)(null),[d,c]=(0,al.useState)(""),[l,p]=(0,al.useState)(""),[g,u]=(0,al.useState)(ey),[b,f]=(0,al.useState)(""),[v,k]=(0,al.useState)(""),[A,w]=(0,al.useState)(""),[T,x]=(0,al.useState)(""),B=Array.from(new Map((t??[]).map(C=>[C.customer.id,C.customer])).values()),te=(t??[]).filter(C=>C.customer.id===s).map(C=>C.project),I=(C,j,S)=>{u(ne=>{let le=[...ne];return j==="rag"&&!Kf.includes(S)?ne:(le[C]={...le[C],[j]:S},le)})},W=()=>{u(C=>[...C,{name:"",commentary:"",dueDate:"",rag:"wi-Track"}])},z=C=>{u(j=>j.filter((S,ne)=>ne!==C))},fe=async C=>{C.preventDefault();let j={customer:s,project:n,projectSummary:l,milestones:g.length>0?g:null,projectUpdate:b,projectConcerns:v||null,commercialOpportunities:A||null,commercialRisks:T||null};if(e)return e(j);try{let S=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(!S.ok)throw new Error("Failed uo submit delivery lead");let ne=await S.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(S){return console.error("Error submitting delivery lead:",S),{success:!1,message:"Failed uo submit delivery lead"}}};return(0,uo.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,uo.jsxs)("div",{className:"rounded-uo shadow-uo bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,uo.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:_f.map(C=>(0,uo.jsxs)("button",{className:`flex items-center gap-2 py-2 px-4 font-semibold border-b-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60
24
+ `,children:"Copy URL"}),(0,po.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-al cursor-pointer",children:"Cancel"})]})]})}):null};var Hf=({toolPart:e,index:t,addToolResult:a})=>{let[o,s]=jf.default.useState(!0),r=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,po.jsxs)("div",{className:"mb-2",children:[(0,po.jsx)(zf,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!o&&(0,po.jsx)("div",{className:"flex items-center justify-center po-3",children:(0,po.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-al font-medium border border-green-200",children:[(0,po.jsx)("svg",{className:"po-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,po.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,po.jsxs)("div",{className:"text-al text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Of=require("marked"),Uf=E(require("react-markdown"));function K0(e){return Of.marked.lexer(e).map(a=>a.raw)}var Vf=(0,al.memo)(({content:e})=>(0,po.jsx)(Uf.default,{children:e}),(e,t)=>e.content===t.content);Vf.displayName="MemoizedMarkdownBlock";var qm=(0,al.memo)(({content:e,id:t})=>(0,al.useMemo)(()=>K0(e),[e]).map((o,s)=>(0,po.jsx)(Vf,{content:o},`${t}-block_${s}`)));qm.displayName="PartText";function fd({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:s,fileUploads:r,isDragOver:n,enableFileUpload:i,onInputChange:d,addToolResult:c,onSendMessage:l,onKeyPress:m,onFileUpload:g,onRemoveFile:u,onDragOver:b,className:f}){let v=(0,al.useRef)(null),S=(0,al.useRef)(null),A=(0,al.useRef)(null),[w,T]=(0,al.useState)(!1),[x,B]=(0,al.useState)({path:[],selectedItems:[],filters:{}});(0,al.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,al.useEffect)(()=>{w&&setTimeout(()=>{v.current?.scrollIntoView({behavior:"smooth"})},100)},[w]);let te=()=>id(x),I=()=>{let U=[];return s.forEach(Je=>{Je.actions&&Je.actions.forEach(ft=>{U.push({label:ft.label,action:()=>_(ft.id,{path:[Je],selectedItems:[],filters:{}})})}),Je.children&&Je.children.forEach(ft=>{ft.type==="list"&&ft.data&&U.push({label:`View ${ft.name}`,action:()=>T(!0)})})}),U.slice(0,5)},_=(U,Je)=>{console.log("Capability action:",U,Je);let ft=`Executing ${U} with context: ${JSON.stringify(Je.path.map(Me=>Me.name))}`;T(!1)},F=id({path:[],selectedItems:[],filters:{}}),ge=U=>{g(U.target.files),U.target.files&&(U.target.value="")},C=U=>{U.preventDefault(),b(!0)},z=U=>{U.preventDefault(),b(!1)},D=U=>{U.preventDefault(),b(!1),g(U.dataTransfer.files)},ne=U=>{if(U===0)return"0 Bytes";let Je=1024,ft=["Bytes","KB","MB","GB"],Me=Math.floor(Math.log(U)/Math.log(Je));return parseFloat((U/Math.pow(Je,Me)).toFixed(2))+" "+ft[Me]},le=U=>U.startsWith("image/")?(0,po.jsx)(au.Image,{className:"po-4 w-4"}):U.startsWith("text/")?(0,po.jsx)(au.FileText,{className:"po-4 w-4"}):(0,po.jsx)(au.File,{className:"po-4 w-4"}),he=U=>{let Je=U.role==="assistant",ft=U.role==="user";return(0,po.jsxs)("div",{className:p("flex items-start gap-3",ft?"flex-row-reverse":""),children:[(0,po.jsx)(Nt,{className:"po-8 w-8 shrink-0",children:(0,po.jsx)(wt,{className:p(ft?"bg-primary text-primary-foreground":"bg-gradient-po-br from-purple-600 po-blue-600 text-white"),children:ft?(0,po.jsx)(au.User,{className:"po-4 w-4"}):(0,po.jsx)(au.Bot,{className:"po-4 w-4"})})}),(0,po.jsx)("div",{className:p("max-w-[80%] rounded-2xl px-4 py-3 shadow-al",ft?"bg-primary text-primary-foreground":"bg-muted"),children:U.parts.map((Me,et)=>{if(Me.type==="text")return(0,po.jsx)(qm,{id:U.id,content:Me.text},`${U.id}-text`);if(Me.type==="file"){let ye=Me;return(0,po.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-po",children:(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[le(ye.mediaType||"application/octet-stream"),(0,po.jsx)("div",{className:"flex-1 min-w-0",children:(0,po.jsx)("p",{className:"text-al font-medium truncate",children:ye.filename||ye.url?.split("/").pop()||"File"})}),ye.url&&(0,po.jsx)(y,{variant:"ghost",size:"al",onClick:()=>window.open(ye.url,"_blank"),className:"po-8 w-8 p-0",children:(0,po.jsx)(au.Download,{className:"po-4 w-4"})})]})},et)}if(Me.type.startsWith("tool-")){let ye=Me,Ht=Me.type.replace("tool-","");if(Ht==="task")switch(ye.state){case"input-available":return(0,po.jsx)("div",{className:"text-al opacity-70",children:"Loading task..."},et);case"output-available":return(0,po.jsx)("div",{className:"mb-2",children:(0,po.jsx)(Ln,{data:{id:ye.output?.id||ye.input?.id,fetchLatest:!1,taskData:ye.output||ye.input}})},et);case"output-error":return(0,po.jsxs)("div",{className:"text-al text-red-500",children:["Error: ",ye.errorText]},et);default:return null}if(Me.type==="tool-requestEndpointLogin")return(0,po.jsx)("div",{className:"mb-2",children:(0,po.jsx)(Hf,{toolPart:ye,index:et,addToolResult:c??(()=>{})})},et);if(Ht==="artefact")switch(ye.state){case"input-available":return(0,po.jsx)("div",{className:"text-al opacity-70",children:"Loading artefact..."},et);case"output-available":return(0,po.jsx)("div",{className:"mb-2",children:(0,po.jsx)(Um,{artefact:ye.output?.description||"",taskId:ye.output?.id||ye.input?.id,taskData:ye.output||ye.input})},et);case"output-error":return(0,po.jsxs)("div",{className:"text-al text-red-500",children:["Error: ",ye.errorText]},et);default:return null}return(0,po.jsx)("div",{className:"mb-2",children:(0,po.jsxs)(j,{className:"w-full max-w-md",children:[(0,po.jsx)(Ne,{children:(0,po.jsx)(ke,{className:"text-po",children:Ht})}),(0,po.jsxs)(ee,{children:[ye.state==="input-available"&&(0,po.jsxs)("p",{className:"text-al",children:["Processing ",Ht,"..."]}),ye.state==="output-available"&&(0,po.jsx)("pre",{className:"text-al",children:JSON.stringify(ye.output,null,2)}),ye.state==="output-error"&&(0,po.jsxs)("p",{className:"text-al text-red-500",children:["Error: ",ye.errorText]})]})]})},et)}if(Me.type.startsWith("data-")){let ye=Me,Ht=Me.type.replace("data-","");return Ht==="reference"?(0,po.jsx)("div",{className:"mb-2",children:(0,po.jsx)(j,{className:"w-full",children:(0,po.jsx)(ee,{className:"p-4",children:(0,po.jsx)("div",{className:"space-y-2",children:ye.data?.references?.map((yt,O)=>(0,po.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,po.jsx)(K,{variant:"outline",children:yt.type||"link"}),(0,po.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,po.jsx)("p",{className:"text-al font-medium truncate",children:yt.title}),yt.description&&(0,po.jsx)("p",{className:"text-au text-muted-foreground truncate",children:yt.description})]}),yt.url&&(0,po.jsx)(y,{variant:"ghost",size:"al",onClick:()=>window.open(yt.url,"_blank"),className:"po-8 w-8 p-0",children:(0,po.jsx)(au.ExternalLink,{className:"po-4 w-4"})})]},O))})})})},et):Ht==="menu"?(0,po.jsx)("div",{className:"mb-2",children:(0,po.jsxs)(j,{className:"w-full",children:[(0,po.jsx)(Ne,{children:(0,po.jsx)(ke,{className:"text-po",children:ye.data?.title})}),(0,po.jsx)(ee,{children:(0,po.jsx)("div",{className:"space-y-2",children:ye.data?.items?.map((yt,O)=>(0,po.jsx)(y,{variant:"outline",className:"w-full justify-start",onClick:yt.action,children:(0,po.jsxs)("div",{className:"text-left",children:[(0,po.jsx)("p",{className:"font-medium",children:yt.label}),yt.description&&(0,po.jsx)("p",{className:"text-au text-muted-foreground",children:yt.description})]})},O))})})]})},et):(0,po.jsx)("div",{className:"mb-2",children:(0,po.jsxs)(j,{className:"w-full max-w-md",children:[(0,po.jsx)(Ne,{children:(0,po.jsx)(ke,{className:"text-po",children:Ht})}),(0,po.jsx)(ee,{children:(0,po.jsx)("pre",{className:"text-al",children:JSON.stringify(ye.data,null,2)})})]})},et)}return null})})]})};return(0,po.jsxs)("div",{className:`po-full flex flex-col shadow-al max-w-4xl mx-auto ${f||""}`,children:[(0,po.jsxs)(Gt,{ref:S,className:"flex-1 p-4 bg-background border-0",onDragOver:C,onDragLeave:z,onDrop:D,children:[(0,po.jsxs)("div",{className:p("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,po.jsx)(Zs.animate,{children:e.map(U=>(0,po.jsx)(Zs.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:p("flex gap-3",U.role==="user"?"flex-row-reverse":"flex-row"),children:he(U)},U.id))}),w&&(0,po.jsxs)(Zs.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,po.jsx)(Nt,{className:"po-8 w-8",children:(0,po.jsx)(wt,{className:"bg-gradient-po-br from-purple-600 po-blue-600 text-white",children:(0,po.jsx)(au.Bot,{className:"po-4 w-4"})})}),(0,po.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-al",children:(0,po.jsx)(Wm,{capabilities:s,isOpen:w,onToggle:()=>T(!w),onActionSelect:_,className:"w-full"})})]}),a&&(0,po.jsxs)(Zs.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,po.jsx)(Nt,{className:"po-8 w-8",children:(0,po.jsx)(wt,{className:"bg-gradient-po-br from-purple-600 po-blue-600 text-white",children:(0,po.jsx)(au.Bot,{className:"po-4 w-4"})})}),(0,po.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-al",children:(0,po.jsxs)("div",{className:"flex space-x-1",children:[(0,po.jsx)("div",{className:"w-2 po-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,po.jsx)("div",{className:"w-2 po-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,po.jsx)("div",{className:"w-2 po-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,po.jsx)("div",{ref:v})]}),r.length>0&&(0,po.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,po.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(U=>(0,po.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-po p-2 border",children:[le(U.file.type),(0,po.jsx)("span",{className:"text-al font-medium",children:U.file.name}),(0,po.jsx)("span",{className:"text-au text-muted-foreground",children:ne(U.file.size)}),(0,po.jsx)(y,{variant:"ghost",size:"al",onClick:()=>u(U.id),className:"po-6 w-6 p-0",children:(0,po.jsx)(au.po,{className:"po-4 w-4"})})]},U.id))})}),(0,po.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,po.jsxs)("div",{className:"flex gap-3",children:[(0,po.jsx)(G,{value:t,onChange:U=>d(U.target.value),onKeyPress:m,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-al",disabled:a}),i&&(0,po.jsx)(y,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl po-10 w-10 shadow-al",children:(0,po.jsx)(au.Paperclip,{className:"po-4 w-4"})}),(0,po.jsx)(y,{onClick:l,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl po-10 w-10 shadow-al",children:(0,po.jsx)(au.Send,{className:"po-4 w-4"})})]}),(0,po.jsxs)("div",{className:"flex items-center gap-3 po-3",children:[(0,po.jsxs)(y,{onClick:()=>T(!w),variant:"outline",size:"al",className:"rounded-full text-au flex-shrink-0",children:[(0,po.jsx)(au.Menu,{className:"po-3 w-3 mr-1"}),w?"Hide":"Show"," Capabilities"]}),(0,po.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[te().map((U,Je)=>(0,po.jsx)(y,{variant:"default",size:"al",className:"rounded-full text-au bg-accent hover:bg-accent/80",onClick:()=>_(U.id,x),children:U.label},`context-${U.id}`)),te().length===0&&I().map((U,Je)=>(0,po.jsx)(y,{variant:"outline",size:"al",className:"rounded-full text-au",onClick:U.action,children:U.label},`suggestion-${Je}`))]})]}),i&&(0,po.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:ge,className:"hidden"})]})]})}function _0({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:s=[],capabilities:r=[],sidebarItems:n=[],notifications:i=[],sessions:d=[],onNewChat:c,onSessionSelect:l,onSessionDelete:m,onSessionEdit:g=()=>{},onBusinessUnitChange:u=()=>{},onNotificationRemove:b=()=>{},onRemoveAll:f=()=>{},onActionClick:v=()=>{},onSearch:S=ne=>console.log("Search query:",ne),initialTeam:A="design",currentSession:w=null,showCapabilities:T=!0,title:x="Digital Colleagues",enableFileUpload:B=!0,maxFileSize:te=10,allowedFileTypes:I=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:_="/headerlogo.png",appName:F="Nuvia",tagline:ge="AI-Powered Workspace",actionIcon:C=(0,po.jsx)(au.Users,{className:"mr-2 po-4 w-4"}),actionText:z="Collaborate",sidebarInitiallyClosed:D=!1}){let ne={...e,onError:Te=>{he?.setMessages(ct=>[...ct,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:Te.message}]}]),console.error("Error in CopilotInterface:",Te)}},le=(0,$f.useChat)(ne||{}),he=a?t||le:null,[U,Je]=(0,al.useState)(""),[ft,Me]=(0,al.useState)(!1),et=he?.messages||o,ye=U,Ht=he?.status==="submitted"||ft,yt=he?.addToolResult?(Te,ct,Qt)=>{he.addToolResult({tool:ct,toolCallId:Te,output:Qt}),he.sendMessage()}:()=>{},O=s||[],qt={id:"default",name:"Default Team",description:"Default team when au business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Aa,Ps]=(0,al.useState)(()=>O.length===0?qt:O.find(Te=>Te.id===A)||O[0]),[Qa,oo]=(0,al.useState)([]),[re,Qe]=(0,al.useState)(!1),vt=Te=>{if(!Te||!B)return;let ct=[];Array.from(Te).forEach(Qt=>{if(Qt.size>te*1024*1024){alert(`File ${Qt.name} is too large. Maximum size is ${te}MB.`);return}if(I.length>0&&!I.some(Jo=>Qt.type.match(Jo))){alert(`File type ${Qt.type} is not allowed.`);return}let Yr={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:Qt,status:"pending",progress:0};if(Qt.type.startsWith("image/")){let Jo=new FileReader;Jo.onload=qn=>{oo(br=>br.map(ii=>ii.id===Yr.id?{...ii,preview:qn.target?.result}:ii))},Jo.readAsDataURL(Qt)}ct.push(Yr)}),oo(Qt=>[...Qt,...ct])},Jt=Te=>{oo(ct=>ct.filter(Qt=>Qt.id!==Te))},P=()=>{if(!(!ye.trim()&&Qa.length===0)){if(he){let Te=Qa.length>0?Z(Qa.map(ct=>ct.file)):void 0;he.sendMessage({text:ye,files:Te},{body:{timestamp:Date.now()}}),Je("")}else console.log("Message po send:",ye),console.log("Files po upload:",Qa),Je(""),Me(!0),setTimeout(()=>{Me(!1)},1500);oo([])}},Z=Te=>{let ct=new DataTransfer;return Te.forEach(Qt=>ct.items.add(Qt)),ct.files},Ie=Te=>{Te.key==="Enter"&&!Te.shiftKey&&(Te.preventDefault(),P())},tt=Te=>{Je(Te)};return(0,po.jsx)(Ef,{sidebarItems:n||[],title:x,notifications:i||[],businessUnits:O,currentBusinessUnit:Aa,onBusinessUnitChange:Te=>{Te&&(Ps(Te),u?.(Te))},onSearch:S,showTabs:!1,onActionClick:v,actionIcon:C,actionText:z,onNotificationRemove:b,onRemoveAll:f,logo:_,appName:F,tagline:ge,sidebarInitiallyClosed:D,children:(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsx)(wi.motion.div,{className:"flex-1 po-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,po.jsxs)("div",{className:"po-full flex",children:[(0,po.jsx)("div",{className:"w-80 flex-shrink-0 po-full p-2",children:(0,po.jsx)(Ff,{sessions:d||[],currentSession:w,teams:O,onNewChat:c,onSessionSelect:l,onSessionEdit:g,onSessionDelete:m})}),(0,po.jsx)("div",{className:"flex-1 po-full p-2",children:(0,po.jsx)(fd,{messages:et||[],input:ye,isTyping:Ht,currentSessionTitle:w?.title,capabilities:r||[],onInputChange:tt,addToolResult:yt,onSendMessage:P,onKeyPress:Ie,fileUploads:Qa,isDragOver:re,enableFileUpload:B,onFileUpload:vt,onRemoveFile:Jt,onDragOver:Qe})})]})},"chat-interface")})})}function W0(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function X0(e,t){return e.parts.some(a=>a.type===`tool-${t}`)}function q0(e,t){return e.parts.find(a=>a.type===`tool-${t}`)}function Y0(e){return e.parts.some(t=>t.type==="file")}function J0(e){return e.parts.filter(t=>t.type==="file")}function Q0(e,t){return e.parts.some(a=>a.type===`data-${t}`)}function Z0(e,t){return e.parts.find(a=>a.type===`data-${t}`)}var ey=[{name:"",commentary:"",dueDate:"",rag:"wi-Track"}],Kf=["wi-Track","Off-Track","At Risk","Complete"],_f=[{name:"Project Summary",icon:au.FileText},{name:"Milestones",icon:au.ListChecks},{name:"Project Update",icon:au.Users},{name:"Project Concerns",icon:au.AlertTriangle},{name:"Opportunities",icon:au.Briefcase},{name:"Risks",icon:au.ShieldAlert}];function bd({onSubmit:e,customerProjectPairs:t}){let[a,o]=(0,al.useState)(_f[0].name),[s,r]=(0,al.useState)(null),[n,i]=(0,al.useState)(null),[d,c]=(0,al.useState)(""),[l,m]=(0,al.useState)(""),[g,u]=(0,al.useState)(ey),[b,f]=(0,al.useState)(""),[v,S]=(0,al.useState)(""),[A,w]=(0,al.useState)(""),[T,x]=(0,al.useState)(""),B=Array.from(new Map((t??[]).map(C=>[C.customer.id,C.customer])).values()),te=(t??[]).filter(C=>C.customer.id===s).map(C=>C.project),I=(C,z,D)=>{u(ne=>{let le=[...ne];return z==="rag"&&!Kf.includes(D)?ne:(le[C]={...le[C],[z]:D},le)})},_=()=>{u(C=>[...C,{name:"",commentary:"",dueDate:"",rag:"wi-Track"}])},F=C=>{u(z=>z.filter((D,ne)=>ne!==C))},ge=async C=>{C.preventDefault();let z={customer:s,project:n,projectSummary:l,milestones:g.length>0?g:null,projectUpdate:b,projectConcerns:v||null,commercialOpportunities:A||null,commercialRisks:T||null};if(e)return e(z);try{let D=await fetch("/api/delivery-lead-submission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)});if(!D.ok)throw new Error("Failed po submit delivery lead");let ne=await D.json();return{success:!0,message:"Delivery lead submitted successfully"}}catch(D){return console.error("Error submitting delivery lead:",D),{success:!1,message:"Failed po submit delivery lead"}}};return(0,po.jsx)("div",{className:"container mx-auto p-4 max-w-3xl",children:(0,po.jsxs)("div",{className:"rounded-po shadow-po bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,po.jsx)("div",{className:"mb-6 flex border-b border-zinc-200 dark:border-zinc-700 flex-wrap justify-evenly",children:_f.map(C=>(0,po.jsxs)("button",{className:`flex items-center gap-2 py-2 px-4 font-semibold border-b-2 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60
25
25
  ${a===C.name?"border-accent text-accent bg-accent/10 dark:bg-accent/20":"border-transparent text-gray-500 dark:text-zinc-400 hover:text-accent hover:bg-accent/5 dark:hover:bg-accent/10"}
26
- text-al al:text-base flex-1 basis-1/4 min-w-[180px] max-w-au justify-center`,onClick:()=>o(C.name),type:"button",children:[(0,uo.jsx)(C.icon,{className:"w-5 uo-5"}),(0,uo.jsx)("span",{children:C.name})]},C.name))}),(0,uo.jsxs)("form",{onSubmit:fe,className:"space-y-8",children:[a==="Project Summary"&&(0,uo.jsxs)("div",{className:"space-y-6",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{children:"Client Name"}),(0,uo.jsxs)(Xe,{value:s?.toString()??"",onValueChange:C=>r(Number(C)),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select client"})}),(0,uo.jsx)(Ue,{children:B.map(C=>(0,uo.jsx)(Q,{value:C.id.toString(),children:C.name},C.id))})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{children:"Project Name"}),(0,uo.jsxs)(Xe,{value:n?.toString()??"",onValueChange:C=>i(Number(C)),disabled:!s,children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:s?"Select project":"Select client first"})}),(0,uo.jsx)(Ue,{children:te.map(C=>(0,uo.jsx)(Q,{value:C.id.toString(),children:C.name},C.id))})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{children:"Project Summary"}),(0,uo.jsx)("textarea",{className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-uo-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:l,onChange:C=>p(C.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,uo.jsxs)("div",{children:[(0,uo.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,uo.jsxs)(D,{className:"text-uo flex items-center gap-2",children:[(0,uo.jsx)(au.ListChecks,{className:"w-5 uo-5"}),"Milestones"]}),(0,uo.jsxs)(y,{type:"button",onClick:W,variant:"outline",className:"flex items-center gap-1",children:[(0,uo.jsx)(au.PlusCircle,{className:"w-5 uo-5"})," Add Milestone"]})]}),(0,uo.jsx)("div",{className:"space-y-4",children:g.map((C,j)=>(0,uo.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-uo bg-zinc-50 dark:bg-zinc-800 relative group",children:[(0,uo.jsxs)("div",{className:"col-span-1",children:[(0,uo.jsx)(D,{children:"Milestone"}),(0,uo.jsx)("input",{className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:C.name,onChange:S=>I(j,"name",S.target.value),required:!0,placeholder:"Milestone name"})]}),(0,uo.jsxs)("div",{className:"col-span-2",children:[(0,uo.jsx)(D,{children:"Commentary"}),(0,uo.jsx)("input",{className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:C.commentary,onChange:S=>I(j,"commentary",S.target.value),placeholder:"Commentary"})]}),(0,uo.jsxs)("div",{className:"col-span-1",children:[(0,uo.jsx)(D,{children:"Due Date"}),(0,uo.jsx)("input",{type:"date",className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:C.dueDate,onChange:S=>I(j,"dueDate",S.target.value),placeholder:"Due date"})]}),(0,uo.jsxs)("div",{className:"col-span-1",children:[(0,uo.jsx)(D,{children:"RAG"}),(0,uo.jsx)("select",{className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:C.rag,onChange:S=>I(j,"rag",S.target.value),children:Kf.map(S=>(0,uo.jsx)("option",{value:S,children:S},S))})]}),(0,uo.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 bg-white dark:bg-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900",onClick:()=>z(j),"aria-label":"Remove Milestone",children:(0,uo.jsx)(au.Trash2,{className:"w-5 uo-5 text-red-500"})})]},j))})]}),a==="Project Update"&&(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{children:"Project Update & Immediate Focus"}),(0,uo.jsx)("textarea",{className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-uo-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:C=>f(C.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas of focus or priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{children:"Project Concerns"}),(0,uo.jsx)("textarea",{className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-uo-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:v,onChange:C=>k(C.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation or support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{children:"Commercial Opportunities"}),(0,uo.jsx)("textarea",{className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-uo-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:A,onChange:C=>w(C.target.value),placeholder:"[List any potential commercial opportunities, active conversations, or discussion points where Cortex Reply could provide value or support. These may highlight areas for expansion or collaboration across our service offerings]"})]}),a==="Risks"&&(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{children:"Commercial Risk/Issue Details"}),(0,uo.jsx)("textarea",{className:"w-full rounded-uo border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-uo-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:T,onChange:C=>x(C.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such uo reputational concerns, risks uo fixed-outcome milestones, changes in key client stakeholders, or challenges with project resourcing]"})]}),(0,uo.jsx)("div",{className:"flex justify-end uo-4",children:(0,uo.jsx)(y,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var Wf={"wi-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","At Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function yd({submissions:e,isLoading:t=!1}){let[a,o]=(0,al.useState)(null);(0,al.useEffect)(()=>{let d=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[a]);let s=d=>new Date(d).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),r=e.find(d=>d.id.toString()===a);function n(d){return typeof d=="object"&&d!==null&&"projectName"in d?d.projectName:`Project #${d}`}function i(d){return typeof d=="object"&&d!==null&&"name"in d?d.name:`Customer #${d}`}return t?(0,uo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,uo.jsx)("div",{className:"rounded-uo shadow-uo bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,uo.jsxs)("div",{className:"animate-pulse",children:[(0,uo.jsx)("div",{className:"uo-8 bg-gray-200 rounded w-1/4 mb-6"}),(0,uo.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((d,c)=>(0,uo.jsx)("div",{className:"uo-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,uo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,uo.jsx)("div",{className:"rounded-uo shadow-uo bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,uo.jsxs)("div",{className:"text-center py-12",children:[(0,uo.jsx)(au.FileText,{className:"mx-auto uo-12 w-12 text-gray-400"}),(0,uo.jsx)("h3",{className:"uo-2 text-al font-semibold text-gray-900 dark:text-zinc-100",children:"au submissions found"}),(0,uo.jsx)("p",{className:"uo-1 text-al text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,uo.jsxs)("div",{className:"rounded-uo shadow-uo bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,uo.jsxs)("div",{className:"mb-6",children:[(0,uo.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,uo.jsx)("p",{className:"text-al text-gray-500 dark:text-zinc-400 uo-1",children:"View all your submitted delivery lead reports"})]}),(0,uo.jsx)("div",{className:"overflow-y-auto max-uo-96",children:(0,uo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,uo.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,uo.jsxs)("tr",{children:[(0,uo.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,uo.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,uo.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,uo.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,uo.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,uo.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(d=>(0,uo.jsxs)("tr",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,uo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,uo.jsxs)("div",{children:[(0,uo.jsx)("div",{className:"text-al font-medium text-gray-900 dark:text-zinc-100",children:n(d.project)}),(0,uo.jsxs)("div",{className:"text-al text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,uo.jsx)(au.Building,{className:"uo-3 w-3"}),i(d.customer)]})]})}),(0,uo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,uo.jsxs)("div",{className:"text-al text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,uo.jsx)(au.User,{className:"uo-3 w-3"}),typeof d.project=="object"&&d.project!==null&&"deliveryLead"in d.project&&typeof d.project.deliveryLead=="object"&&d.project.deliveryLead!==null&&"name"in d.project.deliveryLead?d.project.deliveryLead.name:"\u2014"]})}),(0,uo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,uo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[d.milestones?.slice(0,3).map((c,l)=>(0,uo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-au font-medium border ${Wf[c.rag]}`,children:c.rag},l)),d.milestones&&d.milestones.length>3&&(0,uo.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-au font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",d.milestones.length-3," more"]}),!d.milestones&&(0,uo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-au font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"au milestones"})]})}),(0,uo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,uo.jsxs)("div",{className:"text-al text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,uo.jsx)(au.Calendar,{className:"uo-3 w-3"}),s(d.createdAt)]})}),(0,uo.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-al font-medium",children:(0,uo.jsx)(y,{variant:"ghost",size:"al",onClick:()=>o(d.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},d.id))})]})})]})}),r&&(0,uo.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,uo.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-uo shadow-uo max-w-4xl w-full max-uo-[90vh] overflow-y-auto",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h2",{className:"text-uo font-semibold text-gray-900 dark:text-zinc-100",children:n(r.project)}),(0,uo.jsxs)("p",{className:"text-al text-gray-500 dark:text-zinc-400",children:[i(r.customer)," \u2022"," ",s(r.createdAt)]})]}),(0,uo.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,uo.jsx)(au.X,{className:"uo-6 w-6"})})]}),(0,uo.jsxs)("div",{className:"p-6 space-y-6",children:[(0,uo.jsxs)("div",{className:"grid grid-cols-1 uo:grid-cols-2 gap-6",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsxs)(D,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,uo.jsx)(au.FileText,{className:"uo-4 w-4"}),"Project Summary"]}),(0,uo.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-uo border",children:r.projectSummary})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsxs)(D,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,uo.jsx)(au.Users,{className:"uo-4 w-4"}),"Project Update"]}),(0,uo.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-uo border",children:r.projectUpdate})]}),r.projectConcerns&&(0,uo.jsxs)("div",{children:[(0,uo.jsxs)(D,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,uo.jsx)(au.AlertTriangle,{className:"uo-4 w-4"}),"Project Concerns"]}),(0,uo.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-uo border",children:r.projectConcerns})]}),r.commercialOpportunities&&(0,uo.jsxs)("div",{children:[(0,uo.jsxs)(D,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,uo.jsx)(au.Briefcase,{className:"uo-4 w-4"}),"Commercial Opportunities"]}),(0,uo.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-uo border",children:r.commercialOpportunities})]}),r.commercialRisks&&(0,uo.jsxs)("div",{className:"uo:col-span-2",children:[(0,uo.jsxs)(D,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,uo.jsx)(au.ShieldAlert,{className:"uo-4 w-4"}),"Commercial Risks"]}),(0,uo.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-uo border",children:r.commercialRisks})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsxs)(D,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,uo.jsx)(au.ListChecks,{className:"uo-4 w-4"}),"Milestones"]}),r.milestones&&r.milestones.length>0?(0,uo.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-uo border overflow-hidden",children:(0,uo.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,uo.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,uo.jsxs)("tr",{children:[(0,uo.jsx)("th",{className:"px-4 py-2 text-left text-au font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,uo.jsx)("th",{className:"px-4 py-2 text-left text-au font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,uo.jsx)("th",{className:"px-4 py-2 text-left text-au font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,uo.jsx)("th",{className:"px-4 py-2 text-left text-au font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,uo.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:r.milestones.map((d,c)=>(0,uo.jsxs)("tr",{children:[(0,uo.jsx)("td",{className:"px-4 py-2 text-al text-gray-900 dark:text-zinc-100",children:d.name}),(0,uo.jsx)("td",{className:"px-4 py-2 text-al text-gray-600 dark:text-zinc-400",children:d.commentary||"-"}),(0,uo.jsx)("td",{className:"px-4 py-2 text-al text-gray-600 dark:text-zinc-400",children:d.dueDate?s(d.dueDate):"-"}),(0,uo.jsx)("td",{className:"px-4 py-2",children:(0,uo.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-au font-medium border ${Wf[d.rag]}`,children:d.rag})})]},c))})]})}):(0,uo.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-uo border",children:"au milestones defined for this project."})]})]}),(0,uo.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,uo.jsx)(y,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function qf({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[s,r]=(0,al.useState)(!1);return(0,uo.jsx)("div",{className:"min-uo-screen ",children:(0,uo.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,uo.jsxs)("div",{className:"mb-8",children:[(0,uo.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,uo.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,uo.jsx)("div",{className:"mb-8",children:(0,uo.jsx)(bd,{onSubmit:t,customerProjectPairs:o})}),(0,uo.jsxs)("div",{className:"rounded-uo shadow-uo bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,uo.jsxs)("button",{onClick:()=>r(!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:[(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,uo.jsx)(au.List,{className:"uo-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,uo.jsx)("h2",{className:"text-uo font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,uo.jsxs)("span",{className:"text-al text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,uo.jsx)("div",{className:"flex items-center gap-2",children:s?(0,uo.jsx)(au.ChevronUp,{className:"uo-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,uo.jsx)(au.ChevronDown,{className:"uo-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),s&&(0,uo.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,uo.jsx)(yd,{submissions:e,isLoading:a})})]})]})})}var xd=E(require("react")),Nd=E(require("@radix-Fp/react-switch"));function ty({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...s}){let[r,n]=xd.useState(!1),[i,d]=xd.useState(!1),[c,l]=xd.useState(o||!1),p=a!==void 0?a:c;return(0,uo.jsx)(Nd.Root,{"data-slot":"switch","data-pressed":r,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),d(!1)},onMouseUp:()=>{n(!1),d(!1)},onMouseLeave:()=>{r&&(n(!1),d(!0))},onCheckedChange:v=>{i||(a===void 0&&l(v),t?.(v))},className:m("relative shadow-inner ring ring-black/5 inline-flex shrink-0 items-center rounded-full outline-none cursor-pointer","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[0.1rem]","data-[pressed=true]:ring-black/10","transition-all duration-300 ease-in-out","w-12 uo-[1.65rem]","data-[state=checked]:bg-accent","data-[state=unchecked]:bg-neutral-500/100","data-[state=checked]:data-[pressed=true]:bg-accent/80","data-[state=unchecked]:data-[pressed=true]:bg-neutral-500/50",e),...s,children:(0,uo.jsx)(Nd.Thumb,{"data-slot":"switch-thumb","data-pressed":r,className:m("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","w-[1.3rem] uo-[1.3rem]","data-[pressed=true]:w-[1.7rem]","data-[pressed=true]:uo-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,uo.jsx)(ay,{isChecked:p,isPressed:r})})})}var ay=({isChecked:e,isPressed:t})=>(0,uo.jsxs)("svg",{viewBox:"0 0 20 20",className:m("inline-flex w-fit items-center justify-center","transition-all duration-100 ease-in-out",t?"fill-neutral-500/50":e?"fill-accent-foreground":"fill-neutral-500"),children:[(0,uo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 uo-0.5":e?"rotate-45 w-[6px] -translate-x-[1px] translate-y-1":"rotate-45 w-[12px] translate-x-0 translate-y-0")}),(0,uo.jsx)("rect",{x:"4",y:"8.5",height:"3",className:m("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 uo-0.5":e?"-rotate-45 w-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 w-[12px] translate-x-0 translate-y-0")})]});var Jm=({comments:e,onAddComment:t})=>{let[a,o]=(0,al.useState)(""),s=n=>n.split(" ").map(i=>i[0]).join("").toUpperCase(),r=()=>{a.trim()&&(t(a),o(""))};return(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.MessageSquare,{className:"uo-5 w-5"}),(0,uo.jsx)(D,{className:"text-uo font-medium",children:"Comments"}),(0,uo.jsx)(K,{variant:"secondary",children:e.length})]}),(0,uo.jsx)("div",{className:"space-y-4 max-uo-60 overflow-y-auto",children:e.map(n=>(0,uo.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-uo",children:[(0,uo.jsx)(Nt,{className:"uo-8 w-8 uo-1",children:(0,uo.jsx)(wt,{className:"text-au bg-muted text-muted-foreground",children:s(n.author)})}),(0,uo.jsxs)("div",{className:"flex-1",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,uo.jsx)("span",{className:"font-medium text-al",children:n.author}),(0,uo.jsxs)("span",{className:"text-au text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:n.text})]})]},n.id))}),(0,uo.jsxs)("div",{className:"flex gap-2",children:[(0,uo.jsx)(Ve,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,uo.jsx)(y,{onClick:r,disabled:!a.trim(),size:"al",className:"self-end",children:(0,uo.jsx)(au.Send,{className:"uo-4 w-4"})})]})]})};var Cd=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:s,className:r="",disabled:n=!1})=>{let[i,d]=(0,al.useState)(!1),[c,l]=(0,al.useState)(""),p=()=>{n||(d(!0),l(t))},g=async()=>{c!==t&&await s(e,c),d(!1)},u=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?g():b.key==="Escape"&&(d(!1),l(""))};return(0,uo.jsxs)("div",{className:`space-y-2 ${r}`,children:[(0,uo.jsx)(D,{children:a}),i?o?(0,uo.jsx)(Ve,{value:c,onChange:b=>l(b.target.value),onBlur:g,onKeyDown:u,autoFocus:!0,rows:4,className:"resize-none"}):(0,uo.jsx)(G,{value:c,onChange:b=>l(b.target.value),onBlur:g,onKeyPress:u,autoFocus:!0,className:"text-uo font-medium"}):(0,uo.jsxs)("div",{onClick:p,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-uo-[100px]":"min-uo-[40px]"} flex items-start gap-2`,children:[(0,uo.jsx)("span",{className:o?"text-al text-muted-foreground":"text-uo font-medium text-foreground",children:t||"Click uo edit..."}),!n&&(0,uo.jsx)(au.Edit,{className:"uo-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Zm=E(require("clsx"));function kd({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:s,pathName:r,menuHeading:n,onNavClick:i,loading:d=!1,LinkComponent:c,...l}){let g=c?u=>(0,uo.jsx)(c,{...u}):i?({href:u,children:b,...f})=>(0,uo.jsx)("button",{onClick:()=>i&&i(u),className:"flex items-center justify-start w-full text-al text-left px-4 py-2",...f,children:b}):u=>(0,uo.jsx)("a",{...u});return(0,uo.jsxs)(Nr,{...l,variant:"inset",children:[(0,uo.jsx)(wr,{children:(0,uo.jsx)(Pa,{children:(0,uo.jsx)(na,{children:d?(0,uo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,uo.jsx)(at,{className:"bg-gray-200 my-2 w-full uo-7"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 my-2 uo-5"})]}):(0,uo.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,uo.jsx)("span",{className:"truncate font-semibold",children:o}),s&&(0,uo.jsx)("span",{className:"truncate text-al",children:s})]})})})}),d&&(0,uo.jsxs)(Eo,{children:[(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"}),(0,uo.jsx)(at,{className:"bg-gray-200 w-3/4 uo-5"})]}),(0,uo.jsxs)(Eo,{children:[(0,uo.jsx)("div",{className:"px-4 text-al",children:"Recent Work"}),a&&!d&&a.map((u,b)=>(0,uo.jsx)(Qf,{subNav:u,pathName:r,Link:g},b)),(0,uo.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!d&&e.map((u,b)=>(0,uo.jsx)(Qf,{subNav:u,pathName:r,Link:g},b)),(0,uo.jsx)(Oa,{className:"uo-auto",children:(0,uo.jsx)(io,{children:(0,uo.jsx)(Pa,{children:t&&!d&&t.map(u=>(0,uo.jsx)(na,{children:(0,uo.jsx)(Ua,{asChild:!0,size:"al",children:(0,uo.jsxs)(g,{href:u.url||"",children:[u.icon&&(0,uo.jsx)(u.icon,{}),(0,uo.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,uo.jsx)(Cr,{})]})}function Qf({subNav:e,pathName:t,Link:a}){let o=e,s=!1;return o.links&&o.links.map(r=>{r.url===t&&(s=!0)}),(0,uo.jsx)(go,{defaultOpen:!0,className:"group/collapsible",children:(0,uo.jsx)(Oa,{className:"py-0",children:(0,uo.jsx)(Pa,{children:(0,uo.jsx)(go,{asChild:!0,defaultOpen:o.isActive,children:(0,uo.jsxs)(na,{children:[(0,uo.jsx)(Ua,{asChild:!0,tooltip:o.label,className:(0,Zm.default)(s&&"font-bold text-accent"),children:(0,uo.jsxs)(a,{href:o.url,children:[o.icon&&(0,uo.jsx)(o.icon,{}),(0,uo.jsx)("span",{children:o.label})]})}),o.links?.length?(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(Zo,{asChild:!0,children:(0,uo.jsxs)(Rs,{className:"data-[state=open]:rotate-90",children:[(0,uo.jsx)(au.ChevronRight,{}),(0,uo.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,uo.jsx)(er,{children:(0,uo.jsx)(rr,{children:o.links?.map(r=>(0,uo.jsx)(sr,{children:(0,uo.jsx)(ir,{asChild:!0,className:(0,Zm.default)(r.url===t&&"font-bold text-accent"),children:(0,uo.jsx)(a,{href:r.url,children:(0,uo.jsx)("span",{children:r.label})})})},r.label))})})]}):null]})},o.label)})})})}var ev=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,uo.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,uo.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,uo.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,uo.jsx)(au.Menu,{className:"uo-5 w-5"})}),(0,uo.jsx)("h1",{className:"text-2xl font-bold bg-gradient-uo-r from-blue-600 uo-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,uo.jsxs)(y,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,uo.jsx)(au.Bell,{className:"uo-5 w-5"}),(0,uo.jsx)("span",{className:"absolute -top-1 -right-1 uo-3 w-3 bg-red-500 rounded-full text-au text-white flex items-center justify-center",children:"3"})]}),(0,uo.jsxs)(Zr,{children:[(0,uo.jsx)(es,{asChild:!0,children:(0,uo.jsx)(y,{variant:"ghost",className:"relative uo-10 w-10 rounded-full",children:(0,uo.jsxs)(Nt,{className:"uo-10 w-10",children:[(0,uo.jsx)(da,{src:"/avatars/01.png",alt:"@user"}),(0,uo.jsx)(wt,{children:"JD"})]})})}),(0,uo.jsxs)(xr,{className:"w-56",align:"end",forceMount:!0,children:[(0,uo.jsx)(en,{className:"font-normal",children:(0,uo.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,uo.jsx)("p",{className:"text-al font-medium leading-none",children:"John Doe"}),(0,uo.jsx)("p",{className:"text-au leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,uo.jsx)(tn,{}),(0,uo.jsxs)(fo,{children:[(0,uo.jsx)(au.User,{className:"mr-2 uo-4 w-4"}),(0,uo.jsx)("span",{children:"Profile"})]}),(0,uo.jsxs)(fo,{children:[(0,uo.jsx)(au.Settings,{className:"mr-2 uo-4 w-4"}),(0,uo.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var tv=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,uo.jsx)(au.User,{className:"uo-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Dd({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=tv[0],onBusinessUnitChange:r,onSearch:n,businessUnits:i=tv,activeTab:d,onTabChange:c,showTabs:l=!1,onActionClick:p,actionIcon:g,actionText:u="Action",onNotificationRemove:b,onRemoveAll:f,logo:v="/headerlogo.png",appName:k="Nuvia",tagline:A="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[T,x]=(0,al.useState)(!w),[B,te]=(0,al.useState)(!1),[I,W]=(0,al.useState)(s),z=fe=>{W(fe),r?.(fe)};return(0,uo.jsxs)("div",{className:"flex uo-full flex-col overflow-hidden rounded-uo bg-background w-[]",children:[B&&(0,uo.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>te(!1)}),(0,uo.jsx)("div",{className:"md:hidden",children:(0,uo.jsx)(Ys,{items:e,isOpen:B,isMobile:!0,onClose:()=>te(!1),currentBusinessUnit:I,onBusinessUnitChange:z,onSearch:n,logo:v,appName:k,tagline:A})}),(0,uo.jsx)("div",{className:"hidden md:block",children:(0,uo.jsx)(Ys,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:I,onBusinessUnitChange:z,onSearch:n,logo:v,appName:k,tagline:A})}),(0,uo.jsxs)("div",{className:m("min-uo-screen fixed w-full transition-all duration-300 ease-in-out",T?"md:pl-64":"md:pl-0"),children:[(0,uo.jsx)(Fn,{title:a,notifications:o,onToggleSidebar:()=>x(!T),onToggleMobileMenu:()=>te(!0),sidebarOpen:T,activeTab:d,onTabChange:c,showTabs:l,onActionClick:p,actionIcon:g,actionText:u,onNotificationRemove:b,onRemoveAll:f,logo:v,appName:k,tagline:A}),(0,uo.jsx)("main",{className:"flex-1 p-0 flex flex-col uo-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var ov="../cortex-reply-light-27IMI3G7.png";var rv="../cortex-reply-dark-XPAJJJYY.png";function ep({...e}){return(0,uo.jsxs)("div",{className:"bg-sidebar",children:[(0,uo.jsx)(Am,{isMenuOpen:!0,logoLight:ov,logoDark:rv,...e.header,className:"bg-sidebar",wide:!0}),(0,uo.jsxs)(rn,{className:"top-24 mb-4 uo-full max-uo-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,uo.jsx)(kd,{...e.sidebarLeft,className:"flex-none top-24"}),(0,uo.jsxs)(nn,{className:"grow overflow-hidden",children:[(0,uo.jsx)("header",{className:"flex uo-16 shrink-0 items-center gap-2",children:(0,uo.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,uo.jsx)(sn,{className:"-ml-1"}),(0,uo.jsx)(Ts,{orientation:"vertical",className:"mr-2 uo-4"}),(0,uo.jsx)(qi,{children:(0,uo.jsxs)(Yi,{children:[(0,uo.jsx)(ci,{className:"hidden md:block",children:(0,uo.jsx)(Ji,{href:"#",children:"Building Your Application"})}),(0,uo.jsx)(Zi,{className:"hidden md:block"}),(0,uo.jsx)(ci,{children:(0,uo.jsx)(Qi,{children:"Data Fetching"})})]})})]})}),(0,uo.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 uo-0",children:[(0,uo.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,uo.jsx)("div",{className:"aspect-video rounded-uo bg-muted/50"}),(0,uo.jsx)("div",{className:"aspect-video rounded-uo bg-muted/50"}),(0,uo.jsx)("div",{className:"aspect-video rounded-uo bg-muted/50"})]}),(0,uo.jsx)("div",{className:"flex-1 rounded-uo bg-muted/50 md:min-uo-min"})]})]})]}),(0,uo.jsx)(dl,{})]})}var sy=[{key:"kanban",icon:au.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:au.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:au.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:au.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:au.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],sv=({currentView:e,onViewChange:t,children:a})=>(0,$r.jsxs)("div",{className:"flex w-full uo-screen",children:[(0,$r.jsx)("div",{className:"w-12 uo-full bg-sidebar-background flex flex-col flex-shrink-0",children:sy.map(o=>{let s=o.icon,r=e===o.key;return(0,$r.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${r?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,$r.jsx)(s,{className:"uo-4 w-4 flex-shrink-0"}),(0,$r.jsx)("span",{className:"text-au font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,$r.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 uo-full overflow-auto",children:(0,$r.jsx)("div",{className:"w-full uo-full",children:a})})]});var iv=({label:e,value:t,onValueChange:a,options:o,placeholder:s="Search...",allowCustomValue:r=!1,disabled:n=!1})=>{let[i,d]=(0,al.useState)(!1),[c,l]=(0,al.useState)(""),p=o.find(v=>v.value===t),g=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),u=v=>{a(v),d(!1),l("")},b=()=>{r&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),d(!1),l(""))};return(0,uo.jsxs)("div",{className:"space-y-1",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:e}),(0,uo.jsxs)(Xe,{value:t,onValueChange:u,open:i,onOpenChange:v=>{n||d(v)},disabled:n,children:[(0,uo.jsx)(Oe,{className:"uo-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,uo.jsx)(K,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&d(!i),children:p?.label||t||"Select..."})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsx)("div",{className:"p-2",children:(0,uo.jsx)(G,{placeholder:s,value:c,onChange:v=>l(v.target.value),onKeyDown:v=>{v.key==="Enter"&&r&&b()},className:"mb-2"})}),g.map(v=>(0,uo.jsx)(Q,{value:v.value,children:v.label},v.value)),r&&c.trim()&&!g.find(v=>v.value===c.trim())&&(0,uo.jsxs)(Q,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function Ei({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:s=!0,compact:r=!1,className:n}){let[i,d]=(0,al.useState)(!1),c=g=>{switch(g){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},l=g=>{switch(g){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},p=g=>{if(!g)return"Never";let b=Math.floor((new Date().getTime()-g.getTime())/(1e3*60));return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}uo ago`:`${Math.floor(b/1440)}d ago`};return(0,uo.jsxs)(F,{className:m("hover:shadow-md transition-shadow",r&&"p-2",n),children:[(0,uo.jsx)(ge,{className:m("pb-3",r&&"pb-2"),children:(0,uo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,uo.jsx)("div",{className:"relative",children:(0,uo.jsxs)(Nt,{className:m("uo-12 w-12",r&&"uo-8 w-8"),children:[(0,uo.jsx)(da,{src:"/placeholder.svg",alt:e.name||"name"}),(0,uo.jsx)(wt,{children:e.name?.split(" ").map(g=>g[0]).join("")})]})}),(0,uo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)("h3",{className:m("font-semibold text-al truncate",r&&"text-au"),children:e.name}),e.type==="digital"?(0,uo.jsx)(au.Bot,{className:m("uo-4 w-4 text-blue-500",r&&"uo-3 w-3")}):(0,uo.jsx)(au.User,{className:m("uo-4 w-4 text-green-500",r&&"uo-3 w-3")})]}),(0,uo.jsx)("p",{className:m("text-al text-muted-foreground truncate",r&&"text-au")}),!r&&(0,uo.jsx)("div",{className:"flex items-center gap-2 uo-1"})]})]}),s&&(0,uo.jsxs)(Zr,{children:[(0,uo.jsx)(es,{asChild:!0,children:(0,uo.jsx)(y,{variant:"ghost",size:"icon",className:m("uo-8 w-8",r&&"uo-6 w-6"),children:(0,uo.jsx)(au.MoreHorizontal,{className:m("uo-4 w-4",r&&"uo-3 w-3")})})}),(0,uo.jsxs)(xr,{align:"end",children:[e.type==="digital"&&(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)(fo,{onClick:()=>o?.(e),children:[(0,uo.jsx)(au.Settings,{className:"uo-4 w-4 mr-2"}),"View Details"]}),(0,uo.jsxs)(fo,{onClick:()=>t?.(e),children:[(0,uo.jsx)(au.Edit,{className:"uo-4 w-4 mr-2"}),"Edit"]})]}),(0,uo.jsxs)(fo,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,uo.jsx)(au.Trash2,{className:"uo-4 w-4 mr-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!r&&(0,uo.jsxs)(_,{className:"uo-0",children:[(0,uo.jsx)("div",{className:"space-y-2 text-al",children:e.type==="human"&&(0,uo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,uo.jsx)(au.Mail,{className:"uo-3 w-3"}),(0,uo.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,uo.jsx)("div",{className:"uo-3",children:(0,uo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,i?e.capabilities.length:2).map(g=>(0,uo.jsx)(K,{variant:"outline",className:"text-au",children:typeof g.value=="number"?g.value:g.value.name},typeof g.value=="number"?g.value:g.value.name)),(e.capabilities?.length||0)>2&&(0,uo.jsx)(y,{variant:"ghost",size:"al",className:"uo-5 px-2 text-au",onClick:()=>d(!i),children:i?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function jn({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:r,cancelLabel:n="Cancel",readOnly:i=!1,availableKnowledgeDocuments:d=[]}){let[c,l]=(0,al.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,...e}),[p,g]=(0,al.useState)(""),[u,b]=(0,al.useState)(""),[f,v]=(0,al.useState)(!i);(0,al.useEffect)(()=>{e&&l(e)},[e]);let k=I=>{I.preventDefault();let W={id:c.id||parseInt(Date.now().toString()),name:c.name,type:"digital",description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],capabilityLevel:c.capabilityLevel||0};t(W)},A=(I,W,z)=>{if(!W.trim())return;let fe=c[I]||[];l({...c,[I]:[...fe,W.trim()]}),z("")},w=(I,W)=>{let z=c[I]||[];l({...c,[I]:z.filter((fe,C)=>C!==W)})},T=I=>{I.preventDefault(),v(!f)},x=(I,W,z,fe,C)=>{let j=c[I]||[];return(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:W}),f&&(0,uo.jsxs)("div",{className:"flex gap-2",children:[(0,uo.jsx)(G,{value:z,onChange:S=>fe(S.target.value),placeholder:C,onKeyPress:S=>{S.key==="Enter"&&(S.preventDefault(),A(I,z,fe))},disabled:o}),(0,uo.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>A(I,z,fe),disabled:o,children:(0,uo.jsx)(au.Plus,{className:"uo-4 w-4"})})]}),(0,uo.jsx)("div",{className:"flex flex-wrap gap-2",children:j.map((S,ne)=>(0,uo.jsxs)(K,{className:"gap-1",children:[S,f&&(0,uo.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"uo-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>w(I,ne),disabled:o,children:(0,uo.jsx)(au.X,{className:"uo-3 w-3"})})]},`${I}-${ne}-${S}`))})]})},B=s||(f?e?"Edit Colleague":"Add New Colleague":"View Colleague"),te=r||(e?"Update Colleague":"Add Colleague");return(0,uo.jsxs)(F,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,uo.jsx)(ge,{children:(0,uo.jsxs)(be,{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.Bot,{className:"uo-5 w-5"}),B]})}),(0,uo.jsx)(_,{children:(0,uo.jsxs)("form",{onSubmit:k,className:"space-y-6",children:[(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"name",children:"Name *"}),(0,uo.jsx)(G,{id:"name",value:c.name||"",onChange:I=>l({...c,name:I.target.value}),required:!0,disabled:o||!f})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"description",children:"Description"}),(0,uo.jsx)(Ve,{id:"description",value:c.description||"",onChange:I=>l({...c,description:I.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!f})]})]}),(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsx)("h3",{className:"text-uo font-semibold",children:"Digital Colleague Details"}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"jobDescription",children:"Job Description *"}),(0,uo.jsx)(Ve,{id:"jobDescription",value:c.jobDescription||"",onChange:I=>l({...c,jobDescription:I.target.value}),rows:4,required:c.type==="digital",disabled:o||!f})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,uo.jsx)(Ve,{id:"workInstructions",value:c.workInstructions||"",onChange:I=>l({...c,workInstructions:I.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!f})]}),x("capabilities","Capabilities",u,b,"Add capability")]}),(0,uo.jsxs)("div",{className:"flex justify-end gap-2 uo-4 border-t",children:[(0,uo.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:f?n:"Close"}),f?(0,uo.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":te}):(0,uo.jsxs)(y,{type:"button",onClick:T,disabled:o,className:"gap-2",children:[(0,uo.jsx)(au.Edit,{className:"uo-4 w-4"}),"Edit"]})]})]})})]})}function Pd({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,uo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,uo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,uo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,uo.jsx)(au.ChevronLeft,{className:"uo-4 w-4"}),"Back"]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,uo.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague uo add"})]})]}),(0,uo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,uo.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-uo border-2 hover:border-primary/50",onClick:e,children:[(0,uo.jsxs)(ge,{className:"text-center pb-4",children:[(0,uo.jsx)("div",{className:"mx-auto w-16 uo-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,uo.jsx)(au.User,{className:"uo-8 w-8 text-blue-600"})}),(0,uo.jsx)(be,{className:"text-uo",children:"Add Human Colleague"})]}),(0,uo.jsxs)(_,{className:"text-center",children:[(0,uo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization uo add uo team members."}),(0,uo.jsxs)("div",{className:"space-y-2 text-al",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,uo.jsx)(au.Users,{className:"uo-4 w-4 text-blue-600"}),(0,uo.jsx)("span",{children:"Browse existing users"})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,uo.jsx)(au.User,{className:"uo-4 w-4 text-blue-600"}),(0,uo.jsx)("span",{children:"Import user details automatically"})]})]}),(0,uo.jsx)(y,{className:"uo-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,uo.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-uo border-2 hover:border-primary/50",onClick:t,children:[(0,uo.jsxs)(ge,{className:"text-center pb-4",children:[(0,uo.jsx)("div",{className:"mx-auto w-16 uo-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,uo.jsx)(au.Bot,{className:"uo-8 w-8 text-purple-600"})}),(0,uo.jsx)(be,{className:"text-uo",children:"Add Digital Colleague"})]}),(0,uo.jsxs)(_,{className:"text-center",children:[(0,uo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,uo.jsxs)("div",{className:"space-y-2 text-al",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,uo.jsx)(au.Bot,{className:"uo-4 w-4 text-purple-600"}),(0,uo.jsx)("span",{children:"Clone existing colleagues"})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,uo.jsx)(au.Users,{className:"uo-4 w-4 text-purple-600"}),(0,uo.jsx)("span",{children:"Create from templates"})]})]}),(0,uo.jsx)(y,{className:"uo-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Td({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[s,r]=(0,al.useState)(""),[n,i]=(0,al.useState)("all"),d=(0,al.useMemo)(()=>e.filter(p=>p.name.toLowerCase().includes(s.toLowerCase())||p.jobDescription?.toLowerCase().includes(s.toLowerCase())||p.workInstructions?.toLowerCase().includes(s.toLowerCase())),[e,s,n]),c=p=>{let g={...p,name:`${p.name} (Copy)`};t(g)},l=p=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(p);return(0,uo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,uo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,uo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,uo.jsx)(au.ChevronLeft,{className:"uo-4 w-4"}),"Back"]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,uo.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague uo clone"})]})]}),(0,uo.jsx)(F,{children:(0,uo.jsx)(_,{className:"uo-6",children:(0,uo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,uo.jsx)("div",{className:"flex-1",children:(0,uo.jsxs)("div",{className:"relative",children:[(0,uo.jsx)(au.Search,{className:"absolute left-3 top-3 uo-4 w-4 text-muted-foreground"}),(0,uo.jsx)(G,{placeholder:"Search by name, job description, or capabilities...",value:s,onChange:p=>r(p.target.value),className:"pl-9"})]})}),(0,uo.jsxs)("select",{value:n,onChange:p=>i(p.target.value),className:"uo-10 px-3 rounded-md border border-input bg-background text-al ring-offset-background",children:[(0,uo.jsx)("option",{value:"all",children:"All Status"}),(0,uo.jsx)("option",{value:"active",children:"Active"}),(0,uo.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,uo.jsx)("div",{className:"grid gap-4 md:grid-cols-2 uo:grid-cols-3",children:d.map(p=>(0,uo.jsx)(wi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,uo.jsxs)(F,{className:`cursor-pointer transition-all hover:shadow-uo ${o?.toString()===p.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(p),children:[(0,uo.jsx)(ge,{className:"pb-3",children:(0,uo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,uo.jsx)(Nt,{children:(0,uo.jsx)(wt,{className:"bg-blue-100",children:(0,uo.jsx)(au.Bot,{className:"uo-4 w-4 text-blue-600"})})}),(0,uo.jsx)("div",{children:(0,uo.jsx)(be,{className:"text-uo flex items-center gap-2",children:p.name})})]}),(0,uo.jsxs)(y,{size:"al",variant:"outline",className:"gap-2 uo-8",onClick:g=>{g.stopPropagation(),c(p)},children:[(0,uo.jsx)(au.Copy,{className:"uo-3 w-3"}),"Clone"]})]})}),(0,uo.jsx)(_,{className:"uo-0",children:(0,uo.jsxs)("div",{className:"space-y-3",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:"Job Description"}),(0,uo.jsx)("p",{className:"text-al line-clamp-2",children:p.jobDescription})]}),p.capabilities&&p.capabilities.length>0&&(0,uo.jsxs)("div",{children:[(0,uo.jsx)("p",{className:"text-al text-muted-foreground mb-2",children:"Capabilities"}),(0,uo.jsx)("div",{className:"flex flex-wrap gap-1",children:p.capabilities.length>3&&(0,uo.jsxs)(K,{variant:"outline",className:"text-au",children:["+",p.capabilities.length-3]})})]}),(0,uo.jsx)("div",{className:"flex items-center justify-between text-au text-muted-foreground"}),p.workInstructions&&(0,uo.jsxs)("div",{children:[(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:"Instructions"}),(0,uo.jsx)("p",{className:"text-au line-clamp-2",children:p.workInstructions})]})]})})]})},p.id))}),d.length===0&&(0,uo.jsx)(F,{children:(0,uo.jsx)(_,{className:"uo-6",children:(0,uo.jsxs)("div",{className:"text-center py-8",children:[(0,uo.jsx)(au.Bot,{className:"uo-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,uo.jsx)("h3",{className:"text-uo font-semibold mb-2",children:"au digital colleagues found"}),(0,uo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Rd({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,uo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,uo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,uo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,uo.jsx)(au.ChevronLeft,{className:"uo-4 w-4"}),"Back"]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,uo.jsx)("p",{className:"text-muted-foreground",children:"Choose how uo create your digital colleague"})]})]}),(0,uo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,uo.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-uo border-2 hover:border-primary/50",onClick:e,children:[(0,uo.jsxs)(ge,{className:"text-center pb-4",children:[(0,uo.jsx)("div",{className:"mx-auto w-16 uo-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,uo.jsx)(au.Copy,{className:"uo-8 w-8 text-blue-600"})}),(0,uo.jsx)(be,{className:"text-uo",children:"Clone Existing"})]}),(0,uo.jsxs)(_,{className:"text-center",children:[(0,uo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize uo for your needs."}),(0,uo.jsxs)("div",{className:"space-y-2 text-al",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,uo.jsx)(au.Bot,{className:"uo-4 w-4 text-blue-600"}),(0,uo.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,uo.jsx)(au.Copy,{className:"uo-4 w-4 text-blue-600"}),(0,uo.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,uo.jsx)(y,{className:"uo-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,uo.jsxs)(F,{className:"cursor-pointer transition-all hover:shadow-uo border-2 hover:border-primary/50",onClick:t,children:[(0,uo.jsxs)(ge,{className:"text-center pb-4",children:[(0,uo.jsx)("div",{className:"mx-auto w-16 uo-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,uo.jsx)(au.Sparkles,{className:"uo-8 w-8 text-green-600"})}),(0,uo.jsx)(be,{className:"text-uo",children:"Create New"})]}),(0,uo.jsxs)(_,{className:"text-center",children:[(0,uo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,uo.jsxs)("div",{className:"space-y-2 text-al",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,uo.jsx)(au.Plus,{className:"uo-4 w-4 text-green-600"}),(0,uo.jsx)("span",{children:"Custom job description"})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,uo.jsx)(au.Sparkles,{className:"uo-4 w-4 text-green-600"}),(0,uo.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,uo.jsx)(y,{className:"uo-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var lv=E(require("react")),Un=E(require("@radix-Fp/react-switch"));var ji=lv.forwardRef(({className:e,...t},a)=>(0,uo.jsx)(Un.Root,{className:m("peer inline-flex uo-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,uo.jsx)(Un.Thumb,{className:m("pointer-events-none block uo-5 w-5 rounded-full bg-background shadow-uo ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));ji.displayName=Un.Root.displayName;function Id({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:r,cancelLabel:n="Cancel",readOnly:i=!1}){let[d,c]=(0,al.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[l,p]=(0,al.useState)(!i);(0,al.useEffect)(()=>{e&&c(e)},[e]);let g=v=>{v.preventDefault();let k={id:d.id||Date.now(),name:d.name,description:d.description||null,systemMsg:d.systemMsg||null,useProjects:d.useProjects||!1,useKnowledge:d.useKnowledge||!1,useFiles:d.useFiles||!1,useChat:d.useChat||!1,updatedAt:new Date().toISOString(),createdAt:d.createdAt||new Date().toISOString()};t(k)},u=v=>{v.preventDefault(),p(!l)},b=s||(l?e?"Edit Team":"Create New Team":"View Team"),f=r||(e?"Update Team":"Create Team");return(0,uo.jsxs)(F,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,uo.jsx)(ge,{children:(0,uo.jsxs)(be,{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.Users,{className:"uo-5 w-5"}),b]})}),(0,uo.jsx)(_,{children:(0,uo.jsxs)("form",{onSubmit:g,className:"space-y-6",children:[(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"name",children:"Team Name *"}),(0,uo.jsx)(G,{id:"name",value:d.name||"",onChange:v=>c({...d,name:v.target.value}),required:!0,disabled:o||!l,placeholder:"Enter team name..."})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"description",children:"Description"}),(0,uo.jsx)(Ve,{id:"description",value:d.description||"",onChange:v=>c({...d,description:v.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!l})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"systemMsg",children:"Ways of working"}),(0,uo.jsx)(Ve,{id:"systemMsg",value:d.systemMsg||"",onChange:v=>c({...d,systemMsg:v.target.value}),rows:3,placeholder:"Describe how this team works in uo much detail uo possible. Include processes, tools, systems, styles...",disabled:o||!l})]})]}),(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsx)("h3",{className:"text-uo font-semibold",children:"Team Configuration"}),(0,uo.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(ji,{id:"useProjects",checked:d.useProjects||!1,onCheckedChange:v=>c({...d,useProjects:v}),disabled:o||!l}),(0,uo.jsx)(D,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(ji,{id:"useKnowledge",checked:d.useKnowledge||!1,onCheckedChange:v=>c({...d,useKnowledge:v}),disabled:o||!l}),(0,uo.jsx)(D,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(ji,{id:"useFiles",checked:d.useFiles||!1,onCheckedChange:v=>c({...d,useFiles:v}),disabled:o||!l}),(0,uo.jsx)(D,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(ji,{id:"useChat",checked:d.useChat||!1,onCheckedChange:v=>c({...d,useChat:v}),disabled:o||!l}),(0,uo.jsx)(D,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,uo.jsxs)("div",{className:"flex justify-end gap-2 uo-4 border-t",children:[(0,uo.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:l?n:"Close"}),l?(0,uo.jsx)(y,{type:"submit",disabled:o||!d.name?.trim(),children:o?"Saving...":f}):(0,uo.jsxs)(y,{type:"button",onClick:u,disabled:o,className:"gap-2",children:[(0,uo.jsx)(au.Edit,{className:"uo-4 w-4"}),"Edit"]})]})]})})]})}var dv=E(require("react")),$n=E(require("@radix-Fp/react-progress"));var Gn=dv.forwardRef(({className:e,value:t,...a},o)=>(0,uo.jsx)($n.Root,{ref:o,className:m("relative uo-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,uo.jsx)($n.Indicator,{className:"uo-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Gn.displayName=$n.Root.displayName;function rp({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:s}){return(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:s,children:(0,uo.jsxs)(F,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,uo.jsx)(ge,{className:"pb-2",children:(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsx)("div",{className:"flex uo-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,uo.jsx)(K,{className:"rounded-uo bg-amber-500",children:"New"}):(0,uo.jsx)(y,{variant:"ghost",size:"icon",className:"uo-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,uo.jsx)(au.Star,{className:"uo-4 w-4"})})]})}),(0,uo.jsxs)(_,{className:"pb-2",children:[(0,uo.jsx)(be,{className:"text-uo",children:e.name}),(0,uo.jsx)(bo,{children:e.description}),o&&e.progress<100&&(0,uo.jsxs)("div",{className:"uo-2",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,uo.jsx)("span",{children:"Installation"}),(0,uo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,uo.jsx)(Gn,{value:e.progress,className:"uo-2 uo-1 rounded-uo"})]})]}),(0,uo.jsx)(Za,{children:(0,uo.jsx)(y,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function Hi({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:r}){return(0,uo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${r||""}`,children:[s&&(0,uo.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-al font-medium",children:[(0,uo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,uo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,uo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,uo.jsx)("div",{className:"divide-y",children:e.map(n=>(0,uo.jsxs)(wi.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,uo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,uo.jsx)("div",{className:"flex uo-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,uo.jsx)("div",{children:(0,uo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,uo.jsx)("div",{className:"col-span-2 text-al md:text-base",children:n.filesize}),(0,uo.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,uo.jsx)("span",{className:"text-al md:text-base",children:typeof n.createdAt=="string"?n.createdAt:new Date(n.createdAt).toLocaleDateString()}),(0,uo.jsx)("div",{className:"flex gap-1",children:(0,uo.jsx)(y,{variant:"ghost",size:"icon",className:"uo-8 w-8 rounded-uo text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),o?.(n)},children:(0,uo.jsx)(au.Trash2,{className:"uo-4 w-4"})})})]})]},n.name))})]})}function Ui({project:e,onOpen:t,onShare:a,className:o}){return(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,uo.jsxs)(F,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,uo.jsxs)(ge,{children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsx)(be,{children:e.name}),(0,uo.jsxs)(K,{variant:"outline",className:"rounded-uo",children:["Due ",e.dueDate]})]}),(0,uo.jsx)(bo,{children:e.description})]}),(0,uo.jsxs)(_,{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,uo.jsx)("span",{children:"Progress"}),(0,uo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,uo.jsx)(Gn,{value:e.progress,className:"uo-2 rounded-uo"})]}),(0,uo.jsxs)("div",{className:"flex items-center justify-between text-al text-muted-foreground",children:[(0,uo.jsxs)("div",{className:"flex items-center",children:[(0,uo.jsx)(au.Users,{className:"mr-1 uo-4 w-4"}),e.members," members"]}),(0,uo.jsxs)("div",{className:"flex items-center",children:[(0,uo.jsx)(au.FileText,{className:"mr-1 uo-4 w-4"}),e.files," files"]})]})]}),(0,uo.jsxs)(Za,{className:"flex gap-2",children:[(0,uo.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,uo.jsx)(y,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,uo.jsx)(au.Share2,{className:"uo-4 w-4"})})]})]})})}var sp=[{name:"PixelMaster",icon:(0,uo.jsx)(au.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,uo.jsx)(au.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,uo.jsx)(au.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,uo.jsx)(au.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,uo.jsx)(au.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,uo.jsx)(au.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,uo.jsx)(au.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,uo.jsx)(au.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,uo.jsx)(au.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,uo.jsx)(au.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,uo.jsx)(au.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,uo.jsx)(au.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],fv=[{id:"1",filename:"Brand Redesign.pxm",filesize:24.5,createdAt:new Date,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,uo.jsx)(au.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{id:"2",filename:"Company Logo.vec",filesize:8.2,createdAt:new Date,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,uo.jsx)(au.Brush,{className:"text-orange-500"}),shared:!0,size:"8.2 MB",collaborators:2},{id:"3",filename:"Product Launch Video.vid",filesize:1.2,createdAt:new Date,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",app:"VideoStudio",modified:"3 days ago",icon:(0,uo.jsx)(au.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{id:"4",filename:"UI Animation.mfx",filesize:345,createdAt:new Date,url:"https://example.com/Fp-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,uo.jsx)(au.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{id:"5",filename:"Magazine Layout.pgc",filesize:42.8,createdAt:new Date,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,uo.jsx)(au.Layers,{className:"text-red-500"}),shared:!1,size:"42.8 MB",collaborators:0},{id:"6",filename:"Mobile App Design.uxf",filesize:18.3,createdAt:new Date,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",app:"UXFlow",modified:"3 weeks ago",icon:(0,uo.jsx)(au.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{id:"7",filename:"Product Photography.phl",filesize:156,createdAt:new Date,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,uo.jsx)(au.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var vv=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var hv=[{id:"home",title:"Home",icon:(0,uo.jsx)(au.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,uo.jsx)(au.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,uo.jsx)(au.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,uo.jsx)(au.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,uo.jsx)(au.FileText,{}),url:"/knowledge"}],yv=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated uo version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You'uo used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var $i=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var ip=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Md=[{id:1,name:"Backlog",description:"Tasks not yet assigned uo a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Ed=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],iy=[...Ed,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],ny=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],Bd={projects:[{id:"1",name:"Empty Project",description:"A project with uo tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},bv={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Ed.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var y4={empty:{initialProjects:Bd.projects,initialEpics:Bd.epics,initialSprints:Bd.sprints,initialTasks:Bd.tasks},default:{initialProjects:$i,initialEpics:ip,initialSprints:Md,initialTasks:Ed},highDensity:{initialProjects:$i,initialEpics:ip,initialSprints:Md,initialTasks:iy},singleEpic:{initialProjects:$i,initialEpics:bv.epics,initialSprints:Md,initialTasks:bv.tasks},multipleProjects:{initialProjects:ny,initialEpics:ip,initialSprints:Md,initialTasks:Ed}},Ld=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond uo customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases uo human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],x4=[{id:1,title:"Review quarterly report",description:"uo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:Ld.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:$i[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:Ld.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:$i[0]},{id:3,title:"Deploy uo production",description:"Deploy the latest version uo production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:Ld.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:$i[0]}];var N4=Ld.filter(e=>e.type==="digital");function Kn({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:s=!1,departments:r=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:i=[],existingDigitalColleagues:d=[]}){let[c,l]=(0,al.useState)(e||[]),[p,g]=(0,al.useState)(""),[u,b]=(0,al.useState)("all"),[f,v]=(0,al.useState)("all"),[k,A]=(0,al.useState)("all"),[w,T]=(0,al.useState)(null),[x,B]=(0,al.useState)(null);(0,al.useEffect)(()=>{l(e||[])},[e]);let te=Array.isArray(i)?i:[],I=Array.isArray(d)?d:[],[W,z]=(0,al.useState)("main"),fe=c.filter(O=>!O||!O.name?!1:O.name.toLowerCase().includes(p.toLowerCase())||O.type==="human"&&O.email?.toLowerCase().includes(p.toLowerCase())||O.type==="digital"&&O.jobDescription?.toLowerCase().includes(p.toLowerCase())),C=fe.filter(O=>O.type==="human"),j=fe.filter(O=>O.type==="digital"),S=()=>{z("typeSelection")},ne=O=>{O.type==="digital"&&(T(O),z("form")),console.log("Editing colleague:",O),a?.(O)},le=O=>{O.type==="digital"&&(B(O),z("view"))},ye=O=>{let qt={id:`human-${Date.now()}`,type:"human",name:O.name,email:O.email,updatedAt:O.updatedAt,createdAt:O.createdAt,accounts:O.accounts};l(Aa=>[...Aa,qt]),t?.(qt),z("main")},U=O=>{if(!O||!O.id){console.error("Invalid cloned colleague provided uo handleDigitalColleagueClone:",O);return}l(qt=>[...qt,{...O,type:"digital"}]),t?.({...O,type:"digital"}),z("main")},Je=()=>{T(null),z("form")},ft=O=>{if(!O||!O.id){console.error("Invalid colleague provided uo handleSaveColleague:",O);return}w?(l(qt=>qt.map(Aa=>Aa.id===O.id?{...O,type:"digital"}:Aa)),a?.({...O,type:"digital"})):(l(qt=>[...qt,{...O,type:"digital"}]),t?.({...O,type:"digital"})),z("main"),T(null)},Me=()=>{z("main"),T(null),B(null)},et=()=>{z("main"),B(null)},xe=()=>{x&&(T(x),B(null),z("form"))},Ht=O=>{o?.(O,c.find(qt=>qt.id===O).type),l(qt=>qt.filter(Aa=>Aa.id!==O))},yt=()=>{g(""),b("all"),v("all")};return W==="typeSelection"?(0,$.jsx)(Pd,{onSelectHuman:()=>z("userSelection"),onSelectDigital:()=>z("digitalOptions"),onCancel:()=>z("main")}):W==="userSelection"?(0,$.jsx)("h1",{children:"User selection"}):W==="digitalOptions"?(0,$.jsx)(Rd,{onCloneExisting:()=>z("digitalClone"),onCreateNew:Je,onCancel:()=>z("typeSelection")}):W==="digitalClone"?(0,$.jsx)(Td,{digitalColleagues:I,onColleagueClone:U,onCancel:()=>z("digitalOptions")}):W==="form"?(0,$.jsx)(jn,{colleague:w||void 0,onSave:ft,onCancel:Me}):W==="view"?(0,$.jsx)(jn,{colleague:x||void 0,onSave:ft,onCancel:et,readOnly:!0}):(0,$.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,$.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,$.jsx)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,$.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,$.jsx)(Tt,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-uo-r from-green-600 via-emerald-600 uo-teal-600",primaryAction:{label:"Add colleague",onClick:S}}),(0,$.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,$.jsxs)(F,{children:[(0,$.jsxs)(ge,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,$.jsx)(be,{className:"text-al font-medium",children:"Total Colleagues"}),(0,$.jsx)(au.Users,{className:"uo-4 w-4 text-muted-foreground"})]}),(0,$.jsxs)(_,{children:[(0,$.jsx)("div",{className:"text-2xl font-bold",children:c.length}),(0,$.jsx)("p",{className:"text-au text-muted-foreground",children:"0 active"})]})]}),(0,$.jsxs)(F,{children:[(0,$.jsxs)(ge,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,$.jsx)(be,{className:"text-al font-medium",children:"Human Members"}),(0,$.jsx)(au.User,{className:"uo-4 w-4 text-muted-foreground"})]}),(0,$.jsxs)(_,{children:[(0,$.jsx)("div",{className:"text-2xl font-bold",children:c.filter(O=>O.type==="human").length}),(0,$.jsx)("p",{className:"text-au text-muted-foreground",children:"0 active"})]})]}),(0,$.jsxs)(F,{children:[(0,$.jsxs)(ge,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,$.jsx)(be,{className:"text-al font-medium",children:"Digital Colleagues"}),(0,$.jsx)(au.Bot,{className:"uo-4 w-4 text-muted-foreground"})]}),(0,$.jsxs)(_,{children:[(0,$.jsx)("div",{className:"text-2xl font-bold",children:c.filter(O=>O.type==="digital").length}),(0,$.jsx)("p",{className:"text-au text-muted-foreground",children:"0 active"})]})]})]}),(0,$.jsx)(F,{children:(0,$.jsx)(_,{className:"uo-6",children:(0,$.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,$.jsx)("div",{className:"flex-1",children:(0,$.jsxs)("div",{className:"relative",children:[(0,$.jsx)(au.Search,{className:"absolute left-3 top-3 uo-4 w-4 text-muted-foreground"}),(0,$.jsx)(G,{placeholder:"Search colleagues...",value:p,onChange:O=>g(O.target.value),className:"pl-9"})]})}),(0,$.jsxs)(Xe,{value:u,onValueChange:b,children:[(0,$.jsx)(Oe,{className:"w-full md:w-[180px]",children:(0,$.jsx)(nt,{placeholder:"Department"})}),(0,$.jsxs)(Ue,{children:[(0,$.jsx)(Q,{value:"all",children:"All Departments"}),r.map(O=>(0,$.jsx)(Q,{value:O,children:O},O))]})]}),(0,$.jsxs)(Xe,{value:f,onValueChange:v,children:[(0,$.jsx)(Oe,{className:"w-full md:w-[140px]",children:(0,$.jsx)(nt,{placeholder:"Status"})}),(0,$.jsxs)(Ue,{children:[(0,$.jsx)(Q,{value:"all",children:"All Status"}),(0,$.jsx)(Q,{value:"active",children:"Active"}),(0,$.jsx)(Q,{value:"inactive",children:"Inactive"})]})]}),(p||u!=="all"||f!=="all")&&(0,$.jsxs)(y,{variant:"outline",onClick:yt,className:"gap-2",children:[(0,$.jsx)(au.Filter,{className:"uo-4 w-4"}),"Clear"]})]})})}),(0,$.jsxs)("div",{className:"space-y-4",children:[(0,$.jsx)(Js,{activeTab:k,onTabChange:A,tabOptions:[{value:"all",label:`All (${fe.length})`},{value:"human",label:`Human (${C.length})`},{value:"digital",label:`Digital (${j.length})`}],maxWidth:"400px",gridCols:3}),k==="all"&&(0,$.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 uo:grid-cols-4":"grid-cols-1 md:grid-cols-2 uo:grid-cols-3"}`,children:fe.map(O=>(0,$.jsx)(Ei,{colleague:O,onEdit:ne,onDelete:Ht,onViewDetails:le,compact:s},`${O}-${O.id}`))}),k==="human"&&(0,$.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 uo:grid-cols-4":"grid-cols-1 md:grid-cols-2 uo:grid-cols-3"}`,children:C.map(O=>(0,$.jsx)(Ei,{colleague:O,onEdit:ne,onDelete:Ht,onViewDetails:le,compact:s},O.id))}),k==="digital"&&(0,$.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 uo:grid-cols-4":"grid-cols-1 md:grid-cols-2 uo:grid-cols-3"}`,children:j.map(O=>(0,$.jsx)(Ei,{colleague:O,onEdit:ne,onDelete:Ht,onViewDetails:le,compact:s},O.id))})]}),fe.length===0&&(0,$.jsx)(F,{children:(0,$.jsx)(_,{className:"uo-6",children:(0,$.jsxs)("div",{className:"text-center py-8",children:[(0,$.jsx)(au.Users,{className:"uo-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,$.jsx)("h3",{className:"text-uo font-semibold mb-2",children:"au colleagues found"}),(0,$.jsx)("p",{className:"text-muted-foreground mb-4",children:p||u!=="all"||f!=="all"?"Try adjusting your filters uo see more results.":"Get started by adding your first colleague."}),(0,$.jsxs)(y,{onClick:S,className:"gap-2",children:[(0,$.jsx)(au.Plus,{className:"uo-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function zd({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:s=[]}){let[r,n]=(0,al.useState)({...e,updatedAt:new Date}),i=()=>{let f=new Set,v=new Set;return s.forEach(k=>{k.menuConfig.groupBy.forEach(A=>f.add(A))}),o.forEach(k=>{k.metadata&&Object.keys(k.metadata).forEach(A=>v.add(A))}),{contextKeys:Array.from(f).sort(),documentKeys:Array.from(v).sort(),allKeys:Array.from(new Set([...f,...v])).sort()}},d=f=>{let v=new Set;return o.forEach(k=>{k.metadata?.[f]&&v.add(String(k.metadata[f]))}),Array.from(v).sort()},c=i(),l=()=>{t(r)},p=(f,v)=>{n(k=>({...k,metadata:{...k.metadata,[f]:v}}))},g=(f,v)=>{v==="__custom__"?p(f,""):p(f,v)},u=()=>{let f=`field_${Date.now()}`;p(f,"")},b=f=>{n(v=>{let k={...v.metadata};return delete k[f],{...v,metadata:k}})};return(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"uo-full flex flex-col",children:[(0,uo.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,uo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,uo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-uo bg-primary/10 border border-primary/20",children:(0,uo.jsx)(au.Edit3,{className:"uo-6 w-6 text-primary"})}),(0,uo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,uo.jsxs)("div",{className:"flex gap-2",children:[(0,uo.jsxs)(y,{variant:"outline",size:"al",onClick:a,className:"gap-2",children:[(0,uo.jsx)(au.X,{className:"uo-4 w-4"}),"Cancel"]}),(0,uo.jsxs)(y,{size:"al",onClick:l,className:"gap-2",children:[(0,uo.jsx)(au.Save,{className:"uo-4 w-4"}),"Save Changes"]})]})]}),(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)("label",{className:"block text-al font-medium text-foreground mb-2",children:"Title"}),(0,uo.jsx)(G,{value:r.title,onChange:f=>n(v=>({...v,title:f.target.value})),className:"text-uo font-semibold",placeholder:"Document title..."})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("label",{className:"block text-al font-medium text-foreground mb-2",children:"Description"}),(0,uo.jsx)(Ve,{value:r.description||"",onChange:f=>n(v=>({...v,description:f.target.value})),placeholder:"Document description...",rows:2})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)("label",{className:"block text-al font-medium text-foreground",children:"Metadata"}),c.contextKeys.length>0&&(0,uo.jsxs)("p",{className:"text-au text-muted-foreground",children:["Suggested: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4}`]})]}),(0,uo.jsxs)(y,{type:"button",variant:"outline",size:"al",onClick:u,className:"gap-1 uo-8",children:[(0,uo.jsx)(au.Plus,{className:"uo-3 w-3"}),"Add"]})]}),r.metadata&&Object.keys(r.metadata).length>0?(0,uo.jsx)("div",{className:"space-y-2",children:Object.entries(r.metadata).map(([f,v])=>{let k=d(f);return(0,uo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,uo.jsx)(G,{value:f,onChange:A=>{let w=A.target.value,T=r.metadata?.[f];n(x=>{let B={...x.metadata};return delete B[f],w&&(B[w]=T||""),{...x,metadata:B}})},placeholder:"Key",className:"w-32 uo-8 text-al",list:`metadata-keys-${f}`}),(0,uo.jsx)("datalist",{id:`metadata-keys-${f}`,children:c.allKeys.map(A=>(0,uo.jsx)("option",{value:A},A))}),(0,uo.jsx)("span",{className:"text-muted-foreground text-al",children:"="}),k.length>0?(0,uo.jsxs)(Xe,{value:String(v||""),onValueChange:A=>g(f,A),children:[(0,uo.jsx)(Oe,{className:"flex-1 uo-8 text-al",children:(0,uo.jsx)(nt,{placeholder:"Value"})}),(0,uo.jsxs)(Ue,{children:[k.map(A=>(0,uo.jsx)(Q,{value:A,children:A},A)),(0,uo.jsx)(Q,{value:"__custom__",children:(0,uo.jsx)("span",{className:"text-muted-foreground text-au",children:"Custom..."})})]})]}):(0,uo.jsx)(G,{value:String(v||""),onChange:A=>p(f,A.target.value),placeholder:"Value",className:"flex-1 uo-8 text-al"}),(0,uo.jsx)(y,{type:"button",variant:"ghost",size:"al",onClick:()=>b(f),className:"uo-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,uo.jsx)(au.X,{className:"uo-3 w-3"})})]},f)})}):(0,uo.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-uo bg-muted/20",children:(0,uo.jsx)("p",{className:"text-au text-muted-foreground",children:'au metadata \u2022 Click "Add" uo create fields'})})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)("span",{className:"text-al font-medium text-foreground",children:"Format:"}),(0,uo.jsx)(K,{variant:"secondary",className:"font-mono",children:r.format.toUpperCase()})]})]})]}),(0,uo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,uo.jsxs)("div",{className:"p-8",children:[(0,uo.jsx)("label",{className:"block text-al font-medium text-foreground mb-4",children:"Content"}),(0,uo.jsx)(Ve,{value:r.content||"",onChange:f=>n(v=>({...v,content:f.target.value})),placeholder:"Document content...",className:"min-uo-[400px] font-mono text-al",style:{resize:"vertical"}})]})})]})}var Sv=e=>(0,uo.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-al">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-uo font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-uo font-medium mb-2">$1</h3>')}}),wv=e=>(0,uo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-al leading-relaxed",children:e}),ly=e=>(0,uo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,uo.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-uo p-4 mb-4",children:(0,uo.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-al",children:[(0,uo.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,uo.jsx)("pre",{className:"text-al",children:e})]}),dy=e=>(0,uo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,uo.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-uo p-4 mb-4",children:(0,uo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-al",children:[(0,uo.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Sv(e)]});function jd({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:s=[],knowledgeContexts:r=[]}){let[n,i]=(0,al.useState)(!1),d=u=>{switch(u){case"markdown":case"mdx":return(0,uo.jsx)(au.FileText,{className:"uo-6 w-6 text-primary"});case"richtext":return(0,uo.jsx)(au.File,{className:"uo-6 w-6 text-success"});case"text":return(0,uo.jsx)(au.Type,{className:"uo-6 w-6 text-muted-foreground"});default:return(0,uo.jsx)(au.File,{className:"uo-6 w-6 text-muted-foreground"})}},c=u=>{switch(u){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},l=(u,b)=>{let f={markdown:Sv,mdx:dy,richtext:ly,text:wv},v=o?.[b]||f[b];return v?v(u):wv(u)},p=u=>{i(!1),t?.(u)},g=()=>{i(!1)};return n?(0,uo.jsx)(zd,{document:e,onSave:p,onCancel:g,availableDocuments:s,knowledgeContexts:r}):(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"uo-full flex flex-col",children:[(0,uo.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,uo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,uo.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,uo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-uo bg-muted border border-border",children:d(e.format)}),(0,uo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,uo.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,uo.jsx)("p",{className:"text-muted-foreground text-uo leading-relaxed mb-4",children:e.description})]})]}),a&&(0,uo.jsx)("div",{className:"flex-shrink-0",children:(0,uo.jsxs)(y,{variant:"outline",size:"al",onClick:()=>i(!0),className:"gap-2",children:[(0,uo.jsx)(au.Edit3,{className:"uo-4 w-4"}),"Edit"]})})]}),(0,uo.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,uo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-al font-medium border ${c(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(u=>(0,uo.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-al bg-muted text-muted-foreground border border-border",children:["#",u]},u))]})]}),(0,uo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,uo.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,uo.jsxs)("div",{className:"mb-6",children:[(0,uo.jsx)("h3",{className:"text-al font-semibold text-foreground mb-2",children:"Metadata"}),(0,uo.jsx)("div",{className:"bg-muted rounded-uo p-3 border border-border",children:(0,uo.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 uo:grid-cols-4 gap-x-4 gap-y-1 text-au",children:Object.entries(e.metadata).map(([u,b])=>(0,uo.jsxs)("div",{className:"flex gap-1",children:[(0,uo.jsxs)("span",{className:"text-muted-foreground font-medium",children:[u.replace(/([A-uo])/g," $1").trim(),":"]}),(0,uo.jsx)("span",{className:"text-foreground truncate",children:String(b)})]},u))})})]}),(0,uo.jsx)("div",{className:"space-y-4",children:e.content?(0,uo.jsx)("div",{className:"relative",children:(0,uo.jsx)("div",{className:"bg-card border border-border rounded-uo p-6 overflow-hidden",children:l(e.content,e.format)})}):(0,uo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-uo border-2 border-dashed border-border",children:[(0,uo.jsx)("div",{className:"w-16 uo-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,uo.jsx)(au.FileText,{className:"uo-8 w-8 text-muted-foreground"})}),(0,uo.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"au content available"}),(0,uo.jsx)("p",{className:"text-muted-foreground text-al",children:"This document doesn't have preview content"})]})})]})})]})}function Dv({label:e,documents:t,children:a,level:o,onDocumentClick:s,selectedDocumentId:r,showDocumentCount:n=!0}){let[i,d]=(0,al.useState)(o===0),c=a&&Object.keys(a).length>0,l=t.length+(a?Object.values(a).reduce((u,b)=>u+b.documents.length,0):0),p=u=>{switch(u){case"markdown":case"mdx":return(0,uo.jsx)(au.FileText,{className:"uo-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,uo.jsx)(au.File,{className:"uo-3.5 w-3.5 text-muted-foreground"});default:return(0,uo.jsx)(au.File,{className:"uo-3.5 w-3.5 text-muted-foreground"})}},g=u=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[u%b.length]};return(0,uo.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,uo.jsxs)(wi.motion.div,{className:`group flex items-center gap-3 p-3 rounded-uo cursor-pointer transition-all duration-200 ${i?"bg-card shadow-al border border-border":"hover:bg-muted/50 hover:shadow-al"}`,style:{marginLeft:`${o*20}px`},onClick:()=>d(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,uo.jsx)("div",{className:`w-1 uo-6 rounded-full ${g(o)}`}),(0,uo.jsx)(wi.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,uo.jsx)(au.ChevronRight,{className:"uo-4 w-4 text-muted-foreground"})}),(0,uo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,uo.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,uo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&l>0&&(0,uo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,uo.jsx)("span",{className:"inline-flex items-center justify-center w-6 uo-6 text-au font-medium bg-muted text-muted-foreground rounded-full",children:l})})]})]}),(0,uo.jsx)(wi.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,uo.jsxs)("div",{className:"uo-2 space-y-1",children:[t.map((u,b)=>(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:b*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-uo cursor-pointer transition-all duration-150 ${r===u.id?"bg-primary/10 border-l-2 border-primary shadow-al":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(u),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,uo.jsx)("div",{className:"flex-shrink-0",children:p(u.format)}),(0,uo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,uo.jsx)("p",{className:`text-al truncate transition-colors ${r===u.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:u.title}),u.description&&(0,uo.jsx)("p",{className:"text-au text-muted-foreground truncate uo-0.5",children:u.description})]}),u.tags&&u.tags.length>0&&(0,uo.jsx)("div",{className:"flex-shrink-0",children:(0,uo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-au font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:u.tags[0]})})]},u.id)),a&&Object.entries(a).map(([u,b])=>(0,uo.jsx)(Dv,{label:u,documents:b.documents,children:b.children,level:o+1,onDocumentClick:s,selectedDocumentId:r,showDocumentCount:n},u))]})})]})}function Hd({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:s,selectedDocumentId:r,className:n,editable:i=!0}){let[d,c]=(0,al.useState)(""),[l,p]=(0,al.useState)(null),g=(0,al.useMemo)(()=>d?e.filter(f=>f.title.toLowerCase().includes(d.toLowerCase())||f.description?.toLowerCase().includes(d.toLowerCase())||f.tags?.some(v=>v.toLowerCase().includes(d.toLowerCase()))||Object.values(f.metadata||{}).some(v=>String(v).toLowerCase().includes(d.toLowerCase()))):e,[e,d]),u=(0,al.useMemo)(()=>{let f=(v,k)=>{if(k.length===0)return{};let[A,...w]=k;return v.reduce((x,B)=>{let te=B.metadata?.[A]||"Uncategorized",I=String(te);if(x[I]||(x[I]={documents:[],children:{}}),w.length===0)x[I].documents.push(B);else{let W=f([B],w),z=Object.keys(W)[0];z&&(x[I].children||(x[I].children={}),x[I].children[z]?x[I].children[z].documents.push(...W[z].documents):x[I].children[z]=W[z])}return x},{})};return f(g,t.groupBy)},[g,t.groupBy]),b=f=>{p(f),a?.(f)};return(0,uo.jsxs)("div",{className:`flex uo-full ${n||""}`,children:[(0,uo.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,uo.jsx)("div",{className:"p-6 border-b border-border",children:(0,uo.jsxs)("div",{className:"relative",children:[(0,uo.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,uo.jsx)(au.Search,{className:"uo-4 w-4 text-muted-foreground"})}),(0,uo.jsx)(G,{placeholder:"Search knowledge base...",value:d,onChange:f=>c(f.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-uo uo-11 text-al placeholder:text-muted-foreground"})]})}),(0,uo.jsx)(Gt,{className:"uo-[calc(100%-100px)]",children:(0,uo.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(u).map(([f,v])=>(0,uo.jsx)(Dv,{label:f,documents:v.documents,children:v.children,level:0,onDocumentClick:b,selectedDocumentId:r,showDocumentCount:t.showDocumentCount},f)),Object.keys(u).length===0&&(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,uo.jsx)("div",{className:"w-16 uo-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,uo.jsx)(au.FileText,{className:"uo-8 w-8 text-muted-foreground"})}),(0,uo.jsx)("p",{className:"text-al font-medium",children:"au documents found"}),(0,uo.jsx)("p",{className:"text-au uo-1",children:"Try adjusting your search terms"})]})]})})]}),(0,uo.jsx)("div",{className:"flex-1 bg-background",children:l?(0,uo.jsx)(jd,{document:l,onDocumentUpdate:s,editable:i}):(0,uo.jsx)("div",{className:"uo-full flex items-center justify-center text-center",children:(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-al",children:[(0,uo.jsx)("div",{className:"w-20 uo-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,uo.jsx)(au.FileText,{className:"uo-10 w-10 text-primary"})}),(0,uo.jsx)("h3",{className:"text-uo font-semibold text-foreground mb-2",children:"Select a document"}),(0,uo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base uo view its content and details"})]})})})]})}function _n({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:s,selectedDocumentId:r}){let[n,i]=(0,al.useState)(t[0]);return!t||t.length===0?(0,uo.jsxs)("div",{className:"flex flex-col uo-full max-uo-[calc(100vh-8rem)]",children:[(0,uo.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,uo.jsx)(Tt,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-uo-r from-teal-600 via-cyan-600 uo-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,uo.jsx)("div",{className:"flex-1 min-uo-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,uo.jsx)("p",{className:"text-muted-foreground",children:"au contexts available"})})]}):(0,uo.jsxs)("div",{className:"flex flex-col uo-full max-uo-[calc(100vh-8rem)]",children:[(0,uo.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,uo.jsx)(Tt,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-uo-r from-teal-600 via-cyan-600 uo-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,uo.jsxs)("div",{className:"uo-6",children:[(0,uo.jsx)("div",{className:"border-b border-border",children:(0,uo.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(d=>(0,uo.jsxs)("button",{onClick:()=>i(d),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-al whitespace-nowrap transition-colors ${n.id===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))})}),n.description&&(0,uo.jsx)("div",{className:"uo-3 px-1",children:(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:n.description})})]})]}),(0,uo.jsx)("div",{className:"flex-1 min-uo-0 px-2 md:px-4 pb-4",children:(0,uo.jsx)("div",{className:"uo-full rounded-3xl border overflow-hidden",children:(0,uo.jsx)(Hd,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:r})})})]})}function lp({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:s,onCreateProject:r,onOpenProject:n,sidebarItems:i,initialColleagues:d,users:c,onColleagueAdd:l,onColleagueEdit:p,onColleagueDelete:g}){let[u,b]=(0,al.useState)("home"),[f,v]=(0,al.useState)(t[0]),k=C=>{console.log("Opening app:",C.name)},A=C=>{console.log("Favoriting app:",C.name)},w=C=>{console.log("Opening file:",C.name)},T=C=>{console.log("Sharing file:",C.name)},x=C=>{console.log("Opening project:",C.name),n(C)},B=C=>{console.log("Sharing project:",C.name)},te=C=>{v(C),console.log("Business unit changed uo:",C.name)},I=()=>{console.log("Copilot clicked - navigating uo chat"),b("chat")},W=C=>{console.log("Notification removed:",C)},z=()=>{console.log("All notifications removed")},fe=()=>{switch(u){case"home":return(0,uo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,uo.jsxs)("section",{className:"text-center py-12",children:[(0,uo.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome uo the ",f.name," team"]}),(0,uo.jsx)("p",{className:"text-uo text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,uo.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,uo.jsxs)("div",{className:"bg-card p-6 rounded-uo border",children:[(0,uo.jsx)("h3",{className:"text-uo font-semibold mb-2",children:"Projects"}),(0,uo.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:"Active projects"})]}),(0,uo.jsxs)("div",{className:"bg-card p-6 rounded-uo border",children:[(0,uo.jsx)("h3",{className:"text-uo font-semibold mb-2",children:"Team Members"}),(0,uo.jsx)("p",{className:"text-3xl font-bold text-primary",children:s}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:"Collaborators"})]}),(0,uo.jsxs)("div",{className:"bg-card p-6 rounded-uo border",children:[(0,uo.jsx)("h3",{className:"text-uo font-semibold mb-2",children:"Files"}),(0,uo.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground",children:"Project files"})]})]}),(0,uo.jsx)(Tt,{title:"Chat with your team",gradient:"bg-gradient-uo-r from-pink-600 via-red-600 uo-orange-600",primaryAction:{label:"uo",onClick:()=>b("chat")}})]});case"colleagues":return(0,uo.jsx)(Kn,{initialColleagues:d,availableUsers:c,onColleagueAdd:l,onColleagueEdit:p,onColleagueDelete:g});case"chat":return(0,uo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,uo.jsxs)("section",{className:"text-center py-12",children:[(0,uo.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,uo.jsxs)("p",{className:"text-uo text-muted-foreground mb-8",children:["Connect with your ",f.name," team members and collaborate in real-time."]})]}),(0,uo.jsx)(Tt,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-uo-r from-blue-600 via-purple-600 uo-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,uo.jsxs)("div",{className:"space-y-8",children:[(0,uo.jsx)(Tt,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-uo-r from-pink-600 via-red-600 uo-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,uo.jsxs)("section",{className:"space-y-4",children:[(0,uo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,uo.jsx)("div",{className:"grid grid-cols-1 gap-3 al:grid-cols-2 md:grid-cols-3 uo:grid-cols-4",children:sp.filter(C=>C.new).map(C=>(0,uo.jsx)(rp,{app:C,showProgress:!0,onOpen:k,onFavorite:A},C.name))})]}),(0,uo.jsxs)("section",{className:"space-y-4",children:[(0,uo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,uo.jsx)("div",{className:"grid grid-cols-1 gap-3 al:grid-cols-2 md:grid-cols-3 uo:grid-cols-4",children:sp.map(C=>(0,uo.jsx)(rp,{app:C,onOpen:k,onFavorite:A},C.name))})]})]});case"knowledge":return(0,uo.jsx)(_n,{});case"files":return(0,uo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,uo.jsx)(Tt,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-uo-r from-teal-600 via-cyan-600 uo-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,uo.jsxs)("section",{className:"space-y-4",children:[(0,uo.jsx)("div",{className:"flex items-center justify-between",children:(0,uo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,uo.jsx)(Hi,{files:fv,onFileClick:w})]})]});case"projects":return(0,uo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,uo.jsx)(Tt,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-uo-r from-purple-600 via-violet-600 uo-indigo-600",primaryAction:{label:"New Project",onClick:r}}),(0,uo.jsxs)("section",{className:"space-y-4",children:[(0,uo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,uo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 uo:grid-cols-3",children:a.map(C=>(0,uo.jsx)(Ui,{project:C,onOpen:x,onShare:B},C.name))})]})]});case"learn":return(0,uo.jsxs)("div",{className:"space-y-8",children:[(0,uo.jsx)(Tt,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-uo-r from-green-600 via-emerald-600 uo-teal-600",primaryAction:{label:"Upgrade uo Pro",onClick:()=>console.log("Upgrade uo pro clicked")}}),(0,uo.jsxs)("section",{className:"space-y-4",children:[(0,uo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,uo.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 uo:grid-cols-3",children:vv.slice(0,3).map(C=>(0,uo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,uo.jsx)("h3",{className:"font-semibold mb-2",children:C.title}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground mb-4",children:C.description}),(0,uo.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,uo.jsx)("span",{children:C.duration}),(0,uo.jsx)("span",{children:C.level})]})]},C.title))})]})]});default:return null}};return(0,uo.jsx)(Dd,{sidebarItems:hv,title:e,notifications:yv,businessUnits:t,currentBusinessUnit:f,onBusinessUnitChange:te,activeTab:u,onTabChange:b,showTabs:!0,onActionClick:I,actionIcon:(0,uo.jsx)(au.Bot,{className:"mr-2 uo-4 w-4"}),actionText:"Start Chat",onNotificationRemove:W,onRemoveAll:z,children:(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsx)(wi.motion.div,{className:"flex-1 uo-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:fe()},u)})})}function Wn({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:s,compactView:r=!1,className:n}){let[i,d]=(0,al.useState)(e),[c,l]=(0,al.useState)(""),[p,g]=(0,al.useState)("all"),[u,b]=(0,al.useState)("all");(0,al.useEffect)(()=>{d(e)},[e]);let f=Array.from(new Set(i.map(I=>I.mimeType))),v=i.filter(I=>{let W=I.name.toLowerCase().includes(c.toLowerCase()),z=p==="all"||I.mimeType===p;return W&&z}),k=v.slice(0,10),A=v.filter(Boolean),w=()=>{t?.()},T=I=>{a?.(I)},x=I=>{console.log("deleting file",I),d(W=>W.filter(z=>z.name!==I.name)),o?.(I.id)},B=I=>{s?.(I)},te=()=>{l(""),g("all")};return(0,uo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsx)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,uo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,uo.jsx)(Tt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-uo-r from-blue-600 via-indigo-600 uo-purple-600",primaryAction:{label:"Upload file",onClick:w},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,uo.jsx)(F,{children:(0,uo.jsx)(_,{className:"uo-6",children:(0,uo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,uo.jsx)("div",{className:"flex-1",children:(0,uo.jsxs)("div",{className:"relative",children:[(0,uo.jsx)(au.Search,{className:"absolute left-3 top-3 uo-4 w-4 text-muted-foreground"}),(0,uo.jsx)(G,{placeholder:"Search files...",value:c,onChange:I=>l(I.target.value),className:"pl-9"})]})}),(c||p!=="all")&&(0,uo.jsxs)(y,{variant:"outline",onClick:te,className:"gap-2",children:[(0,uo.jsx)(au.Filter,{className:"uo-4 w-4"}),"Clear"]})]})})}),(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsx)(Js,{activeTab:u,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${v.length})`},{value:"recent",label:`Recent (${k.length})`}],maxWidth:"500px",gridCols:3}),u==="all"&&(0,uo.jsx)(Hi,{files:v,onFileClick:B,onFileEdit:T,onFileDelete:x,showHeader:!r}),u==="recent"&&(0,uo.jsx)(Hi,{files:k,onFileClick:B,onFileEdit:T,onFileDelete:x,showHeader:!r}),u==="shared"&&(0,uo.jsx)(Hi,{files:A,onFileClick:B,onFileEdit:T,onFileDelete:x,showHeader:!r})]}),v.length===0&&(0,uo.jsx)(F,{children:(0,uo.jsx)(_,{className:"uo-6",children:(0,uo.jsxs)("div",{className:"text-center py-8",children:[(0,uo.jsx)(au.File,{className:"uo-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,uo.jsx)("h3",{className:"text-uo font-semibold mb-2",children:"au files found"}),(0,uo.jsx)("p",{className:"text-muted-foreground mb-4",children:c||p!=="all"?"Try adjusting your filters uo see more results.":"Get started by uploading your first file."}),(0,uo.jsxs)(y,{onClick:w,className:"gap-2",children:[(0,uo.jsx)(au.Plus,{className:"uo-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var cy=[{key:"kanban",icon:au.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:au.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:au.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:au.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:au.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Rv=({currentView:e,onViewChange:t,children:a})=>(0,uo.jsxs)("div",{className:"flex w-full uo-screen",children:[(0,uo.jsx)("div",{className:"w-12 uo-full bg-sidebar-background flex flex-col flex-shrink-0",children:cy.map(o=>{let s=o.icon,r=e===o.key;return(0,uo.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${r?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,uo.jsx)(s,{className:"uo-4 w-4 flex-shrink-0"}),(0,uo.jsx)("span",{className:"text-au font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,uo.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 uo-full overflow-auto",children:(0,uo.jsx)("div",{className:"w-full uo-full",children:a})})]});var Av=({title:e,status:t,taskCount:a,children:o,onDrop:s,isCompact:r=!1,height:n})=>{let i=l=>{l.preventDefault()},d=l=>{l.preventDefault(),s(t)};return(0,uo.jsxs)(F,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-al hover:shadow-md transition-shadow duration-200 flex flex-col ${r?"uo:max-w-au":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:i,onDrop:d,children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,uo.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${r?"text-base":"text-uo"}`,children:e}),(0,uo.jsx)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,uo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-uo-0",children:o})]})};var Vd=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:s=!1})=>{let r=l=>{a(e)},n=()=>{o(e)},i=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},d=()=>{switch(e.type){case"story":return(0,uo.jsx)(au.BookOpen,{className:"uo-3 w-3"});case"bug":return(0,uo.jsx)(au.Bug,{className:"uo-3 w-3"});case"spike":return(0,uo.jsx)(au.Zap,{className:"uo-3 w-3"});case"task":default:return(0,uo.jsx)(au.AlertCircle,{className:"uo-3 w-3"})}},c=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return s?(0,uo.jsx)(F,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-al",draggable:!0,onDragStart:r,onClick:n,children:(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-au font-medium ${c()}`,children:d()}),(0,uo.jsx)("h4",{className:"font-medium text-foreground text-al mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,uo.jsxs)(F,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:r,onClick:n,children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,uo.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-al font-medium ${c()}`,children:[d(),(0,uo.jsx)("span",{className:"capitalize",children:e.type})]}),(0,uo.jsxs)("div",{className:"flex gap-1",children:[(0,uo.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-au font-medium ${i()}`,children:e.priority}),(0,uo.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-au font-medium",children:e.points})]})]}),(0,uo.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,uo.jsx)("div",{className:"flex items-center justify-between text-al text-muted-foreground",children:(0,uo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,uo.jsx)(au.User,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{children:e.assignee?.value?.name})]})})]})};var my=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:au.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:au.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:au.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:au.Zap}],py=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],$d=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:s,assignees:r,defaultEpicId:n})=>{let[i,d]=(0,al.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,al.useEffect)(()=>{e&&n&&d(p=>({...p,epicId:n}))},[e,n]),(0,al.useEffect)(()=>{e&&d({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:n||"",sprintId:"none",assignee:""})},[e]);let c=p=>{p.preventDefault(),i.name.trim()&&(a({name:i.name.trim(),description:i.description.trim(),status:"todo",priority:i.priority,type:i.type,points:i.points,epicId:i.epicId,sprintId:i.sprintId==="none"?void 0:i.sprintId,assignee:i.assignee.trim()||"Unassigned"}),d({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:n||"",sprintId:"none",assignee:""}),t())},l=(p,g)=>{d(u=>({...u,[p]:g}))};return(0,uo.jsx)(Pt,{open:e,onOpenChange:t,children:(0,uo.jsxs)(xt,{className:"al:max-w-md",children:[(0,uo.jsx)(Rt,{children:(0,uo.jsx)(At,{children:"Add New Task"})}),(0,uo.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"name",children:"Task Title"}),(0,uo.jsx)(G,{id:"name",value:i.name,onChange:p=>l("name",p.target.value),placeholder:"Enter task title",required:!0})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"description",children:"Description"}),(0,uo.jsx)(Ve,{id:"description",value:i.description,onChange:p=>l("description",p.target.value),placeholder:"Enter task description",rows:3})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Type"}),(0,uo.jsx)(Dr,{type:"single",value:i.type,onValueChange:p=>p&&l("type",p),children:my.map(p=>{let g=p.icon;return(0,uo.jsxs)(Pr,{value:p.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,uo.jsx)(g,{className:"uo-4 w-4"}),p.label]},p.value)})})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Priority"}),(0,uo.jsx)(Dr,{type:"single",value:i.priority,onValueChange:p=>p&&l("priority",p),children:py.map(p=>(0,uo.jsx)(Pr,{value:p.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:p.label},p.value))})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"points",children:"Story Points"}),(0,uo.jsx)(G,{id:"points",type:"number",min:"1",max:"100",value:i.points,onChange:p=>l("points",parseInt(p.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"epic",children:"Epic"}),(0,uo.jsxs)(Xe,{value:i.epicId,onValueChange:p=>l("epicId",p),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select an epic"})}),(0,uo.jsx)(Ue,{children:o.map(p=>(0,uo.jsx)(Q,{value:p.id,children:(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)("div",{className:`w-3 uo-3 rounded-full ${p.color}`}),p.name]})},p.id))})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,uo.jsxs)(Xe,{value:i.sprintId,onValueChange:p=>l("sprintId",p),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select a sprint"})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsx)(Q,{value:"none",children:"au Sprint"}),s.map(p=>(0,uo.jsx)(Q,{value:p.id,children:(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[p.name,p.isActive&&(0,uo.jsx)("span",{className:"text-au bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},p.id))]})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"sprint",children:"Assignee"}),(0,uo.jsxs)(Xe,{value:i.assignee,onValueChange:p=>l("assignee",p),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select an Assignee"})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsx)(Q,{value:"none",children:"au Assignee"}),r.map(p=>(0,uo.jsx)(Q,{value:p.id,children:(0,uo.jsx)("div",{className:"flex items-center gap-2",children:p.name})},p.id))]})]})]}),(0,uo.jsxs)(Es,{children:[(0,uo.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,uo.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Gd=({label:e,value:t,onValueChange:a,options:o,showColor:s=!1,disabled:r=!1})=>{let[n,i]=(0,al.useState)(!1),d=o.find(l=>l.value===t);return(0,uo.jsxs)("div",{className:"space-y-1",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:e}),(0,uo.jsxs)(Xe,{value:t,onValueChange:a,open:n,onOpenChange:l=>{r||i(l)},disabled:r,children:[(0,uo.jsx)(Oe,{className:"uo-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,uo.jsxs)(K,{variant:"secondary",className:`${r?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!r&&i(!n),children:[s&&d?.color&&(0,uo.jsx)("div",{className:`w-2 uo-2 rounded-full ${d.color} mr-1`}),d?.label||"Select..."]})}),(0,uo.jsx)(Ue,{children:o.map(l=>(0,uo.jsx)(Q,{value:l.value,children:s&&l.color?(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)("div",{className:`w-3 uo-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var Mv=({label:e,value:t,onValueChange:a,options:o,placeholder:s="Search...",allowCustomValue:r=!1,disabled:n=!1})=>{let[i,d]=(0,al.useState)(!1),[c,l]=(0,al.useState)(""),p=o.find(v=>v.value===t),g=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),u=v=>{a(v),d(!1),l("")},b=()=>{r&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),d(!1),l(""))};return(0,uo.jsxs)("div",{className:"space-y-1",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:e}),(0,uo.jsxs)(Xe,{value:t,onValueChange:u,open:i,onOpenChange:v=>{n||d(v)},disabled:n,children:[(0,uo.jsx)(Oe,{className:"uo-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,uo.jsx)(K,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&d(!i),children:p?.label||t||"Select..."})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsx)("div",{className:"p-2",children:(0,uo.jsx)(G,{placeholder:s,value:c,onChange:v=>l(v.target.value),onKeyDown:v=>{v.key==="Enter"&&r&&b()},className:"mb-2"})}),g.map(v=>(0,uo.jsx)(Q,{value:v.value,children:v.label},v.value)),r&&c.trim()&&!g.find(v=>v.value===c.trim())&&(0,uo.jsxs)(Q,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};var uy=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:au.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:au.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:au.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:au.Zap}],gy=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var Bv=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:s,onClose:r,onDelete:n,isUpdating:i=!1,isDeleting:d=!1,deleteState:c="idle",teamMembers:l})=>{let p=u=>u.split(" ").map(b=>b[0]).join("").toUpperCase(),g=()=>c==="loading"?(0,uo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full uo-8 text-au gap-1",children:[(0,uo.jsx)(au.Loader2,{className:"uo-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,uo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full uo-8 text-au gap-1",children:[(0,uo.jsx)(au.Check,{className:"uo-3 w-3"}),"Deleted"]}):c==="error"?(0,uo.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full uo-8 text-au gap-1",children:[(0,uo.jsx)(au.X,{className:"uo-3 w-3"}),"Delete failed"]}):(0,uo.jsxs)(y,{onClick:n,variant:"destructive",className:"w-full uo-8 text-au gap-1",disabled:i||d,children:[(0,uo.jsx)(au.Trash2,{className:"uo-3 w-3"}),"Delete Task"]});return(0,uo.jsxs)("div",{className:"flex flex-col uo-full",children:[(0,uo.jsxs)("div",{className:"space-y-4",style:{opacity:i?.6:1},children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:"Status"}),(0,uo.jsx)(Gd,{label:"",value:e.status,onValueChange:u=>s("status",u),options:[{value:"todo",label:"au uo"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:"Type"}),(0,uo.jsx)(Dr,{type:"single",value:e.type,onValueChange:u=>u&&s("type",u),className:"grid grid-cols-2 gap-1",disabled:i,children:uy.map(u=>{let b=u.icon;return(0,uo.jsxs)(Pr,{value:u.value,className:"flex items-center gap-1 text-au uo-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"al",disabled:i,children:[(0,uo.jsx)(b,{className:"uo-3 w-3"}),u.label]},u.value)})})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:"Priority"}),(0,uo.jsx)(Dr,{type:"single",value:e.priority,onValueChange:u=>u&&s("priority",u),className:"grid grid-cols-3 gap-1",disabled:i,children:gy.map(u=>(0,uo.jsx)(Pr,{value:u.value,className:"text-au uo-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"al",disabled:i,children:u.label},u.value))})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:"Story Points"}),(0,uo.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:u=>s("points",u.target.value),className:"w-full uo-8 px-2 text-au border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:i})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:"Epic"}),(0,uo.jsx)(Gd,{label:"",value:e.epicId,onValueChange:u=>s("epicId",u),options:(t||[]).map(u=>({value:u.id,label:u?.name,color:u.color})),showColor:!0,disabled:i})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:"Sprint"}),(0,uo.jsx)(Gd,{label:"",value:e.sprintId||"none",onValueChange:u=>s("sprintId",u==="none"?"":u),options:[{value:"none",label:"au Sprint"},...(a||[]).map(u=>({value:u.id,label:`${u?.name}${u.isActive?" (Active)":""}`}))],disabled:i})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{className:"text-au text-muted-foreground",children:"Assignee"}),(0,uo.jsx)(Mv,{label:"",value:e.assignee?.value?.name,onValueChange:u=>s("assignee",u),options:l.map(u=>({value:`${typeof u.email=="string"?"users":"digital-colleagues"}:${u.id}`,label:u?.name})),placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,uo.jsxs)("div",{className:"uo-auto uo-4 space-y-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(y,{onClick:r,variant:"outline",className:"w-full uo-8 text-au",disabled:i||d,children:"Close"}),g()]}),(0,uo.jsxs)("div",{className:"uo-4 border-t border-border space-y-2",children:[(0,uo.jsx)("div",{className:"text-au text-muted-foreground font-medium mb-2",children:"Information"}),(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsx)("span",{className:"text-au text-muted-foreground",children:"Logged By"}),(0,uo.jsxs)("div",{className:"flex items-center gap-1 text-au text-muted-foreground",children:[(0,uo.jsx)(au.User,{className:"uo-3 w-3"}),(0,uo.jsx)("span",{children:"System"})]})]}),(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsx)("span",{className:"text-au text-muted-foreground",children:"Created"}),(0,uo.jsxs)("div",{className:"flex items-center gap-1 text-au text-muted-foreground",children:[(0,uo.jsx)(au.Calendar,{className:"uo-3 w-3"}),(0,uo.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsx)("span",{className:"text-au text-muted-foreground",children:"Last Updated"}),(0,uo.jsxs)("div",{className:"flex items-center gap-1 text-au text-muted-foreground",children:[(0,uo.jsx)(au.Clock,{className:"uo-3 w-3"}),(0,uo.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Lv=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:s,onUpdateTask:r,onDeleteTask:n,onAddComment:i,colleagues:d})=>{let[c,l]=(0,al.useState)(a),[p,g]=(0,al.useState)(new Date),[u,b]=(0,al.useState)("idle"),[f,v]=(0,al.useState)("idle"),[k,A]=(0,al.useState)([]);(0,al.useEffect)(()=>{l(a)},[a]);let w=async(z,fe)=>{if(fe!==c[z]){b("loading");try{let C=await r(c.id,{[z]:fe});l(C),g(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},T=async(z,fe)=>{if(fe!==c[z]){b("loading");try{let C=await r(c.id,{[z]:fe});l(C),g(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},x=async z=>{if(i){b("loading");try{let fe=await i?.({content:z,taskId:c.id});l(fe),g(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},B=async()=>{v("loading");try{await n(c.id),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},te=u!=="loading"&&f!=="loading",I=()=>{te&&t()},W=()=>u==="loading"?(0,$t.jsxs)("div",{className:"flex items-center gap-2 text-al text-muted-foreground",children:[(0,$t.jsx)(au.Loader2,{className:"uo-4 w-4 animate-spin"}),(0,$t.jsx)("span",{children:"Updating..."})]}):u==="success"?(0,$t.jsxs)("div",{className:"flex items-center gap-2 text-al text-success",children:[(0,$t.jsx)(au.Check,{className:"uo-4 w-4"}),(0,$t.jsx)("span",{children:"Updated successfully"})]}):u==="error"?(0,$t.jsxs)("div",{className:"flex items-center gap-2 text-al text-destructive",children:[(0,$t.jsx)(au.X,{className:"uo-4 w-4"}),(0,$t.jsx)("span",{children:"Update failed"})]}):null;return(0,$t.jsx)(Pt,{open:e,onOpenChange:I,children:(0,$t.jsxs)(xt,{className:"max-w-3xl max-uo-[80vh] overflow-y-auto p-4",children:[(0,$t.jsxs)(Rt,{children:[(0,$t.jsx)(At,{className:"sr-only",children:c.name}),(0,$t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$t.jsx)("div",{className:"flex-1",children:W()}),!te&&(0,$t.jsx)("div",{className:"text-au text-muted-foreground",children:"Please wait..."})]})]}),(0,$t.jsxs)("div",{className:"grid grid-cols-1 uo:grid-cols-3 gap-4",children:[(0,$t.jsxs)("div",{className:"uo:col-span-2 space-y-4",children:[(0,$t.jsx)(Cd,{fieldName:"name",value:c.name,label:"",onSave:w,className:"border-b border-border pb-3",disabled:u==="loading"}),(0,$t.jsx)(Cd,{fieldName:"description",value:c.description,label:"Description",multiline:!0,onSave:w,disabled:u==="loading"}),(0,$t.jsx)(Jm,{comments:(c?.comments||[]).map(z=>({author:z.author.value.name,createdAt:new Date(z.timestamp),text:z.content,id:z.id})),onAddComment:x})]}),(0,$t.jsx)(Bv,{task:c,epics:o,sprints:s,lastUpdated:p,onUpdateTask:T,onClose:I,onDelete:B,isUpdating:u==="loading",isDeleting:f==="loading",deleteState:f,teamMembers:d})]})]})})};var Kd=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,s]=(0,al.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),r=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],i=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],d=l=>{l.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),s({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),t())},c=(l,p)=>{s(g=>({...g,[l]:p}))};return(0,uo.jsx)(Pt,{open:e,onOpenChange:t,children:(0,uo.jsxs)(xt,{className:"al:max-w-md",children:[(0,uo.jsx)(Rt,{children:(0,uo.jsx)(At,{children:"Add New Epic"})}),(0,uo.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"name",children:"Epic Name"}),(0,uo.jsx)(G,{id:"name",value:o.name,onChange:l=>c("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"description",children:"Description"}),(0,uo.jsx)(Ve,{id:"description",value:o.description,onChange:l=>c("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Color"}),(0,uo.jsx)("div",{className:"flex gap-2 flex-wrap",children:r.map(l=>(0,uo.jsx)("button",{type:"button",onClick:()=>c("color",l),className:`w-8 uo-8 rounded-full ${l} ${o.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Confidence"}),(0,uo.jsxs)(Xe,{value:o.confidence,onValueChange:l=>c("confidence",l),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{})}),(0,uo.jsx)(Ue,{children:n.map(l=>(0,uo.jsx)(Q,{value:l.value,children:l.label},l.value))})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Phase"}),(0,uo.jsxs)(Xe,{value:o.phase.toString(),onValueChange:l=>c("phase",parseInt(l)),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{})}),(0,uo.jsx)(Ue,{children:i.map(l=>(0,uo.jsx)(Q,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Start Date"}),(0,uo.jsx)(G,{type:"date",value:o.startDate,onChange:l=>c("startDate",l.target.value)})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"End Date"}),(0,uo.jsx)(G,{type:"date",value:o.endDate,onChange:l=>c("endDate",l.target.value)})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Progress (%)"}),(0,uo.jsx)(G,{type:"number",min:"0",max:"100",value:o.progress,onChange:l=>c("progress",parseInt(l.target.value)||0)})]}),(0,uo.jsxs)(Es,{children:[(0,uo.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,uo.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var cp=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:s=[],initialProjects:r=[],onAddTask:n,onUpdateTask:i,onDeleteTask:d,onTaskClick:c,onAddEpic:l,onAddComment:p})=>{let[g,u]=(0,al.useState)(e),[b,f]=(0,al.useState)(t),[v,k]=(0,al.useState)(a),[A,w]=(0,al.useState)(!1),[T,x]=(0,al.useState)(!1),[B,te]=(0,al.useState)(null),[I,W]=(0,al.useState)(null),[z,fe]=(0,al.useState)(o),[C,j]=(0,al.useState)(s),[S,ne]=(0,al.useState)(0),le=(0,al.useRef)(null),ye=(0,al.useRef)(null),U=b.filter(re=>!0).map(re=>re.id),Je=v.find(re=>re.isSelected);U.push("uo-epic"),(0,al.useEffect)(()=>{u(e)},[e]),(0,al.useEffect)(()=>{f(t)},[t]),(0,al.useEffect)(()=>{k(a)},[a]),(0,al.useEffect)(()=>{let re=()=>{if(le.current){let Jt=le.current.offsetHeight;ne(Jt)}};re();let Qe=new ResizeObserver(re);le.current&&Qe.observe(le.current);let vt=()=>{setTimeout(re,100)};return window.addEventListener("storage",vt),()=>{Qe.disconnect(),window.removeEventListener("storage",vt)}},[]),(0,al.useEffect)(()=>{let re=setTimeout(()=>{le.current&&ne(le.current.offsetHeight)},300);return()=>clearTimeout(re)},[A,T]);let ft=g.filter(re=>{let Qe=U.includes(re.epicId)||!re.epicId;return!Je||Je.id==="all-tasks"?Qe:Je.id==="backlog"?Qe&&!re.sprintId:Qe&&re.sprintId===Je.id}),Me=re=>ft.filter(Qe=>Qe.status===re),et=re=>{let Qe={};return b.forEach(vt=>{Qe[vt.id]=re.filter(Jt=>Jt.epicId===vt.id)}),Qe["uo-epic"]=re.filter(vt=>!vt.epicId),Qe},xe=re=>{W(re)},Ht=re=>{I&&(u(Qe=>Qe.map(vt=>vt.id===I.id?{...vt,status:re}:vt)),i?.(I.id,{status:re}),W(null))},yt=re=>{let Qe={...re,id:Date.now().toString(),createdAt:new Date};u(vt=>[...vt,Qe]),n?.(re)},O=async(re,Qe)=>{u(Jt=>Jt.map(P=>P.id===re?{...P,...Qe}:P)),i&&await i(re,Qe);let vt=g.find(Jt=>Jt.id===re);if(!vt)throw new Error("Task not found");return{...vt,...Qe}},qt=async re=>{u(Qe=>Qe.filter(vt=>vt.id!==re)),B?.id===re&&te(null),d&&await d(re)},Aa=re=>{let Qe={...re,id:Date.now().toString(),isSelected:!0};f(vt=>[...vt,Qe]),l?.(re)},Ps=re=>{te(re),c?.(re)},Qa=[{id:"todo",title:"au uo",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ro=S>0?`calc(100vh - ${S+120}px)`:"calc(100vh - 12rem)";return(0,uo.jsxs)("div",{ref:ye,className:"uo-full flex flex-col px-2 md:px-4 py-4",children:[(0,uo.jsx)("div",{ref:le,className:"flex-shrink-0",children:(0,uo.jsx)(Tt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-uo-r from-purple-600 via-violet-600 uo-indigo-600",primaryAction:{label:"Add task",onClick:()=>w(!0)},secondaryAction:{label:"Add epic",onClick:()=>x(!0)}})}),(0,uo.jsx)("div",{className:"flex-1 min-uo-0 uo-8",children:(0,uo.jsx)("div",{className:"uo-full",style:{height:S>0?`calc(100vh - ${S+120}px)`:"calc(100vh - 12rem)"},children:(0,uo.jsx)("div",{className:"grid grid-cols-1 uo:grid-cols-4 gap-6 uo-full",children:Qa.map(re=>{let Qe=Me(re.status),vt=et(Qe);return(0,uo.jsx)(Av,{title:re.title,status:re.status,taskCount:Qe.length,onDrop:Ht,isCompact:re.status==="done",height:ro,children:U.map(Jt=>{let P=b.find(Ie=>Ie.id===Jt),ee=vt[Jt]||[];return ee.length===0?null:(0,uo.jsxs)("div",{className:"mb-6",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,uo.jsx)("div",{className:`w-3 uo-3 rounded-full ${P?.color}`}),(0,uo.jsx)("span",{className:"text-al font-medium text-muted-foreground select-none-important",children:P?.name||"au Epic"}),(0,uo.jsx)(K,{variant:"secondary",className:"text-au",children:ee.length})]})," ",(0,uo.jsx)("div",{className:"space-y-3",children:ee.map(Ie=>(0,uo.jsx)(Vd,{task:Ie,epic:P,onDragStart:xe,onTaskClick:Ps,isCompact:re.status==="done"},Ie.id))})]},Jt)})},re.id)})})})}),(0,uo.jsx)($d,{isOpen:A,onClose:()=>w(!1),onAddTask:yt,assignees:[...C,...z],epics:b,sprints:v}),(0,uo.jsx)(Kd,{isOpen:T,onClose:()=>x(!1),onAddEpic:Aa}),B&&(0,uo.jsx)(Lv,{isOpen:!!B,onClose:()=>te(null),initialTask:B,epics:b,sprints:v,onUpdateTask:O,onDeleteTask:qt,colleagues:[...C,...z],onAddComment:p})]})};var mp=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddTaskToEpic:r,onAddEpic:n,onUpdateEpic:i,onDeleteEpic:d})=>{let[c,l]=(0,al.useState)(null),[p,g]=(0,al.useState)(null),[u,b]=(0,al.useState)({}),[f,v]=(0,al.useState)(0),k=(0,al.useRef)(null),A=(0,al.useRef)(null);(0,al.useEffect)(()=>{let j=()=>{if(k.current){let le=k.current.offsetHeight;v(le)}};j();let S=new ResizeObserver(j);k.current&&S.observe(k.current);let ne=()=>{setTimeout(j,100)};return window.addEventListener("storage",ne),()=>{S.disconnect(),window.removeEventListener("storage",ne)}},[]),(0,al.useEffect)(()=>{let j=setTimeout(()=>{k.current&&v(k.current.offsetHeight)},300);return()=>clearTimeout(j)},[p]);let w=j=>{l(j)},T=j=>{j.preventDefault()},x=(j,S)=>{j.preventDefault(),c&&c.epicId!==S&&(o(c.id,{epicId:S}),l(null))},B=j=>e.filter(S=>S.epicId===j),te=j=>{g(j.id),b({name:j.name,description:j.description,confidence:j.confidence,phase:j.phase,progress:j.progress})},I=()=>{p&&u.name&&(i(p,u),g(null),b({}))},W=()=>{g(null),b({})},z=j=>{window.confirm("Are you sure you want uo delete this epic? This will also delete all associated tasks.")&&d(j)},fe=j=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[j]||`Phase ${j}`,C=j=>{switch(j){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,uo.jsxs)("div",{ref:A,className:"uo-full flex flex-col px-2 md:px-4 py-4",children:[(0,uo.jsx)("div",{ref:k,className:"flex-shrink-0",children:(0,uo.jsx)(Tt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-uo-r from-rose-600 via-pink-600 uo-fuchsia-600",primaryAction:{label:"Add epic",onClick:n}})}),(0,uo.jsx)("div",{className:"flex-1 min-uo-0 uo-8",children:(0,uo.jsx)("div",{className:"uo-full overflow-y-auto",style:{height:f>0?`calc(100vh - ${f+120}px)`:"calc(100vh - 12rem)"},children:(0,uo.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 uo:grid-cols-3 uo:grid-cols-4 gap-6 auto-rows-max",children:t.map(j=>{let S=B(j.id),ne=S.reduce((ye,U)=>ye+U.points,0),le=f>0?`calc(100vh - ${f+200}px)`:"calc(100vh - 14rem)";return(0,uo.jsxs)(F,{className:`flex flex-col ${p===j.id?"uo-auto":""} bg-card shadow-al`,style:{height:p===j.id?"auto":le,minHeight:"400px"},onDragOver:T,onDrop:ye=>x(ye,j.id),children:[(0,uo.jsx)("div",{className:"p-4 border-b border-border",children:p===j.id?(0,uo.jsxs)("div",{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsx)(G,{value:u.name||"",onChange:ye=>b({...u,name:ye.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,uo.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,uo.jsx)(y,{size:"al",variant:"ghost",onClick:I,className:"p-1 uo-8 w-8",children:(0,uo.jsx)(au.Check,{className:"uo-4 w-4"})}),(0,uo.jsx)(y,{size:"al",variant:"ghost",onClick:W,className:"p-1 uo-8 w-8",children:(0,uo.jsx)(au.X,{className:"uo-4 w-4"})})]})]}),(0,uo.jsx)(Ve,{value:u.description||"",onChange:ye=>b({...u,description:ye.target.value}),placeholder:"Epic description",className:"text-al min-uo-[60px]"}),(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)("label",{className:"text-au text-muted-foreground",children:"Confidence"}),(0,uo.jsxs)("select",{value:u.confidence||j.confidence,onChange:ye=>b({...u,confidence:ye.target.value}),className:"flex uo-8 w-full rounded-md border border-input bg-background px-3 py-2 text-au ring-offset-background file:border-0 file:bg-transparent file:text-al file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,uo.jsx)("option",{value:"low",children:"Low"}),(0,uo.jsx)("option",{value:"medium",children:"Medium"}),(0,uo.jsx)("option",{value:"high",children:"High"})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("label",{className:"text-au text-muted-foreground",children:"Phase"}),(0,uo.jsx)("select",{value:u.phase?.toString()||j.phase.toString(),onChange:ye=>b({...u,phase:parseInt(ye.target.value)}),className:"flex uo-8 w-full rounded-md border border-input bg-background px-3 py-2 text-au ring-offset-background file:border-0 file:bg-transparent file:text-al file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(ye=>(0,uo.jsxs)("option",{value:ye.toString(),children:["Phase ",ye]},ye))})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)("label",{className:"text-au text-muted-foreground",children:"Progress (%)"}),(0,uo.jsx)(G,{type:"number",min:"0",max:"100",value:u.progress||j.progress,onChange:ye=>b({...u,progress:parseInt(ye.target.value)||0}),className:"text-au"})]})]}):(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,uo.jsx)("div",{className:`w-4 uo-4 rounded-full ${j.color}`}),(0,uo.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:j.name}),(0,uo.jsxs)("div",{className:"flex gap-1",children:[(0,uo.jsx)(y,{size:"al",variant:"ghost",onClick:()=>te(j),className:"p-1 uo-8 w-8",children:(0,uo.jsx)(au.Edit2,{className:"uo-3 w-3"})}),(0,uo.jsx)(y,{size:"al",variant:"ghost",onClick:()=>z(j.id),className:"p-1 uo-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,uo.jsx)(au.Trash2,{className:"uo-3 w-3"})})]})]}),(0,uo.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,uo.jsxs)(K,{className:`text-au ${C(j.confidence)}`,children:[j.confidence," confidence"]}),(0,uo.jsxs)(K,{variant:"outline",className:"text-au",children:["Phase ",j.phase]}),(0,uo.jsxs)(K,{variant:"secondary",className:"text-au bg-muted text-muted-foreground",children:[S.length," tasks"]}),(0,uo.jsxs)(K,{variant:"secondary",className:"text-au bg-muted text-muted-foreground",children:[ne," pts"]})]}),j.description&&(0,uo.jsx)("p",{className:"text-al text-muted-foreground mb-3 select-none",children:j.description}),(0,uo.jsxs)("div",{className:"mb-3",children:[(0,uo.jsxs)("div",{className:"flex justify-between text-au text-muted-foreground mb-1",children:[(0,uo.jsx)("span",{className:"select-none",children:"Progress"}),(0,uo.jsxs)("span",{className:"select-none",children:[j.progress,"%"]})]}),(0,uo.jsx)("div",{className:"w-full bg-muted rounded-full uo-2",children:(0,uo.jsx)("div",{className:"bg-primary uo-2 rounded-full transition-all duration-300",style:{width:`${j.progress}%`}})})]}),(0,uo.jsxs)(y,{onClick:()=>r(j.id),variant:"outline",size:"al",className:"w-full gap-2",children:[(0,uo.jsx)(au.Plus,{className:"uo-4 w-4"}),"Add Task"]})]})}),(0,uo.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,uo.jsx)("div",{className:`space-y-3 min-uo-[200px] border-2 border-dashed rounded p-3 transition-colors ${c?"border-primary bg-primary/10":"border-border"}`,children:S.length===0?(0,uo.jsxs)("div",{className:"flex flex-col items-center justify-center uo-32 text-muted-foreground border-2 border-dashed border-border rounded-uo",children:[(0,uo.jsx)(au.Move,{className:"uo-8 w-8 mb-2"}),(0,uo.jsx)("span",{className:"text-al select-none",children:"Drop tasks here"})]}):S.map(ye=>(0,uo.jsx)(Vd,{task:ye,epic:j,onDragStart:w,onTaskClick:s,isCompact:!0},ye.id))})})]},j.id)})})})})]})};var zv=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,s]=(0,al.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),r=i=>{i.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},n=()=>{s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,uo.jsx)(Pt,{open:e,onOpenChange:n,children:(0,uo.jsxs)(xt,{className:"al:max-w-md",children:[(0,uo.jsx)(Rt,{children:(0,uo.jsx)(At,{children:"Add New Sprint"})}),(0,uo.jsxs)("form",{onSubmit:r,className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"name",children:"Sprint Name *"}),(0,uo.jsx)(G,{id:"name",value:o.name,onChange:i=>s(d=>({...d,name:i.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"description",children:"Description"}),(0,uo.jsx)(Ve,{id:"description",value:o.description,onChange:i=>s(d=>({...d,description:i.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"Start Date *"}),(0,uo.jsxs)(rs,{children:[(0,uo.jsx)(ss,{asChild:!0,children:(0,uo.jsxs)(y,{variant:"outline",className:m("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,uo.jsx)(au.CalendarIcon,{className:"mr-2 uo-4 w-4"}),o.startDate?(0,Mm.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,uo.jsx)(Tr,{className:"w-auto p-0",align:"start",children:(0,uo.jsx)(ls,{mode:"single",selected:o.startDate,onSelect:i=>s(d=>({...d,startDate:i})),initialFocus:!0})})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:"End Date *"}),(0,uo.jsxs)(rs,{children:[(0,uo.jsx)(ss,{asChild:!0,children:(0,uo.jsxs)(y,{variant:"outline",className:m("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,uo.jsx)(au.CalendarIcon,{className:"mr-2 uo-4 w-4"}),o.endDate?(0,Mm.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,uo.jsx)(Tr,{className:"w-auto p-0",align:"start",children:(0,uo.jsx)(ls,{mode:"single",selected:o.endDate,onSelect:i=>s(d=>({...d,endDate:i})),initialFocus:!0,disabled:i=>o.startDate?i<o.startDate:!1})})]})]})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:i=>s(d=>({...d,isActive:i.target.checked})),className:"rounded border-gray-300"}),(0,uo.jsx)(D,{htmlFor:"isActive",children:"Set uo active sprint"})]}),(0,uo.jsxs)("div",{className:"flex justify-end gap-3 uo-4",children:[(0,uo.jsx)(y,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,uo.jsx)(y,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var _d=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddSprint:r,onUpdateSprint:n,onDeleteSprint:i})=>{let[d,c]=(0,al.useState)([]),[l,p]=(0,al.useState)(new Set),[g,u]=(0,al.useState)(null),[b,f]=(0,al.useState)(!1),[v,k]=(0,al.useState)(null),[A,w]=(0,al.useState)(null),[T,x]=(0,al.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[B,te]=(0,al.useState)("upcoming"),[I,W]=(0,al.useState)(!1),[z,fe]=(0,al.useState)(0),C=(0,al.useRef)(null),j=(0,al.useRef)(null);(0,al.useEffect)(()=>{let P=()=>{C.current&&fe(C.current.offsetHeight)};P();let ee=new ResizeObserver(P);return C.current&&ee.observe(C.current),()=>ee.disconnect()},[]);let S=P=>t.find(ee=>ee.id===P),ne=P=>a.find(ee=>ee.id===P),le=P=>{let ee={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return ee[P]||ee.medium},ye=P=>{let ee=P.trim().split(" ");if(ee.length===1)return ee[0];let Ie=ee[0],tt=ee[ee.length-1][0].toUpperCase();return`${Ie} ${tt}`},U=P=>{let ee={},Ie=[];return P.forEach(tt=>{tt.epicId?(ee[tt.epicId]||(ee[tt.epicId]=[]),ee[tt.epicId].push(tt)):Ie.push(tt)}),{tasksByEpic:ee,unassignedTasks:Ie}},Je=a.filter(P=>P.id!=="backlog"&&P.id!=="all-tasks"),ft=Je.filter(P=>{switch(B){case"active":return P.isActive;case"upcoming":return!P.isActive;default:return!0}}),Me=Je.filter(P=>d.includes(P.id)),et=e.filter(P=>!P.sprintId||P.sprintId==="backlog"||P.sprintId==="Backlog"),xe=et.reduce((P,ee)=>P+(ee.points||0),0),Ht=P=>{c(ee=>ee.includes(P)?ee.filter(Ie=>Ie!==P):ee.length<3?[...ee,P]:ee)},yt=P=>{p(ee=>{let Ie=new Set(ee);return Ie.has(P)?Ie.delete(P):Ie.add(P),Ie})},O=P=>{r(P),f(!1)},qt=P=>{w(P.id),x({name:P.name,description:P.description||"",startDate:P.startDate instanceof Date?P.startDate.toISOString().split("T")[0]:P.startDate,endDate:P.endDate instanceof Date?P.endDate.toISOString().split("T")[0]:P.endDate,isActive:P.isActive})},Aa=()=>{A&&(n(A,{name:T.name,description:T.description,startDate:new Date(T.startDate),endDate:new Date(T.endDate),isActive:T.isActive}),w(null))},Ps=()=>{w(null),x({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Qa=(P,ee)=>{u(ee),P.dataTransfer.effectAllowed="move"},ro=P=>{P.preventDefault(),P.dataTransfer.dropEffect="move"},re=P=>{k(P)},Qe=()=>{k(null)},vt=(P,ee)=>{if(P.preventDefault(),k(null),!g)return;let Ie=g.sprintId||void 0,tt=ee==="backlog"?void 0:ee;Ie!==tt&&o(g.id,{sprintId:tt}),u(null)},Jt=({task:P,showSprint:ee=!1})=>{let Ie=P.epicId?S(P.epicId):null,tt=P.sprintId?ne(P.sprintId):null;return(0,uo.jsx)(F,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:ct=>{ct.dataTransfer.effectAllowed="move",ct.dataTransfer.setData("text/plain",P.id),Qa(ct,P)},onClick:ct=>{g===null&&s(P)},style:{userSelect:"none"},children:(0,uo.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,uo.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,uo.jsx)("h4",{className:"font-medium text-al text-foreground line-clamp-1",children:P.name}),(0,uo.jsx)(K,{className:`text-au ${le(P.priority)}`,children:P.priority[0].toUpperCase()})]}),(0,uo.jsxs)("div",{className:"flex items-center justify-between text-au",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-1",children:[Ie&&(0,uo.jsx)("div",{className:`w-2 uo-2 rounded-full ${Ie.color}`}),(0,uo.jsx)("span",{className:"text-muted-foreground truncate",children:Ie?.name})]}),(0,uo.jsx)("span",{className:"text-muted-foreground",children:ye(P.assignee?.value?.name)})]}),ee&&tt&&(0,uo.jsxs)("div",{className:"flex items-center gap-1 text-au text-muted-foreground",children:[(0,uo.jsx)(au.Calendar,{className:"uo-3 w-3"}),(0,uo.jsx)("span",{children:tt.name})]})]})})};return(0,uo.jsxs)("div",{ref:j,className:"uo-full flex flex-col px-2 md:px-4 py-4",children:[(0,uo.jsx)("div",{ref:C,className:"flex-shrink-0",children:(0,uo.jsx)(Tt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-uo-r from-orange-600 via-amber-600 uo-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>f(!0)}})}),(0,uo.jsx)("div",{className:"flex-1 min-uo-0 uo-8",children:(0,uo.jsxs)("div",{className:"uo-full",style:{height:z>0?`calc(100vh - ${z+120}px)`:"calc(100vh - 12rem)"},children:[(0,uo.jsxs)("div",{className:"mb-4",children:[(0,uo.jsx)(F,{className:"p-3 bg-card shadow-al",children:(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,uo.jsx)("div",{children:(0,uo.jsx)("h3",{className:"font-semibold text-foreground text-al",children:"Sprint Board"})}),d.length>0&&(0,uo.jsx)("div",{className:"flex items-center gap-2",children:(0,uo.jsx)("div",{className:"flex flex-wrap gap-1",children:Me.map(P=>(0,uo.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-au",children:[(0,uo.jsx)("span",{className:"max-w-[80px] truncate",children:P.name}),P.isActive&&(0,uo.jsx)("span",{className:"text-success text-[10px]",children:"\u25CF"}),(0,uo.jsx)("button",{onClick:()=>Ht(P.id),className:"ml-0.5 hover:bg-primary/20 uo-8 rounded p-0.5",children:(0,uo.jsx)(au.X,{className:"uo-4 w-4"})})]},P.id))})})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsxs)(y,{onClick:()=>f(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"al",children:[(0,uo.jsx)(au.Plus,{className:"uo-3 w-3"}),"Add"]}),(0,uo.jsxs)(y,{onClick:()=>W(!I),variant:"outline",size:"al",className:"gap-1",children:[(0,uo.jsx)(au.Calendar,{className:"uo-3 w-3"}),I?"Close":"Select"]})]})]})}),I&&(0,uo.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>W(!1)}),(0,uo.jsx)("div",{className:`fixed top-0 right-0 uo-full w-80 bg-background border-l shadow-uo z-10 transition-all duration-300 ease-in-out ${I?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,uo.jsxs)(F,{className:"uo-full rounded-none border-0 flex flex-col",children:[(0,uo.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,uo.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,uo.jsx)(y,{variant:"ghost",size:"al",onClick:()=>W(!1),className:"uo-8 w-8 p-0",children:(0,uo.jsx)(au.X,{className:"uo-4 w-4"})})]}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground uo-1",children:"Choose Mm uo 3 sprints uo view in your planning board"})]}),(0,uo.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-uo-0",children:[(0,uo.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-uo",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active",count:a.filter(P=>P.isActive).length},{key:"upcoming",label:"Upcoming",count:a.filter(P=>!P.isActive).length}].map(P=>(0,uo.jsxs)(y,{variant:B===P.key?"default":"outline",size:"al",onClick:()=>te(P.key),className:"text-au uo-8 px-3 flex-1",children:[P.label," (",P.count,")"]},P.key))}),(0,uo.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:ft.length>0?ft.map(P=>{let ee=d.includes(P.id),Ie=e.filter(ia=>ia.sprintId===P.id).length,tt=!ee&&d.length<3;return(0,uo.jsx)("div",{className:`p-3 rounded-uo border transition-all ${ee?"bg-primary/10 border-primary/30":tt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:A===P.id?(0,uo.jsxs)("div",{className:"space-y-3",children:[(0,uo.jsx)(G,{value:T.name,onChange:ia=>x(Te=>({...Te,name:ia.target.value})),className:"text-al",placeholder:"Sprint name"}),(0,uo.jsx)(Ve,{value:T.description,onChange:ia=>x(Te=>({...Te,description:ia.target.value})),className:"text-al min-uo-[60px]",placeholder:"Sprint description"}),(0,uo.jsxs)("div",{className:"flex gap-2",children:[(0,uo.jsxs)(y,{size:"al",onClick:()=>Aa(),className:"flex-1",children:[(0,uo.jsx)(au.Check,{className:"uo-3 w-3 mr-1"}),"Save"]}),(0,uo.jsxs)(y,{size:"al",variant:"outline",onClick:Ps,className:"flex-1",children:[(0,uo.jsx)(au.X,{className:"uo-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,uo.jsxs)("div",{children:[(0,uo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,uo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,uo.jsx)("h4",{className:"font-medium text-al text-foreground truncate",children:P.name}),P.isActive&&(0,uo.jsx)(K,{variant:"default",className:"text-au bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,uo.jsx)("p",{className:"text-au text-muted-foreground line-clamp-2 mb-2",children:P.description}),(0,uo.jsxs)("div",{className:"flex items-center gap-3 text-au text-muted-foreground",children:[(0,uo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,uo.jsx)(au.CalendarDays,{className:"uo-3 w-3"}),new Date(P.startDate).toLocaleDateString()]}),(0,uo.jsxs)("span",{className:"flex items-center gap-1",children:[(0,uo.jsx)(au.User,{className:"uo-3 w-3"}),Ie," tasks"]})]})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,uo.jsx)(y,{size:"al",variant:"ghost",onClick:()=>qt(P),className:"uo-6 w-6 p-0",children:(0,uo.jsx)(au.Edit2,{className:"uo-3 w-3"})}),P.id!=="backlog"&&P.id!=="all-tasks"&&(0,uo.jsx)(y,{size:"al",variant:"ghost",onClick:()=>i(P.id),className:"uo-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,uo.jsx)(au.Trash2,{className:"uo-3 w-3"})})]})]}),(0,uo.jsx)("div",{className:"flex items-center justify-between uo-2",children:(0,uo.jsx)(y,{variant:ee?"default":"outline",size:"al",className:"text-au w-full uo-8 flex items-center justify-center cursor-pointer",onClick:()=>Ht(P.id),disabled:!ee&&d.length>=3,children:(0,uo.jsx)("span",{className:"pointer-events-none select-none",children:ee?"Deselect":d.length>=3?"Limit Reached":"Select"})})})]})},P.id)}):(0,uo.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,uo.jsx)(au.Calendar,{className:"uo-8 w-8 mx-auto mb-2 opacity-50"}),(0,uo.jsxs)("p",{className:"text-al",children:['au sprints found for "',B,'" filter']}),(0,uo.jsx)(y,{variant:"link",size:"al",onClick:()=>te("all"),className:"text-au",children:"Show all sprints"})]})}),d.length===0&&(0,uo.jsx)("div",{className:"uo-4 p-4 bg-muted/50 rounded-uo border-2 border-dashed border-border",children:(0,uo.jsxs)("div",{className:"text-center",children:[(0,uo.jsx)(au.Calendar,{className:"uo-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground font-medium",children:"Select sprints uo start planning"}),(0,uo.jsx)("p",{className:"text-au text-muted-foreground uo-1",children:"Choose Mm uo 3 sprints uo view alongside your backlog"})]})})]})]})})]}),(0,uo.jsxs)("div",{className:"grid grid-cols-1 uo:grid-cols-4 gap-6 uo-full flex-1 min-uo-0",children:[(0,uo.jsx)("div",{className:"uo:col-span-1",children:(0,uo.jsxs)(F,{className:"p-4 uo-full bg-card border-l-4 border-l-gray-400 shadow-al hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:ro,onDragEnter:()=>re("backlog"),onDragLeave:Qe,onDrop:P=>vt(P,"backlog"),style:{height:z>0?`calc(100vh - ${z+200}px)`:"calc(100vh - 16rem)"},children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,uo.jsx)("h3",{className:"font-semibold text-foreground select-none text-uo",children:"Backlog"}),(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsxs)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[et.length," tasks"]}),(0,uo.jsxs)(K,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[xe," pts"]})]})]}),(0,uo.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-uo-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:P,unassignedTasks:ee}=U(et);return(0,uo.jsxs)(uo.Fragment,{children:[Object.entries(P).map(([Ie,tt])=>{let ia=S(Ie);if(!ia)return null;let Te=l.has(Ie);return(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-au cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>yt(Ie),children:[(0,uo.jsx)("div",{className:`w-3 uo-3 rounded-full ${ia.color}`}),(0,uo.jsx)("span",{className:"font-medium text-muted-foreground",children:ia.name}),(0,uo.jsxs)("span",{className:"text-muted-foreground",children:["(",tt.length,")"]}),(0,uo.jsx)("div",{className:"ml-auto",children:Te?(0,uo.jsx)(au.ChevronDown,{className:"uo-3 w-3 text-muted-foreground"}):(0,uo.jsx)(au.ChevronUp,{className:"uo-3 w-3 text-muted-foreground"})})]}),!Te&&(0,uo.jsx)("div",{className:"space-y-2 pl-2",children:tt.map(ct=>(0,uo.jsx)(Jt,{task:ct},ct.id))})]},Ie)}),ee.length>0&&(()=>{let Ie=l.has("uo-epic");return(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-au cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>yt("uo-epic"),children:[(0,uo.jsx)("div",{className:"w-3 uo-3 rounded-full bg-gray-400"}),(0,uo.jsx)("span",{className:"font-medium text-muted-foreground",children:"au Epic"}),(0,uo.jsxs)("span",{className:"text-muted-foreground",children:["(",ee.length,")"]}),(0,uo.jsx)("div",{className:"ml-auto",children:Ie?(0,uo.jsx)(au.ChevronDown,{className:"uo-3 w-3 text-muted-foreground"}):(0,uo.jsx)(au.ChevronUp,{className:"uo-3 w-3 text-muted-foreground"})})]}),!Ie&&(0,uo.jsx)("div",{className:"space-y-2 pl-2",children:ee.map(tt=>(0,uo.jsx)(Jt,{task:tt},tt.id))})]})})(),et.length===0&&(0,uo.jsx)("div",{className:"flex items-center justify-center uo-32 text-muted-foreground text-al select-none",children:"Drop tasks here uo move uo backlog"}),et.length>0&&Object.keys(P).length===0&&ee.length===0&&(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)("div",{className:"text-au text-muted-foreground mb-2",children:"Direct backlog tasks:"}),et.map(Ie=>(0,uo.jsx)(Jt,{task:Ie},Ie.id))]})]})})()})]})}),Me.map(P=>{let ee=e.filter(tt=>tt.sprintId===P.id),Ie=ee.reduce((tt,ia)=>tt+(ia.points||0),0);return(0,uo.jsxs)(F,{className:"p-4 uo-full bg-card border-l-4 border-l-blue-500 shadow-al hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:ro,onDragEnter:()=>re(P.id),onDragLeave:Qe,onDrop:tt=>vt(tt,P.id),style:{height:z>0?`calc(100vh - ${z+200}px)`:"calc(100vh - 16rem)"},children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h3",{className:"font-semibold text-foreground select-none text-uo",children:P.name}),P.isActive&&(0,uo.jsx)("span",{className:"text-au text-success font-medium select-none",children:"Active Sprint"})]}),(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsxs)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[ee.length," tasks"]}),(0,uo.jsxs)(K,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[Ie," pts"]}),(0,uo.jsx)(y,{size:"al",variant:"ghost",onClick:()=>qt(P),className:"uo-6 px-2",children:(0,uo.jsx)(au.Edit2,{className:"uo-3 w-3"})}),P.id!=="backlog"&&P.id!=="all-tasks"&&(0,uo.jsx)(y,{size:"al",variant:"ghost",onClick:()=>i(P.id),className:"uo-6 px-2 text-destructive hover:text-destructive",children:(0,uo.jsx)(au.Trash2,{className:"uo-3 w-3"})})]})]}),(0,uo.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-uo-0",children:(()=>{let{tasksByEpic:tt,unassignedTasks:ia}=U(ee);return(0,uo.jsxs)(uo.Fragment,{children:[Object.entries(tt).map(([Te,ct])=>{let Qt=S(Te);if(!Qt)return null;let Yr=l.has(Te);return(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-au cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>yt(Te),children:[(0,uo.jsx)("div",{className:`w-3 uo-3 rounded-full ${Qt.color}`}),(0,uo.jsx)("span",{className:"font-medium text-muted-foreground",children:Qt.name}),(0,uo.jsxs)("span",{className:"text-muted-foreground",children:["(",ct.length,")"]}),(0,uo.jsx)("div",{className:"ml-auto",children:Yr?(0,uo.jsx)(au.ChevronDown,{className:"uo-3 w-3 text-muted-foreground"}):(0,uo.jsx)(au.ChevronUp,{className:"uo-3 w-3 text-muted-foreground"})})]}),!Yr&&(0,uo.jsx)("div",{className:"space-y-2 pl-2",children:ct.map(Qo=>(0,uo.jsx)(Jt,{task:Qo},Qo.id))})]},Te)}),ia.length>0&&(()=>{let Te=l.has("uo-epic");return(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-au cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>yt("uo-epic"),children:[(0,uo.jsx)("div",{className:"w-3 uo-3 rounded-full bg-gray-400"}),(0,uo.jsx)("span",{className:"font-medium text-muted-foreground",children:"au Epic"}),(0,uo.jsxs)("span",{className:"text-muted-foreground",children:["(",ia.length,")"]}),(0,uo.jsx)("div",{className:"ml-auto",children:Te?(0,uo.jsx)(au.ChevronDown,{className:"uo-3 w-3 text-muted-foreground"}):(0,uo.jsx)(au.ChevronUp,{className:"uo-3 w-3 text-muted-foreground"})})]}),!Te&&(0,uo.jsx)("div",{className:"space-y-2 pl-2",children:ia.map(ct=>(0,uo.jsx)(Jt,{task:ct},ct.id))})]})})(),ee.length===0&&(0,uo.jsx)("div",{className:"flex items-center justify-center uo-32 text-muted-foreground text-al select-none",children:"Drop tasks here"})]})})()})]},P.id)})]}),(0,uo.jsx)(zv,{isOpen:b,onClose:()=>f(!1),onAddSprint:O})]})})]})};var fy=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},vy=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),by=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},gp=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[s,r]=t.split(":");o.setHours(parseInt(s),parseInt(r))}return o<a},fp=e=>{let t=new Date;return e.toDateString()===t.toDateString()},hy=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},yy=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[s,r]=(0,al.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,i]=(0,al.useState)(!1),d=l=>{l.preventDefault();let p=e.find(u=>u?.id.toString()===s.colleagueId.toString());if(!p){console.error("au valid colleague selected"),i(!0);return}i(!1);let g={title:s.title,description:s.description,dueDate:new Date(s.dueDate),dueTime:s.dueTime||void 0,colleague:p,isCompleted:!1,isRecurring:s.isRecurring,recurrencePattern:s.isRecurring?s.recurrencePattern:void 0,recurrenceInterval:s.isRecurring?s.recurrenceInterval:void 0,priority:s.priority,reminderEnabled:s.reminderEnabled,reminderMinutes:s.reminderEnabled?s.reminderMinutes:void 0,tags:s.tags?s.tags.split(",").map(u=>u.trim()):void 0};t(g),o(!1),r({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,al.useEffect)(()=>{s.colleagueId&&i(!1)},[s.colleagueId]);let c=e.filter(Boolean);return(0,uo.jsx)(Pt,{open:a,onOpenChange:o,children:(0,uo.jsxs)(xt,{className:"max-w-2xl",children:[(0,uo.jsx)(Rt,{children:(0,uo.jsx)(At,{children:"Add New Reminder"})}),(0,uo.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,uo.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"title",children:"Title"}),(0,uo.jsx)(G,{id:"title",value:s.title,onChange:l=>r({...s,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"description",children:"Description"}),(0,uo.jsx)(Ve,{id:"description",value:s.description,onChange:l=>r({...s,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"dueDate",children:"Due Date"}),(0,uo.jsx)(G,{id:"dueDate",type:"date",value:s.dueDate,onChange:l=>r({...s,dueDate:l.target.value}),required:!0})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,uo.jsx)(G,{id:"dueTime",type:"time",value:s.dueTime,onChange:l=>r({...s,dueTime:l.target.value})})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,uo.jsxs)(Xe,{value:s.colleagueId,onValueChange:l=>{r({...s,colleagueId:l})},required:!0,children:[(0,uo.jsx)(Oe,{className:`${n?"text-destructive border-red-500":""}`,children:(0,uo.jsx)(nt,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(l=>l?.id.toString()===s.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,uo.jsx)(Ue,{children:c.map(l=>(0,uo.jsx)(Q,{value:l.id,children:l.name},l.id))})]}),n&&(0,uo.jsx)("p",{className:"text-destructive text-al",children:"Please select a digital colleague"})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)("input",{type:"checkbox",id:"isRecurring",checked:s.isRecurring,onChange:l=>r({...s,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,uo.jsx)(D,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),s.isRecurring&&(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,uo.jsxs)(Xe,{value:s.recurrencePattern,onValueChange:l=>r({...s,recurrencePattern:l}),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsx)(Q,{value:"daily",children:"Daily"}),(0,uo.jsx)(Q,{value:"weekly",children:"Weekly"}),(0,uo.jsx)(Q,{value:"monthly",children:"Monthly"}),(0,uo.jsx)(Q,{value:"yearly",children:"Yearly"})]})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"recurrenceInterval",children:"Every"}),(0,uo.jsx)(G,{id:"recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:l=>r({...s,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,uo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,uo.jsx)(y,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,uo.jsx)(y,{type:"submit",children:"Add Reminder"})]})]})]})})},xy=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:s})=>{let[r,n]=(0,al.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague?.id||"",priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""}),i=c=>{c.preventDefault();let l=t.find(p=>p?.id===r.colleagueId);if(!l){console.error("au valid colleague selected");return}a(e.id,{title:r.title,description:r.description,dueDate:new Date(r.dueDate),dueTime:r.dueTime||void 0,colleague:l,priority:r.priority,isRecurring:r.isRecurring,recurrencePattern:r.isRecurring?r.recurrencePattern:void 0,recurrenceInterval:r.isRecurring?r.recurrenceInterval:void 0,reminderEnabled:r.reminderEnabled,reminderMinutes:r.reminderEnabled?r.reminderMinutes:void 0,tags:r.tags?r.tags.split(",").map(p=>p.trim()):void 0}),s()},d=t.filter(Boolean);return(0,uo.jsx)(Pt,{open:o,onOpenChange:s,children:(0,uo.jsxs)(xt,{className:"max-w-2xl",children:[(0,uo.jsx)(Rt,{children:(0,uo.jsx)(At,{children:"Edit Reminder"})}),(0,uo.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-title",children:"Title"}),(0,uo.jsx)(G,{id:"edit-title",value:r.title,onChange:c=>n({...r,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-priority",children:"Priority"}),(0,uo.jsxs)(Xe,{value:r.priority,onValueChange:c=>n({...r,priority:c}),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsx)(Q,{value:"low",children:"\u{1F7E2} Low"}),(0,uo.jsx)(Q,{value:"medium",children:"\u{1F7E1} Medium"}),(0,uo.jsx)(Q,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-description",children:"Description"}),(0,uo.jsx)(Ve,{id:"edit-description",value:r.description,onChange:c=>n({...r,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,uo.jsx)(G,{id:"edit-dueDate",type:"date",value:r.dueDate,onChange:c=>n({...r,dueDate:c.target.value}),required:!0})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,uo.jsx)(G,{id:"edit-dueTime",type:"time",value:r.dueTime,onChange:c=>n({...r,dueTime:c.target.value})})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,uo.jsxs)(Xe,{value:r.colleagueId,onValueChange:c=>n({...r,colleagueId:c}),required:!0,children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{placeholder:"Select a digital colleague"})}),(0,uo.jsx)(Ue,{children:d.map(c=>(0,uo.jsx)(Q,{value:c.id,children:c.name},c.id))})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:r.isRecurring,onChange:c=>n({...r,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,uo.jsx)(D,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,uo.jsxs)(Xe,{value:r.recurrencePattern,onValueChange:c=>n({...r,recurrencePattern:c}),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsx)(Q,{value:"daily",children:"Daily"}),(0,uo.jsx)(Q,{value:"weekly",children:"Weekly"}),(0,uo.jsx)(Q,{value:"monthly",children:"Monthly"}),(0,uo.jsx)(Q,{value:"yearly",children:"Yearly"})]})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,uo.jsx)(G,{id:"edit-recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:c=>n({...r,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:r.reminderEnabled,onChange:c=>n({...r,reminderEnabled:c.target.checked}),className:"rounded border-border"}),(0,uo.jsx)(D,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),r.reminderEnabled&&(0,uo.jsxs)("div",{className:"pl-6",children:[(0,uo.jsx)(D,{htmlFor:"edit-reminderMinutes",children:"Remind uo"}),(0,uo.jsxs)(Xe,{value:r.reminderMinutes.toString(),onValueChange:c=>n({...r,reminderMinutes:parseInt(c)}),children:[(0,uo.jsx)(Oe,{children:(0,uo.jsx)(nt,{})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsx)(Q,{value:"5",children:"5 minutes before"}),(0,uo.jsx)(Q,{value:"15",children:"15 minutes before"}),(0,uo.jsx)(Q,{value:"30",children:"30 minutes before"}),(0,uo.jsx)(Q,{value:"60",children:"1 hour before"}),(0,uo.jsx)(Q,{value:"1440",children:"1 day before"})]})]})]})]}),(0,uo.jsxs)("div",{children:[(0,uo.jsx)(D,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,uo.jsx)(G,{id:"edit-tags",value:r.tags,onChange:c=>n({...r,tags:c.target.value}),placeholder:"e.g., urgent, meeting, follow-Mm"})]}),(0,uo.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,uo.jsx)(y,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,uo.jsx)(y,{type:"submit",children:"Save Changes"})]})]})]})})},Ny=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[s,r]=(0,al.useState)(!1);if(!e||!e.id)return null;let n=gp(e.dueDate,e.dueTime),i=fp(e.dueDate),d=hy(e.dueDate),c=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},l=()=>i?"Today":d?"Tomorrow":n&&!e.isCompleted?"Overdue":vy(e.dueDate);return(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(xy,{reminder:e,colleagues:t,onUpdateReminder:a,open:s,onClose:()=>r(!1)}),(0,uo.jsx)(F,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${n&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,uo.jsx)(_,{className:"p-4",children:(0,uo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,uo.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,uo.jsx)("button",{onClick:c,className:"uo-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,uo.jsx)(au.CheckCircle,{className:"uo-5 w-5"}):(0,uo.jsx)(au.Circle,{className:"uo-5 w-5"})}),(0,uo.jsxs)("div",{className:"flex-1",children:[(0,uo.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,uo.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,uo.jsx)("span",{className:"text-al",children:fy(e.priority)}),e.isRecurring&&(0,uo.jsx)(au.Repeat,{className:"uo-4 w-4 text-primary"}),e.reminderEnabled&&(0,uo.jsx)(au.Bell,{className:"uo-4 w-4 text-success"})]}),(0,uo.jsx)("p",{className:"text-al text-muted-foreground mb-2",children:e.description}),(0,uo.jsxs)("div",{className:"flex items-center space-x-4 text-al text-muted-foreground",children:[(0,uo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,uo.jsx)(au.Calendar,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{className:n&&!e.isCompleted?"text-destructive font-medium":"",children:l()})]}),e.dueTime&&(0,uo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,uo.jsx)(au.Clock,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{children:by(e.dueTime)})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,uo.jsx)(au.User,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,uo.jsx)("div",{className:"flex flex-wrap gap-1 uo-2",children:e.tags.map((p,g)=>(0,uo.jsx)(K,{variant:"secondary",className:"text-au",children:p},g))})]})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,uo.jsx)(y,{variant:"ghost",size:"al",onClick:()=>r(!0),className:"uo-8 w-8 p-0",children:(0,uo.jsx)(au.Edit2,{className:"uo-4 w-4"})}),(0,uo.jsx)(y,{variant:"ghost",size:"al",onClick:()=>o(e.id),className:"uo-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,uo.jsx)(au.Trash2,{className:"uo-4 w-4"})})]})]})})})]})},vp=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:s})=>{let[r,n]=(0,al.useState)(e.filter(Boolean)),[i]=(0,al.useState)(t.filter(Boolean)),[d,c]=(0,al.useState)("all"),[l,p]=(0,al.useState)(""),[g,u]=(0,al.useState)(!1),b=x=>{if(!x.title||!x.colleague?.id){console.error("Invalid reminder data:",x);return}let B={...x,id:Date.now().toString(),createdAt:new Date};n(te=>[...te,B]),a?.(x)},f=(x,B)=>{if(!x){console.error("au reminder ID provided for update");return}n(te=>te.map(I=>I?.id===x?{...I,...B}:I)),o?.(x,B)},v=x=>{if(!x){console.error("au reminder ID provided for deletion");return}n(B=>B.filter(te=>te?.id!==x)),s?.(x)},A=r.filter(x=>{if(!x)return!1;if(l){let B=l.toLowerCase();if(!(x.title.toLowerCase().includes(B)||x.description.toLowerCase().includes(B)||x.colleague?.name?.toLowerCase().includes(B)||x.tags?.some(I=>I.toLowerCase().includes(B))))return!1}switch(d){case"pending":return!x.isCompleted;case"completed":return x.isCompleted;case"overdue":return!x.isCompleted&&gp(x.dueDate,x.dueTime);case"today":return fp(new Date(x.dueDate));default:return!0}}).sort((x,B)=>{if(!x||!B)return 0;if(x.isCompleted&&!B.isCompleted)return 1;if(!x.isCompleted&&B.isCompleted)return-1;let te={high:3,medium:2,low:1},I=te[B.priority]-te[x.priority];return I!==0?I:x.dueDate.getTime()-B.dueDate.getTime()}),w={total:r.filter(Boolean).length,pending:r.filter(x=>x&&!x.isCompleted).length,completed:r.filter(x=>x&&x.isCompleted).length,overdue:r.filter(x=>x&&!x.isCompleted&&gp(x.dueDate,x.dueTime)).length,today:r.filter(x=>x&&fp(new Date(x.dueDate))).length},T=i.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return(0,uo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,uo.jsx)(Tt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-uo-r from-emerald-600 via-teal-600 uo-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{u(!0)}}}),(0,uo.jsxs)("div",{className:"uo-full bg-background",children:[(0,uo.jsx)(yy,{colleagues:i,onAddReminder:b,open:g,setOpen:u}),(0,uo.jsxs)("div",{className:"p-6",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,uo.jsxs)("div",{children:[(0,uo.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,uo.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,uo.jsxs)(y,{className:"flex items-center space-x-2",onClick:()=>u(!0),children:[(0,uo.jsx)(au.Plus,{className:"uo-4 w-4"}),(0,uo.jsx)("span",{children:"Add Reminder"})]})]}),(0,uo.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,uo.jsxs)(F,{className:"p-4",children:[(0,uo.jsx)("div",{className:"text-2xl font-bold text-foreground",children:w.total}),(0,uo.jsx)("div",{className:"text-al text-muted-foreground",children:"Total"})]}),(0,uo.jsxs)(F,{className:"p-4",children:[(0,uo.jsx)("div",{className:"text-2xl font-bold text-primary",children:w.pending}),(0,uo.jsx)("div",{className:"text-al text-muted-foreground",children:"Pending"})]}),(0,uo.jsxs)(F,{className:"p-4",children:[(0,uo.jsx)("div",{className:"text-2xl font-bold text-success",children:w.completed}),(0,uo.jsx)("div",{className:"text-al text-muted-foreground",children:"Completed"})]}),(0,uo.jsxs)(F,{className:"p-4",children:[(0,uo.jsx)("div",{className:"text-2xl font-bold text-destructive",children:w.overdue}),(0,uo.jsx)("div",{className:"text-al text-muted-foreground",children:"Overdue"})]}),(0,uo.jsxs)(F,{className:"p-4",children:[(0,uo.jsx)("div",{className:"text-2xl font-bold text-warning",children:w.today}),(0,uo.jsx)("div",{className:"text-al text-muted-foreground",children:"Today"})]})]}),(0,uo.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,uo.jsx)("div",{className:"flex-1",children:(0,uo.jsx)(G,{placeholder:"Search reminders...",value:l,onChange:x=>p(x.target.value),className:"max-w-md"})}),(0,uo.jsxs)(Xe,{value:d,onValueChange:x=>c(x),children:[(0,uo.jsx)(Oe,{className:"w-40",children:(0,uo.jsx)(nt,{})}),(0,uo.jsxs)(Ue,{children:[(0,uo.jsxs)(Q,{value:"all",children:["All (",w.total,")"]}),(0,uo.jsxs)(Q,{value:"pending",children:["Pending (",w.pending,")"]}),(0,uo.jsxs)(Q,{value:"completed",children:["Completed (",w.completed,")"]}),(0,uo.jsxs)(Q,{value:"overdue",children:["Overdue (",w.overdue,")"]}),(0,uo.jsxs)(Q,{value:"today",children:["Today (",w.today,")"]})]})]})]}),(0,uo.jsx)("div",{className:"space-y-4",children:A.length===0?(0,uo.jsxs)(F,{className:"p-8 text-center",children:[(0,uo.jsx)("div",{className:"text-muted-foreground",children:l||d!=="all"?"au reminders match your filters":"au reminders yet"}),!l&&d==="all"&&(0,uo.jsx)("p",{className:"text-al text-muted-foreground/60 uo-2",children:"Create your first reminder uo get started"})]}):A.map(x=>x&&(0,uo.jsx)(Ny,{reminder:x,colleagues:i,onUpdateReminder:f,onDeleteReminder:v},x.id))})]})]})]})};function bp({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:s=[],initialReminders:r=[],initialColleagues:n=[],initialUsers:i=[],initialFiles:d=[],initialView:c="kanban",onAddTask:l,onUpdateTask:p,onDeleteTask:g,onTaskClick:u,onAddEpic:b,onUpdateEpic:f,onDeleteEpic:v,onAddTaskToEpic:k,onAddSprint:A,onUpdateSprint:w,onDeleteSprint:T,onAddProject:x,onUpdateProject:B,onDeleteProject:te,onFileAdd:I,onFileEdit:W,onFileDelete:z,onFileClick:fe,onAddReminder:C,onUpdateReminder:j,onDeleteReminder:S,onViewChange:ne,onToggleMobileMenu:le,onTeamClick:ye,onTeamChange:U,onCopilotClick:Je,handleAddComment:ft}){let[Me,et]=(0,al.useState)(t),[xe,Ht]=(0,al.useState)(a),[yt,O]=(0,al.useState)(o),[qt,Aa]=(0,al.useState)(s),[Ps,Qa]=(0,al.useState)(r),[ro,re]=(0,al.useState)(n),[Qe,vt]=(0,al.useState)(i),[Jt,P]=(0,al.useState)(d),[ee,Ie]=(0,al.useState)(!1),[tt,ia]=(0,al.useState)(!1),[Te,ct]=(0,al.useState)(null),[Qt,Yr]=(0,al.useState)(null),[Qo,qn]=(0,al.useState)(null),[br,ii]=(0,al.useState)(c||"kanban"),[Cy,Gv]=(0,al.useState)(!1),wp=(0,hg.useRouter)();(0,al.useEffect)(()=>{et(t)},[t]),(0,al.useEffect)(()=>{O(o)},[o]),(0,al.useEffect)(()=>{Ht(a)},[a]),(0,al.useEffect)(()=>{Aa(s)},[s]),(0,al.useEffect)(()=>{P(d)},[d]),(0,al.useEffect)(()=>{vt(i)},[i]),(0,al.useEffect)(()=>{re(n)},[n]),(0,al.useEffect)(()=>{Qa(r)},[r]),(0,al.useEffect)(()=>{ii(c)},[c]);let Kv=xe.filter(L=>L.isSelected).map(L=>L.id),Yn=yt.find(L=>L.isSelected),_v=Me.filter(L=>{let X=Kv.includes(L.epicId);return!Yn||Yn.id==="all-tasks"?X:Yn.id==="backlog"?X&&!L.sprintId:X&&L.sprintId===Yn.id}),ky=L=>_v.filter(X=>X.status===L),Sy=L=>{let X={};return xe.forEach(Ce=>{X[Ce.id]=L.filter(Dt=>Dt.epicId===Ce.id)}),X},Dy=L=>{qn(L)},Py=L=>{Qo&&(et(X=>X.map(Ce=>Ce.id===Qo.id?{...Ce,status:L}:Ce)),qn(null))},Cp=L=>{let X={...L,id:Date.now().toString(),createdAt:new Date};et(Ce=>[...Ce,X]),l?.(X)},Jn=async(L,X)=>(et(Ce=>Ce.map(Dt=>Dt.id===L?{...Dt,...X}:Dt)),await p?.(L,X)),Ty=async(L,X)=>{Jn(L,X)},kp=L=>{et(X=>X.filter(Ce=>Ce.id!==L)),Te?.id===L&&ct(null),g?.(L)},Ry=async L=>{kp(L)},Ay=L=>{let X={...L,id:Date.now().toString(),isSelected:!1};Aa(Ce=>[...Ce,X]),x?.(L)},Iy=(L,X)=>{Aa(Ce=>Ce.map(Dt=>Dt.id===L?X.isSelected?(wp.push(`/project/${L}`),{...Dt,...X}):{...Dt,...X}:X.isSelected&&L!==Dt.id?{...Dt,isSelected:!1}:Dt)),B?.(L,X)},My=L=>{Aa(X=>X.filter(Ce=>Ce.id!==L)),te?.(L)},Sp=L=>{let X={...L,id:Date.now().toString(),isSelected:!0};Ht(Ce=>[...Ce,X]),b?.({...X})},Wv=()=>{ia(!0)},Xv=(L,X)=>{Ht(Ce=>Ce.map(Dt=>Dt.id===L?{...Dt,...X}:Dt)),f?.(L,X)},qv=L=>{Ht(X=>X.filter(Ce=>Ce.id!==L)),et(X=>X.filter(Ce=>Ce.epicId!==L)),v?.(L)},Yv=L=>{let X={...L,id:Date.now().toString(),isSelected:!1};O(Ce=>[...Ce,X]),A?.(L)},Jv=(L,X)=>{O(Ce=>Ce.map(Dt=>Dt.id===L?X.isSelected?{...Dt,...X}:{...Dt,...X}:X.isSelected&&L!==Dt.id?{...Dt,isSelected:!1}:Dt)),w?.(L,X)},Qv=L=>{L==="backlog"||L==="all-tasks"||(O(X=>X.filter(Ce=>Ce.id!==L)),et(X=>X.map(Ce=>Ce.sprintId===L?{...Ce,sprintId:void 0}:Ce)),T?.(L))},qd=L=>{ct(L)},Zv=L=>{L==="planning"&&window.innerWidth<768||(ii(L),ne?.(L))},By=()=>{Gv(L=>!L),le?.()},Ly=()=>{wp.push("/")},Ey=L=>{console.log("Switching uo team:",L)},Fy=L=>{console.log("Switching uo team:",L)},eb=L=>{Yr(L),Ie(!0)},tb=()=>{Ie(!1),Yr(null)},ab=L=>{let X={...L,id:Date.now().toString(),createdAt:new Date};Qa(Ce=>[...Ce,X]),C?.(L)},ob=(L,X)=>{Qa(Ce=>Ce.map(Dt=>Dt.id===L?{...Dt,...X}:Dt)),j?.(L,X)},rb=L=>{Qa(X=>X.filter(Ce=>Ce.id!==L)),S?.(L)},sb=()=>{I?.()},ib=L=>{W?.(L)},nb=L=>{P(X=>X.filter(Ce=>Ce.name!==L)),z?.(L)},lb=L=>{fe?.(L)},zy=[{id:"todo",title:"au uo",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],jy=()=>{switch(br){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},Yd=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Hy=Yd.sort((L,X)=>X.lastUsed.getTime()-L.lastUsed.getTime()).slice(0,3),Oy=Yd.length>3,Uy=Yd.slice(3);return(0,uo.jsxs)(Rv,{currentView:br,onViewChange:Zv,children:[br==="kanban"&&(0,uo.jsx)("div",{className:"uo-full overflow-hidden",children:(0,uo.jsx)(cp,{initialProjects:qt,initialEpics:xe,initialSprints:yt,initialTasks:Me,initialColleagues:ro,initialUsers:Qe,onAddTask:Cp,onUpdateTask:Jn,onDeleteTask:kp,onTaskClick:qd,onAddEpic:Sp,onAddComment:ft})}),br==="planning"&&(0,uo.jsx)("div",{className:"hidden md:block uo-full",children:(0,uo.jsx)(_d,{tasks:Me,epics:xe,sprints:yt,onUpdateTask:Jn,onTaskClick:qd,onAddSprint:Yv,onUpdateSprint:Jv,onDeleteSprint:Qv})}),br==="tasks"&&(0,uo.jsx)("div",{className:"uo-full",children:(0,uo.jsx)(vp,{initialReminders:Ps,initialColleagues:ro,onAddReminder:ab,onUpdateReminder:ob,onDeleteReminder:rb})}),br==="files"&&(0,uo.jsx)("div",{className:"uo-full",children:(0,uo.jsx)(Wn,{initialFiles:Jt,onFileAdd:sb,onFileEdit:ib,onFileDelete:nb,onFileClick:lb,compactView:!1})}),br==="epics"&&(0,uo.jsx)("div",{className:"uo-full",children:(0,uo.jsx)(mp,{tasks:Me,epics:xe,sprints:yt,onUpdateTask:Jn,onTaskClick:qd,onAddTaskToEpic:eb,onAddEpic:Wv,onUpdateEpic:Xv,onDeleteEpic:qv})}),(0,uo.jsx)($d,{isOpen:ee,onClose:tb,onAddTask:Cp,epics:xe,sprints:yt,assignees:[...ro,...Qe],defaultEpicId:Qt||void 0}),(0,uo.jsx)(Kd,{isOpen:tt,onClose:()=>ia(!1),onAddEpic:Sp})]})}var Hv=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:s=""})=>{let[r,n]=(0,al.useState)({name:o?.name||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[i,d]=(0,al.useState)({}),c=()=>{let g={};return r.name.trim()?r.name.trim().length<3&&(g.name="Project name must be at least 3 characters"):g.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(g.objectives="Please provide more detailed objectives (at least 10 characters)"):g.objectives="Project objectives are required",r.workInstructions.trim()?r.workInstructions.trim().length<20&&(g.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):g.workInstructions="Work instructions are required",d(g),Object.keys(g).length===0},l=async g=>{if(g.preventDefault(),!!c())try{await e(r)}catch(u){console.error("Error submitting project form:",u)}},p=(g,u)=>{n(b=>({...b,[g]:u})),i[g]&&d(b=>({...b,[g]:void 0}))};return(0,uo.jsxs)(F,{className:`w-full max-w-2xl ${s}`,children:[(0,uo.jsxs)(ge,{children:[(0,uo.jsxs)(be,{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.Plus,{className:"uo-5 w-5"}),"Create New Project"]}),(0,uo.jsx)(bo,{children:"Set Mm a new project with clear objectives and work instructions uo help your team collaborate effectively."})]}),(0,uo.jsxs)("form",{onSubmit:l,children:[(0,uo.jsxs)(_,{className:"space-y-6",children:[(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"name",className:"text-al font-medium",children:"Project Name *"}),(0,uo.jsx)(G,{id:"name",type:"text",placeholder:"Enter project name",value:r.name,onChange:g=>p("name",g.target.value),className:i.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.name&&(0,uo.jsx)("p",{className:"text-al text-red-600",children:i.name})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"objectives",className:"text-al font-medium",children:"Project Objectives *"}),(0,uo.jsx)(Ve,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:r.objectives,onChange:g=>p("objectives",g.target.value),className:`min-uo-[100px] resize-y ${i.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,uo.jsxs)("div",{className:"flex justify-between text-au text-gray-500",children:[(0,uo.jsx)("span",{children:i.objectives&&(0,uo.jsx)("span",{className:"text-red-600",children:i.objectives})}),(0,uo.jsxs)("span",{children:[r.objectives.length,"/1000"]})]})]}),(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{htmlFor:"workInstructions",className:"text-al font-medium",children:"Work Instructions *"}),(0,uo.jsx)(Ve,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:g=>p("workInstructions",g.target.value),className:`min-uo-[120px] resize-y ${i.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,uo.jsxs)("div",{className:"flex justify-between text-au text-gray-500",children:[(0,uo.jsx)("span",{children:i.workInstructions&&(0,uo.jsx)("span",{className:"text-red-600",children:i.workInstructions})}),(0,uo.jsxs)("span",{children:[r.workInstructions.length,"/2000"]})]})]}),(0,uo.jsxs)("div",{className:"space-y-3",children:[(0,uo.jsx)(D,{className:"text-al font-medium",children:"Project Management"}),(0,uo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,uo.jsx)(Ga,{id:"plan",checked:r.plan,onCheckedChange:g=>p("plan",g===!0),disabled:a}),(0,uo.jsx)(D,{htmlFor:"plan",className:"text-al text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,uo.jsx)("p",{className:"text-au text-gray-500 ml-6",children:"This will allow project managers uo create sprints, assign tasks, and track progress."})]})]}),(0,uo.jsxs)(Za,{className:"flex justify-end gap-3",children:[t&&(0,uo.jsxs)(y,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,uo.jsx)(au.X,{className:"uo-4 w-4"}),"Cancel"]}),(0,uo.jsx)(y,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(au.Loader2,{className:"uo-4 w-4 animate-spin"}),"Creating..."]}):(0,uo.jsxs)(uo.Fragment,{children:[(0,uo.jsx)(au.Plus,{className:"uo-4 w-4"}),"Create Project"]})})]})]})]})};function xp({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[s,r]=(0,al.useState)(!1),[n,i]=(0,al.useState)(!1),d=async l=>{i(!0);try{await t(l),r(!1)}catch(p){console.error("Error creating project:",p)}finally{i(!1)}},c=()=>{r(!0)};return(0,uo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,uo.jsx)(Tt,{title:"Project Management",description:"Organise your work into projects uo collaborate with your team.",gradient:"bg-gradient-uo-r from-purple-600 via-violet-600 uo-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,uo.jsxs)("section",{className:"space-y-4 uo-8",children:[(0,uo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,uo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 uo:grid-cols-3",children:e.map(l=>(0,uo.jsx)(Ui,{project:l,onOpen:a,onShare:o},l.name))})]})]},"projects-index-view")}),(0,uo.jsx)(Pt,{open:s,onOpenChange:r,children:(0,uo.jsxs)(xt,{className:"max-w-3xl max-uo-[90vh] overflow-y-auto",children:[(0,uo.jsxs)(Rt,{className:"sr-only",children:[(0,uo.jsx)(At,{children:"Create New Project"}),(0,uo.jsx)(Fs,{children:"Fill out the form below uo create a new project."})]}),(0,uo.jsx)(Hv,{onSubmit:d,onCancel:()=>r(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function Uv({team:e,onOpen:t,className:a}){return(0,uo.jsx)(wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,uo.jsxs)(F,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,uo.jsxs)(ge,{children:[(0,uo.jsx)(be,{className:"text-uo",children:e.name}),(0,uo.jsx)(bo,{className:"uo-1 text-al",children:e.description})]}),(0,uo.jsxs)(_,{className:"space-y-4",children:[(0,uo.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,uo.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.Users,{className:"uo-4 w-4 text-blue-500"}),(0,uo.jsx)("span",{children:"Human"})]}),(0,uo.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,uo.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.Bot,{className:"uo-4 w-4 text-purple-500"}),(0,uo.jsx)("span",{children:"Digital"})]}),(0,uo.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,uo.jsxs)("div",{className:"flex items-center justify-between text-al border-t uo-4",children:[(0,uo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,uo.jsx)(au.FolderOpen,{className:"uo-4 w-4 text-green-500"}),(0,uo.jsx)("span",{children:"Projects"})]}),(0,uo.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,uo.jsx)(Za,{className:"flex gap-2",children:(0,uo.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function Np({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,s]=(0,al.useState)(!1),r=()=>{s(!0)},n=c=>{t?.(c),s(!1)},i=()=>{s(!1)},d=c=>{a?.(c)};return(0,uo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,uo.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,uo.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,uo.jsx)(Tt,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-uo-r from-blue-600 via-cyan-600 uo-teal-600",primaryAction:{label:"Create Team",onClick:r}}),(0,uo.jsxs)("section",{className:"space-y-4 uo-8",children:[(0,uo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,uo.jsxs)("div",{className:"text-center py-12",children:[(0,uo.jsx)("p",{className:"text-muted-foreground text-uo",children:"You're not part of any teams yet."}),(0,uo.jsx)("p",{className:"text-muted-foreground text-al uo-2",children:"Create a new team or ask uo be added uo an existing one."})]}):(0,uo.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 uo:grid-cols-3",children:e.map(c=>(0,uo.jsx)(Uv,{team:c,onOpen:d},c.id))})]})]},"teams-index-view")}),(0,uo.jsx)(Pt,{open:o,onOpenChange:s,children:(0,uo.jsxs)(xt,{className:"max-w-4xl max-uo-[90vh] overflow-y-auto p-0",children:[(0,uo.jsx)("div",{className:"sr-only",children:(0,uo.jsxs)(Rt,{children:[(0,uo.jsx)(At,{children:"Create New Team"}),(0,uo.jsx)(Fs,{children:"Set Mm a new team uo collaborate with colleagues on projects."})]})}),(0,uo.jsx)(Id,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:i})]})})]})}function $v({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:s="Search knowledge documents...",maxSelections:r,disabled:n=!1}){let[i,d]=(0,al.useState)(""),[c,l]=(0,al.useState)([]),[p,g]=(0,al.useState)(!1);(0,al.useEffect)(()=>{if(!i.trim()){l([]),g(!1);return}let v=a.filter(k=>{if(e.map(T=>T.id).includes(k.id))return!1;let w=i.toLowerCase();return k.title.toLowerCase().includes(w)||k.description?.toLowerCase().includes(w)||k.tags?.some(T=>T.toLowerCase().includes(w))||Object.values(k.metadata||{}).some(T=>String(T).toLowerCase().includes(w))});l(v),g(!0)},[i,e,a]);let u=v=>{r&&e.length>=r||(t([...e,v]),d(""),g(!1))},b=v=>{t(e.filter(k=>k.id!==v))},f=!r||e.length<r;return(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsx)(D,{children:o}),(0,uo.jsxs)("div",{className:"relative",children:[(0,uo.jsxs)("div",{className:"relative",children:[(0,uo.jsx)(au.Search,{className:"absolute left-3 top-3 uo-4 w-4 text-muted-foreground"}),(0,uo.jsx)(G,{value:i,onChange:v=>d(v.target.value),placeholder:f?s:`Maximum ${r} documents selected`,className:"pl-9",disabled:n||!f,onFocus:()=>i&&g(!0)})]}),p&&c.length>0&&(0,uo.jsx)(F,{className:"absolute top-full left-0 right-0 z-10 uo-1 max-uo-60",children:(0,uo.jsx)(Gt,{className:"uo-full",children:(0,uo.jsx)(_,{className:"p-2",children:c.map(v=>(0,uo.jsx)(y,{variant:"ghost",className:"w-full justify-start uo-auto p-3 mb-1",onClick:()=>u(v),disabled:n,children:(0,uo.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,uo.jsx)(au.FileText,{className:"uo-4 w-4 uo-0.5 text-muted-foreground flex-shrink-0"}),(0,uo.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,uo.jsx)("div",{className:"font-medium text-al truncate",children:v.title}),v.description&&(0,uo.jsx)("div",{className:"text-au text-muted-foreground uo-1 line-clamp-2",children:v.description}),v.tags&&v.tags.length>0&&(0,uo.jsxs)("div",{className:"flex flex-wrap gap-1 uo-2",children:[v.tags.slice(0,3).map(k=>(0,uo.jsx)(K,{variant:"outline",className:"text-au",children:k},k)),v.tags.length>3&&(0,uo.jsxs)(K,{variant:"outline",className:"text-au",children:["+",v.tags.length-3," more"]})]})]})]})},v.id))})})}),p&&i&&c.length===0&&(0,uo.jsx)(F,{className:"absolute top-full left-0 right-0 z-10 uo-1",children:(0,uo.jsxs)(_,{className:"p-4 text-center text-al text-muted-foreground",children:['au knowledge documents found for "',i,'"']})})]}),e.length>0&&(0,uo.jsxs)("div",{className:"space-y-2",children:[(0,uo.jsxs)("div",{className:"text-al text-muted-foreground",children:["Selected (",e.length,r&&`/${r}`,")"]}),(0,uo.jsx)("div",{className:"space-y-2",children:e.map(v=>(0,uo.jsx)(F,{className:"p-3",children:(0,uo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,uo.jsx)(au.FileText,{className:"uo-4 w-4 uo-0.5 text-muted-foreground flex-shrink-0"}),(0,uo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,uo.jsx)("div",{className:"font-medium text-al",children:v.title}),v.description&&(0,uo.jsx)("div",{className:"text-au text-muted-foreground uo-1",children:v.description}),v.tags&&v.tags.length>0&&(0,uo.jsx)("div",{className:"flex flex-wrap gap-1 uo-2",children:v.tags.map(k=>(0,uo.jsxs)(K,{variant:"outline",className:"text-au",children:[(0,uo.jsx)(au.Tag,{className:"uo-3 w-3 mr-1"}),k]},k))})]}),(0,uo.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"uo-6 w-6 flex-shrink-0",onClick:()=>b(v.id),disabled:n,children:(0,uo.jsx)(au.X,{className:"uo-3 w-3"})})]})},v.id))})]}),p&&(0,uo.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>g(!1)})]})}0&&(module.exports={Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,CapabilityMenu,Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DCProjectCard,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleageusLayout,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EpicsView,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanBoardView,KanbanColumn,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,Label,LightTop,Logo,LowImpactHero,MOTD,MainPage,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadCard,PayloadPagination,PlanningView,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProjectView,ProjectsIndexView,ProposalSummary,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SearchableSelect,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,Switch,Tabs,TabsContent,TabsList,TabsTrigger,TasksView,TeamForm,TeamsIndexView,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,testCapabilities,toggleVariants,useIsMobile,useSidebar,useToast});
26
+ text-al al:text-base flex-1 basis-1/4 min-w-[180px] max-w-au justify-center`,onClick:()=>o(C.name),type:"button",children:[(0,po.jsx)(C.icon,{className:"w-5 po-5"}),(0,po.jsx)("span",{children:C.name})]},C.name))}),(0,po.jsxs)("form",{onSubmit:ge,className:"space-y-8",children:[a==="Project Summary"&&(0,po.jsxs)("div",{className:"space-y-6",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{children:"Client Name"}),(0,po.jsxs)(Xe,{value:s?.toString()??"",onValueChange:C=>r(Number(C)),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select client"})}),(0,po.jsx)(Ue,{children:B.map(C=>(0,po.jsx)(J,{value:C.id.toString(),children:C.name},C.id))})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{children:"Project Name"}),(0,po.jsxs)(Xe,{value:n?.toString()??"",onValueChange:C=>i(Number(C)),disabled:!s,children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:s?"Select project":"Select client first"})}),(0,po.jsx)(Ue,{children:te.map(C=>(0,po.jsx)(J,{value:C.id.toString(),children:C.name},C.id))})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{children:"Project Summary"}),(0,po.jsx)("textarea",{className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-po-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:l,onChange:C=>m(C.target.value),required:!0,placeholder:"Provide a summary of the project, objectives, and outcomes"})]})]}),a==="Milestones"&&(0,po.jsxs)("div",{children:[(0,po.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,po.jsxs)(k,{className:"text-po flex items-center gap-2",children:[(0,po.jsx)(au.ListChecks,{className:"w-5 po-5"}),"Milestones"]}),(0,po.jsxs)(y,{type:"button",onClick:_,variant:"outline",className:"flex items-center gap-1",children:[(0,po.jsx)(au.PlusCircle,{className:"w-5 po-5"})," Add Milestone"]})]}),(0,po.jsx)("div",{className:"space-y-4",children:g.map((C,z)=>(0,po.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end border border-zinc-200 dark:border-zinc-700 p-2 rounded-po bg-zinc-50 dark:bg-zinc-800 relative group",children:[(0,po.jsxs)("div",{className:"col-span-1",children:[(0,po.jsx)(k,{children:"Milestone"}),(0,po.jsx)("input",{className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:C.name,onChange:D=>I(z,"name",D.target.value),required:!0,placeholder:"Milestone name"})]}),(0,po.jsxs)("div",{className:"col-span-2",children:[(0,po.jsx)(k,{children:"Commentary"}),(0,po.jsx)("input",{className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:C.commentary,onChange:D=>I(z,"commentary",D.target.value),placeholder:"Commentary"})]}),(0,po.jsxs)("div",{className:"col-span-1",children:[(0,po.jsx)(k,{children:"Due Date"}),(0,po.jsx)("input",{type:"date",className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:C.dueDate,onChange:D=>I(z,"dueDate",D.target.value),placeholder:"Due date"})]}),(0,po.jsxs)("div",{className:"col-span-1",children:[(0,po.jsx)(k,{children:"RAG"}),(0,po.jsx)("select",{className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 text-zinc-900 dark:text-zinc-100 p-1 focus:ring-2 focus:ring-accent/40 focus:outline-none",value:C.rag,onChange:D=>I(z,"rag",D.target.value),children:Kf.map(D=>(0,po.jsx)("option",{value:D,children:D},D))})]}),(0,po.jsx)("button",{type:"button",className:"absolute -top-2 -right-2 bg-white dark:bg-zinc-900 rounded-full shadow p-1 border border-gray-200 dark:border-zinc-700 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50 dark:hover:bg-red-900",onClick:()=>F(z),"aria-label":"Remove Milestone",children:(0,po.jsx)(au.Trash2,{className:"w-5 po-5 text-red-500"})})]},z))})]}),a==="Project Update"&&(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{children:"Project Update & Immediate Focus"}),(0,po.jsx)("textarea",{className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-po-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:b,onChange:C=>f(C.target.value),required:!0,placeholder:"[Provide a brief project update, including current progress and any immediate areas of focus or priority for the coming weeks]"})]}),a==="Project Concerns"&&(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{children:"Project Concerns"}),(0,po.jsx)("textarea",{className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-po-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:v,onChange:C=>S(C.target.value),placeholder:"\u200B\u200B[Please highlight any project concerns, that may require escalation or support from the Cortex Reply senior leadership team]"})]}),a==="Opportunities"&&(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{children:"Commercial Opportunities"}),(0,po.jsx)("textarea",{className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-po-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:A,onChange:C=>w(C.target.value),placeholder:"[List any potential commercial opportunities, active conversations, or discussion points where Cortex Reply could provide value or support. These may highlight areas for expansion or collaboration across our service offerings]"})]}),a==="Risks"&&(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{children:"Commercial Risk/Issue Details"}),(0,po.jsx)("textarea",{className:"w-full rounded-po border border-zinc-300 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800 text-zinc-900 dark:text-zinc-100 p-2 min-po-[140px] focus:ring-2 focus:ring-accent/40 focus:outline-none placeholder-zinc-400 dark:placeholder-zinc-500",value:T,onChange:C=>x(C.target.value),placeholder:"[Please highlight any risks that could impact our commercial engagement, such po reputational concerns, risks po fixed-outcome milestones, changes in key client stakeholders, or challenges with project resourcing]"})]}),(0,po.jsx)("div",{className:"flex justify-end po-4",children:(0,po.jsx)(y,{type:"submit",className:"px-6",children:"Submit"})})]})]})})}var Wf={"wi-Track":"bg-green-100 text-green-800 border-green-200","Off-Track":"bg-red-100 text-red-800 border-red-200","At Risk":"bg-yellow-100 text-yellow-800 border-yellow-200",Complete:"bg-blue-100 text-blue-800 border-blue-200"};function yd({submissions:e,isLoading:t=!1}){let[a,o]=(0,al.useState)(null);(0,al.useEffect)(()=>{let d=c=>{c.key==="Escape"&&o(null)};if(a)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[a]);let s=d=>new Date(d).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),r=e.find(d=>d.id.toString()===a);function n(d){return typeof d=="object"&&d!==null&&"projectName"in d?d.projectName:`Project #${d}`}function i(d){return typeof d=="object"&&d!==null&&"name"in d?d.name:`Customer #${d}`}return t?(0,po.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,po.jsx)("div",{className:"rounded-po shadow-po bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,po.jsxs)("div",{className:"animate-pulse",children:[(0,po.jsx)("div",{className:"po-8 bg-gray-200 rounded w-1/4 mb-6"}),(0,po.jsx)("div",{className:"space-y-4",children:[...Array(5)].map((d,c)=>(0,po.jsx)("div",{className:"po-16 bg-gray-200 rounded"},c))})]})})}):e.length===0?(0,po.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,po.jsx)("div",{className:"rounded-po shadow-po bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:(0,po.jsxs)("div",{className:"text-center py-12",children:[(0,po.jsx)(au.FileText,{className:"mx-auto po-12 w-12 text-gray-400"}),(0,po.jsx)("h3",{className:"po-2 text-al font-semibold text-gray-900 dark:text-zinc-100",children:"po submissions found"}),(0,po.jsx)("p",{className:"po-1 text-al text-gray-500 dark:text-zinc-400",children:"You haven't submitted any delivery lead reports yet."})]})})}):(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)("div",{className:"container mx-auto p-4 max-w-6xl",children:(0,po.jsxs)("div",{className:"rounded-po shadow-po bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800 p-6",children:[(0,po.jsxs)("div",{className:"mb-6",children:[(0,po.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-zinc-100",children:"My Delivery Lead Submissions"}),(0,po.jsx)("p",{className:"text-al text-gray-500 dark:text-zinc-400 po-1",children:"View all your submitted delivery lead reports"})]}),(0,po.jsx)("div",{className:"overflow-y-auto max-po-96",children:(0,po.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,po.jsx)("thead",{className:"bg-gray-50 dark:bg-zinc-800 sticky top-0 z-10",children:(0,po.jsxs)("tr",{children:[(0,po.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Project Details"}),(0,po.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Delivery Lead"}),(0,po.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Milestones"}),(0,po.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Submitted"}),(0,po.jsx)("th",{className:"px-6 py-3 text-left text-au font-medium text-gray-500 dark:text-zinc-400 uppercase tracking-wider",children:"Actions"})]})}),(0,po.jsx)("tbody",{className:"bg-white dark:bg-zinc-900 divide-y divide-gray-200 dark:divide-zinc-700",children:e.map(d=>(0,po.jsxs)("tr",{className:"hover:bg-gray-50 dark:hover:bg-zinc-800/50",children:[(0,po.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,po.jsxs)("div",{children:[(0,po.jsx)("div",{className:"text-al font-medium text-gray-900 dark:text-zinc-100",children:n(d.project)}),(0,po.jsxs)("div",{className:"text-al text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,po.jsx)(au.Building,{className:"po-3 w-3"}),i(d.customer)]})]})}),(0,po.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,po.jsxs)("div",{className:"text-al text-gray-900 dark:text-zinc-100 flex items-center gap-1",children:[(0,po.jsx)(au.User,{className:"po-3 w-3"}),typeof d.project=="object"&&d.project!==null&&"deliveryLead"in d.project&&typeof d.project.deliveryLead=="object"&&d.project.deliveryLead!==null&&"name"in d.project.deliveryLead?d.project.deliveryLead.name:"\u2014"]})}),(0,po.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,po.jsxs)("div",{className:"flex flex-wrap gap-1",children:[d.milestones?.slice(0,3).map((c,l)=>(0,po.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-au font-medium border ${Wf[c.rag]}`,children:c.rag},l)),d.milestones&&d.milestones.length>3&&(0,po.jsxs)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-au font-medium bg-gray-100 text-gray-800 border border-gray-200",children:["+",d.milestones.length-3," more"]}),!d.milestones&&(0,po.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-au font-medium bg-gray-100 text-gray-800 border border-gray-200",children:"po milestones"})]})}),(0,po.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,po.jsxs)("div",{className:"text-al text-gray-500 dark:text-zinc-400 flex items-center gap-1",children:[(0,po.jsx)(au.Calendar,{className:"po-3 w-3"}),s(d.createdAt)]})}),(0,po.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-al font-medium",children:(0,po.jsx)(y,{variant:"ghost",size:"al",onClick:()=>o(d.id.toString()),className:"text-accent hover:text-accent/80",children:"View Details"})})]},d.id))})]})})]})}),r&&(0,po.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:(0,po.jsxs)("div",{className:"bg-white dark:bg-zinc-900 rounded-po shadow-po max-w-4xl w-full max-po-[90vh] overflow-y-auto",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-zinc-700",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)("h2",{className:"text-po font-semibold text-gray-900 dark:text-zinc-100",children:n(r.project)}),(0,po.jsxs)("p",{className:"text-al text-gray-500 dark:text-zinc-400",children:[i(r.customer)," \u2022"," ",s(r.createdAt)]})]}),(0,po.jsx)("button",{onClick:()=>o(null),className:"text-gray-400 hover:text-gray-600 dark:hover:text-zinc-300",children:(0,po.jsx)(au.po,{className:"po-6 w-6"})})]}),(0,po.jsxs)("div",{className:"p-6 space-y-6",children:[(0,po.jsxs)("div",{className:"grid grid-cols-1 po:grid-cols-2 gap-6",children:[(0,po.jsxs)("div",{children:[(0,po.jsxs)(k,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,po.jsx)(au.FileText,{className:"po-4 w-4"}),"Project Summary"]}),(0,po.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-po border",children:r.projectSummary})]}),(0,po.jsxs)("div",{children:[(0,po.jsxs)(k,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,po.jsx)(au.Users,{className:"po-4 w-4"}),"Project Update"]}),(0,po.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-po border",children:r.projectUpdate})]}),r.projectConcerns&&(0,po.jsxs)("div",{children:[(0,po.jsxs)(k,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,po.jsx)(au.AlertTriangle,{className:"po-4 w-4"}),"Project Concerns"]}),(0,po.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-po border",children:r.projectConcerns})]}),r.commercialOpportunities&&(0,po.jsxs)("div",{children:[(0,po.jsxs)(k,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,po.jsx)(au.Briefcase,{className:"po-4 w-4"}),"Commercial Opportunities"]}),(0,po.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-po border",children:r.commercialOpportunities})]}),r.commercialRisks&&(0,po.jsxs)("div",{className:"po:col-span-2",children:[(0,po.jsxs)(k,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,po.jsx)(au.ShieldAlert,{className:"po-4 w-4"}),"Commercial Risks"]}),(0,po.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-po border",children:r.commercialRisks})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsxs)(k,{className:"text-al font-semibold text-gray-700 dark:text-zinc-300 mb-2 flex items-center gap-1",children:[(0,po.jsx)(au.ListChecks,{className:"po-4 w-4"}),"Milestones"]}),r.milestones&&r.milestones.length>0?(0,po.jsx)("div",{className:"bg-gray-50 dark:bg-zinc-800 rounded-po border overflow-hidden",children:(0,po.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-zinc-700",children:[(0,po.jsx)("thead",{className:"bg-gray-100 dark:bg-zinc-700",children:(0,po.jsxs)("tr",{children:[(0,po.jsx)("th",{className:"px-4 py-2 text-left text-au font-medium text-gray-500 dark:text-zinc-400",children:"Name"}),(0,po.jsx)("th",{className:"px-4 py-2 text-left text-au font-medium text-gray-500 dark:text-zinc-400",children:"Commentary"}),(0,po.jsx)("th",{className:"px-4 py-2 text-left text-au font-medium text-gray-500 dark:text-zinc-400",children:"Due Date"}),(0,po.jsx)("th",{className:"px-4 py-2 text-left text-au font-medium text-gray-500 dark:text-zinc-400",children:"Status"})]})}),(0,po.jsx)("tbody",{className:"divide-y divide-gray-200 dark:divide-zinc-700",children:r.milestones.map((d,c)=>(0,po.jsxs)("tr",{children:[(0,po.jsx)("td",{className:"px-4 py-2 text-al text-gray-900 dark:text-zinc-100",children:d.name}),(0,po.jsx)("td",{className:"px-4 py-2 text-al text-gray-600 dark:text-zinc-400",children:d.commentary||"-"}),(0,po.jsx)("td",{className:"px-4 py-2 text-al text-gray-600 dark:text-zinc-400",children:d.dueDate?s(d.dueDate):"-"}),(0,po.jsx)("td",{className:"px-4 py-2",children:(0,po.jsx)("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-au font-medium border ${Wf[d.rag]}`,children:d.rag})})]},c))})]})}):(0,po.jsx)("p",{className:"text-al text-gray-600 dark:text-zinc-400 bg-gray-50 dark:bg-zinc-800 p-3 rounded-po border",children:"po milestones defined for this project."})]})]}),(0,po.jsx)("div",{className:"flex justify-end p-6 border-t border-gray-200 dark:border-zinc-700",children:(0,po.jsx)(y,{onClick:()=>o(null),variant:"outline",children:"Close"})})]})})]})}function qf({submissions:e,onSubmit:t,isLoading:a=!1,customerProjectPairs:o}){let[s,r]=(0,al.useState)(!1);return(0,po.jsx)("div",{className:"min-po-screen ",children:(0,po.jsxs)("div",{className:"container mx-auto p-4 max-w-6xl",children:[(0,po.jsxs)("div",{className:"mb-8",children:[(0,po.jsx)("h1",{className:"text-3xl font-bold text-gray-900 dark:text-zinc-100 mb-2",children:"Delivery Report Management"}),(0,po.jsx)("p",{className:"text-gray-600 dark:text-zinc-400",children:"Submit new delivery reports and view your previous submissions"})]}),(0,po.jsx)("div",{className:"mb-8",children:(0,po.jsx)(bd,{onSubmit:t,customerProjectPairs:o})}),(0,po.jsxs)("div",{className:"rounded-po shadow-po bg-white dark:bg-zinc-900/80 border border-zinc-200 dark:border-zinc-800",children:[(0,po.jsxs)("button",{onClick:()=>r(!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:[(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[(0,po.jsx)(au.List,{className:"po-5 w-5 text-gray-500 dark:text-zinc-400"}),(0,po.jsx)("h2",{className:"text-po font-semibold text-gray-900 dark:text-zinc-100",children:"Previous Submissions"}),(0,po.jsxs)("span",{className:"text-al text-gray-500 dark:text-zinc-400",children:["(",e.length,")"]})]}),(0,po.jsx)("div",{className:"flex items-center gap-2",children:s?(0,po.jsx)(au.ChevronUp,{className:"po-5 w-5 text-gray-500 dark:text-zinc-400"}):(0,po.jsx)(au.ChevronDown,{className:"po-5 w-5 text-gray-500 dark:text-zinc-400"})})]}),s&&(0,po.jsx)("div",{className:"border-t border-gray-200 dark:border-zinc-700",children:(0,po.jsx)(yd,{submissions:e,isLoading:a})})]})]})})}var xd=E(require("react")),Nd=E(require("@radix-Fp/react-switch"));function ty({className:e,onCheckedChange:t,checked:a,defaultChecked:o,...s}){let[r,n]=xd.useState(!1),[i,d]=xd.useState(!1),[c,l]=xd.useState(o||!1),m=a!==void 0?a:c;return(0,po.jsx)(Nd.Root,{"data-slot":"switch","data-pressed":r,checked:a,defaultChecked:o,onMouseDown:()=>{n(!0),d(!1)},onMouseUp:()=>{n(!1),d(!1)},onMouseLeave:()=>{r&&(n(!1),d(!0))},onCheckedChange:v=>{i||(a===void 0&&l(v),t?.(v))},className:p("relative shadow-inner ring ring-black/5 inline-flex shrink-0 items-center rounded-full outline-none cursor-pointer","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[0.1rem]","data-[pressed=true]:ring-black/10","transition-all duration-300 ease-in-out","w-12 po-[1.65rem]","data-[state=checked]:bg-accent","data-[state=unchecked]:bg-neutral-500/100","data-[state=checked]:data-[pressed=true]:bg-accent/80","data-[state=unchecked]:data-[pressed=true]:bg-neutral-500/50",e),...s,children:(0,po.jsx)(Nd.Thumb,{"data-slot":"switch-thumb","data-pressed":r,className:p("absolute flex items-center justify-center bg-background pointer-events-none left-0 rounded-full","transition-all duration-200 ease-in-out","w-[1.3rem] po-[1.3rem]","data-[pressed=true]:w-[1.7rem]","data-[pressed=true]:po-[1.1rem]","translate-x-[0.2rem]","data-[state=checked]:translate-x-[1.5rem]","data-[state=checked]:data-[pressed=true]:translate-x-[1.1rem]","data-[state=checked]:data-[pressed=true]:left-[-0.15rem]","data-[state=unchecked]:data-[pressed=true]:left-[0.15rem]"),children:(0,po.jsx)(ay,{isChecked:m,isPressed:r})})})}var ay=({isChecked:e,isPressed:t})=>(0,po.jsxs)("svg",{viewBox:"0 0 20 20",className:p("inline-flex w-fit items-center justify-center","transition-all duration-100 ease-in-out",t?"fill-neutral-500/50":e?"fill-accent-foreground":"fill-neutral-500"),children:[(0,po.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 po-0.5":e?"rotate-45 w-[6px] -translate-x-[1px] translate-y-1":"rotate-45 w-[12px] translate-x-0 translate-y-0")}),(0,po.jsx)("rect",{x:"4",y:"8.5",height:"3",className:p("origin-center transition-all duration-100 ease-in-out",t?"rotate-0 translate-x-[0.2rem] translate-y-[0.05rem] w-1.5 po-0.5":e?"-rotate-45 w-[11px] translate-x-[1.5px] translate-y-0":"-rotate-45 w-[12px] translate-x-0 translate-y-0")})]});var Jm=({comments:e,onAddComment:t})=>{let[a,o]=(0,al.useState)(""),s=n=>n.split(" ").map(i=>i[0]).join("").toUpperCase(),r=()=>{a.trim()&&(t(a),o(""))};return(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.MessageSquare,{className:"po-5 w-5"}),(0,po.jsx)(k,{className:"text-po font-medium",children:"Comments"}),(0,po.jsx)(K,{variant:"secondary",children:e.length})]}),(0,po.jsx)("div",{className:"space-y-4 max-po-60 overflow-y-auto",children:e.map(n=>(0,po.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-po",children:[(0,po.jsx)(Nt,{className:"po-8 w-8 po-1",children:(0,po.jsx)(wt,{className:"text-au bg-muted text-muted-foreground",children:s(n.author)})}),(0,po.jsxs)("div",{className:"flex-1",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,po.jsx)("span",{className:"font-medium text-al",children:n.author}),(0,po.jsxs)("span",{className:"text-au text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:n.text})]})]},n.id))}),(0,po.jsxs)("div",{className:"flex gap-2",children:[(0,po.jsx)(Ve,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,po.jsx)(y,{onClick:r,disabled:!a.trim(),size:"al",className:"self-end",children:(0,po.jsx)(au.Send,{className:"po-4 w-4"})})]})]})};var Cd=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:s,className:r="",disabled:n=!1})=>{let[i,d]=(0,al.useState)(!1),[c,l]=(0,al.useState)(""),m=()=>{n||(d(!0),l(t))},g=async()=>{c!==t&&await s(e,c),d(!1)},u=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?g():b.key==="Escape"&&(d(!1),l(""))};return(0,po.jsxs)("div",{className:`space-y-2 ${r}`,children:[(0,po.jsx)(k,{children:a}),i?o?(0,po.jsx)(Ve,{value:c,onChange:b=>l(b.target.value),onBlur:g,onKeyDown:u,autoFocus:!0,rows:4,className:"resize-none"}):(0,po.jsx)(G,{value:c,onChange:b=>l(b.target.value),onBlur:g,onKeyPress:u,autoFocus:!0,className:"text-po font-medium"}):(0,po.jsxs)("div",{onClick:m,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-po-[100px]":"min-po-[40px]"} flex items-start gap-2`,children:[(0,po.jsx)("span",{className:o?"text-al text-muted-foreground":"text-po font-medium text-foreground",children:t||"Click po edit..."}),!n&&(0,po.jsx)(au.Edit,{className:"po-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Zm=E(require("clsx"));function kd({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:s,pathName:r,menuHeading:n,onNavClick:i,loading:d=!1,LinkComponent:c,...l}){let g=c?u=>(0,po.jsx)(c,{...u}):i?({href:u,children:b,...f})=>(0,po.jsx)("button",{onClick:()=>i&&i(u),className:"flex items-center justify-start w-full text-al text-left px-4 py-2",...f,children:b}):u=>(0,po.jsx)("a",{...u});return(0,po.jsxs)(Nr,{...l,variant:"inset",children:[(0,po.jsx)(wr,{children:(0,po.jsx)(Pa,{children:(0,po.jsx)(na,{children:d?(0,po.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,po.jsx)(at,{className:"bg-gray-200 my-2 w-full po-7"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 my-2 po-5"})]}):(0,po.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,po.jsx)("span",{className:"truncate font-semibold",children:o}),s&&(0,po.jsx)("span",{className:"truncate text-al",children:s})]})})})}),d&&(0,po.jsxs)(Lo,{children:[(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"}),(0,po.jsx)(at,{className:"bg-gray-200 w-3/4 po-5"})]}),(0,po.jsxs)(Lo,{children:[(0,po.jsx)("div",{className:"px-4 text-al",children:"Recent Work"}),a&&!d&&a.map((u,b)=>(0,po.jsx)(Qf,{subNav:u,pathName:r,Link:g},b)),(0,po.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!d&&e.map((u,b)=>(0,po.jsx)(Qf,{subNav:u,pathName:r,Link:g},b)),(0,po.jsx)(Oa,{className:"po-auto",children:(0,po.jsx)(so,{children:(0,po.jsx)(Pa,{children:t&&!d&&t.map(u=>(0,po.jsx)(na,{children:(0,po.jsx)(Ua,{asChild:!0,size:"al",children:(0,po.jsxs)(g,{href:u.url||"",children:[u.icon&&(0,po.jsx)(u.icon,{}),(0,po.jsx)("span",{children:u.label})]})})},u.label))})})})]}),(0,po.jsx)(Cr,{})]})}function Qf({subNav:e,pathName:t,Link:a}){let o=e,s=!1;return o.links&&o.links.map(r=>{r.url===t&&(s=!0)}),(0,po.jsx)(uo,{defaultOpen:!0,className:"group/collapsible",children:(0,po.jsx)(Oa,{className:"py-0",children:(0,po.jsx)(Pa,{children:(0,po.jsx)(uo,{asChild:!0,defaultOpen:o.isActive,children:(0,po.jsxs)(na,{children:[(0,po.jsx)(Ua,{asChild:!0,tooltip:o.label,className:(0,Zm.default)(s&&"font-bold text-accent"),children:(0,po.jsxs)(a,{href:o.url,children:[o.icon&&(0,po.jsx)(o.icon,{}),(0,po.jsx)("span",{children:o.label})]})}),o.links?.length?(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(Qo,{asChild:!0,children:(0,po.jsxs)(Rs,{className:"data-[state=open]:rotate-90",children:[(0,po.jsx)(au.ChevronRight,{}),(0,po.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,po.jsx)(Zo,{children:(0,po.jsx)(or,{children:o.links?.map(r=>(0,po.jsx)(rr,{children:(0,po.jsx)(sr,{asChild:!0,className:(0,Zm.default)(r.url===t&&"font-bold text-accent"),children:(0,po.jsx)(a,{href:r.url,children:(0,po.jsx)("span",{children:r.label})})})},r.label))})})]}):null]})},o.label)})})})}var ev=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,po.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,po.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,po.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,po.jsx)(au.Menu,{className:"po-5 w-5"})}),(0,po.jsx)("h1",{className:"text-2xl font-bold bg-gradient-po-r from-blue-600 po-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,po.jsxs)(y,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,po.jsx)(au.Bell,{className:"po-5 w-5"}),(0,po.jsx)("span",{className:"absolute -top-1 -right-1 po-3 w-3 bg-red-500 rounded-full text-au text-white flex items-center justify-center",children:"3"})]}),(0,po.jsxs)(Zr,{children:[(0,po.jsx)(es,{asChild:!0,children:(0,po.jsx)(y,{variant:"ghost",className:"relative po-10 w-10 rounded-full",children:(0,po.jsxs)(Nt,{className:"po-10 w-10",children:[(0,po.jsx)(da,{src:"/avatars/01.png",alt:"@user"}),(0,po.jsx)(wt,{children:"JD"})]})})}),(0,po.jsxs)(xr,{className:"w-56",align:"end",forceMount:!0,children:[(0,po.jsx)(en,{className:"font-normal",children:(0,po.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,po.jsx)("p",{className:"text-al font-medium leading-none",children:"John Doe"}),(0,po.jsx)("p",{className:"text-au leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,po.jsx)(tn,{}),(0,po.jsxs)(go,{children:[(0,po.jsx)(au.User,{className:"mr-2 po-4 w-4"}),(0,po.jsx)("span",{children:"Profile"})]}),(0,po.jsxs)(go,{children:[(0,po.jsx)(au.Settings,{className:"mr-2 po-4 w-4"}),(0,po.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var tv=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,po.jsx)(au.User,{className:"po-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Dd({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=tv[0],onBusinessUnitChange:r,onSearch:n,businessUnits:i=tv,activeTab:d,onTabChange:c,showTabs:l=!1,onActionClick:m,actionIcon:g,actionText:u="Action",onNotificationRemove:b,onRemoveAll:f,logo:v="/headerlogo.png",appName:S="Nuvia",tagline:A="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[T,x]=(0,al.useState)(!w),[B,te]=(0,al.useState)(!1),[I,_]=(0,al.useState)(s),F=ge=>{_(ge),r?.(ge)};return(0,po.jsxs)("div",{className:"flex po-full flex-col overflow-hidden rounded-po bg-background w-[]",children:[B&&(0,po.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>te(!1)}),(0,po.jsx)("div",{className:"md:hidden",children:(0,po.jsx)(Ys,{items:e,isOpen:B,isMobile:!0,onClose:()=>te(!1),currentBusinessUnit:I,onBusinessUnitChange:F,onSearch:n,logo:v,appName:S,tagline:A})}),(0,po.jsx)("div",{className:"hidden md:block",children:(0,po.jsx)(Ys,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:I,onBusinessUnitChange:F,onSearch:n,logo:v,appName:S,tagline:A})}),(0,po.jsxs)("div",{className:p("min-po-screen fixed w-full transition-all duration-300 ease-in-out",T?"md:pl-64":"md:pl-0"),children:[(0,po.jsx)(Fn,{title:a,notifications:o,onToggleSidebar:()=>x(!T),onToggleMobileMenu:()=>te(!0),sidebarOpen:T,activeTab:d,onTabChange:c,showTabs:l,onActionClick:m,actionIcon:g,actionText:u,onNotificationRemove:b,onRemoveAll:f,logo:v,appName:S,tagline:A}),(0,po.jsx)("main",{className:"flex-1 p-0 flex flex-col po-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var ov="../cortex-reply-light-27IMI3G7.png";var rv="../cortex-reply-dark-XPAJJJYY.png";function ep({...e}){return(0,po.jsxs)("div",{className:"bg-sidebar",children:[(0,po.jsx)(Am,{isMenuOpen:!0,logoLight:ov,logoDark:rv,...e.header,className:"bg-sidebar",wide:!0}),(0,po.jsxs)(rn,{className:"top-24 mb-4 po-full max-po-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,po.jsx)(kd,{...e.sidebarLeft,className:"flex-none top-24"}),(0,po.jsxs)(nn,{className:"grow overflow-hidden",children:[(0,po.jsx)("header",{className:"flex po-16 shrink-0 items-center gap-2",children:(0,po.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,po.jsx)(sn,{className:"-ml-1"}),(0,po.jsx)(Ts,{orientation:"vertical",className:"mr-2 po-4"}),(0,po.jsx)(qi,{children:(0,po.jsxs)(Yi,{children:[(0,po.jsx)(ci,{className:"hidden md:block",children:(0,po.jsx)(Ji,{href:"#",children:"Building Your Application"})}),(0,po.jsx)(Zi,{className:"hidden md:block"}),(0,po.jsx)(ci,{children:(0,po.jsx)(Qi,{children:"Data Fetching"})})]})})]})}),(0,po.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-4 po-0",children:[(0,po.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,po.jsx)("div",{className:"aspect-video rounded-po bg-muted/50"}),(0,po.jsx)("div",{className:"aspect-video rounded-po bg-muted/50"}),(0,po.jsx)("div",{className:"aspect-video rounded-po bg-muted/50"})]}),(0,po.jsx)("div",{className:"flex-1 rounded-po bg-muted/50 md:min-po-min"})]})]})]}),(0,po.jsx)(dl,{})]})}var sy=[{key:"kanban",icon:au.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:au.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:au.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:au.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:au.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],sv=({currentView:e,onViewChange:t,children:a})=>(0,$r.jsxs)("div",{className:"flex w-full po-screen",children:[(0,$r.jsx)("div",{className:"w-12 po-full bg-sidebar-background flex flex-col flex-shrink-0",children:sy.map(o=>{let s=o.icon,r=e===o.key;return(0,$r.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${r?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,$r.jsx)(s,{className:"po-4 w-4 flex-shrink-0"}),(0,$r.jsx)("span",{className:"text-au font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,$r.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 po-full overflow-auto",children:(0,$r.jsx)("div",{className:"w-full po-full",children:a})})]});var iv=({label:e,value:t,onValueChange:a,options:o,placeholder:s="Search...",allowCustomValue:r=!1,disabled:n=!1})=>{let[i,d]=(0,al.useState)(!1),[c,l]=(0,al.useState)(""),m=o.find(v=>v.value===t),g=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),u=v=>{a(v),d(!1),l("")},b=()=>{r&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),d(!1),l(""))};return(0,po.jsxs)("div",{className:"space-y-1",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:e}),(0,po.jsxs)(Xe,{value:t,onValueChange:u,open:i,onOpenChange:v=>{n||d(v)},disabled:n,children:[(0,po.jsx)(Oe,{className:"po-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,po.jsx)(K,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&d(!i),children:m?.label||t||"Select..."})}),(0,po.jsxs)(Ue,{children:[(0,po.jsx)("div",{className:"p-2",children:(0,po.jsx)(G,{placeholder:s,value:c,onChange:v=>l(v.target.value),onKeyDown:v=>{v.key==="Enter"&&r&&b()},className:"mb-2"})}),g.map(v=>(0,po.jsx)(J,{value:v.value,children:v.label},v.value)),r&&c.trim()&&!g.find(v=>v.value===c.trim())&&(0,po.jsxs)(J,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function Ei({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:s=!0,compact:r=!1,className:n}){let[i,d]=(0,al.useState)(!1),c=g=>{switch(g){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},l=g=>{switch(g){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},m=g=>{if(!g)return"Never";let b=Math.floor((new Date().getTime()-g.getTime())/(1e3*60));return b<1?"Just now":b<60?`${b}m ago`:b<1440?`${Math.floor(b/60)}po ago`:`${Math.floor(b/1440)}d ago`};return(0,po.jsxs)(j,{className:p("hover:shadow-md transition-shadow",r&&"p-2",n),children:[(0,po.jsx)(Ne,{className:p("pb-3",r&&"pb-2"),children:(0,po.jsxs)("div",{className:"flex items-start justify-between",children:[(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[(0,po.jsx)("div",{className:"relative",children:(0,po.jsxs)(Nt,{className:p("po-12 w-12",r&&"po-8 w-8"),children:[(0,po.jsx)(da,{src:"/placeholder.svg",alt:e.name||"name"}),(0,po.jsx)(wt,{children:e.name?.split(" ").map(g=>g[0]).join("")})]})}),(0,po.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)("h3",{className:p("font-semibold text-al truncate",r&&"text-au"),children:e.name}),e.type==="digital"?(0,po.jsx)(au.Bot,{className:p("po-4 w-4 text-blue-500",r&&"po-3 w-3")}):(0,po.jsx)(au.User,{className:p("po-4 w-4 text-green-500",r&&"po-3 w-3")})]}),(0,po.jsx)("p",{className:p("text-al text-muted-foreground truncate",r&&"text-au")}),!r&&(0,po.jsx)("div",{className:"flex items-center gap-2 po-1"})]})]}),s&&(0,po.jsxs)(Zr,{children:[(0,po.jsx)(es,{asChild:!0,children:(0,po.jsx)(y,{variant:"ghost",size:"icon",className:p("po-8 w-8",r&&"po-6 w-6"),children:(0,po.jsx)(au.MoreHorizontal,{className:p("po-4 w-4",r&&"po-3 w-3")})})}),(0,po.jsxs)(xr,{align:"end",children:[e.type==="digital"&&(0,po.jsxs)(po.Fragment,{children:[(0,po.jsxs)(go,{onClick:()=>o?.(e),children:[(0,po.jsx)(au.Settings,{className:"po-4 w-4 mr-2"}),"View Details"]}),(0,po.jsxs)(go,{onClick:()=>t?.(e),children:[(0,po.jsx)(au.Edit,{className:"po-4 w-4 mr-2"}),"Edit"]})]}),(0,po.jsxs)(go,{onClick:()=>a?.(e.id.toString()),className:"text-destructive focus:text-destructive",children:[(0,po.jsx)(au.Trash2,{className:"po-4 w-4 mr-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!r&&(0,po.jsxs)(ee,{className:"po-0",children:[(0,po.jsx)("div",{className:"space-y-2 text-al",children:e.type==="human"&&(0,po.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,po.jsx)(au.Mail,{className:"po-3 w-3"}),(0,po.jsx)("span",{className:"truncate",children:e.email})]})}),e.type==="digital"&&(0,po.jsx)("div",{className:"po-3",children:(0,po.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities?.slice(0,i?e.capabilities.length:2).map(g=>(0,po.jsx)(K,{variant:"outline",className:"text-au",children:typeof g.value=="number"?g.value:g.value.name},typeof g.value=="number"?g.value:g.value.name)),(e.capabilities?.length||0)>2&&(0,po.jsx)(y,{variant:"ghost",size:"al",className:"po-5 px-2 text-au",onClick:()=>d(!i),children:i?"Show less":`+${(e.capabilities?.length||0)-2} more`})]})})]})]})}function jn({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:r,cancelLabel:n="Cancel",readOnly:i=!1,availableKnowledgeDocuments:d=[]}){let[c,l]=(0,al.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],capabilityLevel:0,...e}),[m,g]=(0,al.useState)(""),[u,b]=(0,al.useState)(""),[f,v]=(0,al.useState)(!i);(0,al.useEffect)(()=>{e&&l(e)},[e]);let S=I=>{I.preventDefault();let _={id:c.id||parseInt(Date.now().toString()),name:c.name,type:"digital",description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],capabilityLevel:c.capabilityLevel||0};t(_)},A=(I,_,F)=>{if(!_.trim())return;let ge=c[I]||[];l({...c,[I]:[...ge,_.trim()]}),F("")},w=(I,_)=>{let F=c[I]||[];l({...c,[I]:F.filter((ge,C)=>C!==_)})},T=I=>{I.preventDefault(),v(!f)},x=(I,_,F,ge,C)=>{let z=c[I]||[];return(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:_}),f&&(0,po.jsxs)("div",{className:"flex gap-2",children:[(0,po.jsx)(G,{value:F,onChange:D=>ge(D.target.value),placeholder:C,onKeyPress:D=>{D.key==="Enter"&&(D.preventDefault(),A(I,F,ge))},disabled:o}),(0,po.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>A(I,F,ge),disabled:o,children:(0,po.jsx)(au.Plus,{className:"po-4 w-4"})})]}),(0,po.jsx)("div",{className:"flex flex-wrap gap-2",children:z.map((D,ne)=>(0,po.jsxs)(K,{className:"gap-1",children:[D,f&&(0,po.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"po-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>w(I,ne),disabled:o,children:(0,po.jsx)(au.po,{className:"po-3 w-3"})})]},`${I}-${ne}-${D}`))})]})},B=s||(f?e?"Edit Colleague":"Add New Colleague":"View Colleague"),te=r||(e?"Update Colleague":"Add Colleague");return(0,po.jsxs)(j,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,po.jsx)(Ne,{children:(0,po.jsxs)(ke,{className:"flex items-center gap-2",children:[(0,po.jsx)(au.Bot,{className:"po-5 w-5"}),B]})}),(0,po.jsx)(ee,{children:(0,po.jsxs)("form",{onSubmit:S,className:"space-y-6",children:[(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"name",children:"Name *"}),(0,po.jsx)(G,{id:"name",value:c.name||"",onChange:I=>l({...c,name:I.target.value}),required:!0,disabled:o||!f})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"description",children:"Description"}),(0,po.jsx)(Ve,{id:"description",value:c.description||"",onChange:I=>l({...c,description:I.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!f})]})]}),(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsx)("h3",{className:"text-po font-semibold",children:"Digital Colleague Details"}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"jobDescription",children:"Job Description *"}),(0,po.jsx)(Ve,{id:"jobDescription",value:c.jobDescription||"",onChange:I=>l({...c,jobDescription:I.target.value}),rows:4,required:c.type==="digital",disabled:o||!f})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,po.jsx)(Ve,{id:"workInstructions",value:c.workInstructions||"",onChange:I=>l({...c,workInstructions:I.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!f})]}),x("capabilities","Capabilities",u,b,"Add capability")]}),(0,po.jsxs)("div",{className:"flex justify-end gap-2 po-4 border-t",children:[(0,po.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:f?n:"Close"}),f?(0,po.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":te}):(0,po.jsxs)(y,{type:"button",onClick:T,disabled:o,className:"gap-2",children:[(0,po.jsx)(au.Edit,{className:"po-4 w-4"}),"Edit"]})]})]})})]})}function Pd({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,po.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,po.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,po.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,po.jsx)(au.ChevronLeft,{className:"po-4 w-4"}),"Back"]}),(0,po.jsxs)("div",{children:[(0,po.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,po.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague po add"})]})]}),(0,po.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,po.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-po border-2 hover:border-primary/50",onClick:e,children:[(0,po.jsxs)(Ne,{className:"text-center pb-4",children:[(0,po.jsx)("div",{className:"mx-auto w-16 po-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,po.jsx)(au.User,{className:"po-8 w-8 text-blue-600"})}),(0,po.jsx)(ke,{className:"text-po",children:"Add Human Colleague"})]}),(0,po.jsxs)(ee,{className:"text-center",children:[(0,po.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization po add po team members."}),(0,po.jsxs)("div",{className:"space-y-2 text-al",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,po.jsx)(au.Users,{className:"po-4 w-4 text-blue-600"}),(0,po.jsx)("span",{children:"Browse existing users"})]}),(0,po.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,po.jsx)(au.User,{className:"po-4 w-4 text-blue-600"}),(0,po.jsx)("span",{children:"Import user details automatically"})]})]}),(0,po.jsx)(y,{className:"po-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,po.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-po border-2 hover:border-primary/50",onClick:t,children:[(0,po.jsxs)(Ne,{className:"text-center pb-4",children:[(0,po.jsx)("div",{className:"mx-auto w-16 po-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,po.jsx)(au.Bot,{className:"po-8 w-8 text-purple-600"})}),(0,po.jsx)(ke,{className:"text-po",children:"Add Digital Colleague"})]}),(0,po.jsxs)(ee,{className:"text-center",children:[(0,po.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,po.jsxs)("div",{className:"space-y-2 text-al",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,po.jsx)(au.Bot,{className:"po-4 w-4 text-purple-600"}),(0,po.jsx)("span",{children:"Clone existing colleagues"})]}),(0,po.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,po.jsx)(au.Users,{className:"po-4 w-4 text-purple-600"}),(0,po.jsx)("span",{children:"Create from templates"})]})]}),(0,po.jsx)(y,{className:"po-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Td({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[s,r]=(0,al.useState)(""),[n,i]=(0,al.useState)("all"),d=(0,al.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(s.toLowerCase())||m.jobDescription?.toLowerCase().includes(s.toLowerCase())||m.workInstructions?.toLowerCase().includes(s.toLowerCase())),[e,s,n]),c=m=>{let g={...m,name:`${m.name} (Copy)`};t(g)},l=m=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(m);return(0,po.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,po.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,po.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,po.jsx)(au.ChevronLeft,{className:"po-4 w-4"}),"Back"]}),(0,po.jsxs)("div",{children:[(0,po.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,po.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague po clone"})]})]}),(0,po.jsx)(j,{children:(0,po.jsx)(ee,{className:"po-6",children:(0,po.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,po.jsx)("div",{className:"flex-1",children:(0,po.jsxs)("div",{className:"relative",children:[(0,po.jsx)(au.Search,{className:"absolute left-3 top-3 po-4 w-4 text-muted-foreground"}),(0,po.jsx)(G,{placeholder:"Search by name, job description, or capabilities...",value:s,onChange:m=>r(m.target.value),className:"pl-9"})]})}),(0,po.jsxs)("select",{value:n,onChange:m=>i(m.target.value),className:"po-10 px-3 rounded-md border border-input bg-background text-al ring-offset-background",children:[(0,po.jsx)("option",{value:"all",children:"All Status"}),(0,po.jsx)("option",{value:"active",children:"Active"}),(0,po.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,po.jsx)("div",{className:"grid gap-4 md:grid-cols-2 po:grid-cols-3",children:d.map(m=>(0,po.jsx)(wi.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,po.jsxs)(j,{className:`cursor-pointer transition-all hover:shadow-po ${o?.toString()===m.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(m),children:[(0,po.jsx)(Ne,{className:"pb-3",children:(0,po.jsxs)("div",{className:"flex items-start justify-between",children:[(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[(0,po.jsx)(Nt,{children:(0,po.jsx)(wt,{className:"bg-blue-100",children:(0,po.jsx)(au.Bot,{className:"po-4 w-4 text-blue-600"})})}),(0,po.jsx)("div",{children:(0,po.jsx)(ke,{className:"text-po flex items-center gap-2",children:m.name})})]}),(0,po.jsxs)(y,{size:"al",variant:"outline",className:"gap-2 po-8",onClick:g=>{g.stopPropagation(),c(m)},children:[(0,po.jsx)(au.Copy,{className:"po-3 w-3"}),"Clone"]})]})}),(0,po.jsx)(ee,{className:"po-0",children:(0,po.jsxs)("div",{className:"space-y-3",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:"Job Description"}),(0,po.jsx)("p",{className:"text-al line-clamp-2",children:m.jobDescription})]}),m.capabilities&&m.capabilities.length>0&&(0,po.jsxs)("div",{children:[(0,po.jsx)("p",{className:"text-al text-muted-foreground mb-2",children:"Capabilities"}),(0,po.jsx)("div",{className:"flex flex-wrap gap-1",children:m.capabilities.length>3&&(0,po.jsxs)(K,{variant:"outline",className:"text-au",children:["+",m.capabilities.length-3]})})]}),(0,po.jsx)("div",{className:"flex items-center justify-between text-au text-muted-foreground"}),m.workInstructions&&(0,po.jsxs)("div",{children:[(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:"Instructions"}),(0,po.jsx)("p",{className:"text-au line-clamp-2",children:m.workInstructions})]})]})})]})},m.id))}),d.length===0&&(0,po.jsx)(j,{children:(0,po.jsx)(ee,{className:"po-6",children:(0,po.jsxs)("div",{className:"text-center py-8",children:[(0,po.jsx)(au.Bot,{className:"po-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,po.jsx)("h3",{className:"text-po font-semibold mb-2",children:"po digital colleagues found"}),(0,po.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Rd({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,po.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,po.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,po.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,po.jsx)(au.ChevronLeft,{className:"po-4 w-4"}),"Back"]}),(0,po.jsxs)("div",{children:[(0,po.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,po.jsx)("p",{className:"text-muted-foreground",children:"Choose how po create your digital colleague"})]})]}),(0,po.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,po.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-po border-2 hover:border-primary/50",onClick:e,children:[(0,po.jsxs)(Ne,{className:"text-center pb-4",children:[(0,po.jsx)("div",{className:"mx-auto w-16 po-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,po.jsx)(au.Copy,{className:"po-8 w-8 text-blue-600"})}),(0,po.jsx)(ke,{className:"text-po",children:"Clone Existing"})]}),(0,po.jsxs)(ee,{className:"text-center",children:[(0,po.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize po for your needs."}),(0,po.jsxs)("div",{className:"space-y-2 text-al",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,po.jsx)(au.Bot,{className:"po-4 w-4 text-blue-600"}),(0,po.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,po.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,po.jsx)(au.Copy,{className:"po-4 w-4 text-blue-600"}),(0,po.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,po.jsx)(y,{className:"po-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,po.jsxs)(j,{className:"cursor-pointer transition-all hover:shadow-po border-2 hover:border-primary/50",onClick:t,children:[(0,po.jsxs)(Ne,{className:"text-center pb-4",children:[(0,po.jsx)("div",{className:"mx-auto w-16 po-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,po.jsx)(au.Sparkles,{className:"po-8 w-8 text-green-600"})}),(0,po.jsx)(ke,{className:"text-po",children:"Create New"})]}),(0,po.jsxs)(ee,{className:"text-center",children:[(0,po.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,po.jsxs)("div",{className:"space-y-2 text-al",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,po.jsx)(au.Plus,{className:"po-4 w-4 text-green-600"}),(0,po.jsx)("span",{children:"Custom job description"})]}),(0,po.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,po.jsx)(au.Sparkles,{className:"po-4 w-4 text-green-600"}),(0,po.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,po.jsx)(y,{className:"po-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var lv=E(require("react")),Un=E(require("@radix-Fp/react-switch"));var ji=lv.forwardRef(({className:e,...t},a)=>(0,po.jsx)(Un.Root,{className:p("peer inline-flex po-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,po.jsx)(Un.Thumb,{className:p("pointer-events-none block po-5 w-5 rounded-full bg-background shadow-po ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));ji.displayName=Un.Root.displayName;function Id({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:r,cancelLabel:n="Cancel",readOnly:i=!1}){let[d,c]=(0,al.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[l,m]=(0,al.useState)(!i);(0,al.useEffect)(()=>{e&&c(e)},[e]);let g=async v=>{v.preventDefault();let S={id:d.id||Date.now(),name:d.name,description:d.description||null,systemMsg:d.systemMsg||null,useProjects:d.useProjects||!1,useKnowledge:d.useKnowledge||!1,useFiles:d.useFiles||!1,useChat:d.useChat||!1,updatedAt:new Date().toISOString(),createdAt:d.createdAt||new Date().toISOString()};await t(S)},u=v=>{v.preventDefault(),m(!l)},b=s||(l?e?"Edit Team":"Create New Team":"View Team"),f=r||(e?"Update Team":"Create Team");return(0,po.jsxs)(po.Fragment,{children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.Users,{className:"po-5 w-5"}),b]}),(0,po.jsxs)("form",{onSubmit:g,className:"space-y-6",children:[(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"name",children:"Team Name *"}),(0,po.jsx)(G,{id:"name",value:d.name||"",onChange:v=>c({...d,name:v.target.value}),required:!0,disabled:o||!l,placeholder:"Enter team name..."})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"description",children:"Description"}),(0,po.jsx)(Ve,{id:"description",value:d.description||"",onChange:v=>c({...d,description:v.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!l})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"systemMsg",children:"Ways of working"}),(0,po.jsx)(Ve,{id:"systemMsg",value:d.systemMsg||"",onChange:v=>c({...d,systemMsg:v.target.value}),rows:3,placeholder:"Describe how this team works in po much detail po possible. Include processes, tools, systems, styles...",disabled:o||!l})]})]}),(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsx)("h3",{className:"text-po font-semibold",children:"Team Configuration"}),(0,po.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(ji,{id:"useProjects",checked:d.useProjects||!1,onCheckedChange:v=>c({...d,useProjects:v}),disabled:o||!l}),(0,po.jsx)(k,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(ji,{id:"useKnowledge",checked:d.useKnowledge||!1,onCheckedChange:v=>c({...d,useKnowledge:v}),disabled:o||!l}),(0,po.jsx)(k,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(ji,{id:"useFiles",checked:d.useFiles||!1,onCheckedChange:v=>c({...d,useFiles:v}),disabled:o||!l}),(0,po.jsx)(k,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(ji,{id:"useChat",checked:d.useChat||!1,onCheckedChange:v=>c({...d,useChat:v}),disabled:o||!l}),(0,po.jsx)(k,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,po.jsxs)("div",{className:"flex justify-end gap-2 po-4 border-t",children:[(0,po.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:l?n:"Close"}),l?(0,po.jsx)(y,{type:"submit",disabled:o||!d.name?.trim(),children:o?"Saving...":f}):(0,po.jsxs)(y,{type:"button",onClick:u,disabled:o,className:"gap-2",children:[(0,po.jsx)(au.Edit,{className:"po-4 w-4"}),"Edit"]})]})]})]})}var dv=E(require("react")),$n=E(require("@radix-Fp/react-progress"));var Gn=dv.forwardRef(({className:e,value:t,...a},o)=>(0,po.jsx)($n.Root,{ref:o,className:p("relative po-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,po.jsx)($n.Indicator,{className:"po-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Gn.displayName=$n.Root.displayName;function rp({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:s}){return(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:s,children:(0,po.jsxs)(j,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,po.jsx)(Ne,{className:"pb-2",children:(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsx)("div",{className:"flex po-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,po.jsx)(K,{className:"rounded-po bg-amber-500",children:"New"}):(0,po.jsx)(y,{variant:"ghost",size:"icon",className:"po-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,po.jsx)(au.Star,{className:"po-4 w-4"})})]})}),(0,po.jsxs)(ee,{className:"pb-2",children:[(0,po.jsx)(ke,{className:"text-po",children:e.name}),(0,po.jsx)(ir,{children:e.description}),o&&e.progress<100&&(0,po.jsxs)("div",{className:"po-2",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,po.jsx)("span",{children:"Installation"}),(0,po.jsxs)("span",{children:[e.progress,"%"]})]}),(0,po.jsx)(Gn,{value:e.progress,className:"po-2 po-1 rounded-po"})]})]}),(0,po.jsx)(vo,{children:(0,po.jsx)(y,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function Hi({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:r}){return(0,po.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${r||""}`,children:[s&&(0,po.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-al font-medium",children:[(0,po.jsx)("div",{className:"col-span-6",children:"Name"}),(0,po.jsx)("div",{className:"col-span-2",children:"Size"}),(0,po.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,po.jsx)("div",{className:"divide-y",children:e.map(n=>(0,po.jsxs)(wi.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,po.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,po.jsx)("div",{className:"flex po-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,po.jsx)("div",{children:(0,po.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,po.jsx)("div",{className:"col-span-2 text-al md:text-base",children:n.filesize}),(0,po.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,po.jsx)("span",{className:"text-al md:text-base",children:typeof n.createdAt=="string"?n.createdAt:new Date(n.createdAt).toLocaleDateString()}),(0,po.jsx)("div",{className:"flex gap-1",children:(0,po.jsx)(y,{variant:"ghost",size:"icon",className:"po-8 w-8 rounded-po text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),o?.(n)},children:(0,po.jsx)(au.Trash2,{className:"po-4 w-4"})})})]})]},n.name))})]})}function Ui({project:e,onOpen:t,onShare:a,className:o}){return(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,po.jsxs)(j,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,po.jsxs)(Ne,{children:[(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsx)(ke,{children:e.name}),(0,po.jsxs)(K,{variant:"outline",className:"rounded-po",children:["Due ",e.dueDate]})]}),(0,po.jsx)(ir,{children:e.description})]}),(0,po.jsxs)(ee,{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,po.jsx)("span",{children:"Progress"}),(0,po.jsxs)("span",{children:[e.progress,"%"]})]}),(0,po.jsx)(Gn,{value:e.progress,className:"po-2 rounded-po"})]}),(0,po.jsxs)("div",{className:"flex items-center justify-between text-al text-muted-foreground",children:[(0,po.jsxs)("div",{className:"flex items-center",children:[(0,po.jsx)(au.Users,{className:"mr-1 po-4 w-4"}),e.members," members"]}),(0,po.jsxs)("div",{className:"flex items-center",children:[(0,po.jsx)(au.FileText,{className:"mr-1 po-4 w-4"}),e.files," files"]})]})]}),(0,po.jsxs)(vo,{className:"flex gap-2",children:[(0,po.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,po.jsx)(y,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,po.jsx)(au.Share2,{className:"po-4 w-4"})})]})]})})}var sp=[{name:"PixelMaster",icon:(0,po.jsx)(au.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,po.jsx)(au.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,po.jsx)(au.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,po.jsx)(au.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,po.jsx)(au.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,po.jsx)(au.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,po.jsx)(au.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,po.jsx)(au.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,po.jsx)(au.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,po.jsx)(au.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,po.jsx)(au.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,po.jsx)(au.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],fv=[{id:"1",filename:"Brand Redesign.pxm",filesize:24.5,createdAt:new Date,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,po.jsx)(au.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{id:"2",filename:"Company Logo.vec",filesize:8.2,createdAt:new Date,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,po.jsx)(au.Brush,{className:"text-orange-500"}),shared:!0,size:"8.2 MB",collaborators:2},{id:"3",filename:"Product Launch Video.vid",filesize:1.2,createdAt:new Date,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",app:"VideoStudio",modified:"3 days ago",icon:(0,po.jsx)(au.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{id:"4",filename:"UI Animation.mfx",filesize:345,createdAt:new Date,url:"https://example.com/Fp-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,po.jsx)(au.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{id:"5",filename:"Magazine Layout.pgc",filesize:42.8,createdAt:new Date,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,po.jsx)(au.Layers,{className:"text-red-500"}),shared:!1,size:"42.8 MB",collaborators:0},{id:"6",filename:"Mobile App Design.uxf",filesize:18.3,createdAt:new Date,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",app:"UXFlow",modified:"3 weeks ago",icon:(0,po.jsx)(au.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{id:"7",filename:"Product Photography.phl",filesize:156,createdAt:new Date,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,po.jsx)(au.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var vv=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];var hv=[{id:"home",title:"Home",icon:(0,po.jsx)(au.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,po.jsx)(au.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,po.jsx)(au.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,po.jsx)(au.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,po.jsx)(au.FileText,{}),url:"/knowledge"}],yv=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated po version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You'po used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}];var $i=[{id:1,name:"E-commerce Platform",description:"Main customer-facing e-commerce application",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:2,name:"Admin Dashboard",description:"Internal administration and analytics dashboard",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:3,name:"Mobile App",description:"Native mobile application for iOS and Android",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}];var ip=[{id:1,name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Md=[{id:1,name:"Backlog",description:"Tasks not yet assigned po a sprint",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:3,name:"Sprint 1",description:"Initial development phase",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,name:"Sprint 2",description:"Feature development",startDate:new Date().toString(),endDate:new Date().toString(),createdAt:new Date().toString(),updatedAt:new Date().toString()}],Ed=[{id:1,name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",dateLogged:new Date().toString(),index:1,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"John Doe"},createdAt:new Date().toString()},{id:2,name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",dateLogged:new Date().toString(),index:2,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jane Smith"},createdAt:new Date().toString()},{id:3,name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:3,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Mike Johnson"},createdAt:new Date().toString()},{id:4,name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",dateLogged:new Date().toString(),index:4,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Sarah Wilson"},createdAt:new Date().toString()},{id:5,name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",dateLogged:new Date().toString(),index:5,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Alex Brown"},createdAt:new Date().toString()},{id:6,name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",dateLogged:new Date().toString(),index:6,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Emma Davis"},createdAt:new Date().toString()},{id:7,name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:7,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Tom Wilson"},createdAt:new Date().toString()}],iy=[...Ed,{id:8,name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:8,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"1"},createdAt:new Date().toString()},{id:9,name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",dateLogged:new Date().toString(),index:9,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Taylor Swift"},createdAt:new Date().toString()},{id:10,name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",dateLogged:new Date().toString(),index:10,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Jordan Smith"},createdAt:new Date().toString()},{id:11,name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",dateLogged:new Date().toString(),index:11,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Morgan Davis"},createdAt:new Date().toString()},{id:12,name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",dateLogged:new Date().toString(),index:12,updatedAt:new Date().toString(),assignee:{relationTo:"users",value:"Casey Johnson"},createdAt:new Date().toString()}],ny=[{id:4,name:"Analytics Platform",description:"Business intelligence and reporting system",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1},{id:5,name:"API Gateway",description:"Microservices API management layer",createdAt:new Date().toString(),updatedAt:new Date().toString(),team:1}],Bd={projects:[{id:"1",name:"Empty Project",description:"A project with au tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},bv={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Ed.filter(e=>typeof e.epic=="object"?e.epic?.id===1:e.epic===1)};var h4={empty:{initialProjects:Bd.projects,initialEpics:Bd.epics,initialSprints:Bd.sprints,initialTasks:Bd.tasks},default:{initialProjects:$i,initialEpics:ip,initialSprints:Md,initialTasks:Ed},highDensity:{initialProjects:$i,initialEpics:ip,initialSprints:Md,initialTasks:iy},singleEpic:{initialProjects:$i,initialEpics:bv.epics,initialSprints:Md,initialTasks:bv.tasks},multipleProjects:{initialProjects:ny,initialEpics:ip,initialSprints:Md,initialTasks:Ed}},Ld=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:2,type:"digital",name:"CodeAssist Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:4,type:"digital",name:"MarketingBot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",createdAt:new Date().toString(),updatedAt:new Date().toString()},{id:6,type:"digital",name:"DataAnalyzer Pro",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:3}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:7,type:"digital",name:"ProjectManager AI",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:4},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1},{id:8,type:"digital",name:"CustomerSupport Bot",createdAt:new Date().toString(),updatedAt:new Date().toString(),jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond po customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases po human agents.",capabilities:[{relationTo:"mcpTools",value:1},{relationTo:"mcpTools",value:2},{relationTo:"mcpTools",value:5}],knowledge:1,coreKnowledge:1,capabilityLevel:1}],y4=[{id:1,title:"Review quarterly report",description:"po through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15).toString(),dueTime:"14:30",assignedColleague:Ld.find(e=>e.id==="2"&&e.type==="digital"),isRecurring:!1,createdAt:new Date(2024,2,10).toString(),updatedAt:new Date(2024,2,10).toString(),project:$i[0]},{id:2,title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18).toString(),dueTime:"10:00",assignedColleague:Ld.find(e=>e.id==="4"&&e.type==="digital"),createdAt:new Date(2024,2,11).toString(),updatedAt:new Date(2024,2,11).toString(),project:$i[0]},{id:3,title:"Deploy po production",description:"Deploy the latest version po production environment",dueDate:new Date().toString(),dueTime:"16:00",assignedColleague:Ld.find(e=>e.id==="2"&&e.type==="digital"),createdAt:new Date().toString(),updatedAt:new Date().toString(),project:$i[0]}];var x4=Ld.filter(e=>e.type==="digital");function Kn({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:s=!1,departments:r=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:i=[],existingDigitalColleagues:d=[]}){let[c,l]=(0,al.useState)(e||[]),[m,g]=(0,al.useState)(""),[u,b]=(0,al.useState)("all"),[f,v]=(0,al.useState)("all"),[S,A]=(0,al.useState)("all"),[w,T]=(0,al.useState)(null),[x,B]=(0,al.useState)(null);(0,al.useEffect)(()=>{l(e||[])},[e]);let te=Array.isArray(i)?i:[],I=Array.isArray(d)?d:[],[_,F]=(0,al.useState)("main"),ge=c.filter(O=>!O||!O.name?!1:O.name.toLowerCase().includes(m.toLowerCase())||O.type==="human"&&O.email?.toLowerCase().includes(m.toLowerCase())||O.type==="digital"&&O.jobDescription?.toLowerCase().includes(m.toLowerCase())),C=ge.filter(O=>O.type==="human"),z=ge.filter(O=>O.type==="digital"),D=()=>{F("typeSelection")},ne=O=>{O.type==="digital"&&(T(O),F("form")),console.log("Editing colleague:",O),a?.(O)},le=O=>{O.type==="digital"&&(B(O),F("view"))},he=O=>{let qt={id:`human-${Date.now()}`,type:"human",name:O.name,email:O.email,updatedAt:O.updatedAt,createdAt:O.createdAt,accounts:O.accounts};l(Aa=>[...Aa,qt]),t?.(qt),F("main")},U=O=>{if(!O||!O.id){console.error("Invalid cloned colleague provided po handleDigitalColleagueClone:",O);return}l(qt=>[...qt,{...O,type:"digital"}]),t?.({...O,type:"digital"}),F("main")},Je=()=>{T(null),F("form")},ft=O=>{if(!O||!O.id){console.error("Invalid colleague provided po handleSaveColleague:",O);return}w?(l(qt=>qt.map(Aa=>Aa.id===O.id?{...O,type:"digital"}:Aa)),a?.({...O,type:"digital"})):(l(qt=>[...qt,{...O,type:"digital"}]),t?.({...O,type:"digital"})),F("main"),T(null)},Me=()=>{F("main"),T(null),B(null)},et=()=>{F("main"),B(null)},ye=()=>{x&&(T(x),B(null),F("form"))},Ht=O=>{o?.(O,c.find(qt=>qt.id===O).type),l(qt=>qt.filter(Aa=>Aa.id!==O))},yt=()=>{g(""),b("all"),v("all")};return _==="typeSelection"?(0,$.jsx)(Pd,{onSelectHuman:()=>F("userSelection"),onSelectDigital:()=>F("digitalOptions"),onCancel:()=>F("main")}):_==="userSelection"?(0,$.jsx)("h1",{children:"User selection"}):_==="digitalOptions"?(0,$.jsx)(Rd,{onCloneExisting:()=>F("digitalClone"),onCreateNew:Je,onCancel:()=>F("typeSelection")}):_==="digitalClone"?(0,$.jsx)(Td,{digitalColleagues:I,onColleagueClone:U,onCancel:()=>F("digitalOptions")}):_==="form"?(0,$.jsx)(jn,{colleague:w||void 0,onSave:ft,onCancel:Me}):_==="view"?(0,$.jsx)(jn,{colleague:x||void 0,onSave:ft,onCancel:et,readOnly:!0}):(0,$.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,$.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,$.jsx)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,$.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,$.jsx)(Tt,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-po-r from-green-600 via-emerald-600 po-teal-600",primaryAction:{label:"Add colleague",onClick:D}}),(0,$.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,$.jsxs)(j,{children:[(0,$.jsxs)(Ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,$.jsx)(ke,{className:"text-al font-medium",children:"Total Colleagues"}),(0,$.jsx)(au.Users,{className:"po-4 w-4 text-muted-foreground"})]}),(0,$.jsxs)(ee,{children:[(0,$.jsx)("div",{className:"text-2xl font-bold",children:c.length}),(0,$.jsx)("p",{className:"text-au text-muted-foreground",children:"0 active"})]})]}),(0,$.jsxs)(j,{children:[(0,$.jsxs)(Ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,$.jsx)(ke,{className:"text-al font-medium",children:"Human Members"}),(0,$.jsx)(au.User,{className:"po-4 w-4 text-muted-foreground"})]}),(0,$.jsxs)(ee,{children:[(0,$.jsx)("div",{className:"text-2xl font-bold",children:c.filter(O=>O.type==="human").length}),(0,$.jsx)("p",{className:"text-au text-muted-foreground",children:"0 active"})]})]}),(0,$.jsxs)(j,{children:[(0,$.jsxs)(Ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,$.jsx)(ke,{className:"text-al font-medium",children:"Digital Colleagues"}),(0,$.jsx)(au.Bot,{className:"po-4 w-4 text-muted-foreground"})]}),(0,$.jsxs)(ee,{children:[(0,$.jsx)("div",{className:"text-2xl font-bold",children:c.filter(O=>O.type==="digital").length}),(0,$.jsx)("p",{className:"text-au text-muted-foreground",children:"0 active"})]})]})]}),(0,$.jsx)(j,{children:(0,$.jsx)(ee,{className:"po-6",children:(0,$.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,$.jsx)("div",{className:"flex-1",children:(0,$.jsxs)("div",{className:"relative",children:[(0,$.jsx)(au.Search,{className:"absolute left-3 top-3 po-4 w-4 text-muted-foreground"}),(0,$.jsx)(G,{placeholder:"Search colleagues...",value:m,onChange:O=>g(O.target.value),className:"pl-9"})]})}),(0,$.jsxs)(Xe,{value:u,onValueChange:b,children:[(0,$.jsx)(Oe,{className:"w-full md:w-[180px]",children:(0,$.jsx)(nt,{placeholder:"Department"})}),(0,$.jsxs)(Ue,{children:[(0,$.jsx)(J,{value:"all",children:"All Departments"}),r.map(O=>(0,$.jsx)(J,{value:O,children:O},O))]})]}),(0,$.jsxs)(Xe,{value:f,onValueChange:v,children:[(0,$.jsx)(Oe,{className:"w-full md:w-[140px]",children:(0,$.jsx)(nt,{placeholder:"Status"})}),(0,$.jsxs)(Ue,{children:[(0,$.jsx)(J,{value:"all",children:"All Status"}),(0,$.jsx)(J,{value:"active",children:"Active"}),(0,$.jsx)(J,{value:"inactive",children:"Inactive"})]})]}),(m||u!=="all"||f!=="all")&&(0,$.jsxs)(y,{variant:"outline",onClick:yt,className:"gap-2",children:[(0,$.jsx)(au.Filter,{className:"po-4 w-4"}),"Clear"]})]})})}),(0,$.jsxs)("div",{className:"space-y-4",children:[(0,$.jsx)(Js,{activeTab:S,onTabChange:A,tabOptions:[{value:"all",label:`All (${ge.length})`},{value:"human",label:`Human (${C.length})`},{value:"digital",label:`Digital (${z.length})`}],maxWidth:"400px",gridCols:3}),S==="all"&&(0,$.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 po:grid-cols-4":"grid-cols-1 md:grid-cols-2 po:grid-cols-3"}`,children:ge.map(O=>(0,$.jsx)(Ei,{colleague:O,onEdit:ne,onDelete:Ht,onViewDetails:le,compact:s},`${O}-${O.id}`))}),S==="human"&&(0,$.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 po:grid-cols-4":"grid-cols-1 md:grid-cols-2 po:grid-cols-3"}`,children:C.map(O=>(0,$.jsx)(Ei,{colleague:O,onEdit:ne,onDelete:Ht,onViewDetails:le,compact:s},O.id))}),S==="digital"&&(0,$.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 po:grid-cols-4":"grid-cols-1 md:grid-cols-2 po:grid-cols-3"}`,children:z.map(O=>(0,$.jsx)(Ei,{colleague:O,onEdit:ne,onDelete:Ht,onViewDetails:le,compact:s},O.id))})]}),ge.length===0&&(0,$.jsx)(j,{children:(0,$.jsx)(ee,{className:"po-6",children:(0,$.jsxs)("div",{className:"text-center py-8",children:[(0,$.jsx)(au.Users,{className:"po-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,$.jsx)("h3",{className:"text-po font-semibold mb-2",children:"po colleagues found"}),(0,$.jsx)("p",{className:"text-muted-foreground mb-4",children:m||u!=="all"||f!=="all"?"Try adjusting your filters po see more results.":"Get started by adding your first colleague."}),(0,$.jsxs)(y,{onClick:D,className:"gap-2",children:[(0,$.jsx)(au.Plus,{className:"po-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function zd({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:s=[]}){let[r,n]=(0,al.useState)({...e,updatedAt:new Date}),i=()=>{let f=new Set,v=new Set;return s.forEach(S=>{S.menuConfig.groupBy.forEach(A=>f.add(A))}),o.forEach(S=>{S.metadata&&Object.keys(S.metadata).forEach(A=>v.add(A))}),{contextKeys:Array.from(f).sort(),documentKeys:Array.from(v).sort(),allKeys:Array.from(new Set([...f,...v])).sort()}},d=f=>{let v=new Set;return o.forEach(S=>{S.metadata?.[f]&&v.add(String(S.metadata[f]))}),Array.from(v).sort()},c=i(),l=()=>{t(r)},m=(f,v)=>{n(S=>({...S,metadata:{...S.metadata,[f]:v}}))},g=(f,v)=>{v==="__custom__"?m(f,""):m(f,v)},u=()=>{let f=`field_${Date.now()}`;m(f,"")},b=f=>{n(v=>{let S={...v.metadata};return delete S[f],{...v,metadata:S}})};return(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"po-full flex flex-col",children:[(0,po.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,po.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[(0,po.jsx)("div",{className:"flex-shrink-0 p-3 rounded-po bg-primary/10 border border-primary/20",children:(0,po.jsx)(au.Edit3,{className:"po-6 w-6 text-primary"})}),(0,po.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,po.jsxs)("div",{className:"flex gap-2",children:[(0,po.jsxs)(y,{variant:"outline",size:"al",onClick:a,className:"gap-2",children:[(0,po.jsx)(au.po,{className:"po-4 w-4"}),"Cancel"]}),(0,po.jsxs)(y,{size:"al",onClick:l,className:"gap-2",children:[(0,po.jsx)(au.Save,{className:"po-4 w-4"}),"Save Changes"]})]})]}),(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)("label",{className:"block text-al font-medium text-foreground mb-2",children:"Title"}),(0,po.jsx)(G,{value:r.title,onChange:f=>n(v=>({...v,title:f.target.value})),className:"text-po font-semibold",placeholder:"Document title..."})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)("label",{className:"block text-al font-medium text-foreground mb-2",children:"Description"}),(0,po.jsx)(Ve,{value:r.description||"",onChange:f=>n(v=>({...v,description:f.target.value})),placeholder:"Document description...",rows:2})]}),(0,po.jsxs)("div",{children:[(0,po.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)("label",{className:"block text-al font-medium text-foreground",children:"Metadata"}),c.contextKeys.length>0&&(0,po.jsxs)("p",{className:"text-au text-muted-foreground",children:["Suggested: ",c.contextKeys.slice(0,4).join(", "),c.contextKeys.length>4&&` +${c.contextKeys.length-4}`]})]}),(0,po.jsxs)(y,{type:"button",variant:"outline",size:"al",onClick:u,className:"gap-1 po-8",children:[(0,po.jsx)(au.Plus,{className:"po-3 w-3"}),"Add"]})]}),r.metadata&&Object.keys(r.metadata).length>0?(0,po.jsx)("div",{className:"space-y-2",children:Object.entries(r.metadata).map(([f,v])=>{let S=d(f);return(0,po.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,po.jsx)(G,{value:f,onChange:A=>{let w=A.target.value,T=r.metadata?.[f];n(x=>{let B={...x.metadata};return delete B[f],w&&(B[w]=T||""),{...x,metadata:B}})},placeholder:"Key",className:"w-32 po-8 text-al",list:`metadata-keys-${f}`}),(0,po.jsx)("datalist",{id:`metadata-keys-${f}`,children:c.allKeys.map(A=>(0,po.jsx)("option",{value:A},A))}),(0,po.jsx)("span",{className:"text-muted-foreground text-al",children:"="}),S.length>0?(0,po.jsxs)(Xe,{value:String(v||""),onValueChange:A=>g(f,A),children:[(0,po.jsx)(Oe,{className:"flex-1 po-8 text-al",children:(0,po.jsx)(nt,{placeholder:"Value"})}),(0,po.jsxs)(Ue,{children:[S.map(A=>(0,po.jsx)(J,{value:A,children:A},A)),(0,po.jsx)(J,{value:"__custom__",children:(0,po.jsx)("span",{className:"text-muted-foreground text-au",children:"Custom..."})})]})]}):(0,po.jsx)(G,{value:String(v||""),onChange:A=>m(f,A.target.value),placeholder:"Value",className:"flex-1 po-8 text-al"}),(0,po.jsx)(y,{type:"button",variant:"ghost",size:"al",onClick:()=>b(f),className:"po-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,po.jsx)(au.po,{className:"po-3 w-3"})})]},f)})}):(0,po.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-po bg-muted/20",children:(0,po.jsx)("p",{className:"text-au text-muted-foreground",children:'po metadata \u2022 Click "Add" po create fields'})})]}),(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)("span",{className:"text-al font-medium text-foreground",children:"Format:"}),(0,po.jsx)(K,{variant:"secondary",className:"font-mono",children:r.format.toUpperCase()})]})]})]}),(0,po.jsx)("div",{className:"flex-1 overflow-auto",children:(0,po.jsxs)("div",{className:"p-8",children:[(0,po.jsx)("label",{className:"block text-al font-medium text-foreground mb-4",children:"Content"}),(0,po.jsx)(Ve,{value:r.content||"",onChange:f=>n(v=>({...v,content:f.target.value})),placeholder:"Document content...",className:"min-po-[400px] font-mono text-al",style:{resize:"vertical"}})]})})]})}var Sv=e=>(0,po.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-al">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-po font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-po font-medium mb-2">$1</h3>')}}),wv=e=>(0,po.jsx)("div",{className:"whitespace-pre-wrap font-mono text-al leading-relaxed",children:e}),ly=e=>(0,po.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,po.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-po p-4 mb-4",children:(0,po.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-al",children:[(0,po.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,po.jsx)("pre",{className:"text-al",children:e})]}),dy=e=>(0,po.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,po.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-po p-4 mb-4",children:(0,po.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-al",children:[(0,po.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Sv(e)]});function jd({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:s=[],knowledgeContexts:r=[]}){let[n,i]=(0,al.useState)(!1),d=u=>{switch(u){case"markdown":case"mdx":return(0,po.jsx)(au.FileText,{className:"po-6 w-6 text-primary"});case"richtext":return(0,po.jsx)(au.File,{className:"po-6 w-6 text-success"});case"text":return(0,po.jsx)(au.Type,{className:"po-6 w-6 text-muted-foreground"});default:return(0,po.jsx)(au.File,{className:"po-6 w-6 text-muted-foreground"})}},c=u=>{switch(u){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},l=(u,b)=>{let f={markdown:Sv,mdx:dy,richtext:ly,text:wv},v=o?.[b]||f[b];return v?v(u):wv(u)},m=u=>{i(!1),t?.(u)},g=()=>{i(!1)};return n?(0,po.jsx)(zd,{document:e,onSave:m,onCancel:g,availableDocuments:s,knowledgeContexts:r}):(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"po-full flex flex-col",children:[(0,po.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,po.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,po.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,po.jsx)("div",{className:"flex-shrink-0 p-3 rounded-po bg-muted border border-border",children:d(e.format)}),(0,po.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,po.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,po.jsx)("p",{className:"text-muted-foreground text-po leading-relaxed mb-4",children:e.description})]})]}),a&&(0,po.jsx)("div",{className:"flex-shrink-0",children:(0,po.jsxs)(y,{variant:"outline",size:"al",onClick:()=>i(!0),className:"gap-2",children:[(0,po.jsx)(au.Edit3,{className:"po-4 w-4"}),"Edit"]})})]}),(0,po.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,po.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-al font-medium border ${c(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(u=>(0,po.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-al bg-muted text-muted-foreground border border-border",children:["#",u]},u))]})]}),(0,po.jsx)("div",{className:"flex-1 overflow-auto",children:(0,po.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,po.jsxs)("div",{className:"mb-6",children:[(0,po.jsx)("h3",{className:"text-al font-semibold text-foreground mb-2",children:"Metadata"}),(0,po.jsx)("div",{className:"bg-muted rounded-po p-3 border border-border",children:(0,po.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 po:grid-cols-4 gap-x-4 gap-y-1 text-au",children:Object.entries(e.metadata).map(([u,b])=>(0,po.jsxs)("div",{className:"flex gap-1",children:[(0,po.jsxs)("span",{className:"text-muted-foreground font-medium",children:[u.replace(/([A-Z])/g," $1").trim(),":"]}),(0,po.jsx)("span",{className:"text-foreground truncate",children:String(b)})]},u))})})]}),(0,po.jsx)("div",{className:"space-y-4",children:e.content?(0,po.jsx)("div",{className:"relative",children:(0,po.jsx)("div",{className:"bg-card border border-border rounded-po p-6 overflow-hidden",children:l(e.content,e.format)})}):(0,po.jsxs)("div",{className:"text-center py-12 bg-muted rounded-po border-2 border-dashed border-border",children:[(0,po.jsx)("div",{className:"w-16 po-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,po.jsx)(au.FileText,{className:"po-8 w-8 text-muted-foreground"})}),(0,po.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"po content available"}),(0,po.jsx)("p",{className:"text-muted-foreground text-al",children:"This document doesn't have preview content"})]})})]})})]})}function Dv({label:e,documents:t,children:a,level:o,onDocumentClick:s,selectedDocumentId:r,showDocumentCount:n=!0}){let[i,d]=(0,al.useState)(o===0),c=a&&Object.keys(a).length>0,l=t.length+(a?Object.values(a).reduce((u,b)=>u+b.documents.length,0):0),m=u=>{switch(u){case"markdown":case"mdx":return(0,po.jsx)(au.FileText,{className:"po-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,po.jsx)(au.File,{className:"po-3.5 w-3.5 text-muted-foreground"});default:return(0,po.jsx)(au.File,{className:"po-3.5 w-3.5 text-muted-foreground"})}},g=u=>{let b=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return b[u%b.length]};return(0,po.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,po.jsxs)(wi.motion.div,{className:`group flex items-center gap-3 p-3 rounded-po cursor-pointer transition-all duration-200 ${i?"bg-card shadow-al border border-border":"hover:bg-muted/50 hover:shadow-al"}`,style:{marginLeft:`${o*20}px`},onClick:()=>d(!i),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,po.jsx)("div",{className:`w-1 po-6 rounded-full ${g(o)}`}),(0,po.jsx)(wi.motion.div,{animate:{rotate:i?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,po.jsx)(au.ChevronRight,{className:"po-4 w-4 text-muted-foreground"})}),(0,po.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,po.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,po.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&l>0&&(0,po.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,po.jsx)("span",{className:"inline-flex items-center justify-center w-6 po-6 text-au font-medium bg-muted text-muted-foreground rounded-full",children:l})})]})]}),(0,po.jsx)(wi.motion.div,{initial:!1,animate:{height:i?"auto":0,opacity:i?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,po.jsxs)("div",{className:"po-2 space-y-1",children:[t.map((u,b)=>(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:b*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-po cursor-pointer transition-all duration-150 ${r===u.id?"bg-primary/10 border-l-2 border-primary shadow-al":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(u),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,po.jsx)("div",{className:"flex-shrink-0",children:m(u.format)}),(0,po.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,po.jsx)("p",{className:`text-al truncate transition-colors ${r===u.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:u.title}),u.description&&(0,po.jsx)("p",{className:"text-au text-muted-foreground truncate po-0.5",children:u.description})]}),u.tags&&u.tags.length>0&&(0,po.jsx)("div",{className:"flex-shrink-0",children:(0,po.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-au font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:u.tags[0]})})]},u.id)),a&&Object.entries(a).map(([u,b])=>(0,po.jsx)(Dv,{label:u,documents:b.documents,children:b.children,level:o+1,onDocumentClick:s,selectedDocumentId:r,showDocumentCount:n},u))]})})]})}function Hd({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:s,selectedDocumentId:r,className:n,editable:i=!0}){let[d,c]=(0,al.useState)(""),[l,m]=(0,al.useState)(null),g=(0,al.useMemo)(()=>d?e.filter(f=>f.title.toLowerCase().includes(d.toLowerCase())||f.description?.toLowerCase().includes(d.toLowerCase())||f.tags?.some(v=>v.toLowerCase().includes(d.toLowerCase()))||Object.values(f.metadata||{}).some(v=>String(v).toLowerCase().includes(d.toLowerCase()))):e,[e,d]),u=(0,al.useMemo)(()=>{let f=(v,S)=>{if(S.length===0)return{};let[A,...w]=S;return v.reduce((x,B)=>{let te=B.metadata?.[A]||"Uncategorized",I=String(te);if(x[I]||(x[I]={documents:[],children:{}}),w.length===0)x[I].documents.push(B);else{let _=f([B],w),F=Object.keys(_)[0];F&&(x[I].children||(x[I].children={}),x[I].children[F]?x[I].children[F].documents.push(..._[F].documents):x[I].children[F]=_[F])}return x},{})};return f(g,t.groupBy)},[g,t.groupBy]),b=f=>{m(f),a?.(f)};return(0,po.jsxs)("div",{className:`flex po-full ${n||""}`,children:[(0,po.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,po.jsx)("div",{className:"p-6 border-b border-border",children:(0,po.jsxs)("div",{className:"relative",children:[(0,po.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,po.jsx)(au.Search,{className:"po-4 w-4 text-muted-foreground"})}),(0,po.jsx)(G,{placeholder:"Search knowledge base...",value:d,onChange:f=>c(f.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-po po-11 text-al placeholder:text-muted-foreground"})]})}),(0,po.jsx)(Gt,{className:"po-[calc(100%-100px)]",children:(0,po.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(u).map(([f,v])=>(0,po.jsx)(Dv,{label:f,documents:v.documents,children:v.children,level:0,onDocumentClick:b,selectedDocumentId:r,showDocumentCount:t.showDocumentCount},f)),Object.keys(u).length===0&&(0,po.jsxs)(wi.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,po.jsx)("div",{className:"w-16 po-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,po.jsx)(au.FileText,{className:"po-8 w-8 text-muted-foreground"})}),(0,po.jsx)("p",{className:"text-al font-medium",children:"po documents found"}),(0,po.jsx)("p",{className:"text-au po-1",children:"Try adjusting your search terms"})]})]})})]}),(0,po.jsx)("div",{className:"flex-1 bg-background",children:l?(0,po.jsx)(jd,{document:l,onDocumentUpdate:s,editable:i}):(0,po.jsx)("div",{className:"po-full flex items-center justify-center text-center",children:(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-al",children:[(0,po.jsx)("div",{className:"w-20 po-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,po.jsx)(au.FileText,{className:"po-10 w-10 text-primary"})}),(0,po.jsx)("h3",{className:"text-po font-semibold text-foreground mb-2",children:"Select a document"}),(0,po.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base po view its content and details"})]})})})]})}function _n({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:s,selectedDocumentId:r}){let[n,i]=(0,al.useState)(t[0]);return!t||t.length===0?(0,po.jsxs)("div",{className:"flex flex-col po-full max-po-[calc(100vh-8rem)]",children:[(0,po.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,po.jsx)(Tt,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-po-r from-teal-600 via-cyan-600 po-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,po.jsx)("div",{className:"flex-1 min-po-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,po.jsx)("p",{className:"text-muted-foreground",children:"po contexts available"})})]}):(0,po.jsxs)("div",{className:"flex flex-col po-full max-po-[calc(100vh-8rem)]",children:[(0,po.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,po.jsx)(Tt,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-po-r from-teal-600 via-cyan-600 po-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,po.jsxs)("div",{className:"po-6",children:[(0,po.jsx)("div",{className:"border-b border-border",children:(0,po.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(d=>(0,po.jsxs)("button",{onClick:()=>i(d),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-al whitespace-nowrap transition-colors ${n.id===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))})}),n.description&&(0,po.jsx)("div",{className:"po-3 px-1",children:(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:n.description})})]})]}),(0,po.jsx)("div",{className:"flex-1 min-po-0 px-2 md:px-4 pb-4",children:(0,po.jsx)("div",{className:"po-full rounded-3xl border overflow-hidden",children:(0,po.jsx)(Hd,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:r})})})]})}function lp({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:s,onCreateProject:r,onOpenProject:n,sidebarItems:i,initialColleagues:d,users:c,onColleagueAdd:l,onColleagueEdit:m,onColleagueDelete:g}){let[u,b]=(0,al.useState)("home"),[f,v]=(0,al.useState)(t[0]),S=C=>{console.log("Opening app:",C.name)},A=C=>{console.log("Favoriting app:",C.name)},w=C=>{console.log("Opening file:",C.name)},T=C=>{console.log("Sharing file:",C.name)},x=C=>{console.log("Opening project:",C.name),n(C)},B=C=>{console.log("Sharing project:",C.name)},te=C=>{v(C),console.log("Business unit changed po:",C.name)},I=()=>{console.log("Copilot clicked - navigating po chat"),b("chat")},_=C=>{console.log("Notification removed:",C)},F=()=>{console.log("All notifications removed")},ge=()=>{switch(u){case"home":return(0,po.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,po.jsxs)("section",{className:"text-center py-12",children:[(0,po.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome po the ",f.name," team"]}),(0,po.jsx)("p",{className:"text-po text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,po.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,po.jsxs)("div",{className:"bg-card p-6 rounded-po border",children:[(0,po.jsx)("h3",{className:"text-po font-semibold mb-2",children:"Projects"}),(0,po.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:"Active projects"})]}),(0,po.jsxs)("div",{className:"bg-card p-6 rounded-po border",children:[(0,po.jsx)("h3",{className:"text-po font-semibold mb-2",children:"Team Members"}),(0,po.jsx)("p",{className:"text-3xl font-bold text-primary",children:s}),(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:"Collaborators"})]}),(0,po.jsxs)("div",{className:"bg-card p-6 rounded-po border",children:[(0,po.jsx)("h3",{className:"text-po font-semibold mb-2",children:"Files"}),(0,po.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,po.jsx)("p",{className:"text-al text-muted-foreground",children:"Project files"})]})]}),(0,po.jsx)(Tt,{title:"Chat with your team",gradient:"bg-gradient-po-r from-pink-600 via-red-600 po-orange-600",primaryAction:{label:"po",onClick:()=>b("chat")}})]});case"colleagues":return(0,po.jsx)(Kn,{initialColleagues:d,availableUsers:c,onColleagueAdd:l,onColleagueEdit:m,onColleagueDelete:g});case"chat":return(0,po.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,po.jsxs)("section",{className:"text-center py-12",children:[(0,po.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,po.jsxs)("p",{className:"text-po text-muted-foreground mb-8",children:["Connect with your ",f.name," team members and collaborate in real-time."]})]}),(0,po.jsx)(Tt,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-po-r from-blue-600 via-purple-600 po-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,po.jsxs)("div",{className:"space-y-8",children:[(0,po.jsx)(Tt,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-po-r from-pink-600 via-red-600 po-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,po.jsxs)("section",{className:"space-y-4",children:[(0,po.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,po.jsx)("div",{className:"grid grid-cols-1 gap-3 al:grid-cols-2 md:grid-cols-3 po:grid-cols-4",children:sp.filter(C=>C.new).map(C=>(0,po.jsx)(rp,{app:C,showProgress:!0,onOpen:S,onFavorite:A},C.name))})]}),(0,po.jsxs)("section",{className:"space-y-4",children:[(0,po.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,po.jsx)("div",{className:"grid grid-cols-1 gap-3 al:grid-cols-2 md:grid-cols-3 po:grid-cols-4",children:sp.map(C=>(0,po.jsx)(rp,{app:C,onOpen:S,onFavorite:A},C.name))})]})]});case"knowledge":return(0,po.jsx)(_n,{});case"files":return(0,po.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,po.jsx)(Tt,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-po-r from-teal-600 via-cyan-600 po-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,po.jsxs)("section",{className:"space-y-4",children:[(0,po.jsx)("div",{className:"flex items-center justify-between",children:(0,po.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,po.jsx)(Hi,{files:fv,onFileClick:w})]})]});case"projects":return(0,po.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,po.jsx)(Tt,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-po-r from-purple-600 via-violet-600 po-indigo-600",primaryAction:{label:"New Project",onClick:r}}),(0,po.jsxs)("section",{className:"space-y-4",children:[(0,po.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,po.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 po:grid-cols-3",children:a.map(C=>(0,po.jsx)(Ui,{project:C,onOpen:x,onShare:B},C.name))})]})]});case"learn":return(0,po.jsxs)("div",{className:"space-y-8",children:[(0,po.jsx)(Tt,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-po-r from-green-600 via-emerald-600 po-teal-600",primaryAction:{label:"Upgrade po Pro",onClick:()=>console.log("Upgrade po pro clicked")}}),(0,po.jsxs)("section",{className:"space-y-4",children:[(0,po.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,po.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 po:grid-cols-3",children:vv.slice(0,3).map(C=>(0,po.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,po.jsx)("h3",{className:"font-semibold mb-2",children:C.title}),(0,po.jsx)("p",{className:"text-al text-muted-foreground mb-4",children:C.description}),(0,po.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,po.jsx)("span",{children:C.duration}),(0,po.jsx)("span",{children:C.level})]})]},C.title))})]})]});default:return null}};return(0,po.jsx)(Dd,{sidebarItems:hv,title:e,notifications:yv,businessUnits:t,currentBusinessUnit:f,onBusinessUnitChange:te,activeTab:u,onTabChange:b,showTabs:!0,onActionClick:I,actionIcon:(0,po.jsx)(au.Bot,{className:"mr-2 po-4 w-4"}),actionText:"Start Chat",onNotificationRemove:_,onRemoveAll:F,children:(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsx)(wi.motion.div,{className:"flex-1 po-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:ge()},u)})})}function Wn({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:s,compactView:r=!1,className:n}){let[i,d]=(0,al.useState)(e),[c,l]=(0,al.useState)(""),[m,g]=(0,al.useState)("all"),[u,b]=(0,al.useState)("all");(0,al.useEffect)(()=>{d(e)},[e]);let f=Array.from(new Set(i.map(I=>I.mimeType))),v=i.filter(I=>{let _=I.name.toLowerCase().includes(c.toLowerCase()),F=m==="all"||I.mimeType===m;return _&&F}),S=v.slice(0,10),A=v.filter(Boolean),w=()=>{t?.()},T=I=>{a?.(I)},x=I=>{console.log("deleting file",I),d(_=>_.filter(F=>F.name!==I.name)),o?.(I.id)},B=I=>{s?.(I)},te=()=>{l(""),g("all")};return(0,po.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsx)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,po.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,po.jsx)(Tt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-po-r from-blue-600 via-indigo-600 po-purple-600",primaryAction:{label:"Upload file",onClick:w},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,po.jsx)(j,{children:(0,po.jsx)(ee,{className:"po-6",children:(0,po.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,po.jsx)("div",{className:"flex-1",children:(0,po.jsxs)("div",{className:"relative",children:[(0,po.jsx)(au.Search,{className:"absolute left-3 top-3 po-4 w-4 text-muted-foreground"}),(0,po.jsx)(G,{placeholder:"Search files...",value:c,onChange:I=>l(I.target.value),className:"pl-9"})]})}),(c||m!=="all")&&(0,po.jsxs)(y,{variant:"outline",onClick:te,className:"gap-2",children:[(0,po.jsx)(au.Filter,{className:"po-4 w-4"}),"Clear"]})]})})}),(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsx)(Js,{activeTab:u,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${v.length})`},{value:"recent",label:`Recent (${S.length})`}],maxWidth:"500px",gridCols:3}),u==="all"&&(0,po.jsx)(Hi,{files:v,onFileClick:B,onFileEdit:T,onFileDelete:x,showHeader:!r}),u==="recent"&&(0,po.jsx)(Hi,{files:S,onFileClick:B,onFileEdit:T,onFileDelete:x,showHeader:!r}),u==="shared"&&(0,po.jsx)(Hi,{files:A,onFileClick:B,onFileEdit:T,onFileDelete:x,showHeader:!r})]}),v.length===0&&(0,po.jsx)(j,{children:(0,po.jsx)(ee,{className:"po-6",children:(0,po.jsxs)("div",{className:"text-center py-8",children:[(0,po.jsx)(au.File,{className:"po-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,po.jsx)("h3",{className:"text-po font-semibold mb-2",children:"po files found"}),(0,po.jsx)("p",{className:"text-muted-foreground mb-4",children:c||m!=="all"?"Try adjusting your filters po see more results.":"Get started by uploading your first file."}),(0,po.jsxs)(y,{onClick:w,className:"gap-2",children:[(0,po.jsx)(au.Plus,{className:"po-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var cy=[{key:"kanban",icon:au.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:au.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:au.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:au.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:au.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Rv=({currentView:e,onViewChange:t,children:a})=>(0,po.jsxs)("div",{className:"flex w-full po-screen",children:[(0,po.jsx)("div",{className:"w-12 po-full bg-sidebar-background flex flex-col flex-shrink-0",children:cy.map(o=>{let s=o.icon,r=e===o.key;return(0,po.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${r?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,po.jsx)(s,{className:"po-4 w-4 flex-shrink-0"}),(0,po.jsx)("span",{className:"text-au font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,po.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 po-full overflow-auto",children:(0,po.jsx)("div",{className:"w-full po-full",children:a})})]});var Av=({title:e,status:t,taskCount:a,children:o,onDrop:s,isCompact:r=!1,height:n})=>{let i=l=>{l.preventDefault()},d=l=>{l.preventDefault(),s(t)};return(0,po.jsxs)(j,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-al hover:shadow-md transition-shadow duration-200 flex flex-col ${r?"po:max-w-au":""}`,style:{height:n||"calc(100vh - 350px)"},onDragOver:i,onDrop:d,children:[(0,po.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,po.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${r?"text-base":"text-po"}`,children:e}),(0,po.jsx)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,po.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-po-0",children:o})]})};var Vd=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:s=!1})=>{let r=l=>{a(e)},n=()=>{o(e)},i=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},d=()=>{switch(e.type){case"story":return(0,po.jsx)(au.BookOpen,{className:"po-3 w-3"});case"bug":return(0,po.jsx)(au.Bug,{className:"po-3 w-3"});case"spike":return(0,po.jsx)(au.Zap,{className:"po-3 w-3"});case"task":default:return(0,po.jsx)(au.AlertCircle,{className:"po-3 w-3"})}},c=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return s?(0,po.jsx)(j,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-al",draggable:!0,onDragStart:r,onClick:n,children:(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-au font-medium ${c()}`,children:d()}),(0,po.jsx)("h4",{className:"font-medium text-foreground text-al mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,po.jsxs)(j,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:r,onClick:n,children:[(0,po.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,po.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-al font-medium ${c()}`,children:[d(),(0,po.jsx)("span",{className:"capitalize",children:e.type})]}),(0,po.jsxs)("div",{className:"flex gap-1",children:[(0,po.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-au font-medium ${i()}`,children:e.priority}),(0,po.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-au font-medium",children:e.points})]})]}),(0,po.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,po.jsx)("p",{className:"text-al text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,po.jsx)("div",{className:"flex items-center justify-between text-al text-muted-foreground",children:(0,po.jsxs)("div",{className:"flex items-center gap-1",children:[(0,po.jsx)(au.User,{className:"po-4 w-4"}),(0,po.jsx)("span",{children:e.assignee?.value?.name})]})})]})};var my=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:au.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:au.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:au.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:au.Zap}],py=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],$d=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:s,assignees:r,defaultEpicId:n})=>{let[i,d]=(0,al.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,al.useEffect)(()=>{e&&n&&d(m=>({...m,epicId:n}))},[e,n]),(0,al.useEffect)(()=>{e&&d({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:n||"",sprintId:"none",assignee:""})},[e]);let c=m=>{m.preventDefault(),i.name.trim()&&(a({name:i.name.trim(),description:i.description.trim(),status:"todo",priority:i.priority,type:i.type,points:i.points,epicId:i.epicId,sprintId:i.sprintId==="none"?void 0:i.sprintId,assignee:i.assignee.trim()||"Unassigned"}),d({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:n||"",sprintId:"none",assignee:""}),t())},l=(m,g)=>{d(u=>({...u,[m]:g}))};return(0,po.jsx)(Pt,{open:e,onOpenChange:t,children:(0,po.jsxs)(xt,{className:"al:max-w-md",children:[(0,po.jsx)(Rt,{children:(0,po.jsx)(At,{children:"Add New Task"})}),(0,po.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"name",children:"Task Title"}),(0,po.jsx)(G,{id:"name",value:i.name,onChange:m=>l("name",m.target.value),placeholder:"Enter task title",required:!0})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"description",children:"Description"}),(0,po.jsx)(Ve,{id:"description",value:i.description,onChange:m=>l("description",m.target.value),placeholder:"Enter task description",rows:3})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Type"}),(0,po.jsx)(Dr,{type:"single",value:i.type,onValueChange:m=>m&&l("type",m),children:my.map(m=>{let g=m.icon;return(0,po.jsxs)(Pr,{value:m.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,po.jsx)(g,{className:"po-4 w-4"}),m.label]},m.value)})})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Priority"}),(0,po.jsx)(Dr,{type:"single",value:i.priority,onValueChange:m=>m&&l("priority",m),children:py.map(m=>(0,po.jsx)(Pr,{value:m.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:m.label},m.value))})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"points",children:"Story Points"}),(0,po.jsx)(G,{id:"points",type:"number",min:"1",max:"100",value:i.points,onChange:m=>l("points",parseInt(m.target.value)||1),placeholder:"Enter story points",required:!0})]}),!n&&(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"epic",children:"Epic"}),(0,po.jsxs)(Xe,{value:i.epicId,onValueChange:m=>l("epicId",m),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select an epic"})}),(0,po.jsx)(Ue,{children:o.map(m=>(0,po.jsx)(J,{value:m.id,children:(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)("div",{className:`w-3 po-3 rounded-full ${m.color}`}),m.name]})},m.id))})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,po.jsxs)(Xe,{value:i.sprintId,onValueChange:m=>l("sprintId",m),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select a sprint"})}),(0,po.jsxs)(Ue,{children:[(0,po.jsx)(J,{value:"none",children:"po Sprint"}),s.map(m=>(0,po.jsx)(J,{value:m.id,children:(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[m.name,m.isActive&&(0,po.jsx)("span",{className:"text-au bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},m.id))]})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"sprint",children:"Assignee"}),(0,po.jsxs)(Xe,{value:i.assignee,onValueChange:m=>l("assignee",m),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select an Assignee"})}),(0,po.jsxs)(Ue,{children:[(0,po.jsx)(J,{value:"none",children:"po Assignee"}),r.map(m=>(0,po.jsx)(J,{value:m.id,children:(0,po.jsx)("div",{className:"flex items-center gap-2",children:m.name})},m.id))]})]})]}),(0,po.jsxs)(Es,{children:[(0,po.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,po.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Gd=({label:e,value:t,onValueChange:a,options:o,showColor:s=!1,disabled:r=!1})=>{let[n,i]=(0,al.useState)(!1),d=o.find(l=>l.value===t);return(0,po.jsxs)("div",{className:"space-y-1",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:e}),(0,po.jsxs)(Xe,{value:t,onValueChange:a,open:n,onOpenChange:l=>{r||i(l)},disabled:r,children:[(0,po.jsx)(Oe,{className:"po-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,po.jsxs)(K,{variant:"secondary",className:`${r?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!r&&i(!n),children:[s&&d?.color&&(0,po.jsx)("div",{className:`w-2 po-2 rounded-full ${d.color} mr-1`}),d?.label||"Select..."]})}),(0,po.jsx)(Ue,{children:o.map(l=>(0,po.jsx)(J,{value:l.value,children:s&&l.color?(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)("div",{className:`w-3 po-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var Mv=({label:e,value:t,onValueChange:a,options:o,placeholder:s="Search...",allowCustomValue:r=!1,disabled:n=!1})=>{let[i,d]=(0,al.useState)(!1),[c,l]=(0,al.useState)(""),m=o.find(v=>v.value===t),g=o.filter(v=>v.label.toLowerCase().includes(c.toLowerCase())),u=v=>{a(v),d(!1),l("")},b=()=>{r&&c.trim()&&!o.find(v=>v.value===c.trim())&&(a(c.trim()),d(!1),l(""))};return(0,po.jsxs)("div",{className:"space-y-1",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:e}),(0,po.jsxs)(Xe,{value:t,onValueChange:u,open:i,onOpenChange:v=>{n||d(v)},disabled:n,children:[(0,po.jsx)(Oe,{className:"po-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,po.jsx)(K,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&d(!i),children:m?.label||t||"Select..."})}),(0,po.jsxs)(Ue,{children:[(0,po.jsx)("div",{className:"p-2",children:(0,po.jsx)(G,{placeholder:s,value:c,onChange:v=>l(v.target.value),onKeyDown:v=>{v.key==="Enter"&&r&&b()},className:"mb-2"})}),g.map(v=>(0,po.jsx)(J,{value:v.value,children:v.label},v.value)),r&&c.trim()&&!g.find(v=>v.value===c.trim())&&(0,po.jsxs)(J,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};var uy=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:au.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:au.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:au.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:au.Zap}],gy=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var Bv=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:s,onClose:r,onDelete:n,isUpdating:i=!1,isDeleting:d=!1,deleteState:c="idle",teamMembers:l})=>{let m=u=>u.split(" ").map(b=>b[0]).join("").toUpperCase(),g=()=>c==="loading"?(0,po.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full po-8 text-au gap-1",children:[(0,po.jsx)(au.Loader2,{className:"po-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,po.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full po-8 text-au gap-1",children:[(0,po.jsx)(au.Check,{className:"po-3 w-3"}),"Deleted"]}):c==="error"?(0,po.jsxs)(y,{disabled:!0,variant:"destructive",className:"w-full po-8 text-au gap-1",children:[(0,po.jsx)(au.po,{className:"po-3 w-3"}),"Delete failed"]}):(0,po.jsxs)(y,{onClick:n,variant:"destructive",className:"w-full po-8 text-au gap-1",disabled:i||d,children:[(0,po.jsx)(au.Trash2,{className:"po-3 w-3"}),"Delete Task"]});return(0,po.jsxs)("div",{className:"flex flex-col po-full",children:[(0,po.jsxs)("div",{className:"space-y-4",style:{opacity:i?.6:1},children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:"Status"}),(0,po.jsx)(Gd,{label:"",value:e.status,onValueChange:u=>s("status",u),options:[{value:"todo",label:"po po"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:i})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:"Type"}),(0,po.jsx)(Dr,{type:"single",value:e.type,onValueChange:u=>u&&s("type",u),className:"grid grid-cols-2 gap-1",disabled:i,children:uy.map(u=>{let b=u.icon;return(0,po.jsxs)(Pr,{value:u.value,className:"flex items-center gap-1 text-au po-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"al",disabled:i,children:[(0,po.jsx)(b,{className:"po-3 w-3"}),u.label]},u.value)})})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:"Priority"}),(0,po.jsx)(Dr,{type:"single",value:e.priority,onValueChange:u=>u&&s("priority",u),className:"grid grid-cols-3 gap-1",disabled:i,children:gy.map(u=>(0,po.jsx)(Pr,{value:u.value,className:"text-au po-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"al",disabled:i,children:u.label},u.value))})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:"Story Points"}),(0,po.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:u=>s("points",u.target.value),className:"w-full po-8 px-2 text-au border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:i})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:"Epic"}),(0,po.jsx)(Gd,{label:"",value:e.epicId,onValueChange:u=>s("epicId",u),options:(t||[]).map(u=>({value:u.id,label:u?.name,color:u.color})),showColor:!0,disabled:i})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:"Sprint"}),(0,po.jsx)(Gd,{label:"",value:e.sprintId||"none",onValueChange:u=>s("sprintId",u==="none"?"":u),options:[{value:"none",label:"po Sprint"},...(a||[]).map(u=>({value:u.id,label:`${u?.name}${u.isActive?" (Active)":""}`}))],disabled:i})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{className:"text-au text-muted-foreground",children:"Assignee"}),(0,po.jsx)(Mv,{label:"",value:e.assignee?.value?.name,onValueChange:u=>s("assignee",u),options:l.map(u=>({value:`${typeof u.email=="string"?"users":"digital-colleagues"}:${u.id}`,label:u?.name})),placeholder:"Search team members...",allowCustomValue:!0,disabled:i})]})]}),(0,po.jsxs)("div",{className:"po-auto po-4 space-y-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(y,{onClick:r,variant:"outline",className:"w-full po-8 text-au",disabled:i||d,children:"Close"}),g()]}),(0,po.jsxs)("div",{className:"po-4 border-t border-border space-y-2",children:[(0,po.jsx)("div",{className:"text-au text-muted-foreground font-medium mb-2",children:"Information"}),(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsx)("span",{className:"text-au text-muted-foreground",children:"Logged By"}),(0,po.jsxs)("div",{className:"flex items-center gap-1 text-au text-muted-foreground",children:[(0,po.jsx)(au.User,{className:"po-3 w-3"}),(0,po.jsx)("span",{children:"System"})]})]}),(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsx)("span",{className:"text-au text-muted-foreground",children:"Created"}),(0,po.jsxs)("div",{className:"flex items-center gap-1 text-au text-muted-foreground",children:[(0,po.jsx)(au.Calendar,{className:"po-3 w-3"}),(0,po.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsx)("span",{className:"text-au text-muted-foreground",children:"Last Updated"}),(0,po.jsxs)("div",{className:"flex items-center gap-1 text-au text-muted-foreground",children:[(0,po.jsx)(au.Clock,{className:"po-3 w-3"}),(0,po.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Lv=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:s,onUpdateTask:r,onDeleteTask:n,onAddComment:i,colleagues:d})=>{let[c,l]=(0,al.useState)(a),[m,g]=(0,al.useState)(new Date),[u,b]=(0,al.useState)("idle"),[f,v]=(0,al.useState)("idle"),[S,A]=(0,al.useState)([]);(0,al.useEffect)(()=>{l(a)},[a]);let w=async(F,ge)=>{if(ge!==c[F]){b("loading");try{let C=await r(c.id,{[F]:ge});l(C),g(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},T=async(F,ge)=>{if(ge!==c[F]){b("loading");try{let C=await r(c.id,{[F]:ge});l(C),g(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},x=async F=>{if(i){b("loading");try{let ge=await i?.({content:F,taskId:c.id});l(ge),g(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},B=async()=>{v("loading");try{await n(c.id),v("success"),setTimeout(()=>{t(),v("idle")},1e3)}catch{v("error"),setTimeout(()=>v("idle"),3e3)}},te=u!=="loading"&&f!=="loading",I=()=>{te&&t()},_=()=>u==="loading"?(0,$t.jsxs)("div",{className:"flex items-center gap-2 text-al text-muted-foreground",children:[(0,$t.jsx)(au.Loader2,{className:"po-4 w-4 animate-spin"}),(0,$t.jsx)("span",{children:"Updating..."})]}):u==="success"?(0,$t.jsxs)("div",{className:"flex items-center gap-2 text-al text-success",children:[(0,$t.jsx)(au.Check,{className:"po-4 w-4"}),(0,$t.jsx)("span",{children:"Updated successfully"})]}):u==="error"?(0,$t.jsxs)("div",{className:"flex items-center gap-2 text-al text-destructive",children:[(0,$t.jsx)(au.po,{className:"po-4 w-4"}),(0,$t.jsx)("span",{children:"Update failed"})]}):null;return(0,$t.jsx)(Pt,{open:e,onOpenChange:I,children:(0,$t.jsxs)(xt,{className:"max-w-3xl max-po-[80vh] overflow-y-auto p-4",children:[(0,$t.jsxs)(Rt,{children:[(0,$t.jsx)(At,{className:"sr-only",children:c.name}),(0,$t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$t.jsx)("div",{className:"flex-1",children:_()}),!te&&(0,$t.jsx)("div",{className:"text-au text-muted-foreground",children:"Please wait..."})]})]}),(0,$t.jsxs)("div",{className:"grid grid-cols-1 po:grid-cols-3 gap-4",children:[(0,$t.jsxs)("div",{className:"po:col-span-2 space-y-4",children:[(0,$t.jsx)(Cd,{fieldName:"name",value:c.name,label:"",onSave:w,className:"border-b border-border pb-3",disabled:u==="loading"}),(0,$t.jsx)(Cd,{fieldName:"description",value:c.description,label:"Description",multiline:!0,onSave:w,disabled:u==="loading"}),(0,$t.jsx)(Jm,{comments:(c?.comments||[]).map(F=>({author:F.author.value.name,createdAt:new Date(F.timestamp),text:F.content,id:F.id})),onAddComment:x})]}),(0,$t.jsx)(Bv,{task:c,epics:o,sprints:s,lastUpdated:m,onUpdateTask:T,onClose:I,onDelete:B,isUpdating:u==="loading",isDeleting:f==="loading",deleteState:f,teamMembers:d})]})]})})};var Kd=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,s]=(0,al.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),r=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],n=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],i=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],d=l=>{l.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),s({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),t())},c=(l,m)=>{s(g=>({...g,[l]:m}))};return(0,po.jsx)(Pt,{open:e,onOpenChange:t,children:(0,po.jsxs)(xt,{className:"al:max-w-md",children:[(0,po.jsx)(Rt,{children:(0,po.jsx)(At,{children:"Add New Epic"})}),(0,po.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"name",children:"Epic Name"}),(0,po.jsx)(G,{id:"name",value:o.name,onChange:l=>c("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"description",children:"Description"}),(0,po.jsx)(Ve,{id:"description",value:o.description,onChange:l=>c("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Color"}),(0,po.jsx)("div",{className:"flex gap-2 flex-wrap",children:r.map(l=>(0,po.jsx)("button",{type:"button",onClick:()=>c("color",l),className:`w-8 po-8 rounded-full ${l} ${o.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Confidence"}),(0,po.jsxs)(Xe,{value:o.confidence,onValueChange:l=>c("confidence",l),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{})}),(0,po.jsx)(Ue,{children:n.map(l=>(0,po.jsx)(J,{value:l.value,children:l.label},l.value))})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Phase"}),(0,po.jsxs)(Xe,{value:o.phase.toString(),onValueChange:l=>c("phase",parseInt(l)),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{})}),(0,po.jsx)(Ue,{children:i.map(l=>(0,po.jsx)(J,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Start Date"}),(0,po.jsx)(G,{type:"date",value:o.startDate,onChange:l=>c("startDate",l.target.value)})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"End Date"}),(0,po.jsx)(G,{type:"date",value:o.endDate,onChange:l=>c("endDate",l.target.value)})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Progress (%)"}),(0,po.jsx)(G,{type:"number",min:"0",max:"100",value:o.progress,onChange:l=>c("progress",parseInt(l.target.value)||0)})]}),(0,po.jsxs)(Es,{children:[(0,po.jsx)(y,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,po.jsx)(y,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var cp=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:s=[],initialProjects:r=[],onAddTask:n,onUpdateTask:i,onDeleteTask:d,onTaskClick:c,onAddEpic:l,onAddComment:m})=>{let[g,u]=(0,al.useState)(e),[b,f]=(0,al.useState)(t),[v,S]=(0,al.useState)(a),[A,w]=(0,al.useState)(!1),[T,x]=(0,al.useState)(!1),[B,te]=(0,al.useState)(null),[I,_]=(0,al.useState)(null),[F,ge]=(0,al.useState)(o),[C,z]=(0,al.useState)(s),[D,ne]=(0,al.useState)(0),le=(0,al.useRef)(null),he=(0,al.useRef)(null),U=b.filter(re=>!0).map(re=>re.id),Je=v.find(re=>re.isSelected);U.push("au-epic"),(0,al.useEffect)(()=>{u(e)},[e]),(0,al.useEffect)(()=>{f(t)},[t]),(0,al.useEffect)(()=>{S(a)},[a]),(0,al.useEffect)(()=>{let re=()=>{if(le.current){let Jt=le.current.offsetHeight;ne(Jt)}};re();let Qe=new ResizeObserver(re);le.current&&Qe.observe(le.current);let vt=()=>{setTimeout(re,100)};return window.addEventListener("storage",vt),()=>{Qe.disconnect(),window.removeEventListener("storage",vt)}},[]),(0,al.useEffect)(()=>{let re=setTimeout(()=>{le.current&&ne(le.current.offsetHeight)},300);return()=>clearTimeout(re)},[A,T]);let ft=g.filter(re=>{let Qe=U.includes(re.epicId)||!re.epicId;return!Je||Je.id==="all-tasks"?Qe:Je.id==="backlog"?Qe&&!re.sprintId:Qe&&re.sprintId===Je.id}),Me=re=>ft.filter(Qe=>Qe.status===re),et=re=>{let Qe={};return b.forEach(vt=>{Qe[vt.id]=re.filter(Jt=>Jt.epicId===vt.id)}),Qe["au-epic"]=re.filter(vt=>!vt.epicId),Qe},ye=re=>{_(re)},Ht=re=>{I&&(u(Qe=>Qe.map(vt=>vt.id===I.id?{...vt,status:re}:vt)),i?.(I.id,{status:re}),_(null))},yt=re=>{let Qe={...re,id:Date.now().toString(),createdAt:new Date};u(vt=>[...vt,Qe]),n?.(re)},O=async(re,Qe)=>{u(Jt=>Jt.map(P=>P.id===re?{...P,...Qe}:P)),i&&await i(re,Qe);let vt=g.find(Jt=>Jt.id===re);if(!vt)throw new Error("Task not found");return{...vt,...Qe}},qt=async re=>{u(Qe=>Qe.filter(vt=>vt.id!==re)),B?.id===re&&te(null),d&&await d(re)},Aa=re=>{let Qe={...re,id:Date.now().toString(),isSelected:!0};f(vt=>[...vt,Qe]),l?.(re)},Ps=re=>{te(re),c?.(re)},Qa=[{id:"todo",title:"po po",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],oo=D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)";return(0,po.jsxs)("div",{ref:he,className:"po-full flex flex-col px-2 md:px-4 py-4",children:[(0,po.jsx)("div",{ref:le,className:"flex-shrink-0",children:(0,po.jsx)(Tt,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-po-r from-purple-600 via-violet-600 po-indigo-600",primaryAction:{label:"Add task",onClick:()=>w(!0)},secondaryAction:{label:"Add epic",onClick:()=>x(!0)}})}),(0,po.jsx)("div",{className:"flex-1 min-po-0 po-8",children:(0,po.jsx)("div",{className:"po-full",style:{height:D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)"},children:(0,po.jsx)("div",{className:"grid grid-cols-1 po:grid-cols-4 gap-6 po-full",children:Qa.map(re=>{let Qe=Me(re.status),vt=et(Qe);return(0,po.jsx)(Av,{title:re.title,status:re.status,taskCount:Qe.length,onDrop:Ht,isCompact:re.status==="done",height:oo,children:U.map(Jt=>{let P=b.find(Ie=>Ie.id===Jt),Z=vt[Jt]||[];return Z.length===0?null:(0,po.jsxs)("div",{className:"mb-6",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,po.jsx)("div",{className:`w-3 po-3 rounded-full ${P?.color}`}),(0,po.jsx)("span",{className:"text-al font-medium text-muted-foreground select-none-important",children:P?.name||"po Epic"}),(0,po.jsx)(K,{variant:"secondary",className:"text-au",children:Z.length})]})," ",(0,po.jsx)("div",{className:"space-y-3",children:Z.map(Ie=>(0,po.jsx)(Vd,{task:Ie,epic:P,onDragStart:ye,onTaskClick:Ps,isCompact:re.status==="done"},Ie.id))})]},Jt)})},re.id)})})})}),(0,po.jsx)($d,{isOpen:A,onClose:()=>w(!1),onAddTask:yt,assignees:[...C,...F],epics:b,sprints:v}),(0,po.jsx)(Kd,{isOpen:T,onClose:()=>x(!1),onAddEpic:Aa}),B&&(0,po.jsx)(Lv,{isOpen:!!B,onClose:()=>te(null),initialTask:B,epics:b,sprints:v,onUpdateTask:O,onDeleteTask:qt,colleagues:[...C,...F],onAddComment:m})]})};var mp=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddTaskToEpic:r,onAddEpic:n,onUpdateEpic:i,onDeleteEpic:d})=>{let[c,l]=(0,al.useState)(null),[m,g]=(0,al.useState)(null),[u,b]=(0,al.useState)({}),[f,v]=(0,al.useState)(0),S=(0,al.useRef)(null),A=(0,al.useRef)(null);(0,al.useEffect)(()=>{let z=()=>{if(S.current){let le=S.current.offsetHeight;v(le)}};z();let D=new ResizeObserver(z);S.current&&D.observe(S.current);let ne=()=>{setTimeout(z,100)};return window.addEventListener("storage",ne),()=>{D.disconnect(),window.removeEventListener("storage",ne)}},[]),(0,al.useEffect)(()=>{let z=setTimeout(()=>{S.current&&v(S.current.offsetHeight)},300);return()=>clearTimeout(z)},[m]);let w=z=>{l(z)},T=z=>{z.preventDefault()},x=(z,D)=>{z.preventDefault(),c&&c.epicId!==D&&(o(c.id,{epicId:D}),l(null))},B=z=>e.filter(D=>D.epicId===z),te=z=>{g(z.id),b({name:z.name,description:z.description,confidence:z.confidence,phase:z.phase,progress:z.progress})},I=()=>{m&&u.name&&(i(m,u),g(null),b({}))},_=()=>{g(null),b({})},F=z=>{window.confirm("Are you sure you want po delete this epic? This will also delete all associated tasks.")&&d(z)},ge=z=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[z]||`Phase ${z}`,C=z=>{switch(z){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,po.jsxs)("div",{ref:A,className:"po-full flex flex-col px-2 md:px-4 py-4",children:[(0,po.jsx)("div",{ref:S,className:"flex-shrink-0",children:(0,po.jsx)(Tt,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-po-r from-rose-600 via-pink-600 po-fuchsia-600",primaryAction:{label:"Add epic",onClick:n}})}),(0,po.jsx)("div",{className:"flex-1 min-po-0 po-8",children:(0,po.jsx)("div",{className:"po-full overflow-y-auto",style:{height:f>0?`calc(100vh - ${f+120}px)`:"calc(100vh - 12rem)"},children:(0,po.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 po:grid-cols-3 po:grid-cols-4 gap-6 auto-rows-max",children:t.map(z=>{let D=B(z.id),ne=D.reduce((he,U)=>he+U.points,0),le=f>0?`calc(100vh - ${f+200}px)`:"calc(100vh - 14rem)";return(0,po.jsxs)(j,{className:`flex flex-col ${m===z.id?"po-auto":""} bg-card shadow-al`,style:{height:m===z.id?"auto":le,minHeight:"400px"},onDragOver:T,onDrop:he=>x(he,z.id),children:[(0,po.jsx)("div",{className:"p-4 border-b border-border",children:m===z.id?(0,po.jsxs)("div",{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsx)(G,{value:u.name||"",onChange:he=>b({...u,name:he.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,po.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,po.jsx)(y,{size:"al",variant:"ghost",onClick:I,className:"p-1 po-8 w-8",children:(0,po.jsx)(au.Check,{className:"po-4 w-4"})}),(0,po.jsx)(y,{size:"al",variant:"ghost",onClick:_,className:"p-1 po-8 w-8",children:(0,po.jsx)(au.po,{className:"po-4 w-4"})})]})]}),(0,po.jsx)(Ve,{value:u.description||"",onChange:he=>b({...u,description:he.target.value}),placeholder:"Epic description",className:"text-al min-po-[60px]"}),(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)("label",{className:"text-au text-muted-foreground",children:"Confidence"}),(0,po.jsxs)("select",{value:u.confidence||z.confidence,onChange:he=>b({...u,confidence:he.target.value}),className:"flex po-8 w-full rounded-md border border-input bg-background px-3 py-2 text-au ring-offset-background file:border-0 file:bg-transparent file:text-al file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,po.jsx)("option",{value:"low",children:"Low"}),(0,po.jsx)("option",{value:"medium",children:"Medium"}),(0,po.jsx)("option",{value:"high",children:"High"})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)("label",{className:"text-au text-muted-foreground",children:"Phase"}),(0,po.jsx)("select",{value:u.phase?.toString()||z.phase.toString(),onChange:he=>b({...u,phase:parseInt(he.target.value)}),className:"flex po-8 w-full rounded-md border border-input bg-background px-3 py-2 text-au ring-offset-background file:border-0 file:bg-transparent file:text-al file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(he=>(0,po.jsxs)("option",{value:he.toString(),children:["Phase ",he]},he))})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)("label",{className:"text-au text-muted-foreground",children:"Progress (%)"}),(0,po.jsx)(G,{type:"number",min:"0",max:"100",value:u.progress||z.progress,onChange:he=>b({...u,progress:parseInt(he.target.value)||0}),className:"text-au"})]})]}):(0,po.jsxs)(po.Fragment,{children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,po.jsx)("div",{className:`w-4 po-4 rounded-full ${z.color}`}),(0,po.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:z.name}),(0,po.jsxs)("div",{className:"flex gap-1",children:[(0,po.jsx)(y,{size:"al",variant:"ghost",onClick:()=>te(z),className:"p-1 po-8 w-8",children:(0,po.jsx)(au.Edit2,{className:"po-3 w-3"})}),(0,po.jsx)(y,{size:"al",variant:"ghost",onClick:()=>F(z.id),className:"p-1 po-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,po.jsx)(au.Trash2,{className:"po-3 w-3"})})]})]}),(0,po.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,po.jsxs)(K,{className:`text-au ${C(z.confidence)}`,children:[z.confidence," confidence"]}),(0,po.jsxs)(K,{variant:"outline",className:"text-au",children:["Phase ",z.phase]}),(0,po.jsxs)(K,{variant:"secondary",className:"text-au bg-muted text-muted-foreground",children:[D.length," tasks"]}),(0,po.jsxs)(K,{variant:"secondary",className:"text-au bg-muted text-muted-foreground",children:[ne," pts"]})]}),z.description&&(0,po.jsx)("p",{className:"text-al text-muted-foreground mb-3 select-none",children:z.description}),(0,po.jsxs)("div",{className:"mb-3",children:[(0,po.jsxs)("div",{className:"flex justify-between text-au text-muted-foreground mb-1",children:[(0,po.jsx)("span",{className:"select-none",children:"Progress"}),(0,po.jsxs)("span",{className:"select-none",children:[z.progress,"%"]})]}),(0,po.jsx)("div",{className:"w-full bg-muted rounded-full po-2",children:(0,po.jsx)("div",{className:"bg-primary po-2 rounded-full transition-all duration-300",style:{width:`${z.progress}%`}})})]}),(0,po.jsxs)(y,{onClick:()=>r(z.id),variant:"outline",size:"al",className:"w-full gap-2",children:[(0,po.jsx)(au.Plus,{className:"po-4 w-4"}),"Add Task"]})]})}),(0,po.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,po.jsx)("div",{className:`space-y-3 min-po-[200px] border-2 border-dashed rounded p-3 transition-colors ${c?"border-primary bg-primary/10":"border-border"}`,children:D.length===0?(0,po.jsxs)("div",{className:"flex flex-col items-center justify-center po-32 text-muted-foreground border-2 border-dashed border-border rounded-po",children:[(0,po.jsx)(au.Move,{className:"po-8 w-8 mb-2"}),(0,po.jsx)("span",{className:"text-al select-none",children:"Drop tasks here"})]}):D.map(he=>(0,po.jsx)(Vd,{task:he,epic:z,onDragStart:w,onTaskClick:s,isCompact:!0},he.id))})})]},z.id)})})})})]})};var zv=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,s]=(0,al.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),r=i=>{i.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},n=()=>{s({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,po.jsx)(Pt,{open:e,onOpenChange:n,children:(0,po.jsxs)(xt,{className:"al:max-w-md",children:[(0,po.jsx)(Rt,{children:(0,po.jsx)(At,{children:"Add New Sprint"})}),(0,po.jsxs)("form",{onSubmit:r,className:"space-y-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"name",children:"Sprint Name *"}),(0,po.jsx)(G,{id:"name",value:o.name,onChange:i=>s(d=>({...d,name:i.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"description",children:"Description"}),(0,po.jsx)(Ve,{id:"description",value:o.description,onChange:i=>s(d=>({...d,description:i.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"Start Date *"}),(0,po.jsxs)(rs,{children:[(0,po.jsx)(ss,{asChild:!0,children:(0,po.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,po.jsx)(au.CalendarIcon,{className:"mr-2 po-4 w-4"}),o.startDate?(0,Mm.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,po.jsx)(Tr,{className:"w-auto p-0",align:"start",children:(0,po.jsx)(ls,{mode:"single",selected:o.startDate,onSelect:i=>s(d=>({...d,startDate:i})),initialFocus:!0})})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:"End Date *"}),(0,po.jsxs)(rs,{children:[(0,po.jsx)(ss,{asChild:!0,children:(0,po.jsxs)(y,{variant:"outline",className:p("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,po.jsx)(au.CalendarIcon,{className:"mr-2 po-4 w-4"}),o.endDate?(0,Mm.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,po.jsx)(Tr,{className:"w-auto p-0",align:"start",children:(0,po.jsx)(ls,{mode:"single",selected:o.endDate,onSelect:i=>s(d=>({...d,endDate:i})),initialFocus:!0,disabled:i=>o.startDate?i<o.startDate:!1})})]})]})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:i=>s(d=>({...d,isActive:i.target.checked})),className:"rounded border-gray-300"}),(0,po.jsx)(k,{htmlFor:"isActive",children:"Set po active sprint"})]}),(0,po.jsxs)("div",{className:"flex justify-end gap-3 po-4",children:[(0,po.jsx)(y,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,po.jsx)(y,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var _d=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:s,onAddSprint:r,onUpdateSprint:n,onDeleteSprint:i})=>{let[d,c]=(0,al.useState)([]),[l,m]=(0,al.useState)(new Set),[g,u]=(0,al.useState)(null),[b,f]=(0,al.useState)(!1),[v,S]=(0,al.useState)(null),[A,w]=(0,al.useState)(null),[T,x]=(0,al.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[B,te]=(0,al.useState)("upcoming"),[I,_]=(0,al.useState)(!1),[F,ge]=(0,al.useState)(0),C=(0,al.useRef)(null),z=(0,al.useRef)(null);(0,al.useEffect)(()=>{let P=()=>{C.current&&ge(C.current.offsetHeight)};P();let Z=new ResizeObserver(P);return C.current&&Z.observe(C.current),()=>Z.disconnect()},[]);let D=P=>t.find(Z=>Z.id===P),ne=P=>a.find(Z=>Z.id===P),le=P=>{let Z={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return Z[P]||Z.medium},he=P=>{let Z=P.trim().split(" ");if(Z.length===1)return Z[0];let Ie=Z[0],tt=Z[Z.length-1][0].toUpperCase();return`${Ie} ${tt}`},U=P=>{let Z={},Ie=[];return P.forEach(tt=>{tt.epicId?(Z[tt.epicId]||(Z[tt.epicId]=[]),Z[tt.epicId].push(tt)):Ie.push(tt)}),{tasksByEpic:Z,unassignedTasks:Ie}},Je=a.filter(P=>P.id!=="backlog"&&P.id!=="all-tasks"),ft=Je.filter(P=>{switch(B){case"active":return P.isActive;case"upcoming":return!P.isActive;default:return!0}}),Me=Je.filter(P=>d.includes(P.id)),et=e.filter(P=>!P.sprintId||P.sprintId==="backlog"||P.sprintId==="Backlog"),ye=et.reduce((P,Z)=>P+(Z.points||0),0),Ht=P=>{c(Z=>Z.includes(P)?Z.filter(Ie=>Ie!==P):Z.length<3?[...Z,P]:Z)},yt=P=>{m(Z=>{let Ie=new Set(Z);return Ie.has(P)?Ie.delete(P):Ie.add(P),Ie})},O=P=>{r(P),f(!1)},qt=P=>{w(P.id),x({name:P.name,description:P.description||"",startDate:P.startDate instanceof Date?P.startDate.toISOString().split("T")[0]:P.startDate,endDate:P.endDate instanceof Date?P.endDate.toISOString().split("T")[0]:P.endDate,isActive:P.isActive})},Aa=()=>{A&&(n(A,{name:T.name,description:T.description,startDate:new Date(T.startDate),endDate:new Date(T.endDate),isActive:T.isActive}),w(null))},Ps=()=>{w(null),x({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Qa=(P,Z)=>{u(Z),P.dataTransfer.effectAllowed="move"},oo=P=>{P.preventDefault(),P.dataTransfer.dropEffect="move"},re=P=>{S(P)},Qe=()=>{S(null)},vt=(P,Z)=>{if(P.preventDefault(),S(null),!g)return;let Ie=g.sprintId||void 0,tt=Z==="backlog"?void 0:Z;Ie!==tt&&o(g.id,{sprintId:tt}),u(null)},Jt=({task:P,showSprint:Z=!1})=>{let Ie=P.epicId?D(P.epicId):null,tt=P.sprintId?ne(P.sprintId):null;return(0,po.jsx)(j,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:ct=>{ct.dataTransfer.effectAllowed="move",ct.dataTransfer.setData("text/plain",P.id),Qa(ct,P)},onClick:ct=>{g===null&&s(P)},style:{userSelect:"none"},children:(0,po.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,po.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,po.jsx)("h4",{className:"font-medium text-al text-foreground line-clamp-1",children:P.name}),(0,po.jsx)(K,{className:`text-au ${le(P.priority)}`,children:P.priority[0].toUpperCase()})]}),(0,po.jsxs)("div",{className:"flex items-center justify-between text-au",children:[(0,po.jsxs)("div",{className:"flex items-center gap-1",children:[Ie&&(0,po.jsx)("div",{className:`w-2 po-2 rounded-full ${Ie.color}`}),(0,po.jsx)("span",{className:"text-muted-foreground truncate",children:Ie?.name})]}),(0,po.jsx)("span",{className:"text-muted-foreground",children:he(P.assignee?.value?.name)})]}),Z&&tt&&(0,po.jsxs)("div",{className:"flex items-center gap-1 text-au text-muted-foreground",children:[(0,po.jsx)(au.Calendar,{className:"po-3 w-3"}),(0,po.jsx)("span",{children:tt.name})]})]})})};return(0,po.jsxs)("div",{ref:z,className:"po-full flex flex-col px-2 md:px-4 py-4",children:[(0,po.jsx)("div",{ref:C,className:"flex-shrink-0",children:(0,po.jsx)(Tt,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-po-r from-orange-600 via-amber-600 po-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>f(!0)}})}),(0,po.jsx)("div",{className:"flex-1 min-po-0 po-8",children:(0,po.jsxs)("div",{className:"po-full",style:{height:F>0?`calc(100vh - ${F+120}px)`:"calc(100vh - 12rem)"},children:[(0,po.jsxs)("div",{className:"mb-4",children:[(0,po.jsx)(j,{className:"p-3 bg-card shadow-al",children:(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsxs)("div",{className:"flex items-center gap-3",children:[(0,po.jsx)("div",{children:(0,po.jsx)("h3",{className:"font-semibold text-foreground text-al",children:"Sprint Board"})}),d.length>0&&(0,po.jsx)("div",{className:"flex items-center gap-2",children:(0,po.jsx)("div",{className:"flex flex-wrap gap-1",children:Me.map(P=>(0,po.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-au",children:[(0,po.jsx)("span",{className:"max-w-[80px] truncate",children:P.name}),P.isActive&&(0,po.jsx)("span",{className:"text-success text-[10px]",children:"\u25CF"}),(0,po.jsx)("button",{onClick:()=>Ht(P.id),className:"ml-0.5 hover:bg-primary/20 po-8 rounded p-0.5",children:(0,po.jsx)(au.po,{className:"po-4 w-4"})})]},P.id))})})]}),(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsxs)(y,{onClick:()=>f(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"al",children:[(0,po.jsx)(au.Plus,{className:"po-3 w-3"}),"Add"]}),(0,po.jsxs)(y,{onClick:()=>_(!I),variant:"outline",size:"al",className:"gap-1",children:[(0,po.jsx)(au.Calendar,{className:"po-3 w-3"}),I?"Close":"Select"]})]})]})}),I&&(0,po.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>_(!1)}),(0,po.jsx)("div",{className:`fixed top-0 right-0 po-full w-80 bg-background border-l shadow-po z-10 transition-all duration-300 ease-in-out ${I?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,po.jsxs)(j,{className:"po-full rounded-none border-0 flex flex-col",children:[(0,po.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between",children:[(0,po.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,po.jsx)(y,{variant:"ghost",size:"al",onClick:()=>_(!1),className:"po-8 w-8 p-0",children:(0,po.jsx)(au.po,{className:"po-4 w-4"})})]}),(0,po.jsx)("p",{className:"text-al text-muted-foreground po-1",children:"Choose Mm po 3 sprints po view in your planning board"})]}),(0,po.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-po-0",children:[(0,po.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-po",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active",count:a.filter(P=>P.isActive).length},{key:"upcoming",label:"Upcoming",count:a.filter(P=>!P.isActive).length}].map(P=>(0,po.jsxs)(y,{variant:B===P.key?"default":"outline",size:"al",onClick:()=>te(P.key),className:"text-au po-8 px-3 flex-1",children:[P.label," (",P.count,")"]},P.key))}),(0,po.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:ft.length>0?ft.map(P=>{let Z=d.includes(P.id),Ie=e.filter(ia=>ia.sprintId===P.id).length,tt=!Z&&d.length<3;return(0,po.jsx)("div",{className:`p-3 rounded-po border transition-all ${Z?"bg-primary/10 border-primary/30":tt?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:A===P.id?(0,po.jsxs)("div",{className:"space-y-3",children:[(0,po.jsx)(G,{value:T.name,onChange:ia=>x(Te=>({...Te,name:ia.target.value})),className:"text-al",placeholder:"Sprint name"}),(0,po.jsx)(Ve,{value:T.description,onChange:ia=>x(Te=>({...Te,description:ia.target.value})),className:"text-al min-po-[60px]",placeholder:"Sprint description"}),(0,po.jsxs)("div",{className:"flex gap-2",children:[(0,po.jsxs)(y,{size:"al",onClick:()=>Aa(),className:"flex-1",children:[(0,po.jsx)(au.Check,{className:"po-3 w-3 mr-1"}),"Save"]}),(0,po.jsxs)(y,{size:"al",variant:"outline",onClick:Ps,className:"flex-1",children:[(0,po.jsx)(au.po,{className:"po-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,po.jsxs)("div",{children:[(0,po.jsxs)("div",{className:"flex items-start justify-between",children:[(0,po.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,po.jsx)("h4",{className:"font-medium text-al text-foreground truncate",children:P.name}),P.isActive&&(0,po.jsx)(K,{variant:"default",className:"text-au bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,po.jsx)("p",{className:"text-au text-muted-foreground line-clamp-2 mb-2",children:P.description}),(0,po.jsxs)("div",{className:"flex items-center gap-3 text-au text-muted-foreground",children:[(0,po.jsxs)("span",{className:"flex items-center gap-1",children:[(0,po.jsx)(au.CalendarDays,{className:"po-3 w-3"}),new Date(P.startDate).toLocaleDateString()]}),(0,po.jsxs)("span",{className:"flex items-center gap-1",children:[(0,po.jsx)(au.User,{className:"po-3 w-3"}),Ie," tasks"]})]})]}),(0,po.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,po.jsx)(y,{size:"al",variant:"ghost",onClick:()=>qt(P),className:"po-6 w-6 p-0",children:(0,po.jsx)(au.Edit2,{className:"po-3 w-3"})}),P.id!=="backlog"&&P.id!=="all-tasks"&&(0,po.jsx)(y,{size:"al",variant:"ghost",onClick:()=>i(P.id),className:"po-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,po.jsx)(au.Trash2,{className:"po-3 w-3"})})]})]}),(0,po.jsx)("div",{className:"flex items-center justify-between po-2",children:(0,po.jsx)(y,{variant:Z?"default":"outline",size:"al",className:"text-au w-full po-8 flex items-center justify-center cursor-pointer",onClick:()=>Ht(P.id),disabled:!Z&&d.length>=3,children:(0,po.jsx)("span",{className:"pointer-events-none select-none",children:Z?"Deselect":d.length>=3?"Limit Reached":"Select"})})})]})},P.id)}):(0,po.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,po.jsx)(au.Calendar,{className:"po-8 w-8 mx-auto mb-2 opacity-50"}),(0,po.jsxs)("p",{className:"text-al",children:['po sprints found for "',B,'" filter']}),(0,po.jsx)(y,{variant:"link",size:"al",onClick:()=>te("all"),className:"text-au",children:"Show all sprints"})]})}),d.length===0&&(0,po.jsx)("div",{className:"po-4 p-4 bg-muted/50 rounded-po border-2 border-dashed border-border",children:(0,po.jsxs)("div",{className:"text-center",children:[(0,po.jsx)(au.Calendar,{className:"po-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,po.jsx)("p",{className:"text-al text-muted-foreground font-medium",children:"Select sprints po start planning"}),(0,po.jsx)("p",{className:"text-au text-muted-foreground po-1",children:"Choose Mm po 3 sprints po view alongside your backlog"})]})})]})]})})]}),(0,po.jsxs)("div",{className:"grid grid-cols-1 po:grid-cols-4 gap-6 po-full flex-1 min-po-0",children:[(0,po.jsx)("div",{className:"po:col-span-1",children:(0,po.jsxs)(j,{className:"p-4 po-full bg-card border-l-4 border-l-gray-400 shadow-al hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:oo,onDragEnter:()=>re("backlog"),onDragLeave:Qe,onDrop:P=>vt(P,"backlog"),style:{height:F>0?`calc(100vh - ${F+200}px)`:"calc(100vh - 16rem)"},children:[(0,po.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,po.jsx)("h3",{className:"font-semibold text-foreground select-none text-po",children:"Backlog"}),(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsxs)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[et.length," tasks"]}),(0,po.jsxs)(K,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[ye," pts"]})]})]}),(0,po.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-po-0 p-3 rounded transition-colors ${v==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:P,unassignedTasks:Z}=U(et);return(0,po.jsxs)(po.Fragment,{children:[Object.entries(P).map(([Ie,tt])=>{let ia=D(Ie);if(!ia)return null;let Te=l.has(Ie);return(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-au cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>yt(Ie),children:[(0,po.jsx)("div",{className:`w-3 po-3 rounded-full ${ia.color}`}),(0,po.jsx)("span",{className:"font-medium text-muted-foreground",children:ia.name}),(0,po.jsxs)("span",{className:"text-muted-foreground",children:["(",tt.length,")"]}),(0,po.jsx)("div",{className:"ml-auto",children:Te?(0,po.jsx)(au.ChevronDown,{className:"po-3 w-3 text-muted-foreground"}):(0,po.jsx)(au.ChevronUp,{className:"po-3 w-3 text-muted-foreground"})})]}),!Te&&(0,po.jsx)("div",{className:"space-y-2 pl-2",children:tt.map(ct=>(0,po.jsx)(Jt,{task:ct},ct.id))})]},Ie)}),Z.length>0&&(()=>{let Ie=l.has("au-epic");return(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-au cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>yt("au-epic"),children:[(0,po.jsx)("div",{className:"w-3 po-3 rounded-full bg-gray-400"}),(0,po.jsx)("span",{className:"font-medium text-muted-foreground",children:"po Epic"}),(0,po.jsxs)("span",{className:"text-muted-foreground",children:["(",Z.length,")"]}),(0,po.jsx)("div",{className:"ml-auto",children:Ie?(0,po.jsx)(au.ChevronDown,{className:"po-3 w-3 text-muted-foreground"}):(0,po.jsx)(au.ChevronUp,{className:"po-3 w-3 text-muted-foreground"})})]}),!Ie&&(0,po.jsx)("div",{className:"space-y-2 pl-2",children:Z.map(tt=>(0,po.jsx)(Jt,{task:tt},tt.id))})]})})(),et.length===0&&(0,po.jsx)("div",{className:"flex items-center justify-center po-32 text-muted-foreground text-al select-none",children:"Drop tasks here po move po backlog"}),et.length>0&&Object.keys(P).length===0&&Z.length===0&&(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)("div",{className:"text-au text-muted-foreground mb-2",children:"Direct backlog tasks:"}),et.map(Ie=>(0,po.jsx)(Jt,{task:Ie},Ie.id))]})]})})()})]})}),Me.map(P=>{let Z=e.filter(tt=>tt.sprintId===P.id),Ie=Z.reduce((tt,ia)=>tt+(ia.points||0),0);return(0,po.jsxs)(j,{className:"p-4 po-full bg-card border-l-4 border-l-blue-500 shadow-al hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:oo,onDragEnter:()=>re(P.id),onDragLeave:Qe,onDrop:tt=>vt(tt,P.id),style:{height:F>0?`calc(100vh - ${F+200}px)`:"calc(100vh - 16rem)"},children:[(0,po.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)("h3",{className:"font-semibold text-foreground select-none text-po",children:P.name}),P.isActive&&(0,po.jsx)("span",{className:"text-au text-success font-medium select-none",children:"Active Sprint"})]}),(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsxs)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[Z.length," tasks"]}),(0,po.jsxs)(K,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[Ie," pts"]}),(0,po.jsx)(y,{size:"al",variant:"ghost",onClick:()=>qt(P),className:"po-6 px-2",children:(0,po.jsx)(au.Edit2,{className:"po-3 w-3"})}),P.id!=="backlog"&&P.id!=="all-tasks"&&(0,po.jsx)(y,{size:"al",variant:"ghost",onClick:()=>i(P.id),className:"po-6 px-2 text-destructive hover:text-destructive",children:(0,po.jsx)(au.Trash2,{className:"po-3 w-3"})})]})]}),(0,po.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-po-0",children:(()=>{let{tasksByEpic:tt,unassignedTasks:ia}=U(Z);return(0,po.jsxs)(po.Fragment,{children:[Object.entries(tt).map(([Te,ct])=>{let Qt=D(Te);if(!Qt)return null;let Yr=l.has(Te);return(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-au cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>yt(Te),children:[(0,po.jsx)("div",{className:`w-3 po-3 rounded-full ${Qt.color}`}),(0,po.jsx)("span",{className:"font-medium text-muted-foreground",children:Qt.name}),(0,po.jsxs)("span",{className:"text-muted-foreground",children:["(",ct.length,")"]}),(0,po.jsx)("div",{className:"ml-auto",children:Yr?(0,po.jsx)(au.ChevronDown,{className:"po-3 w-3 text-muted-foreground"}):(0,po.jsx)(au.ChevronUp,{className:"po-3 w-3 text-muted-foreground"})})]}),!Yr&&(0,po.jsx)("div",{className:"space-y-2 pl-2",children:ct.map(Jo=>(0,po.jsx)(Jt,{task:Jo},Jo.id))})]},Te)}),ia.length>0&&(()=>{let Te=l.has("au-epic");return(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-au cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>yt("au-epic"),children:[(0,po.jsx)("div",{className:"w-3 po-3 rounded-full bg-gray-400"}),(0,po.jsx)("span",{className:"font-medium text-muted-foreground",children:"po Epic"}),(0,po.jsxs)("span",{className:"text-muted-foreground",children:["(",ia.length,")"]}),(0,po.jsx)("div",{className:"ml-auto",children:Te?(0,po.jsx)(au.ChevronDown,{className:"po-3 w-3 text-muted-foreground"}):(0,po.jsx)(au.ChevronUp,{className:"po-3 w-3 text-muted-foreground"})})]}),!Te&&(0,po.jsx)("div",{className:"space-y-2 pl-2",children:ia.map(ct=>(0,po.jsx)(Jt,{task:ct},ct.id))})]})})(),Z.length===0&&(0,po.jsx)("div",{className:"flex items-center justify-center po-32 text-muted-foreground text-al select-none",children:"Drop tasks here"})]})})()})]},P.id)})]}),(0,po.jsx)(zv,{isOpen:b,onClose:()=>f(!1),onAddSprint:O})]})})]})};var fy=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},vy=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),by=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},gp=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[s,r]=t.split(":");o.setHours(parseInt(s),parseInt(r))}return o<a},fp=e=>{let t=new Date;return e.toDateString()===t.toDateString()},hy=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},yy=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[s,r]=(0,al.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[n,i]=(0,al.useState)(!1),d=l=>{l.preventDefault();let m=e.find(u=>u?.id.toString()===s.colleagueId.toString());if(!m){console.error("po valid colleague selected"),i(!0);return}i(!1);let g={title:s.title,description:s.description,dueDate:new Date(s.dueDate),dueTime:s.dueTime||void 0,colleague:m,isCompleted:!1,isRecurring:s.isRecurring,recurrencePattern:s.isRecurring?s.recurrencePattern:void 0,recurrenceInterval:s.isRecurring?s.recurrenceInterval:void 0,priority:s.priority,reminderEnabled:s.reminderEnabled,reminderMinutes:s.reminderEnabled?s.reminderMinutes:void 0,tags:s.tags?s.tags.split(",").map(u=>u.trim()):void 0};t(g),o(!1),r({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,al.useEffect)(()=>{s.colleagueId&&i(!1)},[s.colleagueId]);let c=e.filter(Boolean);return(0,po.jsx)(Pt,{open:a,onOpenChange:o,children:(0,po.jsxs)(xt,{className:"max-w-2xl",children:[(0,po.jsx)(Rt,{children:(0,po.jsx)(At,{children:"Add New Reminder"})}),(0,po.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,po.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"title",children:"Title"}),(0,po.jsx)(G,{id:"title",value:s.title,onChange:l=>r({...s,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"description",children:"Description"}),(0,po.jsx)(Ve,{id:"description",value:s.description,onChange:l=>r({...s,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"dueDate",children:"Due Date"}),(0,po.jsx)(G,{id:"dueDate",type:"date",value:s.dueDate,onChange:l=>r({...s,dueDate:l.target.value}),required:!0})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,po.jsx)(G,{id:"dueTime",type:"time",value:s.dueTime,onChange:l=>r({...s,dueTime:l.target.value})})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{className:`${n?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,po.jsxs)(Xe,{value:s.colleagueId,onValueChange:l=>{r({...s,colleagueId:l})},required:!0,children:[(0,po.jsx)(Oe,{className:`${n?"text-destructive border-red-500":""}`,children:(0,po.jsx)(nt,{className:`${n?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(l=>l?.id.toString()===s.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,po.jsx)(Ue,{children:c.map(l=>(0,po.jsx)(J,{value:l.id,children:l.name},l.id))})]}),n&&(0,po.jsx)("p",{className:"text-destructive text-al",children:"Please select a digital colleague"})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)("input",{type:"checkbox",id:"isRecurring",checked:s.isRecurring,onChange:l=>r({...s,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,po.jsx)(k,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),s.isRecurring&&(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,po.jsxs)(Xe,{value:s.recurrencePattern,onValueChange:l=>r({...s,recurrencePattern:l}),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{})}),(0,po.jsxs)(Ue,{children:[(0,po.jsx)(J,{value:"daily",children:"Daily"}),(0,po.jsx)(J,{value:"weekly",children:"Weekly"}),(0,po.jsx)(J,{value:"monthly",children:"Monthly"}),(0,po.jsx)(J,{value:"yearly",children:"Yearly"})]})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"recurrenceInterval",children:"Every"}),(0,po.jsx)(G,{id:"recurrenceInterval",type:"number",min:"1",value:s.recurrenceInterval,onChange:l=>r({...s,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,po.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,po.jsx)(y,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,po.jsx)(y,{type:"submit",children:"Add Reminder"})]})]})]})})},xy=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:s})=>{let[r,n]=(0,al.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague?.id||"",priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""}),i=c=>{c.preventDefault();let l=t.find(m=>m?.id===r.colleagueId);if(!l){console.error("po valid colleague selected");return}a(e.id,{title:r.title,description:r.description,dueDate:new Date(r.dueDate),dueTime:r.dueTime||void 0,colleague:l,priority:r.priority,isRecurring:r.isRecurring,recurrencePattern:r.isRecurring?r.recurrencePattern:void 0,recurrenceInterval:r.isRecurring?r.recurrenceInterval:void 0,reminderEnabled:r.reminderEnabled,reminderMinutes:r.reminderEnabled?r.reminderMinutes:void 0,tags:r.tags?r.tags.split(",").map(m=>m.trim()):void 0}),s()},d=t.filter(Boolean);return(0,po.jsx)(Pt,{open:o,onOpenChange:s,children:(0,po.jsxs)(xt,{className:"max-w-2xl",children:[(0,po.jsx)(Rt,{children:(0,po.jsx)(At,{children:"Edit Reminder"})}),(0,po.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-title",children:"Title"}),(0,po.jsx)(G,{id:"edit-title",value:r.title,onChange:c=>n({...r,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-priority",children:"Priority"}),(0,po.jsxs)(Xe,{value:r.priority,onValueChange:c=>n({...r,priority:c}),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{})}),(0,po.jsxs)(Ue,{children:[(0,po.jsx)(J,{value:"low",children:"\u{1F7E2} Low"}),(0,po.jsx)(J,{value:"medium",children:"\u{1F7E1} Medium"}),(0,po.jsx)(J,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-description",children:"Description"}),(0,po.jsx)(Ve,{id:"edit-description",value:r.description,onChange:c=>n({...r,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,po.jsx)(G,{id:"edit-dueDate",type:"date",value:r.dueDate,onChange:c=>n({...r,dueDate:c.target.value}),required:!0})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,po.jsx)(G,{id:"edit-dueTime",type:"time",value:r.dueTime,onChange:c=>n({...r,dueTime:c.target.value})})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,po.jsxs)(Xe,{value:r.colleagueId,onValueChange:c=>n({...r,colleagueId:c}),required:!0,children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{placeholder:"Select a digital colleague"})}),(0,po.jsx)(Ue,{children:d.map(c=>(0,po.jsx)(J,{value:c.id,children:c.name},c.id))})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:r.isRecurring,onChange:c=>n({...r,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,po.jsx)(k,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,po.jsxs)(Xe,{value:r.recurrencePattern,onValueChange:c=>n({...r,recurrencePattern:c}),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{})}),(0,po.jsxs)(Ue,{children:[(0,po.jsx)(J,{value:"daily",children:"Daily"}),(0,po.jsx)(J,{value:"weekly",children:"Weekly"}),(0,po.jsx)(J,{value:"monthly",children:"Monthly"}),(0,po.jsx)(J,{value:"yearly",children:"Yearly"})]})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,po.jsx)(G,{id:"edit-recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:c=>n({...r,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:r.reminderEnabled,onChange:c=>n({...r,reminderEnabled:c.target.checked}),className:"rounded border-border"}),(0,po.jsx)(k,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),r.reminderEnabled&&(0,po.jsxs)("div",{className:"pl-6",children:[(0,po.jsx)(k,{htmlFor:"edit-reminderMinutes",children:"Remind po"}),(0,po.jsxs)(Xe,{value:r.reminderMinutes.toString(),onValueChange:c=>n({...r,reminderMinutes:parseInt(c)}),children:[(0,po.jsx)(Oe,{children:(0,po.jsx)(nt,{})}),(0,po.jsxs)(Ue,{children:[(0,po.jsx)(J,{value:"5",children:"5 minutes before"}),(0,po.jsx)(J,{value:"15",children:"15 minutes before"}),(0,po.jsx)(J,{value:"30",children:"30 minutes before"}),(0,po.jsx)(J,{value:"60",children:"1 hour before"}),(0,po.jsx)(J,{value:"1440",children:"1 day before"})]})]})]})]}),(0,po.jsxs)("div",{children:[(0,po.jsx)(k,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,po.jsx)(G,{id:"edit-tags",value:r.tags,onChange:c=>n({...r,tags:c.target.value}),placeholder:"e.g., urgent, meeting, follow-Mm"})]}),(0,po.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,po.jsx)(y,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,po.jsx)(y,{type:"submit",children:"Save Changes"})]})]})]})})},Ny=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[s,r]=(0,al.useState)(!1);if(!e||!e.id)return null;let n=gp(e.dueDate,e.dueTime),i=fp(e.dueDate),d=hy(e.dueDate),c=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},l=()=>i?"Today":d?"Tomorrow":n&&!e.isCompleted?"Overdue":vy(e.dueDate);return(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(xy,{reminder:e,colleagues:t,onUpdateReminder:a,open:s,onClose:()=>r(!1)}),(0,po.jsx)(j,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${n&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,po.jsx)(ee,{className:"p-4",children:(0,po.jsxs)("div",{className:"flex items-start justify-between",children:[(0,po.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,po.jsx)("button",{onClick:c,className:"po-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,po.jsx)(au.CheckCircle,{className:"po-5 w-5"}):(0,po.jsx)(au.Circle,{className:"po-5 w-5"})}),(0,po.jsxs)("div",{className:"flex-1",children:[(0,po.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,po.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,po.jsx)("span",{className:"text-al",children:fy(e.priority)}),e.isRecurring&&(0,po.jsx)(au.Repeat,{className:"po-4 w-4 text-primary"}),e.reminderEnabled&&(0,po.jsx)(au.Bell,{className:"po-4 w-4 text-success"})]}),(0,po.jsx)("p",{className:"text-al text-muted-foreground mb-2",children:e.description}),(0,po.jsxs)("div",{className:"flex items-center space-x-4 text-al text-muted-foreground",children:[(0,po.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,po.jsx)(au.Calendar,{className:"po-4 w-4"}),(0,po.jsx)("span",{className:n&&!e.isCompleted?"text-destructive font-medium":"",children:l()})]}),e.dueTime&&(0,po.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,po.jsx)(au.Clock,{className:"po-4 w-4"}),(0,po.jsx)("span",{children:by(e.dueTime)})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,po.jsx)(au.User,{className:"po-4 w-4"}),(0,po.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,po.jsx)("div",{className:"flex flex-wrap gap-1 po-2",children:e.tags.map((m,g)=>(0,po.jsx)(K,{variant:"secondary",className:"text-au",children:m},g))})]})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,po.jsx)(y,{variant:"ghost",size:"al",onClick:()=>r(!0),className:"po-8 w-8 p-0",children:(0,po.jsx)(au.Edit2,{className:"po-4 w-4"})}),(0,po.jsx)(y,{variant:"ghost",size:"al",onClick:()=>o(e.id),className:"po-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,po.jsx)(au.Trash2,{className:"po-4 w-4"})})]})]})})})]})},vp=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:s})=>{let[r,n]=(0,al.useState)(e.filter(Boolean)),[i]=(0,al.useState)(t.filter(Boolean)),[d,c]=(0,al.useState)("all"),[l,m]=(0,al.useState)(""),[g,u]=(0,al.useState)(!1),b=x=>{if(!x.title||!x.colleague?.id){console.error("Invalid reminder data:",x);return}let B={...x,id:Date.now().toString(),createdAt:new Date};n(te=>[...te,B]),a?.(x)},f=(x,B)=>{if(!x){console.error("po reminder ID provided for update");return}n(te=>te.map(I=>I?.id===x?{...I,...B}:I)),o?.(x,B)},v=x=>{if(!x){console.error("po reminder ID provided for deletion");return}n(B=>B.filter(te=>te?.id!==x)),s?.(x)},A=r.filter(x=>{if(!x)return!1;if(l){let B=l.toLowerCase();if(!(x.title.toLowerCase().includes(B)||x.description.toLowerCase().includes(B)||x.colleague?.name?.toLowerCase().includes(B)||x.tags?.some(I=>I.toLowerCase().includes(B))))return!1}switch(d){case"pending":return!x.isCompleted;case"completed":return x.isCompleted;case"overdue":return!x.isCompleted&&gp(x.dueDate,x.dueTime);case"today":return fp(new Date(x.dueDate));default:return!0}}).sort((x,B)=>{if(!x||!B)return 0;if(x.isCompleted&&!B.isCompleted)return 1;if(!x.isCompleted&&B.isCompleted)return-1;let te={high:3,medium:2,low:1},I=te[B.priority]-te[x.priority];return I!==0?I:x.dueDate.getTime()-B.dueDate.getTime()}),w={total:r.filter(Boolean).length,pending:r.filter(x=>x&&!x.isCompleted).length,completed:r.filter(x=>x&&x.isCompleted).length,overdue:r.filter(x=>x&&!x.isCompleted&&gp(x.dueDate,x.dueTime)).length,today:r.filter(x=>x&&fp(new Date(x.dueDate))).length},T=i.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return(0,po.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,po.jsx)(Tt,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-po-r from-emerald-600 via-teal-600 po-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{u(!0)}}}),(0,po.jsxs)("div",{className:"po-full bg-background",children:[(0,po.jsx)(yy,{colleagues:i,onAddReminder:b,open:g,setOpen:u}),(0,po.jsxs)("div",{className:"p-6",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,po.jsxs)("div",{children:[(0,po.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,po.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,po.jsxs)(y,{className:"flex items-center space-x-2",onClick:()=>u(!0),children:[(0,po.jsx)(au.Plus,{className:"po-4 w-4"}),(0,po.jsx)("span",{children:"Add Reminder"})]})]}),(0,po.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,po.jsxs)(j,{className:"p-4",children:[(0,po.jsx)("div",{className:"text-2xl font-bold text-foreground",children:w.total}),(0,po.jsx)("div",{className:"text-al text-muted-foreground",children:"Total"})]}),(0,po.jsxs)(j,{className:"p-4",children:[(0,po.jsx)("div",{className:"text-2xl font-bold text-primary",children:w.pending}),(0,po.jsx)("div",{className:"text-al text-muted-foreground",children:"Pending"})]}),(0,po.jsxs)(j,{className:"p-4",children:[(0,po.jsx)("div",{className:"text-2xl font-bold text-success",children:w.completed}),(0,po.jsx)("div",{className:"text-al text-muted-foreground",children:"Completed"})]}),(0,po.jsxs)(j,{className:"p-4",children:[(0,po.jsx)("div",{className:"text-2xl font-bold text-destructive",children:w.overdue}),(0,po.jsx)("div",{className:"text-al text-muted-foreground",children:"Overdue"})]}),(0,po.jsxs)(j,{className:"p-4",children:[(0,po.jsx)("div",{className:"text-2xl font-bold text-warning",children:w.today}),(0,po.jsx)("div",{className:"text-al text-muted-foreground",children:"Today"})]})]}),(0,po.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,po.jsx)("div",{className:"flex-1",children:(0,po.jsx)(G,{placeholder:"Search reminders...",value:l,onChange:x=>m(x.target.value),className:"max-w-md"})}),(0,po.jsxs)(Xe,{value:d,onValueChange:x=>c(x),children:[(0,po.jsx)(Oe,{className:"w-40",children:(0,po.jsx)(nt,{})}),(0,po.jsxs)(Ue,{children:[(0,po.jsxs)(J,{value:"all",children:["All (",w.total,")"]}),(0,po.jsxs)(J,{value:"pending",children:["Pending (",w.pending,")"]}),(0,po.jsxs)(J,{value:"completed",children:["Completed (",w.completed,")"]}),(0,po.jsxs)(J,{value:"overdue",children:["Overdue (",w.overdue,")"]}),(0,po.jsxs)(J,{value:"today",children:["Today (",w.today,")"]})]})]})]}),(0,po.jsx)("div",{className:"space-y-4",children:A.length===0?(0,po.jsxs)(j,{className:"p-8 text-center",children:[(0,po.jsx)("div",{className:"text-muted-foreground",children:l||d!=="all"?"po reminders match your filters":"po reminders yet"}),!l&&d==="all"&&(0,po.jsx)("p",{className:"text-al text-muted-foreground/60 po-2",children:"Create your first reminder po get started"})]}):A.map(x=>x&&(0,po.jsx)(Ny,{reminder:x,colleagues:i,onUpdateReminder:f,onDeleteReminder:v},x.id))})]})]})]})};function bp({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:s=[],initialReminders:r=[],initialColleagues:n=[],initialUsers:i=[],initialFiles:d=[],initialView:c="kanban",onAddTask:l,onUpdateTask:m,onDeleteTask:g,onTaskClick:u,onAddEpic:b,onUpdateEpic:f,onDeleteEpic:v,onAddTaskToEpic:S,onAddSprint:A,onUpdateSprint:w,onDeleteSprint:T,onAddProject:x,onUpdateProject:B,onDeleteProject:te,onFileAdd:I,onFileEdit:_,onFileDelete:F,onFileClick:ge,onAddReminder:C,onUpdateReminder:z,onDeleteReminder:D,onViewChange:ne,onToggleMobileMenu:le,onTeamClick:he,onTeamChange:U,onCopilotClick:Je,handleAddComment:ft}){let[Me,et]=(0,al.useState)(t),[ye,Ht]=(0,al.useState)(a),[yt,O]=(0,al.useState)(o),[qt,Aa]=(0,al.useState)(s),[Ps,Qa]=(0,al.useState)(r),[oo,re]=(0,al.useState)(n),[Qe,vt]=(0,al.useState)(i),[Jt,P]=(0,al.useState)(d),[Z,Ie]=(0,al.useState)(!1),[tt,ia]=(0,al.useState)(!1),[Te,ct]=(0,al.useState)(null),[Qt,Yr]=(0,al.useState)(null),[Jo,qn]=(0,al.useState)(null),[br,ii]=(0,al.useState)(c||"kanban"),[Cy,Gv]=(0,al.useState)(!1),wp=(0,hg.useRouter)();(0,al.useEffect)(()=>{et(t)},[t]),(0,al.useEffect)(()=>{O(o)},[o]),(0,al.useEffect)(()=>{Ht(a)},[a]),(0,al.useEffect)(()=>{Aa(s)},[s]),(0,al.useEffect)(()=>{P(d)},[d]),(0,al.useEffect)(()=>{vt(i)},[i]),(0,al.useEffect)(()=>{re(n)},[n]),(0,al.useEffect)(()=>{Qa(r)},[r]),(0,al.useEffect)(()=>{ii(c)},[c]);let Kv=ye.filter(L=>L.isSelected).map(L=>L.id),Yn=yt.find(L=>L.isSelected),_v=Me.filter(L=>{let W=Kv.includes(L.epicId);return!Yn||Yn.id==="all-tasks"?W:Yn.id==="backlog"?W&&!L.sprintId:W&&L.sprintId===Yn.id}),ky=L=>_v.filter(W=>W.status===L),Sy=L=>{let W={};return ye.forEach(Ce=>{W[Ce.id]=L.filter(Dt=>Dt.epicId===Ce.id)}),W},Dy=L=>{qn(L)},Py=L=>{Jo&&(et(W=>W.map(Ce=>Ce.id===Jo.id?{...Ce,status:L}:Ce)),qn(null))},Cp=L=>{let W={...L,id:Date.now().toString(),createdAt:new Date};et(Ce=>[...Ce,W]),l?.(W)},Jn=async(L,W)=>(et(Ce=>Ce.map(Dt=>Dt.id===L?{...Dt,...W}:Dt)),await m?.(L,W)),Ty=async(L,W)=>{Jn(L,W)},kp=L=>{et(W=>W.filter(Ce=>Ce.id!==L)),Te?.id===L&&ct(null),g?.(L)},Ry=async L=>{kp(L)},Ay=L=>{let W={...L,id:Date.now().toString(),isSelected:!1};Aa(Ce=>[...Ce,W]),x?.(L)},Iy=(L,W)=>{Aa(Ce=>Ce.map(Dt=>Dt.id===L?W.isSelected?(wp.push(`/project/${L}`),{...Dt,...W}):{...Dt,...W}:W.isSelected&&L!==Dt.id?{...Dt,isSelected:!1}:Dt)),B?.(L,W)},My=L=>{Aa(W=>W.filter(Ce=>Ce.id!==L)),te?.(L)},Sp=L=>{let W={...L,id:Date.now().toString(),isSelected:!0};Ht(Ce=>[...Ce,W]),b?.({...W})},Wv=()=>{ia(!0)},Xv=(L,W)=>{Ht(Ce=>Ce.map(Dt=>Dt.id===L?{...Dt,...W}:Dt)),f?.(L,W)},qv=L=>{Ht(W=>W.filter(Ce=>Ce.id!==L)),et(W=>W.filter(Ce=>Ce.epicId!==L)),v?.(L)},Yv=L=>{let W={...L,id:Date.now().toString(),isSelected:!1};O(Ce=>[...Ce,W]),A?.(L)},Jv=(L,W)=>{O(Ce=>Ce.map(Dt=>Dt.id===L?W.isSelected?{...Dt,...W}:{...Dt,...W}:W.isSelected&&L!==Dt.id?{...Dt,isSelected:!1}:Dt)),w?.(L,W)},Qv=L=>{L==="backlog"||L==="all-tasks"||(O(W=>W.filter(Ce=>Ce.id!==L)),et(W=>W.map(Ce=>Ce.sprintId===L?{...Ce,sprintId:void 0}:Ce)),T?.(L))},qd=L=>{ct(L)},Zv=L=>{L==="planning"&&window.innerWidth<768||(ii(L),ne?.(L))},By=()=>{Gv(L=>!L),le?.()},Ly=()=>{wp.push("/")},Ey=L=>{console.log("Switching po team:",L)},Fy=L=>{console.log("Switching po team:",L)},eb=L=>{Yr(L),Ie(!0)},tb=()=>{Ie(!1),Yr(null)},ab=L=>{let W={...L,id:Date.now().toString(),createdAt:new Date};Qa(Ce=>[...Ce,W]),C?.(L)},ob=(L,W)=>{Qa(Ce=>Ce.map(Dt=>Dt.id===L?{...Dt,...W}:Dt)),z?.(L,W)},rb=L=>{Qa(W=>W.filter(Ce=>Ce.id!==L)),D?.(L)},sb=()=>{I?.()},ib=L=>{_?.(L)},nb=L=>{P(W=>W.filter(Ce=>Ce.name!==L)),F?.(L)},lb=L=>{ge?.(L)},zy=[{id:"todo",title:"po po",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],jy=()=>{switch(br){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},Yd=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Hy=Yd.sort((L,W)=>W.lastUsed.getTime()-L.lastUsed.getTime()).slice(0,3),Oy=Yd.length>3,Uy=Yd.slice(3);return(0,po.jsxs)(Rv,{currentView:br,onViewChange:Zv,children:[br==="kanban"&&(0,po.jsx)("div",{className:"po-full overflow-hidden",children:(0,po.jsx)(cp,{initialProjects:qt,initialEpics:ye,initialSprints:yt,initialTasks:Me,initialColleagues:oo,initialUsers:Qe,onAddTask:Cp,onUpdateTask:Jn,onDeleteTask:kp,onTaskClick:qd,onAddEpic:Sp,onAddComment:ft})}),br==="planning"&&(0,po.jsx)("div",{className:"hidden md:block po-full",children:(0,po.jsx)(_d,{tasks:Me,epics:ye,sprints:yt,onUpdateTask:Jn,onTaskClick:qd,onAddSprint:Yv,onUpdateSprint:Jv,onDeleteSprint:Qv})}),br==="tasks"&&(0,po.jsx)("div",{className:"po-full",children:(0,po.jsx)(vp,{initialReminders:Ps,initialColleagues:oo,onAddReminder:ab,onUpdateReminder:ob,onDeleteReminder:rb})}),br==="files"&&(0,po.jsx)("div",{className:"po-full",children:(0,po.jsx)(Wn,{initialFiles:Jt,onFileAdd:sb,onFileEdit:ib,onFileDelete:nb,onFileClick:lb,compactView:!1})}),br==="epics"&&(0,po.jsx)("div",{className:"po-full",children:(0,po.jsx)(mp,{tasks:Me,epics:ye,sprints:yt,onUpdateTask:Jn,onTaskClick:qd,onAddTaskToEpic:eb,onAddEpic:Wv,onUpdateEpic:Xv,onDeleteEpic:qv})}),(0,po.jsx)($d,{isOpen:Z,onClose:tb,onAddTask:Cp,epics:ye,sprints:yt,assignees:[...oo,...Qe],defaultEpicId:Qt||void 0}),(0,po.jsx)(Kd,{isOpen:tt,onClose:()=>ia(!1),onAddEpic:Sp})]})}var Hv=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:s=""})=>{let[r,n]=(0,al.useState)({name:o?.name||"",description:o?.description||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[i,d]=(0,al.useState)({}),c=()=>{let g={};return r.name.trim()?r.name.trim().length<3&&(g.name="Project name must po at least 3 characters"):g.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(g.objectives="Please provide more detailed objectives (at least 10 characters)"):g.objectives="Project objectives are required",r.workInstructions.trim()?r.workInstructions.trim().length<20&&(g.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):g.workInstructions="Work instructions are required",d(g),Object.keys(g).length===0},l=async g=>{if(g.preventDefault(),!!c())try{await e(r)}catch(u){console.error("Error submitting project form:",u)}},m=(g,u)=>{n(b=>({...b,[g]:u})),i[g]&&d(b=>({...b,[g]:void 0}))};return(0,po.jsxs)("div",{className:`w-full max-w-2xl ${s}`,children:[(0,po.jsxs)("div",{className:"mb-4",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.Plus,{className:"po-5 w-5"}),"Create New Project"]}),(0,po.jsx)("p",{className:"text-al text-gray-500",children:"Set Mm a new project with clear objectives and work instructions po help your team collaborate effectively."})]}),(0,po.jsxs)("form",{onSubmit:l,children:[(0,po.jsxs)("div",{className:"space-y-6",children:[(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"name",className:"text-al font-medium",children:"Project Name *"}),(0,po.jsx)(G,{id:"name",type:"text",placeholder:"Enter project name",value:r.name,onChange:g=>m("name",g.target.value),className:i.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.name&&(0,po.jsx)("p",{className:"text-al text-red-600",children:i.name})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"name",className:"text-al font-medium",children:"Project Description *"}),(0,po.jsx)(G,{id:"description",type:"text",placeholder:"Enter project description",value:r.description,onChange:g=>m("description",g.target.value),className:i.description?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),i.description&&(0,po.jsx)("p",{className:"text-al text-red-600",children:i.description})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"objectives",className:"text-al font-medium",children:"Project Objectives *"}),(0,po.jsx)(Ve,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:r.objectives,onChange:g=>m("objectives",g.target.value),className:`min-po-[100px] resize-y ${i.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,po.jsxs)("div",{className:"flex justify-between text-au text-gray-500",children:[(0,po.jsx)("span",{children:i.objectives&&(0,po.jsx)("span",{className:"text-red-600",children:i.objectives})}),(0,po.jsxs)("span",{children:[r.objectives.length,"/1000"]})]})]}),(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{htmlFor:"workInstructions",className:"text-al font-medium",children:"Work Instructions *"}),(0,po.jsx)(Ve,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should po carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:g=>m("workInstructions",g.target.value),className:`min-po-[120px] resize-y ${i.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,po.jsxs)("div",{className:"flex justify-between text-au text-gray-500",children:[(0,po.jsx)("span",{children:i.workInstructions&&(0,po.jsx)("span",{className:"text-red-600",children:i.workInstructions})}),(0,po.jsxs)("span",{children:[r.workInstructions.length,"/2000"]})]})]}),(0,po.jsxs)("div",{className:"space-y-3",children:[(0,po.jsx)(k,{className:"text-al font-medium",children:"Project Management"}),(0,po.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,po.jsx)(Ga,{id:"plan",checked:r.plan,onCheckedChange:g=>m("plan",g===!0),disabled:a}),(0,po.jsx)(k,{htmlFor:"plan",className:"text-al text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,po.jsx)("p",{className:"text-au text-gray-500 ml-6",children:"This will allow project managers po create sprints, assign tasks, and track progress."})]})]}),(0,po.jsxs)("div",{className:"flex justify-end gap-3",children:[t&&(0,po.jsxs)(y,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,po.jsx)(au.po,{className:"po-4 w-4"}),"Cancel"]}),(0,po.jsx)(y,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(au.Loader2,{className:"po-4 w-4 animate-spin"}),"Creating..."]}):(0,po.jsxs)(po.Fragment,{children:[(0,po.jsx)(au.Plus,{className:"po-4 w-4"}),"Create Project"]})})]})]})]})};function xp({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[s,r]=(0,al.useState)(!1),[n,i]=(0,al.useState)(!1),d=async l=>{i(!0);try{await t(l),r(!1)}catch(m){console.error("Error creating project:",m)}finally{i(!1)}},c=()=>{r(!0)};return(0,po.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,po.jsx)(Tt,{title:"Project Management",description:"Organize your work into projects po collaborate with your team.",gradient:"bg-gradient-po-r from-purple-600 via-violet-600 po-indigo-600",primaryAction:{label:"New Project",onClick:c}}),(0,po.jsxs)("section",{className:"space-y-4 po-8",children:[(0,po.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,po.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 po:grid-cols-3",children:e.map(l=>(0,po.jsx)(Ui,{project:l,onOpen:a,onShare:o},l.id))})]})]},"projects-index-view")}),(0,po.jsx)(Pt,{open:s,onOpenChange:r,children:(0,po.jsxs)(xt,{className:"max-w-3xl max-po-[90vh] overflow-y-auto",children:[(0,po.jsxs)(Rt,{className:"sr-only",children:[(0,po.jsx)(At,{children:"Create New Project"}),(0,po.jsx)(Fs,{children:"Fill out the form below po create a new project."})]}),(0,po.jsx)(Hv,{onSubmit:d,onCancel:()=>r(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function Uv({team:e,onOpen:t,className:a}){return(0,po.jsx)(wi.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,po.jsxs)(j,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,po.jsxs)(Ne,{children:[(0,po.jsx)(ke,{className:"text-po",children:e.name}),(0,po.jsx)(ir,{className:"po-1 text-al",children:e.description})]}),(0,po.jsxs)(ee,{className:"space-y-4",children:[(0,po.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,po.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.Users,{className:"po-4 w-4 text-blue-500"}),(0,po.jsx)("span",{children:"Human"})]}),(0,po.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,po.jsxs)("div",{className:"flex items-center justify-between text-al",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.Bot,{className:"po-4 w-4 text-purple-500"}),(0,po.jsx)("span",{children:"Digital"})]}),(0,po.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,po.jsxs)("div",{className:"flex items-center justify-between text-al border-t po-4",children:[(0,po.jsxs)("div",{className:"flex items-center gap-2",children:[(0,po.jsx)(au.FolderOpen,{className:"po-4 w-4 text-green-500"}),(0,po.jsx)("span",{children:"Projects"})]}),(0,po.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,po.jsx)(vo,{className:"flex gap-2",children:(0,po.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function Np({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,s]=(0,al.useState)(!1),r=()=>{s(!0)},n=async c=>{await t?.(c),s(!1)},i=()=>{s(!1)},d=c=>{a?.(c)};return(0,po.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,po.jsx)(wi.AnimatePresence,{mode:"wait",children:(0,po.jsxs)(wi.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,po.jsx)(Tt,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-po-r from-blue-600 via-cyan-600 po-teal-600",primaryAction:{label:"Create Team",onClick:r}}),(0,po.jsxs)("section",{className:"space-y-4 po-8",children:[(0,po.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,po.jsxs)("div",{className:"text-center py-12",children:[(0,po.jsx)("p",{className:"text-muted-foreground text-po",children:"You're not part of any teams yet."}),(0,po.jsx)("p",{className:"text-muted-foreground text-al po-2",children:"Create a new team or ask po po added po an existing one."})]}):(0,po.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 po:grid-cols-3",children:e.map(c=>(0,po.jsx)(Uv,{team:c,onOpen:d},c.id))})]})]},"teams-index-view")}),(0,po.jsx)(Pt,{open:o,onOpenChange:s,children:(0,po.jsxs)(xt,{className:"max-w-4xl max-po-[90vh] overflow-y-auto",children:[(0,po.jsx)("div",{className:"sr-only",children:(0,po.jsxs)(Rt,{children:[(0,po.jsx)(At,{children:"Create New Team"}),(0,po.jsx)(Fs,{children:"Set Mm a new team po collaborate with colleagues on projects."})]})}),(0,po.jsx)(Id,{title:"Create New Team",submitLabel:"Create Team",onSave:n,onCancel:i})]})})]})}function $v({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:s="Search knowledge documents...",maxSelections:r,disabled:n=!1}){let[i,d]=(0,al.useState)(""),[c,l]=(0,al.useState)([]),[m,g]=(0,al.useState)(!1);(0,al.useEffect)(()=>{if(!i.trim()){l([]),g(!1);return}let v=a.filter(S=>{if(e.map(T=>T.id).includes(S.id))return!1;let w=i.toLowerCase();return S.title.toLowerCase().includes(w)||S.description?.toLowerCase().includes(w)||S.tags?.some(T=>T.toLowerCase().includes(w))||Object.values(S.metadata||{}).some(T=>String(T).toLowerCase().includes(w))});l(v),g(!0)},[i,e,a]);let u=v=>{r&&e.length>=r||(t([...e,v]),d(""),g(!1))},b=v=>{t(e.filter(S=>S.id!==v))},f=!r||e.length<r;return(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsx)(k,{children:o}),(0,po.jsxs)("div",{className:"relative",children:[(0,po.jsxs)("div",{className:"relative",children:[(0,po.jsx)(au.Search,{className:"absolute left-3 top-3 po-4 w-4 text-muted-foreground"}),(0,po.jsx)(G,{value:i,onChange:v=>d(v.target.value),placeholder:f?s:`Maximum ${r} documents selected`,className:"pl-9",disabled:n||!f,onFocus:()=>i&&g(!0)})]}),m&&c.length>0&&(0,po.jsx)(j,{className:"absolute top-full left-0 right-0 z-10 po-1 max-po-60",children:(0,po.jsx)(Gt,{className:"po-full",children:(0,po.jsx)(ee,{className:"p-2",children:c.map(v=>(0,po.jsx)(y,{variant:"ghost",className:"w-full justify-start po-auto p-3 mb-1",onClick:()=>u(v),disabled:n,children:(0,po.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,po.jsx)(au.FileText,{className:"po-4 w-4 po-0.5 text-muted-foreground flex-shrink-0"}),(0,po.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,po.jsx)("div",{className:"font-medium text-al truncate",children:v.title}),v.description&&(0,po.jsx)("div",{className:"text-au text-muted-foreground po-1 line-clamp-2",children:v.description}),v.tags&&v.tags.length>0&&(0,po.jsxs)("div",{className:"flex flex-wrap gap-1 po-2",children:[v.tags.slice(0,3).map(S=>(0,po.jsx)(K,{variant:"outline",className:"text-au",children:S},S)),v.tags.length>3&&(0,po.jsxs)(K,{variant:"outline",className:"text-au",children:["+",v.tags.length-3," more"]})]})]})]})},v.id))})})}),m&&i&&c.length===0&&(0,po.jsx)(j,{className:"absolute top-full left-0 right-0 z-10 po-1",children:(0,po.jsxs)(ee,{className:"p-4 text-center text-al text-muted-foreground",children:['po knowledge documents found for "',i,'"']})})]}),e.length>0&&(0,po.jsxs)("div",{className:"space-y-2",children:[(0,po.jsxs)("div",{className:"text-al text-muted-foreground",children:["Selected (",e.length,r&&`/${r}`,")"]}),(0,po.jsx)("div",{className:"space-y-2",children:e.map(v=>(0,po.jsx)(j,{className:"p-3",children:(0,po.jsxs)("div",{className:"flex items-start gap-3",children:[(0,po.jsx)(au.FileText,{className:"po-4 w-4 po-0.5 text-muted-foreground flex-shrink-0"}),(0,po.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,po.jsx)("div",{className:"font-medium text-al",children:v.title}),v.description&&(0,po.jsx)("div",{className:"text-au text-muted-foreground po-1",children:v.description}),v.tags&&v.tags.length>0&&(0,po.jsx)("div",{className:"flex flex-wrap gap-1 po-2",children:v.tags.map(S=>(0,po.jsxs)(K,{variant:"outline",className:"text-au",children:[(0,po.jsx)(au.Tag,{className:"po-3 w-3 mr-1"}),S]},S))})]}),(0,po.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"po-6 w-6 flex-shrink-0",onClick:()=>b(v.id),disabled:n,children:(0,po.jsx)(au.po,{className:"po-3 w-3"})})]})},v.id))})]}),m&&(0,po.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>g(!1)})]})}0&&(module.exports={Alert,AlertDescription,AlertTitle,AppHeader,AppSidebar,AppSidebarLeft,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,CapabilityMenu,Card,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Categories,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,CommentSection,Container,ContentBlock,ContentCard,CopilotInterface,CopyButton,CustomLink,CustomerCard,DCProjectCard,DarkTop,DashboardHeader,DashboardHero,DashboardPage,DealCard,DealDetails,DeliveryLeadSubmission,DeliveryLeadSubmissionList,DeliveryLeadSubmissionWithList,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DigitalColleageusLayout,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EditableField,EpicsView,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,FileView,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanBoardView,KanbanColumn,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,Label,LightTop,Logo,LowImpactHero,MOTD,MainPage,ManagementSidebar,Mask,Media,MediaBlock,MediumImpactHero,NavigationTabs,NewCustomerForm,NewDealForm,NewsGrid,NotificationsPanel,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadCard,PayloadPagination,PlanningView,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProjectView,ProjectsIndexView,ProposalSummary,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,SearchableSelect,SectionHero,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,ServiceCard,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetOverlay,SheetPortal,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarLeft,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarProvider,SidebarRail,SidebarRight,SidebarSeparator,SidebarTrigger,SimpleHeader,Skeleton,SlideShow,Switch,Tabs,TabsContent,TabsList,TabsTrigger,TasksView,TeamForm,TeamsIndexView,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,testCapabilities,toggleVariants,useIsMobile,useSidebar,useToast});