cortex-react-components 2.27.0 → 2.28.0

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 (380) hide show
  1. package/dist/{chunk-LJXTXROJ.mjs → chunk-24R7CI5Q.mjs} +1 -1
  2. package/dist/{chunk-FZX3ZPEU.mjs → chunk-27XIU7FW.mjs} +1 -1
  3. package/dist/{chunk-RR4QSUV2.mjs → chunk-2IMY4VWR.mjs} +1 -1
  4. package/dist/{chunk-WIRQ5IRT.mjs → chunk-2R3ECSWF.mjs} +1 -1
  5. package/dist/{chunk-RJGYVDOU.mjs → chunk-43YJ2VYN.mjs} +1 -1
  6. package/dist/{chunk-2BRDNDUB.mjs → chunk-4ITG3T35.mjs} +1 -1
  7. package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
  8. package/dist/{chunk-NBJLXJQ3.mjs → chunk-633ESSXN.mjs} +1 -1
  9. package/dist/{chunk-3NRXQBBS.mjs → chunk-6L7VJ7IH.mjs} +1 -1
  10. package/dist/chunk-6UULUGR2.mjs +1 -0
  11. package/dist/{chunk-JCWFPKF3.mjs → chunk-6VRPQKAK.mjs} +1 -1
  12. package/dist/{chunk-TYARLEAC.mjs → chunk-75HU5Q6A.mjs} +1 -1
  13. package/dist/{chunk-KEK763EH.mjs → chunk-AMAB4E2X.mjs} +1 -1
  14. package/dist/{chunk-7R47MHQE.mjs → chunk-B63FA7LF.mjs} +1 -1
  15. package/dist/{chunk-LAQ3QAUW.mjs → chunk-CLGBBNRB.mjs} +1 -1
  16. package/dist/{chunk-F6DMXMR4.mjs → chunk-CXHPLJDO.mjs} +1 -1
  17. package/dist/{chunk-CDVRH3MC.mjs → chunk-D44OXIPN.mjs} +1 -1
  18. package/dist/{chunk-GTZJWMZR.mjs → chunk-D76LTQRD.mjs} +1 -1
  19. package/dist/chunk-DNMM3Q72.mjs +9 -0
  20. package/dist/{chunk-GHOL5L32.mjs → chunk-DTKZ3I6Z.mjs} +1 -1
  21. package/dist/{chunk-FE7ZGUPU.mjs → chunk-FRYADWTQ.mjs} +1 -1
  22. package/dist/chunk-G3BOVXUM.mjs +4 -0
  23. package/dist/{chunk-3HNU2NYP.mjs → chunk-GRNOF6LY.mjs} +1 -1
  24. package/dist/{chunk-AJQHGVZ5.mjs → chunk-GXVC6ETI.mjs} +1 -1
  25. package/dist/{chunk-IQQ7ZWCP.mjs → chunk-I6D5JCNY.mjs} +1 -1
  26. package/dist/{chunk-5MWZTJYP.mjs → chunk-IBC5Z55T.mjs} +1 -1
  27. package/dist/{chunk-TVTTUSWM.mjs → chunk-IFUIQ57U.mjs} +1 -1
  28. package/dist/chunk-IMRGPVFS.mjs +1 -0
  29. package/dist/{chunk-EM3T2XYC.mjs → chunk-KAAHIHZK.mjs} +1 -1
  30. package/dist/{chunk-5NIEZE7A.mjs → chunk-KBEXWUKI.mjs} +1 -1
  31. package/dist/{chunk-EHSOO47V.mjs → chunk-KEOMDWUC.mjs} +1 -1
  32. package/dist/{chunk-LAP57E2L.mjs → chunk-LBVWIF2J.mjs} +1 -1
  33. package/dist/chunk-LEZ6G4X7.mjs +4 -0
  34. package/dist/{chunk-75F3LJMX.mjs → chunk-LKUK55GC.mjs} +1 -1
  35. package/dist/{chunk-WLI2YTOQ.mjs → chunk-MDIJOHFV.mjs} +1 -1
  36. package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
  37. package/dist/{chunk-C4RWEPVF.mjs → chunk-MX6GXHJJ.mjs} +1 -1
  38. package/dist/{chunk-3Y7QG6VP.mjs → chunk-NJ7PW5T7.mjs} +1 -1
  39. package/dist/{chunk-7NWIK57W.mjs → chunk-O3BCESMN.mjs} +1 -1
  40. package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
  41. package/dist/{chunk-X2JWNPWT.mjs → chunk-O5QXPC23.mjs} +1 -1
  42. package/dist/{chunk-RGOKBIQ5.mjs → chunk-ORODSHZN.mjs} +1 -1
  43. package/dist/{chunk-HD6E7KI2.mjs → chunk-RCI3L3M5.mjs} +1 -1
  44. package/dist/{chunk-5EKGFFJD.mjs → chunk-SADWUWLZ.mjs} +1 -1
  45. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  46. package/dist/{chunk-BDDEMCAH.mjs → chunk-SZXMQMZ6.mjs} +1 -1
  47. package/dist/{chunk-7TSR2LQB.mjs → chunk-TIAA3ZN3.mjs} +1 -1
  48. package/dist/{chunk-RS4WAAGI.mjs → chunk-UBZYXZ7B.mjs} +1 -1
  49. package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
  50. package/dist/chunk-VFIMFZX5.mjs +1 -0
  51. package/dist/{chunk-M527EJIX.mjs → chunk-WBDSOPDY.mjs} +1 -1
  52. package/dist/{chunk-CXOVEABI.mjs → chunk-WDRL3N5V.mjs} +1 -1
  53. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  54. package/dist/{chunk-RS4VD3ML.mjs → chunk-XQ3XV5DH.mjs} +1 -1
  55. package/dist/{chunk-ZEALRBXW.mjs → chunk-XSCZQEYP.mjs} +1 -1
  56. package/dist/{chunk-AQQCH7Z2.mjs → chunk-XX4GSGRP.mjs} +1 -1
  57. package/dist/{chunk-NINFDOV5.mjs → chunk-YG7SLO6G.mjs} +1 -1
  58. package/dist/chunk-YI6EQRWN.mjs +1 -0
  59. package/dist/{chunk-LLED3RQS.mjs → chunk-YPQUYIGO.mjs} +1 -1
  60. package/dist/{chunk-TJZVV3XH.mjs → chunk-YVXFRQPA.mjs} +1 -1
  61. package/dist/{chunk-TTWEHUP5.mjs → chunk-ZA6MGTGM.mjs} +1 -1
  62. package/dist/chunk-ZLFZBT3K.mjs +1 -0
  63. package/dist/{chunk-HSQAHQNP.mjs → chunk-ZZFYIP6H.mjs} +1 -1
  64. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  65. package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
  66. package/dist/components/AdvancedComponents/EditableField.mjs +1 -1
  67. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  68. package/dist/components/AdvancedComponents/index.js +8 -8
  69. package/dist/components/AdvancedComponents/index.mjs +1 -1
  70. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  71. package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
  72. package/dist/components/AdvancedComponents/org-chart-component/CompanyNode.d.ts +7 -0
  73. package/dist/components/AdvancedComponents/org-chart-component/CompanyNode.js +1 -0
  74. package/dist/components/AdvancedComponents/org-chart-component/CompanyNode.mjs +1 -0
  75. package/dist/components/AdvancedComponents/org-chart-component/OrgChart.d.ts +2 -0
  76. package/dist/components/AdvancedComponents/org-chart-component/OrgChart.js +8 -8
  77. package/dist/components/AdvancedComponents/org-chart-component/OrgChart.mjs +1 -1
  78. package/dist/components/AdvancedComponents/org-chart-component/OrgNode.js +5 -5
  79. package/dist/components/AdvancedComponents/org-chart-component/OrgNode.mjs +1 -1
  80. package/dist/components/AdvancedComponents/org-chart-component/OrgTree.d.ts +11 -2
  81. package/dist/components/AdvancedComponents/org-chart-component/OrgTree.js +8 -8
  82. package/dist/components/AdvancedComponents/org-chart-component/OrgTree.mjs +1 -1
  83. package/dist/components/AdvancedComponents/org-chart-component/index.d.ts +2 -0
  84. package/dist/components/AdvancedComponents/org-chart-component/index.js +8 -8
  85. package/dist/components/AdvancedComponents/org-chart-component/index.mjs +1 -1
  86. package/dist/components/AdvancedComponents/org-chart-component/mockData.d.ts +9 -7
  87. package/dist/components/AdvancedComponents/org-chart-component/mockData.js +1 -1
  88. package/dist/components/AdvancedComponents/org-chart-component/mockData.mjs +1 -1
  89. package/dist/components/AdvancedComponents/org-chart-component/types/index.mjs +1 -1
  90. package/dist/components/AdvancedComponents/org-chart-component/types.d.ts +42 -0
  91. package/dist/components/AdvancedComponents/org-chart-component/types.js +1 -0
  92. package/dist/components/AdvancedComponents/org-chart-component/types.mjs +1 -0
  93. package/dist/components/AdvancedComponents/org-chart-component/utils.d.ts +2 -2
  94. package/dist/components/AdvancedComponents/switch.mjs +1 -1
  95. package/dist/components/AdvancedComponents/theme-toggle.mjs +1 -1
  96. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  97. package/dist/components/Blocks/Banner.mjs +1 -1
  98. package/dist/components/Blocks/CallToAction.mjs +1 -1
  99. package/dist/components/Blocks/CaseStudy.mjs +1 -1
  100. package/dist/components/Blocks/Code.client.mjs +1 -1
  101. package/dist/components/Blocks/Code.mjs +1 -1
  102. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  103. package/dist/components/Blocks/ConsultantProfile.mjs +1 -1
  104. package/dist/components/Blocks/Content.mjs +1 -1
  105. package/dist/components/Blocks/CopyButton.mjs +1 -1
  106. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  107. package/dist/components/Blocks/ProposalSummary.mjs +1 -1
  108. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  109. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  110. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  111. package/dist/components/Blocks/index.mjs +1 -1
  112. package/dist/components/CRM/CogeBoard.mjs +1 -1
  113. package/dist/components/CRM/DealCard.mjs +1 -1
  114. package/dist/components/CRM/DealDetails.mjs +1 -1
  115. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  116. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  117. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  118. package/dist/components/CRM/NewDealForm.mjs +1 -1
  119. package/dist/components/CRM/index.mjs +1 -1
  120. package/dist/components/Cards/ContentCard.mjs +1 -1
  121. package/dist/components/Cards/CustomerCard.mjs +1 -1
  122. package/dist/components/Cards/EventCard.mjs +1 -1
  123. package/dist/components/Cards/FeatureCard.mjs +1 -1
  124. package/dist/components/Cards/HeroCard.mjs +1 -1
  125. package/dist/components/Cards/Image.mjs +1 -1
  126. package/dist/components/Cards/PricingCard.mjs +1 -1
  127. package/dist/components/Cards/ServiceCard.mjs +1 -1
  128. package/dist/components/Cards/index.mjs +1 -1
  129. package/dist/components/Chat/ChatInterface.js +10 -10
  130. package/dist/components/Chat/ChatInterface.mjs +1 -1
  131. package/dist/components/Chat/Components/ChatCardArtefact.mjs +1 -1
  132. package/dist/components/Chat/Components/ChatCardTask.mjs +1 -1
  133. package/dist/components/Chat/Components/Conversation.mjs +1 -1
  134. package/dist/components/Chat/Components/Message.js +1 -1
  135. package/dist/components/Chat/Components/Message.mjs +1 -1
  136. package/dist/components/Chat/CopilotInterface.js +6 -6
  137. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  138. package/dist/components/Chat/PartTypes/CodeBlock.mjs +1 -1
  139. package/dist/components/Chat/PartTypes/ColleagueHandoff.d.ts +18 -0
  140. package/dist/components/Chat/PartTypes/ColleagueHandoff.js +5 -0
  141. package/dist/components/Chat/PartTypes/ColleagueHandoff.mjs +2 -0
  142. package/dist/components/Chat/PartTypes/MessageHandler.js +6 -6
  143. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  144. package/dist/components/Chat/PartTypes/Reasoning.mjs +1 -1
  145. package/dist/components/Chat/PartTypes/Response.mjs +1 -1
  146. package/dist/components/Chat/PartTypes/Tool.mjs +1 -1
  147. package/dist/components/Chat/PartTypes/index.d.ts +1 -0
  148. package/dist/components/Chat/PartTypes/index.js +8 -8
  149. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  150. package/dist/components/Chat/capability-menu.mjs +1 -1
  151. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  152. package/dist/components/Chat/demo-long-messages.js +14 -14
  153. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  154. package/dist/components/Chat/demo-tests.js +42 -42
  155. package/dist/components/Chat/demo-tests.mjs +1 -1
  156. package/dist/components/Chat/demo.js +6 -6
  157. package/dist/components/Chat/demo.mjs +1 -1
  158. package/dist/components/Chat/example-usage.js +7 -7
  159. package/dist/components/Chat/example-usage.mjs +1 -1
  160. package/dist/components/Chat/example-with-file-uploads.mjs +1 -1
  161. package/dist/components/Chat/example-with-vercel-ai.js +6 -6
  162. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  163. package/dist/components/Chat/index.d.ts +0 -2
  164. package/dist/components/Chat/index.js +11 -14
  165. package/dist/components/Chat/index.mjs +1 -1
  166. package/dist/components/DeliveryLead/DeliveryLeadSubmission.mjs +1 -1
  167. package/dist/components/DeliveryLead/DeliveryLeadSubmissionList.mjs +1 -1
  168. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  169. package/dist/components/DeliveryLead/index.mjs +1 -1
  170. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  171. package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
  172. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  173. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  174. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  175. package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
  176. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  177. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  178. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
  179. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  180. package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
  181. package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
  182. package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
  183. package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
  184. package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
  185. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  186. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  187. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  188. package/dist/components/DigitalColleagues/index.mjs +1 -1
  189. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  190. package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
  191. package/dist/components/DigitalColleagues/team-form.mjs +1 -1
  192. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  193. package/dist/components/Foundary/DashboardHeader.mjs +1 -1
  194. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  195. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  196. package/dist/components/Foundary/Knowledge/manage-team-context.mjs +1 -1
  197. package/dist/components/Foundary/LandingMenu.mjs +1 -1
  198. package/dist/components/Foundary/Login.mjs +1 -1
  199. package/dist/components/Foundary/MainPage.mjs +1 -1
  200. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  201. package/dist/components/Foundary/RichText/components/RawUploadComponent/index.mjs +1 -1
  202. package/dist/components/Foundary/RichText/index.mjs +1 -1
  203. package/dist/components/Foundary/RichText/nodes/image-node.mjs +1 -1
  204. package/dist/components/Foundary/RichText/plugins/image-plugin.mjs +1 -1
  205. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  206. package/dist/components/Foundary/SearchableSelect.mjs +1 -1
  207. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  208. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  209. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  210. package/dist/components/Foundary/Views/index.mjs +1 -1
  211. package/dist/components/Foundary/colleague-card.mjs +1 -1
  212. package/dist/components/Foundary/colleague-form.mjs +1 -1
  213. package/dist/components/Foundary/colleague-type-selection.mjs +1 -1
  214. package/dist/components/Foundary/document-edit.mjs +1 -1
  215. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  216. package/dist/components/Foundary/document-preview.mjs +1 -1
  217. package/dist/components/Foundary/file-edit.mjs +1 -1
  218. package/dist/components/Foundary/foundary-clone.mjs +1 -1
  219. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  220. package/dist/components/Foundary/foundary-options.mjs +1 -1
  221. package/dist/components/Foundary/index.mjs +1 -1
  222. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  223. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  224. package/dist/components/Foundary/team-form.mjs +1 -1
  225. package/dist/components/HeaderFooter/Footer.mjs +1 -1
  226. package/dist/components/HeaderFooter/Header.mjs +1 -1
  227. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  228. package/dist/components/HeaderFooter/HeaderMenu.mjs +1 -1
  229. package/dist/components/HeaderFooter/RelatedPagesMenu.mjs +1 -1
  230. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  231. package/dist/components/HeaderFooter/SimpleHeader.mjs +1 -1
  232. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  233. package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
  234. package/dist/components/HeaderFooter/index.mjs +1 -1
  235. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
  236. package/dist/components/Heros/DashboardHero/index.mjs +1 -1
  237. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  238. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  239. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  240. package/dist/components/Heros/PostHero/index.mjs +1 -1
  241. package/dist/components/Heros/RenderHero.mjs +1 -1
  242. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  243. package/dist/components/Heros/index.mjs +1 -1
  244. package/dist/components/Holidays/ApproveLeave.mjs +1 -1
  245. package/dist/components/Holidays/CalendarView.mjs +1 -1
  246. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  247. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  248. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  249. package/dist/components/Holidays/index.mjs +1 -1
  250. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  251. package/dist/components/Layouts/Print.mjs +1 -1
  252. package/dist/components/Layouts/SlideShow.mjs +1 -1
  253. package/dist/components/Layouts/index.mjs +1 -1
  254. package/dist/components/Menus/Categories.mjs +1 -1
  255. package/dist/components/Menus/Filter.mjs +1 -1
  256. package/dist/components/Menus/ProjectTeam.mjs +1 -1
  257. package/dist/components/Menus/RelatedContent.mjs +1 -1
  258. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  259. package/dist/components/Menus/SidebarRight.mjs +1 -1
  260. package/dist/components/Menus/index.mjs +1 -1
  261. package/dist/components/Other/Container.mjs +1 -1
  262. package/dist/components/Other/index.mjs +1 -1
  263. package/dist/components/Payload/Link/index.mjs +1 -1
  264. package/dist/components/Payload/Pagination/index.mjs +1 -1
  265. package/dist/components/Payload/RichText/index.mjs +1 -1
  266. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  267. package/dist/components/Payload/index.mjs +1 -1
  268. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  269. package/dist/components/Projects/AddFileModal.mjs +1 -1
  270. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  271. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  272. package/dist/components/Projects/EpicFilter.mjs +1 -1
  273. package/dist/components/Projects/EpicsView.mjs +1 -1
  274. package/dist/components/Projects/FileView.mjs +1 -1
  275. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  276. package/dist/components/Projects/KanbanColumn.mjs +1 -1
  277. package/dist/components/Projects/PlanningView.mjs +1 -1
  278. package/dist/components/Projects/ProjectPage.mjs +1 -1
  279. package/dist/components/Projects/ProjectView.mjs +1 -1
  280. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  281. package/dist/components/Projects/TaskCard.mjs +1 -1
  282. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  283. package/dist/components/Projects/TaskSelect.mjs +1 -1
  284. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  285. package/dist/components/Projects/TasksView.mjs +1 -1
  286. package/dist/components/Projects/TeamSwitcher.mjs +1 -1
  287. package/dist/components/Projects/business-unit-switcher.mjs +1 -1
  288. package/dist/components/Projects/file-list.mjs +1 -1
  289. package/dist/components/Projects/index.mjs +1 -1
  290. package/dist/components/Projects/project-card.mjs +1 -1
  291. package/dist/components/Projects/project-form.mjs +1 -1
  292. package/dist/components/Projects/team-card.mjs +1 -1
  293. package/dist/components/Projects/team-switcher-bar.mjs +1 -1
  294. package/dist/components/dc-temp/creative.mjs +1 -1
  295. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  296. package/dist/components/dc-temp/index.mjs +1 -1
  297. package/dist/components/dc-temp/markdown-renderer.mjs +1 -1
  298. package/dist/components/index.js +34 -37
  299. package/dist/components/index.mjs +1 -1
  300. package/dist/components/ui/alert.mjs +1 -1
  301. package/dist/components/ui/avatar.mjs +1 -1
  302. package/dist/components/ui/badge.mjs +1 -1
  303. package/dist/components/ui/breadcrumb.mjs +1 -1
  304. package/dist/components/ui/button.mjs +1 -1
  305. package/dist/components/ui/calendar.mjs +1 -1
  306. package/dist/components/ui/card.mjs +1 -1
  307. package/dist/components/ui/checkbox.mjs +1 -1
  308. package/dist/components/ui/command.mjs +1 -1
  309. package/dist/components/ui/dialog.mjs +1 -1
  310. package/dist/components/ui/dropdown-menu.mjs +1 -1
  311. package/dist/components/ui/hover-card.mjs +1 -1
  312. package/dist/components/ui/index.mjs +1 -1
  313. package/dist/components/ui/input.mjs +1 -1
  314. package/dist/components/ui/inputs/common/styles/index.mjs +1 -1
  315. package/dist/components/ui/inputs/text-input/index.mjs +1 -1
  316. package/dist/components/ui/inputs/textarea-input/index.mjs +1 -1
  317. package/dist/components/ui/label.mjs +1 -1
  318. package/dist/components/ui/pagination.mjs +1 -1
  319. package/dist/components/ui/popover.mjs +1 -1
  320. package/dist/components/ui/progress.mjs +1 -1
  321. package/dist/components/ui/scroll-area.mjs +1 -1
  322. package/dist/components/ui/select.mjs +1 -1
  323. package/dist/components/ui/separator.mjs +1 -1
  324. package/dist/components/ui/sheet.mjs +1 -1
  325. package/dist/components/ui/sidebar.mjs +1 -1
  326. package/dist/components/ui/skeleton.mjs +1 -1
  327. package/dist/components/ui/switch.mjs +1 -1
  328. package/dist/components/ui/tabs.mjs +1 -1
  329. package/dist/components/ui/textarea.mjs +1 -1
  330. package/dist/components/ui/toast.mjs +1 -1
  331. package/dist/components/ui/toaster.mjs +1 -1
  332. package/dist/components/ui/toggle-group.mjs +1 -1
  333. package/dist/components/ui/toggle.mjs +1 -1
  334. package/dist/components/ui/tooltip.mjs +1 -1
  335. package/dist/globals.css +1 -1
  336. package/dist/index.js +32 -35
  337. package/dist/index.mjs +1 -1
  338. package/dist/metafile-cjs.json +1 -1
  339. package/dist/metafile-esm.json +1 -1
  340. package/dist/pages/Blog.mjs +1 -1
  341. package/dist/pages/Documentation.mjs +1 -1
  342. package/dist/pages/IndexPage.mjs +1 -1
  343. package/dist/pages/Intranet.mjs +1 -1
  344. package/dist/pages/LandingPage.mjs +1 -1
  345. package/dist/pages/Page.mjs +1 -1
  346. package/dist/pages/Publish.mjs +1 -1
  347. package/dist/pages/Website.mjs +1 -1
  348. package/dist/sections/AboutSection.mjs +1 -1
  349. package/dist/sections/BlogDetail.mjs +1 -1
  350. package/dist/sections/BlogList.mjs +1 -1
  351. package/dist/sections/BlogListSection.mjs +1 -1
  352. package/dist/sections/ContactSection.mjs +1 -1
  353. package/dist/sections/ImageSection.mjs +1 -1
  354. package/dist/sections/MainPageSection.mjs +1 -1
  355. package/dist/sections/PageSections.mjs +1 -1
  356. package/dist/sections/PricingSection.mjs +1 -1
  357. package/dist/sections/ServiceDetail.mjs +1 -1
  358. package/dist/sections/ServiceDetailSection.mjs +1 -1
  359. package/dist/sections/ServiceSection.mjs +1 -1
  360. package/dist/sections/form/index.mjs +1 -1
  361. package/dist/sections/index.mjs +1 -1
  362. package/dist/styles/Colors.mjs +1 -1
  363. package/dist/utils/index.mjs +1 -1
  364. package/package.json +1 -1
  365. package/dist/chunk-B7RZ4K6Y.mjs +0 -1
  366. package/dist/chunk-BAB3ATRB.mjs +0 -4
  367. package/dist/chunk-EPJJKGCG.mjs +0 -1
  368. package/dist/chunk-G6OGEIN4.mjs +0 -4
  369. package/dist/chunk-KQRQXBJ3.mjs +0 -9
  370. package/dist/chunk-N7M6FTIO.mjs +0 -4
  371. package/dist/chunk-SOTCQX2G.mjs +0 -1
  372. package/dist/chunk-UJITFLIZ.mjs +0 -1
  373. package/dist/components/Chat/ChatInterfaceMessages.d.ts +0 -24
  374. package/dist/components/Chat/ChatInterfaceMessages.js +0 -7
  375. package/dist/components/Chat/ChatInterfaceMessages.mjs +0 -2
  376. package/dist/components/Chat/ChatMessage.css +0 -1
  377. package/dist/components/Chat/ChatMessage.d.ts +0 -19
  378. package/dist/components/Chat/ChatMessage.js +0 -7
  379. package/dist/components/Chat/ChatMessage.mjs +0 -1
  380. /package/dist/components/Chat/{ChatInterfaceMessages.css → PartTypes/ColleagueHandoff.css} +0 -0
@@ -1 +1 @@
1
- import{a as A}from"./chunk-RR4QSUV2.mjs";import{a as g,c as v,d as f,g as C,i as h}from"./chunk-YFAZQYK4.mjs";import{a as F}from"./chunk-INCYANPB.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as N}from"./chunk-FT3AE7L2.mjs";import{a as S,f as y,g as x,i as w}from"./chunk-3UMMMQEH.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as D,useEffect as M}from"react";import{PlusIcon as z}from"lucide-react";import{Fragment as j,jsx as t,jsxs as r}from"react/jsx-runtime";function se({customers:b,users:d,categories:I,onSubmit:E,initialDeal:n,onAddCustomer:P,onClose:L}){let[a,o]=D(n||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[T,m]=D(!1),[i,c]=D({});M(()=>{n&&o(n)},[n]);let U=()=>{let e={};return a.customer||(e.customer="Customer is required"),a.value||(e.value="Value is required"),a.assignee||(e.assignee="Assignee is required"),a.closureDate||(e.closureDate="Closure Date is required"),c(e),Object.keys(e).length===0},B=async e=>{e.preventDefault(),c({});try{if(U()){let s=await E({...a});s.success?(o({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),L?.()):c(s.errors||{})}}catch{c({submit:"An error occurred while submitting the form."})}},O=e=>{o(s=>({...s,categories:(s.categories||[]).includes(e.id)?(s.categories||[]).filter(H=>H!==e.id):[...s.categories||[],e.id]}))},V=async e=>{o({...a,customer:e});try{let s=await P(e);s.success?m(!1):c(s.errors||{})}catch{c({submit:"An error occurred while submitting the form."})}},q=e=>d?.find(s=>s.id===Number(e)),R=e=>b?.find(s=>s.id===Number(e));return r(j,{children:[r("form",{onSubmit:B,className:"space-y-6",children:[t(N,{className:"h-[60vh] pr-4",children:r("div",{className:"space-y-6 px-4",children:[r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"customer",children:"Customer"}),r("div",{className:"flex items-center space-x-2",children:[r(g,{value:a.customer?.id?.toString(),onValueChange:e=>o({...a,customer:R(e)}),children:[t(f,{children:t(v,{placeholder:"Select customer"})}),t(C,{children:b.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),t(p,{variant:"outline",size:"icon",onClick:()=>m(!0),children:t(z,{className:"w-5 h-5"})})]}),i.customerId&&t("p",{className:"text-red-500 text-sm",children:i.customerId})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"value",children:"Value"}),t(u,{id:"value",type:"number",value:a.value||"",onChange:e=>o({...a,value:Number.parseFloat(e.target.value)}),placeholder:"Enter deal value"}),i.value&&t("p",{className:"text-red-500 text-sm",children:i.value})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"assignee",children:"Assignee"}),r(g,{value:a.assignee?.id?.toString(),onValueChange:e=>o({...a,assignee:q(e)}),children:[t(f,{children:t(v,{placeholder:"Select assignee"})}),t(C,{children:d&&d.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),i.assignee&&t("p",{className:"text-red-500 text-sm",children:i.assignee})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"description",children:"Description"}),t(k,{id:"description",value:a.description||"",onChange:e=>o({...a,description:e.target.value}),placeholder:"Enter deal description"})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{children:"Categories"}),t("div",{className:"space-y-4",children:["proposition","source","sector"].map(e=>r("div",{className:"space-y-2",children:[t("h4",{className:"text-sm font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)}),t("div",{className:"grid grid-cols-2 gap-2",children:I.filter(s=>s.type===e).map(s=>r("div",{className:"flex items-center space-x-2",children:[t(F,{id:s.id.toString(),checked:a.categories?.includes(s.id),onCheckedChange:()=>O(s)}),t("label",{htmlFor:s.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.name})]},s.id))})]},e))})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"closureDate",children:"Closure Date"}),t(u,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:e=>o({...a,closureDate:e.target.value})}),i.closureDate&&t("p",{className:"text-red-500 text-sm",children:i.closureDate})]})]})}),t(p,{type:"submit",className:"w-full",children:n?"Update Deal":"Add Deal"})]}),t(S,{open:T,onOpenChange:m,children:r(y,{children:[t(x,{children:t(w,{children:"Add New Customer"})}),t(A,{onSubmit:V})]})})]})}export{se as a};
1
+ import{a as A}from"./chunk-2IMY4VWR.mjs";import{a as g,c as v,d as f,g as C,i as h}from"./chunk-YFAZQYK4.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as F}from"./chunk-INCYANPB.mjs";import{a as N}from"./chunk-FT3AE7L2.mjs";import{a as S,f as y,g as x,i as w}from"./chunk-3UMMMQEH.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as D,useEffect as M}from"react";import{PlusIcon as z}from"lucide-react";import{Fragment as j,jsx as t,jsxs as r}from"react/jsx-runtime";function se({customers:b,users:d,categories:I,onSubmit:E,initialDeal:n,onAddCustomer:P,onClose:L}){let[a,o]=D(n||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[T,m]=D(!1),[i,c]=D({});M(()=>{n&&o(n)},[n]);let U=()=>{let e={};return a.customer||(e.customer="Customer is required"),a.value||(e.value="Value is required"),a.assignee||(e.assignee="Assignee is required"),a.closureDate||(e.closureDate="Closure Date is required"),c(e),Object.keys(e).length===0},B=async e=>{e.preventDefault(),c({});try{if(U()){let s=await E({...a});s.success?(o({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),L?.()):c(s.errors||{})}}catch{c({submit:"An error occurred while submitting the form."})}},O=e=>{o(s=>({...s,categories:(s.categories||[]).includes(e.id)?(s.categories||[]).filter(H=>H!==e.id):[...s.categories||[],e.id]}))},V=async e=>{o({...a,customer:e});try{let s=await P(e);s.success?m(!1):c(s.errors||{})}catch{c({submit:"An error occurred while submitting the form."})}},q=e=>d?.find(s=>s.id===Number(e)),R=e=>b?.find(s=>s.id===Number(e));return r(j,{children:[r("form",{onSubmit:B,className:"space-y-6",children:[t(N,{className:"h-[60vh] pr-4",children:r("div",{className:"space-y-6 px-4",children:[r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"customer",children:"Customer"}),r("div",{className:"flex items-center space-x-2",children:[r(g,{value:a.customer?.id?.toString(),onValueChange:e=>o({...a,customer:R(e)}),children:[t(f,{children:t(v,{placeholder:"Select customer"})}),t(C,{children:b.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),t(p,{variant:"outline",size:"icon",onClick:()=>m(!0),children:t(z,{className:"w-5 h-5"})})]}),i.customerId&&t("p",{className:"text-red-500 text-sm",children:i.customerId})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"value",children:"Value"}),t(u,{id:"value",type:"number",value:a.value||"",onChange:e=>o({...a,value:Number.parseFloat(e.target.value)}),placeholder:"Enter deal value"}),i.value&&t("p",{className:"text-red-500 text-sm",children:i.value})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"assignee",children:"Assignee"}),r(g,{value:a.assignee?.id?.toString(),onValueChange:e=>o({...a,assignee:q(e)}),children:[t(f,{children:t(v,{placeholder:"Select assignee"})}),t(C,{children:d&&d.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),i.assignee&&t("p",{className:"text-red-500 text-sm",children:i.assignee})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"description",children:"Description"}),t(k,{id:"description",value:a.description||"",onChange:e=>o({...a,description:e.target.value}),placeholder:"Enter deal description"})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{children:"Categories"}),t("div",{className:"space-y-4",children:["proposition","source","sector"].map(e=>r("div",{className:"space-y-2",children:[t("h4",{className:"text-sm font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)}),t("div",{className:"grid grid-cols-2 gap-2",children:I.filter(s=>s.type===e).map(s=>r("div",{className:"flex items-center space-x-2",children:[t(F,{id:s.id.toString(),checked:a.categories?.includes(s.id),onCheckedChange:()=>O(s)}),t("label",{htmlFor:s.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.name})]},s.id))})]},e))})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"closureDate",children:"Closure Date"}),t(u,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:e=>o({...a,closureDate:e.target.value})}),i.closureDate&&t("p",{className:"text-red-500 text-sm",children:i.closureDate})]})]})}),t(p,{type:"submit",className:"w-full",children:n?"Update Deal":"Add Deal"})]}),t(S,{open:T,onOpenChange:m,children:r(y,{children:[t(x,{children:t(w,{children:"Add New Customer"})}),t(A,{onSubmit:V})]})})]})}export{se as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{f as t}from"./chunk-2BRDNDUB.mjs";import{a}from"./chunk-MDJREBVI.mjs";import n from"react";import*as l from"@radix-ui/react-collapsible";import{ChevronDownIcon as c,ChevronUpIcon as m}from"@radix-ui/react-icons";import{jsx as e,jsxs as s}from"react/jsx-runtime";var h=({title:p,richText:r})=>{let[o,i]=n.useState(!1);return e("div",{className:"border rounded-lg overflow-hidden",children:s(l.Root,{className:a("w-full"),open:o,onOpenChange:i,children:[s(l.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[e("h2",{className:"text-lg font-medium",children:p}),o?e(m,{className:"h-6 w-6"}):e(c,{className:"h-6 w-6"})]}),e(l.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:e("div",{className:"px-4 py-3 bg-white",children:e(t,{content:r||{},enableGutter:!1})})})]})})};export{h as a};
4
+ import{f as t}from"./chunk-4ITG3T35.mjs";import{a}from"./chunk-MDJREBVI.mjs";import n from"react";import*as l from"@radix-ui/react-collapsible";import{ChevronDownIcon as c,ChevronUpIcon as m}from"@radix-ui/react-icons";import{jsx as e,jsxs as s}from"react/jsx-runtime";var h=({title:p,richText:r})=>{let[o,i]=n.useState(!1);return e("div",{className:"border rounded-lg overflow-hidden",children:s(l.Root,{className:a("w-full"),open:o,onOpenChange:i,children:[s(l.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[e("h2",{className:"text-lg font-medium",children:p}),o?e(m,{className:"h-6 w-6"}):e(c,{className:"h-6 w-6"})]}),e(l.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:e("div",{className:"px-4 py-3 bg-white",children:e(t,{content:r||{},enableGutter:!1})})})]})})};export{h as a};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-KML6U7IE.mjs";import{a as C}from"./chunk-KGEIN56Y.mjs";import{f as v}from"./chunk-2BRDNDUB.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as c,b as g,c as x,e as p}from"./chunk-YO3GQYRJ.mjs";import{a as b}from"./chunk-FMJBJ3HN.mjs";import{a as h}from"./chunk-WISCWNL2.mjs";import U from"next/image";import{notFound as M}from"next/navigation";import w from"next/link";import{FaLinkedin as I}from"react-icons/fa6";import{jsx as e,jsxs as s}from"react/jsx-runtime";function L({image:t,name:i,about:l,socialLinks:o}){return!t||!t.src||t.src.length<3||!i?null:e("div",{className:"mt-1 z-10 px-0 pt-0 lg:px-10",children:e(c,{children:s(p,{className:"flex flex-col items-center",children:[t&&t.src&&e(U,{src:t.src,alt:t.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:u,className:"mx-auto mt-6 rounded-full object-cover"}),s("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-xl",children:[i,o&&o.length>0&&e("nav",{"aria-label":"social links",children:e("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((a,m)=>a.href&&e("li",{children:e(h,{href:a.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:e("span",{children:a.icon})})},m))})})]}),e("p",{children:l})]})})})}function j({page:t,categoryList:i,edit:l=!1,path:o="/admin/collections/posts/"}){if(!t)return M();let{meta:a,populatedAuthors:m,authors:P,categories:N,content:k,title:y}=t,A={image:{src:a&&a.image&&a.image.url||void 0,alt:a&&a.image&&a.image.alt||void 0},authorName:m?.[0]?.name||"",category:N,commentCount:0,title:y,description:a?.description||""},d=P?.map(r=>{let n=r.profilePicture&&r.profilePicture.sizes?.square?.url||r.profilePicture&&r.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",n),{name:r.name||"",about:r.about||"",image:{src:n,alt:r.name||"blog author"},socialLinks:[{icon:e(I,{}),href:r.linkedIn??""}]}});return console.log(d),e(b,{children:s("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[e("div",{children:s("div",{className:"[&_p+P]:mt-4",children:[e("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),e(v,{content:k,enableGutter:!1,className:"prose-invert"})]})}),s("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[l&&e("div",{className:"mt-4 lg:-mt-10 z-10 px-0 pt-0 lg:px-10",children:s(c,{children:[e(g,{children:e(x,{className:"text-accent",children:"Content Actions"})}),s(p,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),e(w,{href:`${o}${t.id}`,children:e(f,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),d&&d.map((r,n)=>e(L,{...r},n)),i&&i.links&&e("div",{className:"mt-4 px-0 pt-0 lg:px-10",children:e(C,{links:i.links,title:i.title})})]})]})})}export{j as a};
1
+ import{a as C}from"./chunk-KGEIN56Y.mjs";import{f as v}from"./chunk-4ITG3T35.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import{a as c,b as g,c as x,e as p}from"./chunk-YO3GQYRJ.mjs";import{a as b}from"./chunk-FMJBJ3HN.mjs";import{a as h}from"./chunk-WISCWNL2.mjs";import{a as u}from"./chunk-KML6U7IE.mjs";import U from"next/image";import{notFound as M}from"next/navigation";import w from"next/link";import{FaLinkedin as I}from"react-icons/fa6";import{jsx as e,jsxs as s}from"react/jsx-runtime";function L({image:t,name:i,about:l,socialLinks:o}){return!t||!t.src||t.src.length<3||!i?null:e("div",{className:"mt-1 z-10 px-0 pt-0 lg:px-10",children:e(c,{children:s(p,{className:"flex flex-col items-center",children:[t&&t.src&&e(U,{src:t.src,alt:t.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:u,className:"mx-auto mt-6 rounded-full object-cover"}),s("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-xl",children:[i,o&&o.length>0&&e("nav",{"aria-label":"social links",children:e("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((a,m)=>a.href&&e("li",{children:e(h,{href:a.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:e("span",{children:a.icon})})},m))})})]}),e("p",{children:l})]})})})}function j({page:t,categoryList:i,edit:l=!1,path:o="/admin/collections/posts/"}){if(!t)return M();let{meta:a,populatedAuthors:m,authors:P,categories:N,content:k,title:y}=t,A={image:{src:a&&a.image&&a.image.url||void 0,alt:a&&a.image&&a.image.alt||void 0},authorName:m?.[0]?.name||"",category:N,commentCount:0,title:y,description:a?.description||""},d=P?.map(r=>{let n=r.profilePicture&&r.profilePicture.sizes?.square?.url||r.profilePicture&&r.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",n),{name:r.name||"",about:r.about||"",image:{src:n,alt:r.name||"blog author"},socialLinks:[{icon:e(I,{}),href:r.linkedIn??""}]}});return console.log(d),e(b,{children:s("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[e("div",{children:s("div",{className:"[&_p+P]:mt-4",children:[e("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),e(v,{content:k,enableGutter:!1,className:"prose-invert"})]})}),s("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[l&&e("div",{className:"mt-4 lg:-mt-10 z-10 px-0 pt-0 lg:px-10",children:s(c,{children:[e(g,{children:e(x,{className:"text-accent",children:"Content Actions"})}),s(p,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),e(w,{href:`${o}${t.id}`,children:e(f,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),d&&d.map((r,n)=>e(L,{...r},n)),i&&i.links&&e("div",{className:"mt-4 px-0 pt-0 lg:px-10",children:e(C,{links:i.links,title:i.title})})]})]})})}export{j as a};
@@ -0,0 +1 @@
1
+ import{a as S,b as z}from"./chunk-TIAA3ZN3.mjs";import{a as R}from"./chunk-YI6EQRWN.mjs";import{a as F}from"./chunk-2LINLX4S.mjs";import{d as y}from"./chunk-Q2DPE66H.mjs";import{a as B}from"./chunk-FT3AE7L2.mjs";import{a as E}from"./chunk-L5JPAKPM.mjs";import{b as s}from"./chunk-ZUA4KNIR.mjs";import{a as b,c as x}from"./chunk-SOLZ4VQH.mjs";import{a as A}from"./chunk-MDJREBVI.mjs";import{useRef as N,useEffect as T,useState as O}from"react";import*as l from"motion/react-client";import{Send as ie,Bot as H,Menu as oe,Paperclip as se,X as ne,FileText as le,Image as re,File as ce}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";function ke({messages:r,input:C,isTyping:d=!1,currentSessionTitle:L,capabilities:u,fileUploads:f,isDragOver:$,enableFileUpload:w,onInputChange:P,addToolResult:K,onSendMessage:U,onKeyPress:V,onFileUpload:k,onRemoveFile:J,onDragOver:p,className:Q,status:W="ready"}){let g=N(null),G=N(null),I=N(null),[n,c]=O(!1),[v,me]=O({path:[],selectedItems:[],filters:{}});T(()=>{g.current?.scrollIntoView({behavior:"smooth"})},[r]),T(()=>{n&&setTimeout(()=>{g.current?.scrollIntoView({behavior:"smooth"})},100)},[n]);let M=()=>y(v),D=()=>{let e=[];return u.forEach(a=>{a.actions&&a.actions.forEach(o=>{e.push({label:o.label,action:()=>h(o.id,{path:[a],selectedItems:[],filters:{}})})}),a.children&&a.children.forEach(o=>{o.type==="list"&&o.data&&e.push({label:`View ${o.name}`,action:()=>c(!0)})})}),e.slice(0,5)},h=(e,a)=>{console.log("Capability action:",e,a);let o=`Executing ${e} with context: ${JSON.stringify(a.path.map(m=>m.name))}`;c(!1)},X=y({path:[],selectedItems:[],filters:{}}),q=e=>{k(e.target.files),e.target.files&&(e.target.value="")},Y=e=>{e.preventDefault(),p(!0)},Z=e=>{e.preventDefault(),p(!1)},_=e=>{e.preventDefault(),p(!1),k(e.dataTransfer.files)},j=e=>{if(e===0)return"0 Bytes";let a=1024,o=["Bytes","KB","MB","GB"],m=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,m)).toFixed(2))+" "+o[m]},ee=e=>e.startsWith("image/")?t(re,{className:"h-4 w-4"}):e.startsWith("text/")?t(le,{className:"h-4 w-4"}):t(ce,{className:"h-4 w-4"}),te={messages:r,currentSessionTitle:L,capabilities:u,currentCapabilityContext:v,contextualActions:X,getQuickSuggestions:D().map(e=>e.label)},ae=()=>{navigator.clipboard.writeText(JSON.stringify(te,null,2)),alert("Debug info copied to clipboard")};return i("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${Q||""}`,children:[i(B,{ref:G,className:"flex-1 p-4 bg-background border-0",onDragOver:Y,onDragLeave:Z,onDrop:_,children:[i("div",{className:A("space-y-4",$&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[t(l.animate,{children:r.map(e=>t(l.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:t(S,{from:e.role,children:t(z,{variant:"contained",children:R({message:e,addToolResult:K??(()=>{}),status:W,messages:r})})},e.id)},e.id))}),n&&i(l.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[t(b,{className:"h-8 w-8",children:t(x,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:t(H,{className:"h-4 w-4"})})}),t("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:t(F,{capabilities:u,isOpen:n,onToggle:()=>c(!n),onActionSelect:h,className:"w-full"})})]}),d&&i(l.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[t(b,{className:"h-8 w-8",children:t(x,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:t(H,{className:"h-4 w-4"})})}),t("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:i("div",{className:"flex space-x-1",children:[t("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),t("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),t("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),t("div",{ref:g})]}),f.length>0&&t("div",{className:"p-4 border-t bg-muted/10",children:t("div",{className:"flex flex-wrap gap-2",children:f.map(e=>i("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[ee(e.file.type),t("span",{className:"text-sm font-medium",children:e.file.name}),t("span",{className:"text-xs text-muted-foreground",children:j(e.file.size)}),t(s,{variant:"ghost",size:"sm",onClick:()=>J(e.id),className:"h-6 w-6 p-0",children:t(ne,{className:"h-4 w-4"})})]},e.id))})}),i("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[i("div",{className:"flex gap-3",children:[t(E,{value:C,onChange:e=>P(e.target.value),onKeyPress:V,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:d}),w&&t(s,{variant:"outline",size:"icon",onClick:()=>I.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:t(se,{className:"h-4 w-4"})}),t(s,{onClick:U,disabled:!C.trim()&&f.length===0||d,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:t(ie,{className:"h-4 w-4"})})]}),i("div",{className:"flex items-center gap-3 mt-3",children:[i(s,{onClick:()=>c(!n),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[t(oe,{className:"h-3 w-3 mr-1"}),n?"Hide":"Show"," Capabilities"]}),i("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[M().map((e,a)=>t(s,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>h(e.id,v),children:e.label},`context-${e.id}`)),M().length===0&&D().map((e,a)=>t(s,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:e.action,children:e.label},`suggestion-${a}`)),t(s,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:ae,children:"Debug"})]})]}),w&&t("input",{ref:I,type:"file",multiple:!0,onChange:q,className:"hidden"})]})]})}export{ke as a};
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as g,b as h,c as b}from"./chunk-CXOVEABI.mjs";import{b as y}from"./chunk-GTZJWMZR.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as C,useEffect as D,useCallback as A}from"react";import{AnimatePresence as k,motion as v}from"motion/react";import"pagedjs";import{Fragment as I,jsx as t,jsxs as w}from"react/jsx-runtime";var K=c=>{let[s,i]=C(0),{blocks:a,hero:x,logoImage:m}=c,N=a&&Array.isArray(a)&&a.length>0,n=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],S=e=>{i(e)},r=()=>{i(e=>(e+1)%n.length)},d=()=>{i(e=>(e-1+n.length)%n.length)},u=A(((e,o)=>{let f;return(...T)=>{clearTimeout(f),f=setTimeout(()=>e(...T),o)}})(e=>{e.deltaY>0?r():d()},300),[]),p=e=>{e.key==="ArrowDown"?r():e.key==="ArrowUp"&&d()};return D(()=>(window.addEventListener("wheel",u),window.addEventListener("keydown",p),()=>{window.removeEventListener("wheel",u),window.removeEventListener("keydown",p)}),[]),w("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[t("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:N&&n.map((e,o)=>t("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${s===o?"bg-accent":"bg-gray-600"}`,onClick:()=>S(o),children:t("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:e.blockName})},e.id))}),t(k,{children:n.map((e,o)=>t("div",{id:`slide-${o}`,className:"print-section",children:t("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
4
+ import{a as g,b as h,c as b}from"./chunk-WDRL3N5V.mjs";import{b as y}from"./chunk-D76LTQRD.mjs";import{a as l}from"./chunk-MDJREBVI.mjs";import{useState as C,useEffect as D,useCallback as A}from"react";import{AnimatePresence as k,motion as v}from"motion/react";import"pagedjs";import{Fragment as I,jsx as t,jsxs as w}from"react/jsx-runtime";var K=c=>{let[s,i]=C(0),{blocks:a,hero:x,logoImage:m}=c,N=a&&Array.isArray(a)&&a.length>0,n=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...a],S=e=>{i(e)},r=()=>{i(e=>(e+1)%n.length)},d=()=>{i(e=>(e-1+n.length)%n.length)},u=A(((e,o)=>{let f;return(...T)=>{clearTimeout(f),f=setTimeout(()=>e(...T),o)}})(e=>{e.deltaY>0?r():d()},300),[]),p=e=>{e.key==="ArrowDown"?r():e.key==="ArrowUp"&&d()};return D(()=>(window.addEventListener("wheel",u),window.addEventListener("keydown",p),()=>{window.removeEventListener("wheel",u),window.removeEventListener("keydown",p)}),[]),w("div",{className:"flex flex-col min-h-screen relative overflow-hidden",children:[t("div",{className:"fixed left-0 top-0 flex h-screen w-9 z-10 flex-col items-center justify-center bg-gray-900",children:N&&n.map((e,o)=>t("button",{className:`group relative flex items-center justify-center my-2 h-16 w-4 rounded-full transition-all hover:bg-accent duration-300 ${s===o?"bg-accent":"bg-gray-600"}`,onClick:()=>S(o),children:t("span",{className:"absolute ml-7 left-full text-left transform -translate-y-1/2 translate-x-0 rotate-90 origin-left whitespace-nowrap opacity-0 group-hover:opacity-100 group-hover:translate-x-2 transition-all duration-300",children:e.blockName})},e.id))}),t(k,{children:n.map((e,o)=>t("div",{id:`slide-${o}`,className:"print-section",children:t("div",{className:`absolute flex items-center justify-center transition-opacity duration-1000
5
5
  ${o===s?"opacity-100":"opacity-0"}
6
6
  w-full h-full bg-cover bg-center`,children:o===0?t(b,{hero:x,title:c.title,logoImage:m}):w(I,{children:[e.blockName&&t(h,{title:e.blockName}),t(y,{blocks:[e],fill:!0}),t(g,{logoImage:m})]})})},o))}),t("button",{className:"absolute bottom-4 left-1 z-20 text-3xl text-primary transition-all duration-300 hover:scale-110",onClick:r,children:t(E,{})})]})},E=()=>t(k,{children:t(v.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.7,ease:[.76,0,.24,1]},className:l("w-fit min-h-[50px] min-w-[20px] p-1 border-2 rounded-full","border-accent"),children:t(v.div,{initial:{y:0},animate:{y:[0,25],opacity:[1,0]},transition:{duration:1,ease:"easeOut",repeat:1/0,repeatDelay:1},className:l("w-[12px] h-[12px] rounded-full","bg-accent")})})});export{K as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
4
+ import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-O5P35LEY.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-AEBUMA72.mjs";import{a as e}from"./chunk-OM5ZUHCN.mjs";import{a as r}from"./chunk-FMH5CZ7X.mjs";import{a as o}from"./chunk-FMJBJ3HN.mjs";import{jsx as t,jsxs as m}from"react/jsx-runtime";function c({blogs:n,pages:g,categories:p,types:i,base:a}){return t("section",{children:t(o,{children:t("div",{className:"grid",children:m("div",{children:[i&&t(e,{types:i}),t(s,{blogs:n,base:a}),t(r,{pages:g})]})})})})}export{c as a};
1
+ import{a as s}from"./chunk-AEBUMA72.mjs";import{a as r}from"./chunk-FMH5CZ7X.mjs";import{a as e}from"./chunk-OM5ZUHCN.mjs";import{a as o}from"./chunk-FMJBJ3HN.mjs";import{jsx as t,jsxs as m}from"react/jsx-runtime";function c({blogs:n,pages:g,categories:p,types:i,base:a}){return t("section",{children:t(o,{children:t("div",{className:"grid",children:m("div",{children:[i&&t(e,{types:i}),t(s,{blogs:n,base:a}),t(r,{pages:g})]})})})})}export{c as a};
@@ -1 +1 @@
1
- import{a as J}from"./chunk-VKCDLKYH.mjs";import{a as S}from"./chunk-KG7HG2VO.mjs";import{a as q}from"./chunk-KZCIHFTM.mjs";import{a as Q}from"./chunk-L3V5YDPH.mjs";import{a as G}from"./chunk-QC2UWZWL.mjs";import{a as V}from"./chunk-Z22NSJMF.mjs";import{a as w}from"./chunk-UVHMI3PU.mjs";import{b as z}from"./chunk-CSBGSBEU.mjs";import Te,{useEffect as c,useState as n,useRef as l}from"react";import{jsx as a,jsxs as v}from"react/jsx-runtime";var Ne=({initialTasks:p=[],initialEpics:T=[],initialSprints:h=[],initialUsers:he=[],initialColleagues:A=[],initialProjects:Ae=[],onAddTask:W,onUpdateTask:D,onDeleteTask:x,onTaskClick:X,onAddEpic:Y,onAddComment:Z,onUploadFile:_,onDeleteFile:ee,onFileUpdate:te})=>{let[se,u]=n([]),[d,y]=n([]),[O,ie]=n([]),[H,N]=n(!1),[P,U]=n(!1),[r,m]=n(null),[C,I]=n(null),[ae,De]=n([]),[M,ne]=n([]),[g,B]=n(0),o=l(null),re=l(null),oe=Te.useMemo(()=>[...d.map(e=>e.id),0],[d]),j=l(""),F=l(""),R=l(""),$=l(""),f=(e,t)=>e.map(s=>`${s.id}-${new Date(s.createdAt).getTime()}-${new Date(s.updatedAt).getTime()}`).join("-")+(t?`-${t}`:"");c(()=>{let e=p.map(s=>s.files?.filter(i=>typeof i=="object").map(i=>new Date(i.updatedAt).getTime())).flat(),t=f(p,e.join("-"));t!==j.current&&(u(p),r&&m(p.find(s=>s.id===r.id)||null),j.current=t)},[p]),c(()=>{let e=f(T);e!==F.current&&(y(T),F.current=e)},[T]),c(()=>{let e=f(h);e!==R.current&&(ie(h),R.current=e)},[h]),c(()=>{let e=f(A.map(t=>({id:t.id,updatedAt:t.updatedAt,createdAt:t.createdAt})));e!==$.current&&(ne(A),$.current=e)},[A]),c(()=>{let e=()=>{if(o.current){let i=o.current.offsetHeight;B(i)}};e();let t=new ResizeObserver(e);o.current&&t.observe(o.current);let s=()=>{setTimeout(e,100)};return window.addEventListener("storage",s),()=>{t.disconnect(),window.removeEventListener("storage",s)}},[]),c(()=>{let e=setTimeout(()=>{o.current&&B(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[H,P]);let de=se.filter(e=>!0),ce=e=>de.filter(t=>t.status===e),le=e=>{let t={};return d.forEach(s=>{t[s.id]=e.filter(i=>w(i.epic)===s.id)}),t["no-epic"]=e.filter(s=>!w(s.epic)),t},K=e=>{I(e)},pe=e=>{C&&(u(t=>t.map(s=>s.id===C.id?{...s,status:e}:s)),D?.(C.id.toString(),{status:e}),I(null))},ue=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};u(s=>[...s,t]),W?.(e)},me=async(e,t)=>{u(s=>s.map(i=>i.id===Number(e)?{...i,...t}:i)),D&&await D(e,t),r?.id===Number(e)&&m(s=>({...s,...t}))},ge=async e=>{u(t=>t.filter(s=>s.id!==Number(e))),r?.id===Number(e)&&m(null),x&&await x(e)},fe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};y(s=>[...s,t]),Y?.(e)},L=e=>{m(e),X?.(e)},ke=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ve=g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)";return v("div",{ref:re,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[a("div",{ref:o,className:"flex-shrink-0",children:a(V,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>U(!0)}})}),a("div",{className:"flex-1 min-h-0 mt-8",children:a("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:a("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ke.map(e=>{let t=ce(e.status),s=le(t);return v(q,{title:e.title,status:e.status,taskCount:t.length,onDrop:pe,isCompact:e.status==="done",height:ve,children:[s["no-epic"].map(i=>a(S,{epic:null,task:i,onDragStart:K,onTaskClick:L,isCompact:e.status==="done"},i.id)),oe.map(i=>{let E=d.find(k=>k.id===i),b=s[i]||[];return b.length===0?null:v("div",{className:"mb-6",children:[v("div",{className:"flex items-center gap-2 mb-3",children:[a("div",{className:`w-3 h-3 rounded-full ${E?.color}`}),a("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:E?.name||"No Epic"}),a(z,{variant:"secondary",className:"text-xs",children:b.length})]})," ",a("div",{className:"space-y-3",children:b.map(k=>a(S,{task:k,epic:E,onDragStart:K,onTaskClick:L,isCompact:e.status==="done"},k.id))})]},i)})]},e.id)})})})}),a(G,{isOpen:H,onClose:()=>N(!1),onAddTask:ue,assignees:[...M,...ae],epics:d,sprints:O}),a(Q,{isOpen:P,onClose:()=>U(!1),onAddEpic:fe}),r&&a(J,{isOpen:!!r,onClose:()=>m(null),initialTask:r,epics:d,sprints:O,onUpdateTask:me,onDeleteTask:ge,colleagues:M,onUploadFile:_,onDeleteFile:ee,onFileUpdate:te,onAddComment:Z})]})};export{Ne as a};
1
+ import{a as J}from"./chunk-VKCDLKYH.mjs";import{a as S}from"./chunk-KG7HG2VO.mjs";import{a as G}from"./chunk-QC2UWZWL.mjs";import{a as q}from"./chunk-KZCIHFTM.mjs";import{a as Q}from"./chunk-L3V5YDPH.mjs";import{a as V}from"./chunk-Z22NSJMF.mjs";import{a as w}from"./chunk-UVHMI3PU.mjs";import{b as z}from"./chunk-CSBGSBEU.mjs";import Te,{useEffect as c,useState as n,useRef as l}from"react";import{jsx as a,jsxs as v}from"react/jsx-runtime";var Ne=({initialTasks:p=[],initialEpics:T=[],initialSprints:h=[],initialUsers:he=[],initialColleagues:A=[],initialProjects:Ae=[],onAddTask:W,onUpdateTask:D,onDeleteTask:x,onTaskClick:X,onAddEpic:Y,onAddComment:Z,onUploadFile:_,onDeleteFile:ee,onFileUpdate:te})=>{let[se,u]=n([]),[d,y]=n([]),[O,ie]=n([]),[H,N]=n(!1),[P,U]=n(!1),[r,m]=n(null),[C,I]=n(null),[ae,De]=n([]),[M,ne]=n([]),[g,B]=n(0),o=l(null),re=l(null),oe=Te.useMemo(()=>[...d.map(e=>e.id),0],[d]),j=l(""),F=l(""),R=l(""),$=l(""),f=(e,t)=>e.map(s=>`${s.id}-${new Date(s.createdAt).getTime()}-${new Date(s.updatedAt).getTime()}`).join("-")+(t?`-${t}`:"");c(()=>{let e=p.map(s=>s.files?.filter(i=>typeof i=="object").map(i=>new Date(i.updatedAt).getTime())).flat(),t=f(p,e.join("-"));t!==j.current&&(u(p),r&&m(p.find(s=>s.id===r.id)||null),j.current=t)},[p]),c(()=>{let e=f(T);e!==F.current&&(y(T),F.current=e)},[T]),c(()=>{let e=f(h);e!==R.current&&(ie(h),R.current=e)},[h]),c(()=>{let e=f(A.map(t=>({id:t.id,updatedAt:t.updatedAt,createdAt:t.createdAt})));e!==$.current&&(ne(A),$.current=e)},[A]),c(()=>{let e=()=>{if(o.current){let i=o.current.offsetHeight;B(i)}};e();let t=new ResizeObserver(e);o.current&&t.observe(o.current);let s=()=>{setTimeout(e,100)};return window.addEventListener("storage",s),()=>{t.disconnect(),window.removeEventListener("storage",s)}},[]),c(()=>{let e=setTimeout(()=>{o.current&&B(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[H,P]);let de=se.filter(e=>!0),ce=e=>de.filter(t=>t.status===e),le=e=>{let t={};return d.forEach(s=>{t[s.id]=e.filter(i=>w(i.epic)===s.id)}),t["no-epic"]=e.filter(s=>!w(s.epic)),t},K=e=>{I(e)},pe=e=>{C&&(u(t=>t.map(s=>s.id===C.id?{...s,status:e}:s)),D?.(C.id.toString(),{status:e}),I(null))},ue=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};u(s=>[...s,t]),W?.(e)},me=async(e,t)=>{u(s=>s.map(i=>i.id===Number(e)?{...i,...t}:i)),D&&await D(e,t),r?.id===Number(e)&&m(s=>({...s,...t}))},ge=async e=>{u(t=>t.filter(s=>s.id!==Number(e))),r?.id===Number(e)&&m(null),x&&await x(e)},fe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};y(s=>[...s,t]),Y?.(e)},L=e=>{m(e),X?.(e)},ke=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ve=g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)";return v("div",{ref:re,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[a("div",{ref:o,className:"flex-shrink-0",children:a(V,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>U(!0)}})}),a("div",{className:"flex-1 min-h-0 mt-8",children:a("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:a("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ke.map(e=>{let t=ce(e.status),s=le(t);return v(q,{title:e.title,status:e.status,taskCount:t.length,onDrop:pe,isCompact:e.status==="done",height:ve,children:[s["no-epic"].map(i=>a(S,{epic:null,task:i,onDragStart:K,onTaskClick:L,isCompact:e.status==="done"},i.id)),oe.map(i=>{let E=d.find(k=>k.id===i),b=s[i]||[];return b.length===0?null:v("div",{className:"mb-6",children:[v("div",{className:"flex items-center gap-2 mb-3",children:[a("div",{className:`w-3 h-3 rounded-full ${E?.color}`}),a("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:E?.name||"No Epic"}),a(z,{variant:"secondary",className:"text-xs",children:b.length})]})," ",a("div",{className:"space-y-3",children:b.map(k=>a(S,{task:k,epic:E,onDragStart:K,onTaskClick:L,isCompact:e.status==="done"},k.id))})]},i)})]},e.id)})})})}),a(G,{isOpen:H,onClose:()=>N(!1),onAddTask:ue,assignees:[...M,...ae],epics:d,sprints:O}),a(Q,{isOpen:P,onClose:()=>U(!1),onAddEpic:fe}),r&&a(J,{isOpen:!!r,onClose:()=>m(null),initialTask:r,epics:d,sprints:O,onUpdateTask:me,onDeleteTask:ge,colleagues:M,onUploadFile:_,onDeleteFile:ee,onFileUpdate:te,onAddComment:Z})]})};export{Ne as a};
@@ -0,0 +1,4 @@
1
+ import{a as R}from"./chunk-6UULUGR2.mjs";import{a as O}from"./chunk-DNMM3Q72.mjs";import{useState as P,useRef as k,useEffect as w}from"react";import{jsx as t,jsxs as y}from"react/jsx-runtime";var T=(e,i)=>({...e,level:e.level+i,children:e.children.map(l=>T(l,i))}),$=({nodes:e,onNodeClick:i,expandable:l=!1,initiallyExpanded:v=!0,companyInfo:h,defaultExpandedLevels:m=2})=>{if(h&&e.length>1){let a=e.map(r=>({...r,level:r.level+1,children:r.children.map(x=>T(x,1))}));return t(E,{node:{id:"company",name:h.name,email:"",children:a,level:0},onNodeClick:i,expandable:l,initiallyExpanded:v,isCompanyNode:!0,companyInfo:h,defaultExpandedLevels:m})}return t("div",{className:"flex flex-col items-center gap-0",children:e.map((a,r)=>t(E,{node:a,onNodeClick:i,expandable:l,initiallyExpanded:v,isLast:r===e.length-1,defaultExpandedLevels:m},a.id))})},E=({node:e,onNodeClick:i,expandable:l,initiallyExpanded:v=!0,isLast:h=!1,isCompanyNode:m=!1,companyInfo:a,defaultExpandedLevels:r=2})=>{let x=m||e.level<r,[s,L]=P(x),p=e.children.length>0,d=k(null),[c,b]=P({childPositions:[],containerWidth:0});return w(()=>{if(!p||!s||!d.current){b({childPositions:[],containerWidth:0});return}let n=setTimeout(()=>{let o=d.current;if(!o)return;let u=Array.from(o.children);if(u.length===0)return;let f=o.getBoundingClientRect(),N=u.map(C=>{let g=C.getBoundingClientRect();return g.left+g.width/2-f.left});b({childPositions:N,containerWidth:f.width})},0);return()=>clearTimeout(n)},[p,s,e.children.length]),w(()=>{if(!p||!s)return;let n=new ResizeObserver(()=>{if(!d.current)return;let o=d.current,u=Array.from(o.children);if(u.length===0)return;let f=o.getBoundingClientRect(),N=u.map(C=>{let g=C.getBoundingClientRect();return g.left+g.width/2-f.left});b({childPositions:N,containerWidth:f.width})});return d.current&&n.observe(d.current),()=>n.disconnect()},[p,s]),y("div",{className:`flex flex-col items-center ${h?"":"mb-8"}`,children:[m&&a?t(R,{companyInfo:a}):t(O,{node:e,onNodeClick:i,expandable:l,isExpanded:s,onToggleExpand:()=>L(!s)}),p&&s&&y("div",{className:"relative",children:[e.children.length>1&&c.childPositions.length>0&&y("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 pointer-events-none z-10",children:[t("div",{className:"absolute top-0 left-0 w-0.5 h-8 bg-border -translate-x-1/2"}),t("div",{className:"absolute top-8 h-0.5 bg-border",style:{left:`${Math.min(...c.childPositions)-c.containerWidth/2}px`,width:`${Math.max(...c.childPositions)-Math.min(...c.childPositions)}px`}}),c.childPositions.map((n,o)=>t("div",{className:"absolute w-0.5 bg-border -translate-x-1/2",style:{left:`${n-c.containerWidth/2}px`,top:"32px",height:"32px"}},o))]}),e.children.length===1&&t("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-0.5 h-16 bg-border pointer-events-none z-10"}),t("div",{className:"mt-16 w-full overflow-x-auto",children:t("div",{ref:d,className:`
2
+ flex gap-8 pb-4
3
+ ${e.children.length===1?"justify-center":"justify-start min-w-max px-4"}
4
+ `,children:e.children.map(n=>t("div",{className:"flex-shrink-0",children:t(E,{node:n,onNodeClick:i,expandable:l,initiallyExpanded:v,defaultExpandedLevels:r})},n.id))})})]})]})};export{$ as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-SV7NMNDI.mjs";import{f as s,g as m}from"./chunk-2BRDNDUB.mjs";import{a as o}from"./chunk-MDJREBVI.mjs";import{jsx as e,jsxs as p}from"react/jsx-runtime";function x({services:t,className:f,title:r,content:i}){let d={settings:{width:"full",card:"light"}};return p("div",{className:"pb-4 md:pb-0",children:[p("div",{className:o("w-full text-left prose"),children:[r&&e("h2",{className:"text-primary",children:r}),e("div",{className:"pb-12 ",children:i&&e(s,{enableGutter:!1,content:i,enableProse:!1,className:o("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),t&&t.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:t.map((a,l)=>e("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],l),className:"w-full px-4 md:w-1/2 lg:w-1/3 flex",children:e(m,{...d,icon:{type:"none"},title:a.title,image:a.image,content:a.content,link:a.link,className:"w-full"})},l))})]})}export{x as a};
1
+ import{a as n}from"./chunk-SV7NMNDI.mjs";import{f as s,g as m}from"./chunk-4ITG3T35.mjs";import{a as o}from"./chunk-MDJREBVI.mjs";import{jsx as e,jsxs as p}from"react/jsx-runtime";function x({services:t,className:f,title:r,content:i}){let d={settings:{width:"full",card:"light"}};return p("div",{className:"pb-4 md:pb-0",children:[p("div",{className:o("w-full text-left prose"),children:[r&&e("h2",{className:"text-primary",children:r}),e("div",{className:"pb-12 ",children:i&&e(s,{enableGutter:!1,content:i,enableProse:!1,className:o("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),t&&t.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:t.map((a,l)=>e("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],l),className:"w-full px-4 md:w-1/2 lg:w-1/3 flex",children:e(m,{...d,icon:{type:"none"},title:a.title,image:a.image,content:a.content,link:a.link,className:"w-full"})},l))})]})}export{x as a};
@@ -1 +1 @@
1
- import{a as B,c as L,d as K,g as A,i as d}from"./chunk-YFAZQYK4.mjs";import{a as q}from"./chunk-INCYANPB.mjs";import{a as G}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as D}from"./chunk-FT3AE7L2.mjs";import{a as P,f as U,g as V,i as j}from"./chunk-3UMMMQEH.mjs";import{a as b}from"./chunk-L5JPAKPM.mjs";import{b as s}from"./chunk-ZUA4KNIR.mjs";import{a as E}from"./chunk-MDJREBVI.mjs";import{useState as o}from"react";import{X as te,Search as ae,FileText as oe,Trash2 as re}from"lucide-react";import{toast as i}from"sonner";import{Fragment as ne,jsx as t,jsxs as a}from"react/jsx-runtime";var xe=({isOpen:H,onClose:I,knowledgeSources:Q,onCreate:R,onUpdate:z,onDelete:X})=>{let[m,$]=o(""),[r,F]=o(null),[c,v]=o(""),[x,C]=o(""),[n,u]=o([]),[g,N]=o(""),[h,y]=o("name"),[w,S]=o("asc"),[k,T]=o(!0),M=Q.filter(e=>e.label.toLowerCase().includes(m.toLowerCase())||e.description?.toLowerCase().includes(m.toLowerCase())),J=e=>{F(e),v(e.label),C(e.description||""),u(e.menuConfig?.groupBy||[]),y(e.menuConfig?.sortBy||"name"),S(e.menuConfig?.sortOrder||"asc"),T(e.menuConfig?.showDocumentCount||!0)},O=()=>{g.trim()&&!n.includes(g.trim())&&(u([...n,g.trim()]),N(""))},W=e=>{u(n.filter(f=>f!==e))},Y=e=>{e.key==="Enter"&&(e.preventDefault(),O())},p=()=>{F(null),v(""),C(""),u([]),N(""),y("name"),S("asc"),T(!0)},Z=()=>{if(!c.trim()){i.error("Label is required");return}R?.({id:c.trim(),label:c.trim(),description:x.trim(),menuConfig:{groupBy:n,sortBy:h,sortOrder:w,showDocumentCount:k}}),i.success("Knowledge source created successfully"),p()},_=()=>{if(r){if(!c.trim()){i.error("Label is required");return}z?.({id:r.id,label:c.trim(),description:x.trim(),menuConfig:{groupBy:n,sortBy:h,sortOrder:w,showDocumentCount:k}}),i.success("Knowledge source updated successfully"),p()}},ee=()=>{r&&window.confirm(`Are you sure you want to delete "${r.label}"?`)&&(X?.(r.id),i.success("Knowledge source deleted successfully"),p())};return t(P,{open:H,onOpenChange:I,children:a(U,{className:"sm:max-w-[900px] max-h-[90vh] bg-card border-border p-0",children:[t(V,{className:"px-6 pt-6 pb-4 border-b border-border",children:t(j,{className:"text-foreground text-2xl",children:"Manage Knowledge Sources"})}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 p-6 overflow-hidden",children:[a("div",{className:"flex flex-col gap-4",children:[a("div",{className:"relative",children:[t(ae,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),t(b,{value:m,onChange:e=>$(e.target.value),placeholder:"Search contexts...",className:"pl-10 bg-background border-input"})]}),t(D,{className:"rounded-md border border-border bg-background flex-1",children:t("div",{className:"p-2 space-y-2",children:M.length===0?a("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[t(oe,{className:"h-12 w-12 text-muted-foreground mb-2"}),t("p",{className:"text-sm text-muted-foreground",children:m?"No contexts found":"No contexts yet"})]}):M.map(e=>t("div",{onClick:()=>J(e),className:E("p-3 rounded-lg cursor-pointer transition-all hover:bg-accent/50",r?.id===e.id&&"bg-accent text-accent-foreground"),children:t("div",{className:"flex items-start justify-between gap-2",children:a("div",{className:"flex-1 min-w-0",children:[t("h4",{className:"font-medium truncate",children:e.label}),e.description&&t("p",{className:"text-sm opacity-80 truncate mt-1",children:e.description}),(e.menuConfig?.groupBy||[]).length>0&&a("div",{className:"flex flex-wrap gap-1 mt-2",children:[e.menuConfig?.groupBy?.slice(0,3).map(f=>t("span",{className:"text-xs px-2 py-0.5 rounded-full bg-secondary text-secondary-foreground",children:f},f)),(e.menuConfig?.groupBy||[]).length>3&&a("span",{className:"text-xs px-2 py-0.5",children:["+",(e.menuConfig?.groupBy||[]).length-3]})]})]})})},e.id))})}),t(s,{variant:"outline",onClick:p,className:"w-full",children:"Clear Selection / New Context"})]}),a("div",{className:"space-y-4",children:[t(D,{className:"h-[400px] pr-4",children:a("div",{className:"space-y-4",children:[a("div",{className:"space-y-2",children:[a(l,{htmlFor:"label",className:"text-foreground",children:["Label ",t("span",{className:"text-destructive",children:"*"})]}),t(b,{id:"label",value:c,onChange:e=>v(e.target.value),placeholder:"Enter label",className:"bg-background border-input"})]}),a("div",{className:"space-y-2",children:[t(l,{htmlFor:"description",className:"text-foreground",children:"Description"}),t(G,{id:"description",value:x,onChange:e=>C(e.target.value),placeholder:"Enter description",className:"bg-background border-input resize-none",rows:3})]}),a("div",{className:"space-y-2",children:[t(l,{className:"text-foreground",children:"Group By"}),a("div",{className:"flex gap-2",children:[t(b,{value:g,onChange:e=>N(e.target.value),onKeyPress:Y,placeholder:"Type a tag and press Enter",className:"bg-background border-input flex-1"}),t(s,{onClick:O,className:"bg-accent hover:bg-accent/90",children:"Add"})]}),n.length>0&&t("div",{className:"flex flex-wrap gap-2 mt-2",children:n.map(e=>a("div",{className:"bg-secondary text-secondary-foreground px-3 py-1 rounded-md flex items-center gap-2 text-sm",children:[e,t(te,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:()=>W(e)})]},e))})]}),a("div",{className:"space-y-2",children:[t(l,{htmlFor:"sortBy",className:"text-foreground",children:"Sort By"}),a(B,{value:h,onValueChange:e=>y(e),children:[t(K,{className:"bg-background border-input",children:t(L,{})}),a(A,{className:"bg-popover border-border",children:[t(d,{value:"name",children:"Name"}),t(d,{value:"createdAt",children:"Created At"})]})]})]}),a("div",{className:"space-y-2",children:[t(l,{htmlFor:"sortOrder",className:"text-foreground",children:"Sort Order"}),a(B,{value:w,onValueChange:e=>S(e),children:[t(K,{className:"bg-background border-input",children:t(L,{})}),a(A,{className:"bg-popover border-border",children:[t(d,{value:"asc",children:"Ascending"}),t(d,{value:"desc",children:"Descending"})]})]})]}),a("div",{className:"flex items-center space-x-2",children:[t(q,{id:"showDocumentCount",checked:k,onCheckedChange:e=>T(e)}),t(l,{htmlFor:"showDocumentCount",className:"text-sm font-normal cursor-pointer text-foreground",children:"Show Document Count"})]})]})}),t("div",{className:"flex gap-3 pt-4 border-t border-border",children:r?a(ne,{children:[a(s,{variant:"destructive",onClick:ee,className:"flex-1",children:[t(re,{className:"mr-2 h-4 w-4"}),"Delete"]}),t(s,{onClick:_,className:"flex-1 bg-accent hover:bg-accent/90",children:"Update"})]}):t(s,{onClick:Z,className:"w-full bg-accent hover:bg-accent/90",children:"Create"})})]})]}),t("div",{className:"px-6 py-4 border-t border-border flex justify-end",children:t(s,{variant:"outline",onClick:I,children:"Close"})})]})})};export{xe as a};
1
+ import{a as B,c as L,d as K,g as A,i as d}from"./chunk-YFAZQYK4.mjs";import{a as G}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as q}from"./chunk-INCYANPB.mjs";import{a as D}from"./chunk-FT3AE7L2.mjs";import{a as P,f as U,g as V,i as j}from"./chunk-3UMMMQEH.mjs";import{a as b}from"./chunk-L5JPAKPM.mjs";import{b as s}from"./chunk-ZUA4KNIR.mjs";import{a as E}from"./chunk-MDJREBVI.mjs";import{useState as o}from"react";import{X as te,Search as ae,FileText as oe,Trash2 as re}from"lucide-react";import{toast as i}from"sonner";import{Fragment as ne,jsx as t,jsxs as a}from"react/jsx-runtime";var xe=({isOpen:H,onClose:I,knowledgeSources:Q,onCreate:R,onUpdate:z,onDelete:X})=>{let[m,$]=o(""),[r,F]=o(null),[c,v]=o(""),[x,C]=o(""),[n,u]=o([]),[g,N]=o(""),[h,y]=o("name"),[w,S]=o("asc"),[k,T]=o(!0),M=Q.filter(e=>e.label.toLowerCase().includes(m.toLowerCase())||e.description?.toLowerCase().includes(m.toLowerCase())),J=e=>{F(e),v(e.label),C(e.description||""),u(e.menuConfig?.groupBy||[]),y(e.menuConfig?.sortBy||"name"),S(e.menuConfig?.sortOrder||"asc"),T(e.menuConfig?.showDocumentCount||!0)},O=()=>{g.trim()&&!n.includes(g.trim())&&(u([...n,g.trim()]),N(""))},W=e=>{u(n.filter(f=>f!==e))},Y=e=>{e.key==="Enter"&&(e.preventDefault(),O())},p=()=>{F(null),v(""),C(""),u([]),N(""),y("name"),S("asc"),T(!0)},Z=()=>{if(!c.trim()){i.error("Label is required");return}R?.({id:c.trim(),label:c.trim(),description:x.trim(),menuConfig:{groupBy:n,sortBy:h,sortOrder:w,showDocumentCount:k}}),i.success("Knowledge source created successfully"),p()},_=()=>{if(r){if(!c.trim()){i.error("Label is required");return}z?.({id:r.id,label:c.trim(),description:x.trim(),menuConfig:{groupBy:n,sortBy:h,sortOrder:w,showDocumentCount:k}}),i.success("Knowledge source updated successfully"),p()}},ee=()=>{r&&window.confirm(`Are you sure you want to delete "${r.label}"?`)&&(X?.(r.id),i.success("Knowledge source deleted successfully"),p())};return t(P,{open:H,onOpenChange:I,children:a(U,{className:"sm:max-w-[900px] max-h-[90vh] bg-card border-border p-0",children:[t(V,{className:"px-6 pt-6 pb-4 border-b border-border",children:t(j,{className:"text-foreground text-2xl",children:"Manage Knowledge Sources"})}),a("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 p-6 overflow-hidden",children:[a("div",{className:"flex flex-col gap-4",children:[a("div",{className:"relative",children:[t(ae,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),t(b,{value:m,onChange:e=>$(e.target.value),placeholder:"Search contexts...",className:"pl-10 bg-background border-input"})]}),t(D,{className:"rounded-md border border-border bg-background flex-1",children:t("div",{className:"p-2 space-y-2",children:M.length===0?a("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[t(oe,{className:"h-12 w-12 text-muted-foreground mb-2"}),t("p",{className:"text-sm text-muted-foreground",children:m?"No contexts found":"No contexts yet"})]}):M.map(e=>t("div",{onClick:()=>J(e),className:E("p-3 rounded-lg cursor-pointer transition-all hover:bg-accent/50",r?.id===e.id&&"bg-accent text-accent-foreground"),children:t("div",{className:"flex items-start justify-between gap-2",children:a("div",{className:"flex-1 min-w-0",children:[t("h4",{className:"font-medium truncate",children:e.label}),e.description&&t("p",{className:"text-sm opacity-80 truncate mt-1",children:e.description}),(e.menuConfig?.groupBy||[]).length>0&&a("div",{className:"flex flex-wrap gap-1 mt-2",children:[e.menuConfig?.groupBy?.slice(0,3).map(f=>t("span",{className:"text-xs px-2 py-0.5 rounded-full bg-secondary text-secondary-foreground",children:f},f)),(e.menuConfig?.groupBy||[]).length>3&&a("span",{className:"text-xs px-2 py-0.5",children:["+",(e.menuConfig?.groupBy||[]).length-3]})]})]})})},e.id))})}),t(s,{variant:"outline",onClick:p,className:"w-full",children:"Clear Selection / New Context"})]}),a("div",{className:"space-y-4",children:[t(D,{className:"h-[400px] pr-4",children:a("div",{className:"space-y-4",children:[a("div",{className:"space-y-2",children:[a(l,{htmlFor:"label",className:"text-foreground",children:["Label ",t("span",{className:"text-destructive",children:"*"})]}),t(b,{id:"label",value:c,onChange:e=>v(e.target.value),placeholder:"Enter label",className:"bg-background border-input"})]}),a("div",{className:"space-y-2",children:[t(l,{htmlFor:"description",className:"text-foreground",children:"Description"}),t(G,{id:"description",value:x,onChange:e=>C(e.target.value),placeholder:"Enter description",className:"bg-background border-input resize-none",rows:3})]}),a("div",{className:"space-y-2",children:[t(l,{className:"text-foreground",children:"Group By"}),a("div",{className:"flex gap-2",children:[t(b,{value:g,onChange:e=>N(e.target.value),onKeyPress:Y,placeholder:"Type a tag and press Enter",className:"bg-background border-input flex-1"}),t(s,{onClick:O,className:"bg-accent hover:bg-accent/90",children:"Add"})]}),n.length>0&&t("div",{className:"flex flex-wrap gap-2 mt-2",children:n.map(e=>a("div",{className:"bg-secondary text-secondary-foreground px-3 py-1 rounded-md flex items-center gap-2 text-sm",children:[e,t(te,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:()=>W(e)})]},e))})]}),a("div",{className:"space-y-2",children:[t(l,{htmlFor:"sortBy",className:"text-foreground",children:"Sort By"}),a(B,{value:h,onValueChange:e=>y(e),children:[t(K,{className:"bg-background border-input",children:t(L,{})}),a(A,{className:"bg-popover border-border",children:[t(d,{value:"name",children:"Name"}),t(d,{value:"createdAt",children:"Created At"})]})]})]}),a("div",{className:"space-y-2",children:[t(l,{htmlFor:"sortOrder",className:"text-foreground",children:"Sort Order"}),a(B,{value:w,onValueChange:e=>S(e),children:[t(K,{className:"bg-background border-input",children:t(L,{})}),a(A,{className:"bg-popover border-border",children:[t(d,{value:"asc",children:"Ascending"}),t(d,{value:"desc",children:"Descending"})]})]})]}),a("div",{className:"flex items-center space-x-2",children:[t(q,{id:"showDocumentCount",checked:k,onCheckedChange:e=>T(e)}),t(l,{htmlFor:"showDocumentCount",className:"text-sm font-normal cursor-pointer text-foreground",children:"Show Document Count"})]})]})}),t("div",{className:"flex gap-3 pt-4 border-t border-border",children:r?a(ne,{children:[a(s,{variant:"destructive",onClick:ee,className:"flex-1",children:[t(re,{className:"mr-2 h-4 w-4"}),"Delete"]}),t(s,{onClick:_,className:"flex-1 bg-accent hover:bg-accent/90",children:"Update"})]}):t(s,{onClick:Z,className:"w-full bg-accent hover:bg-accent/90",children:"Create"})})]})]}),t("div",{className:"px-6 py-4 border-t border-border flex justify-end",children:t(s,{variant:"outline",onClick:I,children:"Close"})})]})})};export{xe as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{c as R,h as v,i as w,j as B,k as P,l,m as s,o as b,p as o,q as n,r as u,v as C,w as g,x as y}from"./chunk-ZFUP5NVF.mjs";import{a as f}from"./chunk-7GSXNSLD.mjs";import{a as p,b as d,c}from"./chunk-YNCJATT7.mjs";import{a as M}from"./chunk-FVM5SQT2.mjs";import{PencilLine as z,ChevronDown as h,FilePlus as E,Edit as H,Printer as _}from"lucide-react";import $ from"clsx";import{Fragment as T,jsx as e,jsxs as a}from"react/jsx-runtime";var q=()=>e(M,{iconName:"github",size:"10x"});function Z({relatedContent:i,tableOfContents:x,editorComponent:N,loading:m=!1,editMode:k=!1,onAddDocument:A,onEditDocument:L,onPrintDocument:O,onGithubClick:G,onNavClick:S,LinkComponent:I,...D}){let F=I?t=>e(I,{...t}):S?({item:t,children:r,...j})=>e("button",{onClick:()=>S&&S(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...j,children:r}):t=>e("a",{href:t.href,...t});return a(R,{side:"right",variant:"inset",...D,children:[a(v,{className:"border-b border-sidebar-border",children:[a(o,{className:"flex-row space-x-1",children:[e(n,{children:a(u,{onClick:A,children:[e(E,{})," ",e("span",{children:"Add Document"})]})}),G&&e(n,{children:e(u,{onClick:G,tooltip:"Open in GitHub",children:e(q,{})})})]}),a(o,{className:"flex-row space-x-1",children:[e(n,{className:"w-5/12",children:a(u,{onClick:()=>L(),variant:k?"outline":"default",className:$(k&&"text-accent"),children:[e(H,{})," ",e("span",{children:"Edit"})]})}),e(n,{className:"w-5/12",children:a(u,{onClick:O,children:[e(_,{})," ",e("span",{children:"Print"})]})})]})]}),N&&a(T,{children:[e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Editor Controls",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:N})})]})}),e(B,{className:"mx-0"})]}),a(P,{className:"overflow-auto",children:[m&&a(T,{children:[a(l,{children:[e(s,{children:"Related Content"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]}),a(l,{children:[e(s,{children:"Table of Contents"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]})]}),i&&!m&&Object.keys(i).length>0&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Related Content",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:i&&Object.keys(i).map(t=>a(n,{children:[a("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",t.charAt(0).toUpperCase()+t.slice(1)]}),t&&i[t]&&e(C,{children:i[t].map(r=>e(g,{children:e(y,{asChild:!0,isActive:!1,size:"sm",children:a(F,{href:r.url,item:r,className:"flex justify-between items-center w-full text-xs",children:[e("span",{children:r.label}),r.type==="note"&&e(z,{className:"ml-2 text-gray-400 !important",size:16}),r.type==="draft"&&e(M,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},r.label))})]},t))})})})]})}),x&&!m&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Table of Contents",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:x.map(t=>a(n,{children:[e(u,{asChild:!0,children:e("a",{href:`#${t.url}`,className:"text-xs",children:t.title})}),t.items?.length?e(C,{children:t.items.map(r=>e(g,{children:e(y,{asChild:!0,isActive:r.isActive,size:"sm",children:e("a",{href:`#${r.url}`,className:"flex justify-between items-center w-full text-xs",children:e("span",{children:r.title})})})},r.title))}):null]},t.title))})})})]})})]}),e(w,{})]})}export{Z as a};
4
+ import{c as R,h as v,i as w,j as B,k as P,l,m as s,o as b,p as o,q as n,r as u,v as C,w as g,x as y}from"./chunk-O5P35LEY.mjs";import{a as f}from"./chunk-7GSXNSLD.mjs";import{a as p,b as d,c}from"./chunk-YNCJATT7.mjs";import{a as M}from"./chunk-FVM5SQT2.mjs";import{PencilLine as z,ChevronDown as h,FilePlus as E,Edit as H,Printer as _}from"lucide-react";import $ from"clsx";import{Fragment as T,jsx as e,jsxs as a}from"react/jsx-runtime";var q=()=>e(M,{iconName:"github",size:"10x"});function Z({relatedContent:i,tableOfContents:x,editorComponent:N,loading:m=!1,editMode:k=!1,onAddDocument:A,onEditDocument:L,onPrintDocument:O,onGithubClick:G,onNavClick:S,LinkComponent:I,...D}){let F=I?t=>e(I,{...t}):S?({item:t,children:r,...j})=>e("button",{onClick:()=>S&&S(t),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...j,children:r}):t=>e("a",{href:t.href,...t});return a(R,{side:"right",variant:"inset",...D,children:[a(v,{className:"border-b border-sidebar-border",children:[a(o,{className:"flex-row space-x-1",children:[e(n,{children:a(u,{onClick:A,children:[e(E,{})," ",e("span",{children:"Add Document"})]})}),G&&e(n,{children:e(u,{onClick:G,tooltip:"Open in GitHub",children:e(q,{})})})]}),a(o,{className:"flex-row space-x-1",children:[e(n,{className:"w-5/12",children:a(u,{onClick:()=>L(),variant:k?"outline":"default",className:$(k&&"text-accent"),children:[e(H,{})," ",e("span",{children:"Edit"})]})}),e(n,{className:"w-5/12",children:a(u,{onClick:O,children:[e(_,{})," ",e("span",{children:"Print"})]})})]})]}),N&&a(T,{children:[e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Editor Controls",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:N})})]})}),e(B,{className:"mx-0"})]}),a(P,{className:"overflow-auto",children:[m&&a(T,{children:[a(l,{children:[e(s,{children:"Related Content"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]}),a(l,{children:[e(s,{children:"Table of Contents"}),e(b,{children:e(o,{children:Array.from({length:3}).map((t,r)=>e(n,{children:e(f,{className:"bg-gray-200 w-full h-10"})},r))})})]})]}),i&&!m&&Object.keys(i).length>0&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Related Content",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:i&&Object.keys(i).map(t=>a(n,{children:[a("span",{className:"p-2 text-xs text-sidebar-foreground",children:[" ",t.charAt(0).toUpperCase()+t.slice(1)]}),t&&i[t]&&e(C,{children:i[t].map(r=>e(g,{children:e(y,{asChild:!0,isActive:!1,size:"sm",children:a(F,{href:r.url,item:r,className:"flex justify-between items-center w-full text-xs",children:[e("span",{children:r.label}),r.type==="note"&&e(z,{className:"ml-2 text-gray-400 !important",size:16}),r.type==="draft"&&e(M,{iconName:"code-pull-request-draft",className:"ml-2 text-gray-400 !important"})]})})},r.label))})]},t))})})})]})}),x&&!m&&e(p,{defaultOpen:!0,className:"group/collapsible",children:a(l,{children:[e(s,{asChild:!0,children:a(d,{children:["Table of Contents",e(h,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),e(b,{children:e(c,{children:e(o,{children:x.map(t=>a(n,{children:[e(u,{asChild:!0,children:e("a",{href:`#${t.url}`,className:"text-xs",children:t.title})}),t.items?.length?e(C,{children:t.items.map(r=>e(g,{children:e(y,{asChild:!0,isActive:r.isActive,size:"sm",children:e("a",{href:`#${r.url}`,className:"flex justify-between items-center w-full text-xs",children:e("span",{children:r.title})})})},r.title))}):null]},t.title))})})})]})})]}),e(w,{})]})}export{Z as a};
@@ -1 +1 @@
1
- import{f as o}from"./chunk-2BRDNDUB.mjs";import n from"next/image";import{jsx as r,jsxs as m}from"react/jsx-runtime";var s=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:i,url:l,width:c}=e;return r(n,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:l||"",width:c||0,height:i||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return r("div",{children:r(n,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},p=({links:e,media:t,children:a,richText:i})=>m("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&r(s,{media:t}),r("div",{className:"mx-0 min-w-full relative z-9",children:r("div",{className:"container text-brand-one-foreground",children:a||i&&r(o,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:i,enableProse:!0,enableGutter:!1})})})]});export{p as a};
1
+ import{f as o}from"./chunk-4ITG3T35.mjs";import n from"next/image";import{jsx as r,jsxs as m}from"react/jsx-runtime";var s=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:i,url:l,width:c}=e;return r(n,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:l||"",width:c||0,height:i||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return r("div",{children:r(n,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},p=({links:e,media:t,children:a,richText:i})=>m("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&r(s,{media:t}),r("div",{className:"mx-0 min-w-full relative z-9",children:r("div",{className:"container text-brand-one-foreground",children:a||i&&r(o,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:i,enableProse:!0,enableGutter:!1})})})]});export{p as a};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-RSDUFAIB.mjs";import{f as s}from"./chunk-2BRDNDUB.mjs";import d from"clsx";import{jsx as t,jsxs as l}from"react/jsx-runtime";var g=a=>{let{className:i,docs:n,introContent:o}=a;return l("div",{className:d("container",i),children:[o&&t(s,{content:o,enableGutter:!1}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:n?.map((e,p)=>typeof e=="string"?null:t(r,{doc:e,relationTo:"posts",showCategories:!0},p))})]})};export{g as a};
1
+ import{a as r}from"./chunk-RSDUFAIB.mjs";import{f as s}from"./chunk-4ITG3T35.mjs";import d from"clsx";import{jsx as t,jsxs as l}from"react/jsx-runtime";var g=a=>{let{className:i,docs:n,introContent:o}=a;return l("div",{className:d("container",i),children:[o&&t(s,{content:o,enableGutter:!1}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:n?.map((e,p)=>typeof e=="string"?null:t(r,{doc:e,relationTo:"posts",showCategories:!0},p))})]})};export{g as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as Q}from"./chunk-QOZ2O3FG.mjs";import{a as J}from"./chunk-6PS55VJZ.mjs";import{a as H}from"./chunk-I75OOO4H.mjs";import{a as z}from"./chunk-LAP57E2L.mjs";import{a as L}from"./chunk-2R3MJSQ7.mjs";import{a as q}from"./chunk-L3V5YDPH.mjs";import{a as W}from"./chunk-QC2UWZWL.mjs";import{a as K}from"./chunk-EOR2BAI2.mjs";import{a as O}from"./chunk-UVHMI3PU.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Je}from"next/navigation";import{jsx as a,jsxs as Qe}from"react/jsx-runtime";function Le({title:Xe="",initialTasks:f=[],initialEpics:h=[],initialSprints:A=[],initialProjects:D=[],initialReminders:v=[],initialColleagues:S=[],initialUsers:E=[],initialFiles:w=[],initialView:C="kanban",onAddTask:X,onUpdateTask:Y,onDeleteTask:Z,onTaskClick:Ye,onAddEpic:_,onUpdateEpic:$,onDeleteEpic:ee,onAddTaskToEpic:Ze,onAddSprint:te,onUpdateSprint:ne,onDeleteSprint:ie,onAddProject:se,onUpdateProject:ae,onDeleteProject:oe,onFileAdd:de,onFileEdit:re,onFileDelete:le,onFileClick:ce,onAddReminder:pe,onUpdateReminder:me,onDeleteReminder:ke,onViewChange:Te,onToggleMobileMenu:ue,onTeamClick:_e,onTeamChange:$e,onCopilotClick:et,handleAddComment:ge}){let[c,d]=s(f),[l,p]=s(h),[m,k]=s(A),[fe,T]=s(D),[he,u]=s(v),[P,Ae]=s(S),[F,De]=s(E),[ve,y]=s(w),[Se,R]=s(!1),[Ee,M]=s(!1),[we,N]=s(null),[Ce,Pe]=s(null),[V,j]=s(null),[r,I]=s(C||"kanban"),[tt,Ue]=s(!1),be=Je();o(()=>{d(f)},[f]),o(()=>{k(A)},[A]),o(()=>{p(h)},[h]),o(()=>{T(D)},[D]),o(()=>{y(w)},[w]),o(()=>{De(E)},[E]),o(()=>{Ae(S)},[S]),o(()=>{u(v)},[v]),o(()=>{I(C)},[C]);let Oe=c.filter(e=>{}),nt=e=>Oe.filter(t=>t.status===e),it=e=>{let t={};return l.forEach(n=>{}),t},st=e=>{j(e)},at=e=>{V&&(d(t=>t.map(n=>n.id===V.id?{...n,status:e}:n)),j(null))},B=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};d(n=>[...n,t]),X?.(t)},g=async(e,t)=>(d(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),await Y?.(e,t)),ot=async(e,t)=>{g(e,t)},x=e=>{d(t=>t.filter(n=>n.id!==Number(e))),we?.id===Number(e)&&N(null),Z?.(e)},dt=async e=>{x(e)},rt=e=>{let t={...e,id:Date.now()};T(n=>[...n,t]),se?.(e)},lt=(e,t)=>{T(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ae?.(e,t)},ct=e=>{T(t=>t.filter(n=>n.id!==Number(e))),oe?.(e)},G=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(n=>[...n,t]),_?.({...t})},Fe=()=>{M(!0)},ye=(e,t)=>{p(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),$?.(e,t)},Re=e=>{p(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.filter(n=>O(n.epic)!==Number(e))),ee?.(e)},Me=e=>{let t={...e,id:Date.now()};k(n=>[...n,t]),te?.(e)},Ne=(e,t)=>{k(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ne?.(e,t)},Ve=e=>{e==="backlog"||e==="all-tasks"||(k(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.map(n=>O(n.sprint)===Number(e)?{...n,sprint:void 0}:n)),ie?.(e))},U=e=>{N(e)},je=e=>{e==="planning"&&window.innerWidth<768||(I(e),Te?.(e))},pt=()=>{Ue(e=>!e),ue?.()},mt=()=>{be.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ie=e=>{R(!0)},Be=()=>{R(!1),Pe(null)},xe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString()};u(n=>[...n,t]),pe?.(e)},Ge=(e,t)=>{u(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),me?.(e,t)},He=e=>{u(t=>t.filter(n=>n.id!==Number(e))),ke?.(e)},Ke=()=>{de?.()},We=e=>{re?.(e)},qe=e=>{y(t=>t.filter(n=>n.name!==e)),le?.(e)},ze=e=>{ce?.(e)},ut=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],gt=()=>{switch(r){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},b=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=b.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=b.length>3,At=b.slice(3);return Qe(K,{currentView:r,onViewChange:je,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(z,{initialProjects:fe,initialEpics:l,initialSprints:m.map(e=>({...e,isSelected:!1})),initialTasks:c,initialColleagues:P,initialUsers:F,onAddTask:B,onUpdateTask:g,onDeleteTask:x,onTaskClick:U,onAddEpic:G,onAddComment:ge})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(L,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddSprint:Me,onUpdateSprint:Ne,onDeleteSprint:Ve})}),r==="tasks"&&a("div",{className:"h-full",children:a(Q,{initialReminders:he,initialColleagues:P,onAddReminder:xe,onUpdateReminder:Ge,onDeleteReminder:He})}),r==="files"&&a("div",{className:"h-full",children:a(H,{initialFiles:ve,onFileAdd:Ke,onFileEdit:We,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(J,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddTaskToEpic:Ie,onAddEpic:Fe,onUpdateEpic:ye,onDeleteEpic:Re})}),a(W,{isOpen:Se,onClose:Be,onAddTask:B,epics:l,sprints:m,assignees:[...P,...F],defaultEpicId:Ce||void 0}),a(q,{isOpen:Ee,onClose:()=>M(!1),onAddEpic:G})]})}export{Le as a};
4
+ import{a as Q}from"./chunk-QOZ2O3FG.mjs";import{a as J}from"./chunk-VDFRWGXR.mjs";import{a as z}from"./chunk-LBVWIF2J.mjs";import{a as W}from"./chunk-QC2UWZWL.mjs";import{a as L}from"./chunk-2R3MJSQ7.mjs";import{a as H}from"./chunk-I75OOO4H.mjs";import{a as q}from"./chunk-L3V5YDPH.mjs";import{a as K}from"./chunk-EOR2BAI2.mjs";import{a as O}from"./chunk-UVHMI3PU.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Je}from"next/navigation";import{jsx as a,jsxs as Qe}from"react/jsx-runtime";function Le({title:Xe="",initialTasks:f=[],initialEpics:h=[],initialSprints:A=[],initialProjects:D=[],initialReminders:v=[],initialColleagues:S=[],initialUsers:E=[],initialFiles:w=[],initialView:C="kanban",onAddTask:X,onUpdateTask:Y,onDeleteTask:Z,onTaskClick:Ye,onAddEpic:_,onUpdateEpic:$,onDeleteEpic:ee,onAddTaskToEpic:Ze,onAddSprint:te,onUpdateSprint:ne,onDeleteSprint:ie,onAddProject:se,onUpdateProject:ae,onDeleteProject:oe,onFileAdd:de,onFileEdit:re,onFileDelete:le,onFileClick:ce,onAddReminder:pe,onUpdateReminder:me,onDeleteReminder:ke,onViewChange:Te,onToggleMobileMenu:ue,onTeamClick:_e,onTeamChange:$e,onCopilotClick:et,handleAddComment:ge}){let[c,d]=s(f),[l,p]=s(h),[m,k]=s(A),[fe,T]=s(D),[he,u]=s(v),[P,Ae]=s(S),[F,De]=s(E),[ve,y]=s(w),[Se,R]=s(!1),[Ee,M]=s(!1),[we,N]=s(null),[Ce,Pe]=s(null),[V,j]=s(null),[r,I]=s(C||"kanban"),[tt,Ue]=s(!1),be=Je();o(()=>{d(f)},[f]),o(()=>{k(A)},[A]),o(()=>{p(h)},[h]),o(()=>{T(D)},[D]),o(()=>{y(w)},[w]),o(()=>{De(E)},[E]),o(()=>{Ae(S)},[S]),o(()=>{u(v)},[v]),o(()=>{I(C)},[C]);let Oe=c.filter(e=>{}),nt=e=>Oe.filter(t=>t.status===e),it=e=>{let t={};return l.forEach(n=>{}),t},st=e=>{j(e)},at=e=>{V&&(d(t=>t.map(n=>n.id===V.id?{...n,status:e}:n)),j(null))},B=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};d(n=>[...n,t]),X?.(t)},g=async(e,t)=>(d(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),await Y?.(e,t)),ot=async(e,t)=>{g(e,t)},x=e=>{d(t=>t.filter(n=>n.id!==Number(e))),we?.id===Number(e)&&N(null),Z?.(e)},dt=async e=>{x(e)},rt=e=>{let t={...e,id:Date.now()};T(n=>[...n,t]),se?.(e)},lt=(e,t)=>{T(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ae?.(e,t)},ct=e=>{T(t=>t.filter(n=>n.id!==Number(e))),oe?.(e)},G=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(n=>[...n,t]),_?.({...t})},Fe=()=>{M(!0)},ye=(e,t)=>{p(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),$?.(e,t)},Re=e=>{p(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.filter(n=>O(n.epic)!==Number(e))),ee?.(e)},Me=e=>{let t={...e,id:Date.now()};k(n=>[...n,t]),te?.(e)},Ne=(e,t)=>{k(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),ne?.(e,t)},Ve=e=>{e==="backlog"||e==="all-tasks"||(k(t=>t.filter(n=>n.id!==Number(e))),d(t=>t.map(n=>O(n.sprint)===Number(e)?{...n,sprint:void 0}:n)),ie?.(e))},U=e=>{N(e)},je=e=>{e==="planning"&&window.innerWidth<768||(I(e),Te?.(e))},pt=()=>{Ue(e=>!e),ue?.()},mt=()=>{be.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ie=e=>{R(!0)},Be=()=>{R(!1),Pe(null)},xe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString()};u(n=>[...n,t]),pe?.(e)},Ge=(e,t)=>{u(n=>n.map(i=>i.id===Number(e)?{...i,...t}:i)),me?.(e,t)},He=e=>{u(t=>t.filter(n=>n.id!==Number(e))),ke?.(e)},Ke=()=>{de?.()},We=e=>{re?.(e)},qe=e=>{y(t=>t.filter(n=>n.name!==e)),le?.(e)},ze=e=>{ce?.(e)},ut=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],gt=()=>{switch(r){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},b=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=b.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=b.length>3,At=b.slice(3);return Qe(K,{currentView:r,onViewChange:je,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(z,{initialProjects:fe,initialEpics:l,initialSprints:m.map(e=>({...e,isSelected:!1})),initialTasks:c,initialColleagues:P,initialUsers:F,onAddTask:B,onUpdateTask:g,onDeleteTask:x,onTaskClick:U,onAddEpic:G,onAddComment:ge})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(L,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddSprint:Me,onUpdateSprint:Ne,onDeleteSprint:Ve})}),r==="tasks"&&a("div",{className:"h-full",children:a(Q,{initialReminders:he,initialColleagues:P,onAddReminder:xe,onUpdateReminder:Ge,onDeleteReminder:He})}),r==="files"&&a("div",{className:"h-full",children:a(H,{initialFiles:ve,onFileAdd:Ke,onFileEdit:We,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(J,{tasks:c,epics:l,sprints:m,onUpdateTask:g,onTaskClick:U,onAddTaskToEpic:Ie,onAddEpic:Fe,onUpdateEpic:ye,onDeleteEpic:Re})}),a(W,{isOpen:Se,onClose:Be,onAddTask:B,epics:l,sprints:m,assignees:[...P,...F],defaultEpicId:Ce||void 0}),a(q,{isOpen:Ee,onClose:()=>M(!1),onAddEpic:G})]})}export{Le as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as N}from"./chunk-4UIARERB.mjs";import{a as E,f as T}from"./chunk-D4IMQTVU.mjs";import{a as C}from"./chunk-7GSXNSLD.mjs";import{a as M}from"./chunk-L5JPAKPM.mjs";import{a as L,b as I,c as H,d as k}from"./chunk-KY7WQYN4.mjs";import{b as _}from"./chunk-ZUA4KNIR.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{a as P}from"./chunk-FRWX5YES.mjs";import*as o from"react";import{Slot as g}from"@radix-ui/react-slot";import{cva as A}from"class-variance-authority";import{PanelLeft as O}from"lucide-react";import{jsx as r,jsxs as S}from"react/jsx-runtime";var G="sidebar:state",K=60*60*24*7,V="16rem",$="18rem",U="3rem",W="b",B=o.createContext(null);function w(){let a=o.useContext(B);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}var j=o.forwardRef(({defaultOpen:a=!0,open:e,onOpenChange:t,className:i,style:d,children:s,...p},m)=>{let c=P(),[u,b]=o.useState(!1),[v,D]=o.useState(a),f=e??v,h=o.useCallback(l=>{if(t)return t?.(typeof l=="function"?l(f):l);D(l),document.cookie=`${G}=${f}; path=/; max-age=${K}`},[t,f]),x=o.useCallback(()=>c?b(l=>!l):h(l=>!l),[c,h,b]);o.useEffect(()=>{let l=R=>{R.key===W&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),x())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[x]);let y=f?"expanded":"collapsed",z=o.useMemo(()=>({state:y,open:f,setOpen:h,isMobile:c,openMobile:u,setOpenMobile:b,toggleSidebar:x}),[y,f,h,c,u,b,x]);return r(B.Provider,{value:z,children:r(L,{delayDuration:0,children:r("div",{style:{"--sidebar-width":V,"--sidebar-width-icon":U,...d},className:n("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:m,...p,children:s})})})});j.displayName="SidebarProvider";var q=o.forwardRef(({side:a="left",variant:e="sidebar",collapsible:t="offcanvas",className:i,children:d,...s},p)=>{let{isMobile:m,state:c,openMobile:u,setOpenMobile:b}=w();return t==="none"?r("div",{className:n("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:p,...s,children:d}):m?r(E,{open:u,onOpenChange:b,...s,children:r(T,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":$},side:a,children:r("div",{className:"flex h-full w-full flex-col",children:d})})}):S("div",{ref:p,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?t:"","data-variant":e,"data-side":a,children:[r("div",{className:n("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r("div",{className:n("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:r("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:d})})]})});q.displayName="Sidebar";var F=o.forwardRef(({className:a,onClick:e,...t},i)=>{let{toggleSidebar:d}=w();return S(_,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("h-7 w-7",a),onClick:s=>{e?.(s),d()},...t,children:[r(O,{}),r("span",{className:"sr-only",children:"Toggle Sidebar"})]})});F.displayName="SidebarTrigger";var X=o.forwardRef(({className:a,...e},t)=>{let{toggleSidebar:i}=w();return r("button",{ref:t,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:n("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...e})});X.displayName="SidebarRail";var Y=o.forwardRef(({className:a,...e},t)=>r("main",{ref:t,className:n("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...e}));Y.displayName="SidebarInset";var J=o.forwardRef(({className:a,...e},t)=>r(M,{ref:t,"data-sidebar":"input",className:n("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",a),...e}));J.displayName="SidebarInput";var Q=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"header",className:n("flex flex-col gap-2 p-2",a),...e}));Q.displayName="SidebarHeader";var Z=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",a),...e}));Z.displayName="SidebarFooter";var ee=o.forwardRef(({className:a,...e},t)=>r(N,{ref:t,"data-sidebar":"separator",className:n("mx-2 w-auto bg-sidebar-border",a),...e}));ee.displayName="SidebarSeparator";var ae=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"content",className:n("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",a),...e}));ae.displayName="SidebarContent";var te=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col p-2",a),...e}));te.displayName="SidebarGroup";var oe=o.forwardRef(({className:a,asChild:e=!1,...t},i)=>r(e?g:"div",{ref:i,"data-sidebar":"group-label",className:n("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...t}));oe.displayName="SidebarGroupLabel";var re=o.forwardRef(({className:a,asChild:e=!1,...t},i)=>r(e?g:"button",{ref:i,"data-sidebar":"group-action",className:n("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...t}));re.displayName="SidebarGroupAction";var ne=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"group-content",className:n("w-full text-sm",a),...e}));ne.displayName="SidebarGroupContent";var ie=o.forwardRef(({className:a,...e},t)=>r("ul",{ref:t,"data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",a),...e}));ie.displayName="SidebarMenu";var de=o.forwardRef(({className:a,...e},t)=>r("li",{ref:t,"data-sidebar":"menu-item",className:n("group/menu-item relative",a),...e}));de.displayName="SidebarMenuItem";var se=A("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),le=o.forwardRef(({asChild:a=!1,isActive:e=!1,variant:t="default",size:i="default",tooltip:d,className:s,...p},m)=>{let c=a?g:"button",{isMobile:u,state:b}=w(),v=r(c,{ref:m,"data-sidebar":"menu-button","data-size":i,"data-active":e,className:n(se({variant:t,size:i}),s),...p});return d?(typeof d=="string"&&(d={children:d}),S(I,{children:[r(H,{asChild:!0,children:v}),r(k,{side:"right",align:"center",hidden:b!=="collapsed"||u,...d})]})):v});le.displayName="SidebarMenuButton";var ce=o.forwardRef(({className:a,asChild:e=!1,showOnHover:t=!1,...i},d)=>r(e?g:"button",{ref:d,"data-sidebar":"menu-action",className:n("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",a),...i}));ce.displayName="SidebarMenuAction";var be=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"menu-badge",className:n("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...e}));be.displayName="SidebarMenuBadge";var pe=o.forwardRef(({className:a,showIcon:e=!1,...t},i)=>{let d=o.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return S("div",{ref:i,"data-sidebar":"menu-skeleton",className:n("rounded-md h-8 flex gap-2 px-2 items-center",a),...t,children:[e&&r(C,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r(C,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":d}})]})});pe.displayName="SidebarMenuSkeleton";var ue=o.forwardRef(({className:a,...e},t)=>r("ul",{ref:t,"data-sidebar":"menu-sub",className:n("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...e}));ue.displayName="SidebarMenuSub";var fe=o.forwardRef(({...a},e)=>r("li",{ref:e,...a}));fe.displayName="SidebarMenuSubItem";var me=o.forwardRef(({asChild:a=!1,size:e="md",isActive:t,className:i,...d},s)=>r(a?g:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":e,"data-active":t,className:n("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...d}));me.displayName="SidebarMenuSubButton";export{w as a,j as b,q as c,F as d,X as e,Y as f,J as g,Q as h,Z as i,ee as j,ae as k,te as l,oe as m,re as n,ne as o,ie as p,de as q,le as r,ce as s,be as t,pe as u,ue as v,fe as w,me as x};
4
+ import{a as C}from"./chunk-7GSXNSLD.mjs";import{a as N}from"./chunk-4UIARERB.mjs";import{a as E,f as T}from"./chunk-D4IMQTVU.mjs";import{a as M}from"./chunk-L5JPAKPM.mjs";import{a as L,b as I,c as H,d as k}from"./chunk-KY7WQYN4.mjs";import{b as _}from"./chunk-ZUA4KNIR.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{a as P}from"./chunk-FRWX5YES.mjs";import*as o from"react";import{Slot as g}from"@radix-ui/react-slot";import{cva as A}from"class-variance-authority";import{PanelLeft as O}from"lucide-react";import{jsx as r,jsxs as S}from"react/jsx-runtime";var G="sidebar:state",K=60*60*24*7,V="16rem",$="18rem",U="3rem",W="b",B=o.createContext(null);function w(){let a=o.useContext(B);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}var j=o.forwardRef(({defaultOpen:a=!0,open:e,onOpenChange:t,className:i,style:d,children:s,...p},m)=>{let c=P(),[u,b]=o.useState(!1),[v,D]=o.useState(a),f=e??v,h=o.useCallback(l=>{if(t)return t?.(typeof l=="function"?l(f):l);D(l),document.cookie=`${G}=${f}; path=/; max-age=${K}`},[t,f]),x=o.useCallback(()=>c?b(l=>!l):h(l=>!l),[c,h,b]);o.useEffect(()=>{let l=R=>{R.key===W&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),x())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[x]);let y=f?"expanded":"collapsed",z=o.useMemo(()=>({state:y,open:f,setOpen:h,isMobile:c,openMobile:u,setOpenMobile:b,toggleSidebar:x}),[y,f,h,c,u,b,x]);return r(B.Provider,{value:z,children:r(L,{delayDuration:0,children:r("div",{style:{"--sidebar-width":V,"--sidebar-width-icon":U,...d},className:n("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:m,...p,children:s})})})});j.displayName="SidebarProvider";var q=o.forwardRef(({side:a="left",variant:e="sidebar",collapsible:t="offcanvas",className:i,children:d,...s},p)=>{let{isMobile:m,state:c,openMobile:u,setOpenMobile:b}=w();return t==="none"?r("div",{className:n("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:p,...s,children:d}):m?r(E,{open:u,onOpenChange:b,...s,children:r(T,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":$},side:a,children:r("div",{className:"flex h-full w-full flex-col",children:d})})}):S("div",{ref:p,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?t:"","data-variant":e,"data-side":a,children:[r("div",{className:n("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r("div",{className:n("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:r("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:d})})]})});q.displayName="Sidebar";var F=o.forwardRef(({className:a,onClick:e,...t},i)=>{let{toggleSidebar:d}=w();return S(_,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("h-7 w-7",a),onClick:s=>{e?.(s),d()},...t,children:[r(O,{}),r("span",{className:"sr-only",children:"Toggle Sidebar"})]})});F.displayName="SidebarTrigger";var X=o.forwardRef(({className:a,...e},t)=>{let{toggleSidebar:i}=w();return r("button",{ref:t,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:n("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...e})});X.displayName="SidebarRail";var Y=o.forwardRef(({className:a,...e},t)=>r("main",{ref:t,className:n("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...e}));Y.displayName="SidebarInset";var J=o.forwardRef(({className:a,...e},t)=>r(M,{ref:t,"data-sidebar":"input",className:n("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",a),...e}));J.displayName="SidebarInput";var Q=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"header",className:n("flex flex-col gap-2 p-2",a),...e}));Q.displayName="SidebarHeader";var Z=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",a),...e}));Z.displayName="SidebarFooter";var ee=o.forwardRef(({className:a,...e},t)=>r(N,{ref:t,"data-sidebar":"separator",className:n("mx-2 w-auto bg-sidebar-border",a),...e}));ee.displayName="SidebarSeparator";var ae=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"content",className:n("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",a),...e}));ae.displayName="SidebarContent";var te=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col p-2",a),...e}));te.displayName="SidebarGroup";var oe=o.forwardRef(({className:a,asChild:e=!1,...t},i)=>r(e?g:"div",{ref:i,"data-sidebar":"group-label",className:n("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...t}));oe.displayName="SidebarGroupLabel";var re=o.forwardRef(({className:a,asChild:e=!1,...t},i)=>r(e?g:"button",{ref:i,"data-sidebar":"group-action",className:n("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...t}));re.displayName="SidebarGroupAction";var ne=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"group-content",className:n("w-full text-sm",a),...e}));ne.displayName="SidebarGroupContent";var ie=o.forwardRef(({className:a,...e},t)=>r("ul",{ref:t,"data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",a),...e}));ie.displayName="SidebarMenu";var de=o.forwardRef(({className:a,...e},t)=>r("li",{ref:t,"data-sidebar":"menu-item",className:n("group/menu-item relative",a),...e}));de.displayName="SidebarMenuItem";var se=A("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),le=o.forwardRef(({asChild:a=!1,isActive:e=!1,variant:t="default",size:i="default",tooltip:d,className:s,...p},m)=>{let c=a?g:"button",{isMobile:u,state:b}=w(),v=r(c,{ref:m,"data-sidebar":"menu-button","data-size":i,"data-active":e,className:n(se({variant:t,size:i}),s),...p});return d?(typeof d=="string"&&(d={children:d}),S(I,{children:[r(H,{asChild:!0,children:v}),r(k,{side:"right",align:"center",hidden:b!=="collapsed"||u,...d})]})):v});le.displayName="SidebarMenuButton";var ce=o.forwardRef(({className:a,asChild:e=!1,showOnHover:t=!1,...i},d)=>r(e?g:"button",{ref:d,"data-sidebar":"menu-action",className:n("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",a),...i}));ce.displayName="SidebarMenuAction";var be=o.forwardRef(({className:a,...e},t)=>r("div",{ref:t,"data-sidebar":"menu-badge",className:n("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...e}));be.displayName="SidebarMenuBadge";var pe=o.forwardRef(({className:a,showIcon:e=!1,...t},i)=>{let d=o.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return S("div",{ref:i,"data-sidebar":"menu-skeleton",className:n("rounded-md h-8 flex gap-2 px-2 items-center",a),...t,children:[e&&r(C,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r(C,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":d}})]})});pe.displayName="SidebarMenuSkeleton";var ue=o.forwardRef(({className:a,...e},t)=>r("ul",{ref:t,"data-sidebar":"menu-sub",className:n("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...e}));ue.displayName="SidebarMenuSub";var fe=o.forwardRef(({...a},e)=>r("li",{ref:e,...a}));fe.displayName="SidebarMenuSubItem";var me=o.forwardRef(({asChild:a=!1,size:e="md",isActive:t,className:i,...d},s)=>r(a?g:"a",{ref:s,"data-sidebar":"menu-sub-button","data-size":e,"data-active":t,className:n("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...d}));me.displayName="SidebarMenuSubButton";export{w as a,j as b,q as c,F as d,X as e,Y as f,J as g,Q as h,Z as i,ee as j,ae as k,te as l,oe as m,re as n,ne as o,ie as p,de as q,le as r,ce as s,be as t,pe as u,ue as v,fe as w,me as x};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{b as r}from"./chunk-ZUA4KNIR.mjs";import{a as g}from"./chunk-QTW33JYG.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{useState as b}from"react";import{ChevronLeft as x,ChevronRight as N}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";function I({currentDate:a,setCurrentDate:d,holidays:p}){let[i,w]=b(null),v=(new Date(a.getFullYear(),a.getMonth(),1).getDay()+6)%7,m=Array.from({length:42},(e,o)=>{let l=new Date(a.getFullYear(),a.getMonth(),o-v+1,a.getHours()),y=p.filter(c=>g.toUtcMidnight(new Date(c.startDate))<=l&&g.toUtcEndOfDay(new Date(c.endDate))>=l);return{date:l,isCurrentMonth:l.getMonth()===a.getMonth(),isToday:l.toDateString()===new Date().toDateString(),holidays:y}}),h=()=>{d(new Date(a.getFullYear(),a.getMonth()-1,1))},f=()=>{d(new Date(a.getFullYear(),a.getMonth()+1,1))},u=()=>{d(new Date)};return s("div",{className:"lg:flex lg:h-full lg:flex-col",children:[s("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[t("h1",{className:"text-base font-semibold text-foreground",children:t("time",{dateTime:a.toISOString(),children:a.toLocaleString("default",{month:"long",year:"numeric"})})}),t("div",{className:"flex items-center",children:s("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[s(r,{onClick:h,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[t("span",{className:"sr-only",children:"Previous month"}),t(x,{className:"h-5 w-5","aria-hidden":"true"})]}),t(r,{variant:"outline",onClick:u,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),s(r,{onClick:f,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[t("span",{className:"sr-only",children:"Next month"}),t(N,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),s("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[s("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:[s("div",{className:"bg-white py-2",children:["M",t("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),s("div",{className:"bg-white py-2",children:["T",t("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),s("div",{className:"bg-white py-2",children:["W",t("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),s("div",{className:"bg-white py-2",children:["T",t("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),s("div",{className:"bg-white py-2",children:["F",t("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),s("div",{className:"bg-white py-2",children:["S",t("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),s("div",{className:"bg-white py-2",children:["S",t("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),s("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[t("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:m.map(e=>s("div",{className:n(e.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[t("time",{dateTime:e.date.toISOString(),className:n("flex h-6 w-6 items-center justify-center rounded-full",e.isToday&&"bg-indigo-600 font-semibold text-white"),children:e.date.getDate()}),e.holidays.length>0&&t("ol",{className:"mt-2 space-y-1 overflow-visible",children:e.holidays.map(o=>t("li",{className:"overflow-visible",children:t("div",{className:`text-xs px-1 py-0.5 rounded ${o.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:o.userName})},o.id))})]},e.date.toISOString()))}),t("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:m.map(e=>s("button",{type:"button",className:n(e.isCurrentMonth?"bg-white":"bg-gray-50",(e.date===i||e.isToday)&&"font-semibold",e.date===i&&"text-white",!e.date&&e.isToday&&"text-indigo-600",e.date!==i&&e.isCurrentMonth&&!e.isToday&&"text-gray-900",e.date!==i&&!e.isCurrentMonth&&!e.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[t("time",{dateTime:e.date.toISOString(),className:n("ml-auto",e.date===i&&e.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",e.date===i&&!e.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:e.date.getDate()}),s("span",{className:"sr-only",children:[e.holidays.length," holidays"]}),e.holidays.length>0&&t("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:e.holidays.map(o=>t("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${o.status==="approved"?"bg-green-500":"bg-gray-500"}`},o.id))})]},e.date.toISOString()))})]})]})]})}export{I as a};
4
+ import{b as r}from"./chunk-ZUA4KNIR.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{a as g}from"./chunk-QTW33JYG.mjs";import{useState as b}from"react";import{ChevronLeft as x,ChevronRight as N}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";function I({currentDate:a,setCurrentDate:d,holidays:p}){let[i,w]=b(null),v=(new Date(a.getFullYear(),a.getMonth(),1).getDay()+6)%7,m=Array.from({length:42},(e,o)=>{let l=new Date(a.getFullYear(),a.getMonth(),o-v+1,a.getHours()),y=p.filter(c=>g.toUtcMidnight(new Date(c.startDate))<=l&&g.toUtcEndOfDay(new Date(c.endDate))>=l);return{date:l,isCurrentMonth:l.getMonth()===a.getMonth(),isToday:l.toDateString()===new Date().toDateString(),holidays:y}}),h=()=>{d(new Date(a.getFullYear(),a.getMonth()-1,1))},f=()=>{d(new Date(a.getFullYear(),a.getMonth()+1,1))},u=()=>{d(new Date)};return s("div",{className:"lg:flex lg:h-full lg:flex-col",children:[s("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[t("h1",{className:"text-base font-semibold text-foreground",children:t("time",{dateTime:a.toISOString(),children:a.toLocaleString("default",{month:"long",year:"numeric"})})}),t("div",{className:"flex items-center",children:s("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[s(r,{onClick:h,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[t("span",{className:"sr-only",children:"Previous month"}),t(x,{className:"h-5 w-5","aria-hidden":"true"})]}),t(r,{variant:"outline",onClick:u,className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),s(r,{onClick:f,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[t("span",{className:"sr-only",children:"Next month"}),t(N,{className:"h-5 w-5","aria-hidden":"true"})]})]})})]}),s("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[s("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:[s("div",{className:"bg-white py-2",children:["M",t("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),s("div",{className:"bg-white py-2",children:["T",t("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),s("div",{className:"bg-white py-2",children:["W",t("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),s("div",{className:"bg-white py-2",children:["T",t("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),s("div",{className:"bg-white py-2",children:["F",t("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),s("div",{className:"bg-white py-2",children:["S",t("span",{className:"sr-only sm:not-sr-only",children:"at"})]}),s("div",{className:"bg-white py-2",children:["S",t("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),s("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto overflow-visible",children:[t("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px overflow-visible",children:m.map(e=>s("div",{className:n(e.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2 overflow-visible"),children:[t("time",{dateTime:e.date.toISOString(),className:n("flex h-6 w-6 items-center justify-center rounded-full",e.isToday&&"bg-indigo-600 font-semibold text-white"),children:e.date.getDate()}),e.holidays.length>0&&t("ol",{className:"mt-2 space-y-1 overflow-visible",children:e.holidays.map(o=>t("li",{className:"overflow-visible",children:t("div",{className:`text-xs px-1 py-0.5 rounded ${o.status==="approved"?"border-green-500":"border-gray-500"} border overflow-visible`,children:o.userName})},o.id))})]},e.date.toISOString()))}),t("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:m.map(e=>s("button",{type:"button",className:n(e.isCurrentMonth?"bg-white":"bg-gray-50",(e.date===i||e.isToday)&&"font-semibold",e.date===i&&"text-white",!e.date&&e.isToday&&"text-indigo-600",e.date!==i&&e.isCurrentMonth&&!e.isToday&&"text-gray-900",e.date!==i&&!e.isCurrentMonth&&!e.isToday&&"text-gray-500","flex h-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[t("time",{dateTime:e.date.toISOString(),className:n("ml-auto",e.date===i&&e.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-indigo-600",e.date===i&&!e.isToday&&"flex h-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:e.date.getDate()}),s("span",{className:"sr-only",children:[e.holidays.length," holidays"]}),e.holidays.length>0&&t("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:e.holidays.map(o=>t("span",{className:`mx-0.5 mb-1 h-1.5 w-1.5 rounded-full ${o.status==="approved"?"bg-green-500":"bg-gray-500"}`},o.id))})]},e.date.toISOString()))})]})]})]})}export{I as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{f as l}from"./chunk-2BRDNDUB.mjs";import{a as r}from"./chunk-2QZUKVBA.mjs";import{a as s}from"./chunk-2BR55L74.mjs";import h from"next/image";import{jsx as e,jsxs as t}from"react/jsx-runtime";var x=({links:o,media:i,children:m,richText:a})=>e("div",{children:t("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[t("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[m||a&&e(l,{className:"max-w-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:a,enableGutter:!0}),Array.isArray(o)&&o.length>0&&e("ul",{className:"flex justify-center gap-4",children:o.map(({link:n},d)=>e("li",{children:e(r,{...n})},d))})]}),t("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[i&&typeof i=="object"&&e(s,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:i}),i&&typeof i=="string"&&e("div",{children:e(h,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:i})}),e("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),e(p,{})]})}),p=()=>e("div",{className:"w-full h-[1240px] z-10",children:t("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:[e("defs",{children:t("mask",{id:"mask",children:[e("rect",{width:"1920",height:"332",fill:"white"}),e("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),e("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),e("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});export{x as a};
4
+ import{f as l}from"./chunk-4ITG3T35.mjs";import{a as r}from"./chunk-2QZUKVBA.mjs";import{a as s}from"./chunk-2BR55L74.mjs";import h from"next/image";import{jsx as e,jsxs as t}from"react/jsx-runtime";var x=({links:o,media:i,children:m,richText:a})=>e("div",{children:t("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[t("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[m||a&&e(l,{className:"max-w-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:a,enableGutter:!0}),Array.isArray(o)&&o.length>0&&e("ul",{className:"flex justify-center gap-4",children:o.map(({link:n},d)=>e("li",{children:e(r,{...n})},d))})]}),t("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[i&&typeof i=="object"&&e(s,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:i}),i&&typeof i=="string"&&e("div",{children:e(h,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:i})}),e("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),e(p,{})]})}),p=()=>e("div",{className:"w-full h-[1240px] z-10",children:t("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:[e("defs",{children:t("mask",{id:"mask",children:[e("rect",{width:"1920",height:"332",fill:"white"}),e("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),e("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),e("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});export{x as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a}from"./chunk-6YHCNPFB.mjs";import{a as b}from"./chunk-F6DMXMR4.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as i,jsxs as h}from"react/jsx-runtime";var v=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:i(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:U,title:C="Digital Colleagues",notifications:N=[],currentBusinessUnit:B=v[0],onBusinessUnitChange:y,onSearch:c,businessUnits:F=v,activeTab:x,onTabChange:T,showTabs:k=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:w,onRemoveAll:M,logo:n="/headerlogo.png",logoLink:d="/teams",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:O=!1}){let[e,I]=l(!O),[m,t]=l(!1),[u,L]=l(B),p=f=>{L(f),y?.(f)};return h("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[m&&i("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),i("div",{className:"md:hidden",children:i(a,{items:r,isOpen:m,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),i("div",{className:"hidden md:block",children:i(a,{items:r,isOpen:e,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),h("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",e?"md:pl-64":"md:pl-0"),children:[i(b,{title:C,notifications:N,onToggleSidebar:()=>I(!e),onToggleMobileMenu:()=>t(!0),sidebarOpen:e,activeTab:x,onTabChange:T,showTabs:k,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:w,onRemoveAll:M,logo:n,appName:o,tagline:s}),i("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-y-scroll",children:U})]})]})}export{E as a};
4
+ import{a as b}from"./chunk-CXHPLJDO.mjs";import{a}from"./chunk-6YHCNPFB.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as i,jsxs as h}from"react/jsx-runtime";var v=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:i(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:U,title:C="Digital Colleagues",notifications:N=[],currentBusinessUnit:B=v[0],onBusinessUnitChange:y,onSearch:c,businessUnits:F=v,activeTab:x,onTabChange:T,showTabs:k=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:w,onRemoveAll:M,logo:n="/headerlogo.png",logoLink:d="/teams",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:O=!1}){let[e,I]=l(!O),[m,t]=l(!1),[u,L]=l(B),p=f=>{L(f),y?.(f)};return h("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[m&&i("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),i("div",{className:"md:hidden",children:i(a,{items:r,isOpen:m,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),i("div",{className:"hidden md:block",children:i(a,{items:r,isOpen:e,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),h("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",e?"md:pl-64":"md:pl-0"),children:[i(b,{title:C,notifications:N,onToggleSidebar:()=>I(!e),onToggleMobileMenu:()=>t(!0),sidebarOpen:e,activeTab:x,onTabChange:T,showTabs:k,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:w,onRemoveAll:M,logo:n,appName:o,tagline:s}),i("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-y-scroll",children:U})]})]})}export{E as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as g}from"./chunk-TZKQXT7Y.mjs";import{a as b}from"./chunk-X2JWNPWT.mjs";import{a as y}from"./chunk-XGGWZIPM.mjs";import{a as f}from"./chunk-IXLFVFIK.mjs";import{a as v}from"./chunk-QTW33JYG.mjs";import{useState as q}from"react";import{ChevronDown as P}from"lucide-react";import{CalendarDays as R,Grid as k,PlusCircle as A,CheckSquare as V}from"lucide-react";import{useRouter as M}from"next/navigation";import{format as S,parseISO as T}from"date-fns";import{jsx as r,jsxs as s}from"react/jsx-runtime";function h(...t){return t.filter(Boolean).join(" ")}function K({holidays:t,currentUser:o,currentDate:w,leaveApprovals:x,employees:L,submitLeaveRequest:n,approveLeave:i,rejectLeave:m}){let[a,c]=q("Calendar View"),C=M(),D=!1,d=v.toUtcMidnight(T(w)),l=async e=>{let N=S(e,"dd-MM-yyyy"),p=new URL(window.location.href);return p.searchParams.set("date",N),C.push(p.toString()),{success:!0}};if(D)return r("div",{className:"flex justify-center items-center h-screen",children:r("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let u=[{name:"Grid View",icon:k,current:a==="Grid View"},{name:"Calendar View",icon:R,current:a==="Calendar View"},{name:"Request Leave",icon:A,current:a==="Request Leave"},{name:"Approve Leave",icon:V,current:a==="Approve Leave"}];return s("div",{className:"container mx-auto p-4 h-full",children:[s("div",{className:"mb-8",children:[s("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>c(e.target.value),className:"block w-full rounded-md 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:u.map(e=>r("option",{children:e.name},e.name))}),r(P,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),r("div",{className:"hidden sm:block",children:r("div",{className:"border-b border-gray-200",children:r("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:u.map(e=>s("a",{onClick:()=>{(e.name!=="Approve Leave"||o.grade==="Manager"||o.grade==="Senior Manager"||o.grade==="Partner")&&c(e.name)},className:h(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&o.grade!=="Manager"&&o.grade!=="Senior Manager"&&o.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":e.current?"page":void 0,children:[r(e.icon,{className:h(e.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),r("span",{children:e.name})]},e.name))})})})]}),a==="Grid View"&&r(y,{currentDate:d,setCurrentDate:l,holidays:t,employees:L}),a==="Calendar View"&&r(b,{currentDate:d,setCurrentDate:l,holidays:t}),a==="Request Leave"&&r(f,{remainingDays:o.remainingLeaveDays,submitLeaveRequest:e=>n?n(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(g,{leaveRequests:x,onApprove:e=>i?i(e):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:e=>m?m(e):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}export{K as a};
4
+ import{a as y}from"./chunk-XGGWZIPM.mjs";import{a as f}from"./chunk-IXLFVFIK.mjs";import{a as g}from"./chunk-TZKQXT7Y.mjs";import{a as b}from"./chunk-O5QXPC23.mjs";import{a as v}from"./chunk-QTW33JYG.mjs";import{useState as q}from"react";import{ChevronDown as P}from"lucide-react";import{CalendarDays as R,Grid as k,PlusCircle as A,CheckSquare as V}from"lucide-react";import{useRouter as M}from"next/navigation";import{format as S,parseISO as T}from"date-fns";import{jsx as r,jsxs as s}from"react/jsx-runtime";function h(...t){return t.filter(Boolean).join(" ")}function K({holidays:t,currentUser:o,currentDate:w,leaveApprovals:x,employees:L,submitLeaveRequest:n,approveLeave:i,rejectLeave:m}){let[a,c]=q("Calendar View"),C=M(),D=!1,d=v.toUtcMidnight(T(w)),l=async e=>{let N=S(e,"dd-MM-yyyy"),p=new URL(window.location.href);return p.searchParams.set("date",N),C.push(p.toString()),{success:!0}};if(D)return r("div",{className:"flex justify-center items-center h-screen",children:r("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let u=[{name:"Grid View",icon:k,current:a==="Grid View"},{name:"Calendar View",icon:R,current:a==="Calendar View"},{name:"Request Leave",icon:A,current:a==="Request Leave"},{name:"Approve Leave",icon:V,current:a==="Approve Leave"}];return s("div",{className:"container mx-auto p-4 h-full",children:[s("div",{className:"mb-8",children:[s("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>c(e.target.value),className:"block w-full rounded-md 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:u.map(e=>r("option",{children:e.name},e.name))}),r(P,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),r("div",{className:"hidden sm:block",children:r("div",{className:"border-b border-gray-200",children:r("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:u.map(e=>s("a",{onClick:()=>{(e.name!=="Approve Leave"||o.grade==="Manager"||o.grade==="Senior Manager"||o.grade==="Partner")&&c(e.name)},className:h(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&o.grade!=="Manager"&&o.grade!=="Senior Manager"&&o.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":e.current?"page":void 0,children:[r(e.icon,{className:h(e.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),r("span",{children:e.name})]},e.name))})})})]}),a==="Grid View"&&r(y,{currentDate:d,setCurrentDate:l,holidays:t,employees:L}),a==="Calendar View"&&r(b,{currentDate:d,setCurrentDate:l,holidays:t}),a==="Request Leave"&&r(f,{remainingDays:o.remainingLeaveDays,submitLeaveRequest:e=>n?n(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(g,{leaveRequests:x,onApprove:e=>i?i(e):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:e=>m?m(e):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}export{K as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as b}from"./chunk-JYL3XIJX.mjs";import{a as p}from"./chunk-4CU7D3X2.mjs";import{b as C}from"./chunk-ZUA4KNIR.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import{Formik as h}from"formik";import{FaUser as N}from"react-icons/fa6";import*as m from"yup";import{toast as v}from"sonner";import{jsx as a,jsxs as l}from"react/jsx-runtime";var s={tooShort:"Must be at least ${min} characters",tooLong:"Must be at most ${max} characters",required:"This field is required",email:"Invalid email format"},y=m.object().shape({name:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),email:m.string().email(s.email).required(s.required),subject:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),message:m.string().min(2,s.tooShort).max(300,s.tooLong).required(s.required)}),u=i("!pr-[44px] text-foreground"),g=i("!border-red-600 border"),d=i("sr-only");function k({onSubmit:f}={}){return a(h,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:y,onSubmit:async(e,{resetForm:o})=>{if(!f){v.error("Form submission not configured");return}let t=await f(e);t.data===null?v.error(t.message):(v.success(t.message),o())},children:({errors:e,touched:o,values:t,handleChange:n,handleBlur:c,isSubmitting:r,handleSubmit:x})=>l("form",{onSubmit:x,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[l("div",{children:[a(p,{placeholder:"Your Name",type:"text",name:"name",value:t.name,onChange:n,onBlur:c,disabled:r,icon:a(N,{className:"text-primary"}),className:i(u,e.name&&o.name&&g)}),e.name&&o.name&&a("p",{title:e.name,"aria-live":"polite",role:"error message",className:d,children:e.name})]}),l("div",{children:[a(p,{placeholder:"Your Email",type:"email",name:"email",value:t.email,onChange:n,onBlur:c,disabled:r,icon:a(L,{}),className:i(u,e.email&&o.email&&g)}),e.email&&o.email&&a("p",{title:e.email,"aria-live":"polite",role:"error message",className:d,children:e.email})]}),l("div",{className:"lg:col-span-2",children:[a(p,{placeholder:"Subject",type:"text",name:"subject",value:t.subject,onChange:n,onBlur:c,disabled:r,className:i(u,e.subject&&o.subject&&g)}),e.subject&&o.subject&&a("p",{title:e.subject,"aria-live":"polite",role:"error message",className:d,children:e.subject})]}),l("div",{className:"lg:col-span-2",children:[a(b,{placeholder:"Message...",name:"message",value:t.message,onChange:n,onBlur:c,disabled:r,icon:a(S,{}),className:i(u,e.message&&o.message&&g)}),e.message&&o.message&&a("p",{title:e.message,"aria-live":"polite",role:"error message",className:d,children:e.message})]}),a("div",{className:"lg:col-span-2 light grid justify-items-center",children:a(C,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:r,children:"Send"})})]})})}function L(){return a("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:a("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function S(){return a("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:a("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}export{k as a};
4
+ import{a as p}from"./chunk-4CU7D3X2.mjs";import{a as b}from"./chunk-JYL3XIJX.mjs";import{b as C}from"./chunk-ZUA4KNIR.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import{Formik as h}from"formik";import{FaUser as N}from"react-icons/fa6";import*as m from"yup";import{toast as v}from"sonner";import{jsx as a,jsxs as l}from"react/jsx-runtime";var s={tooShort:"Must be at least ${min} characters",tooLong:"Must be at most ${max} characters",required:"This field is required",email:"Invalid email format"},y=m.object().shape({name:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),email:m.string().email(s.email).required(s.required),subject:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),message:m.string().min(2,s.tooShort).max(300,s.tooLong).required(s.required)}),u=i("!pr-[44px] text-foreground"),g=i("!border-red-600 border"),d=i("sr-only");function k({onSubmit:f}={}){return a(h,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:y,onSubmit:async(e,{resetForm:o})=>{if(!f){v.error("Form submission not configured");return}let t=await f(e);t.data===null?v.error(t.message):(v.success(t.message),o())},children:({errors:e,touched:o,values:t,handleChange:n,handleBlur:c,isSubmitting:r,handleSubmit:x})=>l("form",{onSubmit:x,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[l("div",{children:[a(p,{placeholder:"Your Name",type:"text",name:"name",value:t.name,onChange:n,onBlur:c,disabled:r,icon:a(N,{className:"text-primary"}),className:i(u,e.name&&o.name&&g)}),e.name&&o.name&&a("p",{title:e.name,"aria-live":"polite",role:"error message",className:d,children:e.name})]}),l("div",{children:[a(p,{placeholder:"Your Email",type:"email",name:"email",value:t.email,onChange:n,onBlur:c,disabled:r,icon:a(L,{}),className:i(u,e.email&&o.email&&g)}),e.email&&o.email&&a("p",{title:e.email,"aria-live":"polite",role:"error message",className:d,children:e.email})]}),l("div",{className:"lg:col-span-2",children:[a(p,{placeholder:"Subject",type:"text",name:"subject",value:t.subject,onChange:n,onBlur:c,disabled:r,className:i(u,e.subject&&o.subject&&g)}),e.subject&&o.subject&&a("p",{title:e.subject,"aria-live":"polite",role:"error message",className:d,children:e.subject})]}),l("div",{className:"lg:col-span-2",children:[a(b,{placeholder:"Message...",name:"message",value:t.message,onChange:n,onBlur:c,disabled:r,icon:a(S,{}),className:i(u,e.message&&o.message&&g)}),e.message&&o.message&&a("p",{title:e.message,"aria-live":"polite",role:"error message",className:d,children:e.message})]}),a("div",{className:"lg:col-span-2 light grid justify-items-center",children:a(C,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:r,children:"Send"})})]})})}function L(){return a("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:a("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function S(){return a("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:a("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}export{k as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as m}from"./chunk-LLED3RQS.mjs";import{a as i}from"./chunk-V6GC3UGV.mjs";import{useState as f,useCallback as R}from"react";import{DragDropContext as P}from"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration";import{jsx as r,jsxs as M}from"react/jsx-runtime";var w=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function h({initialData:s,addNewDeal:v,updateDeal:l,addComment:p,addNewCustomer:N}){let[a,u]=f(null),C=e=>(s.deals??[]).filter(t=>t.status===e),D=e=>e.reduce((t,o)=>t+(o.value||0),0),g=(e,t)=>{let o={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return e.reduce((c,d)=>c+(d.value||0)*o[t],0)},b=R(e=>{let{source:t,destination:o}=e;if(!o||t.droppableId===o.droppableId&&t.index===o.index)return;let c=t.droppableId,d=o.droppableId,n=s.deals?.filter(S=>S.id===t.index)[0],x=[...s.deals??[]];n&&(n.status=d,l(n))},[l]);return r(P,{onDragEnd:b,children:M("div",{className:"p-4 h-full overflow-auto",children:[r("div",{className:"flex space-x-4 pb-4",children:w.filter(e=>e!=="Lost").map(e=>{let t=C(e);return r(i,{status:e,deals:t,customers:s.customers??[],users:s.users,categories:s.categories??[],onDealClick:u,calculateColumnValue:D,calculateWeightedValue:g},e)})}),a&&r(m,{deal:a,users:s.users,customer:a.customer,categories:s.categories??[],onClose:()=>u(null),onSave:l,onAddComment:e=>p(a.id.toString(),e)})]})})}export{h as a};
4
+ import{a as m}from"./chunk-YPQUYIGO.mjs";import{a as i}from"./chunk-V6GC3UGV.mjs";import{useState as f,useCallback as R}from"react";import{DragDropContext as P}from"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration";import{jsx as r,jsxs as M}from"react/jsx-runtime";var w=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function h({initialData:s,addNewDeal:v,updateDeal:l,addComment:p,addNewCustomer:N}){let[a,u]=f(null),C=e=>(s.deals??[]).filter(t=>t.status===e),D=e=>e.reduce((t,o)=>t+(o.value||0),0),g=(e,t)=>{let o={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return e.reduce((c,d)=>c+(d.value||0)*o[t],0)},b=R(e=>{let{source:t,destination:o}=e;if(!o||t.droppableId===o.droppableId&&t.index===o.index)return;let c=t.droppableId,d=o.droppableId,n=s.deals?.filter(S=>S.id===t.index)[0],x=[...s.deals??[]];n&&(n.status=d,l(n))},[l]);return r(P,{onDragEnd:b,children:M("div",{className:"p-4 h-full overflow-auto",children:[r("div",{className:"flex space-x-4 pb-4",children:w.filter(e=>e!=="Lost").map(e=>{let t=C(e);return r(i,{status:e,deals:t,customers:s.customers??[],users:s.users,categories:s.categories??[],onDealClick:u,calculateColumnValue:D,calculateWeightedValue:g},e)})}),a&&r(m,{deal:a,users:s.users,customer:a.customer,categories:s.categories??[],onClose:()=>u(null),onSave:l,onAddComment:e=>p(a.id.toString(),e)})]})})}export{h as a};
@@ -1 +1 @@
1
- import{a as i,b as n,c as p}from"./chunk-SOLZ4VQH.mjs";import{a as t}from"./chunk-MDJREBVI.mjs";import{cva as g}from"class-variance-authority";import{jsx as a,jsxs as m}from"react/jsx-runtime";var c=({className:s,from:e,...r})=>a("div",{className:t("group flex w-full items-end justify-end gap-2 py-4",e==="user"?"is-user":"is-assistant flex-row-reverse justify-end",s),...r}),u=g("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),v=({children:s,className:e,variant:r,...o})=>a("div",{className:t(u({variant:r,className:e})),...o,children:s}),x=({src:s,name:e,className:r,...o})=>m(i,{className:t("size-8 ring-1 ring-border",r),...o,children:[a(n,{alt:"",className:"mt-0 mb-0",src:s}),a(p,{children:e?.slice(0,2)||"ME"})]});export{c as a,v as b,x as c};
1
+ import{a as i,b as n,c as p}from"./chunk-SOLZ4VQH.mjs";import{a as t}from"./chunk-MDJREBVI.mjs";import{cva as g}from"class-variance-authority";import{jsx as a,jsxs as m}from"react/jsx-runtime";var c=({className:s,from:e,...r})=>a("div",{className:t("group flex w-full items-end justify-end gap-2 py-4",e==="user"?"is-user":"is-assistant flex-row-reverse justify-end",s),...r}),u=g("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-card group-[.is-assistant]:text-card-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),v=({children:s,className:e,variant:r,...o})=>a("div",{className:t(u({variant:r,className:e})),...o,children:s}),x=({src:s,name:e,className:r,...o})=>m(i,{className:t("size-8 ring-1 ring-border",r),...o,children:[a(n,{alt:"",className:"mt-0 mb-0",src:s}),a(p,{children:e?.slice(0,2)||"ME"})]});export{c as a,v as b,x as c};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a}from"./chunk-6YHCNPFB.mjs";import{a as f}from"./chunk-F6DMXMR4.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as e,jsxs as v}from"react/jsx-runtime";var b=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:e(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:k,onRemoveAll:w,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[i,O]=l(!M),[d,t]=l(!1),[u,I]=l(N),m=p=>{I(p),B?.(p)};return v("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&e("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),e("div",{className:"md:hidden",children:e(a,{items:r,isOpen:d,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),e("div",{className:"hidden md:block",children:e(a,{items:r,isOpen:i,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),v("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:k,onRemoveAll:w,logo:n,appName:o,tagline:s}),e("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:h})]})]})}export{E as a};
4
+ import{a as f}from"./chunk-CXHPLJDO.mjs";import{a}from"./chunk-6YHCNPFB.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as e,jsxs as v}from"react/jsx-runtime";var b=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:e(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:k,onRemoveAll:w,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[i,O]=l(!M),[d,t]=l(!1),[u,I]=l(N),m=p=>{I(p),B?.(p)};return v("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&e("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),e("div",{className:"md:hidden",children:e(a,{items:r,isOpen:d,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),e("div",{className:"hidden md:block",children:e(a,{items:r,isOpen:i,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),v("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:k,onRemoveAll:w,logo:n,appName:o,tagline:s}),e("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:h})]})]})}export{E as a};