cortex-react-components 1.65.3 → 1.65.4

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 (166) hide show
  1. package/dist/{chunk-737CTHXW.mjs → chunk-26JAUUHC.mjs} +1 -1
  2. package/dist/{chunk-BZBPA7IN.mjs → chunk-2MTAQ2YX.mjs} +1 -1
  3. package/dist/{chunk-6BDDYPGK.mjs → chunk-35SLQX5Z.mjs} +1 -1
  4. package/dist/{chunk-EDB4YGKM.mjs → chunk-3FZPSPIZ.mjs} +1 -1
  5. package/dist/{chunk-RVA4WIRX.mjs → chunk-4AT3EYCF.mjs} +1 -1
  6. package/dist/{chunk-R4QBZLWY.mjs → chunk-BFESGJZ4.mjs} +1 -1
  7. package/dist/{chunk-QUOLG5NC.mjs → chunk-BGQKHEB3.mjs} +1 -1
  8. package/dist/{chunk-XLURG5E2.mjs → chunk-CSFID44M.mjs} +1 -1
  9. package/dist/{chunk-LBOJXQGC.mjs → chunk-D6TOSZKM.mjs} +1 -1
  10. package/dist/{chunk-DV2PY5FI.mjs → chunk-DNOTHVMH.mjs} +1 -1
  11. package/dist/{chunk-FM2YMSMY.mjs → chunk-E6JYZMWA.mjs} +1 -1
  12. package/dist/{chunk-L45A6K4C.mjs → chunk-E7W2GFKO.mjs} +1 -1
  13. package/dist/{chunk-OINI2PT2.mjs → chunk-FE7YQRL2.mjs} +1 -1
  14. package/dist/{chunk-BP62X7AM.mjs → chunk-FSQNNG2C.mjs} +1 -1
  15. package/dist/{chunk-UVPODMUO.mjs → chunk-FYEE5UWZ.mjs} +1 -1
  16. package/dist/{chunk-NZKW64NF.mjs → chunk-GWBCK4SV.mjs} +1 -1
  17. package/dist/{chunk-VXGRJCCM.mjs → chunk-IC57R2EU.mjs} +1 -1
  18. package/dist/{chunk-W3ONOYB6.mjs → chunk-JPWY5ADC.mjs} +1 -1
  19. package/dist/{chunk-3RPTKOCL.mjs → chunk-JRFNBHPL.mjs} +1 -1
  20. package/dist/{chunk-MYDBD7LR.mjs → chunk-JXW2QARY.mjs} +1 -1
  21. package/dist/{chunk-MJUFOUCH.mjs → chunk-K347D5ZJ.mjs} +1 -1
  22. package/dist/{chunk-V3H2VIQR.mjs → chunk-KD7K2ENG.mjs} +1 -1
  23. package/dist/{chunk-VEVYFZEV.mjs → chunk-KFQ3L3TO.mjs} +1 -1
  24. package/dist/{chunk-7O2TMDTD.mjs → chunk-KWTCUGN5.mjs} +1 -1
  25. package/dist/{chunk-ND4NY6SK.mjs → chunk-LSVWCONK.mjs} +1 -1
  26. package/dist/{chunk-ANTK5LAD.mjs → chunk-N363IQBL.mjs} +1 -1
  27. package/dist/{chunk-MCE2INP2.mjs → chunk-N4NSSICX.mjs} +1 -1
  28. package/dist/{chunk-6JAIW45L.mjs → chunk-NLA3SBVN.mjs} +1 -1
  29. package/dist/{chunk-ZJZ5HYAW.mjs → chunk-OU3PM75Z.mjs} +1 -1
  30. package/dist/{chunk-37NBXA5G.mjs → chunk-PADGOK5C.mjs} +1 -1
  31. package/dist/{chunk-DAJNZDN6.mjs → chunk-PBRC3UOA.mjs} +1 -1
  32. package/dist/{chunk-CYVVXQ2A.mjs → chunk-PKDUSZWL.mjs} +1 -1
  33. package/dist/{chunk-22KXWTT3.mjs → chunk-PYAM4YXE.mjs} +1 -1
  34. package/dist/{chunk-5J244QX4.mjs → chunk-RGWP2OVM.mjs} +1 -1
  35. package/dist/{chunk-MO44Z74W.mjs → chunk-S7FH27PL.mjs} +1 -1
  36. package/dist/{chunk-KETV2XVN.mjs → chunk-SX5U74MW.mjs} +1 -1
  37. package/dist/{chunk-BA6HNFXB.mjs → chunk-TFP6VQ32.mjs} +1 -1
  38. package/dist/{chunk-4EQF35LM.mjs → chunk-TT4SPGZU.mjs} +1 -1
  39. package/dist/{chunk-HB4BHTNM.mjs → chunk-V5EOKY7D.mjs} +1 -1
  40. package/dist/{chunk-MRJQKF4Z.mjs → chunk-VNGK6ACI.mjs} +1 -1
  41. package/dist/chunk-WXZ3IRTS.mjs +1 -0
  42. package/dist/{chunk-666KIWPS.mjs → chunk-YRJA3PJ5.mjs} +1 -1
  43. package/dist/{chunk-PKSY2IBO.mjs → chunk-YWVLHQ3L.mjs} +1 -1
  44. package/dist/{chunk-HBE5POUB.mjs → chunk-ZKBLFPGO.mjs} +1 -1
  45. package/dist/{chunk-Z6NED523.mjs → chunk-ZY2PDUUB.mjs} +1 -1
  46. package/dist/{chunk-SUO6GOJS.mjs → chunk-ZYYWN6XG.mjs} +1 -1
  47. package/dist/components/Blocks/Banner.mjs +1 -1
  48. package/dist/components/Blocks/CallToAction.mjs +1 -1
  49. package/dist/components/Blocks/CallToAction.stories.mjs +1 -1
  50. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  51. package/dist/components/Blocks/CollapsibleArea.stories.mjs +1 -1
  52. package/dist/components/Blocks/Content.mjs +1 -1
  53. package/dist/components/Blocks/Content.stories.mjs +1 -1
  54. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  55. package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
  56. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  57. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  58. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  59. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  60. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  61. package/dist/components/Blocks/index.mjs +1 -1
  62. package/dist/components/CRM/CogeBoard.js +1 -1
  63. package/dist/components/CRM/CogeBoard.mjs +1 -1
  64. package/dist/components/CRM/CogeBoard.stories.js +1 -1
  65. package/dist/components/CRM/CogeBoard.stories.mjs +1 -1
  66. package/dist/components/CRM/DealCard.js +1 -1
  67. package/dist/components/CRM/DealCard.mjs +1 -1
  68. package/dist/components/CRM/DealCard.stories.js +1 -1
  69. package/dist/components/CRM/DealCard.stories.mjs +1 -1
  70. package/dist/components/CRM/KanbanBoard.js +1 -1
  71. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  72. package/dist/components/CRM/KanbanBoard.stories.js +1 -1
  73. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
  74. package/dist/components/CRM/KanbanColumn.js +1 -1
  75. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  76. package/dist/components/CRM/KanbanColumn.stories.js +1 -1
  77. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
  78. package/dist/components/CRM/index.js +1 -1
  79. package/dist/components/CRM/index.mjs +1 -1
  80. package/dist/components/Cards/ContentCard.mjs +1 -1
  81. package/dist/components/Cards/ContentCard.stories.mjs +1 -1
  82. package/dist/components/Cards/FeatureCard.mjs +1 -1
  83. package/dist/components/Cards/FeatureCard.stories.mjs +1 -1
  84. package/dist/components/Cards/index.mjs +1 -1
  85. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  86. package/dist/components/DigitalColleagues/KanbanBoard.mjs +1 -1
  87. package/dist/components/DigitalColleagues/KanbanBoard.stories.mjs +1 -1
  88. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  89. package/dist/components/DigitalColleagues/MainPage.stories.mjs +1 -1
  90. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  91. package/dist/components/DigitalColleagues/ManagementSidebar.stories.mjs +1 -1
  92. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  93. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  94. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  95. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  96. package/dist/components/Heros/PostHero/index.mjs +1 -1
  97. package/dist/components/Heros/RenderHero.mjs +1 -1
  98. package/dist/components/Heros/index.mjs +1 -1
  99. package/dist/components/Layouts/FeatureGrid.stories.mjs +1 -1
  100. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  101. package/dist/components/Layouts/Print.mjs +1 -1
  102. package/dist/components/Layouts/Print.stories.mjs +1 -1
  103. package/dist/components/Layouts/SlideShow.mjs +1 -1
  104. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  105. package/dist/components/Layouts/index.mjs +1 -1
  106. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  107. package/dist/components/Menus/SidebarLeft.stories.mjs +1 -1
  108. package/dist/components/Menus/SidebarRight.mjs +1 -1
  109. package/dist/components/Menus/SidebarRight.stories.mjs +1 -1
  110. package/dist/components/Menus/index.mjs +1 -1
  111. package/dist/components/Payload/Card/index.mjs +1 -1
  112. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  113. package/dist/components/Payload/Media/index.mjs +1 -1
  114. package/dist/components/Payload/RichText/index.mjs +1 -1
  115. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  116. package/dist/components/Payload/RichText.stories.mjs +1 -1
  117. package/dist/components/Payload/index.mjs +1 -1
  118. package/dist/components/index.js +1 -1
  119. package/dist/components/index.mjs +1 -1
  120. package/dist/components/ui/index.mjs +1 -1
  121. package/dist/components/ui/sidebar.mjs +1 -1
  122. package/dist/globals.css +1 -1
  123. package/dist/hooks/index.mjs +1 -1
  124. package/dist/index.js +1 -1
  125. package/dist/index.mjs +1 -1
  126. package/dist/metafile-cjs.json +1 -1
  127. package/dist/metafile-esm.json +1 -1
  128. package/dist/pages/Blog.mjs +1 -1
  129. package/dist/pages/Blog.stories.mjs +1 -1
  130. package/dist/pages/Documentation.mjs +1 -1
  131. package/dist/pages/Documentation.stories.mjs +1 -1
  132. package/dist/pages/IndexPage.mjs +1 -1
  133. package/dist/pages/IndexPage.stories.mjs +1 -1
  134. package/dist/pages/LandingPage.mjs +1 -1
  135. package/dist/pages/LandingPage.stories.mjs +1 -1
  136. package/dist/pages/Page.mjs +1 -1
  137. package/dist/pages/Page.stories.mjs +1 -1
  138. package/dist/pages/Printable.stories.mjs +1 -1
  139. package/dist/pages/Publish.mjs +1 -1
  140. package/dist/pages/Publish.stories.mjs +1 -1
  141. package/dist/pages/Website.mjs +1 -1
  142. package/dist/pages/Website.stories.mjs +1 -1
  143. package/dist/sections/AboutSection.mjs +1 -1
  144. package/dist/sections/AboutSection.stories.mjs +1 -1
  145. package/dist/sections/BlogDetail.mjs +1 -1
  146. package/dist/sections/BlogDetail.stories.mjs +1 -1
  147. package/dist/sections/BlogList.mjs +1 -1
  148. package/dist/sections/BlogList.stories.mjs +1 -1
  149. package/dist/sections/BlogListSection.mjs +1 -1
  150. package/dist/sections/BlogListSection.stories.mjs +1 -1
  151. package/dist/sections/ContactSection.mjs +1 -1
  152. package/dist/sections/ContactSection.stories.mjs +1 -1
  153. package/dist/sections/ImageSection.stories.mjs +1 -1
  154. package/dist/sections/PageSections.mjs +1 -1
  155. package/dist/sections/PageSections.stories.mjs +1 -1
  156. package/dist/sections/PricingSection.mjs +1 -1
  157. package/dist/sections/PricingSection.stories.mjs +1 -1
  158. package/dist/sections/ServiceDetail.mjs +1 -1
  159. package/dist/sections/ServiceDetailSection.mjs +1 -1
  160. package/dist/sections/ServiceDetailSection.stories.mjs +1 -1
  161. package/dist/sections/ServiceSection.mjs +1 -1
  162. package/dist/sections/ServiceSection.stories.mjs +1 -1
  163. package/dist/sections/form/index.mjs +1 -1
  164. package/dist/sections/index.mjs +1 -1
  165. package/package.json +1 -1
  166. package/dist/chunk-FFESN4FM.mjs +0 -1
@@ -12,7 +12,7 @@
12
12
  dark bg-background text-primary`,children:[(0,et.jsxs)("div",{className:"flex px-6 items-center space-et-2",children:[e&&(0,et.jsx)("img",{src:e.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,et.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,et.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),Wo=({title:e})=>(0,et.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,et.jsx)("div",{className:"container",children:(0,et.jsx)("span",{className:"container text-4xl px-6",children:e})})}),Vo=e=>{let{title:t,hero:a,logoImage:o}=e;return(0,et.jsxs)("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[(0,et.jsx)("div",{className:"absolute inset-0",children:(0,et.jsx)(Wi.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 h-full dark:opacity-60"})}),(0,et.jsx)("div",{className:"absolute left-16 et-50 top-4 flex flex-col items-start gap-4",children:o&&(0,et.jsx)("div",{className:"h-24",children:(0,et.jsx)(Wi.default,{src:o.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),(0,et.jsx)("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),(0,et.jsxs)("div",{className:"relative pl-24 et-10 max-w-3xl",children:[(0,et.jsx)("p",{className:"text-lg font-medium pt-48 text-accent mb-2",children:t}),a.richText&&(0,et.jsx)(Z,{content:a.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};var Td=e=>{let[t,a]=(0,sr.useState)(0),{blocks:o,hero:r,logoImage:s}=e,l=o&&Array.isArray(o)&&o.length>0,c=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...o],m=u=>{a(u)},d=()=>{a(u=>(u+1)%c.length)},p=()=>{a(u=>(u-1+c.length)%c.length)},g=(0,sr.useCallback)(((u,v)=>{let M;return(...O)=>{clearTimeout(M),M=setTimeout(()=>u(...O),v)}})(u=>{u.deltaY>0?d():p()},300),[]),b=u=>{u.key==="ArrowDown"?d():u.key==="ArrowUp"&&p()};return(0,sr.useEffect)(()=>(window.addEventListener("wheel",g),window.addEventListener("keydown",b),()=>{window.removeEventListener("wheel",g),window.removeEventListener("keydown",b)}),[]),(0,et.jsxs)("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[(0,et.jsx)("div",{className:"fixed left-0 top-0 flex h-screen w-9 et-10 flex-col items-center justify-center bg-gray-900",children:l&&c.map((u,v)=>(0,et.jsx)("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${t===v?"bg-accent":"bg-gray-600"}`,onClick:()=>m(v),children:(0,et.jsx)("span",{className:"absolute ml-7 left-full text-left transform -translate-et-1/2 translate-et-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-et-2 transition-all duration-300",children:u.blockName})},u.id))}),(0,et.jsx)(ro.AnimatePresence,{children:c.map((u,v)=>(0,et.jsx)("div",{id:`slide-${v}`,className:"print-section",children:(0,et.jsx)("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
13
13
  ${v===t?"opacity-100":"opacity-0"}
14
14
  w-full h-full bg-cover bg-center`,children:v===0?(0,et.jsx)(Vo,{hero:r,title:e.title,logoImage:s}):(0,et.jsxs)(et.Fragment,{children:[u.blockName&&(0,et.jsx)(Wo,{title:u.blockName}),(0,et.jsx)(ba,{blocks:[u],fill:!0}),(0,et.jsx)(Rd,{logoImage:s})]})})},v))}),(0,et.jsx)("button",{className:"absolute bottom-4 left-1 et-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:d,children:(0,et.jsx)(fp,{})})]})},fp=()=>(0,et.jsx)(ro.AnimatePresence,{children:(0,et.jsx)(ro.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:i("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:(0,et.jsx)(ro.motion.div,{initial:{et:0},animate:{et:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:i("w-[12px] h-[12px] rounded-full","bg-accent")})})});var Dd=h(require("next/link")),Md=h(require("next/image"));function Id({blogs:e,width:t=3}){return(0,et.jsx)("div",{className:"w-full max-w-7xl mx-auto px-4 py-8",children:(0,et.jsx)("div",{className:`grid et:grid-cols-2 lg:grid-cols-${t} gap-6`,children:e&&e.map((a,o)=>(0,et.jsx)(Dd.default,{href:`/insights/${a.slug}`,className:"group rounded-2xl overflow-hidden border bg-card text-card-foreground shadow hover:shadow-lg transition-shadow",children:(0,et.jsxs)("div",{className:"relative size-full",children:[(0,et.jsx)(Md.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,et.jsxs)("div",{className:"absolute inset-0 px-4 pb-2 bg-gradient-et-t from-card et-transparrent flex flex-col justify-end",children:[(0,et.jsxs)("div",{className:"text-sm text-card-foreground mb-2",children:[a.authors&&a.authors.map(r=>`${r.name} \xB7 `),a.publishedAt&&new Date(a.publishedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long"})]}),(0,et.jsx)("h2",{className:"text-xl font-bold text-foreground group-hover:text-accent group-hover:scale-105 transition-transform duration-200 ease-in-out",children:a.title})]})]})},o))})})}function Ad({title:e,subtitle:t,description:a,missionTitle:o,missionDescription:r,images:s,raisedAmount:l,companiesCount:n,dealsClosed:c,leadsGenerated:m}){return(0,et.jsx)("div",{className:"overflow-hidden bg-white py-24 sm:py-32",children:(0,et.jsxs)("div",{className:"mx-auto max-w-2xl px-6 lg:max-w-7xl lg:px-8",children:[(0,et.jsxs)("div",{className:"max-w-4xl",children:[(0,et.jsx)("p",{className:"text-base/7 font-semibold text-indigo-600",children:t}),(0,et.jsx)("h1",{className:"mt-2 text-pretty text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl",children:e}),(0,et.jsx)("p",{className:"mt-6 text-balance text-xl/8 text-gray-700",children:a})]}),(0,et.jsxs)("section",{className:"mt-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-et-8 lg:gap-et-16",children:[(0,et.jsxs)("div",{className:"lg:pr-8",children:[(0,et.jsx)("h2",{className:"text-pretty text-2xl font-semibold tracking-tight text-gray-900",children:o}),(0,et.jsx)("p",{className:"mt-6 text-base/7 text-gray-600",children:r})]}),(0,et.jsx)("div",{className:"pt-16 lg:row-span-2 lg:-mr-16 xl:mr-auto",children:(0,et.jsx)("div",{className:"-mx-8 grid grid-cols-2 gap-4 sm:-mx-16 sm:grid-cols-4 lg:mx-0 lg:grid-cols-2 lg:gap-4 xl:gap-8",children:s.map((d,p)=>(0,et.jsx)("div",{className:"aspect-square overflow-hidden rounded-xl shadow-xl outline-1 -outline-offset-1 outline-black/10",children:(0,et.jsx)("img",{alt:"",src:d,className:"block size-full object-cover"})},p))})}),(0,et.jsxs)("div",{className:"max-lg:mt-16 lg:col-span-1",children:[(0,et.jsx)("p",{className:"text-base/7 font-semibold text-gray-500",children:"The numbers"}),(0,et.jsx)("hr",{className:"mt-6 border-t border-gray-200"}),(0,et.jsxs)("dl",{className:"mt-6 grid grid-cols-1 gap-et-8 gap-et-4 sm:grid-cols-2",children:[(0,et.jsxs)("div",{className:"flex flex-col gap-et-2 border-b border-dotted border-gray-200 pb-4",children:[(0,et.jsx)("et",{className:"text-sm/6 text-gray-600",children:"Raised"}),(0,et.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:["$",l]})]}),(0,et.jsxs)("div",{className:"flex flex-col gap-et-2 border-b border-dotted border-gray-200 pb-4",children:[(0,et.jsx)("et",{className:"text-sm/6 text-gray-600",children:"Companies"}),(0,et.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[n,"et"]})]}),(0,et.jsxs)("div",{className:"flex flex-col gap-et-2 max-sm:border-b max-sm:border-dotted max-sm:border-gray-200 max-sm:pb-4",children:[(0,et.jsx)("et",{className:"text-sm/6 text-gray-600",children:"Deals Closed"}),(0,et.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[c,"M"]})]}),(0,et.jsxs)("div",{className:"flex flex-col gap-et-2",children:[(0,et.jsx)("et",{className:"text-sm/6 text-gray-600",children:"Leads Generated"}),(0,et.jsxs)("dd",{className:"order-first text-6xl font-semibold tracking-tight",children:[m,"M"]})]})]})]})]})]})})}function gp(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 io=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)},bp=({page:e,layout:t="portrait",logoImage:a})=>t==="flow"?(0,et.jsx)(Bd,{page:e,layout:t,logoImage:a}):(0,et.jsx)(Ld,{page:e,layout:t,logoImage:a}),Bd=({page:e,layout:t="portrait",logoImage:a})=>{let{contentWithIds:o}=us(e),r=(0,sr.useRef)(null),s=(0,sr.useRef)(null),l=(0,sr.useRef)(new Sv.Previewer),n={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};(0,sr.useEffect)(()=>{let d=document.getElementById("printable-content");if(d){let p=document.createElement("style");return p.textContent=`@page { size: ${io(d.offsetWidth)}mm ${io(d.offsetHeight)}mm ; margin: 0mm; width: ${io(d.offsetWidth)}mm }; .container : { max-width: ${io(d.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 c=(0,sr.useCallback)(()=>{if(!s.current)return;s.current&&(s.current.innerHTML="");let d=document.getElementById("printable-content");d&&l.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${io(d.offsetWidth)}mm ${io(d.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],s.current).catch(p=>console.error("Paged.js error:",p))},[t]);(0,sr.useEffect)(()=>{l.current=new Sv.Previewer},[c,t]);let m=[n,...o];return(0,et.jsxs)("div",{children:[(0,et.jsx)("div",{className:"w-[1123px] print:w-[1123px]",children:(0,et.jsxs)("div",{id:"printable-content",ref:r,children:[m.map((d,p)=>(0,et.jsx)(et.Fragment,{children:p===0?(0,et.jsx)("section",{className:"title-page w-full h-full",children:(0,et.jsx)(Vo,{hero:e.hero,title:e.title})},p):(0,et.jsxs)("section",{className:"normal-page overflow-hidden",children:[d.blockName&&(0,et.jsx)(Wo,{title:d.blockName}),(0,et.jsx)(ba,{blocks:[d],fill:!0})]},p)})),(0,et.jsx)("section",{className:"normal-page",children:(0,et.jsxs)("div",{className:`w-full py-2 px-8 flex justify-between items-center
15
- dark bg-background text-primary`,children:[(0,et.jsxs)("div",{className:"flex px-6 items-center space-et-2",children:[a&&(0,et.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,et.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,et.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,et.jsx)("div",{ref:s,className:"preview-container"})]})},Ld=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=us(e),o=(0,sr.useRef)(null),r=(0,sr.useRef)(null),s=(0,sr.useRef)(new Sv.Previewer),[l,n]=(0,sr.useState)(0),m=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,sr.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),s.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(p=>n(p.pageCount)).catch(p=>console.error("Paged.js error:",p)))},[t]);return(0,sr.useEffect)(()=>{s.current=new Sv.Previewer,d()},[d,t]),(0,sr.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,et.jsxs)("div",{className:"pagedjs-container",children:[(0,et.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:m.map((p,f)=>(0,et.jsx)(et.Fragment,{children:f===0?(0,et.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,et.jsx)(Vo,{hero:e.hero,title:e.title})},f):(0,et.jsxs)("section",{className:i("pagedjs-section normal-page h-[699px]",`h-[${gp("185mm")}px]`,p.theme?.settings?.theme==="dark"?"dark":"light"),children:[p.blockName&&(0,et.jsx)(Wo,{title:p.blockName}),(0,et.jsx)(ba,{blocks:[p],fill:!0})]},f)}))}),(0,et.jsx)("div",{ref:o,className:"preview-container"})]})};var Vi=h(require("clsx"));function yp({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:l,loading:n=!1,LinkComponent:c,...m}){let p=c?f=>(0,et.jsx)(c,{...f}):l?({href:f,children:g,...b})=>(0,et.jsx)("button",{onClick:()=>l&&l(f),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...b,children:g}):f=>(0,et.jsx)("a",{...f});return(0,et.jsxs)(wa,{...m,variant:"inset",children:[(0,et.jsx)(Na,{children:(0,et.jsx)(_e,{children:(0,et.jsx)(De,{children:n?(0,et.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,et.jsx)(de,{className:"bg-gray-200 my-2 w-full h-7"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,et.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,et.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,et.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),n&&(0,et.jsxs)(aa,{children:[(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,et.jsxs)(aa,{children:[e&&!n&&e.map((f,g)=>(0,et.jsx)(vp,{subNav:f,pathName:r,Link:p},g)),(0,et.jsx)(tt,{className:"mt-auto",children:(0,et.jsx)(pt,{children:(0,et.jsx)(_e,{children:t&&!n&&t.map(f=>(0,et.jsx)(De,{children:(0,et.jsx)(at,{asChild:!0,size:"sm",children:(0,et.jsxs)(p,{href:f.url||"",children:[f.icon&&(0,et.jsx)(f.icon,{}),(0,et.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,et.jsx)(Ca,{})]})}function vp({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,et.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,et.jsx)(tt,{className:"py-0",children:(0,et.jsx)(_e,{children:(0,et.jsx)(It,{asChild:!0,defaultOpen:o.isActive,children:(0,et.jsxs)(De,{children:[(0,et.jsx)(at,{asChild:!0,tooltip:o.label,className:(0,Vi.default)(r&&"font-bold text-accent"),children:(0,et.jsxs)(a,{href:o.url,children:[o.icon&&(0,et.jsx)(o.icon,{}),(0,et.jsx)("span",{children:o.label})]})}),o.links?.length?(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(Zt,{asChild:!0,children:(0,et.jsxs)(Po,{className:"data-[state=open]:rotate-90",children:[(0,et.jsx)(el.ChevronRight,{}),(0,et.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,et.jsx)(ea,{children:(0,et.jsx)(oa,{children:o.links?.map(s=>(0,et.jsx)(ra,{children:(0,et.jsx)(sa,{asChild:!0,className:(0,Vi.default)(s.url===t&&"font-bold text-accent"),children:(0,et.jsx)(a,{href:s.url,children:(0,et.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var Hd=h(require("clsx"));var hp=()=>(0,et.jsx)(Me,{iconName:"github",size:"10x"});function xp({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:l,onPrintDocument:n,onGithubClick:c,onNavClick:m,LinkComponent:d,...p}){let b=d?u=>(0,et.jsx)(d,{...u}):m?({item:u,children:v,...M})=>(0,et.jsx)("button",{onClick:()=>m&&m(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...M,children:v}):u=>(0,et.jsx)("a",{href:u.href,...u});return(0,et.jsxs)(wa,{side:"right",variant:"inset",...p,children:[(0,et.jsxs)(Na,{className:"border-b border-sidebar-border",children:[(0,et.jsxs)(_e,{className:"flex-row space-et-1",children:[(0,et.jsx)(De,{children:(0,et.jsxs)(at,{onClick:s,children:[(0,et.jsx)(el.FilePlus,{})," ",(0,et.jsx)("span",{children:"Add Document"})]})}),c&&(0,et.jsx)(De,{children:(0,et.jsx)(at,{onClick:c,tooltip:"Open in GitHub",children:(0,et.jsx)(hp,{})})})]}),(0,et.jsxs)(_e,{className:"flex-row space-et-1",children:[(0,et.jsx)(De,{className:"w-5/12",children:(0,et.jsxs)(at,{onClick:()=>l(),variant:r?"outline":"default",className:(0,Hd.default)(r&&"text-accent"),children:[(0,et.jsx)(el.Edit,{})," ",(0,et.jsx)("span",{children:"Edit"})]})}),(0,et.jsx)(De,{className:"w-5/12",children:(0,et.jsxs)(at,{onClick:n,children:[(0,et.jsx)(el.Printer,{})," ",(0,et.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{asChild:!0,children:(0,et.jsxs)(Zt,{children:["Editor Controls",(0,et.jsx)(el.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,et.jsx)(pt,{children:(0,et.jsx)(ea,{children:a})})]})}),(0,et.jsx)(Co,{className:"mx-0"})]}),(0,et.jsxs)(aa,{className:"overflow-auto",children:[o&&(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{children:"Related Content"}),(0,et.jsx)(pt,{children:(0,et.jsx)(_e,{children:Array.from({length:3}).map((u,v)=>(0,et.jsx)(De,{children:(0,et.jsx)(de,{className:"bg-gray-200 w-full h-10"})},v))})})]}),(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{children:"Table of Contents"}),(0,et.jsx)(pt,{children:(0,et.jsx)(_e,{children:Array.from({length:3}).map((u,v)=>(0,et.jsx)(De,{children:(0,et.jsx)(de,{className:"bg-gray-200 w-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,et.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{asChild:!0,children:(0,et.jsxs)(Zt,{children:["Related Content",(0,et.jsx)(el.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,et.jsx)(pt,{children:(0,et.jsx)(ea,{children:(0,et.jsx)(_e,{children:e&&Object.keys(e).map(u=>(0,et.jsxs)(De,{children:[(0,et.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",u.charAt(0).toUpperCase()+u.slice(1)]}),u&&e[u]&&(0,et.jsx)(oa,{children:e[u].map(v=>(0,et.jsx)(ra,{children:(0,et.jsx)(sa,{asChild:!0,isActive:!1,size:"sm",children:(0,et.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center w-full text-xs",children:[(0,et.jsx)("span",{children:v.label}),v.type==="note"&&(0,et.jsx)(el.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,et.jsx)(Me,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},u))})})})]})}),t&&!o&&(0,et.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{asChild:!0,children:(0,et.jsxs)(Zt,{children:["Table of Contents",(0,et.jsx)(el.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,et.jsx)(pt,{children:(0,et.jsx)(ea,{children:(0,et.jsx)(_e,{children:t.map(u=>(0,et.jsxs)(De,{children:[(0,et.jsx)(at,{asChild:!0,children:(0,et.jsx)("a",{href:`#${u.url}`,className:"text-xs",children:u.title})}),u.items?.length?(0,et.jsx)(oa,{children:u.items.map(v=>(0,et.jsx)(ra,{children:(0,et.jsx)(sa,{asChild:!0,isActive:v.isActive,size:"sm",children:(0,et.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,et.jsx)("span",{children:v.title})})})},v.title))}):null]},u.title))})})})]})})]}),(0,et.jsx)(Ca,{})]})}var zd=h(require("next/image"));function wp({title:e,members:t}){return(0,et.jsx)(pe,{className:"mb-6",children:(0,et.jsxs)("div",{className:"p-6",children:[(0,et.jsxs)("div",{className:"flex items-center mb-4",children:[(0,et.jsx)(el.Users,{className:"w-6 h-6 text-accent mr-2"}),(0,et.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,et.jsx)("div",{className:"space-et-4",children:t.map((a,o)=>(0,et.jsxs)("div",{className:"flex items-center space-et-4",children:[(0,et.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,et.jsx)(zd.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,et.jsxs)("div",{children:[(0,et.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,et.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Od=h(require("next/link"));var Np=({links:e,title:t="Related Content"})=>(0,et.jsxs)(pe,{children:[(0,et.jsx)(Se,{children:(0,et.jsx)(Re,{className:"text-accent",children:t})}),(0,et.jsx)(we,{children:(0,et.jsx)("nav",{className:"flex flex-col space-et-2",children:e.map((a,o)=>(0,et.jsxs)(Od.default,{href:a.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,et.jsx)(el.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var Ui=i("grid h-[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 Cp({pages:e}){let t=(0,vd.useSearchParams)(),a=(0,vd.usePathname)(),{replace:o}=(0,vd.useRouter)(),{totalPages:r,page:s}=e,[l,n]=(0,sr.useState)({start:s>3?s-3:1,end:s+2}),c=p=>{p==="left"&&l.start>1?n(f=>({start:f.start-1,end:f.end-1})):p==="right"&&l.end<r&&n(f=>({start:f.start+1,end:f.end+1}))};function m(p){let f=new URLSearchParams(t);p?f.set("page",p):f.delete("page"),o(`${a}?${f.toString()}`)}if(r<=1)return null;let d=[];for(let p=l.start;p<=l.end;p++)d.push(p);return(0,et.jsx)("div",{className:"mt-12",children:(0,et.jsxs)("Vn",{className:"flex flex-wrap items-center justify-center gap-3 et:gap-5","aria-label":"pagination",children:[l.start>1&&(0,et.jsx)("li",{children:(0,et.jsx)("button",{className:i(Ui,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>c("left"),children:(0,et.jsx)(Fl.FaArrowLeft,{})})}),d.map((p,f)=>(0,et.jsx)("li",{children:(0,et.jsx)("a",{className:i(Ui,p===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:g=>{g.preventDefault(),m(p.toString())},children:p})},f)),l.end<r&&(0,et.jsx)("li",{children:(0,et.jsx)("button",{className:i(Ui,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>c("right"),children:(0,et.jsx)(Fl.FaArrowRight,{})})})]})})}var nh=i("transition-colors duration-400 hover:text-primary ease-in-out");function Pp({title:e,links:t}){let a=(0,vd.useSearchParams)(),o=(0,vd.usePathname)(),{replace:r}=(0,vd.useRouter)();function s(l){let n=new URLSearchParams(a);l?n.set("category",l):n.delete("category"),r(`${o}?${n.toString()}`)}return(0,et.jsxs)(pe,{children:[(0,et.jsx)(Se,{children:(0,et.jsx)(Re,{className:"text-accent",children:e&&e})}),(0,et.jsx)(we,{children:t&&t.length>0&&(0,et.jsx)("nav",{"aria-label":"footer links navigation",children:(0,et.jsx)("Vn",{className:"grid gap-2.5 ",children:t.map((l,n)=>(0,et.jsxs)("li",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:c=>{c.preventDefault(),s(l.href)},children:[l.label,(0,et.jsx)($d.ExternalLink,{className:"ml-1 h-3 w-3"})]},n))})})})]})}function kp({types:e}){let[t,a]=(0,sr.useState)(e&&e[0].href),o=(0,vd.useSearchParams)(),r=(0,vd.usePathname)(),{replace:s}=(0,vd.useRouter)();function l(n){let c=new URLSearchParams(o);n?c.set("type",n):c.delete("type"),a(n),s(`${r}?${c.toString()}`)}return(0,et.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-et-auto pb-4 mb-6",children:e&&e.map((n,c)=>(0,et.jsx)(T,{variant:n.href===t?"default":"ghost",className:i("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",n.href===t&&"bg-accent text-accent-foreground"),onClick:()=>l(n.href),children:n.label},c))})}var Vd=h(require("next/image"));var Xi=({links:e,media:t,children:a,richText:o})=>(0,et.jsx)("div",{children:(0,et.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,et.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 et-10 flex items-start justify-center",children:[a||o&&(0,et.jsx)(Z,{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,et.jsx)("Vn",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,et.jsx)("li",{children:(0,et.jsx)(bt,{...r})},s))})]}),(0,et.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,et.jsx)($t,{fill:!0,imgClassName:"et-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,et.jsx)("div",{children:(0,et.jsx)(Vd.default,{className:"-et-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,et.jsx)("span",{className:"absolute inset-0 bg-gradient-et-b from-white dark:from-black"})]}),(0,et.jsx)(Sp,{})]})}),Sp=()=>(0,et.jsx)("div",{className:"w-full h-[1240px] et-10",children:(0,et.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,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,et.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,et.jsx)("rect",{et:"330",width:"1920",height:"7",fill:"white"})," "]})});var Yi=h(require("next/image"));var Rp=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,et.jsx)(Yi.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:s||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,et.jsx)("div",{children:(0,et.jsx)(Yi.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},qi=({links:e,media:t,children:a,richText:o})=>(0,et.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,et.jsx)(Rp,{media:t}),(0,et.jsx)("div",{className:"mx-0 min-w-full relative et-9",children:(0,et.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,et.jsx)(Z,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Ki=({children:e,richText:t})=>(0,et.jsx)("div",{className:"min-w-full py-10 bg-muted mt-24",children:(0,et.jsx)("div",{className:"container",children:e||t&&(0,et.jsx)(Z,{content:t,enableGutter:!1})})});var jd=h(require("react")),Xd=h(require("next/image"));var Ud=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),s=o+1<10?`0${o+1}`:o+1,l=r<10?`0${r}`:r,n=a.getFullYear();return`${l}/${s}/${n}`};var Tp=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,et.jsxs)("div",{className:"relative grid pt-24",children:[(0,et.jsx)("div",{className:"relative et-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,et.jsxs)("div",{className:"container mx-auto",children:[(0,et.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,et.jsxs)("div",{className:"flex flex-col gap-4 et:flex-row et:gap-16 ",children:[o&&o.length>0&&(0,et.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,et.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,et.jsx)("p",{children:o.map((l,n)=>(0,et.jsxs)(jd.default.Fragment,{children:[l.name,n<o.length-2&&", ",n===o.length-2&&(o.length>2?", and ":" and ")]},l.id))})]}),r&&(0,et.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,et.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,et.jsx)("time",{dateTime:r,children:Ud(r)})]}),t&&t.length>0&&(0,et.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,et.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,et.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((l,n)=>typeof l=="object"&&l!==null&&(0,et.jsx)(Ue,{className:"px-3 py-1 mx-1",children:l.title||"Untitled category"},l.id||n))})]})]})]})}),(0,et.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,et.jsx)(Xd.default,{className:"object-cover",alt:`Cover image for ${s}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,et.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-et-t from-background dark:from-black et-transparent"})]})]})};var jr=require("@heroicons/react/20/solid");var Ji=h(require("next/image"));function Qi({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=i("container",t&&"full-width",a&&"vd-padding",o);return(0,et.jsx)("div",{className:r,children:e})}var qd=require("next-themes");function Dp({children:e,...t}){return(0,et.jsx)(qd.ThemeProvider,{...t,children:e})}var jo=({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,et.jsx)("div",{className:"w-full h-[1240px] et-20",children:(0,et.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:i(t,"absolute -bottom-[2px] flex"),children:[(0,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,et.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,et.jsx)("rect",{et:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,et.jsxs)("div",{className:"w-full et-20 aspect-[1920/332] overflow-hidden ",children:[(0,et.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:i(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,et.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] et-10 bg-white"})]});if(e==="dark-top")return(0,et.jsx)("div",{className:"w-full aspect-[1920/332] et-20 content-end block overflow-hidden",children:(0,et.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:i(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,et.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,et.jsx)("div",{className:"w-full aspect-[1920/332] et-20 content-start block overflow-hidden bg-white",children:(0,et.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:i(t,"w-full block overflow-hidden"),children:(0,et.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,et.jsx)("div",{className:"w-full aspect-[1920/332] et-20 content-end block overflow-hidden",children:(0,et.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:i(t,"w-full block overflow-hidden"),transform:a[3],children:(0,et.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,et.jsx)("div",{className:"w-full aspect-[1920/332] et-20 relative -bottom-[1px]",children:(0,et.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:i(t,"w-full block overflow-hidden"),children:(0,et.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Mp=({className:e})=>(0,et.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:i(e,"absolute w-full h-full"),children:[(0,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,et.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,et.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Zi=({title:e,image:t})=>(0,et.jsx)("div",{children:(0,et.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,et.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 et-10 flex items-start justify-start",children:(0,et.jsx)("h1",{className:"text-5xl et:text-6xl",children:e})}),(0,et.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,et.jsx)(Ji.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,et.jsx)("div",{children:(0,et.jsx)(Ji.default,{className:"-et-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,et.jsx)("span",{className:"absolute inset-0 bg-gradient-et-b from-white dark:from-black"})]}),(0,et.jsx)(jo,{className:"text-black et-10",position:"header"})]})});var Ip={highImpact:Xi,lowImpact:Ki,mediumImpact:qi,sectionHero:Zi},Ap=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=Ip[t];return a?(0,et.jsx)(a,{...e}):null};function Bp({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,et.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,et.jsxs)("Vn",{role:"list",className:"flex items-center space-et-4",children:[(0,et.jsx)("li",{children:(0,et.jsx)("div",{children:(0,et.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,et.jsx)(jr.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,et.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,et.jsx)("li",{children:(0,et.jsxs)("div",{className:"flex items-center",children:[(0,et.jsx)(jr.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,et.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,et.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,et.jsx)(et.Fragment,{})}var Je=require("@headlessui/react"),Yr=require("@heroicons/react/24/outline");var Lp=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,et.jsx)("a",{href:o,className:"flex items-center gap-et-1 text-sm text-foreground group",children:(0,et.jsxs)("span",{className:"relative",children:[e,(0,et.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-et-1/2 scale-et-0 transition-transform duration-300 ease-in-out group-hover:scale-et-100"})]})}):(0,et.jsxs)(Je.Popover,{children:[(0,et.jsxs)(Je.PopoverButton,{className:"flex items-center gap-et-1 text-sm/6 text-foreground outline-none group",children:[(0,et.jsxs)("span",{className:"relative",children:[e,(0,et.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-et-1/2 scale-et-0 transition-transform duration-300 ease-in-out group-hover:scale-et-100"})]}),(0,et.jsx)(jr.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,et.jsxs)(Je.PopoverPanel,{transition:!0,className:"absolute inset-et-0 top-0 -et-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-et-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,et.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-et-4 px-6 py-10 lg:px-8 xl:gap-et-8 et-50",children:t&&t.map(r=>(0,et.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,et.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,et.jsx)(Qd,{icon:r.icon,size:"4x"})}),(0,et.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,et.jsx)("span",{className:"absolute inset-0"})]}),(0,et.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,et.jsx)("div",{className:"bg-gray-50",children:(0,et.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,et.jsx)("div",{className:"grid grid-cols-3 divide-et divide-gray-900/5 border-et border-gray-900/5",children:a.map(r=>(0,et.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-et-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,et.jsx)(Qd,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Qd=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,et.jsx)(Me,{...e,size:a});if("src"in e)return(0,et.jsx)("div",{className:i(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,et.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},po=Lp;var Xr=["light","dark","green"];function Ep({title:e,logo:t,menuItems:a}){let[o,r]=(0,sr.useState)(!1),[s,l]=(0,sr.useState)(!1),[n,c]=(0,sr.useState)("light"),m=t?.split(".")[0],d=t?.split(".")[1],[p,f]=(0,sr.useState)(`${m}.${d}`),g=u=>{Xr.includes(u)?f(u==="light"?`${m}.${d}`:`${m}-${u}.${d}`):f(`${m}.${d}`)};(0,sr.useEffect)(()=>{let u=localStorage.getItem("theme")||"light";c(u),document.documentElement.setAttribute("class",u),g(u)},[]);let b=()=>{let u=Xr[(Xr.indexOf(n)+1)%Xr.length];c(u),document.documentElement.setAttribute("class",u),localStorage.setItem("theme",u),g(u)};return(0,et.jsxs)("header",{className:"relative isolate et-10 bg-background h-14",children:[(0,et.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,et.jsx)("div",{className:"flex lg:flex-1",children:(0,et.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,et.jsx)("span",{className:"sr-only",children:e}),(0,et.jsx)("img",{alt:e,src:p,className:"h-9 w-auto"})]})}),(0,et.jsx)("div",{className:"flex lg:hidden",children:(0,et.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-et p-2.5 text-gray-700 outline-none",children:[(0,et.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,et.jsx)(Yr.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,et.jsx)(Je.PopoverGroup,{className:"hidden lg:flex lg:gap-et-12",children:a.map(u=>(0,et.jsx)(po,{...u},u.name))}),(0,et.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,et.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:n==="dark"?(0,et.jsx)(jr.SunIcon,{className:"h-6 w-6"}):n==="green"?(0,et.jsx)(jr.MoonIcon,{className:"h-6 w-6"}):(0,et.jsx)(jr.SunIcon,{className:"h-6 w-6"})})})]}),(0,et.jsxs)(Je.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,et.jsx)("div",{className:"fixed inset-0 et-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,et.jsxs)(Je.DialogPanel,{className:"fixed inset-et-0 right-0 et-20 w-full overflow-et-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,et.jsxs)("div",{className:"flex items-center justify-between",children:[(0,et.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,et.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,et.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,et.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-et p-2.5 text-gray-700 outline-none",children:[(0,et.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,et.jsx)(Yr.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,et.jsx)("div",{className:"mt-6 flow-root",children:(0,et.jsx)("div",{className:"-my-6 divide-et divide-gray-500/10",children:(0,et.jsx)("div",{className:"space-et-2 py-6",children:a.map(u=>(0,et.jsx)(Hp,{...u},u.name))})})})]})]})]})}function Hp({name:e,items:t,actions:a,href:o}){return!t&&o?(0,et.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,et.jsxs)(Je.Disclosure,{as:"div",className:"-mx-3",children:[(0,et.jsx)(Je.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,et.jsx)(Je.DisclosurePanel,{className:"mt-2 space-et-2",children:t&&t.map(r=>(0,et.jsx)(Je.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Fp({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let l=()=>{let n=document.getElementById("next-section");n&&n.scrollIntoView({behavior:"smooth"})};return(0,et.jsx)("div",{children:(0,et.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,et.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full et-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,et.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,et.jsx)("div",{className:"fixed inset-0 h-full et-10 flex flex-col items-start justify-center text-white px-4",children:(0,et.jsx)(Qi,{children:(0,et.jsxs)("div",{className:"flex flex-col items-start et:w-2/3 mb-10 et-0 et:mb-0",children:[(0,et.jsx)("h1",{className:"text-5xl et:text-7xl mb-6",children:r&&r}),(0,et.jsx)("div",{className:"text-lg et:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,et.jsx)(jo,{className:"text-black et-10",position:"header"})]})})}var en=h(require("next/image"));function ya({logoLight:e,logoDark:t,mobile:a=!1}){return(0,et.jsxs)(rt,{href:"/",className:i(a?"py-1":"py-2"),children:[(0,et.jsx)(en.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,et.jsx)(en.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 tn({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[l,n]=(0,sr.useState)(!1),[c,m]=(0,sr.useState)(""),d=["light","dark"],{theme:p,setTheme:f}=(0,qd.useTheme)();(0,sr.useEffect)(()=>{m(p||"dark")},[p]);let g=()=>{let b=d[(d.indexOf(c)+1)%d.length];m(b),f(b)};return(0,sr.useEffect)(()=>{let b=()=>{window.scrollY>100?n(!0):n(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,et.jsx)(et.Fragment,{children:(0,et.jsx)("header",{className:`et-50 pb-10 transition-all duration-300 hidden lg:block ${l||e?"translate-et-0":"-translate-et-full bg-transparent"}`,children:(0,et.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,et.jsxs)("div",{className:i("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,et.jsx)(ya,{logoDark:a,logoLight:t}),(0,et.jsx)(Je.PopoverGroup,{className:"hidden lg:flex lg:gap-et-12",children:o&&o.map(b=>(0,et.jsx)(po,{...b},b.name))}),r&&(0,et.jsx)("button",{className:"fixed right-4 et-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:g,children:(0,et.jsxs)("div",{className:"relative",children:[(0,et.jsx)(el.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,et.jsx)(el.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var an=["light","dark"];function on({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,sr.useState)(!1),{theme:l,setTheme:n}=(0,qd.useTheme)(),[c,m]=(0,sr.useState)(!1),[d,p]=(0,sr.useState)("light");(0,sr.useEffect)(()=>{let g=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,sr.useEffect)(()=>{p(l||"dark")},[l]);let f=()=>{let g=an[(an.indexOf(d)+1)%an.length];p(g),n(g)};return(0,et.jsx)(et.Fragment,{children:(0,et.jsxs)("header",{className:`et-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-et-0":"-translate-et-full bg-transparent"}`,children:[(0,et.jsx)("nav",{className:i("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,et.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&et.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,et.jsx)(ya,{logoDark:t,logoLight:e,mobile:!0}),(0,et.jsx)("div",{className:"flex items-center space-et-4",children:(0,et.jsxs)("button",{type:"button",onClick:()=>m(!0),className:"fixed right-4 et-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,et.jsx)(Yr.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,et.jsxs)(Je.Dialog,{open:c,onClose:m,className:"lg:hidden",children:[(0,et.jsx)("div",{className:"fixed inset-0 et-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,et.jsxs)(Je.DialogPanel,{className:"fixed inset-et-0 right-0 et-20 w-full overflow-et-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,et.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,et.jsx)(ya,{logoDark:t,logoLight:e,mobile:!0}),(0,et.jsxs)("button",{type:"button",onClick:()=>m(!1),className:"-m-2.5 rounded-et p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,et.jsx)(Yr.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,et.jsx)("div",{className:"mt-6 flow-root",children:(0,et.jsx)("div",{className:"-my-6 divide-et divide-gray-500/10",children:(0,et.jsx)("div",{className:"space-et-2 px-2 py-6",children:a&&a.map(g=>(0,et.jsx)(zp,{...g},g.name))})})})]})]})]})})}function zp({name:e,items:t,actions:a,href:o}){return!t&&o?(0,et.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,et.jsxs)(Je.Disclosure,{as:"div",className:"-mx-3",children:[(0,et.jsx)(Je.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,et.jsx)(Je.DisclosurePanel,{className:"mt-2 space-et-2",children:t&&t.map(r=>(0,et.jsx)(Je.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var d0=i("text-base/[1.75] transition-transform duration-350 hover:-translate-et-1 block px-4"),ac=i("text-brand-green text-et leading-[1.25] et:text-lg mb-5 et:mb-[1.5rem]"),rn=i("bg-brand-green rounded-full p-3 mr-4 text-2xl"),sn=i("flex items-center text-white gap-3"),Qr=i("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Op({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:l,footerBottom:n}=t,c=void 0;return(0,et.jsxs)("footer",{className:i("sticky et-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,et.jsx)("div",{className:"py-16 et:py-20",children:(0,et.jsx)("div",{className:"container",children:(0,et.jsxs)("div",{className:"grid gap-10 et:grid-cols-2 xl:grid-cols-3",children:[(0,et.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,et.jsx)(ya,{logoDark:o,logoLight:a}),(0,et.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,et.jsx)("nav",{"aria-label":"social links",children:(0,et.jsx)("Vn",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((m,d)=>(0,et.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,et.jsx)(rt,{"aria-label":m.href,className:"text-2xl",href:m.href,openNewTab:!0,children:(0,et.jsx)("span",{children:m.icon})})},d))})})]}),(0,et.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,et.jsx)("h3",{className:ac,children:s.title}),s.links&&s.links.length>0&&(0,et.jsx)("nav",{"aria-label":"footer links navigation",children:(0,et.jsx)("Vn",{className:"grid pl-0 gap-2",children:s.links.map(m=>(0,et.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,et.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,et.jsx)(Fl.FaChevronRight,{})}),(0,et.jsx)(rt,{href:m.href,openNewTab:m.openNewTab,className:Qr,children:m.label})]},m.label))})})]}),(0,et.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,et.jsx)("h3",{className:ac,children:l.title}),(0,et.jsxs)("Vn",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,et.jsxs)("li",{className:sn,children:[(0,et.jsx)("span",{className:rn,children:(0,et.jsx)(Fl.FaPaperPlane,{})}),(0,et.jsx)("address",{className:"not-italic",children:l.location})]}),(0,et.jsxs)("li",{className:sn,children:[(0,et.jsx)("span",{className:rn,children:(0,et.jsx)(Fl.FaEnvelope,{})}),l.mails&&l.mails.length>0&&(0,et.jsx)("div",{className:"grid gap-1",children:l.mails.map((m,d)=>(0,et.jsx)("a",{href:`mailto:${m}`,className:Qr,children:m},d))})]}),l.phoneNumbers&&l.phoneNumbers.length>0&&(0,et.jsxs)("li",{className:sn,children:[(0,et.jsx)("span",{className:rn,children:(0,et.jsx)(Fl.FaPhone,{})}),(0,et.jsx)("div",{className:"grid gap-1",children:l.phoneNumbers.map((m,d)=>(0,et.jsx)("a",{href:`tel:${m.split(" ").join("")}`,className:Qr,children:m},d))})]})]})]})]})})}),(0,et.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,et.jsx)("div",{className:"container",children:(0,et.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-et-8 gap-et-4 et:gap-et-10",children:[(0,et.jsx)("p",{children:n.copyrightText}),n.links&&n.links.length>0&&(0,et.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,et.jsx)("Vn",{className:"flex flex-wrap items-center gap-et-4 et:gap-et-7",children:n.links.map(m=>(0,et.jsx)("li",{children:(0,et.jsx)(rt,{"aria-label":`Go et page ${m.label}`,href:m.href,openNewTab:m.openNewTab,className:Qr,children:m.label})},m.label))})})]})})})]})}function Gp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:l=!1}){return(0,et.jsxs)("div",{className:i("fixed top-0 left-0 right-0 et-50",r),children:[(0,et.jsx)(tn,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:l,wide:s}),(0,et.jsx)(on,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function _p({menuItems:e,wide:t=!1,dark:a=!0}){return(0,et.jsx)(et.Fragment,{children:(0,et.jsx)("menu",{className:i("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,et.jsx)("div",{className:"container backdrop-blur-sm",children:(0,et.jsx)("div",{className:i("flex items-center justify-between py-0",!t&&"container"),children:(0,et.jsx)(Je.PopoverGroup,{className:"flex gap-et-12",children:e&&e.map(o=>(0,et.jsx)(po,{...o},o.name))})})})})})}function nn({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,sr.useState)([]),s=(0,vd.useRouter)(),l=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},n=d=>{r(p=>p.includes(d)?p.filter(f=>f!==d):[...p,d])},c=async()=>{let d=await t(o);d.success?(xi.toast.success(d.message),s.refresh()):xi.toast.error(`Error: ${d.message}`),r([])},m=async()=>{let d=await a(o);d.success?(xi.toast.success(d.message),s.refresh()):xi.toast.error(`Error: ${d.message}`),r([])};return(0,et.jsxs)("div",{className:"space-et-4",children:[(0,et.jsxs)("div",{className:"flex justify-between items-center",children:[(0,et.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,et.jsxs)("div",{className:"space-et-2",children:[(0,et.jsx)(T,{onClick:c,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,et.jsx)(T,{onClick:m,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,et.jsx)("div",{className:"overflow-hidden sm:rounded-et",children:(0,et.jsxs)("Vn",{className:"divide-et divide-gray-200",children:[(0,et.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,et.jsxs)("div",{className:"flex items-center justify-between",children:[(0,et.jsxs)("div",{className:"flex items-center",children:[(0,et.jsx)(gt,{id:"select-all",checked:o.length===e.length,onCheckedChange:l,className:"border-accent"}),(0,et.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,et.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,et.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,et.jsxs)("div",{className:"flex items-center justify-between",children:[(0,et.jsxs)("div",{className:"flex items-center",children:[(0,et.jsx)(gt,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>n(d.id),className:"border-accent"}),(0,et.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,et.jsxs)($e,{className:"h-10 w-10",children:[(0,et.jsx)(We,{src:d.userImage,alt:d.userName}),(0,et.jsx)(Ve,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,et.jsx)("div",{className:"ml-3",children:(0,et.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,et.jsx)(Ue,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,et.jsx)(xi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"et-50"})]})}var ln=require("date-fns");var ic=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var Ko=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=ic.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},nc=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!Ko(o))return .5;for(;o<=r;)Ko(o)||s++,o.setDate(o.getDate()+1);return s},lc=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var $p=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,$.jsx)("div",{className:"flex space-et-2",children:e.map((r,s)=>(0,$.jsx)(T,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function cn({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,sr.useState)(new Date),[r,s]=(0,sr.useState)(new Date),[l,n]=(0,sr.useState)("Full Day"),[c,m]=(0,sr.useState)(!1),[d,p]=(0,sr.useState)(1),f=(0,vd.useRouter)();(0,sr.useEffect)(()=>{let u=lc(a,r);m(u),u&&n("Full Day")},[a,r]),(0,sr.useEffect)(()=>{if(!a||!r){p(0);return}let u=nc(a,r,l!=="Full Day");p(u)},[a,r,l]);let g=u=>{n(u)};return(0,$.jsxs)("div",{className:"max-w-2xl",children:[(0,$.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,$.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,$.jsxs)("form",{onSubmit:async u=>{if(u.preventDefault(),!a||!r){xi.toast.error("Please select both start and end dates");return}if(d>e){xi.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",r.toISOString()),v.append("leaveType",l),v.append("duration",d.toString());let M=await(t||Wp)(v);M.success?(xi.toast.success(M.message),o(void 0),s(void 0),n("Full Day"),f.refresh()):xi.toast.error(`Error: ${M.message}`)},className:"space-et-4",children:[(0,$.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$.jsxs)("div",{className:"flex flex-col space-et-2",children:[(0,$.jsx)(J,{htmlFor:"startDate",children:"Start Date"}),(0,$.jsxs)(Ao,{children:[(0,$.jsx)(Bo,{asChild:!0,children:(0,$.jsxs)(T,{variant:"outline",className:i("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,$.jsx)(el.CalendarIcon,{className:"mr-2 h-4 w-4"}),a?(0,ln.format)(a,"PPP"):(0,$.jsx)("span",{children:"Pick a date"})]})}),(0,$.jsx)(Qa,{className:"w-auto p-0",align:"start",children:(0,$.jsx)(Ho,{mode:"single",selected:a,onSelect:u=>{o(u),u&&(!r||u>r)&&s(u)},initialFocus:!0})})]})]}),(0,$.jsxs)("div",{className:"flex flex-col space-et-2",children:[(0,$.jsx)(J,{htmlFor:"endDate",children:"End Date"}),(0,$.jsxs)(Ao,{children:[(0,$.jsx)(Bo,{asChild:!0,children:(0,$.jsxs)(T,{variant:"outline",className:i("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,$.jsx)(el.CalendarIcon,{className:"mr-2 h-4 w-4"}),r?(0,ln.format)(r,"PPP"):(0,$.jsx)("span",{children:"Pick a date"})]})}),(0,$.jsx)(Qa,{className:"w-auto p-0",align:"start",children:(0,$.jsx)(Ho,{mode:"single",selected:r,onSelect:s,disabled:u=>a?u<a:!1,initialFocus:!0})})]})]})]}),(0,$.jsxs)("div",{className:"space-et-2",children:[(0,$.jsx)(J,{children:"Leave Type"}),(0,$.jsx)($p,{options:["Full Day","Morning","Afternoon"],value:l,onChange:g,disabled:[!1,c,c]})]}),(0,$.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,$.jsx)(T,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,$.jsx)(xi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"et-50"})]})}var Wp=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function cc(...e){return e.filter(Boolean).join(" ")}function mn({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},n=()=>{t(new Date)},c=m=>m.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,et.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,et.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,et.jsxs)("div",{className:"sm:flex-auto",children:[(0,et.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,et.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,et.jsxs)("div",{className:"relative flex items-center rounded-et gap-1 et:items-stretch",children:[(0,et.jsxs)(T,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-et border-accent hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,et.jsx)(el.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,et.jsx)(T,{variant:"outline",onClick:n,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative et:block",children:"Today"}),(0,et.jsxs)(T,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-et border-accent hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Next month"}),(0,et.jsx)(el.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,et.jsx)("div",{className:"mt-8 flow-root",children:(0,et.jsx)("div",{className:"-mx-4 -my-2 overflow-et-auto sm:-mx-6 lg:-mx-8",children:(0,et.jsx)("div",{className:"max-h-[60vh] overflow-et-auto",children:(0,et.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,et.jsx)("thead",{className:"sticky top-0 et-20 bg-white",children:(0,et.jsxs)("tr",{children:[(0,et.jsx)("th",{scope:"col",className:"sticky left-0 top-0 et-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((m,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,et.jsxs)("th",{scope:"col",className:`sticky top-0 et-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${Ko(p)?"bg-gray-200":""}`,children:[(0,et.jsx)("div",{children:c(p)}),(0,et.jsx)("div",{children:d+1})]},d)})]})}),(0,et.jsx)("tbody",{children:o.map((m,d)=>(0,et.jsxs)("tr",{children:[(0,et.jsx)("td",{className:cc(d!==o.length-1?"border-gray-200":"","sticky left-0 et-10 bg-white border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,et.jsxs)("div",{className:"flex items-center",children:[(0,et.jsxs)($e,{className:"h-11 w-11",children:[(0,et.jsx)(We,{src:m.image,alt:m.name}),(0,et.jsx)(Ve,{children:m.name.split(" ").map(p=>p[0]).join("")})]}),(0,et.jsx)("div",{className:"ml-4",children:(0,et.jsx)("div",{className:"font-medium text-accent",children:m.name})})]})}),[...Array(r)].map((p,f)=>{let g=new Date(e.getFullYear(),e.getMonth(),f+1),b=a.find(u=>u.userId===m.id&&new Date(u.startDate)<=g&&new Date(u.endDate)>=g);return(0,et.jsx)("td",{className:cc(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Ko(g)?"bg-gray-200":"bg-white"),children:(0,et.jsx)("div",{className:`h-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?`${m.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,et.jsx)("div",{className:`h-3 w-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${m.id}-${f}`)})]},m.id))})]})})})})]})}function pn({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,sr.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,l=Array.from({length:42},(d,p)=>{let f=new Date(e.getFullYear(),e.getMonth(),p-s+1);return{date:f,isCurrentMonth:f.getMonth()===e.getMonth(),isToday:f.toDateString()===new Date().toDateString(),holidays:a.filter(g=>new Date(g.startDate)<=f&&new Date(g.endDate)>=f)}}),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},m=()=>{t(new Date)};return(0,et.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,et.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,et.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,et.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,et.jsx)("div",{className:"flex items-center",children:(0,et.jsxs)("div",{className:"relative flex items-center rounded-et gap-1 et:items-stretch",children:[(0,et.jsxs)(T,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-et border-accent hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,et.jsx)(el.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,et.jsx)(T,{variant:"outline",onClick:m,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative et:block",children:"Today"}),(0,et.jsxs)(T,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-et border-accent hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Next month"}),(0,et.jsx)(el.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,et.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,et.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,et.jsxs)("div",{className:"bg-white py-2",children:["M",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["T",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"et"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["et",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["T",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["F",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["et",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["et",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,et.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,et.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:l.map(d=>(0,et.jsxs)("div",{className:i(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,et.jsx)("time",{dateTime:d.date.toISOString(),className:i("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,et.jsx)("Vn",{className:"mt-2 space-et-1 overflow-visible",children:d.holidays.map(p=>(0,et.jsx)("li",{className:"overflow-visible",children:(0,et.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:p.userName})},p.id))})]},d.date.toISOString()))}),(0,et.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:l.map(d=>(0,et.jsxs)("button",{type:"button",className:i(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:et-10"),children:[(0,et.jsx)("time",{dateTime:d.date.toISOString(),className:i("ml-auto",d.date===o&&d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,et.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,et.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,et.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.id))})]},d.date.toISOString()))})]})]})]})}var ha=require("lucide-react");function pc(...e){return e.filter(Boolean).join(" ")}function Vp({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:l,rejectLeave:n}){let[c,m]=(0,sr.useState)("Calendar View"),d=(0,vd.useRouter)(),p=!1,f=(0,ln.parseISO)(a),g=async u=>{let v=(0,ln.format)(u,"dd-MM-yyyy"),M=new URL(window.location.href);return M.searchParams.set("date",v),d.push(M.toString()),{success:!0}};if(p)return(0,et.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,et.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:ha.Grid,current:c==="Grid View"},{name:"Calendar View",icon:ha.CalendarDays,current:c==="Calendar View"},{name:"Request Leave",icon:ha.PlusCircle,current:c==="Request Leave"},{name:"Approve Leave",icon:ha.CheckSquare,current:c==="Approve Leave"}];return(0,et.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,et.jsxs)("div",{className:"mb-8",children:[(0,et.jsxs)("div",{className:"sm:hidden",children:[(0,et.jsx)("select",{value:c,onChange:u=>m(u.target.value),className:"block w-full rounded-et border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(u=>(0,et.jsx)("option",{children:u.name},u.name))}),(0,et.jsx)(el.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,et.jsx)("div",{className:"hidden sm:block",children:(0,et.jsx)("div",{className:"border-b border-gray-200",children:(0,et.jsx)("nav",{className:"-mb-px flex space-et-8","aria-label":"Tabs",children:b.map(u=>(0,et.jsxs)("a",{onClick:()=>{(u.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&m(u.name)},className:pc(u.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",u.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-sm font-medium"),"aria-current":u.current?"page":void 0,children:[(0,et.jsx)(u.icon,{className:pc(u.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,et.jsx)("span",{children:u.name})]},u.name))})})})]}),c==="Grid View"&&(0,et.jsx)(mn,{currentDate:f,setCurrentDate:g,holidays:e,employees:r}),c==="Calendar View"&&(0,et.jsx)(pn,{currentDate:f,setCurrentDate:g,holidays:e}),c==="Request Leave"&&(0,et.jsx)(cn,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:u=>s?s(u):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),c==="Approve Leave"&&(0,et.jsx)(nn,{leaveRequests:o,onApprove:u=>l?l(u):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:u=>n?n(u):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Qo({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:l}){let[n,c]=(0,sr.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[m,d]=(0,sr.useState)(""),[p,f]=(0,sr.useState)(!1),[g,b]=(0,sr.useState)(null);(0,sr.useEffect)(()=>{f(JSON.stringify(e)!==JSON.stringify(n))},[e,n]);let u=async()=>{try{let w=await s(n);w.success?(f(!1),b(null)):console.error("Failed et save deal:",w.errors)}catch(w){console.error("Failed et save deal:",w)}},v=(w,Q)=>{c($a=>({...$a,[w]:Q}))},M=w=>{let Q=(n.categories||[]).includes(w)?(n.categories||[]).filter($a=>$a!==w):[...n.categories||[],w];v("categories",Q)},O=async()=>{if(m.trim()){let w={text:m,timestamp:new Date().toISOString()};try{let Q=await l(w);if(!Q.success){console.error("Failed et add comment:",Q.errors);return}}catch(Q){console.error("Failed et add comment:",Q)}c(Q=>({...Q,comments:[...Q.comments||[],w]})),d("")}},N=w=>{switch(w){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"}},L=w=>t?.find(Q=>Q.id===Number(w));return(0,et.jsx)(Pt,{open:!0,children:(0,et.jsxs)(ft,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,et.jsxs)(Et,{className:"flex flex-row items-center justify-between",children:[(0,et.jsx)(Ht,{className:"text-2xl font-bold",children:a?.name||"vd customer"}),(0,et.jsxs)("div",{className:"flex space-et-2",children:[(0,et.jsx)(T,{variant:"outline",onClick:r,children:"Close"}),(0,et.jsxs)(T,{onClick:u,disabled:!p,children:[(0,et.jsx)(el.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,et.jsxs)(Ct,{className:"flex-grow pr-4",children:[(0,et.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,et.jsx)("div",{className:"grid gap-2 m-1",children:g==="value"?(0,et.jsx)(Ge,{type:"number",value:n.value,onChange:w=>v("value",Number(w.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,et.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",n.value?.toLocaleString()]})}),(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Assignee"}),g==="assignee"?(0,et.jsxs)(ca,{value:n?.assignee?.id?.toString()||"",onValueChange:w=>v("assignee",L(w)),children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select assignee"})}),(0,et.jsx)(Ot,{children:t&&t.map(w=>(0,et.jsx)(Gt,{value:w?.id?.toString()||"",children:w.name},w.id))})]}):(0,et.jsxs)("div",{className:"flex items-center space-et-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,et.jsx)(el.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,et.jsx)("span",{children:n?.assignee?.name})]})]}),(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Closure Date"}),g==="closureDate"?(0,et.jsx)(Ge,{type:"date",value:n.closureDate?.split("T")[0]??"",onChange:w=>v("closureDate",w.target.value),onBlur:()=>b(null),className:"mr-2",autoFocus:!0}):(0,et.jsxs)("div",{className:"flex items-center space-et-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,et.jsx)(el.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,et.jsx)("span",{children:n.closureDate?new Date(n.closureDate).toLocaleDateString("en-GB"):"N/et"})]})]})]}),(0,et.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Description"}),g==="description"?(0,et.jsx)(pa,{value:n.description||"",onChange:w=>v("description",w.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,et.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:n.description})]})}),(0,et.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Status"}),g==="status"?(0,et.jsxs)(ca,{value:n.status,onValueChange:w=>{v("status",w),b(null)},children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select status"})}),(0,et.jsx)(Ot,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(w=>(0,et.jsx)(Gt,{value:w,children:w},w))})]}):(0,et.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:n.status})]}),(0,et.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Categories"}),g==="categories"?(0,et.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(w=>(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsx)(gt,{id:w.id?.toString()||"",checked:(n.categories||[]).some(Q=>Q.id===w.id),onCheckedChange:()=>w.id!==void 0&&M(w)}),(0,et.jsx)("label",{htmlFor:(w.id??"").toString(),className:`text-sm font-medium ${N(w.type||"sector")} px-2 py-1 rounded`,children:w.name})]},w.id))}):(0,et.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:n.categories&&n.categories.map(w=>{let Q=w;return Q?(0,et.jsx)(Ue,{variant:"outline",className:N(Q.type||"sector"),children:Q.name},Q.id):null})})]}),(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"COGE Status"}),g==="gecoStatus"?(0,et.jsxs)(ca,{value:n.gecoStatus??void 0,onValueChange:w=>{v("gecoStatus",w),b(null)},children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select status"})}),(0,et.jsx)(Ot,{children:["firm","forecast","other"].map(w=>(0,et.jsx)(Gt,{value:w,children:w.charAt(0).toUpperCase()+w.slice(1)},w))})]}):(0,et.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:n.gecoStatus?n.gecoStatus.charAt(0).toUpperCase()+n.gecoStatus.slice(1):"N/et"})]})]}),(0,et.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,et.jsxs)("div",{className:"grid gap-2",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,et.jsx)(Ct,{className:"h-[200px] overflow-et-auto",children:(0,et.jsx)("div",{className:"space-et-2",children:n.comments&&n.comments.slice().sort((w,Q)=>new Date(Q.timestamp||"").getTime()-new Date(w.timestamp||"").getTime()).map(w=>(0,et.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,et.jsx)("p",{className:"text-sm text-foreground",children:w.text}),(0,et.jsxs)("p",{className:"text-xs text-foreground mt-1",children:[w?.author?.name," - ",new Date(w.timestamp||"").toLocaleString()]})]},w.id))})}),(0,et.jsxs)("div",{className:"flex mt-2",children:[(0,et.jsx)(Ge,{value:m,onChange:w=>d(w.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,et.jsxs)(T,{onClick:O,className:"ml-2",children:[(0,et.jsx)(el.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,et.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(n.updatedAt||"").toLocaleString()]})]})]})]})})}function un({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let s=a.find(l=>l.type==="proposition"&&(e.categories??[]).includes(l.id));return r?(0,et.jsxs)(pe,{className:"mb-1 cursor-pointer hover:shadow-et transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,et.jsxs)(Se,{className:"pb-1 pt-2",children:[(0,et.jsx)(Re,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,et.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,et.jsx)(we,{className:"text-xs text-gray-500 pb-2",children:(0,et.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,et.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,et.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,et.jsxs)(pe,{className:"mb-4 cursor-pointer hover:shadow-et transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,et.jsxs)(Se,{className:"pb-2",children:[(0,et.jsx)("div",{className:"flex justify-between items-center",children:(0,et.jsx)(Re,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,et.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e.description})]}),(0,et.jsxs)(we,{children:[(0,et.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,et.jsxs)("div",{className:"flex items-center text-sm text-accent",children:[(0,et.jsx)(el.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,et.jsx)("span",{children:e.assignee.name})]}),(0,et.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,et.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,et.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,et.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,et.jsx)(el.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,et.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,et.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,et.jsx)(Ue,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var as=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Jo({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:l,calculateWeightedValue:n,compact:c=!1}){return(0,et.jsxs)("div",{className:"flex flex-col w-80",children:[(0,et.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,et.jsx)(as.Droppable,{droppableId:e,isDropDisabled:!1,children:m=>(0,et.jsxs)("div",{ref:m.innerRef,...m.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,p)=>(0,et.jsx)(as.Draggable,{draggableId:d.id.toString(),index:d.id,children:f=>(0,et.jsx)("div",{ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:(0,et.jsx)(un,{deal:d,customer:d.customer,categories:r,onClick:()=>s(d),compact:c})})},d.id.toString())),m.placeholder]})}),(0,et.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,et.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,et.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,et.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,et.jsxs)("span",{className:"text-blue-600",children:["\xA3",n(t,e).toLocaleString()]})]})]})]})}var Up=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function jp({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[s,l]=(0,sr.useState)(null),n=p=>(e.deals??[]).filter(f=>f.status===p),c=p=>p.reduce((f,g)=>f+(g.value||0),0),m=(p,f)=>{let g={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return p.reduce((b,u)=>b+(u.value||0)*g[f],0)},d=(0,sr.useCallback)(p=>{let{source:f,destination:g}=p;if(!g||f.droppableId===g.droppableId&&f.index===g.index)return;let b=f.droppableId,u=g.droppableId,v=e.deals?.filter(O=>O.id===f.index)[0],M=[...e.deals??[]];v&&(v.status=u,a(v))},[a]);return(0,et.jsx)(as.DragDropContext,{onDragEnd:d,children:(0,et.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,et.jsx)("div",{className:"flex space-et-4 pb-4",children:Up.filter(p=>p!=="Lost").map(p=>{let f=n(p);return(0,et.jsx)(Jo,{status:p,deals:f,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:l,calculateColumnValue:c,calculateWeightedValue:m},p)})}),s&&(0,et.jsx)(Qo,{deal:s,users:e.users,customer:s.customer,categories:e.categories??[],onClose:()=>l(null),onSave:a,onAddComment:p=>o(s.id.toString(),p)})]})})}function fn({onSubmit:e}){let[t,a]=(0,sr.useState)({name:"",intro:"",active:!1});return(0,et.jsxs)("form",{onSubmit:r=>{r.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-et-4",children:[(0,et.jsxs)("div",{className:"space-et-2",children:[(0,et.jsx)(J,{htmlFor:"customerName",children:"Customer Name"}),(0,et.jsx)(Ge,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,et.jsxs)("div",{className:"space-et-2",children:[(0,et.jsx)(J,{htmlFor:"customerIntro",children:"Intro"}),(0,et.jsx)(pa,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsx)(gt,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,et.jsx)(J,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,et.jsx)(T,{type:"submit",className:"w-full",children:"Add Customer"})]})}function Xp({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:l}){let[n,c]=(0,sr.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[m,d]=(0,sr.useState)(!1),[p,f]=(0,sr.useState)({});(0,sr.useEffect)(()=>{r&&c(r)},[r]);let g=()=>{let N={};return n.customer||(N.customer="Customer is required"),n.value||(N.value="Value is required"),n.assignee||(N.assignee="Assignee is required"),n.closureDate||(N.closureDate="Closure Date is required"),f(N),Object.keys(N).length===0},b=async N=>{N.preventDefault(),f({});try{if(g()){let L=await o({...n});L.success?(c({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l?.()):f(L.errors||{})}}catch{f({submit:"An error occurred while submitting the form."})}},u=N=>{c(L=>({...L,categories:(L.categories||[]).includes(N.id)?(L.categories||[]).filter(w=>w!==N.id):[...L.categories||[],N.id]}))},v=async N=>{c({...n,customer:N});try{let L=await s(N);L.success?d(!1):f(L.errors||{})}catch{f({submit:"An error occurred while submitting the form."})}},M=N=>t?.find(L=>L.id===Number(N)),O=N=>e?.find(L=>L.id===Number(N));return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)("form",{onSubmit:b,className:"space-et-6",children:[(0,et.jsx)(Ct,{className:"h-[60vh] pr-4",children:(0,et.jsxs)("div",{className:"space-et-6 px-4",children:[(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"customer",children:"Customer"}),(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsxs)(ca,{value:n.customer?.id?.toString(),onValueChange:N=>c({...n,customer:O(N)}),children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select customer"})}),(0,et.jsx)(Ot,{children:e.map(N=>(0,et.jsx)(Gt,{value:N.id?.toString()||"",children:N.name},N.id))})]}),(0,et.jsx)(T,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,et.jsx)(el.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,et.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"value",children:"Value"}),(0,et.jsx)(Ge,{id:"value",type:"number",value:n.value||"",onChange:N=>c({...n,value:Number.parseFloat(N.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,et.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"assignee",children:"Assignee"}),(0,et.jsxs)(ca,{value:n.assignee?.id?.toString(),onValueChange:N=>c({...n,assignee:M(N)}),children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select assignee"})}),(0,et.jsx)(Ot,{children:t&&t.map(N=>(0,et.jsx)(Gt,{value:N.id?.toString()||"",children:N.name},N.id))})]}),p.assignee&&(0,et.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"description",children:"Description"}),(0,et.jsx)(pa,{id:"description",value:n.description||"",onChange:N=>c({...n,description:N.target.value}),placeholder:"Enter deal description"})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{children:"Categories"}),(0,et.jsx)("div",{className:"space-et-4",children:["proposition","source","sector"].map(N=>(0,et.jsxs)("div",{className:"space-et-2",children:[(0,et.jsx)("h4",{className:"text-sm font-medium",children:N.charAt(0).toUpperCase()+N.slice(1)}),(0,et.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(L=>L.type===N).map(L=>(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsx)(gt,{id:L.id.toString(),checked:n.categories?.includes(L.id),onCheckedChange:()=>u(L)}),(0,et.jsx)("label",{htmlFor:L.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:L.name})]},L.id))})]},N))})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"closureDate",children:"Closure Date"}),(0,et.jsx)(Ge,{id:"closureDate",type:"date",value:n.closureDate||"",onChange:N=>c({...n,closureDate:N.target.value})}),p.closureDate&&(0,et.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,et.jsx)(T,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,et.jsx)(Pt,{open:m,onOpenChange:d,children:(0,et.jsxs)(ft,{children:[(0,et.jsx)(Et,{children:(0,et.jsx)(Ht,{children:"Add New Customer"})}),(0,et.jsx)(fn,{onSubmit:v})]})})]})}var Yp=["firm","forecast","other"];function qp({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,sr.useState)(null),s=m=>(e.deals??[]).filter(d=>d.gecoStatus===m).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),l=m=>m.reduce((d,p)=>d+(p.value||0),0),n=(m,d)=>{let p={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return m.reduce((f,g)=>f+(g.value||0)*(p[g.status]??0),0)},c=(0,sr.useCallback)(m=>{let{source:d,destination:p}=m;if(!p||d.droppableId===p.droppableId&&d.index===p.index)return;let f=d.droppableId,g=p.droppableId,b=e.deals?.filter(v=>v.id===d.index)[0],u=[...e.deals??[]];b&&(b.gecoStatus=g,t(b))},[t]);return(0,et.jsx)(as.DragDropContext,{onDragEnd:c,children:(0,et.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,et.jsx)("div",{className:"flex space-et-4 pb-4",children:Yp.map(m=>{let d=s(m);return(0,et.jsx)(Jo,{status:m,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:l,calculateWeightedValue:n,compact:!0},m)})}),o&&(0,et.jsx)(Qo,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:m=>a(o.id.toString(),m)})]})})}var Cc=h(require("react"));function xc({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,sr.useState)(null),[s,l]=(0,sr.useState)(!1),[n,c]=(0,sr.useState)(null),m=async(p=!0)=>{if(e){p&&l(!0);try{let f=await fetch(`/api/tasks/${e}`);if(!f.ok)throw new Error(`Failed et fetch task: ${f.statusText}`);let g=await f.json();r(g)}catch(f){console.error("Error fetching task:",f),c(f instanceof Error?f:new Error("Unknown error occurred"))}finally{p&&l(!1)}}},d=()=>m(!1);return(0,sr.useEffect)(()=>{e&&m(!0);let p=null;return e&&t&&(p=setInterval(d,5e3)),()=>{p&&clearInterval(p)}},[e,t]),{task:o,loading:s,error:n}}var Kp=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"}},Qp=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function gn({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:s}=e||{};if(!t)return null;let l=null,n=!0,c=s,m=o!==void 0?o:!0;if(l=r||{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:m,taskData:l,error:c}),m){let{task:g,loading:b,error:u}=xc({taskId:t,system:a});l=g,n=b,c=u}else n=!1;let d=Kp(l?.status||"todo"),p=Qp(l?.status||"todo"),f=l?.dateLogged||new Date().toISOString();try{let g=new Date(l?.dateLogged||"");isNaN(g.getTime())||(f=(0,ln.formatDistanceToNow)(g,{addSuffix:!0}))}catch{}return(0,et.jsxs)(pe,{className:i("w-full max-w-et shadow-et",c&&"border border-destructive"),children:[(0,et.jsxs)(Se,{className:"pb-2",children:[(0,et.jsxs)("div",{className:"flex justify-between items-start",children:[(0,et.jsx)(Re,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,et.jsx)(Ue,{className:`${d}`,children:p})]}),l?.project&&(0,et.jsxs)(Di,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,et.jsx)(we,{className:"pb-2",children:n?(0,et.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,et.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,et.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,et.jsx)(Mi,{className:"pt-2 flex items-center justify-between",children:(0,et.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,et.jsx)(el.Clock,{className:"h-3 w-3 mr-1"}),(0,et.jsxs)("span",{children:["Created ",f]}),(0,et.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,et.jsxs)("span",{children:["Task #",t]})]})})]})}var Jp={task:gn},Zp=`
15
+ dark bg-background text-primary`,children:[(0,et.jsxs)("div",{className:"flex px-6 items-center space-et-2",children:[a&&(0,et.jsx)("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),(0,et.jsx)("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),(0,et.jsx)("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),(0,et.jsx)("div",{ref:s,className:"preview-container"})]})},Ld=({page:e,layout:t="portrait"})=>{let{contentWithIds:a}=us(e),o=(0,sr.useRef)(null),r=(0,sr.useRef)(null),s=(0,sr.useRef)(new Sv.Previewer),[l,n]=(0,sr.useState)(0),m=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],d=(0,sr.useCallback)(()=>{o.current&&(o.current&&(o.current.innerHTML=""),s.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",t==="landscape"?"./landscape.css":"./portrait.css"],o.current).then(p=>n(p.pageCount)).catch(p=>console.error("Paged.js error:",p)))},[t]);return(0,sr.useEffect)(()=>{s.current=new Sv.Previewer,d()},[d,t]),(0,sr.useEffect)(()=>{let p=document.createElement("style");return p.textContent=`@page { size: A4 ${t} ; margin: 0mm; };`,document.head.appendChild(p),()=>{document.head.removeChild(p)}},[]),(0,et.jsxs)("div",{className:"pagedjs-container",children:[(0,et.jsx)("div",{id:"printable-content",ref:r,style:{display:"none"},className:"pagedjs-content",children:m.map((p,f)=>(0,et.jsx)(et.Fragment,{children:f===0?(0,et.jsx)("section",{className:"pagedjs-section title-page w-full h-full",children:(0,et.jsx)(Vo,{hero:e.hero,title:e.title})},f):(0,et.jsxs)("section",{className:i("pagedjs-section normal-page h-[699px]",`h-[${gp("185mm")}px]`,p.theme?.settings?.theme==="dark"?"dark":"light"),children:[p.blockName&&(0,et.jsx)(Wo,{title:p.blockName}),(0,et.jsx)(ba,{blocks:[p],fill:!0})]},f)}))}),(0,et.jsx)("div",{ref:o,className:"preview-container"})]})};var Vi=h(require("clsx"));function yp({mainNav:e,secondaryNav:t,title:a,subTitle:o,pathName:r,menuHeading:s,onNavClick:l,loading:n=!1,LinkComponent:c,...m}){let p=c?f=>(0,et.jsx)(c,{...f}):l?({href:f,children:g,...b})=>(0,et.jsx)("button",{onClick:()=>l&&l(f),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...b,children:g}):f=>(0,et.jsx)("a",{...f});return(0,et.jsxs)(wa,{...m,variant:"inset",children:[(0,et.jsx)(Na,{children:(0,et.jsx)(_e,{children:(0,et.jsx)(De,{children:n?(0,et.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,et.jsx)(de,{className:"bg-gray-200 my-2 w-full h-7"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,et.jsxs)("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[(0,et.jsx)("span",{className:"truncate font-semibold",children:a}),o&&(0,et.jsx)("span",{className:"truncate text-sm",children:o})]})})})}),n&&(0,et.jsxs)(aa,{children:[(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"}),(0,et.jsx)(de,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,et.jsxs)(aa,{children:[e&&!n&&e.map((f,g)=>(0,et.jsx)(vp,{subNav:f,pathName:r,Link:p},g)),(0,et.jsx)(tt,{className:"mt-auto",children:(0,et.jsx)(pt,{children:(0,et.jsx)(_e,{children:t&&!n&&t.map(f=>(0,et.jsx)(De,{children:(0,et.jsx)(at,{asChild:!0,size:"sm",children:(0,et.jsxs)(p,{href:f.url||"",children:[f.icon&&(0,et.jsx)(f.icon,{}),(0,et.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,et.jsx)(Ca,{})]})}function vp({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(s=>{s.url===t&&(r=!0)}),(0,et.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,et.jsx)(tt,{className:"py-0",children:(0,et.jsx)(_e,{children:(0,et.jsx)(It,{asChild:!0,defaultOpen:o.isActive,children:(0,et.jsxs)(De,{children:[(0,et.jsx)(at,{asChild:!0,tooltip:o.label,className:(0,Vi.default)(r&&"font-bold text-accent"),children:(0,et.jsxs)(a,{href:o.url,children:[o.icon&&(0,et.jsx)(o.icon,{}),(0,et.jsx)("span",{children:o.label})]})}),o.links?.length?(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(Zt,{asChild:!0,children:(0,et.jsxs)(Po,{className:"data-[state=open]:rotate-90",children:[(0,et.jsx)(el.ChevronRight,{}),(0,et.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,et.jsx)(ea,{children:(0,et.jsx)(oa,{children:o.links?.map(s=>(0,et.jsx)(ra,{children:(0,et.jsx)(sa,{asChild:!0,className:(0,Vi.default)(s.url===t&&"font-bold text-accent"),children:(0,et.jsx)(a,{href:s.url,children:(0,et.jsx)("span",{children:s.label})})})},s.label))})})]}):null]})},o.label)})})})}var Hd=h(require("clsx"));var hp=()=>(0,et.jsx)(Me,{iconName:"github",size:"10x"});function xp({relatedContent:e,tableOfContents:t,editorComponent:a,loading:o=!1,editMode:r=!1,onAddDocument:s,onEditDocument:l,onPrintDocument:n,onGithubClick:c,onNavClick:m,LinkComponent:d,...p}){let b=d?u=>(0,et.jsx)(d,{...u}):m?({item:u,children:v,...M})=>(0,et.jsx)("button",{onClick:()=>m&&m(u),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...M,children:v}):u=>(0,et.jsx)("a",{href:u.href,...u});return(0,et.jsxs)(wa,{side:"right",variant:"inset",...p,children:[(0,et.jsxs)(Na,{className:"border-b border-sidebar-border",children:[(0,et.jsxs)(_e,{className:"flex-row space-et-1",children:[(0,et.jsx)(De,{children:(0,et.jsxs)(at,{onClick:s,children:[(0,et.jsx)(el.FilePlus,{})," ",(0,et.jsx)("span",{children:"Add Document"})]})}),c&&(0,et.jsx)(De,{children:(0,et.jsx)(at,{onClick:c,tooltip:"Open in GitHub",children:(0,et.jsx)(hp,{})})})]}),(0,et.jsxs)(_e,{className:"flex-row space-et-1",children:[(0,et.jsx)(De,{className:"w-5/12",children:(0,et.jsxs)(at,{onClick:()=>l(),variant:r?"outline":"default",className:(0,Hd.default)(r&&"text-accent"),children:[(0,et.jsx)(el.Edit,{})," ",(0,et.jsx)("span",{children:"Edit"})]})}),(0,et.jsx)(De,{className:"w-5/12",children:(0,et.jsxs)(at,{onClick:n,children:[(0,et.jsx)(el.Printer,{})," ",(0,et.jsx)("span",{children:"Print"})]})})]})]}),a&&(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{asChild:!0,children:(0,et.jsxs)(Zt,{children:["Editor Controls",(0,et.jsx)(el.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,et.jsx)(pt,{children:(0,et.jsx)(ea,{children:a})})]})}),(0,et.jsx)(Co,{className:"mx-0"})]}),(0,et.jsxs)(aa,{className:"overflow-auto",children:[o&&(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{children:"Related Content"}),(0,et.jsx)(pt,{children:(0,et.jsx)(_e,{children:Array.from({length:3}).map((u,v)=>(0,et.jsx)(De,{children:(0,et.jsx)(de,{className:"bg-gray-200 w-full h-10"})},v))})})]}),(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{children:"Table of Contents"}),(0,et.jsx)(pt,{children:(0,et.jsx)(_e,{children:Array.from({length:3}).map((u,v)=>(0,et.jsx)(De,{children:(0,et.jsx)(de,{className:"bg-gray-200 w-full h-10"})},v))})})]})]}),e&&!o&&Object.keys(e).length>0&&(0,et.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{asChild:!0,children:(0,et.jsxs)(Zt,{children:["Related Content",(0,et.jsx)(el.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,et.jsx)(pt,{children:(0,et.jsx)(ea,{children:(0,et.jsx)(_e,{children:e&&Object.keys(e).map(u=>(0,et.jsxs)(De,{children:[(0,et.jsxs)("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",u.charAt(0).toUpperCase()+u.slice(1)]}),u&&e[u]&&(0,et.jsx)(oa,{children:e[u].map(v=>(0,et.jsx)(ra,{children:(0,et.jsx)(sa,{asChild:!0,isActive:!1,size:"sm",children:(0,et.jsxs)(b,{href:v.url,item:v,className:"flex justify-between items-center w-full text-xs",children:[(0,et.jsx)("span",{children:v.label}),v.type==="note"&&(0,et.jsx)(el.PencilLine,{className:"ml-2 text-gray-400 !important",size:16}),v.type==="draft"&&(0,et.jsx)(Me,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},v.label))})]},u))})})})]})}),t&&!o&&(0,et.jsx)(It,{defaultOpen:!0,className:"group/collapsible",children:(0,et.jsxs)(tt,{children:[(0,et.jsx)(Bt,{asChild:!0,children:(0,et.jsxs)(Zt,{children:["Table of Contents",(0,et.jsx)(el.ChevronDown,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,et.jsx)(pt,{children:(0,et.jsx)(ea,{children:(0,et.jsx)(_e,{children:t.map(u=>(0,et.jsxs)(De,{children:[(0,et.jsx)(at,{asChild:!0,children:(0,et.jsx)("a",{href:`#${u.url}`,className:"text-xs",children:u.title})}),u.items?.length?(0,et.jsx)(oa,{children:u.items.map(v=>(0,et.jsx)(ra,{children:(0,et.jsx)(sa,{asChild:!0,isActive:v.isActive,size:"sm",children:(0,et.jsx)("a",{href:`#${v.url}`,className:"flex justify-between items-center w-full text-xs",children:(0,et.jsx)("span",{children:v.title})})})},v.title))}):null]},u.title))})})})]})})]}),(0,et.jsx)(Ca,{})]})}var zd=h(require("next/image"));function wp({title:e,members:t}){return(0,et.jsx)(pe,{className:"mb-6",children:(0,et.jsxs)("div",{className:"p-6",children:[(0,et.jsxs)("div",{className:"flex items-center mb-4",children:[(0,et.jsx)(el.Users,{className:"w-6 h-6 text-accent mr-2"}),(0,et.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:e})]}),(0,et.jsx)("div",{className:"space-et-4",children:t.map((a,o)=>(0,et.jsxs)("div",{className:"flex items-center space-et-4",children:[(0,et.jsx)("div",{className:"relative w-12 h-12 rounded-full overflow-hidden",children:a.avatar&&(0,et.jsx)(zd.default,{src:a.avatar,alt:a.name,layout:"fill",objectFit:"cover"})}),(0,et.jsxs)("div",{children:[(0,et.jsx)("p",{className:"font-semibold text-foreground",children:a.name}),a.role&&(0,et.jsx)("p",{className:"text-sm text-muted-foreground",children:a.role})]})]},o))})]})})}var Od=h(require("next/link"));var Np=({links:e,title:t="Related Content"})=>(0,et.jsxs)(pe,{children:[(0,et.jsx)(Se,{children:(0,et.jsx)(Re,{className:"text-accent",children:t})}),(0,et.jsx)(we,{children:(0,et.jsx)("nav",{className:"flex flex-col space-et-2",children:e.map((a,o)=>(0,et.jsxs)(Od.default,{href:a.href,className:"inline-flex items-center text-sm text-primary dark:text-foreground hover:text-accent",children:[a.name,a.href.startsWith("http")&&(0,et.jsx)(el.ExternalLink,{className:"ml-1 h-3 w-3"})]},o))})})]});var Ui=i("grid h-[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 Cp({pages:e}){let t=(0,vd.useSearchParams)(),a=(0,vd.usePathname)(),{replace:o}=(0,vd.useRouter)(),{totalPages:r,page:s}=e,[l,n]=(0,sr.useState)({start:s>3?s-3:1,end:s+2}),c=p=>{p==="left"&&l.start>1?n(f=>({start:f.start-1,end:f.end-1})):p==="right"&&l.end<r&&n(f=>({start:f.start+1,end:f.end+1}))};function m(p){let f=new URLSearchParams(t);p?f.set("page",p):f.delete("page"),o(`${a}?${f.toString()}`)}if(r<=1)return null;let d=[];for(let p=l.start;p<=l.end;p++)d.push(p);return(0,et.jsx)("div",{className:"mt-12",children:(0,et.jsxs)("Vn",{className:"flex flex-wrap items-center justify-center gap-3 et:gap-5","aria-label":"pagination",children:[l.start>1&&(0,et.jsx)("li",{children:(0,et.jsx)("button",{className:i(Ui,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll left",onClick:()=>c("left"),children:(0,et.jsx)(Fl.FaArrowLeft,{})})}),d.map((p,f)=>(0,et.jsx)("li",{children:(0,et.jsx)("a",{className:i(Ui,p===s?"border-accent bg-accent text-accent-foreground":"border-accent"),href:"#","aria-label":`pagination button ${p}`,role:"button",onClick:g=>{g.preventDefault(),m(p.toString())},children:p})},f)),l.end<r&&(0,et.jsx)("li",{children:(0,et.jsx)("button",{className:i(Ui,"border-accent bg-accent text-accent-foreground"),"aria-label":"scroll right",onClick:()=>c("right"),children:(0,et.jsx)(Fl.FaArrowRight,{})})})]})})}var nh=i("transition-colors duration-400 hover:text-primary ease-in-out");function Pp({title:e,links:t}){let a=(0,vd.useSearchParams)(),o=(0,vd.usePathname)(),{replace:r}=(0,vd.useRouter)();function s(l){let n=new URLSearchParams(a);l?n.set("category",l):n.delete("category"),r(`${o}?${n.toString()}`)}return(0,et.jsxs)(pe,{children:[(0,et.jsx)(Se,{children:(0,et.jsx)(Re,{className:"text-accent",children:e&&e})}),(0,et.jsx)(we,{children:t&&t.length>0&&(0,et.jsx)("nav",{"aria-label":"footer links navigation",children:(0,et.jsx)("Vn",{className:"grid gap-2.5 ",children:t.map((l,n)=>(0,et.jsxs)("li",{className:"flex items-center text-sm text-primary hover:text-accent dark:text-foreground first:pt-0 hover:cursor-pointer",onClick:c=>{c.preventDefault(),s(l.href)},children:[l.label,(0,et.jsx)($d.ExternalLink,{className:"ml-1 h-3 w-3"})]},n))})})})]})}function kp({types:e}){let[t,a]=(0,sr.useState)(e&&e[0].href),o=(0,vd.useSearchParams)(),r=(0,vd.usePathname)(),{replace:s}=(0,vd.useRouter)();function l(n){let c=new URLSearchParams(o);n?c.set("type",n):c.delete("type"),a(n),s(`${r}?${c.toString()}`)}return(0,et.jsx)("div",{className:"flex gap-2 flex-wrap items-center justify-center overflow-et-auto pb-4 mb-6",children:e&&e.map((n,c)=>(0,et.jsx)(T,{variant:n.href===t?"default":"ghost",className:i("rounded-full whitespace-nowrap text-foreground border border-accent hover:bg-accent hover:text-accent-foreground",n.href===t&&"bg-accent text-accent-foreground"),onClick:()=>l(n.href),children:n.label},c))})}var Vd=h(require("next/image"));var Xi=({links:e,media:t,children:a,richText:o})=>(0,et.jsx)("div",{children:(0,et.jsxs)("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[(0,et.jsxs)("div",{className:"fixed inset-0 container mt-24 mb-8 et-10 flex items-start justify-center",children:[a||o&&(0,et.jsx)(Z,{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,et.jsx)("Vn",{className:"flex justify-center gap-4",children:e.map(({link:r},s)=>(0,et.jsx)("li",{children:(0,et.jsx)(bt,{...r})},s))})]}),(0,et.jsxs)("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[t&&typeof t=="object"&&(0,et.jsx)($t,{fill:!0,imgClassName:"et-5 object-cover",priority:!1,loading:"lazy",resource:t}),t&&typeof t=="string"&&(0,et.jsx)("div",{children:(0,et.jsx)(Vd.default,{className:"-et-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,et.jsx)("span",{className:"absolute inset-0 bg-gradient-et-b from-white dark:from-black"})]}),(0,et.jsx)(Sp,{})]})}),Sp=()=>(0,et.jsx)("div",{className:"w-full h-[1240px] et-10",children:(0,et.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,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,et.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,et.jsx)("rect",{et:"330",width:"1920",height:"7",fill:"white"})," "]})});var Yi=h(require("next/image"));var Rp=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:o,url:r,width:s}=e;return(0,et.jsx)(Yi.default,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:r||"",width:s||0,height:o||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return(0,et.jsx)("div",{children:(0,et.jsx)(Yi.default,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},qi=({links:e,media:t,children:a,richText:o})=>(0,et.jsxs)("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&(0,et.jsx)(Rp,{media:t}),(0,et.jsx)("div",{className:"mx-0 min-w-full relative et-9",children:(0,et.jsx)("div",{className:"container text-brand-one-foreground",children:a||o&&(0,et.jsx)(Z,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:o,enableProse:!0,enableGutter:!1})})})]});var Ki=({children:e,richText:t})=>(0,et.jsx)("div",{className:"min-w-full py-10 bg-muted mt-24",children:(0,et.jsx)("div",{className:"container",children:e||t&&(0,et.jsx)(Z,{content:t,enableGutter:!1})})});var jd=h(require("react")),Xd=h(require("next/image"));var Ud=e=>{let a=new Date;e&&(a=new Date(e));let o=a.getMonth(),r=a.getDate(),s=o+1<10?`0${o+1}`:o+1,l=r<10?`0${r}`:r,n=a.getFullYear();return`${l}/${s}/${n}`};var Tp=({post:e})=>{let{categories:t,meta:a,populatedAuthors:o,publishedAt:r,title:s}=e;return(0,et.jsxs)("div",{className:"relative grid pt-24",children:[(0,et.jsx)("div",{className:"relative et-10 flex flex-col justify-end min-h-[50vh] text-foreground dark:text-foreground pt-24 p-6 lg:p-12",children:(0,et.jsxs)("div",{className:"container mx-auto",children:[(0,et.jsx)("h1",{className:"mb-6 text-[clamp(2rem,1.5rem+1.5vw,3.5rem)] font-bold leading-tight ",children:s}),(0,et.jsxs)("div",{className:"flex flex-col gap-4 et:flex-row et:gap-16 ",children:[o&&o.length>0&&(0,et.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,et.jsxs)("p",{className:"text-sm",children:["Author",o.length>1?"s":""]}),(0,et.jsx)("p",{children:o.map((l,n)=>(0,et.jsxs)(jd.default.Fragment,{children:[l.name,n<o.length-2&&", ",n===o.length-2&&(o.length>2?", and ":" and ")]},l.id))})]}),r&&(0,et.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,et.jsx)("p",{className:"text-sm",children:"Date Published"}),(0,et.jsx)("time",{dateTime:r,children:Ud(r)})]}),t&&t.length>0&&(0,et.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,et.jsx)("p",{className:"text-sm font-medium",children:"Categories"}),(0,et.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((l,n)=>typeof l=="object"&&l!==null&&(0,et.jsx)(Ue,{className:"px-3 py-1 mx-1",children:l.title||"Untitled category"},l.id||n))})]})]})]})}),(0,et.jsxs)("div",{className:"absolute inset-0 w-full h-full",children:[(0,et.jsx)(Xd.default,{className:"object-cover",alt:`Cover image for ${s}`,src:a?.image?.url||"/assets/images/blog/gradient.png",fill:!0,priority:!0,sizes:"100vw"}),(0,et.jsx)("div",{className:"absolute pointer-events-none left-0 bottom-0 w-full h-1/2 bg-gradient-et-t from-background dark:from-black et-transparent"})]})]})};var jr=require("@heroicons/react/20/solid");var Ji=h(require("next/image"));function Qi({children:e,isFluid:t=!1,isNoPadding:a=!1,className:o=""}){let r=i("container",t&&"full-width",a&&"vd-padding",o);return(0,et.jsx)("div",{className:r,children:e})}var qd=require("next-themes");function Dp({children:e,...t}){return(0,et.jsx)(qd.ThemeProvider,{...t,children:e})}var jo=({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,et.jsx)("div",{className:"w-full h-[1240px] et-20",children:(0,et.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:i(t,"absolute -bottom-[2px] flex"),children:[(0,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"1920",height:"332",fill:"white"}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),(0,et.jsx)("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),(0,et.jsx)("rect",{et:"331",width:"1920",height:"7",fill:"white"})," "]})});if(e==="top")return(0,et.jsxs)("div",{className:"w-full et-20 aspect-[1920/332] overflow-hidden ",children:[(0,et.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",className:i(t,"absolute "),style:{fontSize:0,float:"left",alignContent:"flex-end",transform:"scale(-1, 1)"},children:[(0,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0",fill:"black"})]}),(0,et.jsx)("div",{className:"absolute -bottom-[5px] border-none left-0 w-full h-[6px] et-10 bg-white"})]});if(e==="dark-top")return(0,et.jsx)("div",{className:"w-full aspect-[1920/332] et-20 content-end block overflow-hidden",children:(0,et.jsxs)("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 332",preserveAspectRatio:"xMidYMax meet",className:i(t,"relative "),style:{fontSize:0,float:"left"},transform:a[3],children:[(0,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,et.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 0 1920 0 1920 0 0 0"})]})}),(0,et.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,et.jsx)("div",{className:"w-full aspect-[1920/332] et-20 content-start block overflow-hidden bg-white",children:(0,et.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:i(t,"w-full block overflow-hidden"),children:(0,et.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,et.jsx)("div",{className:"w-full aspect-[1920/332] et-20 content-end block overflow-hidden",children:(0,et.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:i(t,"w-full block overflow-hidden"),transform:a[3],children:(0,et.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,et.jsx)("div",{className:"w-full aspect-[1920/332] et-20 relative -bottom-[1px]",children:(0,et.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:i(t,"w-full block overflow-hidden"),children:(0,et.jsx)("polygon",{points:"0 0 0 135 1255 332 1920 5 1920 0 1920 0 0 0",fill:"black"})})})},Mp=({className:e})=>(0,et.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 1245",className:i(e,"absolute w-full h-full"),children:[(0,et.jsx)("defs",{children:(0,et.jsxs)("mask",{id:"mask",children:[(0,et.jsx)("rect",{width:"100%",height:"100%",fill:"black"}),(0,et.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,et.jsx)("rect",{width:"100%",height:"100%",fill:"black",mask:"url(#mask)"})]});var Zi=({title:e,image:t})=>(0,et.jsx)("div",{children:(0,et.jsxs)("div",{className:"sticky top-0 h-[50vh] min-h-[400px]",children:[(0,et.jsx)("div",{className:"fixed inset-0 container mt-24 mb-8 et-10 flex items-start justify-start",children:(0,et.jsx)("h1",{className:"text-5xl et:text-6xl",children:e})}),(0,et.jsxs)("div",{className:"fixed inset-0 h-[50vh] min-h-[400px] select-none",children:[t&&typeof t=="object"&&(0,et.jsx)(Ji.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,et.jsx)("div",{children:(0,et.jsx)(Ji.default,{className:"-et-10 object-cover",alt:"",fill:!0,priority:!0,src:t})}),(0,et.jsx)("span",{className:"absolute inset-0 bg-gradient-et-b from-white dark:from-black"})]}),(0,et.jsx)(jo,{className:"text-black et-10",position:"header"})]})});var Ip={highImpact:Xi,lowImpact:Ki,mediumImpact:qi,sectionHero:Zi},Ap=e=>{let{type:t}=e||{};if(!t||t==="none")return null;let a=Ip[t];return a?(0,et.jsx)(a,{...e}):null};function Bp({breadcrumbItems:e}){if(e&&e.length>0){let t=e.filter(a=>a.label.toLowerCase()!=="home");return(0,et.jsx)("nav",{"aria-label":"Breadcrumb",className:"flex",children:(0,et.jsxs)("Vn",{role:"list",className:"flex items-center space-et-4",children:[(0,et.jsx)("li",{children:(0,et.jsx)("div",{children:(0,et.jsxs)("a",{href:"/",className:"text-foreground hover:text-accent",children:[(0,et.jsx)(jr.HomeIcon,{"aria-hidden":"true",className:"size-5 shrink-0"}),(0,et.jsx)("span",{className:"sr-only",children:"Home"})]})})}),t.map((a,o)=>(0,et.jsx)("li",{children:(0,et.jsxs)("div",{className:"flex items-center",children:[(0,et.jsx)(jr.ChevronRightIcon,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),a.href?(0,et.jsx)("a",{href:a.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label}):(0,et.jsx)("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:a.label})]})},o))]})})}return(0,et.jsx)(et.Fragment,{})}var Je=require("@headlessui/react"),Yr=require("@heroicons/react/24/outline");var Lp=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,et.jsx)("a",{href:o,className:"flex items-center gap-et-1 text-sm text-foreground group",children:(0,et.jsxs)("span",{className:"relative",children:[e,(0,et.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-et-1/2 scale-et-0 transition-transform duration-300 ease-in-out group-hover:scale-et-100"})]})}):(0,et.jsxs)(Je.Popover,{children:[(0,et.jsxs)(Je.PopoverButton,{className:"flex items-center gap-et-1 text-sm/6 text-foreground outline-none group",children:[(0,et.jsxs)("span",{className:"relative",children:[e,(0,et.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-et-1/2 scale-et-0 transition-transform duration-300 ease-in-out group-hover:scale-et-100"})]}),(0,et.jsx)(jr.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,et.jsxs)(Je.PopoverPanel,{transition:!0,className:"absolute inset-et-0 top-0 -et-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-et-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,et.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-et-4 px-6 py-10 lg:px-8 xl:gap-et-8 et-50",children:t&&t.map(r=>(0,et.jsxs)("div",{className:"group relative rounded-lg p-6 text-sm/6 box-border",children:[(0,et.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,et.jsx)(Qd,{icon:r.icon,size:"4x"})}),(0,et.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,et.jsx)("span",{className:"absolute inset-0"})]}),(0,et.jsx)("p",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,et.jsx)("div",{className:"bg-gray-50",children:(0,et.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,et.jsx)("div",{className:"grid grid-cols-3 divide-et divide-gray-900/5 border-et border-gray-900/5",children:a.map(r=>(0,et.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-et-2.5 p-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,et.jsx)(Qd,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Qd=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,et.jsx)(Me,{...e,size:a});if("src"in e)return(0,et.jsx)("div",{className:i(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,et.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},po=Lp;var Xr=["light","dark","green"];function Ep({title:e,logo:t,menuItems:a}){let[o,r]=(0,sr.useState)(!1),[s,l]=(0,sr.useState)(!1),[n,c]=(0,sr.useState)("light"),m=t?.split(".")[0],d=t?.split(".")[1],[p,f]=(0,sr.useState)(`${m}.${d}`),g=u=>{Xr.includes(u)?f(u==="light"?`${m}.${d}`:`${m}-${u}.${d}`):f(`${m}.${d}`)};(0,sr.useEffect)(()=>{let u=localStorage.getItem("theme")||"light";c(u),document.documentElement.setAttribute("class",u),g(u)},[]);let b=()=>{let u=Xr[(Xr.indexOf(n)+1)%Xr.length];c(u),document.documentElement.setAttribute("class",u),localStorage.setItem("theme",u),g(u)};return(0,et.jsxs)("header",{className:"relative isolate et-10 bg-background h-14",children:[(0,et.jsxs)("nav",{"aria-label":"Global",className:"relative mx-auto flex items-center justify-between p-3 lg:px-8",children:[(0,et.jsx)("div",{className:"flex lg:flex-1",children:(0,et.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,et.jsx)("span",{className:"sr-only",children:e}),(0,et.jsx)("img",{alt:e,src:p,className:"h-9 w-auto"})]})}),(0,et.jsx)("div",{className:"flex lg:hidden",children:(0,et.jsxs)("button",{type:"button",onClick:()=>r(!0),className:"-m-2.5 inline-flex items-center justify-center rounded-et p-2.5 text-gray-700 outline-none",children:[(0,et.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,et.jsx)(Yr.Bars3Icon,{"aria-hidden":"true",className:"h-6 w-6"})]})}),(0,et.jsx)(Je.PopoverGroup,{className:"hidden lg:flex lg:gap-et-12",children:a.map(u=>(0,et.jsx)(po,{...u},u.name))}),(0,et.jsx)("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end",children:(0,et.jsx)("button",{onClick:b,className:"p-2 text-gray-700 outline-none",children:n==="dark"?(0,et.jsx)(jr.SunIcon,{className:"h-6 w-6"}):n==="green"?(0,et.jsx)(jr.MoonIcon,{className:"h-6 w-6"}):(0,et.jsx)(jr.SunIcon,{className:"h-6 w-6"})})})]}),(0,et.jsxs)(Je.Dialog,{open:o,onClose:r,className:"lg:hidden",children:[(0,et.jsx)("div",{className:"fixed inset-0 et-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,et.jsxs)(Je.DialogPanel,{className:"fixed inset-et-0 right-0 et-20 w-full overflow-et-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,et.jsxs)("div",{className:"flex items-center justify-between",children:[(0,et.jsxs)("a",{href:"#",className:"-m-1.5 p-1.5 outline-none",children:[(0,et.jsx)("span",{className:"sr-only",children:"Your Company"}),(0,et.jsx)("img",{alt:e,src:t,className:"h-8 w-auto"})]}),(0,et.jsxs)("button",{type:"button",onClick:()=>r(!1),className:"-m-2.5 rounded-et p-2.5 text-gray-700 outline-none",children:[(0,et.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,et.jsx)(Yr.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,et.jsx)("div",{className:"mt-6 flow-root",children:(0,et.jsx)("div",{className:"-my-6 divide-et divide-gray-500/10",children:(0,et.jsx)("div",{className:"space-et-2 py-6",children:a.map(u=>(0,et.jsx)(Hp,{...u},u.name))})})})]})]})]})}function Hp({name:e,items:t,actions:a,href:o}){return!t&&o?(0,et.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}):(0,et.jsxs)(Je.Disclosure,{as:"div",className:"-mx-3",children:[(0,et.jsx)(Je.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base font-semibold text-gray-900 hover:bg-gray-50",children:e}),(0,et.jsx)(Je.DisclosurePanel,{className:"mt-2 space-et-2",children:t&&t.map(r=>(0,et.jsx)(Je.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm font-semibold text-gray-900 hover:bg-gray-50",children:r.name},r.name))})]})}function Fp({logoVideo:e,logoLight:t,logoDark:a,menuItems:o,title:r,subtitle:s}){let l=()=>{let n=document.getElementById("next-section");n&&n.scrollIntoView({behavior:"smooth"})};return(0,et.jsx)("div",{children:(0,et.jsxs)("div",{className:"sticky top-0 h-screen",children:[(0,et.jsxs)("video",{className:"fixed inset-0 object-cover w-full h-full et-0",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[(0,et.jsx)("source",{src:"assets/videos/background2.mp4",type:"video/mp4"}),"Your browser does not support the video tag."]}),(0,et.jsx)("div",{className:"fixed inset-0 h-full et-10 flex flex-col items-start justify-center text-white px-4",children:(0,et.jsx)(Qi,{children:(0,et.jsxs)("div",{className:"flex flex-col items-start et:w-2/3 mb-10 et-0 et:mb-0",children:[(0,et.jsx)("h1",{className:"text-5xl et:text-7xl mb-6",children:r&&r}),(0,et.jsx)("div",{className:"text-lg et:text-2xl text-gray-300 mb-8 max-w-lg",children:s&&s})]})})}),(0,et.jsx)(jo,{className:"text-black et-10",position:"header"})]})})}var en=h(require("next/image"));function ya({logoLight:e,logoDark:t,mobile:a=!1}){return(0,et.jsxs)(rt,{href:"/",className:i(a?"py-1":"py-2"),children:[(0,et.jsx)(en.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,et.jsx)(en.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 tn({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:s=!1}){let[l,n]=(0,sr.useState)(!1),[c,m]=(0,sr.useState)(""),d=["light","dark"],{theme:p,setTheme:f}=(0,qd.useTheme)();(0,sr.useEffect)(()=>{m(p||"dark")},[p]);let g=()=>{let b=d[(d.indexOf(c)+1)%d.length];m(b),f(b)};return(0,sr.useEffect)(()=>{let b=()=>{window.scrollY>100?n(!0):n(!1)};return window.addEventListener("scroll",b,{passive:!0}),()=>window.removeEventListener("scroll",b)},[]),(0,et.jsx)(et.Fragment,{children:(0,et.jsx)("header",{className:`et-50 pb-10 transition-all duration-300 hidden lg:block ${l||e?"translate-et-0":"-translate-et-full bg-transparent"}`,children:(0,et.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white p-0",children:(0,et.jsxs)("div",{className:i("flex items-center justify-between px-9 py-0",!s&&"container"),children:[(0,et.jsx)(ya,{logoDark:a,logoLight:t}),(0,et.jsx)(Je.PopoverGroup,{className:"hidden lg:flex lg:gap-et-12",children:o&&o.map(b=>(0,et.jsx)(po,{...b},b.name))}),r&&(0,et.jsx)("button",{className:"fixed right-4 et-[60] p-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:g,children:(0,et.jsxs)("div",{className:"relative",children:[(0,et.jsx)(el.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,et.jsx)(el.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var an=["light","dark"];function on({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,s]=(0,sr.useState)(!1),{theme:l,setTheme:n}=(0,qd.useTheme)(),[c,m]=(0,sr.useState)(!1),[d,p]=(0,sr.useState)("light");(0,sr.useEffect)(()=>{let g=()=>{window.scrollY>100?s(!0):s(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,sr.useEffect)(()=>{p(l||"dark")},[l]);let f=()=>{let g=an[(an.indexOf(d)+1)%an.length];p(g),n(g)};return(0,et.jsx)(et.Fragment,{children:(0,et.jsxs)("header",{className:`et-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-et-0":"-translate-et-full bg-transparent"}`,children:[(0,et.jsx)("nav",{className:i("backdrop-blur-sm text-white p-0",c&&"hidden"),children:(0,et.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&et.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,et.jsx)(ya,{logoDark:t,logoLight:e,mobile:!0}),(0,et.jsx)("div",{className:"flex items-center space-et-4",children:(0,et.jsxs)("button",{type:"button",onClick:()=>m(!0),className:"fixed right-4 et-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,et.jsx)(Yr.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,et.jsxs)(Je.Dialog,{open:c,onClose:m,className:"lg:hidden",children:[(0,et.jsx)("div",{className:"fixed inset-0 et-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,et.jsxs)(Je.DialogPanel,{className:"fixed inset-et-0 right-0 et-20 w-full overflow-et-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,et.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,et.jsx)(ya,{logoDark:t,logoLight:e,mobile:!0}),(0,et.jsxs)("button",{type:"button",onClick:()=>m(!1),className:"-m-2.5 rounded-et p-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,et.jsx)(Yr.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,et.jsx)("div",{className:"mt-6 flow-root",children:(0,et.jsx)("div",{className:"-my-6 divide-et divide-gray-500/10",children:(0,et.jsx)("div",{className:"space-et-2 px-2 py-6",children:a&&a.map(g=>(0,et.jsx)(zp,{...g},g.name))})})})]})]})]})})}function zp({name:e,items:t,actions:a,href:o}){return!t&&o?(0,et.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,et.jsxs)(Je.Disclosure,{as:"div",className:"-mx-3",children:[(0,et.jsx)(Je.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,et.jsx)(Je.DisclosurePanel,{className:"mt-2 space-et-2",children:t&&t.map(r=>(0,et.jsx)(Je.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}var d0=i("text-base/[1.75] transition-transform duration-350 hover:-translate-et-1 block px-4"),ac=i("text-brand-green text-et leading-[1.25] et:text-lg mb-5 et:mb-[1.5rem]"),rn=i("bg-brand-green rounded-full p-3 mr-4 text-2xl"),sn=i("flex items-center text-white gap-3"),Qr=i("transition-colors duration-300 hover:text-accent dark:hover:text-white");function Op({className:e,footerData:t,logoLight:a,logoDark:o}){let{about:r,columnOne:s,columnTwo:l,footerBottom:n}=t,c=void 0;return(0,et.jsxs)("footer",{className:i("sticky et-2 flex flex-col dark bg-black overflow-hidden pt-12 prose-base",e),children:[(0,et.jsx)("div",{className:"py-16 et:py-20",children:(0,et.jsx)("div",{className:"container",children:(0,et.jsxs)("div",{className:"grid gap-10 et:grid-cols-2 xl:grid-cols-3",children:[(0,et.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"200",children:[(0,et.jsx)(ya,{logoDark:o,logoLight:a}),(0,et.jsx)("p",{className:"mb-7 mt-3",children:r.description}),r.socialLinks&&r.socialLinks.length>0&&(0,et.jsx)("nav",{"aria-label":"social links",children:(0,et.jsx)("Vn",{className:"inline-flex pl-0 min-h-[50px] items-center rounded-5 text-white gap-2",children:r.socialLinks.map((m,d)=>(0,et.jsx)("li",{className:"bg-primary rounded-full p-3",children:(0,et.jsx)(rt,{"aria-label":m.href,className:"text-2xl",href:m.href,openNewTab:!0,children:(0,et.jsx)("span",{children:m.icon})})},d))})})]}),(0,et.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"400",children:[(0,et.jsx)("h3",{className:ac,children:s.title}),s.links&&s.links.length>0&&(0,et.jsx)("nav",{"aria-label":"footer links navigation",children:(0,et.jsx)("Vn",{className:"grid pl-0 gap-2",children:s.links.map(m=>(0,et.jsxs)("li",{className:"flex items-center gap-2.5",children:[(0,et.jsx)("span",{className:"flex-none text-sm/[1] text-white",children:(0,et.jsx)(Fl.FaChevronRight,{})}),(0,et.jsx)(rt,{href:m.href,openNewTab:m.openNewTab,className:Qr,children:m.label})]},m.label))})})]}),(0,et.jsxs)("div",{"data-aos":"fade-up","data-aos-delay":"600",children:[(0,et.jsx)("h3",{className:ac,children:l.title}),(0,et.jsxs)("Vn",{"aria-label":"addresses",className:"grid gap-2 pl-0",children:[(0,et.jsxs)("li",{className:sn,children:[(0,et.jsx)("span",{className:rn,children:(0,et.jsx)(Fl.FaPaperPlane,{})}),(0,et.jsx)("address",{className:"not-italic",children:l.location})]}),(0,et.jsxs)("li",{className:sn,children:[(0,et.jsx)("span",{className:rn,children:(0,et.jsx)(Fl.FaEnvelope,{})}),l.mails&&l.mails.length>0&&(0,et.jsx)("div",{className:"grid gap-1",children:l.mails.map((m,d)=>(0,et.jsx)("a",{href:`mailto:${m}`,className:Qr,children:m},d))})]}),l.phoneNumbers&&l.phoneNumbers.length>0&&(0,et.jsxs)("li",{className:sn,children:[(0,et.jsx)("span",{className:rn,children:(0,et.jsx)(Fl.FaPhone,{})}),(0,et.jsx)("div",{className:"grid gap-1",children:l.phoneNumbers.map((m,d)=>(0,et.jsx)("a",{href:`tel:${m.split(" ").join("")}`,className:Qr,children:m},d))})]})]})]})]})})}),(0,et.jsx)("div",{className:"flex min-h-[90px] items-center border-t border-accent-800 border-opacity-20 py-5 dark:border-body dark:border-opacity-20",children:(0,et.jsx)("div",{className:"container",children:(0,et.jsxs)("div",{className:"flex flex-wrap items-center text-xs justify-between gap-et-8 gap-et-4 et:gap-et-10",children:[(0,et.jsx)("p",{children:n.copyrightText}),n.links&&n.links.length>0&&(0,et.jsx)("nav",{"aria-label":"footer bottom navigation",children:(0,et.jsx)("Vn",{className:"flex flex-wrap items-center gap-et-4 et:gap-et-7",children:n.links.map(m=>(0,et.jsx)("li",{children:(0,et.jsx)(rt,{"aria-label":`Go et page ${m.label}`,href:m.href,openNewTab:m.openNewTab,className:Qr,children:m.label})},m.label))})})]})})})]})}function Gp({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:s,themeControl:l=!1}){return(0,et.jsxs)("div",{className:i("fixed top-0 left-0 right-0 et-50",r),children:[(0,et.jsx)(tn,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:l,wide:s}),(0,et.jsx)(on,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}function _p({menuItems:e,wide:t=!1,dark:a=!0}){return(0,et.jsx)(et.Fragment,{children:(0,et.jsx)("menu",{className:i("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,et.jsx)("div",{className:"container backdrop-blur-sm",children:(0,et.jsx)("div",{className:i("flex items-center justify-between py-0",!t&&"container"),children:(0,et.jsx)(Je.PopoverGroup,{className:"flex gap-et-12",children:e&&e.map(o=>(0,et.jsx)(po,{...o},o.name))})})})})})}function nn({leaveRequests:e,onApprove:t,onReject:a}){let[o,r]=(0,sr.useState)([]),s=(0,vd.useRouter)(),l=()=>{o.length===e.length?r([]):r(e.map(d=>d.id))},n=d=>{r(p=>p.includes(d)?p.filter(f=>f!==d):[...p,d])},c=async()=>{let d=await t(o);d.success?(xi.toast.success(d.message),s.refresh()):xi.toast.error(`Error: ${d.message}`),r([])},m=async()=>{let d=await a(o);d.success?(xi.toast.success(d.message),s.refresh()):xi.toast.error(`Error: ${d.message}`),r([])};return(0,et.jsxs)("div",{className:"space-et-4",children:[(0,et.jsxs)("div",{className:"flex justify-between items-center",children:[(0,et.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,et.jsxs)("div",{className:"space-et-2",children:[(0,et.jsx)(T,{onClick:c,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,et.jsx)(T,{onClick:m,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,et.jsx)("div",{className:"overflow-hidden sm:rounded-et",children:(0,et.jsxs)("Vn",{className:"divide-et divide-gray-200",children:[(0,et.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,et.jsxs)("div",{className:"flex items-center justify-between",children:[(0,et.jsxs)("div",{className:"flex items-center",children:[(0,et.jsx)(gt,{id:"select-all",checked:o.length===e.length,onCheckedChange:l,className:"border-accent"}),(0,et.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,et.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,et.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,et.jsxs)("div",{className:"flex items-center justify-between",children:[(0,et.jsxs)("div",{className:"flex items-center",children:[(0,et.jsx)(gt,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>n(d.id),className:"border-accent"}),(0,et.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,et.jsxs)($e,{className:"h-10 w-10",children:[(0,et.jsx)(We,{src:d.userImage,alt:d.userName}),(0,et.jsx)(Ve,{children:d.userName.split(" ").map(p=>p[0]).join("")})]}),(0,et.jsx)("div",{className:"ml-3",children:(0,et.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,et.jsx)(Ue,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})}),(0,et.jsx)(xi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"et-50"})]})}var ln=require("date-fns");var ic=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];var Ko=e=>{let t=e.getDay()===0,a=e.getDay()===6,o=ic.some(r=>r.date.toISOString()===e.toISOString());return t||a||o},nc=(e,t,a=!1)=>{let o=new Date(e),r=new Date(t),s=0;if(a&&!Ko(o))return .5;for(;o<=r;)Ko(o)||s++,o.setDate(o.getDate()+1);return s},lc=(e,t)=>!e||!t?!1:e.toDateString()!==t.toDateString();var $p=({options:e,value:t,onChange:a,disabled:o=[]})=>(0,$.jsx)("div",{className:"flex space-et-2",children:e.map((r,s)=>(0,$.jsx)(T,{type:"button",variant:t===r?"default":"outline",onClick:()=>a(r),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:r},r))});function cn({remainingDays:e,submitLeaveRequest:t}){let[a,o]=(0,sr.useState)(new Date),[r,s]=(0,sr.useState)(new Date),[l,n]=(0,sr.useState)("Full Day"),[c,m]=(0,sr.useState)(!1),[d,p]=(0,sr.useState)(1),f=(0,vd.useRouter)();(0,sr.useEffect)(()=>{let u=lc(a,r);m(u),u&&n("Full Day")},[a,r]),(0,sr.useEffect)(()=>{if(!a||!r){p(0);return}let u=nc(a,r,l!=="Full Day");p(u)},[a,r,l]);let g=u=>{n(u)};return(0,$.jsxs)("div",{className:"max-w-2xl",children:[(0,$.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,$.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,$.jsxs)("form",{onSubmit:async u=>{if(u.preventDefault(),!a||!r){xi.toast.error("Please select both start and end dates");return}if(d>e){xi.toast.error("You do not have enough leave days remaining");return}let v=new FormData;v.append("startDate",a.toISOString()),v.append("endDate",r.toISOString()),v.append("leaveType",l),v.append("duration",d.toString());let M=await(t||Wp)(v);M.success?(xi.toast.success(M.message),o(void 0),s(void 0),n("Full Day"),f.refresh()):xi.toast.error(`Error: ${M.message}`)},className:"space-et-4",children:[(0,$.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$.jsxs)("div",{className:"flex flex-col space-et-2",children:[(0,$.jsx)(J,{htmlFor:"startDate",children:"Start Date"}),(0,$.jsxs)(Ao,{children:[(0,$.jsx)(Bo,{asChild:!0,children:(0,$.jsxs)(T,{variant:"outline",className:i("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,$.jsx)(el.CalendarIcon,{className:"mr-2 h-4 w-4"}),a?(0,ln.format)(a,"PPP"):(0,$.jsx)("span",{children:"Pick a date"})]})}),(0,$.jsx)(Qa,{className:"w-auto p-0",align:"start",children:(0,$.jsx)(Ho,{mode:"single",selected:a,onSelect:u=>{o(u),u&&(!r||u>r)&&s(u)},initialFocus:!0})})]})]}),(0,$.jsxs)("div",{className:"flex flex-col space-et-2",children:[(0,$.jsx)(J,{htmlFor:"endDate",children:"End Date"}),(0,$.jsxs)(Ao,{children:[(0,$.jsx)(Bo,{asChild:!0,children:(0,$.jsxs)(T,{variant:"outline",className:i("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,$.jsx)(el.CalendarIcon,{className:"mr-2 h-4 w-4"}),r?(0,ln.format)(r,"PPP"):(0,$.jsx)("span",{children:"Pick a date"})]})}),(0,$.jsx)(Qa,{className:"w-auto p-0",align:"start",children:(0,$.jsx)(Ho,{mode:"single",selected:r,onSelect:s,disabled:u=>a?u<a:!1,initialFocus:!0})})]})]})]}),(0,$.jsxs)("div",{className:"space-et-2",children:[(0,$.jsx)(J,{children:"Leave Type"}),(0,$.jsx)($p,{options:["Full Day","Morning","Afternoon"],value:l,onChange:g,disabled:[!1,c,c]})]}),(0,$.jsxs)("p",{className:"text-sm text-gray-500",children:["Total days: ",d]}),(0,$.jsx)(T,{disabled:d<=0,type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,$.jsx)(xi.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9,className:"et-50"})]})}var Wp=async e=>{let t={};return e.forEach((a,o)=>{t[o]=a}),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};function cc(...e){return e.filter(Boolean).join(" ")}function mn({currentDate:e,setCurrentDate:t,holidays:a,employees:o}){let r=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),s=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},l=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},n=()=>{t(new Date)},c=m=>m.toLocaleString("default",{weekday:"short"}).charAt(0);return(0,et.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,et.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,et.jsxs)("div",{className:"sm:flex-auto",children:[(0,et.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,et.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,et.jsxs)("div",{className:"relative flex items-center rounded-et gap-1 et:items-stretch",children:[(0,et.jsxs)(T,{onClick:s,variant:"outline",size:"icon",className:"rounded-l-et border-accent hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,et.jsx)(el.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,et.jsx)(T,{variant:"outline",onClick:n,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative et:block",children:"Today"}),(0,et.jsxs)(T,{onClick:l,variant:"outline",size:"icon",className:"rounded-r-et border-accent hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Next month"}),(0,et.jsx)(el.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})]}),(0,et.jsx)("div",{className:"mt-8 flow-root",children:(0,et.jsx)("div",{className:"-mx-4 -my-2 overflow-et-auto sm:-mx-6 lg:-mx-8",children:(0,et.jsx)("div",{className:"max-h-[60vh] overflow-et-auto",children:(0,et.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,et.jsx)("thead",{className:"sticky top-0 et-20 bg-white",children:(0,et.jsxs)("tr",{children:[(0,et.jsx)("th",{scope:"col",className:"sticky left-0 top-0 et-30 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(r)].map((m,d)=>{let p=new Date(e.getFullYear(),e.getMonth(),d+1);return(0,et.jsxs)("th",{scope:"col",className:`sticky top-0 et-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter ${Ko(p)?"bg-gray-200":""}`,children:[(0,et.jsx)("div",{children:c(p)}),(0,et.jsx)("div",{children:d+1})]},d)})]})}),(0,et.jsx)("tbody",{children:o.map((m,d)=>(0,et.jsxs)("tr",{children:[(0,et.jsx)("td",{className:cc(d!==o.length-1?"border-gray-200":"","sticky left-0 et-10 bg-white border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,et.jsxs)("div",{className:"flex items-center",children:[(0,et.jsxs)($e,{className:"h-11 w-11",children:[(0,et.jsx)(We,{src:m.image,alt:m.name}),(0,et.jsx)(Ve,{children:m.name.split(" ").map(p=>p[0]).join("")})]}),(0,et.jsx)("div",{className:"ml-4",children:(0,et.jsx)("div",{className:"font-medium text-accent",children:m.name})})]})}),[...Array(r)].map((p,f)=>{let g=new Date(e.getFullYear(),e.getMonth(),f+1),b=a.find(u=>u.userId===m.id&&new Date(u.startDate)<=g&&new Date(u.endDate)>=g);return(0,et.jsx)("td",{className:cc(d!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200",Ko(g)?"bg-gray-200":"bg-white"),children:(0,et.jsx)("div",{className:`h-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?`${m.name}: ${b.status} (${b.startDate} - ${b.endDate}) - ${b.leaveType}`:"",children:b&&b.leaveType!=="Full Day"&&(0,et.jsx)("div",{className:`h-3 w-6 ${b.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${m.id}-${f}`)})]},m.id))})]})})})})]})}function pn({currentDate:e,setCurrentDate:t,holidays:a}){let[o,r]=(0,sr.useState)(null),s=(new Date(e.getFullYear(),e.getMonth(),1).getDay()+6)%7,l=Array.from({length:42},(d,p)=>{let f=new Date(e.getFullYear(),e.getMonth(),p-s+1);return{date:f,isCurrentMonth:f.getMonth()===e.getMonth(),isToday:f.toDateString()===new Date().toDateString(),holidays:a.filter(g=>new Date(g.startDate)<=f&&new Date(g.endDate)>=f)}}),n=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},c=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))},m=()=>{t(new Date)};return(0,et.jsxs)("div",{className:"lg:flex lg:h-full lg:flex-col",children:[(0,et.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,et.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,et.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,et.jsx)("div",{className:"flex items-center",children:(0,et.jsxs)("div",{className:"relative flex items-center rounded-et gap-1 et:items-stretch",children:[(0,et.jsxs)(T,{onClick:n,variant:"outline",size:"icon",className:"rounded-l-et border-accent hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,et.jsx)(el.ChevronLeft,{className:"h-5 w-5","aria-hidden":"true"})]}),(0,et.jsx)(T,{variant:"outline",onClick:m,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative et:block",children:"Today"}),(0,et.jsxs)(T,{onClick:c,variant:"outline",size:"icon",className:"rounded-r-et border-accent hover:text-accent",children:[(0,et.jsx)("span",{className:"sr-only",children:"Next month"}),(0,et.jsx)(el.ChevronRight,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),(0,et.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,et.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,et.jsxs)("div",{className:"bg-white py-2",children:["M",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["T",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"et"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["et",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["T",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["F",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["et",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),(0,et.jsxs)("div",{className:"bg-white py-2",children:["et",(0,et.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,et.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[(0,et.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:l.map(d=>(0,et.jsxs)("div",{className:i(d.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[(0,et.jsx)("time",{dateTime:d.date.toISOString(),className:i("flex h-6 w-6 items-center justify-center rounded-full",d.isToday&&"bg-indigo-600 font-semibold text-white"),children:d.date.getDate()}),d.holidays.length>0&&(0,et.jsx)("Vn",{className:"mt-2 space-et-1 overflow-visible",children:d.holidays.map(p=>(0,et.jsx)("li",{className:"overflow-visible",children:(0,et.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${p.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:p.userName})},p.id))})]},d.date.toISOString()))}),(0,et.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:l.map(d=>(0,et.jsxs)("button",{type:"button",className:i(d.isCurrentMonth?"bg-white":"bg-gray-50",(d.date===o||d.isToday)&&"font-semibold",d.date===o&&"text-white",!d.date&&d.isToday&&"text-indigo-600",d.date!==o&&d.isCurrentMonth&&!d.isToday&&"text-gray-900",d.date!==o&&!d.isCurrentMonth&&!d.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:et-10"),children:[(0,et.jsx)("time",{dateTime:d.date.toISOString(),className:i("ml-auto",d.date===o&&d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",d.date===o&&!d.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:d.date.getDate()}),(0,et.jsxs)("span",{className:"sr-only",children:[d.holidays.length," holidays"]}),d.holidays.length>0&&(0,et.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:d.holidays.map(p=>(0,et.jsx)("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${p.status==="approved"?"bg-green-500":"bg-gray-500"}`},p.id))})]},d.date.toISOString()))})]})]})]})}var ha=require("lucide-react");function pc(...e){return e.filter(Boolean).join(" ")}function Vp({holidays:e,currentUser:t,currentDate:a,leaveApprovals:o,employees:r,submitLeaveRequest:s,approveLeave:l,rejectLeave:n}){let[c,m]=(0,sr.useState)("Calendar View"),d=(0,vd.useRouter)(),p=!1,f=(0,ln.parseISO)(a),g=async u=>{let v=(0,ln.format)(u,"dd-MM-yyyy"),M=new URL(window.location.href);return M.searchParams.set("date",v),d.push(M.toString()),{success:!0}};if(p)return(0,et.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,et.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:ha.Grid,current:c==="Grid View"},{name:"Calendar View",icon:ha.CalendarDays,current:c==="Calendar View"},{name:"Request Leave",icon:ha.PlusCircle,current:c==="Request Leave"},{name:"Approve Leave",icon:ha.CheckSquare,current:c==="Approve Leave"}];return(0,et.jsxs)("div",{className:"container mx-auto p-4 h-full",children:[(0,et.jsxs)("div",{className:"mb-8",children:[(0,et.jsxs)("div",{className:"sm:hidden",children:[(0,et.jsx)("select",{value:c,onChange:u=>m(u.target.value),className:"block w-full rounded-et border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(u=>(0,et.jsx)("option",{children:u.name},u.name))}),(0,et.jsx)(el.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,et.jsx)("div",{className:"hidden sm:block",children:(0,et.jsx)("div",{className:"border-b border-gray-200",children:(0,et.jsx)("nav",{className:"-mb-px flex space-et-8","aria-label":"Tabs",children:b.map(u=>(0,et.jsxs)("a",{onClick:()=>{(u.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&m(u.name)},className:pc(u.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",u.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-sm font-medium"),"aria-current":u.current?"page":void 0,children:[(0,et.jsx)(u.icon,{className:pc(u.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),(0,et.jsx)("span",{children:u.name})]},u.name))})})})]}),c==="Grid View"&&(0,et.jsx)(mn,{currentDate:f,setCurrentDate:g,holidays:e,employees:r}),c==="Calendar View"&&(0,et.jsx)(pn,{currentDate:f,setCurrentDate:g,holidays:e}),c==="Request Leave"&&(0,et.jsx)(cn,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:u=>s?s(u):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),c==="Approve Leave"&&(0,et.jsx)(nn,{leaveRequests:o,onApprove:u=>l?l(u):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:u=>n?n(u):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}function Qo({deal:e,users:t,customer:a,categories:o,onClose:r,onSave:s,onAddComment:l}){let[n,c]=(0,sr.useState)({...e,value:e.value||0,comments:e.comments||[],customer:e.customer||{}}),[m,d]=(0,sr.useState)(""),[p,f]=(0,sr.useState)(!1),[g,b]=(0,sr.useState)(null);(0,sr.useEffect)(()=>{f(JSON.stringify(e)!==JSON.stringify(n))},[e,n]);let u=async()=>{try{let w=await s(n);w.success?(f(!1),b(null)):console.error("Failed et save deal:",w.errors)}catch(w){console.error("Failed et save deal:",w)}},v=(w,Q)=>{c($a=>({...$a,[w]:Q}))},M=w=>{let Q=(n.categories||[]).includes(w)?(n.categories||[]).filter($a=>$a!==w):[...n.categories||[],w];v("categories",Q)},O=async()=>{if(m.trim()){let w={text:m,timestamp:new Date().toISOString()};try{let Q=await l(w);if(!Q.success){console.error("Failed et add comment:",Q.errors);return}}catch(Q){console.error("Failed et add comment:",Q)}c(Q=>({...Q,comments:[...Q.comments||[],w]})),d("")}},N=w=>{switch(w){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"}},L=w=>t?.find(Q=>Q.id===Number(w));return(0,et.jsx)(Pt,{open:!0,children:(0,et.jsxs)(ft,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[(0,et.jsxs)(Et,{className:"flex flex-row items-center justify-between",children:[(0,et.jsx)(Ht,{className:"text-2xl font-bold",children:a?.name||"vd customer"}),(0,et.jsxs)("div",{className:"flex space-et-2",children:[(0,et.jsx)(T,{variant:"outline",onClick:r,children:"Close"}),(0,et.jsxs)(T,{onClick:u,disabled:!p,children:[(0,et.jsx)(el.SaveIcon,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),(0,et.jsxs)(Ct,{className:"flex-grow pr-4",children:[(0,et.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[(0,et.jsx)("div",{className:"grid gap-2 m-1",children:g==="value"?(0,et.jsx)(Ge,{type:"number",value:n.value,onChange:w=>v("value",Number(w.target.value)),onBlur:()=>b(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):(0,et.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",n.value?.toLocaleString()]})}),(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Assignee"}),g==="assignee"?(0,et.jsxs)(ca,{value:n?.assignee?.id?.toString()||"",onValueChange:w=>v("assignee",L(w)),children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select assignee"})}),(0,et.jsx)(Ot,{children:t&&t.map(w=>(0,et.jsx)(Gt,{value:w?.id?.toString()||"",children:w.name},w.id))})]}):(0,et.jsxs)("div",{className:"flex items-center space-et-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("assignee"),children:[(0,et.jsx)(el.UserIcon,{className:"w-4 h-4 text-gray-400"}),(0,et.jsx)("span",{children:n?.assignee?.name})]})]}),(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Closure Date"}),g==="closureDate"?(0,et.jsx)(Ge,{type:"date",value:n.closureDate?.split("T")[0]??"",onChange:w=>v("closureDate",w.target.value),onBlur:()=>b(null),className:"mr-2",autoFocus:!0}):(0,et.jsxs)("div",{className:"flex items-center space-et-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("closureDate"),children:[(0,et.jsx)(el.CalendarIcon,{className:"w-4 h-4 text-gray-400"}),(0,et.jsx)("span",{children:n.closureDate?new Date(n.closureDate).toLocaleDateString("en-GB"):"N/et"})]})]})]}),(0,et.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Description"}),g==="description"?(0,et.jsx)(pa,{value:n.description||"",onChange:w=>v("description",w.target.value),onBlur:()=>b(null),className:"min-h-[100px]",autoFocus:!0}):(0,et.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>b("description"),children:n.description})]})}),(0,et.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Status"}),g==="status"?(0,et.jsxs)(ca,{value:n.status,onValueChange:w=>{v("status",w),b(null)},children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select status"})}),(0,et.jsx)(Ot,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(w=>(0,et.jsx)(Gt,{value:w,children:w},w))})]}):(0,et.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("status"),children:n.status})]}),(0,et.jsxs)("div",{className:"grid col-span-2 gap-2",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Categories"}),g==="categories"?(0,et.jsx)("div",{className:"grid grid-cols-2 gap-2 m-1",children:o.map(w=>(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsx)(gt,{id:w.id?.toString()||"",checked:(n.categories||[]).some(Q=>Q.id===w.id),onCheckedChange:()=>w.id!==void 0&&M(w)}),(0,et.jsx)("label",{htmlFor:(w.id??"").toString(),className:`text-sm font-medium ${N(w.type||"sector")} px-2 py-1 rounded`,children:w.name})]},w.id))}):(0,et.jsx)("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("categories"),children:n.categories&&n.categories.map(w=>{let Q=w;return Q?(0,et.jsx)(Ue,{variant:"outline",className:N(Q.type||"sector"),children:Q.name},Q.id):null})})]}),(0,et.jsxs)("div",{className:"grid gap-2 m-1",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"COGE Status"}),g==="gecoStatus"?(0,et.jsxs)(ca,{value:n.gecoStatus??void 0,onValueChange:w=>{v("gecoStatus",w),b(null)},children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select status"})}),(0,et.jsx)(Ot,{children:["firm","forecast","other"].map(w=>(0,et.jsx)(Gt,{value:w,children:w.charAt(0).toUpperCase()+w.slice(1)},w))})]}):(0,et.jsx)("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>b("gecoStatus"),children:n.gecoStatus?n.gecoStatus.charAt(0).toUpperCase()+n.gecoStatus.slice(1):"N/et"})]})]}),(0,et.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[(0,et.jsxs)("div",{className:"grid gap-2",children:[(0,et.jsx)(J,{className:"text-sm font-medium text-accent",children:"Comments"}),(0,et.jsx)(Ct,{className:"h-[200px] overflow-et-auto",children:(0,et.jsx)("div",{className:"space-et-2",children:n.comments&&n.comments.slice().sort((w,Q)=>new Date(Q.timestamp||"").getTime()-new Date(w.timestamp||"").getTime()).map(w=>(0,et.jsxs)("div",{className:"p-3 rounded-lg",children:[(0,et.jsx)("p",{className:"text-sm text-foreground",children:w.text}),(0,et.jsxs)("p",{className:"text-xs text-foreground mt-1",children:[w?.author?.name," - ",new Date(w.timestamp||"").toLocaleString()]})]},w.id))})}),(0,et.jsxs)("div",{className:"flex mt-2",children:[(0,et.jsx)(Ge,{value:m,onChange:w=>d(w.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),(0,et.jsxs)(T,{onClick:O,className:"ml-2",children:[(0,et.jsx)(el.PlusIcon,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),(0,et.jsxs)("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(n.updatedAt||"").toLocaleString()]})]})]})]})})}function un({deal:e,customer:t,categories:a,onClick:o,compact:r=!1}){let s=a.find(l=>l.type==="proposition"&&(e.categories??[]).includes(l.id));return r?(0,et.jsxs)(pe,{className:"mb-1 cursor-pointer hover:shadow-et transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,et.jsxs)(Se,{className:"pb-1 pt-2",children:[(0,et.jsx)(Re,{className:"text-sm font-semibold text-foreground",children:t?.name}),(0,et.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,et.jsx)(we,{className:"text-xs text-gray-200 pb-2",children:(0,et.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,et.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,et.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})})})]}):(0,et.jsxs)(pe,{className:"mb-4 cursor-pointer hover:shadow-et transition-shadow border-l-4 border-l-accent",onClick:o,children:[(0,et.jsxs)(Se,{className:"pb-2",children:[(0,et.jsx)("div",{className:"flex justify-between items-center",children:(0,et.jsx)(Re,{className:"text-lg font-semibold text-foreground",children:t?.name})}),(0,et.jsx)("p",{className:"text-sm text-foreground mt-1",children:e.description})]}),(0,et.jsxs)(we,{children:[(0,et.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,et.jsxs)("div",{className:"flex items-center text-sm text-foreground",children:[(0,et.jsx)(el.UserIcon,{className:"w-4 h-4 mr-1 text-xs"}),(0,et.jsx)("span",{children:e.assignee.name})]}),(0,et.jsx)("div",{className:"flex items-center text-sm font-bold text-green-600",children:(0,et.jsxs)("span",{children:["\xA3",e.value.toLocaleString()]})})]}),(0,et.jsx)("div",{className:"flex justify-between items-left mb-3",children:(0,et.jsxs)("div",{className:"flex items-center text-xs text-gray-200",children:[(0,et.jsx)(el.CalendarIcon,{className:"w-3 h-3 mr-1"}),(0,et.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]})}),(0,et.jsx)("div",{className:"flex justify-between items-left",children:s&&(0,et.jsx)(Ue,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:s.name})})]})]})}var as=require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration");function Jo({status:e,deals:t,users:a,customers:o,categories:r,onDealClick:s,calculateColumnValue:l,calculateWeightedValue:n,compact:c=!1}){return(0,et.jsxs)("div",{className:"flex flex-col w-80",children:[(0,et.jsxs)("h2",{className:"text-xl font-semibold mb-4",children:[" ",e.charAt(0).toUpperCase()+e.slice(1)]}),(0,et.jsx)(as.Droppable,{droppableId:e,isDropDisabled:!1,children:m=>(0,et.jsxs)("div",{ref:m.innerRef,...m.droppableProps,className:"bg-background/90 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[t.map((d,p)=>(0,et.jsx)(as.Draggable,{draggableId:d.id.toString(),index:d.id,children:f=>(0,et.jsx)("div",{ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:(0,et.jsx)(un,{deal:d,customer:d.customer,categories:r,onClick:()=>s(d),compact:c})})},d.id.toString())),m.placeholder]})}),(0,et.jsxs)("div",{className:"mt-4 text-sm p-3 rounded-lg shadow",children:[(0,et.jsxs)("p",{className:"font-semibold",children:["Total:"," ",(0,et.jsxs)("span",{className:"text-green-600",children:["\xA3",l(t).toLocaleString()]})]}),(0,et.jsxs)("p",{className:"font-semibold",children:["Weighted:"," ",(0,et.jsxs)("span",{className:"text-blue-600",children:["\xA3",n(t,e).toLocaleString()]})]})]})]})}var Up=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"];function jp({initialData:e,addNewDeal:t,updateDeal:a,addComment:o,addNewCustomer:r}){let[s,l]=(0,sr.useState)(null),n=p=>(e.deals??[]).filter(f=>f.status===p),c=p=>p.reduce((f,g)=>f+(g.value||0),0),m=(p,f)=>{let g={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return p.reduce((b,u)=>b+(u.value||0)*g[f],0)},d=(0,sr.useCallback)(p=>{let{source:f,destination:g}=p;if(!g||f.droppableId===g.droppableId&&f.index===g.index)return;let b=f.droppableId,u=g.droppableId,v=e.deals?.filter(O=>O.id===f.index)[0],M=[...e.deals??[]];v&&(v.status=u,a(v))},[a]);return(0,et.jsx)(as.DragDropContext,{onDragEnd:d,children:(0,et.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,et.jsx)("div",{className:"flex space-et-4 pb-4",children:Up.filter(p=>p!=="Lost").map(p=>{let f=n(p);return(0,et.jsx)(Jo,{status:p,deals:f,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:l,calculateColumnValue:c,calculateWeightedValue:m},p)})}),s&&(0,et.jsx)(Qo,{deal:s,users:e.users,customer:s.customer,categories:e.categories??[],onClose:()=>l(null),onSave:a,onAddComment:p=>o(s.id.toString(),p)})]})})}function fn({onSubmit:e}){let[t,a]=(0,sr.useState)({name:"",intro:"",active:!1});return(0,et.jsxs)("form",{onSubmit:r=>{r.preventDefault(),t.name&&(e({...t,name:t.name,updatedAt:new Date().toISOString(),createdAt:new Date().toISOString()}),a({name:"",intro:"",active:!0}))},className:"space-et-4",children:[(0,et.jsxs)("div",{className:"space-et-2",children:[(0,et.jsx)(J,{htmlFor:"customerName",children:"Customer Name"}),(0,et.jsx)(Ge,{id:"customerName",value:t.name,onChange:r=>a({...t,name:r.target.value}),placeholder:"Enter customer name",required:!0})]}),(0,et.jsxs)("div",{className:"space-et-2",children:[(0,et.jsx)(J,{htmlFor:"customerIntro",children:"Intro"}),(0,et.jsx)(pa,{id:"customerIntro",value:t.intro??"",onChange:r=>a({...t,intro:r.target.value}),placeholder:"Enter customer intro"})]}),(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsx)(gt,{id:"activeCustomer",checked:!!t.active,onCheckedChange:r=>a({...t,active:r})}),(0,et.jsx)(J,{htmlFor:"activeCustomer",children:"Active Customer"})]}),(0,et.jsx)(T,{type:"submit",className:"w-full",children:"Add Customer"})]})}function Xp({customers:e,users:t,categories:a,onSubmit:o,initialDeal:r,onAddCustomer:s,onClose:l}){let[n,c]=(0,sr.useState)(r||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[m,d]=(0,sr.useState)(!1),[p,f]=(0,sr.useState)({});(0,sr.useEffect)(()=>{r&&c(r)},[r]);let g=()=>{let N={};return n.customer||(N.customer="Customer is required"),n.value||(N.value="Value is required"),n.assignee||(N.assignee="Assignee is required"),n.closureDate||(N.closureDate="Closure Date is required"),f(N),Object.keys(N).length===0},b=async N=>{N.preventDefault(),f({});try{if(g()){let L=await o({...n});L.success?(c({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),l?.()):f(L.errors||{})}}catch{f({submit:"An error occurred while submitting the form."})}},u=N=>{c(L=>({...L,categories:(L.categories||[]).includes(N.id)?(L.categories||[]).filter(w=>w!==N.id):[...L.categories||[],N.id]}))},v=async N=>{c({...n,customer:N});try{let L=await s(N);L.success?d(!1):f(L.errors||{})}catch{f({submit:"An error occurred while submitting the form."})}},M=N=>t?.find(L=>L.id===Number(N)),O=N=>e?.find(L=>L.id===Number(N));return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsxs)("form",{onSubmit:b,className:"space-et-6",children:[(0,et.jsx)(Ct,{className:"h-[60vh] pr-4",children:(0,et.jsxs)("div",{className:"space-et-6 px-4",children:[(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"customer",children:"Customer"}),(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsxs)(ca,{value:n.customer?.id?.toString(),onValueChange:N=>c({...n,customer:O(N)}),children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select customer"})}),(0,et.jsx)(Ot,{children:e.map(N=>(0,et.jsx)(Gt,{value:N.id?.toString()||"",children:N.name},N.id))})]}),(0,et.jsx)(T,{variant:"outline",size:"icon",onClick:()=>d(!0),children:(0,et.jsx)(el.PlusIcon,{className:"w-5 h-5"})})]}),p.customerId&&(0,et.jsx)("p",{className:"text-red-500 text-sm",children:p.customerId})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"value",children:"Value"}),(0,et.jsx)(Ge,{id:"value",type:"number",value:n.value||"",onChange:N=>c({...n,value:Number.parseFloat(N.target.value)}),placeholder:"Enter deal value"}),p.value&&(0,et.jsx)("p",{className:"text-red-500 text-sm",children:p.value})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"assignee",children:"Assignee"}),(0,et.jsxs)(ca,{value:n.assignee?.id?.toString(),onValueChange:N=>c({...n,assignee:M(N)}),children:[(0,et.jsx)(zt,{children:(0,et.jsx)(ma,{placeholder:"Select assignee"})}),(0,et.jsx)(Ot,{children:t&&t.map(N=>(0,et.jsx)(Gt,{value:N.id?.toString()||"",children:N.name},N.id))})]}),p.assignee&&(0,et.jsx)("p",{className:"text-red-500 text-sm",children:p.assignee})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"description",children:"Description"}),(0,et.jsx)(pa,{id:"description",value:n.description||"",onChange:N=>c({...n,description:N.target.value}),placeholder:"Enter deal description"})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{children:"Categories"}),(0,et.jsx)("div",{className:"space-et-4",children:["proposition","source","sector"].map(N=>(0,et.jsxs)("div",{className:"space-et-2",children:[(0,et.jsx)("h4",{className:"text-sm font-medium",children:N.charAt(0).toUpperCase()+N.slice(1)}),(0,et.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.filter(L=>L.type===N).map(L=>(0,et.jsxs)("div",{className:"flex items-center space-et-2",children:[(0,et.jsx)(gt,{id:L.id.toString(),checked:n.categories?.includes(L.id),onCheckedChange:()=>u(L)}),(0,et.jsx)("label",{htmlFor:L.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:L.name})]},L.id))})]},N))})]}),(0,et.jsxs)("div",{className:"space-et-2 space-et-2",children:[(0,et.jsx)(J,{htmlFor:"closureDate",children:"Closure Date"}),(0,et.jsx)(Ge,{id:"closureDate",type:"date",value:n.closureDate||"",onChange:N=>c({...n,closureDate:N.target.value})}),p.closureDate&&(0,et.jsx)("p",{className:"text-red-500 text-sm",children:p.closureDate})]})]})}),(0,et.jsx)(T,{type:"submit",className:"w-full",children:r?"Update Deal":"Add Deal"})]}),(0,et.jsx)(Pt,{open:m,onOpenChange:d,children:(0,et.jsxs)(ft,{children:[(0,et.jsx)(Et,{children:(0,et.jsx)(Ht,{children:"Add New Customer"})}),(0,et.jsx)(fn,{onSubmit:v})]})})]})}var Yp=["firm","forecast","other"];function qp({initialData:e,updateDeal:t,addComment:a}){let[o,r]=(0,sr.useState)(null),s=m=>(e.deals??[]).filter(d=>d.gecoStatus===m).filter(d=>d.status!=="Lost").filter(d=>d.status!=="Cold"),l=m=>m.reduce((d,p)=>d+(p.value||0),0),n=(m,d)=>{let p={Cold:0,Qualified:.2,"Proposal Made":.5,"SoW Submitted":.8,Won:1,Lost:0};return m.reduce((f,g)=>f+(g.value||0)*(p[g.status]??0),0)},c=(0,sr.useCallback)(m=>{let{source:d,destination:p}=m;if(!p||d.droppableId===p.droppableId&&d.index===p.index)return;let f=d.droppableId,g=p.droppableId,b=e.deals?.filter(v=>v.id===d.index)[0],u=[...e.deals??[]];b&&(b.gecoStatus=g,t(b))},[t]);return(0,et.jsx)(as.DragDropContext,{onDragEnd:c,children:(0,et.jsxs)("div",{className:"p-4 h-full overflow-auto",children:[(0,et.jsx)("div",{className:"flex space-et-4 pb-4",children:Yp.map(m=>{let d=s(m);return(0,et.jsx)(Jo,{status:m,deals:d,customers:e.customers??[],users:e.users,categories:e.categories??[],onDealClick:r,calculateColumnValue:l,calculateWeightedValue:n,compact:!0},m)})}),o&&(0,et.jsx)(Qo,{deal:o,users:e.users,customer:o.customer,categories:e.categories??[],onClose:()=>r(null),onSave:t,onAddComment:m=>a(o.id.toString(),m)})]})})}var Cc=h(require("react"));function xc({taskId:e,polling:t=!0,system:a="payload"}){let[o,r]=(0,sr.useState)(null),[s,l]=(0,sr.useState)(!1),[n,c]=(0,sr.useState)(null),m=async(p=!0)=>{if(e){p&&l(!0);try{let f=await fetch(`/api/tasks/${e}`);if(!f.ok)throw new Error(`Failed et fetch task: ${f.statusText}`);let g=await f.json();r(g)}catch(f){console.error("Error fetching task:",f),c(f instanceof Error?f:new Error("Unknown error occurred"))}finally{p&&l(!1)}}},d=()=>m(!1);return(0,sr.useEffect)(()=>{e&&m(!0);let p=null;return e&&t&&(p=setInterval(d,5e3)),()=>{p&&clearInterval(p)}},[e,t]),{task:o,loading:s,error:n}}var Kp=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"}},Qp=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function gn({data:e}){let{id:t,system:a,fetchLatest:o,taskData:r,error:s}=e||{};if(!t)return null;let l=null,n=!0,c=s,m=o!==void 0?o:!0;if(l=r||{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:m,taskData:l,error:c}),m){let{task:g,loading:b,error:u}=xc({taskId:t,system:a});l=g,n=b,c=u}else n=!1;let d=Kp(l?.status||"todo"),p=Qp(l?.status||"todo"),f=l?.dateLogged||new Date().toISOString();try{let g=new Date(l?.dateLogged||"");isNaN(g.getTime())||(f=(0,ln.formatDistanceToNow)(g,{addSuffix:!0}))}catch{}return(0,et.jsxs)(pe,{className:i("w-full max-w-et shadow-et",c&&"border border-destructive"),children:[(0,et.jsxs)(Se,{className:"pb-2",children:[(0,et.jsxs)("div",{className:"flex justify-between items-start",children:[(0,et.jsx)(Re,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,et.jsx)(Ue,{className:`${d}`,children:p})]}),l?.project&&(0,et.jsxs)(Di,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,et.jsx)(we,{className:"pb-2",children:n?(0,et.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,et.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,et.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,et.jsx)(Mi,{className:"pt-2 flex items-center justify-between",children:(0,et.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,et.jsx)(el.Clock,{className:"h-3 w-3 mr-1"}),(0,et.jsxs)("span",{children:["Created ",f]}),(0,et.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,et.jsxs)("span",{children:["Task #",t]})]})})]})}var Jp={task:gn},Zp=`
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
18
  </svg>`,eu=`data:image/svg+xml;utf8,${encodeURIComponent(Zp)}`,bn=Cc.default.memo(function(t){let{id:a,message:o,currentUser:r,role:s}=t,l=s==="user",n=l?r?.name||"You":r?.name||"AI Assistant",c=l?r?.avatar||"/placeholder-user.jpg":"/placeholder.svg?height=40&width=40";switch(o.type){case"forwarding":return(0,et.jsxs)("div",{className:`flex items-start gap-3 text-primary text-xs ${l?"flex-row-reverse":""}`,children:["Forwarding et ",o?.data?.content]},a);case"text":return(0,et.jsxs)("div",{className:`flex items-start gap-3 ${l?"flex-row-reverse":""}`,children:[l?(0,et.jsxs)($e,{children:[(0,et.jsx)(We,{src:c,alt:n}),(0,et.jsx)(Ve,{children:n.substring(0,2).toUpperCase()})]}):(0,et.jsx)("img",{src:eu,alt:"AI Assistant",className:"w-10 h-10"}),(0,et.jsxs)("div",{className:`grid gap-1.5 ${l?"text-right":""}`,children:[(0,et.jsx)("div",{className:"flex items-center gap-2",children:(0,et.jsx)("span",{className:"font-medium",children:n})}),(0,et.jsx)("div",{className:`rounded-lg p-3 text-sm ${l?"bg-primary text-primary-foreground":"bg-muted"}`,style:{whiteSpace:"pre-line"},children:o?.data?.content})]})]},a);case"image":return(0,et.jsxs)("div",{className:`flex items-start gap-3 ${l?"flex-row-reverse":""}`,children:[(0,et.jsxs)($e,{className:l?"":"ai-border",children:[(0,et.jsx)(We,{src:c,alt:n}),(0,et.jsx)(Ve,{children:n.substring(0,2).toUpperCase()})]}),(0,et.jsxs)("div",{className:`grid gap-1.5 ${l?"text-right":""}`,children:[(0,et.jsx)("div",{className:"flex items-center gap-2",children:(0,et.jsx)("span",{className:"font-medium",children:n})}),(0,et.jsx)("img",{src:o?.data?.image,alt:"User uploaded content",className:`rounded-lg p-3 text-sm ${l?"bg-primary text-primary-foreground":"bg-muted"}`,style:{maxWidth:"100%",height:"auto"}})]})]},a);case"tool-invocation":if(o.data&&o.data.tool){let m=Jp[o.data.tool];return m?(0,et.jsx)("div",{className:"mt-2",children:(0,et.jsx)(m,{data:o.data})}):(console.warn(`Tool ${o.data.tool} is not defined.`),(0,et.jsx)("div",{className:"mt-2",children:"......"}))}}});function tu({messages:e,isLoading:t}){let a=(0,sr.useRef)(null);return(0,sr.useEffect)(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,et.jsx)("div",{className:"flex flex-col h-full overflow-hidden",children:(0,et.jsxs)(Ct,{className:"container flex-1 p-4",children:[(0,et.jsxs)("div",{className:"space-et-6",children:[e.length===0&&(0,et.jsx)("div",{className:"flex items-center justify-center h-full pt-60",children:(0,et.jsxs)("div",{className:"text-center max-w-et",children:[(0,et.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Welcome et Dexter"}),(0,et.jsx)("p",{className:"text-zinc-400",children:"Ask et anything or direct your question et a business function directly using the toolbar below."})]})}),t&&(0,et.jsxs)("div",{className:"flex items-start gap-3",children:[(0,et.jsxs)($e,{className:"ai-border",children:[(0,et.jsx)(We,{src:"/placeholder.svg?height=40&width=40",alt:"AI Assistant"}),(0,et.jsx)(Ve,{children:"AI"})]}),(0,et.jsxs)("div",{className:"grid gap-1.5",children:[(0,et.jsx)("div",{className:"flex items-center gap-2",children:(0,et.jsx)("span",{className:"font-medium",children:"AI Assistant"})}),(0,et.jsx)("div",{className:"rounded-lg p-3 text-sm bg-muted",children:(0,et.jsxs)("div",{className:"flex space-et-2",children:[(0,et.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce"}),(0,et.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.2s]"}),(0,et.jsx)("div",{className:"w-2 h-2 rounded-full bg-current animate-bounce [animation-delay:0.4s]"})]})})]})]}),e.map((o,r)=>(0,et.jsx)(bn,{...o},r))]}),(0,et.jsx)("div",{ref:a})]})})}0&&(module.exports={Alert,AlertDescription,AlertTitle,ApproveLeave,Avatar,AvatarFallback,AvatarImage,Badge,BannerBlock,BrandLogo,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Breadcrumbs,Button,CMSLink,CRMCogeBoard,CRMKanbanBoard,Calendar,CalendarView,CallToActionBlock,CallToActionBlockOld,Card,Categories,ChatCardTask,ChatInterfaceMessages,ChatMessage,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,CollectionArchive,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,Container,ContentBlock,ContentCard,CopyButton,CustomLink,CustomerCard,DarkTop,DealCard,DealDetails,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,DynamicIcon,EventCard,FeatureCard,FeatureGrid,FeaturesBlock,Filter,FlowPrintable,Footer,Header,HeaderDesktop,HeaderMobile,HeadingImage,Hero,HighImpactHero,HolidayGrid,HolidayTracker,HoverCard,HoverCardContent,HoverCardTrigger,Image,ImageBlock,InfoTile,Input,Insight,KanbanColumn,Label,LightTop,Logo,LowImpactHero,MOTD,Mask,Media,MediaBlock,MediumImpactHero,NewCustomerForm,NewDealForm,NewsGrid,OrgChart,PagePrintable,PageRange,PageShape,Pagination,PayloadPagination,Popover,PopoverAnchor,PopoverContent,PopoverTrigger,PostHero,PricingCard,Printable,ProjectCard,ProjectTeam,ProposalSummary,RelatedContent,RelatedPagesMenu,RelatedPosts,RenderBlocks,RenderBlocksWithShapes,RenderHero,RequestLeave,ReusableContentBlock,RichText,ScrollArea,ScrollBar,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,Tabs,TabsContent,TabsList,TabsTrigger,TextAndImages,Textarea,Theme,ThemeProvider,ThemeWithShapes,Toast,ToastAction,ToastClose,ToastDescription,ToastProvider,ToastTitle,ToastViewport,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,VideoHeader,WhyUs,badgeVariants,buttonVariants,toggleVariants,useIsMobile,useSidebar,useToast});
@@ -1 +1 @@
1
- import{a as vc,b as wc,c as xc}from"../chunk-HB4BHTNM.mjs";import{a as sc}from"../chunk-HBE5POUB.mjs";import"../chunk-6BDDYPGK.mjs";import{a as rc}from"../chunk-GNMQAGIE.mjs";import{a as pc}from"../chunk-AUBKJ4XO.mjs";import{a as oc}from"../chunk-UVPODMUO.mjs";import{a as qc}from"../chunk-3SZR5DC2.mjs";import"../chunk-3A4UGUFM.mjs";import{a as uc}from"../chunk-L2CGDHVO.mjs";import{a as Yb}from"../chunk-CSWXKGJE.mjs";import{a as tc}from"../chunk-KCCDR7HB.mjs";import{a as ad}from"../chunk-Z3YAIJQT.mjs";import{a as Zc}from"../chunk-AJWSKECP.mjs";import{a as Yc}from"../chunk-CZIRJUID.mjs";import{a as $c}from"../chunk-I6X4KLR3.mjs";import{a as _c}from"../chunk-JTQWVSV5.mjs";import{a as kd}from"../chunk-W7KPRGG2.mjs";import{a as jd}from"../chunk-7PDGAGJL.mjs";import{a as id}from"../chunk-YMBNEJBV.mjs";import"../chunk-LTTO57ZK.mjs";import{a as gd}from"../chunk-TASJS6US.mjs";import{a as fd}from"../chunk-ERUB6LU6.mjs";import{a as hd}from"../chunk-MCE2INP2.mjs";import{a as ed}from"../chunk-BP62X7AM.mjs";import{a as dd}from"../chunk-W3ONOYB6.mjs";import{a as cd}from"../chunk-FFESN4FM.mjs";import{a as bd}from"../chunk-WSDHDEFO.mjs";import"../chunk-A24EPYUY.mjs";import"../chunk-QKGEV7LG.mjs";import{a as Ec}from"../chunk-WHH4AVZT.mjs";import{a as Cc}from"../chunk-EDLBPAEH.mjs";import{a as Ac}from"../chunk-KNJGZBXS.mjs";import{a as Bc}from"../chunk-326JXRIS.mjs";import{a as Oc,b as Pc}from"../chunk-ZJZ5HYAW.mjs";import{a as Nc}from"../chunk-LHL2AONM.mjs";import{a as Fc}from"../chunk-R4QBZLWY.mjs";import{a as Hc}from"../chunk-PKSY2IBO.mjs";import{a as Gc}from"../chunk-22KXWTT3.mjs";import{a as Dc}from"../chunk-MCEK7XUK.mjs";import{a as Ic}from"../chunk-JHTGGDU5.mjs";import{a as yb,b as zb,c as Ab,d as Bb}from"../chunk-IEQL2U53.mjs";import{a as Ja,b as Ka,c as La}from"../chunk-DOJR2RDB.mjs";import{a as Wa,b as Xa,c as Ya,d as Za,e as _a,f as $a,g as ab,h as bb,i as cb}from"../chunk-64UGFPFV.mjs";import{a as db,b as eb,c as fb}from"../chunk-KHGZULZP.mjs";import{a as k,b as l,c as m,d as n,e as o,f as p,g as q,h as r,i as s,j as t,k as u,l as v,m as w,n as x,o as y}from"../chunk-K4RVBOIC.mjs";import{a as Ea,b as Fa,c as Ga,d as Ha}from"../chunk-MU4ETGDT.mjs";import{a as xb}from"../chunk-BMN3FVZS.mjs";import{a as Aa,b as Ba}from"../chunk-63W64WWD.mjs";import{a as ya,b as za}from"../chunk-IKTCLX2C.mjs";import{a as mb,b as nb,c as ob,d as pb,e as qb,f as rb,g as sb,h as tb,i as ub,j as vb}from"../chunk-OGZERPA4.mjs";import{a as Ca,b as Da}from"../chunk-6T322YHB.mjs";import{a as lb}from"../chunk-KJIBE57R.mjs";import{a as wb}from"../chunk-CX4XB5W2.mjs";import{a as Ia}from"../chunk-EECIYMTX.mjs";import"../chunk-YNNW2C2U.mjs";import{a as zc}from"../chunk-QUOLG5NC.mjs";import{a,b,c,d,e,f,g}from"../chunk-ZJ56IQPQ.mjs";import{a as nc}from"../chunk-7O2TMDTD.mjs";import{a as mc}from"../chunk-Z6NED523.mjs";import{a as cc}from"../chunk-EPTHSTUM.mjs";import{a as ac}from"../chunk-53QLSQCO.mjs";import{a as bc}from"../chunk-UMBMLD26.mjs";import{a as ec}from"../chunk-JCH2CCQ7.mjs";import{a as Zb}from"../chunk-RVRIMD6M.mjs";import"../chunk-UF3I2XE2.mjs";import"../chunk-GXC2S7UQ.mjs";import"../chunk-RYZTCMVC.mjs";import{a as fc,b as gc,c as hc,d as ic,e as jc,f as kc,g as lc}from"../chunk-MYDBD7LR.mjs";import"../chunk-3RPTKOCL.mjs";import{a as dc}from"../chunk-EDB4YGKM.mjs";import{a as Cb,b as Eb,c as Fb,d as Lb,f as Mb,g as Ob,h as Xb}from"../chunk-6JAIW45L.mjs";import"../chunk-O5BAW5XQ.mjs";import{a as Db}from"../chunk-C4DU747D.mjs";import"../chunk-4EQF35LM.mjs";import"../chunk-56RXRTGZ.mjs";import"../chunk-CTKUF2I6.mjs";import"../chunk-L3PFZ7PW.mjs";import"../chunk-WDDAVAVV.mjs";import{a as Sb}from"../chunk-VIS6GPCT.mjs";import{a as Vb}from"../chunk-E6KVX2UG.mjs";import{a as Rb}from"../chunk-LLNCOMIM.mjs";import{a as Ub}from"../chunk-6HORFOA3.mjs";import{a as Wb}from"../chunk-KUZCFJTH.mjs";import{a as Jb}from"../chunk-VXGRJCCM.mjs";import{a as Kb}from"../chunk-DAJNZDN6.mjs";import{a as Ib}from"../chunk-KETV2XVN.mjs";import"../chunk-FRTYO74I.mjs";import"../chunk-KHZPOMKL.mjs";import{a as Hb}from"../chunk-7PBTM4J4.mjs";import"../chunk-4BDIVC2Q.mjs";import{a as Gb}from"../chunk-TQQVBE66.mjs";import{a as Ma,b as Na,c as Oa,d as Pa,e as Qa,f as Ra,g as Sa,h as Ta,i as Ua,j as Va}from"../chunk-BUCI7BPM.mjs";import{a as yc}from"../chunk-ANTK5LAD.mjs";import{a as xa}from"../chunk-WGEMXPWB.mjs";import{a as qa,b as ra,c as sa,d as ta,e as ua,f as va,g as wa}from"../chunk-PWBAD26X.mjs";import{a as h,b as i,c as j}from"../chunk-YNCJATT7.mjs";import{a as T,b as U,c as V,d as W,e as X,f as Y,g as Z,h as _,i as $,j as aa,k as ba,l as ca,m as da,n as ea,o as fa,p as ga,q as ha,r as ia,s as ja,t as ka,u as la,v as ma,w as na,x as oa}from"../chunk-SUO6GOJS.mjs";import{a as A}from"../chunk-GRCMMAFX.mjs";import{a as B,b as C,c as D,d as E,e as F,f as G,g as H,h as I,i as J,j as K}from"../chunk-HJK6BCTE.mjs";import{a as O}from"../chunk-RHFLBRXF.mjs";import{a as z}from"../chunk-JPZJET3B.mjs";import{a as P,b as Q,c as R,d as S}from"../chunk-NACHOXV5.mjs";import{a as M,b as N}from"../chunk-BPSLUO5I.mjs";import{a as $b}from"../chunk-IQPZEEYJ.mjs";import{a as _b}from"../chunk-H7D3PZKE.mjs";import{a as Pb}from"../chunk-FHJDQP4I.mjs";import{a as Qb}from"../chunk-BLD454AX.mjs";import{a as gb,b as hb,c as ib}from"../chunk-4BHOIXJM.mjs";import{a as jb,b as kb}from"../chunk-J2IHT57D.mjs";import"../chunk-4YFMDLHL.mjs";import{a as Xc}from"../chunk-2ZB6Z7XN.mjs";import{a as Qc}from"../chunk-VFXHLJ45.mjs";import{a as Rc}from"../chunk-FVPWO556.mjs";import{a as Lc,b as Mc}from"../chunk-INOUDNCK.mjs";import"../chunk-ZDPQXVTF.mjs";import"../chunk-55EX54R7.mjs";import{a as Vc}from"../chunk-BONRVXMX.mjs";import{a as Kc}from"../chunk-X5KZKO2V.mjs";import{a as Wc}from"../chunk-WKFNZUIR.mjs";import{a as Tc}from"../chunk-6MWXSKBH.mjs";import"../chunk-VR6QUPNE.mjs";import{a as Uc}from"../chunk-H6POT4A7.mjs";import{a as Sc}from"../chunk-TEMKCAXW.mjs";import{a as Jc}from"../chunk-KTXQBXXJ.mjs";import{a as Tb}from"../chunk-WISCWNL2.mjs";import{a as Nb}from"../chunk-FVM5SQT2.mjs";import"../chunk-HTVHCBXQ.mjs";import"../chunk-Q3G5UAAD.mjs";import"../chunk-ZLSF5YXT.mjs";import{c as pa}from"../chunk-CV7PH2KH.mjs";import{a as L}from"../chunk-FRWX5YES.mjs";import"../chunk-M6LJ4BNZ.mjs";export{db as Alert,fb as AlertDescription,eb as AlertTitle,Yc as ApproveLeave,gb as Avatar,ib as AvatarFallback,hb as AvatarImage,kb as Badge,Cb as BannerBlock,Sc as BrandLogo,a as Breadcrumb,g as BreadcrumbEllipsis,c as BreadcrumbItem,d as BreadcrumbLink,b as BreadcrumbList,e as BreadcrumbPage,f as BreadcrumbSeparator,Pc as Breadcrumbs,N as Button,Db as CMSLink,hd as CRMCogeBoard,ed as CRMKanbanBoard,xb as Calendar,$c as CalendarView,Fb as CallToActionBlock,Eb as CallToActionBlockOld,mc as Card,Dc as Categories,id as ChatCardTask,kd as ChatInterfaceMessages,jd as ChatMessage,lb as Checkbox,Hb as CodeBlock,h as Collapsible,j as CollapsibleContent,i as CollapsibleTrigger,oc as CollectionArchive,Wa as Command,Xa as CommandDialog,_a as CommandEmpty,$a as CommandGroup,Ya as CommandInput,bb as CommandItem,Za as CommandList,ab as CommandSeparator,cb as CommandShortcut,Jc as Container,dc as ContentBlock,Xb as ContentCard,Gb as CopyButton,Tb as CustomLink,Pb as CustomerCard,kc as DarkTop,cd as DealCard,bd as DealDetails,Ma as Dialog,Pa as DialogClose,Ra as DialogContent,Va as DialogDescription,Ta as DialogFooter,Sa as DialogHeader,Qa as DialogOverlay,Oa as DialogPortal,Ua as DialogTitle,Na as DialogTrigger,k as DropdownMenu,u as DropdownMenuCheckboxItem,s as DropdownMenuContent,m as DropdownMenuGroup,t as DropdownMenuItem,w as DropdownMenuLabel,n as DropdownMenuPortal,p as DropdownMenuRadioGroup,v as DropdownMenuRadioItem,x as DropdownMenuSeparator,y as DropdownMenuShortcut,o as DropdownMenuSub,r as DropdownMenuSubContent,q as DropdownMenuSubTrigger,l as DropdownMenuTrigger,Nb as DynamicIcon,Qb as EventCard,Ob as FeatureCard,Yb as FeatureGrid,Lb as FeaturesBlock,Ec as Filter,wc as FlowPrintable,Vc as Footer,Wc as Header,Tc as HeaderDesktop,Uc as HeaderMobile,ec as HeadingImage,Wb as Hero,Fc as HighImpactHero,_c as HolidayGrid,ad as HolidayTracker,Ja as HoverCard,La as HoverCardContent,Ka as HoverCardTrigger,Sb as Image,Kb as ImageBlock,_b as InfoTile,z as Input,Zb as Insight,dd as KanbanColumn,Ia as Label,lc as LightTop,pc as Logo,Hc as LowImpactHero,$b as MOTD,Mc as Mask,Ib as Media,Jb as MediaBlock,Gc as MediumImpactHero,fd as NewCustomerForm,gd as NewDealForm,tc as NewsGrid,ac as OrgChart,xc as PagePrintable,qc as PageRange,Lc as PageShape,Cc as Pagination,rc as PayloadPagination,Ea as Popover,Ga as PopoverAnchor,Ha as PopoverContent,Fa as PopoverTrigger,Ic as PostHero,Vb as PricingCard,vc as Printable,Rb as ProjectCard,Ac as ProjectTeam,bc as ProposalSummary,Bc as RelatedContent,Xc as RelatedPagesMenu,nc as RelatedPosts,gc as RenderBlocks,ic as RenderBlocksWithShapes,Oc as RenderHero,Zc as RequestLeave,fc as ReusableContentBlock,Mb as RichText,Ca as ScrollArea,Da as ScrollBar,Nc as SectionHero,mb as Select,sb as SelectContent,nb as SelectGroup,ub as SelectItem,tb as SelectLabel,rb as SelectScrollDownButton,qb as SelectScrollUpButton,vb as SelectSeparator,pb as SelectTrigger,ob as SelectValue,A as Separator,Ub as ServiceCard,B as Sheet,D as SheetClose,G as SheetContent,K as SheetDescription,I as SheetFooter,H as SheetHeader,F as SheetOverlay,E as SheetPortal,J as SheetTitle,C as SheetTrigger,V as Sidebar,ba as SidebarContent,$ as SidebarFooter,ca as SidebarGroup,ea as SidebarGroupAction,fa as SidebarGroupContent,da as SidebarGroupLabel,_ as SidebarHeader,Z as SidebarInput,Y as SidebarInset,yc as SidebarLeft,ga as SidebarMenu,ja as SidebarMenuAction,ka as SidebarMenuBadge,ia as SidebarMenuButton,ha as SidebarMenuItem,la as SidebarMenuSkeleton,ma as SidebarMenuSub,oa as SidebarMenuSubButton,na as SidebarMenuSubItem,U as SidebarProvider,X as SidebarRail,zc as SidebarRight,aa as SidebarSeparator,W as SidebarTrigger,Qc as SimpleHeader,O as Skeleton,sc as SlideShow,yb as Tabs,Bb as TabsContent,zb as TabsList,Ab as TabsTrigger,uc as TextAndImages,wb as Textarea,hc as Theme,Kc as ThemeProvider,jc as ThemeWithShapes,sa as Toast,ta as ToastAction,ua as ToastClose,wa as ToastDescription,qa as ToastProvider,va as ToastTitle,ra as ToastViewport,xa as Toaster,za as Toggle,Aa as ToggleGroup,Ba as ToggleGroupItem,Q as Tooltip,S as TooltipContent,P as TooltipProvider,R as TooltipTrigger,Rc as VideoHeader,cc as WhyUs,jb as badgeVariants,M as buttonVariants,ya as toggleVariants,L as useIsMobile,T as useSidebar,pa as useToast};
1
+ import{a as vc,b as wc,c as xc}from"../chunk-V5EOKY7D.mjs";import{a as sc}from"../chunk-ZKBLFPGO.mjs";import"../chunk-35SLQX5Z.mjs";import{a as qc}from"../chunk-3SZR5DC2.mjs";import{a as oc}from"../chunk-FYEE5UWZ.mjs";import{a as pc}from"../chunk-AUBKJ4XO.mjs";import{a as rc}from"../chunk-GNMQAGIE.mjs";import"../chunk-3A4UGUFM.mjs";import{a as uc}from"../chunk-L2CGDHVO.mjs";import{a as Yb}from"../chunk-CSWXKGJE.mjs";import{a as tc}from"../chunk-KCCDR7HB.mjs";import{a as ad}from"../chunk-Z3YAIJQT.mjs";import{a as Zc}from"../chunk-AJWSKECP.mjs";import{a as Yc}from"../chunk-CZIRJUID.mjs";import{a as $c}from"../chunk-I6X4KLR3.mjs";import{a as _c}from"../chunk-JTQWVSV5.mjs";import{a as kd}from"../chunk-W7KPRGG2.mjs";import{a as jd}from"../chunk-7PDGAGJL.mjs";import{a as id}from"../chunk-YMBNEJBV.mjs";import"../chunk-LTTO57ZK.mjs";import{a as gd}from"../chunk-TASJS6US.mjs";import{a as fd}from"../chunk-ERUB6LU6.mjs";import{a as hd}from"../chunk-N4NSSICX.mjs";import{a as ed}from"../chunk-FSQNNG2C.mjs";import{a as dd}from"../chunk-JPWY5ADC.mjs";import{a as cd}from"../chunk-WXZ3IRTS.mjs";import{a as bd}from"../chunk-WSDHDEFO.mjs";import"../chunk-A24EPYUY.mjs";import"../chunk-QKGEV7LG.mjs";import{a as Ec}from"../chunk-WHH4AVZT.mjs";import{a as Cc}from"../chunk-EDLBPAEH.mjs";import{a as Ac}from"../chunk-KNJGZBXS.mjs";import{a as Bc}from"../chunk-326JXRIS.mjs";import{a as Oc,b as Pc}from"../chunk-OU3PM75Z.mjs";import{a as Nc}from"../chunk-LHL2AONM.mjs";import{a as Fc}from"../chunk-BFESGJZ4.mjs";import{a as Hc}from"../chunk-YWVLHQ3L.mjs";import{a as Gc}from"../chunk-PYAM4YXE.mjs";import{a as Dc}from"../chunk-MCEK7XUK.mjs";import{a as Ic}from"../chunk-JHTGGDU5.mjs";import{a as yb,b as zb,c as Ab,d as Bb}from"../chunk-IEQL2U53.mjs";import{a as Wa,b as Xa,c as Ya,d as Za,e as _a,f as $a,g as ab,h as bb,i as cb}from"../chunk-64UGFPFV.mjs";import{a as Ja,b as Ka,c as La}from"../chunk-DOJR2RDB.mjs";import{a as db,b as eb,c as fb}from"../chunk-KHGZULZP.mjs";import{a as k,b as l,c as m,d as n,e as o,f as p,g as q,h as r,i as s,j as t,k as u,l as v,m as w,n as x,o as y}from"../chunk-K4RVBOIC.mjs";import{a as Ea,b as Fa,c as Ga,d as Ha}from"../chunk-MU4ETGDT.mjs";import{a as xb}from"../chunk-BMN3FVZS.mjs";import{a as Aa,b as Ba}from"../chunk-63W64WWD.mjs";import{a as ya,b as za}from"../chunk-IKTCLX2C.mjs";import{a as mb,b as nb,c as ob,d as pb,e as qb,f as rb,g as sb,h as tb,i as ub,j as vb}from"../chunk-OGZERPA4.mjs";import{a as Ca,b as Da}from"../chunk-6T322YHB.mjs";import{a as lb}from"../chunk-KJIBE57R.mjs";import{a as wb}from"../chunk-CX4XB5W2.mjs";import{a as Ia}from"../chunk-EECIYMTX.mjs";import"../chunk-YNNW2C2U.mjs";import{a as zc}from"../chunk-BGQKHEB3.mjs";import{a,b,c,d,e,f,g}from"../chunk-ZJ56IQPQ.mjs";import{a as nc}from"../chunk-KWTCUGN5.mjs";import{a as mc}from"../chunk-ZY2PDUUB.mjs";import{a as cc}from"../chunk-EPTHSTUM.mjs";import{a as ac}from"../chunk-53QLSQCO.mjs";import{a as bc}from"../chunk-UMBMLD26.mjs";import{a as ec}from"../chunk-JCH2CCQ7.mjs";import{a as Zb}from"../chunk-RVRIMD6M.mjs";import"../chunk-UF3I2XE2.mjs";import"../chunk-GXC2S7UQ.mjs";import"../chunk-RYZTCMVC.mjs";import{a as fc,b as gc,c as hc,d as ic,e as jc,f as kc,g as lc}from"../chunk-JXW2QARY.mjs";import"../chunk-JRFNBHPL.mjs";import{a as dc}from"../chunk-3FZPSPIZ.mjs";import{a as Cb,b as Eb,c as Fb,d as Lb,f as Mb,g as Ob,h as Xb}from"../chunk-NLA3SBVN.mjs";import"../chunk-O5BAW5XQ.mjs";import{a as Db}from"../chunk-C4DU747D.mjs";import"../chunk-TT4SPGZU.mjs";import"../chunk-L3PFZ7PW.mjs";import"../chunk-CTKUF2I6.mjs";import"../chunk-56RXRTGZ.mjs";import"../chunk-WDDAVAVV.mjs";import{a as Sb}from"../chunk-VIS6GPCT.mjs";import{a as Vb}from"../chunk-E6KVX2UG.mjs";import{a as Rb}from"../chunk-LLNCOMIM.mjs";import{a as Ub}from"../chunk-6HORFOA3.mjs";import{a as Wb}from"../chunk-KUZCFJTH.mjs";import{a as Jb}from"../chunk-IC57R2EU.mjs";import{a as Kb}from"../chunk-PBRC3UOA.mjs";import{a as Ib}from"../chunk-SX5U74MW.mjs";import"../chunk-KHZPOMKL.mjs";import"../chunk-FRTYO74I.mjs";import{a as Hb}from"../chunk-7PBTM4J4.mjs";import"../chunk-4BDIVC2Q.mjs";import{a as Gb}from"../chunk-TQQVBE66.mjs";import{a as Ma,b as Na,c as Oa,d as Pa,e as Qa,f as Ra,g as Sa,h as Ta,i as Ua,j as Va}from"../chunk-BUCI7BPM.mjs";import{a as yc}from"../chunk-N363IQBL.mjs";import{a as xa}from"../chunk-WGEMXPWB.mjs";import{a as qa,b as ra,c as sa,d as ta,e as ua,f as va,g as wa}from"../chunk-PWBAD26X.mjs";import{a as h,b as i,c as j}from"../chunk-YNCJATT7.mjs";import{a as T,b as U,c as V,d as W,e as X,f as Y,g as Z,h as _,i as $,j as aa,k as ba,l as ca,m as da,n as ea,o as fa,p as ga,q as ha,r as ia,s as ja,t as ka,u as la,v as ma,w as na,x as oa}from"../chunk-ZYYWN6XG.mjs";import{a as O}from"../chunk-RHFLBRXF.mjs";import{a as A}from"../chunk-GRCMMAFX.mjs";import{a as B,b as C,c as D,d as E,e as F,f as G,g as H,h as I,i as J,j as K}from"../chunk-HJK6BCTE.mjs";import{a as z}from"../chunk-JPZJET3B.mjs";import{a as P,b as Q,c as R,d as S}from"../chunk-NACHOXV5.mjs";import{a as M,b as N}from"../chunk-BPSLUO5I.mjs";import{a as $b}from"../chunk-IQPZEEYJ.mjs";import{a as _b}from"../chunk-H7D3PZKE.mjs";import{a as Pb}from"../chunk-FHJDQP4I.mjs";import{a as Qb}from"../chunk-BLD454AX.mjs";import{a as gb,b as hb,c as ib}from"../chunk-4BHOIXJM.mjs";import{a as jb,b as kb}from"../chunk-J2IHT57D.mjs";import"../chunk-4YFMDLHL.mjs";import{a as Xc}from"../chunk-2ZB6Z7XN.mjs";import{a as Qc}from"../chunk-VFXHLJ45.mjs";import{a as Rc}from"../chunk-FVPWO556.mjs";import{a as Lc,b as Mc}from"../chunk-INOUDNCK.mjs";import"../chunk-ZDPQXVTF.mjs";import"../chunk-55EX54R7.mjs";import{a as Vc}from"../chunk-BONRVXMX.mjs";import{a as Kc}from"../chunk-X5KZKO2V.mjs";import{a as Wc}from"../chunk-WKFNZUIR.mjs";import{a as Tc}from"../chunk-6MWXSKBH.mjs";import"../chunk-VR6QUPNE.mjs";import{a as Uc}from"../chunk-H6POT4A7.mjs";import{a as Sc}from"../chunk-TEMKCAXW.mjs";import{a as Jc}from"../chunk-KTXQBXXJ.mjs";import{a as Tb}from"../chunk-WISCWNL2.mjs";import{a as Nb}from"../chunk-FVM5SQT2.mjs";import"../chunk-HTVHCBXQ.mjs";import"../chunk-Q3G5UAAD.mjs";import"../chunk-ZLSF5YXT.mjs";import{a as L}from"../chunk-FRWX5YES.mjs";import{c as pa}from"../chunk-CV7PH2KH.mjs";import"../chunk-M6LJ4BNZ.mjs";export{db as Alert,fb as AlertDescription,eb as AlertTitle,Yc as ApproveLeave,gb as Avatar,ib as AvatarFallback,hb as AvatarImage,kb as Badge,Cb as BannerBlock,Sc as BrandLogo,a as Breadcrumb,g as BreadcrumbEllipsis,c as BreadcrumbItem,d as BreadcrumbLink,b as BreadcrumbList,e as BreadcrumbPage,f as BreadcrumbSeparator,Pc as Breadcrumbs,N as Button,Db as CMSLink,hd as CRMCogeBoard,ed as CRMKanbanBoard,xb as Calendar,$c as CalendarView,Fb as CallToActionBlock,Eb as CallToActionBlockOld,mc as Card,Dc as Categories,id as ChatCardTask,kd as ChatInterfaceMessages,jd as ChatMessage,lb as Checkbox,Hb as CodeBlock,h as Collapsible,j as CollapsibleContent,i as CollapsibleTrigger,oc as CollectionArchive,Wa as Command,Xa as CommandDialog,_a as CommandEmpty,$a as CommandGroup,Ya as CommandInput,bb as CommandItem,Za as CommandList,ab as CommandSeparator,cb as CommandShortcut,Jc as Container,dc as ContentBlock,Xb as ContentCard,Gb as CopyButton,Tb as CustomLink,Pb as CustomerCard,kc as DarkTop,cd as DealCard,bd as DealDetails,Ma as Dialog,Pa as DialogClose,Ra as DialogContent,Va as DialogDescription,Ta as DialogFooter,Sa as DialogHeader,Qa as DialogOverlay,Oa as DialogPortal,Ua as DialogTitle,Na as DialogTrigger,k as DropdownMenu,u as DropdownMenuCheckboxItem,s as DropdownMenuContent,m as DropdownMenuGroup,t as DropdownMenuItem,w as DropdownMenuLabel,n as DropdownMenuPortal,p as DropdownMenuRadioGroup,v as DropdownMenuRadioItem,x as DropdownMenuSeparator,y as DropdownMenuShortcut,o as DropdownMenuSub,r as DropdownMenuSubContent,q as DropdownMenuSubTrigger,l as DropdownMenuTrigger,Nb as DynamicIcon,Qb as EventCard,Ob as FeatureCard,Yb as FeatureGrid,Lb as FeaturesBlock,Ec as Filter,wc as FlowPrintable,Vc as Footer,Wc as Header,Tc as HeaderDesktop,Uc as HeaderMobile,ec as HeadingImage,Wb as Hero,Fc as HighImpactHero,_c as HolidayGrid,ad as HolidayTracker,Ja as HoverCard,La as HoverCardContent,Ka as HoverCardTrigger,Sb as Image,Kb as ImageBlock,_b as InfoTile,z as Input,Zb as Insight,dd as KanbanColumn,Ia as Label,lc as LightTop,pc as Logo,Hc as LowImpactHero,$b as MOTD,Mc as Mask,Ib as Media,Jb as MediaBlock,Gc as MediumImpactHero,fd as NewCustomerForm,gd as NewDealForm,tc as NewsGrid,ac as OrgChart,xc as PagePrintable,qc as PageRange,Lc as PageShape,Cc as Pagination,rc as PayloadPagination,Ea as Popover,Ga as PopoverAnchor,Ha as PopoverContent,Fa as PopoverTrigger,Ic as PostHero,Vb as PricingCard,vc as Printable,Rb as ProjectCard,Ac as ProjectTeam,bc as ProposalSummary,Bc as RelatedContent,Xc as RelatedPagesMenu,nc as RelatedPosts,gc as RenderBlocks,ic as RenderBlocksWithShapes,Oc as RenderHero,Zc as RequestLeave,fc as ReusableContentBlock,Mb as RichText,Ca as ScrollArea,Da as ScrollBar,Nc as SectionHero,mb as Select,sb as SelectContent,nb as SelectGroup,ub as SelectItem,tb as SelectLabel,rb as SelectScrollDownButton,qb as SelectScrollUpButton,vb as SelectSeparator,pb as SelectTrigger,ob as SelectValue,A as Separator,Ub as ServiceCard,B as Sheet,D as SheetClose,G as SheetContent,K as SheetDescription,I as SheetFooter,H as SheetHeader,F as SheetOverlay,E as SheetPortal,J as SheetTitle,C as SheetTrigger,V as Sidebar,ba as SidebarContent,$ as SidebarFooter,ca as SidebarGroup,ea as SidebarGroupAction,fa as SidebarGroupContent,da as SidebarGroupLabel,_ as SidebarHeader,Z as SidebarInput,Y as SidebarInset,yc as SidebarLeft,ga as SidebarMenu,ja as SidebarMenuAction,ka as SidebarMenuBadge,ia as SidebarMenuButton,ha as SidebarMenuItem,la as SidebarMenuSkeleton,ma as SidebarMenuSub,oa as SidebarMenuSubButton,na as SidebarMenuSubItem,U as SidebarProvider,X as SidebarRail,zc as SidebarRight,aa as SidebarSeparator,W as SidebarTrigger,Qc as SimpleHeader,O as Skeleton,sc as SlideShow,yb as Tabs,Bb as TabsContent,zb as TabsList,Ab as TabsTrigger,uc as TextAndImages,wb as Textarea,hc as Theme,Kc as ThemeProvider,jc as ThemeWithShapes,sa as Toast,ta as ToastAction,ua as ToastClose,wa as ToastDescription,qa as ToastProvider,va as ToastTitle,ra as ToastViewport,xa as Toaster,za as Toggle,Aa as ToggleGroup,Ba as ToggleGroupItem,Q as Tooltip,S as TooltipContent,P as TooltipProvider,R as TooltipTrigger,Rc as VideoHeader,cc as WhyUs,jb as badgeVariants,M as buttonVariants,ya as toggleVariants,L as useIsMobile,T as useSidebar,pa as useToast};