@wealthx/shadcn 1.3.2 → 1.3.3

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 (313) hide show
  1. package/.turbo/turbo-build.log +262 -226
  2. package/CHANGELOG.md +6 -0
  3. package/dist/{chunk-2UM72RJ7.mjs → chunk-2D3HQPFN.mjs} +12 -10
  4. package/dist/chunk-2EM2FRU6.mjs +613 -0
  5. package/dist/{chunk-FH6QVUVZ.mjs → chunk-2GIYVERS.mjs} +2 -2
  6. package/dist/chunk-2P7HP7LR.mjs +68 -0
  7. package/dist/{chunk-HISNT2MG.mjs → chunk-37AE3OM5.mjs} +5 -5
  8. package/dist/{chunk-HBZLGDIN.mjs → chunk-3ERBUVHC.mjs} +169 -110
  9. package/dist/{chunk-C7CQJNMR.mjs → chunk-3VDET466.mjs} +2 -2
  10. package/dist/{chunk-462HMNO4.mjs → chunk-4MM7LHM5.mjs} +2 -2
  11. package/dist/{chunk-QMY3AZJH.mjs → chunk-4Z66LMIQ.mjs} +2 -2
  12. package/dist/{chunk-U5X52X37.mjs → chunk-57ZXILTS.mjs} +6 -6
  13. package/dist/{chunk-3OYFOX3X.mjs → chunk-5VOTTIXF.mjs} +2 -2
  14. package/dist/{chunk-LBMRIB3G.mjs → chunk-6AJUS7VX.mjs} +1 -1
  15. package/dist/{chunk-OODBHKG7.mjs → chunk-6HIOM2HL.mjs} +7 -4
  16. package/dist/{chunk-BDYZCBRT.mjs → chunk-6QAFGZC2.mjs} +2 -2
  17. package/dist/{chunk-U4NDAF2P.mjs → chunk-6TX73WG7.mjs} +1 -1
  18. package/dist/{chunk-GD4BJDJR.mjs → chunk-7BTFGCFC.mjs} +4 -4
  19. package/dist/{chunk-FAKPBKLT.mjs → chunk-7GWRPXHD.mjs} +4 -4
  20. package/dist/{chunk-NMOI6CQD.mjs → chunk-7YI3HEBH.mjs} +5 -5
  21. package/dist/{chunk-T4BJLT57.mjs → chunk-AE7MASLF.mjs} +5 -5
  22. package/dist/{chunk-VLQZANBF.mjs → chunk-AFML43VJ.mjs} +6 -1
  23. package/dist/chunk-BBXSNDS3.mjs +260 -0
  24. package/dist/chunk-BOW7U26Y.mjs +203 -0
  25. package/dist/{chunk-34NWQURD.mjs → chunk-BS75ICOO.mjs} +2 -2
  26. package/dist/chunk-D2NSIIXG.mjs +394 -0
  27. package/dist/{chunk-3GF7OVTP.mjs → chunk-DGNHGNYH.mjs} +2 -2
  28. package/dist/{chunk-VLARHE5V.mjs → chunk-DMXYRCHM.mjs} +6 -6
  29. package/dist/{chunk-OGOYQ7BG.mjs → chunk-DQB4EPIS.mjs} +1 -1
  30. package/dist/{chunk-MIZQHHUO.mjs → chunk-FL6DZFJK.mjs} +106 -38
  31. package/dist/{chunk-I3RZS7V2.mjs → chunk-FLL633WS.mjs} +19 -33
  32. package/dist/{chunk-PBL4OQV2.mjs → chunk-FTPBQVQ6.mjs} +4 -4
  33. package/dist/chunk-FYPSTTEJ.mjs +169 -0
  34. package/dist/{chunk-6O6KD7CE.mjs → chunk-G27TSQLQ.mjs} +6 -6
  35. package/dist/{chunk-66MI7Q4B.mjs → chunk-GT3RU6GA.mjs} +2 -2
  36. package/dist/{chunk-D6ID6M4V.mjs → chunk-GTAVSBDO.mjs} +2 -2
  37. package/dist/{chunk-24FUO7TD.mjs → chunk-H6NQTIF4.mjs} +2 -2
  38. package/dist/{chunk-7DHU4VGG.mjs → chunk-HK4HUQTV.mjs} +2 -2
  39. package/dist/chunk-I4KVSZCH.mjs +101 -0
  40. package/dist/{chunk-RGVKLTLH.mjs → chunk-IKXYTCSB.mjs} +2 -2
  41. package/dist/{chunk-Y6DWJSKZ.mjs → chunk-ISUA7DSB.mjs} +1 -1
  42. package/dist/{chunk-2A5RRQGG.mjs → chunk-JD3YWRNP.mjs} +10 -14
  43. package/dist/{chunk-J5UICVJS.mjs → chunk-JPGL36WQ.mjs} +2 -2
  44. package/dist/{chunk-7XJHLGUV.mjs → chunk-JTK6VJXY.mjs} +2 -2
  45. package/dist/{chunk-7YAU5CY6.mjs → chunk-JVMXMFBB.mjs} +2 -2
  46. package/dist/{chunk-IAE3F7DR.mjs → chunk-JZY6TNIS.mjs} +21 -21
  47. package/dist/{chunk-K5A5L6T2.mjs → chunk-K4KOD3KR.mjs} +12 -12
  48. package/dist/{chunk-MBON7YRJ.mjs → chunk-K5QV4TT6.mjs} +3 -3
  49. package/dist/{chunk-IHMFS7NZ.mjs → chunk-K5VHK7CM.mjs} +21 -21
  50. package/dist/{chunk-RJI6GKVF.mjs → chunk-KCWNDYPZ.mjs} +5 -5
  51. package/dist/{chunk-UFYSFDER.mjs → chunk-KFH36NKF.mjs} +1 -1
  52. package/dist/{chunk-EBXQWIYG.mjs → chunk-KLTACJ2G.mjs} +5 -5
  53. package/dist/{chunk-3TTACBDP.mjs → chunk-KWD6GANL.mjs} +4 -4
  54. package/dist/{chunk-IOJRDS6V.mjs → chunk-L4NSRQ3T.mjs} +218 -147
  55. package/dist/{chunk-GYMYRIZP.mjs → chunk-LBTHZSBT.mjs} +2 -2
  56. package/dist/{chunk-AMQZRHEZ.mjs → chunk-LQULK2E3.mjs} +5 -5
  57. package/dist/{chunk-YJG55G2H.mjs → chunk-LR6LHDP3.mjs} +5 -5
  58. package/dist/{chunk-7PV3IWCN.mjs → chunk-M4VYX2PV.mjs} +19 -1
  59. package/dist/{chunk-P76HMUI6.mjs → chunk-MDUKXXIL.mjs} +2 -2
  60. package/dist/{chunk-LV35NGVG.mjs → chunk-N6Q5IPKT.mjs} +9 -9
  61. package/dist/{chunk-DOEO3CDL.mjs → chunk-NB3ZL36B.mjs} +1 -1
  62. package/dist/{chunk-XREGSKX3.mjs → chunk-NOOEKOWY.mjs} +5 -5
  63. package/dist/{chunk-NL3ZO62D.mjs → chunk-NT4FX27K.mjs} +1 -1
  64. package/dist/{chunk-QZ4RE6NA.mjs → chunk-NTYQWVLI.mjs} +6 -6
  65. package/dist/{chunk-ERGGHC2V.mjs → chunk-OEOOYMC2.mjs} +2 -2
  66. package/dist/{chunk-4GAWMKMI.mjs → chunk-OIKBW2QD.mjs} +291 -54
  67. package/dist/{chunk-DUJTAXMH.mjs → chunk-OKTJFDPN.mjs} +6 -6
  68. package/dist/chunk-OLKMCXAR.mjs +1219 -0
  69. package/dist/{chunk-EI5F6FMT.mjs → chunk-OWFQSXVD.mjs} +3 -3
  70. package/dist/{chunk-6DZEXFNB.mjs → chunk-P2N2PEFY.mjs} +3 -3
  71. package/dist/{chunk-NSLMILBT.mjs → chunk-P7CEBZM6.mjs} +2 -2
  72. package/dist/{chunk-7S5AESZO.mjs → chunk-PNRUH7JY.mjs} +6 -6
  73. package/dist/{chunk-ZU4NV6RG.mjs → chunk-PNSYFE3K.mjs} +2 -2
  74. package/dist/{chunk-JKGDCQTZ.mjs → chunk-QTRSCVQ3.mjs} +5 -5
  75. package/dist/{chunk-ABFDMHOR.mjs → chunk-QX7IFQSF.mjs} +5 -5
  76. package/dist/{chunk-CFMQP5QS.mjs → chunk-QXKGOMUX.mjs} +6 -6
  77. package/dist/{chunk-NQPOYKAQ.mjs → chunk-R2ON6CAN.mjs} +2 -2
  78. package/dist/{chunk-DBHJ5KC3.mjs → chunk-R4HCRDU5.mjs} +1 -1
  79. package/dist/{chunk-EWRB4PAD.mjs → chunk-RCAOCHWA.mjs} +14 -14
  80. package/dist/{chunk-EFRENWEJ.mjs → chunk-RSUIPKGX.mjs} +2 -2
  81. package/dist/{chunk-DGHAXJBN.mjs → chunk-S2FKV4M5.mjs} +5 -5
  82. package/dist/{chunk-RGU7HOEC.mjs → chunk-SET2ANTY.mjs} +5 -7
  83. package/dist/chunk-SFH2NJEJ.mjs +47 -0
  84. package/dist/{chunk-6AW4KJHE.mjs → chunk-SIVYAI3M.mjs} +12 -12
  85. package/dist/{chunk-5FQIKDKP.mjs → chunk-THVO2N47.mjs} +8 -8
  86. package/dist/{chunk-JMHR3YGZ.mjs → chunk-TLAWKTSA.mjs} +3 -3
  87. package/dist/{chunk-HVY6KCCF.mjs → chunk-TOWTPLRC.mjs} +68 -72
  88. package/dist/{chunk-6JQFUE5I.mjs → chunk-UALR6JGV.mjs} +2 -2
  89. package/dist/{chunk-N6TNTQL6.mjs → chunk-UJZ4UHWI.mjs} +9 -11
  90. package/dist/{chunk-MARPPFOJ.mjs → chunk-UNACI2YK.mjs} +2 -2
  91. package/dist/{chunk-3NCUZIFP.mjs → chunk-V6XGXYCJ.mjs} +7 -7
  92. package/dist/chunk-VB5M6OZQ.mjs +57 -0
  93. package/dist/{chunk-5IS7G74I.mjs → chunk-VY5NEUP7.mjs} +6 -6
  94. package/dist/{chunk-JHJHG4GO.mjs → chunk-WE4YKBDE.mjs} +2 -2
  95. package/dist/{chunk-BKNFWEH2.mjs → chunk-WL6WVV47.mjs} +3 -3
  96. package/dist/{chunk-FWCSY2DS.mjs → chunk-WNQUEZJF.mjs} +22 -1
  97. package/dist/{chunk-2Y7YJKPE.mjs → chunk-WZ6UJCBL.mjs} +1 -1
  98. package/dist/{chunk-UMTOX62O.mjs → chunk-XYPW2XA5.mjs} +13 -10
  99. package/dist/chunk-Y2MTAVAK.mjs +34 -0
  100. package/dist/{chunk-6CR5N2JW.mjs → chunk-YCWLFG27.mjs} +6 -6
  101. package/dist/{chunk-PU4YZQXV.mjs → chunk-YE67AALL.mjs} +12 -12
  102. package/dist/{chunk-M3FV7LOK.mjs → chunk-YEWNFK5S.mjs} +6 -1
  103. package/dist/{chunk-R3VSPKNP.mjs → chunk-YIZHS72Z.mjs} +11 -12
  104. package/dist/{chunk-7PYJD5JI.mjs → chunk-ZEDMKQK2.mjs} +2 -2
  105. package/dist/{chunk-N2PT566P.mjs → chunk-ZFCDYW6N.mjs} +4 -4
  106. package/dist/chunk-ZGQIVGIN.mjs +57 -0
  107. package/dist/{chunk-Q2BGOAMG.mjs → chunk-ZKWXDQDG.mjs} +4 -4
  108. package/dist/{chunk-GHC7LLUX.mjs → chunk-ZOWL2L5J.mjs} +5 -5
  109. package/dist/components/ui/accordion.mjs +3 -3
  110. package/dist/components/ui/add-column-modal.js +2 -2
  111. package/dist/components/ui/add-column-modal.mjs +10 -10
  112. package/dist/components/ui/add-lead-modal.js +424 -82
  113. package/dist/components/ui/add-lead-modal.mjs +12 -9
  114. package/dist/components/ui/advisor-card.js +2 -2
  115. package/dist/components/ui/advisor-card.mjs +8 -8
  116. package/dist/components/ui/ai-assistant-drawer.js +2 -2
  117. package/dist/components/ui/ai-assistant-drawer.mjs +9 -9
  118. package/dist/components/ui/ai-builder.js +958 -0
  119. package/dist/components/ui/ai-builder.mjs +25 -0
  120. package/dist/components/ui/ai-conversations.js +2045 -0
  121. package/dist/components/ui/ai-conversations.mjs +41 -0
  122. package/dist/components/ui/alert-dialog.js +2 -2
  123. package/dist/components/ui/alert-dialog.mjs +5 -5
  124. package/dist/components/ui/alert.mjs +3 -3
  125. package/dist/components/ui/appointment-action-dialogs.js +19 -3
  126. package/dist/components/ui/appointment-action-dialogs.mjs +15 -14
  127. package/dist/components/ui/appointment-availability-settings.js +181 -111
  128. package/dist/components/ui/appointment-availability-settings.mjs +20 -18
  129. package/dist/components/ui/appointment-book-dialog.js +113 -24
  130. package/dist/components/ui/appointment-book-dialog.mjs +21 -20
  131. package/dist/components/ui/appointment-calendar-view.js +19 -3
  132. package/dist/components/ui/appointment-calendar-view.mjs +10 -9
  133. package/dist/components/ui/appointment-detail-sheet.js +19 -3
  134. package/dist/components/ui/appointment-detail-sheet.mjs +18 -17
  135. package/dist/components/ui/appointment-gmail-connect.js +49 -89
  136. package/dist/components/ui/appointment-gmail-connect.mjs +8 -9
  137. package/dist/components/ui/appointment-mini-card.js +2 -2
  138. package/dist/components/ui/appointment-mini-card.mjs +6 -6
  139. package/dist/components/ui/appointment-time-slot-picker.mjs +6 -6
  140. package/dist/components/ui/appointment-upcoming-card.js +19 -3
  141. package/dist/components/ui/appointment-upcoming-card.mjs +15 -14
  142. package/dist/components/ui/auth-logo.js +95 -0
  143. package/dist/components/ui/auth-logo.mjs +8 -0
  144. package/dist/components/ui/auth-page-layout.js +108 -0
  145. package/dist/components/ui/auth-page-layout.mjs +8 -0
  146. package/dist/components/ui/avatar.mjs +3 -3
  147. package/dist/components/ui/backoffice-alert-history-chart.js +2 -2
  148. package/dist/components/ui/backoffice-alert-history-chart.mjs +9 -9
  149. package/dist/components/ui/backoffice-alerts-chart.js +2 -2
  150. package/dist/components/ui/backoffice-alerts-chart.mjs +11 -11
  151. package/dist/components/ui/backoffice-connections-chart.js +2 -2
  152. package/dist/components/ui/backoffice-connections-chart.mjs +11 -11
  153. package/dist/components/ui/backoffice-contact-history-chart.js +2 -2
  154. package/dist/components/ui/backoffice-contact-history-chart.mjs +9 -9
  155. package/dist/components/ui/badge.mjs +4 -4
  156. package/dist/components/ui/borrowing-capacity-line-chart.js +145 -132
  157. package/dist/components/ui/borrowing-capacity-line-chart.mjs +9 -9
  158. package/dist/components/ui/button.js +2 -2
  159. package/dist/components/ui/button.mjs +4 -4
  160. package/dist/components/ui/calendar.js +17 -3
  161. package/dist/components/ui/calendar.mjs +6 -5
  162. package/dist/components/ui/card.mjs +3 -3
  163. package/dist/components/ui/cash-balance-line-chart.js +157 -152
  164. package/dist/components/ui/cash-balance-line-chart.mjs +9 -9
  165. package/dist/components/ui/cashflow-bar-chart.js +2 -2
  166. package/dist/components/ui/cashflow-bar-chart.mjs +9 -9
  167. package/dist/components/ui/chat-widget-primitives.js +573 -0
  168. package/dist/components/ui/chat-widget-primitives.mjs +21 -0
  169. package/dist/components/ui/chat-widget.js +1268 -0
  170. package/dist/components/ui/chat-widget.mjs +29 -0
  171. package/dist/components/ui/checkbox.mjs +3 -3
  172. package/dist/components/ui/chip.js +2 -2
  173. package/dist/components/ui/chip.mjs +6 -6
  174. package/dist/components/ui/color-picker.js +2 -2
  175. package/dist/components/ui/color-picker.mjs +7 -7
  176. package/dist/components/ui/combobox.mjs +3 -3
  177. package/dist/components/ui/data-table.js +2 -2
  178. package/dist/components/ui/data-table.mjs +12 -12
  179. package/dist/components/ui/date-picker.js +22 -6
  180. package/dist/components/ui/date-picker.mjs +9 -8
  181. package/dist/components/ui/dialog.js +2 -2
  182. package/dist/components/ui/dialog.mjs +5 -5
  183. package/dist/components/ui/document-checklist-template.js +630 -0
  184. package/dist/components/ui/document-checklist-template.mjs +15 -0
  185. package/dist/components/ui/drawer.js +2 -2
  186. package/dist/components/ui/drawer.mjs +3 -3
  187. package/dist/components/ui/dropdown-menu.mjs +3 -3
  188. package/dist/components/ui/empty.mjs +3 -3
  189. package/dist/components/ui/expense-bar-chart.js +2 -2
  190. package/dist/components/ui/expense-bar-chart.mjs +9 -9
  191. package/dist/components/ui/field.mjs +5 -5
  192. package/dist/components/ui/financial-cards.js +431 -291
  193. package/dist/components/ui/financial-cards.mjs +10 -9
  194. package/dist/components/ui/financial-drawers.js +4 -4
  195. package/dist/components/ui/financial-drawers.mjs +8 -8
  196. package/dist/components/ui/financial-primitives.mjs +3 -3
  197. package/dist/components/ui/financial-sections.js +8 -9
  198. package/dist/components/ui/financial-sections.mjs +12 -12
  199. package/dist/components/ui/form-primitives.mjs +8 -8
  200. package/dist/components/ui/income-bar-chart.js +2 -2
  201. package/dist/components/ui/income-bar-chart.mjs +9 -9
  202. package/dist/components/ui/input-group.js +2 -2
  203. package/dist/components/ui/input-group.mjs +7 -7
  204. package/dist/components/ui/input-otp.mjs +3 -3
  205. package/dist/components/ui/input.mjs +3 -3
  206. package/dist/components/ui/kanban-column.js +19 -23
  207. package/dist/components/ui/kanban-column.mjs +14 -14
  208. package/dist/components/ui/label.mjs +3 -3
  209. package/dist/components/ui/onboarding-layout.js +476 -0
  210. package/dist/components/ui/onboarding-layout.mjs +11 -0
  211. package/dist/components/ui/opportunity-card.js +2 -2
  212. package/dist/components/ui/opportunity-card.mjs +12 -12
  213. package/dist/components/ui/opportunity-edit-modals.js +22 -6
  214. package/dist/components/ui/opportunity-edit-modals.mjs +21 -20
  215. package/dist/components/ui/opportunity-summary-tab.js +991 -674
  216. package/dist/components/ui/opportunity-summary-tab.mjs +26 -26
  217. package/dist/components/ui/page-header.mjs +3 -3
  218. package/dist/components/ui/page-top-bar.mjs +3 -3
  219. package/dist/components/ui/pagination.js +2 -2
  220. package/dist/components/ui/pagination.mjs +6 -6
  221. package/dist/components/ui/password-strength-tooltip.js +197 -0
  222. package/dist/components/ui/password-strength-tooltip.mjs +11 -0
  223. package/dist/components/ui/pipeline-alerts.mjs +3 -3
  224. package/dist/components/ui/pipeline-board.js +19 -23
  225. package/dist/components/ui/pipeline-board.mjs +18 -18
  226. package/dist/components/ui/pipeline-chart.js +12 -6
  227. package/dist/components/ui/pipeline-chart.mjs +4 -3
  228. package/dist/components/ui/pipeline-dialogs.js +28 -12
  229. package/dist/components/ui/pipeline-dialogs.mjs +14 -13
  230. package/dist/components/ui/pipeline-primitives.mjs +6 -6
  231. package/dist/components/ui/popover.mjs +3 -3
  232. package/dist/components/ui/progress.mjs +3 -3
  233. package/dist/components/ui/property-cashflow-doughnut-chart.js +2 -2
  234. package/dist/components/ui/property-cashflow-doughnut-chart.mjs +9 -9
  235. package/dist/components/ui/property-debt-equity-doughnut-chart.js +2 -2
  236. package/dist/components/ui/property-debt-equity-doughnut-chart.mjs +9 -9
  237. package/dist/components/ui/property-mobile-estimate-line-chart.js +2 -2
  238. package/dist/components/ui/property-mobile-estimate-line-chart.mjs +9 -9
  239. package/dist/components/ui/radio-group.mjs +3 -3
  240. package/dist/components/ui/select.mjs +3 -3
  241. package/dist/components/ui/separator.mjs +3 -3
  242. package/dist/components/ui/sheet.mjs +3 -3
  243. package/dist/components/ui/sidebar-nav.js +6 -5
  244. package/dist/components/ui/sidebar-nav.mjs +7 -7
  245. package/dist/components/ui/skeleton.mjs +3 -3
  246. package/dist/components/ui/slider.mjs +3 -3
  247. package/dist/components/ui/sonner.mjs +2 -2
  248. package/dist/components/ui/spinner.mjs +3 -3
  249. package/dist/components/ui/stage-timeline.mjs +10 -10
  250. package/dist/components/ui/stepper.mjs +3 -3
  251. package/dist/components/ui/switch.mjs +3 -3
  252. package/dist/components/ui/table.mjs +3 -3
  253. package/dist/components/ui/tabs.mjs +3 -3
  254. package/dist/components/ui/textarea.mjs +3 -3
  255. package/dist/components/ui/toggle-group.mjs +4 -4
  256. package/dist/components/ui/toggle.mjs +3 -3
  257. package/dist/components/ui/tooltip.mjs +3 -3
  258. package/dist/components/ui/transactions-expense-categories-doughnut-chart.js +2 -2
  259. package/dist/components/ui/transactions-expense-categories-doughnut-chart.mjs +9 -9
  260. package/dist/components/ui/transactions-income-expense-bar-chart.js +2 -2
  261. package/dist/components/ui/transactions-income-expense-bar-chart.mjs +9 -9
  262. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.js +2 -2
  263. package/dist/components/ui/transactions-liabilities-breakdown-doughnut-chart.mjs +9 -9
  264. package/dist/components/ui/two-fa-setup-form.js +612 -0
  265. package/dist/components/ui/two-fa-setup-form.mjs +16 -0
  266. package/dist/components/ui/upload-card.js +187 -0
  267. package/dist/components/ui/upload-card.mjs +10 -0
  268. package/dist/components/ui/video-background.js +118 -0
  269. package/dist/components/ui/video-background.mjs +8 -0
  270. package/dist/index.js +12764 -9396
  271. package/dist/index.mjs +341 -245
  272. package/dist/lib/colors.mjs +1 -1
  273. package/dist/lib/theme-provider.mjs +1 -1
  274. package/dist/lib/typography.mjs +2 -2
  275. package/dist/lib/utils.js +8 -2
  276. package/dist/lib/utils.mjs +6 -4
  277. package/dist/styles.css +1 -1
  278. package/package.json +61 -1
  279. package/src/components/index.tsx +126 -1
  280. package/src/components/ui/add-lead-modal.tsx +101 -142
  281. package/src/components/ui/ai-builder.tsx +560 -0
  282. package/src/components/ui/ai-conversations.tsx +1690 -0
  283. package/src/components/ui/appointment-availability-settings.tsx +152 -101
  284. package/src/components/ui/appointment-book-dialog.tsx +138 -24
  285. package/src/components/ui/appointment-calendar-view.tsx +2 -3
  286. package/src/components/ui/appointment-gmail-connect.tsx +23 -42
  287. package/src/components/ui/auth-logo.tsx +50 -0
  288. package/src/components/ui/auth-page-layout.tsx +59 -0
  289. package/src/components/ui/borrowing-capacity-line-chart.tsx +10 -8
  290. package/src/components/ui/button.tsx +2 -2
  291. package/src/components/ui/calendar.tsx +2 -1
  292. package/src/components/ui/cash-balance-line-chart.tsx +10 -14
  293. package/src/components/ui/chart-shared.tsx +10 -0
  294. package/src/components/ui/chat-widget-primitives.tsx +336 -0
  295. package/src/components/ui/chat-widget.tsx +822 -0
  296. package/src/components/ui/document-checklist-template.tsx +264 -0
  297. package/src/components/ui/drawer.tsx +2 -2
  298. package/src/components/ui/financial-cards.tsx +176 -78
  299. package/src/components/ui/financial-drawers.tsx +2 -2
  300. package/src/components/ui/financial-sections.tsx +1 -1
  301. package/src/components/ui/kanban-column.tsx +2 -5
  302. package/src/components/ui/onboarding-layout.tsx +109 -0
  303. package/src/components/ui/opportunity-summary-tab.tsx +469 -142
  304. package/src/components/ui/password-strength-tooltip.tsx +70 -0
  305. package/src/components/ui/pipeline-chart.tsx +2 -6
  306. package/src/components/ui/sidebar-nav.tsx +1 -11
  307. package/src/components/ui/two-fa-setup-form.tsx +229 -0
  308. package/src/components/ui/upload-card.tsx +98 -0
  309. package/src/components/ui/video-background.tsx +55 -0
  310. package/src/lib/format-date.ts +26 -0
  311. package/src/lib/utils.ts +11 -0
  312. package/src/styles/styles-css.ts +1 -1
  313. package/tsup.config.ts +13 -0
@@ -0,0 +1,2045 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/components/ui/ai-conversations.tsx
60
+ var ai_conversations_exports = {};
61
+ __export(ai_conversations_exports, {
62
+ AICollectedDataSection: () => AICollectedDataSection,
63
+ AiConvAssignAdvisorDialog: () => AiConvAssignAdvisorDialog,
64
+ ChatBubble: () => ChatBubble,
65
+ ChatComposer: () => ChatComposer,
66
+ ChatThread: () => ChatThread,
67
+ ConversationList: () => ConversationList,
68
+ ConversationListItem: () => ConversationListItem,
69
+ ConversationStatusChip: () => ConversationStatusChip,
70
+ ConversationsPage: () => ConversationsPage,
71
+ LeadInfoPanel: () => LeadInfoPanel
72
+ });
73
+ module.exports = __toCommonJS(ai_conversations_exports);
74
+ var import_react3 = require("react");
75
+ var import_lucide_react4 = require("lucide-react");
76
+
77
+ // src/lib/utils.ts
78
+ var import_clsx = require("clsx");
79
+ var import_tailwind_merge = require("tailwind-merge");
80
+ var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
81
+ extend: {
82
+ classGroups: {
83
+ "font-size": [
84
+ {
85
+ text: [
86
+ "display-large",
87
+ "display-medium",
88
+ "display-small",
89
+ "h1",
90
+ "h2",
91
+ "h3",
92
+ "h4",
93
+ "h5",
94
+ "h6",
95
+ "body-large",
96
+ "body-medium",
97
+ "body-small",
98
+ "label-large",
99
+ "label-medium",
100
+ "label-small",
101
+ "button",
102
+ "button-xs",
103
+ "caption",
104
+ "overline",
105
+ "code"
106
+ ]
107
+ }
108
+ ]
109
+ }
110
+ }
111
+ });
112
+ function cn(...inputs) {
113
+ return twMerge((0, import_clsx.clsx)(inputs));
114
+ }
115
+ function getInitials(name) {
116
+ if (!name.trim()) return "?";
117
+ return name.split(" ").filter(Boolean).map((word) => word[0]).join("").toUpperCase().slice(0, 2);
118
+ }
119
+
120
+ // src/components/ui/avatar.tsx
121
+ var import_avatar = require("@base-ui/react/avatar");
122
+ var import_jsx_runtime = require("react/jsx-runtime");
123
+ function Avatar(_a) {
124
+ var _b = _a, {
125
+ className,
126
+ size = "default"
127
+ } = _b, props = __objRest(_b, [
128
+ "className",
129
+ "size"
130
+ ]);
131
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
132
+ import_avatar.Avatar.Root,
133
+ __spreadValues({
134
+ className: cn(
135
+ "group/avatar relative flex size-8 shrink-0 rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
136
+ className
137
+ ),
138
+ "data-size": size,
139
+ "data-slot": "avatar"
140
+ }, props)
141
+ );
142
+ }
143
+ function AvatarFallback(_a) {
144
+ var _b = _a, {
145
+ className
146
+ } = _b, props = __objRest(_b, [
147
+ "className"
148
+ ]);
149
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
150
+ import_avatar.Avatar.Fallback,
151
+ __spreadValues({
152
+ className: cn(
153
+ "flex size-full items-center justify-center rounded-full overflow-hidden bg-muted text-body-small font-sans text-muted-foreground group-data-[size=sm]/avatar:text-caption",
154
+ className
155
+ ),
156
+ "data-slot": "avatar-fallback"
157
+ }, props)
158
+ );
159
+ }
160
+
161
+ // src/components/ui/badge.tsx
162
+ var import_class_variance_authority = require("class-variance-authority");
163
+
164
+ // src/lib/slot.tsx
165
+ var React = __toESM(require("react"));
166
+ function mergeRefs(...refs) {
167
+ return (value) => {
168
+ for (const ref of refs) {
169
+ if (typeof ref === "function") ref(value);
170
+ else if (ref !== null)
171
+ ref.current = value;
172
+ }
173
+ };
174
+ }
175
+ var Slot = React.forwardRef(
176
+ (_a, forwardedRef) => {
177
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
178
+ const child = React.Children.only(children);
179
+ if (!React.isValidElement(child)) return null;
180
+ const childProps = child.props;
181
+ const merged = __spreadValues({}, props);
182
+ for (const key of Object.keys(childProps)) {
183
+ if (key === "className") {
184
+ merged.className = [props.className, childProps.className].filter(Boolean).join(" ");
185
+ } else if (key === "style") {
186
+ merged.style = __spreadValues(__spreadValues({}, props.style), childProps.style);
187
+ } else if (key.startsWith("on") && typeof childProps[key] === "function") {
188
+ const parentHandler = props[key];
189
+ if (typeof parentHandler === "function") {
190
+ merged[key] = (...args) => {
191
+ childProps[key](...args);
192
+ parentHandler(...args);
193
+ };
194
+ } else {
195
+ merged[key] = childProps[key];
196
+ }
197
+ } else {
198
+ merged[key] = childProps[key];
199
+ }
200
+ }
201
+ const childRef = child.ref;
202
+ merged.ref = forwardedRef ? mergeRefs(forwardedRef, childRef) : childRef;
203
+ return React.cloneElement(
204
+ child,
205
+ merged
206
+ );
207
+ }
208
+ );
209
+ Slot.displayName = "Slot";
210
+
211
+ // src/components/ui/badge.tsx
212
+ var import_jsx_runtime2 = require("react/jsx-runtime");
213
+ var badgeVariants = (0, import_class_variance_authority.cva)(
214
+ "inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2.5 py-0.5 text-xs font-medium font-sans whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",
215
+ {
216
+ variants: {
217
+ variant: {
218
+ default: "border-primary/40 bg-primary/10 text-foreground [a&]:hover:bg-primary/15",
219
+ secondary: "border-border bg-muted text-muted-foreground [a&]:hover:bg-muted/80",
220
+ destructive: "border-destructive/40 bg-destructive/10 text-destructive-text focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/15",
221
+ success: "border-success/40 bg-success/10 text-success-text [a&]:hover:bg-success/15",
222
+ warning: "border-warning/40 bg-warning/10 text-warning-text [a&]:hover:bg-warning/15",
223
+ info: "border-info/40 bg-info/10 text-info-text [a&]:hover:bg-info/15",
224
+ outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
225
+ ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
226
+ link: "text-primary underline-offset-4 [a&]:hover:underline"
227
+ }
228
+ },
229
+ defaultVariants: {
230
+ variant: "default"
231
+ }
232
+ }
233
+ );
234
+ function Badge(_a) {
235
+ var _b = _a, {
236
+ className,
237
+ variant = "default",
238
+ asChild = false
239
+ } = _b, props = __objRest(_b, [
240
+ "className",
241
+ "variant",
242
+ "asChild"
243
+ ]);
244
+ const Comp = asChild ? Slot : "span";
245
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
246
+ Comp,
247
+ __spreadValues({
248
+ className: cn(badgeVariants({ variant }), className),
249
+ "data-slot": "badge",
250
+ "data-variant": variant
251
+ }, props)
252
+ );
253
+ }
254
+
255
+ // src/components/ui/button.tsx
256
+ var import_react = require("react");
257
+ var import_class_variance_authority2 = require("class-variance-authority");
258
+ var import_lucide_react = require("lucide-react");
259
+ var import_jsx_runtime3 = require("react/jsx-runtime");
260
+ var buttonVariants = (0, import_class_variance_authority2.cva)(
261
+ "inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 font-sans text-button whitespace-nowrap transition-all active:scale-[0.98] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
262
+ {
263
+ variants: {
264
+ variant: {
265
+ default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
266
+ secondary: "bg-brand-secondary text-brand-secondary-foreground shadow-xs hover:bg-brand-secondary/80 focus-visible:ring-brand-secondary/30",
267
+ destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
268
+ outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground focus-visible:border-border focus-visible:ring-border/50 dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
269
+ "outline-primary": "border border-primary text-foreground bg-transparent shadow-xs hover:bg-primary/5 focus-visible:ring-primary/50",
270
+ "outline-secondary": "border border-brand-secondary text-brand-secondary bg-transparent shadow-xs hover:bg-brand-secondary/10 focus-visible:border-brand-secondary focus-visible:ring-brand-secondary/30",
271
+ ghost: "hover:bg-accent hover:text-accent-foreground hover:shadow-xs focus-visible:ring-border/50 dark:hover:bg-accent/50",
272
+ link: "text-primary underline-offset-4 hover:underline"
273
+ },
274
+ size: {
275
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
276
+ xs: "h-6 gap-1 px-2 text-button-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
277
+ sm: "h-8 gap-1.5 px-3 has-[>svg]:px-2.5",
278
+ lg: "h-10 px-6 has-[>svg]:px-4",
279
+ icon: "size-9",
280
+ "icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
281
+ "icon-sm": "size-8",
282
+ "icon-lg": "size-10"
283
+ }
284
+ },
285
+ defaultVariants: {
286
+ variant: "default",
287
+ size: "default"
288
+ }
289
+ }
290
+ );
291
+ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
292
+ var _b = _a, {
293
+ className,
294
+ variant,
295
+ size,
296
+ asChild = false,
297
+ loading = false,
298
+ disabled,
299
+ type = "button",
300
+ children
301
+ } = _b, props = __objRest(_b, [
302
+ "className",
303
+ "variant",
304
+ "size",
305
+ "asChild",
306
+ "loading",
307
+ "disabled",
308
+ "type",
309
+ "children"
310
+ ]);
311
+ const Comp = asChild ? Slot : "button";
312
+ const isIconOnly = size === "icon" || size === "icon-xs" || size === "icon-sm" || size === "icon-lg";
313
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
314
+ Comp,
315
+ __spreadProps(__spreadValues({
316
+ className: cn(buttonVariants({ variant, size, className })),
317
+ "data-size": size,
318
+ "data-slot": "button",
319
+ "data-variant": variant,
320
+ disabled: loading || disabled,
321
+ ref,
322
+ type
323
+ }, props), {
324
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
325
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Loader2, { "aria-hidden": "true", className: "animate-spin" }),
326
+ !isIconOnly && children
327
+ ] }) : children
328
+ })
329
+ );
330
+ });
331
+
332
+ // src/components/ui/input.tsx
333
+ var import_jsx_runtime4 = require("react/jsx-runtime");
334
+ function Input(_a) {
335
+ var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
336
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
337
+ "input",
338
+ __spreadValues({
339
+ className: cn(
340
+ "h-9 w-full min-w-0 border border-input bg-transparent px-3 py-1 text-body-medium font-sans shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-label-medium file:text-foreground placeholder:font-normal placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",
341
+ "focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20",
342
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
343
+ className
344
+ ),
345
+ "data-slot": "input",
346
+ type
347
+ }, props)
348
+ );
349
+ }
350
+
351
+ // src/components/ui/dropdown-menu.tsx
352
+ var import_lucide_react2 = require("lucide-react");
353
+ var import_menu = require("@base-ui/react/menu");
354
+
355
+ // src/lib/theme-provider.tsx
356
+ var import_react2 = require("react");
357
+ var import_jsx_runtime5 = require("react/jsx-runtime");
358
+ var ThemeVarsContext = (0, import_react2.createContext)({});
359
+ function useThemeVars() {
360
+ return (0, import_react2.useContext)(ThemeVarsContext);
361
+ }
362
+
363
+ // src/components/ui/dropdown-menu.tsx
364
+ var import_jsx_runtime6 = require("react/jsx-runtime");
365
+ function DropdownMenu(_a) {
366
+ var props = __objRest(_a, []);
367
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_menu.Menu.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
368
+ }
369
+ function DropdownMenuTrigger(_a) {
370
+ var props = __objRest(_a, []);
371
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_menu.Menu.Trigger, __spreadValues({ "data-slot": "dropdown-menu-trigger" }, props));
372
+ }
373
+ function DropdownMenuContent(_a) {
374
+ var _b = _a, {
375
+ className,
376
+ sideOffset = 4,
377
+ style
378
+ } = _b, props = __objRest(_b, [
379
+ "className",
380
+ "sideOffset",
381
+ "style"
382
+ ]);
383
+ const themeVars = useThemeVars();
384
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_menu.Menu.Positioner, { sideOffset, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
385
+ import_menu.Menu.Popup,
386
+ __spreadValues({
387
+ className: cn(
388
+ "z-50 min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-none border bg-popover p-1 text-popover-foreground shadow-md 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 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
389
+ className
390
+ ),
391
+ "data-slot": "dropdown-menu-content",
392
+ style: __spreadValues(__spreadValues({}, themeVars), style)
393
+ }, props)
394
+ ) }) });
395
+ }
396
+ function DropdownMenuItem(_a) {
397
+ var _b = _a, {
398
+ className,
399
+ inset,
400
+ variant = "default"
401
+ } = _b, props = __objRest(_b, [
402
+ "className",
403
+ "inset",
404
+ "variant"
405
+ ]);
406
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
407
+ import_menu.Menu.Item,
408
+ __spreadValues({
409
+ className: cn(
410
+ "relative flex cursor-default items-center gap-2 rounded-none px-2 py-1.5 text-body-small outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
411
+ className
412
+ ),
413
+ "data-inset": inset,
414
+ "data-slot": "dropdown-menu-item",
415
+ "data-variant": variant
416
+ }, props)
417
+ );
418
+ }
419
+ function DropdownMenuSeparator(_a) {
420
+ var _b = _a, {
421
+ className
422
+ } = _b, props = __objRest(_b, [
423
+ "className"
424
+ ]);
425
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
426
+ import_menu.Menu.Separator,
427
+ __spreadValues({
428
+ className: cn("-mx-1 my-1 h-px bg-border", className),
429
+ "data-slot": "dropdown-menu-separator"
430
+ }, props)
431
+ );
432
+ }
433
+
434
+ // src/components/ui/dialog.tsx
435
+ var import_lucide_react3 = require("lucide-react");
436
+ var import_dialog = require("@base-ui/react/dialog");
437
+ var import_jsx_runtime7 = require("react/jsx-runtime");
438
+ function Dialog(_a) {
439
+ var props = __objRest(_a, []);
440
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
441
+ }
442
+ function DialogPortal(_a) {
443
+ var props = __objRest(_a, []);
444
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
445
+ }
446
+ function DialogOverlay(_a) {
447
+ var _b = _a, {
448
+ className
449
+ } = _b, props = __objRest(_b, [
450
+ "className"
451
+ ]);
452
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
453
+ import_dialog.Dialog.Backdrop,
454
+ __spreadValues({
455
+ className: cn(
456
+ // WealthX: foreground/50 scrim (matches Figma — foreground token at 50% opacity)
457
+ "fixed inset-0 z-50 bg-foreground/50 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0",
458
+ className
459
+ ),
460
+ "data-slot": "dialog-overlay"
461
+ }, props)
462
+ );
463
+ }
464
+ var DIALOG_MAX_WIDTHS = {
465
+ sm: "24rem",
466
+ md: "28rem",
467
+ lg: "32rem",
468
+ xl: "36rem",
469
+ "2xl": "42rem",
470
+ "3xl": "48rem",
471
+ "4xl": "56rem",
472
+ full: "100%"
473
+ };
474
+ var DIALOG_AUTO_MIN_WIDTH = "20rem";
475
+ function DialogContent(_a) {
476
+ var _b = _a, {
477
+ className,
478
+ children,
479
+ showCloseButton = true,
480
+ style,
481
+ container,
482
+ align = "center",
483
+ size = "lg",
484
+ minWidth
485
+ } = _b, props = __objRest(_b, [
486
+ "className",
487
+ "children",
488
+ "showCloseButton",
489
+ "style",
490
+ "container",
491
+ "align",
492
+ "size",
493
+ "minWidth"
494
+ ]);
495
+ const themeVars = useThemeVars();
496
+ const isAuto = size === "auto";
497
+ const sizeStyle = isAuto ? { minWidth: minWidth != null ? minWidth : DIALOG_AUTO_MIN_WIDTH } : { maxWidth: DIALOG_MAX_WIDTHS[size] };
498
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(DialogPortal, { container: container != null ? container : void 0, children: [
499
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogOverlay, { style: themeVars }),
500
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
501
+ import_dialog.Dialog.Popup,
502
+ __spreadProps(__spreadValues({
503
+ className: cn(
504
+ // WealthX: removed rounded-lg (sharp corners), shadow-lg (flat panels)
505
+ // max-w-[calc(100%-2rem)] acts as a viewport-edge guard on all sizes.
506
+ // Fixed max-width is applied via inline style (sizeStyle) to avoid
507
+ // Tailwind v4 class-scanning gaps with dynamic class lookups.
508
+ "fixed left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] gap-4 border bg-background p-6 duration-200 outline-none data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
509
+ // "auto" → hug content (with min-width floor); fixed sizes → fill to max-width
510
+ isAuto ? "w-auto" : "w-full",
511
+ align === "center" ? "top-[50%] translate-y-[-50%]" : "top-4 translate-y-0",
512
+ className
513
+ ),
514
+ "data-slot": "dialog-content",
515
+ style: __spreadValues(__spreadValues(__spreadValues({}, themeVars), sizeStyle), style)
516
+ }, props), {
517
+ children: [
518
+ children,
519
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
520
+ import_dialog.Dialog.Close,
521
+ {
522
+ className: "absolute top-4 right-4 inline-flex size-7 items-center justify-center transition-colors hover:bg-foreground/5 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-border focus-visible:ring-offset-0 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
523
+ "data-slot": "dialog-close",
524
+ children: [
525
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.XIcon, {}),
526
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: "Close" })
527
+ ]
528
+ }
529
+ ) : null
530
+ ]
531
+ })
532
+ )
533
+ ] });
534
+ }
535
+ function DialogHeader(_a) {
536
+ var _b = _a, {
537
+ className
538
+ } = _b, props = __objRest(_b, [
539
+ "className"
540
+ ]);
541
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
542
+ "div",
543
+ __spreadValues({
544
+ className: cn("flex flex-col gap-1.5", className),
545
+ "data-slot": "dialog-header"
546
+ }, props)
547
+ );
548
+ }
549
+ function DialogFooter(_a) {
550
+ var _b = _a, {
551
+ className,
552
+ showCloseButton = false,
553
+ children
554
+ } = _b, props = __objRest(_b, [
555
+ "className",
556
+ "showCloseButton",
557
+ "children"
558
+ ]);
559
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
560
+ "div",
561
+ __spreadProps(__spreadValues({
562
+ className: cn(
563
+ // WealthX: always row layout, right-aligned, separator above footer
564
+ "flex flex-row justify-end gap-2 border-t border-border pt-4",
565
+ className
566
+ ),
567
+ "data-slot": "dialog-footer"
568
+ }, props), {
569
+ children: [
570
+ children,
571
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
572
+ import_dialog.Dialog.Close,
573
+ {
574
+ className: cn(buttonVariants({ variant: "outline" })),
575
+ type: "button",
576
+ children: "Close"
577
+ }
578
+ ) : null
579
+ ]
580
+ })
581
+ );
582
+ }
583
+ function DialogTitle(_a) {
584
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
585
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
586
+ import_dialog.Dialog.Title,
587
+ __spreadValues({
588
+ className: cn("text-h5 leading-none", className),
589
+ "data-slot": "dialog-title"
590
+ }, props)
591
+ );
592
+ }
593
+ function DialogDescription(_a) {
594
+ var _b = _a, {
595
+ className
596
+ } = _b, props = __objRest(_b, [
597
+ "className"
598
+ ]);
599
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
600
+ import_dialog.Dialog.Description,
601
+ __spreadValues({
602
+ className: cn("text-body-small text-muted-foreground", className),
603
+ "data-slot": "dialog-description"
604
+ }, props)
605
+ );
606
+ }
607
+
608
+ // src/components/ui/separator.tsx
609
+ var import_separator = require("@base-ui/react/separator");
610
+ var import_jsx_runtime8 = require("react/jsx-runtime");
611
+ function Separator(_a) {
612
+ var _b = _a, {
613
+ className,
614
+ orientation = "horizontal"
615
+ } = _b, props = __objRest(_b, [
616
+ "className",
617
+ "orientation"
618
+ ]);
619
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
620
+ import_separator.Separator,
621
+ __spreadValues({
622
+ className: cn(
623
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
624
+ className
625
+ ),
626
+ "data-orientation": orientation,
627
+ "data-slot": "separator"
628
+ }, props)
629
+ );
630
+ }
631
+
632
+ // src/components/ui/tabs.tsx
633
+ var import_class_variance_authority3 = require("class-variance-authority");
634
+ var import_tabs = require("@base-ui/react/tabs");
635
+ var import_jsx_runtime9 = require("react/jsx-runtime");
636
+ function Tabs(_a) {
637
+ var _b = _a, {
638
+ className,
639
+ orientation = "horizontal"
640
+ } = _b, props = __objRest(_b, [
641
+ "className",
642
+ "orientation"
643
+ ]);
644
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
645
+ import_tabs.Tabs.Root,
646
+ __spreadValues({
647
+ className: cn(
648
+ "group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
649
+ className
650
+ ),
651
+ "data-orientation": orientation,
652
+ "data-slot": "tabs"
653
+ }, props)
654
+ );
655
+ }
656
+ var tabsListVariants = (0, import_class_variance_authority3.cva)(
657
+ "group/tabs-list inline-flex w-fit items-center justify-center gap-1 rounded-none p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
658
+ {
659
+ variants: {
660
+ variant: {
661
+ default: "bg-muted",
662
+ line: "bg-transparent p-0"
663
+ }
664
+ },
665
+ defaultVariants: {
666
+ variant: "default"
667
+ }
668
+ }
669
+ );
670
+ function TabsList(_a) {
671
+ var _b = _a, {
672
+ className,
673
+ variant = "default"
674
+ } = _b, props = __objRest(_b, [
675
+ "className",
676
+ "variant"
677
+ ]);
678
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
679
+ import_tabs.Tabs.List,
680
+ __spreadValues({
681
+ className: cn(tabsListVariants({ variant }), className),
682
+ "data-slot": "tabs-list",
683
+ "data-variant": variant
684
+ }, props)
685
+ );
686
+ }
687
+ function TabsTrigger(_a) {
688
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
689
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
690
+ import_tabs.Tabs.Tab,
691
+ __spreadValues({
692
+ className: cn(
693
+ // Base layout & typography
694
+ "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap",
695
+ "rounded-none border border-transparent px-1.5 py-1 text-label-medium",
696
+ "text-muted-foreground transition-all",
697
+ // Vertical orientation
698
+ "group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start",
699
+ // Hover & focus
700
+ "hover:text-foreground",
701
+ "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring",
702
+ // Disabled
703
+ "disabled:pointer-events-none disabled:opacity-50",
704
+ // Active state — Default variant: primary/10 bg + subtle shadow
705
+ // Base UI uses data-active attribute for the active/selected tab
706
+ "data-active:bg-primary/10 data-active:text-foreground",
707
+ "group-data-[variant=default]/tabs-list:data-active:shadow-sm",
708
+ // Active state — Line variant: suppress bg & shadow
709
+ "group-data-[variant=line]/tabs-list:data-active:bg-transparent",
710
+ "group-data-[variant=line]/tabs-list:data-active:shadow-none",
711
+ // Indicator pseudo-element (visible only for Line variant, active state)
712
+ "after:absolute after:bg-primary after:opacity-0 after:transition-opacity",
713
+ "group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5",
714
+ "group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5",
715
+ "group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
716
+ // SVG icons
717
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
718
+ className
719
+ ),
720
+ "data-slot": "tabs-trigger"
721
+ }, props)
722
+ );
723
+ }
724
+
725
+ // src/components/ui/toggle-group.tsx
726
+ var React3 = __toESM(require("react"));
727
+ var import_toggle_group = require("@base-ui/react/toggle-group");
728
+ var import_toggle2 = require("@base-ui/react/toggle");
729
+
730
+ // src/components/ui/toggle.tsx
731
+ var import_class_variance_authority4 = require("class-variance-authority");
732
+ var import_toggle = require("@base-ui/react/toggle");
733
+ var import_jsx_runtime10 = require("react/jsx-runtime");
734
+ var toggleVariants = (0, import_class_variance_authority4.cva)(
735
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-pressed:bg-primary/10 data-pressed:inset-ring data-pressed:inset-ring-primary data-pressed:text-foreground data-pressed:hover:bg-primary/10 data-pressed:hover:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
736
+ {
737
+ variants: {
738
+ variant: {
739
+ default: "bg-transparent hover:bg-muted hover:text-muted-foreground",
740
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
741
+ },
742
+ size: {
743
+ default: "h-9 min-w-9 px-2 text-label-large",
744
+ sm: "h-8 min-w-8 px-1.5 text-label-medium",
745
+ lg: "h-10 min-w-10 px-2.5 text-h5"
746
+ }
747
+ },
748
+ defaultVariants: {
749
+ variant: "default",
750
+ size: "default"
751
+ }
752
+ }
753
+ );
754
+
755
+ // src/components/ui/toggle-group.tsx
756
+ var import_jsx_runtime11 = require("react/jsx-runtime");
757
+ var ToggleGroupContext = React3.createContext({
758
+ size: "default",
759
+ variant: "default",
760
+ spacing: 0
761
+ });
762
+ function ToggleGroup(_a) {
763
+ var _b = _a, {
764
+ className,
765
+ variant,
766
+ size,
767
+ spacing = 0,
768
+ type,
769
+ children
770
+ } = _b, props = __objRest(_b, [
771
+ "className",
772
+ "variant",
773
+ "size",
774
+ "spacing",
775
+ "type",
776
+ "children"
777
+ ]);
778
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
779
+ import_toggle_group.ToggleGroup,
780
+ __spreadProps(__spreadValues({
781
+ className: cn(
782
+ // WealthX: removed rounded-md (sharp corners) and shadow-xs (flat panels)
783
+ "group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))]",
784
+ className
785
+ ),
786
+ "data-size": size,
787
+ "data-slot": "toggle-group",
788
+ "data-spacing": spacing,
789
+ "data-variant": variant,
790
+ multiple: type === "multiple",
791
+ style: { "--gap": spacing }
792
+ }, props), {
793
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
794
+ })
795
+ );
796
+ }
797
+ function ToggleGroupItem(_a) {
798
+ var _b = _a, {
799
+ className,
800
+ children,
801
+ variant,
802
+ size
803
+ } = _b, props = __objRest(_b, [
804
+ "className",
805
+ "children",
806
+ "variant",
807
+ "size"
808
+ ]);
809
+ const context = React3.useContext(ToggleGroupContext);
810
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
811
+ import_toggle2.Toggle,
812
+ __spreadProps(__spreadValues({
813
+ className: cn(
814
+ toggleVariants({
815
+ variant: context.variant || variant,
816
+ size: context.size || size
817
+ }),
818
+ "w-auto min-w-0 shrink-0 focus:z-10 focus-visible:z-10",
819
+ // WealthX: no rounded corners on grouped items
820
+ "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
821
+ className
822
+ ),
823
+ "data-size": context.size || size,
824
+ "data-slot": "toggle-group-item",
825
+ "data-spacing": context.spacing,
826
+ "data-variant": context.variant || variant
827
+ }, props), {
828
+ children
829
+ })
830
+ );
831
+ }
832
+
833
+ // src/components/ui/textarea.tsx
834
+ var import_jsx_runtime12 = require("react/jsx-runtime");
835
+ function Textarea(_a) {
836
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
837
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
838
+ "textarea",
839
+ __spreadValues({
840
+ className: cn(
841
+ // WealthX: removed shadow-xs (flat panels), added font-sans
842
+ "flex field-sizing-content min-h-16 w-full border border-input bg-transparent px-3 py-2 text-body-medium font-sans transition-[color,box-shadow] outline-none placeholder:font-normal placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
843
+ className
844
+ ),
845
+ "data-slot": "textarea"
846
+ }, props)
847
+ );
848
+ }
849
+
850
+ // src/components/ui/tooltip.tsx
851
+ var import_tooltip = require("@base-ui/react/tooltip");
852
+ var import_jsx_runtime13 = require("react/jsx-runtime");
853
+ function TooltipProvider(_a) {
854
+ var _b = _a, {
855
+ delay = 0
856
+ } = _b, props = __objRest(_b, [
857
+ "delay"
858
+ ]);
859
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
860
+ import_tooltip.Tooltip.Provider,
861
+ __spreadValues({
862
+ "data-slot": "tooltip-provider",
863
+ delay
864
+ }, props)
865
+ );
866
+ }
867
+ function Tooltip(_a) {
868
+ var props = __objRest(_a, []);
869
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tooltip.Tooltip.Root, __spreadValues({ "data-slot": "tooltip" }, props));
870
+ }
871
+ function TooltipTrigger(_a) {
872
+ var props = __objRest(_a, []);
873
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tooltip.Tooltip.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
874
+ }
875
+ function TooltipContent(_a) {
876
+ var _b = _a, {
877
+ className,
878
+ sideOffset = 8,
879
+ side,
880
+ children,
881
+ style
882
+ } = _b, props = __objRest(_b, [
883
+ "className",
884
+ "sideOffset",
885
+ "side",
886
+ "children",
887
+ "style"
888
+ ]);
889
+ const themeVars = useThemeVars();
890
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tooltip.Tooltip.Positioner, { sideOffset, side, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
891
+ import_tooltip.Tooltip.Popup,
892
+ __spreadProps(__spreadValues({
893
+ className: cn(
894
+ "relative z-50 w-fit animate-in overflow-visible bg-brand-secondary px-3 py-1.5 text-caption text-balance text-brand-secondary-foreground fade-in-0 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 data-ending-style:animate-out data-ending-style:fade-out-0 data-ending-style:zoom-out-95 data-ending-style:fill-mode-forwards",
895
+ className
896
+ ),
897
+ "data-slot": "tooltip-content",
898
+ style: __spreadValues(__spreadValues({}, themeVars), style)
899
+ }, props), {
900
+ children: [
901
+ children,
902
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_tooltip.Tooltip.Arrow, { className: "z-50 size-2.5 rotate-45 bg-brand-secondary data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1 data-[side=top]:-bottom-1" })
903
+ ]
904
+ })
905
+ ) }) });
906
+ }
907
+
908
+ // src/components/ui/ai-conversations.tsx
909
+ var import_jsx_runtime14 = require("react/jsx-runtime");
910
+ function displayContactName(name) {
911
+ return name.trim() || "Website User";
912
+ }
913
+ var PANEL_HEADER_HEIGHT = "h-[94px]";
914
+ var APPOINTMENT_STATUS_LABEL = {
915
+ requested: "Lead requested",
916
+ confirmed: "Confirmed",
917
+ pending: "Pending confirmation",
918
+ cancelled: "Cancelled"
919
+ };
920
+ var STATUS_CONFIG = {
921
+ "ai-active": {
922
+ label: "AI Active",
923
+ variant: "success",
924
+ dotClass: "bg-success"
925
+ },
926
+ manual: {
927
+ label: "Manual",
928
+ variant: "default",
929
+ dotClass: "bg-primary"
930
+ },
931
+ "needs-attention": {
932
+ label: "Needs Attention",
933
+ variant: "warning",
934
+ dotClass: "bg-warning"
935
+ },
936
+ closed: {
937
+ label: "Closed",
938
+ variant: "secondary",
939
+ dotClass: "bg-muted-foreground/50"
940
+ }
941
+ };
942
+ function ConversationStatusChip({
943
+ status,
944
+ showDot = false,
945
+ className
946
+ }) {
947
+ const { label, variant, dotClass } = STATUS_CONFIG[status];
948
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Badge, { variant, className, children: [
949
+ showDot && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cn("size-1.5 shrink-0 rounded-full", dotClass) }),
950
+ label
951
+ ] });
952
+ }
953
+ function ContactAvatar({ name, size = "md", className }) {
954
+ const avatarSize = size === "sm" ? "sm" : size === "lg" ? "lg" : "default";
955
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Avatar, { size: avatarSize, className, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarFallback, { className: "font-semibold", children: getInitials(name) }) });
956
+ }
957
+ function ConversationListItem({
958
+ data,
959
+ isActive,
960
+ onClick,
961
+ onRead
962
+ }) {
963
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
964
+ "button",
965
+ {
966
+ type: "button",
967
+ onClick: () => {
968
+ onClick == null ? void 0 : onClick(data.id);
969
+ onRead == null ? void 0 : onRead(data.id);
970
+ },
971
+ className: cn(
972
+ "w-full flex items-start gap-3 px-3 py-3 text-left transition-colors",
973
+ "border-b border-border last:border-b-0",
974
+ isActive ? "bg-muted" : "hover:bg-muted/40"
975
+ ),
976
+ children: [
977
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContactAvatar, { name: data.contact.name }),
978
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
979
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
980
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(data.contact.name) }),
981
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
982
+ data.status === "needs-attention" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Flag, { className: "size-3 text-warning-text" }),
983
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "whitespace-nowrap text-xs text-muted-foreground", children: data.timestamp })
984
+ ] })
985
+ ] }),
986
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mb-1.5 flex items-center justify-between gap-2", children: [
987
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex min-w-0 items-center gap-1.5", children: [
988
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ConversationStatusChip, { status: data.status, showDot: true }),
989
+ data.assignedTo && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "truncate text-xs text-muted-foreground", children: [
990
+ "\u2192 ",
991
+ data.assignedTo
992
+ ] })
993
+ ] }),
994
+ data.unreadCount ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
995
+ Badge,
996
+ {
997
+ variant: "default",
998
+ className: "size-4 shrink-0 justify-center px-0 text-[10px]",
999
+ children: data.unreadCount
1000
+ }
1001
+ ) : null
1002
+ ] }),
1003
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "line-clamp-2 text-sm leading-relaxed text-muted-foreground", children: [
1004
+ data.lastMessageRole === "bot" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "font-medium text-foreground/60", children: "AI: " }) : data.lastMessageRole === "advisor" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "font-medium text-foreground/60", children: "You: " }) : data.lastMessageRole === "visitor" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "font-medium text-foreground/60", children: [
1005
+ displayContactName(data.contact.name).split(" ")[0],
1006
+ ":",
1007
+ " "
1008
+ ] }) : null,
1009
+ data.lastMessage
1010
+ ] })
1011
+ ] })
1012
+ ]
1013
+ }
1014
+ );
1015
+ }
1016
+ function filterConversations(conversations, query, filter) {
1017
+ const q = query.toLowerCase();
1018
+ return conversations.filter((c) => {
1019
+ const matchesFilter = filter === "all" || (filter === "open" ? c.status !== "closed" : c.status === filter);
1020
+ const matchesSearch = !q || c.contact.name.toLowerCase().includes(q) || c.lastMessage.toLowerCase().includes(q);
1021
+ return matchesFilter && matchesSearch;
1022
+ });
1023
+ }
1024
+ var FILTER_TABS = [
1025
+ { id: "all", label: "All" },
1026
+ { id: "open", label: "Open" },
1027
+ { id: "ai-active", label: "AI Active" },
1028
+ { id: "needs-attention", label: "Urgent" },
1029
+ { id: "closed", label: "Archived" }
1030
+ ];
1031
+ function ConversationList({
1032
+ conversations,
1033
+ activeId,
1034
+ searchQuery = "",
1035
+ activeFilter = "all",
1036
+ hasMore,
1037
+ isLoadingMore,
1038
+ onSearchChange,
1039
+ onFilterChange,
1040
+ onSelect,
1041
+ onRead,
1042
+ onLoadMore,
1043
+ className
1044
+ }) {
1045
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1046
+ "div",
1047
+ {
1048
+ className: cn(
1049
+ "flex flex-col border-r border-border bg-background",
1050
+ className
1051
+ ),
1052
+ children: [
1053
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn(PANEL_HEADER_HEIGHT, "flex shrink-0 flex-col"), children: [
1054
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "border-b border-border p-3 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative", children: [
1055
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Search, { className: "absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground" }),
1056
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1057
+ Input,
1058
+ {
1059
+ value: searchQuery,
1060
+ onChange: (e) => onSearchChange == null ? void 0 : onSearchChange(e.target.value),
1061
+ placeholder: "Search conversations...",
1062
+ className: "h-8 pl-8 text-sm"
1063
+ }
1064
+ )
1065
+ ] }) }),
1066
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-1 items-center border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1067
+ Tabs,
1068
+ {
1069
+ value: activeFilter,
1070
+ onValueChange: (v) => v && (onFilterChange == null ? void 0 : onFilterChange(v)),
1071
+ className: "w-full",
1072
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1073
+ TabsList,
1074
+ {
1075
+ variant: "line",
1076
+ className: "w-full justify-start gap-0 h-auto",
1077
+ children: FILTER_TABS.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1078
+ TabsTrigger,
1079
+ {
1080
+ value: tab.id,
1081
+ className: "flex-none px-3 py-2 text-xs",
1082
+ children: tab.label
1083
+ },
1084
+ tab.id
1085
+ ))
1086
+ }
1087
+ )
1088
+ }
1089
+ ) })
1090
+ ] }),
1091
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-1 overflow-y-auto", tabIndex: 0, children: (() => {
1092
+ const filtered = filterConversations(
1093
+ conversations,
1094
+ searchQuery,
1095
+ activeFilter
1096
+ );
1097
+ return filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col items-center justify-center gap-2 p-8 text-muted-foreground", children: [
1098
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.MessageSquare, { className: "size-8 opacity-30" }),
1099
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm", children: "No conversations" }),
1100
+ searchQuery && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1101
+ Button,
1102
+ {
1103
+ variant: "outline",
1104
+ size: "sm",
1105
+ onClick: () => onSearchChange == null ? void 0 : onSearchChange(""),
1106
+ children: "Clear search"
1107
+ }
1108
+ ),
1109
+ !searchQuery && activeFilter !== "all" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1110
+ Button,
1111
+ {
1112
+ variant: "outline",
1113
+ size: "sm",
1114
+ onClick: () => onFilterChange == null ? void 0 : onFilterChange("all"),
1115
+ children: "Clear filter"
1116
+ }
1117
+ )
1118
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1119
+ filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1120
+ ConversationListItem,
1121
+ {
1122
+ data: item,
1123
+ isActive: activeId === item.id,
1124
+ onClick: onSelect,
1125
+ onRead
1126
+ },
1127
+ item.id
1128
+ )),
1129
+ hasMore && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "border-t border-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1130
+ Button,
1131
+ {
1132
+ variant: "outline",
1133
+ size: "sm",
1134
+ className: "w-full",
1135
+ disabled: isLoadingMore,
1136
+ onClick: onLoadMore,
1137
+ children: isLoadingMore ? "Loading..." : "Load more"
1138
+ }
1139
+ ) })
1140
+ ] });
1141
+ })() })
1142
+ ]
1143
+ }
1144
+ );
1145
+ }
1146
+ function BubbleAvatar({
1147
+ role,
1148
+ senderName
1149
+ }) {
1150
+ if (role === "bot") {
1151
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarFallback, { className: "border border-border bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Bot, { className: "size-3.5 text-muted-foreground" }) }) });
1152
+ }
1153
+ if (role === "advisor") {
1154
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarFallback, { className: "font-semibold", children: getInitials(senderName != null ? senderName : "Advisor") }) });
1155
+ }
1156
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarFallback, { children: getInitials(senderName != null ? senderName : "?") }) });
1157
+ }
1158
+ function ChatBubble({ message, className }) {
1159
+ const { role, content, timestamp, senderName } = message;
1160
+ if (role === "system") {
1161
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("my-2 flex items-center gap-3 px-2", className), children: [
1162
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Separator, { className: "flex-1" }),
1163
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "shrink-0 text-caption text-muted-foreground", children: content }),
1164
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Separator, { className: "flex-1" })
1165
+ ] });
1166
+ }
1167
+ const isAdvisor = role === "advisor";
1168
+ const isBot = role === "bot";
1169
+ const isVisitor = role === "visitor";
1170
+ const displayName = isBot ? "AI Assistant" : isAdvisor ? senderName != null ? senderName : "Advisor" : senderName != null ? senderName : "Lead";
1171
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1172
+ "div",
1173
+ {
1174
+ className: cn(
1175
+ "flex gap-2.5",
1176
+ isAdvisor ? "flex-row-reverse" : "flex-row",
1177
+ className
1178
+ ),
1179
+ children: [
1180
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BubbleAvatar, { role, senderName }),
1181
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1182
+ "div",
1183
+ {
1184
+ className: cn(
1185
+ "flex max-w-[70%] flex-col gap-1",
1186
+ isAdvisor && "items-end"
1187
+ ),
1188
+ children: [
1189
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-caption text-muted-foreground", children: displayName }),
1190
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1191
+ "div",
1192
+ {
1193
+ className: cn(
1194
+ "px-3 py-2 text-sm leading-relaxed",
1195
+ isBot && "border border-border bg-muted/60 text-foreground",
1196
+ isVisitor && "border border-border bg-background text-foreground",
1197
+ isAdvisor && "bg-primary text-primary-foreground"
1198
+ ),
1199
+ children: content
1200
+ }
1201
+ ),
1202
+ timestamp && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-caption text-muted-foreground", children: timestamp })
1203
+ ]
1204
+ }
1205
+ )
1206
+ ]
1207
+ }
1208
+ );
1209
+ }
1210
+ function ChatComposer({
1211
+ mode,
1212
+ inputValue = "",
1213
+ onInputChange,
1214
+ onSend,
1215
+ onTakeOver,
1216
+ onLetAiHandle,
1217
+ className
1218
+ }) {
1219
+ if (mode === "ai") {
1220
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1221
+ "div",
1222
+ {
1223
+ className: cn(
1224
+ "flex items-center gap-2 border-t border-border bg-muted/30 px-4 py-2.5 text-[12px] text-muted-foreground",
1225
+ className
1226
+ ),
1227
+ children: [
1228
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Bot, { className: "size-3.5 shrink-0 text-muted-foreground" }),
1229
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "AI is handling this conversation." }),
1230
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1231
+ Button,
1232
+ {
1233
+ variant: "link",
1234
+ size: "sm",
1235
+ className: "h-auto p-0 text-[12px] font-medium text-foreground",
1236
+ onClick: onTakeOver,
1237
+ children: "Take Over"
1238
+ }
1239
+ ),
1240
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "to reply directly." })
1241
+ ]
1242
+ }
1243
+ );
1244
+ }
1245
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1246
+ "div",
1247
+ {
1248
+ className: cn(
1249
+ "flex flex-col gap-2 border-t border-border bg-background p-3",
1250
+ className
1251
+ ),
1252
+ children: [
1253
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1254
+ Textarea,
1255
+ {
1256
+ value: inputValue,
1257
+ onChange: (e) => onInputChange == null ? void 0 : onInputChange(e.target.value),
1258
+ placeholder: "Reply to lead...",
1259
+ rows: 3,
1260
+ className: "resize-none text-sm"
1261
+ }
1262
+ ),
1263
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between", children: [
1264
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
1265
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Bot, { className: "mr-1.5 size-3.5" }),
1266
+ "Let AI Handle"
1267
+ ] }),
1268
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1269
+ Button,
1270
+ {
1271
+ size: "sm",
1272
+ onClick: () => onSend == null ? void 0 : onSend(inputValue),
1273
+ disabled: !inputValue.trim(),
1274
+ children: [
1275
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Send, { className: "mr-1.5 size-3.5" }),
1276
+ "Send"
1277
+ ]
1278
+ }
1279
+ )
1280
+ ] })
1281
+ ]
1282
+ }
1283
+ );
1284
+ }
1285
+ function ChatThread({
1286
+ contact,
1287
+ status,
1288
+ mode,
1289
+ messages,
1290
+ isAiTyping = false,
1291
+ inputValue,
1292
+ onInputChange,
1293
+ onSend,
1294
+ onTakeOver,
1295
+ onLetAiHandle,
1296
+ onReopen,
1297
+ onMarkUrgent,
1298
+ onUnmarkUrgent,
1299
+ onArchive,
1300
+ onAssignToAdvisor,
1301
+ onBack,
1302
+ onShowLeadInfo,
1303
+ className
1304
+ }) {
1305
+ const aiIsHandling = mode === "ai";
1306
+ const isClosed = status === "closed";
1307
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("flex flex-col bg-background", className), children: [
1308
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1309
+ "div",
1310
+ {
1311
+ className: cn(
1312
+ PANEL_HEADER_HEIGHT,
1313
+ "flex items-center gap-3 border-b border-border px-4"
1314
+ ),
1315
+ children: [
1316
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1317
+ Button,
1318
+ {
1319
+ variant: "ghost",
1320
+ size: "icon",
1321
+ className: "size-8 shrink-0 md:hidden",
1322
+ onClick: onBack,
1323
+ "aria-label": "Back to conversations",
1324
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ArrowLeft, { className: "size-4" })
1325
+ }
1326
+ ),
1327
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContactAvatar, { name: contact.name, size: "md" }),
1328
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
1329
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2", children: [
1330
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
1331
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ConversationStatusChip, { status, showDot: true })
1332
+ ] }),
1333
+ contact.email && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm text-muted-foreground", children: contact.email })
1334
+ ] }),
1335
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
1336
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "hidden items-center gap-2 md:flex", children: [
1337
+ isClosed && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { variant: "outline", size: "sm", onClick: onReopen, children: "Reopen" }),
1338
+ !isClosed && aiIsHandling && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { size: "sm", onClick: onTakeOver, children: "Take Over" }),
1339
+ !isClosed && !aiIsHandling && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Button, { variant: "outline", size: "sm", onClick: onLetAiHandle, children: [
1340
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Bot, { className: "mr-1.5 size-3.5" }),
1341
+ "Let AI Handle"
1342
+ ] })
1343
+ ] }),
1344
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenu, { children: [
1345
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1346
+ DropdownMenuTrigger,
1347
+ {
1348
+ className: cn(
1349
+ buttonVariants({ variant: "ghost", size: "icon" }),
1350
+ "size-8"
1351
+ ),
1352
+ "aria-label": "More actions",
1353
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.MoreHorizontal, { className: "size-4" })
1354
+ }
1355
+ ),
1356
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenuContent, { children: [
1357
+ onShowLeadInfo && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1358
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1359
+ DropdownMenuItem,
1360
+ {
1361
+ className: "md:hidden",
1362
+ onClick: onShowLeadInfo,
1363
+ children: [
1364
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ChevronRight, { className: "mr-2 size-4" }),
1365
+ "Lead Info"
1366
+ ]
1367
+ }
1368
+ ),
1369
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuSeparator, { className: "md:hidden" })
1370
+ ] }),
1371
+ status === "needs-attention" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenuItem, { onClick: onUnmarkUrgent, children: [
1372
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Flag, { className: "mr-2 size-4" }),
1373
+ "Unmark Urgent"
1374
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenuItem, { onClick: onMarkUrgent, children: [
1375
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Flag, { className: "mr-2 size-4" }),
1376
+ "Mark as Urgent"
1377
+ ] }),
1378
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenuItem, { onClick: onAssignToAdvisor, children: [
1379
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.UserCheck, { className: "mr-2 size-4" }),
1380
+ "Assign to advisor"
1381
+ ] }),
1382
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuSeparator, {}),
1383
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownMenuItem, { onClick: onArchive, children: [
1384
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Archive, { className: "mr-2 size-4" }),
1385
+ "Archive"
1386
+ ] })
1387
+ ] })
1388
+ ] })
1389
+ ] })
1390
+ ]
1391
+ }
1392
+ ),
1393
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1394
+ "div",
1395
+ {
1396
+ className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4",
1397
+ tabIndex: 0,
1398
+ children: [
1399
+ messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 text-muted-foreground", children: [
1400
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.MessageSquare, { className: "size-8 opacity-30" }),
1401
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm", children: "No messages yet" })
1402
+ ] }) : messages.map((msg) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChatBubble, { message: msg }, msg.id)),
1403
+ isAiTyping && !isClosed && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex gap-2.5", children: [
1404
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BubbleAvatar, { role: "bot" }),
1405
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1", children: [
1406
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-caption text-muted-foreground", children: "AI Assistant" }),
1407
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-1 border border-border bg-muted/60 px-3 py-2.5", children: [
1408
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:0ms]" }),
1409
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:150ms]" }),
1410
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:300ms]" })
1411
+ ] })
1412
+ ] })
1413
+ ] })
1414
+ ]
1415
+ }
1416
+ ),
1417
+ isClosed ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-3 border-t border-border bg-muted/30 px-4 py-3 text-sm text-muted-foreground", children: [
1418
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Lock, { className: "size-3.5 shrink-0" }),
1419
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "This conversation is closed." }),
1420
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1421
+ Button,
1422
+ {
1423
+ variant: "outline",
1424
+ size: "sm",
1425
+ className: "ml-auto",
1426
+ onClick: onReopen,
1427
+ children: "Reopen"
1428
+ }
1429
+ )
1430
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1431
+ ChatComposer,
1432
+ {
1433
+ mode,
1434
+ inputValue,
1435
+ onInputChange,
1436
+ onSend,
1437
+ onTakeOver,
1438
+ onLetAiHandle
1439
+ }
1440
+ )
1441
+ ] });
1442
+ }
1443
+ function AICollectedDataSection({
1444
+ fields,
1445
+ className
1446
+ }) {
1447
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cn("flex flex-col", className), children: fields.map((field, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1448
+ "div",
1449
+ {
1450
+ className: "flex items-center justify-between gap-2 border-b border-border/40 py-1.5 last:border-b-0",
1451
+ children: [
1452
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "shrink-0 text-sm text-muted-foreground", children: field.label }),
1453
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-1.5", children: [
1454
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-right text-sm font-medium text-foreground", children: field.value }),
1455
+ field.confidence === "confirmed" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.CheckCircle2, { className: "size-3 shrink-0 text-success-text" }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.HelpCircle, { className: "size-3 shrink-0 text-warning-text" })
1456
+ ] })
1457
+ ]
1458
+ },
1459
+ i
1460
+ )) });
1461
+ }
1462
+ var MEETING_ICON = {
1463
+ video: import_lucide_react4.Video,
1464
+ phone: import_lucide_react4.Phone,
1465
+ "in-person": import_lucide_react4.MapPin
1466
+ };
1467
+ var MEETING_LABEL = {
1468
+ video: "Video Call",
1469
+ phone: "Phone Call",
1470
+ "in-person": "In Person"
1471
+ };
1472
+ function AppointmentSection({
1473
+ appointment,
1474
+ contactId,
1475
+ isAnonymous,
1476
+ onApproveAppointment,
1477
+ onDeclineAppointment,
1478
+ onRescheduleAppointment
1479
+ }) {
1480
+ const AppointmentIcon = MEETING_ICON[appointment.meetingType];
1481
+ const canReschedule = !isAnonymous && !!onRescheduleAppointment;
1482
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-2", children: [
1483
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2", children: [
1484
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Calendar, { className: "size-3.5 shrink-0 text-muted-foreground" }),
1485
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-sm font-medium text-foreground", children: appointment.datetime })
1486
+ ] }),
1487
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2", children: [
1488
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AppointmentIcon, { className: "size-4 shrink-0 text-muted-foreground" }),
1489
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-sm text-muted-foreground", children: MEETING_LABEL[appointment.meetingType] })
1490
+ ] }),
1491
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1492
+ "span",
1493
+ {
1494
+ className: cn("text-sm font-medium", {
1495
+ "text-warning-text": appointment.status === "requested",
1496
+ "text-success-text": appointment.status === "confirmed",
1497
+ "text-muted-foreground": appointment.status === "pending",
1498
+ "text-destructive line-through": appointment.status === "cancelled"
1499
+ }),
1500
+ children: APPOINTMENT_STATUS_LABEL[appointment.status]
1501
+ }
1502
+ ),
1503
+ appointment.status === "requested" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex gap-2 pt-1", children: [
1504
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { size: "sm", className: "flex-1", onClick: onApproveAppointment, children: "Approve" }),
1505
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1506
+ Button,
1507
+ {
1508
+ variant: "outline",
1509
+ size: "sm",
1510
+ className: "flex-1",
1511
+ onClick: onDeclineAppointment,
1512
+ children: "Decline"
1513
+ }
1514
+ ),
1515
+ canReschedule && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1516
+ Button,
1517
+ {
1518
+ variant: "ghost",
1519
+ size: "sm",
1520
+ className: "flex-1",
1521
+ onClick: () => onRescheduleAppointment(contactId),
1522
+ children: "Reschedule"
1523
+ }
1524
+ )
1525
+ ] }),
1526
+ (appointment.status === "confirmed" || appointment.status === "cancelled") && canReschedule && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1527
+ Button,
1528
+ {
1529
+ variant: "outline",
1530
+ size: "sm",
1531
+ className: "mt-1 w-full justify-start",
1532
+ onClick: () => onRescheduleAppointment(contactId),
1533
+ children: "Reschedule"
1534
+ }
1535
+ )
1536
+ ] });
1537
+ }
1538
+ function PanelSectionHeader({ children }) {
1539
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mb-2.5 text-overline text-muted-foreground", children });
1540
+ }
1541
+ function PanelSection({
1542
+ children,
1543
+ last = false
1544
+ }) {
1545
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cn("px-4 py-4", !last && "border-b border-border"), children });
1546
+ }
1547
+ function LeadInfoPanel({
1548
+ contact,
1549
+ firstSeen,
1550
+ source = "Website Chatbot",
1551
+ aiFields = [],
1552
+ appointment,
1553
+ internalNotes = "",
1554
+ notesSaveStatus = "idle",
1555
+ isCollapsed = false,
1556
+ isKnownContact = false,
1557
+ onAddToContacts,
1558
+ onCreateOpportunity,
1559
+ onBookAppointment,
1560
+ onApproveAppointment,
1561
+ onDeclineAppointment,
1562
+ onRescheduleAppointment,
1563
+ onNotesChange,
1564
+ onToggleCollapse,
1565
+ onBack,
1566
+ className
1567
+ }) {
1568
+ const isAnonymous = !contact.name.trim();
1569
+ const addToContactsDisabled = isAnonymous || isKnownContact;
1570
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("flex flex-col bg-background", className), children: [
1571
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1572
+ "div",
1573
+ {
1574
+ className: cn(
1575
+ PANEL_HEADER_HEIGHT,
1576
+ "flex items-center justify-between border-b border-border px-4"
1577
+ ),
1578
+ children: [
1579
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1580
+ Button,
1581
+ {
1582
+ variant: "ghost",
1583
+ size: "icon",
1584
+ className: "size-8 shrink-0 md:hidden",
1585
+ onClick: onBack,
1586
+ "aria-label": "Back to conversation",
1587
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ArrowLeft, { className: "size-4" })
1588
+ }
1589
+ ),
1590
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-sm font-semibold text-foreground", children: "Lead Info" }),
1591
+ onToggleCollapse && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Tooltip, { children: [
1592
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1593
+ TooltipTrigger,
1594
+ {
1595
+ render: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1596
+ Button,
1597
+ {
1598
+ variant: "ghost",
1599
+ size: "icon",
1600
+ className: "size-7",
1601
+ onClick: onToggleCollapse,
1602
+ "aria-label": isCollapsed ? "Expand panel" : "Collapse panel",
1603
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1604
+ import_lucide_react4.ChevronRight,
1605
+ {
1606
+ className: cn(
1607
+ "size-4 transition-transform duration-150",
1608
+ isCollapsed && "-rotate-180"
1609
+ )
1610
+ }
1611
+ )
1612
+ }
1613
+ )
1614
+ }
1615
+ ),
1616
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipContent, { children: isCollapsed ? "Expand panel" : "Collapse panel" })
1617
+ ] })
1618
+ ]
1619
+ }
1620
+ ),
1621
+ !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex-1 overflow-y-auto", tabIndex: 0, children: [
1622
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(PanelSection, { children: [
1623
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PanelSectionHeader, { children: "Contact" }),
1624
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-3", children: [
1625
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContactAvatar, { name: contact.name, size: "lg" }),
1626
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
1627
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "truncate text-sm font-semibold text-foreground", children: displayContactName(contact.name) }),
1628
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm text-muted-foreground", children: source })
1629
+ ] })
1630
+ ] }),
1631
+ (contact.email || contact.phone || firstSeen) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mt-3 flex flex-col gap-1.5", children: [
1632
+ contact.email && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
1633
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Mail, { className: "size-4 shrink-0" }),
1634
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1635
+ "a",
1636
+ {
1637
+ href: `mailto:${contact.email}`,
1638
+ className: "truncate hover:underline",
1639
+ children: contact.email
1640
+ }
1641
+ )
1642
+ ] }),
1643
+ contact.phone && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
1644
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.PhoneCall, { className: "size-4 shrink-0" }),
1645
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1646
+ "a",
1647
+ {
1648
+ href: `tel:${contact.phone}`,
1649
+ className: "hover:underline",
1650
+ children: contact.phone
1651
+ }
1652
+ )
1653
+ ] }),
1654
+ firstSeen && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
1655
+ "First seen: ",
1656
+ firstSeen
1657
+ ] })
1658
+ ] })
1659
+ ] }),
1660
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(PanelSection, { children: [
1661
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PanelSectionHeader, { children: "AI-Collected Data" }),
1662
+ aiFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1663
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AICollectedDataSection, { fields: aiFields }),
1664
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mt-2.5 flex items-center gap-3 text-xs text-muted-foreground", children: [
1665
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex items-center gap-1", children: [
1666
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.CheckCircle2, { className: "size-3 text-success-text" }),
1667
+ "confirmed"
1668
+ ] }),
1669
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex items-center gap-1", children: [
1670
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.HelpCircle, { className: "size-3 text-warning-text" }),
1671
+ "estimated"
1672
+ ] })
1673
+ ] })
1674
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm text-muted-foreground", children: "AI is still gathering information..." })
1675
+ ] }),
1676
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(PanelSection, { children: [
1677
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PanelSectionHeader, { children: "Appointment" }),
1678
+ appointment ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1679
+ AppointmentSection,
1680
+ {
1681
+ appointment,
1682
+ contactId: contact.id,
1683
+ isAnonymous,
1684
+ onApproveAppointment,
1685
+ onDeclineAppointment,
1686
+ onRescheduleAppointment
1687
+ }
1688
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1689
+ Button,
1690
+ {
1691
+ variant: "outline",
1692
+ size: "sm",
1693
+ className: "w-full justify-start",
1694
+ disabled: isAnonymous,
1695
+ onClick: onBookAppointment,
1696
+ children: [
1697
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Plus, { className: "mr-1.5 size-3.5" }),
1698
+ "Book Appointment"
1699
+ ]
1700
+ }
1701
+ )
1702
+ ] }),
1703
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(PanelSection, { children: [
1704
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PanelSectionHeader, { children: "CRM Actions" }),
1705
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-2", children: [
1706
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Tooltip, { children: [
1707
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1708
+ TooltipTrigger,
1709
+ {
1710
+ render: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1711
+ Button,
1712
+ {
1713
+ variant: "outline",
1714
+ size: "sm",
1715
+ className: "w-full justify-start",
1716
+ disabled: addToContactsDisabled,
1717
+ onClick: onAddToContacts,
1718
+ children: [
1719
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.UserPlus, { className: "mr-1.5 size-3.5" }),
1720
+ "Add to Contacts"
1721
+ ]
1722
+ }
1723
+ )
1724
+ }
1725
+ ),
1726
+ isKnownContact && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipContent, { children: "Already in contacts" })
1727
+ ] }),
1728
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1729
+ Button,
1730
+ {
1731
+ variant: "outline",
1732
+ size: "sm",
1733
+ className: "w-full justify-start",
1734
+ disabled: isAnonymous,
1735
+ onClick: onCreateOpportunity,
1736
+ children: [
1737
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Briefcase, { className: "mr-1.5 size-3.5" }),
1738
+ "Add to CRM"
1739
+ ]
1740
+ }
1741
+ )
1742
+ ] })
1743
+ ] }),
1744
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(PanelSection, { last: true, children: [
1745
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mb-2.5 flex items-center justify-between", children: [
1746
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-overline text-muted-foreground", children: "Internal Notes" }),
1747
+ notesSaveStatus === "saving" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-xs text-muted-foreground", children: "Saving..." }),
1748
+ notesSaveStatus === "saved" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "flex items-center gap-1 text-xs text-success-text", children: [
1749
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.CheckCircle2, { className: "size-3" }),
1750
+ "Saved"
1751
+ ] })
1752
+ ] }),
1753
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1754
+ Textarea,
1755
+ {
1756
+ value: internalNotes,
1757
+ onChange: (e) => onNotesChange == null ? void 0 : onNotesChange(e.target.value),
1758
+ placeholder: "Private notes \u2014 not visible to lead...",
1759
+ rows: 4,
1760
+ className: "resize-none text-sm"
1761
+ }
1762
+ )
1763
+ ] })
1764
+ ] })
1765
+ ] });
1766
+ }
1767
+ function ConversationsPage({
1768
+ conversations,
1769
+ activeConversationId,
1770
+ contact,
1771
+ status = "ai-active",
1772
+ mode = "ai",
1773
+ messages = [],
1774
+ aiFields = [],
1775
+ appointment,
1776
+ leadFirstSeen,
1777
+ leadSource,
1778
+ searchQuery,
1779
+ activeFilter,
1780
+ inputValue,
1781
+ internalNotes,
1782
+ showLeadPanel = true,
1783
+ hasMore,
1784
+ isLoadingMore,
1785
+ isAiTyping,
1786
+ notesSaveStatus,
1787
+ onSelectConversation,
1788
+ onRead,
1789
+ onSearchChange,
1790
+ onFilterChange,
1791
+ onInputChange,
1792
+ onSend,
1793
+ onTakeOver,
1794
+ onLetAiHandle,
1795
+ onReopen,
1796
+ onMarkUrgent,
1797
+ onUnmarkUrgent,
1798
+ onArchive,
1799
+ onAssignToAdvisor,
1800
+ isKnownContact,
1801
+ onAddToContacts,
1802
+ onCreateOpportunity,
1803
+ onBookAppointment,
1804
+ onApproveAppointment,
1805
+ onDeclineAppointment,
1806
+ onRescheduleAppointment,
1807
+ onNotesChange,
1808
+ onToggleLeadPanel,
1809
+ onLoadMore,
1810
+ className
1811
+ }) {
1812
+ const [mobilePanel, setMobilePanel] = (0, import_react3.useState)(
1813
+ "list"
1814
+ );
1815
+ const handleSelectConversation = (id) => {
1816
+ onSelectConversation == null ? void 0 : onSelectConversation(id);
1817
+ setMobilePanel("chat");
1818
+ };
1819
+ const handleToggleLeadPanel = () => {
1820
+ onToggleLeadPanel == null ? void 0 : onToggleLeadPanel();
1821
+ setMobilePanel(showLeadPanel ? "chat" : "lead");
1822
+ };
1823
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1824
+ "div",
1825
+ {
1826
+ className: cn("flex h-full overflow-hidden bg-background", className),
1827
+ children: [
1828
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1829
+ ConversationList,
1830
+ {
1831
+ conversations,
1832
+ activeId: activeConversationId,
1833
+ searchQuery,
1834
+ activeFilter,
1835
+ hasMore,
1836
+ isLoadingMore,
1837
+ onSearchChange,
1838
+ onFilterChange,
1839
+ onSelect: handleSelectConversation,
1840
+ onRead,
1841
+ onLoadMore,
1842
+ className: cn(
1843
+ "shrink-0 md:w-[320px]",
1844
+ // Mobile: full width, visible only on list panel
1845
+ mobilePanel === "list" ? "flex w-full md:flex" : "hidden md:flex"
1846
+ )
1847
+ }
1848
+ ),
1849
+ contact ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1850
+ ChatThread,
1851
+ {
1852
+ contact,
1853
+ status,
1854
+ mode,
1855
+ messages,
1856
+ isAiTyping,
1857
+ inputValue,
1858
+ onInputChange,
1859
+ onSend,
1860
+ onTakeOver,
1861
+ onLetAiHandle,
1862
+ onReopen,
1863
+ onMarkUrgent,
1864
+ onUnmarkUrgent,
1865
+ onArchive,
1866
+ onAssignToAdvisor,
1867
+ onBack: () => setMobilePanel("list"),
1868
+ onShowLeadInfo: () => setMobilePanel("lead"),
1869
+ className: cn(
1870
+ "min-w-0 flex-1 border-r border-border",
1871
+ mobilePanel === "chat" ? "flex flex-col md:flex" : "hidden md:flex"
1872
+ )
1873
+ }
1874
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1875
+ "div",
1876
+ {
1877
+ className: cn(
1878
+ "min-w-0 flex-1 items-center justify-center border-r border-border bg-muted/10",
1879
+ mobilePanel === "chat" ? "flex md:flex" : "hidden md:flex"
1880
+ ),
1881
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
1882
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.MessageSquare, { className: "size-10 opacity-30" }),
1883
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm", children: "Select a conversation" })
1884
+ ] })
1885
+ }
1886
+ ),
1887
+ contact && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1888
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1889
+ "div",
1890
+ {
1891
+ className: cn(
1892
+ // Mobile: full-width, instant show/hide based on mobilePanel
1893
+ mobilePanel === "lead" ? "flex w-full shrink-0 flex-col" : "hidden",
1894
+ // Desktop: always rendered, animate width open/close
1895
+ "md:block md:shrink-0 md:overflow-hidden md:transition-[width] md:duration-200 md:ease-in-out",
1896
+ showLeadPanel ? "md:w-[320px]" : "md:w-0"
1897
+ ),
1898
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1899
+ LeadInfoPanel,
1900
+ {
1901
+ contact,
1902
+ firstSeen: leadFirstSeen,
1903
+ source: leadSource,
1904
+ aiFields,
1905
+ appointment,
1906
+ internalNotes,
1907
+ notesSaveStatus,
1908
+ isKnownContact,
1909
+ onAddToContacts,
1910
+ onCreateOpportunity,
1911
+ onBookAppointment,
1912
+ onApproveAppointment,
1913
+ onDeclineAppointment,
1914
+ onRescheduleAppointment,
1915
+ onNotesChange,
1916
+ onToggleCollapse: handleToggleLeadPanel,
1917
+ onBack: () => setMobilePanel("chat"),
1918
+ className: "flex h-full w-full flex-col border-l border-border md:w-[320px]"
1919
+ }
1920
+ )
1921
+ }
1922
+ ),
1923
+ !showLeadPanel && onToggleLeadPanel && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "hidden shrink-0 items-start border-l border-border pt-[29px] md:flex", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Tooltip, { children: [
1924
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1925
+ TooltipTrigger,
1926
+ {
1927
+ render: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1928
+ Button,
1929
+ {
1930
+ variant: "ghost",
1931
+ size: "icon",
1932
+ className: "size-8",
1933
+ "aria-label": "Show lead info",
1934
+ onClick: handleToggleLeadPanel,
1935
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ChevronLeft, { className: "size-4" })
1936
+ }
1937
+ )
1938
+ }
1939
+ ),
1940
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipContent, { children: "Show lead info" })
1941
+ ] }) })
1942
+ ] })
1943
+ ]
1944
+ }
1945
+ ) });
1946
+ }
1947
+ function AiConvAssignAdvisorDialog({
1948
+ open,
1949
+ onOpenChange,
1950
+ advisors,
1951
+ value,
1952
+ onValueChange,
1953
+ onConfirm
1954
+ }) {
1955
+ const [search, setSearch] = (0, import_react3.useState)("");
1956
+ const [roleFilter, setRoleFilter] = (0, import_react3.useState)("");
1957
+ const roles = Array.from(
1958
+ new Set(advisors.map((a) => a.role).filter(Boolean))
1959
+ );
1960
+ const filtered = advisors.filter(
1961
+ (a) => a.name.toLowerCase().includes(search.toLowerCase()) && (!roleFilter || a.role === roleFilter)
1962
+ );
1963
+ const handleOpenChange = (v) => {
1964
+ onOpenChange(v);
1965
+ if (!v) {
1966
+ setSearch("");
1967
+ setRoleFilter("");
1968
+ }
1969
+ };
1970
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogContent, { align: "top", children: [
1971
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogHeader, { children: [
1972
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogTitle, { children: "Assign to advisor" }),
1973
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogDescription, { children: "Choose an advisor to handle this conversation." })
1974
+ ] }),
1975
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-0", children: [
1976
+ roles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1977
+ ToggleGroup,
1978
+ {
1979
+ type: "single",
1980
+ variant: "outline",
1981
+ spacing: 1.5,
1982
+ size: "sm",
1983
+ value: roleFilter ? [roleFilter] : ["__all__"],
1984
+ onValueChange: (values) => {
1985
+ const v = values[0];
1986
+ setRoleFilter(!v || v === "__all__" ? "" : v);
1987
+ },
1988
+ children: [
1989
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ToggleGroupItem, { value: "__all__", children: "All" }),
1990
+ roles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ToggleGroupItem, { value: role, children: role }, role))
1991
+ ]
1992
+ }
1993
+ ) }),
1994
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-2 border border-input px-3", children: [
1995
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Search, { className: "size-4 shrink-0 text-muted-foreground" }),
1996
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1997
+ "input",
1998
+ {
1999
+ type: "text",
2000
+ placeholder: "Search advisors...",
2001
+ value: search,
2002
+ onChange: (e) => setSearch(e.target.value),
2003
+ className: "h-9 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"
2004
+ }
2005
+ )
2006
+ ] }),
2007
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "max-h-52 overflow-y-auto border border-t-0 border-input", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "py-6 text-center text-sm text-muted-foreground", children: "No advisors found." }) : filtered.map((advisor) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2008
+ "button",
2009
+ {
2010
+ type: "button",
2011
+ onClick: () => onValueChange(advisor.id),
2012
+ className: cn(
2013
+ "flex w-full items-center gap-3 px-3 py-2.5 text-left text-sm transition-colors hover:bg-muted",
2014
+ value === advisor.id && "bg-muted font-medium"
2015
+ ),
2016
+ children: [
2017
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Avatar, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AvatarFallback, { className: "font-semibold", children: advisor.initials }) }),
2018
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0 flex-1", children: [
2019
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "truncate text-sm", children: advisor.name }),
2020
+ advisor.role && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "truncate text-xs text-muted-foreground", children: advisor.role })
2021
+ ] })
2022
+ ]
2023
+ },
2024
+ advisor.id
2025
+ )) })
2026
+ ] }),
2027
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogFooter, { children: [
2028
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
2029
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Button, { onClick: onConfirm, children: "Assign" })
2030
+ ] })
2031
+ ] }) });
2032
+ }
2033
+ // Annotate the CommonJS export names for ESM import in node:
2034
+ 0 && (module.exports = {
2035
+ AICollectedDataSection,
2036
+ AiConvAssignAdvisorDialog,
2037
+ ChatBubble,
2038
+ ChatComposer,
2039
+ ChatThread,
2040
+ ConversationList,
2041
+ ConversationListItem,
2042
+ ConversationStatusChip,
2043
+ ConversationsPage,
2044
+ LeadInfoPanel
2045
+ });