cortex-react-components 2.28.0 → 2.28.1

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 (359) hide show
  1. package/dist/chunk-2TUBS2HM.mjs +4 -0
  2. package/dist/{chunk-JDIPWJBD.mjs → chunk-46N4YPMB.mjs} +1 -1
  3. package/dist/{chunk-27XIU7FW.mjs → chunk-4LUF5GZ6.mjs} +1 -1
  4. package/dist/{chunk-SADWUWLZ.mjs → chunk-5EKGFFJD.mjs} +1 -1
  5. package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
  6. package/dist/{chunk-VDFRWGXR.mjs → chunk-6PS55VJZ.mjs} +1 -1
  7. package/dist/{chunk-YI6EQRWN.mjs → chunk-6ZMZX5TB.mjs} +1 -1
  8. package/dist/{chunk-DTKZ3I6Z.mjs → chunk-7BYNW77I.mjs} +1 -1
  9. package/dist/{chunk-XSCZQEYP.mjs → chunk-7DDFZ2M3.mjs} +1 -1
  10. package/dist/{chunk-MX6GXHJJ.mjs → chunk-7MPZOMXK.mjs} +1 -1
  11. package/dist/{chunk-LKUK55GC.mjs → chunk-AABB4TFO.mjs} +1 -1
  12. package/dist/{chunk-D76LTQRD.mjs → chunk-ALEPCEWP.mjs} +1 -1
  13. package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  14. package/dist/{chunk-YVXFRQPA.mjs → chunk-ATPB5HSG.mjs} +1 -1
  15. package/dist/{chunk-SZXMQMZ6.mjs → chunk-BDDEMCAH.mjs} +1 -1
  16. package/dist/{chunk-ORODSHZN.mjs → chunk-CC57QZMB.mjs} +1 -1
  17. package/dist/{chunk-D44OXIPN.mjs → chunk-CDVRH3MC.mjs} +1 -1
  18. package/dist/{chunk-OQBCIB4L.mjs → chunk-CK2TD4BY.mjs} +1 -1
  19. package/dist/{chunk-633ESSXN.mjs → chunk-COBOHCBL.mjs} +1 -1
  20. package/dist/{chunk-KEOMDWUC.mjs → chunk-EHSOO47V.mjs} +1 -1
  21. package/dist/{chunk-24R7CI5Q.mjs → chunk-EM4CGGGV.mjs} +1 -1
  22. package/dist/{chunk-CXHPLJDO.mjs → chunk-F6DMXMR4.mjs} +1 -1
  23. package/dist/{chunk-GXVC6ETI.mjs → chunk-FB5PBKLV.mjs} +1 -1
  24. package/dist/{chunk-IFUIQ57U.mjs → chunk-FBEHQRZ4.mjs} +1 -1
  25. package/dist/{chunk-VKCDLKYH.mjs → chunk-FJ2HHNPX.mjs} +1 -1
  26. package/dist/{chunk-75HU5Q6A.mjs → chunk-G2DQLEAJ.mjs} +1 -1
  27. package/dist/{chunk-RCI3L3M5.mjs → chunk-HD6E7KI2.mjs} +1 -1
  28. package/dist/{chunk-NJ7PW5T7.mjs → chunk-IISYRLNU.mjs} +1 -1
  29. package/dist/{chunk-I6D5JCNY.mjs → chunk-IQQ7ZWCP.mjs} +1 -1
  30. package/dist/{chunk-YG7SLO6G.mjs → chunk-ITNR7N47.mjs} +1 -1
  31. package/dist/chunk-IUVPH5LV.mjs +4 -0
  32. package/dist/{chunk-6VRPQKAK.mjs → chunk-JCWFPKF3.mjs} +1 -1
  33. package/dist/chunk-JQL4XGAF.mjs +4 -0
  34. package/dist/{chunk-KAAHIHZK.mjs → chunk-L2OBO2VZ.mjs} +1 -1
  35. package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
  36. package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  37. package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
  38. package/dist/{chunk-2O54GV6Q.mjs → chunk-LJFBHY4P.mjs} +1 -1
  39. package/dist/{chunk-YPQUYIGO.mjs → chunk-LLED3RQS.mjs} +1 -1
  40. package/dist/{chunk-WBDSOPDY.mjs → chunk-M527EJIX.mjs} +1 -1
  41. package/dist/chunk-MCOHKE2T.mjs +1 -0
  42. package/dist/{chunk-SWE754OC.mjs → chunk-MH4YPGH4.mjs} +1 -1
  43. package/dist/{chunk-43YJ2VYN.mjs → chunk-MU47F4UR.mjs} +1 -1
  44. package/dist/{chunk-4FEVXBNU.mjs → chunk-NCJAMNMQ.mjs} +1 -1
  45. package/dist/{chunk-2R3ECSWF.mjs → chunk-NDBSSX6Q.mjs} +1 -1
  46. package/dist/{chunk-O3BCESMN.mjs → chunk-NXAXOI33.mjs} +1 -1
  47. package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
  48. package/dist/{chunk-GRNOF6LY.mjs → chunk-QDP657UR.mjs} +1 -1
  49. package/dist/{chunk-AMAB4E2X.mjs → chunk-QKDYTCZC.mjs} +1 -1
  50. package/dist/{chunk-2IMY4VWR.mjs → chunk-RR4QSUV2.mjs} +1 -1
  51. package/dist/{chunk-XQ3XV5DH.mjs → chunk-RS4VD3ML.mjs} +1 -1
  52. package/dist/{chunk-UBZYXZ7B.mjs → chunk-RS4WAAGI.mjs} +1 -1
  53. package/dist/{chunk-FRYADWTQ.mjs → chunk-RV4XL2CG.mjs} +1 -1
  54. package/dist/{chunk-4ITG3T35.mjs → chunk-SME3D72Q.mjs} +1 -1
  55. package/dist/{chunk-LEF6M5ZD.mjs → chunk-SNFBF6KT.mjs} +1 -1
  56. package/dist/{chunk-6L7VJ7IH.mjs → chunk-TIIYFAV6.mjs} +1 -1
  57. package/dist/{chunk-ZZFYIP6H.mjs → chunk-TKCFCYEQ.mjs} +1 -1
  58. package/dist/{chunk-OWL3KUE3.mjs → chunk-TKY52BNP.mjs} +1 -1
  59. package/dist/{chunk-B63FA7LF.mjs → chunk-TQKXHMD7.mjs} +1 -1
  60. package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
  61. package/dist/{chunk-WDRL3N5V.mjs → chunk-VNKGAW4K.mjs} +1 -1
  62. package/dist/{chunk-I75OOO4H.mjs → chunk-VRHJOUL3.mjs} +1 -1
  63. package/dist/{chunk-MDIJOHFV.mjs → chunk-WLI2YTOQ.mjs} +1 -1
  64. package/dist/{chunk-ZA6MGTGM.mjs → chunk-WRCRZUGO.mjs} +1 -1
  65. package/dist/{chunk-O5QXPC23.mjs → chunk-X2JWNPWT.mjs} +1 -1
  66. package/dist/{chunk-XMYXQR5W.mjs → chunk-X3YJJBFJ.mjs} +1 -1
  67. package/dist/{chunk-LBVWIF2J.mjs → chunk-XJKNH5LL.mjs} +1 -1
  68. package/dist/{chunk-IBC5Z55T.mjs → chunk-YH72WKGC.mjs} +1 -1
  69. package/dist/chunk-YRDJBAYA.mjs +4 -0
  70. package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  71. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  72. package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
  73. package/dist/components/AdvancedComponents/EditableField.mjs +1 -1
  74. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  75. package/dist/components/AdvancedComponents/index.mjs +1 -1
  76. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  77. package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
  78. package/dist/components/AdvancedComponents/switch.mjs +1 -1
  79. package/dist/components/AdvancedComponents/theme-toggle.mjs +1 -1
  80. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  81. package/dist/components/Blocks/Banner.mjs +1 -1
  82. package/dist/components/Blocks/CallToAction.mjs +1 -1
  83. package/dist/components/Blocks/CaseStudy.mjs +1 -1
  84. package/dist/components/Blocks/Code.client.mjs +1 -1
  85. package/dist/components/Blocks/Code.mjs +1 -1
  86. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  87. package/dist/components/Blocks/ConsultantProfile.mjs +1 -1
  88. package/dist/components/Blocks/Content.mjs +1 -1
  89. package/dist/components/Blocks/CopyButton.mjs +1 -1
  90. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  91. package/dist/components/Blocks/ProposalSummary.mjs +1 -1
  92. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  93. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  94. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  95. package/dist/components/Blocks/index.mjs +1 -1
  96. package/dist/components/CRM/CogeBoard.mjs +1 -1
  97. package/dist/components/CRM/DealCard.mjs +1 -1
  98. package/dist/components/CRM/DealDetails.mjs +1 -1
  99. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  100. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  101. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  102. package/dist/components/CRM/NewDealForm.mjs +1 -1
  103. package/dist/components/CRM/index.mjs +1 -1
  104. package/dist/components/Cards/ContentCard.mjs +1 -1
  105. package/dist/components/Cards/CustomerCard.mjs +1 -1
  106. package/dist/components/Cards/EventCard.mjs +1 -1
  107. package/dist/components/Cards/FeatureCard.mjs +1 -1
  108. package/dist/components/Cards/HeroCard.mjs +1 -1
  109. package/dist/components/Cards/Image.mjs +1 -1
  110. package/dist/components/Cards/PricingCard.mjs +1 -1
  111. package/dist/components/Cards/ServiceCard.mjs +1 -1
  112. package/dist/components/Cards/index.mjs +1 -1
  113. package/dist/components/Chat/ChatInterface.js +7 -7
  114. package/dist/components/Chat/ChatInterface.mjs +1 -1
  115. package/dist/components/Chat/Components/ChatCardArtefact.mjs +1 -1
  116. package/dist/components/Chat/Components/ChatCardTask.mjs +1 -1
  117. package/dist/components/Chat/Components/Conversation.mjs +1 -1
  118. package/dist/components/Chat/Components/Message.mjs +1 -1
  119. package/dist/components/Chat/CopilotInterface.js +11 -10
  120. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  121. package/dist/components/Chat/PartTypes/CodeBlock.d.ts +7 -5
  122. package/dist/components/Chat/PartTypes/CodeBlock.js +1 -1
  123. package/dist/components/Chat/PartTypes/CodeBlock.mjs +1 -1
  124. package/dist/components/Chat/PartTypes/ColleagueHandoff.mjs +1 -1
  125. package/dist/components/Chat/PartTypes/Confirmation.css +1 -0
  126. package/dist/components/Chat/PartTypes/Confirmation.d.ts +49 -0
  127. package/dist/components/Chat/PartTypes/Confirmation.js +4 -0
  128. package/dist/components/Chat/PartTypes/Confirmation.mjs +2 -0
  129. package/dist/components/Chat/PartTypes/Conversation.css +1 -0
  130. package/dist/components/Chat/PartTypes/Conversation.d.ts +15 -0
  131. package/dist/components/Chat/PartTypes/Conversation.js +4 -0
  132. package/dist/components/Chat/PartTypes/Conversation.mjs +2 -0
  133. package/dist/components/Chat/PartTypes/MessageHandler.js +8 -7
  134. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  135. package/dist/components/Chat/PartTypes/Reasoning.mjs +1 -1
  136. package/dist/components/Chat/PartTypes/Response.mjs +1 -1
  137. package/dist/components/Chat/PartTypes/Tool.d.ts +12 -11
  138. package/dist/components/Chat/PartTypes/Tool.js +1 -1
  139. package/dist/components/Chat/PartTypes/Tool.mjs +1 -1
  140. package/dist/components/Chat/PartTypes/index.d.ts +2 -0
  141. package/dist/components/Chat/PartTypes/index.js +9 -8
  142. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  143. package/dist/components/Chat/capability-menu.mjs +1 -1
  144. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  145. package/dist/components/Chat/demo-long-messages.js +18 -17
  146. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  147. package/dist/components/Chat/demo-tests.js +89 -88
  148. package/dist/components/Chat/demo-tests.mjs +1 -1
  149. package/dist/components/Chat/demo.js +11 -10
  150. package/dist/components/Chat/demo.mjs +1 -1
  151. package/dist/components/Chat/example-usage.js +11 -10
  152. package/dist/components/Chat/example-usage.mjs +1 -1
  153. package/dist/components/Chat/example-with-file-uploads.mjs +1 -1
  154. package/dist/components/Chat/example-with-vercel-ai.js +11 -10
  155. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  156. package/dist/components/Chat/index.js +11 -10
  157. package/dist/components/Chat/index.mjs +1 -1
  158. package/dist/components/DeliveryLead/DeliveryLeadSubmission.mjs +1 -1
  159. package/dist/components/DeliveryLead/DeliveryLeadSubmissionList.mjs +1 -1
  160. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  161. package/dist/components/DeliveryLead/index.mjs +1 -1
  162. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  163. package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
  164. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  165. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  166. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  167. package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
  168. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  169. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  170. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
  171. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  172. package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
  173. package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
  174. package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
  175. package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
  176. package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
  177. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  178. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  179. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  180. package/dist/components/DigitalColleagues/index.mjs +1 -1
  181. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  182. package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
  183. package/dist/components/DigitalColleagues/team-form.mjs +1 -1
  184. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  185. package/dist/components/Foundary/DashboardHeader.mjs +1 -1
  186. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  187. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  188. package/dist/components/Foundary/Knowledge/manage-team-context.mjs +1 -1
  189. package/dist/components/Foundary/LandingMenu.mjs +1 -1
  190. package/dist/components/Foundary/Login.mjs +1 -1
  191. package/dist/components/Foundary/MainPage.mjs +1 -1
  192. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  193. package/dist/components/Foundary/RichText/components/RawUploadComponent/index.mjs +1 -1
  194. package/dist/components/Foundary/RichText/index.mjs +1 -1
  195. package/dist/components/Foundary/RichText/nodes/image-node.mjs +1 -1
  196. package/dist/components/Foundary/RichText/plugins/image-plugin.mjs +1 -1
  197. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  198. package/dist/components/Foundary/SearchableSelect.mjs +1 -1
  199. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  200. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  201. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  202. package/dist/components/Foundary/Views/index.mjs +1 -1
  203. package/dist/components/Foundary/colleague-card.mjs +1 -1
  204. package/dist/components/Foundary/colleague-form.mjs +1 -1
  205. package/dist/components/Foundary/colleague-type-selection.mjs +1 -1
  206. package/dist/components/Foundary/document-edit.mjs +1 -1
  207. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  208. package/dist/components/Foundary/document-preview.mjs +1 -1
  209. package/dist/components/Foundary/file-edit.mjs +1 -1
  210. package/dist/components/Foundary/foundary-clone.mjs +1 -1
  211. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  212. package/dist/components/Foundary/foundary-options.mjs +1 -1
  213. package/dist/components/Foundary/index.mjs +1 -1
  214. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  215. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  216. package/dist/components/Foundary/team-form.mjs +1 -1
  217. package/dist/components/HeaderFooter/Footer.mjs +1 -1
  218. package/dist/components/HeaderFooter/Header.mjs +1 -1
  219. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  220. package/dist/components/HeaderFooter/HeaderMenu.mjs +1 -1
  221. package/dist/components/HeaderFooter/RelatedPagesMenu.mjs +1 -1
  222. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  223. package/dist/components/HeaderFooter/SimpleHeader.mjs +1 -1
  224. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  225. package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
  226. package/dist/components/HeaderFooter/index.mjs +1 -1
  227. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
  228. package/dist/components/Heros/DashboardHero/index.mjs +1 -1
  229. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  230. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  231. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  232. package/dist/components/Heros/PostHero/index.mjs +1 -1
  233. package/dist/components/Heros/RenderHero.mjs +1 -1
  234. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  235. package/dist/components/Heros/index.mjs +1 -1
  236. package/dist/components/Holidays/ApproveLeave.mjs +1 -1
  237. package/dist/components/Holidays/CalendarView.mjs +1 -1
  238. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  239. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  240. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  241. package/dist/components/Holidays/index.mjs +1 -1
  242. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  243. package/dist/components/Layouts/Print.mjs +1 -1
  244. package/dist/components/Layouts/SlideShow.mjs +1 -1
  245. package/dist/components/Layouts/index.mjs +1 -1
  246. package/dist/components/Menus/Categories.mjs +1 -1
  247. package/dist/components/Menus/Filter.mjs +1 -1
  248. package/dist/components/Menus/ProjectTeam.mjs +1 -1
  249. package/dist/components/Menus/RelatedContent.mjs +1 -1
  250. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  251. package/dist/components/Menus/SidebarRight.mjs +1 -1
  252. package/dist/components/Menus/index.mjs +1 -1
  253. package/dist/components/Other/Container.mjs +1 -1
  254. package/dist/components/Other/index.mjs +1 -1
  255. package/dist/components/Payload/Link/index.mjs +1 -1
  256. package/dist/components/Payload/Pagination/index.mjs +1 -1
  257. package/dist/components/Payload/RichText/index.mjs +1 -1
  258. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  259. package/dist/components/Payload/index.mjs +1 -1
  260. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  261. package/dist/components/Projects/AddFileModal.mjs +1 -1
  262. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  263. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  264. package/dist/components/Projects/EpicFilter.mjs +1 -1
  265. package/dist/components/Projects/EpicsView.mjs +1 -1
  266. package/dist/components/Projects/FileView.mjs +1 -1
  267. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  268. package/dist/components/Projects/KanbanColumn.mjs +1 -1
  269. package/dist/components/Projects/PlanningView.mjs +1 -1
  270. package/dist/components/Projects/ProjectPage.mjs +1 -1
  271. package/dist/components/Projects/ProjectView.mjs +1 -1
  272. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  273. package/dist/components/Projects/TaskCard.mjs +1 -1
  274. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  275. package/dist/components/Projects/TaskSelect.mjs +1 -1
  276. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  277. package/dist/components/Projects/TasksView.mjs +1 -1
  278. package/dist/components/Projects/TeamSwitcher.mjs +1 -1
  279. package/dist/components/Projects/business-unit-switcher.mjs +1 -1
  280. package/dist/components/Projects/file-list.mjs +1 -1
  281. package/dist/components/Projects/index.mjs +1 -1
  282. package/dist/components/Projects/project-card.mjs +1 -1
  283. package/dist/components/Projects/project-form.mjs +1 -1
  284. package/dist/components/Projects/team-card.mjs +1 -1
  285. package/dist/components/Projects/team-switcher-bar.mjs +1 -1
  286. package/dist/components/dc-temp/creative.mjs +1 -1
  287. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  288. package/dist/components/dc-temp/index.mjs +1 -1
  289. package/dist/components/dc-temp/markdown-renderer.mjs +1 -1
  290. package/dist/components/index.js +24 -23
  291. package/dist/components/index.mjs +1 -1
  292. package/dist/components/ui/alert.mjs +1 -1
  293. package/dist/components/ui/avatar.mjs +1 -1
  294. package/dist/components/ui/badge.mjs +1 -1
  295. package/dist/components/ui/breadcrumb.mjs +1 -1
  296. package/dist/components/ui/button.mjs +1 -1
  297. package/dist/components/ui/calendar.mjs +1 -1
  298. package/dist/components/ui/card.mjs +1 -1
  299. package/dist/components/ui/checkbox.mjs +1 -1
  300. package/dist/components/ui/command.mjs +1 -1
  301. package/dist/components/ui/dialog.mjs +1 -1
  302. package/dist/components/ui/dropdown-menu.mjs +1 -1
  303. package/dist/components/ui/hover-card.mjs +1 -1
  304. package/dist/components/ui/index.mjs +1 -1
  305. package/dist/components/ui/input.mjs +1 -1
  306. package/dist/components/ui/inputs/common/styles/index.mjs +1 -1
  307. package/dist/components/ui/inputs/text-input/index.mjs +1 -1
  308. package/dist/components/ui/inputs/textarea-input/index.mjs +1 -1
  309. package/dist/components/ui/label.mjs +1 -1
  310. package/dist/components/ui/pagination.mjs +1 -1
  311. package/dist/components/ui/popover.mjs +1 -1
  312. package/dist/components/ui/progress.mjs +1 -1
  313. package/dist/components/ui/scroll-area.mjs +1 -1
  314. package/dist/components/ui/select.mjs +1 -1
  315. package/dist/components/ui/separator.mjs +1 -1
  316. package/dist/components/ui/sheet.mjs +1 -1
  317. package/dist/components/ui/sidebar.mjs +1 -1
  318. package/dist/components/ui/skeleton.mjs +1 -1
  319. package/dist/components/ui/switch.mjs +1 -1
  320. package/dist/components/ui/tabs.mjs +1 -1
  321. package/dist/components/ui/textarea.mjs +1 -1
  322. package/dist/components/ui/toast.mjs +1 -1
  323. package/dist/components/ui/toaster.mjs +1 -1
  324. package/dist/components/ui/toggle-group.mjs +1 -1
  325. package/dist/components/ui/toggle.mjs +1 -1
  326. package/dist/components/ui/tooltip.mjs +1 -1
  327. package/dist/globals.css +1 -1
  328. package/dist/index.js +28 -27
  329. package/dist/index.mjs +1 -1
  330. package/dist/metafile-cjs.json +1 -1
  331. package/dist/metafile-esm.json +1 -1
  332. package/dist/pages/Blog.mjs +1 -1
  333. package/dist/pages/Documentation.mjs +1 -1
  334. package/dist/pages/IndexPage.mjs +1 -1
  335. package/dist/pages/Intranet.mjs +1 -1
  336. package/dist/pages/LandingPage.mjs +1 -1
  337. package/dist/pages/Page.mjs +1 -1
  338. package/dist/pages/Publish.mjs +1 -1
  339. package/dist/pages/Website.mjs +1 -1
  340. package/dist/sections/AboutSection.mjs +1 -1
  341. package/dist/sections/BlogDetail.mjs +1 -1
  342. package/dist/sections/BlogList.mjs +1 -1
  343. package/dist/sections/BlogListSection.mjs +1 -1
  344. package/dist/sections/ContactSection.mjs +1 -1
  345. package/dist/sections/ImageSection.mjs +1 -1
  346. package/dist/sections/MainPageSection.mjs +1 -1
  347. package/dist/sections/PageSections.mjs +1 -1
  348. package/dist/sections/PricingSection.mjs +1 -1
  349. package/dist/sections/ServiceDetail.mjs +1 -1
  350. package/dist/sections/ServiceDetailSection.mjs +1 -1
  351. package/dist/sections/ServiceSection.mjs +1 -1
  352. package/dist/sections/form/index.mjs +1 -1
  353. package/dist/sections/index.mjs +1 -1
  354. package/dist/styles/Colors.mjs +1 -1
  355. package/dist/utils/index.mjs +1 -1
  356. package/package.json +3 -2
  357. package/dist/chunk-7JDMW5R3.mjs +0 -4
  358. package/dist/chunk-IMRGPVFS.mjs +0 -1
  359. package/dist/chunk-UA2E23AS.mjs +0 -4
@@ -2,20 +2,21 @@
2
2
  "use strict";
3
3
  'use client'
4
4
  'use client';
5
+ "use client";
5
6
 
6
- "use strict";"use client";var hi=Object.create;var Lt=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var xi=Object.getOwnPropertyNames;var Ci=Object.getPrototypeOf,wi=Object.prototype.hasOwnProperty;var Ni=(e,t)=>{for(var o in t)Lt(e,o,{get:t[o],enumerable:!0})},Ho=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of xi(t))!wi.call(e,n)&&n!==o&&Lt(e,n,{get:()=>t[n],enumerable:!(a=yi(t,n))||a.enumerable});return e};var G=(e,t,o)=>(o=e!=null?hi(Ci(e)):{},Ho(t||!e||!e.__esModule?Lt(o,"default",{value:e,enumerable:!0}):o,e)),ki=e=>Ho(Lt({},"__esModule",{value:!0}),e);var Fr={};Ni(Fr,{AdvancedAICopilot:()=>zr,CustomAICopilot:()=>Lr,DemoCopilot:()=>Er,FileUploadAICopilot:()=>Hr,FocusedChatCopilot:()=>Ur,SimpleAICopilot:()=>Br});module.exports=ki(Fr);var Eo=require("@ai-sdk/react");var Ct=require("react"),to=require("motion/react"),ai=require("lucide-react");var qo=require("clsx");var ro="-",Pi=e=>{let t=Di(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let s=r.split(ro);return s[0]===""&&s.length!==1&&s.shift(),Oo(s,t)||Ti(r)},getConflictingClassGroupIds:(r,s)=>{let c=o[r]||[];return s&&a[r]?[...c,...a[r]]:c}}},Oo=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),n=a?Oo(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;let i=e.join(ro);return t.validators.find(({validator:r})=>r(i))?.classGroupId},Fo=/^\[(.+)\]$/,Ti=e=>{if(Fo.test(e)){let t=Fo.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Di=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return Ri(Object.entries(e.classGroups),o).forEach(([i,r])=>{io(r,a,i,t)}),a},io=(e,t,o,a)=>{e.forEach(n=>{if(typeof n=="string"){let i=n===""?t:jo(t,n);i.classGroupId=o;return}if(typeof n=="function"){if(Si(n)){io(n(a),t,o,a);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([i,r])=>{io(r,jo(t,i),o,a)})})},jo=(e,t)=>{let o=e;return t.split(ro).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Si=e=>e.isThemeGetter,Ri=(e,t)=>t?e.map(([o,a])=>{let n=a.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([r,s])=>[t+r,s])):i);return[o,n]}):e,Ai=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,n=(i,r)=>{o.set(i,r),t++,t>e&&(t=0,a=o,o=new Map)};return{get(i){let r=o.get(i);if(r!==void 0)return r;if((r=a.get(i))!==void 0)return n(i,r),r},set(i,r){o.has(i)?o.set(i,r):n(i,r)}}},Vo="!",Ii=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,n=t[0],i=t.length,r=s=>{let c=[],p=0,h=0,u;for(let C=0;C<s.length;C++){let k=s[C];if(p===0){if(k===n&&(a||s.slice(C,C+i)===t)){c.push(s.slice(h,C)),h=C+i;continue}if(k==="/"){u=C;continue}}k==="["?p++:k==="]"&&p--}let v=c.length===0?s:s.substring(h),R=v.startsWith(Vo),T=R?v.substring(1):v,N=u&&u>h?u-h:void 0;return{modifiers:c,hasImportantModifier:R,baseClassName:T,maybePostfixModifierPosition:N}};return o?s=>o({className:s,parseClassName:r}):r},Mi=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},Bi=e=>({cache:Ai(e.cacheSize),parseClassName:Ii(e),...Pi(e)}),Li=/\s+/,Ei=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:n}=t,i=[],r=e.trim().split(Li),s="";for(let c=r.length-1;c>=0;c-=1){let p=r[c],{modifiers:h,hasImportantModifier:u,baseClassName:v,maybePostfixModifierPosition:R}=o(p),T=!!R,N=a(T?v.substring(0,R):v);if(!N){if(!T){s=p+(s.length>0?" "+s:s);continue}if(N=a(v),!N){s=p+(s.length>0?" "+s:s);continue}T=!1}let C=Mi(h).join(":"),k=u?C+Vo:C,L=k+N;if(i.includes(L))continue;i.push(L);let I=n(N,T);for(let B=0;B<I.length;++B){let Y=I[B];i.push(k+Y)}s=p+(s.length>0?" "+s:s)}return s};function zi(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Wo(t))&&(a&&(a+=" "),a+=o);return a}var Wo=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=Wo(e[a]))&&(o&&(o+=" "),o+=t);return o};function Ui(e,...t){let o,a,n,i=r;function r(c){let p=t.reduce((h,u)=>u(h),e());return o=Bi(p),a=o.cache.get,n=o.cache.set,i=s,s(c)}function s(c){let p=a(c);if(p)return p;let h=Ei(c,o);return n(c,h),h}return function(){return i(zi.apply(null,arguments))}}var O=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Go=/^\[(?:([a-Jo-]+):)?(.+)\]$/i,Hi=/^\d+\/\d+$/,Fi=new Set(["px","full","screen"]),ji=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|Jo|min|max))|\Jo(calc|min|max|clamp)\(.+\)|^0$/,Vi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wi=/^(inset_)?-?((\d+)?\.?(\d+)[a-Jo]+|0)Jo-?((\d+)?\.?(\d+)[a-Jo]+|0)/,Gi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>lt(e)||Fi.has(e)||Hi.test(e),Ve=e=>ct(e,"length",Yi),lt=e=>!!e&&!Number.isNaN(Number(e)),ao=e=>ct(e,"number",lt),Pt=e=>!!e&&Number.isInteger(Number(e)),$i=e=>e.endsWith("%")&&lt(e.slice(0,-1)),w=e=>Go.test(e),We=e=>ji.test(e),_i=new Set(["length","size","percentage"]),qi=e=>ct(e,_i,$o),Ki=e=>ct(e,"position",$o),Ji=new Set(["image","url"]),Qi=e=>ct(e,Ji,er),Xi=e=>ct(e,"",Zi),Tt=()=>!0,ct=(e,t,o)=>{let a=Go.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},Yi=e=>Oi.test(e)&&!Vi.test(e),$o=()=>!1,Zi=e=>Wi.test(e),er=e=>Gi.test(e);var tr=()=>{let e=O("colors"),t=O("spacing"),o=O("blur"),a=O("brightness"),n=O("borderColor"),i=O("borderRadius"),r=O("borderSpacing"),s=O("borderWidth"),c=O("contrast"),p=O("grayscale"),h=O("hueRotate"),u=O("invert"),v=O("gap"),R=O("gradientColorStops"),T=O("gradientColorStopPositions"),N=O("inset"),C=O("margin"),k=O("opacity"),L=O("padding"),I=O("saturate"),B=O("scale"),Y=O("sepia"),q=O("skew"),de=O("space"),ie=O("translate"),W=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto",w,t],E=()=>[w,t],Oe=()=>["",Be,Ve],xe=()=>["auto",lt,w],d=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",w],g=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[lt,w];return{cacheSize:500,separator:":",theme:{colors:[Tt],spacing:[Be,Ve],blur:["none","",We,w],brightness:H(),borderColor:[e],borderRadius:["none","","full",We,w],borderSpacing:E(),borderWidth:Oe(),contrast:H(),grayscale:$(),hueRotate:H(),invert:$(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[$i,Ve],inset:pe(),margin:pe(),opacity:H(),padding:E(),saturate:H(),scale:H(),sepia:$(),skew:H(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",w]}],container:["container"],columns:[{columns:[We]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...d(),w]}],overflow:[{overflow:K()}],"overflow-Jo":[{"overflow-Jo":K()}],"overflow-Jo":[{"overflow-Jo":K()}],overscroll:[{overscroll:W()}],"overscroll-Jo":[{"overscroll-Jo":W()}],"overscroll-Jo":[{"overscroll-Jo":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-Jo":[{"inset-Jo":[N]}],"inset-Jo":[{"inset-Jo":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],Jo:[{Jo:["auto",Pt,w]}],basis:[{basis:pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",w]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Pt,w]}],"grid-cols":[{"grid-cols":[Tt]}],"col-start-end":[{col:["auto",{span:["full",Pt,w]},w]}],"col-start":[{"col-start":xe()}],"col-end":[{"col-end":xe()}],"grid-rows":[{"grid-rows":[Tt]}],"row-start-end":[{row:["auto",{span:[Pt,w]},w]}],"row-start":[{"row-start":xe()}],"row-end":[{"row-end":xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",w]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",w]}],gap:[{gap:[v]}],"gap-Jo":[{"gap-Jo":[v]}],"gap-Jo":[{"gap-Jo":[v]}],"justify-content":[{justify:["normal",...me()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...me(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...me(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],pe:[{pe:[L]}],pt:[{pt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],Jo:[{Jo:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-Jo":[{"space-Jo":[de]}],"space-Jo-reverse":["space-Jo-reverse"],"space-Jo":[{"space-Jo":[de]}],"space-Jo-reverse":["space-Jo-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",w,t]}],"min-w":[{"min-w":[w,t,"min","max","fit"]}],"max-w":[{"max-w":[w,t,"none","full","min","max","fit","prose",{screen:[We]},We]}],h:[{h:[w,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[w,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[w,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[w,t,"auto","min","max","fit"]}],"font-size":[{text:["base",We,Ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ao]}],"font-family":[{font:[Tt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",w]}],"line-clamp":[{"line-clamp":["none",lt,ao]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,w]}],"list-image":[{"list-image":["none",w]}],"list-style-type":[{list:["none","disc","decimal",w]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,Ve]}],"underline-offset":[{"underline-offset":["auto",Be,w]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",w]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...d(),Ki]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","Jo","Jo","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qi]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","Jo","bl","l","tl"]},Qi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[T]}],"gradient-via-pos":[{via:[T]}],"gradient-to-pos":[{to:[T]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-Jo":[{"rounded-Jo":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Jo":[{"rounded-Jo":[i]}],"rounded-ai":[{"rounded-ai":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-Jo":[{"border-Jo":[s]}],"border-w-Jo":[{"border-Jo":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-Jo":[{"border-Jo":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...U(),"hidden"]}],"divide-Jo":[{"divide-Jo":[s]}],"divide-Jo-reverse":["divide-Jo-reverse"],"divide-Jo":[{"divide-Jo":[s]}],"divide-Jo-reverse":["divide-Jo-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:U()}],"border-color":[{border:[n]}],"border-color-Jo":[{"border-Jo":[n]}],"border-color-Jo":[{"border-Jo":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-Jo":[{"border-Jo":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[Be,w]}],"outline-w":[{outline:[Be,Ve]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[Be,Ve]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",We,Xi]}],"shadow-color":[{shadow:[Tt]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",We,w]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[u]}],saturate:[{saturate:[I]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-Jo":[{"border-spacing-Jo":[r]}],"border-spacing-Jo":[{"border-spacing-Jo":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",w]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",w]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",w]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[B]}],"scale-Jo":[{"scale-Jo":[B]}],"scale-Jo":[{"scale-Jo":[B]}],rotate:[{rotate:[Pt,w]}],"translate-Jo":[{"translate-Jo":[ie]}],"translate-Jo":[{"translate-Jo":[ie]}],"skew-Jo":[{"skew-Jo":[q]}],"skew-Jo":[{"skew-Jo":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",w]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ai-resize","nw-resize","Jo-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",w]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","Jo","Jo",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-Jo":[{"scroll-Jo":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","Jo","Jo","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-Jo":[{"touch-pan":["Jo","left","right"]}],"touch-Jo":[{"touch-pan":["Jo","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",w]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,Ve,ao]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-Jo","overflow-Jo"],overscroll:["overscroll-Jo","overscroll-Jo"],inset:["inset-Jo","inset-Jo","start","end","top","right","bottom","left"],"inset-Jo":["right","left"],"inset-Jo":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-Jo","gap-Jo"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],Jo:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-Jo","rounded-l","rounded-ss","rounded-Jo","rounded-ai","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Jo","rounded-ai"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-Jo":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-Jo","border-spacing-Jo"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-Jo","border-w-l"],"border-w-Jo":["border-w-r","border-w-l"],"border-w-Jo":["border-w-t","border-w-Jo"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-Jo","border-color-l"],"border-color-Jo":["border-color-r","border-color-l"],"border-color-Jo":["border-color-t","border-color-Jo"],"scroll-Jo":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-Jo","touch-Jo","touch-pz"],"touch-Jo":["touch"],"touch-Jo":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var _o=Ui(tr);function l(...e){return _o((0,qo.clsx)(e))}var Vt=G(require("react")),Wt=G(require("next/link"));var Ko=require("class-variance-authority");var Jo=require("react/jsx-runtime"),or=(0,Ko.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function re({className:e,variant:t,...o}){return(0,Jo.jsx)("div",{className:l(or({variant:t}),e),...o})}var Qo=require("@radix-ui/react-slot"),Yo=G(require("react")),ar=(0,Ko.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),S=Yo.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...n},i)=>(0,Jo.jsx)(e?Qo.Slot:"button",{className:l(ar({className:t,size:o,variant:a})),ref:i,...n}));S.displayName="Button";var ea=G(require("react"));var Dt=ea.forwardRef(({className:e,type:t,...o},a)=>(0,Jo.jsx)("input",{type:t,className:l("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));Dt.displayName="Input";var no=G(require("react")),be=G(require("@radix-ui/react-scroll-area"));var Pe=no.forwardRef(({className:e,children:t,...o},a)=>(0,Jo.jsxs)(be.Root,{ref:a,className:l("relative overflow-hidden",e),...o,children:[(0,Jo.jsx)(be.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Jo.jsx)(oa,{}),(0,Jo.jsx)(be.Corner,{})]}));Pe.displayName=be.Root.displayName;var oa=no.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,Jo.jsx)(be.ScrollAreaScrollbar,{ref:a,orientation:t,className:l("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,Jo.jsx)(be.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));oa.displayName=be.ScrollAreaScrollbar.displayName;var St=G(require("react")),J=G(require("@radix-ui/react-dialog"));var ia=J.Root;var ir=J.Portal;var ra=St.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)(J.Overlay,{ref:o,className:l("fixed inset-0 Jo-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ra.displayName=J.Overlay.displayName;var so=St.forwardRef(({className:e,children:t,...o},a)=>(0,Jo.jsxs)(ir,{children:[(0,Jo.jsx)(ra,{}),(0,Jo.jsxs)(J.Content,{ref:a,className:l("fixed left-[50%] top-[50%] Jo-50 grid w-full max-w-lg translate-Jo-[-50%] translate-Jo-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,Jo.jsxs)(J.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,Jo.jsx)(ai.Jo,{className:"h-4 w-4"}),(0,Jo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));so.displayName=J.Content.displayName;var lo=({className:e,...t})=>(0,Jo.jsx)("div",{className:l("flex flex-col space-Jo-1.5 text-center sm:text-left",e),...t});lo.displayName="DialogHeader";var rr=({className:e,...t})=>(0,Jo.jsx)("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-Jo-2",e),...t});rr.displayName="DialogFooter";var co=St.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)(J.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));co.displayName=J.Title.displayName;var nr=St.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)(J.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));nr.displayName=J.Description.displayName;var Rt=G(require("@radix-ui/react-checkbox")),sa=G(require("react")),po=sa.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)(Rt.Root,{className:l("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,Jo.jsx)(Rt.Indicator,{className:l("flex items-center justify-center text-current"),children:(0,Jo.jsx)(ai.Check,{className:"h-4 w-4"})})}));po.displayName=Rt.Root.displayName;var Te=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),Xe=[{id:"home",title:"Home",icon:(0,Jo.jsx)(ai.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Jo.jsx)(ai.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,Jo.jsx)(ai.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Jo.jsx)(ai.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Jo.jsx)(ai.FileText,{}),url:"/knowledge"}],Ye=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You'Jo used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],Le=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Jo.jsx)(ai.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Jo.jsx)(ai.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Jo.jsx)(ai.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Jo.jsx)(ai.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Jo.jsx)(ai.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Jo.jsx)(ai.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Jo.jsx)(ai.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Jo.jsx)(ai.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"Ct",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Jo.jsx)(ai.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Jo.jsx)(ai.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Ht=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var mo=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],zt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],jt=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],sr=[...jt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],lr=[...Ht,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Ut={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},la={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:jt.filter(e=>e.epicId==="1")};var cn={empty:{initialProjects:Ut.projects,initialEpics:Ut.epics,initialSprints:Ut.sprints,initialTasks:Ut.tasks},default:{initialProjects:Ht,initialEpics:mo,initialSprints:zt,initialTasks:jt},highDensity:{initialProjects:Ht,initialEpics:mo,initialSprints:zt,initialTasks:sr},singleEpic:{initialProjects:Ht,initialEpics:la.epics,initialSprints:zt,initialTasks:la.tasks},multipleProjects:{initialProjects:lr,initialEpics:mo,initialSprints:zt,initialTasks:jt}},Ft=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Te),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Te),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Te),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Te),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Te),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Te),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Te),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Te),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Te),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Te),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],dn=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Ft.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Ft.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Ft.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var pn=Ft.filter(e=>e.type==="digital");function ca(e,t){let[o,a]=(0,Ct.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),n=i=>{try{a(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Ct.useEffect)(()=>{n(o)},[]),[o,n]}function uo({items:e,isOpen:t,isMobile:o=!1,onClose:a,currentBusinessUnit:n=Le[0],onBusinessUnitChange:i,onSearch:r,className:s,logo:c="/headerlogo.png",logoLink:p="/teams",appName:h="Nuvia",tagline:u="Collaboration Platform"}){let[v,R]=Vt.useState({}),[T,N]=ca("sidebar-favorites",{}),[C,k]=Vt.useState(null),[L,I]=Vt.useState(""),B=d=>{R(U=>({...U,[d]:!U[d]}))},Y=d=>{i?.(d)},q=()=>{L.trim()&&r?.(L.trim())},de=d=>{d.key==="Enter"&&(d.preventDefault(),q())},ie=(d,U)=>{let A=T[d]||[],me=A.includes(U)?A.filter($=>$!==U):A.concat(U);N({...T,[d]:me})},W=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let U=T[d.id]||[],A=d.items.filter($=>U.includes($.id)),me=d.items.filter($=>!U.includes($.id));return[...A,...me].slice(0,d.maxItems)},K=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,pe=e,E=d=>{let U=K(d),A=W(d),me=(0,Jo.jsxs)(Jo.Fragment,{children:[(0,Jo.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,Jo.jsx)("span",{children:d.title})]}),d.badge&&(0,Jo.jsx)(re,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,Jo.jsx)($e.ChevronDown,{className:l("ml-2 h-4 w-4 transition-transform",v[d.title]?"rotate-180":"")})]}),$=l("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,Jo.jsx)(Wt.default,{href:d.url,className:$,onClick:o?a:void 0,children:me}):(0,Jo.jsx)("button",{className:$,onClick:()=>d.items&&B(d.title),children:me})},Oe=()=>{let d=e.find(A=>A.id===C);if(!d||!d.items||!d.maxItems)return null;let U=T[d.id]||[];return(0,Jo.jsx)(ia,{open:!!C,onOpenChange:A=>!A&&k(null),children:(0,Jo.jsxs)(so,{className:"sm:max-w-md",children:[(0,Jo.jsxs)(lo,{children:[(0,Jo.jsxs)(co,{children:["Manage ",d.title," Favorites"]}),(0,Jo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,Jo.jsx)(Pe,{className:"max-h-96 pr-4",children:(0,Jo.jsx)("div",{className:"space-Jo-4",children:d.items.map(A=>(0,Jo.jsxs)("div",{className:"flex items-center space-Jo-2",children:[(0,Jo.jsx)(po,{id:A.id,checked:U.includes(A.id),onCheckedChange:()=>ie(d.id,A.id),disabled:!U.includes(A.id)&&U.length>=(d.maxItems||0)}),(0,Jo.jsxs)("label",{htmlFor:A.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[A.title,A.badge&&(0,Jo.jsx)(re,{variant:"outline",className:"text-xs",children:A.badge})]})]},A.id))})})]})})},xe=(0,Jo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Jo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Jo.jsxs)(Wt.default,{href:p,className:"flex items-center gap-3",children:[(0,Jo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,Jo.jsx)("img",{src:c,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,Jo.jsxs)("div",{children:[(0,Jo.jsx)("h2",{className:"font-semibold",children:h}),(0,Jo.jsx)("p",{className:"text-xs text-muted-foreground",children:u})]})]}),o&&(0,Jo.jsx)(S,{variant:"ghost",size:"icon",onClick:a,children:(0,Jo.jsx)($e.Jo,{className:"h-5 w-5"})})]}),(0,Jo.jsx)("div",{className:"px-3 py-2",children:(0,Jo.jsxs)("div",{className:"relative",children:[(0,Jo.jsx)($e.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Jo.jsx)(Dt,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:L,onChange:d=>I(d.target.value),onKeyPress:de})]})}),(0,Jo.jsx)(Pe,{className:"flex-1 px-3 py-2",children:(0,Jo.jsx)("div",{className:"space-Jo-1",children:pe.map(d=>(0,Jo.jsxs)("div",{className:"mb-1",children:[E(d),d.items&&v[d.title]&&(0,Jo.jsxs)("div",{className:"mt-1 ml-6 space-Jo-1 border-l pl-3",children:[W(d).map(U=>(0,Jo.jsxs)(Wt.default,{href:U.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:o?a:void 0,children:[U.title,U.badge&&(0,Jo.jsx)(re,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:U.badge})]},U.id)),K(d)&&d.items&&d.items.length>W(d).length&&(0,Jo.jsxs)("button",{onClick:()=>k(d.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",d.items.length-W(d).length," more available"]})]})]},d.id))})}),(0,Jo.jsx)("div",{className:"p-3",children:(0,Jo.jsx)("div",{className:"space-Jo-1",children:(0,Jo.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Jo.jsx)($e.Settings,{className:"h-5 w-5"}),(0,Jo.jsx)("span",{children:"Settings"})]})})}),(0,Jo.jsx)(Oe,{})]});return o?(0,Jo.jsx)("div",{className:l("fixed inset-Jo-0 left-0 Jo-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-Jo-0":"-translate-Jo-full",s),children:xe}):(0,Jo.jsx)("div",{className:l("fixed inset-Jo-0 left-0 Jo-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-Jo-0":"-translate-Jo-full",s),children:xe})}var Gt=G(require("react")),Ee=G(require("@radix-ui/react-avatar"));var dt=Gt.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(Ee.Root,{ref:o,className:l("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));dt.displayName=Ee.Root.displayName;var go=Gt.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(Ee.Image,{ref:o,className:l("aspect-square h-full w-full",e),...t}));go.displayName=Ee.Image.displayName;var pt=Gt.forwardRef(({className:e,...t},o)=>(0,$t.jsx)(Ee.Fallback,{ref:o,className:l("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));pt.displayName=Ee.Fallback.displayName;var da=G(require("react")),we=G(require("@radix-ui/react-tooltip"));var mt=we.Provider,ut=we.Root,gt=we.Trigger,Ze=da.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,Jo.jsx)(we.Portal,{children:(0,Jo.jsx)(we.Content,{ref:a,sideOffset:t,className:l("Jo-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Ze.displayName=we.Content.displayName;var pa=require("next-themes");function ma(){let{setTheme:e,theme:t}=(0,pa.useTheme)();return(0,Jo.jsx)(mt,{children:(0,Jo.jsxs)(ut,{children:[(0,Jo.jsx)(gt,{asChild:!0,children:(0,Jo.jsxs)(S,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Jo.jsx)(ai.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Jo.jsx)(ai.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Jo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Jo.jsx)(Ze,{children:"Toggle theme"})]})})}function ua({notifications:e,open:t,onClose:o,onNotificationRemove:a,onRemoveAll:n,className:i}){let r=e.filter(p=>!p.read),s=r.length,c=p=>{switch(p){case"info":return(0,Jo.jsx)(ai.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,Jo.jsx)(ai.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,Jo.jsx)(ai.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,Jo.jsx)(ai.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,Jo.jsx)(to.AnimatePresence,{children:t&&(0,Jo.jsxs)(Jo.Fragment,{children:[(0,Jo.jsx)(to.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 Jo-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:o}),(0,Jo.jsx)(to.motion.div,{initial:{Jo:"100%"},animate:{Jo:0},exit:{Jo:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:l("fixed inset-Jo-0 right-0 Jo-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,Jo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Jo.jsxs)("div",{className:"flex items-center justify-between border-Jo p-4",children:[(0,Jo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jo.jsx)(ai.Bell,{className:"h-5 w-5"}),(0,Jo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,Jo.jsxs)(re,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,Jo.jsxs)(S,{variant:"ghost",size:"icon",onClick:o,className:"rounded-full",children:[(0,Jo.jsx)(ai.Jo,{className:"h-5 w-5"}),(0,Jo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,Jo.jsxs)("div",{className:"flex items-center justify-between border-Jo p-2",children:[(0,Jo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,Jo.jsx)(S,{variant:"ghost",size:"sm",onClick:n,className:"text-sm",children:"Dismiss all"})]}),r.length>0?(0,Jo.jsx)(Pe,{className:"flex-1",children:(0,Jo.jsx)("div",{className:"divide-Jo",children:r.map(p=>(0,Jo.jsxs)("div",{className:l("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Jo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:c(p.type)}),(0,Jo.jsxs)("div",{className:"flex-1 space-Jo-1",children:[(0,Jo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Jo.jsx)("p",{className:"font-medium",children:p.title}),(0,Jo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jo.jsx)("p",{className:"text-xs text-muted-foreground",children:p.time}),(0,Jo.jsx)(S,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>a?.(p.id),title:"Dismiss",children:(0,Jo.jsx)(ai.Check,{className:"h-3 w-3"})})]})]}),(0,Jo.jsx)("p",{className:"text-sm text-muted-foreground",children:p.description}),p.actionLabel&&(0,Jo.jsxs)(S,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:p.onAction,children:[p.actionLabel,(0,Jo.jsx)(ai.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},p.id))})}):(0,Jo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Jo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Jo.jsx)(ai.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,Jo.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,Jo.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var et=G(require("@radix-ui/react-tabs"));function ga({className:e,...t}){return(0,Jo.jsx)(et.Root,{"data-slot":"tabs",className:l("flex flex-col gap-2",e),...t})}function fa({className:e,...t}){return(0,Jo.jsx)(et.List,{"data-slot":"tabs-list",className:l("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function ba({className:e,...t}){return(0,Jo.jsx)(et.Trigger,{"data-slot":"tabs-trigger",className:l("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var ze=G(require("react")),D=G(require("@radix-ui/react-dropdown-menu")),ft=require("@radix-ui/react-icons");var va=D.Root,ha=D.Trigger;var cr=ze.forwardRef(({className:e,inset:t,children:o,...a},n)=>(0,Jo.jsxs)(D.SubTrigger,{ref:n,className:l("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a,children:[o,(0,Jo.jsx)(ft.ChevronRightIcon,{className:"ml-auto"})]}));cr.displayName=D.SubTrigger.displayName;var dr=ze.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)(D.SubContent,{ref:o,className:l("Jo-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));dr.displayName=D.SubContent.displayName;var bo=ze.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,Jo.jsx)(D.Portal,{children:(0,Jo.jsx)(D.Content,{ref:a,sideOffset:t,className:l("Jo-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));bo.displayName=D.Content.displayName;var vo=ze.forwardRef(({className:e,inset:t,...o},a)=>(0,Jo.jsx)(D.Item,{ref:a,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));vo.displayName=D.Item.displayName;var pr=ze.forwardRef(({className:e,children:t,checked:o,...a},n)=>(0,Jo.jsxs)(D.CheckboxItem,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a,children:[(0,Jo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Jo.jsx)(D.ItemIndicator,{children:(0,Jo.jsx)(ft.CheckIcon,{className:"h-4 w-4"})})}),t]}));pr.displayName=D.CheckboxItem.displayName;var mr=ze.forwardRef(({className:e,children:t,...o},a)=>(0,Jo.jsxs)(D.RadioItem,{ref:a,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,Jo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Jo.jsx)(D.ItemIndicator,{children:(0,Jo.jsx)(ft.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));mr.displayName=D.RadioItem.displayName;var ur=ze.forwardRef(({className:e,inset:t,...o},a)=>(0,Jo.jsx)(D.Label,{ref:a,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));ur.displayName=D.Label.displayName;var gr=ze.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)(D.Separator,{ref:o,className:l("-mx-1 my-1 h-px bg-muted",e),...t}));gr.displayName=D.Separator.displayName;var fr=({className:e,...t})=>(0,Jo.jsx)("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});fr.displayName="DropdownMenuShortcut";function xa({activeTab:e,onTabChange:t,tabOptions:o,className:a="",maxWidth:n="700px",gridCols:i=6}){let r=o.find(s=>s.value===e);return(0,Jo.jsxs)(to.motion.div,{className:`flex-1 flex justify-center ${a}`,initial:{opacity:0,Jo:-20},animate:{opacity:1,Jo:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Jo.jsx)("div",{className:"hidden lg:block",children:(0,Jo.jsx)(ga,{value:e,onValueChange:t,children:(0,Jo.jsx)(fa,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:n,gridTemplateColumns:`repeat(${Math.min(i,o.length)}, minmax(0, 1fr))`},children:o.map(s=>(0,Jo.jsx)(to.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Jo.jsx)(ba,{value:s.value,onClick:()=>t?.(s.value),className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,Jo.jsx)("div",{className:"lg:hidden",children:(0,Jo.jsxs)(va,{children:[(0,Jo.jsx)(ha,{asChild:!0,children:(0,Jo.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[r?.label||"Select",(0,Jo.jsx)(ai.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Jo.jsx)(bo,{align:"center",className:"w-[180px]",children:o.map(s=>(0,Jo.jsx)(vo,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function Ca({title:e,notifications:t=[],onToggleSidebar:o,onToggleMobileMenu:a,sidebarOpen:n=!0,className:i,activeTab:r="assistant",onTabChange:s,showTabs:c=!0,tabOptions:p=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:h,actionIcon:u=(0,Jo.jsx)(ai.Bot,{className:"mr-2 h-4 w-4"}),actionText:v="Action",onNotificationRemove:R,onRemoveAll:T,logo:N="/headerlogo.png",appName:C="Nuvia",tagline:k="Collaboration Platform"}){let[L,I]=(0,Ct.useState)(!1),[B,Y]=(0,Ct.useState)(t),q=B.filter(W=>!W.read).length,de=W=>{Y(K=>K.filter(pe=>pe.id!==W)),R?.(W)},ie=()=>{Y(W=>W.filter(K=>K.read)),T?.()};return(0,Jo.jsxs)(Jo.Fragment,{children:[(0,Jo.jsxs)("header",{className:`sticky top-0 Jo-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,Jo.jsx)(S,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,Jo.jsx)(ai.Menu,{className:"h-5 w-5"})}),(0,Jo.jsx)(S,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:o,children:(0,Jo.jsx)(ai.PanelLeft,{className:"h-5 w-5"})}),!n&&(0,Jo.jsxs)(to.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,Jo:-20},animate:{opacity:1,Jo:0},transition:{duration:.3},children:[(0,Jo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,Jo.jsx)("img",{src:N,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,Jo.jsxs)("div",{children:[(0,Jo.jsx)("h2",{className:"font-semibold text-sm",children:C}),(0,Jo.jsx)("p",{className:"text-xs text-muted-foreground",children:k})]})]}),(0,Jo.jsxs)("div",{className:"flex flex-1 items-center",children:[c&&(0,Jo.jsx)(xa,{activeTab:r,onTabChange:s,tabOptions:p}),(0,Jo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Jo.jsx)(to.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,Jo:20},animate:{opacity:1,Jo:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,Jo.jsx)(to.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Jo.jsxs)(S,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:h,children:[u,v]})})}),(0,Jo.jsx)(ma,{}),(0,Jo.jsx)(mt,{children:(0,Jo.jsxs)(ut,{children:[(0,Jo.jsx)(gt,{asChild:!0,children:(0,Jo.jsx)(to.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Jo.jsxs)(S,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>I(!0),children:[(0,Jo.jsx)(to.motion.div,{animate:q>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:q>0?1/0:0,repeatDelay:3},children:(0,Jo.jsx)(ai.Bell,{className:"h-5 w-5"})}),q>0&&(0,Jo.jsx)(to.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:q})]})})}),(0,Jo.jsx)(Ze,{children:"Notifications"})]})}),(0,Jo.jsx)(to.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Jo.jsxs)(dt,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Jo.jsx)(go,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Jo.jsx)(pt,{})]})})]})]})]}),(0,Jo.jsx)(ua,{notifications:B,open:L,onClose:()=>I(!1),onNotificationRemove:de,onRemoveAll:ie})]})}var wa=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Jo.jsx)(ai.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function ka({sidebarItems:e,children:t,title:o="Digital Colleagues",notifications:a=[],currentBusinessUnit:n=wa[0],onBusinessUnitChange:i,onSearch:r,businessUnits:s=wa,activeTab:c,onTabChange:p,showTabs:h=!1,onActionClick:u,actionIcon:v,actionText:R="Action",onNotificationRemove:T,onRemoveAll:N,logo:C="/headerlogo.png",appName:k="Nuvia",tagline:L="Collaboration Platform",sidebarInitiallyClosed:I=!1}){let[B,Y]=(0,Ct.useState)(!I),[q,de]=(0,Ct.useState)(!1),[ie,W]=(0,Ct.useState)(n),K=pe=>{W(pe),i?.(pe)};return(0,Jo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[q&&(0,Jo.jsx)("div",{className:"fixed inset-0 Jo-40 bg-black/50 md:hidden",onClick:()=>de(!1)}),(0,Jo.jsx)("div",{className:"md:hidden",children:(0,Jo.jsx)(uo,{items:e,isOpen:q,isMobile:!0,onClose:()=>de(!1),currentBusinessUnit:ie,onBusinessUnitChange:K,onSearch:r,logo:C,appName:k,tagline:L})}),(0,Jo.jsx)("div",{className:"hidden md:block",children:(0,Jo.jsx)(uo,{items:e,isOpen:B,isMobile:!1,currentBusinessUnit:ie,onBusinessUnitChange:K,onSearch:r,logo:C,appName:k,tagline:L})}),(0,Jo.jsxs)("div",{className:l("min-h-screen fixed w-full transition-all duration-300 ease-in-out",B?"md:pl-64":"md:pl-0"),children:[(0,Jo.jsx)(Ca,{title:o,notifications:a,onToggleSidebar:()=>Y(!B),onToggleMobileMenu:()=>de(!0),sidebarOpen:B,activeTab:c,onTabChange:p,showTabs:h,onActionClick:u,actionIcon:v,actionText:R,onNotificationRemove:T,onRemoveAll:N,logo:C,appName:k,tagline:L}),(0,Jo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var tt=G(require("react"));var he=tt.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)("div",{ref:o,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));he.displayName="Card";var Ue=tt.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)("div",{ref:o,className:l("flex flex-col space-Jo-1.5 p-6",e),...t}));Ue.displayName="CardHeader";var He=tt.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)("div",{ref:o,className:l("font-semibold leading-none tracking-tight",e),...t}));He.displayName="CardTitle";var xo=tt.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)("div",{ref:o,className:l("text-sm text-muted-foreground",e),...t}));xo.displayName="CardDescription";var Se=tt.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)("div",{ref:o,className:l("p-6 pt-0",e),...t}));Se.displayName="CardContent";var It=tt.forwardRef(({className:e,...t},o)=>(0,Jo.jsx)("div",{ref:o,className:l("flex items-center p-6 pt-0",e),...t}));It.displayName="CardFooter";function Pa({sessions:e,currentSession:t,teams:o,onNewChat:a,onSessionSelect:n,onSessionEdit:i,onSessionDelete:r,className:s}){return(0,Jo.jsx)(mt,{children:(0,Jo.jsx)("div",{className:`space-Jo-4 h-full ${s||""}`,children:(0,Jo.jsxs)(he,{className:"shadow-sm h-full",children:[(0,Jo.jsx)("div",{className:"p-4 border-Jo",children:(0,Jo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Jo.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Jo.jsx)(ai.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,Jo.jsxs)(S,{onClick:a,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,Jo.jsx)(ai.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,Jo.jsx)(Pe,{className:"h-[600px]",children:(0,Jo.jsx)("div",{className:"p-2",children:e.length===0?(0,Jo.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(c=>(0,Jo.jsxs)(ut,{children:[(0,Jo.jsx)(gt,{asChild:!0,children:(0,Jo.jsx)("div",{className:l("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===c.id&&"bg-muted border"),onClick:()=>n(c),children:(0,Jo.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Jo.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,Jo.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:c.title}),(0,Jo.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:c.lastMessage})]}),(0,Jo.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[i&&(0,Jo.jsx)(S,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:p=>{p.stopPropagation(),i(c.id)},children:(0,Jo.jsx)(ai.Edit3,{className:"h-3 w-3"})}),r&&(0,Jo.jsx)(S,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:p=>{p.stopPropagation(),r(c.id)},children:(0,Jo.jsx)(ai.Trash2,{className:"h-3 w-3"})})]})]})})}),(0,Jo.jsx)(Ze,{side:"right",className:"max-w-xs",children:(0,Jo.jsxs)("div",{className:"space-Jo-1",children:[(0,Jo.jsx)("p",{className:"font-medium text-sm",children:c.title}),(0,Jo.jsx)("p",{className:"text-xs",children:c.lastMessage})]})})]},c.id))})})]})})})}var xt=G(require("motion/react-client"));var Ta={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},at=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function Co(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Da({capabilities:e,isOpen:t,onToggle:o,onActionSelect:a,onContextChange:n,colorScheme:i=Ta,className:r}){let[s,c]=(0,Ct.useState)([]),[p,h]=(0,Ct.useState)([]),u=s[s.length-1],v=u?.children||e,R=(I,B)=>{switch(I.type){case"category":return i.categories[B%i.categories.length];case"list":return i.lists[B%i.lists.length];case"item":return i.items[B%i.items.length];default:return i.primary}},T=(0,Ct.useMemo)(()=>({path:s,selectedItems:p,filters:{}}),[s,p]);(0,Ct.useEffect)(()=>{n&&n(T)},[T,n]);let N=I=>{I.type==="category"||I.type==="list"?c([...s,I]):I.type==="item"&&h([...p,I])},C=()=>{c(s.slice(0,-1))},k=I=>{c(s.slice(0,I+1))},L=()=>u?.actions?u.actions:[];return t?(0,Jo.jsxs)("div",{className:l("w-full",r),children:[(0,Jo.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Jo.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,Jo.jsx)(to.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:C,className:l("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Jo.jsx)(ai.ChevronLeft,{className:l("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-Jo-0.5")})}),(0,Jo.jsx)("h4",{className:"font-medium text-sm",children:u?.name||"Capabilities"})]}),(0,Jo.jsx)(to.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:o,className:l("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Jo.jsx)(ai.Jo,{className:l("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,Jo.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Jo.jsx)(to.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>c([]),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Jo.jsxs)("span",{className:"relative",children:["Capabilities",(0,Jo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-Jo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((I,B)=>(0,Jo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Jo.jsx)(ai.ChevronRight,{className:"h-2 w-2"}),(0,Jo.jsx)(to.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>k(B),className:l("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Jo.jsxs)("span",{className:"relative",children:[I.name,(0,Jo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-Jo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},I.id))]}),(0,Jo.jsx)("div",{className:"max-h-40 overflow-Jo-auto",children:(0,Jo.jsx)(to.AnimatePresence,{mode:"wait",children:(0,Jo.jsx)(to.motion.div,{initial:{opacity:0,Jo:-4},animate:{opacity:1,Jo:0},exit:{opacity:0,Jo:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:u?.type==="list"&&u.data?(0,Jo.jsx)(hr,{data:u.data,onItemSelect:I=>h([...p,I]),colorScheme:i}):(0,Jo.jsx)(br,{capabilities:v,onSelect:N,colorScheme:i})},u?.id||"root")})})]}):(0,Jo.jsxs)(S,{onClick:o,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Jo.jsx)(ai.Menu,{className:"h-4 w-4"}),(0,Jo.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function br({capabilities:e,onSelect:t,colorScheme:o}){return(0,Jo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,n)=>(0,Jo.jsx)(vr,{capability:a,onClick:()=>t(a),color:o.categories[n%o.categories.length]},a.id))})}function vr({capability:e,onClick:t,selected:o,color:a}){return(0,Jo.jsxs)(to.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",o&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Jo.jsx)("div",{className:l("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a)}),(0,Jo.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Jo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-Jo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,Jo.jsx)(ai.ChevronRight,{className:l("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-Jo-0.5")}),e.type==="list"&&e.data&&(0,Jo.jsx)(re,{variant:"secondary",className:l("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function hr({data:e,onItemSelect:t,colorScheme:o}){return(0,Jo.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((a,n)=>(0,Jo.jsxs)(to.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:l("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(a),children:[(0,Jo.jsx)("div",{className:l("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o.items[n%o.items.length])}),(0,Jo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Jo.jsxs)("span",{className:"truncate relative font-medium",children:[a.title,(0,Jo.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-Jo-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),a.subtitle&&(0,Jo.jsx)("div",{className:l("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:a.subtitle})]}),a.value&&(0,Jo.jsx)(re,{variant:"secondary",className:l("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:a.value})]},a.id))})}var Ra=G(require("react"));var Sa=({isOpen:e=!0,authUrl:t,onClose:o,onSuccess:a,description:n="This endpoint requires authentication to sync functions."})=>{let[i,r]=(0,Ct.useState)(!1),[s,c]=(0,Ct.useState)(""),p=()=>{if(!t){c("No authentication URL provided");return}r(!0),c("");try{let u=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!u){c("Popup blocked. Please allow popups for this site and try again."),r(!1);return}let v=setInterval(()=>{try{u.closed&&(clearInterval(v),r(!1),a(),o())}catch{}},1e3);setTimeout(()=>{u.closed||(u.close(),clearInterval(v),r(!1),c("Authentication timed out. Please try again."))},6e5)}catch{c("Failed to open authentication window"),r(!1)}},h=async()=>{try{await navigator.clipboard.writeText(t),c("")}catch{c("Failed to copy URL to clipboard")}};return e?(0,Jo.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center Jo-[1000]",children:(0,Jo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,Jo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Jo.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:n}),s&&(0,Jo.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,Jo.jsxs)("div",{className:"flex gap-2",children:[(0,Jo.jsx)("button",{onClick:p,disabled:i||!t,className:`
7
+ "use strict";"use client";var yi=Object.create;var At=Object.defineProperty;var xi=Object.getOwnPropertyDescriptor;var Ci=Object.getOwnPropertyNames;var wi=Object.getPrototypeOf,Ni=Object.prototype.hasOwnProperty;var ki=(e,t)=>{for(var o in t)At(e,o,{get:t[o],enumerable:!0})},Lo=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ci(t))!Ni.call(e,n)&&n!==o&&At(e,n,{get:()=>t[n],enumerable:!(a=xi(t,n))||a.enumerable});return e};var V=(e,t,o)=>(o=e!=null?yi(wi(e)):{},Lo(t||!e||!e.__esModule?At(o,"default",{value:e,enumerable:!0}):o,e)),Pi=e=>Lo(At({},"__esModule",{value:!0}),e);var Fr={};ki(Fr,{AdvancedAICopilot:()=>zr,CustomAICopilot:()=>Lr,DemoCopilot:()=>Er,FileUploadAICopilot:()=>Hr,FocusedChatCopilot:()=>Ur,SimpleAICopilot:()=>Br});module.exports=Pi(Fr);var Io=require("@Io-sdk/react");var bt=require("react"),Jt=require("motion/react"),ii=require("lucide-react");var Wo=require("clsx");var Zt="-",Ti=e=>{let t=Si(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i=>{let s=i.split(Zt);return s[0]===""&&s.length!==1&&s.shift(),Uo(s,t)||Di(i)},getConflictingClassGroupIds:(i,s)=>{let c=o[i]||[];return s&&a[i]?[...c,...a[i]]:c}}},Uo=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),n=a?Uo(e.slice(1),a):void 0;if(n)return n;if(t.validators.length===0)return;let r=e.join(Zt);return t.validators.find(({validator:i})=>i(r))?.classGroupId},Eo=/^\[(.+)\]$/,Di=e=>{if(Eo.test(e)){let t=Eo.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Si=e=>{let{theme:t,prefix:o}=e,a={nextPart:new Map,validators:[]};return Ai(Object.entries(e.classGroups),o).forEach(([r,i])=>{Yt(i,a,r,t)}),a},Yt=(e,t,o,a)=>{e.forEach(n=>{if(typeof n=="string"){let r=n===""?t:zo(t,n);r.classGroupId=o;return}if(typeof n=="function"){if(Ri(n)){Yt(n(a),t,o,a);return}t.validators.push({validator:n,classGroupId:o});return}Object.entries(n).forEach(([r,i])=>{Yt(i,zo(t,r),o,a)})})},zo=(e,t)=>{let o=e;return t.split(Zt).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Ri=e=>e.isThemeGetter,Ai=(e,t)=>t?e.map(([o,a])=>{let n=a.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([i,s])=>[t+i,s])):r);return[o,n]}):e,Ii=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,n=(r,i)=>{o.set(r,i),t++,t>e&&(t=0,a=o,o=new Map)};return{get(r){let i=o.get(r);if(i!==void 0)return i;if((i=a.get(r))!==void 0)return n(r,i),i},set(r,i){o.has(r)?o.set(r,i):n(r,i)}}},Ho="!",Mi=e=>{let{separator:t,experimentalParseClassName:o}=e,a=t.length===1,n=t[0],r=t.length,i=s=>{let c=[],m=0,b=0,v;for(let x=0;x<s.length;x++){let N=s[x];if(m===0){if(N===n&&(a||s.slice(x,x+r)===t)){c.push(s.slice(b,x)),b=x+r;continue}if(N==="/"){v=x;continue}}N==="["?m++:N==="]"&&m--}let f=c.length===0?s:s.substring(b),R=f.startsWith(Ho),D=R?f.substring(1):f,w=v&&v>b?v-b:void 0;return{modifiers:c,hasImportantModifier:R,baseClassName:D,maybePostfixModifierPosition:w}};return o?s=>o({className:s,parseClassName:i}):i},Bi=e=>{if(e.length<=1)return e;let t=[],o=[];return e.forEach(a=>{a[0]==="["?(t.push(...o.sort(),a),o=[]):o.push(a)}),t.push(...o.sort()),t},Li=e=>({cache:Ii(e.cacheSize),parseClassName:Mi(e),...Ti(e)}),Ei=/\s+/,zi=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:n}=t,r=[],i=e.trim().split(Ei),s="";for(let c=i.length-1;c>=0;c-=1){let m=i[c],{modifiers:b,hasImportantModifier:v,baseClassName:f,maybePostfixModifierPosition:R}=o(m),D=!!R,w=a(D?f.substring(0,R):f);if(!w){if(!D){s=m+(s.length>0?" "+s:s);continue}if(w=a(f),!w){s=m+(s.length>0?" "+s:s);continue}D=!1}let x=Bi(b).join(":"),N=v?x+Ho:x,B=N+w;if(r.includes(B))continue;r.push(B);let K=n(w,D);for(let j=0;j<K.length;++j){let Y=K[j];r.push(N+Y)}s=m+(s.length>0?" "+s:s)}return s};function Ui(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Fo(t))&&(a&&(a+=" "),a+=o);return a}var Fo=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=Fo(e[a]))&&(o&&(o+=" "),o+=t);return o};function Hi(e,...t){let o,a,n,r=i;function i(c){let m=t.reduce((b,v)=>v(b),e());return o=Li(m),a=o.cache.get,n=o.cache.set,r=s,s(c)}function s(c){let m=a(c);if(m)return m;let b=zi(c,o);return n(c,b),b}return function(){return r(Ui.apply(null,arguments))}}var F=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},jo=/^\[(?:([a-$o-]+):)?(.+)\]$/i,Fi=/^\d+\/\d+$/,ji=new Set(["px","full","screen"]),Oi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|$o|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gi=/^(inset_)?-?((\d+)?\.?(\d+)[a-$o]+|0)_-?((\d+)?\.?(\d+)[a-$o]+|0)/,$i=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Me=e=>nt(e)||ji.has(e)||Fi.test(e),Fe=e=>st(e,"length",Zi),nt=e=>!!e&&!Number.isNaN(Number(e)),Xt=e=>st(e,"number",nt),xt=e=>!!e&&Number.isInteger(Number(e)),_i=e=>e.endsWith("%")&&nt(e.slice(0,-1)),y=e=>jo.test(e),je=e=>Oi.test(e),qi=new Set(["length","size","percentage"]),Ki=e=>st(e,qi,Oo),Ji=e=>st(e,"position",Oo),Qi=new Set(["image","url"]),Xi=e=>st(e,Qi,tr),Yi=e=>st(e,"",er),Ct=()=>!0,st=(e,t,o)=>{let a=jo.exec(e);return a?a[1]?typeof t=="string"?a[1]===t:t.has(a[1]):o(a[2]):!1},Zi=e=>Vi.test(e)&&!Wi.test(e),Oo=()=>!1,er=e=>Gi.test(e),tr=e=>$i.test(e);var or=()=>{let e=F("colors"),t=F("spacing"),o=F("blur"),a=F("brightness"),n=F("borderColor"),r=F("borderRadius"),i=F("borderSpacing"),s=F("borderWidth"),c=F("contrast"),m=F("grayscale"),b=F("hueRotate"),v=F("invert"),f=F("gap"),R=F("gradientColorStops"),D=F("gradientColorStopPositions"),w=F("inset"),x=F("margin"),N=F("opacity"),B=F("padding"),K=F("saturate"),j=F("scale"),Y=F("sepia"),$=F("skew"),ce=F("space"),ae=F("translate"),O=()=>["auto","contain","none"],J=()=>["auto","hidden","clip","visible","scroll"],de=()=>["auto",y,t],I=()=>[y,t],Je=()=>["",Me,Fe],ke=()=>["auto",nt,y],d=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],S=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",y],g=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>[nt,y];return{cacheSize:500,separator:":",theme:{colors:[Ct],spacing:[Me,Fe],blur:["none","",je,y],brightness:E(),borderColor:[e],borderRadius:["none","","full",je,y],borderSpacing:I(),borderWidth:Je(),contrast:E(),grayscale:W(),hueRotate:E(),invert:W(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[_i,Fe],inset:de(),margin:de(),opacity:E(),padding:I(),saturate:E(),scale:E(),sepia:W(),skew:E(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",y]}],container:["container"],columns:[{columns:[je]}],"break-after":[{"break-after":g()}],"break-before":[{"break-before":g()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...d(),y]}],overflow:[{overflow:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],$o:[{$o:["auto",xt,y]}],basis:[{basis:de()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",y]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",xt,y]}],"grid-cols":[{"grid-cols":[Ct]}],"col-start-end":[{col:["auto",{span:["full",xt,y]},y]}],"col-start":[{"col-start":ke()}],"col-end":[{"col-end":ke()}],"grid-rows":[{"grid-rows":[Ct]}],"row-start-end":[{row:["auto",{span:[xt,y]},y]}],"row-start":[{"row-start":ke()}],"row-end":[{"row-end":ke()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",y]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...pe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...pe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...pe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],$o:[{$o:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],pe:[{pe:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ce]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",y,t]}],"min-w":[{"min-w":[y,t,"min","max","fit"]}],"max-w":[{"max-w":[y,t,"none","full","min","max","fit","prose",{screen:[je]},je]}],$o:[{$o:[y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-$o":[{"min-$o":[y,t,"min","max","fit","svh","lvh","dvh"]}],"max-$o":[{"max-$o":[y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",je,Fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xt]}],"font-family":[{font:[Ct]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",y]}],"line-clamp":[{"line-clamp":["none",nt,Xt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Me,y]}],"list-image":[{"list-image":["none",y]}],"list-style-type":[{list:["none","disc","decimal",y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Me,Fe]}],"underline-offset":[{"underline-offset":["auto",Me,y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...d(),Ji]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ki]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Xi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[D]}],"gradient-via-pos":[{via:[D]}],"gradient-to-pos":[{to:[D]}],"gradient-from":[{from:[R]}],"gradient-via":[{via:[R]}],"gradient-to":[{to:[R]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-ii":[{"rounded-ii":[r]}],"rounded-$o":[{"rounded-$o":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:L()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Me,y]}],"outline-w":[{outline:[Me,Fe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Je()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[Me,Fe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",je,Yi]}],"shadow-color":[{shadow:[Ct]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...S(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":S()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[a]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",je,y]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[v]}],saturate:[{saturate:[K]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[K]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",y]}],duration:[{duration:E()}],ease:[{ease:["linear","in","out","in-out",y]}],delay:[{delay:E()}],animate:[{animate:["none","spin","ping","pulse","bounce",y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[xt,y]}],"translate-x":[{"translate-x":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","$o-resize","nw-resize","ii-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-$o":[{"scroll-$o":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Me,Fe,Xt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],$o:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","$o"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-ii","rounded-$o","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-ii","rounded-$o"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-$o":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Vo=Hi(or);function l(...e){return Vo((0,Wo.clsx)(e))}var Ht=V(require("react")),Ft=V(require("next/link"));var Go=require("class-variance-authority");var $o=require("react/jsx-runtime"),ar=(0,Go.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function be({className:e,variant:t,...o}){return(0,$o.jsx)("div",{className:l(ar({variant:t}),e),...o})}var _o=require("@radix-ui/react-slot"),Ko=V(require("react")),ir=(0,Go.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"$o-10 px-4 py-2",icon:"$o-10 w-10",lg:"$o-11 rounded px-8",sm:"$o-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),P=Ko.forwardRef(({asChild:e=!1,className:t,size:o,variant:a,...n},r)=>(0,$o.jsx)(e?_o.Slot:"button",{className:l(ir({className:t,size:o,variant:a})),ref:r,...n}));P.displayName="Button";var Qo=V(require("react"));var wt=Qo.forwardRef(({className:e,type:t,...o},a)=>(0,$o.jsx)("input",{type:t,className:l("flex $o-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));wt.displayName="Input";var eo=V(require("react")),ve=V(require("@radix-ui/react-scroll-area"));var Ve=eo.forwardRef(({className:e,children:t,...o},a)=>(0,$o.jsxs)(ve.Root,{ref:a,className:l("relative overflow-hidden",e),...o,children:[(0,$o.jsx)(ve.Viewport,{className:"$o-full w-full rounded-[inherit]",children:t}),(0,$o.jsx)(Yo,{}),(0,$o.jsx)(ve.Corner,{})]}));Ve.displayName=ve.Root.displayName;var Yo=eo.forwardRef(({className:e,orientation:t="vertical",...o},a)=>(0,$o.jsx)(ve.ScrollAreaScrollbar,{ref:a,orientation:t,className:l("flex touch-none select-none transition-colors",t==="vertical"&&"$o-full w-2.5 border-l border-l-transparent $o-[1px]",t==="horizontal"&&"$o-2.5 flex-col border-t border-t-transparent $o-[1px]",e),...o,children:(0,$o.jsx)(ve.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Yo.displayName=ve.ScrollAreaScrollbar.displayName;var Nt=V(require("react")),_=V(require("@radix-ui/react-dialog"));var ea=_.Root;var rr=_.Portal;var ta=Nt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(_.Overlay,{ref:o,className:l("fixed inset-0 $o-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ta.displayName=_.Overlay.displayName;var to=Nt.forwardRef(({className:e,children:t,...o},a)=>(0,$o.jsxs)(rr,{children:[(0,$o.jsx)(ta,{}),(0,$o.jsxs)(_.Content,{ref:a,className:l("fixed left-[50%] top-[50%] $o-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background $o-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,(0,$o.jsxs)(_.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,$o.jsx)(ii.$o,{className:"$o-4 w-4"}),(0,$o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));to.displayName=_.Content.displayName;var oo=({className:e,...t})=>(0,$o.jsx)("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});oo.displayName="DialogHeader";var nr=({className:e,...t})=>(0,$o.jsx)("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});nr.displayName="DialogFooter";var ao=Nt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(_.Title,{ref:o,className:l("text-lg font-semibold leading-none tracking-tight",e),...t}));ao.displayName=_.Title.displayName;var sr=Nt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(_.Description,{ref:o,className:l("text-sm text-muted-foreground",e),...t}));sr.displayName=_.Description.displayName;var kt=V(require("@radix-ui/react-checkbox")),aa=V(require("react")),io=aa.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(kt.Root,{className:l("peer $o-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:o,...t,children:(0,$o.jsx)(kt.Indicator,{className:l("flex items-center justify-center text-current"),children:(0,$o.jsx)(ii.Check,{className:"$o-4 w-4"})})}));io.displayName=kt.Root.displayName;var Pe=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),Qe=[{id:"home",title:"Home",icon:(0,$o.jsx)(ii.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,$o.jsx)(ii.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,$o.jsx)(ii.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,$o.jsx)(ii.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,$o.jsx)(ii.FileText,{}),url:"/knowledge"}],Xe=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"ii new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],Be=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,$o.jsx)(ii.Palette,{className:"$o-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,$o.jsx)(ii.Code,{className:"$o-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,$o.jsx)(ii.TrendingUp,{className:"$o-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,$o.jsx)(ii.DollarSign,{className:"$o-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,$o.jsx)(ii.Users,{className:"$o-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,$o.jsx)(ii.Wrench,{className:"$o-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,$o.jsx)(ii.Scale,{className:"$o-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,$o.jsx)(ii.Package,{className:"$o-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,$o.jsx)(ii.Zap,{className:"$o-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,$o.jsx)(ii.Building2,{className:"$o-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Lt=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var ro=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Mt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],zt=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],lr=[...zt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],cr=[...Lt,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Bt={projects:[{id:"1",name:"Empty Project",description:"ii project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},ia={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:zt.filter(e=>e.epicId==="1")};var cn={empty:{initialProjects:Bt.projects,initialEpics:Bt.epics,initialSprints:Bt.sprints,initialTasks:Bt.tasks},default:{initialProjects:Lt,initialEpics:ro,initialSprints:Mt,initialTasks:zt},highDensity:{initialProjects:Lt,initialEpics:ro,initialSprints:Mt,initialTasks:lr},singleEpic:{initialProjects:Lt,initialEpics:ia.epics,initialSprints:Mt,initialTasks:ia.tasks},multipleProjects:{initialProjects:cr,initialEpics:ro,initialSprints:Mt,initialTasks:zt}},Et=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Pe),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Pe),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Pe),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Pe),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Pe),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Pe),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(Pe),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Pe),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Pe),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Pe),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],dn=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Et.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Et.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Et.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var pn=Et.filter(e=>e.type==="digital");function ra(e,t){let[o,a]=(0,bt.useState)(()=>{if(typeof window>"$o")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),n=r=>{try{a(r),typeof window<"$o"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,bt.useEffect)(()=>{n(o)},[]),[o,n]}function no({items:e,isOpen:t,isMobile:o=!1,onClose:a,currentBusinessUnit:n=Be[0],onBusinessUnitChange:r,onSearch:i,className:s,logo:c="/headerlogo.png",logoLink:m="/teams",appName:b="Nuvia",tagline:v="Collaboration Platform"}){let[f,R]=Ht.useState({}),[D,w]=ra("sidebar-favorites",{}),[x,N]=Ht.useState(null),[B,K]=Ht.useState(""),j=d=>{R(L=>({...L,[d]:!L[d]}))},Y=d=>{r?.(d)},$=()=>{B.trim()&&i?.(B.trim())},ce=d=>{d.key==="Enter"&&(d.preventDefault(),$())},ae=(d,L)=>{let S=D[d]||[],pe=S.includes(L)?S.filter(W=>W!==L):S.concat(L);w({...D,[d]:pe})},O=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let L=D[d.id]||[],S=d.items.filter(W=>L.includes(W.id)),pe=d.items.filter(W=>!L.includes(W.id));return[...S,...pe].slice(0,d.maxItems)},J=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,de=e,I=d=>{let L=J(d),S=O(d),pe=(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,$o.jsx)("span",{children:d.title})]}),d.badge&&(0,$o.jsx)(be,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,$o.jsx)(ii.ChevronDown,{className:l("ml-2 $o-4 w-4 transition-transform",f[d.title]?"rotate-180":"")})]}),W=l("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,$o.jsx)(Ft.default,{href:d.url,className:W,onClick:o?a:void 0,children:pe}):(0,$o.jsx)("button",{className:W,onClick:()=>d.items&&j(d.title),children:pe})},Je=()=>{let d=e.find(S=>S.id===x);if(!d||!d.items||!d.maxItems)return null;let L=D[d.id]||[];return(0,$o.jsx)(ea,{open:!!x,onOpenChange:S=>!S&&N(null),children:(0,$o.jsxs)(to,{className:"sm:max-w-md",children:[(0,$o.jsxs)(oo,{children:[(0,$o.jsxs)(ao,{children:["Manage ",d.title," Favorites"]}),(0,$o.jsxs)("$o",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,$o.jsx)(Ve,{className:"max-$o-96 pr-4",children:(0,$o.jsx)("div",{className:"space-y-4",children:d.items.map(S=>(0,$o.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,$o.jsx)(io,{id:S.id,checked:L.includes(S.id),onCheckedChange:()=>ae(d.id,S.id),disabled:!L.includes(S.id)&&L.length>=(d.maxItems||0)}),(0,$o.jsxs)("label",{htmlFor:S.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[S.title,S.badge&&(0,$o.jsx)(be,{variant:"outline",className:"text-xs",children:S.badge})]})]},S.id))})})]})})},ke=(0,$o.jsxs)("div",{className:"flex $o-full flex-col bg-background",children:[(0,$o.jsxs)("div",{className:"flex items-center justify-between $o-4",children:[(0,$o.jsxs)(Ft.default,{href:m,className:"flex items-center gap-3",children:[(0,$o.jsx)("div",{className:"flex $o-14 w-14 items-center justify-center",children:(0,$o.jsx)("img",{src:c,alt:"Header Logo",className:"$o-14 w-14 object-contain"})}),(0,$o.jsxs)("div",{children:[(0,$o.jsx)("h2",{className:"font-semibold",children:b}),(0,$o.jsx)("$o",{className:"text-xs text-muted-foreground",children:v})]})]}),o&&(0,$o.jsx)(P,{variant:"ghost",size:"icon",onClick:a,children:(0,$o.jsx)(ii.$o,{className:"$o-5 w-5"})})]}),(0,$o.jsx)("div",{className:"px-3 py-2",children:(0,$o.jsxs)("div",{className:"relative",children:[(0,$o.jsx)(ii.Search,{className:"absolute left-3 top-3 $o-4 w-4 text-muted-foreground"}),(0,$o.jsx)(wt,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:B,onChange:d=>K(d.target.value),onKeyPress:ce})]})}),(0,$o.jsx)(Ve,{className:"flex-1 px-3 py-2",children:(0,$o.jsx)("div",{className:"space-y-1",children:de.map(d=>(0,$o.jsxs)("div",{className:"mb-1",children:[I(d),d.items&&f[d.title]&&(0,$o.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[O(d).map(L=>(0,$o.jsxs)(Ft.default,{href:L.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:o?a:void 0,children:[L.title,L.badge&&(0,$o.jsx)(be,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:L.badge})]},L.id)),J(d)&&d.items&&d.items.length>O(d).length&&(0,$o.jsxs)("button",{onClick:()=>N(d.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",d.items.length-O(d).length," more available"]})]})]},d.id))})}),(0,$o.jsx)("div",{className:"$o-3",children:(0,$o.jsx)("div",{className:"space-y-1",children:(0,$o.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,$o.jsx)(ii.Settings,{className:"$o-5 w-5"}),(0,$o.jsx)("span",{children:"Settings"})]})})}),(0,$o.jsx)(Je,{})]});return o?(0,$o.jsx)("div",{className:l("fixed inset-y-0 left-0 $o-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:ke}):(0,$o.jsx)("div",{className:l("fixed inset-y-0 left-0 $o-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:ke})}var jt=V(require("react")),Le=V(require("@radix-ui/react-avatar"));var so=jt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(Le.Root,{ref:o,className:l("relative flex $o-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));so.displayName=Le.Root.displayName;var lo=jt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(Le.Image,{ref:o,className:l("aspect-square $o-full w-full",e),...t}));lo.displayName=Le.Image.displayName;var co=jt.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(Le.Fallback,{ref:o,className:l("flex $o-full w-full items-center justify-center rounded-full bg-muted",e),...t}));co.displayName=Le.Fallback.displayName;var na=V(require("react")),Ce=V(require("@radix-ui/react-tooltip"));var lt=Ce.Provider,ct=Ce.Root,dt=Ce.Trigger,Ye=na.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,$o.jsx)(Ce.Portal,{children:(0,$o.jsx)(Ce.Content,{ref:a,sideOffset:t,className:l("$o-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Ye.displayName=Ce.Content.displayName;var sa=require("next-themes");function la(){let{setTheme:e,theme:t}=(0,sa.useTheme)();return(0,$o.jsx)(lt,{children:(0,$o.jsxs)(ct,{children:[(0,$o.jsx)(dt,{asChild:!0,children:(0,$o.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,$o.jsx)(ii.Sun,{className:"$o-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,$o.jsx)(ii.Moon,{className:"absolute $o-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,$o.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,$o.jsx)(Ye,{children:"Toggle theme"})]})})}function ca({notifications:e,open:t,onClose:o,onNotificationRemove:a,onRemoveAll:n,className:r}){let i=e.filter(m=>!m.read),s=i.length,c=m=>{switch(m){case"info":return(0,$o.jsx)(ii.Info,{className:"$o-5 w-5 text-blue-500"});case"success":return(0,$o.jsx)(ii.Check,{className:"$o-5 w-5 text-green-500"});case"warning":return(0,$o.jsx)(ii.AlertTriangle,{className:"$o-5 w-5 text-amber-500"});case"error":return(0,$o.jsx)(ii.AlertTriangle,{className:"$o-5 w-5 text-red-500"})}};return(0,$o.jsx)(Jt.AnimatePresence,{children:t&&(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(Jt.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 $o-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:o}),(0,$o.jsx)(Jt.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:l("fixed inset-y-0 right-0 $o-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",r),children:(0,$o.jsxs)("div",{className:"flex $o-full flex-col",children:[(0,$o.jsxs)("div",{className:"flex items-center justify-between border-b $o-4",children:[(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)(ii.Bell,{className:"$o-5 w-5"}),(0,$o.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,$o.jsxs)(be,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,$o.jsxs)(P,{variant:"ghost",size:"icon",onClick:o,className:"rounded-full",children:[(0,$o.jsx)(ii.$o,{className:"$o-5 w-5"}),(0,$o.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,$o.jsxs)("div",{className:"flex items-center justify-between border-b $o-2",children:[(0,$o.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,$o.jsx)(P,{variant:"ghost",size:"sm",onClick:n,className:"text-sm",children:"Dismiss all"})]}),i.length>0?(0,$o.jsx)(Ve,{className:"flex-1",children:(0,$o.jsx)("div",{className:"divide-y",children:i.map(m=>(0,$o.jsxs)("div",{className:l("flex gap-3 $o-4 transition-colors bg-muted/50"),children:[(0,$o.jsx)("div",{className:"flex $o-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:c(m.type)}),(0,$o.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,$o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$o.jsx)("$o",{className:"font-medium",children:m.title}),(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)("$o",{className:"text-xs text-muted-foreground",children:m.time}),(0,$o.jsx)(P,{variant:"ghost",size:"sm",className:"$o-6 w-6 $o-0",onClick:()=>a?.(m.id),title:"Dismiss",children:(0,$o.jsx)(ii.Check,{className:"$o-3 w-3"})})]})]}),(0,$o.jsx)("$o",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,$o.jsxs)(P,{variant:"link",size:"sm",className:"$o-auto $o-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,$o.jsx)(ii.ChevronRight,{className:"ml-1 $o-3 w-3"})]})]})]},m.id))})}):(0,$o.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center $o-8 text-center",children:[(0,$o.jsx)("div",{className:"flex $o-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,$o.jsx)(ii.Bell,{className:"$o-8 w-8 text-muted-foreground"})}),(0,$o.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,$o.jsx)("$o",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Ze=V(require("@radix-ui/react-tabs"));function da({className:e,...t}){return(0,$o.jsx)(Ze.Root,{"data-slot":"tabs",className:l("flex flex-col gap-2",e),...t})}function pa({className:e,...t}){return(0,$o.jsx)(Ze.List,{"data-slot":"tabs-list",className:l("bg-muted text-muted-foreground inline-flex $o-9 w-fit items-center justify-center rounded-lg $o-[3px]",e),...t})}function ma({className:e,...t}){return(0,$o.jsx)(Ze.Trigger,{"data-slot":"tabs-trigger",className:l("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex $o-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Ee=V(require("react")),k=V(require("@radix-ui/react-dropdown-menu")),pt=require("@radix-ui/react-icons");var ua=k.Root,ga=k.Trigger;var dr=Ee.forwardRef(({className:e,inset:t,children:o,...a},n)=>(0,$o.jsxs)(k.SubTrigger,{ref:n,className:l("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...a,children:[o,(0,$o.jsx)(pt.ChevronRightIcon,{className:"ml-auto"})]}));dr.displayName=k.SubTrigger.displayName;var pr=Ee.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(k.SubContent,{ref:o,className:l("$o-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover $o-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));pr.displayName=k.SubContent.displayName;var mo=Ee.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,$o.jsx)(k.Portal,{children:(0,$o.jsx)(k.Content,{ref:a,sideOffset:t,className:l("$o-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover $o-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));mo.displayName=k.Content.displayName;var uo=Ee.forwardRef(({className:e,inset:t,...o},a)=>(0,$o.jsx)(k.Item,{ref:a,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));uo.displayName=k.Item.displayName;var mr=Ee.forwardRef(({className:e,children:t,checked:o,...a},n)=>(0,$o.jsxs)(k.CheckboxItem,{ref:n,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a,children:[(0,$o.jsx)("span",{className:"absolute left-2 flex $o-3.5 w-3.5 items-center justify-center",children:(0,$o.jsx)(k.ItemIndicator,{children:(0,$o.jsx)(pt.CheckIcon,{className:"$o-4 w-4"})})}),t]}));mr.displayName=k.CheckboxItem.displayName;var ur=Ee.forwardRef(({className:e,children:t,...o},a)=>(0,$o.jsxs)(k.RadioItem,{ref:a,className:l("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,$o.jsx)("span",{className:"absolute left-2 flex $o-3.5 w-3.5 items-center justify-center",children:(0,$o.jsx)(k.ItemIndicator,{children:(0,$o.jsx)(pt.DotFilledIcon,{className:"$o-4 w-4 fill-current"})})}),t]}));ur.displayName=k.RadioItem.displayName;var gr=Ee.forwardRef(({className:e,inset:t,...o},a)=>(0,$o.jsx)(k.Label,{ref:a,className:l("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));gr.displayName=k.Label.displayName;var fr=Ee.forwardRef(({className:e,...t},o)=>(0,$o.jsx)(k.Separator,{ref:o,className:l("-mx-1 my-1 $o-px bg-muted",e),...t}));fr.displayName=k.Separator.displayName;var br=({className:e,...t})=>(0,$o.jsx)("span",{className:l("ml-auto text-xs tracking-widest opacity-60",e),...t});br.displayName="DropdownMenuShortcut";function ba({activeTab:e,onTabChange:t,tabOptions:o,className:a="",maxWidth:n="700px",gridCols:r=6}){let i=o.find(s=>s.value===e);return(0,$o.jsxs)(Jt.motion.div,{className:`flex-1 flex justify-center ${a}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,$o.jsx)("div",{className:"hidden lg:block",children:(0,$o.jsx)(da,{value:e,onValueChange:t,children:(0,$o.jsx)(pa,{className:"grid w-full rounded-2xl $o-0 $o-10",style:{maxWidth:n,gridTemplateColumns:`repeat(${Math.min(r,o.length)}, minmax(0, 1fr))`},children:o.map(s=>(0,$o.jsx)(Jt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,$o.jsx)(ma,{value:s.value,onClick:()=>t?.(s.value),className:"w-full $o-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,$o.jsx)("div",{className:"lg:hidden",children:(0,$o.jsxs)(ua,{children:[(0,$o.jsx)(ga,{asChild:!0,children:(0,$o.jsxs)(P,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[i?.label||"Select",(0,$o.jsx)(ii.ChevronDown,{className:"$o-4 w-4 ml-2"})]})}),(0,$o.jsx)(mo,{align:"center",className:"w-[180px]",children:o.map(s=>(0,$o.jsx)(uo,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function va({title:e,notifications:t=[],onToggleSidebar:o,onToggleMobileMenu:a,sidebarOpen:n=!0,className:r,activeTab:i="assistant",onTabChange:s,showTabs:c=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:b,actionIcon:v=(0,$o.jsx)($e.Bot,{className:"mr-2 $o-4 w-4"}),actionText:f="Action",onNotificationRemove:R,onRemoveAll:D,logo:w="/headerlogo.png",appName:x="Nuvia",tagline:N="Collaboration Platform"}){let[B,K]=(0,bt.useState)(!1),[j,Y]=(0,bt.useState)(t),$=j.filter(O=>!O.read).length,ce=O=>{Y(J=>J.filter(de=>de.id!==O)),R?.(O)},ae=()=>{Y(O=>O.filter(J=>J.read)),D?.()};return(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsxs)("header",{className:`sticky top-0 $o-10 flex $o-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${r||""}`,children:[(0,$o.jsx)(P,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,$o.jsx)($e.Menu,{className:"$o-5 w-5"})}),(0,$o.jsx)(P,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:o,children:(0,$o.jsx)($e.PanelLeft,{className:"$o-5 w-5"})}),!n&&(0,$o.jsxs)(Jt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,$o.jsx)("div",{className:"flex $o-10 w-10 items-center justify-center",children:(0,$o.jsx)("img",{src:w,alt:"Logo",className:"$o-10 w-10 object-contain"})}),(0,$o.jsxs)("div",{children:[(0,$o.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,$o.jsx)("$o",{className:"text-xs text-muted-foreground",children:N})]})]}),(0,$o.jsxs)("div",{className:"flex flex-1 items-center",children:[c&&(0,$o.jsx)(ba,{activeTab:i,onTabChange:s,tabOptions:m}),(0,$o.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,$o.jsx)(Jt.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,$o.jsx)(Jt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,$o.jsxs)(P,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:b,children:[v,f]})})}),(0,$o.jsx)(la,{}),(0,$o.jsx)(lt,{children:(0,$o.jsxs)(ct,{children:[(0,$o.jsx)(dt,{asChild:!0,children:(0,$o.jsx)(Jt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,$o.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>K(!0),children:[(0,$o.jsx)(Jt.motion.div,{animate:$>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:$>0?1/0:0,repeatDelay:3},children:(0,$o.jsx)($e.Bell,{className:"$o-5 w-5"})}),$>0&&(0,$o.jsx)(Jt.motion.span,{className:"absolute -right-1 -top-1 flex $o-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:$})]})})}),(0,$o.jsx)(Ye,{children:"Notifications"})]})}),(0,$o.jsx)(Jt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,$o.jsxs)(so,{className:"$o-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,$o.jsx)(lo,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,$o.jsx)(co,{})]})})]})]})]}),(0,$o.jsx)(ca,{notifications:j,open:B,onClose:()=>K(!1),onNotificationRemove:ce,onRemoveAll:ae})]})}var ha=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,$o.jsx)(ii.User,{className:"$o-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function xa({sidebarItems:e,children:t,title:o="Digital Colleagues",notifications:a=[],currentBusinessUnit:n=ha[0],onBusinessUnitChange:r,onSearch:i,businessUnits:s=ha,activeTab:c,onTabChange:m,showTabs:b=!1,onActionClick:v,actionIcon:f,actionText:R="Action",onNotificationRemove:D,onRemoveAll:w,logo:x="/headerlogo.png",appName:N="Nuvia",tagline:B="Collaboration Platform",sidebarInitiallyClosed:K=!1}){let[j,Y]=(0,bt.useState)(!K),[$,ce]=(0,bt.useState)(!1),[ae,O]=(0,bt.useState)(n),J=de=>{O(de),r?.(de)};return(0,$o.jsxs)("div",{className:"flex $o-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[$&&(0,$o.jsx)("div",{className:"fixed inset-0 $o-40 bg-black/50 md:hidden",onClick:()=>ce(!1)}),(0,$o.jsx)("div",{className:"md:hidden",children:(0,$o.jsx)(no,{items:e,isOpen:$,isMobile:!0,onClose:()=>ce(!1),currentBusinessUnit:ae,onBusinessUnitChange:J,onSearch:i,logo:x,appName:N,tagline:B})}),(0,$o.jsx)("div",{className:"hidden md:block",children:(0,$o.jsx)(no,{items:e,isOpen:j,isMobile:!1,currentBusinessUnit:ae,onBusinessUnitChange:J,onSearch:i,logo:x,appName:N,tagline:B})}),(0,$o.jsxs)("div",{className:l("min-$o-screen fixed w-full transition-all duration-300 ease-in-out",j?"md:pl-64":"md:pl-0"),children:[(0,$o.jsx)(va,{title:o,notifications:a,onToggleSidebar:()=>Y(!j),onToggleMobileMenu:()=>ce(!0),sidebarOpen:j,activeTab:c,onTabChange:m,showTabs:b,onActionClick:v,actionIcon:f,actionText:R,onNotificationRemove:D,onRemoveAll:w,logo:x,appName:N,tagline:B}),(0,$o.jsx)("main",{className:"flex-1 $o-0 flex flex-col $o-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var et=V(require("react"));var ye=et.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:l("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ye.displayName="Card";var ze=et.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:l("flex flex-col space-y-1.5 $o-6",e),...t}));ze.displayName="CardHeader";var Ue=et.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:l("font-semibold leading-none tracking-tight",e),...t}));Ue.displayName="CardTitle";var bo=et.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:l("text-sm text-muted-foreground",e),...t}));bo.displayName="CardDescription";var De=et.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:l("$o-6 pt-0",e),...t}));De.displayName="CardContent";var Tt=et.forwardRef(({className:e,...t},o)=>(0,$o.jsx)("div",{ref:o,className:l("flex items-center $o-6 pt-0",e),...t}));Tt.displayName="CardFooter";function Ca({sessions:e,currentSession:t,teams:o,onNewChat:a,onSessionSelect:n,onSessionEdit:r,onSessionDelete:i,className:s}){return(0,$o.jsx)(lt,{children:(0,$o.jsx)("div",{className:`space-y-4 $o-full ${s||""}`,children:(0,$o.jsxs)(ye,{className:"shadow-sm $o-full",children:[(0,$o.jsx)("div",{className:"$o-4 border-b",children:(0,$o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$o.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,$o.jsx)(ii.Clock,{className:"$o-4 w-4"}),"Recent Chats"]}),(0,$o.jsxs)(P,{onClick:a,size:"sm",className:"gap-1 $o-7 px-2 rounded-lg shadow-sm",children:[(0,$o.jsx)(ii.Plus,{className:"$o-3 w-3"}),"New"]})]})}),(0,$o.jsx)(Ve,{className:"$o-[600px]",children:(0,$o.jsx)("div",{className:"$o-2",children:e.length===0?(0,$o.jsx)("div",{className:"$o-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(c=>(0,$o.jsxs)(ct,{children:[(0,$o.jsx)(dt,{asChild:!0,children:(0,$o.jsx)("div",{className:l("group relative $o-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===c.id&&"bg-muted border"),onClick:()=>n(c),children:(0,$o.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,$o.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,$o.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:c.title}),(0,$o.jsx)("$o",{className:"text-xs text-muted-foreground line-clamp-2",children:c.lastMessage})]}),(0,$o.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[r&&(0,$o.jsx)(P,{variant:"ghost",size:"icon",className:"$o-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:m=>{m.stopPropagation(),r(c.id)},children:(0,$o.jsx)(ii.Edit3,{className:"$o-3 w-3"})}),i&&(0,$o.jsx)(P,{variant:"ghost",size:"icon",className:"$o-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:m=>{m.stopPropagation(),i(c.id)},children:(0,$o.jsx)(ii.Trash2,{className:"$o-3 w-3"})})]})]})})}),(0,$o.jsx)(Ye,{side:"right",className:"max-w-xs",children:(0,$o.jsxs)("div",{className:"space-y-1",children:[(0,$o.jsx)("$o",{className:"font-medium text-sm",children:c.title}),(0,$o.jsx)("$o",{className:"text-xs",children:c.lastMessage})]})})]},c.id))})})]})})})}var ot=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function vo(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}var Na=V(require("react"));var wa=({isOpen:e=!0,authUrl:t,onClose:o,onSuccess:a,description:n="This endpoint requires authentication to sync functions."})=>{let[r,i]=(0,bt.useState)(!1),[s,c]=(0,bt.useState)(""),m=()=>{if(!t){c("No authentication URL provided");return}i(!0),c("");try{let v=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!v){c("Popup blocked. Please allow popups for this site and try again."),i(!1);return}let f=setInterval(()=>{try{v.closed&&(clearInterval(f),i(!1),a(),o())}catch{}},1e3);setTimeout(()=>{v.closed||(v.close(),clearInterval(f),i(!1),c("Authentication timed out. Please try again."))},6e5)}catch{c("Failed to open authentication window"),i(!1)}},b=async()=>{try{await navigator.clipboard.writeText(t),c("")}catch{c("Failed to copy URL to clipboard")}};return e?(0,$o.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center $o-[1000]",children:(0,$o.jsxs)("div",{className:"bg-white rounded-lg $o-6 max-w-md w-[90%] shadow-lg",children:[(0,$o.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,$o.jsx)("$o",{className:"text-sm text-gray-600 mb-4",children:n}),s&&(0,$o.jsx)("div",{className:"mb-4 $o-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,$o.jsxs)("div",{className:"flex gap-2",children:[(0,$o.jsx)("button",{onClick:m,disabled:r||!t,className:`
7
8
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
8
- ${i||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
9
- `,children:i?"Authenticating...":"Authenticate"}),(0,Jo.jsx)("button",{onClick:h,disabled:!t,className:`
9
+ ${r||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
10
+ `,children:r?"Authenticating...":"Authenticate"}),(0,$o.jsx)("button",{onClick:b,disabled:!t,className:`
10
11
  px-4 py-2 text-white border-none rounded text-sm
11
12
  ${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
12
- `,children:"Copy URL"}),(0,Jo.jsx)("button",{onClick:o,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var No=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=Ra.default.useState(!0),i=()=>{o(e.toolCallId,e.type,"Authentication completed"),n(!1)};switch(e.state){case"input-available":return(0,Jo.jsxs)("div",{className:"mb-2",children:[(0,Jo.jsx)(Sa,{isOpen:a,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>n(!1),onSuccess:i,description:e.output?.reason||e.input?.reason}),!a&&(0,Jo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Jo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Jo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Jo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,Jo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Jo.jsx)(Jo.Fragment,{children:e.output==="Authentication completed"?(0,Jo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Jo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Jo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Jo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})}):(0,Jo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Jo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Jo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Jo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Authentication failed"]})})});default:return null}};var ko=G(require("react"));var Ia=({isOpen:e=!0,reason:t,onClose:o,onApprove:a,onDeny:n,title:i="Approval Required"})=>{let[r,s]=(0,Ct.useState)(!1),c=()=>{s(!0),a(),o()},p=()=>{s(!0),n(),o()},h=()=>{s(!0),n(),o()};return e?(0,Jo.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,Jo.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:i}),(0,Jo.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,Jo.jsxs)("div",{className:"flex gap-2",children:[(0,Jo.jsx)("button",{onClick:c,disabled:r,className:`
13
+ `,children:"Copy URL"}),(0,$o.jsx)("button",{onClick:o,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var yo=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=Na.default.useState(!0),r=()=>{o(e.toolCallId,e.type,"Authentication completed"),n(!1)};switch(e.state){case"input-available":return(0,$o.jsxs)("div",{className:"mb-2",children:[(0,$o.jsx)(wa,{isOpen:a,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>n(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!a&&(0,$o.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$o.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,$o.jsx)("svg",{className:"$o-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,$o.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,$o.jsx)($o.Fragment,{children:e.output==="Authentication completed"?(0,$o.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$o.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,$o.jsx)("svg",{className:"$o-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})}):(0,$o.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$o.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,$o.jsx)("svg",{className:"$o-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Authentication failed"]})})});default:return null}};var xo=V(require("react"));var Pa=({isOpen:e=!0,reason:t,onClose:o,onApprove:a,onDeny:n,title:r="Approval Required"})=>{let[i,s]=(0,bt.useState)(!1),c=()=>{s(!0),a(),o()},m=()=>{s(!0),n(),o()},b=()=>{s(!0),n(),o()};return e?(0,$o.jsxs)("div",{className:"bg-white rounded-lg $o-6 max-w-md w-full shadow-lg",children:[(0,$o.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:r}),(0,$o.jsx)("$o",{className:"text-sm text-gray-600 mb-6",children:t}),(0,$o.jsxs)("div",{className:"flex gap-2",children:[(0,$o.jsx)("button",{onClick:c,disabled:i,className:`
13
14
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
14
- ${r?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
15
- `,children:r?"Processing...":"Approve"}),(0,Jo.jsx)("button",{onClick:p,disabled:r,className:`
15
+ ${i?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
16
+ `,children:i?"Processing...":"Approve"}),(0,$o.jsx)("button",{onClick:m,disabled:i,className:`
16
17
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
17
- ${r?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
18
- `,children:r?"Processing...":"Deny"}),(0,Jo.jsx)("button",{onClick:h,disabled:r,className:`
18
+ ${i?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
19
+ `,children:i?"Processing...":"Deny"}),(0,$o.jsx)("button",{onClick:b,disabled:i,className:`
19
20
  px-4 py-2 text-white border-none rounded text-sm
20
- ${r?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
21
- `,children:"Cancel"})]})]}):null};var Ma=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=ko.default.useState(!0),[i,r]=ko.default.useState(null),s=()=>{o(e.toolCallId,e.type,"Approved"),n(!1),r("approve")},c=()=>{o(e.toolCallId,e.type,"Denied"),n(!1),r("deny")};switch(e.state){case"input-available":return(0,Jo.jsxs)("div",{className:"mb-2",children:[(0,Jo.jsx)(Ia,{isOpen:a,onApprove:s,onDeny:c,onClose:()=>n(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,Jo.jsxs)(Jo.Fragment,{children:[i==="approve"&&(0,Jo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Jo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Jo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Jo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Jo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Jo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Jo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Jo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Jo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,Jo.jsxs)(Jo.Fragment,{children:[e.output==="approve"&&(0,Jo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Jo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Jo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Jo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,Jo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Jo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Jo.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Jo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var Po=require("@radix-ui/react-use-controllable-state");var bt=G(require("@radix-ui/react-collapsible")),vt=bt.Root,ht=bt.CollapsibleTrigger,rt=bt.CollapsibleContent;var La=require("streamdown"),Je=(0,Ct.memo)(({className:e,...t})=>(0,Jo.jsx)(La.Streamdown,{className:l("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Je.displayName="Response";var za=(0,Ct.createContext)(null),yr=()=>{let e=(0,Ct.useContext)(za);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},xr=1e3,Cr=1e3,To=(0,Ct.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:n,duration:i,children:r,...s})=>{let[c,p]=(0,Po.useControllableState)({prop:o,defaultProp:a,onChange:n}),[h,u]=(0,Po.useControllableState)({prop:i,defaultProp:0}),[v,R]=(0,Ct.useState)(!1),[T,N]=(0,Ct.useState)(null);(0,Ct.useEffect)(()=>{t?T===null&&N(Date.now()):T!==null&&(u(Math.ceil((Date.now()-T)/Cr)),N(null))},[t,T,u]),(0,Ct.useEffect)(()=>{if(a&&!t&&c&&!v){let k=setTimeout(()=>{p(!1),R(!0)},xr);return()=>clearTimeout(k)}},[t,c,a,p,v]);let C=k=>{p(k)};return(0,Jo.jsx)(za.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:p,duration:h},children:(0,Jo.jsx)(vt,{className:l("not-prose mb-4",e),onOpenChange:C,open:c,...s,children:r})})}),wr=(e,t)=>e||t===0?(0,Jo.jsx)("p",{children:"Thinking..."}):t===void 0?(0,Jo.jsx)("p",{children:"Thought for a few seconds"}):(0,Jo.jsxs)("p",{children:["Thought for ",t," seconds"]}),Do=(0,Ct.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,duration:i}=yr();return(0,Jo.jsx)(ht,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Jo.jsxs)(Jo.Fragment,{children:[(0,Jo.jsx)(ai.BrainIcon,{className:"size-4"}),wr(a,i),(0,Jo.jsx)(ai.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),So=(0,Ct.memo)(({className:e,children:t,...o})=>(0,Jo.jsx)(rt,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Jo.jsx)(Je,{className:"grid gap-2",children:t})}));To.displayName="Reasoning";Do.displayName="ReasoningTrigger";So.displayName="ReasoningContent";var Ro=require("react-syntax-highlighter"),Xt=require("react-syntax-highlighter/dist/esm/styles/prism"),Nr=(0,Ct.createContext)({code:""}),Yt=({code:e,language:t,showLineNumbers:o=!1,className:a,children:n,...i})=>(0,Jo.jsx)(Nr.Provider,{value:{code:e},children:(0,Jo.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",a),...i,children:(0,Jo.jsxs)("div",{className:"relative",children:[(0,Jo.jsx)(Ro.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Xt.oneLight,children:e}),(0,Jo.jsx)(Ro.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:Xt.oneDark,children:e}),n&&(0,Jo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:n})]})})});var Ha=({className:e,...t})=>(0,Jo.jsx)(vt,{className:l("not-prose mb-4 w-full",e),...t}),kr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Jo.jsxs)(re,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Jo.jsx)(ai.CircleIcon,{className:"size-4"}),"input-available":(0,Jo.jsx)(ai.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Jo.jsx)(ai.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Jo.jsx)(ai.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Fa=({className:e,type:t,state:o,...a})=>(0,Jo.jsxs)(ht,{className:l("flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl",e),...a,children:[(0,Jo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jo.jsx)(ai.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Jo.jsx)("span",{className:"font-medium text-sm",children:t}),kr(o)]}),(0,Jo.jsx)(ai.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),ja=({className:e,...t})=>(0,Jo.jsx)(rt,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Oa=({className:e,input:t,...o})=>(0,Jo.jsxs)("div",{className:l("space-Jo-2 overflow-hidden p-4",e),...o,children:[(0,Jo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Jo.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Jo.jsx)(Yt,{code:JSON.stringify(t,null,2),language:"json"})})]}),Va=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let n=(0,Jo.jsx)("div",{children:t});return typeof t=="object"?n=(0,Jo.jsx)(Yt,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(n=(0,Jo.jsx)(Yt,{code:t,language:"json"})),(0,Jo.jsxs)("div",{className:l("space-Jo-2 p-4",e),...a,children:[(0,Jo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Jo.jsxs)("div",{className:l("overflow-Jo-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Jo.jsx)("div",{children:o}),n]})]})};var Wa=(0,Ct.createContext)(null),Pr=()=>{let e=(0,Ct.useContext)(Wa);if(!e)throw new Error("ColleagueHandoff components must be used within ColleagueHandoff");return e},Tr=1e3,Dr=1e3,Io=(0,Ct.memo)(({className:e,isStreaming:t=!1,name:o="Digital Colleague",open:a,defaultOpen:n=!0,onOpenChange:i,duration:r,children:s,...c})=>{let[p,h]=(0,Po.useControllableState)({prop:a,defaultProp:n,onChange:i}),[u,v]=(0,Po.useControllableState)({prop:r,defaultProp:0}),[R,T]=(0,Ct.useState)(!1),[N,C]=(0,Ct.useState)(null);(0,Ct.useEffect)(()=>{t?N===null&&C(Date.now()):N!==null&&(v(Math.ceil((Date.now()-N)/Dr)),C(null))},[t,N,v]),(0,Ct.useEffect)(()=>{if(n&&!t&&p&&!R){let L=setTimeout(()=>{h(!1),T(!0)},Tr);return()=>clearTimeout(L)}},[t,p,n,h,R]);let k=L=>{h(L)};return(0,Jo.jsx)(Wa.Provider,{value:{isStreaming:t,name:o,isOpen:p,setIsOpen:h,duration:u},children:(0,Jo.jsx)(vt,{className:l("not-prose mb-4",e),onOpenChange:k,open:p,...c,children:s})})}),Sr=(e,t,o)=>e||o===0?(0,Jo.jsxs)("p",{children:["Asking our ",t,"..."]}):o===void 0?(0,Jo.jsxs)("p",{children:["Got an answer from our ",t]}):(0,Jo.jsxs)("p",{children:["Got an answer from our ",t," in ",o," seconds"]}),Mo=(0,Ct.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,name:i,duration:r}=Pr();return(0,Jo.jsx)(ht,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Jo.jsxs)(Jo.Fragment,{children:[(0,Jo.jsx)(ai.Users,{className:"size-4"}),Sr(a,i,r),(0,Jo.jsx)(ai.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),Bo=(0,Ct.memo)(({className:e,children:t,...o})=>(0,Jo.jsx)(rt,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Jo.jsx)(Je,{className:"grid gap-2",children:t})})),Lo=(0,Ct.memo)(({className:e,children:t,...o})=>(0,Jo.jsx)(rt,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Jo.jsx)(Je,{className:"grid gap-2",children:t})}));Io.displayName="ColleagueHandoff";Mo.displayName="ColleagueHandoffTrigger";Bo.displayName="ColleagueHandoffContent";Lo.displayName="ColleagueHandoffQuery";var _a=require("date-fns");function Ga({taskId:e,polling:t=!0,system:o="payload"}){let[a,n]=(0,Ct.useState)(null),[i,r]=(0,Ct.useState)(!1),[s,c]=(0,Ct.useState)(null),p=async(u=!0)=>{if(e){u&&r(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let R=await v.json();n(R)}catch(v){console.error("Error fetching task:",v),c(v instanceof Error?v:new Error("Unknown error occurred"))}finally{u&&r(!1)}}},h=()=>p(!1);return(0,Ct.useEffect)(()=>{e&&p(!0);let u=null;return e&&t&&(u=setInterval(h,5e3)),()=>{u&&clearInterval(u)}},[e,t]),{task:a,loading:i,error:s}}var Rr=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Ar=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function qa({data:e}){let{id:t,system:o,fetchLatest:a,taskData:n,error:i}=e||{};if(!t)return null;let r=null,s=!0,c=i,p=a!==void 0?a:!0;if(r=n||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:a,system:o,fetchLatest:p,taskData:r,error:c}),p){let{task:R,loading:T,error:N}=Ga({taskId:t,system:o});r=R,s=T,c=N}else s=!1;let h=Rr(r?.status||"todo"),u=Ar(r?.status||"todo"),v=r?.dateLogged||new Date().toISOString();try{let R=new Date(r?.dateLogged||"");isNaN(R.getTime())||(v=(0,_a.formatDistanceToNow)(R,{addSuffix:!0}))}catch{}return(0,Jo.jsxs)(he,{className:l("w-full max-w-md shadow-md",c&&"border border-destructive"),children:[(0,Jo.jsxs)(Ue,{className:"pb-2",children:[(0,Jo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Jo.jsx)(He,{className:"text-lg font-semibold",children:s?"Loading...":r?.name||"Task"}),(0,Jo.jsx)(re,{className:`${h}`,children:u})]}),r?.project&&(0,Jo.jsxs)(xo,{className:"text-sm text-gray-500",children:["Project: ",r.project.name]})]}),(0,Jo.jsx)(Se,{className:"pb-2",children:s?(0,Jo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,Jo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Jo.jsx)("p",{className:"text-sm text-foreground",children:r?.description||"......."})}),(0,Jo.jsx)(It,{className:"pt-2 flex items-center justify-between",children:(0,Jo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Jo.jsx)($a.Clock,{className:"h-3 w-3 mr-1"}),(0,Jo.jsxs)("span",{children:["Created ",v]}),(0,Jo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Jo.jsxs)("span",{children:["Task #",t]})]})})]})}function Qa({artefact:e,taskId:t,taskData:o,loading:a=!1,error:n=null}){let i=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},r=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(r=(0,_a.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,Jo.jsxs)(he,{className:"w-full max-w-md shadow-md",children:[(0,Jo.jsx)(Ue,{className:"pb-2",children:(0,Jo.jsx)("div",{className:"flex justify-between items-start",children:(0,Jo.jsx)(He,{className:"text-lg font-semibold",children:a?"Loading...":i.name})})}),(0,Jo.jsx)(Se,{className:"pb-2",children:a?(0,Jo.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,Jo.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Jo.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Jo.jsx)(It,{className:"pt-2 flex items-center justify-between",children:(0,Jo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Jo.jsx)(ai.Clock,{className:"h-3 w-3 mr-1"}),(0,Jo.jsxs)("span",{children:["Created ",r]}),(0,Jo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Jo.jsxs)("span",{children:["Task #",i.id]})]})})]})}var Ir=e=>e.startsWith("image/")?(0,Jo.jsx)(ai.Image,{className:"h-4 w-4"}):e.startsWith("text/")?(0,Jo.jsx)(ai.FileText,{className:"h-4 w-4"}):(0,Jo.jsx)(ai.File,{className:"h-4 w-4"}),Xa=({message:e,addToolResult:t,status:o,messages:a})=>e.parts.map((n,i)=>{if(n.type==="text")return(0,Jo.jsx)(Je,{children:n.text},`${i}`);if(n.type==="file"){let r=n;return(0,Jo.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Jo.jsxs)("div",{className:"flex items-center gap-2",children:[Ir(r.mediaType||"application/octet-stream"),(0,Jo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Jo.jsx)("p",{className:"text-sm font-medium truncate",children:r.filename||r.url?.split("/").pop()||"File"})}),r.url&&(0,Jo.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>window.open(r.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Jo.jsx)(ai.Download,{className:"h-4 w-4"})})]})},i)}if(n.type.startsWith("tool-")){let r=n,s=n.type.replace("tool-","");if(n.type.startsWith("tool-dc_a2a"))return(0,Jo.jsxs)(Io,{name:r?.input?.dcName||"Digital Colleague",className:"w-full",isStreaming:o==="streaming"&&i===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,Jo.jsx)(Mo,{}),(0,Jo.jsx)(Lo,{children:r?.input?.query}),(0,Jo.jsx)(Bo,{children:r?.output})]},`${i}`);if(s==="task")switch(r.state){case"input-available":return(0,Jo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},i);case"output-available":return(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsx)(qa,{data:{id:r.output?.id||r.input?.id,fetchLatest:!1,taskData:r.output||r.input}})},i);case"output-error":return(0,Jo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}if(n.type==="tool-requestEndpointLogin")return(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsx)(No,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-authenticate")return(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsx)(No,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",r),(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsx)(Ma,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(r.state){case"input-available":return(0,Jo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsx)(Qa,{artefact:r.output?.description||"",taskId:r.output?.id||r.input?.id,taskData:r.output||r.input})},i);case"output-error":return(0,Jo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}return(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsxs)(he,{className:"w-full max-w-md",children:[(0,Jo.jsx)(Ue,{children:(0,Jo.jsx)(He,{className:"text-lg",children:s})}),(0,Jo.jsxs)(Se,{children:[r.state==="input-available"&&(0,Jo.jsxs)("p",{className:"text-sm",children:["Processing ",s,"..."]}),r.state==="output-available"&&(0,Jo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.output,null,2)}),r.state==="output-error"&&(0,Jo.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",r.errorText]})]})]})},i)}if(n.type.startsWith("data-")){let r=n,s=n.type.replace("data-","");return s==="reference"?(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsx)(he,{className:"w-full",children:(0,Jo.jsx)(Se,{className:"p-4",children:(0,Jo.jsx)("div",{className:"space-Jo-2",children:r.data?.references?.map((c,p)=>(0,Jo.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Jo.jsx)(re,{variant:"outline",children:c.type||"link"}),(0,Jo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Jo.jsx)("p",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,Jo.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,Jo.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"h-8 w-8 p-0",children:(0,Jo.jsx)(ai.ExternalLink,{className:"h-4 w-4"})})]},p))})})})},i):s==="menu"?(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsxs)(he,{className:"w-full",children:[(0,Jo.jsx)(Ue,{children:(0,Jo.jsx)(He,{className:"text-lg",children:r.data?.title})}),(0,Jo.jsx)(Se,{children:(0,Jo.jsx)("div",{className:"space-Jo-2",children:r.data?.items?.map((c,p)=>(0,Jo.jsx)(S,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,Jo.jsxs)("div",{className:"text-left",children:[(0,Jo.jsx)("p",{className:"font-medium",children:c.label}),c.description&&(0,Jo.jsx)("p",{className:"text-xs text-muted-foreground",children:c.description})]})},p))})})]})},i):(0,Jo.jsx)("div",{className:"mb-2",children:(0,Jo.jsxs)(he,{className:"w-full max-w-md",children:[(0,Jo.jsx)(Ue,{children:(0,Jo.jsx)(He,{className:"text-lg",children:s})}),(0,Jo.jsx)(Se,{children:(0,Jo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.data,null,2)})})]})},i)}if(n.type==="reasoning")return(0,Jo.jsxs)(To,{className:"w-full",isStreaming:o==="streaming"&&i===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,Jo.jsx)(Do,{}),(0,Jo.jsx)(So,{children:n.text})]},`${i}`);if(n.type==="dynamic-tool")return(0,Jo.jsxs)(Ha,{defaultOpen:n.state!=="output-available",children:[(0,Jo.jsx)(Fa,{type:`tool-${n.toolName}`,state:n.state}),(0,Jo.jsxs)(ja,{children:[(0,Jo.jsx)(Oa,{input:n.input}),(0,Jo.jsx)(Va,{output:n.output,errorText:n.errorText})]})]},`${e.id}-${i}`)});var Za=({className:e,from:t,...o})=>(0,Jo.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...o}),Mr=(0,Ko.cva)("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"}}),ei=({children:e,className:t,variant:o,...a})=>(0,Jo.jsx)("div",{className:l(Mr({variant:o,className:t})),...a,children:e});function ti({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:n,fileUploads:i,isDragOver:r,enableFileUpload:s,onInputChange:c,addToolResult:p,onSendMessage:h,onKeyPress:u,onFileUpload:v,onRemoveFile:R,onDragOver:T,className:N,status:C="ready"}){let k=(0,Ct.useRef)(null),L=(0,Ct.useRef)(null),I=(0,Ct.useRef)(null),[B,Y]=(0,Ct.useState)(!1),[q,de]=(0,Ct.useState)({path:[],selectedItems:[],filters:{}});(0,Ct.useEffect)(()=>{k.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Ct.useEffect)(()=>{B&&setTimeout(()=>{k.current?.scrollIntoView({behavior:"smooth"})},100)},[B]);let ie=()=>Co(q),W=()=>{let g=[];return n.forEach(H=>{H.actions&&H.actions.forEach(Ce=>{g.push({label:Ce.label,action:()=>K(Ce.id,{path:[H],selectedItems:[],filters:{}})})}),H.children&&H.children.forEach(Ce=>{Ce.type==="list"&&Ce.data&&g.push({label:`View ${Ce.name}`,action:()=>Y(!0)})})}),g.slice(0,5)},K=(g,H)=>{console.log("Capability action:",g,H);let Ce=`Executing ${g} with context: ${JSON.stringify(H.path.map(Me=>Me.name))}`;Y(!1)},pe=Co({path:[],selectedItems:[],filters:{}}),E=g=>{v(g.target.files),g.target.files&&(g.target.value="")},Oe=g=>{g.preventDefault(),T(!0)},xe=g=>{g.preventDefault(),T(!1)},d=g=>{g.preventDefault(),T(!1),v(g.dataTransfer.files)},U=g=>{if(g===0)return"0 Bytes";let H=1024,Ce=["Bytes","KB","MB","GB"],Me=Math.floor(Math.log(g)/Math.log(H));return parseFloat((g/Math.pow(H,Me)).toFixed(2))+" "+Ce[Me]},A=g=>g.startsWith("image/")?(0,Jo.jsx)(ai.Image,{className:"h-4 w-4"}):g.startsWith("text/")?(0,Jo.jsx)(ai.FileText,{className:"h-4 w-4"}):(0,Jo.jsx)(ai.File,{className:"h-4 w-4"}),me={messages:e,currentSessionTitle:a,capabilities:n,currentCapabilityContext:q,contextualActions:pe,getQuickSuggestions:W().map(g=>g.label)},$=()=>{navigator.clipboard.writeText(JSON.stringify(me,null,2)),alert("Debug info copied to clipboard")};return(0,Jo.jsxs)("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${N||""}`,children:[(0,Jo.jsxs)(Pe,{ref:L,className:"flex-1 p-4 bg-background border-0",onDragOver:Oe,onDragLeave:xe,onDrop:d,children:[(0,Jo.jsxs)("div",{className:l("space-Jo-4",r&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Jo.jsx)(xt.animate,{children:e.map(g=>(0,Jo.jsx)(xt.div,{initial:{opacity:0,Jo:10},animate:{opacity:1,Jo:0},children:(0,Jo.jsx)(Za,{from:g.role,children:(0,Jo.jsx)(ei,{variant:"contained",children:Xa({message:g,addToolResult:p??(()=>{}),status:C,messages:e})})},g.id)},g.id))}),B&&(0,Jo.jsxs)(xt.div,{initial:{opacity:0,Jo:10},animate:{opacity:1,Jo:0},exit:{opacity:0,Jo:-10},className:"flex gap-3",children:[(0,Jo.jsx)(dt,{className:"h-8 w-8",children:(0,Jo.jsx)(pt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Jo.jsx)(ai.Bot,{className:"h-4 w-4"})})}),(0,Jo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Jo.jsx)(Da,{capabilities:n,isOpen:B,onToggle:()=>Y(!B),onActionSelect:K,className:"w-full"})})]}),o&&(0,Jo.jsxs)(xt.div,{initial:{opacity:0,Jo:10},animate:{opacity:1,Jo:0},className:"flex gap-3",children:[(0,Jo.jsx)(dt,{className:"h-8 w-8",children:(0,Jo.jsx)(pt,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Jo.jsx)(ai.Bot,{className:"h-4 w-4"})})}),(0,Jo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Jo.jsxs)("div",{className:"flex space-Jo-1",children:[(0,Jo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Jo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Jo.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Jo.jsx)("div",{ref:k})]}),i.length>0&&(0,Jo.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Jo.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(g=>(0,Jo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[A(g.file.type),(0,Jo.jsx)("span",{className:"text-sm font-medium",children:g.file.name}),(0,Jo.jsx)("span",{className:"text-xs text-muted-foreground",children:U(g.file.size)}),(0,Jo.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>R(g.id),className:"h-6 w-6 p-0",children:(0,Jo.jsx)(ai.Jo,{className:"h-4 w-4"})})]},g.id))})}),(0,Jo.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Jo.jsxs)("div",{className:"flex gap-3",children:[(0,Jo.jsx)(Dt,{value:t,onChange:g=>c(g.target.value),onKeyPress:u,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),s&&(0,Jo.jsx)(S,{variant:"outline",size:"icon",onClick:()=>I.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Jo.jsx)(ai.Paperclip,{className:"h-4 w-4"})}),(0,Jo.jsx)(S,{onClick:h,disabled:!t.trim()&&i.length===0||o,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Jo.jsx)(ai.Send,{className:"h-4 w-4"})})]}),(0,Jo.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Jo.jsxs)(S,{onClick:()=>Y(!B),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Jo.jsx)(ai.Menu,{className:"h-3 w-3 mr-1"}),B?"Hide":"Show"," Capabilities"]}),(0,Jo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[ie().map((g,H)=>(0,Jo.jsx)(S,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>K(g.id,q),children:g.label},`context-${g.id}`)),ie().length===0&&W().map((g,H)=>(0,Jo.jsx)(S,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:g.action,children:g.label},`suggestion-${H}`)),(0,Jo.jsx)(S,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:$,children:"Debug"})]})]}),s&&(0,Jo.jsx)("input",{ref:I,type:"file",multiple:!0,onChange:E,className:"hidden"})]})]})}function nt({aiConfig:e,useCustomChat:t,enableAI:o=!0,messages:a=[],businessUnits:n=[],capabilities:i=[],sidebarItems:r=[],notifications:s=[],sessions:c=[],onNewChat:p,onSessionSelect:h,onSessionDelete:u,onSessionEdit:v=()=>{},onBusinessUnitChange:R=()=>{},onNotificationRemove:T=()=>{},onRemoveAll:N=()=>{},onActionClick:C=()=>{},onSearch:k=d=>console.log("Search query:",d),initialTeam:L="design",currentSession:I=null,showCapabilities:B=!0,title:Y="Digital Colleagues",enableFileUpload:q=!0,maxFileSize:de=10,allowedFileTypes:ie=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:W="/headerlogo.png",appName:K="Nuvia",tagline:pe="AI-Powered Workspace",actionIcon:E=(0,Jo.jsx)(ai.Users,{className:"mr-2 h-4 w-4"}),actionText:Oe="Collaborate",sidebarInitiallyClosed:xe=!1}){let d={...e,onError:F=>{A?.setMessages(ue=>[...ue,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:F.message}]}]),console.error("Error in CopilotInterface:",F)}},U=(0,Eo.useChat)(d||{}),A=o?t||U:null,[me,$]=(0,Ct.useState)(""),[g,H]=(0,Ct.useState)(!1),Ce=A?.messages||a,Me=me,ii=A?.status==="submitted"||g,ri=A?.addToolResult?(F,ue,te)=>{A.addToolResult({tool:ue,toolCallId:F,output:te}),console.log("Tool result added:",{toolCallId:F,tool:ue,output:te}),A.sendMessage()}:()=>{console.log("addToolResult not available")},Nt=n||[],ni={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[si,li]=(0,Ct.useState)(()=>Nt.length===0?ni:Nt.find(F=>F.id===L)||Nt[0]),[kt,Mt]=(0,Ct.useState)([]),[ci,di]=(0,Ct.useState)(!1),pi=F=>{if(!F||!q)return;let ue=[];Array.from(F).forEach(te=>{if(te.size>de*1024*1024){alert(`File ${te.name} is too large. Maximum size is ${de}MB.`);return}if(ie.length>0&&!ie.some(Bt=>te.type.match(Bt))){alert(`File type ${te.type} is not allowed.`);return}let Uo={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:te,status:"pending",progress:0};if(te.type.startsWith("image/")){let Bt=new FileReader;Bt.onload=bi=>{Mt(vi=>vi.map(oo=>oo.id===Uo.id?{...oo,preview:bi.target?.result}:oo))},Bt.readAsDataURL(te)}ue.push(Uo)}),Mt(te=>[...te,...ue])},mi=F=>{Mt(ue=>ue.filter(te=>te.id!==F))},zo=()=>{if(!(!Me.trim()&&kt.length===0)){if(A){let F=kt.length>0?ui(kt.map(ue=>ue.file)):void 0;A.sendMessage({text:Me,files:F},{body:{timestamp:Date.now()}}),$("")}else console.log("Message to send:",Me),console.log("Files to upload:",kt),$(""),H(!0),setTimeout(()=>{H(!1)},1500);Mt([])}},ui=F=>{let ue=new DataTransfer;return F.forEach(te=>ue.items.add(te)),ue.files},gi=F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),zo())},fi=F=>{$(F)};return(0,Jo.jsx)(ka,{sidebarItems:r||[],title:Y,notifications:s||[],businessUnits:Nt,currentBusinessUnit:si,onBusinessUnitChange:F=>{F&&(li(F),R?.(F))},onSearch:k,showTabs:!1,onActionClick:C,actionIcon:E,actionText:Oe,onNotificationRemove:T,onRemoveAll:N,logo:W,appName:K,tagline:pe,sidebarInitiallyClosed:xe,children:(0,Jo.jsx)(to.AnimatePresence,{mode:"wait",children:(0,Jo.jsx)(to.motion.div,{className:"flex-1 h-full",initial:{opacity:0,Jo:10},animate:{opacity:1,Jo:0},exit:{opacity:0,Jo:-10},transition:{duration:.2},children:(0,Jo.jsxs)("div",{className:"h-full flex",children:[(0,Jo.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,Jo.jsx)(Pa,{sessions:c||[],currentSession:I,teams:Nt,onNewChat:p,onSessionSelect:h,onSessionEdit:v,onSessionDelete:u})}),(0,Jo.jsx)("div",{className:"flex-1 h-full p-2",children:(0,Jo.jsx)(ti,{messages:Ce||[],input:Me,isTyping:ii,currentSessionTitle:I?.title,capabilities:i||[],onInputChange:fi,addToolResult:ri,onSendMessage:zo,onKeyPress:gi,fileUploads:kt,isDragOver:ci,enableFileUpload:q,onFileUpload:pi,onRemoveFile:mi,onDragOver:di})})]})},"chat-interface")})})}var wt=[{id:"1",title:"AI Assistant Chat",lastMessage:"How can I help you today?"}];function Br(){return(0,Jo.jsx)(nt,{businessUnits:Le,capabilities:at,sidebarItems:Xe,notifications:Ye,sessions:wt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"AI-Powered Copilot"})}function Lr(){return(0,Jo.jsx)(nt,{aiConfig:{onError:e=>console.error("Chat error:",e)},businessUnits:Le,capabilities:at,sidebarItems:Xe,notifications:Ye,sessions:wt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Custom AI Copilot"})}function Er(){return(0,Jo.jsx)(nt,{enableAI:!1,messages:[{id:"1",role:"assistant",parts:[{type:"text",text:"This is demo mode - no AI involved!"}]}],businessUnits:Le,capabilities:at,sidebarItems:Xe,notifications:Ye,sessions:wt,onNewChat:()=>console.log("New chat started"),onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Demo Copilot"})}function zr(){let e=(0,Eo.useChat)({onError:t=>console.error("Custom chat error:",t)});return(0,Jo.jsx)(nt,{useCustomChat:e,businessUnits:Le,capabilities:at,sidebarItems:Xe,notifications:Ye,sessions:wt,onNewChat:()=>{e.setMessages([]),console.log("New chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Advanced AI Copilot"})}function Ur(){return(0,Jo.jsx)(nt,{sidebarInitiallyClosed:!0,businessUnits:Le,capabilities:at,sidebarItems:Xe,notifications:Ye,sessions:wt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Focused AI Chat"})}function Hr(){let e=(0,Eo.useChat)({onError:t=>console.error("File upload chat error:",t),onFinish:t=>console.log("Message with files completed:",t)});return(0,Jo.jsx)(nt,{useCustomChat:e,enableAI:!0,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["image/*","text/*","application/pdf"],businessUnits:Le,capabilities:at,sidebarItems:Xe,notifications:Ye,sessions:wt,onNewChat:()=>{e.setMessages([]),console.log("New file upload chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"AI Copilot with File Uploads"})}0&&(module.exports={AdvancedAICopilot,CustomAICopilot,DemoCopilot,FileUploadAICopilot,FocusedChatCopilot,SimpleAICopilot});
21
+ ${i?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
22
+ `,children:"Cancel"})]})]}):null};var Ta=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=xo.default.useState(!0),[r,i]=xo.default.useState(null),s=()=>{o(e.toolCallId,e.type,"Approved"),n(!1),i("approve")},c=()=>{o(e.toolCallId,e.type,"Denied"),n(!1),i("deny")};switch(e.state){case"input-available":return(0,$o.jsxs)("div",{className:"mb-2",children:[(0,$o.jsx)(Pa,{isOpen:a,onApprove:s,onDeny:c,onClose:()=>n(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,$o.jsxs)($o.Fragment,{children:[r==="approve"&&(0,$o.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$o.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,$o.jsx)("svg",{className:"$o-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),r==="deny"&&(0,$o.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$o.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,$o.jsx)("svg",{className:"$o-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,$o.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);case"output-available":return(0,$o.jsxs)($o.Fragment,{children:[e.output==="approve"&&(0,$o.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$o.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,$o.jsx)("svg",{className:"$o-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),e.output==="deny"&&(0,$o.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,$o.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,$o.jsx)("svg",{className:"$o-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,$o.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]});default:return null}};var Co=require("@radix-ui/react-use-controllable-state");var mt=V(require("@radix-ui/react-collapsible")),ut=mt.Root,gt=mt.CollapsibleTrigger,at=mt.CollapsibleContent;var Sa=require("streamdown"),qe=(0,bt.memo)(({className:e,...t})=>(0,$o.jsx)(Sa.Streamdown,{className:l("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);qe.displayName="Response";var Aa=(0,bt.createContext)(null),vr=()=>{let e=(0,bt.useContext)(Aa);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},hr=1e3,yr=1e3,wo=(0,bt.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:n,duration:r,children:i,...s})=>{let[c,m]=(0,Co.useControllableState)({prop:o,defaultProp:a,onChange:n}),[b,v]=(0,Co.useControllableState)({prop:r,defaultProp:0}),[f,R]=(0,bt.useState)(!1),[D,w]=(0,bt.useState)(null);(0,bt.useEffect)(()=>{t?D===null&&w(Date.now()):D!==null&&(v(Math.ceil((Date.now()-D)/yr)),w(null))},[t,D,v]),(0,bt.useEffect)(()=>{if(a&&!t&&c&&!f){let N=setTimeout(()=>{m(!1),R(!0)},hr);return()=>clearTimeout(N)}},[t,c,a,m,f]);let x=N=>{m(N)};return(0,$o.jsx)(Aa.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:m,duration:b},children:(0,$o.jsx)(ut,{className:l("not-prose mb-4",e),onOpenChange:x,open:c,...s,children:i})})}),xr=(e,t)=>e||t===0?(0,$o.jsx)("$o",{children:"Thinking..."}):t===void 0?(0,$o.jsx)("$o",{children:"Thought for a few seconds"}):(0,$o.jsxs)("$o",{children:["Thought for ",t," seconds"]}),No=(0,bt.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,duration:r}=vr();return(0,$o.jsx)(gt,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)($t.BrainIcon,{className:"size-4"}),xr(a,r),(0,$o.jsx)($t.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),ko=(0,bt.memo)(({className:e,children:t,...o})=>(0,$o.jsx)(at,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,$o.jsx)(qe,{className:"grid gap-2",children:t})}));wo.displayName="Reasoning";No.displayName="ReasoningTrigger";ko.displayName="ReasoningContent";var Po=require("shiki"),Cr=(0,bt.createContext)({code:""}),wr={name:"line-numbers",line(e,t){e.children.unshift({type:"element",tagName:"span",properties:{className:["inline-block","min-w-10","mr-4","text-right","select-none","text-muted-foreground"]},children:[{type:"text",value:String(t)}]})}};async function Nr(e,t,o=!1){let a=o?[wr]:[];return await Promise.all([(0,Po.codeToHtml)(e,{lang:t,theme:"one-light",transformers:a}),(0,Po.codeToHtml)(e,{lang:t,theme:"one-dark-pro",transformers:a})])}var _t=({code:e,language:t,showLineNumbers:o=!1,className:a,children:n,...r})=>{let[i,s]=(0,bt.useState)(""),[c,m]=(0,bt.useState)(""),b=(0,bt.useRef)(!1);return(0,bt.useEffect)(()=>(Nr(e,t,o).then(([v,f])=>{b.current||(s(v),m(f),b.current=!0)}),()=>{b.current=!1}),[e,t,o]),(0,$o.jsx)(Cr.Provider,{value:{code:e},children:(0,$o.jsx)("div",{className:l("group relative w-full overflow-hidden rounded-md border bg-background text-foreground",a),...r,children:(0,$o.jsxs)("div",{className:"relative",children:[(0,$o.jsx)("div",{className:"overflow-hidden dark:hidden [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:$o-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",dangerouslySetInnerHTML:{__html:i}}),(0,$o.jsx)("div",{className:"hidden overflow-hidden dark:block [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:$o-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",dangerouslySetInnerHTML:{__html:c}}),n&&(0,$o.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:n})]})})})};var Ba=({className:e,...t})=>(0,$o.jsx)(ut,{className:l("not-prose mb-4 w-full rounded-md border",e),...t}),kr=e=>{let t={"input-streaming":"Pending","input-available":"Running","approval-requested":"Awaiting Approval","approval-responded":"Responded","output-available":"Completed","output-error":"Error","output-denied":"Denied"};return(0,$o.jsxs)(be,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,$o.jsx)(ii.CircleIcon,{className:"size-4"}),"input-available":(0,$o.jsx)(ii.ClockIcon,{className:"size-4 animate-pulse"}),"approval-requested":(0,$o.jsx)(ii.ClockIcon,{className:"size-4 text-yellow-600"}),"approval-responded":(0,$o.jsx)(ii.CheckCircleIcon,{className:"size-4 text-blue-600"}),"output-available":(0,$o.jsx)(ii.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,$o.jsx)(ii.XCircleIcon,{className:"size-4 text-red-600"}),"output-denied":(0,$o.jsx)(ii.XCircleIcon,{className:"size-4 text-orange-600"})}[e],t[e]]})},La=({className:e,title:t,type:o,state:a,...n})=>(0,$o.jsxs)(gt,{className:l("flex w-full items-center justify-between gap-4 $o-3",e),...n,children:[(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$o.jsx)(ii.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,$o.jsx)("span",{className:"font-medium text-sm",children:t??o.split("-").slice(1).join("-")}),kr(a)]}),(0,$o.jsx)(ii.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Ea=({className:e,...t})=>(0,$o.jsx)(at,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),za=({className:e,input:t,...o})=>(0,$o.jsxs)("div",{className:l("space-y-2 overflow-hidden $o-4",e),...o,children:[(0,$o.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,$o.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,$o.jsx)(_t,{code:JSON.stringify(t,null,2),language:"json"})})]}),Ua=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let n=(0,$o.jsx)("div",{children:t});return typeof t=="object"&&!(0,bt.isValidElement)(t)?n=(0,$o.jsx)(_t,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(n=(0,$o.jsx)(_t,{code:t,language:"json"})),(0,$o.jsxs)("div",{className:l("space-y-2 $o-4",e),...a,children:[(0,$o.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,$o.jsxs)("div",{className:l("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,$o.jsx)("div",{children:o}),n]})]})};var Ha=(0,bt.createContext)(null),Pr=()=>{let e=(0,bt.useContext)(Ha);if(!e)throw new Error("ColleagueHandoff components must be used within ColleagueHandoff");return e},Tr=1e3,Dr=1e3,Do=(0,bt.memo)(({className:e,isStreaming:t=!1,name:o="Digital Colleague",open:a,defaultOpen:n=!0,onOpenChange:r,duration:i,children:s,...c})=>{let[m,b]=(0,Co.useControllableState)({prop:a,defaultProp:n,onChange:r}),[v,f]=(0,Co.useControllableState)({prop:i,defaultProp:0}),[R,D]=(0,bt.useState)(!1),[w,x]=(0,bt.useState)(null);(0,bt.useEffect)(()=>{t?w===null&&x(Date.now()):w!==null&&(f(Math.ceil((Date.now()-w)/Dr)),x(null))},[t,w,f]),(0,bt.useEffect)(()=>{if(n&&!t&&m&&!R){let B=setTimeout(()=>{b(!1),D(!0)},Tr);return()=>clearTimeout(B)}},[t,m,n,b,R]);let N=B=>{b(B)};return(0,$o.jsx)(Ha.Provider,{value:{isStreaming:t,name:o,isOpen:m,setIsOpen:b,duration:v},children:(0,$o.jsx)(ut,{className:l("not-prose mb-4",e),onOpenChange:N,open:m,...c,children:s})})}),Sr=(e,t,o)=>e||o===0?(0,$o.jsxs)("$o",{children:["Asking our ",t,"..."]}):o===void 0?(0,$o.jsxs)("$o",{children:["Got an answer from our ",t]}):(0,$o.jsxs)("$o",{children:["Got an answer from our ",t," in ",o," seconds"]}),So=(0,bt.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,name:r,duration:i}=Pr();return(0,$o.jsx)(gt,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,$o.jsxs)($o.Fragment,{children:[(0,$o.jsx)(ii.Users,{className:"size-4"}),Sr(a,r,i),(0,$o.jsx)(ii.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),Ro=(0,bt.memo)(({className:e,children:t,...o})=>(0,$o.jsx)(at,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,$o.jsx)(qe,{className:"grid gap-2",children:t})})),Ao=(0,bt.memo)(({className:e,children:t,...o})=>(0,$o.jsx)(at,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,$o.jsx)(qe,{className:"grid gap-2",children:t})}));Do.displayName="ColleagueHandoff";So.displayName="ColleagueHandoffTrigger";Ro.displayName="ColleagueHandoffContent";Ao.displayName="ColleagueHandoffQuery";var Dt=require("use-stick-to-bottom"),Oa=({className:e,...t})=>(0,$o.jsx)(Dt.StickToBottom,{className:l("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),Va=({className:e,...t})=>(0,$o.jsx)(Dt.StickToBottom.Content,{className:l("flex flex-col gap-8 $o-4",e),...t}),Wa=({className:e,title:t="No messages yet",description:o="Start a conversation to see messages here",icon:a,children:n,...r})=>(0,$o.jsx)("div",{className:l("flex size-full flex-col items-center justify-center gap-3 $o-8 text-center",e),...r,children:n??(0,$o.jsxs)($o.Fragment,{children:[a&&(0,$o.jsx)("div",{className:"text-muted-foreground",children:a}),(0,$o.jsxs)("div",{className:"space-y-1",children:[(0,$o.jsx)("h3",{className:"font-medium text-sm",children:t}),o&&(0,$o.jsx)("$o",{className:"text-muted-foreground text-sm",children:o})]})]})}),Ga=({className:e,...t})=>{let{isAtBottom:o,scrollToBottom:a}=(0,Dt.useStickToBottomContext)(),n=(0,bt.useCallback)(()=>{a()},[a]);return!o&&(0,$o.jsx)(P,{className:l("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:n,size:"icon",type:"button",variant:"outline",...t,children:(0,$o.jsx)(ii.ArrowDownIcon,{className:"size-4"})})};var qa=require("date-fns");function $a({taskId:e,polling:t=!0,system:o="payload"}){let[a,n]=(0,bt.useState)(null),[r,i]=(0,bt.useState)(!1),[s,c]=(0,bt.useState)(null),m=async(v=!0)=>{if(e){v&&i(!0);try{let f=await fetch(`/api/tasks/${e}`);if(!f.ok)throw new Error(`Failed to fetch task: ${f.statusText}`);let R=await f.json();n(R)}catch(f){console.error("Error fetching task:",f),c(f instanceof Error?f:new Error("Unknown error occurred"))}finally{v&&i(!1)}}},b=()=>m(!1);return(0,bt.useEffect)(()=>{e&&m(!0);let v=null;return e&&t&&(v=setInterval(b,5e3)),()=>{v&&clearInterval(v)}},[e,t]),{task:a,loading:r,error:s}}var Rr=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Ar=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Ka({data:e}){let{id:t,system:o,fetchLatest:a,taskData:n,error:r}=e||{};if(!t)return null;let i=null,s=!0,c=r,m=a!==void 0?a:!0;if(i=n||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:a,system:o,fetchLatest:m,taskData:i,error:c}),m){let{task:R,loading:D,error:w}=$a({taskId:t,system:o});i=R,s=D,c=w}else s=!1;let b=Rr(i?.status||"todo"),v=Ar(i?.status||"todo"),f=i?.dateLogged||new Date().toISOString();try{let R=new Date(i?.dateLogged||"");isNaN(R.getTime())||(f=(0,qa.formatDistanceToNow)(R,{addSuffix:!0}))}catch{}return(0,$o.jsxs)(ye,{className:l("w-full max-w-md shadow-md",c&&"border border-destructive"),children:[(0,$o.jsxs)(ze,{className:"pb-2",children:[(0,$o.jsxs)("div",{className:"flex justify-between items-start",children:[(0,$o.jsx)(Ue,{className:"text-lg font-semibold",children:s?"Loading...":i?.name||"Task"}),(0,$o.jsx)(be,{className:`${b}`,children:v})]}),i?.project&&(0,$o.jsxs)(bo,{className:"text-sm text-gray-500",children:["Project: ",i.project.name]})]}),(0,$o.jsx)(De,{className:"pb-2",children:s?(0,$o.jsx)("div",{className:"animate-pulse $o-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,$o.jsx)("$o",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,$o.jsx)("$o",{className:"text-sm text-foreground",children:i?.description||"......."})}),(0,$o.jsx)(Tt,{className:"pt-2 flex items-center justify-between",children:(0,$o.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,$o.jsx)(ii.Clock,{className:"$o-3 w-3 mr-1"}),(0,$o.jsxs)("span",{children:["Created ",f]}),(0,$o.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,$o.jsxs)("span",{children:["Task #",t]})]})})]})}function Xa({artefact:e,taskId:t,taskData:o,loading:a=!1,error:n=null}){let r=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},i=r.dateLogged;try{let s=new Date(r.dateLogged);isNaN(s.getTime())||(i=(0,qa.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,$o.jsxs)(ye,{className:"w-full max-w-md shadow-md",children:[(0,$o.jsx)(ze,{className:"pb-2",children:(0,$o.jsx)("div",{className:"flex justify-between items-start",children:(0,$o.jsx)(Ue,{className:"text-lg font-semibold",children:a?"Loading...":r.name})})}),(0,$o.jsx)(De,{className:"pb-2",children:a?(0,$o.jsx)("div",{className:"animate-pulse $o-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,$o.jsx)("$o",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,$o.jsx)("$o",{className:"text-sm text-foreground",children:e})}),(0,$o.jsx)(Tt,{className:"pt-2 flex items-center justify-between",children:(0,$o.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,$o.jsx)(ii.Clock,{className:"$o-3 w-3 mr-1"}),(0,$o.jsxs)("span",{children:["Created ",i]}),(0,$o.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,$o.jsxs)("span",{children:["Task #",r.id]})]})})]})}var Ir=e=>e.startsWith("image/")?(0,$o.jsx)(ii.Image,{className:"$o-4 w-4"}):e.startsWith("text/")?(0,$o.jsx)(ii.FileText,{className:"$o-4 w-4"}):(0,$o.jsx)(ii.File,{className:"$o-4 w-4"}),Ya=({message:e,addToolResult:t,status:o,messages:a})=>e.parts.map((n,r)=>{if(n.type==="text")return(0,$o.jsx)(qe,{children:n.text},`${r}`);if(n.type==="file"){let i=n;return(0,$o.jsx)("div",{className:"mb-2 $o-2 bg-background/50 rounded-lg",children:(0,$o.jsxs)("div",{className:"flex items-center gap-2",children:[Ir(i.mediaType||"application/octet-stream"),(0,$o.jsx)("div",{className:"flex-1 min-w-0",children:(0,$o.jsx)("$o",{className:"text-sm font-medium truncate",children:i.filename||i.url?.split("/").pop()||"File"})}),i.url&&(0,$o.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(i.url,"_blank"),className:"$o-8 w-8 $o-0",children:(0,$o.jsx)(ii.Download,{className:"$o-4 w-4"})})]})},r)}if(n.type.startsWith("tool-")){let i=n,s=n.type.replace("tool-","");if(n.type.startsWith("tool-dc_a2a"))return(0,$o.jsxs)(Do,{name:i?.input?.dcName||"Digital Colleague",className:"w-full",isStreaming:o==="streaming"&&r===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,$o.jsx)(So,{}),(0,$o.jsx)(Ao,{children:i?.input?.query}),(0,$o.jsx)(Ro,{children:i?.output})]},`${r}`);if(s==="task")switch(i.state){case"input-available":return(0,$o.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},r);case"output-available":return(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsx)(Ka,{data:{id:i.output?.id||i.input?.id,fetchLatest:!1,taskData:i.output||i.input}})},r);case"output-error":return(0,$o.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",i.errorText]},r);default:return null}if(n.type==="tool-requestEndpointLogin")return(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsx)(yo,{toolPart:i,index:r,addToolResult:t??(()=>{})})},r);if(n.type==="tool-authenticate")return(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsx)(yo,{toolPart:i,index:r,addToolResult:t??(()=>{})})},r);if(n.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",i),(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsx)(Ta,{toolPart:i,index:r,addToolResult:t??(()=>{})})},r);if(s==="artefact")switch(i.state){case"input-available":return(0,$o.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},r);case"output-available":return(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsx)(Xa,{artefact:i.output?.description||"",taskId:i.output?.id||i.input?.id,taskData:i.output||i.input})},r);case"output-error":return(0,$o.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",i.errorText]},r);default:return null}return(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsxs)(ye,{className:"w-full max-w-md",children:[(0,$o.jsx)(ze,{children:(0,$o.jsx)(Ue,{className:"text-lg",children:s})}),(0,$o.jsxs)(De,{children:[i.state==="input-available"&&(0,$o.jsxs)("$o",{className:"text-sm",children:["Processing ",s,"..."]}),i.state==="output-available"&&(0,$o.jsx)("pre",{className:"text-sm",children:JSON.stringify(i.output,null,2)}),i.state==="output-error"&&(0,$o.jsxs)("$o",{className:"text-sm text-red-500",children:["Error: ",i.errorText]})]})]})},r)}if(n.type.startsWith("data-")){let i=n,s=n.type.replace("data-","");return s==="reference"?(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsx)(ye,{className:"w-full",children:(0,$o.jsx)(De,{className:"$o-4",children:(0,$o.jsx)("div",{className:"space-y-2",children:i.data?.references?.map((c,m)=>(0,$o.jsxs)("div",{className:"flex items-center gap-2 $o-2 rounded-md bg-muted/50",children:[(0,$o.jsx)(be,{variant:"outline",children:c.type||"link"}),(0,$o.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$o.jsx)("$o",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,$o.jsx)("$o",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,$o.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"$o-8 w-8 $o-0",children:(0,$o.jsx)(ii.ExternalLink,{className:"$o-4 w-4"})})]},m))})})})},r):s==="menu"?(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsxs)(ye,{className:"w-full",children:[(0,$o.jsx)(ze,{children:(0,$o.jsx)(Ue,{className:"text-lg",children:i.data?.title})}),(0,$o.jsx)(De,{children:(0,$o.jsx)("div",{className:"space-y-2",children:i.data?.items?.map((c,m)=>(0,$o.jsx)(P,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,$o.jsxs)("div",{className:"text-left",children:[(0,$o.jsx)("$o",{className:"font-medium",children:c.label}),c.description&&(0,$o.jsx)("$o",{className:"text-xs text-muted-foreground",children:c.description})]})},m))})})]})},r):(0,$o.jsx)("div",{className:"mb-2",children:(0,$o.jsxs)(ye,{className:"w-full max-w-md",children:[(0,$o.jsx)(ze,{children:(0,$o.jsx)(Ue,{className:"text-lg",children:s})}),(0,$o.jsx)(De,{children:(0,$o.jsx)("pre",{className:"text-sm",children:JSON.stringify(i.data,null,2)})})]})},r)}if(n.type==="reasoning")return(0,$o.jsxs)(wo,{className:"w-full",isStreaming:o==="streaming"&&r===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,$o.jsx)(No,{}),(0,$o.jsx)(ko,{children:n.text})]},`${r}`);if(n.type==="dynamic-tool")return(0,$o.jsxs)(Ba,{defaultOpen:n.state!=="output-available",children:[(0,$o.jsx)(La,{type:`tool-${n.toolName}`,state:n.state}),(0,$o.jsxs)(Ea,{children:[(0,$o.jsx)(za,{input:n.input}),(0,$o.jsx)(Ua,{output:n.output,errorText:n.errorText})]})]},`${e.id}-${r}`)});var ei=({className:e,from:t,...o})=>(0,$o.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...o}),Mr=(0,Go.cva)("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"}}),ti=({children:e,className:t,variant:o,...a})=>(0,$o.jsx)("div",{className:l(Mr({variant:o,className:t})),...a,children:e});function oi({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:n,fileUploads:r,isDragOver:i,enableFileUpload:s,onInputChange:c,addToolResult:m,onSendMessage:b,onKeyPress:v,onFileUpload:f,onRemoveFile:R,onDragOver:D,className:w,status:x="ready"}){let N=(0,bt.useRef)(null),B=(0,bt.useRef)(null),K=(0,bt.useRef)(null),[j,Y]=(0,bt.useState)(!1),[$,ce]=(0,bt.useState)({path:[],selectedItems:[],filters:{}});(0,bt.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,bt.useEffect)(()=>{j&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[j]);let ae=()=>vo($),O=()=>{let g=[];return n.forEach(E=>{E.actions&&E.actions.forEach(xe=>{g.push({label:xe.label,action:()=>J(xe.id,{path:[E],selectedItems:[],filters:{}})})}),E.children&&E.children.forEach(xe=>{xe.type==="list"&&xe.data&&g.push({label:`View ${xe.name}`,action:()=>Y(!0)})})}),g.slice(0,5)},J=(g,E)=>{console.log("Capability action:",g,E);let xe=`Executing ${g} with context: ${JSON.stringify(E.path.map(Ie=>Ie.name))}`;Y(!1)},de=vo({path:[],selectedItems:[],filters:{}}),I=g=>{f(g.target.files),g.target.files&&(g.target.value="")},Je=g=>{g.preventDefault(),D(!0)},ke=g=>{g.preventDefault(),D(!1)},d=g=>{g.preventDefault(),D(!1),f(g.dataTransfer.files)},L=g=>{if(g===0)return"0 Bytes";let E=1024,xe=["Bytes","KB","MB","GB"],Ie=Math.floor(Math.log(g)/Math.log(E));return parseFloat((g/Math.pow(E,Ie)).toFixed(2))+" "+xe[Ie]},S=g=>g.startsWith("image/")?(0,$o.jsx)(ii.Image,{className:"$o-4 w-4"}):g.startsWith("text/")?(0,$o.jsx)(ii.FileText,{className:"$o-4 w-4"}):(0,$o.jsx)(ii.File,{className:"$o-4 w-4"}),pe={messages:e,currentSessionTitle:a,capabilities:n,currentCapabilityContext:$,contextualActions:de,getQuickSuggestions:O().map(g=>g.label)},W=()=>{navigator.clipboard.writeText(JSON.stringify(pe,null,2)),alert("Debug info copied to clipboard")};return(0,$o.jsxs)("div",{className:`$o-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${w||""}`,children:[(0,$o.jsxs)(Oa,{className:"relative flex-1 $o-full size-full",children:[(0,$o.jsx)(Va,{children:e.length===0?(0,$o.jsx)(Wa,{description:"Messages will appear here as the conversation progresses.",icon:(0,$o.jsx)(ii.MessageSquareIcon,{className:"size-6"}),title:"Start a conversation"}):e.map((g,E)=>(0,$o.jsx)(ei,{from:g.role,children:(0,$o.jsx)(ti,{children:Ya({message:g,addToolResult:m??(()=>{}),status:x,messages:e})})},E))}),(0,$o.jsx)(Ga,{})]}),r.length>0&&(0,$o.jsx)("div",{className:"$o-4 border-t bg-muted/10",children:(0,$o.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(g=>(0,$o.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg $o-2 border",children:[S(g.file.type),(0,$o.jsx)("span",{className:"text-sm font-medium",children:g.file.name}),(0,$o.jsx)("span",{className:"text-xs text-muted-foreground",children:L(g.file.size)}),(0,$o.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>R(g.id),className:"$o-6 w-6 $o-0",children:(0,$o.jsx)(ii.$o,{className:"$o-4 w-4"})})]},g.id))})}),(0,$o.jsxs)("div",{className:"border rounded-2xl $o-4 bg-muted/20",children:[(0,$o.jsxs)("div",{className:"flex gap-3",children:[(0,$o.jsx)(wt,{value:t,onChange:g=>c(g.target.value),onKeyPress:v,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),s&&(0,$o.jsx)(P,{variant:"outline",size:"icon",onClick:()=>K.current?.click(),className:"rounded-2xl $o-10 w-10 shadow-sm",children:(0,$o.jsx)(ii.Paperclip,{className:"$o-4 w-4"})}),(0,$o.jsx)(P,{onClick:b,disabled:!t.trim()&&r.length===0||o,size:"icon",className:"rounded-2xl $o-10 w-10 shadow-sm",children:(0,$o.jsx)(ii.Send,{className:"$o-4 w-4"})})]}),(0,$o.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,$o.jsxs)(P,{onClick:()=>Y(!j),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,$o.jsx)(ii.Menu,{className:"$o-3 w-3 mr-1"}),j?"Hide":"Show"," Capabilities"]}),(0,$o.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[ae().map((g,E)=>(0,$o.jsx)(P,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>J(g.id,$),children:g.label},`context-${g.id}`)),ae().length===0&&O().map((g,E)=>(0,$o.jsx)(P,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:g.action,children:g.label},`suggestion-${E}`)),(0,$o.jsx)(P,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:W,children:"Debug"})]})]}),s&&(0,$o.jsx)("input",{ref:K,type:"file",multiple:!0,onChange:I,className:"hidden"})]})]})}function it({aiConfig:e,useCustomChat:t,enableAI:o=!0,messages:a=[],businessUnits:n=[],capabilities:r=[],sidebarItems:i=[],notifications:s=[],sessions:c=[],onNewChat:m,onSessionSelect:b,onSessionDelete:v,onSessionEdit:f=()=>{},onBusinessUnitChange:R=()=>{},onNotificationRemove:D=()=>{},onRemoveAll:w=()=>{},onActionClick:x=()=>{},onSearch:N=d=>console.log("Search query:",d),initialTeam:B="design",currentSession:K=null,showCapabilities:j=!0,title:Y="Digital Colleagues",enableFileUpload:$=!0,maxFileSize:ce=10,allowedFileTypes:ae=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:O="/headerlogo.png",appName:J="Nuvia",tagline:de="AI-Powered Workspace",actionIcon:I=(0,$o.jsx)(ii.Users,{className:"mr-2 $o-4 w-4"}),actionText:Je="Collaborate",sidebarInitiallyClosed:ke=!1}){let d={...e,onError:U=>{S?.setMessages(me=>[...me,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:U.message}]}]),console.error("Error in CopilotInterface:",U)}},L=(0,Io.useChat)(d||{}),S=o?t||L:null,[pe,W]=(0,bt.useState)(""),[g,E]=(0,bt.useState)(!1),xe=S?.messages||a,Ie=pe,ri=S?.status==="submitted"||g,ni=S?.addToolResult?(U,me,Z)=>{S.addToolResult({tool:me,toolCallId:U,output:Z}),console.log("Tool result added:",{toolCallId:U,tool:me,output:Z}),S.sendMessage()}:()=>{console.log("addToolResult not available")},ht=n||[],si={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\$o{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[li,ci]=(0,bt.useState)(()=>ht.length===0?si:ht.find(U=>U.id===B)||ht[0]),[yt,St]=(0,bt.useState)([]),[di,pi]=(0,bt.useState)(!1),mi=U=>{if(!U||!$)return;let me=[];Array.from(U).forEach(Z=>{if(Z.size>ce*1024*1024){alert(`File ${Z.name} is too large. Maximum size is ${ce}MB.`);return}if(ae.length>0&&!ae.some(Rt=>Z.type.match(Rt))){alert(`File type ${Z.type} is not allowed.`);return}let Bo={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:Z,status:"pending",progress:0};if(Z.type.startsWith("image/")){let Rt=new FileReader;Rt.onload=vi=>{St(hi=>hi.map(Qt=>Qt.id===Bo.id?{...Qt,preview:vi.target?.result}:Qt))},Rt.readAsDataURL(Z)}me.push(Bo)}),St(Z=>[...Z,...me])},ui=U=>{St(me=>me.filter(Z=>Z.id!==U))},Mo=()=>{if(!(!Ie.trim()&&yt.length===0)){if(S){let U=yt.length>0?gi(yt.map(me=>me.file)):void 0;S.sendMessage({text:Ie,files:U},{body:{timestamp:Date.now()}}),W("")}else console.log("Message to send:",Ie),console.log("Files to upload:",yt),W(""),E(!0),setTimeout(()=>{E(!1)},1500);St([])}},gi=U=>{let me=new DataTransfer;return U.forEach(Z=>me.items.add(Z)),me.files},fi=U=>{U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),Mo())},bi=U=>{W(U)};return(0,$o.jsx)(xa,{sidebarItems:i||[],title:Y,notifications:s||[],businessUnits:ht,currentBusinessUnit:li,onBusinessUnitChange:U=>{U&&(ci(U),R?.(U))},onSearch:N,showTabs:!1,onActionClick:x,actionIcon:I,actionText:Je,onNotificationRemove:D,onRemoveAll:w,logo:O,appName:J,tagline:de,sidebarInitiallyClosed:ke,children:(0,$o.jsx)(Jt.AnimatePresence,{mode:"wait",children:(0,$o.jsx)(Jt.motion.div,{className:"flex-1 $o-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,$o.jsxs)("div",{className:"$o-full flex",children:[(0,$o.jsx)("div",{className:"w-80 flex-shrink-0 $o-full $o-2",children:(0,$o.jsx)(Ca,{sessions:c||[],currentSession:K,teams:ht,onNewChat:m,onSessionSelect:b,onSessionEdit:f,onSessionDelete:v})}),(0,$o.jsx)("div",{className:"flex-1 $o-full $o-2",children:(0,$o.jsx)(oi,{messages:xe||[],input:Ie,isTyping:ri,currentSessionTitle:K?.title,capabilities:r||[],onInputChange:bi,addToolResult:ni,onSendMessage:Mo,onKeyPress:fi,fileUploads:yt,isDragOver:di,enableFileUpload:$,onFileUpload:mi,onRemoveFile:ui,onDragOver:pi})})]})},"chat-interface")})})}var vt=[{id:"1",title:"AI Assistant Chat",lastMessage:"How can I help you today?"}];function Br(){return(0,$o.jsx)(it,{businessUnits:Be,capabilities:ot,sidebarItems:Qe,notifications:Xe,sessions:vt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"AI-Powered Copilot"})}function Lr(){return(0,$o.jsx)(it,{aiConfig:{onError:e=>console.error("Chat error:",e)},businessUnits:Be,capabilities:ot,sidebarItems:Qe,notifications:Xe,sessions:vt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Custom AI Copilot"})}function Er(){return(0,$o.jsx)(it,{enableAI:!1,messages:[{id:"1",role:"assistant",parts:[{type:"text",text:"This is demo mode - no AI involved!"}]}],businessUnits:Be,capabilities:ot,sidebarItems:Qe,notifications:Xe,sessions:vt,onNewChat:()=>console.log("New chat started"),onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Demo Copilot"})}function zr(){let e=(0,Io.useChat)({onError:t=>console.error("Custom chat error:",t)});return(0,$o.jsx)(it,{useCustomChat:e,businessUnits:Be,capabilities:ot,sidebarItems:Qe,notifications:Xe,sessions:vt,onNewChat:()=>{e.setMessages([]),console.log("New chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Advanced AI Copilot"})}function Ur(){return(0,$o.jsx)(it,{sidebarInitiallyClosed:!0,businessUnits:Be,capabilities:ot,sidebarItems:Qe,notifications:Xe,sessions:vt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Focused AI Chat"})}function Hr(){let e=(0,Io.useChat)({onError:t=>console.error("File upload chat error:",t),onFinish:t=>console.log("Message with files completed:",t)});return(0,$o.jsx)(it,{useCustomChat:e,enableAI:!0,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["image/*","text/*","application/pdf"],businessUnits:Be,capabilities:ot,sidebarItems:Qe,notifications:Xe,sessions:vt,onNewChat:()=>{e.setMessages([]),console.log("New file upload chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"AI Copilot with File Uploads"})}0&&(module.exports={AdvancedAICopilot,CustomAICopilot,DemoCopilot,FileUploadAICopilot,FocusedChatCopilot,SimpleAICopilot});