cortex-react-components 2.28.4 → 2.29.0-beta.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 (281) hide show
  1. package/dist/{chunk-K4MFTVNB.mjs → chunk-2AZMG5X5.mjs} +1 -1
  2. package/dist/{chunk-CLGBBNRB.mjs → chunk-2LQLKZYT.mjs} +1 -1
  3. package/dist/{chunk-2HWSTGAP.mjs → chunk-2OGUZJVD.mjs} +1 -1
  4. package/dist/{chunk-VBSFVJM5.mjs → chunk-2UVHBGOC.mjs} +1 -1
  5. package/dist/{chunk-UENQZNU3.mjs → chunk-2ZBHHV3P.mjs} +1 -1
  6. package/dist/{chunk-D6PIOACL.mjs → chunk-3MK7GU65.mjs} +1 -1
  7. package/dist/{chunk-4IVQWIYV.mjs → chunk-3PAS4AKZ.mjs} +1 -1
  8. package/dist/{chunk-R4SE63GR.mjs → chunk-3W5SE2HO.mjs} +1 -1
  9. package/dist/{chunk-2TUBS2HM.mjs → chunk-4DESBE4R.mjs} +1 -1
  10. package/dist/{chunk-HD6E7KI2.mjs → chunk-4KVVVRGU.mjs} +1 -1
  11. package/dist/{chunk-COBOHCBL.mjs → chunk-5G7LCLOY.mjs} +1 -1
  12. package/dist/{chunk-75XBZHOC.mjs → chunk-5ISPA3SI.mjs} +1 -1
  13. package/dist/{chunk-QOZ2O3FG.mjs → chunk-5WTGNFUL.mjs} +1 -1
  14. package/dist/{chunk-CK2TD4BY.mjs → chunk-6A2O63AU.mjs} +1 -1
  15. package/dist/{chunk-VGWDYD6Z.mjs → chunk-6LJCQVKZ.mjs} +1 -1
  16. package/dist/{chunk-TKY52BNP.mjs → chunk-7HIL4GBK.mjs} +1 -1
  17. package/dist/{chunk-CTAIR3TE.mjs → chunk-7HLSAUWP.mjs} +1 -1
  18. package/dist/{chunk-MS7YIAWP.mjs → chunk-ABWLO5GA.mjs} +1 -1
  19. package/dist/{chunk-RUZVSK25.mjs → chunk-BEUDMDIW.mjs} +1 -1
  20. package/dist/{chunk-GJHJUG72.mjs → chunk-BLOKJ7Y2.mjs} +1 -1
  21. package/dist/{chunk-LLED3RQS.mjs → chunk-BQJDTDBP.mjs} +1 -1
  22. package/dist/{chunk-UJW3KUW3.mjs → chunk-C6RV2I5S.mjs} +1 -1
  23. package/dist/{chunk-P7S6XFU4.mjs → chunk-CGL3R3BQ.mjs} +1 -1
  24. package/dist/{chunk-SNTLCFXF.mjs → chunk-DDQVEARQ.mjs} +1 -1
  25. package/dist/{chunk-FX6IXEMQ.mjs → chunk-DDYANYQB.mjs} +1 -1
  26. package/dist/{chunk-FJ2HHNPX.mjs → chunk-DLX4NQ3T.mjs} +1 -1
  27. package/dist/{chunk-SNFBF6KT.mjs → chunk-DZDMH6IZ.mjs} +1 -1
  28. package/dist/{chunk-QWFFSMKK.mjs → chunk-EDRIV2VR.mjs} +1 -1
  29. package/dist/{chunk-NPGGDQ6F.mjs → chunk-EVQAIFAP.mjs} +1 -1
  30. package/dist/{chunk-SX2LOHXX.mjs → chunk-FNOAYUJ3.mjs} +1 -1
  31. package/dist/{chunk-46N4YPMB.mjs → chunk-FOO5RONL.mjs} +1 -1
  32. package/dist/{chunk-CO6AQNZ5.mjs → chunk-G53ROINJ.mjs} +1 -1
  33. package/dist/{chunk-5EKGFFJD.mjs → chunk-G5UB3YKZ.mjs} +1 -1
  34. package/dist/{chunk-QKDYTCZC.mjs → chunk-GFYO6B7H.mjs} +1 -1
  35. package/dist/{chunk-NSMXJCXE.mjs → chunk-GLKM2IVW.mjs} +1 -1
  36. package/dist/{chunk-4USR4WTH.mjs → chunk-GMLLRSAH.mjs} +1 -1
  37. package/dist/chunk-HCHZUZUK.mjs +4 -0
  38. package/dist/{chunk-Z22NSJMF.mjs → chunk-HF33ZXKX.mjs} +1 -1
  39. package/dist/{chunk-EOXVYLPB.mjs → chunk-HFND7WDK.mjs} +1 -1
  40. package/dist/{chunk-6NIVIZQB.mjs → chunk-I3G2R2J2.mjs} +1 -1
  41. package/dist/{chunk-MXMW65GM.mjs → chunk-IKVDX3WJ.mjs} +1 -1
  42. package/dist/{chunk-MCOHKE2T.mjs → chunk-JGKLAY6J.mjs} +1 -1
  43. package/dist/chunk-JION2IPC.mjs +4 -0
  44. package/dist/{chunk-6XUIHSKG.mjs → chunk-JKVQOOCZ.mjs} +1 -1
  45. package/dist/{chunk-NCJAMNMQ.mjs → chunk-K7NFBXL3.mjs} +1 -1
  46. package/dist/{chunk-3M5KHST3.mjs → chunk-KHJKOKJN.mjs} +1 -1
  47. package/dist/{chunk-6YHCNPFB.mjs → chunk-KOLP657S.mjs} +1 -1
  48. package/dist/{chunk-S4ES6P3Y.mjs → chunk-KRDGYYCK.mjs} +1 -1
  49. package/dist/{chunk-JDMIQLAZ.mjs → chunk-KSYES4GX.mjs} +1 -1
  50. package/dist/{chunk-AOQPH32M.mjs → chunk-LCHPGIER.mjs} +1 -1
  51. package/dist/{chunk-KX2NCNCS.mjs → chunk-LF55USCD.mjs} +1 -1
  52. package/dist/{chunk-6ZMZX5TB.mjs → chunk-LL7CRB4U.mjs} +1 -1
  53. package/dist/{chunk-VRHJOUL3.mjs → chunk-LMDGHBG2.mjs} +1 -1
  54. package/dist/{chunk-MH4YPGH4.mjs → chunk-LPCO4T25.mjs} +1 -1
  55. package/dist/{chunk-Q7KKN6MH.mjs → chunk-LRNWBTXT.mjs} +1 -1
  56. package/dist/{chunk-KY3ELFX5.mjs → chunk-M3DLWHPQ.mjs} +1 -1
  57. package/dist/{chunk-SPAOEUCG.mjs → chunk-MQ7ZFZRG.mjs} +1 -1
  58. package/dist/{chunk-KPTGYVDM.mjs → chunk-MQG7MKTK.mjs} +1 -1
  59. package/dist/{chunk-TZKQXT7Y.mjs → chunk-N25B5TQ5.mjs} +1 -1
  60. package/dist/{chunk-U3PUWUVM.mjs → chunk-NCHC4HCU.mjs} +1 -1
  61. package/dist/{chunk-FRXZ2OKW.mjs → chunk-OAK45GQL.mjs} +1 -1
  62. package/dist/{chunk-6DQ7FEQQ.mjs → chunk-ORCATWOS.mjs} +1 -1
  63. package/dist/{chunk-MUHR5KA5.mjs → chunk-PAERB6R2.mjs} +1 -1
  64. package/dist/{chunk-N52FSTLG.mjs → chunk-PG4VW7VP.mjs} +1 -1
  65. package/dist/{chunk-M2REXGQW.mjs → chunk-PKI57UXP.mjs} +1 -1
  66. package/dist/{chunk-LCSO56PM.mjs → chunk-PQYMYQXD.mjs} +1 -1
  67. package/dist/{chunk-56X4PU43.mjs → chunk-Q35D7SUU.mjs} +1 -1
  68. package/dist/{chunk-2VOOH4YJ.mjs → chunk-QDK5I675.mjs} +1 -1
  69. package/dist/{chunk-2R3MJSQ7.mjs → chunk-QHIZOLWH.mjs} +1 -1
  70. package/dist/{chunk-HSQAHQNP.mjs → chunk-QPGVTPZ4.mjs} +1 -1
  71. package/dist/{chunk-P2B3OITE.mjs → chunk-R422HRMQ.mjs} +1 -1
  72. package/dist/{chunk-F6DMXMR4.mjs → chunk-S3OBSLA5.mjs} +1 -1
  73. package/dist/{chunk-6SWKEZN6.mjs → chunk-S7SHOCHM.mjs} +1 -1
  74. package/dist/{chunk-53ERRCTV.mjs → chunk-SKTNOZL2.mjs} +1 -1
  75. package/dist/{chunk-EZC3YWSQ.mjs → chunk-SRCJSWQF.mjs} +1 -1
  76. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  77. package/dist/{chunk-LCEEFZH7.mjs → chunk-SRXU4X35.mjs} +1 -1
  78. package/dist/{chunk-CNLALZ24.mjs → chunk-T23BJQBB.mjs} +1 -1
  79. package/dist/{chunk-6PS55VJZ.mjs → chunk-T46EPXCV.mjs} +1 -1
  80. package/dist/{chunk-LJFBHY4P.mjs → chunk-TBKC2B4Z.mjs} +1 -1
  81. package/dist/{chunk-LQASBVUG.mjs → chunk-TCZNV2C2.mjs} +1 -1
  82. package/dist/{chunk-TUACRDU3.mjs → chunk-TGJ74O6U.mjs} +1 -1
  83. package/dist/{chunk-TR6RBROH.mjs → chunk-U3OEUDKT.mjs} +1 -1
  84. package/dist/{chunk-47OE4ZPY.mjs → chunk-UE66RIJN.mjs} +1 -1
  85. package/dist/{chunk-B2TBKNIJ.mjs → chunk-UG7FEEFM.mjs} +1 -1
  86. package/dist/{chunk-ZHBYZ4HE.mjs → chunk-UW65QW5M.mjs} +1 -1
  87. package/dist/{chunk-XGGWZIPM.mjs → chunk-V4OXGW5U.mjs} +1 -1
  88. package/dist/{chunk-NHEG5ZJ6.mjs → chunk-VR75QVWG.mjs} +1 -1
  89. package/dist/{chunk-DMCFEJ2C.mjs → chunk-VWHOSOCB.mjs} +1 -1
  90. package/dist/{chunk-57PJ7CHJ.mjs → chunk-WAM7RYAU.mjs} +1 -1
  91. package/dist/{chunk-2LINLX4S.mjs → chunk-WHOWQZV6.mjs} +1 -1
  92. package/dist/{chunk-MU5WPW4N.mjs → chunk-WPH2ALD6.mjs} +1 -1
  93. package/dist/{chunk-2UNIT7NC.mjs → chunk-XSPGO55P.mjs} +1 -1
  94. package/dist/{chunk-RS4WAAGI.mjs → chunk-XTUH2DJE.mjs} +1 -1
  95. package/dist/{chunk-FSCDCSVK.mjs → chunk-YCD46AKJ.mjs} +1 -1
  96. package/dist/{chunk-GS3P2V76.mjs → chunk-YONYS5B2.mjs} +1 -1
  97. package/dist/{chunk-E6NVWHRS.mjs → chunk-ZERDRART.mjs} +1 -1
  98. package/dist/{chunk-X3YJJBFJ.mjs → chunk-ZKTIH47I.mjs} +1 -1
  99. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  100. package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
  101. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  102. package/dist/components/AdvancedComponents/index.mjs +1 -1
  103. package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
  104. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  105. package/dist/components/Blocks/Banner.mjs +1 -1
  106. package/dist/components/Blocks/CallToAction.mjs +1 -1
  107. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  108. package/dist/components/Blocks/Content.mjs +1 -1
  109. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  110. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  111. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  112. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  113. package/dist/components/Blocks/index.mjs +1 -1
  114. package/dist/components/CRM/CogeBoard.mjs +1 -1
  115. package/dist/components/CRM/DealDetails.mjs +1 -1
  116. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  117. package/dist/components/CRM/index.mjs +1 -1
  118. package/dist/components/Cards/ContentCard.mjs +1 -1
  119. package/dist/components/Cards/FeatureCard.mjs +1 -1
  120. package/dist/components/Cards/PricingCard.mjs +1 -1
  121. package/dist/components/Cards/ServiceCard.mjs +1 -1
  122. package/dist/components/Cards/index.mjs +1 -1
  123. package/dist/components/Chat/ChatInterface.mjs +1 -1
  124. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  125. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  126. package/dist/components/Chat/PartTypes/Tool.mjs +1 -1
  127. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  128. package/dist/components/Chat/capability-menu.mjs +1 -1
  129. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  130. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  131. package/dist/components/Chat/demo-tests.mjs +1 -1
  132. package/dist/components/Chat/demo.mjs +1 -1
  133. package/dist/components/Chat/example-usage.mjs +1 -1
  134. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  135. package/dist/components/Chat/index.mjs +1 -1
  136. package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
  137. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  138. package/dist/components/DigitalColleagues/MainPage.js +1 -1
  139. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  140. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  141. package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
  142. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  143. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  144. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
  145. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  146. package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
  147. package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
  148. package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
  149. package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
  150. package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
  151. package/dist/components/DigitalColleagues/index.js +1 -1
  152. package/dist/components/DigitalColleagues/index.mjs +1 -1
  153. package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
  154. package/dist/components/DigitalColleagues/team-form.mjs +1 -1
  155. package/dist/components/Foundary/DashboardHeader.mjs +1 -1
  156. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  157. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  158. package/dist/components/Foundary/LandingMenu.mjs +1 -1
  159. package/dist/components/Foundary/Login.mjs +1 -1
  160. package/dist/components/Foundary/MainPage.js +1 -1
  161. package/dist/components/Foundary/MainPage.mjs +1 -1
  162. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  163. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  164. package/dist/components/Foundary/RichText/index.mjs +1 -1
  165. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  166. package/dist/components/Foundary/SearchableSelect.mjs +1 -1
  167. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  168. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  169. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  170. package/dist/components/Foundary/Views/index.mjs +1 -1
  171. package/dist/components/Foundary/colleague-card.mjs +1 -1
  172. package/dist/components/Foundary/colleague-form.mjs +1 -1
  173. package/dist/components/Foundary/colleague-type-selection.mjs +1 -1
  174. package/dist/components/Foundary/document-edit.mjs +1 -1
  175. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  176. package/dist/components/Foundary/document-preview.mjs +1 -1
  177. package/dist/components/Foundary/file-edit.mjs +1 -1
  178. package/dist/components/Foundary/foundary-clone.mjs +1 -1
  179. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  180. package/dist/components/Foundary/foundary-options.mjs +1 -1
  181. package/dist/components/Foundary/index.js +4 -4
  182. package/dist/components/Foundary/index.mjs +1 -1
  183. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  184. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  185. package/dist/components/HeaderFooter/Header.js +1 -1
  186. package/dist/components/HeaderFooter/Header.mjs +1 -1
  187. package/dist/components/HeaderFooter/HeaderDesktop.js +1 -1
  188. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  189. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  190. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  191. package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
  192. package/dist/components/HeaderFooter/index.js +1 -1
  193. package/dist/components/HeaderFooter/index.mjs +1 -1
  194. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
  195. package/dist/components/Heros/DashboardHero/index.mjs +1 -1
  196. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  197. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  198. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  199. package/dist/components/Heros/PostHero/index.mjs +1 -1
  200. package/dist/components/Heros/RenderHero.mjs +1 -1
  201. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  202. package/dist/components/Heros/index.mjs +1 -1
  203. package/dist/components/Holidays/ApproveLeave.mjs +1 -1
  204. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  205. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  206. package/dist/components/Holidays/index.mjs +1 -1
  207. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  208. package/dist/components/Layouts/Print.mjs +1 -1
  209. package/dist/components/Layouts/SlideShow.mjs +1 -1
  210. package/dist/components/Layouts/index.mjs +1 -1
  211. package/dist/components/Menus/SidebarRight.mjs +1 -1
  212. package/dist/components/Menus/index.mjs +1 -1
  213. package/dist/components/Other/index.mjs +1 -1
  214. package/dist/components/Payload/RichText/index.mjs +1 -1
  215. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  216. package/dist/components/Payload/index.mjs +1 -1
  217. package/dist/components/Projects/EpicsView.mjs +1 -1
  218. package/dist/components/Projects/FileView.mjs +1 -1
  219. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  220. package/dist/components/Projects/PlanningView.mjs +1 -1
  221. package/dist/components/Projects/ProjectPage.mjs +1 -1
  222. package/dist/components/Projects/ProjectView.mjs +1 -1
  223. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  224. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  225. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  226. package/dist/components/Projects/TasksView.mjs +1 -1
  227. package/dist/components/Projects/TeamSwitcher.mjs +1 -1
  228. package/dist/components/Projects/file-list.mjs +1 -1
  229. package/dist/components/Projects/index.mjs +1 -1
  230. package/dist/components/Projects/project-card.mjs +1 -1
  231. package/dist/components/Projects/team-card.mjs +1 -1
  232. package/dist/components/dc-temp/creative.mjs +1 -1
  233. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  234. package/dist/components/dc-temp/index.mjs +1 -1
  235. package/dist/components/index.js +29 -29
  236. package/dist/components/index.mjs +1 -1
  237. package/dist/components/ui/carousel.css +1 -0
  238. package/dist/components/ui/carousel.d.ts +19 -0
  239. package/dist/components/ui/carousel.js +4 -0
  240. package/dist/components/ui/carousel.mjs +2 -0
  241. package/dist/components/ui/index.d.ts +1 -0
  242. package/dist/components/ui/index.js +1 -1
  243. package/dist/components/ui/index.mjs +1 -1
  244. package/dist/decorators/Intranet.css +1 -0
  245. package/dist/decorators/Intranet.d.ts +7 -0
  246. package/dist/decorators/Intranet.js +4 -0
  247. package/dist/decorators/Intranet.mjs +1 -0
  248. package/dist/globals.css +1 -1
  249. package/dist/index.js +36 -36
  250. package/dist/index.mjs +1 -1
  251. package/dist/metafile-cjs.json +1 -1
  252. package/dist/metafile-esm.json +1 -1
  253. package/dist/pages/Blog.js +1 -1
  254. package/dist/pages/Blog.mjs +1 -1
  255. package/dist/pages/Documentation.js +1 -1
  256. package/dist/pages/Documentation.mjs +1 -1
  257. package/dist/pages/IndexPage.mjs +1 -1
  258. package/dist/pages/Intranet.js +2 -1
  259. package/dist/pages/Intranet.mjs +1 -1
  260. package/dist/pages/LandingPage.mjs +1 -1
  261. package/dist/pages/Page.js +1 -1
  262. package/dist/pages/Page.mjs +1 -1
  263. package/dist/pages/Publish.mjs +1 -1
  264. package/dist/pages/Website.js +1 -1
  265. package/dist/pages/Website.mjs +1 -1
  266. package/dist/sections/AboutSection.mjs +1 -1
  267. package/dist/sections/BlogDetail.mjs +1 -1
  268. package/dist/sections/BlogList.mjs +1 -1
  269. package/dist/sections/BlogListSection.mjs +1 -1
  270. package/dist/sections/ContactSection.mjs +1 -1
  271. package/dist/sections/MainPageSection.mjs +1 -1
  272. package/dist/sections/PageSections.js +1 -1
  273. package/dist/sections/PageSections.mjs +1 -1
  274. package/dist/sections/PricingSection.mjs +1 -1
  275. package/dist/sections/ServiceDetail.mjs +1 -1
  276. package/dist/sections/ServiceDetailSection.mjs +1 -1
  277. package/dist/sections/ServiceSection.mjs +1 -1
  278. package/dist/sections/form/index.mjs +1 -1
  279. package/dist/sections/index.mjs +1 -1
  280. package/package.json +3 -1
  281. package/dist/chunk-WUA65ZZB.mjs +0 -4
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as h}from"./chunk-FT3AE7L2.mjs";import{a as n,b as m,c,d as p}from"./chunk-KY7WQYN4.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{a as v}from"./chunk-YO3GQYRJ.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{Clock as x,Edit3 as C,Plus as S,Trash2 as w}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";function M({sessions:o,currentSession:g,teams:y,onNewChat:u,onSessionSelect:N,onSessionEdit:r,onSessionDelete:l,className:f}){return t(n,{children:t("div",{className:`space-y-4 h-full ${f||""}`,children:s(v,{className:"shadow-sm h-full",children:[t("div",{className:"p-4 border-b",children:s("div",{className:"flex items-center justify-between",children:[s("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[t(x,{className:"h-4 w-4"}),"Recent Chats"]}),s(i,{onClick:u,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[t(S,{className:"h-3 w-3"}),"New"]})]})}),t(h,{className:"h-[600px]",children:t("div",{className:"p-2",children:o.length===0?t("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):o.map(e=>s(m,{children:[t(c,{asChild:!0,children:t("div",{className:d("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",g?.id===e.id&&"bg-muted border"),onClick:()=>N(e),children:s("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[s("div",{className:"min-w-0 overflow-hidden",children:[t("h4",{className:"font-medium text-sm truncate mb-1",children:e.title}),t("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.lastMessage})]}),s("div",{className:"flex items-start gap-1 pt-0.5",children:[r&&t(i,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:a=>{a.stopPropagation(),r(e.id)},children:t(C,{className:"h-3 w-3"})}),l&&t(i,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:a=>{a.stopPropagation(),l(e.id)},children:t(w,{className:"h-3 w-3"})})]})]})})}),t(p,{side:"right",className:"max-w-xs",children:s("div",{className:"space-y-1",children:[t("p",{className:"font-medium text-sm",children:e.title}),t("p",{className:"text-xs",children:e.lastMessage})]})})]},e.id))})})]})})})}export{M as a};
4
+ import{a as h}from"./chunk-FT3AE7L2.mjs";import{a as v}from"./chunk-YO3GQYRJ.mjs";import{a as n,b as m,c,d as p}from"./chunk-KY7WQYN4.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{Clock as x,Edit3 as C,Plus as S,Trash2 as w}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";function M({sessions:o,currentSession:g,teams:y,onNewChat:u,onSessionSelect:N,onSessionEdit:r,onSessionDelete:l,className:f}){return t(n,{children:t("div",{className:`space-y-4 h-full ${f||""}`,children:s(v,{className:"shadow-sm h-full",children:[t("div",{className:"p-4 border-b",children:s("div",{className:"flex items-center justify-between",children:[s("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[t(x,{className:"h-4 w-4"}),"Recent Chats"]}),s(i,{onClick:u,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[t(S,{className:"h-3 w-3"}),"New"]})]})}),t(h,{className:"h-[600px]",children:t("div",{className:"p-2",children:o.length===0?t("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):o.map(e=>s(m,{children:[t(c,{asChild:!0,children:t("div",{className:d("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",g?.id===e.id&&"bg-muted border"),onClick:()=>N(e),children:s("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[s("div",{className:"min-w-0 overflow-hidden",children:[t("h4",{className:"font-medium text-sm truncate mb-1",children:e.title}),t("p",{className:"text-xs text-muted-foreground line-clamp-2",children:e.lastMessage})]}),s("div",{className:"flex items-start gap-1 pt-0.5",children:[r&&t(i,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:a=>{a.stopPropagation(),r(e.id)},children:t(C,{className:"h-3 w-3"})}),l&&t(i,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:a=>{a.stopPropagation(),l(e.id)},children:t(w,{className:"h-3 w-3"})})]})]})})}),t(p,{side:"right",className:"max-w-xs",children:s("div",{className:"space-y-1",children:[t("p",{className:"font-medium text-sm",children:e.title}),t("p",{className:"text-xs",children:e.lastMessage})]})})]},e.id))})})]})})})}export{M as a};
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{b as w,c as C}from"./chunk-SPAOEUCG.mjs";import{b as y}from"./chunk-Q7KKN6MH.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
4
+ import{b as w,c as C}from"./chunk-MQ7ZFZRG.mjs";import{b as y}from"./chunk-LRNWBTXT.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
5
5
  dark bg-background text-primary`,children:[l("div",{className:"flex px-6 items-center space-x-2",children:[i&&n("img",{src:i.src,alt:"Cortex Reply Logo",className:"h-8"}),n("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),n("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),n("div",{ref:a,className:"preview-container"})]})},B=({page:r,layout:e="portrait"})=>{let{contentWithIds:i}=b(r),c=s(null),u=s(null),a=s(new p),[h,f]=H(0),g=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...i],o=x(()=>{c.current&&(c.current&&(c.current.innerHTML=""),a.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",e==="landscape"?"./landscape.css":"./portrait.css"],c.current).then(t=>f(t.pageCount)).catch(t=>console.error("Paged.js error:",t)))},[e]);return d(()=>{a.current=new p,o()},[o,e]),d(()=>{let t=document.createElement("style");return t.textContent=`@page { size: A4 ${e} ; margin: 0mm; };`,document.head.appendChild(t),()=>{document.head.removeChild(t)}},[]),l("div",{className:"pagedjs-container",children:[n("div",{id:"printable-content",ref:u,style:{display:"none"},className:"pagedjs-content",children:g.map((t,v)=>n(N,{children:v===0?n("section",{className:"pagedjs-section title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},v):l("section",{className:P("pagedjs-section normal-page h-[699px]",`h-[${T("185mm")}px]`,t.theme?.settings?.theme==="dark"?"dark":"light"),children:[t.blockName&&n(w,{title:t.blockName}),n(y,{blocks:[t],fill:!0})]},v)}))}),n("div",{ref:c,className:"preview-container"})]})};export{F as a,E as b,B as c};
@@ -1 +1 @@
1
- import{a as ne}from"./chunk-NGX2VCHS.mjs";import{a as se}from"./chunk-Z22NSJMF.mjs";import{a as u}from"./chunk-UVHMI3PU.mjs";import{a as ae}from"./chunk-B4H6T2GP.mjs";import{a as te}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{b as g}from"./chunk-CSBGSBEU.mjs";import{a as x}from"./chunk-YO3GQYRJ.mjs";import{useState as c,useEffect as re,useRef as ie}from"react";import{Calendar as B,User as Be,Plus as Oe,CalendarDays as Ae,Edit2 as le,Trash2 as oe,Check as ze,X as F,ChevronDown as O,ChevronUp as A}from"lucide-react";import{Fragment as de,jsx as t,jsxs as a}from"react/jsx-runtime";var Xe=({tasks:z,epics:ce,sprints:b,onUpdateTask:me,onTaskClick:ue,onAddSprint:pe,onUpdateSprint:ge,onDeleteSprint:L})=>{let[p,ve]=c([]),[y,fe]=c(new Set),[S,U]=c(null),[xe,w]=c(!1),[he,j]=c(null),[k,P]=c(null),[m,C]=c({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[M,I]=c([]),[R,V]=c("upcoming"),[D,E]=c(!1),[v,Ne]=c(0),h=ie(null),be=ie(null);re(()=>{let e=()=>{h.current&&Ne(h.current.offsetHeight)};e();let s=new ResizeObserver(e);return h.current&&s.observe(h.current),()=>s.disconnect()},[]);let $=e=>ce.find(s=>s.id===Number(e)),ye=e=>b.find(s=>s.id===Number(e)),Se=e=>{let s={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return s[e]||s.medium},we=e=>{if(!e||e?.length===0)return"";let s=e?.trim().split(" ");if(s?.length===1)return s[0];let n=s[0],r=s[s.length-1][0].toUpperCase();return`${n} ${r}`},X=e=>{let s={},n=[];return e.forEach(r=>{r.epic?(s[u(r.epic)]||(s[u(r.epic)]=[]),s[u(r.epic)].push(r)):n.push(r)}),{tasksByEpic:s,unassignedTasks:n}};re(()=>{I(b)},[b]);let q=M.filter(e=>{switch(R){default:return!0}}),G=M.filter(e=>p.includes(e.id.toString())),f=z.filter(e=>!e.sprint||e.status==="backlog"),ke=f.reduce((e,s)=>e+(s.storyPoints||0),0),J=e=>{ve(s=>s.includes(e)?s.filter(n=>n!==e):s?.length<3?[...s,e]:s)},T=e=>{fe(s=>{let n=new Set(s);return n.has(e)?n.delete(e):n.add(e),n})},Ce=e=>{pe(e),w(!1)},K=e=>{P(e.id.toString()),C({name:e.name,description:e.description||"",startDate:e.startDate?new Date(e.startDate).toISOString().split("T")[0]:e.startDate,endDate:e.endDate?new Date(e.endDate).toISOString().split("T")[0]:e.endDate,isActive:!1})},De=()=>{k&&(ge(k,{name:m.name,description:m.description,startDate:m.startDate,endDate:m.endDate}),I(e=>e.map(s=>(s.id===Number(k)&&(s.name=m.name,s.description=m.description,s.startDate=m.startDate,s.endDate=m.endDate),s))),P(null))},Ee=()=>{P(null),C({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Te=(e,s)=>{U(s),e.dataTransfer.effectAllowed="move"},Q=e=>{e.preventDefault(),e.dataTransfer.dropEffect="move"},W=e=>{j(e)},Y=()=>{j(null)},Z=(e,s)=>{if(e.preventDefault(),j(null),!S)return;(u(S.sprint)||void 0)!==Number(s)&&me(S.id.toString(),{sprint:Number(s)}),U(null)},N=({task:e,showSprint:s=!1})=>{let n=e.epic?$(u(e.epic).toString()):null,r=e.sprint?ye(u(e.sprint).toString()):null;return t(x,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:o=>{o.dataTransfer.effectAllowed="move",o.dataTransfer.setData("text/plain",e.id.toString()),Te(o,e)},onClick:o=>{S===null&&ue(e)},style:{userSelect:"none"},children:a("div",{className:"space-y-2 pointer-events-none",children:[a("div",{className:"flex items-start justify-between gap-2",children:[t("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:e.name}),t(g,{className:`text-xs ${Se(e.priority||"medium")}`,children:e.priority?.[0]?.toUpperCase()})]}),a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-1",children:[n&&t("div",{className:`w-2 h-2 rounded-full ${n.color}`}),t("span",{className:"text-muted-foreground truncate",children:n?.name})]}),t("span",{className:"text-muted-foreground",children:we(e.assignee?.value?.name)})]}),s&&r&&a("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[t(B,{className:"h-3 w-3"}),t("span",{children:r.name})]})]})})};return a("div",{ref:be,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:h,className:"flex-shrink-0",children:t(se,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>w(!0)}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:a("div",{className:"h-full",style:{height:v>0?`calc(100vh - ${v+120}px)`:"calc(100vh - 12rem)"},children:[a("div",{className:"mb-4",children:[t(x,{className:"p-3 bg-card shadow-sm",children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center gap-3",children:[a("div",{children:[t("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),a("p",{className:"text-xs text-muted-foreground",children:[p?.length,"/3 selected"]})]}),p?.length>0&&a("div",{className:"flex items-center gap-2",children:[t("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),t("div",{className:"flex flex-wrap gap-1",children:G.map(e=>a("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[t("span",{className:"max-w-[80px] truncate",children:e.name}),t("button",{onClick:()=>J(e.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:t(F,{className:"h-4 w-4"})})]},e.id))})]})]}),a("div",{className:"flex items-center gap-2",children:[a(d,{onClick:()=>w(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[t(Oe,{className:"h-3 w-3"}),"Add"]}),a(d,{onClick:()=>E(!D),variant:"outline",size:"sm",className:"gap-1",children:[t(B,{className:"h-3 w-3"}),D?"Close":"Select"]})]})]})}),D&&t("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>E(!1)}),t("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl z-10 transition-all duration-300 ease-in-out ${D?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:a(x,{className:"h-full rounded-none border-0 flex flex-col",children:[a("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[a("div",{className:"flex items-center justify-between",children:[t("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),t(d,{variant:"ghost",size:"sm",onClick:()=>E(!1),className:"h-8 w-8 p-0",children:t(F,{className:"h-4 w-4"})})]}),t("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),a("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[t("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:b.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(e=>a(d,{variant:R===e.key?"default":"outline",size:"sm",onClick:()=>V(e.key),className:"text-xs h-8 px-3 flex-1",children:[e.label," (",e.count,")"]},e.key))}),t("div",{className:"space-y-2 flex-1 overflow-y-auto",children:q.length>0?q.map(e=>{let s=p.includes(e.id.toString()),n=z.filter(i=>u(i.sprint)===e.id).length,r=!s&&p.length<3;return t("div",{className:`p-3 rounded-lg border transition-all ${s?"bg-primary/10 border-primary/30":r?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:k===e.id.toString()?a("div",{className:"space-y-3",children:[t(te,{value:m.name,onChange:i=>C(l=>({...l,name:i.target.value})),className:"text-sm",placeholder:"Sprint name"}),t(ae,{value:m.description,onChange:i=>C(l=>({...l,description:i.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),a("div",{className:"flex gap-2",children:[a(d,{size:"sm",onClick:()=>De(),className:"flex-1",children:[t(ze,{className:"h-3 w-3 mr-1"}),"Save"]}),a(d,{size:"sm",variant:"outline",onClick:Ee,className:"flex-1",children:[t(F,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):a("div",{children:[a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex-1 min-w-0",children:[a("div",{className:"flex items-center gap-2 mb-1",children:[t("h4",{className:"font-medium text-sm text-foreground truncate",children:e.name}),t(g,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),t("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:e.description}),a("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[a("span",{className:"flex items-center gap-1",children:[t(Ae,{className:"h-3 w-3"}),new Date(e.startDate).toLocaleDateString()]}),a("span",{className:"flex items-center gap-1",children:[t(Be,{className:"h-3 w-3"}),n," tasks"]})]})]}),a("div",{className:"flex items-center gap-1 ml-2",children:[t(d,{size:"sm",variant:"ghost",onClick:()=>K(e),className:"h-6 w-6 p-0",children:t(le,{className:"h-3 w-3"})}),t(d,{size:"sm",variant:"ghost",onClick:()=>L(e.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:t(oe,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex items-center justify-between mt-2",children:t(d,{variant:s?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>J(e.id.toString()),disabled:!s&&p?.length>=3,children:t("span",{className:"pointer-events-none select-none",children:s?"Deselect":p?.length>=3?"Limit Reached":"Select"})})})]})},e.id)}):a("div",{className:"text-center py-8 text-muted-foreground",children:[t(B,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),a("p",{className:"text-sm",children:['No sprints found for "',R,'" filter']}),t(d,{variant:"link",size:"sm",onClick:()=>V("all"),className:"text-xs",children:"Show all sprints"})]})}),p?.length===0&&t("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:a("div",{className:"text-center",children:[t(B,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),t("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),t("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),a("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[t("div",{className:"lg:col-span-1",children:a(x,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Q,onDragEnter:()=>W("backlog"),onDragLeave:Y,onDrop:e=>Z(e,"backlog"),style:{height:v>0?`calc(100vh - ${v+200}px)`:"calc(100vh - 16rem)"},children:[a("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[t("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),a("div",{className:"flex items-center gap-2",children:[a(g,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[f?.length," tasks"]}),a(g,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[ke," pts"]})]})]}),t("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${he==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:e,unassignedTasks:s}=X(f);return a(de,{children:[Object.entries(e).map(([n,r])=>{let i=$(n);if(!i)return null;let l=y.has(n);return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>T(n),children:[t("div",{className:`w-3 h-3 rounded-full ${i.color}`}),t("span",{className:"font-medium text-muted-foreground",children:i.name}),a("span",{className:"text-muted-foreground",children:["(",r?.length,")"]}),t("div",{className:"ml-auto",children:l?t(O,{className:"h-3 w-3 text-muted-foreground"}):t(A,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:r.map(o=>t(N,{task:o},o.id))})]},n)}),s?.length>0&&(()=>{let n=y.has("no-epic");return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>T("no-epic"),children:[t("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),t("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),a("span",{className:"text-muted-foreground",children:["(",s?.length,")"]}),t("div",{className:"ml-auto",children:n?t(O,{className:"h-3 w-3 text-muted-foreground"}):t(A,{className:"h-3 w-3 text-muted-foreground"})})]}),!n&&t("div",{className:"space-y-2 pl-2",children:s?.map(r=>t(N,{task:r},r.id))})]})})(),f?.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),f?.length>0&&Object.keys(e).length===0&&s.length===0&&a("div",{className:"space-y-2",children:[t("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),f?.map(n=>t(N,{task:n},n.id))]})]})})()})]})}),G.map(e=>{let s=z.filter(r=>u(r?.sprint)===e.id),n=s.reduce((r,i)=>r+(i?.storyPoints||0),0);return a(x,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Q,onDragEnter:()=>W(e.id.toString()),onDragLeave:Y,onDrop:r=>Z(r,e.id.toString()),style:{height:v>0?`calc(100vh - ${v+200}px)`:"calc(100vh - 16rem)"},children:[a("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[t("div",{children:t("h3",{className:"font-semibold text-foreground select-none text-lg",children:e.name})}),a("div",{className:"flex items-center gap-2",children:[a(g,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[s?.length," tasks"]}),a(g,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[n," pts"]}),t(d,{size:"sm",variant:"ghost",onClick:()=>{E(!0),K(e)},className:"h-6 px-2",children:t(le,{className:"h-3 w-3"})}),t(d,{size:"sm",variant:"ghost",onClick:()=>L(e.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:t(oe,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:r,unassignedTasks:i}=X(s);return a(de,{children:[Object.entries(r).map(([l,o])=>{let H=$(l);if(!H)return null;let _=y.has(l);return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>T(l),children:[t("div",{className:`w-3 h-3 rounded-full ${H.color}`}),t("span",{className:"font-medium text-muted-foreground",children:H.name}),a("span",{className:"text-muted-foreground",children:["(",o?.length,")"]}),t("div",{className:"ml-auto",children:_?t(O,{className:"h-3 w-3 text-muted-foreground"}):t(A,{className:"h-3 w-3 text-muted-foreground"})})]}),!_&&t("div",{className:"space-y-2 pl-2",children:o?.map(ee=>t(N,{task:ee},ee.id))})]},l)}),i?.length>0&&(()=>{let l=y.has("no-epic");return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>T("no-epic"),children:[t("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),t("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),a("span",{className:"text-muted-foreground",children:["(",i?.length,")"]}),t("div",{className:"ml-auto",children:l?t(O,{className:"h-3 w-3 text-muted-foreground"}):t(A,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:i?.map(o=>t(N,{task:o},o.id))})]})})(),s?.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},e.id)})]}),t(ne,{isOpen:xe,onClose:()=>w(!1),onAddSprint:Ce})]})})]})};export{Xe as a};
1
+ import{a as ne}from"./chunk-NGX2VCHS.mjs";import{a as se}from"./chunk-HF33ZXKX.mjs";import{a as u}from"./chunk-UVHMI3PU.mjs";import{a as ae}from"./chunk-B4H6T2GP.mjs";import{b as g}from"./chunk-CSBGSBEU.mjs";import{a as x}from"./chunk-YO3GQYRJ.mjs";import{a as te}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{useState as c,useEffect as re,useRef as ie}from"react";import{Calendar as B,User as Be,Plus as Oe,CalendarDays as Ae,Edit2 as le,Trash2 as oe,Check as ze,X as F,ChevronDown as O,ChevronUp as A}from"lucide-react";import{Fragment as de,jsx as t,jsxs as a}from"react/jsx-runtime";var Xe=({tasks:z,epics:ce,sprints:b,onUpdateTask:me,onTaskClick:ue,onAddSprint:pe,onUpdateSprint:ge,onDeleteSprint:L})=>{let[p,ve]=c([]),[y,fe]=c(new Set),[S,U]=c(null),[xe,w]=c(!1),[he,j]=c(null),[k,P]=c(null),[m,C]=c({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[M,I]=c([]),[R,V]=c("upcoming"),[D,E]=c(!1),[v,Ne]=c(0),h=ie(null),be=ie(null);re(()=>{let e=()=>{h.current&&Ne(h.current.offsetHeight)};e();let s=new ResizeObserver(e);return h.current&&s.observe(h.current),()=>s.disconnect()},[]);let $=e=>ce.find(s=>s.id===Number(e)),ye=e=>b.find(s=>s.id===Number(e)),Se=e=>{let s={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return s[e]||s.medium},we=e=>{if(!e||e?.length===0)return"";let s=e?.trim().split(" ");if(s?.length===1)return s[0];let n=s[0],r=s[s.length-1][0].toUpperCase();return`${n} ${r}`},X=e=>{let s={},n=[];return e.forEach(r=>{r.epic?(s[u(r.epic)]||(s[u(r.epic)]=[]),s[u(r.epic)].push(r)):n.push(r)}),{tasksByEpic:s,unassignedTasks:n}};re(()=>{I(b)},[b]);let q=M.filter(e=>{switch(R){default:return!0}}),G=M.filter(e=>p.includes(e.id.toString())),f=z.filter(e=>!e.sprint||e.status==="backlog"),ke=f.reduce((e,s)=>e+(s.storyPoints||0),0),J=e=>{ve(s=>s.includes(e)?s.filter(n=>n!==e):s?.length<3?[...s,e]:s)},T=e=>{fe(s=>{let n=new Set(s);return n.has(e)?n.delete(e):n.add(e),n})},Ce=e=>{pe(e),w(!1)},K=e=>{P(e.id.toString()),C({name:e.name,description:e.description||"",startDate:e.startDate?new Date(e.startDate).toISOString().split("T")[0]:e.startDate,endDate:e.endDate?new Date(e.endDate).toISOString().split("T")[0]:e.endDate,isActive:!1})},De=()=>{k&&(ge(k,{name:m.name,description:m.description,startDate:m.startDate,endDate:m.endDate}),I(e=>e.map(s=>(s.id===Number(k)&&(s.name=m.name,s.description=m.description,s.startDate=m.startDate,s.endDate=m.endDate),s))),P(null))},Ee=()=>{P(null),C({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Te=(e,s)=>{U(s),e.dataTransfer.effectAllowed="move"},Q=e=>{e.preventDefault(),e.dataTransfer.dropEffect="move"},W=e=>{j(e)},Y=()=>{j(null)},Z=(e,s)=>{if(e.preventDefault(),j(null),!S)return;(u(S.sprint)||void 0)!==Number(s)&&me(S.id.toString(),{sprint:Number(s)}),U(null)},N=({task:e,showSprint:s=!1})=>{let n=e.epic?$(u(e.epic).toString()):null,r=e.sprint?ye(u(e.sprint).toString()):null;return t(x,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:o=>{o.dataTransfer.effectAllowed="move",o.dataTransfer.setData("text/plain",e.id.toString()),Te(o,e)},onClick:o=>{S===null&&ue(e)},style:{userSelect:"none"},children:a("div",{className:"space-y-2 pointer-events-none",children:[a("div",{className:"flex items-start justify-between gap-2",children:[t("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:e.name}),t(g,{className:`text-xs ${Se(e.priority||"medium")}`,children:e.priority?.[0]?.toUpperCase()})]}),a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-1",children:[n&&t("div",{className:`w-2 h-2 rounded-full ${n.color}`}),t("span",{className:"text-muted-foreground truncate",children:n?.name})]}),t("span",{className:"text-muted-foreground",children:we(e.assignee?.value?.name)})]}),s&&r&&a("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[t(B,{className:"h-3 w-3"}),t("span",{children:r.name})]})]})})};return a("div",{ref:be,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:h,className:"flex-shrink-0",children:t(se,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>w(!0)}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:a("div",{className:"h-full",style:{height:v>0?`calc(100vh - ${v+120}px)`:"calc(100vh - 12rem)"},children:[a("div",{className:"mb-4",children:[t(x,{className:"p-3 bg-card shadow-sm",children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center gap-3",children:[a("div",{children:[t("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),a("p",{className:"text-xs text-muted-foreground",children:[p?.length,"/3 selected"]})]}),p?.length>0&&a("div",{className:"flex items-center gap-2",children:[t("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),t("div",{className:"flex flex-wrap gap-1",children:G.map(e=>a("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[t("span",{className:"max-w-[80px] truncate",children:e.name}),t("button",{onClick:()=>J(e.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:t(F,{className:"h-4 w-4"})})]},e.id))})]})]}),a("div",{className:"flex items-center gap-2",children:[a(d,{onClick:()=>w(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[t(Oe,{className:"h-3 w-3"}),"Add"]}),a(d,{onClick:()=>E(!D),variant:"outline",size:"sm",className:"gap-1",children:[t(B,{className:"h-3 w-3"}),D?"Close":"Select"]})]})]})}),D&&t("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>E(!1)}),t("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl z-10 transition-all duration-300 ease-in-out ${D?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:a(x,{className:"h-full rounded-none border-0 flex flex-col",children:[a("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[a("div",{className:"flex items-center justify-between",children:[t("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),t(d,{variant:"ghost",size:"sm",onClick:()=>E(!1),className:"h-8 w-8 p-0",children:t(F,{className:"h-4 w-4"})})]}),t("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),a("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[t("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:b.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(e=>a(d,{variant:R===e.key?"default":"outline",size:"sm",onClick:()=>V(e.key),className:"text-xs h-8 px-3 flex-1",children:[e.label," (",e.count,")"]},e.key))}),t("div",{className:"space-y-2 flex-1 overflow-y-auto",children:q.length>0?q.map(e=>{let s=p.includes(e.id.toString()),n=z.filter(i=>u(i.sprint)===e.id).length,r=!s&&p.length<3;return t("div",{className:`p-3 rounded-lg border transition-all ${s?"bg-primary/10 border-primary/30":r?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:k===e.id.toString()?a("div",{className:"space-y-3",children:[t(te,{value:m.name,onChange:i=>C(l=>({...l,name:i.target.value})),className:"text-sm",placeholder:"Sprint name"}),t(ae,{value:m.description,onChange:i=>C(l=>({...l,description:i.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),a("div",{className:"flex gap-2",children:[a(d,{size:"sm",onClick:()=>De(),className:"flex-1",children:[t(ze,{className:"h-3 w-3 mr-1"}),"Save"]}),a(d,{size:"sm",variant:"outline",onClick:Ee,className:"flex-1",children:[t(F,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):a("div",{children:[a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex-1 min-w-0",children:[a("div",{className:"flex items-center gap-2 mb-1",children:[t("h4",{className:"font-medium text-sm text-foreground truncate",children:e.name}),t(g,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),t("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:e.description}),a("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[a("span",{className:"flex items-center gap-1",children:[t(Ae,{className:"h-3 w-3"}),new Date(e.startDate).toLocaleDateString()]}),a("span",{className:"flex items-center gap-1",children:[t(Be,{className:"h-3 w-3"}),n," tasks"]})]})]}),a("div",{className:"flex items-center gap-1 ml-2",children:[t(d,{size:"sm",variant:"ghost",onClick:()=>K(e),className:"h-6 w-6 p-0",children:t(le,{className:"h-3 w-3"})}),t(d,{size:"sm",variant:"ghost",onClick:()=>L(e.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:t(oe,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex items-center justify-between mt-2",children:t(d,{variant:s?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>J(e.id.toString()),disabled:!s&&p?.length>=3,children:t("span",{className:"pointer-events-none select-none",children:s?"Deselect":p?.length>=3?"Limit Reached":"Select"})})})]})},e.id)}):a("div",{className:"text-center py-8 text-muted-foreground",children:[t(B,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),a("p",{className:"text-sm",children:['No sprints found for "',R,'" filter']}),t(d,{variant:"link",size:"sm",onClick:()=>V("all"),className:"text-xs",children:"Show all sprints"})]})}),p?.length===0&&t("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:a("div",{className:"text-center",children:[t(B,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),t("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),t("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),a("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[t("div",{className:"lg:col-span-1",children:a(x,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Q,onDragEnter:()=>W("backlog"),onDragLeave:Y,onDrop:e=>Z(e,"backlog"),style:{height:v>0?`calc(100vh - ${v+200}px)`:"calc(100vh - 16rem)"},children:[a("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[t("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),a("div",{className:"flex items-center gap-2",children:[a(g,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[f?.length," tasks"]}),a(g,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[ke," pts"]})]})]}),t("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${he==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:e,unassignedTasks:s}=X(f);return a(de,{children:[Object.entries(e).map(([n,r])=>{let i=$(n);if(!i)return null;let l=y.has(n);return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>T(n),children:[t("div",{className:`w-3 h-3 rounded-full ${i.color}`}),t("span",{className:"font-medium text-muted-foreground",children:i.name}),a("span",{className:"text-muted-foreground",children:["(",r?.length,")"]}),t("div",{className:"ml-auto",children:l?t(O,{className:"h-3 w-3 text-muted-foreground"}):t(A,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:r.map(o=>t(N,{task:o},o.id))})]},n)}),s?.length>0&&(()=>{let n=y.has("no-epic");return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>T("no-epic"),children:[t("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),t("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),a("span",{className:"text-muted-foreground",children:["(",s?.length,")"]}),t("div",{className:"ml-auto",children:n?t(O,{className:"h-3 w-3 text-muted-foreground"}):t(A,{className:"h-3 w-3 text-muted-foreground"})})]}),!n&&t("div",{className:"space-y-2 pl-2",children:s?.map(r=>t(N,{task:r},r.id))})]})})(),f?.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),f?.length>0&&Object.keys(e).length===0&&s.length===0&&a("div",{className:"space-y-2",children:[t("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),f?.map(n=>t(N,{task:n},n.id))]})]})})()})]})}),G.map(e=>{let s=z.filter(r=>u(r?.sprint)===e.id),n=s.reduce((r,i)=>r+(i?.storyPoints||0),0);return a(x,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Q,onDragEnter:()=>W(e.id.toString()),onDragLeave:Y,onDrop:r=>Z(r,e.id.toString()),style:{height:v>0?`calc(100vh - ${v+200}px)`:"calc(100vh - 16rem)"},children:[a("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[t("div",{children:t("h3",{className:"font-semibold text-foreground select-none text-lg",children:e.name})}),a("div",{className:"flex items-center gap-2",children:[a(g,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[s?.length," tasks"]}),a(g,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[n," pts"]}),t(d,{size:"sm",variant:"ghost",onClick:()=>{E(!0),K(e)},className:"h-6 px-2",children:t(le,{className:"h-3 w-3"})}),t(d,{size:"sm",variant:"ghost",onClick:()=>L(e.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:t(oe,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:r,unassignedTasks:i}=X(s);return a(de,{children:[Object.entries(r).map(([l,o])=>{let H=$(l);if(!H)return null;let _=y.has(l);return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>T(l),children:[t("div",{className:`w-3 h-3 rounded-full ${H.color}`}),t("span",{className:"font-medium text-muted-foreground",children:H.name}),a("span",{className:"text-muted-foreground",children:["(",o?.length,")"]}),t("div",{className:"ml-auto",children:_?t(O,{className:"h-3 w-3 text-muted-foreground"}):t(A,{className:"h-3 w-3 text-muted-foreground"})})]}),!_&&t("div",{className:"space-y-2 pl-2",children:o?.map(ee=>t(N,{task:ee},ee.id))})]},l)}),i?.length>0&&(()=>{let l=y.has("no-epic");return a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>T("no-epic"),children:[t("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),t("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),a("span",{className:"text-muted-foreground",children:["(",i?.length,")"]}),t("div",{className:"ml-auto",children:l?t(O,{className:"h-3 w-3 text-muted-foreground"}):t(A,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:i?.map(o=>t(N,{task:o},o.id))})]})})(),s?.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},e.id)})]}),t(ne,{isOpen:xe,onClose:()=>w(!1),onAddSprint:Ce})]})})]})};export{Xe as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as d}from"./chunk-KPTGYVDM.mjs";import{a as p}from"./chunk-CDVRH3MC.mjs";import{a as m}from"./chunk-Z22NSJMF.mjs";import{a as i,f as n,g as s,i as l,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as u}from"react";import{motion as N,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:g=[],onAddProject:j,handleProjectOpen:P,handleProjectShare:y}){let[f,t]=u(!1),[b,r]=u(!1),v=async a=>{r(!0);try{await j(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:o(N.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:g.map(a=>e(d,{project:a,onOpen:P,onShare:y},a.id))})]})]},"projects-index-view")}),e(i,{open:f,onOpenChange:t,children:o(n,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(s,{className:"sr-only",children:[e(l,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
4
+ import{a as d}from"./chunk-MQG7MKTK.mjs";import{a as p}from"./chunk-CDVRH3MC.mjs";import{a as m}from"./chunk-HF33ZXKX.mjs";import{a as i,f as n,g as s,i as l,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as u}from"react";import{motion as N,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:g=[],onAddProject:j,handleProjectOpen:P,handleProjectShare:y}){let[f,t]=u(!1),[b,r]=u(!1),v=async a=>{r(!0);try{await j(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:o(N.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organize your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:g.map(a=>e(d,{project:a,onOpen:P,onShare:y},a.id))})]})]},"projects-index-view")}),e(i,{open:f,onOpenChange:t,children:o(n,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(s,{className:"sr-only",children:[e(l,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as c}from"./chunk-ZUA4KNIR.mjs";import{a as u,c as f}from"./chunk-SOLZ4VQH.mjs";import{a as r,b as p,c as v,e as i}from"./chunk-YO3GQYRJ.mjs";import{useState as U,useMemo as w}from"react";import{Search as S,User as N,Check as b,ChevronLeft as k}from"lucide-react";import{motion as g,AnimatePresence as T}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function E({users:o,onUserSelect:y,onCancel:h,selectedUserId:l}){let[s,C]=U(""),m=Array.isArray(o)?o:[],n=w(()=>m.filter(a=>a!=null&&a!==void 0).filter(a=>a?.name?.toLowerCase().includes(s.toLowerCase())||a?.email?.toLowerCase().includes(s.toLowerCase())),[m,s]),x=a=>{y(a)};return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(T,{mode:"wait",children:t(g.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[t("div",{className:"flex items-center gap-4 mb-6",children:[t(c,{variant:"ghost",onClick:h,className:"gap-2",children:[e(k,{className:"h-4 w-4"}),"Back"]}),t("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Select User"}),e("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),e(r,{className:"container",children:e(i,{className:"pt-6",children:e("div",{className:"flex flex-col md:flex-row gap-4",children:e("div",{className:"flex-1",children:t("div",{className:"relative",children:[e(S,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(d,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:a=>C(a.target.value),className:"pl-9"})]})})})})}),e("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(a=>!a||!a.id?null:e(g.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:t(r,{className:`cursor-pointer transition-all hover:shadow-lg ${l===a.id?"ring-2 ring-primary":""}`,onClick:()=>x(a),children:[e(p,{className:"pb-3",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-center gap-3",children:[e(u,{children:e(f,{children:e(N,{className:"h-4 w-4"})})}),e("div",{children:e(v,{className:"text-lg",children:a?.name||"Unknown User"})})]}),l===a.id&&e(b,{className:"h-5 w-5 text-primary"})]})}),e(i,{className:"pt-0",children:t("div",{className:"space-y-3",children:[t("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Email"}),e("p",{className:"text-sm font-medium",children:a?.email||"No email"})]}),e("div",{children:e("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},a.id))}),n.length===0&&e(r,{className:"container mt-4",children:e(i,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[e(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}export{E as a};
4
+ import{a as u,c as f}from"./chunk-SOLZ4VQH.mjs";import{a as r,b as p,c as v,e as i}from"./chunk-YO3GQYRJ.mjs";import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as c}from"./chunk-ZUA4KNIR.mjs";import{useState as U,useMemo as w}from"react";import{Search as S,User as N,Check as b,ChevronLeft as k}from"lucide-react";import{motion as g,AnimatePresence as T}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function E({users:o,onUserSelect:y,onCancel:h,selectedUserId:l}){let[s,C]=U(""),m=Array.isArray(o)?o:[],n=w(()=>m.filter(a=>a!=null&&a!==void 0).filter(a=>a?.name?.toLowerCase().includes(s.toLowerCase())||a?.email?.toLowerCase().includes(s.toLowerCase())),[m,s]),x=a=>{y(a)};return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(T,{mode:"wait",children:t(g.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[t("div",{className:"flex items-center gap-4 mb-6",children:[t(c,{variant:"ghost",onClick:h,className:"gap-2",children:[e(k,{className:"h-4 w-4"}),"Back"]}),t("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Select User"}),e("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),e(r,{className:"container",children:e(i,{className:"pt-6",children:e("div",{className:"flex flex-col md:flex-row gap-4",children:e("div",{className:"flex-1",children:t("div",{className:"relative",children:[e(S,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(d,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:a=>C(a.target.value),className:"pl-9"})]})})})})}),e("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(a=>!a||!a.id?null:e(g.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:t(r,{className:`cursor-pointer transition-all hover:shadow-lg ${l===a.id?"ring-2 ring-primary":""}`,onClick:()=>x(a),children:[e(p,{className:"pb-3",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-center gap-3",children:[e(u,{children:e(f,{children:e(N,{className:"h-4 w-4"})})}),e("div",{children:e(v,{className:"text-lg",children:a?.name||"Unknown User"})})]}),l===a.id&&e(b,{className:"h-5 w-5 text-primary"})]})}),e(i,{className:"pt-0",children:t("div",{className:"space-y-3",children:[t("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Email"}),e("p",{className:"text-sm font-medium",children:a?.email||"No email"})]}),e("div",{children:e("p",{className:"text-sm text-muted-foreground",children:"Department"})})]})})]})},a.id))}),n.length===0&&e(r,{className:"container mt-4",children:e(i,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[e(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}export{E as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as b}from"./chunk-GLZEHRPY.mjs";import{a as N}from"./chunk-MU5WPW4N.mjs";import{a as u}from"./chunk-AZKOVKSK.mjs";import{a as m,b as d,c as p,d as f}from"./chunk-KY7WQYN4.mjs";import{b as a}from"./chunk-ZUA4KNIR.mjs";import{a as v,b as g,c as h}from"./chunk-SOLZ4VQH.mjs";import{useState as T}from"react";import{motion as e}from"motion/react";import{Bell as $,Menu as q,PanelLeft as E,Bot as G}from"lucide-react";import{Fragment as J,jsx as t,jsxs as i}from"react/jsx-runtime";function at({title:Q,notifications:x=[],onToggleSidebar:w,onToggleMobileMenu:y,sidebarOpen:C=!0,className:A,activeTab:k="assistant",onTabChange:P,showTabs:O=!0,tabOptions:R=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:B,actionIcon:H=t(G,{className:"mr-2 h-4 w-4"}),actionText:j="Action",onNotificationRemove:z,onRemoveAll:D,logo:I="/headerlogo.png",appName:L="Nuvia",tagline:M="Collaboration Platform"}){let[F,l]=T(!1),[r,c]=T(x),n=r.filter(o=>!o.read).length,S=o=>{c(s=>s.filter(U=>U.id!==o)),z?.(o)},K=()=>{c(o=>o.filter(s=>s.read)),D?.()};return i(J,{children:[i("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${A||""}`,children:[t(a,{variant:"ghost",size:"icon",className:"md:hidden",onClick:y,children:t(q,{className:"h-5 w-5"})}),t(a,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:w,children:t(E,{className:"h-5 w-5"})}),!C&&i(e.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[t("div",{className:"flex h-10 w-10 items-center justify-center",children:t("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),i("div",{children:[t("h2",{className:"font-semibold text-sm",children:L}),t("p",{className:"text-xs text-muted-foreground",children:M})]})]}),i("div",{className:"flex flex-1 items-center",children:[O&&t(b,{activeTab:k,onTabChange:P,tabOptions:R}),i("div",{className:"flex items-center gap-3 ml-auto",children:[t(e.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:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:B,children:[H,j]})})}),t(u,{}),t(m,{children:i(d,{children:[t(p,{asChild:!0,children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>l(!0),children:[t(e.div,{animate:n>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:n>0?1/0:0,repeatDelay:3},children:t($,{className:"h-5 w-5"})}),n>0&&t(e.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:n})]})})}),t(f,{children:"Notifications"})]})}),t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(v,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[t(g,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),t(h,{})]})})]})]})]}),t(N,{notifications:r,open:F,onClose:()=>l(!1),onNotificationRemove:S,onRemoveAll:K})]})}export{at as a};
4
+ import{a as b}from"./chunk-GLZEHRPY.mjs";import{a as N}from"./chunk-WPH2ALD6.mjs";import{a as u}from"./chunk-AZKOVKSK.mjs";import{a as v,b as g,c as h}from"./chunk-SOLZ4VQH.mjs";import{a as m,b as d,c as p,d as f}from"./chunk-KY7WQYN4.mjs";import{b as a}from"./chunk-ZUA4KNIR.mjs";import{useState as T}from"react";import{motion as e}from"motion/react";import{Bell as $,Menu as q,PanelLeft as E,Bot as G}from"lucide-react";import{Fragment as J,jsx as t,jsxs as i}from"react/jsx-runtime";function at({title:Q,notifications:x=[],onToggleSidebar:w,onToggleMobileMenu:y,sidebarOpen:C=!0,className:A,activeTab:k="assistant",onTabChange:P,showTabs:O=!0,tabOptions:R=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:B,actionIcon:H=t(G,{className:"mr-2 h-4 w-4"}),actionText:j="Action",onNotificationRemove:z,onRemoveAll:D,logo:I="/headerlogo.png",appName:L="Nuvia",tagline:M="Collaboration Platform"}){let[F,l]=T(!1),[r,c]=T(x),n=r.filter(o=>!o.read).length,S=o=>{c(s=>s.filter(U=>U.id!==o)),z?.(o)},K=()=>{c(o=>o.filter(s=>s.read)),D?.()};return i(J,{children:[i("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${A||""}`,children:[t(a,{variant:"ghost",size:"icon",className:"md:hidden",onClick:y,children:t(q,{className:"h-5 w-5"})}),t(a,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:w,children:t(E,{className:"h-5 w-5"})}),!C&&i(e.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[t("div",{className:"flex h-10 w-10 items-center justify-center",children:t("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),i("div",{children:[t("h2",{className:"font-semibold text-sm",children:L}),t("p",{className:"text-xs text-muted-foreground",children:M})]})]}),i("div",{className:"flex flex-1 items-center",children:[O&&t(b,{activeTab:k,onTabChange:P,tabOptions:R}),i("div",{className:"flex items-center gap-3 ml-auto",children:[t(e.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:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:B,children:[H,j]})})}),t(u,{}),t(m,{children:i(d,{children:[t(p,{asChild:!0,children:t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(a,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>l(!0),children:[t(e.div,{animate:n>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:n>0?1/0:0,repeatDelay:3},children:t($,{className:"h-5 w-5"})}),n>0&&t(e.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:n})]})})}),t(f,{children:"Notifications"})]})}),t(e.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:i(v,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[t(g,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),t(h,{})]})})]})]})]}),t(N,{notifications:r,open:F,onClose:()=>l(!1),onNotificationRemove:S,onRemoveAll:K})]})}export{at as a};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-B4H6T2GP.mjs";import{a as i}from"./chunk-TVZOULLL.mjs";import{b as r}from"./chunk-ZUA4KNIR.mjs";import{a as n,c as d}from"./chunk-SOLZ4VQH.mjs";import{b as l}from"./chunk-CSBGSBEU.mjs";import{useState as u}from"react";import{MessageSquare as x,Send as N}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var B=({comments:m,onAddComment:p})=>{let[s,o]=u(""),g=t=>t.split(" ").map(v=>v[0]).join("").toUpperCase(),f=()=>{s.trim()&&(p(s),o(""))};return a("div",{className:"space-y-4",children:[a("div",{className:"flex items-center gap-2",children:[e(x,{className:"h-5 w-5"}),e(i,{className:"text-lg font-medium",children:"Comments"}),e(l,{variant:"secondary",children:m.length})]}),e("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:m.map(t=>a("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[e(n,{className:"h-8 w-8 mt-1",children:e(d,{className:"text-xs bg-muted text-muted-foreground",children:g(t.author)})}),a("div",{className:"flex-1",children:[a("div",{className:"flex items-center gap-2 mb-1",children:[e("span",{className:"font-medium text-sm",children:t.author}),a("span",{className:"text-xs text-muted-foreground",children:[t.createdAt.toLocaleDateString()," at ",t.createdAt.toLocaleTimeString()]})]}),e("p",{className:"text-sm text-muted-foreground",children:t.text})]})]},t.id))}),a("div",{className:"flex gap-2",children:[e(c,{value:s,onChange:t=>o(t.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),e(r,{onClick:f,disabled:!s.trim(),size:"sm",className:"self-end",children:e(N,{className:"h-4 w-4"})})]})]})};export{B as a};
1
+ import{a as c}from"./chunk-B4H6T2GP.mjs";import{a as i}from"./chunk-TVZOULLL.mjs";import{a as n,c as d}from"./chunk-SOLZ4VQH.mjs";import{b as l}from"./chunk-CSBGSBEU.mjs";import{b as r}from"./chunk-ZUA4KNIR.mjs";import{useState as u}from"react";import{MessageSquare as x,Send as N}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var B=({comments:m,onAddComment:p})=>{let[s,o]=u(""),g=t=>t.split(" ").map(v=>v[0]).join("").toUpperCase(),f=()=>{s.trim()&&(p(s),o(""))};return a("div",{className:"space-y-4",children:[a("div",{className:"flex items-center gap-2",children:[e(x,{className:"h-5 w-5"}),e(i,{className:"text-lg font-medium",children:"Comments"}),e(l,{variant:"secondary",children:m.length})]}),e("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:m.map(t=>a("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[e(n,{className:"h-8 w-8 mt-1",children:e(d,{className:"text-xs bg-muted text-muted-foreground",children:g(t.author)})}),a("div",{className:"flex-1",children:[a("div",{className:"flex items-center gap-2 mb-1",children:[e("span",{className:"font-medium text-sm",children:t.author}),a("span",{className:"text-xs text-muted-foreground",children:[t.createdAt.toLocaleDateString()," at ",t.createdAt.toLocaleTimeString()]})]}),e("p",{className:"text-sm text-muted-foreground",children:t.text})]})]},t.id))}),a("div",{className:"flex gap-2",children:[e(c,{value:s,onChange:t=>o(t.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),e(r,{onClick:f,disabled:!s.trim(),size:"sm",className:"self-end",children:e(N,{className:"h-4 w-4"})})]})]})};export{B as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as i}from"./chunk-LLED3RQS.mjs";import{a as m}from"./chunk-SMKYMYUV.mjs";import{useState as b,useCallback as R}from"react";import{DragDropContext as x}from"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration";import{jsx as l,jsxs as P}from"react/jsx-runtime";var v=["firm","forecast","other"];function I({initialData:o,updateDeal:u,addComment:p}){let[a,d]=b(null),g=t=>(o.deals??[]).filter(e=>e.gecoStatus===t).filter(e=>e.status!=="Lost").filter(e=>e.status!=="Cold"),C=t=>t.reduce((e,s)=>e+(s.value||0),0),S=(t,e)=>{let s={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0};return t.reduce((n,r)=>n+(r.value||0)*(s[r.status]??0),0)},f=R(t=>{let{source:e,destination:s}=t;if(!s||e.droppableId===s.droppableId&&e.index===s.index)return;let n=e.droppableId,r=s.droppableId,c=o.deals?.filter(D=>D.id===e.index)[0],M=[...o.deals??[]];c&&(c.gecoStatus=r,u(c))},[u]);return l(x,{onDragEnd:f,children:P("div",{className:"flex flex-col p-4 overflow-hidden",style:{height:"calc(100% - 60px)"},children:[l("div",{className:"flex space-x-4 pb-4",children:v.map(t=>{let e=g(t);return l(m,{status:t,deals:e,customers:o.customers??[],users:o.users,categories:o.categories??[],onDealClick:d,calculateColumnValue:C,calculateWeightedValue:S,compact:!0},t)})}),a&&l(i,{deal:a,users:o.users,customer:a.customer,categories:o.categories??[],onClose:()=>d(null),onSave:u,onAddComment:t=>p(a.id.toString(),t)})]})})}export{I as a};
4
+ import{a as i}from"./chunk-BQJDTDBP.mjs";import{a as m}from"./chunk-SMKYMYUV.mjs";import{useState as b,useCallback as R}from"react";import{DragDropContext as x}from"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration";import{jsx as l,jsxs as P}from"react/jsx-runtime";var v=["firm","forecast","other"];function I({initialData:o,updateDeal:u,addComment:p}){let[a,d]=b(null),g=t=>(o.deals??[]).filter(e=>e.gecoStatus===t).filter(e=>e.status!=="Lost").filter(e=>e.status!=="Cold"),C=t=>t.reduce((e,s)=>e+(s.value||0),0),S=(t,e)=>{let s={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0};return t.reduce((n,r)=>n+(r.value||0)*(s[r.status]??0),0)},f=R(t=>{let{source:e,destination:s}=t;if(!s||e.droppableId===s.droppableId&&e.index===s.index)return;let n=e.droppableId,r=s.droppableId,c=o.deals?.filter(D=>D.id===e.index)[0],M=[...o.deals??[]];c&&(c.gecoStatus=r,u(c))},[u]);return l(x,{onDragEnd:f,children:P("div",{className:"flex flex-col p-4 overflow-hidden",style:{height:"calc(100% - 60px)"},children:[l("div",{className:"flex space-x-4 pb-4",children:v.map(t=>{let e=g(t);return l(m,{status:t,deals:e,customers:o.customers??[],users:o.users,categories:o.categories??[],onDealClick:d,calculateColumnValue:C,calculateWeightedValue:S,compact:!0},t)})}),a&&l(i,{deal:a,users:o.users,customer:a.customer,categories:o.categories??[],onClose:()=>d(null),onSave:u,onAddComment:t=>p(a.id.toString(),t)})]})})}export{I as a};
@@ -1 +1 @@
1
- import{a as f,d as b,g as v,i as m}from"./chunk-YFAZQYK4.mjs";import{a as g}from"./chunk-TVZOULLL.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as h}from"./chunk-CSBGSBEU.mjs";import{useState as C}from"react";import{jsx as a,jsxs as n}from"react/jsx-runtime";var A=({label:O,value:o,onValueChange:d,options:c,placeholder:y="Search...",allowCustomValue:s=!1,disabled:l=!1})=>{let[p,r]=C(!1),[t,i]=C(""),N=c.find(e=>e.value===o),S=c.filter(e=>e.label.toLowerCase().includes(t.toLowerCase())),I=e=>{d(e),r(!1),i("")},L=()=>{s&&t.trim()&&!c.find(e=>e.value===t.trim())&&(d(t.trim()),r(!1),i(""))};return n("div",{className:"space-y-1",children:[a(g,{className:"text-xs text-muted-foreground",children:O}),n(f,{value:o,onValueChange:I,open:p,onOpenChange:e=>{l||r(e)},disabled:l,children:[a(b,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:a(h,{variant:"secondary",className:`${l?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!l&&r(!p),children:N?.label||o||"Select..."})}),n(v,{children:[a("div",{className:"p-2",children:a(u,{placeholder:y,value:t,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key==="Enter"&&s&&L()},className:"mb-2"})}),S.map(e=>a(m,{value:e.value,children:e.label},e.value)),s&&t.trim()&&!S.find(e=>e.value===t.trim())&&n(m,{value:t.trim(),children:['Add "',t.trim(),'"']})]})]})]})};export{A as a};
1
+ import{a as f,d as b,g as v,i as m}from"./chunk-YFAZQYK4.mjs";import{a as g}from"./chunk-TVZOULLL.mjs";import{b as h}from"./chunk-CSBGSBEU.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{useState as C}from"react";import{jsx as a,jsxs as n}from"react/jsx-runtime";var A=({label:O,value:o,onValueChange:d,options:c,placeholder:y="Search...",allowCustomValue:s=!1,disabled:l=!1})=>{let[p,r]=C(!1),[t,i]=C(""),N=c.find(e=>e.value===o),S=c.filter(e=>e.label.toLowerCase().includes(t.toLowerCase())),I=e=>{d(e),r(!1),i("")},L=()=>{s&&t.trim()&&!c.find(e=>e.value===t.trim())&&(d(t.trim()),r(!1),i(""))};return n("div",{className:"space-y-1",children:[a(g,{className:"text-xs text-muted-foreground",children:O}),n(f,{value:o,onValueChange:I,open:p,onOpenChange:e=>{l||r(e)},disabled:l,children:[a(b,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:a(h,{variant:"secondary",className:`${l?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!l&&r(!p),children:N?.label||o||"Select..."})}),n(v,{children:[a("div",{className:"p-2",children:a(u,{placeholder:y,value:t,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key==="Enter"&&s&&L()},className:"mb-2"})}),S.map(e=>a(m,{value:e.value,children:e.label},e.value)),s&&t.trim()&&!S.find(e=>e.value===t.trim())&&n(m,{value:t.trim(),children:['Add "',t.trim(),'"']})]})]})]})};export{A as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as b}from"./chunk-JYL3XIJX.mjs";import{a as p}from"./chunk-4CU7D3X2.mjs";import{b as C}from"./chunk-ZUA4KNIR.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import{Formik as h}from"formik";import{FaUser as N}from"react-icons/fa6";import*as m from"yup";import{toast as v}from"sonner";import{jsx as a,jsxs as l}from"react/jsx-runtime";var s={tooShort:"Must be at least ${min} characters",tooLong:"Must be at most ${max} characters",required:"This field is required",email:"Invalid email format"},y=m.object().shape({name:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),email:m.string().email(s.email).required(s.required),subject:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),message:m.string().min(2,s.tooShort).max(300,s.tooLong).required(s.required)}),u=i("!pr-[44px] text-foreground"),g=i("!border-red-600 border"),d=i("sr-only");function k({onSubmit:f}={}){return a(h,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:y,onSubmit:async(e,{resetForm:o})=>{if(!f){v.error("Form submission not configured");return}let t=await f(e);t.data===null?v.error(t.message):(v.success(t.message),o())},children:({errors:e,touched:o,values:t,handleChange:n,handleBlur:c,isSubmitting:r,handleSubmit:x})=>l("form",{onSubmit:x,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[l("div",{children:[a(p,{placeholder:"Your Name",type:"text",name:"name",value:t.name,onChange:n,onBlur:c,disabled:r,icon:a(N,{className:"text-primary"}),className:i(u,e.name&&o.name&&g)}),e.name&&o.name&&a("p",{title:e.name,"aria-live":"polite",role:"error message",className:d,children:e.name})]}),l("div",{children:[a(p,{placeholder:"Your Email",type:"email",name:"email",value:t.email,onChange:n,onBlur:c,disabled:r,icon:a(L,{}),className:i(u,e.email&&o.email&&g)}),e.email&&o.email&&a("p",{title:e.email,"aria-live":"polite",role:"error message",className:d,children:e.email})]}),l("div",{className:"lg:col-span-2",children:[a(p,{placeholder:"Subject",type:"text",name:"subject",value:t.subject,onChange:n,onBlur:c,disabled:r,className:i(u,e.subject&&o.subject&&g)}),e.subject&&o.subject&&a("p",{title:e.subject,"aria-live":"polite",role:"error message",className:d,children:e.subject})]}),l("div",{className:"lg:col-span-2",children:[a(b,{placeholder:"Message...",name:"message",value:t.message,onChange:n,onBlur:c,disabled:r,icon:a(S,{}),className:i(u,e.message&&o.message&&g)}),e.message&&o.message&&a("p",{title:e.message,"aria-live":"polite",role:"error message",className:d,children:e.message})]}),a("div",{className:"lg:col-span-2 light grid justify-items-center",children:a(C,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:r,children:"Send"})})]})})}function L(){return a("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:a("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function S(){return a("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:a("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}export{k as a};
4
+ import{a as p}from"./chunk-4CU7D3X2.mjs";import{a as b}from"./chunk-JYL3XIJX.mjs";import{b as C}from"./chunk-ZUA4KNIR.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import{Formik as h}from"formik";import{FaUser as N}from"react-icons/fa6";import*as m from"yup";import{toast as v}from"sonner";import{jsx as a,jsxs as l}from"react/jsx-runtime";var s={tooShort:"Must be at least ${min} characters",tooLong:"Must be at most ${max} characters",required:"This field is required",email:"Invalid email format"},y=m.object().shape({name:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),email:m.string().email(s.email).required(s.required),subject:m.string().min(2,s.tooShort).max(50,s.tooLong).required(s.required),message:m.string().min(2,s.tooShort).max(300,s.tooLong).required(s.required)}),u=i("!pr-[44px] text-foreground"),g=i("!border-red-600 border"),d=i("sr-only");function k({onSubmit:f}={}){return a(h,{initialValues:{name:"",email:"",subject:"",message:""},validationSchema:y,onSubmit:async(e,{resetForm:o})=>{if(!f){v.error("Form submission not configured");return}let t=await f(e);t.data===null?v.error(t.message):(v.success(t.message),o())},children:({errors:e,touched:o,values:t,handleChange:n,handleBlur:c,isSubmitting:r,handleSubmit:x})=>l("form",{onSubmit:x,className:"grid grid-cols-1 gap-2 pt-2 lg:grid-cols-2",children:[l("div",{children:[a(p,{placeholder:"Your Name",type:"text",name:"name",value:t.name,onChange:n,onBlur:c,disabled:r,icon:a(N,{className:"text-primary"}),className:i(u,e.name&&o.name&&g)}),e.name&&o.name&&a("p",{title:e.name,"aria-live":"polite",role:"error message",className:d,children:e.name})]}),l("div",{children:[a(p,{placeholder:"Your Email",type:"email",name:"email",value:t.email,onChange:n,onBlur:c,disabled:r,icon:a(L,{}),className:i(u,e.email&&o.email&&g)}),e.email&&o.email&&a("p",{title:e.email,"aria-live":"polite",role:"error message",className:d,children:e.email})]}),l("div",{className:"lg:col-span-2",children:[a(p,{placeholder:"Subject",type:"text",name:"subject",value:t.subject,onChange:n,onBlur:c,disabled:r,className:i(u,e.subject&&o.subject&&g)}),e.subject&&o.subject&&a("p",{title:e.subject,"aria-live":"polite",role:"error message",className:d,children:e.subject})]}),l("div",{className:"lg:col-span-2",children:[a(b,{placeholder:"Message...",name:"message",value:t.message,onChange:n,onBlur:c,disabled:r,icon:a(S,{}),className:i(u,e.message&&o.message&&g)}),e.message&&o.message&&a("p",{title:e.message,"aria-live":"polite",role:"error message",className:d,children:e.message})]}),a("div",{className:"lg:col-span-2 light grid justify-items-center",children:a(C,{type:"submit",className:"outline px-6 rounded-full outline-accent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",disabled:r,children:"Send"})})]})})}function L(){return a("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:a("path",{d:"M14.9727 1.76172L13.2227 13.1094C13.1953 13.3828 13.0312 13.6289 12.7852 13.7656C12.6484 13.8203 12.5117 13.875 12.3477 13.875C12.2383 13.875 12.1289 13.8477 12.0195 13.793L8.68359 12.3984L7.28906 14.4766C7.17969 14.668 6.98828 14.75 6.79688 14.75C6.49609 14.75 6.25 14.5039 6.25 14.2031V11.5781C6.25 11.3594 6.30469 11.168 6.41406 11.0312L12.375 3.375L4.33594 10.6211L1.51953 9.44531C1.21875 9.30859 1 9.03516 1 8.67969C0.972656 8.29688 1.13672 8.02344 1.4375 7.85938L13.6875 0.886719C13.9609 0.722656 14.3438 0.722656 14.6172 0.914062C14.8906 1.10547 15.0273 1.43359 14.9727 1.76172Z"})})}function S(){return a("svg",{width:"14",height:"11",viewBox:"0 0 14 11",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"text-primary",children:a("path",{d:"M12.6875 0.5C13.3984 0.5 14 1.10156 14 1.8125C14 2.25 13.7812 2.63281 13.4531 2.87891L7.51953 7.33594C7.19141 7.58203 6.78125 7.58203 6.45312 7.33594L0.519531 2.87891C0.191406 2.63281 0 2.25 0 1.8125C0 1.10156 0.574219 0.5 1.3125 0.5H12.6875ZM5.93359 8.04688C6.5625 8.51172 7.41016 8.51172 8.03906 8.04688L14 3.5625V9.25C14 10.2344 13.207 11 12.25 11H1.75C0.765625 11 0 10.2344 0 9.25V3.5625L5.93359 8.04688Z"})})}export{k as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as p}from"./chunk-L5JPAKPM.mjs";import{b as r}from"./chunk-ZUA4KNIR.mjs";import{a as v,c as C}from"./chunk-SOLZ4VQH.mjs";import{b as f}from"./chunk-CSBGSBEU.mjs";import{a as s,b as u,c as g,e as l}from"./chunk-YO3GQYRJ.mjs";import{useState as x,useMemo as S}from"react";import{Search as A,Bot as N,ChevronLeft as I,Copy as B}from"lucide-react";import{motion as h,AnimatePresence as L}from"motion/react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function K({digitalColleagues:n,onColleagueClone:b,onCancel:y,selectedColleagueId:w}){let[i,D]=x(""),[m,k]=x("all"),d=S(()=>n.filter(t=>t?.name.toLowerCase().includes(i.toLowerCase())||t.jobDescription?.toLowerCase().includes(i.toLowerCase())||t.workInstructions?.toLowerCase().includes(i.toLowerCase())),[n,i,m]),c=t=>{let o={...t,name:`${t?.name} (Copy)`};b(o)},T=t=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(t);return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(L,{mode:"wait",children:a(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[a("div",{className:"flex items-center gap-4 mb-6",children:[a(r,{variant:"ghost",onClick:y,className:"gap-2",children:[e(I,{className:"h-4 w-4"}),"Back"]}),a("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),e("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),e(s,{children:e(l,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:a("div",{className:"relative",children:[e(A,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(p,{placeholder:"Search by name, job description, or capabilities...",value:i,onChange:t=>D(t.target.value),className:"pl-9"})]})}),a("select",{value:m,onChange:t=>k(t.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[e("option",{value:"all",children:"All Status"}),e("option",{value:"active",children:"Active"}),e("option",{value:"inactive",children:"Inactive"})]})]})})}),e("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(t=>e(h.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:a(s,{className:`cursor-pointer transition-all hover:shadow-lg ${w?.toString()===t.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(t),children:[e(u,{className:"pb-3",children:a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex items-center gap-3",children:[e(v,{children:e(C,{className:"bg-blue-100",children:e(N,{className:"h-4 w-4 text-blue-600"})})}),e("div",{children:e(g,{className:"text-lg flex items-center gap-2",children:t?.name})})]}),a(r,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:o=>{o.stopPropagation(),c(t)},children:[e(B,{className:"h-3 w-3"}),"Clone"]})]})}),e(l,{className:"pt-0",children:a("div",{className:"space-y-3",children:[a("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),e("p",{className:"text-sm line-clamp-2",children:t.jobDescription})]}),t.capabilities&&t.capabilities.length>0&&a("div",{children:[e("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),e("div",{className:"flex flex-wrap gap-1",children:t.capabilities.length>3&&a(f,{variant:"outline",className:"text-xs",children:["+",t.capabilities.length-3]})})]}),e("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),t.workInstructions&&a("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),e("p",{className:"text-xs line-clamp-2",children:t.workInstructions})]})]})})]})},t.id))}),d.length===0&&e(s,{children:e(l,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[e(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}export{K as a};
4
+ import{a as v,c as C}from"./chunk-SOLZ4VQH.mjs";import{b as f}from"./chunk-CSBGSBEU.mjs";import{a as s,b as u,c as g,e as l}from"./chunk-YO3GQYRJ.mjs";import{a as p}from"./chunk-L5JPAKPM.mjs";import{b as r}from"./chunk-ZUA4KNIR.mjs";import{useState as x,useMemo as S}from"react";import{Search as A,Bot as N,ChevronLeft as I,Copy as B}from"lucide-react";import{motion as h,AnimatePresence as L}from"motion/react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function K({digitalColleagues:n,onColleagueClone:b,onCancel:y,selectedColleagueId:w}){let[i,D]=x(""),[m,k]=x("all"),d=S(()=>n.filter(t=>t?.name.toLowerCase().includes(i.toLowerCase())||t.jobDescription?.toLowerCase().includes(i.toLowerCase())||t.workInstructions?.toLowerCase().includes(i.toLowerCase())),[n,i,m]),c=t=>{let o={...t,name:`${t?.name} (Copy)`};b(o)},T=t=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(t);return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(L,{mode:"wait",children:a(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[a("div",{className:"flex items-center gap-4 mb-6",children:[a(r,{variant:"ghost",onClick:y,className:"gap-2",children:[e(I,{className:"h-4 w-4"}),"Back"]}),a("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),e("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),e(s,{children:e(l,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:a("div",{className:"relative",children:[e(A,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(p,{placeholder:"Search by name, job description, or capabilities...",value:i,onChange:t=>D(t.target.value),className:"pl-9"})]})}),a("select",{value:m,onChange:t=>k(t.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[e("option",{value:"all",children:"All Status"}),e("option",{value:"active",children:"Active"}),e("option",{value:"inactive",children:"Inactive"})]})]})})}),e("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(t=>e(h.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:a(s,{className:`cursor-pointer transition-all hover:shadow-lg ${w?.toString()===t.id.toString()?"ring-2 ring-primary":""}`,onClick:()=>c(t),children:[e(u,{className:"pb-3",children:a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex items-center gap-3",children:[e(v,{children:e(C,{className:"bg-blue-100",children:e(N,{className:"h-4 w-4 text-blue-600"})})}),e("div",{children:e(g,{className:"text-lg flex items-center gap-2",children:t?.name})})]}),a(r,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:o=>{o.stopPropagation(),c(t)},children:[e(B,{className:"h-3 w-3"}),"Clone"]})]})}),e(l,{className:"pt-0",children:a("div",{className:"space-y-3",children:[a("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),e("p",{className:"text-sm line-clamp-2",children:t.jobDescription})]}),t.capabilities&&t.capabilities.length>0&&a("div",{children:[e("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),e("div",{className:"flex flex-wrap gap-1",children:t.capabilities.length>3&&a(f,{variant:"outline",className:"text-xs",children:["+",t.capabilities.length-3]})})]}),e("div",{className:"flex items-center justify-between text-xs text-muted-foreground"}),t.workInstructions&&a("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),e("p",{className:"text-xs line-clamp-2",children:t.workInstructions})]})]})})]})},t.id))}),d.length===0&&e(s,{children:e(l,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[e(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}export{K as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as N}from"./chunk-SNFBF6KT.mjs";import{a as x}from"./chunk-QKDYTCZC.mjs";import{a as g}from"./chunk-HD6E7KI2.mjs";import{a as f,b as y}from"./chunk-QY3UXH77.mjs";import{a as n}from"./chunk-R4SE63GR.mjs";import{a as r,b as h,d as v}from"./chunk-DXRAJQMA.mjs";import{a as u}from"./chunk-LJFBHY4P.mjs";import{a as b}from"./chunk-KPTGYVDM.mjs";import{a}from"./chunk-Z22NSJMF.mjs";import{useState as C}from"react";import{motion as G,AnimatePresence as Y}from"motion/react";import{Bot as z}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function K({title:k="Digital Colleagues",businessUnits:c,projects:m,fileCount:A,teamMemberCount:w,onCreateProject:P,onOpenProject:j,sidebarItems:W,initialColleagues:F,users:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I}){let[i,s]=C("home"),[l,O]=C(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},B=t=>{console.log("Opening file:",t.name)},_=t=>{console.log("Sharing file:",t.name)},D=t=>{console.log("Opening project:",t.name),j(t)},R=t=>{console.log("Sharing project:",t.name)},L=t=>{O(t),console.log("Business unit changed to:",t.name)},E=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},H=t=>{console.log("Notification removed:",t)},M=()=>{console.log("All notifications removed")},V=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:w}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e(N,{initialColleagues:F,availableUsers:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(x,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(u,{files:h,onFileClick:B})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:P}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(b,{project:t,onOpen:D,onShare:R},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:v.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(g,{sidebarItems:f,title:k,notifications:y,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:L,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:E,actionIcon:e(z,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:M,children:e(Y,{mode:"wait",children:e(G.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:V()},i)})})}export{K as a};
4
+ import{a as N}from"./chunk-DZDMH6IZ.mjs";import{a as x}from"./chunk-GFYO6B7H.mjs";import{a as g}from"./chunk-4KVVVRGU.mjs";import{a as f,b as y}from"./chunk-QY3UXH77.mjs";import{a as n}from"./chunk-3W5SE2HO.mjs";import{a as r,b as h,d as v}from"./chunk-DXRAJQMA.mjs";import{a as u}from"./chunk-TBKC2B4Z.mjs";import{a as b}from"./chunk-MQG7MKTK.mjs";import{a}from"./chunk-HF33ZXKX.mjs";import{useState as C}from"react";import{motion as G,AnimatePresence as Y}from"motion/react";import{Bot as z}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function K({title:k="Digital Colleagues",businessUnits:c,projects:m,fileCount:A,teamMemberCount:w,onCreateProject:P,onOpenProject:j,sidebarItems:W,initialColleagues:F,users:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I}){let[i,s]=C("home"),[l,O]=C(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},B=t=>{console.log("Opening file:",t.name)},_=t=>{console.log("Sharing file:",t.name)},D=t=>{console.log("Opening project:",t.name),j(t)},R=t=>{console.log("Sharing project:",t.name)},L=t=>{O(t),console.log("Business unit changed to:",t.name)},E=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},H=t=>{console.log("Notification removed:",t)},M=()=>{console.log("All notifications removed")},V=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:w}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e(N,{initialColleagues:F,availableUsers:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(x,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(u,{files:h,onFileClick:B})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:P}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(b,{project:t,onOpen:D,onShare:R},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:v.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(g,{sidebarItems:f,title:k,notifications:y,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:L,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:E,actionIcon:e(z,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:M,children:e(Y,{mode:"wait",children:e(G.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:V()},i)})})}export{K as a};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-KG7HG2VO.mjs";import{a as O}from"./chunk-L3V5YDPH.mjs";import{a as P}from"./chunk-QC2UWZWL.mjs";import{a as A}from"./chunk-Z22NSJMF.mjs";import{a as x}from"./chunk-UVHMI3PU.mjs";import{a as S}from"./chunk-B4H6T2GP.mjs";import{a as y}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{b as u}from"./chunk-CSBGSBEU.mjs";import{a as C}from"./chunk-YO3GQYRJ.mjs";import{useState as n,useRef as H,useEffect as k}from"react";import{Plus as ie,Move as oe,Edit2 as ne,Trash2 as re,Check as de,X as le}from"lucide-react";import{Fragment as B,jsx as t,jsxs as s}from"react/jsx-runtime";var Te=({tasks:M,epics:f,sprints:z,onUpdateTask:R,onTaskClick:I,onAddTaskToEpic:$,onAddEpic:L,onUpdateEpic:F,onDeleteEpic:V})=>{let[j,v]=n(f),[g,E]=n(null),[r,h]=n(null),[o,d]=n({}),[p,w]=n(0),[U,N]=n(!1),[X,T]=n(!1),[q,G]=n(null),l=H(null),J=H(null);k(()=>{v(f)},[f]),k(()=>{let e=()=>{if(l.current){let b=l.current.offsetHeight;w(b)}};e();let a=new ResizeObserver(e);l.current&&a.observe(l.current);let c=()=>{setTimeout(e,100)};return window.addEventListener("storage",c),()=>{a.disconnect(),window.removeEventListener("storage",c)}},[]),k(()=>{let e=setTimeout(()=>{l.current&&w(l.current.offsetHeight)},300);return()=>clearTimeout(e)},[r]);let K=e=>{E(e)},Q=e=>{e.preventDefault()},W=(e,a)=>{e.preventDefault(),g&&x(g.epic).toString()!==a&&(R(g.id.toString(),{epic:Number(a)}),E(null))},Y=e=>M.filter(a=>x(a.epic).toString()===e),Z=e=>{h(e.id.toString()),d({name:e.name,description:e.description,confidence:e.confidence,phase:e.phase})},_=async()=>{r&&o.name&&(await F(r.toString(),o),v(e=>e.map(a=>a.id.toString()===r?{...a,...o}:a)),h(null),d({}))},ee=()=>{h(null),d({})},te=async e=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await V(e),v(a=>a.filter(c=>c.id.toString()!==e)))},ce=e=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[e]||`Phase ${e}`,se=e=>{switch(e){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return s(B,{children:[s("div",{ref:J,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:l,className:"flex-shrink-0",children:t(A,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>N(!0)}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:t("div",{className:"h-full overflow-y-auto",style:{height:p>0?`calc(100vh - ${p+120}px)`:"calc(100vh - 12rem)"},children:t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:j.map(e=>{let a=Y(e.id.toString()),c=a.reduce((i,ae)=>i+(ae.storyPoints||0),0),b=p>0?`calc(100vh - ${p+200}px)`:"calc(100vh - 14rem)";return s(C,{className:`flex flex-col ${r===e.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:r===e.id.toString()?"auto":b,minHeight:"400px"},onDragOver:Q,onDrop:i=>W(i,e.id.toString()),children:[t("div",{className:"p-4 border-b border-border",children:r===e.id.toString()?s("div",{className:"space-y-4",children:[s("div",{className:"flex items-center justify-between",children:[t(y,{value:o.name||"",onChange:i=>d({...o,name:i.target.value}),placeholder:"Epic name",className:"font-semibold"}),s("div",{className:"flex gap-2 ml-2",children:[t(m,{size:"sm",variant:"ghost",onClick:_,className:"p-1 h-8 w-8",children:t(de,{className:"h-4 w-4"})}),t(m,{size:"sm",variant:"ghost",onClick:ee,className:"p-1 h-8 w-8",children:t(le,{className:"h-4 w-4"})})]})]}),t(S,{value:o.description||"",onChange:i=>d({...o,description:i.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),s("div",{className:"grid grid-cols-2 gap-2",children:[s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),s("select",{value:o.confidence||e.confidence,onChange:i=>d({...o,confidence:i.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[t("option",{value:"low",children:"Low"}),t("option",{value:"medium",children:"Medium"}),t("option",{value:"high",children:"High"})]})]}),s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Phase"}),t("select",{value:o.phase?.toString()||e.phase.toString(),onChange:i=>d({...o,phase:parseInt(i.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(i=>s("option",{value:i.toString(),children:["Phase ",i]},i))})]})]})]}):s(B,{children:[s("div",{className:"flex items-center gap-2 mb-2",children:[t("div",{className:`w-4 h-4 rounded-full ${e.color}`}),t("h3",{className:"font-semibold text-foreground select-none flex-1",children:e.name}),s("div",{className:"flex gap-1",children:[t(m,{size:"sm",variant:"ghost",onClick:()=>Z(e),className:"p-1 h-8 w-8",children:t(ne,{className:"h-3 w-3"})}),t(m,{size:"sm",variant:"ghost",onClick:()=>te(e.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:t(re,{className:"h-3 w-3"})})]})]}),s("div",{className:"flex flex-wrap gap-2 mb-3",children:[s(u,{className:`text-xs ${se(e.confidence)}`,children:[e.confidence," confidence"]}),s(u,{variant:"outline",className:"text-xs",children:["Phase ",e.phase]}),s(u,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[a.length," tasks"]}),s(u,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[c," pts"]})]}),e.description&&t("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:e.description}),s(m,{onClick:()=>{T(!0),G(e)},variant:"outline",size:"sm",className:"w-full gap-2",children:[t(ie,{className:"h-4 w-4"}),"Add Task"]})]})}),t("div",{className:"flex-1 p-4 overflow-y-auto",children:t("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:a.length===0?s("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[t(oe,{className:"h-8 w-8 mb-2"}),t("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):a.map(i=>t(D,{task:i,epic:e,onDragStart:K,onTaskClick:I,isCompact:!0},i.id))})})]},e.id)})})})})]}),t(O,{isOpen:U,onClose:()=>N(!1),onAddEpic:L}),t(P,{isOpen:X,onClose:()=>T(!1),onAddTask:$,assignees:[],epics:[],defaultEpicId:q?.id.toString()||"",sprints:z})]})};export{Te as a};
1
+ import{a as D}from"./chunk-KG7HG2VO.mjs";import{a as O}from"./chunk-L3V5YDPH.mjs";import{a as P}from"./chunk-QC2UWZWL.mjs";import{a as A}from"./chunk-HF33ZXKX.mjs";import{a as x}from"./chunk-UVHMI3PU.mjs";import{a as S}from"./chunk-B4H6T2GP.mjs";import{b as u}from"./chunk-CSBGSBEU.mjs";import{a as C}from"./chunk-YO3GQYRJ.mjs";import{a as y}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{useState as n,useRef as H,useEffect as k}from"react";import{Plus as ie,Move as oe,Edit2 as ne,Trash2 as re,Check as de,X as le}from"lucide-react";import{Fragment as B,jsx as t,jsxs as s}from"react/jsx-runtime";var Te=({tasks:M,epics:f,sprints:z,onUpdateTask:R,onTaskClick:I,onAddTaskToEpic:$,onAddEpic:L,onUpdateEpic:F,onDeleteEpic:V})=>{let[j,v]=n(f),[g,E]=n(null),[r,h]=n(null),[o,d]=n({}),[p,w]=n(0),[U,N]=n(!1),[X,T]=n(!1),[q,G]=n(null),l=H(null),J=H(null);k(()=>{v(f)},[f]),k(()=>{let e=()=>{if(l.current){let b=l.current.offsetHeight;w(b)}};e();let a=new ResizeObserver(e);l.current&&a.observe(l.current);let c=()=>{setTimeout(e,100)};return window.addEventListener("storage",c),()=>{a.disconnect(),window.removeEventListener("storage",c)}},[]),k(()=>{let e=setTimeout(()=>{l.current&&w(l.current.offsetHeight)},300);return()=>clearTimeout(e)},[r]);let K=e=>{E(e)},Q=e=>{e.preventDefault()},W=(e,a)=>{e.preventDefault(),g&&x(g.epic).toString()!==a&&(R(g.id.toString(),{epic:Number(a)}),E(null))},Y=e=>M.filter(a=>x(a.epic).toString()===e),Z=e=>{h(e.id.toString()),d({name:e.name,description:e.description,confidence:e.confidence,phase:e.phase})},_=async()=>{r&&o.name&&(await F(r.toString(),o),v(e=>e.map(a=>a.id.toString()===r?{...a,...o}:a)),h(null),d({}))},ee=()=>{h(null),d({})},te=async e=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await V(e),v(a=>a.filter(c=>c.id.toString()!==e)))},ce=e=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[e]||`Phase ${e}`,se=e=>{switch(e){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return s(B,{children:[s("div",{ref:J,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:l,className:"flex-shrink-0",children:t(A,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>N(!0)}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:t("div",{className:"h-full overflow-y-auto",style:{height:p>0?`calc(100vh - ${p+120}px)`:"calc(100vh - 12rem)"},children:t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:j.map(e=>{let a=Y(e.id.toString()),c=a.reduce((i,ae)=>i+(ae.storyPoints||0),0),b=p>0?`calc(100vh - ${p+200}px)`:"calc(100vh - 14rem)";return s(C,{className:`flex flex-col ${r===e.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:r===e.id.toString()?"auto":b,minHeight:"400px"},onDragOver:Q,onDrop:i=>W(i,e.id.toString()),children:[t("div",{className:"p-4 border-b border-border",children:r===e.id.toString()?s("div",{className:"space-y-4",children:[s("div",{className:"flex items-center justify-between",children:[t(y,{value:o.name||"",onChange:i=>d({...o,name:i.target.value}),placeholder:"Epic name",className:"font-semibold"}),s("div",{className:"flex gap-2 ml-2",children:[t(m,{size:"sm",variant:"ghost",onClick:_,className:"p-1 h-8 w-8",children:t(de,{className:"h-4 w-4"})}),t(m,{size:"sm",variant:"ghost",onClick:ee,className:"p-1 h-8 w-8",children:t(le,{className:"h-4 w-4"})})]})]}),t(S,{value:o.description||"",onChange:i=>d({...o,description:i.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),s("div",{className:"grid grid-cols-2 gap-2",children:[s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),s("select",{value:o.confidence||e.confidence,onChange:i=>d({...o,confidence:i.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[t("option",{value:"low",children:"Low"}),t("option",{value:"medium",children:"Medium"}),t("option",{value:"high",children:"High"})]})]}),s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Phase"}),t("select",{value:o.phase?.toString()||e.phase.toString(),onChange:i=>d({...o,phase:parseInt(i.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(i=>s("option",{value:i.toString(),children:["Phase ",i]},i))})]})]})]}):s(B,{children:[s("div",{className:"flex items-center gap-2 mb-2",children:[t("div",{className:`w-4 h-4 rounded-full ${e.color}`}),t("h3",{className:"font-semibold text-foreground select-none flex-1",children:e.name}),s("div",{className:"flex gap-1",children:[t(m,{size:"sm",variant:"ghost",onClick:()=>Z(e),className:"p-1 h-8 w-8",children:t(ne,{className:"h-3 w-3"})}),t(m,{size:"sm",variant:"ghost",onClick:()=>te(e.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:t(re,{className:"h-3 w-3"})})]})]}),s("div",{className:"flex flex-wrap gap-2 mb-3",children:[s(u,{className:`text-xs ${se(e.confidence)}`,children:[e.confidence," confidence"]}),s(u,{variant:"outline",className:"text-xs",children:["Phase ",e.phase]}),s(u,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[a.length," tasks"]}),s(u,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[c," pts"]})]}),e.description&&t("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:e.description}),s(m,{onClick:()=>{T(!0),G(e)},variant:"outline",size:"sm",className:"w-full gap-2",children:[t(ie,{className:"h-4 w-4"}),"Add Task"]})]})}),t("div",{className:"flex-1 p-4 overflow-y-auto",children:t("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:a.length===0?s("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[t(oe,{className:"h-8 w-8 mb-2"}),t("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):a.map(i=>t(D,{task:i,epic:e,onDragStart:K,onTaskClick:I,isCompact:!0},i.id))})})]},e.id)})})})})]}),t(O,{isOpen:U,onClose:()=>N(!1),onAddEpic:L}),t(P,{isOpen:X,onClose:()=>T(!1),onAddTask:$,assignees:[],epics:[],defaultEpicId:q?.id.toString()||"",sprints:z})]})};export{Te as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as y}from"./chunk-TKY52BNP.mjs";import{a as x,c as N,e as w,i as h}from"./chunk-3UMMMQEH.mjs";import{b as n}from"./chunk-ZUA4KNIR.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{motion as b}from"motion/react";import{Trash2 as F,Edit as D}from"lucide-react";import*as C from"@radix-ui/react-dialog";import{Loader2 as L}from"lucide-react";import{useState as v}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var k=s=>{if(!s||s<=0)return"0 KB";let o=s/1024;return o<1024?`${o.toFixed(2)} KB`:`${(o/1024).toFixed(2)} MB`};function q({files:s,onFileClick:o,onFileDelete:m,onFileUpdate:z,showHeader:T=!0,className:P,viewMode:l="list"}){let[S,r]=v(!1),[B,g]=v(!1),[d,c]=v(null),u=()=>{r(!1),c(null)},E=()=>{g(!0),setTimeout(()=>{g(!1),r(!1),c(null)},500)},f=t=>{c(t),r(!0)};return a("div",{className:p("rounded-3xl border overflow-hidden",P),children:[a("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[T&&l==="list"&&a("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[e("div",{className:"col-span-6",children:"Name"}),e("div",{className:"col-span-2",children:"Size"}),e("div",{className:"col-span-2",children:"Modified"})]}),l==="card"&&e("div",{className:"text-sm font-medium",children:"Files"})]}),l==="list"&&e("div",{className:"divide-y",children:s.map(t=>a(b.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>o?.(t),children:[a("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),e("div",{children:e("p",{className:"font-medium",children:t.name})})]}),e("div",{className:"col-span-2 text-sm md:text-base",children:k(t.filesize)}),a("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[e("span",{className:"text-sm md:text-base",children:new Date(t.createdAt).toLocaleDateString()}),a("div",{className:"flex gap-1",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},children:e(F,{className:"h-4 w-4"})})]})]})]},t.name))}),l==="card"&&e("div",{className:"p-4 grid grid-cols-1 gap-4",children:s.map(t=>e(b.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>o?.(t),children:a("div",{className:"flex items-start justify-between gap-4",children:[a("div",{className:"flex-1 min-w-0 space-y-2",children:[a("div",{className:"flex items-center gap-3",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),e("div",{className:"min-w-0 flex-1",children:e("p",{className:"font-medium truncate",children:t.name})})]}),a("div",{className:"space-y-1 text-sm text-muted-foreground pl-[52px]",children:[a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Size:"}),e("span",{children:k(t.filesize)})]}),a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Modified:"}),e("span",{children:new Date(t.createdAt).toLocaleDateString()})]})]})]}),a("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},title:"Edit",children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},title:"Delete",children:e(F,{className:"h-4 w-4"})})]})]})},t.name))}),e(x,{open:S,onOpenChange:t=>!t&&u(),children:a(N,{children:[e(w,{}),a(C.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[e(h,{className:"sr-only",children:d?`Edit ${d.name}`:"Edit File"}),B&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:e(L,{className:"h-8 w-8 animate-spin text-primary"})}),d&&e(y,{document:d,onSave:E,onFileUpdate:z,onCancel:u})]})]})})]})}export{q as a};
4
+ import{a as y}from"./chunk-7HIL4GBK.mjs";import{a as x,c as N,e as w,i as h}from"./chunk-3UMMMQEH.mjs";import{b as n}from"./chunk-ZUA4KNIR.mjs";import{a as p}from"./chunk-MDJREBVI.mjs";import{motion as b}from"motion/react";import{Trash2 as F,Edit as D}from"lucide-react";import*as C from"@radix-ui/react-dialog";import{Loader2 as L}from"lucide-react";import{useState as v}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var k=s=>{if(!s||s<=0)return"0 KB";let o=s/1024;return o<1024?`${o.toFixed(2)} KB`:`${(o/1024).toFixed(2)} MB`};function q({files:s,onFileClick:o,onFileDelete:m,onFileUpdate:z,showHeader:T=!0,className:P,viewMode:l="list"}){let[S,r]=v(!1),[B,g]=v(!1),[d,c]=v(null),u=()=>{r(!1),c(null)},E=()=>{g(!0),setTimeout(()=>{g(!1),r(!1),c(null)},500)},f=t=>{c(t),r(!0)};return a("div",{className:p("rounded-3xl border overflow-hidden",P),children:[a("div",{className:"bg-muted/50 p-3 flex items-center justify-between",children:[T&&l==="list"&&a("div",{className:"hidden md:grid md:grid-cols-10 text-sm font-medium flex-1",children:[e("div",{className:"col-span-6",children:"Name"}),e("div",{className:"col-span-2",children:"Size"}),e("div",{className:"col-span-2",children:"Modified"})]}),l==="card"&&e("div",{className:"text-sm font-medium",children:"Files"})]}),l==="list"&&e("div",{className:"divide-y",children:s.map(t=>a(b.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>o?.(t),children:[a("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),e("div",{children:e("p",{className:"font-medium",children:t.name})})]}),e("div",{className:"col-span-2 text-sm md:text-base",children:k(t.filesize)}),a("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[e("span",{className:"text-sm md:text-base",children:new Date(t.createdAt).toLocaleDateString()}),a("div",{className:"flex gap-1",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},children:e(F,{className:"h-4 w-4"})})]})]})]},t.name))}),l==="card"&&e("div",{className:"p-4 grid grid-cols-1 gap-4",children:s.map(t=>e(b.div,{whileHover:{scale:1.02},className:"border rounded-lg p-4 bg-card hover:bg-muted/50 transition-colors cursor-pointer",onClick:()=>o?.(t),children:a("div",{className:"flex items-start justify-between gap-4",children:[a("div",{className:"flex-1 min-w-0 space-y-2",children:[a("div",{className:"flex items-center gap-3",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted flex-shrink-0"}),e("div",{className:"min-w-0 flex-1",children:e("p",{className:"font-medium truncate",children:t.name})})]}),a("div",{className:"space-y-1 text-sm text-muted-foreground pl-[52px]",children:[a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Size:"}),e("span",{children:k(t.filesize)})]}),a("div",{className:"flex items-center gap-2",children:[e("span",{className:"font-medium",children:"Modified:"}),e("span",{children:new Date(t.createdAt).toLocaleDateString()})]})]})]}),a("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[t.mimeType==="text/markdown"&&e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:i=>{i.stopPropagation(),f(t)},title:"Edit",children:e(D,{className:"h-4 w-4"})}),e(n,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:i=>{i.stopPropagation(),m?.(t)},title:"Delete",children:e(F,{className:"h-4 w-4"})})]})]})},t.name))}),e(x,{open:S,onOpenChange:t=>!t&&u(),children:a(N,{children:[e(w,{}),a(C.Content,{className:p("fixed inset-0 z-50 bg-background p-0 m-0 border-0","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),children:[e(h,{className:"sr-only",children:d?`Edit ${d.name}`:"Edit File"}),B&&e("div",{className:"absolute inset-0 bg-background/50 flex items-center justify-center z-50",children:e(L,{className:"h-8 w-8 animate-spin text-primary"})}),d&&e(y,{document:d,onSave:E,onFileUpdate:z,onCancel:u})]})]})})]})}export{q as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as T}from"./chunk-6DQ7FEQQ.mjs";import{a as F}from"./chunk-2VOOH4YJ.mjs";import{a as v}from"./chunk-MDJREBVI.mjs";import{a as R}from"./chunk-Q3G5UAAD.mjs";import{useState as A}from"react";import G from"html2canvas";import{jsPDF as W}from"jspdf";import{Fragment as J,jsx as e,jsxs as g}from"react/jsx-runtime";function ae({type:p="slideshow",orientation:d="landscape",...c}){let h=c.page,[C,n]=A(d),{contentWithIds:a,tableOfContents:i}=R(h);if(p==="slideshow")return e("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:e(T,{blocks:a,hero:c.hero,title:c.page.title,logoImage:c.logoImage})});if(p==="print")return g(J,{children:[e(U,{layout:C,changeLayout:n}),e(F,{page:c.page,layout:C,logoImage:c.logoImage})]})}var U=({changeLayout:p,layout:d="landscape"})=>{let c=async()=>{if(d==="flow"){let a=document.getElementById("printable-content")?.innerHTML;if(a){var n=window.document.body.innerHTML;window.document.body.innerHTML=a,window.print(),window.document.body.innerHTML=n}}else await new Promise(a=>setTimeout(a,300)),window.print()},h=n=>{p&&p(n)},C=async n=>{let a=document.getElementById(n);if(!a)throw new Error(`Element with id ${n} not found`);let i=document.createElement("canvas"),P=window.devicePixelRatio;i.width=Math.max(a.clientWidth||0)*P,i.height=Math.max(a.clientHeight||0)*P+100;let u=i.getContext("2d");if(!u)throw new Error("Failed to get 2D context");let q=u.drawImage,z=Array.from(a.getElementsByTagName("img")).reduce((y,s)=>(y[s.src]=s,y),{});u.drawImage=function(...y){let[s,S,j,l,r,D,B,m,w]=y;if(s instanceof HTMLImageElement){let Y=z[s.src].style.objectFit||"fill",$=z[s.src].style.objectPosition||"center center";r=s.height,l=s.width;let L=l/r,b=m/w,[x,f]=$.split(" ");switch(f||(f=x),Y){case"cover":if(L>b){let t=r*b,o=(l-t)/2;x==="left"&&(o=0),x==="right"&&(o=l-t),S+=o,l=t}else{let t=l/b,o=(r-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=r-t),j+=o,r=t}break;case"contain":if(L>b){let t=m/L,o=(w-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=w-t),B+=o,w=t}else{let t=w*L,o=(m-t)/2;x==="left"&&(o=0),x==="right"&&(o=m-t),D+=o,m=t}break;case"fill":break}}return q.call(u,s,S,j,l,r,D,B,m,w)};let k=document.getElementById(n);if(!k)throw new Error(`Element with id ${n} not found`);var O=i.width,X=i.height;let I=(await G(k,{canvas:i,windowHeight:X,windowWidth:O,scale:window.devicePixelRatio})).toDataURL("image/png"),N=new W({}).getImageProperties(I),M=297,E=M*(N.height/N.width),H=new W({unit:"mm",format:[M,E]});H.addImage(I,"PNG",0,0,M,E),H.save("print.pdf")};return e("div",{className:v("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:e("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:g("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[g("a",{onClick:c,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:e("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),e("small",{className:"text-xs font-medium",children:"Print"})]}),e("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),g("a",{onClick:()=>h("portrait"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="portrait"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:e("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),e("small",{className:"text-xs",children:"Portrait"})]}),g("a",{onClick:()=>h("landscape"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="landscape"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:e("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),e("small",{className:"text-xs",children:"Landscape"})]}),g("a",{onClick:()=>h("flow"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="flow"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:e("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),e("small",{className:"text-xs",children:"Continuous"})]})]})})})};export{ae as a};
4
+ import{a as F}from"./chunk-QDK5I675.mjs";import{a as T}from"./chunk-ORCATWOS.mjs";import{a as v}from"./chunk-MDJREBVI.mjs";import{a as R}from"./chunk-Q3G5UAAD.mjs";import{useState as A}from"react";import G from"html2canvas";import{jsPDF as W}from"jspdf";import{Fragment as J,jsx as e,jsxs as g}from"react/jsx-runtime";function ae({type:p="slideshow",orientation:d="landscape",...c}){let h=c.page,[C,n]=A(d),{contentWithIds:a,tableOfContents:i}=R(h);if(p==="slideshow")return e("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:e(T,{blocks:a,hero:c.hero,title:c.page.title,logoImage:c.logoImage})});if(p==="print")return g(J,{children:[e(U,{layout:C,changeLayout:n}),e(F,{page:c.page,layout:C,logoImage:c.logoImage})]})}var U=({changeLayout:p,layout:d="landscape"})=>{let c=async()=>{if(d==="flow"){let a=document.getElementById("printable-content")?.innerHTML;if(a){var n=window.document.body.innerHTML;window.document.body.innerHTML=a,window.print(),window.document.body.innerHTML=n}}else await new Promise(a=>setTimeout(a,300)),window.print()},h=n=>{p&&p(n)},C=async n=>{let a=document.getElementById(n);if(!a)throw new Error(`Element with id ${n} not found`);let i=document.createElement("canvas"),P=window.devicePixelRatio;i.width=Math.max(a.clientWidth||0)*P,i.height=Math.max(a.clientHeight||0)*P+100;let u=i.getContext("2d");if(!u)throw new Error("Failed to get 2D context");let q=u.drawImage,z=Array.from(a.getElementsByTagName("img")).reduce((y,s)=>(y[s.src]=s,y),{});u.drawImage=function(...y){let[s,S,j,l,r,D,B,m,w]=y;if(s instanceof HTMLImageElement){let Y=z[s.src].style.objectFit||"fill",$=z[s.src].style.objectPosition||"center center";r=s.height,l=s.width;let L=l/r,b=m/w,[x,f]=$.split(" ");switch(f||(f=x),Y){case"cover":if(L>b){let t=r*b,o=(l-t)/2;x==="left"&&(o=0),x==="right"&&(o=l-t),S+=o,l=t}else{let t=l/b,o=(r-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=r-t),j+=o,r=t}break;case"contain":if(L>b){let t=m/L,o=(w-t)/2;f==="top"&&(o=0),f==="bottom"&&(o=w-t),B+=o,w=t}else{let t=w*L,o=(m-t)/2;x==="left"&&(o=0),x==="right"&&(o=m-t),D+=o,m=t}break;case"fill":break}}return q.call(u,s,S,j,l,r,D,B,m,w)};let k=document.getElementById(n);if(!k)throw new Error(`Element with id ${n} not found`);var O=i.width,X=i.height;let I=(await G(k,{canvas:i,windowHeight:X,windowWidth:O,scale:window.devicePixelRatio})).toDataURL("image/png"),N=new W({}).getImageProperties(I),M=297,E=M*(N.height/N.width),H=new W({unit:"mm",format:[M,E]});H.addImage(I,"PNG",0,0,M,E),H.save("print.pdf")};return e("div",{className:v("fixed right-2 z-20 top-20 space-y-6 print:hidden"),children:e("div",{className:"flex flex-row-reverse z-20 min-w-70 gap-4",children:g("nav",{className:"z-20 flex grow-0 justify-end gap-4 border-t border-gray-200 bg-white/50 p-2.5 shadow-lg backdrop-blur-lg dark:border-slate-600/60 dark:bg-slate-800/50 min-h-[auto] min-w-[54px] flex-col rounded-lg border",children:[g("a",{onClick:c,className:"flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 text-gray-700 dark:text-gray-400 hover:text-accent",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:e("path",{d:"M96 160l-32 0 0-96C64 28.7 92.7 0 128 0L357.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 18.7 28.3 18.7 45.3l0 69.5-32 0 0-69.5c0-8.5-3.4-16.6-9.4-22.6L380.1 41.4c-6-6-14.1-9.4-22.6-9.4L128 32c-17.7 0-32 14.3-32 32l0 96zm352 64L64 224c-17.7 0-32 14.3-32 32l0 128 32 0 0-32c0-17.7 14.3-32 32-32l320 0c17.7 0 32 14.3 32 32l0 32 32 0 0-128c0-17.7-14.3-32-32-32zm0 192l0 64c0 17.7-14.3 32-32 32L96 512c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32L0 256c0-35.3 28.7-64 64-64l384 0c35.3 0 64 28.7 64 64l0 128c0 17.7-14.3 32-32 32l-32 0zM96 352l0 128 320 0 0-128L96 352zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})}),e("small",{className:"text-xs font-medium",children:"Print"})]}),e("div",{className:"flex-grow border-t border-gray-200 dark:border-slate-600/60"}),g("a",{onClick:()=>h("portrait"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="portrait"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",children:e("path",{d:"M352 448c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 64c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 384zM384 64c0-35.3-28.7-64-64-64L64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-384z"})}),e("small",{className:"text-xs",children:"Portrait"})]}),g("a",{onClick:()=>h("landscape"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="landscape"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor",children:e("path",{d:"M576 96c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32L64 416c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l512 0zM64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l512 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 64z"})}),e("small",{className:"text-xs",children:"Landscape"})]}),g("a",{onClick:()=>h("flow"),className:v("flex aspect-square min-h-[25px] w-12 flex-col items-center justify-center gap-1 rounded-md p-1.5 hover:text-accent",d==="flow"?"text-accent":"hover:text-accent"),children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:"currentColor",children:e("path",{d:"M266.2 4.7C273 1.6 280.5 0 288 0s15 1.6 21.8 4.7l217.4 97.5c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 251.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 153.9C38.6 149.3 32 139.2 32 128s6.6-21.3 16.8-25.9L266.2 4.7zM288 32c-3 0-6 .6-8.8 1.9L69.3 128l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-210-94.1C294 32.6 291 32 288 32zM48.8 358.1l45.9-20.6 39.1 17.5L69.3 384l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 507.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 409.9C38.6 405.3 32 395.2 32 384s6.6-21.3 16.8-25.9zM94.7 209.5l39.1 17.5L69.3 256l210 94.1c2.8 1.2 5.7 1.9 8.8 1.9s6-.6 8.8-1.9l210-94.1-64.5-28.9 39.1-17.5 45.9 20.6c10.2 4.6 16.8 14.7 16.8 25.9s-6.6 21.3-16.8 25.9L309.8 379.3c-6.9 3.1-14.3 4.7-21.8 4.7s-15-1.6-21.8-4.7L48.8 281.9C38.6 277.3 32 267.2 32 256s6.6-21.3 16.8-25.9l45.9-20.6z"})}),e("small",{className:"text-xs",children:"Continuous"})]})]})})})};export{ae as a};
@@ -1 +1 @@
1
- import{f as u}from"./chunk-FRXZ2OKW.mjs";import{a as m}from"./chunk-2QZUKVBA.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{jsx as r,jsxs as h}from"react/jsx-runtime";var B=g=>{let{columns:a,theme:i}=g,y={full:"12",half:"6",oneThird:"4",twoThirds:"8"},b={none:"",line:"border border-primary p-4 rounded-lg"},c=e=>{if(e.type&&e.type==="block"&&e.fields&&(e.fields.blockType==="imageBlock"||e.fields.blockType==="mediaBlock"))return!0;if(e.root&&e.root.children){for(let o of e.root.children)if(c(o))return!0}if(e.children){for(let o of e.children)if(c(o))return!0}return!1},k=(e,o,n)=>{if(o==="none"||n==="full")return{processedRichText:e,heading:null};let l=e,t=null;return e&&e.root&&e.root.children&&e.root.children[0].tag==="h2"&&(l={...e,root:{...e.root,children:e.root.children.slice(1)}},t=e.root.children[0]),{processedRichText:l,heading:t}};return r("div",{className:"my-6",children:r("div",{className:d("grid grid-cols-4 lg:grid-cols-12 gap-y-8",i?.settings?.box?"gap-x-8":"gap-x-16"),children:a&&a.length>0&&a.map((e,o)=>{let{enableLink:n,link:l,richText:t,size:s}=e,{processedRichText:p,heading:f}=k(t,i?.settings?.box||"none",s||"full");return h("div",{className:d(`col-span-4 lg:col-span-${y[s]}`,{"md:col-span-2":s!=="full"},b[s!=="full"&&!c(t)&&i?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${o+1}00`),children:[f&&r("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-xl",children:f.children[0].text}),p&&r(u,{content:p,enableGutter:!1,className:"rich-text"}),n&&r(m,{...l})]},o)})})})};export{B as a};
1
+ import{f as u}from"./chunk-OAK45GQL.mjs";import{a as m}from"./chunk-2QZUKVBA.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{jsx as r,jsxs as h}from"react/jsx-runtime";var B=g=>{let{columns:a,theme:i}=g,y={full:"12",half:"6",oneThird:"4",twoThirds:"8"},b={none:"",line:"border border-primary p-4 rounded-lg"},c=e=>{if(e.type&&e.type==="block"&&e.fields&&(e.fields.blockType==="imageBlock"||e.fields.blockType==="mediaBlock"))return!0;if(e.root&&e.root.children){for(let o of e.root.children)if(c(o))return!0}if(e.children){for(let o of e.children)if(c(o))return!0}return!1},k=(e,o,n)=>{if(o==="none"||n==="full")return{processedRichText:e,heading:null};let l=e,t=null;return e&&e.root&&e.root.children&&e.root.children[0].tag==="h2"&&(l={...e,root:{...e.root,children:e.root.children.slice(1)}},t=e.root.children[0]),{processedRichText:l,heading:t}};return r("div",{className:"my-6",children:r("div",{className:d("grid grid-cols-4 lg:grid-cols-12 gap-y-8",i?.settings?.box?"gap-x-8":"gap-x-16"),children:a&&a.length>0&&a.map((e,o)=>{let{enableLink:n,link:l,richText:t,size:s}=e,{processedRichText:p,heading:f}=k(t,i?.settings?.box||"none",s||"full");return h("div",{className:d(`col-span-4 lg:col-span-${y[s]}`,{"md:col-span-2":s!=="full"},b[s!=="full"&&!c(t)&&i?.settings?.box||"none"],"intersect-once intersect:animate-flip-up opacity-0 intersect:opacity-100 intersect:animate-duration-500",`intersect:animate-delay-${o+1}00`),children:[f&&r("div",{className:"bg-primary text-primary-foreground mb-4 -mt-4 -mx-4 px-4 py-2 text-xl",children:f.children[0].text}),p&&r(u,{content:p,enableGutter:!1,className:"rich-text"}),n&&r(m,{...l})]},o)})})})};export{B as a};
@@ -1 +1 @@
1
- import{a as r,b as s,i,j as t,m as l,n as d}from"./chunk-OCPX4QPC.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{a as m,b as p,c}from"./chunk-SOLZ4VQH.mjs";import{Bell as g,Settings as h,User as b,Menu as v}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var k=({isRightSidebarOpen:f,onToggleRightSidebar:w,onToggleLeftSidebar:n,onToggleNotifications:u})=>e("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:e("div",{className:"container mx-auto px-6 py-4",children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center space-x-4",children:[n&&e(o,{variant:"ghost",size:"icon",className:"md:hidden",onClick:n,children:e(v,{className:"h-5 w-5"})}),e("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),a("div",{className:"flex items-center space-x-4",children:[a(o,{variant:"ghost",size:"icon",className:"relative",onClick:u,children:[e(g,{className:"h-5 w-5"}),e("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),a(r,{children:[e(s,{asChild:!0,children:e(o,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:a(m,{className:"h-10 w-10",children:[e(p,{src:"/avatars/01.png",alt:"@user"}),e(c,{children:"JD"})]})})}),a(i,{className:"w-56",align:"end",forceMount:!0,children:[e(l,{className:"font-normal",children:a("div",{className:"flex flex-col space-y-1",children:[e("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),e("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),e(d,{}),a(t,{children:[e(b,{className:"mr-2 h-4 w-4"}),e("span",{children:"Profile"})]}),a(t,{children:[e(h,{className:"mr-2 h-4 w-4"}),e("span",{children:"Settings"})]})]})]})]})]})})});export{k as a};
1
+ import{a as r,b as s,i,j as t,m as l,n as d}from"./chunk-OCPX4QPC.mjs";import{a as m,b as p,c}from"./chunk-SOLZ4VQH.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{Bell as g,Settings as h,User as b,Menu as v}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var k=({isRightSidebarOpen:f,onToggleRightSidebar:w,onToggleLeftSidebar:n,onToggleNotifications:u})=>e("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:e("div",{className:"container mx-auto px-6 py-4",children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center space-x-4",children:[n&&e(o,{variant:"ghost",size:"icon",className:"md:hidden",onClick:n,children:e(v,{className:"h-5 w-5"})}),e("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),a("div",{className:"flex items-center space-x-4",children:[a(o,{variant:"ghost",size:"icon",className:"relative",onClick:u,children:[e(g,{className:"h-5 w-5"}),e("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),a(r,{children:[e(s,{asChild:!0,children:e(o,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:a(m,{className:"h-10 w-10",children:[e(p,{src:"/avatars/01.png",alt:"@user"}),e(c,{children:"JD"})]})})}),a(i,{className:"w-56",align:"end",forceMount:!0,children:[e(l,{className:"font-normal",children:a("div",{className:"flex flex-col space-y-1",children:[e("p",{className:"text-sm font-medium leading-none",children:"John Doe"}),e("p",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),e(d,{}),a(t,{children:[e(b,{className:"mr-2 h-4 w-4"}),e("span",{children:"Profile"})]}),a(t,{children:[e(h,{className:"mr-2 h-4 w-4"}),e("span",{children:"Settings"})]})]})]})]})]})})});export{k as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as w}from"./chunk-4USR4WTH.mjs";import{a as g}from"./chunk-B4H6T2GP.mjs";import{a as p}from"./chunk-TVZOULLL.mjs";import{a as C}from"./chunk-L5JPAKPM.mjs";import{b as u}from"./chunk-ZUA4KNIR.mjs";import{b as x}from"./chunk-CSBGSBEU.mjs";import{a as h,b as k,c as N,e as S}from"./chunk-YO3GQYRJ.mjs";import{useState as b,useEffect as J}from"react";import{Bot as O,Plus as W,X,Edit as _}from"lucide-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function le({colleague:d,onSave:I,onCancel:A,isLoading:i=!1,title:F,submitLabel:K,cancelLabel:B="Cancel",readOnly:E=!1,availableKnowledgeDocuments:D=[]}){let[e,r]=b({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...d}),[G,Q]=b(""),[j,P]=b(""),[l,T]=b(!E);J(()=>{d&&r(d)},[d]);let R=t=>{t.preventDefault();let s=e.version?parseInt(e.version):0,n=d?(s+1).toString():"1",c={id:e.id||Date.now().toString(),name:e.name,type:"digital",status:"active",joinedDate:e.joinedDate||new Date,lastActive:e.lastActive||new Date,description:e.description,jobDescription:e.jobDescription||"",workInstructions:e.workInstructions||"",capabilities:e.capabilities||[],knowledge:e.knowledge||[],coreKnowledge:e.coreKnowledge||[],version:n,lastUpdated:e.lastUpdated||new Date,isActive:!0};I(c)},f=(t,s,n)=>{if(!s.trim())return;let c=e[t]||[];r({...e,[t]:[...c,s.trim()]}),n("")},U=(t,s)=>{let n=e[t]||[];r({...e,[t]:n.filter((c,v)=>v!==s)})},$=t=>{t.preventDefault(),T(!l)},q=(t,s,n,c,v)=>{let M=e[t]||[];return o("div",{className:"space-y-2",children:[a(p,{children:s}),l&&o("div",{className:"flex gap-2",children:[a(C,{value:n,onChange:m=>c(m.target.value),placeholder:v,onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),f(t,n,c))},disabled:i}),a(u,{type:"button",variant:"outline",size:"icon",onClick:()=>f(t,n,c),disabled:i,children:a(W,{className:"h-4 w-4"})})]}),a("div",{className:"flex flex-wrap gap-2",children:M.map((m,y)=>o(x,{className:"gap-1",children:[m,l&&a(u,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>U(t,y),disabled:i,children:a(X,{className:"h-3 w-3"})})]},`${t}-${y}-${m}`))})]})},z=F||(l?d?"Edit Colleague":"Add New Colleague":"View Colleague"),H=K||(d?"Update Colleague":"Add Colleague");return o(h,{className:"m-8 w-full max-w-4xl mx-auto",children:[a(k,{children:o(N,{className:"flex items-center gap-2",children:[a(O,{className:"h-5 w-5"}),z]})}),a(S,{children:o("form",{onSubmit:R,className:"space-y-6",children:[o("div",{className:"space-y-4",children:[o("div",{className:"space-y-2",children:[a(p,{htmlFor:"name",children:"Name *"}),a(C,{id:"name",value:e.name||"",onChange:t=>r({...e,name:t.target.value}),required:!0,disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"description",children:"Description"}),a(g,{id:"description",value:e.description||"",onChange:t=>r({...e,description:t.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:i||!l})]})]}),o("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"jobDescription",children:"Job Description *"}),a(g,{id:"jobDescription",value:e.jobDescription||"",onChange:t=>r({...e,jobDescription:t.target.value}),rows:4,required:e.type==="digital",disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"workInstructions",children:"Work Instructions"}),a(g,{id:"workInstructions",value:e.workInstructions||"",onChange:t=>r({...e,workInstructions:t.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:i||!l})]}),q("capabilities","Capabilities",j,P,"Add capability"),a(w,{selectedDocuments:e.knowledge||[],onDocumentsChange:t=>r({...e,knowledge:t}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:i||!l,availableDocuments:D}),a(w,{selectedDocuments:e.coreKnowledge||[],onDocumentsChange:t=>r({...e,coreKnowledge:t}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:i||!l,availableDocuments:D})]}),o("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(u,{type:"button",variant:"outline",onClick:A,disabled:i,children:l?B:"Close"}),l?a(u,{type:"submit",disabled:i,children:i?"Saving...":H}):o(u,{type:"button",onClick:$,disabled:i,className:"gap-2",children:[a(_,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{le as a};
4
+ import{a as w}from"./chunk-GMLLRSAH.mjs";import{a as g}from"./chunk-B4H6T2GP.mjs";import{a as p}from"./chunk-TVZOULLL.mjs";import{b as x}from"./chunk-CSBGSBEU.mjs";import{a as h,b as k,c as N,e as S}from"./chunk-YO3GQYRJ.mjs";import{a as C}from"./chunk-L5JPAKPM.mjs";import{b as u}from"./chunk-ZUA4KNIR.mjs";import{useState as b,useEffect as J}from"react";import{Bot as O,Plus as W,X,Edit as _}from"lucide-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function le({colleague:d,onSave:I,onCancel:A,isLoading:i=!1,title:F,submitLabel:K,cancelLabel:B="Cancel",readOnly:E=!1,availableKnowledgeDocuments:D=[]}){let[e,r]=b({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...d}),[G,Q]=b(""),[j,P]=b(""),[l,T]=b(!E);J(()=>{d&&r(d)},[d]);let R=t=>{t.preventDefault();let s=e.version?parseInt(e.version):0,n=d?(s+1).toString():"1",c={id:e.id||Date.now().toString(),name:e.name,type:"digital",status:"active",joinedDate:e.joinedDate||new Date,lastActive:e.lastActive||new Date,description:e.description,jobDescription:e.jobDescription||"",workInstructions:e.workInstructions||"",capabilities:e.capabilities||[],knowledge:e.knowledge||[],coreKnowledge:e.coreKnowledge||[],version:n,lastUpdated:e.lastUpdated||new Date,isActive:!0};I(c)},f=(t,s,n)=>{if(!s.trim())return;let c=e[t]||[];r({...e,[t]:[...c,s.trim()]}),n("")},U=(t,s)=>{let n=e[t]||[];r({...e,[t]:n.filter((c,v)=>v!==s)})},$=t=>{t.preventDefault(),T(!l)},q=(t,s,n,c,v)=>{let M=e[t]||[];return o("div",{className:"space-y-2",children:[a(p,{children:s}),l&&o("div",{className:"flex gap-2",children:[a(C,{value:n,onChange:m=>c(m.target.value),placeholder:v,onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),f(t,n,c))},disabled:i}),a(u,{type:"button",variant:"outline",size:"icon",onClick:()=>f(t,n,c),disabled:i,children:a(W,{className:"h-4 w-4"})})]}),a("div",{className:"flex flex-wrap gap-2",children:M.map((m,y)=>o(x,{className:"gap-1",children:[m,l&&a(u,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>U(t,y),disabled:i,children:a(X,{className:"h-3 w-3"})})]},`${t}-${y}-${m}`))})]})},z=F||(l?d?"Edit Colleague":"Add New Colleague":"View Colleague"),H=K||(d?"Update Colleague":"Add Colleague");return o(h,{className:"m-8 w-full max-w-4xl mx-auto",children:[a(k,{children:o(N,{className:"flex items-center gap-2",children:[a(O,{className:"h-5 w-5"}),z]})}),a(S,{children:o("form",{onSubmit:R,className:"space-y-6",children:[o("div",{className:"space-y-4",children:[o("div",{className:"space-y-2",children:[a(p,{htmlFor:"name",children:"Name *"}),a(C,{id:"name",value:e.name||"",onChange:t=>r({...e,name:t.target.value}),required:!0,disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"description",children:"Description"}),a(g,{id:"description",value:e.description||"",onChange:t=>r({...e,description:t.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:i||!l})]})]}),o("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"jobDescription",children:"Job Description *"}),a(g,{id:"jobDescription",value:e.jobDescription||"",onChange:t=>r({...e,jobDescription:t.target.value}),rows:4,required:e.type==="digital",disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"workInstructions",children:"Work Instructions"}),a(g,{id:"workInstructions",value:e.workInstructions||"",onChange:t=>r({...e,workInstructions:t.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:i||!l})]}),q("capabilities","Capabilities",j,P,"Add capability"),a(w,{selectedDocuments:e.knowledge||[],onDocumentsChange:t=>r({...e,knowledge:t}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:i||!l,availableDocuments:D}),a(w,{selectedDocuments:e.coreKnowledge||[],onDocumentsChange:t=>r({...e,coreKnowledge:t}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:i||!l,availableDocuments:D})]}),o("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(u,{type:"button",variant:"outline",onClick:A,disabled:i,children:l?B:"Close"}),l?a(u,{type:"submit",disabled:i,children:i?"Saving...":H}):o(u,{type:"button",onClick:$,disabled:i,className:"gap-2",children:[a(_,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{le as a};
@@ -1 +1 @@
1
- import{f as r}from"./chunk-FRXZ2OKW.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({subtitle:s,title:o,description:e,alignment:a="start",hasBottomSpacing:i=!1,className:m,invert:l=!1}){let p=n(a==="start"&&"text-left",a==="center"&&"text-center",a==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":i},"prose",m);return c("div",{className:p,children:[s&&t("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:s}),t("h2",{className:n("text-primary mt-0"),children:o}),typeof e=="string"?e&&t("p",{className:"mt-5 whitespace-pre-line text-foreground",children:e}):e&&t(r,{content:e,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}export{f as a};
1
+ import{f as r}from"./chunk-OAK45GQL.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({subtitle:s,title:o,description:e,alignment:a="start",hasBottomSpacing:i=!1,className:m,invert:l=!1}){let p=n(a==="start"&&"text-left",a==="center"&&"text-center",a==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":i},"prose",m);return c("div",{className:p,children:[s&&t("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:s}),t("h2",{className:n("text-primary mt-0"),children:o}),typeof e=="string"?e&&t("p",{className:"mt-5 whitespace-pre-line text-foreground",children:e}):e&&t(r,{content:e,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}export{f as a};