cortex-react-components 2.12.0 → 2.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (665) hide show
  1. package/dist/{chunk-4CU7D3X2.mjs → chunk-2C3C5SQQ.mjs} +1 -1
  2. package/dist/{chunk-CSBGSBEU.mjs → chunk-2JKLBLDE.mjs} +1 -1
  3. package/dist/{chunk-IC2ABKAM.mjs → chunk-2LLMXGTP.mjs} +1 -1
  4. package/dist/chunk-2WLZ5T2D.mjs +1 -0
  5. package/dist/{chunk-MU5WPW4N.mjs → chunk-3GLK3JM6.mjs} +1 -1
  6. package/dist/{chunk-Q5Q3DJWU.mjs → chunk-3HD7RAT7.mjs} +1 -1
  7. package/dist/{chunk-CO6AQNZ5.mjs → chunk-3JEM6RIR.mjs} +1 -1
  8. package/dist/{chunk-EOXVYLPB.mjs → chunk-3KBY7FKD.mjs} +1 -1
  9. package/dist/{chunk-PK3OBSCB.mjs → chunk-3ZXW3WQU.mjs} +1 -1
  10. package/dist/{chunk-F5N6KQA2.mjs → chunk-44JXFP6W.mjs} +1 -1
  11. package/dist/{chunk-FKU4VQR6.mjs → chunk-4OAROJ4M.mjs} +1 -1
  12. package/dist/{chunk-JYL3XIJX.mjs → chunk-4OK6PUOO.mjs} +1 -1
  13. package/dist/{chunk-PFLESLNT.mjs → chunk-4RQ27GTD.mjs} +1 -1
  14. package/dist/{chunk-RAGDUV7M.mjs → chunk-52UFJIL4.mjs} +1 -1
  15. package/dist/{chunk-Q5XT55O3.mjs → chunk-532HP37G.mjs} +1 -1
  16. package/dist/{chunk-TEB67NCD.mjs → chunk-55OESIAK.mjs} +1 -1
  17. package/dist/{chunk-AQ6RGBGI.mjs → chunk-56AGUZR5.mjs} +1 -1
  18. package/dist/{chunk-IF3425JX.mjs → chunk-5AYDHF5U.mjs} +1 -1
  19. package/dist/{chunk-2RGAV55J.mjs → chunk-5N2D3BGH.mjs} +1 -1
  20. package/dist/{chunk-74U3NYS2.mjs → chunk-5T4OPJ7F.mjs} +1 -1
  21. package/dist/{chunk-LBUC4M6L.mjs → chunk-5WDNNO37.mjs} +1 -1
  22. package/dist/{chunk-QG5P52CK.mjs → chunk-5WH7SFOR.mjs} +1 -1
  23. package/dist/{chunk-V6GC3UGV.mjs → chunk-5YJFMMVM.mjs} +1 -1
  24. package/dist/{chunk-LKGCU7H6.mjs → chunk-67RPQW7V.mjs} +1 -1
  25. package/dist/{chunk-FGEFYI5E.mjs → chunk-6CAO4IKW.mjs} +1 -1
  26. package/dist/{chunk-MXCW6SOT.mjs → chunk-6GDVIZS5.mjs} +1 -1
  27. package/dist/{chunk-EAFH3DTH.mjs → chunk-6PBOA7BL.mjs} +1 -1
  28. package/dist/{chunk-2LINLX4S.mjs → chunk-6PQ67CC6.mjs} +1 -1
  29. package/dist/{chunk-VMAPGGGW.mjs → chunk-6TLGI4P6.mjs} +1 -1
  30. package/dist/{chunk-LJQPLE4S.mjs → chunk-6UVEJCVM.mjs} +1 -1
  31. package/dist/{chunk-XFPTR527.mjs → chunk-6WVIXUXX.mjs} +1 -1
  32. package/dist/{chunk-E4TE4NV6.mjs → chunk-7EEEXU54.mjs} +1 -1
  33. package/dist/{chunk-JFFTEK6Z.mjs → chunk-7QBPKUWN.mjs} +1 -1
  34. package/dist/{chunk-WUA65ZZB.mjs → chunk-7RKPUKFH.mjs} +1 -1
  35. package/dist/{chunk-YO3GQYRJ.mjs → chunk-7WKUKFCT.mjs} +1 -1
  36. package/dist/{chunk-ZUA4KNIR.mjs → chunk-7Z3TOFNL.mjs} +1 -1
  37. package/dist/{chunk-FHMQVAKQ.mjs → chunk-A4XWPIEI.mjs} +1 -1
  38. package/dist/{chunk-LJOWXPWW.mjs → chunk-A5TPL5CB.mjs} +1 -1
  39. package/dist/{chunk-ZSIYEVUV.mjs → chunk-A7S4L4P2.mjs} +1 -1
  40. package/dist/{chunk-UWEU6TLS.mjs → chunk-AARMIMMZ.mjs} +1 -1
  41. package/dist/{chunk-3UMMMQEH.mjs → chunk-AG6IN5S7.mjs} +1 -1
  42. package/dist/{chunk-GHZ6CUY3.mjs → chunk-AQIMDHFI.mjs} +1 -1
  43. package/dist/{chunk-RNMPX2AU.mjs → chunk-AWMXVMUW.mjs} +1 -1
  44. package/dist/{chunk-D4IMQTVU.mjs → chunk-BEPKJ67R.mjs} +1 -1
  45. package/dist/{chunk-KY7WQYN4.mjs → chunk-BIAOADJS.mjs} +1 -1
  46. package/dist/{chunk-Z22NSJMF.mjs → chunk-BM2ZNFM6.mjs} +1 -1
  47. package/dist/{chunk-MZP7RIQZ.mjs → chunk-BOG3XLGP.mjs} +1 -1
  48. package/dist/{chunk-5WVFEIMC.mjs → chunk-BUTUPCGN.mjs} +1 -1
  49. package/dist/{chunk-HKGW6JI2.mjs → chunk-BXVJNWFA.mjs} +1 -1
  50. package/dist/{chunk-M7ZG6HLI.mjs → chunk-C4SUCDRQ.mjs} +1 -1
  51. package/dist/chunk-CDH5ONCJ.mjs +8 -0
  52. package/dist/{chunk-AB43AQKL.mjs → chunk-CXK2IY4V.mjs} +1 -1
  53. package/dist/{chunk-M7NV6EFH.mjs → chunk-CXXPSCV3.mjs} +1 -1
  54. package/dist/{chunk-7YQNB57R.mjs → chunk-D42KIYIO.mjs} +1 -1
  55. package/dist/{chunk-QTILVWJA.mjs → chunk-DA5SDQDL.mjs} +1 -1
  56. package/dist/{chunk-255P6K5W.mjs → chunk-DFWWQRJ2.mjs} +1 -1
  57. package/dist/{chunk-OCPX4QPC.mjs → chunk-DGJHJHFF.mjs} +1 -1
  58. package/dist/{chunk-PWXCBW2H.mjs → chunk-E2MPOOEL.mjs} +1 -1
  59. package/dist/{chunk-CTAQQFEO.mjs → chunk-E3NWG6B4.mjs} +1 -1
  60. package/dist/{chunk-VGWDYD6Z.mjs → chunk-E43QS242.mjs} +1 -1
  61. package/dist/{chunk-52GADV2R.mjs → chunk-E6IIUYQ7.mjs} +1 -1
  62. package/dist/{chunk-JHNVX4UB.mjs → chunk-E6W2YMC3.mjs} +1 -1
  63. package/dist/{chunk-RHR3YOLG.mjs → chunk-E7SIU5SS.mjs} +1 -1
  64. package/dist/{chunk-J4IHIM6A.mjs → chunk-EBO2R46A.mjs} +1 -1
  65. package/dist/{chunk-LXZAOORS.mjs → chunk-EESKUTPD.mjs} +1 -1
  66. package/dist/{chunk-YRMNCHFO.mjs → chunk-EFIJNPMM.mjs} +1 -1
  67. package/dist/{chunk-X3JZSN3W.mjs → chunk-EGERAM4Q.mjs} +1 -1
  68. package/dist/{chunk-JB7IQQ3N.mjs → chunk-ENRNRNPQ.mjs} +1 -1
  69. package/dist/{chunk-5RTGHMF3.mjs → chunk-EPDV35LO.mjs} +1 -1
  70. package/dist/{chunk-7WIO2CIC.mjs → chunk-ESTO675Y.mjs} +1 -1
  71. package/dist/{chunk-RR4QSUV2.mjs → chunk-EUXJZBRI.mjs} +1 -1
  72. package/dist/{chunk-67QPOSVV.mjs → chunk-EYQ4UGAJ.mjs} +1 -1
  73. package/dist/{chunk-JVN7KTZV.mjs → chunk-EYRTGZWR.mjs} +1 -1
  74. package/dist/{chunk-7BXIU4ZM.mjs → chunk-F5JHHMZQ.mjs} +1 -1
  75. package/dist/{chunk-WUOWA2IX.mjs → chunk-F6KHZ4OS.mjs} +1 -1
  76. package/dist/{chunk-MAAKU7PN.mjs → chunk-FDJHY37W.mjs} +1 -1
  77. package/dist/{chunk-ZGQC6O62.mjs → chunk-FHPZSG7W.mjs} +1 -1
  78. package/dist/{chunk-SRUG246N.mjs → chunk-FJUAYJF4.mjs} +1 -1
  79. package/dist/{chunk-OYZDAMCS.mjs → chunk-FPWCCVDI.mjs} +1 -1
  80. package/dist/{chunk-FOEPKY7T.mjs → chunk-FSV7RCTY.mjs} +1 -1
  81. package/dist/{chunk-2RQDJ5XT.mjs → chunk-FT6JQ4AC.mjs} +1 -1
  82. package/dist/{chunk-YKG4FNS4.mjs → chunk-GCIWMQMK.mjs} +1 -1
  83. package/dist/{chunk-R7ILTSZR.mjs → chunk-GFLX67DN.mjs} +1 -1
  84. package/dist/{chunk-AZKOVKSK.mjs → chunk-GIGKJZGA.mjs} +1 -1
  85. package/dist/{chunk-L5JPAKPM.mjs → chunk-GJUA2KUH.mjs} +1 -1
  86. package/dist/{chunk-KGEIN56Y.mjs → chunk-GNIVCF53.mjs} +1 -1
  87. package/dist/{chunk-KX2NCNCS.mjs → chunk-GYTXBVCX.mjs} +1 -1
  88. package/dist/{chunk-AMV3MECK.mjs → chunk-GZQ7JEUL.mjs} +1 -1
  89. package/dist/{chunk-5WV5ZFEP.mjs → chunk-H45UTXIK.mjs} +1 -1
  90. package/dist/{chunk-7GSXNSLD.mjs → chunk-HH4JDBUN.mjs} +1 -1
  91. package/dist/{chunk-TZKQXT7Y.mjs → chunk-HK52LPE3.mjs} +1 -1
  92. package/dist/{chunk-WI2RL3XQ.mjs → chunk-HLWGNTZD.mjs} +1 -1
  93. package/dist/{chunk-LEC6GEWS.mjs → chunk-HPZPRZWG.mjs} +1 -1
  94. package/dist/{chunk-KVD6XDZT.mjs → chunk-HTCM27MI.mjs} +1 -1
  95. package/dist/{chunk-D275F3RT.mjs → chunk-HTQIVWYI.mjs} +1 -1
  96. package/dist/{chunk-U5PBLRRV.mjs → chunk-HYIRE7BK.mjs} +1 -1
  97. package/dist/chunk-I2BNJCJ7.mjs +1 -0
  98. package/dist/{chunk-Q5NHYYRS.mjs → chunk-IG6J62QA.mjs} +1 -1
  99. package/dist/{chunk-B3F6F2S4.mjs → chunk-JKPUXPHP.mjs} +1 -1
  100. package/dist/{chunk-QQVPLMPJ.mjs → chunk-JTFMN7OL.mjs} +1 -1
  101. package/dist/{chunk-2QZUKVBA.mjs → chunk-JULD2KZR.mjs} +1 -1
  102. package/dist/{chunk-FT3AE7L2.mjs → chunk-JVJG2LOA.mjs} +1 -1
  103. package/dist/{chunk-Q6PKGY27.mjs → chunk-K5GFFN67.mjs} +1 -1
  104. package/dist/chunk-KCOLYVJX.mjs +1 -0
  105. package/dist/{chunk-74JNWOJQ.mjs → chunk-KUVPOOSW.mjs} +1 -1
  106. package/dist/{chunk-HHYHENVF.mjs → chunk-KZTONTWM.mjs} +1 -1
  107. package/dist/{chunk-LVFMFRBR.mjs → chunk-LARQXED4.mjs} +1 -1
  108. package/dist/{chunk-Q3EVV5MV.mjs → chunk-LCIKBYDR.mjs} +1 -1
  109. package/dist/{chunk-76M7JE4D.mjs → chunk-LQDJWEHX.mjs} +1 -1
  110. package/dist/{chunk-LJLV5GUS.mjs → chunk-MZKVGPNQ.mjs} +1 -1
  111. package/dist/{chunk-JVG4XS2E.mjs → chunk-N5BLWWDM.mjs} +1 -1
  112. package/dist/{chunk-DFIXTV2M.mjs → chunk-N5GHL7UZ.mjs} +1 -1
  113. package/dist/{chunk-ISBVFNWD.mjs → chunk-NGC3C4FW.mjs} +1 -1
  114. package/dist/{chunk-I2ZLKSWR.mjs → chunk-NM6U4PLY.mjs} +1 -1
  115. package/dist/{chunk-DBY4SXQI.mjs → chunk-NMAMUYGQ.mjs} +1 -1
  116. package/dist/{chunk-NSMXJCXE.mjs → chunk-NN2RHTGW.mjs} +1 -1
  117. package/dist/{chunk-INCYANPB.mjs → chunk-NQPBIFGO.mjs} +1 -1
  118. package/dist/{chunk-TR6RBROH.mjs → chunk-OF63XSJ4.mjs} +1 -1
  119. package/dist/{chunk-6C4WESLL.mjs → chunk-OGN7YDFB.mjs} +1 -1
  120. package/dist/{chunk-I3E2TYYZ.mjs → chunk-OHDNPAPI.mjs} +1 -1
  121. package/dist/{chunk-FTZRG54P.mjs → chunk-OKAETRO6.mjs} +1 -1
  122. package/dist/{chunk-22LHS2J6.mjs → chunk-OU7KVCBI.mjs} +1 -1
  123. package/dist/{chunk-RLVKIMGU.mjs → chunk-P5U27QUJ.mjs} +1 -1
  124. package/dist/{chunk-5NRGSTPV.mjs → chunk-PMOMDGBA.mjs} +1 -1
  125. package/dist/{chunk-PDY7JYY3.mjs → chunk-PUAHE5VJ.mjs} +1 -1
  126. package/dist/{chunk-56X4PU43.mjs → chunk-PXAKUW3U.mjs} +1 -1
  127. package/dist/{chunk-MGYV46AJ.mjs → chunk-Q6FPZ6J3.mjs} +1 -1
  128. package/dist/{chunk-6WQXZ6IE.mjs → chunk-QAIS2C6W.mjs} +1 -1
  129. package/dist/{chunk-7GMAMIHM.mjs → chunk-QB63WPDB.mjs} +1 -1
  130. package/dist/{chunk-6HLXIE4P.mjs → chunk-QEFMYXHA.mjs} +1 -1
  131. package/dist/{chunk-IJQC7T2R.mjs → chunk-QIDPNZOL.mjs} +1 -1
  132. package/dist/{chunk-RVHCTANZ.mjs → chunk-QMTI6672.mjs} +1 -1
  133. package/dist/{chunk-D3B2YO7G.mjs → chunk-QUDKEIE6.mjs} +1 -1
  134. package/dist/{chunk-2BR55L74.mjs → chunk-QXA6C5VE.mjs} +1 -1
  135. package/dist/{chunk-Q6VAKKW3.mjs → chunk-QXNCGSQE.mjs} +1 -1
  136. package/dist/{chunk-TVZOULLL.mjs → chunk-RAAY7PEH.mjs} +1 -1
  137. package/dist/{chunk-AM2SRWFU.mjs → chunk-RARAKOXE.mjs} +1 -1
  138. package/dist/{chunk-Q67RF7VO.mjs → chunk-RD7LJPUV.mjs} +1 -1
  139. package/dist/{chunk-SOLZ4VQH.mjs → chunk-RFNYVF6F.mjs} +1 -1
  140. package/dist/{chunk-SOIRB5TV.mjs → chunk-RHYQ4V7N.mjs} +1 -1
  141. package/dist/{chunk-TUI4S4GI.mjs → chunk-RPUSKO6J.mjs} +1 -1
  142. package/dist/{chunk-OM5ZUHCN.mjs → chunk-RU435LAU.mjs} +1 -1
  143. package/dist/{chunk-LVK4QE5D.mjs → chunk-S7N4CSMJ.mjs} +1 -1
  144. package/dist/{chunk-AZ4VR5JX.mjs → chunk-SIFQNSEM.mjs} +1 -1
  145. package/dist/{chunk-XBCYPOFD.mjs → chunk-T3BIRW2W.mjs} +1 -1
  146. package/dist/{chunk-4UIARERB.mjs → chunk-T3NMKARZ.mjs} +1 -1
  147. package/dist/{chunk-CTAIR3TE.mjs → chunk-TAVSBP7M.mjs} +1 -1
  148. package/dist/{chunk-TKSXXSHY.mjs → chunk-TFPWTJ2V.mjs} +1 -1
  149. package/dist/{chunk-FMJBJ3HN.mjs → chunk-TNCD5YIY.mjs} +1 -1
  150. package/dist/{chunk-N3B3XNV3.mjs → chunk-TR52MKZR.mjs} +1 -1
  151. package/dist/chunk-TSEOL53Y.mjs +1 -0
  152. package/dist/{chunk-6SWKEZN6.mjs → chunk-TUTSJOO4.mjs} +1 -1
  153. package/dist/{chunk-6XUIHSKG.mjs → chunk-TYMRNSJ3.mjs} +1 -1
  154. package/dist/{chunk-XGIYNUGC.mjs → chunk-TZTQENNX.mjs} +1 -1
  155. package/dist/{chunk-BMA4266L.mjs → chunk-U5UV7T63.mjs} +1 -1
  156. package/dist/{chunk-ZXPDSSCF.mjs → chunk-UBCJPXKD.mjs} +1 -1
  157. package/dist/{chunk-CGDLOY7W.mjs → chunk-UJ6M7EV5.mjs} +1 -1
  158. package/dist/{chunk-KFCSVEI6.mjs → chunk-UXCCCQCB.mjs} +1 -1
  159. package/dist/{chunk-WISC5QJV.mjs → chunk-UY4BSKPK.mjs} +1 -1
  160. package/dist/{chunk-H3CJOE6S.mjs → chunk-VB7K44IF.mjs} +1 -1
  161. package/dist/{chunk-5SHZBJ5R.mjs → chunk-VFPS3FYN.mjs} +1 -1
  162. package/dist/{chunk-FMH5CZ7X.mjs → chunk-VRZHKAJK.mjs} +1 -1
  163. package/dist/{chunk-B4H6T2GP.mjs → chunk-VXZPPTQQ.mjs} +1 -1
  164. package/dist/{chunk-TJVEQJW3.mjs → chunk-WH24BWZV.mjs} +1 -1
  165. package/dist/{chunk-75WE6ZXB.mjs → chunk-WJZDHRGO.mjs} +1 -1
  166. package/dist/{chunk-RULSHTXR.mjs → chunk-WKLJU63E.mjs} +1 -1
  167. package/dist/{chunk-YFAZQYK4.mjs → chunk-WLM2ZFHF.mjs} +1 -1
  168. package/dist/{chunk-EHSOO47V.mjs → chunk-WNBJ7C5Y.mjs} +1 -1
  169. package/dist/{chunk-5BV4MHV6.mjs → chunk-WWTVAR4J.mjs} +1 -1
  170. package/dist/chunk-WXTJ6DVT.mjs +4 -0
  171. package/dist/{chunk-FA7PGHVM.mjs → chunk-X5RHYJW3.mjs} +1 -1
  172. package/dist/{chunk-BG7QXNV5.mjs → chunk-XXFUUOSB.mjs} +1 -1
  173. package/dist/{chunk-TK4JC5PG.mjs → chunk-XXWSCTF5.mjs} +1 -1
  174. package/dist/{chunk-ERJXTG6X.mjs → chunk-YHTFEWSZ.mjs} +1 -1
  175. package/dist/{chunk-OPLUKFRN.mjs → chunk-YUW3HHAK.mjs} +1 -1
  176. package/dist/{chunk-AREQGH47.mjs → chunk-YVNVQONM.mjs} +1 -1
  177. package/dist/{chunk-5BT4EWU5.mjs → chunk-Z756RYIZ.mjs} +1 -1
  178. package/dist/{chunk-4QRKVSTE.mjs → chunk-ZJBZTPLD.mjs} +1 -1
  179. package/dist/{chunk-BA3I4XZE.mjs → chunk-ZKLSTUIP.mjs} +1 -1
  180. package/dist/{chunk-5AWZJAK3.mjs → chunk-ZNV6MCYI.mjs} +1 -1
  181. package/dist/components/AdvancedComponents/AppSidebar.js +1 -1
  182. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  183. package/dist/components/AdvancedComponents/CommentSection.js +1 -1
  184. package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
  185. package/dist/components/AdvancedComponents/EditableField.js +1 -1
  186. package/dist/components/AdvancedComponents/EditableField.mjs +1 -1
  187. package/dist/components/AdvancedComponents/app-header.d.ts +2 -2
  188. package/dist/components/AdvancedComponents/app-header.js +1 -1
  189. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  190. package/dist/components/AdvancedComponents/index.js +2 -2
  191. package/dist/components/AdvancedComponents/index.mjs +1 -1
  192. package/dist/components/AdvancedComponents/navigation-tabs.js +2 -2
  193. package/dist/components/AdvancedComponents/navigation-tabs.mjs +1 -1
  194. package/dist/components/AdvancedComponents/notifications-panel.js +1 -1
  195. package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
  196. package/dist/components/AdvancedComponents/switch.js +1 -1
  197. package/dist/components/AdvancedComponents/switch.mjs +1 -1
  198. package/dist/components/AdvancedComponents/theme-toggle.js +1 -1
  199. package/dist/components/AdvancedComponents/theme-toggle.mjs +1 -1
  200. package/dist/components/AdvancedComponents/user-selection.js +1 -1
  201. package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
  202. package/dist/components/Blocks/Banner.js +1 -1
  203. package/dist/components/Blocks/Banner.mjs +1 -1
  204. package/dist/components/Blocks/CallToAction.js +1 -1
  205. package/dist/components/Blocks/CallToAction.mjs +1 -1
  206. package/dist/components/Blocks/CaseStudy.js +1 -1
  207. package/dist/components/Blocks/CaseStudy.mjs +1 -1
  208. package/dist/components/Blocks/Code.client.js +1 -1
  209. package/dist/components/Blocks/Code.client.mjs +1 -1
  210. package/dist/components/Blocks/Code.js +1 -1
  211. package/dist/components/Blocks/Code.mjs +1 -1
  212. package/dist/components/Blocks/CollapsibleArea.js +1 -1
  213. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  214. package/dist/components/Blocks/ConsultantProfile.js +1 -1
  215. package/dist/components/Blocks/ConsultantProfile.mjs +1 -1
  216. package/dist/components/Blocks/Content.js +1 -1
  217. package/dist/components/Blocks/Content.mjs +1 -1
  218. package/dist/components/Blocks/CopyButton.js +1 -1
  219. package/dist/components/Blocks/CopyButton.mjs +1 -1
  220. package/dist/components/Blocks/FeaturesBlock.js +1 -1
  221. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  222. package/dist/components/Blocks/ImageBlock.js +1 -1
  223. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  224. package/dist/components/Blocks/MediaBlock.js +1 -1
  225. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  226. package/dist/components/Blocks/ProposalSummary.js +1 -1
  227. package/dist/components/Blocks/ProposalSummary.mjs +1 -1
  228. package/dist/components/Blocks/RelatedPosts.js +1 -1
  229. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  230. package/dist/components/Blocks/RenderBlocks.js +1 -1
  231. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  232. package/dist/components/Blocks/ReusableContentBlock.js +1 -1
  233. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  234. package/dist/components/Blocks/index.js +1 -1
  235. package/dist/components/Blocks/index.mjs +1 -1
  236. package/dist/components/CRM/CogeBoard.js +1 -1
  237. package/dist/components/CRM/CogeBoard.mjs +1 -1
  238. package/dist/components/CRM/DealCard.js +1 -1
  239. package/dist/components/CRM/DealCard.mjs +1 -1
  240. package/dist/components/CRM/DealDetails.js +1 -1
  241. package/dist/components/CRM/DealDetails.mjs +1 -1
  242. package/dist/components/CRM/KanbanBoard.js +1 -1
  243. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  244. package/dist/components/CRM/KanbanColumn.js +1 -1
  245. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  246. package/dist/components/CRM/NewCustomerForm.js +1 -1
  247. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  248. package/dist/components/CRM/NewDealForm.js +1 -1
  249. package/dist/components/CRM/NewDealForm.mjs +1 -1
  250. package/dist/components/CRM/index.js +1 -1
  251. package/dist/components/CRM/index.mjs +1 -1
  252. package/dist/components/Cards/ContentCard.js +1 -1
  253. package/dist/components/Cards/ContentCard.mjs +1 -1
  254. package/dist/components/Cards/CustomerCard.js +1 -1
  255. package/dist/components/Cards/CustomerCard.mjs +1 -1
  256. package/dist/components/Cards/EventCard.js +1 -1
  257. package/dist/components/Cards/EventCard.mjs +1 -1
  258. package/dist/components/Cards/FeatureCard.js +1 -1
  259. package/dist/components/Cards/FeatureCard.mjs +1 -1
  260. package/dist/components/Cards/HeroCard.js +1 -1
  261. package/dist/components/Cards/HeroCard.mjs +1 -1
  262. package/dist/components/Cards/Image.js +1 -1
  263. package/dist/components/Cards/Image.mjs +1 -1
  264. package/dist/components/Cards/PricingCard.js +1 -1
  265. package/dist/components/Cards/PricingCard.mjs +1 -1
  266. package/dist/components/Cards/ProjectCard.js +3 -3
  267. package/dist/components/Cards/ProjectCard.mjs +1 -1
  268. package/dist/components/Cards/ServiceCard.js +1 -1
  269. package/dist/components/Cards/ServiceCard.mjs +1 -1
  270. package/dist/components/Cards/index.js +4 -4
  271. package/dist/components/Cards/index.mjs +1 -1
  272. package/dist/components/Chat/ChatCardArtefact.js +1 -1
  273. package/dist/components/Chat/ChatCardArtefact.mjs +1 -1
  274. package/dist/components/Chat/ChatCardTask.js +1 -1
  275. package/dist/components/Chat/ChatCardTask.mjs +1 -1
  276. package/dist/components/Chat/ChatInterface.js +2 -2
  277. package/dist/components/Chat/ChatInterface.mjs +1 -1
  278. package/dist/components/Chat/ChatInterfaceMessages.js +2 -2
  279. package/dist/components/Chat/ChatInterfaceMessages.mjs +1 -1
  280. package/dist/components/Chat/ChatMessage.js +2 -2
  281. package/dist/components/Chat/ChatMessage.mjs +1 -1
  282. package/dist/components/Chat/CopilotInterface.js +3 -3
  283. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  284. package/dist/components/Chat/capability-menu.js +1 -1
  285. package/dist/components/Chat/capability-menu.mjs +1 -1
  286. package/dist/components/Chat/chat-session-sidebar.js +1 -1
  287. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  288. package/dist/components/Chat/demo-long-messages.js +9 -9
  289. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  290. package/dist/components/Chat/demo-tests.js +24 -24
  291. package/dist/components/Chat/demo-tests.mjs +1 -1
  292. package/dist/components/Chat/demo.js +3 -3
  293. package/dist/components/Chat/demo.mjs +1 -1
  294. package/dist/components/Chat/example-usage.js +2 -2
  295. package/dist/components/Chat/example-usage.mjs +1 -1
  296. package/dist/components/Chat/example-with-file-uploads.js +1 -1
  297. package/dist/components/Chat/example-with-file-uploads.mjs +1 -1
  298. package/dist/components/Chat/example-with-vercel-ai.js +3 -3
  299. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  300. package/dist/components/Chat/index.js +3 -3
  301. package/dist/components/Chat/index.mjs +1 -1
  302. package/dist/components/DeliveryLead/DeliveryLeadSubmission.js +2 -2
  303. package/dist/components/DeliveryLead/DeliveryLeadSubmission.mjs +1 -1
  304. package/dist/components/DeliveryLead/DeliveryLeadSubmissionList.js +1 -1
  305. package/dist/components/DeliveryLead/DeliveryLeadSubmissionList.mjs +1 -1
  306. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.js +2 -2
  307. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  308. package/dist/components/DeliveryLead/index.js +2 -2
  309. package/dist/components/DeliveryLead/index.mjs +1 -1
  310. package/dist/components/DigitalColleagues/AppSidebarLeft.js +1 -1
  311. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  312. package/dist/components/DigitalColleagues/DashboardHeader.js +1 -1
  313. package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
  314. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  315. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  316. package/dist/components/DigitalColleagues/MainPage.js +1 -1
  317. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  318. package/dist/components/DigitalColleagues/ManagementSidebar.js +1 -1
  319. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  320. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  321. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  322. package/dist/components/DigitalColleagues/SearchableSelect.js +1 -1
  323. package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
  324. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
  325. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  326. package/dist/components/DigitalColleagues/Views/KnowledgeView.js +1 -1
  327. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  328. package/dist/components/DigitalColleagues/Views/TeamsIndexView.js +1 -1
  329. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
  330. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  331. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  332. package/dist/components/DigitalColleagues/colleague-card.js +1 -1
  333. package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
  334. package/dist/components/DigitalColleagues/colleague-form.js +1 -1
  335. package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
  336. package/dist/components/DigitalColleagues/colleague-type-selection.js +1 -1
  337. package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
  338. package/dist/components/DigitalColleagues/digital-colleague-clone.js +1 -1
  339. package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
  340. package/dist/components/DigitalColleagues/digital-colleague-options.js +1 -1
  341. package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
  342. package/dist/components/DigitalColleagues/document-edit.js +1 -1
  343. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  344. package/dist/components/DigitalColleagues/document-preview-examples.js +5 -5
  345. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  346. package/dist/components/DigitalColleagues/document-preview.js +1 -1
  347. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  348. package/dist/components/DigitalColleagues/index.js +1 -1
  349. package/dist/components/DigitalColleagues/index.mjs +1 -1
  350. package/dist/components/DigitalColleagues/knowledge-browser.js +1 -1
  351. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  352. package/dist/components/DigitalColleagues/knowledge-search.js +1 -1
  353. package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
  354. package/dist/components/DigitalColleagues/team-form.js +1 -1
  355. package/dist/components/DigitalColleagues/team-form.mjs +1 -1
  356. package/dist/components/DigitalColleagues/test-data.js +1 -1
  357. package/dist/components/DigitalColleagues/test-data.mjs +1 -1
  358. package/dist/components/DigitalColleagues/types.d.ts +1 -0
  359. package/dist/components/HeaderFooter/BrandLogo.js +1 -1
  360. package/dist/components/HeaderFooter/BrandLogo.mjs +1 -1
  361. package/dist/components/HeaderFooter/Footer.js +1 -1
  362. package/dist/components/HeaderFooter/Footer.mjs +1 -1
  363. package/dist/components/HeaderFooter/Header.js +1 -1
  364. package/dist/components/HeaderFooter/Header.mjs +1 -1
  365. package/dist/components/HeaderFooter/HeaderDesktop.js +1 -1
  366. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  367. package/dist/components/HeaderFooter/HeaderMenu.js +1 -1
  368. package/dist/components/HeaderFooter/HeaderMenu.mjs +1 -1
  369. package/dist/components/HeaderFooter/HeaderMobile.js +1 -1
  370. package/dist/components/HeaderFooter/HeaderMobile.mjs +1 -1
  371. package/dist/components/HeaderFooter/RelatedPagesMenu.js +1 -1
  372. package/dist/components/HeaderFooter/RelatedPagesMenu.mjs +1 -1
  373. package/dist/components/HeaderFooter/SectionHeading.js +1 -1
  374. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  375. package/dist/components/HeaderFooter/SimpleHeader.js +1 -1
  376. package/dist/components/HeaderFooter/SimpleHeader.mjs +1 -1
  377. package/dist/components/HeaderFooter/VideoHeader.js +1 -1
  378. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  379. package/dist/components/HeaderFooter/enhanced-header.js +1 -1
  380. package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
  381. package/dist/components/HeaderFooter/index.js +1 -1
  382. package/dist/components/HeaderFooter/index.mjs +1 -1
  383. package/dist/components/Heros/DashboardHero/DashboardHero.js +1 -1
  384. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
  385. package/dist/components/Heros/DashboardHero/index.js +1 -1
  386. package/dist/components/Heros/DashboardHero/index.mjs +1 -1
  387. package/dist/components/Heros/HighImpact/index.js +1 -1
  388. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  389. package/dist/components/Heros/LowImpact/index.js +1 -1
  390. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  391. package/dist/components/Heros/MediumImpact/index.js +1 -1
  392. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  393. package/dist/components/Heros/PostHero/index.js +1 -1
  394. package/dist/components/Heros/PostHero/index.mjs +1 -1
  395. package/dist/components/Heros/RenderHero.js +1 -1
  396. package/dist/components/Heros/RenderHero.mjs +1 -1
  397. package/dist/components/Heros/SectionHero/index.js +1 -1
  398. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  399. package/dist/components/Heros/index.js +1 -1
  400. package/dist/components/Heros/index.mjs +1 -1
  401. package/dist/components/Holidays/ApproveLeave.js +1 -1
  402. package/dist/components/Holidays/ApproveLeave.mjs +1 -1
  403. package/dist/components/Holidays/CalendarView.js +1 -1
  404. package/dist/components/Holidays/CalendarView.mjs +1 -1
  405. package/dist/components/Holidays/HolidayGrid.js +1 -1
  406. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  407. package/dist/components/Holidays/HolidayTracker.js +1 -1
  408. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  409. package/dist/components/Holidays/RequestLeave.js +1 -1
  410. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  411. package/dist/components/Holidays/index.js +1 -1
  412. package/dist/components/Holidays/index.mjs +1 -1
  413. package/dist/components/Layouts/OutputHeaderFooter.js +2 -2
  414. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  415. package/dist/components/Layouts/Print.js +2 -2
  416. package/dist/components/Layouts/Print.mjs +1 -1
  417. package/dist/components/Layouts/SlideShow.js +3 -3
  418. package/dist/components/Layouts/SlideShow.mjs +1 -1
  419. package/dist/components/Layouts/index.js +4 -4
  420. package/dist/components/Layouts/index.mjs +1 -1
  421. package/dist/components/Menus/Categories.js +1 -1
  422. package/dist/components/Menus/Categories.mjs +1 -1
  423. package/dist/components/Menus/Filter.js +1 -1
  424. package/dist/components/Menus/Filter.mjs +1 -1
  425. package/dist/components/Menus/Pagination.js +1 -1
  426. package/dist/components/Menus/Pagination.mjs +1 -1
  427. package/dist/components/Menus/ProjectTeam.js +1 -1
  428. package/dist/components/Menus/ProjectTeam.mjs +1 -1
  429. package/dist/components/Menus/RelatedContent.js +1 -1
  430. package/dist/components/Menus/RelatedContent.mjs +1 -1
  431. package/dist/components/Menus/SidebarLeft.js +1 -1
  432. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  433. package/dist/components/Menus/SidebarRight.js +1 -1
  434. package/dist/components/Menus/SidebarRight.mjs +1 -1
  435. package/dist/components/Menus/index.js +1 -1
  436. package/dist/components/Menus/index.mjs +1 -1
  437. package/dist/components/Other/Container.js +1 -1
  438. package/dist/components/Other/Container.mjs +1 -1
  439. package/dist/components/Other/PageShape.js +1 -1
  440. package/dist/components/Other/PageShape.mjs +1 -1
  441. package/dist/components/Other/index.js +1 -1
  442. package/dist/components/Other/index.mjs +1 -1
  443. package/dist/components/Payload/Card/index.js +1 -1
  444. package/dist/components/Payload/Card/index.mjs +1 -1
  445. package/dist/components/Payload/CollectionArchive/index.js +1 -1
  446. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  447. package/dist/components/Payload/Link/index.js +1 -1
  448. package/dist/components/Payload/Link/index.mjs +1 -1
  449. package/dist/components/Payload/Media/ImageMedia/index.js +1 -1
  450. package/dist/components/Payload/Media/ImageMedia/index.mjs +1 -1
  451. package/dist/components/Payload/Media/VideoMedia/index.js +1 -1
  452. package/dist/components/Payload/Media/VideoMedia/index.mjs +1 -1
  453. package/dist/components/Payload/Media/index.js +1 -1
  454. package/dist/components/Payload/Media/index.mjs +1 -1
  455. package/dist/components/Payload/Pagination/index.js +1 -1
  456. package/dist/components/Payload/Pagination/index.mjs +1 -1
  457. package/dist/components/Payload/RichText/index.js +1 -1
  458. package/dist/components/Payload/RichText/index.mjs +1 -1
  459. package/dist/components/Payload/RichText/serialize.js +1 -1
  460. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  461. package/dist/components/Payload/index.js +1 -1
  462. package/dist/components/Payload/index.mjs +1 -1
  463. package/dist/components/Projects/AddEpicModal.js +1 -1
  464. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  465. package/dist/components/Projects/AddSprintModal.js +1 -1
  466. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  467. package/dist/components/Projects/AddTaskModal.js +1 -1
  468. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  469. package/dist/components/Projects/EpicFilter.js +1 -1
  470. package/dist/components/Projects/EpicFilter.mjs +1 -1
  471. package/dist/components/Projects/EpicsView.js +1 -1
  472. package/dist/components/Projects/EpicsView.mjs +1 -1
  473. package/dist/components/Projects/FileView.js +1 -1
  474. package/dist/components/Projects/FileView.mjs +1 -1
  475. package/dist/components/Projects/KanbanBoardView.js +1 -1
  476. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  477. package/dist/components/Projects/KanbanColumn.js +1 -1
  478. package/dist/components/Projects/KanbanColumn.mjs +1 -1
  479. package/dist/components/Projects/PlanningView.js +1 -1
  480. package/dist/components/Projects/PlanningView.mjs +1 -1
  481. package/dist/components/Projects/ProjectPage.js +1 -1
  482. package/dist/components/Projects/ProjectPage.mjs +1 -1
  483. package/dist/components/Projects/ProjectView.js +1 -1
  484. package/dist/components/Projects/ProjectView.mjs +1 -1
  485. package/dist/components/Projects/ProjectsIndexView.js +1 -1
  486. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  487. package/dist/components/Projects/TaskCard.js +1 -1
  488. package/dist/components/Projects/TaskCard.mjs +1 -1
  489. package/dist/components/Projects/TaskDetailsModal.js +1 -1
  490. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  491. package/dist/components/Projects/TaskSelect.js +1 -1
  492. package/dist/components/Projects/TaskSelect.mjs +1 -1
  493. package/dist/components/Projects/TaskSidebar.js +1 -1
  494. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  495. package/dist/components/Projects/TasksView.js +1 -1
  496. package/dist/components/Projects/TasksView.mjs +1 -1
  497. package/dist/components/Projects/TeamSwitcher.js +1 -1
  498. package/dist/components/Projects/TeamSwitcher.mjs +1 -1
  499. package/dist/components/Projects/business-unit-switcher.js +1 -1
  500. package/dist/components/Projects/business-unit-switcher.mjs +1 -1
  501. package/dist/components/Projects/file-list.js +1 -1
  502. package/dist/components/Projects/file-list.mjs +1 -1
  503. package/dist/components/Projects/index.css +1 -0
  504. package/dist/components/Projects/index.d.ts +1 -0
  505. package/dist/components/Projects/index.js +4 -0
  506. package/dist/components/Projects/index.mjs +1 -0
  507. package/dist/components/Projects/project-card.js +1 -1
  508. package/dist/components/Projects/project-card.mjs +1 -1
  509. package/dist/components/Projects/project-form.js +1 -1
  510. package/dist/components/Projects/project-form.mjs +1 -1
  511. package/dist/components/Projects/team-card.js +1 -1
  512. package/dist/components/Projects/team-card.mjs +1 -1
  513. package/dist/components/Projects/team-switcher-bar.js +1 -1
  514. package/dist/components/Projects/team-switcher-bar.mjs +1 -1
  515. package/dist/components/Projects/test-data.js +1 -1
  516. package/dist/components/Projects/test-data.mjs +1 -1
  517. package/dist/components/dc-temp/creative.js +1 -1
  518. package/dist/components/dc-temp/creative.mjs +1 -1
  519. package/dist/components/dc-temp/dashboard-integration-example.js +1 -1
  520. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  521. package/dist/components/dc-temp/index.js +1 -1
  522. package/dist/components/dc-temp/index.mjs +1 -1
  523. package/dist/components/dc-temp/markdown-renderer.js +1 -1
  524. package/dist/components/dc-temp/markdown-renderer.mjs +1 -1
  525. package/dist/components/dc-temp/mock-data.js +1 -1
  526. package/dist/components/dc-temp/mock-data.mjs +1 -1
  527. package/dist/components/dc-temp/utils.js +1 -1
  528. package/dist/components/dc-temp/utils.mjs +1 -1
  529. package/dist/components/index.d.ts +1 -0
  530. package/dist/components/index.js +13 -13
  531. package/dist/components/index.mjs +1 -1
  532. package/dist/components/ui/alert.js +1 -1
  533. package/dist/components/ui/alert.mjs +1 -1
  534. package/dist/components/ui/avatar.js +1 -1
  535. package/dist/components/ui/avatar.mjs +1 -1
  536. package/dist/components/ui/badge.js +1 -1
  537. package/dist/components/ui/badge.mjs +1 -1
  538. package/dist/components/ui/breadcrumb.js +1 -1
  539. package/dist/components/ui/breadcrumb.mjs +1 -1
  540. package/dist/components/ui/button.js +1 -1
  541. package/dist/components/ui/button.mjs +1 -1
  542. package/dist/components/ui/calendar.js +1 -1
  543. package/dist/components/ui/calendar.mjs +1 -1
  544. package/dist/components/ui/card.js +1 -1
  545. package/dist/components/ui/card.mjs +1 -1
  546. package/dist/components/ui/checkbox.js +1 -1
  547. package/dist/components/ui/checkbox.mjs +1 -1
  548. package/dist/components/ui/command.js +1 -1
  549. package/dist/components/ui/command.mjs +1 -1
  550. package/dist/components/ui/dialog.js +1 -1
  551. package/dist/components/ui/dialog.mjs +1 -1
  552. package/dist/components/ui/dropdown-menu.js +1 -1
  553. package/dist/components/ui/dropdown-menu.mjs +1 -1
  554. package/dist/components/ui/hover-card.js +1 -1
  555. package/dist/components/ui/hover-card.mjs +1 -1
  556. package/dist/components/ui/index.js +1 -1
  557. package/dist/components/ui/index.mjs +1 -1
  558. package/dist/components/ui/input.js +1 -1
  559. package/dist/components/ui/input.mjs +1 -1
  560. package/dist/components/ui/inputs/common/styles/index.js +1 -1
  561. package/dist/components/ui/inputs/common/styles/index.mjs +1 -1
  562. package/dist/components/ui/inputs/text-input/index.js +1 -1
  563. package/dist/components/ui/inputs/text-input/index.mjs +1 -1
  564. package/dist/components/ui/inputs/textarea-input/index.js +1 -1
  565. package/dist/components/ui/inputs/textarea-input/index.mjs +1 -1
  566. package/dist/components/ui/label.js +1 -1
  567. package/dist/components/ui/label.mjs +1 -1
  568. package/dist/components/ui/pagination.js +1 -1
  569. package/dist/components/ui/pagination.mjs +1 -1
  570. package/dist/components/ui/popover.js +1 -1
  571. package/dist/components/ui/popover.mjs +1 -1
  572. package/dist/components/ui/progress.js +1 -1
  573. package/dist/components/ui/progress.mjs +1 -1
  574. package/dist/components/ui/scroll-area.js +1 -1
  575. package/dist/components/ui/scroll-area.mjs +1 -1
  576. package/dist/components/ui/select.js +1 -1
  577. package/dist/components/ui/select.mjs +1 -1
  578. package/dist/components/ui/separator.js +1 -1
  579. package/dist/components/ui/separator.mjs +1 -1
  580. package/dist/components/ui/sheet.js +1 -1
  581. package/dist/components/ui/sheet.mjs +1 -1
  582. package/dist/components/ui/sidebar.js +1 -1
  583. package/dist/components/ui/sidebar.mjs +1 -1
  584. package/dist/components/ui/skeleton.js +1 -1
  585. package/dist/components/ui/skeleton.mjs +1 -1
  586. package/dist/components/ui/switch.js +1 -1
  587. package/dist/components/ui/switch.mjs +1 -1
  588. package/dist/components/ui/tabs.js +1 -1
  589. package/dist/components/ui/tabs.mjs +1 -1
  590. package/dist/components/ui/textarea.js +1 -1
  591. package/dist/components/ui/textarea.mjs +1 -1
  592. package/dist/components/ui/toast.js +1 -1
  593. package/dist/components/ui/toast.mjs +1 -1
  594. package/dist/components/ui/toaster.js +1 -1
  595. package/dist/components/ui/toaster.mjs +1 -1
  596. package/dist/components/ui/toggle-group.js +1 -1
  597. package/dist/components/ui/toggle-group.mjs +1 -1
  598. package/dist/components/ui/toggle.js +1 -1
  599. package/dist/components/ui/toggle.mjs +1 -1
  600. package/dist/components/ui/tooltip.js +1 -1
  601. package/dist/components/ui/tooltip.mjs +1 -1
  602. package/dist/globals.css +1 -1
  603. package/dist/index.js +18 -18
  604. package/dist/index.mjs +1 -1
  605. package/dist/metafile-cjs.json +1 -1
  606. package/dist/metafile-esm.json +1 -1
  607. package/dist/pages/Blog.js +1 -1
  608. package/dist/pages/Blog.mjs +1 -1
  609. package/dist/pages/Documentation.js +1 -1
  610. package/dist/pages/Documentation.mjs +1 -1
  611. package/dist/pages/IndexPage.js +1 -1
  612. package/dist/pages/IndexPage.mjs +1 -1
  613. package/dist/pages/Intranet.js +1 -1
  614. package/dist/pages/Intranet.mjs +1 -1
  615. package/dist/pages/LandingPage.js +3 -3
  616. package/dist/pages/LandingPage.mjs +1 -1
  617. package/dist/pages/Page.js +1 -1
  618. package/dist/pages/Page.mjs +1 -1
  619. package/dist/pages/Publish.js +4 -4
  620. package/dist/pages/Publish.mjs +1 -1
  621. package/dist/pages/Website.js +1 -1
  622. package/dist/pages/Website.mjs +1 -1
  623. package/dist/sections/AboutSection.js +1 -1
  624. package/dist/sections/AboutSection.mjs +1 -1
  625. package/dist/sections/BlogDetail.js +1 -1
  626. package/dist/sections/BlogDetail.mjs +1 -1
  627. package/dist/sections/BlogList.js +3 -3
  628. package/dist/sections/BlogList.mjs +1 -1
  629. package/dist/sections/BlogListSection.js +1 -1
  630. package/dist/sections/BlogListSection.mjs +1 -1
  631. package/dist/sections/ContactSection.js +1 -1
  632. package/dist/sections/ContactSection.mjs +1 -1
  633. package/dist/sections/ImageSection.js +1 -1
  634. package/dist/sections/ImageSection.mjs +1 -1
  635. package/dist/sections/MainPageSection.js +1 -1
  636. package/dist/sections/MainPageSection.mjs +1 -1
  637. package/dist/sections/PageSections.js +3 -3
  638. package/dist/sections/PageSections.mjs +1 -1
  639. package/dist/sections/PricingSection.js +1 -1
  640. package/dist/sections/PricingSection.mjs +1 -1
  641. package/dist/sections/ServiceDetail.js +1 -1
  642. package/dist/sections/ServiceDetail.mjs +1 -1
  643. package/dist/sections/ServiceDetailSection.js +1 -1
  644. package/dist/sections/ServiceDetailSection.mjs +1 -1
  645. package/dist/sections/ServiceSection.js +1 -1
  646. package/dist/sections/ServiceSection.mjs +1 -1
  647. package/dist/sections/form/index.js +1 -1
  648. package/dist/sections/form/index.mjs +1 -1
  649. package/dist/sections/index.js +3 -3
  650. package/dist/sections/index.mjs +1 -1
  651. package/dist/styles/Colors.js +1 -1
  652. package/dist/styles/Colors.mjs +1 -1
  653. package/dist/utils/AOSInit.js +2 -2
  654. package/dist/utils/AOSInit.mjs +1 -1
  655. package/dist/utils/cn.js +1 -1
  656. package/dist/utils/cn.mjs +1 -1
  657. package/dist/utils/index.js +2 -2
  658. package/dist/utils/index.mjs +1 -1
  659. package/package.json +1 -1
  660. package/dist/chunk-MDJREBVI.mjs +0 -1
  661. package/dist/chunk-O46BOA4T.mjs +0 -1
  662. package/dist/chunk-PA4ZBJDO.mjs +0 -1
  663. package/dist/chunk-XGRRLABA.mjs +0 -8
  664. package/dist/chunk-ZFUP5NVF.mjs +0 -4
  665. package/dist/chunk-ZWHGOTSF.mjs +0 -1
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- "use strict";var Xs=Object.create;var ao=Object.defineProperty;var Js=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Zs=Object.getPrototypeOf,Qs=Object.prototype.hasOwnProperty;var en=(e,t)=>{for(var a in t)ao(e,a,{get:t[a],enumerable:!0})},Br=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ys(t))!Qs.call(e,i)&&i!==a&&ao(e,i,{get:()=>t[i],enumerable:!(o=Js(t,i))||o.enumerable});return e};var be=(e,t,a)=>(a=e!=null?Xs(Zs(e)):{},Br(t||!e||!e.__esModule?ao(a,"default",{value:e,enumerable:!0}):a,e)),tn=e=>Br(ao({},"__esModule",{value:!0}),e);var Ul={};en(Ul,{ColleaguesView:()=>qo,FileView:()=>za,KnowledgeView:()=>Xo,PlanningView:()=>Eo,ProjectView:()=>fr,ProjectsIndexView:()=>wr,TeamsIndexView:()=>Cr});module.exports=tn(Ul);var At=require("react"),bt=require("lucide-react");var $r=require("clsx");var Uo="-",an=e=>{let t=rn(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let s=c.split(Uo);return s[0]===""&&s.length!==1&&s.shift(),Or(s,t)||on(c)},getConflictingClassGroupIds:(c,s)=>{let m=a[c]||[];return s&&o[c]?[...m,...o[c]]:m}}},Or=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),i=o?Or(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let r=e.join(Uo);return t.validators.find(({validator:c})=>c(r))?.classGroupId},Lr=/^\[(.+)\]$/,on=e=>{if(Lr.test(e)){let t=Lr.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},rn=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return nn(Object.entries(e.classGroups),a).forEach(([r,c])=>{Vo(c,o,r,t)}),o},Vo=(e,t,a,o)=>{e.forEach(i=>{if(typeof i=="string"){let r=i===""?t:jr(t,i);r.classGroupId=a;return}if(typeof i=="function"){if(sn(i)){Vo(i(o),t,a,o);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([r,c])=>{Vo(c,jr(t,r),a,o)})})},jr=(e,t)=>{let a=e;return t.split(Uo).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},sn=e=>e.isThemeGetter,nn=(e,t)=>t?e.map(([a,o])=>{let i=o.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([c,s])=>[t+c,s])):r);return[a,i]}):e,ln=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,i=(r,c)=>{a.set(r,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(r){let c=a.get(r);if(c!==void 0)return c;if((c=o.get(r))!==void 0)return i(r,c),c},set(r,c){a.has(r)?a.set(r,c):i(r,c)}}},zr="!",dn=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,i=t[0],r=t.length,c=s=>{let m=[],n=0,l=0,u;for(let f=0;f<s.length;f++){let k=s[f];if(n===0){if(k===i&&(o||s.slice(f,f+r)===t)){m.push(s.slice(l,f)),l=f+r;continue}if(k==="/"){u=f;continue}}k==="["?n++:k==="]"&&n--}let g=m.length===0?s:s.substring(l),v=g.startsWith(zr),S=v?g.substring(1):g,y=u&&u>l?u-l:void 0;return{modifiers:m,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:y}};return a?s=>a({className:s,parseClassName:c}):c},cn=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},mn=e=>({cache:ln(e.cacheSize),parseClassName:dn(e),...an(e)}),pn=/\s+/,un=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:i}=t,r=[],c=e.trim().split(pn),s="";for(let m=c.length-1;m>=0;m-=1){let n=c[m],{modifiers:l,hasImportantModifier:u,baseClassName:g,maybePostfixModifierPosition:v}=a(n),S=!!v,y=o(S?g.substring(0,v):g);if(!y){if(!S){s=n+(s.length>0?" "+s:s);continue}if(y=o(g),!y){s=n+(s.length>0?" "+s:s);continue}S=!1}let f=cn(l).join(":"),k=u?f+zr:f,I=k+y;if(r.includes(I))continue;r.push(I);let _=i(y,S);for(let Q=0;Q<_.length;++Q){let w=_[Q];r.push(k+w)}s=n+(s.length>0?" "+s:s)}return s};function gn(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Hr(t))&&(o&&(o+=" "),o+=a);return o}var Hr=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Hr(e[o]))&&(a&&(a+=" "),a+=t);return a};function fn(e,...t){let a,o,i,r=c;function c(m){let n=t.reduce((l,u)=>u(l),e());return a=mn(n),o=a.cache.get,i=a.cache.set,r=s,s(m)}function s(m){let n=o(m);if(n)return n;let l=un(m,a);return i(m,l),l}return function(){return r(gn.apply(null,arguments))}}var je=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Vr=/^\[(?:([a-qr-]+):)?(.+)\]$/i,vn=/^\qr+\/\qr+$/,bn=new Set(["px","full","screen"]),hn=/^(\qr+(\.\qr+)?)?(Ko|sm|md|lg|xl)$/,xn=/\qr+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,yn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,wn=/^(inset_)?-?((\qr+)?\.?(\qr+)[a-qr]+|0)_-?((\qr+)?\.?(\qr+)[a-qr]+|0)/,Nn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zt=e=>ha(e)||bn.has(e)||vn.test(e),qt=e=>xa(e,"length",En),ha=e=>!!e&&!Number.isNaN(Number(e)),Ho=e=>xa(e,"number",ha),Aa=e=>!!e&&Number.isInteger(Number(e)),Cn=e=>e.endsWith("%")&&ha(e.slice(0,-1)),ne=e=>Vr.test(e),Xt=e=>hn.test(e),Sn=new Set(["length","size","percentage"]),Dn=e=>xa(e,Sn,Ur),kn=e=>xa(e,"position",Ur),Pn=new Set(["image","url"]),Tn=e=>xa(e,Pn,In),Rn=e=>xa(e,"",An),Ia=()=>!0,xa=(e,t,a)=>{let o=Vr.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},En=e=>xn.test(e)&&!yn.test(e),Ur=()=>!1,An=e=>wn.test(e),In=e=>Nn.test(e);var Mn=()=>{let e=je("colors"),t=je("spacing"),a=je("blur"),o=je("brightness"),i=je("borderColor"),r=je("borderRadius"),c=je("borderSpacing"),s=je("borderWidth"),m=je("contrast"),n=je("grayscale"),l=je("hueRotate"),u=je("invert"),g=je("gap"),v=je("gradientColorStops"),S=je("gradientColorStopPositions"),y=je("inset"),f=je("margin"),k=je("opacity"),I=je("padding"),_=je("saturate"),Q=je("scale"),w=je("sepia"),H=je("skew"),se=je("space"),T=je("translate"),R=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto",ne,t],M=()=>[ne,t],ze=()=>["",zt,qt],Ie=()=>["auto",ha,ne],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>["start","end","center","between","around","evenly","stretch"],rt=()=>["","0",ne],Me=()=>["auto","avoid","all","avoid-page","page","left","right","column"],De=()=>[ha,ne];return{cacheSize:500,separator:":",theme:{colors:[Ia],spacing:[zt,qt],blur:["none","",Xt,ne],brightness:De(),borderColor:[e],borderRadius:["none","","full",Xt,ne],borderSpacing:M(),borderWidth:ze(),contrast:De(),grayscale:rt(),hueRotate:De(),invert:rt(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Cn,qt],inset:pe(),margin:pe(),opacity:De(),padding:M(),saturate:De(),scale:De(),sepia:rt(),skew:De(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ne]}],container:["container"],columns:[{columns:[Xt]}],"break-after":[{"break-after":Me()}],"break-before":[{"break-before":Me()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...We(),ne]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],qr:[{qr:["auto",Aa,ne]}],basis:[{basis:pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ne]}],grow:[{grow:rt()}],shrink:[{shrink:rt()}],order:[{order:["first","last","none",Aa,ne]}],"grid-cols":[{"grid-cols":[Ia]}],"col-start-end":[{col:["auto",{span:["full",Aa,ne]},ne]}],"col-start":[{"col-start":Ie()}],"col-end":[{"col-end":Ie()}],"grid-rows":[{"grid-rows":[Ia]}],"row-start-end":[{row:["auto",{span:[Aa,ne]},ne]}],"row-start":[{"row-start":Ie()}],"row-end":[{"row-end":Ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ne]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],qr:[{qr:[I]}],px:[{px:[I]}],py:[{py:[I]}],qr:[{qr:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],qr:[{qr:[f]}],bt:[{bt:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ne,t]}],"min-w":[{"min-w":[ne,t,"min","max","fit"]}],"max-w":[{"max-w":[ne,t,"none","full","min","max","fit","prose",{screen:[Xt]},Xt]}],h:[{h:[ne,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ne,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xt,qt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ho]}],"font-family":[{font:[Ia]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ne]}],"line-clamp":[{"line-clamp":["none",ha,Ho]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zt,ne]}],"list-image":[{"list-image":["none",ne]}],"list-style-type":[{list:["none","disc","decimal",ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zt,qt]}],"underline-offset":[{"underline-offset":["auto",zt,ne]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),kn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Tn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-se":[{"rounded-se":[r]}],"rounded-qr":[{"rounded-qr":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[zt,ne]}],"outline-w":[{outline:[zt,qt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ze()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[zt,qt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xt,Rn]}],"shadow-color":[{shadow:[Ia]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",Xt,ne]}],grayscale:[{grayscale:[n]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[u]}],saturate:[{saturate:[_]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[n]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ne]}],duration:[{duration:De()}],ease:[{ease:["linear","in","out","in-out",ne]}],delay:[{delay:De()}],animate:[{animate:["none","spin","ping","pulse","bounce",ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Q]}],"scale-x":[{"scale-x":[Q]}],"scale-y":[{"scale-y":[Q]}],rotate:[{rotate:[Aa,ne]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[H]}],"skew-y":[{"skew-y":[H]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ne]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-qr":[{"scroll-qr":M()}],"scroll-bt":[{"scroll-bt":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-qr":[{"scroll-qr":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-qr":[{"scroll-qr":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[zt,qt,Ho]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],qr:["px","py","qr","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","qr","bt","mb","ml"],mx:["bt","ml"],my:["qr","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-qr","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-qr"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-qr","scroll-bt","scroll-mb","scroll-ml"],"scroll-mx":["scroll-bt","scroll-ml"],"scroll-my":["scroll-qr","scroll-mb"],"scroll-qr":["scroll-px","scroll-py","scroll-qr","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Kr=fn(Mn);function b(...e){return Kr((0,$r.clsx)(e))}var _r=require("@radix-ui/react-slot"),Gr=require("class-variance-authority"),Wr=be(require("react")),qr=require("react/jsx-runtime"),oo=(0,Gr.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),h=Wr.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...i},r)=>(0,qr.jsx)(e?_r.Slot:"button",{className:b(oo({className:t,size:a,variant:o})),ref:r,...i}));h.displayName="Button";var aa=be(require("react"));var O=aa.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,className:b("rounded-xl border bg-card text-card-foreground shadow",e),...t}));O.displayName="Card";var Ae=aa.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,className:b("flex flex-col space-y-1.5 qr-6",e),...t}));Ae.displayName="CardHeader";var Oe=aa.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,className:b("font-semibold leading-none tracking-tight",e),...t}));Oe.displayName="CardTitle";var oa=aa.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,className:b("text-sm text-muted-foreground",e),...t}));oa.displayName="CardDescription";var le=aa.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,className:b("qr-6 pt-0",e),...t}));le.displayName="CardContent";var ra=aa.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,className:b("flex items-center qr-6 pt-0",e),...t}));ra.displayName="CardFooter";var Xr=be(require("react"));var L=Xr.forwardRef(({className:e,type:t,...a},o)=>(0,qr.jsx)("input",{type:t,className:b("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));L.displayName="Input";var he=be(require("@radix-ui/react-select")),Jt=be(require("react")),ke=he.Root;var Fe=he.Value,Ce=Jt.forwardRef(({children:e,className:t,...a},o)=>(0,$e.jsxs)(he.Trigger,{className:b("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,$e.jsx)(he.Icon,{asChild:!0,children:(0,$e.jsx)(bt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ce.displayName=he.Trigger.displayName;var Yr=Jt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(he.ScrollUpButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,$e.jsx)(bt.ChevronUp,{className:"h-4 w-4"})}));Yr.displayName=he.ScrollUpButton.displayName;var Zr=Jt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(he.ScrollDownButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,$e.jsx)(bt.ChevronDown,{className:"h-4 w-4"})}));Zr.displayName=he.ScrollDownButton.displayName;var Se=Jt.forwardRef(({children:e,className:t,position:a="popper",...o},i)=>(0,$e.jsx)(he.Portal,{children:(0,$e.jsxs)(he.Content,{className:b("relative qr-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:i,...o,children:[(0,$e.jsx)(Yr,{}),(0,$e.jsx)(he.Viewport,{className:b("qr-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,$e.jsx)(Zr,{})]})}));Se.displayName=he.Content.displayName;var Fn=Jt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(he.Label,{className:b("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Fn.displayName=he.Label.displayName;var U=Jt.forwardRef(({children:e,className:t,...a},o)=>(0,$e.jsxs)(he.Item,{className:b("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,$e.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$e.jsx)(he.ItemIndicator,{children:(0,$e.jsx)(bt.Check,{className:"h-4 w-4"})})}),(0,$e.jsx)(he.ItemText,{children:e})]}));U.displayName=he.Item.displayName;var Bn=Jt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(he.Separator,{className:b("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Bn.displayName=he.Separator.displayName;var Ko=require("motion/react");var na=be(require("@radix-ui/react-tabs"));function Qr({className:e,...t}){return(0,qr.jsx)(na.Root,{"data-slot":"tabs",className:b("flex flex-col gap-2",e),...t})}function ei({className:e,...t}){return(0,qr.jsx)(na.List,{"data-slot":"tabs-list",className:b("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg qr-[3px]",e),...t})}function ti({className:e,...t}){return(0,qr.jsx)(na.Trigger,{"data-slot":"tabs-trigger",className:b("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Ht=be(require("react")),xe=be(require("@radix-ui/react-dropdown-menu")),ya=require("@radix-ui/react-icons");var io=xe.Root,so=xe.Trigger;var Ln=Ht.forwardRef(({className:e,inset:t,children:a,...o},i)=>(0,qr.jsxs)(xe.SubTrigger,{ref:i,className:b("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,qr.jsx)(ya.ChevronRightIcon,{className:"ml-auto"})]}));Ln.displayName=xe.SubTrigger.displayName;var jn=Ht.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(xe.SubContent,{ref:a,className:b("qr-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover qr-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));jn.displayName=xe.SubContent.displayName;var Ma=Ht.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,qr.jsx)(xe.Portal,{children:(0,qr.jsx)(xe.Content,{ref:o,sideOffset:t,className:b("qr-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover qr-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Ma.displayName=xe.Content.displayName;var la=Ht.forwardRef(({className:e,inset:t,...a},o)=>(0,qr.jsx)(xe.Item,{ref:o,className:b("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));la.displayName=xe.Item.displayName;var On=Ht.forwardRef(({className:e,children:t,checked:a,...o},i)=>(0,qr.jsxs)(xe.CheckboxItem,{ref:i,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,qr.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,qr.jsx)(xe.ItemIndicator,{children:(0,qr.jsx)(ya.CheckIcon,{className:"h-4 w-4"})})}),t]}));On.displayName=xe.CheckboxItem.displayName;var zn=Ht.forwardRef(({className:e,children:t,...a},o)=>(0,qr.jsxs)(xe.RadioItem,{ref:o,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,qr.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,qr.jsx)(xe.ItemIndicator,{children:(0,qr.jsx)(ya.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));zn.displayName=xe.RadioItem.displayName;var Hn=Ht.forwardRef(({className:e,inset:t,...a},o)=>(0,qr.jsx)(xe.Label,{ref:o,className:b("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Hn.displayName=xe.Label.displayName;var Vn=Ht.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(xe.Separator,{ref:a,className:b("-mx-1 my-1 h-px bg-muted",e),...t}));Vn.displayName=xe.Separator.displayName;var Un=({className:e,...t})=>(0,qr.jsx)("span",{className:b("ml-auto text-Ko tracking-widest opacity-60",e),...t});Un.displayName="DropdownMenuShortcut";function no({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:i="700px",gridCols:r=6}){let c=a.find(s=>s.value===e);return(0,qr.jsxs)(Ko.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,qr.jsx)("div",{className:"hidden lg:block",children:(0,qr.jsx)(Qr,{value:e,onValueChange:t,children:(0,qr.jsx)(ei,{className:"grid w-full rounded-2xl qr-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,qr.jsx)(Ko.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,qr.jsx)(ti,{value:s.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,qr.jsx)("div",{className:"lg:hidden",children:(0,qr.jsxs)(io,{children:[(0,qr.jsx)(so,{asChild:!0,children:(0,qr.jsxs)(h,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,qr.jsx)(bt.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,qr.jsx)(Ma,{align:"center",className:"w-[180px]",children:a.map(s=>(0,qr.jsx)(la,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}var lo=be(require("react")),Vt=be(require("@radix-ui/react-avatar"));var Ut=lo.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(Vt.Root,{ref:a,className:b("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ut.displayName=Vt.Root.displayName;var Fa=lo.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(Vt.Image,{ref:a,className:b("aspect-square h-full w-full",e),...t}));Fa.displayName=Vt.Image.displayName;var Kt=lo.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(Vt.Fallback,{ref:a,className:b("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Kt.displayName=Vt.Fallback.displayName;var Kn=(0,Gr.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-Ko font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Z({className:e,variant:t,...a}){return(0,qr.jsx)("div",{className:b(Kn({variant:t}),e),...a})}function mo({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:i=!0,compact:r=!1,className:c}){let[s,m]=(0,At.useState)(!1),n=g=>{switch(g){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},l=g=>{switch(g){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},u=g=>{if(!g)return"Never";let S=Math.floor((new Date().getTime()-g.getTime())/(1e3*60));return S<1?"Just now":S<60?`${S}m ago`:S<1440?`${Math.floor(S/60)}h ago`:`${Math.floor(S/1440)}qr ago`};return(0,qr.jsxs)(O,{className:b("hover:shadow-md transition-shadow",r&&"qr-2",c),children:[(0,qr.jsx)(Ae,{className:b("pb-3",r&&"pb-2"),children:(0,qr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qr.jsx)("div",{className:"relative",children:(0,qr.jsxs)(Ut,{className:b("h-12 w-12",r&&"h-8 w-8"),children:[(0,qr.jsx)(Fa,{src:"/placeholder.svg",alt:e.name}),(0,qr.jsx)(Kt,{children:e.name.split(" ").map(g=>g[0]).join("")})]})}),(0,qr.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)("h3",{className:b("font-semibold text-sm truncate",r&&"text-Ko"),children:e.name}),e.type==="digital"?(0,qr.jsx)(bt.Bot,{className:b("h-4 w-4 text-blue-500",r&&"h-3 w-3")}):(0,qr.jsx)(bt.User,{className:b("h-4 w-4 text-green-500",r&&"h-3 w-3")})]}),(0,qr.jsx)("qr",{className:b("text-sm text-muted-foreground truncate",r&&"text-Ko"),children:e.type==="human"?e.role:e.description}),!r&&(0,qr.jsxs)("div",{className:"flex items-center gap-2 qr-1",children:[e.type==="human"&&(0,qr.jsx)(Z,{variant:"secondary",className:"text-Ko",children:e.department}),e.type==="digital"&&(0,qr.jsxs)(Z,{variant:"secondary",className:"text-Ko",children:["v",e.version]}),(0,qr.jsx)(Z,{variant:"outline",className:"text-Ko",children:l(e.status)})]})]})]}),i&&(0,qr.jsxs)(io,{children:[(0,qr.jsx)(so,{asChild:!0,children:(0,qr.jsx)(h,{variant:"ghost",size:"icon",className:b("h-8 w-8",r&&"h-6 w-6"),children:(0,qr.jsx)(bt.MoreHorizontal,{className:b("h-4 w-4",r&&"h-3 w-3")})})}),(0,qr.jsxs)(Ma,{align:"end",children:[(0,qr.jsxs)(la,{onClick:()=>o?.(e),children:[(0,qr.jsx)(bt.Settings,{className:"h-4 w-4 bt-2"}),"View Details"]}),(0,qr.jsxs)(la,{onClick:()=>t?.(e),children:[(0,qr.jsx)(bt.Edit,{className:"h-4 w-4 bt-2"}),"Edit"]}),(0,qr.jsxs)(la,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,qr.jsx)(bt.Trash2,{className:"h-4 w-4 bt-2"}),"Delete"]})]})]})]})}),!r&&(0,qr.jsxs)(le,{className:"pt-0",children:[(0,qr.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,qr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,qr.jsx)(bt.Mail,{className:"h-3 w-3"}),(0,qr.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,qr.jsxs)(qr.Fragment,{children:[e.phone&&(0,qr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,qr.jsx)(bt.Phone,{className:"h-3 w-3"}),(0,qr.jsx)("span",{children:e.phone})]}),e.location&&(0,qr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,qr.jsx)(bt.MapPin,{className:"h-3 w-3"}),(0,qr.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,qr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,qr.jsx)(bt.Settings,{className:"h-3 w-3"}),(0,qr.jsxs)("span",{children:["v",e.version]})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,qr.jsx)(bt.Clock,{className:"h-3 w-3"}),(0,qr.jsxs)("span",{children:["Last active: ",u(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,qr.jsx)("div",{className:"qr-3",children:(0,qr.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,s?e.skills.length:3).map(g=>(0,qr.jsx)(Z,{variant:"outline",className:"text-Ko",children:g},g)),e.skills.length>3&&(0,qr.jsx)(h,{variant:"ghost",size:"sm",className:"h-5 px-2 text-Ko",onClick:()=>m(!s),children:s?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,qr.jsx)("div",{className:"qr-3",children:(0,qr.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,s?e.capabilities.length:2).map(g=>(0,qr.jsx)(Z,{variant:"outline",className:"text-Ko",children:g},g)),e.capabilities.length>2&&(0,qr.jsx)(h,{variant:"ghost",size:"sm",className:"h-5 px-2 text-Ko",onClick:()=>m(!s),children:s?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}var si=be(require("react")),$o=be(require("@radix-ui/react-label"));var $n=(0,Gr.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),P=si.forwardRef(({className:e,...t},a)=>(0,qr.jsx)($o.Root,{ref:a,className:b($n(),e),...t}));P.displayName=$o.Root.displayName;var di=be(require("react")),Ne=di.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("textarea",{className:b("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Ne.displayName="Textarea";var _o=be(require("react")),Nt=be(require("@radix-ui/react-scroll-area"));var Ba=_o.forwardRef(({className:e,children:t,...a},o)=>(0,qr.jsxs)(Nt.Root,{ref:o,className:b("relative overflow-hidden",e),...a,children:[(0,qr.jsx)(Nt.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,qr.jsx)(mi,{}),(0,qr.jsx)(Nt.Corner,{})]}));Ba.displayName=Nt.Root.displayName;var mi=_o.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,qr.jsx)(Nt.ScrollAreaScrollbar,{ref:o,orientation:t,className:b("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent qr-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent qr-[1px]",e),...a,children:(0,qr.jsx)(Nt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));mi.displayName=Nt.ScrollAreaScrollbar.displayName;function Go({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:i="Search knowledge documents...",maxSelections:r,disabled:c=!1}){let[s,m]=(0,At.useState)(""),[n,l]=(0,At.useState)([]),[u,g]=(0,At.useState)(!1);(0,At.useEffect)(()=>{if(!s.trim()){l([]),g(!1);return}let f=a.filter(k=>{if(e.map(Q=>Q.id).includes(k.id))return!1;let _=s.toLowerCase();return k.title.toLowerCase().includes(_)||k.description?.toLowerCase().includes(_)||k.tags?.some(Q=>Q.toLowerCase().includes(_))||Object.values(k.metadata||{}).some(Q=>String(Q).toLowerCase().includes(_))});l(f),g(!0)},[s,e,a]);let v=f=>{r&&e.length>=r||(t([...e,f]),m(""),g(!1))},S=f=>{t(e.filter(k=>k.id!==f))},y=!r||e.length<r;return(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:o}),(0,qr.jsxs)("div",{className:"relative",children:[(0,qr.jsxs)("div",{className:"relative",children:[(0,qr.jsx)($t.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qr.jsx)(L,{value:s,onChange:f=>m(f.target.value),placeholder:y?i:`Maximum ${r} documents selected`,className:"pl-9",disabled:c||!y,onFocus:()=>s&&g(!0)})]}),u&&n.length>0&&(0,qr.jsx)(O,{className:"absolute top-full left-0 right-0 qr-10 qr-1 max-h-60",children:(0,qr.jsx)(Ba,{className:"h-full",children:(0,qr.jsx)(le,{className:"qr-2",children:n.map(f=>(0,qr.jsx)(h,{variant:"ghost",className:"w-full justify-start h-auto qr-3 mb-1",onClick:()=>v(f),disabled:c,children:(0,qr.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,qr.jsx)($t.FileText,{className:"h-4 w-4 qr-0.5 text-muted-foreground flex-shrink-0"}),(0,qr.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,qr.jsx)("div",{className:"font-medium text-sm truncate",children:f.title}),f.description&&(0,qr.jsx)("div",{className:"text-Ko text-muted-foreground qr-1 line-clamp-2",children:f.description}),f.tags&&f.tags.length>0&&(0,qr.jsxs)("div",{className:"flex flex-wrap gap-1 qr-2",children:[f.tags.slice(0,3).map(k=>(0,qr.jsx)(Z,{variant:"outline",className:"text-Ko",children:k},k)),f.tags.length>3&&(0,qr.jsxs)(Z,{variant:"outline",className:"text-Ko",children:["+",f.tags.length-3," more"]})]})]})]})},f.id))})})}),u&&s&&n.length===0&&(0,qr.jsx)(O,{className:"absolute top-full left-0 right-0 qr-10 qr-1",children:(0,qr.jsxs)(le,{className:"qr-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',s,'"']})})]}),e.length>0&&(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,r&&`/${r}`,")"]}),(0,qr.jsx)("div",{className:"space-y-2",children:e.map(f=>(0,qr.jsx)(O,{className:"qr-3",children:(0,qr.jsxs)("div",{className:"flex items-start gap-3",children:[(0,qr.jsx)($t.FileText,{className:"h-4 w-4 qr-0.5 text-muted-foreground flex-shrink-0"}),(0,qr.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qr.jsx)("div",{className:"font-medium text-sm",children:f.title}),f.description&&(0,qr.jsx)("div",{className:"text-Ko text-muted-foreground qr-1",children:f.description}),f.tags&&f.tags.length>0&&(0,qr.jsx)("div",{className:"flex flex-wrap gap-1 qr-2",children:f.tags.map(k=>(0,qr.jsxs)(Z,{variant:"outline",className:"text-Ko",children:[(0,qr.jsx)($t.Tag,{className:"h-3 w-3 bt-1"}),k]},k))})]}),(0,qr.jsx)(h,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>S(f.id),disabled:c,children:(0,qr.jsx)($t.qr,{className:"h-3 w-3"})})]})},f.id))})]}),u&&(0,qr.jsx)("div",{className:"fixed inset-0 qr-0",onClick:()=>g(!1)})]})}function Wo({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:i,submitLabel:r,cancelLabel:c="Cancel",readOnly:s=!1,availableKnowledgeDocuments:m=[]}){let[n,l]=(0,At.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[u,g]=(0,At.useState)(""),[v,S]=(0,At.useState)(""),[y,f]=(0,At.useState)(!s);(0,At.useEffect)(()=>{e&&l(e)},[e]);let k=T=>{T.preventDefault();let R=n.version?parseInt(n.version):0,E=e?(R+1).toString():"1",pe={id:n.id||Date.now().toString(),name:n.name,type:"digital",status:"active",joinedDate:n.joinedDate||new Date,lastActive:n.lastActive||new Date,description:n.description,jobDescription:n.jobDescription||"",workInstructions:n.workInstructions||"",capabilities:n.capabilities||[],knowledge:n.knowledge||[],coreKnowledge:n.coreKnowledge||[],version:E,lastUpdated:n.lastUpdated||new Date,isActive:!0};t(pe)},I=(T,R,E)=>{if(!R.trim())return;let pe=n[T]||[];l({...n,[T]:[...pe,R.trim()]}),E("")},_=(T,R)=>{let E=n[T]||[];l({...n,[T]:E.filter((pe,M)=>M!==R)})},Q=T=>{T.preventDefault(),f(!y)},w=(T,R,E,pe,M)=>{let ze=n[T]||[];return(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:R}),y&&(0,qr.jsxs)("div",{className:"flex gap-2",children:[(0,qr.jsx)(L,{value:E,onChange:Ie=>pe(Ie.target.value),placeholder:M,onKeyPress:Ie=>{Ie.key==="Enter"&&(Ie.preventDefault(),I(T,E,pe))},disabled:o}),(0,qr.jsx)(h,{type:"button",variant:"outline",size:"icon",onClick:()=>I(T,E,pe),disabled:o,children:(0,qr.jsx)(bt.Plus,{className:"h-4 w-4"})})]}),(0,qr.jsx)("div",{className:"flex flex-wrap gap-2",children:ze.map((Ie,We)=>(0,qr.jsxs)(Z,{className:"gap-1",children:[Ie,y&&(0,qr.jsx)(h,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 qr-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>_(T,We),disabled:o,children:(0,qr.jsx)(bt.qr,{className:"h-3 w-3"})})]},`${T}-${We}-${Ie}`))})]})},H=i||(y?e?"Edit Colleague":"Add New Colleague":"View Colleague"),se=r||(e?"Update Colleague":"Add Colleague");return(0,qr.jsxs)(O,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,qr.jsx)(Ae,{children:(0,qr.jsxs)(Oe,{className:"flex items-center gap-2",children:[(0,qr.jsx)(bt.Bot,{className:"h-5 w-5"}),H]})}),(0,qr.jsx)(le,{children:(0,qr.jsxs)("form",{onSubmit:k,className:"space-y-6",children:[(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"name",children:"Name *"}),(0,qr.jsx)(L,{id:"name",value:n.name||"",onChange:T=>l({...n,name:T.target.value}),required:!0,disabled:o||!y})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,qr.jsx)(Ne,{id:"description",value:n.description||"",onChange:T=>l({...n,description:T.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!y})]})]}),(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"jobDescription",children:"Job Description *"}),(0,qr.jsx)(Ne,{id:"jobDescription",value:n.jobDescription||"",onChange:T=>l({...n,jobDescription:T.target.value}),rows:4,required:n.type==="digital",disabled:o||!y})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,qr.jsx)(Ne,{id:"workInstructions",value:n.workInstructions||"",onChange:T=>l({...n,workInstructions:T.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!y})]}),w("capabilities","Capabilities",v,S,"Add capability"),(0,qr.jsx)(Go,{selectedDocuments:n.knowledge||[],onDocumentsChange:T=>l({...n,knowledge:T}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!y,availableDocuments:m}),(0,qr.jsx)(Go,{selectedDocuments:n.coreKnowledge||[],onDocumentsChange:T=>l({...n,coreKnowledge:T}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!y,availableDocuments:m})]}),(0,qr.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,qr.jsx)(h,{type:"button",variant:"outline",onClick:a,disabled:o,children:y?c:"Close"}),y?(0,qr.jsx)(h,{type:"submit",disabled:o,children:o?"Saving...":se}):(0,qr.jsxs)(h,{type:"button",onClick:Q,disabled:o,className:"gap-2",children:[(0,qr.jsx)(bt.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function pi({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[i,r]=(0,At.useState)(""),c=(0,At.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(i.toLowerCase())||m.email.toLowerCase().includes(i.toLowerCase())||m.role.toLowerCase().includes(i.toLowerCase())||(m.skills||[]).some(l=>l.toLowerCase().includes(i.toLowerCase()))),[e,i]),s=m=>{t(m)};return(0,qr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qr.jsx)(Ko.AnimatePresence,{mode:"wait",children:(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qr.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,qr.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qr.jsx)(bt.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,qr.jsx)("qr",{className:"text-muted-foreground",children:"Choose a user to add At a colleague"})]})]}),(0,qr.jsx)(O,{className:"container",children:(0,qr.jsx)(le,{className:"pt-6",children:(0,qr.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,qr.jsx)("div",{className:"flex-1",children:(0,qr.jsxs)("div",{className:"relative",children:[(0,qr.jsx)(bt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qr.jsx)(L,{placeholder:"Search users by name, email, role, or skills...",value:i,onChange:m=>r(m.target.value),className:"pl-9"})]})})})})}),(0,qr.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:c.map(m=>(0,qr.jsx)(Ko.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,qr.jsxs)(O,{className:`cursor-pointer transition-all hover:shadow-lg ${o===m.id?"ring-2 ring-primary":""}`,onClick:()=>s(m),children:[(0,qr.jsx)(Ae,{className:"pb-3",children:(0,qr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qr.jsxs)(Ut,{children:[(0,qr.jsx)(Fa,{src:m.avatar,alt:m.name}),(0,qr.jsx)(Kt,{children:(0,qr.jsx)(bt.User,{className:"h-4 w-4"})})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(Oe,{className:"text-lg",children:m.name}),(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground",children:m.role})]})]}),o===m.id&&(0,qr.jsx)(bt.Check,{className:"h-5 w-5 text-primary"})]})}),(0,qr.jsx)(le,{className:"pt-0",children:(0,qr.jsxs)("div",{className:"space-y-3",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground",children:"Email"}),(0,qr.jsx)("qr",{className:"text-sm font-medium",children:m.email})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground",children:"Department"}),(0,qr.jsx)(Z,{variant:"secondary",children:m.department})]}),m.location&&(0,qr.jsxs)("div",{children:[(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground",children:"Location"}),(0,qr.jsx)("qr",{className:"text-sm",children:m.location})]}),m.skills&&m.skills.length>0&&(0,qr.jsxs)("div",{children:[(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,qr.jsxs)("div",{className:"flex flex-wrap gap-1",children:[m.skills.slice(0,3).map(n=>(0,qr.jsx)(Z,{variant:"outline",className:"text-Ko",children:n},n)),m.skills.length>3&&(0,qr.jsxs)(Z,{variant:"outline",className:"text-Ko",children:["+",m.skills.length-3]})]})]})]})})]})},m.id))}),c.length===0&&(0,qr.jsx)(O,{className:"container qr-4",children:(0,qr.jsx)(le,{className:"pt-6",children:(0,qr.jsxs)("div",{className:"text-center py-8",children:[(0,qr.jsx)(bt.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,qr.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,qr.jsx)("qr",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function ui({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[i,r]=(0,At.useState)(""),[c,s]=(0,At.useState)("all"),m=(0,At.useMemo)(()=>e.filter(u=>{let g=u.name.toLowerCase().includes(i.toLowerCase())||u.jobDescription.toLowerCase().includes(i.toLowerCase())||u.capabilities.some(S=>S.toLowerCase().includes(i.toLowerCase()))||u.workInstructions.toLowerCase().includes(i.toLowerCase()),v=c==="all"||u.status===c;return g&&v}),[e,i,c]),n=u=>{let g={...u,id:`${u.id}-clone-${Date.now()}`,name:`${u.name} (Copy)`,joinedDate:new Date,lastActive:new Date,lastUpdated:new Date,version:"1.0.0"};t(g)},l=u=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(u);return(0,qr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qr.jsx)(Ko.AnimatePresence,{mode:"wait",children:(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qr.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,qr.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qr.jsx)(bt.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,qr.jsx)("qr",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,qr.jsx)(O,{children:(0,qr.jsx)(le,{className:"pt-6",children:(0,qr.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qr.jsx)("div",{className:"flex-1",children:(0,qr.jsxs)("div",{className:"relative",children:[(0,qr.jsx)(bt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qr.jsx)(L,{placeholder:"Search by name, job description, or capabilities...",value:i,onChange:u=>r(u.target.value),className:"pl-9"})]})}),(0,qr.jsxs)("select",{value:c,onChange:u=>s(u.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,qr.jsx)("option",{value:"all",children:"All Status"}),(0,qr.jsx)("option",{value:"active",children:"Active"}),(0,qr.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,qr.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:m.map(u=>(0,qr.jsx)(Ko.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,qr.jsxs)(O,{className:`cursor-pointer transition-all hover:shadow-lg ${o===u.id?"ring-2 ring-primary":""}`,onClick:()=>n(u),children:[(0,qr.jsx)(Ae,{className:"pb-3",children:(0,qr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qr.jsx)(Ut,{children:(0,qr.jsx)(Kt,{className:"bg-blue-100",children:(0,qr.jsx)(bt.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,qr.jsxs)("div",{children:[(0,qr.jsxs)(Oe,{className:"text-lg flex items-center gap-2",children:[u.name,(0,qr.jsx)(Z,{variant:u.status==="active"?"default":"secondary",className:"text-Ko",children:u.status})]}),(0,qr.jsxs)("qr",{className:"text-sm text-muted-foreground",children:["v",u.version]})]})]}),(0,qr.jsxs)(h,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:g=>{g.stopPropagation(),n(u)},children:[(0,qr.jsx)(bt.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,qr.jsx)(le,{className:"pt-0",children:(0,qr.jsxs)("div",{className:"space-y-3",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,qr.jsx)("qr",{className:"text-sm line-clamp-2",children:u.jobDescription})]}),u.capabilities&&u.capabilities.length>0&&(0,qr.jsxs)("div",{children:[(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,qr.jsxs)("div",{className:"flex flex-wrap gap-1",children:[u.capabilities.slice(0,3).map(g=>(0,qr.jsx)(Z,{variant:"outline",className:"text-Ko",children:g},g)),u.capabilities.length>3&&(0,qr.jsxs)(Z,{variant:"outline",className:"text-Ko",children:["+",u.capabilities.length-3]})]})]}),(0,qr.jsxs)("div",{className:"flex items-center justify-between text-Ko text-muted-foreground",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qr.jsx)(bt.Calendar,{className:"h-3 w-3"}),(0,qr.jsxs)("span",{children:["Updated ",l(u.lastUpdated)]})]}),u.knowledge&&(0,qr.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qr.jsx)(bt.Users,{className:"h-3 w-3"}),(0,qr.jsxs)("span",{children:[u.knowledge.length," docs"]})]})]}),u.workInstructions&&(0,qr.jsxs)("div",{children:[(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,qr.jsx)("qr",{className:"text-Ko line-clamp-2",children:u.workInstructions})]})]})})]})},u.id))}),m.length===0&&(0,qr.jsx)(O,{children:(0,qr.jsx)(le,{className:"pt-6",children:(0,qr.jsxs)("div",{className:"text-center py-8",children:[(0,qr.jsx)(bt.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,qr.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,qr.jsx)("qr",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function gi({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,qr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qr.jsx)(Ko.AnimatePresence,{mode:"wait",children:(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qr.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,qr.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qr.jsx)(bt.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,qr.jsx)("qr",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,qr.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,qr.jsx)(Ko.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qr.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,qr.jsxs)(Ae,{className:"text-center pb-4",children:[(0,qr.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,qr.jsx)(bt.User,{className:"h-8 w-8 text-blue-600"})}),(0,qr.jsx)(Oe,{className:"text-xl",children:"Add Human Colleague"})]}),(0,qr.jsxs)(le,{className:"text-center",children:[(0,qr.jsx)("qr",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add At team members."}),(0,qr.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qr.jsx)(bt.Users,{className:"h-4 w-4 text-blue-600"}),(0,qr.jsx)("span",{children:"Browse existing users"})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qr.jsx)(bt.User,{className:"h-4 w-4 text-blue-600"}),(0,qr.jsx)("span",{children:"Import user details automatically"})]})]}),(0,qr.jsx)(h,{className:"qr-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,qr.jsx)(Ko.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qr.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,qr.jsxs)(Ae,{className:"text-center pb-4",children:[(0,qr.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,qr.jsx)(bt.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,qr.jsx)(Oe,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,qr.jsxs)(le,{className:"text-center",children:[(0,qr.jsx)("qr",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,qr.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qr.jsx)(bt.Bot,{className:"h-4 w-4 text-purple-600"}),(0,qr.jsx)("span",{children:"Clone existing colleagues"})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qr.jsx)(bt.Users,{className:"h-4 w-4 text-purple-600"}),(0,qr.jsx)("span",{children:"Create from templates"})]})]}),(0,qr.jsx)(h,{className:"qr-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function fi({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,qr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,qr.jsx)(Ko.AnimatePresence,{mode:"wait",children:(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qr.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,qr.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,qr.jsx)(bt.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,qr.jsx)("qr",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,qr.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,qr.jsx)(Ko.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qr.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,qr.jsxs)(Ae,{className:"text-center pb-4",children:[(0,qr.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,qr.jsx)(bt.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,qr.jsx)(Oe,{className:"text-xl",children:"Clone Existing"})]}),(0,qr.jsxs)(le,{className:"text-center",children:[(0,qr.jsx)("qr",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize it for your needs."}),(0,qr.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qr.jsx)(bt.Bot,{className:"h-4 w-4 text-blue-600"}),(0,qr.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qr.jsx)(bt.Copy,{className:"h-4 w-4 text-blue-600"}),(0,qr.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,qr.jsx)(h,{className:"qr-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,qr.jsx)(Ko.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,qr.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,qr.jsxs)(Ae,{className:"text-center pb-4",children:[(0,qr.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,qr.jsx)(bt.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,qr.jsx)(Oe,{className:"text-xl",children:"Create New"})]}),(0,qr.jsxs)(le,{className:"text-center",children:[(0,qr.jsx)("qr",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,qr.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qr.jsx)(bt.Plus,{className:"h-4 w-4 text-green-600"}),(0,qr.jsx)("span",{children:"Custom job description"})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,qr.jsx)(bt.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,qr.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,qr.jsx)(h,{className:"qr-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}function vi(e,t){let[a,o]=(0,At.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),i=r=>{try{o(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,At.useEffect)(()=>{i(a)},[]),[a,i]}var go=require("react-icons/fa");function Qe({title:e,description:t,badge:a,primaryAction:o,secondaryAction:i,gradient:r,children:c,className:s}){let[m,n]=vi(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!i&&!t),l=!i&&!t||m;return(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${r} qr-8 text-white ${s||""}`,children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,qr.jsx)(Z,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,qr.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-3",children:[l&&o&&(0,qr.jsx)(h,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(i||t)&&(0,qr.jsx)("button",{"aria-label":m?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 qr-1 text-white transition-colors",onClick:()=>n(!m),style:{lineHeight:0},children:m?(0,qr.jsx)(go.FaChevronDown,{size:22}):(0,qr.jsx)(go.FaChevronUp,{size:22})})]})]}),!l&&(0,qr.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsx)("qr",{className:"max-w-[600px] text-white/80",children:t}),(0,qr.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,qr.jsx)(h,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),i&&(0,qr.jsx)(h,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),c&&(0,qr.jsx)("div",{className:"hidden lg:block",children:c})]})]})}function qo({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:i=!1,departments:r=["Design","Engineering","Marketing","Product","Sales","Operations"],className:c,availableUsers:s=[],existingDigitalColleagues:m=[]}){let[n,l]=(0,At.useState)(e||[]),[u,g]=(0,At.useState)(""),[v,S]=(0,At.useState)("all"),[y,f]=(0,At.useState)("all"),[k,I]=(0,At.useState)("all"),[_,Q]=(0,At.useState)(null),[w,H]=(0,At.useState)(null);(0,At.useEffect)(()=>{l(e||[])},[e]);let se=Array.isArray(s)?s:[],T=Array.isArray(m)?m:[],[R,E]=(0,At.useState)("main"),pe=n.filter(x=>{if(!x||!x.name)return!1;let ve=x.name.toLowerCase().includes(u.toLowerCase())||x.type==="human"&&(x.email?.toLowerCase().includes(u.toLowerCase())||x.role?.toLowerCase().includes(u.toLowerCase()))||x.type==="digital"&&x.jobDescription?.toLowerCase().includes(u.toLowerCase()),ie=v==="all"||x.type==="human"&&x.department===v,ft=y==="all"||x.status===y;return ve&&ie&&ft}),M=pe.filter(x=>x.type==="human"),ze=pe.filter(x=>x.type==="digital"),Ie=()=>{E("typeSelection")},We=x=>{x.type==="digital"&&(Q(x),E("form")),console.log("Editing colleague:",x),a?.(x)},D=x=>{x.type==="digital"&&(H(x),E("view"))},ue=x=>{let ve={id:`human-${Date.now()}`,type:"human",name:x.name,email:x.email,role:x.role,department:x.department,phone:x.phone,location:x.location,timezone:x.timezone,skills:x.skills||[],bio:x.bio,status:"active",joinedDate:new Date,lastActive:new Date};l(ie=>[...ie,ve]),t?.(ve),E("main")},Re=x=>{if(!x||!x.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",x);return}l(ve=>[...ve,x]),t?.(x),E("main")},rt=()=>{Q(null),E("form")},Me=x=>{if(!x||!x.id){console.error("Invalid colleague provided to handleSaveColleague:",x);return}_?(l(ve=>ve.map(ie=>ie.id===x.id?x:ie)),a?.(x)):(l(ve=>[...ve,x]),t?.(x)),E("main"),Q(null)},De=()=>{E("main"),Q(null),H(null)},ct=()=>{E("main"),H(null)},yt=()=>{w&&(Q(w),H(null),E("form"))},it=x=>{console.log("handling delete colleague",x),l(ve=>ve.filter(ie=>ie.id!==x)),o?.(x)},wt=()=>{g(""),S("all"),f("all")},q=()=>{let x=[];return T.forEach(ie=>{ie.knowledge&&Array.isArray(ie.knowledge)&&x.push(...ie.knowledge),ie.coreKnowledge&&Array.isArray(ie.coreKnowledge)&&x.push(...ie.coreKnowledge)}),n.forEach(ie=>{ie.type==="digital"&&(ie.knowledge&&Array.isArray(ie.knowledge)&&x.push(...ie.knowledge),ie.coreKnowledge&&Array.isArray(ie.coreKnowledge)&&x.push(...ie.coreKnowledge))}),x.filter((ie,ft,Ot)=>ft===Ot.findIndex(Rt=>Rt.id===ie.id))};return R==="typeSelection"?(0,qr.jsx)(gi,{onSelectHuman:()=>E("userSelection"),onSelectDigital:()=>E("digitalOptions"),onCancel:()=>E("main")}):R==="userSelection"?(0,qr.jsx)(pi,{users:se,onUserSelect:ue,onCancel:()=>E("typeSelection")}):R==="digitalOptions"?(0,qr.jsx)(fi,{onCloneExisting:()=>E("digitalClone"),onCreateNew:rt,onCancel:()=>E("typeSelection")}):R==="digitalClone"?(0,qr.jsx)(ui,{digitalColleagues:T,onColleagueClone:Re,onCancel:()=>E("digitalOptions")}):R==="form"?(0,qr.jsx)(Wo,{colleague:_||void 0,onSave:Me,onCancel:De,availableKnowledgeDocuments:q()}):R==="view"?(0,qr.jsx)(Wo,{colleague:w||void 0,onSave:Me,onCancel:ct,readOnly:!0,availableKnowledgeDocuments:q()}):(0,qr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,qr.jsx)(Ko.AnimatePresence,{mode:"wait",children:(0,qr.jsx)(Ko.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,qr.jsxs)("div",{className:`space-y-6 ${c||""}`,children:[(0,qr.jsx)(Qe,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:Ie}}),(0,qr.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,qr.jsxs)(O,{children:[(0,qr.jsxs)(Ae,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,qr.jsx)(Oe,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,qr.jsx)(bt.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qr.jsxs)(le,{children:[(0,qr.jsx)("div",{className:"text-2xl font-bold",children:n.length}),(0,qr.jsxs)("qr",{className:"text-Ko text-muted-foreground",children:[n.filter(x=>x.status==="active").length," active"]})]})]}),(0,qr.jsxs)(O,{children:[(0,qr.jsxs)(Ae,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,qr.jsx)(Oe,{className:"text-sm font-medium",children:"Human Members"}),(0,qr.jsx)(bt.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qr.jsxs)(le,{children:[(0,qr.jsx)("div",{className:"text-2xl font-bold",children:n.filter(x=>x.type==="human").length}),(0,qr.jsxs)("qr",{className:"text-Ko text-muted-foreground",children:[n.filter(x=>x.type==="human"&&x.status==="active").length," ","active"]})]})]}),(0,qr.jsxs)(O,{children:[(0,qr.jsxs)(Ae,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,qr.jsx)(Oe,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,qr.jsx)(bt.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,qr.jsxs)(le,{children:[(0,qr.jsx)("div",{className:"text-2xl font-bold",children:n.filter(x=>x.type==="digital").length}),(0,qr.jsxs)("qr",{className:"text-Ko text-muted-foreground",children:[n.filter(x=>x.type==="digital"&&x.status==="active").length," ","active"]})]})]})]}),(0,qr.jsx)(O,{children:(0,qr.jsx)(le,{className:"pt-6",children:(0,qr.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qr.jsx)("div",{className:"flex-1",children:(0,qr.jsxs)("div",{className:"relative",children:[(0,qr.jsx)(bt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qr.jsx)(L,{placeholder:"Search colleagues...",value:u,onChange:x=>g(x.target.value),className:"pl-9"})]})}),(0,qr.jsxs)(ke,{value:v,onValueChange:S,children:[(0,qr.jsx)(Ce,{className:"w-full md:w-[180px]",children:(0,qr.jsx)(Fe,{placeholder:"Department"})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"all",children:"All Departments"}),r.map(x=>(0,qr.jsx)(U,{value:x,children:x},x))]})]}),(0,qr.jsxs)(ke,{value:y,onValueChange:f,children:[(0,qr.jsx)(Ce,{className:"w-full md:w-[140px]",children:(0,qr.jsx)(Fe,{placeholder:"Status"})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"all",children:"All Status"}),(0,qr.jsx)(U,{value:"active",children:"Active"}),(0,qr.jsx)(U,{value:"inactive",children:"Inactive"})]})]}),(u||v!=="all"||y!=="all")&&(0,qr.jsxs)(h,{variant:"outline",onClick:wt,className:"gap-2",children:[(0,qr.jsx)(bt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsx)(no,{activeTab:k,onTabChange:I,tabOptions:[{value:"all",label:`All (${pe.length})`},{value:"human",label:`Human (${M.length})`},{value:"digital",label:`Digital (${ze.length})`}],maxWidth:"400px",gridCols:3}),k==="all"&&(0,qr.jsx)("div",{className:`grid gap-4 ${i?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:pe.map(x=>(0,qr.jsx)(mo,{colleague:x,onEdit:We,onDelete:it,onViewDetails:D,compact:i},`${x}-${x.id}`))}),k==="human"&&(0,qr.jsx)("div",{className:`grid gap-4 ${i?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:M.map(x=>(0,qr.jsx)(mo,{colleague:x,onEdit:We,onDelete:it,onViewDetails:D,compact:i},x.id))}),k==="digital"&&(0,qr.jsx)("div",{className:`grid gap-4 ${i?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:ze.map(x=>(0,qr.jsx)(mo,{colleague:x,onEdit:We,onDelete:it,onViewDetails:D,compact:i},x.id))})]}),pe.length===0&&(0,qr.jsx)(O,{children:(0,qr.jsx)(le,{className:"pt-6",children:(0,qr.jsxs)("div",{className:"text-center py-8",children:[(0,qr.jsx)(bt.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,qr.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,qr.jsx)("qr",{className:"text-muted-foreground mb-4",children:u||v!=="all"||y!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,qr.jsxs)(h,{onClick:Ie,className:"gap-2",children:[(0,qr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function vo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:i=!0,className:r}){return(0,qr.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${r||""}`,children:[i&&(0,qr.jsxs)("div",{className:"bg-muted/50 qr-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,qr.jsx)("div",{className:"col-span-6",children:"Name"}),(0,qr.jsx)("div",{className:"col-span-2",children:"Size"}),(0,qr.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,qr.jsx)("div",{className:"divide-y",children:e.map(c=>(0,qr.jsxs)(Ko.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"qr-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(c),children:[(0,qr.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,qr.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,qr.jsx)("div",{children:(0,qr.jsx)("qr",{className:"font-medium",children:c.name})})]}),(0,qr.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:c.filesize}),(0,qr.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,qr.jsx)("span",{className:"text-sm md:text-base",children:typeof c.createdAt=="string"?c.createdAt:c.createdAt.toLocaleDateString()}),(0,qr.jsx)("div",{className:"flex gap-1",children:(0,qr.jsx)(h,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:s=>{s.stopPropagation(),o?.(c)},children:(0,qr.jsx)(bt.Trash2,{className:"h-4 w-4"})})})]})]},c.name))})]})}function za({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:i,compactView:r=!1,className:c}){let[s,m]=(0,At.useState)(e),[n,l]=(0,At.useState)(""),[u,g]=(0,At.useState)("all"),[v,S]=(0,At.useState)("all");(0,At.useEffect)(()=>{m(e)},[e]);let y=Array.from(new Set(s.map(T=>T.mimeType))),f=s.filter(T=>{let R=T.name.toLowerCase().includes(n.toLowerCase()),E=u==="all"||T.mimeType===u;return R&&E}),k=f.slice(0,10),I=f.filter(Boolean),_=()=>{t?.()},Q=T=>{a?.(T)},w=T=>{console.log("deleting file",T),m(R=>R.filter(E=>E.name!==T.name)),o?.(T.id)},H=T=>{i?.(T)},se=()=>{l(""),g("all")};return(0,qr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,qr.jsx)(Ko.AnimatePresence,{mode:"wait",children:(0,qr.jsx)(Ko.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,qr.jsxs)("div",{className:`space-y-6 ${c||""}`,children:[(0,qr.jsx)(Qe,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:_},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,qr.jsx)(O,{children:(0,qr.jsx)(le,{className:"pt-6",children:(0,qr.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,qr.jsx)("div",{className:"flex-1",children:(0,qr.jsxs)("div",{className:"relative",children:[(0,qr.jsx)(bt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,qr.jsx)(L,{placeholder:"Search files...",value:n,onChange:T=>l(T.target.value),className:"pl-9"})]})}),(n||u!=="all")&&(0,qr.jsxs)(h,{variant:"outline",onClick:se,className:"gap-2",children:[(0,qr.jsx)(bt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsx)(no,{activeTab:v,onTabChange:S,tabOptions:[{value:"all",label:`All Files (${f.length})`},{value:"recent",label:`Recent (${k.length})`}],maxWidth:"500px",gridCols:3}),v==="all"&&(0,qr.jsx)(vo,{files:f,onFileClick:H,onFileEdit:Q,onFileDelete:w,showHeader:!r}),v==="recent"&&(0,qr.jsx)(vo,{files:k,onFileClick:H,onFileEdit:Q,onFileDelete:w,showHeader:!r}),v==="shared"&&(0,qr.jsx)(vo,{files:I,onFileClick:H,onFileEdit:Q,onFileDelete:w,showHeader:!r})]}),f.length===0&&(0,qr.jsx)(O,{children:(0,qr.jsx)(le,{className:"pt-6",children:(0,qr.jsxs)("div",{className:"text-center py-8",children:[(0,qr.jsx)(bt.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,qr.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,qr.jsx)("qr",{className:"text-muted-foreground mb-4",children:n||u!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,qr.jsxs)(h,{onClick:_,className:"gap-2",children:[(0,qr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}function Ni({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:i=[]}){let[r,c]=(0,At.useState)({...e,updatedAt:new Date}),s=()=>{let y=new Set,f=new Set;return i.forEach(k=>{k.menuConfig.groupBy.forEach(I=>y.add(I))}),o.forEach(k=>{k.metadata&&Object.keys(k.metadata).forEach(I=>f.add(I))}),{contextKeys:Array.from(y).sort(),documentKeys:Array.from(f).sort(),allKeys:Array.from(new Set([...y,...f])).sort()}},m=y=>{let f=new Set;return o.forEach(k=>{k.metadata?.[y]&&f.add(String(k.metadata[y]))}),Array.from(f).sort()},n=s(),l=()=>{t(r)},u=(y,f)=>{c(k=>({...k,metadata:{...k.metadata,[y]:f}}))},g=(y,f)=>{f==="__custom__"?u(y,""):u(y,f)},v=()=>{let y=`field_${Date.now()}`;u(y,"")},S=y=>{c(f=>{let k={...f.metadata};return delete k[y],{...f,metadata:k}})};return(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,qr.jsxs)("div",{className:"border-b border-border bg-card qr-8",children:[(0,qr.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-3",children:[(0,qr.jsx)("div",{className:"flex-shrink-0 qr-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,qr.jsx)(bt.Edit3,{className:"h-6 w-6 text-primary"})}),(0,qr.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,qr.jsxs)("div",{className:"flex gap-2",children:[(0,qr.jsxs)(h,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,qr.jsx)(bt.qr,{className:"h-4 w-4"}),"Cancel"]}),(0,qr.jsxs)(h,{size:"sm",onClick:l,className:"gap-2",children:[(0,qr.jsx)(bt.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,qr.jsx)(L,{value:r.title,onChange:y=>c(f=>({...f,title:y.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,qr.jsx)(Ne,{value:r.description||"",onChange:y=>c(f=>({...f,description:y.target.value})),placeholder:"Document description...",rows:2})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),n.contextKeys.length>0&&(0,qr.jsxs)("qr",{className:"text-Ko text-muted-foreground",children:["Suggested: ",n.contextKeys.slice(0,4).join(", "),n.contextKeys.length>4&&` +${n.contextKeys.length-4}`]})]}),(0,qr.jsxs)(h,{type:"button",variant:"outline",size:"sm",onClick:v,className:"gap-1 h-8",children:[(0,qr.jsx)(bt.Plus,{className:"h-3 w-3"}),"Add"]})]}),r.metadata&&Object.keys(r.metadata).length>0?(0,qr.jsx)("div",{className:"space-y-2",children:Object.entries(r.metadata).map(([y,f])=>{let k=m(y);return(0,qr.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,qr.jsx)(L,{value:y,onChange:I=>{let _=I.target.value,Q=r.metadata?.[y];c(w=>{let H={...w.metadata};return delete H[y],_&&(H[_]=Q||""),{...w,metadata:H}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${y}`}),(0,qr.jsx)("datalist",{id:`metadata-keys-${y}`,children:n.allKeys.map(I=>(0,qr.jsx)("option",{value:I},I))}),(0,qr.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),k.length>0?(0,qr.jsxs)(ke,{value:String(f||""),onValueChange:I=>g(y,I),children:[(0,qr.jsx)(Ce,{className:"flex-1 h-8 text-sm",children:(0,qr.jsx)(Fe,{placeholder:"Value"})}),(0,qr.jsxs)(Se,{children:[k.map(I=>(0,qr.jsx)(U,{value:I,children:I},I)),(0,qr.jsx)(U,{value:"__custom__",children:(0,qr.jsx)("span",{className:"text-muted-foreground text-Ko",children:"Custom..."})})]})]}):(0,qr.jsx)(L,{value:String(f||""),onChange:I=>u(y,I.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,qr.jsx)(h,{type:"button",variant:"ghost",size:"sm",onClick:()=>S(y),className:"h-8 w-8 qr-0 text-muted-foreground hover:text-destructive",children:(0,qr.jsx)(bt.qr,{className:"h-3 w-3"})})]},y)})}):(0,qr.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,qr.jsx)("qr",{className:"text-Ko text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,qr.jsx)(Z,{variant:"secondary",className:"font-mono",children:r.format.toUpperCase()})]})]})]}),(0,qr.jsx)("div",{className:"flex-1 overflow-auto",children:(0,qr.jsxs)("div",{className:"qr-8",children:[(0,qr.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,qr.jsx)(Ne,{value:r.content||"",onChange:y=>c(f=>({...f,content:y.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var ki=e=>(0,qr.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),Ci=e=>(0,qr.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),_n=e=>(0,qr.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,qr.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg qr-4 mb-4",children:(0,qr.jsxs)("qr",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,qr.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,qr.jsx)("pre",{className:"text-sm",children:e})]}),Gn=e=>(0,qr.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,qr.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg qr-4 mb-4",children:(0,qr.jsxs)("qr",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,qr.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),ki(e)]});function Pi({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:i=[],knowledgeContexts:r=[]}){let[c,s]=(0,At.useState)(!1),m=v=>{switch(v){case"markdown":case"mdx":return(0,qr.jsx)(bt.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,qr.jsx)(bt.File,{className:"h-6 w-6 text-success"});case"text":return(0,qr.jsx)(bt.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,qr.jsx)(bt.File,{className:"h-6 w-6 text-muted-foreground"})}},n=v=>{switch(v){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},l=(v,S)=>{let y={markdown:ki,mdx:Gn,richtext:_n,text:Ci},f=o?.[S]||y[S];return f?f(v):Ci(v)},u=v=>{s(!1),t?.(v)},g=()=>{s(!1)};return c?(0,qr.jsx)(Ni,{document:e,onSave:u,onCancel:g,availableDocuments:i,knowledgeContexts:r}):(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,qr.jsxs)("div",{className:"border-b border-border bg-card qr-8",children:[(0,qr.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,qr.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,qr.jsx)("div",{className:"flex-shrink-0 qr-3 rounded-xl bg-muted border border-border",children:m(e.format)}),(0,qr.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qr.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,qr.jsx)("qr",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,qr.jsx)("div",{className:"flex-shrink-0",children:(0,qr.jsxs)(h,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,qr.jsx)(bt.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,qr.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,qr.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${n(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(v=>(0,qr.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",v]},v))]})]}),(0,qr.jsx)("div",{className:"flex-1 overflow-auto",children:(0,qr.jsxs)("div",{className:"qr-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,qr.jsxs)("div",{className:"mb-6",children:[(0,qr.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,qr.jsx)("div",{className:"bg-muted rounded-lg qr-3 border border-border",children:(0,qr.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-Ko",children:Object.entries(e.metadata).map(([v,S])=>(0,qr.jsxs)("div",{className:"flex gap-1",children:[(0,qr.jsxs)("span",{className:"text-muted-foreground font-medium",children:[v.replace(/([qr-Z])/g," $1").trim(),":"]}),(0,qr.jsx)("span",{className:"text-foreground truncate",children:String(S)})]},v))})})]}),(0,qr.jsx)("div",{className:"space-y-4",children:e.content?(0,qr.jsx)("div",{className:"relative",children:(0,qr.jsx)("div",{className:"bg-card border border-border rounded-xl qr-6 overflow-hidden",children:l(e.content,e.format)})}):(0,qr.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,qr.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,qr.jsx)(bt.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,qr.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,qr.jsx)("qr",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Ti({label:e,documents:t,children:a,level:o,onDocumentClick:i,selectedDocumentId:r,showDocumentCount:c=!0}){let[s,m]=(0,At.useState)(o===0),n=a&&Object.keys(a).length>0,l=t.length+(a?Object.values(a).reduce((v,S)=>v+S.documents.length,0):0),u=v=>{switch(v){case"markdown":case"mdx":return(0,qr.jsx)(bt.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,qr.jsx)(bt.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,qr.jsx)(bt.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},g=v=>{let S=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return S[v%S.length]};return(0,qr.jsxs)("div",{className:"space-y-1",children:[(n||t.length>0)&&(0,qr.jsxs)(Ko.motion.div,{className:`group flex items-center gap-3 qr-3 rounded-xl cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>m(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,qr.jsx)("div",{className:`w-1 h-6 rounded-full ${g(o)}`}),(0,qr.jsx)(Ko.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,qr.jsx)(bt.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,qr.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,qr.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,qr.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),c&&l>0&&(0,qr.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,qr.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-Ko font-medium bg-muted text-muted-foreground rounded-full",children:l})})]})]}),(0,qr.jsx)(Ko.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,qr.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((v,S)=>(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:S*.05,duration:.2},className:`group flex items-center gap-3 qr-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${r===v.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>i?.(v),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,qr.jsx)("div",{className:"flex-shrink-0",children:u(v.format)}),(0,qr.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,qr.jsx)("qr",{className:`text-sm truncate transition-colors ${r===v.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:v.title}),v.description&&(0,qr.jsx)("qr",{className:"text-Ko text-muted-foreground truncate qr-0.5",children:v.description})]}),v.tags&&v.tags.length>0&&(0,qr.jsx)("div",{className:"flex-shrink-0",children:(0,qr.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-Ko font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:v.tags[0]})})]},v.id)),a&&Object.entries(a).map(([v,S])=>(0,qr.jsx)(Ti,{label:v,documents:S.documents,children:S.children,level:o+1,onDocumentClick:i,selectedDocumentId:r,showDocumentCount:c},v))]})})]})}function Ri({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:i,selectedDocumentId:r,className:c,editable:s=!0}){let[m,n]=(0,At.useState)(""),[l,u]=(0,At.useState)(null),g=(0,At.useMemo)(()=>m?e.filter(y=>y.title.toLowerCase().includes(m.toLowerCase())||y.description?.toLowerCase().includes(m.toLowerCase())||y.tags?.some(f=>f.toLowerCase().includes(m.toLowerCase()))||Object.values(y.metadata||{}).some(f=>String(f).toLowerCase().includes(m.toLowerCase()))):e,[e,m]),v=(0,At.useMemo)(()=>{let y=(f,k)=>{if(k.length===0)return{};let[I,..._]=k;return f.reduce((w,H)=>{let se=H.metadata?.[I]||"Uncategorized",T=String(se);if(w[T]||(w[T]={documents:[],children:{}}),_.length===0)w[T].documents.push(H);else{let R=y([H],_),E=Object.keys(R)[0];E&&(w[T].children||(w[T].children={}),w[T].children[E]?w[T].children[E].documents.push(...R[E].documents):w[T].children[E]=R[E])}return w},{})};return y(g,t.groupBy)},[g,t.groupBy]),S=y=>{u(y),a?.(y)};return(0,qr.jsxs)("div",{className:`flex h-full ${c||""}`,children:[(0,qr.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,qr.jsx)("div",{className:"qr-6 border-b border-border",children:(0,qr.jsxs)("div",{className:"relative",children:[(0,qr.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,qr.jsx)(bt.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,qr.jsx)(L,{placeholder:"Search knowledge base...",value:m,onChange:y=>n(y.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,qr.jsx)(Ba,{className:"h-[calc(100%-100px)]",children:(0,qr.jsxs)("div",{className:"qr-4 space-y-3",children:[Object.entries(v).map(([y,f])=>(0,qr.jsx)(Ti,{label:y,documents:f.documents,children:f.children,level:0,onDocumentClick:S,selectedDocumentId:r,showDocumentCount:t.showDocumentCount},y)),Object.keys(v).length===0&&(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,qr.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,qr.jsx)(bt.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,qr.jsx)("qr",{className:"text-sm font-medium",children:"No documents found"}),(0,qr.jsx)("qr",{className:"text-Ko qr-1",children:"Try adjusting your search terms"})]})]})})]}),(0,qr.jsx)("div",{className:"flex-1 bg-background",children:l?(0,qr.jsx)(Pi,{document:l,onDocumentUpdate:i,editable:s}):(0,qr.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,qr.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,qr.jsx)(bt.FileText,{className:"h-10 w-10 text-primary"})}),(0,qr.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,qr.jsx)("qr",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Xo({documents:e=[],contexts:t=[],onDocumentClick:a=c=>console.log("Document clicked:",c),onDocumentShare:o=c=>console.log("Share document:",c),onLoadDocumentContent:i,selectedDocumentId:r}){let[c,s]=(0,At.useState)(t[0]);return!t||t.length===0?(0,qr.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,qr.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,qr.jsx)(Qe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,qr.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,qr.jsx)("qr",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,qr.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,qr.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,qr.jsx)(Qe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,qr.jsxs)("div",{className:"qr-6",children:[(0,qr.jsx)("div",{className:"border-b border-border",children:(0,qr.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(m=>(0,qr.jsxs)("button",{onClick:()=>s(m),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${c.id===m.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[m.icon,m.label]},m.id))})}),c.description&&(0,qr.jsx)("div",{className:"qr-3 px-1",children:(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground",children:c.description})})]})]}),(0,qr.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,qr.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,qr.jsx)(Ri,{documents:e,menuConfig:c.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:r})})})]})}var me=be(require("react"));var Ai=(e=768)=>{let[t,a]=(0,At.useState)(!1);return(0,At.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Ii=be(require("react")),Jo=be(require("@radix-ui/react-separator"));var Yo=Ii.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},i)=>(0,qr.jsx)(Jo.Root,{ref:i,decorative:a,orientation:t,className:b("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Yo.displayName=Jo.Root.displayName;var Ha=be(require("react")),at=be(require("@radix-ui/react-dialog"));var Li=at.Root;var Wn=at.Portal,ji=Ha.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(at.Overlay,{className:b("fixed inset-0 qr-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));ji.displayName=at.Overlay.displayName;var qn=(0,Gr.cva)("fixed qr-50 gap-4 bg-background qr-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Zo=Ha.forwardRef(({side:e="right",className:t,children:a,...o},i)=>(0,qr.jsxs)(Wn,{children:[(0,qr.jsx)(ji,{}),(0,qr.jsxs)(at.Content,{ref:i,className:b(qn({side:e}),t),...o,children:[(0,qr.jsxs)(at.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,qr.jsx)(ya.Cross2Icon,{className:"h-4 w-4"}),(0,qr.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));Zo.displayName=at.Content.displayName;var Xn=({className:e,...t})=>(0,qr.jsx)("div",{className:b("flex flex-col space-y-2 text-center sm:text-left",e),...t});Xn.displayName="SheetHeader";var Jn=({className:e,...t})=>(0,qr.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Jn.displayName="SheetFooter";var Yn=Ha.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(at.Title,{ref:a,className:b("text-lg font-semibold text-foreground",e),...t}));Yn.displayName=at.Title.displayName;var Zn=Ha.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(at.Description,{ref:a,className:b("text-sm text-muted-foreground",e),...t}));Zn.displayName=at.Description.displayName;function Qo({className:e,...t}){return(0,qr.jsx)("div",{className:b("animate-pulse rounded-md bg-primary/10",e),...t})}var zi=be(require("react")),Mt=be(require("@radix-ui/react-tooltip"));var Hi=Mt.Provider,Vi=Mt.Root,Ui=Mt.Trigger,tr=zi.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,qr.jsx)(Mt.Portal,{children:(0,qr.jsx)(Mt.Content,{ref:o,sideOffset:t,className:b("qr-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-Ko text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));tr.displayName=Mt.Content.displayName;var Qn="sidebar:state",el=60*60*24*7,tl="16rem",al="18rem",ol="3rem",rl="b",_i=me.createContext(null);function xo(){let e=me.useContext(_i);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var ar=me.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:r,...c},s)=>{let m=Ai(),[n,l]=me.useState(!1),[u,g]=me.useState(e),v=t??u,S=me.useCallback(I=>{if(a)return a?.(typeof I=="function"?I(v):I);g(I),document.cookie=`${Qn}=${v}; path=/; max-age=${el}`},[a,v]),y=me.useCallback(()=>m?l(I=>!I):S(I=>!I),[m,S,l]);me.useEffect(()=>{let I=_=>{_.key===rl&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),y())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[y]);let f=v?"expanded":"collapsed",k=me.useMemo(()=>({state:f,open:v,setOpen:S,isMobile:m,openMobile:n,setOpenMobile:l,toggleSidebar:y}),[f,v,S,m,n,l,y]);return(0,qr.jsx)(_i.Provider,{value:k,children:(0,qr.jsx)(Hi,{delayDuration:0,children:(0,qr.jsx)("div",{style:{"--sidebar-width":tl,"--sidebar-width-icon":ol,...i},className:b("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:s,...c,children:r})})})});ar.displayName="SidebarProvider";var il=me.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...r},c)=>{let{isMobile:s,state:m,openMobile:n,setOpenMobile:l}=xo();return a==="none"?(0,qr.jsx)("div",{className:b("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:c,...r,children:i}):s?(0,qr.jsx)(Li,{open:n,onOpenChange:l,...r,children:(0,qr.jsx)(Zo,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar qr-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":al},side:e,children:(0,qr.jsx)("div",{className:"flex h-full w-full flex-col",children:i})})}):(0,qr.jsxs)("div",{ref:c,className:"group peer hidden md:block text-sidebar-foreground","data-state":m,"data-collapsible":m==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,qr.jsx)("div",{className:b("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,qr.jsx)("div",{className:b("duration-200 fixed top-14 bottom-0 qr-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"qr-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...r,children:(0,qr.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:i})})]})});il.displayName="Sidebar";var sl=me.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:i}=xo();return(0,qr.jsxs)(h,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:b("h-7 w-7",e),onClick:r=>{t?.(r),i()},...a,children:[(0,qr.jsx)($i.PanelLeft,{}),(0,qr.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});sl.displayName="SidebarTrigger";var nl=me.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=xo();return(0,qr.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:b("absolute inset-y-0 qr-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});nl.displayName="SidebarRail";var ll=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("main",{ref:a,className:b("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));ll.displayName="SidebarInset";var dl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(L,{ref:a,"data-sidebar":"input",className:b("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));dl.displayName="SidebarInput";var cl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,"data-sidebar":"header",className:b("flex flex-col gap-2 qr-2",e),...t}));cl.displayName="SidebarHeader";var ml=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,"data-sidebar":"footer",className:b("flex flex-col gap-2 qr-2",e),...t}));ml.displayName="SidebarFooter";var pl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(Yo,{ref:a,"data-sidebar":"separator",className:b("mx-2 w-auto bg-sidebar-border",e),...t}));pl.displayName="SidebarSeparator";var ul=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,"data-sidebar":"content",className:b("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ul.displayName="SidebarContent";var gl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,"data-sidebar":"group",className:b("relative flex w-full min-w-0 flex-col qr-2",e),...t}));gl.displayName="SidebarGroup";var fl=me.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,qr.jsx)(t?_r.Slot:"div",{ref:o,"data-sidebar":"group-label",className:b("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-Ko font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-qr-8 group-data-[collapsible=icon]:opacity-0",e),...a}));fl.displayName="SidebarGroupLabel";var vl=me.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,qr.jsx)(t?_r.Slot:"button",{ref:o,"data-sidebar":"group-action",className:b("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md qr-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));vl.displayName="SidebarGroupAction";var bl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,"data-sidebar":"group-content",className:b("w-full text-sm",e),...t}));bl.displayName="SidebarGroupContent";var hl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("ul",{ref:a,"data-sidebar":"menu",className:b("flex w-full min-w-0 flex-col gap-1",e),...t}));hl.displayName="SidebarMenu";var xl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("qr",{ref:a,"data-sidebar":"menu-item",className:b("group/menu-item relative",e),...t}));xl.displayName="SidebarMenuItem";var yl=(0,Gr.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md qr-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!qr-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-Ko",lg:"h-12 text-sm group-data-[collapsible=icon]:!qr-0"}},defaultVariants:{variant:"default",size:"default"}}),wl=me.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:i,className:r,...c},s)=>{let m=e?_r.Slot:"button",{isMobile:n,state:l}=xo(),u=(0,qr.jsx)(m,{ref:s,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:b(yl({variant:a,size:o}),r),...c});return i?(typeof i=="string"&&(i={children:i}),(0,qr.jsxs)(Vi,{children:[(0,qr.jsx)(Ui,{asChild:!0,children:u}),(0,qr.jsx)(tr,{side:"right",align:"center",hidden:l!=="collapsed"||n,...i})]})):u});wl.displayName="SidebarMenuButton";var Nl=me.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},i)=>(0,qr.jsx)(t?_r.Slot:"button",{ref:i,"data-sidebar":"menu-action",className:b("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md qr-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));Nl.displayName="SidebarMenuAction";var Cl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:b("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-Ko font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Cl.displayName="SidebarMenuBadge";var Sl=me.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let i=me.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,qr.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:b("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,qr.jsx)(Qo,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,qr.jsx)(Qo,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});Sl.displayName="SidebarMenuSkeleton";var Dl=me.forwardRef(({className:e,...t},a)=>(0,qr.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:b("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Dl.displayName="SidebarMenuSub";var kl=me.forwardRef(({...e},t)=>(0,qr.jsx)("qr",{ref:t,...e}));kl.displayName="SidebarMenuSubItem";var Pl=me.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...i},r)=>(0,qr.jsx)(e?_r.Slot:"a",{ref:r,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:b("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-Ko",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...i}));Pl.displayName="SidebarMenuSubButton";var Gi=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:i,onDeleteProject:r,onAddProject:c,onUpdateEpic:s,onDeleteEpic:m,onAddEpic:n,onAddSprint:l,onUpdateSprint:u,onDeleteSprint:g,onViewChange:v,mobileMenuOpen:S,onToggleMobileMenu:y})=>{let[f,k]=(0,At.useState)(null),[I,_]=(0,At.useState)(null),[Q,w]=(0,At.useState)(null),[H,se]=(0,At.useState)(null),[T,R]=(0,At.useState)({name:"",description:""}),[E,pe]=(0,At.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[M,ze]=(0,At.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[Ie,We]=(0,At.useState)(!1),[D,ue]=(0,At.useState)(!1),[Re,rt]=(0,At.useState)({name:"",description:""}),[Me,De]=(0,At.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),ct=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],yt=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],it=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],wt=N=>{_(N.id),R({name:N.name,description:N.description||""})},q=()=>{I&&T.name.trim()&&(i(I,{name:T.name.trim(),description:T.description.trim()}),_(null))},x=()=>{_(null),R({name:"",description:""})},ve=()=>{Re.name.trim()&&(c({name:Re.name.trim(),description:Re.description.trim(),isSelected:!1}),rt({name:"",description:""}),We(!1))},ie=N=>{i(N,{isSelected:!0})},ft=N=>{w(N.id),pe({name:N.name,description:N.description||"",color:N.color,confidence:N.confidence,phase:N.phase,startDate:N.startDate.toISOString().split("T")[0],endDate:N.endDate.toISOString().split("T")[0],progress:N.progress})},Ot=()=>{Q&&E.name.trim()&&(s(Q,{name:E.name.trim(),description:E.description.trim(),color:E.color,confidence:E.confidence,phase:E.phase,startDate:new Date(E.startDate),endDate:new Date(E.endDate),progress:E.progress}),w(null))},Rt=()=>{w(null),pe({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},Bo=N=>{se(N.id),ze({name:N.name,description:N.description||"",startDate:N.startDate.toISOString().split("T")[0],endDate:N.endDate.toISOString().split("T")[0],isActive:N.isActive})},Lo=()=>{H&&M.name.trim()&&(u(H,{name:M.name.trim(),description:M.description.trim(),startDate:new Date(M.startDate),endDate:new Date(M.endDate),isActive:M.isActive}),se(null))},Ja=()=>{se(null),ze({name:"",description:"",startDate:"",endDate:"",isActive:!1})},jo=()=>{Me.name.trim()&&(l({name:Me.name.trim(),description:Me.description.trim(),startDate:new Date(Me.startDate),endDate:new Date(Me.endDate),isActive:Me.isActive,isSelected:!1}),De({name:"",description:"",startDate:"",endDate:"",isActive:!1}),ue(!1))},Ya=N=>{u(N,{isSelected:!0})},Za=N=>N.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Ea=N=>{let B=yt.find(we=>we.value===N);return B?{label:B.label,color:B.color}:{label:"Medium",color:"text-warning"}},Qa=N=>{let B=it.find(we=>we.value===N);return B?{label:B.label,color:B.color}:{label:"Phase 1",color:"text-primary"}};return(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col qr-50 flex-shrink-0 transition-transform duration-300 group ${S?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,qr.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,qr.jsxs)("button",{onClick:()=>{v("kanban"),k(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 qr-50`,title:"Kanban View",children:[(0,qr.jsx)(bt.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,qr.jsx)("span",{className:"text-Ko font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,qr.jsxs)("button",{onClick:()=>{v("planning"),k(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[(0,qr.jsx)(bt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,qr.jsx)("span",{className:"text-Ko font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,qr.jsxs)("button",{onClick:()=>k(f==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${f==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[(0,qr.jsx)(bt.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,qr.jsx)("span",{className:"text-Ko font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,qr.jsxs)("button",{onClick:()=>{v("epics"),k(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,qr.jsx)(bt.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,qr.jsx)("span",{className:"text-Ko font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,qr.jsxs)("button",{onClick:()=>k(f==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${f==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[(0,qr.jsx)(bt.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,qr.jsx)("span",{className:"text-Ko font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,qr.jsxs)("button",{onClick:()=>{v("files"),k(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,qr.jsx)(bt.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,qr.jsx)("span",{className:"text-Ko font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,qr.jsxs)("button",{onClick:()=>{v("tasks"),k(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[(0,qr.jsx)(bt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,qr.jsx)("span",{className:"text-Ko font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),S&&(0,qr.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm qr-20",onClick:y}),f&&(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm qr-40",onClick:()=>k(null)}),(0,qr.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg qr-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,qr.jsxs)("div",{className:"qr-3 md:qr-4 border-b flex items-center justify-between",children:[(0,qr.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[f==="projects"&&"Projects",f==="epics"&&"Manage Epics",f==="sprints"&&"Manage Sprints",f==="files"&&"Files"]}),(0,qr.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>k(null),children:(0,qr.jsx)(bt.qr,{className:"h-4 w-4"})})]}),(0,qr.jsxs)("div",{className:"qr-3 md:qr-4 space-y-4 h-full overflow-y-auto",children:[f==="projects"&&(0,qr.jsx)(O,{className:"qr-3",children:(0,qr.jsxs)("div",{className:"space-y-3",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qr.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,qr.jsxs)(h,{size:"sm",onClick:()=>We(!0),className:"gap-1",children:[(0,qr.jsx)(bt.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),Ie&&(0,qr.jsxs)("div",{className:"border rounded-lg qr-2 space-y-2",children:[(0,qr.jsx)(L,{value:Re.name,onChange:N=>rt(B=>({...B,name:N.target.value})),placeholder:"Project name",className:"text-sm"}),(0,qr.jsx)(Ne,{value:Re.description,onChange:N=>rt(B=>({...B,description:N.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,qr.jsxs)("div",{className:"flex gap-1",children:[(0,qr.jsx)(h,{size:"sm",onClick:ve,className:"text-Ko h-6",children:"Save"}),(0,qr.jsx)(h,{size:"sm",variant:"outline",onClick:()=>We(!1),className:"text-Ko h-6",children:"Cancel"})]})]}),(0,qr.jsx)("div",{className:"space-y-2",children:e.map(N=>(0,qr.jsx)("div",{className:"border rounded qr-2",children:I===N.id?(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(L,{value:T.name,onChange:B=>R(we=>({...we,name:B.target.value})),placeholder:"Project name",className:"text-sm"}),(0,qr.jsx)(Ne,{value:T.description,onChange:B=>R(we=>({...we,description:B.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,qr.jsxs)("div",{className:"flex gap-1",children:[(0,qr.jsx)(h,{size:"sm",onClick:q,className:"text-Ko h-6",children:"Save"}),(0,qr.jsx)(h,{size:"sm",variant:"outline",onClick:x,className:"text-Ko h-6",children:"Cancel"})]})]}):(0,qr.jsxs)("div",{className:`cursor-pointer qr-1 rounded transition-colors ${N.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>ie(N.id),children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,qr.jsx)(bt.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,qr.jsx)("span",{className:"font-medium text-Ko",children:N.name})]}),N.description&&(0,qr.jsx)("qr",{className:"text-Ko text-muted-foreground mb-1",children:N.description}),(0,qr.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>wt(N),className:"h-5 px-1",children:(0,qr.jsx)(bt.Edit2,{className:"h-3 w-3"})}),(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>r(N.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,qr.jsx)(bt.Trash2,{className:"h-3 w-3"})})]})]})},N.id))})]})}),f==="epics"&&(0,qr.jsx)(O,{className:"qr-3",children:(0,qr.jsxs)("div",{className:"space-y-3",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qr.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,qr.jsxs)(h,{size:"sm",onClick:n,className:"gap-1",children:[(0,qr.jsx)(bt.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,qr.jsx)("div",{className:"space-y-4",children:t.map(N=>(0,qr.jsx)("div",{className:"border rounded-lg qr-3",children:Q===N.id?(0,qr.jsxs)("div",{className:"space-y-3",children:[(0,qr.jsx)(L,{value:E.name,onChange:B=>pe(we=>({...we,name:B.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,qr.jsx)(Ne,{value:E.description,onChange:B=>pe(we=>({...we,description:B.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)("label",{className:"text-Ko font-medium",children:"Color"}),(0,qr.jsx)("div",{className:"flex gap-1 flex-wrap",children:ct.map(B=>(0,qr.jsx)("button",{onClick:()=>pe(we=>({...we,color:B})),className:`w-6 h-6 rounded-full ${B} ${E.color===B?"ring-2 ring-ring":""}`},B))})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,qr.jsxs)("div",{className:"space-y-1",children:[(0,qr.jsx)("label",{className:"text-Ko font-medium",children:"Confidence"}),(0,qr.jsxs)(ke,{value:E.confidence,onValueChange:B=>pe(we=>({...we,confidence:B})),children:[(0,qr.jsx)(Ce,{className:"h-8 text-Ko",children:(0,qr.jsx)(Fe,{})}),(0,qr.jsx)(Se,{children:yt.map(B=>(0,qr.jsx)(U,{value:B.value,children:(0,qr.jsx)("span",{className:B.color,children:B.label})},B.value))})]})]}),(0,qr.jsxs)("div",{className:"space-y-1",children:[(0,qr.jsx)("label",{className:"text-Ko font-medium",children:"Phase"}),(0,qr.jsxs)(ke,{value:E.phase.toString(),onValueChange:B=>pe(we=>({...we,phase:parseInt(B)})),children:[(0,qr.jsx)(Ce,{className:"h-8 text-Ko",children:(0,qr.jsx)(Fe,{})}),(0,qr.jsx)(Se,{children:it.map(B=>(0,qr.jsx)(U,{value:B.value.toString(),children:(0,qr.jsx)("span",{className:B.color,children:B.label})},B.value))})]})]})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,qr.jsxs)("div",{className:"space-y-1",children:[(0,qr.jsx)("label",{className:"text-Ko font-medium",children:"Start Date"}),(0,qr.jsx)(L,{type:"date",value:E.startDate,onChange:B=>pe(we=>({...we,startDate:B.target.value})),className:"text-Ko h-8"})]}),(0,qr.jsxs)("div",{className:"space-y-1",children:[(0,qr.jsx)("label",{className:"text-Ko font-medium",children:"End Date"}),(0,qr.jsx)(L,{type:"date",value:E.endDate,onChange:B=>pe(we=>({...we,endDate:B.target.value})),className:"text-Ko h-8"})]})]}),(0,qr.jsxs)("div",{className:"space-y-1",children:[(0,qr.jsx)("label",{className:"text-Ko font-medium",children:"Progress (%)"}),(0,qr.jsx)(L,{type:"number",min:"0",max:"100",value:E.progress,onChange:B=>pe(we=>({...we,progress:parseInt(B.target.value)||0})),className:"text-Ko h-8"})]}),(0,qr.jsxs)("div",{className:"flex gap-2",children:[(0,qr.jsx)(h,{size:"sm",onClick:Ot,className:"text-Ko",children:"Save"}),(0,qr.jsx)(h,{size:"sm",variant:"outline",onClick:Rt,className:"text-Ko",children:"Cancel"})]})]}):(0,qr.jsxs)("div",{className:`cursor-pointer qr-2 rounded transition-colors ${N.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>s(N.id,{isSelected:!N.isSelected}),children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,qr.jsx)("div",{className:`w-3 h-3 rounded-full ${N.color}`}),(0,qr.jsx)("span",{className:"font-medium text-sm",children:N.name})]}),N.description&&(0,qr.jsx)("qr",{className:"text-Ko text-muted-foreground mb-2",children:N.description}),(0,qr.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between text-Ko",children:[(0,qr.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,qr.jsx)("span",{className:Ea(N.confidence).color,children:Ea(N.confidence).label})]}),(0,qr.jsxs)("div",{className:"flex items-center justify-between text-Ko",children:[(0,qr.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,qr.jsx)("span",{className:Qa(N.phase).color,children:Qa(N.phase).label})]}),(0,qr.jsxs)("div",{className:"flex items-center justify-between text-Ko",children:[(0,qr.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,qr.jsxs)("span",{className:"text-foreground",children:[Za(N.startDate)," - ",Za(N.endDate)]})]}),(0,qr.jsxs)("div",{className:"flex items-center justify-between text-Ko",children:[(0,qr.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,qr.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${N.progress}%`}})}),(0,qr.jsxs)("span",{className:"text-foreground",children:[N.progress,"%"]})]})]})]}),(0,qr.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>ft(N),className:"h-6 px-2",children:(0,qr.jsx)(bt.Edit2,{className:"h-3 w-3"})}),(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>m(N.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,qr.jsx)(bt.Trash2,{className:"h-3 w-3"})})]})]})},N.id))})]})}),f==="sprints"&&(0,qr.jsx)(O,{className:"qr-3",children:(0,qr.jsxs)("div",{className:"space-y-3",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qr.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,qr.jsxs)(h,{size:"sm",onClick:()=>ue(!0),className:"gap-1",children:[(0,qr.jsx)(bt.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),D&&(0,qr.jsxs)("div",{className:"border rounded-lg qr-2 space-y-2",children:[(0,qr.jsx)(L,{value:Me.name,onChange:N=>De(B=>({...B,name:N.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,qr.jsx)(L,{type:"date",value:Me.startDate,onChange:N=>De(B=>({...B,startDate:N.target.value})),className:"text-Ko"}),(0,qr.jsx)(L,{type:"date",value:Me.endDate,onChange:N=>De(B=>({...B,endDate:N.target.value})),className:"text-Ko"})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)("input",{type:"checkbox",checked:Me.isActive,onChange:N=>De(B=>({...B,isActive:N.target.checked})),className:"w-3 h-3"}),(0,qr.jsx)("span",{className:"text-Ko",children:"Active"})]}),(0,qr.jsxs)("div",{className:"flex gap-1",children:[(0,qr.jsx)(h,{size:"sm",onClick:jo,className:"text-Ko h-6",children:"Save"}),(0,qr.jsx)(h,{size:"sm",variant:"outline",onClick:()=>ue(!1),className:"text-Ko h-6",children:"Cancel"})]})]}),(0,qr.jsx)("div",{className:"space-y-2",children:a.map(N=>(0,qr.jsx)("div",{className:"border rounded qr-2",children:H===N.id?(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(L,{value:M.name,onChange:B=>ze(we=>({...we,name:B.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:N.id==="backlog"||N.id==="all-tasks"}),N.id!=="backlog"&&N.id!=="all-tasks"&&(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,qr.jsx)(L,{type:"date",value:M.startDate,onChange:B=>ze(we=>({...we,startDate:B.target.value})),className:"text-Ko"}),(0,qr.jsx)(L,{type:"date",value:M.endDate,onChange:B=>ze(we=>({...we,endDate:B.target.value})),className:"text-Ko"})]}),(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)("input",{type:"checkbox",checked:M.isActive,onChange:B=>ze(we=>({...we,isActive:B.target.checked})),className:"w-3 h-3"}),(0,qr.jsx)("span",{className:"text-Ko",children:"Active"})]})]}),(0,qr.jsxs)("div",{className:"flex gap-1",children:[(0,qr.jsx)(h,{size:"sm",onClick:Lo,className:"text-Ko h-6",children:"Save"}),(0,qr.jsx)(h,{size:"sm",variant:"outline",onClick:Ja,className:"text-Ko h-6",children:"Cancel"})]})]}):(0,qr.jsxs)("div",{className:`cursor-pointer qr-1 rounded transition-colors ${N.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>Ya(N.id),children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,qr.jsx)(bt.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,qr.jsx)("span",{className:"font-medium text-Ko",children:N.name}),N.isActive&&(0,qr.jsx)("span",{className:"text-Ko bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(N.id==="backlog"||N.id==="all-tasks")&&(0,qr.jsx)("span",{className:"text-Ko bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),N.id!=="backlog"&&N.id!=="all-tasks"&&(0,qr.jsxs)("qr",{className:"text-Ko text-muted-foreground mb-1",children:[N.startDate.toLocaleDateString()," - ",N.endDate.toLocaleDateString()]}),(0,qr.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>Bo(N),className:"h-5 px-1",children:(0,qr.jsx)(bt.Edit2,{className:"h-3 w-3"})}),N.id!=="backlog"&&N.id!=="all-tasks"&&(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>g(N.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,qr.jsx)(bt.Trash2,{className:"h-3 w-3"})})]})]})},N.id))})]})})]})]})]})]})},Wi=e=>(0,qr.jsx)(ar,{children:(0,qr.jsxs)("div",{className:"flex w-full",children:[(0,qr.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,qr.jsx)(Gi,{...e})}),(0,qr.jsx)("div",{className:"md:hidden",children:(0,qr.jsx)(Gi,{...e})}),(0,qr.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,qr.jsx)("div",{className:"w-full",children:e.children})})]})});var qi=({title:e,status:t,taskCount:a,children:o,onDrop:i,isCompact:r=!1})=>{let c=n=>{n.preventDefault()},s=n=>{n.preventDefault(),i(t)};return(0,qr.jsxs)(O,{className:`qr-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 ${r?"lg:max-w-Ko":""}`,onDragOver:c,onDrop:s,children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,qr.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${r?"text-base":"text-lg"}`,children:e}),(0,qr.jsx)(Z,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,qr.jsx)("div",{className:"space-y-4 min-h-[200px]",children:o})]})};var yo=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:i=!1})=>{let r=l=>{a(e)},c=()=>{console.log("task clicked",e.title),o(e)},s=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},m=()=>{switch(e.type){case"story":return(0,qr.jsx)(bt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,qr.jsx)(bt.Bug,{className:"h-3 w-3"});case"spike":return(0,qr.jsx)(bt.Zap,{className:"h-3 w-3"});case"task":default:return(0,qr.jsx)(bt.AlertCircle,{className:"h-3 w-3"})}},n=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return i?(0,qr.jsx)(O,{className:"qr-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:r,onClick:c,children:(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-Ko font-medium ${n()}`,children:m()}),(0,qr.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,qr.jsxs)(O,{className:"qr-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:r,onClick:c,children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,qr.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${n()}`,children:[m(),(0,qr.jsx)("span",{className:"capitalize",children:e.type})]}),(0,qr.jsxs)("div",{className:"flex gap-1",children:[(0,qr.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-Ko font-medium ${s()}`,children:e.priority}),(0,qr.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-Ko font-medium",children:e.points})]})]}),(0,qr.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,qr.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,qr.jsxs)("div",{className:"flex items-center gap-1",children:[(0,qr.jsx)(bt.User,{className:"h-4 w-4"}),(0,qr.jsx)("span",{children:e.assignee})]})})]})};var Va=be(require("react")),ot=be(require("@radix-ui/react-dialog"));var pt=ot.Root;var Tl=ot.Portal;var Ji=Va.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(ot.Overlay,{ref:a,className:b("fixed inset-0 qr-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ji.displayName=ot.Overlay.displayName;var st=Va.forwardRef(({className:e,children:t,...a},o)=>(0,qr.jsxs)(Tl,{children:[(0,qr.jsx)(Ji,{}),(0,qr.jsxs)(ot.Content,{ref:o,className:b("fixed left-[50%] top-[50%] qr-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background qr-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,qr.jsxs)(ot.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,qr.jsx)(bt.qr,{className:"h-4 w-4"}),(0,qr.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));st.displayName=ot.Content.displayName;var nt=({className:e,...t})=>(0,qr.jsx)("div",{className:b("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});nt.displayName="DialogHeader";var Ua=({className:e,...t})=>(0,qr.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ua.displayName="DialogFooter";var lt=Va.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(ot.Title,{ref:a,className:b("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName=ot.Title.displayName;var Ka=Va.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(ot.Description,{ref:a,className:b("text-sm text-muted-foreground",e),...t}));Ka.displayName=ot.Description.displayName;var ga=be(require("react")),Da=be(require("@radix-ui/react-toggle-group"));var Yi=be(require("react")),or=be(require("@radix-ui/react-toggle"));var rr=(0,Gr.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Rl=Yi.forwardRef(({className:e,variant:t,size:a,...o},i)=>(0,qr.jsx)(or.Root,{ref:i,className:b(rr({variant:t,size:a,className:e})),...o}));Rl.displayName=or.Root.displayName;var es=ga.createContext({size:"default",variant:"default"}),fa=ga.forwardRef(({className:e,variant:t,size:a,children:o,...i},r)=>(0,qr.jsx)(Da.Root,{ref:r,className:b("flex items-center justify-center gap-1",e),...i,children:(0,qr.jsx)(es.Provider,{value:{variant:t,size:a},children:o})}));fa.displayName=Da.Root.displayName;var va=ga.forwardRef(({className:e,children:t,variant:a,size:o,...i},r)=>{let c=ga.useContext(es);return(0,qr.jsx)(Da.Item,{ref:r,className:b(rr({variant:c.variant||a,size:c.size||o}),e),...i,children:t})});va.displayName=Da.Item.displayName;var El=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:bt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:bt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:bt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:bt.Zap}],Al=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],No=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:i,assignees:r,defaultEpicId:c})=>{let[s,m]=(0,$a.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,$a.useEffect)(()=>{e&&c&&m(u=>({...u,epicId:c}))},[e,c]),(0,$a.useEffect)(()=>{e&&m({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""})},[e]);let n=u=>{u.preventDefault(),s.title.trim()&&(a({title:s.title.trim(),description:s.description.trim(),status:"todo",priority:s.priority,type:s.type,points:s.points,epicId:s.epicId,sprintId:s.sprintId==="none"?void 0:s.sprintId,assignee:s.assignee.trim()||"Unassigned"}),m({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""}),t())},l=(u,g)=>{m(v=>({...v,[u]:g}))};return(0,qr.jsx)(pt,{open:e,onOpenChange:t,children:(0,qr.jsxs)(st,{className:"sm:max-w-md",children:[(0,qr.jsx)(nt,{children:(0,qr.jsx)(lt,{children:"Add New Task"})}),(0,qr.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"title",children:"Task Title"}),(0,qr.jsx)(L,{id:"title",value:s.title,onChange:u=>l("title",u.target.value),placeholder:"Enter task title",required:!0})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,qr.jsx)(Ne,{id:"description",value:s.description,onChange:u=>l("description",u.target.value),placeholder:"Enter task description",rows:3})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"Type"}),(0,qr.jsx)(fa,{type:"single",value:s.type,onValueChange:u=>u&&l("type",u),children:El.map(u=>{let g=u.icon;return(0,qr.jsxs)(va,{value:u.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,qr.jsx)(g,{className:"h-4 w-4"}),u.label]},u.value)})})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"Priority"}),(0,qr.jsx)(fa,{type:"single",value:s.priority,onValueChange:u=>u&&l("priority",u),children:Al.map(u=>(0,qr.jsx)(va,{value:u.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:u.label},u.value))})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"points",children:"Story Points"}),(0,qr.jsx)(L,{id:"points",type:"number",min:"1",max:"100",value:s.points,onChange:u=>l("points",parseInt(u.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"epic",children:"Epic"}),(0,qr.jsxs)(ke,{value:s.epicId,onValueChange:u=>l("epicId",u),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{placeholder:"Select an epic"})}),(0,qr.jsx)(Se,{children:o.map(u=>(0,qr.jsx)(U,{value:u.id,children:(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)("div",{className:`w-3 h-3 rounded-full ${u.color}`}),u.name]})},u.id))})]})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,qr.jsxs)(ke,{value:s.sprintId,onValueChange:u=>l("sprintId",u),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{placeholder:"Select a sprint"})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"none",children:"No Sprint"}),i.map(u=>(0,qr.jsx)(U,{value:u.id,children:(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[u.name,u.isActive&&(0,qr.jsx)("span",{className:"text-Ko bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},u.id))]})]})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"sprint",children:"Assignee"}),(0,qr.jsxs)(ke,{value:s.assignee,onValueChange:u=>l("assignee",u),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{placeholder:"Select an Assignee"})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"none",children:"No Assignee"}),r.map(u=>(0,qr.jsx)(U,{value:u.id,children:(0,qr.jsx)("div",{className:"flex items-center gap-2",children:u.name})},u.id))]})]})]}),(0,qr.jsxs)(Ua,{children:[(0,qr.jsx)(h,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,qr.jsx)(h,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var sr=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:i,className:r="",disabled:c=!1})=>{let[s,m]=(0,At.useState)(!1),[n,l]=(0,At.useState)(""),u=()=>{c||(m(!0),l(t))},g=async()=>{n!==t&&await i(e,n),m(!1)},v=S=>{S.key==="Enter"&&!o||S.key==="Enter"&&S.ctrlKey&&o?g():S.key==="Escape"&&(m(!1),l(""))};return(0,qr.jsxs)("div",{className:`space-y-2 ${r}`,children:[(0,qr.jsx)(P,{children:a}),s?o?(0,qr.jsx)(Ne,{value:n,onChange:S=>l(S.target.value),onBlur:g,onKeyDown:v,autoFocus:!0,rows:4,className:"resize-none"}):(0,qr.jsx)(L,{value:n,onChange:S=>l(S.target.value),onBlur:g,onKeyPress:v,autoFocus:!0,className:"text-lg font-medium"}):(0,qr.jsxs)("div",{onClick:u,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 qr-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,qr.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,qr.jsx)(bt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var os=({comments:e,onAddComment:t})=>{let[a,o]=(0,At.useState)(""),i=c=>c.split(" ").map(s=>s[0]).join("").toUpperCase(),r=()=>{a.trim()&&(t(a),o(""))};return(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)(bt.MessageSquare,{className:"h-5 w-5"}),(0,qr.jsx)(P,{className:"text-lg font-medium",children:"Comments"}),(0,qr.jsx)(Z,{variant:"secondary",children:e.length})]}),(0,qr.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(c=>(0,qr.jsxs)("div",{className:"flex gap-3 qr-3 bg-muted/50 rounded-lg",children:[(0,qr.jsx)(Ut,{className:"h-8 w-8 qr-1",children:(0,qr.jsx)(Kt,{className:"text-Ko bg-muted text-muted-foreground",children:i(c.author)})}),(0,qr.jsxs)("div",{className:"flex-1",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,qr.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,qr.jsxs)("span",{className:"text-Ko text-muted-foreground",children:[c.createdAt.toLocaleDateString()," at ",c.createdAt.toLocaleTimeString()]})]}),(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,qr.jsxs)("div",{className:"flex gap-2",children:[(0,qr.jsx)(Ne,{value:a,onChange:c=>o(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,qr.jsx)(h,{onClick:r,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,qr.jsx)(bt.Send,{className:"h-4 w-4"})})]})]})};var So=({label:e,value:t,onValueChange:a,options:o,showColor:i=!1,disabled:r=!1})=>{let[c,s]=(0,At.useState)(!1),m=o.find(l=>l.value===t);return(0,qr.jsxs)("div",{className:"space-y-1",children:[(0,qr.jsx)(P,{className:"text-Ko text-muted-foreground",children:e}),(0,qr.jsxs)(ke,{value:t,onValueChange:a,open:c,onOpenChange:l=>{r||s(l)},disabled:r,children:[(0,qr.jsx)(Ce,{className:"h-auto qr-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,qr.jsxs)(Z,{variant:"secondary",className:`${r?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!r&&s(!c),children:[i&&m?.color&&(0,qr.jsx)("div",{className:`w-2 h-2 rounded-full ${m.color} bt-1`}),m?.label||"Select..."]})}),(0,qr.jsx)(Se,{children:o.map(l=>(0,qr.jsx)(U,{value:l.value,children:i&&l.color?(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)("div",{className:`w-3 h-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var is=({label:e,value:t,onValueChange:a,options:o,placeholder:i="Search...",allowCustomValue:r=!1,disabled:c=!1})=>{let[s,m]=(0,At.useState)(!1),[n,l]=(0,At.useState)(""),u=o.find(f=>f.value===t),g=o.filter(f=>f.label.toLowerCase().includes(n.toLowerCase())),v=f=>{a(f),m(!1),l("")},S=()=>{r&&n.trim()&&!o.find(f=>f.value===n.trim())&&(a(n.trim()),m(!1),l(""))};return(0,qr.jsxs)("div",{className:"space-y-1",children:[(0,qr.jsx)(P,{className:"text-Ko text-muted-foreground",children:e}),(0,qr.jsxs)(ke,{value:t,onValueChange:v,open:s,onOpenChange:f=>{c||m(f)},disabled:c,children:[(0,qr.jsx)(Ce,{className:"h-auto qr-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,qr.jsx)(Z,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&m(!s),children:u?.label||t||"Select..."})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)("div",{className:"qr-2",children:(0,qr.jsx)(L,{placeholder:i,value:n,onChange:f=>l(f.target.value),onKeyDown:f=>{f.key==="Enter"&&r&&S()},className:"mb-2"})}),g.map(f=>(0,qr.jsx)(U,{value:f.value,children:f.label},f.value)),r&&n.trim()&&!g.find(f=>f.value===n.trim())&&(0,qr.jsxs)(U,{value:n.trim(),children:['Add "',n.trim(),'"']})]})]})]})};var Il=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:bt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:bt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:bt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:bt.Zap}],Ml=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Fl=[{value:"John Doe",label:"John Doe"},{value:"Jane Smith",label:"Jane Smith"},{value:"Bob Wilson",label:"Bob Wilson"},{value:"Alice Johnson",label:"Alice Johnson"},{value:"Carol Brown",label:"Carol Brown"},{value:"David Lee",label:"David Lee"},{value:"Emma Davis",label:"Emma Davis"},{value:"Frank Miller",label:"Frank Miller"},{value:"Grace Taylor",label:"Grace Taylor"},{value:"Unassigned",label:"Unassigned"}],ss=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:i,onClose:r,onDelete:c,isUpdating:s=!1,isDeleting:m=!1,deleteState:n="idle"})=>{let l=g=>g.split(" ").map(v=>v[0]).join("").toUpperCase(),u=()=>n==="loading"?(0,$.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-Ko gap-1",children:[(0,$.jsx)(bt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):n==="success"?(0,$.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-Ko gap-1",children:[(0,$.jsx)(bt.Check,{className:"h-3 w-3"}),"Deleted"]}):n==="error"?(0,$.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-Ko gap-1",children:[(0,$.jsx)(bt.qr,{className:"h-3 w-3"}),"Delete failed"]}):(0,$.jsxs)(h,{onClick:c,variant:"destructive",className:"w-full h-8 text-Ko gap-1",disabled:s||m,children:[(0,$.jsx)(bt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,$.jsxs)("div",{className:"flex flex-col h-full",children:[(0,$.jsxs)("div",{className:"space-y-4",style:{opacity:s?.6:1},children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-Ko text-muted-foreground",children:"Status"}),(0,$.jsx)(So,{label:"",value:e.status,onValueChange:g=>i("status",g),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:s})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-Ko text-muted-foreground",children:"Type"}),(0,$.jsx)(fa,{type:"single",value:e.type,onValueChange:g=>g&&i("type",g),className:"grid grid-cols-2 gap-1",disabled:s,children:Il.map(g=>{let v=g.icon;return(0,$.jsxs)(va,{value:g.value,className:"flex items-center gap-1 text-Ko h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:[(0,$.jsx)(v,{className:"h-3 w-3"}),g.label]},g.value)})})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-Ko text-muted-foreground",children:"Priority"}),(0,$.jsx)(fa,{type:"single",value:e.priority,onValueChange:g=>g&&i("priority",g),className:"grid grid-cols-3 gap-1",disabled:s,children:Ml.map(g=>(0,$.jsx)(va,{value:g.value,className:"text-Ko h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:g.label},g.value))})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-Ko text-muted-foreground",children:"Story Points"}),(0,$.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:g=>i("points",g.target.value),className:"w-full h-8 px-2 text-Ko border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:s})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-Ko text-muted-foreground",children:"Epic"}),(0,$.jsx)(So,{label:"",value:e.epicId,onValueChange:g=>i("epicId",g),options:(t||[]).map(g=>({value:g.id,label:g.name,color:g.color})),showColor:!0,disabled:s})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-Ko text-muted-foreground",children:"Sprint"}),(0,$.jsx)(So,{label:"",value:e.sprintId||"none",onValueChange:g=>i("sprintId",g==="none"?"":g),options:[{value:"none",label:"No Sprint"},...(a||[]).map(g=>({value:g.id,label:`${g.name}${g.isActive?" (Active)":""}`}))],disabled:s})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-Ko text-muted-foreground",children:"Assignee"}),(0,$.jsx)(is,{label:"",value:e.assignee,onValueChange:g=>i("assignee",g),options:Fl,placeholder:"Search team members...",allowCustomValue:!0,disabled:s})]})]}),(0,$.jsxs)("div",{className:"qr-auto pt-4 space-y-4",children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(h,{onClick:r,variant:"outline",className:"w-full h-8 text-Ko",disabled:s||m,children:"Close"}),u()]}),(0,$.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,$.jsx)("div",{className:"text-Ko text-muted-foreground font-medium mb-2",children:"Information"}),(0,$.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$.jsx)("span",{className:"text-Ko text-muted-foreground",children:"Logged By"}),(0,$.jsxs)("div",{className:"flex items-center gap-1 text-Ko text-muted-foreground",children:[(0,$.jsx)(bt.User,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:"System"})]})]}),(0,$.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$.jsx)("span",{className:"text-Ko text-muted-foreground",children:"Created"}),(0,$.jsxs)("div",{className:"flex items-center gap-1 text-Ko text-muted-foreground",children:[(0,$.jsx)(bt.Calendar,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,$.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$.jsx)("span",{className:"text-Ko text-muted-foreground",children:"Last Updated"}),(0,$.jsxs)("div",{className:"flex items-center gap-1 text-Ko text-muted-foreground",children:[(0,$.jsx)(bt.Clock,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:[o.toLocaleDateString()," at ",o.toLocaleTimeString()]})]})]})]})]})]})};var ns=({isOpen:e,onClose:t,task:a,epics:o,sprints:i,onUpdateTask:r,onDeleteTask:c})=>{let[s,m]=(0,At.useState)(new Date),[n,l]=(0,At.useState)("idle"),[u,g]=(0,At.useState)("idle"),[v,S]=(0,At.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working on the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),y=async(H,se)=>{if(se!==a[H]){l("loading");try{await r(a.id,{[H]:se}),m(new Date),l("success"),setTimeout(()=>l("idle"),1500)}catch{l("error"),setTimeout(()=>l("idle"),3e3)}}},f=async(H,se)=>{if(se!==a[H]){l("loading");try{await r(a.id,{[H]:se}),m(new Date),l("success"),setTimeout(()=>l("idle"),1500)}catch{l("error"),setTimeout(()=>l("idle"),3e3)}}},k=H=>{let se={id:Date.now().toString(),text:H,author:"Current User",createdAt:new Date};S([...v,se])},I=async()=>{g("loading");try{await c(a.id),g("success"),setTimeout(()=>{t(),g("idle")},1e3)}catch{g("error"),setTimeout(()=>g("idle"),3e3)}},_=n!=="loading"&&u!=="loading",Q=()=>{_&&t()},w=()=>n==="loading"?(0,qr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,qr.jsx)(bt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,qr.jsx)("span",{children:"Updating..."})]}):n==="success"?(0,qr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,qr.jsx)(bt.Check,{className:"h-4 w-4"}),(0,qr.jsx)("span",{children:"Updated successfully"})]}):n==="error"?(0,qr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,qr.jsx)(bt.qr,{className:"h-4 w-4"}),(0,qr.jsx)("span",{children:"Update failed"})]}):null;return(0,qr.jsx)(pt,{open:e,onOpenChange:Q,children:(0,qr.jsxs)(st,{className:"max-w-3xl max-h-[80vh] overflow-y-auto qr-4",children:[(0,qr.jsxs)(nt,{children:[(0,qr.jsx)(lt,{className:"sr-only",children:a.title}),(0,qr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qr.jsx)("div",{className:"flex-1",children:w()}),!_&&(0,qr.jsx)("div",{className:"text-Ko text-muted-foreground",children:"Please wait..."})]})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,qr.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,qr.jsx)(sr,{fieldName:"title",value:a.title,label:"",onSave:y,className:"border-b border-border pb-3",disabled:n==="loading"}),(0,qr.jsx)(sr,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:y,disabled:n==="loading"}),(0,qr.jsx)(os,{comments:v,onAddComment:k})]}),(0,qr.jsx)(ss,{task:a,epics:o,sprints:i,lastUpdated:s,onUpdateTask:f,onClose:Q,onDelete:I,isUpdating:n==="loading",isDeleting:u==="loading",deleteState:u})]})]})})};var Do=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,i]=(0,At.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),r=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],s=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],m=l=>{l.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),i({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),t())},n=(l,u)=>{i(g=>({...g,[l]:u}))};return(0,qr.jsx)(pt,{open:e,onOpenChange:t,children:(0,qr.jsxs)(st,{className:"sm:max-w-md",children:[(0,qr.jsx)(nt,{children:(0,qr.jsx)(lt,{children:"Add New Epic"})}),(0,qr.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"name",children:"Epic Name"}),(0,qr.jsx)(L,{id:"name",value:o.name,onChange:l=>n("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,qr.jsx)(Ne,{id:"description",value:o.description,onChange:l=>n("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"Color"}),(0,qr.jsx)("div",{className:"flex gap-2 flex-wrap",children:r.map(l=>(0,qr.jsx)("button",{type:"button",onClick:()=>n("color",l),className:`w-8 h-8 rounded-full ${l} ${o.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"Confidence"}),(0,qr.jsxs)(ke,{value:o.confidence,onValueChange:l=>n("confidence",l),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{})}),(0,qr.jsx)(Se,{children:c.map(l=>(0,qr.jsx)(U,{value:l.value,children:l.label},l.value))})]})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"Phase"}),(0,qr.jsxs)(ke,{value:o.phase.toString(),onValueChange:l=>n("phase",parseInt(l)),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{})}),(0,qr.jsx)(Se,{children:s.map(l=>(0,qr.jsx)(U,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"Start Date"}),(0,qr.jsx)(L,{type:"date",value:o.startDate,onChange:l=>n("startDate",l.target.value)})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"End Date"}),(0,qr.jsx)(L,{type:"date",value:o.endDate,onChange:l=>n("endDate",l.target.value)})]})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"Progress (%)"}),(0,qr.jsx)(L,{type:"number",min:"0",max:"100",value:o.progress,onChange:l=>n("progress",parseInt(l.target.value)||0)})]}),(0,qr.jsxs)(Ua,{children:[(0,qr.jsx)(h,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,qr.jsx)(h,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var ds=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:i=[],initialProjects:r=[],onAddTask:c,onUpdateTask:s,onDeleteTask:m,onTaskClick:n,onAddEpic:l})=>{let[u,g]=(0,At.useState)(e),[v,S]=(0,At.useState)(t),[y,f]=(0,At.useState)(a),[k,I]=(0,At.useState)(!1),[_,Q]=(0,At.useState)(!1),[w,H]=(0,At.useState)(null),[se,T]=(0,At.useState)(null),[R,E]=(0,At.useState)(o),[pe,M]=(0,At.useState)(i),ze=v.filter(q=>!0).map(q=>q.id),Ie=y.find(q=>q.isSelected);ze.push("no-epic"),(0,At.useEffect)(()=>{g(e)},[e]),(0,At.useEffect)(()=>{S(t)},[t]),(0,At.useEffect)(()=>{f(a)},[a]);let We=u.filter(q=>{let x=ze.includes(q.epicId)||!q.epicId;return!Ie||Ie.id==="all-tasks"?x:Ie.id==="backlog"?x&&!q.sprintId:x&&q.sprintId===Ie.id}),D=q=>We.filter(x=>x.status===q),ue=q=>{let x={};return v.forEach(ve=>{x[ve.id]=q.filter(ie=>ie.epicId===ve.id)}),x["no-epic"]=q.filter(ve=>!ve.epicId),x},Re=q=>{T(q)},rt=q=>{se&&(g(x=>x.map(ve=>ve.id===se.id?{...ve,status:q}:ve)),s?.(se.id,{status:q}),T(null))},Me=q=>{let x={...q,id:Date.now().toString(),createdAt:new Date};g(ve=>[...ve,x]),c?.(q)},De=async(q,x)=>{g(ve=>ve.map(ie=>ie.id===q?{...ie,...x}:ie)),s&&await s(q,x)},ct=async q=>{g(x=>x.filter(ve=>ve.id!==q)),w?.id===q&&H(null),m&&await m(q)},yt=q=>{let x={...q,id:Date.now().toString(),isSelected:!0};S(ve=>[...ve,x]),l?.(q)},it=q=>{H(q),n?.(q)};return(0,qr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qr.jsx)(Qe,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>I(!0)},secondaryAction:{label:"Add epic",onClick:()=>Q(!0)}}),(0,qr.jsx)("div",{className:"flex-1",children:(0,qr.jsxs)("div",{className:"w-full",children:[(0,qr.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(q=>{let x=D(q.status),ve=ue(x);return(0,qr.jsx)(qi,{title:q.title,status:q.status,taskCount:x.length,onDrop:rt,isCompact:q.status==="done",children:ze.map(ie=>{let ft=v.find(Rt=>Rt.id===ie),Ot=ve[ie]||[];return Ot.length===0?null:(0,qr.jsxs)("div",{className:"mb-6",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,qr.jsx)("div",{className:`w-3 h-3 rounded-full ${ft?.color}`}),(0,qr.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:ft?.name||"No Epic"}),(0,qr.jsx)(Z,{variant:"secondary",className:"text-Ko",children:Ot.length})]})," ",(0,qr.jsx)("div",{className:"space-y-3",children:Ot.map(Rt=>(0,qr.jsx)(yo,{task:Rt,epic:ft,onDragStart:Re,onTaskClick:it,isCompact:q.status==="done"},Rt.id))})]},ie)})},q.id)})}),(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)(No,{isOpen:k,onClose:()=>I(!1),onAddTask:Me,assignees:[...pe,...R],epics:v,sprints:y}),(0,qr.jsx)(Do,{isOpen:_,onClose:()=>Q(!1),onAddEpic:yt}),w&&(0,qr.jsx)(ns,{isOpen:!!w,onClose:()=>H(null),task:w,epics:v,sprints:y,onUpdateTask:De,onDeleteTask:ct})]})]})})]})};var cs=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddTaskToEpic:r,onAddEpic:c,onUpdateEpic:s,onDeleteEpic:m})=>{let[n,l]=(0,At.useState)(null),[u,g]=(0,At.useState)(null),[v,S]=(0,At.useState)({}),y=R=>{l(R)},f=R=>{R.preventDefault()},k=(R,E)=>{R.preventDefault(),n&&n.epicId!==E&&(o(n.id,{epicId:E}),l(null))},I=R=>e.filter(E=>E.epicId===R),_=R=>{g(R.id),S({name:R.name,description:R.description,confidence:R.confidence,phase:R.phase,progress:R.progress})},Q=()=>{u&&v.name&&(s(u,v),g(null),S({}))},w=()=>{g(null),S({})},H=R=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&m(R)},se=R=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[R]||`Phase ${R}`,T=R=>{switch(R){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,qr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qr.jsx)(Qe,{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:c}}),(0,qr.jsx)("div",{className:"flex-1",children:(0,qr.jsx)("div",{className:"w-full",children:(0,qr.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(R=>{let E=I(R.id),pe=E.reduce((M,ze)=>M+ze.points,0);return(0,qr.jsxs)(O,{className:`flex flex-col ${u===R.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:f,onDrop:M=>k(M,R.id),children:[(0,qr.jsx)("div",{className:"qr-4 border-b border-border",children:u===R.id?(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qr.jsx)(L,{value:v.name||"",onChange:M=>S({...v,name:M.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,qr.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:Q,className:"qr-1 h-8 w-8",children:(0,qr.jsx)(bt.Check,{className:"h-4 w-4"})}),(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:w,className:"qr-1 h-8 w-8",children:(0,qr.jsx)(bt.qr,{className:"h-4 w-4"})})]})]}),(0,qr.jsx)(Ne,{value:v.description||"",onChange:M=>S({...v,description:M.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)("label",{className:"text-Ko text-muted-foreground",children:"Confidence"}),(0,qr.jsxs)(ke,{value:v.confidence||R.confidence,onValueChange:M=>S({...v,confidence:M}),children:[(0,qr.jsx)(Ce,{className:"text-Ko",children:(0,qr.jsx)(Fe,{})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"low",children:"Low"}),(0,qr.jsx)(U,{value:"medium",children:"Medium"}),(0,qr.jsx)(U,{value:"high",children:"High"})]})]})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)("label",{className:"text-Ko text-muted-foreground",children:"Phase"}),(0,qr.jsxs)(ke,{value:v.phase?.toString()||R.phase.toString(),onValueChange:M=>S({...v,phase:parseInt(M)}),children:[(0,qr.jsx)(Ce,{className:"text-Ko",children:(0,qr.jsx)(Fe,{})}),(0,qr.jsx)(Se,{children:[1,2,3,4,5,6,7,8,9].map(M=>(0,qr.jsxs)(U,{value:M.toString(),children:["Phase ",M]},M))})]})]})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)("label",{className:"text-Ko text-muted-foreground",children:"Progress (%)"}),(0,qr.jsx)(L,{type:"number",min:"0",max:"100",value:v.progress||R.progress,onChange:M=>S({...v,progress:parseInt(M.target.value)||0}),className:"text-Ko"})]})]}):(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,qr.jsx)("div",{className:`w-4 h-4 rounded-full ${R.color}`}),(0,qr.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:R.name}),(0,qr.jsxs)("div",{className:"flex gap-1",children:[(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>_(R),className:"qr-1 h-8 w-8",children:(0,qr.jsx)(bt.Edit2,{className:"h-3 w-3"})}),(0,qr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>H(R.id),className:"qr-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,qr.jsx)(bt.Trash2,{className:"h-3 w-3"})})]})]}),(0,qr.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,qr.jsxs)(Z,{className:`text-Ko ${T(R.confidence)}`,children:[R.confidence," confidence"]}),(0,qr.jsxs)(Z,{variant:"outline",className:"text-Ko",children:["Phase ",R.phase]}),(0,qr.jsxs)(Z,{variant:"secondary",className:"text-Ko bg-muted text-muted-foreground",children:[E.length," tasks"]}),(0,qr.jsxs)(Z,{variant:"secondary",className:"text-Ko bg-muted text-muted-foreground",children:[pe," pts"]})]}),R.description&&(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground mb-3 select-none",children:R.description}),(0,qr.jsxs)("div",{className:"mb-3",children:[(0,qr.jsxs)("div",{className:"flex justify-between text-Ko text-muted-foreground mb-1",children:[(0,qr.jsx)("span",{className:"select-none",children:"Progress"}),(0,qr.jsxs)("span",{className:"select-none",children:[R.progress,"%"]})]}),(0,qr.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,qr.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${R.progress}%`}})})]}),(0,qr.jsxs)(h,{onClick:()=>r(R.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,qr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,qr.jsx)("div",{className:"flex-1 qr-4 overflow-y-auto",children:(0,qr.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded qr-3 transition-colors ${n?"border-primary bg-primary/10":"border-border"}`,children:E.length===0?(0,qr.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,qr.jsx)(bt.Move,{className:"h-8 w-8 mb-2"}),(0,qr.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):E.map(M=>(0,qr.jsx)(yo,{task:M,epic:R,onDragStart:y,onTaskClick:i,isCompact:!0},M.id))})})]},R.id)})})})})]})};var ms=require("react-day-picker");function Po({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,qr.jsx)(ms.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:b("qr-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:b(oo({variant:"outline"}),"h-7 w-7 bg-transparent qr-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full qr-2",cell:b("relative qr-0 text-center text-sm focus-within:relative focus-within:qr-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:b(oo({variant:"ghost"}),"h-8 w-8 qr-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Po.displayName="Calendar";var us=be(require("react")),jt=be(require("@radix-ui/react-popover"));var dr=jt.Root,cr=jt.Trigger;var To=us.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},i)=>(0,qr.jsx)(jt.Portal,{children:(0,qr.jsx)(jt.Content,{ref:i,align:t,sideOffset:a,className:b("qr-50 w-72 rounded-md border bg-popover qr-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));To.displayName=jt.Content.displayName;var pr=require("date-fns");var fs=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,i]=(0,At.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),r=s=>{s.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},c=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,qr.jsx)(pt,{open:e,onOpenChange:c,children:(0,qr.jsxs)(st,{className:"sm:max-w-md",children:[(0,qr.jsx)(nt,{children:(0,qr.jsx)(lt,{children:"Add New Sprint"})}),(0,qr.jsxs)("form",{onSubmit:r,className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"name",children:"Sprint Name *"}),(0,qr.jsx)(L,{id:"name",value:o.name,onChange:s=>i(m=>({...m,name:s.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,qr.jsx)(Ne,{id:"description",value:o.description,onChange:s=>i(m=>({...m,description:s.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"Start Date *"}),(0,qr.jsxs)(dr,{children:[(0,qr.jsx)(cr,{asChild:!0,children:(0,qr.jsxs)(h,{variant:"outline",className:b("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,qr.jsx)(bt.CalendarIcon,{className:"bt-2 h-4 w-4"}),o.startDate?(0,pr.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,qr.jsx)(To,{className:"w-auto qr-0",align:"start",children:(0,qr.jsx)(Po,{mode:"single",selected:o.startDate,onSelect:s=>i(m=>({...m,startDate:s})),initialFocus:!0})})]})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{children:"End Date *"}),(0,qr.jsxs)(dr,{children:[(0,qr.jsx)(cr,{asChild:!0,children:(0,qr.jsxs)(h,{variant:"outline",className:b("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,qr.jsx)(bt.CalendarIcon,{className:"bt-2 h-4 w-4"}),o.endDate?(0,pr.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,qr.jsx)(To,{className:"w-auto qr-0",align:"start",children:(0,qr.jsx)(Po,{mode:"single",selected:o.endDate,onSelect:s=>i(m=>({...m,endDate:s})),initialFocus:!0,disabled:s=>o.startDate?s<o.startDate:!1})})]})]})]}),(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:s=>i(m=>({...m,isActive:s.target.checked})),className:"rounded border-gray-300"}),(0,qr.jsx)(P,{htmlFor:"isActive",children:"Set At active sprint"})]}),(0,qr.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,qr.jsx)(h,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,qr.jsx)(h,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Eo=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddSprint:r})=>{let[c,s]=(0,At.useState)(["2"]),[m,n]=(0,At.useState)(null),[l,u]=(0,At.useState)(!1),[g,v]=(0,At.useState)(null),[S,y]=(0,At.useState)(e.filter(D=>!D.sprintId)),[f,k]=(0,At.useState)(e.filter(D=>D.sprintId&&c.includes(D.sprintId))),[I,_]=(0,At.useState)(a.filter(D=>D.id!=="backlog"&&D.id!=="all-tasks").sort((D,ue)=>D.startDate.getTime()-ue.startDate.getTime()));(0,At.useEffect)(()=>{y(e.filter(D=>!D.sprintId)),k(e.filter(D=>D.sprintId&&c.includes(D.sprintId))),_(a.filter(D=>D.id!=="backlog"&&D.id!=="all-tasks").sort((D,ue)=>D.startDate.getTime()-ue.startDate.getTime()))},[e,a,c]);let Q=D=>t.find(ue=>ue.id===D),w=D=>a.find(ue=>ue.id===D),H=D=>{switch(D){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},se=D=>D.split(" ").map(ue=>ue[0]).join("").toUpperCase(),T=D=>{n(D)},R=D=>{D.preventDefault()},E=D=>{v(D)},pe=()=>{v(null)},M=(D,ue)=>{D.preventDefault(),v(null),m&&(o(m.id,{sprintId:ue==="backlog"?void 0:ue}),n(null))},ze=D=>{D==="backlog"||D==="all-tasks"||s(ue=>ue.includes(D)?ue.filter(Re=>Re!==D):[...ue,D])},Ie=D=>{r(D),u(!1)},We=({task:D,showSprint:ue=!1})=>{let Re=Q(D.epicId),rt=D.sprintId?w(D.sprintId):null,[Me,De]=(0,At.useState)(!1),ct=wt=>{wt.defaultPrevented||Me||i(D)},yt=wt=>{De(!0),T(D)},it=()=>{De(!1)};return(0,qr.jsx)(O,{className:`qr-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${Me?"opacity-50 shadow-lg scale-105":""} ${m?.id===D.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:yt,onDragEnd:it,onClick:ct,children:(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qr.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:D.title}),(0,qr.jsx)(Z,{className:`text-Ko select-none pointer-events-none ${H(D.priority)}`,children:D.priority[0].toUpperCase()})]}),(0,qr.jsxs)("div",{className:"flex items-center justify-between text-Ko pointer-events-none",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-1",children:[Re&&(0,qr.jsx)("div",{className:`w-2 h-2 rounded-full ${Re.color}`}),(0,qr.jsx)("span",{className:"text-muted-foreground truncate select-none",children:Re?.name})]}),(0,qr.jsx)("span",{className:"text-muted-foreground select-none",children:se(D.assignee)})]}),ue&&rt&&(0,qr.jsxs)("div",{className:"flex items-center gap-1 text-Ko text-muted-foreground pointer-events-none",children:[(0,qr.jsx)(bt.Calendar,{className:"h-3 w-3"}),(0,qr.jsx)("span",{className:"select-none",children:rt.name})]})]})})};return(0,qr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qr.jsx)(Qe,{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:()=>u(!0)}}),(0,qr.jsx)("div",{className:"flex-1",children:(0,qr.jsxs)("div",{className:"w-full",children:[(0,qr.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,qr.jsx)("div",{className:"lg:col-span-1",children:(0,qr.jsxs)(O,{className:"qr-4 h-full bg-card shadow-sm",onDragOver:R,onDragEnter:()=>E("backlog"),onDragLeave:pe,onDrop:D=>M(D,"backlog"),children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,qr.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,qr.jsx)(Z,{variant:"secondary",className:"bg-muted text-muted-foreground",children:S.length})]}),(0,qr.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded qr-3 transition-colors ${g==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[S.map(D=>(0,qr.jsx)(We,{task:D},D.id)),S.length===0&&(0,qr.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"})]})]})}),(0,qr.jsx)("div",{className:"lg:col-span-3",children:(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsxs)(O,{className:"qr-4 bg-card shadow-sm",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,qr.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,qr.jsxs)(h,{onClick:()=>u(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,qr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,qr.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:I.map(D=>(0,qr.jsxs)(h,{variant:c.includes(D.id)?"default":"outline",size:"sm",onClick:()=>ze(D.id),className:"text-Ko h-8",children:[D.name,D.isActive&&(0,qr.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},D.id))})]}),(0,qr.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:c.map(D=>I.find(ue=>ue.id===D)).filter(Boolean).sort((D,ue)=>D.startDate.getTime()-ue.startDate.getTime()).map(D=>{let ue=f.filter(Re=>Re.sprintId===D.id);return(0,qr.jsxs)(O,{className:"qr-4 bg-card shadow-sm",onDragOver:R,onDragEnter:()=>E(D.id),onDragLeave:pe,onDrop:Re=>M(Re,D.id),children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)("h3",{className:"font-semibold text-foreground select-none",children:D.name}),D.isActive&&(0,qr.jsx)("span",{className:"text-Ko text-success font-medium select-none",children:"Active Sprint"})]}),(0,qr.jsx)(Z,{variant:"secondary",className:"bg-muted text-muted-foreground",children:ue.length})]}),(0,qr.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded qr-3 transition-colors ${g===D.id?"border-primary bg-primary/10":"border-border"}`,children:[ue.map(Re=>(0,qr.jsx)(We,{task:Re},Re.id)),ue.length===0&&(0,qr.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},D.id)})})," "]})})]}),(0,qr.jsx)(fs,{isOpen:l,onClose:()=>u(!1),onAddSprint:Ie})]})})]})};var Bl=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Ll=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),jl=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},ur=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[i,r]=t.split(":");o.setHours(parseInt(i),parseInt(r))}return o<a},gr=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Ol=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},zl=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[i,r]=(0,At.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,s]=(0,At.useState)(!1),m=l=>{l.preventDefault();let u=e.find(v=>v?.id.toString()===i.colleagueId.toString());if(!u){console.error("No valid colleague selected"),s(!0);return}s(!1);let g={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:u,isCompleted:!1,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,priority:i.priority,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(v=>v.trim()):void 0};t(g),o(!1),r({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,At.useEffect)(()=>{i.colleagueId&&s(!1)},[i.colleagueId]);let n=e.filter(Boolean);return(0,qr.jsx)(pt,{open:a,onOpenChange:o,children:(0,qr.jsxs)(st,{className:"max-w-2xl",children:[(0,qr.jsx)(nt,{children:(0,qr.jsx)(lt,{children:"Add New Reminder"})}),(0,qr.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,qr.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"title",children:"Title"}),(0,qr.jsx)(L,{id:"title",value:i.title,onChange:l=>r({...i,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,qr.jsx)(Ne,{id:"description",value:i.description,onChange:l=>r({...i,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"dueDate",children:"Due Date"}),(0,qr.jsx)(L,{id:"dueDate",type:"date",value:i.dueDate,onChange:l=>r({...i,dueDate:l.target.value}),required:!0})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,qr.jsx)(L,{id:"dueTime",type:"time",value:i.dueTime,onChange:l=>r({...i,dueTime:l.target.value})})]})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,qr.jsxs)(ke,{value:i.colleagueId,onValueChange:l=>{r({...i,colleagueId:l})},required:!0,children:[(0,qr.jsx)(Ce,{className:`${c?"text-destructive border-red-500":""}`,children:(0,qr.jsx)(Fe,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(l=>l?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,qr.jsx)(Se,{children:n.map(l=>(0,qr.jsx)(U,{value:l.id,children:l.name},l.id))})]}),c&&(0,qr.jsx)("qr",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:l=>r({...i,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,qr.jsx)(P,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,qr.jsxs)(ke,{value:i.recurrencePattern,onValueChange:l=>r({...i,recurrencePattern:l}),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"daily",children:"Daily"}),(0,qr.jsx)(U,{value:"weekly",children:"Weekly"}),(0,qr.jsx)(U,{value:"monthly",children:"Monthly"}),(0,qr.jsx)(U,{value:"yearly",children:"Yearly"})]})]})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"recurrenceInterval",children:"Every"}),(0,qr.jsx)(L,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:l=>r({...i,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,qr.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,qr.jsx)(h,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,qr.jsx)(h,{type:"submit",children:"Add Reminder"})]})]})]})})},Hl=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:i})=>{let[r,c]=(0,At.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague?.id||"",priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""}),s=n=>{n.preventDefault();let l=t.find(u=>u?.id===r.colleagueId);if(!l){console.error("No valid colleague selected");return}a(e.id,{title:r.title,description:r.description,dueDate:new Date(r.dueDate),dueTime:r.dueTime||void 0,colleague:l,priority:r.priority,isRecurring:r.isRecurring,recurrencePattern:r.isRecurring?r.recurrencePattern:void 0,recurrenceInterval:r.isRecurring?r.recurrenceInterval:void 0,reminderEnabled:r.reminderEnabled,reminderMinutes:r.reminderEnabled?r.reminderMinutes:void 0,tags:r.tags?r.tags.split(",").map(u=>u.trim()):void 0}),i()},m=t.filter(Boolean);return(0,qr.jsx)(pt,{open:o,onOpenChange:i,children:(0,qr.jsxs)(st,{className:"max-w-2xl",children:[(0,qr.jsx)(nt,{children:(0,qr.jsx)(lt,{children:"Edit Reminder"})}),(0,qr.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-title",children:"Title"}),(0,qr.jsx)(L,{id:"edit-title",value:r.title,onChange:n=>c({...r,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-priority",children:"Priority"}),(0,qr.jsxs)(ke,{value:r.priority,onValueChange:n=>c({...r,priority:n}),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"low",children:"\u{1F7E2} Low"}),(0,qr.jsx)(U,{value:"medium",children:"\u{1F7E1} Medium"}),(0,qr.jsx)(U,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-description",children:"Description"}),(0,qr.jsx)(Ne,{id:"edit-description",value:r.description,onChange:n=>c({...r,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,qr.jsx)(L,{id:"edit-dueDate",type:"date",value:r.dueDate,onChange:n=>c({...r,dueDate:n.target.value}),required:!0})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,qr.jsx)(L,{id:"edit-dueTime",type:"time",value:r.dueTime,onChange:n=>c({...r,dueTime:n.target.value})})]})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,qr.jsxs)(ke,{value:r.colleagueId,onValueChange:n=>c({...r,colleagueId:n}),required:!0,children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{placeholder:"Select a digital colleague"})}),(0,qr.jsx)(Se,{children:m.map(n=>(0,qr.jsx)(U,{value:n.id,children:n.name},n.id))})]})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:r.isRecurring,onChange:n=>c({...r,isRecurring:n.target.checked}),className:"rounded border-border"}),(0,qr.jsx)(P,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,qr.jsxs)(ke,{value:r.recurrencePattern,onValueChange:n=>c({...r,recurrencePattern:n}),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"daily",children:"Daily"}),(0,qr.jsx)(U,{value:"weekly",children:"Weekly"}),(0,qr.jsx)(U,{value:"monthly",children:"Monthly"}),(0,qr.jsx)(U,{value:"yearly",children:"Yearly"})]})]})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,qr.jsx)(L,{id:"edit-recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:n=>c({...r,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:r.reminderEnabled,onChange:n=>c({...r,reminderEnabled:n.target.checked}),className:"rounded border-border"}),(0,qr.jsx)(P,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),r.reminderEnabled&&(0,qr.jsxs)("div",{className:"pl-6",children:[(0,qr.jsx)(P,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,qr.jsxs)(ke,{value:r.reminderMinutes.toString(),onValueChange:n=>c({...r,reminderMinutes:parseInt(n)}),children:[(0,qr.jsx)(Ce,{children:(0,qr.jsx)(Fe,{})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsx)(U,{value:"5",children:"5 minutes before"}),(0,qr.jsx)(U,{value:"15",children:"15 minutes before"}),(0,qr.jsx)(U,{value:"30",children:"30 minutes before"}),(0,qr.jsx)(U,{value:"60",children:"1 hour before"}),(0,qr.jsx)(U,{value:"1440",children:"1 day before"})]})]})]})]}),(0,qr.jsxs)("div",{children:[(0,qr.jsx)(P,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,qr.jsx)(L,{id:"edit-tags",value:r.tags,onChange:n=>c({...r,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,qr.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,qr.jsx)(h,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,qr.jsx)(h,{type:"submit",children:"Save Changes"})]})]})]})})},Vl=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[i,r]=(0,At.useState)(!1);if(!e||!e.id)return null;let c=ur(e.dueDate,e.dueTime),s=gr(e.dueDate),m=Ol(e.dueDate),n=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},l=()=>s?"Today":m?"Tomorrow":c&&!e.isCompleted?"Overdue":Ll(e.dueDate);return(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)(Hl,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>r(!1)}),(0,qr.jsx)(O,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${c&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,qr.jsx)(le,{className:"qr-4",children:(0,qr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,qr.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,qr.jsx)("button",{onClick:n,className:"qr-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,qr.jsx)(bt.CheckCircle,{className:"h-5 w-5"}):(0,qr.jsx)(bt.Circle,{className:"h-5 w-5"})}),(0,qr.jsxs)("div",{className:"flex-1",children:[(0,qr.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,qr.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,qr.jsx)("span",{className:"text-sm",children:Bl(e.priority)}),e.isRecurring&&(0,qr.jsx)(bt.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,qr.jsx)(bt.Bell,{className:"h-4 w-4 text-success"})]}),(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,qr.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,qr.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qr.jsx)(bt.Calendar,{className:"h-4 w-4"}),(0,qr.jsx)("span",{className:c&&!e.isCompleted?"text-destructive font-medium":"",children:l()})]}),e.dueTime&&(0,qr.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qr.jsx)(bt.Clock,{className:"h-4 w-4"}),(0,qr.jsx)("span",{children:jl(e.dueTime)})]}),(0,qr.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qr.jsx)(bt.User,{className:"h-4 w-4"}),(0,qr.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,qr.jsx)("div",{className:"flex flex-wrap gap-1 qr-2",children:e.tags.map((u,g)=>(0,qr.jsx)(Z,{variant:"secondary",className:"text-Ko",children:u},g))})]})]}),(0,qr.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,qr.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>r(!0),className:"h-8 w-8 qr-0",children:(0,qr.jsx)(bt.Edit2,{className:"h-4 w-4"})}),(0,qr.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 qr-0 text-destructive hover:text-destructive/80",children:(0,qr.jsx)(bt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},vs=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:i})=>{let[r,c]=(0,At.useState)(e.filter(Boolean)),[s]=(0,At.useState)(t.filter(Boolean)),[m,n]=(0,At.useState)("all"),[l,u]=(0,At.useState)(""),[g,v]=(0,At.useState)(!1),S=w=>{if(!w.title||!w.colleague?.id){console.error("Invalid reminder data:",w);return}let H={...w,id:Date.now().toString(),createdAt:new Date};c(se=>[...se,H]),a?.(w)},y=(w,H)=>{if(!w){console.error("No reminder ID provided for update");return}c(se=>se.map(T=>T?.id===w?{...T,...H}:T)),o?.(w,H)},f=w=>{if(!w){console.error("No reminder ID provided for deletion");return}c(H=>H.filter(se=>se?.id!==w)),i?.(w)},I=r.filter(w=>{if(!w)return!1;if(l){let H=l.toLowerCase();if(!(w.title.toLowerCase().includes(H)||w.description.toLowerCase().includes(H)||w.colleague?.name?.toLowerCase().includes(H)||w.tags?.some(T=>T.toLowerCase().includes(H))))return!1}switch(m){case"pending":return!w.isCompleted;case"completed":return w.isCompleted;case"overdue":return!w.isCompleted&&ur(w.dueDate,w.dueTime);case"today":return gr(new Date(w.dueDate));default:return!0}}).sort((w,H)=>{if(!w||!H)return 0;if(w.isCompleted&&!H.isCompleted)return 1;if(!w.isCompleted&&H.isCompleted)return-1;let se={high:3,medium:2,low:1},T=se[H.priority]-se[w.priority];return T!==0?T:w.dueDate.getTime()-H.dueDate.getTime()}),_={total:r.filter(Boolean).length,pending:r.filter(w=>w&&!w.isCompleted).length,completed:r.filter(w=>w&&w.isCompleted).length,overdue:r.filter(w=>w&&!w.isCompleted&&ur(w.dueDate,w.dueTime)).length,today:r.filter(w=>w&&gr(new Date(w.dueDate))).length},Q=s.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return(0,qr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qr.jsx)(Qe,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{v(!0)}}}),(0,qr.jsxs)("div",{className:"h-full bg-background",children:[(0,qr.jsx)(zl,{colleagues:s,onAddReminder:S,open:g,setOpen:v}),(0,qr.jsxs)("div",{className:"qr-6",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,qr.jsxs)("div",{children:[(0,qr.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,qr.jsx)("qr",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,qr.jsxs)(h,{className:"flex items-center space-x-2",onClick:()=>v(!0),children:[(0,qr.jsx)(bt.Plus,{className:"h-4 w-4"}),(0,qr.jsx)("span",{children:"Add Reminder"})]})]}),(0,qr.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,qr.jsxs)(O,{className:"qr-4",children:[(0,qr.jsx)("div",{className:"text-2xl font-bold text-foreground",children:_.total}),(0,qr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,qr.jsxs)(O,{className:"qr-4",children:[(0,qr.jsx)("div",{className:"text-2xl font-bold text-primary",children:_.pending}),(0,qr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,qr.jsxs)(O,{className:"qr-4",children:[(0,qr.jsx)("div",{className:"text-2xl font-bold text-success",children:_.completed}),(0,qr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,qr.jsxs)(O,{className:"qr-4",children:[(0,qr.jsx)("div",{className:"text-2xl font-bold text-destructive",children:_.overdue}),(0,qr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,qr.jsxs)(O,{className:"qr-4",children:[(0,qr.jsx)("div",{className:"text-2xl font-bold text-warning",children:_.today}),(0,qr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,qr.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,qr.jsx)("div",{className:"flex-1",children:(0,qr.jsx)(L,{placeholder:"Search reminders...",value:l,onChange:w=>u(w.target.value),className:"max-w-md"})}),(0,qr.jsxs)(ke,{value:m,onValueChange:w=>n(w),children:[(0,qr.jsx)(Ce,{className:"w-40",children:(0,qr.jsx)(Fe,{})}),(0,qr.jsxs)(Se,{children:[(0,qr.jsxs)(U,{value:"all",children:["All (",_.total,")"]}),(0,qr.jsxs)(U,{value:"pending",children:["Pending (",_.pending,")"]}),(0,qr.jsxs)(U,{value:"completed",children:["Completed (",_.completed,")"]}),(0,qr.jsxs)(U,{value:"overdue",children:["Overdue (",_.overdue,")"]}),(0,qr.jsxs)(U,{value:"today",children:["Today (",_.today,")"]})]})]})]}),(0,qr.jsx)("div",{className:"space-y-4",children:I.length===0?(0,qr.jsxs)(O,{className:"qr-8 text-center",children:[(0,qr.jsx)("div",{className:"text-muted-foreground",children:l||m!=="all"?"No reminders match your filters":"No reminders yet"}),!l&&m==="all"&&(0,qr.jsx)("qr",{className:"text-sm text-muted-foreground/60 qr-2",children:"Create your first reminder to get started"})]}):I.map(w=>w&&(0,qr.jsx)(Vl,{reminder:w,colleagues:s,onUpdateReminder:y,onDeleteReminder:f},w.id))})]})]})]})};var bs=require("next/navigation");function fr({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:i=[],initialReminders:r=[],initialColleagues:c=[],initialUsers:s=[],initialFiles:m=[],initialView:n="kanban",onAddTask:l,onUpdateTask:u,onDeleteTask:g,onTaskClick:v,onAddEpic:S,onUpdateEpic:y,onDeleteEpic:f,onAddTaskToEpic:k,onAddSprint:I,onUpdateSprint:_,onDeleteSprint:Q,onAddProject:w,onUpdateProject:H,onDeleteProject:se,onFileAdd:T,onFileEdit:R,onFileDelete:E,onFileClick:pe,onAddReminder:M,onUpdateReminder:ze,onDeleteReminder:Ie,onViewChange:We,onToggleMobileMenu:D,onTeamClick:ue,onTeamChange:Re,onCopilotClick:rt}){let[Me,De]=(0,At.useState)(t),[ct,yt]=(0,At.useState)(a),[it,wt]=(0,At.useState)(o),[q,x]=(0,At.useState)(i),[ve,ie]=(0,At.useState)(r),[ft,Ot]=(0,At.useState)(c),[Rt,Bo]=(0,At.useState)(s),[Lo,Ja]=(0,At.useState)(m),[jo,Ya]=(0,At.useState)(!1),[Za,Ea]=(0,At.useState)(!1),[Qa,N]=(0,At.useState)(null),[B,we]=(0,At.useState)(null),[Sr,Dr]=(0,At.useState)(null),[ta,kr]=(0,At.useState)(n||"kanban"),[Rs,Es]=(0,At.useState)(!1),Pr=(0,bs.useRouter)();(0,At.useEffect)(()=>{De(t)},[t]),(0,At.useEffect)(()=>{wt(o)},[o]),(0,At.useEffect)(()=>{yt(a)},[a]),(0,At.useEffect)(()=>{x(i)},[i]),(0,At.useEffect)(()=>{Ja(m)},[m]),(0,At.useEffect)(()=>{Bo(s)},[s]),(0,At.useEffect)(()=>{Ot(c)},[c]),(0,At.useEffect)(()=>{ie(r)},[r]),(0,At.useEffect)(()=>{kr(n)},[n]);let As=ct.filter(C=>C.isSelected).map(C=>C.id),eo=it.find(C=>C.isSelected),Is=Me.filter(C=>{let j=As.includes(C.epicId);return!eo||eo.id==="all-tasks"?j:eo.id==="backlog"?j&&!C.sprintId:j&&C.sprintId===eo.id}),Kl=C=>Is.filter(j=>j.status===C),$l=C=>{let j={};return ct.forEach(te=>{j[te.id]=C.filter(Ee=>Ee.epicId===te.id)}),j},_l=C=>{Dr(C)},Gl=C=>{Sr&&(De(j=>j.map(te=>te.id===Sr.id?{...te,status:C}:te)),Dr(null))},Tr=C=>{let j={...C,id:Date.now().toString(),createdAt:new Date};De(te=>[...te,j]),l?.(j)},to=(C,j)=>{De(te=>te.map(Ee=>Ee.id===C?{...Ee,...j}:Ee)),u?.(C,j)},Wl=async(C,j)=>{to(C,j)},Rr=C=>{De(j=>j.filter(te=>te.id!==C)),Qa?.id===C&&N(null),g?.(C)},ql=async C=>{Rr(C)},Ms=C=>{let j={...C,id:Date.now().toString(),isSelected:!1};x(te=>[...te,j]),w?.(C)},Fs=(C,j)=>{x(te=>te.map(Ee=>Ee.id===C?j.isSelected?(Pr.push(`/project/${C}`),{...Ee,...j}):{...Ee,...j}:j.isSelected&&C!==Ee.id?{...Ee,isSelected:!1}:Ee)),H?.(C,j)},Bs=C=>{x(j=>j.filter(te=>te.id!==C)),se?.(C)},Er=C=>{let j={...C,id:Date.now().toString(),isSelected:!0};yt(te=>[...te,j]),S?.({...j})},Ar=()=>{Ea(!0)},Ir=(C,j)=>{yt(te=>te.map(Ee=>Ee.id===C?{...Ee,...j}:Ee)),y?.(C,j)},Mr=C=>{yt(j=>j.filter(te=>te.id!==C)),De(j=>j.filter(te=>te.epicId!==C)),f?.(C)},Fr=C=>{let j={...C,id:Date.now().toString(),isSelected:!1};wt(te=>[...te,j]),I?.(C)},Ls=(C,j)=>{wt(te=>te.map(Ee=>Ee.id===C?j.isSelected?{...Ee,...j}:{...Ee,...j}:j.isSelected&&C!==Ee.id?{...Ee,isSelected:!1}:Ee)),_?.(C,j)},js=C=>{C==="backlog"||C==="all-tasks"||(wt(j=>j.filter(te=>te.id!==C)),De(j=>j.map(te=>te.sprintId===C?{...te,sprintId:void 0}:te)),Q?.(C))},Oo=C=>{N(C)},Os=C=>{C==="planning"&&window.innerWidth<768||(kr(C),We?.(C))},zs=()=>{Es(C=>!C),D?.()},Xl=()=>{Pr.push("/")},Jl=C=>{console.log("Switching to team:",C)},Yl=C=>{console.log("Switching to team:",C)},Hs=C=>{we(C),Ya(!0)},Vs=()=>{Ya(!1),we(null)},Us=C=>{let j={...C,id:Date.now().toString(),createdAt:new Date};ie(te=>[...te,j]),M?.(C)},Ks=(C,j)=>{ie(te=>te.map(Ee=>Ee.id===C?{...Ee,...j}:Ee)),ze?.(C,j)},$s=C=>{ie(j=>j.filter(te=>te.id!==C)),Ie?.(C)},_s=()=>{T?.()},Gs=C=>{R?.(C)},Ws=C=>{Ja(j=>j.filter(te=>te.name!==C)),E?.(C)},qs=C=>{pe?.(C)},Zl=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ql=()=>{switch(ta){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},zo=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ed=zo.sort((C,j)=>j.lastUsed.getTime()-C.lastUsed.getTime()).slice(0,3),td=zo.length>3,ad=zo.slice(3);return(0,qr.jsxs)(Wi,{projects:q,epics:ct,sprints:it,currentView:ta,onUpdateProject:Fs,onDeleteProject:Bs,onAddProject:Ms,onUpdateEpic:Ir,onDeleteEpic:Mr,onAddEpic:Ar,onAddSprint:Fr,onUpdateSprint:Ls,onDeleteSprint:js,onViewChange:Os,mobileMenuOpen:Rs,onToggleMobileMenu:zs,children:[ta==="kanban"&&(0,qr.jsx)("div",{className:"h-full",children:(0,qr.jsx)(ds,{initialProjects:q,initialEpics:ct,initialSprints:it,initialTasks:Me,initialColleagues:ft,initialUsers:Rt,onAddTask:Tr,onUpdateTask:to,onDeleteTask:Rr,onTaskClick:Oo,onAddEpic:Er})}),ta==="planning"&&(0,qr.jsx)("div",{className:"hidden md:block h-full",children:(0,qr.jsx)(Eo,{tasks:Me,epics:ct,sprints:it,onUpdateTask:to,onTaskClick:Oo,onAddSprint:Fr})}),ta==="tasks"&&(0,qr.jsx)("div",{className:"h-full",children:(0,qr.jsx)(vs,{initialReminders:ve,initialColleagues:ft,onAddReminder:Us,onUpdateReminder:Ks,onDeleteReminder:$s})}),ta==="files"&&(0,qr.jsx)("div",{className:"h-full",children:(0,qr.jsx)(za,{initialFiles:Lo,onFileAdd:_s,onFileEdit:Gs,onFileDelete:Ws,onFileClick:qs,compactView:!1})}),ta==="epics"&&(0,qr.jsx)("div",{className:"h-full",children:(0,qr.jsx)(cs,{tasks:Me,epics:ct,sprints:it,onUpdateTask:to,onTaskClick:Oo,onAddTaskToEpic:Hs,onAddEpic:Ar,onUpdateEpic:Ir,onDeleteEpic:Mr})}),(0,qr.jsx)(No,{isOpen:jo,onClose:Vs,onAddTask:Tr,epics:ct,sprints:it,assignees:[...ft,...Rt],defaultEpicId:B||void 0}),(0,qr.jsx)(Do,{isOpen:Za,onClose:()=>Ea(!1),onAddEpic:Er})]})}var hs=be(require("react")),Ga=be(require("@radix-ui/react-progress"));var br=hs.forwardRef(({className:e,value:t,...a},o)=>(0,qr.jsx)(Ga.Root,{ref:o,className:b("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,qr.jsx)(Ga.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));br.displayName=Ga.Root.displayName;function ys({project:e,onOpen:t,onShare:a,className:o}){return(0,qr.jsx)(Ko.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,qr.jsxs)(O,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,qr.jsxs)(Ae,{children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,qr.jsx)(Oe,{children:e.name}),(0,qr.jsxs)(Z,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,qr.jsx)(oa,{children:e.description})]}),(0,qr.jsxs)(le,{className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,qr.jsx)("span",{children:"Progress"}),(0,qr.jsxs)("span",{children:[e.progress,"%"]})]}),(0,qr.jsx)(br,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,qr.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,qr.jsxs)("div",{className:"flex items-center",children:[(0,qr.jsx)(bt.Users,{className:"bt-1 h-4 w-4"}),e.members," members"]}),(0,qr.jsxs)("div",{className:"flex items-center",children:[(0,qr.jsx)(bt.FileText,{className:"bt-1 h-4 w-4"}),e.files," files"]})]})]}),(0,qr.jsxs)(ra,{className:"flex gap-2",children:[(0,qr.jsx)(h,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,qr.jsx)(h,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,qr.jsx)(bt.Share2,{className:"h-4 w-4"})})]})]})})}var Wa=be(require("@radix-ui/react-checkbox")),Ns=be(require("react")),hr=Ns.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(Wa.Root,{className:b("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,qr.jsx)(Wa.Indicator,{className:b("flex items-center justify-center text-current"),children:(0,qr.jsx)(bt.Check,{className:"h-4 w-4"})})}));hr.displayName=Wa.Root.displayName;var Cs=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:i=""})=>{let[r,c]=(0,At.useState)({name:o?.name||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[s,m]=(0,At.useState)({}),n=()=>{let g={};return r.name.trim()?r.name.trim().length<3&&(g.name="Project name must be at least 3 characters"):g.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(g.objectives="Please provide more detailed objectives (at least 10 characters)"):g.objectives="Project objectives are required",r.workInstructions.trim()?r.workInstructions.trim().length<20&&(g.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):g.workInstructions="Work instructions are required",m(g),Object.keys(g).length===0},l=async g=>{if(g.preventDefault(),!!n())try{await e(r)}catch(v){console.error("Error submitting project form:",v)}},u=(g,v)=>{c(S=>({...S,[g]:v})),s[g]&&m(S=>({...S,[g]:void 0}))};return(0,qr.jsxs)(O,{className:`w-full max-w-2xl ${i}`,children:[(0,qr.jsxs)(Ae,{children:[(0,qr.jsxs)(Oe,{className:"flex items-center gap-2",children:[(0,qr.jsx)(bt.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,qr.jsx)(oa,{children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,qr.jsxs)("form",{onSubmit:l,children:[(0,qr.jsxs)(le,{className:"space-y-6",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,qr.jsx)(L,{id:"name",type:"text",placeholder:"Enter project name",value:r.name,onChange:g=>u("name",g.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.name&&(0,qr.jsx)("qr",{className:"text-sm text-red-600",children:s.name})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,qr.jsx)(Ne,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:r.objectives,onChange:g=>u("objectives",g.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,qr.jsxs)("div",{className:"flex justify-between text-Ko text-gray-500",children:[(0,qr.jsx)("span",{children:s.objectives&&(0,qr.jsx)("span",{className:"text-red-600",children:s.objectives})}),(0,qr.jsxs)("span",{children:[r.objectives.length,"/1000"]})]})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,qr.jsx)(Ne,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:g=>u("workInstructions",g.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,qr.jsxs)("div",{className:"flex justify-between text-Ko text-gray-500",children:[(0,qr.jsx)("span",{children:s.workInstructions&&(0,qr.jsx)("span",{className:"text-red-600",children:s.workInstructions})}),(0,qr.jsxs)("span",{children:[r.workInstructions.length,"/2000"]})]})]}),(0,qr.jsxs)("div",{className:"space-y-3",children:[(0,qr.jsx)(P,{className:"text-sm font-medium",children:"Project Management"}),(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)(hr,{id:"plan",checked:r.plan,onCheckedChange:g=>u("plan",g===!0),disabled:a}),(0,qr.jsx)(P,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,qr.jsx)("qr",{className:"text-Ko text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,qr.jsxs)(ra,{className:"flex justify-end gap-3",children:[t&&(0,qr.jsxs)(h,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,qr.jsx)(bt.qr,{className:"h-4 w-4"}),"Cancel"]}),(0,qr.jsx)(h,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)(bt.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,qr.jsxs)(qr.Fragment,{children:[(0,qr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function wr({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[i,r]=(0,At.useState)(!1),[c,s]=(0,At.useState)(!1),m=async l=>{s(!0);try{await t(l),r(!1)}catch(u){console.error("Error creating project:",u)}finally{s(!1)}},n=()=>{r(!0)};return(0,qr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qr.jsx)(Ko.AnimatePresence,{mode:"wait",children:(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qr.jsx)(Qe,{title:"Project Management",description:"Organise 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:n}}),(0,qr.jsxs)("section",{className:"space-y-4 qr-8",children:[(0,qr.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,qr.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(l=>(0,qr.jsx)(ys,{project:l,onOpen:a,onShare:o},l.name))})]})]},"projects-index-view")}),(0,qr.jsx)(pt,{open:i,onOpenChange:r,children:(0,qr.jsxs)(st,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,qr.jsxs)(nt,{className:"sr-only",children:[(0,qr.jsx)(lt,{children:"Create New Project"}),(0,qr.jsx)(Ka,{children:"Fill out the form below to create a new project."})]}),(0,qr.jsx)(Cs,{onSubmit:m,onCancel:()=>r(!1),isLoading:c,className:"border-0 shadow-none"})]})})]})}function Ds({team:e,onOpen:t,className:a}){return(0,qr.jsx)(Ko.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,qr.jsxs)(O,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,qr.jsxs)(Ae,{children:[(0,qr.jsx)(Oe,{className:"text-lg",children:e.name}),(0,qr.jsx)(oa,{className:"qr-1 text-sm",children:e.description})]}),(0,qr.jsxs)(le,{className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,qr.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)(bt.Users,{className:"h-4 w-4 text-blue-500"}),(0,qr.jsx)("span",{children:"Human"})]}),(0,qr.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,qr.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)(bt.Bot,{className:"h-4 w-4 text-purple-500"}),(0,qr.jsx)("span",{children:"Digital"})]}),(0,qr.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,qr.jsxs)("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[(0,qr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qr.jsx)(bt.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,qr.jsx)("span",{children:"Projects"})]}),(0,qr.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,qr.jsx)(ra,{className:"flex gap-2",children:(0,qr.jsx)(h,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}var ks=be(require("react")),qa=be(require("@radix-ui/react-switch"));var Ra=ks.forwardRef(({className:e,...t},a)=>(0,qr.jsx)(qa.Root,{className:b("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,qr.jsx)(qa.Thumb,{className:b("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Ra.displayName=qa.Root.displayName;function Ps({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:i,submitLabel:r,cancelLabel:c="Cancel",readOnly:s=!1}){let[m,n]=(0,At.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[l,u]=(0,At.useState)(!s);(0,At.useEffect)(()=>{e&&n(e)},[e]);let g=f=>{f.preventDefault();let k={id:m.id||Date.now(),name:m.name,description:m.description||null,systemMsg:m.systemMsg||null,useProjects:m.useProjects||!1,useKnowledge:m.useKnowledge||!1,useFiles:m.useFiles||!1,useChat:m.useChat||!1,updatedAt:new Date().toISOString(),createdAt:m.createdAt||new Date().toISOString()};t(k)},v=f=>{f.preventDefault(),u(!l)},S=i||(l?e?"Edit Team":"Create New Team":"View Team"),y=r||(e?"Update Team":"Create Team");return(0,qr.jsxs)(O,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,qr.jsx)(Ae,{children:(0,qr.jsxs)(Oe,{className:"flex items-center gap-2",children:[(0,qr.jsx)(bt.Users,{className:"h-5 w-5"}),S]})}),(0,qr.jsx)(le,{children:(0,qr.jsxs)("form",{onSubmit:g,className:"space-y-6",children:[(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"name",children:"Team Name *"}),(0,qr.jsx)(L,{id:"name",value:m.name||"",onChange:f=>n({...m,name:f.target.value}),required:!0,disabled:o||!l,placeholder:"Enter team name..."})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,qr.jsx)(Ne,{id:"description",value:m.description||"",onChange:f=>n({...m,description:f.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!l})]}),(0,qr.jsxs)("div",{className:"space-y-2",children:[(0,qr.jsx)(P,{htmlFor:"systemMsg",children:"Ways of working"}),(0,qr.jsx)(Ne,{id:"systemMsg",value:m.systemMsg||"",onChange:f=>n({...m,systemMsg:f.target.value}),rows:3,placeholder:"Describe how this team works in At much detail At possible. Include processes, tools, systems, styles...",disabled:o||!l})]})]}),(0,qr.jsxs)("div",{className:"space-y-4",children:[(0,qr.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,qr.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)(Ra,{id:"useProjects",checked:m.useProjects||!1,onCheckedChange:f=>n({...m,useProjects:f}),disabled:o||!l}),(0,qr.jsx)(P,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)(Ra,{id:"useKnowledge",checked:m.useKnowledge||!1,onCheckedChange:f=>n({...m,useKnowledge:f}),disabled:o||!l}),(0,qr.jsx)(P,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)(Ra,{id:"useFiles",checked:m.useFiles||!1,onCheckedChange:f=>n({...m,useFiles:f}),disabled:o||!l}),(0,qr.jsx)(P,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,qr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,qr.jsx)(Ra,{id:"useChat",checked:m.useChat||!1,onCheckedChange:f=>n({...m,useChat:f}),disabled:o||!l}),(0,qr.jsx)(P,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,qr.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,qr.jsx)(h,{type:"button",variant:"outline",onClick:a,disabled:o,children:l?c:"Close"}),l?(0,qr.jsx)(h,{type:"submit",disabled:o||!m.name?.trim(),children:o?"Saving...":y}):(0,qr.jsxs)(h,{type:"button",onClick:v,disabled:o,className:"gap-2",children:[(0,qr.jsx)(bt.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Cr({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,i]=(0,At.useState)(!1),r=()=>{i(!0)},c=n=>{t?.(n),i(!1)},s=()=>{i(!1)},m=n=>{a?.(n)};return(0,qr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,qr.jsx)(Ko.AnimatePresence,{mode:"wait",children:(0,qr.jsxs)(Ko.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,qr.jsx)(Qe,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:r}}),(0,qr.jsxs)("section",{className:"space-y-4 qr-8",children:[(0,qr.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,qr.jsxs)("div",{className:"text-center py-12",children:[(0,qr.jsx)("qr",{className:"text-muted-foreground text-lg",children:"You'qr not part of any teams yet."}),(0,qr.jsx)("qr",{className:"text-muted-foreground text-sm qr-2",children:"Create a new team or ask to be added to an existing one."})]}):(0,qr.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(n=>(0,qr.jsx)(Ds,{team:n,onOpen:m},n.id))})]})]},"teams-index-view")}),(0,qr.jsx)(pt,{open:o,onOpenChange:i,children:(0,qr.jsxs)(st,{className:"max-w-4xl max-h-[90vh] overflow-y-auto qr-0",children:[(0,qr.jsx)("div",{className:"sr-only",children:(0,qr.jsxs)(nt,{children:[(0,qr.jsx)(lt,{children:"Create New Team"}),(0,qr.jsx)(Ka,{children:"Set up a new team to collaborate with colleagues on projects."})]})}),(0,qr.jsx)(Ps,{title:"Create New Team",submitLabel:"Create Team",onSave:c,onCancel:s})]})})]})}0&&(module.exports={ColleaguesView,FileView,KnowledgeView,PlanningView,ProjectView,ProjectsIndexView,TeamsIndexView});
5
+ "use strict";var Ws=Object.create;var ao=Object.defineProperty;var qs=Object.getOwnPropertyDescriptor;var Xs=Object.getOwnPropertyNames;var Js=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Zs=(e,t)=>{for(var a in t)ao(e,a,{get:t[a],enumerable:!0})},Fr=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xs(t))!Ys.call(e,i)&&i!==a&&ao(e,i,{get:()=>t[i],enumerable:!(o=qs(t,i))||o.enumerable});return e};var be=(e,t,a)=>(a=e!=null?Ws(Js(e)):{},Fr(t||!e||!e.__esModule?ao(a,"default",{value:e,enumerable:!0}):a,e)),Qs=e=>Fr(ao({},"__esModule",{value:!0}),e);var Hl={};Zs(Hl,{ColleaguesView:()=>Wo,FileView:()=>za,KnowledgeView:()=>qo,PlanningView:()=>Ao,ProjectView:()=>gr,ProjectsIndexView:()=>yr,TeamsIndexView:()=>Nr});module.exports=Qs(Hl);var Et=require("react"),bt=require("lucide-react");var Ur=require("clsx");var en=e=>{let t=an(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let s=c.split("-");return s[0]===""&&s.length!==1&&s.shift(),jr(s,t)||tn(c)},getConflictingClassGroupIds:(c,s)=>{let m=a[c]||[];return s&&o[c]?[...m,...o[c]]:m}}},jr=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),i=o?jr(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let r=e.join("-");return t.validators.find(({validator:c})=>c(r))?.classGroupId},Br=/^\[(.+)\]$/,tn=e=>{if(Br.test(e)){let t=Br.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},an=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return rn(Object.entries(e.classGroups),a).forEach(([r,c])=>{Vo(c,o,r,t)}),o},Vo=(e,t,a,o)=>{e.forEach(i=>{if(typeof i=="string"){let r=i===""?t:Lr(t,i);r.classGroupId=a;return}if(typeof i=="function"){if(on(i)){Vo(i(o),t,a,o);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([r,c])=>{Vo(c,Lr(t,r),a,o)})})},Lr=(e,t)=>{let a=e;return t.split("-").forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},on=e=>e.isThemeGetter,rn=(e,t)=>t?e.map(([a,o])=>{let i=o.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([c,s])=>[t+c,s])):r);return[a,i]}):e,sn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,i=(r,c)=>{a.set(r,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(r){let c=a.get(r);if(c!==void 0)return c;if((c=o.get(r))!==void 0)return i(r,c),c},set(r,c){a.has(r)?a.set(r,c):i(r,c)}}};var nn=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,i=t[0],r=t.length,c=s=>{let m=[],n=0,l=0,u;for(let f=0;f<s.length;f++){let k=s[f];if(n===0){if(k===i&&(o||s.slice(f,f+r)===t)){m.push(s.slice(l,f)),l=f+r;continue}if(k==="/"){u=f;continue}}k==="["?n++:k==="]"&&n--}let g=m.length===0?s:s.substring(l),v=g.startsWith("!"),S=v?g.substring(1):g,y=u&&u>l?u-l:void 0;return{modifiers:m,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:y}};return a?s=>a({className:s,parseClassName:c}):c},ln=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},dn=e=>({cache:sn(e.cacheSize),parseClassName:nn(e),...en(e)}),cn=/\s+/,mn=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:i}=t,r=[],c=e.trim().split(cn),s="";for(let m=c.length-1;m>=0;m-=1){let n=c[m],{modifiers:l,hasImportantModifier:u,baseClassName:g,maybePostfixModifierPosition:v}=a(n),S=!!v,y=o(S?g.substring(0,v):g);if(!y){if(!S){s=n+(s.length>0?" "+s:s);continue}if(y=o(g),!y){s=n+(s.length>0?" "+s:s);continue}S=!1}let f=ln(l).join(":"),k=u?f+"!":f,I=k+y;if(r.includes(I))continue;r.push(I);let _=i(y,S);for(let Q=0;Q<_.length;++Q){let w=_[Q];r.push(k+w)}s=n+(s.length>0?" "+s:s)}return s};function pn(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Or(t))&&(o&&(o+=" "),o+=a);return o}var Or=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Or(e[o]))&&(a&&(a+=" "),a+=t);return a};function un(e,...t){let a,o,i,r=c;function c(m){let n=t.reduce((l,u)=>u(l),e());return a=dn(n),o=a.cache.get,i=a.cache.set,r=s,s(m)}function s(m){let n=o(m);if(n)return n;let l=mn(m,a);return i(m,l),l}return function(){return r(pn.apply(null,arguments))}}var je=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},zr=/^\[(?:([a-Gr-]+):)?(.+)\]$/i,gn=/^\Gr+\/\Gr+$/,fn=new Set(["px","full","screen"]),vn=/^(\Gr+(\.\Gr+)?)?(bt|sm|md|lg|xl)$/,bn=/\Gr+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,xn=/^(inset_)?-?((\Gr+)?\.?(\Gr+)[a-Gr]+|0)_-?((\Gr+)?\.?(\Gr+)[a-Gr]+|0)/,yn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zt=e=>ha(e)||fn.has(e)||gn.test(e),qt=e=>xa(e,"length",Tn),ha=e=>!!e&&!Number.isNaN(Number(e)),Ho=e=>xa(e,"number",ha),Ea=e=>!!e&&Number.isInteger(Number(e)),wn=e=>e.endsWith("%")&&ha(e.slice(0,-1)),ne=e=>zr.test(e),Xt=e=>vn.test(e),Nn=new Set(["length","size","percentage"]),Cn=e=>xa(e,Nn,Hr),Sn=e=>xa(e,"position",Hr),Dn=new Set(["image","url"]),kn=e=>xa(e,Dn,An),Pn=e=>xa(e,"",Rn),Ia=()=>!0,xa=(e,t,a)=>{let o=zr.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Tn=e=>bn.test(e)&&!hn.test(e),Hr=()=>!1,Rn=e=>xn.test(e),An=e=>yn.test(e);var En=()=>{let e=je("colors"),t=je("spacing"),a=je("blur"),o=je("brightness"),i=je("borderColor"),r=je("borderRadius"),c=je("borderSpacing"),s=je("borderWidth"),m=je("contrast"),n=je("grayscale"),l=je("hueRotate"),u=je("invert"),g=je("gap"),v=je("gradientColorStops"),S=je("gradientColorStopPositions"),y=je("inset"),f=je("margin"),k=je("opacity"),I=je("padding"),_=je("saturate"),Q=je("scale"),w=je("sepia"),H=je("skew"),se=je("space"),T=je("translate"),R=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto",ne,t],M=()=>[ne,t],ze=()=>["",zt,qt],Ie=()=>["auto",ha,ne],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>["start","end","center","between","around","evenly","stretch"],rt=()=>["","0",ne],Me=()=>["auto","avoid","all","avoid-page","page","left","right","column"],De=()=>[ha,ne];return{cacheSize:500,separator:":",theme:{colors:[Ia],spacing:[zt,qt],blur:["none","",Xt,ne],brightness:De(),borderColor:[e],borderRadius:["none","","full",Xt,ne],borderSpacing:M(),borderWidth:ze(),contrast:De(),grayscale:rt(),hueRotate:De(),invert:rt(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[wn,qt],inset:pe(),margin:pe(),opacity:De(),padding:M(),saturate:De(),scale:De(),sepia:rt(),skew:De(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ne]}],container:["container"],columns:[{columns:[Xt]}],"break-after":[{"break-after":Me()}],"break-before":[{"break-before":Me()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...We(),ne]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],Gr:[{Gr:["auto",Ea,ne]}],basis:[{basis:pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ne]}],grow:[{grow:rt()}],shrink:[{shrink:rt()}],order:[{order:["first","last","none",Ea,ne]}],"grid-cols":[{"grid-cols":[Ia]}],"col-start-end":[{col:["auto",{span:["full",Ea,ne]},ne]}],"col-start":[{"col-start":Ie()}],"col-end":[{"col-end":Ie()}],"grid-rows":[{"grid-rows":[Ia]}],"row-start-end":[{row:["auto",{span:[Ea,ne]},ne]}],"row-start":[{"row-start":Ie()}],"row-end":[{"row-end":Ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","Gr",ne]}],"auto-rows":[{"auto-rows":["auto","min","max","Gr",ne]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Re()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Re(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Re(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Gr:[{Gr:[I]}],px:[{px:[I]}],py:[{py:[I]}],Et:[{Et:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],Gr:[{Gr:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ne,t]}],"min-w":[{"min-w":[ne,t,"min","max","fit"]}],"max-w":[{"max-w":[ne,t,"none","full","min","max","fit","prose",{screen:[Xt]},Xt]}],h:[{h:[ne,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ne,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ne,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xt,qt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ho]}],"font-family":[{font:[Ia]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ne]}],"line-clamp":[{"line-clamp":["none",ha,Ho]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zt,ne]}],"list-image":[{"list-image":["none",ne]}],"list-style-type":[{list:["none","disc","decimal",ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zt,qt]}],"underline-offset":[{"underline-offset":["auto",zt,ne]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Sn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Cn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},kn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-Et":[{"rounded-Et":[r]}],"rounded-se":[{"rounded-se":[r]}],"rounded-Gr":[{"rounded-Gr":[r]}],"rounded-Et":[{"rounded-Et":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[zt,ne]}],"outline-w":[{outline:[zt,qt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ze()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[zt,qt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xt,Pn]}],"shadow-color":[{shadow:[Ia]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",Xt,ne]}],grayscale:[{grayscale:[n]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[u]}],saturate:[{saturate:[_]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[n]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ne]}],duration:[{duration:De()}],ease:[{ease:["linear","in","out","in-out",ne]}],delay:[{delay:De()}],animate:[{animate:["none","spin","ping","pulse","bounce",ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Q]}],"scale-x":[{"scale-x":[Q]}],"scale-y":[{"scale-y":[Q]}],rotate:[{rotate:[Ea,ne]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[H]}],"skew-y":[{"skew-y":[H]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ne]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-Gr":[{"scroll-Gr":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-Gr":[{"scroll-Gr":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-Et":[{"scroll-Et":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[zt,qt,Ho]}],stroke:[{stroke:[e,"none"]}],Et:["Et-only","not-Et-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],Gr:["px","py","Et","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","Gr","mr","mb","ml"],mx:["mr","ml"],my:["Gr","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-Et","rounded-se","rounded-Gr","rounded-Et","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-Et","rounded-Et"],"rounded-e":["rounded-se","rounded-Gr"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-Gr","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-Gr","scroll-mb"],"scroll-Gr":["scroll-px","scroll-py","scroll-Et","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Vr=un(En);function b(...e){return Vr((0,Ur.clsx)(e))}var Kr=require("@radix-ui/react-slot"),$r=require("class-variance-authority"),_r=be(require("react")),Gr=require("react/jsx-runtime"),oo=(0,$r.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),h=_r.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...i},r)=>(0,Gr.jsx)(e?Kr.Slot:"button",{className:b(oo({className:t,size:a,variant:o})),ref:r,...i}));h.displayName="Button";var aa=be(require("react"));var O=aa.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,className:b("rounded-xl border bg-card text-card-foreground shadow",e),...t}));O.displayName="Card";var Ee=aa.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,className:b("flex flex-col space-y-1.5 Gr-6",e),...t}));Ee.displayName="CardHeader";var Oe=aa.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,className:b("font-semibold leading-none tracking-tight",e),...t}));Oe.displayName="CardTitle";var oa=aa.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,className:b("text-sm text-muted-foreground",e),...t}));oa.displayName="CardDescription";var le=aa.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,className:b("Gr-6 pt-0",e),...t}));le.displayName="CardContent";var ra=aa.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,className:b("flex items-center Gr-6 pt-0",e),...t}));ra.displayName="CardFooter";var Wr=be(require("react"));var L=Wr.forwardRef(({className:e,type:t,...a},o)=>(0,Gr.jsx)("input",{type:t,className:b("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));L.displayName="Input";var he=be(require("@radix-ui/react-select")),Jt=be(require("react")),ke=he.Root;var Fe=he.Value,Ce=Jt.forwardRef(({children:e,className:t,...a},o)=>(0,$e.jsxs)(he.Trigger,{className:b("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,$e.jsx)(he.Icon,{asChild:!0,children:(0,$e.jsx)(bt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ce.displayName=he.Trigger.displayName;var Xr=Jt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(he.ScrollUpButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,$e.jsx)(bt.ChevronUp,{className:"h-4 w-4"})}));Xr.displayName=he.ScrollUpButton.displayName;var Jr=Jt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(he.ScrollDownButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,$e.jsx)(bt.ChevronDown,{className:"h-4 w-4"})}));Jr.displayName=he.ScrollDownButton.displayName;var Se=Jt.forwardRef(({children:e,className:t,position:a="popper",...o},i)=>(0,$e.jsx)(he.Portal,{children:(0,$e.jsxs)(he.Content,{className:b("relative Gr-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:i,...o,children:[(0,$e.jsx)(Xr,{}),(0,$e.jsx)(he.Viewport,{className:b("Gr-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,$e.jsx)(Jr,{})]})}));Se.displayName=he.Content.displayName;var In=Jt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(he.Label,{className:b("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));In.displayName=he.Label.displayName;var U=Jt.forwardRef(({children:e,className:t,...a},o)=>(0,$e.jsxs)(he.Item,{className:b("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,$e.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$e.jsx)(he.ItemIndicator,{children:(0,$e.jsx)(bt.Check,{className:"h-4 w-4"})})}),(0,$e.jsx)(he.ItemText,{children:e})]}));U.displayName=he.Item.displayName;var Mn=Jt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(he.Separator,{className:b("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Mn.displayName=he.Separator.displayName;var Uo=require("motion/react");var na=be(require("@radix-ui/react-tabs"));function Yr({className:e,...t}){return(0,Gr.jsx)(na.Root,{"data-slot":"tabs",className:b("flex flex-col gap-2",e),...t})}function Zr({className:e,...t}){return(0,Gr.jsx)(na.List,{"data-slot":"tabs-list",className:b("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg Gr-[3px]",e),...t})}function Qr({className:e,...t}){return(0,Gr.jsx)(na.Trigger,{"data-slot":"tabs-trigger",className:b("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Ht=be(require("react")),xe=be(require("@radix-ui/react-dropdown-menu")),ya=require("@radix-ui/react-icons");var io=xe.Root,so=xe.Trigger;var Fn=Ht.forwardRef(({className:e,inset:t,children:a,...o},i)=>(0,Gr.jsxs)(xe.SubTrigger,{ref:i,className:b("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,Gr.jsx)(ya.ChevronRightIcon,{className:"ml-auto"})]}));Fn.displayName=xe.SubTrigger.displayName;var Bn=Ht.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(xe.SubContent,{ref:a,className:b("Gr-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Gr-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Bn.displayName=xe.SubContent.displayName;var Ma=Ht.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Gr.jsx)(xe.Portal,{children:(0,Gr.jsx)(xe.Content,{ref:o,sideOffset:t,className:b("Gr-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Gr-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Ma.displayName=xe.Content.displayName;var la=Ht.forwardRef(({className:e,inset:t,...a},o)=>(0,Gr.jsx)(xe.Item,{ref:o,className:b("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));la.displayName=xe.Item.displayName;var Ln=Ht.forwardRef(({className:e,children:t,checked:a,...o},i)=>(0,Gr.jsxs)(xe.CheckboxItem,{ref:i,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,Gr.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Gr.jsx)(xe.ItemIndicator,{children:(0,Gr.jsx)(ya.CheckIcon,{className:"h-4 w-4"})})}),t]}));Ln.displayName=xe.CheckboxItem.displayName;var jn=Ht.forwardRef(({className:e,children:t,...a},o)=>(0,Gr.jsxs)(xe.RadioItem,{ref:o,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,Gr.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Gr.jsx)(xe.ItemIndicator,{children:(0,Gr.jsx)(ya.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));jn.displayName=xe.RadioItem.displayName;var On=Ht.forwardRef(({className:e,inset:t,...a},o)=>(0,Gr.jsx)(xe.Label,{ref:o,className:b("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));On.displayName=xe.Label.displayName;var zn=Ht.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(xe.Separator,{ref:a,className:b("-mx-1 my-1 h-px bg-muted",e),...t}));zn.displayName=xe.Separator.displayName;var Hn=({className:e,...t})=>(0,Gr.jsx)("span",{className:b("ml-auto text-bt tracking-widest opacity-60",e),...t});Hn.displayName="DropdownMenuShortcut";function no({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:i="700px",gridCols:r=6}){let c=a.find(s=>s.value===e);return(0,Gr.jsxs)(Uo.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,Gr.jsx)("div",{className:"hidden lg:block",children:(0,Gr.jsx)(Yr,{value:e,onValueChange:t,children:(0,Gr.jsx)(Zr,{className:"grid w-full rounded-2xl Gr-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,Gr.jsx)(Uo.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Gr.jsx)(Qr,{value:s.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:s.label})},s.value))})})}),(0,Gr.jsx)("div",{className:"lg:hidden",children:(0,Gr.jsxs)(io,{children:[(0,Gr.jsx)(so,{asChild:!0,children:(0,Gr.jsxs)(h,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,Gr.jsx)(bt.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Gr.jsx)(Ma,{align:"center",className:"w-[180px]",children:a.map(s=>(0,Gr.jsx)(la,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}var lo=be(require("react")),Vt=be(require("@radix-ui/react-avatar"));var Ut=lo.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(Vt.Root,{ref:a,className:b("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ut.displayName=Vt.Root.displayName;var Fa=lo.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(Vt.Image,{ref:a,className:b("aspect-square h-full w-full",e),...t}));Fa.displayName=Vt.Image.displayName;var Kt=lo.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(Vt.Fallback,{ref:a,className:b("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Kt.displayName=Vt.Fallback.displayName;var Vn=(0,$r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-bt font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Z({className:e,variant:t,...a}){return(0,Gr.jsx)("div",{className:b(Vn({variant:t}),e),...a})}function mo({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:i=!0,compact:r=!1,className:c}){let[s,m]=(0,Et.useState)(!1),n=g=>{switch(g){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},l=g=>{switch(g){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},u=g=>{if(!g)return"Never";let S=Math.floor((new Date().getTime()-g.getTime())/(1e3*60));return S<1?"Just now":S<60?`${S}m ago`:S<1440?`${Math.floor(S/60)}h ago`:`${Math.floor(S/1440)}Gr ago`};return(0,Gr.jsxs)(O,{className:b("hover:shadow-md transition-shadow",r&&"Gr-2",c),children:[(0,Gr.jsx)(Ee,{className:b("pb-3",r&&"pb-2"),children:(0,Gr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Gr.jsx)("div",{className:"relative",children:(0,Gr.jsxs)(Ut,{className:b("h-12 w-12",r&&"h-8 w-8"),children:[(0,Gr.jsx)(Fa,{src:"/placeholder.svg",alt:e.name}),(0,Gr.jsx)(Kt,{children:e.name.split(" ").map(g=>g[0]).join("")})]})}),(0,Gr.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)("h3",{className:b("font-semibold text-sm truncate",r&&"text-bt"),children:e.name}),e.type==="digital"?(0,Gr.jsx)(bt.Bot,{className:b("h-4 w-4 text-blue-500",r&&"h-3 w-3")}):(0,Gr.jsx)(bt.User,{className:b("h-4 w-4 text-green-500",r&&"h-3 w-3")})]}),(0,Gr.jsx)("Gr",{className:b("text-sm text-muted-foreground truncate",r&&"text-bt"),children:e.type==="human"?e.role:e.description}),!r&&(0,Gr.jsxs)("div",{className:"flex items-center gap-2 Gr-1",children:[e.type==="human"&&(0,Gr.jsx)(Z,{variant:"secondary",className:"text-bt",children:e.department}),e.type==="digital"&&(0,Gr.jsxs)(Z,{variant:"secondary",className:"text-bt",children:["v",e.version]}),(0,Gr.jsx)(Z,{variant:"outline",className:"text-bt",children:l(e.status)})]})]})]}),i&&(0,Gr.jsxs)(io,{children:[(0,Gr.jsx)(so,{asChild:!0,children:(0,Gr.jsx)(h,{variant:"ghost",size:"icon",className:b("h-8 w-8",r&&"h-6 w-6"),children:(0,Gr.jsx)(bt.MoreHorizontal,{className:b("h-4 w-4",r&&"h-3 w-3")})})}),(0,Gr.jsxs)(Ma,{align:"end",children:[(0,Gr.jsxs)(la,{onClick:()=>o?.(e),children:[(0,Gr.jsx)(bt.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,Gr.jsxs)(la,{onClick:()=>t?.(e),children:[(0,Gr.jsx)(bt.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]}),(0,Gr.jsxs)(la,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,Gr.jsx)(bt.Trash2,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),!r&&(0,Gr.jsxs)(le,{className:"pt-0",children:[(0,Gr.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,Gr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Gr.jsx)(bt.Mail,{className:"h-3 w-3"}),(0,Gr.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,Gr.jsxs)(Gr.Fragment,{children:[e.phone&&(0,Gr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Gr.jsx)(bt.Phone,{className:"h-3 w-3"}),(0,Gr.jsx)("span",{children:e.phone})]}),e.location&&(0,Gr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Gr.jsx)(bt.MapPin,{className:"h-3 w-3"}),(0,Gr.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,Gr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Gr.jsx)(bt.Settings,{className:"h-3 w-3"}),(0,Gr.jsxs)("span",{children:["v",e.version]})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Gr.jsx)(bt.Clock,{className:"h-3 w-3"}),(0,Gr.jsxs)("span",{children:["Last active: ",u(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,Gr.jsx)("div",{className:"Gr-3",children:(0,Gr.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,s?e.skills.length:3).map(g=>(0,Gr.jsx)(Z,{variant:"outline",className:"text-bt",children:g},g)),e.skills.length>3&&(0,Gr.jsx)(h,{variant:"ghost",size:"sm",className:"h-5 px-2 text-bt",onClick:()=>m(!s),children:s?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,Gr.jsx)("div",{className:"Gr-3",children:(0,Gr.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,s?e.capabilities.length:2).map(g=>(0,Gr.jsx)(Z,{variant:"outline",className:"text-bt",children:g},g)),e.capabilities.length>2&&(0,Gr.jsx)(h,{variant:"ghost",size:"sm",className:"h-5 px-2 text-bt",onClick:()=>m(!s),children:s?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}var ri=be(require("react")),Ko=be(require("@radix-ui/react-label"));var Un=(0,$r.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),P=ri.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(Ko.Root,{ref:a,className:b(Un(),e),...t}));P.displayName=Ko.Root.displayName;var ni=be(require("react")),Ne=ni.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("textarea",{className:b("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Ne.displayName="Textarea";var $o=be(require("react")),Nt=be(require("@radix-ui/react-scroll-area"));var Ba=$o.forwardRef(({className:e,children:t,...a},o)=>(0,Gr.jsxs)(Nt.Root,{ref:o,className:b("relative overflow-hidden",e),...a,children:[(0,Gr.jsx)(Nt.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Gr.jsx)(di,{}),(0,Gr.jsx)(Nt.Corner,{})]}));Ba.displayName=Nt.Root.displayName;var di=$o.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Gr.jsx)(Nt.ScrollAreaScrollbar,{ref:o,orientation:t,className:b("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent Gr-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent Gr-[1px]",e),...a,children:(0,Gr.jsx)(Nt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));di.displayName=Nt.ScrollAreaScrollbar.displayName;function _o({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:i="Search knowledge documents...",maxSelections:r,disabled:c=!1}){let[s,m]=(0,Et.useState)(""),[n,l]=(0,Et.useState)([]),[u,g]=(0,Et.useState)(!1);(0,Et.useEffect)(()=>{if(!s.trim()){l([]),g(!1);return}let f=a.filter(k=>{if(e.map(Q=>Q.id).includes(k.id))return!1;let _=s.toLowerCase();return k.title.toLowerCase().includes(_)||k.description?.toLowerCase().includes(_)||k.tags?.some(Q=>Q.toLowerCase().includes(_))||Object.values(k.metadata||{}).some(Q=>String(Q).toLowerCase().includes(_))});l(f),g(!0)},[s,e,a]);let v=f=>{r&&e.length>=r||(t([...e,f]),m(""),g(!1))},S=f=>{t(e.filter(k=>k.id!==f))},y=!r||e.length<r;return(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:o}),(0,Gr.jsxs)("div",{className:"relative",children:[(0,Gr.jsxs)("div",{className:"relative",children:[(0,Gr.jsx)($t.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Gr.jsx)(L,{value:s,onChange:f=>m(f.target.value),placeholder:y?i:`Maximum ${r} documents selected`,className:"pl-9",disabled:c||!y,onFocus:()=>s&&g(!0)})]}),u&&n.length>0&&(0,Gr.jsx)(O,{className:"absolute top-full left-0 right-0 Gr-10 Gr-1 max-h-60",children:(0,Gr.jsx)(Ba,{className:"h-full",children:(0,Gr.jsx)(le,{className:"Gr-2",children:n.map(f=>(0,Gr.jsx)(h,{variant:"ghost",className:"w-full justify-start h-auto Gr-3 mb-1",onClick:()=>v(f),disabled:c,children:(0,Gr.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,Gr.jsx)($t.FileText,{className:"h-4 w-4 Gr-0.5 text-muted-foreground flex-shrink-0"}),(0,Gr.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,Gr.jsx)("div",{className:"font-medium text-sm truncate",children:f.title}),f.description&&(0,Gr.jsx)("div",{className:"text-bt text-muted-foreground Gr-1 line-clamp-2",children:f.description}),f.tags&&f.tags.length>0&&(0,Gr.jsxs)("div",{className:"flex flex-wrap gap-1 Gr-2",children:[f.tags.slice(0,3).map(k=>(0,Gr.jsx)(Z,{variant:"outline",className:"text-bt",children:k},k)),f.tags.length>3&&(0,Gr.jsxs)(Z,{variant:"outline",className:"text-bt",children:["+",f.tags.length-3," more"]})]})]})]})},f.id))})})}),u&&s&&n.length===0&&(0,Gr.jsx)(O,{className:"absolute top-full left-0 right-0 Gr-10 Gr-1",children:(0,Gr.jsxs)(le,{className:"Gr-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',s,'"']})})]}),e.length>0&&(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,r&&`/${r}`,")"]}),(0,Gr.jsx)("div",{className:"space-y-2",children:e.map(f=>(0,Gr.jsx)(O,{className:"Gr-3",children:(0,Gr.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Gr.jsx)($t.FileText,{className:"h-4 w-4 Gr-0.5 text-muted-foreground flex-shrink-0"}),(0,Gr.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Gr.jsx)("div",{className:"font-medium text-sm",children:f.title}),f.description&&(0,Gr.jsx)("div",{className:"text-bt text-muted-foreground Gr-1",children:f.description}),f.tags&&f.tags.length>0&&(0,Gr.jsx)("div",{className:"flex flex-wrap gap-1 Gr-2",children:f.tags.map(k=>(0,Gr.jsxs)(Z,{variant:"outline",className:"text-bt",children:[(0,Gr.jsx)($t.Tag,{className:"h-3 w-3 mr-1"}),k]},k))})]}),(0,Gr.jsx)(h,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>S(f.id),disabled:c,children:(0,Gr.jsx)($t.Gr,{className:"h-3 w-3"})})]})},f.id))})]}),u&&(0,Gr.jsx)("div",{className:"fixed inset-0 Gr-0",onClick:()=>g(!1)})]})}function Go({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:i,submitLabel:r,cancelLabel:c="Cancel",readOnly:s=!1,availableKnowledgeDocuments:m=[]}){let[n,l]=(0,Et.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[u,g]=(0,Et.useState)(""),[v,S]=(0,Et.useState)(""),[y,f]=(0,Et.useState)(!s);(0,Et.useEffect)(()=>{e&&l(e)},[e]);let k=T=>{T.preventDefault();let R=n.version?parseInt(n.version):0,A=e?(R+1).toString():"1",pe={id:n.id||Date.now().toString(),name:n.name,type:"digital",status:"active",joinedDate:n.joinedDate||new Date,lastActive:n.lastActive||new Date,description:n.description,jobDescription:n.jobDescription||"",workInstructions:n.workInstructions||"",capabilities:n.capabilities||[],knowledge:n.knowledge||[],coreKnowledge:n.coreKnowledge||[],version:A,lastUpdated:n.lastUpdated||new Date,isActive:!0};t(pe)},I=(T,R,A)=>{if(!R.trim())return;let pe=n[T]||[];l({...n,[T]:[...pe,R.trim()]}),A("")},_=(T,R)=>{let A=n[T]||[];l({...n,[T]:A.filter((pe,M)=>M!==R)})},Q=T=>{T.preventDefault(),f(!y)},w=(T,R,A,pe,M)=>{let ze=n[T]||[];return(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:R}),y&&(0,Gr.jsxs)("div",{className:"flex gap-2",children:[(0,Gr.jsx)(L,{value:A,onChange:Ie=>pe(Ie.target.value),placeholder:M,onKeyPress:Ie=>{Ie.key==="Enter"&&(Ie.preventDefault(),I(T,A,pe))},disabled:o}),(0,Gr.jsx)(h,{type:"button",variant:"outline",size:"icon",onClick:()=>I(T,A,pe),disabled:o,children:(0,Gr.jsx)(bt.Plus,{className:"h-4 w-4"})})]}),(0,Gr.jsx)("div",{className:"flex flex-wrap gap-2",children:ze.map((Ie,We)=>(0,Gr.jsxs)(Z,{className:"gap-1",children:[Ie,y&&(0,Gr.jsx)(h,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 Gr-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>_(T,We),disabled:o,children:(0,Gr.jsx)(bt.Gr,{className:"h-3 w-3"})})]},`${T}-${We}-${Ie}`))})]})},H=i||(y?e?"Edit Colleague":"Add New Colleague":"View Colleague"),se=r||(e?"Update Colleague":"Add Colleague");return(0,Gr.jsxs)(O,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,Gr.jsx)(Ee,{children:(0,Gr.jsxs)(Oe,{className:"flex items-center gap-2",children:[(0,Gr.jsx)(bt.Bot,{className:"h-5 w-5"}),H]})}),(0,Gr.jsx)(le,{children:(0,Gr.jsxs)("form",{onSubmit:k,className:"space-y-6",children:[(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"name",children:"Name *"}),(0,Gr.jsx)(L,{id:"name",value:n.name||"",onChange:T=>l({...n,name:T.target.value}),required:!0,disabled:o||!y})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,Gr.jsx)(Ne,{id:"description",value:n.description||"",onChange:T=>l({...n,description:T.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!y})]})]}),(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Gr.jsx)(Ne,{id:"jobDescription",value:n.jobDescription||"",onChange:T=>l({...n,jobDescription:T.target.value}),rows:4,required:n.type==="digital",disabled:o||!y})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Gr.jsx)(Ne,{id:"workInstructions",value:n.workInstructions||"",onChange:T=>l({...n,workInstructions:T.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!y})]}),w("capabilities","Capabilities",v,S,"Add capability"),(0,Gr.jsx)(_o,{selectedDocuments:n.knowledge||[],onDocumentsChange:T=>l({...n,knowledge:T}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!y,availableDocuments:m}),(0,Gr.jsx)(_o,{selectedDocuments:n.coreKnowledge||[],onDocumentsChange:T=>l({...n,coreKnowledge:T}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!y,availableDocuments:m})]}),(0,Gr.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,Gr.jsx)(h,{type:"button",variant:"outline",onClick:a,disabled:o,children:y?c:"Close"}),y?(0,Gr.jsx)(h,{type:"submit",disabled:o,children:o?"Saving...":se}):(0,Gr.jsxs)(h,{type:"button",onClick:Q,disabled:o,className:"gap-2",children:[(0,Gr.jsx)(bt.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function ci({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[i,r]=(0,Et.useState)(""),c=(0,Et.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(i.toLowerCase())||m.email.toLowerCase().includes(i.toLowerCase())||m.role.toLowerCase().includes(i.toLowerCase())||(m.skills||[]).some(l=>l.toLowerCase().includes(i.toLowerCase()))),[e,i]),s=m=>{t(m)};return(0,Gr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Gr.jsx)(Uo.AnimatePresence,{mode:"wait",children:(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Gr.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Gr.jsx)(bt.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground",children:"Choose a user to add Et a colleague"})]})]}),(0,Gr.jsx)(O,{className:"container",children:(0,Gr.jsx)(le,{className:"pt-6",children:(0,Gr.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,Gr.jsx)("div",{className:"flex-1",children:(0,Gr.jsxs)("div",{className:"relative",children:[(0,Gr.jsx)(bt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Gr.jsx)(L,{placeholder:"Search users by name, email, role, or skills...",value:i,onChange:m=>r(m.target.value),className:"pl-9"})]})})})})}),(0,Gr.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:c.map(m=>(0,Gr.jsx)(Uo.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Gr.jsxs)(O,{className:`cursor-pointer transition-all hover:shadow-lg ${o===m.id?"ring-2 ring-primary":""}`,onClick:()=>s(m),children:[(0,Gr.jsx)(Ee,{className:"pb-3",children:(0,Gr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Gr.jsxs)(Ut,{children:[(0,Gr.jsx)(Fa,{src:m.avatar,alt:m.name}),(0,Gr.jsx)(Kt,{children:(0,Gr.jsx)(bt.User,{className:"h-4 w-4"})})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(Oe,{className:"text-lg",children:m.name}),(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground",children:m.role})]})]}),o===m.id&&(0,Gr.jsx)(bt.Check,{className:"h-5 w-5 text-primary"})]})}),(0,Gr.jsx)(le,{className:"pt-0",children:(0,Gr.jsxs)("div",{className:"space-y-3",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Gr.jsx)("Gr",{className:"text-sm font-medium",children:m.email})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground",children:"Department"}),(0,Gr.jsx)(Z,{variant:"secondary",children:m.department})]}),m.location&&(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground",children:"Location"}),(0,Gr.jsx)("Gr",{className:"text-sm",children:m.location})]}),m.skills&&m.skills.length>0&&(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,Gr.jsxs)("div",{className:"flex flex-wrap gap-1",children:[m.skills.slice(0,3).map(n=>(0,Gr.jsx)(Z,{variant:"outline",className:"text-bt",children:n},n)),m.skills.length>3&&(0,Gr.jsxs)(Z,{variant:"outline",className:"text-bt",children:["+",m.skills.length-3]})]})]})]})})]})},m.id))}),c.length===0&&(0,Gr.jsx)(O,{className:"container Gr-4",children:(0,Gr.jsx)(le,{className:"pt-6",children:(0,Gr.jsxs)("div",{className:"text-center py-8",children:[(0,Gr.jsx)(bt.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Gr.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function mi({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[i,r]=(0,Et.useState)(""),[c,s]=(0,Et.useState)("all"),m=(0,Et.useMemo)(()=>e.filter(u=>{let g=u.name.toLowerCase().includes(i.toLowerCase())||u.jobDescription.toLowerCase().includes(i.toLowerCase())||u.capabilities.some(S=>S.toLowerCase().includes(i.toLowerCase()))||u.workInstructions.toLowerCase().includes(i.toLowerCase()),v=c==="all"||u.status===c;return g&&v}),[e,i,c]),n=u=>{let g={...u,id:`${u.id}-clone-${Date.now()}`,name:`${u.name} (Copy)`,joinedDate:new Date,lastActive:new Date,lastUpdated:new Date,version:"1.0.0"};t(g)},l=u=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(u);return(0,Gr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Gr.jsx)(Uo.AnimatePresence,{mode:"wait",children:(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Gr.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Gr.jsx)(bt.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,Gr.jsx)(O,{children:(0,Gr.jsx)(le,{className:"pt-6",children:(0,Gr.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Gr.jsx)("div",{className:"flex-1",children:(0,Gr.jsxs)("div",{className:"relative",children:[(0,Gr.jsx)(bt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Gr.jsx)(L,{placeholder:"Search by name, job description, or capabilities...",value:i,onChange:u=>r(u.target.value),className:"pl-9"})]})}),(0,Gr.jsxs)("select",{value:c,onChange:u=>s(u.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,Gr.jsx)("option",{value:"all",children:"All Status"}),(0,Gr.jsx)("option",{value:"active",children:"Active"}),(0,Gr.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Gr.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:m.map(u=>(0,Gr.jsx)(Uo.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Gr.jsxs)(O,{className:`cursor-pointer transition-all hover:shadow-lg ${o===u.id?"ring-2 ring-primary":""}`,onClick:()=>n(u),children:[(0,Gr.jsx)(Ee,{className:"pb-3",children:(0,Gr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Gr.jsx)(Ut,{children:(0,Gr.jsx)(Kt,{className:"bg-blue-100",children:(0,Gr.jsx)(bt.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsxs)(Oe,{className:"text-lg flex items-center gap-2",children:[u.name,(0,Gr.jsx)(Z,{variant:u.status==="active"?"default":"secondary",className:"text-bt",children:u.status})]}),(0,Gr.jsxs)("Gr",{className:"text-sm text-muted-foreground",children:["v",u.version]})]})]}),(0,Gr.jsxs)(h,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:g=>{g.stopPropagation(),n(u)},children:[(0,Gr.jsx)(bt.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,Gr.jsx)(le,{className:"pt-0",children:(0,Gr.jsxs)("div",{className:"space-y-3",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Gr.jsx)("Gr",{className:"text-sm line-clamp-2",children:u.jobDescription})]}),u.capabilities&&u.capabilities.length>0&&(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Gr.jsxs)("div",{className:"flex flex-wrap gap-1",children:[u.capabilities.slice(0,3).map(g=>(0,Gr.jsx)(Z,{variant:"outline",className:"text-bt",children:g},g)),u.capabilities.length>3&&(0,Gr.jsxs)(Z,{variant:"outline",className:"text-bt",children:["+",u.capabilities.length-3]})]})]}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-bt text-muted-foreground",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Gr.jsx)(bt.Calendar,{className:"h-3 w-3"}),(0,Gr.jsxs)("span",{children:["Updated ",l(u.lastUpdated)]})]}),u.knowledge&&(0,Gr.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Gr.jsx)(bt.Users,{className:"h-3 w-3"}),(0,Gr.jsxs)("span",{children:[u.knowledge.length," docs"]})]})]}),u.workInstructions&&(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Gr.jsx)("Gr",{className:"text-bt line-clamp-2",children:u.workInstructions})]})]})})]})},u.id))}),m.length===0&&(0,Gr.jsx)(O,{children:(0,Gr.jsx)(le,{className:"pt-6",children:(0,Gr.jsxs)("div",{className:"text-center py-8",children:[(0,Gr.jsx)(bt.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Gr.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function pi({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Gr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Gr.jsx)(Uo.AnimatePresence,{mode:"wait",children:(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Gr.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Gr.jsx)(bt.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,Gr.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Gr.jsx)(Uo.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Gr.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Gr.jsxs)(Ee,{className:"text-center pb-4",children:[(0,Gr.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Gr.jsx)(bt.User,{className:"h-8 w-8 text-blue-600"})}),(0,Gr.jsx)(Oe,{className:"text-xl",children:"Add Human Colleague"})]}),(0,Gr.jsxs)(le,{className:"text-center",children:[(0,Gr.jsx)("Gr",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add Et team members."}),(0,Gr.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Gr.jsx)(bt.Users,{className:"h-4 w-4 text-blue-600"}),(0,Gr.jsx)("span",{children:"Browse existing users"})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Gr.jsx)(bt.User,{className:"h-4 w-4 text-blue-600"}),(0,Gr.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Gr.jsx)(h,{className:"Gr-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,Gr.jsx)(Uo.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Gr.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Gr.jsxs)(Ee,{className:"text-center pb-4",children:[(0,Gr.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Gr.jsx)(bt.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,Gr.jsx)(Oe,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,Gr.jsxs)(le,{className:"text-center",children:[(0,Gr.jsx)("Gr",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,Gr.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Gr.jsx)(bt.Bot,{className:"h-4 w-4 text-purple-600"}),(0,Gr.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Gr.jsx)(bt.Users,{className:"h-4 w-4 text-purple-600"}),(0,Gr.jsx)("span",{children:"Create from templates"})]})]}),(0,Gr.jsx)(h,{className:"Gr-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function ui({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Gr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Gr.jsx)(Uo.AnimatePresence,{mode:"wait",children:(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Gr.jsxs)(h,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Gr.jsx)(bt.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,Gr.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Gr.jsx)(Uo.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Gr.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Gr.jsxs)(Ee,{className:"text-center pb-4",children:[(0,Gr.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Gr.jsx)(bt.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,Gr.jsx)(Oe,{className:"text-xl",children:"Clone Existing"})]}),(0,Gr.jsxs)(le,{className:"text-center",children:[(0,Gr.jsx)("Gr",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize it for your needs."}),(0,Gr.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Gr.jsx)(bt.Bot,{className:"h-4 w-4 text-blue-600"}),(0,Gr.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Gr.jsx)(bt.Copy,{className:"h-4 w-4 text-blue-600"}),(0,Gr.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Gr.jsx)(h,{className:"Gr-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Gr.jsx)(Uo.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Gr.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Gr.jsxs)(Ee,{className:"text-center pb-4",children:[(0,Gr.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Gr.jsx)(bt.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,Gr.jsx)(Oe,{className:"text-xl",children:"Create New"})]}),(0,Gr.jsxs)(le,{className:"text-center",children:[(0,Gr.jsx)("Gr",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Gr.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Gr.jsx)(bt.Plus,{className:"h-4 w-4 text-green-600"}),(0,Gr.jsx)("span",{children:"Custom job description"})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Gr.jsx)(bt.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,Gr.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Gr.jsx)(h,{className:"Gr-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}function gi(e,t){let[a,o]=(0,Et.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),i=r=>{try{o(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,Et.useEffect)(()=>{i(a)},[]),[a,i]}var go=require("react-icons/fa");function Qe({title:e,description:t,badge:a,primaryAction:o,secondaryAction:i,gradient:r,children:c,className:s}){let[m,n]=gi(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!i&&!t),l=!i&&!t||m;return(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${r} Gr-8 text-white ${s||""}`,children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Gr.jsx)(Z,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Gr.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-3",children:[l&&o&&(0,Gr.jsx)(h,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(i||t)&&(0,Gr.jsx)("button",{"aria-label":m?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 Gr-1 text-white transition-colors",onClick:()=>n(!m),style:{lineHeight:0},children:m?(0,Gr.jsx)(go.FaChevronDown,{size:22}):(0,Gr.jsx)(go.FaChevronUp,{size:22})})]})]}),!l&&(0,Gr.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsx)("Gr",{className:"max-w-[600px] text-white/80",children:t}),(0,Gr.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Gr.jsx)(h,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),i&&(0,Gr.jsx)(h,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),c&&(0,Gr.jsx)("div",{className:"hidden lg:block",children:c})]})]})}function Wo({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:i=!1,departments:r=["Design","Engineering","Marketing","Product","Sales","Operations"],className:c,availableUsers:s=[],existingDigitalColleagues:m=[]}){let[n,l]=(0,Et.useState)(e||[]),[u,g]=(0,Et.useState)(""),[v,S]=(0,Et.useState)("all"),[y,f]=(0,Et.useState)("all"),[k,I]=(0,Et.useState)("all"),[_,Q]=(0,Et.useState)(null),[w,H]=(0,Et.useState)(null);(0,Et.useEffect)(()=>{l(e||[])},[e]);let se=Array.isArray(s)?s:[],T=Array.isArray(m)?m:[],[R,A]=(0,Et.useState)("main"),pe=n.filter(x=>{if(!x||!x.name)return!1;let ve=x.name.toLowerCase().includes(u.toLowerCase())||x.type==="human"&&(x.email?.toLowerCase().includes(u.toLowerCase())||x.role?.toLowerCase().includes(u.toLowerCase()))||x.type==="digital"&&x.jobDescription?.toLowerCase().includes(u.toLowerCase()),ie=v==="all"||x.type==="human"&&x.department===v,ft=y==="all"||x.status===y;return ve&&ie&&ft}),M=pe.filter(x=>x.type==="human"),ze=pe.filter(x=>x.type==="digital"),Ie=()=>{A("typeSelection")},We=x=>{x.type==="digital"&&(Q(x),A("form")),console.log("Editing colleague:",x),a?.(x)},D=x=>{x.type==="digital"&&(H(x),A("view"))},ue=x=>{let ve={id:`human-${Date.now()}`,type:"human",name:x.name,email:x.email,role:x.role,department:x.department,phone:x.phone,location:x.location,timezone:x.timezone,skills:x.skills||[],bio:x.bio,status:"active",joinedDate:new Date,lastActive:new Date};l(ie=>[...ie,ve]),t?.(ve),A("main")},Re=x=>{if(!x||!x.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",x);return}l(ve=>[...ve,x]),t?.(x),A("main")},rt=()=>{Q(null),A("form")},Me=x=>{if(!x||!x.id){console.error("Invalid colleague provided to handleSaveColleague:",x);return}_?(l(ve=>ve.map(ie=>ie.id===x.id?x:ie)),a?.(x)):(l(ve=>[...ve,x]),t?.(x)),A("main"),Q(null)},De=()=>{A("main"),Q(null),H(null)},ct=()=>{A("main"),H(null)},yt=()=>{w&&(Q(w),H(null),A("form"))},it=x=>{console.log("handling delete colleague",x),l(ve=>ve.filter(ie=>ie.id!==x)),o?.(x)},wt=()=>{g(""),S("all"),f("all")},q=()=>{let x=[];return T.forEach(ie=>{ie.knowledge&&Array.isArray(ie.knowledge)&&x.push(...ie.knowledge),ie.coreKnowledge&&Array.isArray(ie.coreKnowledge)&&x.push(...ie.coreKnowledge)}),n.forEach(ie=>{ie.type==="digital"&&(ie.knowledge&&Array.isArray(ie.knowledge)&&x.push(...ie.knowledge),ie.coreKnowledge&&Array.isArray(ie.coreKnowledge)&&x.push(...ie.coreKnowledge))}),x.filter((ie,ft,Ot)=>ft===Ot.findIndex(Rt=>Rt.id===ie.id))};return R==="typeSelection"?(0,Gr.jsx)(pi,{onSelectHuman:()=>A("userSelection"),onSelectDigital:()=>A("digitalOptions"),onCancel:()=>A("main")}):R==="userSelection"?(0,Gr.jsx)(ci,{users:se,onUserSelect:ue,onCancel:()=>A("typeSelection")}):R==="digitalOptions"?(0,Gr.jsx)(ui,{onCloneExisting:()=>A("digitalClone"),onCreateNew:rt,onCancel:()=>A("typeSelection")}):R==="digitalClone"?(0,Gr.jsx)(mi,{digitalColleagues:T,onColleagueClone:Re,onCancel:()=>A("digitalOptions")}):R==="form"?(0,Gr.jsx)(Go,{colleague:_||void 0,onSave:Me,onCancel:De,availableKnowledgeDocuments:q()}):R==="view"?(0,Gr.jsx)(Go,{colleague:w||void 0,onSave:Me,onCancel:ct,readOnly:!0,availableKnowledgeDocuments:q()}):(0,Gr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Gr.jsx)(Uo.AnimatePresence,{mode:"wait",children:(0,Gr.jsx)(Uo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Gr.jsxs)("div",{className:`space-y-6 ${c||""}`,children:[(0,Gr.jsx)(Qe,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:Ie}}),(0,Gr.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Gr.jsxs)(O,{children:[(0,Gr.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Gr.jsx)(Oe,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Gr.jsx)(bt.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Gr.jsxs)(le,{children:[(0,Gr.jsx)("div",{className:"text-2xl font-bold",children:n.length}),(0,Gr.jsxs)("Gr",{className:"text-bt text-muted-foreground",children:[n.filter(x=>x.status==="active").length," active"]})]})]}),(0,Gr.jsxs)(O,{children:[(0,Gr.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Gr.jsx)(Oe,{className:"text-sm font-medium",children:"Human Members"}),(0,Gr.jsx)(bt.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Gr.jsxs)(le,{children:[(0,Gr.jsx)("div",{className:"text-2xl font-bold",children:n.filter(x=>x.type==="human").length}),(0,Gr.jsxs)("Gr",{className:"text-bt text-muted-foreground",children:[n.filter(x=>x.type==="human"&&x.status==="active").length," ","active"]})]})]}),(0,Gr.jsxs)(O,{children:[(0,Gr.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Gr.jsx)(Oe,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Gr.jsx)(bt.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Gr.jsxs)(le,{children:[(0,Gr.jsx)("div",{className:"text-2xl font-bold",children:n.filter(x=>x.type==="digital").length}),(0,Gr.jsxs)("Gr",{className:"text-bt text-muted-foreground",children:[n.filter(x=>x.type==="digital"&&x.status==="active").length," ","active"]})]})]})]}),(0,Gr.jsx)(O,{children:(0,Gr.jsx)(le,{className:"pt-6",children:(0,Gr.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Gr.jsx)("div",{className:"flex-1",children:(0,Gr.jsxs)("div",{className:"relative",children:[(0,Gr.jsx)(bt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Gr.jsx)(L,{placeholder:"Search colleagues...",value:u,onChange:x=>g(x.target.value),className:"pl-9"})]})}),(0,Gr.jsxs)(ke,{value:v,onValueChange:S,children:[(0,Gr.jsx)(Ce,{className:"w-full md:w-[180px]",children:(0,Gr.jsx)(Fe,{placeholder:"Department"})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"all",children:"All Departments"}),r.map(x=>(0,Gr.jsx)(U,{value:x,children:x},x))]})]}),(0,Gr.jsxs)(ke,{value:y,onValueChange:f,children:[(0,Gr.jsx)(Ce,{className:"w-full md:w-[140px]",children:(0,Gr.jsx)(Fe,{placeholder:"Status"})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"all",children:"All Status"}),(0,Gr.jsx)(U,{value:"active",children:"Active"}),(0,Gr.jsx)(U,{value:"inactive",children:"Inactive"})]})]}),(u||v!=="all"||y!=="all")&&(0,Gr.jsxs)(h,{variant:"outline",onClick:wt,className:"gap-2",children:[(0,Gr.jsx)(bt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsx)(no,{activeTab:k,onTabChange:I,tabOptions:[{value:"all",label:`All (${pe.length})`},{value:"human",label:`Human (${M.length})`},{value:"digital",label:`Digital (${ze.length})`}],maxWidth:"400px",gridCols:3}),k==="all"&&(0,Gr.jsx)("div",{className:`grid gap-4 ${i?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:pe.map(x=>(0,Gr.jsx)(mo,{colleague:x,onEdit:We,onDelete:it,onViewDetails:D,compact:i},`${x}-${x.id}`))}),k==="human"&&(0,Gr.jsx)("div",{className:`grid gap-4 ${i?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:M.map(x=>(0,Gr.jsx)(mo,{colleague:x,onEdit:We,onDelete:it,onViewDetails:D,compact:i},x.id))}),k==="digital"&&(0,Gr.jsx)("div",{className:`grid gap-4 ${i?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:ze.map(x=>(0,Gr.jsx)(mo,{colleague:x,onEdit:We,onDelete:it,onViewDetails:D,compact:i},x.id))})]}),pe.length===0&&(0,Gr.jsx)(O,{children:(0,Gr.jsx)(le,{className:"pt-6",children:(0,Gr.jsxs)("div",{className:"text-center py-8",children:[(0,Gr.jsx)(bt.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Gr.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground mb-4",children:u||v!=="all"||y!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,Gr.jsxs)(h,{onClick:Ie,className:"gap-2",children:[(0,Gr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function vo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:i=!0,className:r}){return(0,Gr.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${r||""}`,children:[i&&(0,Gr.jsxs)("div",{className:"bg-muted/50 Gr-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Gr.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Gr.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Gr.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Gr.jsx)("div",{className:"divide-y",children:e.map(c=>(0,Gr.jsxs)(Uo.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"Gr-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(c),children:[(0,Gr.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Gr.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,Gr.jsx)("div",{children:(0,Gr.jsx)("Gr",{className:"font-medium",children:c.name})})]}),(0,Gr.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:c.filesize}),(0,Gr.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Gr.jsx)("span",{className:"text-sm md:text-base",children:typeof c.createdAt=="string"?c.createdAt:c.createdAt.toLocaleDateString()}),(0,Gr.jsx)("div",{className:"flex gap-1",children:(0,Gr.jsx)(h,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:s=>{s.stopPropagation(),o?.(c)},children:(0,Gr.jsx)(bt.Trash2,{className:"h-4 w-4"})})})]})]},c.name))})]})}function za({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:i,compactView:r=!1,className:c}){let[s,m]=(0,Et.useState)(e),[n,l]=(0,Et.useState)(""),[u,g]=(0,Et.useState)("all"),[v,S]=(0,Et.useState)("all");(0,Et.useEffect)(()=>{m(e)},[e]);let y=Array.from(new Set(s.map(T=>T.mimeType))),f=s.filter(T=>{let R=T.name.toLowerCase().includes(n.toLowerCase()),A=u==="all"||T.mimeType===u;return R&&A}),k=f.slice(0,10),I=f.filter(Boolean),_=()=>{t?.()},Q=T=>{a?.(T)},w=T=>{console.log("deleting file",T),m(R=>R.filter(A=>A.name!==T.name)),o?.(T.id)},H=T=>{i?.(T)},se=()=>{l(""),g("all")};return(0,Gr.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Gr.jsx)(Uo.AnimatePresence,{mode:"wait",children:(0,Gr.jsx)(Uo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Gr.jsxs)("div",{className:`space-y-6 ${c||""}`,children:[(0,Gr.jsx)(Qe,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:_},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Gr.jsx)(O,{children:(0,Gr.jsx)(le,{className:"pt-6",children:(0,Gr.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Gr.jsx)("div",{className:"flex-1",children:(0,Gr.jsxs)("div",{className:"relative",children:[(0,Gr.jsx)(bt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Gr.jsx)(L,{placeholder:"Search files...",value:n,onChange:T=>l(T.target.value),className:"pl-9"})]})}),(n||u!=="all")&&(0,Gr.jsxs)(h,{variant:"outline",onClick:se,className:"gap-2",children:[(0,Gr.jsx)(bt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsx)(no,{activeTab:v,onTabChange:S,tabOptions:[{value:"all",label:`All Files (${f.length})`},{value:"recent",label:`Recent (${k.length})`}],maxWidth:"500px",gridCols:3}),v==="all"&&(0,Gr.jsx)(vo,{files:f,onFileClick:H,onFileEdit:Q,onFileDelete:w,showHeader:!r}),v==="recent"&&(0,Gr.jsx)(vo,{files:k,onFileClick:H,onFileEdit:Q,onFileDelete:w,showHeader:!r}),v==="shared"&&(0,Gr.jsx)(vo,{files:I,onFileClick:H,onFileEdit:Q,onFileDelete:w,showHeader:!r})]}),f.length===0&&(0,Gr.jsx)(O,{children:(0,Gr.jsx)(le,{className:"pt-6",children:(0,Gr.jsxs)("div",{className:"text-center py-8",children:[(0,Gr.jsx)(bt.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Gr.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground mb-4",children:n||u!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Gr.jsxs)(h,{onClick:_,className:"gap-2",children:[(0,Gr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}function yi({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:i=[]}){let[r,c]=(0,Et.useState)({...e,updatedAt:new Date}),s=()=>{let y=new Set,f=new Set;return i.forEach(k=>{k.menuConfig.groupBy.forEach(I=>y.add(I))}),o.forEach(k=>{k.metadata&&Object.keys(k.metadata).forEach(I=>f.add(I))}),{contextKeys:Array.from(y).sort(),documentKeys:Array.from(f).sort(),allKeys:Array.from(new Set([...y,...f])).sort()}},m=y=>{let f=new Set;return o.forEach(k=>{k.metadata?.[y]&&f.add(String(k.metadata[y]))}),Array.from(f).sort()},n=s(),l=()=>{t(r)},u=(y,f)=>{c(k=>({...k,metadata:{...k.metadata,[y]:f}}))},g=(y,f)=>{f==="__custom__"?u(y,""):u(y,f)},v=()=>{let y=`field_${Date.now()}`;u(y,"")},S=y=>{c(f=>{let k={...f.metadata};return delete k[y],{...f,metadata:k}})};return(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Gr.jsxs)("div",{className:"border-b border-border bg-card Gr-8",children:[(0,Gr.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Gr.jsx)("div",{className:"flex-shrink-0 Gr-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Gr.jsx)(bt.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Gr.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Gr.jsxs)("div",{className:"flex gap-2",children:[(0,Gr.jsxs)(h,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,Gr.jsx)(bt.Gr,{className:"h-4 w-4"}),"Cancel"]}),(0,Gr.jsxs)(h,{size:"sm",onClick:l,className:"gap-2",children:[(0,Gr.jsx)(bt.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Gr.jsx)(L,{value:r.title,onChange:y=>c(f=>({...f,title:y.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Gr.jsx)(Ne,{value:r.description||"",onChange:y=>c(f=>({...f,description:y.target.value})),placeholder:"Document description...",rows:2})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),n.contextKeys.length>0&&(0,Gr.jsxs)("Gr",{className:"text-bt text-muted-foreground",children:["Suggested: ",n.contextKeys.slice(0,4).join(", "),n.contextKeys.length>4&&` +${n.contextKeys.length-4}`]})]}),(0,Gr.jsxs)(h,{type:"button",variant:"outline",size:"sm",onClick:v,className:"gap-1 h-8",children:[(0,Gr.jsx)(bt.Plus,{className:"h-3 w-3"}),"Add"]})]}),r.metadata&&Object.keys(r.metadata).length>0?(0,Gr.jsx)("div",{className:"space-y-2",children:Object.entries(r.metadata).map(([y,f])=>{let k=m(y);return(0,Gr.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Gr.jsx)(L,{value:y,onChange:I=>{let _=I.target.value,Q=r.metadata?.[y];c(w=>{let H={...w.metadata};return delete H[y],_&&(H[_]=Q||""),{...w,metadata:H}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${y}`}),(0,Gr.jsx)("datalist",{id:`metadata-keys-${y}`,children:n.allKeys.map(I=>(0,Gr.jsx)("option",{value:I},I))}),(0,Gr.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),k.length>0?(0,Gr.jsxs)(ke,{value:String(f||""),onValueChange:I=>g(y,I),children:[(0,Gr.jsx)(Ce,{className:"flex-1 h-8 text-sm",children:(0,Gr.jsx)(Fe,{placeholder:"Value"})}),(0,Gr.jsxs)(Se,{children:[k.map(I=>(0,Gr.jsx)(U,{value:I,children:I},I)),(0,Gr.jsx)(U,{value:"__custom__",children:(0,Gr.jsx)("span",{className:"text-muted-foreground text-bt",children:"Custom..."})})]})]}):(0,Gr.jsx)(L,{value:String(f||""),onChange:I=>u(y,I.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Gr.jsx)(h,{type:"button",variant:"ghost",size:"sm",onClick:()=>S(y),className:"h-8 w-8 Gr-0 text-muted-foreground hover:text-destructive",children:(0,Gr.jsx)(bt.Gr,{className:"h-3 w-3"})})]},y)})}):(0,Gr.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Gr.jsx)("Gr",{className:"text-bt text-muted-foreground",children:'No metadata \u2022 Click "Add" to create fields'})})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Gr.jsx)(Z,{variant:"secondary",className:"font-mono",children:r.format.toUpperCase()})]})]})]}),(0,Gr.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Gr.jsxs)("div",{className:"Gr-8",children:[(0,Gr.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Gr.jsx)(Ne,{value:r.content||"",onChange:y=>c(f=>({...f,content:y.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var Si=e=>(0,Gr.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),wi=e=>(0,Gr.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),Kn=e=>(0,Gr.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Gr.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg Gr-4 mb-4",children:(0,Gr.jsxs)("Gr",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Gr.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Gr.jsx)("pre",{className:"text-sm",children:e})]}),$n=e=>(0,Gr.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Gr.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg Gr-4 mb-4",children:(0,Gr.jsxs)("Gr",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Gr.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Si(e)]});function Di({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:i=[],knowledgeContexts:r=[]}){let[c,s]=(0,Et.useState)(!1),m=v=>{switch(v){case"markdown":case"mdx":return(0,Gr.jsx)(bt.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Gr.jsx)(bt.File,{className:"h-6 w-6 text-success"});case"text":return(0,Gr.jsx)(bt.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Gr.jsx)(bt.File,{className:"h-6 w-6 text-muted-foreground"})}},n=v=>{switch(v){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},l=(v,S)=>{let y={markdown:Si,mdx:$n,richtext:Kn,text:wi},f=o?.[S]||y[S];return f?f(v):wi(v)},u=v=>{s(!1),t?.(v)},g=()=>{s(!1)};return c?(0,Gr.jsx)(yi,{document:e,onSave:u,onCancel:g,availableDocuments:i,knowledgeContexts:r}):(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Gr.jsxs)("div",{className:"border-b border-border bg-card Gr-8",children:[(0,Gr.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Gr.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Gr.jsx)("div",{className:"flex-shrink-0 Gr-3 rounded-xl bg-muted border border-border",children:m(e.format)}),(0,Gr.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Gr.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Gr.jsx)("Gr",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,Gr.jsx)("div",{className:"flex-shrink-0",children:(0,Gr.jsxs)(h,{variant:"outline",size:"sm",onClick:()=>s(!0),className:"gap-2",children:[(0,Gr.jsx)(bt.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,Gr.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Gr.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${n(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(v=>(0,Gr.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",v]},v))]})]}),(0,Gr.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Gr.jsxs)("div",{className:"Gr-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Gr.jsxs)("div",{className:"mb-6",children:[(0,Gr.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Gr.jsx)("div",{className:"bg-muted rounded-lg Gr-3 border border-border",children:(0,Gr.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-bt",children:Object.entries(e.metadata).map(([v,S])=>(0,Gr.jsxs)("div",{className:"flex gap-1",children:[(0,Gr.jsxs)("span",{className:"text-muted-foreground font-medium",children:[v.replace(/([A-Z])/g," $1").trim(),":"]}),(0,Gr.jsx)("span",{className:"text-foreground truncate",children:String(S)})]},v))})})]}),(0,Gr.jsx)("div",{className:"space-y-4",children:e.content?(0,Gr.jsx)("div",{className:"relative",children:(0,Gr.jsx)("div",{className:"bg-card border border-border rounded-xl Gr-6 overflow-hidden",children:l(e.content,e.format)})}):(0,Gr.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Gr.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Gr.jsx)(bt.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Gr.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function ki({label:e,documents:t,children:a,level:o,onDocumentClick:i,selectedDocumentId:r,showDocumentCount:c=!0}){let[s,m]=(0,Et.useState)(o===0),n=a&&Object.keys(a).length>0,l=t.length+(a?Object.values(a).reduce((v,S)=>v+S.documents.length,0):0),u=v=>{switch(v){case"markdown":case"mdx":return(0,Gr.jsx)(bt.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Gr.jsx)(bt.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Gr.jsx)(bt.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},g=v=>{let S=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return S[v%S.length]};return(0,Gr.jsxs)("div",{className:"space-y-1",children:[(n||t.length>0)&&(0,Gr.jsxs)(Uo.motion.div,{className:`group flex items-center gap-3 Gr-3 rounded-xl cursor-pointer transition-all duration-200 ${s?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>m(!s),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Gr.jsx)("div",{className:`w-1 h-6 rounded-full ${g(o)}`}),(0,Gr.jsx)(Uo.motion.div,{animate:{rotate:s?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Gr.jsx)(bt.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Gr.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Gr.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Gr.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),c&&l>0&&(0,Gr.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Gr.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-bt font-medium bg-muted text-muted-foreground rounded-full",children:l})})]})]}),(0,Gr.jsx)(Uo.motion.div,{initial:!1,animate:{height:s?"auto":0,opacity:s?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Gr.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((v,S)=>(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:S*.05,duration:.2},className:`group flex items-center gap-3 Gr-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${r===v.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>i?.(v),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Gr.jsx)("div",{className:"flex-shrink-0",children:u(v.format)}),(0,Gr.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Gr.jsx)("Gr",{className:`text-sm truncate transition-colors ${r===v.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:v.title}),v.description&&(0,Gr.jsx)("Gr",{className:"text-bt text-muted-foreground truncate Gr-0.5",children:v.description})]}),v.tags&&v.tags.length>0&&(0,Gr.jsx)("div",{className:"flex-shrink-0",children:(0,Gr.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-bt font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:v.tags[0]})})]},v.id)),a&&Object.entries(a).map(([v,S])=>(0,Gr.jsx)(ki,{label:v,documents:S.documents,children:S.children,level:o+1,onDocumentClick:i,selectedDocumentId:r,showDocumentCount:c},v))]})})]})}function Pi({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:i,selectedDocumentId:r,className:c,editable:s=!0}){let[m,n]=(0,Et.useState)(""),[l,u]=(0,Et.useState)(null),g=(0,Et.useMemo)(()=>m?e.filter(y=>y.title.toLowerCase().includes(m.toLowerCase())||y.description?.toLowerCase().includes(m.toLowerCase())||y.tags?.some(f=>f.toLowerCase().includes(m.toLowerCase()))||Object.values(y.metadata||{}).some(f=>String(f).toLowerCase().includes(m.toLowerCase()))):e,[e,m]),v=(0,Et.useMemo)(()=>{let y=(f,k)=>{if(k.length===0)return{};let[I,..._]=k;return f.reduce((w,H)=>{let se=H.metadata?.[I]||"Uncategorized",T=String(se);if(w[T]||(w[T]={documents:[],children:{}}),_.length===0)w[T].documents.push(H);else{let R=y([H],_),A=Object.keys(R)[0];A&&(w[T].children||(w[T].children={}),w[T].children[A]?w[T].children[A].documents.push(...R[A].documents):w[T].children[A]=R[A])}return w},{})};return y(g,t.groupBy)},[g,t.groupBy]),S=y=>{u(y),a?.(y)};return(0,Gr.jsxs)("div",{className:`flex h-full ${c||""}`,children:[(0,Gr.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Gr.jsx)("div",{className:"Gr-6 border-b border-border",children:(0,Gr.jsxs)("div",{className:"relative",children:[(0,Gr.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Gr.jsx)(bt.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Gr.jsx)(L,{placeholder:"Search knowledge base...",value:m,onChange:y=>n(y.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Gr.jsx)(Ba,{className:"h-[calc(100%-100px)]",children:(0,Gr.jsxs)("div",{className:"Gr-4 space-y-3",children:[Object.entries(v).map(([y,f])=>(0,Gr.jsx)(ki,{label:y,documents:f.documents,children:f.children,level:0,onDocumentClick:S,selectedDocumentId:r,showDocumentCount:t.showDocumentCount},y)),Object.keys(v).length===0&&(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Gr.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Gr.jsx)(bt.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Gr.jsx)("Gr",{className:"text-sm font-medium",children:"No documents found"}),(0,Gr.jsx)("Gr",{className:"text-bt Gr-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Gr.jsx)("div",{className:"flex-1 bg-background",children:l?(0,Gr.jsx)(Di,{document:l,onDocumentUpdate:i,editable:s}):(0,Gr.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Gr.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Gr.jsx)(bt.FileText,{className:"h-10 w-10 text-primary"})}),(0,Gr.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function qo({documents:e=[],contexts:t=[],onDocumentClick:a=c=>console.log("Document clicked:",c),onDocumentShare:o=c=>console.log("Share document:",c),onLoadDocumentContent:i,selectedDocumentId:r}){let[c,s]=(0,Et.useState)(t[0]);return!t||t.length===0?(0,Gr.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Gr.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Gr.jsx)(Qe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Gr.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Gr.jsx)("Gr",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Gr.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Gr.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Gr.jsx)(Qe,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Gr.jsxs)("div",{className:"Gr-6",children:[(0,Gr.jsx)("div",{className:"border-b border-border",children:(0,Gr.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(m=>(0,Gr.jsxs)("button",{onClick:()=>s(m),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${c.id===m.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[m.icon,m.label]},m.id))})}),c.description&&(0,Gr.jsx)("div",{className:"Gr-3 px-1",children:(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground",children:c.description})})]})]}),(0,Gr.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Gr.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Gr.jsx)(Pi,{documents:e,menuConfig:c.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:r})})})]})}var me=be(require("react"));var Ri=(e=768)=>{let[t,a]=(0,Et.useState)(!1);return(0,Et.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var Ai=be(require("react")),Xo=be(require("@radix-ui/react-separator"));var Jo=Ai.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},i)=>(0,Gr.jsx)(Xo.Root,{ref:i,decorative:a,orientation:t,className:b("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));Jo.displayName=Xo.Root.displayName;var Ha=be(require("react")),at=be(require("@radix-ui/react-dialog"));var Fi=at.Root;var _n=at.Portal,Bi=Ha.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(at.Overlay,{className:b("fixed inset-0 Gr-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));Bi.displayName=at.Overlay.displayName;var Gn=(0,$r.cva)("fixed Gr-50 gap-4 bg-background Gr-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Yo=Ha.forwardRef(({side:e="right",className:t,children:a,...o},i)=>(0,Gr.jsxs)(_n,{children:[(0,Gr.jsx)(Bi,{}),(0,Gr.jsxs)(at.Content,{ref:i,className:b(Gn({side:e}),t),...o,children:[(0,Gr.jsxs)(at.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,Gr.jsx)(ya.Cross2Icon,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{className:"Et-only",children:"Close"})]}),a]})]}));Yo.displayName=at.Content.displayName;var Wn=({className:e,...t})=>(0,Gr.jsx)("div",{className:b("flex flex-col space-y-2 text-center sm:text-left",e),...t});Wn.displayName="SheetHeader";var qn=({className:e,...t})=>(0,Gr.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});qn.displayName="SheetFooter";var Xn=Ha.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(at.Title,{ref:a,className:b("text-lg font-semibold text-foreground",e),...t}));Xn.displayName=at.Title.displayName;var Jn=Ha.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(at.Description,{ref:a,className:b("text-sm text-muted-foreground",e),...t}));Jn.displayName=at.Description.displayName;function Zo({className:e,...t}){return(0,Gr.jsx)("div",{className:b("animate-pulse rounded-md bg-primary/10",e),...t})}var ji=be(require("react")),Mt=be(require("@radix-ui/react-tooltip"));var Oi=Mt.Provider,zi=Mt.Root,Hi=Mt.Trigger,er=ji.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Gr.jsx)(Mt.Portal,{children:(0,Gr.jsx)(Mt.Content,{ref:o,sideOffset:t,className:b("Gr-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-bt text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));er.displayName=Mt.Content.displayName;var Yn="sidebar:state",Zn=3600*24*7,Qn="16rem",el="18rem",tl="3rem",al="b",Ki=me.createContext(null);function xo(){let e=me.useContext(Ki);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var tr=me.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:i,children:r,...c},s)=>{let m=Ri(),[n,l]=me.useState(!1),[u,g]=me.useState(e),v=t??u,S=me.useCallback(I=>{if(a)return a?.(typeof I=="function"?I(v):I);g(I),document.cookie=`${Yn}=${v}; path=/; max-age=${Zn}`},[a,v]),y=me.useCallback(()=>m?l(I=>!I):S(I=>!I),[m,S,l]);me.useEffect(()=>{let I=_=>{_.key===al&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),y())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[y]);let f=v?"expanded":"collapsed",k=me.useMemo(()=>({state:f,open:v,setOpen:S,isMobile:m,openMobile:n,setOpenMobile:l,toggleSidebar:y}),[f,v,S,m,n,l,y]);return(0,Gr.jsx)(Ki.Provider,{value:k,children:(0,Gr.jsx)(Oi,{delayDuration:0,children:(0,Gr.jsx)("div",{style:{"--sidebar-width":Qn,"--sidebar-width-icon":tl,...i},className:b("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:s,...c,children:r})})})});tr.displayName="SidebarProvider";var ol=me.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:i,...r},c)=>{let{isMobile:s,state:m,openMobile:n,setOpenMobile:l}=xo();return a==="none"?(0,Gr.jsx)("div",{className:b("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:c,...r,children:i}):s?(0,Gr.jsx)(Fi,{open:n,onOpenChange:l,...r,children:(0,Gr.jsx)(Yo,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar Gr-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":el},side:e,children:(0,Gr.jsx)("div",{className:"flex h-full w-full flex-col",children:i})})}):(0,Gr.jsxs)("div",{ref:c,className:"group peer hidden md:block text-sidebar-foreground","data-state":m,"data-collapsible":m==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Gr.jsx)("div",{className:b("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Gr.jsx)("div",{className:b("duration-200 fixed top-14 bottom-0 Gr-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"Gr-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...r,children:(0,Gr.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:i})})]})});ol.displayName="Sidebar";var rl=me.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:i}=xo();return(0,Gr.jsxs)(h,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:b("h-7 w-7",e),onClick:r=>{t?.(r),i()},...a,children:[(0,Gr.jsx)(bt.PanelLeft,{}),(0,Gr.jsx)("span",{className:"Et-only",children:"Toggle Sidebar"})]})});rl.displayName="SidebarTrigger";var il=me.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=xo();return(0,Gr.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:b("absolute inset-y-0 Gr-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});il.displayName="SidebarRail";var sl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("main",{ref:a,className:b("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));sl.displayName="SidebarInset";var nl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(L,{ref:a,"data-sidebar":"input",className:b("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));nl.displayName="SidebarInput";var ll=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,"data-sidebar":"header",className:b("flex flex-col gap-2 Gr-2",e),...t}));ll.displayName="SidebarHeader";var dl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,"data-sidebar":"footer",className:b("flex flex-col gap-2 Gr-2",e),...t}));dl.displayName="SidebarFooter";var cl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(Jo,{ref:a,"data-sidebar":"separator",className:b("mx-2 w-auto bg-sidebar-border",e),...t}));cl.displayName="SidebarSeparator";var ml=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,"data-sidebar":"content",className:b("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ml.displayName="SidebarContent";var pl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,"data-sidebar":"group",className:b("relative flex w-full min-w-0 flex-col Gr-2",e),...t}));pl.displayName="SidebarGroup";var ul=me.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Gr.jsx)(t?Kr.Slot:"div",{ref:o,"data-sidebar":"group-label",className:b("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-bt font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-Gr-8 group-data-[collapsible=icon]:opacity-0",e),...a}));ul.displayName="SidebarGroupLabel";var gl=me.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Gr.jsx)(t?Kr.Slot:"button",{ref:o,"data-sidebar":"group-action",className:b("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md Gr-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));gl.displayName="SidebarGroupAction";var fl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,"data-sidebar":"group-content",className:b("w-full text-sm",e),...t}));fl.displayName="SidebarGroupContent";var vl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("ul",{ref:a,"data-sidebar":"menu",className:b("flex w-full min-w-0 flex-col gap-1",e),...t}));vl.displayName="SidebarMenu";var bl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("Gr",{ref:a,"data-sidebar":"menu-item",className:b("group/menu-item relative",e),...t}));bl.displayName="SidebarMenuItem";var hl=(0,$r.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md Gr-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!Gr-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-bt",lg:"h-12 text-sm group-data-[collapsible=icon]:!Gr-0"}},defaultVariants:{variant:"default",size:"default"}}),xl=me.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:i,className:r,...c},s)=>{let m=e?Kr.Slot:"button",{isMobile:n,state:l}=xo(),u=(0,Gr.jsx)(m,{ref:s,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:b(hl({variant:a,size:o}),r),...c});return i?(typeof i=="string"&&(i={children:i}),(0,Gr.jsxs)(zi,{children:[(0,Gr.jsx)(Hi,{asChild:!0,children:u}),(0,Gr.jsx)(er,{side:"right",align:"center",hidden:l!=="collapsed"||n,...i})]})):u});xl.displayName="SidebarMenuButton";var yl=me.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},i)=>(0,Gr.jsx)(t?Kr.Slot:"button",{ref:i,"data-sidebar":"menu-action",className:b("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md Gr-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));yl.displayName="SidebarMenuAction";var wl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:b("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-bt font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));wl.displayName="SidebarMenuBadge";var Nl=me.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let i=me.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Gr.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:b("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Gr.jsx)(Zo,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Gr.jsx)(Zo,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});Nl.displayName="SidebarMenuSkeleton";var Cl=me.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:b("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Cl.displayName="SidebarMenuSub";var Sl=me.forwardRef(({...e},t)=>(0,Gr.jsx)("Gr",{ref:t,...e}));Sl.displayName="SidebarMenuSubItem";var Dl=me.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...i},r)=>(0,Gr.jsx)(e?Kr.Slot:"a",{ref:r,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:b("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-bt",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...i}));Dl.displayName="SidebarMenuSubButton";var $i=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:i,onDeleteProject:r,onAddProject:c,onUpdateEpic:s,onDeleteEpic:m,onAddEpic:n,onAddSprint:l,onUpdateSprint:u,onDeleteSprint:g,onViewChange:v,mobileMenuOpen:S,onToggleMobileMenu:y})=>{let[f,k]=(0,Et.useState)(null),[I,_]=(0,Et.useState)(null),[Q,w]=(0,Et.useState)(null),[H,se]=(0,Et.useState)(null),[T,R]=(0,Et.useState)({name:"",description:""}),[A,pe]=(0,Et.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[M,ze]=(0,Et.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[Ie,We]=(0,Et.useState)(!1),[D,ue]=(0,Et.useState)(!1),[Re,rt]=(0,Et.useState)({name:"",description:""}),[Me,De]=(0,Et.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),ct=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],yt=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],it=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],wt=N=>{_(N.id),R({name:N.name,description:N.description||""})},q=()=>{I&&T.name.trim()&&(i(I,{name:T.name.trim(),description:T.description.trim()}),_(null))},x=()=>{_(null),R({name:"",description:""})},ve=()=>{Re.name.trim()&&(c({name:Re.name.trim(),description:Re.description.trim(),isSelected:!1}),rt({name:"",description:""}),We(!1))},ie=N=>{i(N,{isSelected:!0})},ft=N=>{w(N.id),pe({name:N.name,description:N.description||"",color:N.color,confidence:N.confidence,phase:N.phase,startDate:N.startDate.toISOString().split("T")[0],endDate:N.endDate.toISOString().split("T")[0],progress:N.progress})},Ot=()=>{Q&&A.name.trim()&&(s(Q,{name:A.name.trim(),description:A.description.trim(),color:A.color,confidence:A.confidence,phase:A.phase,startDate:new Date(A.startDate),endDate:new Date(A.endDate),progress:A.progress}),w(null))},Rt=()=>{w(null),pe({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},Bo=N=>{se(N.id),ze({name:N.name,description:N.description||"",startDate:N.startDate.toISOString().split("T")[0],endDate:N.endDate.toISOString().split("T")[0],isActive:N.isActive})},Lo=()=>{H&&M.name.trim()&&(u(H,{name:M.name.trim(),description:M.description.trim(),startDate:new Date(M.startDate),endDate:new Date(M.endDate),isActive:M.isActive}),se(null))},Ja=()=>{se(null),ze({name:"",description:"",startDate:"",endDate:"",isActive:!1})},jo=()=>{Me.name.trim()&&(l({name:Me.name.trim(),description:Me.description.trim(),startDate:new Date(Me.startDate),endDate:new Date(Me.endDate),isActive:Me.isActive,isSelected:!1}),De({name:"",description:"",startDate:"",endDate:"",isActive:!1}),ue(!1))},Ya=N=>{u(N,{isSelected:!0})},Za=N=>N.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),Aa=N=>{let B=yt.find(we=>we.value===N);return B?{label:B.label,color:B.color}:{label:"Medium",color:"text-warning"}},Qa=N=>{let B=it.find(we=>we.value===N);return B?{label:B.label,color:B.color}:{label:"Phase 1",color:"text-primary"}};return(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col Gr-50 flex-shrink-0 transition-transform duration-300 group ${S?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,Gr.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,Gr.jsxs)("button",{onClick:()=>{v("kanban"),k(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 Gr-50`,title:"Kanban View",children:[(0,Gr.jsx)(bt.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,Gr.jsx)("span",{className:"text-bt font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,Gr.jsxs)("button",{onClick:()=>{v("planning"),k(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[(0,Gr.jsx)(bt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Gr.jsx)("span",{className:"text-bt font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,Gr.jsxs)("button",{onClick:()=>k(f==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${f==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[(0,Gr.jsx)(bt.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,Gr.jsx)("span",{className:"text-bt font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,Gr.jsxs)("button",{onClick:()=>{v("epics"),k(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,Gr.jsx)(bt.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,Gr.jsx)("span",{className:"text-bt font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,Gr.jsxs)("button",{onClick:()=>k(f==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${f==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[(0,Gr.jsx)(bt.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,Gr.jsx)("span",{className:"text-bt font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,Gr.jsxs)("button",{onClick:()=>{v("files"),k(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,Gr.jsx)(bt.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,Gr.jsx)("span",{className:"text-bt font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,Gr.jsxs)("button",{onClick:()=>{v("tasks"),k(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[(0,Gr.jsx)(bt.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Gr.jsx)("span",{className:"text-bt font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),S&&(0,Gr.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm Gr-20",onClick:y}),f&&(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm Gr-40",onClick:()=>k(null)}),(0,Gr.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg Gr-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,Gr.jsxs)("div",{className:"Gr-3 md:Gr-4 border-b flex items-center justify-between",children:[(0,Gr.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[f==="projects"&&"Projects",f==="epics"&&"Manage Epics",f==="sprints"&&"Manage Sprints",f==="files"&&"Files"]}),(0,Gr.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>k(null),children:(0,Gr.jsx)(bt.Gr,{className:"h-4 w-4"})})]}),(0,Gr.jsxs)("div",{className:"Gr-3 md:Gr-4 space-y-4 h-full overflow-y-auto",children:[f==="projects"&&(0,Gr.jsx)(O,{className:"Gr-3",children:(0,Gr.jsxs)("div",{className:"space-y-3",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Gr.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,Gr.jsxs)(h,{size:"sm",onClick:()=>We(!0),className:"gap-1",children:[(0,Gr.jsx)(bt.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),Ie&&(0,Gr.jsxs)("div",{className:"border rounded-lg Gr-2 space-y-2",children:[(0,Gr.jsx)(L,{value:Re.name,onChange:N=>rt(B=>({...B,name:N.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Gr.jsx)(Ne,{value:Re.description,onChange:N=>rt(B=>({...B,description:N.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Gr.jsxs)("div",{className:"flex gap-1",children:[(0,Gr.jsx)(h,{size:"sm",onClick:ve,className:"text-bt h-6",children:"Save"}),(0,Gr.jsx)(h,{size:"sm",variant:"outline",onClick:()=>We(!1),className:"text-bt h-6",children:"Cancel"})]})]}),(0,Gr.jsx)("div",{className:"space-y-2",children:e.map(N=>(0,Gr.jsx)("div",{className:"border rounded Gr-2",children:I===N.id?(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(L,{value:T.name,onChange:B=>R(we=>({...we,name:B.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Gr.jsx)(Ne,{value:T.description,onChange:B=>R(we=>({...we,description:B.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Gr.jsxs)("div",{className:"flex gap-1",children:[(0,Gr.jsx)(h,{size:"sm",onClick:q,className:"text-bt h-6",children:"Save"}),(0,Gr.jsx)(h,{size:"sm",variant:"outline",onClick:x,className:"text-bt h-6",children:"Cancel"})]})]}):(0,Gr.jsxs)("div",{className:`cursor-pointer Gr-1 rounded transition-colors ${N.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>ie(N.id),children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Gr.jsx)(bt.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,Gr.jsx)("span",{className:"font-medium text-bt",children:N.name})]}),N.description&&(0,Gr.jsx)("Gr",{className:"text-bt text-muted-foreground mb-1",children:N.description}),(0,Gr.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>wt(N),className:"h-5 px-1",children:(0,Gr.jsx)(bt.Edit2,{className:"h-3 w-3"})}),(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>r(N.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Gr.jsx)(bt.Trash2,{className:"h-3 w-3"})})]})]})},N.id))})]})}),f==="epics"&&(0,Gr.jsx)(O,{className:"Gr-3",children:(0,Gr.jsxs)("div",{className:"space-y-3",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Gr.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,Gr.jsxs)(h,{size:"sm",onClick:n,className:"gap-1",children:[(0,Gr.jsx)(bt.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,Gr.jsx)("div",{className:"space-y-4",children:t.map(N=>(0,Gr.jsx)("div",{className:"border rounded-lg Gr-3",children:Q===N.id?(0,Gr.jsxs)("div",{className:"space-y-3",children:[(0,Gr.jsx)(L,{value:A.name,onChange:B=>pe(we=>({...we,name:B.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,Gr.jsx)(Ne,{value:A.description,onChange:B=>pe(we=>({...we,description:B.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)("label",{className:"text-bt font-medium",children:"Color"}),(0,Gr.jsx)("div",{className:"flex gap-1 flex-wrap",children:ct.map(B=>(0,Gr.jsx)("button",{onClick:()=>pe(we=>({...we,color:B})),className:`w-6 h-6 rounded-full ${B} ${A.color===B?"ring-2 ring-ring":""}`},B))})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Gr.jsxs)("div",{className:"space-y-1",children:[(0,Gr.jsx)("label",{className:"text-bt font-medium",children:"Confidence"}),(0,Gr.jsxs)(ke,{value:A.confidence,onValueChange:B=>pe(we=>({...we,confidence:B})),children:[(0,Gr.jsx)(Ce,{className:"h-8 text-bt",children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsx)(Se,{children:yt.map(B=>(0,Gr.jsx)(U,{value:B.value,children:(0,Gr.jsx)("span",{className:B.color,children:B.label})},B.value))})]})]}),(0,Gr.jsxs)("div",{className:"space-y-1",children:[(0,Gr.jsx)("label",{className:"text-bt font-medium",children:"Phase"}),(0,Gr.jsxs)(ke,{value:A.phase.toString(),onValueChange:B=>pe(we=>({...we,phase:parseInt(B)})),children:[(0,Gr.jsx)(Ce,{className:"h-8 text-bt",children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsx)(Se,{children:it.map(B=>(0,Gr.jsx)(U,{value:B.value.toString(),children:(0,Gr.jsx)("span",{className:B.color,children:B.label})},B.value))})]})]})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Gr.jsxs)("div",{className:"space-y-1",children:[(0,Gr.jsx)("label",{className:"text-bt font-medium",children:"Start Date"}),(0,Gr.jsx)(L,{type:"date",value:A.startDate,onChange:B=>pe(we=>({...we,startDate:B.target.value})),className:"text-bt h-8"})]}),(0,Gr.jsxs)("div",{className:"space-y-1",children:[(0,Gr.jsx)("label",{className:"text-bt font-medium",children:"End Date"}),(0,Gr.jsx)(L,{type:"date",value:A.endDate,onChange:B=>pe(we=>({...we,endDate:B.target.value})),className:"text-bt h-8"})]})]}),(0,Gr.jsxs)("div",{className:"space-y-1",children:[(0,Gr.jsx)("label",{className:"text-bt font-medium",children:"Progress (%)"}),(0,Gr.jsx)(L,{type:"number",min:"0",max:"100",value:A.progress,onChange:B=>pe(we=>({...we,progress:parseInt(B.target.value)||0})),className:"text-bt h-8"})]}),(0,Gr.jsxs)("div",{className:"flex gap-2",children:[(0,Gr.jsx)(h,{size:"sm",onClick:Ot,className:"text-bt",children:"Save"}),(0,Gr.jsx)(h,{size:"sm",variant:"outline",onClick:Rt,className:"text-bt",children:"Cancel"})]})]}):(0,Gr.jsxs)("div",{className:`cursor-pointer Gr-2 rounded transition-colors ${N.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>s(N.id,{isSelected:!N.isSelected}),children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Gr.jsx)("div",{className:`w-3 h-3 rounded-full ${N.color}`}),(0,Gr.jsx)("span",{className:"font-medium text-sm",children:N.name})]}),N.description&&(0,Gr.jsx)("Gr",{className:"text-bt text-muted-foreground mb-2",children:N.description}),(0,Gr.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-bt",children:[(0,Gr.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,Gr.jsx)("span",{className:Aa(N.confidence).color,children:Aa(N.confidence).label})]}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-bt",children:[(0,Gr.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,Gr.jsx)("span",{className:Qa(N.phase).color,children:Qa(N.phase).label})]}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-bt",children:[(0,Gr.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,Gr.jsxs)("span",{className:"text-foreground",children:[Za(N.startDate)," - ",Za(N.endDate)]})]}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-bt",children:[(0,Gr.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,Gr.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${N.progress}%`}})}),(0,Gr.jsxs)("span",{className:"text-foreground",children:[N.progress,"%"]})]})]})]}),(0,Gr.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>ft(N),className:"h-6 px-2",children:(0,Gr.jsx)(bt.Edit2,{className:"h-3 w-3"})}),(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>m(N.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Gr.jsx)(bt.Trash2,{className:"h-3 w-3"})})]})]})},N.id))})]})}),f==="sprints"&&(0,Gr.jsx)(O,{className:"Gr-3",children:(0,Gr.jsxs)("div",{className:"space-y-3",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Gr.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,Gr.jsxs)(h,{size:"sm",onClick:()=>ue(!0),className:"gap-1",children:[(0,Gr.jsx)(bt.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),D&&(0,Gr.jsxs)("div",{className:"border rounded-lg Gr-2 space-y-2",children:[(0,Gr.jsx)(L,{value:Me.name,onChange:N=>De(B=>({...B,name:N.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,Gr.jsx)(L,{type:"date",value:Me.startDate,onChange:N=>De(B=>({...B,startDate:N.target.value})),className:"text-bt"}),(0,Gr.jsx)(L,{type:"date",value:Me.endDate,onChange:N=>De(B=>({...B,endDate:N.target.value})),className:"text-bt"})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)("input",{type:"checkbox",checked:Me.isActive,onChange:N=>De(B=>({...B,isActive:N.target.checked})),className:"w-3 h-3"}),(0,Gr.jsx)("span",{className:"text-bt",children:"Active"})]}),(0,Gr.jsxs)("div",{className:"flex gap-1",children:[(0,Gr.jsx)(h,{size:"sm",onClick:jo,className:"text-bt h-6",children:"Save"}),(0,Gr.jsx)(h,{size:"sm",variant:"outline",onClick:()=>ue(!1),className:"text-bt h-6",children:"Cancel"})]})]}),(0,Gr.jsx)("div",{className:"space-y-2",children:a.map(N=>(0,Gr.jsx)("div",{className:"border rounded Gr-2",children:H===N.id?(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(L,{value:M.name,onChange:B=>ze(we=>({...we,name:B.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:N.id==="backlog"||N.id==="all-tasks"}),N.id!=="backlog"&&N.id!=="all-tasks"&&(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,Gr.jsx)(L,{type:"date",value:M.startDate,onChange:B=>ze(we=>({...we,startDate:B.target.value})),className:"text-bt"}),(0,Gr.jsx)(L,{type:"date",value:M.endDate,onChange:B=>ze(we=>({...we,endDate:B.target.value})),className:"text-bt"})]}),(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)("input",{type:"checkbox",checked:M.isActive,onChange:B=>ze(we=>({...we,isActive:B.target.checked})),className:"w-3 h-3"}),(0,Gr.jsx)("span",{className:"text-bt",children:"Active"})]})]}),(0,Gr.jsxs)("div",{className:"flex gap-1",children:[(0,Gr.jsx)(h,{size:"sm",onClick:Lo,className:"text-bt h-6",children:"Save"}),(0,Gr.jsx)(h,{size:"sm",variant:"outline",onClick:Ja,className:"text-bt h-6",children:"Cancel"})]})]}):(0,Gr.jsxs)("div",{className:`cursor-pointer Gr-1 rounded transition-colors ${N.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>Ya(N.id),children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Gr.jsx)(bt.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,Gr.jsx)("span",{className:"font-medium text-bt",children:N.name}),N.isActive&&(0,Gr.jsx)("span",{className:"text-bt bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(N.id==="backlog"||N.id==="all-tasks")&&(0,Gr.jsx)("span",{className:"text-bt bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),N.id!=="backlog"&&N.id!=="all-tasks"&&(0,Gr.jsxs)("Gr",{className:"text-bt text-muted-foreground mb-1",children:[N.startDate.toLocaleDateString()," - ",N.endDate.toLocaleDateString()]}),(0,Gr.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>Bo(N),className:"h-5 px-1",children:(0,Gr.jsx)(bt.Edit2,{className:"h-3 w-3"})}),N.id!=="backlog"&&N.id!=="all-tasks"&&(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>g(N.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Gr.jsx)(bt.Trash2,{className:"h-3 w-3"})})]})]})},N.id))})]})})]})]})]})]})},_i=e=>(0,Gr.jsx)(tr,{children:(0,Gr.jsxs)("div",{className:"flex w-full",children:[(0,Gr.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,Gr.jsx)($i,{...e})}),(0,Gr.jsx)("div",{className:"md:hidden",children:(0,Gr.jsx)($i,{...e})}),(0,Gr.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,Gr.jsx)("div",{className:"w-full",children:e.children})})]})});var Gi=({title:e,status:t,taskCount:a,children:o,onDrop:i,isCompact:r=!1})=>{let c=n=>{n.preventDefault()},s=n=>{n.preventDefault(),i(t)};return(0,Gr.jsxs)(O,{className:`Gr-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 ${r?"lg:max-w-bt":""}`,onDragOver:c,onDrop:s,children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Gr.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${r?"text-base":"text-lg"}`,children:e}),(0,Gr.jsx)(Z,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Gr.jsx)("div",{className:"space-y-4 min-h-[200px]",children:o})]})};var yo=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:i=!1})=>{let r=l=>{a(e)},c=()=>{console.log("task clicked",e.title),o(e)},s=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},m=()=>{switch(e.type){case"story":return(0,Gr.jsx)(bt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Gr.jsx)(bt.Bug,{className:"h-3 w-3"});case"spike":return(0,Gr.jsx)(bt.Zap,{className:"h-3 w-3"});case"task":default:return(0,Gr.jsx)(bt.AlertCircle,{className:"h-3 w-3"})}},n=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return i?(0,Gr.jsx)(O,{className:"Gr-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:r,onClick:c,children:(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-bt font-medium ${n()}`,children:m()}),(0,Gr.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,Gr.jsxs)(O,{className:"Gr-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:r,onClick:c,children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Gr.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${n()}`,children:[m(),(0,Gr.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Gr.jsxs)("div",{className:"flex gap-1",children:[(0,Gr.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-bt font-medium ${s()}`,children:e.priority}),(0,Gr.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-bt font-medium",children:e.points})]})]}),(0,Gr.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Gr.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,Gr.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Gr.jsx)(bt.User,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:e.assignee})]})})]})};var Va=be(require("react")),ot=be(require("@radix-ui/react-dialog"));var pt=ot.Root;var kl=ot.Portal;var qi=Va.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(ot.Overlay,{ref:a,className:b("fixed inset-0 Gr-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qi.displayName=ot.Overlay.displayName;var st=Va.forwardRef(({className:e,children:t,...a},o)=>(0,Gr.jsxs)(kl,{children:[(0,Gr.jsx)(qi,{}),(0,Gr.jsxs)(ot.Content,{ref:o,className:b("fixed left-[50%] top-[50%] Gr-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background Gr-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,Gr.jsxs)(ot.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,Gr.jsx)(bt.Gr,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{className:"Et-only",children:"Close"})]})]})]}));st.displayName=ot.Content.displayName;var nt=({className:e,...t})=>(0,Gr.jsx)("div",{className:b("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});nt.displayName="DialogHeader";var Ua=({className:e,...t})=>(0,Gr.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ua.displayName="DialogFooter";var lt=Va.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(ot.Title,{ref:a,className:b("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName=ot.Title.displayName;var Ka=Va.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(ot.Description,{ref:a,className:b("text-sm text-muted-foreground",e),...t}));Ka.displayName=ot.Description.displayName;var ga=be(require("react")),Da=be(require("@radix-ui/react-toggle-group"));var Xi=be(require("react")),ar=be(require("@radix-ui/react-toggle"));var or=(0,$r.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Pl=Xi.forwardRef(({className:e,variant:t,size:a,...o},i)=>(0,Gr.jsx)(ar.Root,{ref:i,className:b(or({variant:t,size:a,className:e})),...o}));Pl.displayName=ar.Root.displayName;var Zi=ga.createContext({size:"default",variant:"default"}),fa=ga.forwardRef(({className:e,variant:t,size:a,children:o,...i},r)=>(0,Gr.jsx)(Da.Root,{ref:r,className:b("flex items-center justify-center gap-1",e),...i,children:(0,Gr.jsx)(Zi.Provider,{value:{variant:t,size:a},children:o})}));fa.displayName=Da.Root.displayName;var va=ga.forwardRef(({className:e,children:t,variant:a,size:o,...i},r)=>{let c=ga.useContext(Zi);return(0,Gr.jsx)(Da.Item,{ref:r,className:b(or({variant:c.variant||a,size:c.size||o}),e),...i,children:t})});va.displayName=Da.Item.displayName;var Tl=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:bt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:bt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:bt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:bt.Zap}],Rl=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],No=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:i,assignees:r,defaultEpicId:c})=>{let[s,m]=(0,$a.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,$a.useEffect)(()=>{e&&c&&m(u=>({...u,epicId:c}))},[e,c]),(0,$a.useEffect)(()=>{e&&m({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""})},[e]);let n=u=>{u.preventDefault(),s.title.trim()&&(a({title:s.title.trim(),description:s.description.trim(),status:"todo",priority:s.priority,type:s.type,points:s.points,epicId:s.epicId,sprintId:s.sprintId==="none"?void 0:s.sprintId,assignee:s.assignee.trim()||"Unassigned"}),m({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:c||"",sprintId:"none",assignee:""}),t())},l=(u,g)=>{m(v=>({...v,[u]:g}))};return(0,Gr.jsx)(pt,{open:e,onOpenChange:t,children:(0,Gr.jsxs)(st,{className:"sm:max-w-md",children:[(0,Gr.jsx)(nt,{children:(0,Gr.jsx)(lt,{children:"Add New Task"})}),(0,Gr.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"title",children:"Task Title"}),(0,Gr.jsx)(L,{id:"title",value:s.title,onChange:u=>l("title",u.target.value),placeholder:"Enter task title",required:!0})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,Gr.jsx)(Ne,{id:"description",value:s.description,onChange:u=>l("description",u.target.value),placeholder:"Enter task description",rows:3})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"Type"}),(0,Gr.jsx)(fa,{type:"single",value:s.type,onValueChange:u=>u&&l("type",u),children:Tl.map(u=>{let g=u.icon;return(0,Gr.jsxs)(va,{value:u.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Gr.jsx)(g,{className:"h-4 w-4"}),u.label]},u.value)})})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"Priority"}),(0,Gr.jsx)(fa,{type:"single",value:s.priority,onValueChange:u=>u&&l("priority",u),children:Rl.map(u=>(0,Gr.jsx)(va,{value:u.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:u.label},u.value))})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"points",children:"Story Points"}),(0,Gr.jsx)(L,{id:"points",type:"number",min:"1",max:"100",value:s.points,onChange:u=>l("points",parseInt(u.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"epic",children:"Epic"}),(0,Gr.jsxs)(ke,{value:s.epicId,onValueChange:u=>l("epicId",u),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{placeholder:"Select an epic"})}),(0,Gr.jsx)(Se,{children:o.map(u=>(0,Gr.jsx)(U,{value:u.id,children:(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)("div",{className:`w-3 h-3 rounded-full ${u.color}`}),u.name]})},u.id))})]})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Gr.jsxs)(ke,{value:s.sprintId,onValueChange:u=>l("sprintId",u),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{placeholder:"Select a sprint"})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"none",children:"No Sprint"}),i.map(u=>(0,Gr.jsx)(U,{value:u.id,children:(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[u.name,u.isActive&&(0,Gr.jsx)("span",{className:"text-bt bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},u.id))]})]})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"sprint",children:"Assignee"}),(0,Gr.jsxs)(ke,{value:s.assignee,onValueChange:u=>l("assignee",u),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{placeholder:"Select an Assignee"})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"none",children:"No Assignee"}),r.map(u=>(0,Gr.jsx)(U,{value:u.id,children:(0,Gr.jsx)("div",{className:"flex items-center gap-2",children:u.name})},u.id))]})]})]}),(0,Gr.jsxs)(Ua,{children:[(0,Gr.jsx)(h,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Gr.jsx)(h,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var ir=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:i,className:r="",disabled:c=!1})=>{let[s,m]=(0,Et.useState)(!1),[n,l]=(0,Et.useState)(""),u=()=>{c||(m(!0),l(t))},g=async()=>{n!==t&&await i(e,n),m(!1)},v=S=>{S.key==="Enter"&&!o||S.key==="Enter"&&S.ctrlKey&&o?g():S.key==="Escape"&&(m(!1),l(""))};return(0,Gr.jsxs)("div",{className:`space-y-2 ${r}`,children:[(0,Gr.jsx)(P,{children:a}),s?o?(0,Gr.jsx)(Ne,{value:n,onChange:S=>l(S.target.value),onBlur:g,onKeyDown:v,autoFocus:!0,rows:4,className:"resize-none"}):(0,Gr.jsx)(L,{value:n,onChange:S=>l(S.target.value),onBlur:g,onKeyPress:v,autoFocus:!0,className:"text-lg font-medium"}):(0,Gr.jsxs)("div",{onClick:u,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 Gr-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Gr.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Gr.jsx)(bt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var ts=({comments:e,onAddComment:t})=>{let[a,o]=(0,Et.useState)(""),i=c=>c.split(" ").map(s=>s[0]).join("").toUpperCase(),r=()=>{a.trim()&&(t(a),o(""))};return(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)(bt.MessageSquare,{className:"h-5 w-5"}),(0,Gr.jsx)(P,{className:"text-lg font-medium",children:"Comments"}),(0,Gr.jsx)(Z,{variant:"secondary",children:e.length})]}),(0,Gr.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(c=>(0,Gr.jsxs)("div",{className:"flex gap-3 Gr-3 bg-muted/50 rounded-lg",children:[(0,Gr.jsx)(Ut,{className:"h-8 w-8 Gr-1",children:(0,Gr.jsx)(Kt,{className:"text-bt bg-muted text-muted-foreground",children:i(c.author)})}),(0,Gr.jsxs)("div",{className:"flex-1",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Gr.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,Gr.jsxs)("span",{className:"text-bt text-muted-foreground",children:[c.createdAt.toLocaleDateString()," at ",c.createdAt.toLocaleTimeString()]})]}),(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,Gr.jsxs)("div",{className:"flex gap-2",children:[(0,Gr.jsx)(Ne,{value:a,onChange:c=>o(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Gr.jsx)(h,{onClick:r,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Gr.jsx)(bt.Send,{className:"h-4 w-4"})})]})]})};var So=({label:e,value:t,onValueChange:a,options:o,showColor:i=!1,disabled:r=!1})=>{let[c,s]=(0,Et.useState)(!1),m=o.find(l=>l.value===t);return(0,Gr.jsxs)("div",{className:"space-y-1",children:[(0,Gr.jsx)(P,{className:"text-bt text-muted-foreground",children:e}),(0,Gr.jsxs)(ke,{value:t,onValueChange:a,open:c,onOpenChange:l=>{r||s(l)},disabled:r,children:[(0,Gr.jsx)(Ce,{className:"h-auto Gr-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Gr.jsxs)(Z,{variant:"secondary",className:`${r?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!r&&s(!c),children:[i&&m?.color&&(0,Gr.jsx)("div",{className:`w-2 h-2 rounded-full ${m.color} mr-1`}),m?.label||"Select..."]})}),(0,Gr.jsx)(Se,{children:o.map(l=>(0,Gr.jsx)(U,{value:l.value,children:i&&l.color?(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)("div",{className:`w-3 h-3 rounded-full ${l.color}`}),l.label]}):l.label},l.value))})]})]})};var os=({label:e,value:t,onValueChange:a,options:o,placeholder:i="Search...",allowCustomValue:r=!1,disabled:c=!1})=>{let[s,m]=(0,Et.useState)(!1),[n,l]=(0,Et.useState)(""),u=o.find(f=>f.value===t),g=o.filter(f=>f.label.toLowerCase().includes(n.toLowerCase())),v=f=>{a(f),m(!1),l("")},S=()=>{r&&n.trim()&&!o.find(f=>f.value===n.trim())&&(a(n.trim()),m(!1),l(""))};return(0,Gr.jsxs)("div",{className:"space-y-1",children:[(0,Gr.jsx)(P,{className:"text-bt text-muted-foreground",children:e}),(0,Gr.jsxs)(ke,{value:t,onValueChange:v,open:s,onOpenChange:f=>{c||m(f)},disabled:c,children:[(0,Gr.jsx)(Ce,{className:"h-auto Gr-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Gr.jsx)(Z,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&m(!s),children:u?.label||t||"Select..."})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)("div",{className:"Gr-2",children:(0,Gr.jsx)(L,{placeholder:i,value:n,onChange:f=>l(f.target.value),onKeyDown:f=>{f.key==="Enter"&&r&&S()},className:"mb-2"})}),g.map(f=>(0,Gr.jsx)(U,{value:f.value,children:f.label},f.value)),r&&n.trim()&&!g.find(f=>f.value===n.trim())&&(0,Gr.jsxs)(U,{value:n.trim(),children:['Add "',n.trim(),'"']})]})]})]})};var Al=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:bt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:bt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:bt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:bt.Zap}],El=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Il=[{value:"John Doe",label:"John Doe"},{value:"Jane Smith",label:"Jane Smith"},{value:"Bob Wilson",label:"Bob Wilson"},{value:"Alice Johnson",label:"Alice Johnson"},{value:"Carol Brown",label:"Carol Brown"},{value:"David Lee",label:"David Lee"},{value:"Emma Davis",label:"Emma Davis"},{value:"Frank Miller",label:"Frank Miller"},{value:"Grace Taylor",label:"Grace Taylor"},{value:"Unassigned",label:"Unassigned"}],rs=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:i,onClose:r,onDelete:c,isUpdating:s=!1,isDeleting:m=!1,deleteState:n="idle"})=>{let l=g=>g.split(" ").map(v=>v[0]).join("").toUpperCase(),u=()=>n==="loading"?(0,$.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-bt gap-1",children:[(0,$.jsx)(bt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):n==="success"?(0,$.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-bt gap-1",children:[(0,$.jsx)(bt.Check,{className:"h-3 w-3"}),"Deleted"]}):n==="error"?(0,$.jsxs)(h,{disabled:!0,variant:"destructive",className:"w-full h-8 text-bt gap-1",children:[(0,$.jsx)(bt.Gr,{className:"h-3 w-3"}),"Delete failed"]}):(0,$.jsxs)(h,{onClick:c,variant:"destructive",className:"w-full h-8 text-bt gap-1",disabled:s||m,children:[(0,$.jsx)(bt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,$.jsxs)("div",{className:"flex flex-col h-full",children:[(0,$.jsxs)("div",{className:"space-y-4",style:{opacity:s?.6:1},children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-bt text-muted-foreground",children:"Status"}),(0,$.jsx)(So,{label:"",value:e.status,onValueChange:g=>i("status",g),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:s})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-bt text-muted-foreground",children:"Type"}),(0,$.jsx)(fa,{type:"single",value:e.type,onValueChange:g=>g&&i("type",g),className:"grid grid-cols-2 gap-1",disabled:s,children:Al.map(g=>{let v=g.icon;return(0,$.jsxs)(va,{value:g.value,className:"flex items-center gap-1 text-bt h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:[(0,$.jsx)(v,{className:"h-3 w-3"}),g.label]},g.value)})})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-bt text-muted-foreground",children:"Priority"}),(0,$.jsx)(fa,{type:"single",value:e.priority,onValueChange:g=>g&&i("priority",g),className:"grid grid-cols-3 gap-1",disabled:s,children:El.map(g=>(0,$.jsx)(va,{value:g.value,className:"text-bt h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:s,children:g.label},g.value))})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-bt text-muted-foreground",children:"Story Points"}),(0,$.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:g=>i("points",g.target.value),className:"w-full h-8 px-2 text-bt border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:s})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-bt text-muted-foreground",children:"Epic"}),(0,$.jsx)(So,{label:"",value:e.epicId,onValueChange:g=>i("epicId",g),options:(t||[]).map(g=>({value:g.id,label:g.name,color:g.color})),showColor:!0,disabled:s})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-bt text-muted-foreground",children:"Sprint"}),(0,$.jsx)(So,{label:"",value:e.sprintId||"none",onValueChange:g=>i("sprintId",g==="none"?"":g),options:[{value:"none",label:"No Sprint"},...(a||[]).map(g=>({value:g.id,label:`${g.name}${g.isActive?" (Active)":""}`}))],disabled:s})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(P,{className:"text-bt text-muted-foreground",children:"Assignee"}),(0,$.jsx)(os,{label:"",value:e.assignee,onValueChange:g=>i("assignee",g),options:Il,placeholder:"Search team members...",allowCustomValue:!0,disabled:s})]})]}),(0,$.jsxs)("div",{className:"Gr-auto pt-4 space-y-4",children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(h,{onClick:r,variant:"outline",className:"w-full h-8 text-bt",disabled:s||m,children:"Close"}),u()]}),(0,$.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,$.jsx)("div",{className:"text-bt text-muted-foreground font-medium mb-2",children:"Information"}),(0,$.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$.jsx)("span",{className:"text-bt text-muted-foreground",children:"Logged By"}),(0,$.jsxs)("div",{className:"flex items-center gap-1 text-bt text-muted-foreground",children:[(0,$.jsx)(bt.User,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:"System"})]})]}),(0,$.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$.jsx)("span",{className:"text-bt text-muted-foreground",children:"Created"}),(0,$.jsxs)("div",{className:"flex items-center gap-1 text-bt text-muted-foreground",children:[(0,$.jsx)(bt.Calendar,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,$.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$.jsx)("span",{className:"text-bt text-muted-foreground",children:"Last Updated"}),(0,$.jsxs)("div",{className:"flex items-center gap-1 text-bt text-muted-foreground",children:[(0,$.jsx)(bt.Clock,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:[o.toLocaleDateString()," at ",o.toLocaleTimeString()]})]})]})]})]})]})};var is=({isOpen:e,onClose:t,task:a,epics:o,sprints:i,onUpdateTask:r,onDeleteTask:c})=>{let[s,m]=(0,Et.useState)(new Date),[n,l]=(0,Et.useState)("idle"),[u,g]=(0,Et.useState)("idle"),[v,S]=(0,Et.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working on the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),y=async(H,se)=>{if(se!==a[H]){l("loading");try{await r(a.id,{[H]:se}),m(new Date),l("success"),setTimeout(()=>l("idle"),1500)}catch{l("error"),setTimeout(()=>l("idle"),3e3)}}},f=async(H,se)=>{if(se!==a[H]){l("loading");try{await r(a.id,{[H]:se}),m(new Date),l("success"),setTimeout(()=>l("idle"),1500)}catch{l("error"),setTimeout(()=>l("idle"),3e3)}}},k=H=>{let se={id:Date.now().toString(),text:H,author:"Current User",createdAt:new Date};S([...v,se])},I=async()=>{g("loading");try{await c(a.id),g("success"),setTimeout(()=>{t(),g("idle")},1e3)}catch{g("error"),setTimeout(()=>g("idle"),3e3)}},_=n!=="loading"&&u!=="loading",Q=()=>{_&&t()},w=()=>n==="loading"?(0,Gr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Gr.jsx)(bt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Gr.jsx)("span",{children:"Updating..."})]}):n==="success"?(0,Gr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Gr.jsx)(bt.Check,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:"Updated successfully"})]}):n==="error"?(0,Gr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Gr.jsx)(bt.Gr,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:"Update failed"})]}):null;return(0,Gr.jsx)(pt,{open:e,onOpenChange:Q,children:(0,Gr.jsxs)(st,{className:"max-w-3xl max-h-[80vh] overflow-y-auto Gr-4",children:[(0,Gr.jsxs)(nt,{children:[(0,Gr.jsx)(lt,{className:"Et-only",children:a.title}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Gr.jsx)("div",{className:"flex-1",children:w()}),!_&&(0,Gr.jsx)("div",{className:"text-bt text-muted-foreground",children:"Please wait..."})]})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Gr.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Gr.jsx)(ir,{fieldName:"title",value:a.title,label:"",onSave:y,className:"border-b border-border pb-3",disabled:n==="loading"}),(0,Gr.jsx)(ir,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:y,disabled:n==="loading"}),(0,Gr.jsx)(ts,{comments:v,onAddComment:k})]}),(0,Gr.jsx)(rs,{task:a,epics:o,sprints:i,lastUpdated:s,onUpdateTask:f,onClose:Q,onDelete:I,isUpdating:n==="loading",isDeleting:u==="loading",deleteState:u})]})]})})};var Do=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,i]=(0,Et.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),r=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],s=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],m=l=>{l.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),i({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),t())},n=(l,u)=>{i(g=>({...g,[l]:u}))};return(0,Gr.jsx)(pt,{open:e,onOpenChange:t,children:(0,Gr.jsxs)(st,{className:"sm:max-w-md",children:[(0,Gr.jsx)(nt,{children:(0,Gr.jsx)(lt,{children:"Add New Epic"})}),(0,Gr.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"name",children:"Epic Name"}),(0,Gr.jsx)(L,{id:"name",value:o.name,onChange:l=>n("name",l.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,Gr.jsx)(Ne,{id:"description",value:o.description,onChange:l=>n("description",l.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"Color"}),(0,Gr.jsx)("div",{className:"flex gap-2 flex-wrap",children:r.map(l=>(0,Gr.jsx)("button",{type:"button",onClick:()=>n("color",l),className:`w-8 h-8 rounded-full ${l} ${o.color===l?"ring-2 ring-gray-400":""}`},l))})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"Confidence"}),(0,Gr.jsxs)(ke,{value:o.confidence,onValueChange:l=>n("confidence",l),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsx)(Se,{children:c.map(l=>(0,Gr.jsx)(U,{value:l.value,children:l.label},l.value))})]})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"Phase"}),(0,Gr.jsxs)(ke,{value:o.phase.toString(),onValueChange:l=>n("phase",parseInt(l)),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsx)(Se,{children:s.map(l=>(0,Gr.jsx)(U,{value:l.value.toString(),children:l.label},l.value))})]})]})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"Start Date"}),(0,Gr.jsx)(L,{type:"date",value:o.startDate,onChange:l=>n("startDate",l.target.value)})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"End Date"}),(0,Gr.jsx)(L,{type:"date",value:o.endDate,onChange:l=>n("endDate",l.target.value)})]})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"Progress (%)"}),(0,Gr.jsx)(L,{type:"number",min:"0",max:"100",value:o.progress,onChange:l=>n("progress",parseInt(l.target.value)||0)})]}),(0,Gr.jsxs)(Ua,{children:[(0,Gr.jsx)(h,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Gr.jsx)(h,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var ns=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:i=[],initialProjects:r=[],onAddTask:c,onUpdateTask:s,onDeleteTask:m,onTaskClick:n,onAddEpic:l})=>{let[u,g]=(0,Et.useState)(e),[v,S]=(0,Et.useState)(t),[y,f]=(0,Et.useState)(a),[k,I]=(0,Et.useState)(!1),[_,Q]=(0,Et.useState)(!1),[w,H]=(0,Et.useState)(null),[se,T]=(0,Et.useState)(null),[R,A]=(0,Et.useState)(o),[pe,M]=(0,Et.useState)(i),ze=v.filter(q=>!0).map(q=>q.id),Ie=y.find(q=>q.isSelected);ze.push("no-epic"),(0,Et.useEffect)(()=>{g(e)},[e]),(0,Et.useEffect)(()=>{S(t)},[t]),(0,Et.useEffect)(()=>{f(a)},[a]);let We=u.filter(q=>{let x=ze.includes(q.epicId)||!q.epicId;return!Ie||Ie.id==="all-tasks"?x:Ie.id==="backlog"?x&&!q.sprintId:x&&q.sprintId===Ie.id}),D=q=>We.filter(x=>x.status===q),ue=q=>{let x={};return v.forEach(ve=>{x[ve.id]=q.filter(ie=>ie.epicId===ve.id)}),x["no-epic"]=q.filter(ve=>!ve.epicId),x},Re=q=>{T(q)},rt=q=>{se&&(g(x=>x.map(ve=>ve.id===se.id?{...ve,status:q}:ve)),s?.(se.id,{status:q}),T(null))},Me=q=>{let x={...q,id:Date.now().toString(),createdAt:new Date};g(ve=>[...ve,x]),c?.(q)},De=async(q,x)=>{g(ve=>ve.map(ie=>ie.id===q?{...ie,...x}:ie)),s&&await s(q,x)},ct=async q=>{g(x=>x.filter(ve=>ve.id!==q)),w?.id===q&&H(null),m&&await m(q)},yt=q=>{let x={...q,id:Date.now().toString(),isSelected:!0};S(ve=>[...ve,x]),l?.(q)},it=q=>{H(q),n?.(q)};return(0,Gr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Gr.jsx)(Qe,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>I(!0)},secondaryAction:{label:"Add epic",onClick:()=>Q(!0)}}),(0,Gr.jsx)("div",{className:"flex-1",children:(0,Gr.jsxs)("div",{className:"w-full",children:[(0,Gr.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(q=>{let x=D(q.status),ve=ue(x);return(0,Gr.jsx)(Gi,{title:q.title,status:q.status,taskCount:x.length,onDrop:rt,isCompact:q.status==="done",children:ze.map(ie=>{let ft=v.find(Rt=>Rt.id===ie),Ot=ve[ie]||[];return Ot.length===0?null:(0,Gr.jsxs)("div",{className:"mb-6",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Gr.jsx)("div",{className:`w-3 h-3 rounded-full ${ft?.color}`}),(0,Gr.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:ft?.name||"No Epic"}),(0,Gr.jsx)(Z,{variant:"secondary",className:"text-bt",children:Ot.length})]})," ",(0,Gr.jsx)("div",{className:"space-y-3",children:Ot.map(Rt=>(0,Gr.jsx)(yo,{task:Rt,epic:ft,onDragStart:Re,onTaskClick:it,isCompact:q.status==="done"},Rt.id))})]},ie)})},q.id)})}),(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)(No,{isOpen:k,onClose:()=>I(!1),onAddTask:Me,assignees:[...pe,...R],epics:v,sprints:y}),(0,Gr.jsx)(Do,{isOpen:_,onClose:()=>Q(!1),onAddEpic:yt}),w&&(0,Gr.jsx)(is,{isOpen:!!w,onClose:()=>H(null),task:w,epics:v,sprints:y,onUpdateTask:De,onDeleteTask:ct})]})]})})]})};var ls=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddTaskToEpic:r,onAddEpic:c,onUpdateEpic:s,onDeleteEpic:m})=>{let[n,l]=(0,Et.useState)(null),[u,g]=(0,Et.useState)(null),[v,S]=(0,Et.useState)({}),y=R=>{l(R)},f=R=>{R.preventDefault()},k=(R,A)=>{R.preventDefault(),n&&n.epicId!==A&&(o(n.id,{epicId:A}),l(null))},I=R=>e.filter(A=>A.epicId===R),_=R=>{g(R.id),S({name:R.name,description:R.description,confidence:R.confidence,phase:R.phase,progress:R.progress})},Q=()=>{u&&v.name&&(s(u,v),g(null),S({}))},w=()=>{g(null),S({})},H=R=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&m(R)},se=R=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[R]||`Phase ${R}`,T=R=>{switch(R){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Gr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Gr.jsx)(Qe,{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:c}}),(0,Gr.jsx)("div",{className:"flex-1",children:(0,Gr.jsx)("div",{className:"w-full",children:(0,Gr.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(R=>{let A=I(R.id),pe=A.reduce((M,ze)=>M+ze.points,0);return(0,Gr.jsxs)(O,{className:`flex flex-col ${u===R.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:f,onDrop:M=>k(M,R.id),children:[(0,Gr.jsx)("div",{className:"Gr-4 border-b border-border",children:u===R.id?(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Gr.jsx)(L,{value:v.name||"",onChange:M=>S({...v,name:M.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Gr.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:Q,className:"Gr-1 h-8 w-8",children:(0,Gr.jsx)(bt.Check,{className:"h-4 w-4"})}),(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:w,className:"Gr-1 h-8 w-8",children:(0,Gr.jsx)(bt.Gr,{className:"h-4 w-4"})})]})]}),(0,Gr.jsx)(Ne,{value:v.description||"",onChange:M=>S({...v,description:M.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("label",{className:"text-bt text-muted-foreground",children:"Confidence"}),(0,Gr.jsxs)(ke,{value:v.confidence||R.confidence,onValueChange:M=>S({...v,confidence:M}),children:[(0,Gr.jsx)(Ce,{className:"text-bt",children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"low",children:"Low"}),(0,Gr.jsx)(U,{value:"medium",children:"Medium"}),(0,Gr.jsx)(U,{value:"high",children:"High"})]})]})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("label",{className:"text-bt text-muted-foreground",children:"Phase"}),(0,Gr.jsxs)(ke,{value:v.phase?.toString()||R.phase.toString(),onValueChange:M=>S({...v,phase:parseInt(M)}),children:[(0,Gr.jsx)(Ce,{className:"text-bt",children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsx)(Se,{children:[1,2,3,4,5,6,7,8,9].map(M=>(0,Gr.jsxs)(U,{value:M.toString(),children:["Phase ",M]},M))})]})]})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("label",{className:"text-bt text-muted-foreground",children:"Progress (%)"}),(0,Gr.jsx)(L,{type:"number",min:"0",max:"100",value:v.progress||R.progress,onChange:M=>S({...v,progress:parseInt(M.target.value)||0}),className:"text-bt"})]})]}):(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Gr.jsx)("div",{className:`w-4 h-4 rounded-full ${R.color}`}),(0,Gr.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:R.name}),(0,Gr.jsxs)("div",{className:"flex gap-1",children:[(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>_(R),className:"Gr-1 h-8 w-8",children:(0,Gr.jsx)(bt.Edit2,{className:"h-3 w-3"})}),(0,Gr.jsx)(h,{size:"sm",variant:"ghost",onClick:()=>H(R.id),className:"Gr-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Gr.jsx)(bt.Trash2,{className:"h-3 w-3"})})]})]}),(0,Gr.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Gr.jsxs)(Z,{className:`text-bt ${T(R.confidence)}`,children:[R.confidence," confidence"]}),(0,Gr.jsxs)(Z,{variant:"outline",className:"text-bt",children:["Phase ",R.phase]}),(0,Gr.jsxs)(Z,{variant:"secondary",className:"text-bt bg-muted text-muted-foreground",children:[A.length," tasks"]}),(0,Gr.jsxs)(Z,{variant:"secondary",className:"text-bt bg-muted text-muted-foreground",children:[pe," pts"]})]}),R.description&&(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground mb-3 select-none",children:R.description}),(0,Gr.jsxs)("div",{className:"mb-3",children:[(0,Gr.jsxs)("div",{className:"flex justify-between text-bt text-muted-foreground mb-1",children:[(0,Gr.jsx)("span",{className:"select-none",children:"Progress"}),(0,Gr.jsxs)("span",{className:"select-none",children:[R.progress,"%"]})]}),(0,Gr.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,Gr.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${R.progress}%`}})})]}),(0,Gr.jsxs)(h,{onClick:()=>r(R.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Gr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Gr.jsx)("div",{className:"flex-1 Gr-4 overflow-y-auto",children:(0,Gr.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded Gr-3 transition-colors ${n?"border-primary bg-primary/10":"border-border"}`,children:A.length===0?(0,Gr.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,Gr.jsx)(bt.Move,{className:"h-8 w-8 mb-2"}),(0,Gr.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):A.map(M=>(0,Gr.jsx)(yo,{task:M,epic:R,onDragStart:y,onTaskClick:i,isCompact:!0},M.id))})})]},R.id)})})})})]})};var ds=require("react-day-picker");function Po({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Gr.jsx)(ds.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:b("Gr-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:b(oo({variant:"outline"}),"h-7 w-7 bg-transparent Gr-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full Gr-2",cell:b("relative Gr-0 text-center text-sm focus-within:relative focus-within:Gr-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:b(oo({variant:"ghost"}),"h-8 w-8 Gr-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Po.displayName="Calendar";var ms=be(require("react")),jt=be(require("@radix-ui/react-popover"));var lr=jt.Root,dr=jt.Trigger;var To=ms.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},i)=>(0,Gr.jsx)(jt.Portal,{children:(0,Gr.jsx)(jt.Content,{ref:i,align:t,sideOffset:a,className:b("Gr-50 w-72 rounded-md border bg-popover Gr-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));To.displayName=jt.Content.displayName;var mr=require("date-fns");var us=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,i]=(0,Et.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),r=s=>{s.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},c=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,Gr.jsx)(pt,{open:e,onOpenChange:c,children:(0,Gr.jsxs)(st,{className:"sm:max-w-md",children:[(0,Gr.jsx)(nt,{children:(0,Gr.jsx)(lt,{children:"Add New Sprint"})}),(0,Gr.jsxs)("form",{onSubmit:r,className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"name",children:"Sprint Name *"}),(0,Gr.jsx)(L,{id:"name",value:o.name,onChange:s=>i(m=>({...m,name:s.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,Gr.jsx)(Ne,{id:"description",value:o.description,onChange:s=>i(m=>({...m,description:s.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"Start Date *"}),(0,Gr.jsxs)(lr,{children:[(0,Gr.jsx)(dr,{asChild:!0,children:(0,Gr.jsxs)(h,{variant:"outline",className:b("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Gr.jsx)(bt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,mr.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Gr.jsx)(To,{className:"w-auto Gr-0",align:"start",children:(0,Gr.jsx)(Po,{mode:"single",selected:o.startDate,onSelect:s=>i(m=>({...m,startDate:s})),initialFocus:!0})})]})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{children:"End Date *"}),(0,Gr.jsxs)(lr,{children:[(0,Gr.jsx)(dr,{asChild:!0,children:(0,Gr.jsxs)(h,{variant:"outline",className:b("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Gr.jsx)(bt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,mr.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Gr.jsx)(To,{className:"w-auto Gr-0",align:"start",children:(0,Gr.jsx)(Po,{mode:"single",selected:o.endDate,onSelect:s=>i(m=>({...m,endDate:s})),initialFocus:!0,disabled:s=>o.startDate?s<o.startDate:!1})})]})]})]}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:s=>i(m=>({...m,isActive:s.target.checked})),className:"rounded border-gray-300"}),(0,Gr.jsx)(P,{htmlFor:"isActive",children:"Set Et active sprint"})]}),(0,Gr.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Gr.jsx)(h,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,Gr.jsx)(h,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Ao=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddSprint:r})=>{let[c,s]=(0,Et.useState)(["2"]),[m,n]=(0,Et.useState)(null),[l,u]=(0,Et.useState)(!1),[g,v]=(0,Et.useState)(null),[S,y]=(0,Et.useState)(e.filter(D=>!D.sprintId)),[f,k]=(0,Et.useState)(e.filter(D=>D.sprintId&&c.includes(D.sprintId))),[I,_]=(0,Et.useState)(a.filter(D=>D.id!=="backlog"&&D.id!=="all-tasks").sort((D,ue)=>D.startDate.getTime()-ue.startDate.getTime()));(0,Et.useEffect)(()=>{y(e.filter(D=>!D.sprintId)),k(e.filter(D=>D.sprintId&&c.includes(D.sprintId))),_(a.filter(D=>D.id!=="backlog"&&D.id!=="all-tasks").sort((D,ue)=>D.startDate.getTime()-ue.startDate.getTime()))},[e,a,c]);let Q=D=>t.find(ue=>ue.id===D),w=D=>a.find(ue=>ue.id===D),H=D=>{switch(D){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},se=D=>D.split(" ").map(ue=>ue[0]).join("").toUpperCase(),T=D=>{n(D)},R=D=>{D.preventDefault()},A=D=>{v(D)},pe=()=>{v(null)},M=(D,ue)=>{D.preventDefault(),v(null),m&&(o(m.id,{sprintId:ue==="backlog"?void 0:ue}),n(null))},ze=D=>{D==="backlog"||D==="all-tasks"||s(ue=>ue.includes(D)?ue.filter(Re=>Re!==D):[...ue,D])},Ie=D=>{r(D),u(!1)},We=({task:D,showSprint:ue=!1})=>{let Re=Q(D.epicId),rt=D.sprintId?w(D.sprintId):null,[Me,De]=(0,Et.useState)(!1),ct=wt=>{wt.defaultPrevented||Me||i(D)},yt=wt=>{De(!0),T(D)},it=()=>{De(!1)};return(0,Gr.jsx)(O,{className:`Gr-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${Me?"opacity-50 shadow-lg scale-105":""} ${m?.id===D.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:yt,onDragEnd:it,onClick:ct,children:(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Gr.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:D.title}),(0,Gr.jsx)(Z,{className:`text-bt select-none pointer-events-none ${H(D.priority)}`,children:D.priority[0].toUpperCase()})]}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-bt pointer-events-none",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-1",children:[Re&&(0,Gr.jsx)("div",{className:`w-2 h-2 rounded-full ${Re.color}`}),(0,Gr.jsx)("span",{className:"text-muted-foreground truncate select-none",children:Re?.name})]}),(0,Gr.jsx)("span",{className:"text-muted-foreground select-none",children:se(D.assignee)})]}),ue&&rt&&(0,Gr.jsxs)("div",{className:"flex items-center gap-1 text-bt text-muted-foreground pointer-events-none",children:[(0,Gr.jsx)(bt.Calendar,{className:"h-3 w-3"}),(0,Gr.jsx)("span",{className:"select-none",children:rt.name})]})]})})};return(0,Gr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Gr.jsx)(Qe,{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:()=>u(!0)}}),(0,Gr.jsx)("div",{className:"flex-1",children:(0,Gr.jsxs)("div",{className:"w-full",children:[(0,Gr.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,Gr.jsx)("div",{className:"lg:col-span-1",children:(0,Gr.jsxs)(O,{className:"Gr-4 h-full bg-card shadow-sm",onDragOver:R,onDragEnter:()=>A("backlog"),onDragLeave:pe,onDrop:D=>M(D,"backlog"),children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Gr.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,Gr.jsx)(Z,{variant:"secondary",className:"bg-muted text-muted-foreground",children:S.length})]}),(0,Gr.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded Gr-3 transition-colors ${g==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[S.map(D=>(0,Gr.jsx)(We,{task:D},D.id)),S.length===0&&(0,Gr.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"})]})]})}),(0,Gr.jsx)("div",{className:"lg:col-span-3",children:(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsxs)(O,{className:"Gr-4 bg-card shadow-sm",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Gr.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,Gr.jsxs)(h,{onClick:()=>u(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,Gr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,Gr.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:I.map(D=>(0,Gr.jsxs)(h,{variant:c.includes(D.id)?"default":"outline",size:"sm",onClick:()=>ze(D.id),className:"text-bt h-8",children:[D.name,D.isActive&&(0,Gr.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},D.id))})]}),(0,Gr.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:c.map(D=>I.find(ue=>ue.id===D)).filter(Boolean).sort((D,ue)=>D.startDate.getTime()-ue.startDate.getTime()).map(D=>{let ue=f.filter(Re=>Re.sprintId===D.id);return(0,Gr.jsxs)(O,{className:"Gr-4 bg-card shadow-sm",onDragOver:R,onDragEnter:()=>A(D.id),onDragLeave:pe,onDrop:Re=>M(Re,D.id),children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("h3",{className:"font-semibold text-foreground select-none",children:D.name}),D.isActive&&(0,Gr.jsx)("span",{className:"text-bt text-success font-medium select-none",children:"Active Sprint"})]}),(0,Gr.jsx)(Z,{variant:"secondary",className:"bg-muted text-muted-foreground",children:ue.length})]}),(0,Gr.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded Gr-3 transition-colors ${g===D.id?"border-primary bg-primary/10":"border-border"}`,children:[ue.map(Re=>(0,Gr.jsx)(We,{task:Re},Re.id)),ue.length===0&&(0,Gr.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},D.id)})})," "]})})]}),(0,Gr.jsx)(us,{isOpen:l,onClose:()=>u(!1),onAddSprint:Ie})]})})]})};var Ml=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Fl=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),Bl=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},pr=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[i,r]=t.split(":");o.setHours(parseInt(i),parseInt(r))}return o<a},ur=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Ll=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},jl=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[i,r]=(0,Et.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,s]=(0,Et.useState)(!1),m=l=>{l.preventDefault();let u=e.find(v=>v?.id.toString()===i.colleagueId.toString());if(!u){console.error("No valid colleague selected"),s(!0);return}s(!1);let g={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:u,isCompleted:!1,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,priority:i.priority,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(v=>v.trim()):void 0};t(g),o(!1),r({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,Et.useEffect)(()=>{i.colleagueId&&s(!1)},[i.colleagueId]);let n=e.filter(Boolean);return(0,Gr.jsx)(pt,{open:a,onOpenChange:o,children:(0,Gr.jsxs)(st,{className:"max-w-2xl",children:[(0,Gr.jsx)(nt,{children:(0,Gr.jsx)(lt,{children:"Add New Reminder"})}),(0,Gr.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,Gr.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"title",children:"Title"}),(0,Gr.jsx)(L,{id:"title",value:i.title,onChange:l=>r({...i,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,Gr.jsx)(Ne,{id:"description",value:i.description,onChange:l=>r({...i,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"dueDate",children:"Due Date"}),(0,Gr.jsx)(L,{id:"dueDate",type:"date",value:i.dueDate,onChange:l=>r({...i,dueDate:l.target.value}),required:!0})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Gr.jsx)(L,{id:"dueTime",type:"time",value:i.dueTime,onChange:l=>r({...i,dueTime:l.target.value})})]})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Gr.jsxs)(ke,{value:i.colleagueId,onValueChange:l=>{r({...i,colleagueId:l})},required:!0,children:[(0,Gr.jsx)(Ce,{className:`${c?"text-destructive border-red-500":""}`,children:(0,Gr.jsx)(Fe,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(l=>l?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Gr.jsx)(Se,{children:n.map(l=>(0,Gr.jsx)(U,{value:l.id,children:l.name},l.id))})]}),c&&(0,Gr.jsx)("Gr",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:l=>r({...i,isRecurring:l.target.checked}),className:"rounded border-border"}),(0,Gr.jsx)(P,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Gr.jsxs)(ke,{value:i.recurrencePattern,onValueChange:l=>r({...i,recurrencePattern:l}),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"daily",children:"Daily"}),(0,Gr.jsx)(U,{value:"weekly",children:"Weekly"}),(0,Gr.jsx)(U,{value:"monthly",children:"Monthly"}),(0,Gr.jsx)(U,{value:"yearly",children:"Yearly"})]})]})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Gr.jsx)(L,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:l=>r({...i,recurrenceInterval:parseInt(l.target.value)})})]})]})]}),(0,Gr.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Gr.jsx)(h,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,Gr.jsx)(h,{type:"submit",children:"Add Reminder"})]})]})]})})},Ol=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:i})=>{let[r,c]=(0,Et.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague?.id||"",priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""}),s=n=>{n.preventDefault();let l=t.find(u=>u?.id===r.colleagueId);if(!l){console.error("No valid colleague selected");return}a(e.id,{title:r.title,description:r.description,dueDate:new Date(r.dueDate),dueTime:r.dueTime||void 0,colleague:l,priority:r.priority,isRecurring:r.isRecurring,recurrencePattern:r.isRecurring?r.recurrencePattern:void 0,recurrenceInterval:r.isRecurring?r.recurrenceInterval:void 0,reminderEnabled:r.reminderEnabled,reminderMinutes:r.reminderEnabled?r.reminderMinutes:void 0,tags:r.tags?r.tags.split(",").map(u=>u.trim()):void 0}),i()},m=t.filter(Boolean);return(0,Gr.jsx)(pt,{open:o,onOpenChange:i,children:(0,Gr.jsxs)(st,{className:"max-w-2xl",children:[(0,Gr.jsx)(nt,{children:(0,Gr.jsx)(lt,{children:"Edit Reminder"})}),(0,Gr.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-title",children:"Title"}),(0,Gr.jsx)(L,{id:"edit-title",value:r.title,onChange:n=>c({...r,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-priority",children:"Priority"}),(0,Gr.jsxs)(ke,{value:r.priority,onValueChange:n=>c({...r,priority:n}),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"low",children:"\u{1F7E2} Low"}),(0,Gr.jsx)(U,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Gr.jsx)(U,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-description",children:"Description"}),(0,Gr.jsx)(Ne,{id:"edit-description",value:r.description,onChange:n=>c({...r,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Gr.jsx)(L,{id:"edit-dueDate",type:"date",value:r.dueDate,onChange:n=>c({...r,dueDate:n.target.value}),required:!0})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Gr.jsx)(L,{id:"edit-dueTime",type:"time",value:r.dueTime,onChange:n=>c({...r,dueTime:n.target.value})})]})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,Gr.jsxs)(ke,{value:r.colleagueId,onValueChange:n=>c({...r,colleagueId:n}),required:!0,children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{placeholder:"Select a digital colleague"})}),(0,Gr.jsx)(Se,{children:m.map(n=>(0,Gr.jsx)(U,{value:n.id,children:n.name},n.id))})]})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:r.isRecurring,onChange:n=>c({...r,isRecurring:n.target.checked}),className:"rounded border-border"}),(0,Gr.jsx)(P,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,Gr.jsxs)(ke,{value:r.recurrencePattern,onValueChange:n=>c({...r,recurrencePattern:n}),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"daily",children:"Daily"}),(0,Gr.jsx)(U,{value:"weekly",children:"Weekly"}),(0,Gr.jsx)(U,{value:"monthly",children:"Monthly"}),(0,Gr.jsx)(U,{value:"yearly",children:"Yearly"})]})]})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,Gr.jsx)(L,{id:"edit-recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:n=>c({...r,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:r.reminderEnabled,onChange:n=>c({...r,reminderEnabled:n.target.checked}),className:"rounded border-border"}),(0,Gr.jsx)(P,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),r.reminderEnabled&&(0,Gr.jsxs)("div",{className:"pl-6",children:[(0,Gr.jsx)(P,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,Gr.jsxs)(ke,{value:r.reminderMinutes.toString(),onValueChange:n=>c({...r,reminderMinutes:parseInt(n)}),children:[(0,Gr.jsx)(Ce,{children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsx)(U,{value:"5",children:"5 minutes before"}),(0,Gr.jsx)(U,{value:"15",children:"15 minutes before"}),(0,Gr.jsx)(U,{value:"30",children:"30 minutes before"}),(0,Gr.jsx)(U,{value:"60",children:"1 hour before"}),(0,Gr.jsx)(U,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)(P,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,Gr.jsx)(L,{id:"edit-tags",value:r.tags,onChange:n=>c({...r,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Gr.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Gr.jsx)(h,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,Gr.jsx)(h,{type:"submit",children:"Save Changes"})]})]})]})})},zl=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[i,r]=(0,Et.useState)(!1);if(!e||!e.id)return null;let c=pr(e.dueDate,e.dueTime),s=ur(e.dueDate),m=Ll(e.dueDate),n=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},l=()=>s?"Today":m?"Tomorrow":c&&!e.isCompleted?"Overdue":Fl(e.dueDate);return(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)(Ol,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>r(!1)}),(0,Gr.jsx)(O,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${c&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,Gr.jsx)(le,{className:"Gr-4",children:(0,Gr.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Gr.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Gr.jsx)("button",{onClick:n,className:"Gr-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,Gr.jsx)(bt.CheckCircle,{className:"h-5 w-5"}):(0,Gr.jsx)(bt.Circle,{className:"h-5 w-5"})}),(0,Gr.jsxs)("div",{className:"flex-1",children:[(0,Gr.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Gr.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,Gr.jsx)("span",{className:"text-sm",children:Ml(e.priority)}),e.isRecurring&&(0,Gr.jsx)(bt.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,Gr.jsx)(bt.Bell,{className:"h-4 w-4 text-success"})]}),(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Gr.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Gr.jsx)(bt.Calendar,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{className:c&&!e.isCompleted?"text-destructive font-medium":"",children:l()})]}),e.dueTime&&(0,Gr.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Gr.jsx)(bt.Clock,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:Bl(e.dueTime)})]}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Gr.jsx)(bt.User,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:e.colleague?.name||"Unknown Colleague"})]})]}),e.tags&&e.tags.length>0&&(0,Gr.jsx)("div",{className:"flex flex-wrap gap-1 Gr-2",children:e.tags.map((u,g)=>(0,Gr.jsx)(Z,{variant:"secondary",className:"text-bt",children:u},g))})]})]}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Gr.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>r(!0),className:"h-8 w-8 Gr-0",children:(0,Gr.jsx)(bt.Edit2,{className:"h-4 w-4"})}),(0,Gr.jsx)(h,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 Gr-0 text-destructive hover:text-destructive/80",children:(0,Gr.jsx)(bt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},gs=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:i})=>{let[r,c]=(0,Et.useState)(e.filter(Boolean)),[s]=(0,Et.useState)(t.filter(Boolean)),[m,n]=(0,Et.useState)("all"),[l,u]=(0,Et.useState)(""),[g,v]=(0,Et.useState)(!1),S=w=>{if(!w.title||!w.colleague?.id){console.error("Invalid reminder data:",w);return}let H={...w,id:Date.now().toString(),createdAt:new Date};c(se=>[...se,H]),a?.(w)},y=(w,H)=>{if(!w){console.error("No reminder ID provided for update");return}c(se=>se.map(T=>T?.id===w?{...T,...H}:T)),o?.(w,H)},f=w=>{if(!w){console.error("No reminder ID provided for deletion");return}c(H=>H.filter(se=>se?.id!==w)),i?.(w)},I=r.filter(w=>{if(!w)return!1;if(l){let H=l.toLowerCase();if(!(w.title.toLowerCase().includes(H)||w.description.toLowerCase().includes(H)||w.colleague?.name?.toLowerCase().includes(H)||w.tags?.some(T=>T.toLowerCase().includes(H))))return!1}switch(m){case"pending":return!w.isCompleted;case"completed":return w.isCompleted;case"overdue":return!w.isCompleted&&pr(w.dueDate,w.dueTime);case"today":return ur(new Date(w.dueDate));default:return!0}}).sort((w,H)=>{if(!w||!H)return 0;if(w.isCompleted&&!H.isCompleted)return 1;if(!w.isCompleted&&H.isCompleted)return-1;let se={high:3,medium:2,low:1},T=se[H.priority]-se[w.priority];return T!==0?T:w.dueDate.getTime()-H.dueDate.getTime()}),_={total:r.filter(Boolean).length,pending:r.filter(w=>w&&!w.isCompleted).length,completed:r.filter(w=>w&&w.isCompleted).length,overdue:r.filter(w=>w&&!w.isCompleted&&pr(w.dueDate,w.dueTime)).length,today:r.filter(w=>w&&ur(new Date(w.dueDate))).length},Q=s.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return(0,Gr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Gr.jsx)(Qe,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{v(!0)}}}),(0,Gr.jsxs)("div",{className:"h-full bg-background",children:[(0,Gr.jsx)(jl,{colleagues:s,onAddReminder:S,open:g,setOpen:v}),(0,Gr.jsxs)("div",{className:"Gr-6",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Gr.jsxs)("div",{children:[(0,Gr.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Gr.jsxs)(h,{className:"flex items-center space-x-2",onClick:()=>v(!0),children:[(0,Gr.jsx)(bt.Plus,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:"Add Reminder"})]})]}),(0,Gr.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Gr.jsxs)(O,{className:"Gr-4",children:[(0,Gr.jsx)("div",{className:"text-2xl font-bold text-foreground",children:_.total}),(0,Gr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Gr.jsxs)(O,{className:"Gr-4",children:[(0,Gr.jsx)("div",{className:"text-2xl font-bold text-primary",children:_.pending}),(0,Gr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Gr.jsxs)(O,{className:"Gr-4",children:[(0,Gr.jsx)("div",{className:"text-2xl font-bold text-success",children:_.completed}),(0,Gr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Gr.jsxs)(O,{className:"Gr-4",children:[(0,Gr.jsx)("div",{className:"text-2xl font-bold text-destructive",children:_.overdue}),(0,Gr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Gr.jsxs)(O,{className:"Gr-4",children:[(0,Gr.jsx)("div",{className:"text-2xl font-bold text-warning",children:_.today}),(0,Gr.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Gr.jsx)("div",{className:"flex-1",children:(0,Gr.jsx)(L,{placeholder:"Search reminders...",value:l,onChange:w=>u(w.target.value),className:"max-w-md"})}),(0,Gr.jsxs)(ke,{value:m,onValueChange:w=>n(w),children:[(0,Gr.jsx)(Ce,{className:"w-40",children:(0,Gr.jsx)(Fe,{})}),(0,Gr.jsxs)(Se,{children:[(0,Gr.jsxs)(U,{value:"all",children:["All (",_.total,")"]}),(0,Gr.jsxs)(U,{value:"pending",children:["Pending (",_.pending,")"]}),(0,Gr.jsxs)(U,{value:"completed",children:["Completed (",_.completed,")"]}),(0,Gr.jsxs)(U,{value:"overdue",children:["Overdue (",_.overdue,")"]}),(0,Gr.jsxs)(U,{value:"today",children:["Today (",_.today,")"]})]})]})]}),(0,Gr.jsx)("div",{className:"space-y-4",children:I.length===0?(0,Gr.jsxs)(O,{className:"Gr-8 text-center",children:[(0,Gr.jsx)("div",{className:"text-muted-foreground",children:l||m!=="all"?"No reminders match your filters":"No reminders yet"}),!l&&m==="all"&&(0,Gr.jsx)("Gr",{className:"text-sm text-muted-foreground/60 Gr-2",children:"Create your first reminder to get started"})]}):I.map(w=>w&&(0,Gr.jsx)(zl,{reminder:w,colleagues:s,onUpdateReminder:y,onDeleteReminder:f},w.id))})]})]})]})};var fs=require("next/navigation");function gr({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:i=[],initialReminders:r=[],initialColleagues:c=[],initialUsers:s=[],initialFiles:m=[],initialView:n="kanban",onAddTask:l,onUpdateTask:u,onDeleteTask:g,onTaskClick:v,onAddEpic:S,onUpdateEpic:y,onDeleteEpic:f,onAddTaskToEpic:k,onAddSprint:I,onUpdateSprint:_,onDeleteSprint:Q,onAddProject:w,onUpdateProject:H,onDeleteProject:se,onFileAdd:T,onFileEdit:R,onFileDelete:A,onFileClick:pe,onAddReminder:M,onUpdateReminder:ze,onDeleteReminder:Ie,onViewChange:We,onToggleMobileMenu:D,onTeamClick:ue,onTeamChange:Re,onCopilotClick:rt}){let[Me,De]=(0,Et.useState)(t),[ct,yt]=(0,Et.useState)(a),[it,wt]=(0,Et.useState)(o),[q,x]=(0,Et.useState)(i),[ve,ie]=(0,Et.useState)(r),[ft,Ot]=(0,Et.useState)(c),[Rt,Bo]=(0,Et.useState)(s),[Lo,Ja]=(0,Et.useState)(m),[jo,Ya]=(0,Et.useState)(!1),[Za,Aa]=(0,Et.useState)(!1),[Qa,N]=(0,Et.useState)(null),[B,we]=(0,Et.useState)(null),[Cr,Sr]=(0,Et.useState)(null),[ta,Dr]=(0,Et.useState)(n||"kanban"),[Ps,Ts]=(0,Et.useState)(!1),kr=(0,fs.useRouter)();(0,Et.useEffect)(()=>{De(t)},[t]),(0,Et.useEffect)(()=>{wt(o)},[o]),(0,Et.useEffect)(()=>{yt(a)},[a]),(0,Et.useEffect)(()=>{x(i)},[i]),(0,Et.useEffect)(()=>{Ja(m)},[m]),(0,Et.useEffect)(()=>{Bo(s)},[s]),(0,Et.useEffect)(()=>{Ot(c)},[c]),(0,Et.useEffect)(()=>{ie(r)},[r]),(0,Et.useEffect)(()=>{Dr(n)},[n]);let Rs=ct.filter(C=>C.isSelected).map(C=>C.id),eo=it.find(C=>C.isSelected),As=Me.filter(C=>{let j=Rs.includes(C.epicId);return!eo||eo.id==="all-tasks"?j:eo.id==="backlog"?j&&!C.sprintId:j&&C.sprintId===eo.id}),Vl=C=>As.filter(j=>j.status===C),Ul=C=>{let j={};return ct.forEach(te=>{j[te.id]=C.filter(Ae=>Ae.epicId===te.id)}),j},Kl=C=>{Sr(C)},$l=C=>{Cr&&(De(j=>j.map(te=>te.id===Cr.id?{...te,status:C}:te)),Sr(null))},Pr=C=>{let j={...C,id:Date.now().toString(),createdAt:new Date};De(te=>[...te,j]),l?.(j)},to=(C,j)=>{De(te=>te.map(Ae=>Ae.id===C?{...Ae,...j}:Ae)),u?.(C,j)},_l=async(C,j)=>{to(C,j)},Tr=C=>{De(j=>j.filter(te=>te.id!==C)),Qa?.id===C&&N(null),g?.(C)},Gl=async C=>{Tr(C)},Es=C=>{let j={...C,id:Date.now().toString(),isSelected:!1};x(te=>[...te,j]),w?.(C)},Is=(C,j)=>{x(te=>te.map(Ae=>Ae.id===C?j.isSelected?(kr.push(`/project/${C}`),{...Ae,...j}):{...Ae,...j}:j.isSelected&&C!==Ae.id?{...Ae,isSelected:!1}:Ae)),H?.(C,j)},Ms=C=>{x(j=>j.filter(te=>te.id!==C)),se?.(C)},Rr=C=>{let j={...C,id:Date.now().toString(),isSelected:!0};yt(te=>[...te,j]),S?.({...j})},Ar=()=>{Aa(!0)},Er=(C,j)=>{yt(te=>te.map(Ae=>Ae.id===C?{...Ae,...j}:Ae)),y?.(C,j)},Ir=C=>{yt(j=>j.filter(te=>te.id!==C)),De(j=>j.filter(te=>te.epicId!==C)),f?.(C)},Mr=C=>{let j={...C,id:Date.now().toString(),isSelected:!1};wt(te=>[...te,j]),I?.(C)},Fs=(C,j)=>{wt(te=>te.map(Ae=>Ae.id===C?j.isSelected?{...Ae,...j}:{...Ae,...j}:j.isSelected&&C!==Ae.id?{...Ae,isSelected:!1}:Ae)),_?.(C,j)},Bs=C=>{C==="backlog"||C==="all-tasks"||(wt(j=>j.filter(te=>te.id!==C)),De(j=>j.map(te=>te.sprintId===C?{...te,sprintId:void 0}:te)),Q?.(C))},Oo=C=>{N(C)},Ls=C=>{C==="planning"&&window.innerWidth<768||(Dr(C),We?.(C))},js=()=>{Ts(C=>!C),D?.()},Wl=()=>{kr.push("/")},ql=C=>{console.log("Switching to team:",C)},Xl=C=>{console.log("Switching to team:",C)},Os=C=>{we(C),Ya(!0)},zs=()=>{Ya(!1),we(null)},Hs=C=>{let j={...C,id:Date.now().toString(),createdAt:new Date};ie(te=>[...te,j]),M?.(C)},Vs=(C,j)=>{ie(te=>te.map(Ae=>Ae.id===C?{...Ae,...j}:Ae)),ze?.(C,j)},Us=C=>{ie(j=>j.filter(te=>te.id!==C)),Ie?.(C)},Ks=()=>{T?.()},$s=C=>{R?.(C)},_s=C=>{Ja(j=>j.filter(te=>te.name!==C)),A?.(C)},Gs=C=>{pe?.(C)},Jl=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Yl=()=>{switch(ta){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},zo=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Zl=zo.sort((C,j)=>j.lastUsed.getTime()-C.lastUsed.getTime()).slice(0,3),Ql=zo.length>3,ed=zo.slice(3);return(0,Gr.jsxs)(_i,{projects:q,epics:ct,sprints:it,currentView:ta,onUpdateProject:Is,onDeleteProject:Ms,onAddProject:Es,onUpdateEpic:Er,onDeleteEpic:Ir,onAddEpic:Ar,onAddSprint:Mr,onUpdateSprint:Fs,onDeleteSprint:Bs,onViewChange:Ls,mobileMenuOpen:Ps,onToggleMobileMenu:js,children:[ta==="kanban"&&(0,Gr.jsx)("div",{className:"h-full",children:(0,Gr.jsx)(ns,{initialProjects:q,initialEpics:ct,initialSprints:it,initialTasks:Me,initialColleagues:ft,initialUsers:Rt,onAddTask:Pr,onUpdateTask:to,onDeleteTask:Tr,onTaskClick:Oo,onAddEpic:Rr})}),ta==="planning"&&(0,Gr.jsx)("div",{className:"hidden md:block h-full",children:(0,Gr.jsx)(Ao,{tasks:Me,epics:ct,sprints:it,onUpdateTask:to,onTaskClick:Oo,onAddSprint:Mr})}),ta==="tasks"&&(0,Gr.jsx)("div",{className:"h-full",children:(0,Gr.jsx)(gs,{initialReminders:ve,initialColleagues:ft,onAddReminder:Hs,onUpdateReminder:Vs,onDeleteReminder:Us})}),ta==="files"&&(0,Gr.jsx)("div",{className:"h-full",children:(0,Gr.jsx)(za,{initialFiles:Lo,onFileAdd:Ks,onFileEdit:$s,onFileDelete:_s,onFileClick:Gs,compactView:!1})}),ta==="epics"&&(0,Gr.jsx)("div",{className:"h-full",children:(0,Gr.jsx)(ls,{tasks:Me,epics:ct,sprints:it,onUpdateTask:to,onTaskClick:Oo,onAddTaskToEpic:Os,onAddEpic:Ar,onUpdateEpic:Er,onDeleteEpic:Ir})}),(0,Gr.jsx)(No,{isOpen:jo,onClose:zs,onAddTask:Pr,epics:ct,sprints:it,assignees:[...ft,...Rt],defaultEpicId:B||void 0}),(0,Gr.jsx)(Do,{isOpen:Za,onClose:()=>Aa(!1),onAddEpic:Rr})]})}var vs=be(require("react")),Ga=be(require("@radix-ui/react-progress"));var vr=vs.forwardRef(({className:e,value:t,...a},o)=>(0,Gr.jsx)(Ga.Root,{ref:o,className:b("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Gr.jsx)(Ga.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));vr.displayName=Ga.Root.displayName;function hs({project:e,onOpen:t,onShare:a,className:o}){return(0,Gr.jsx)(Uo.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Gr.jsxs)(O,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Gr.jsxs)(Ee,{children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Gr.jsx)(Oe,{children:e.name}),(0,Gr.jsxs)(Z,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Gr.jsx)(oa,{children:e.description})]}),(0,Gr.jsxs)(le,{className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Gr.jsx)("span",{children:"Progress"}),(0,Gr.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Gr.jsx)(vr,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Gr.jsxs)("div",{className:"flex items-center",children:[(0,Gr.jsx)(bt.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,Gr.jsxs)("div",{className:"flex items-center",children:[(0,Gr.jsx)(bt.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Gr.jsxs)(ra,{className:"flex gap-2",children:[(0,Gr.jsx)(h,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Gr.jsx)(h,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Gr.jsx)(bt.Share2,{className:"h-4 w-4"})})]})]})})}var Wa=be(require("@radix-ui/react-checkbox")),ys=be(require("react")),br=ys.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(Wa.Root,{className:b("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,Gr.jsx)(Wa.Indicator,{className:b("flex items-center justify-center text-current"),children:(0,Gr.jsx)(bt.Check,{className:"h-4 w-4"})})}));br.displayName=Wa.Root.displayName;var ws=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:i=""})=>{let[r,c]=(0,Et.useState)({name:o?.name||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[s,m]=(0,Et.useState)({}),n=()=>{let g={};return r.name.trim()?r.name.trim().length<3&&(g.name="Project name must be at least 3 characters"):g.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(g.objectives="Please provide more detailed objectives (at least 10 characters)"):g.objectives="Project objectives are required",r.workInstructions.trim()?r.workInstructions.trim().length<20&&(g.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):g.workInstructions="Work instructions are required",m(g),Object.keys(g).length===0},l=async g=>{if(g.preventDefault(),!!n())try{await e(r)}catch(v){console.error("Error submitting project form:",v)}},u=(g,v)=>{c(S=>({...S,[g]:v})),s[g]&&m(S=>({...S,[g]:void 0}))};return(0,Gr.jsxs)(O,{className:`w-full max-w-2xl ${i}`,children:[(0,Gr.jsxs)(Ee,{children:[(0,Gr.jsxs)(Oe,{className:"flex items-center gap-2",children:[(0,Gr.jsx)(bt.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,Gr.jsx)(oa,{children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,Gr.jsxs)("form",{onSubmit:l,children:[(0,Gr.jsxs)(le,{className:"space-y-6",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,Gr.jsx)(L,{id:"name",type:"text",placeholder:"Enter project name",value:r.name,onChange:g=>u("name",g.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),s.name&&(0,Gr.jsx)("Gr",{className:"text-sm text-red-600",children:s.name})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,Gr.jsx)(Ne,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:r.objectives,onChange:g=>u("objectives",g.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,Gr.jsxs)("div",{className:"flex justify-between text-bt text-gray-500",children:[(0,Gr.jsx)("span",{children:s.objectives&&(0,Gr.jsx)("span",{className:"text-red-600",children:s.objectives})}),(0,Gr.jsxs)("span",{children:[r.objectives.length,"/1000"]})]})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,Gr.jsx)(Ne,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:g=>u("workInstructions",g.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,Gr.jsxs)("div",{className:"flex justify-between text-bt text-gray-500",children:[(0,Gr.jsx)("span",{children:s.workInstructions&&(0,Gr.jsx)("span",{className:"text-red-600",children:s.workInstructions})}),(0,Gr.jsxs)("span",{children:[r.workInstructions.length,"/2000"]})]})]}),(0,Gr.jsxs)("div",{className:"space-y-3",children:[(0,Gr.jsx)(P,{className:"text-sm font-medium",children:"Project Management"}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)(br,{id:"plan",checked:r.plan,onCheckedChange:g=>u("plan",g===!0),disabled:a}),(0,Gr.jsx)(P,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,Gr.jsx)("Gr",{className:"text-bt text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,Gr.jsxs)(ra,{className:"flex justify-end gap-3",children:[t&&(0,Gr.jsxs)(h,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,Gr.jsx)(bt.Gr,{className:"h-4 w-4"}),"Cancel"]}),(0,Gr.jsx)(h,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)(bt.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)(bt.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function yr({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[i,r]=(0,Et.useState)(!1),[c,s]=(0,Et.useState)(!1),m=async l=>{s(!0);try{await t(l),r(!1)}catch(u){console.error("Error creating project:",u)}finally{s(!1)}},n=()=>{r(!0)};return(0,Gr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Gr.jsx)(Uo.AnimatePresence,{mode:"wait",children:(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Gr.jsx)(Qe,{title:"Project Management",description:"Organise 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:n}}),(0,Gr.jsxs)("section",{className:"space-y-4 Gr-8",children:[(0,Gr.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Gr.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(l=>(0,Gr.jsx)(hs,{project:l,onOpen:a,onShare:o},l.name))})]})]},"projects-index-view")}),(0,Gr.jsx)(pt,{open:i,onOpenChange:r,children:(0,Gr.jsxs)(st,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Gr.jsxs)(nt,{className:"Et-only",children:[(0,Gr.jsx)(lt,{children:"Create New Project"}),(0,Gr.jsx)(Ka,{children:"Fill out the form below to create a new project."})]}),(0,Gr.jsx)(ws,{onSubmit:m,onCancel:()=>r(!1),isLoading:c,className:"border-0 shadow-none"})]})})]})}function Cs({team:e,onOpen:t,className:a}){return(0,Gr.jsx)(Uo.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,Gr.jsxs)(O,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Gr.jsxs)(Ee,{children:[(0,Gr.jsx)(Oe,{className:"text-lg",children:e.name}),(0,Gr.jsx)(oa,{className:"Gr-1 text-sm",children:e.description})]}),(0,Gr.jsxs)(le,{className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)(bt.Users,{className:"h-4 w-4 text-blue-500"}),(0,Gr.jsx)("span",{children:"Human"})]}),(0,Gr.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)(bt.Bot,{className:"h-4 w-4 text-purple-500"}),(0,Gr.jsx)("span",{children:"Digital"})]}),(0,Gr.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Gr.jsxs)("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Gr.jsx)(bt.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,Gr.jsx)("span",{children:"Projects"})]}),(0,Gr.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Gr.jsx)(ra,{className:"flex gap-2",children:(0,Gr.jsx)(h,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}var Ss=be(require("react")),qa=be(require("@radix-ui/react-switch"));var Ra=Ss.forwardRef(({className:e,...t},a)=>(0,Gr.jsx)(qa.Root,{className:b("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:(0,Gr.jsx)(qa.Thumb,{className:b("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Ra.displayName=qa.Root.displayName;function Ds({team:e,onSave:t,onCancel:a,isLoading:o=!1,title:i,submitLabel:r,cancelLabel:c="Cancel",readOnly:s=!1}){let[m,n]=(0,Et.useState)({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...e}),[l,u]=(0,Et.useState)(!s);(0,Et.useEffect)(()=>{e&&n(e)},[e]);let g=f=>{f.preventDefault();let k={id:m.id||Date.now(),name:m.name,description:m.description||null,systemMsg:m.systemMsg||null,useProjects:m.useProjects||!1,useKnowledge:m.useKnowledge||!1,useFiles:m.useFiles||!1,useChat:m.useChat||!1,updatedAt:new Date().toISOString(),createdAt:m.createdAt||new Date().toISOString()};t(k)},v=f=>{f.preventDefault(),u(!l)},S=i||(l?e?"Edit Team":"Create New Team":"View Team"),y=r||(e?"Update Team":"Create Team");return(0,Gr.jsxs)(O,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,Gr.jsx)(Ee,{children:(0,Gr.jsxs)(Oe,{className:"flex items-center gap-2",children:[(0,Gr.jsx)(bt.Users,{className:"h-5 w-5"}),S]})}),(0,Gr.jsx)(le,{children:(0,Gr.jsxs)("form",{onSubmit:g,className:"space-y-6",children:[(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"name",children:"Team Name *"}),(0,Gr.jsx)(L,{id:"name",value:m.name||"",onChange:f=>n({...m,name:f.target.value}),required:!0,disabled:o||!l,placeholder:"Enter team name..."})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"description",children:"Description"}),(0,Gr.jsx)(Ne,{id:"description",value:m.description||"",onChange:f=>n({...m,description:f.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:o||!l})]}),(0,Gr.jsxs)("div",{className:"space-y-2",children:[(0,Gr.jsx)(P,{htmlFor:"systemMsg",children:"Ways of working"}),(0,Gr.jsx)(Ne,{id:"systemMsg",value:m.systemMsg||"",onChange:f=>n({...m,systemMsg:f.target.value}),rows:3,placeholder:"Describe how this team works in Et much detail Et possible. Include processes, tools, systems, styles...",disabled:o||!l})]})]}),(0,Gr.jsxs)("div",{className:"space-y-4",children:[(0,Gr.jsx)("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),(0,Gr.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)(Ra,{id:"useProjects",checked:m.useProjects||!1,onCheckedChange:f=>n({...m,useProjects:f}),disabled:o||!l}),(0,Gr.jsx)(P,{htmlFor:"useProjects",children:"Enable Projects"})]}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)(Ra,{id:"useKnowledge",checked:m.useKnowledge||!1,onCheckedChange:f=>n({...m,useKnowledge:f}),disabled:o||!l}),(0,Gr.jsx)(P,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)(Ra,{id:"useFiles",checked:m.useFiles||!1,onCheckedChange:f=>n({...m,useFiles:f}),disabled:o||!l}),(0,Gr.jsx)(P,{htmlFor:"useFiles",children:"Enable File Management"})]}),(0,Gr.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Gr.jsx)(Ra,{id:"useChat",checked:m.useChat||!1,onCheckedChange:f=>n({...m,useChat:f}),disabled:o||!l}),(0,Gr.jsx)(P,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),(0,Gr.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,Gr.jsx)(h,{type:"button",variant:"outline",onClick:a,disabled:o,children:l?c:"Close"}),l?(0,Gr.jsx)(h,{type:"submit",disabled:o||!m.name?.trim(),children:o?"Saving...":y}):(0,Gr.jsxs)(h,{type:"button",onClick:v,disabled:o,className:"gap-2",children:[(0,Gr.jsx)(bt.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Nr({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,i]=(0,Et.useState)(!1),r=()=>{i(!0)},c=n=>{t?.(n),i(!1)},s=()=>{i(!1)},m=n=>{a?.(n)};return(0,Gr.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Gr.jsx)(Uo.AnimatePresence,{mode:"wait",children:(0,Gr.jsxs)(Uo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Gr.jsx)(Qe,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:r}}),(0,Gr.jsxs)("section",{className:"space-y-4 Gr-8",children:[(0,Gr.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Gr.jsxs)("div",{className:"text-center py-12",children:[(0,Gr.jsx)("Gr",{className:"text-muted-foreground text-lg",children:"You'Gr not part of any teams yet."}),(0,Gr.jsx)("Gr",{className:"text-muted-foreground text-sm Gr-2",children:"Create a new team or ask to be added to an existing one."})]}):(0,Gr.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(n=>(0,Gr.jsx)(Cs,{team:n,onOpen:m},n.id))})]})]},"teams-index-view")}),(0,Gr.jsx)(pt,{open:o,onOpenChange:i,children:(0,Gr.jsxs)(st,{className:"max-w-4xl max-h-[90vh] overflow-y-auto Gr-0",children:[(0,Gr.jsx)("div",{className:"Et-only",children:(0,Gr.jsxs)(nt,{children:[(0,Gr.jsx)(lt,{children:"Create New Team"}),(0,Gr.jsx)(Ka,{children:"Set up a new team to collaborate with colleagues on projects."})]})}),(0,Gr.jsx)(Ds,{title:"Create New Team",submitLabel:"Create Team",onSave:c,onCancel:s})]})})]})}0&&(module.exports={ColleaguesView,FileView,KnowledgeView,PlanningView,ProjectView,ProjectsIndexView,TeamsIndexView});