@erpsquad/common 1.0.1-ace → 1.0.2-ace

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 (1917) hide show
  1. package/dist/chunks/ChartLegends-B3ZavmNq.js +29 -0
  2. package/dist/chunks/ChartLegends-B3ZavmNq.js.map +1 -0
  3. package/dist/chunks/ChartLegends-DfQTy8qm.esm.js +30 -0
  4. package/dist/chunks/ChartLegends-DfQTy8qm.esm.js.map +1 -0
  5. package/dist/chunks/DynamicDependentField-CGYENAo2.js +127 -0
  6. package/dist/chunks/DynamicDependentField-CGYENAo2.js.map +1 -0
  7. package/dist/chunks/DynamicDependentField-CZfVs9mB.esm.js +128 -0
  8. package/dist/chunks/DynamicDependentField-CZfVs9mB.esm.js.map +1 -0
  9. package/dist/chunks/ERPUIProvider-B5uvFcf5.js +129 -0
  10. package/dist/chunks/ERPUIProvider-B5uvFcf5.js.map +1 -0
  11. package/dist/chunks/ERPUIProvider-BY5k9b5j.esm.js +130 -0
  12. package/dist/chunks/ERPUIProvider-BY5k9b5j.esm.js.map +1 -0
  13. package/dist/chunks/FORMS-DPTYabue.esm.js +296 -0
  14. package/dist/chunks/FORMS-DPTYabue.esm.js.map +1 -0
  15. package/dist/chunks/FORMS-XKSUw2I6.js +295 -0
  16. package/dist/chunks/FORMS-XKSUw2I6.js.map +1 -0
  17. package/dist/chunks/FlexibleReduxExample-DrUB37ea.js +148 -0
  18. package/dist/chunks/FlexibleReduxExample-DrUB37ea.js.map +1 -0
  19. package/dist/chunks/FlexibleReduxExample-lGv9ibOy.esm.js +149 -0
  20. package/dist/chunks/FlexibleReduxExample-lGv9ibOy.esm.js.map +1 -0
  21. package/dist/chunks/SectionFlowEditor-0tHH8U1a.js +5478 -0
  22. package/dist/chunks/SectionFlowEditor-0tHH8U1a.js.map +1 -0
  23. package/dist/chunks/SectionFlowEditor-tTzRXwQ-.esm.js +5479 -0
  24. package/dist/chunks/SectionFlowEditor-tTzRXwQ-.esm.js.map +1 -0
  25. package/dist/chunks/Tooltip-CoWi3TuR.esm.js +31 -0
  26. package/dist/chunks/Tooltip-CoWi3TuR.esm.js.map +1 -0
  27. package/dist/chunks/Tooltip-DCKpAGEC.js +30 -0
  28. package/dist/chunks/Tooltip-DCKpAGEC.js.map +1 -0
  29. package/dist/chunks/accordion-ByS702Az.esm.js +58 -0
  30. package/dist/chunks/accordion-ByS702Az.esm.js.map +1 -0
  31. package/dist/chunks/accordion-CykOYQc4.js +57 -0
  32. package/dist/chunks/accordion-CykOYQc4.js.map +1 -0
  33. package/dist/chunks/action-bar--BYwr3QD.esm.js +660 -0
  34. package/dist/chunks/action-bar--BYwr3QD.esm.js.map +1 -0
  35. package/dist/chunks/action-bar-wQbOWjHY.js +659 -0
  36. package/dist/chunks/action-bar-wQbOWjHY.js.map +1 -0
  37. package/dist/chunks/activity-log-AZy1JEXF.esm.js +103 -0
  38. package/dist/chunks/activity-log-AZy1JEXF.esm.js.map +1 -0
  39. package/dist/chunks/activity-log-BSaJvZIE.js +102 -0
  40. package/dist/chunks/activity-log-BSaJvZIE.js.map +1 -0
  41. package/dist/chunks/activity-tag-BQf6RKW0.esm.js +152 -0
  42. package/dist/chunks/activity-tag-BQf6RKW0.esm.js.map +1 -0
  43. package/dist/chunks/activity-tag-BeEU2x-h.js +151 -0
  44. package/dist/chunks/activity-tag-BeEU2x-h.js.map +1 -0
  45. package/dist/chunks/activityArea-Bk8-8NwF.js +18 -0
  46. package/dist/chunks/activityArea-Bk8-8NwF.js.map +1 -0
  47. package/dist/chunks/activityArea-DyHjgYYq.esm.js +19 -0
  48. package/dist/chunks/activityArea-DyHjgYYq.esm.js.map +1 -0
  49. package/dist/chunks/add-filter-CG2LP2Km.js +34 -0
  50. package/dist/chunks/add-filter-CG2LP2Km.js.map +1 -0
  51. package/dist/chunks/add-filter-CwNYwVzm.esm.js +35 -0
  52. package/dist/chunks/add-filter-CwNYwVzm.esm.js.map +1 -0
  53. package/dist/chunks/add-group-B6zqvdRw.js +34 -0
  54. package/dist/chunks/add-group-B6zqvdRw.js.map +1 -0
  55. package/dist/chunks/add-group-Cd_cNtFf.esm.js +35 -0
  56. package/dist/chunks/add-group-Cd_cNtFf.esm.js.map +1 -0
  57. package/dist/chunks/add-page-AV4qGd-N.js +76 -0
  58. package/dist/chunks/add-page-AV4qGd-N.js.map +1 -0
  59. package/dist/chunks/add-page-D2pO9ss_.esm.js +77 -0
  60. package/dist/chunks/add-page-D2pO9ss_.esm.js.map +1 -0
  61. package/dist/chunks/add-page-modal-DPctsgAE.js +83 -0
  62. package/dist/chunks/add-page-modal-DPctsgAE.js.map +1 -0
  63. package/dist/chunks/add-page-modal-Dl1YKjui.esm.js +84 -0
  64. package/dist/chunks/add-page-modal-Dl1YKjui.esm.js.map +1 -0
  65. package/dist/chunks/add-template-C8H0KW-B.esm.js +11 -0
  66. package/dist/chunks/add-template-C8H0KW-B.esm.js.map +1 -0
  67. package/dist/chunks/add-template-UKvB_zHX.js +10 -0
  68. package/dist/chunks/add-template-UKvB_zHX.js.map +1 -0
  69. package/dist/chunks/address-modal-D5hEBL8A.esm.js +664 -0
  70. package/dist/chunks/address-modal-D5hEBL8A.esm.js.map +1 -0
  71. package/dist/chunks/address-modal-Dc-oQrde.js +680 -0
  72. package/dist/chunks/address-modal-Dc-oQrde.js.map +1 -0
  73. package/dist/chunks/ai-disclaimer-4Pudkx86.js +18 -0
  74. package/dist/chunks/ai-disclaimer-4Pudkx86.js.map +1 -0
  75. package/dist/chunks/ai-disclaimer-CjHBJMIK.esm.js +19 -0
  76. package/dist/chunks/ai-disclaimer-CjHBJMIK.esm.js.map +1 -0
  77. package/dist/chunks/ai-summary-BiNTWM0k.js +350 -0
  78. package/dist/chunks/ai-summary-BiNTWM0k.js.map +1 -0
  79. package/dist/chunks/ai-summary-DBZflwel.esm.js +351 -0
  80. package/dist/chunks/ai-summary-DBZflwel.esm.js.map +1 -0
  81. package/dist/chunks/appbar-DEam2CZ3.esm.js +58 -0
  82. package/dist/chunks/appbar-DEam2CZ3.esm.js.map +1 -0
  83. package/dist/chunks/appbar-DbyOjrNG.js +57 -0
  84. package/dist/chunks/appbar-DbyOjrNG.js.map +1 -0
  85. package/dist/chunks/approval-wrapper-BBKogMfX.esm.js +140 -0
  86. package/dist/chunks/approval-wrapper-BBKogMfX.esm.js.map +1 -0
  87. package/dist/chunks/approval-wrapper-Ba5ud8Yd.js +139 -0
  88. package/dist/chunks/approval-wrapper-Ba5ud8Yd.js.map +1 -0
  89. package/dist/chunks/areaLinerChart-BSSqBXPb.js +120 -0
  90. package/dist/chunks/areaLinerChart-BSSqBXPb.js.map +1 -0
  91. package/dist/chunks/areaLinerChart-DAEVpbeF.esm.js +104 -0
  92. package/dist/chunks/areaLinerChart-DAEVpbeF.esm.js.map +1 -0
  93. package/dist/chunks/bar-chart-CAhpFTr-.js.map +1 -1
  94. package/dist/chunks/bar-chart-xSd3NeHn.esm.js.map +1 -1
  95. package/dist/chunks/brand-add-modal-BGQ5OYfv.js +108 -0
  96. package/dist/chunks/brand-add-modal-BGQ5OYfv.js.map +1 -0
  97. package/dist/chunks/brand-add-modal-CsEuqSpM.esm.js +92 -0
  98. package/dist/chunks/brand-add-modal-CsEuqSpM.esm.js.map +1 -0
  99. package/dist/chunks/button-BtAJuVqz.js +19 -0
  100. package/dist/chunks/button-BtAJuVqz.js.map +1 -0
  101. package/dist/chunks/button-CI6cNGQP.js +72 -0
  102. package/dist/chunks/button-CI6cNGQP.js.map +1 -0
  103. package/dist/chunks/button-D89ApPdL.esm.js +20 -0
  104. package/dist/chunks/button-D89ApPdL.esm.js.map +1 -0
  105. package/dist/chunks/button-f2diiJ77.esm.js +73 -0
  106. package/dist/chunks/button-f2diiJ77.esm.js.map +1 -0
  107. package/dist/chunks/calculation-summary-S5QdT9nB.esm.js +182 -0
  108. package/dist/chunks/calculation-summary-S5QdT9nB.esm.js.map +1 -0
  109. package/dist/chunks/calculation-summary-hcXsymY2.js +181 -0
  110. package/dist/chunks/calculation-summary-hcXsymY2.js.map +1 -0
  111. package/dist/chunks/category-add-modal-C6d9qcWl.js +140 -0
  112. package/dist/chunks/category-add-modal-C6d9qcWl.js.map +1 -0
  113. package/dist/chunks/category-add-modal-Cc8DxpzB.esm.js +124 -0
  114. package/dist/chunks/category-add-modal-Cc8DxpzB.esm.js.map +1 -0
  115. package/dist/chunks/change-password-BTX6X1MS.js +198 -0
  116. package/dist/chunks/change-password-BTX6X1MS.js.map +1 -0
  117. package/dist/chunks/change-password-D1iyn_K1.esm.js +182 -0
  118. package/dist/chunks/change-password-D1iyn_K1.esm.js.map +1 -0
  119. package/dist/chunks/change-user-password-modal-DMva9KxB.js +135 -0
  120. package/dist/chunks/change-user-password-modal-DMva9KxB.js.map +1 -0
  121. package/dist/chunks/change-user-password-modal-D_nyIjjl.esm.js +119 -0
  122. package/dist/chunks/change-user-password-modal-D_nyIjjl.esm.js.map +1 -0
  123. package/dist/chunks/chat-bot-sXDebuP2.esm.js +3547 -0
  124. package/dist/chunks/chat-bot-sXDebuP2.esm.js.map +1 -0
  125. package/dist/chunks/chat-bot-xy9T4Jt4.js +3546 -0
  126. package/dist/chunks/chat-bot-xy9T4Jt4.js.map +1 -0
  127. package/dist/chunks/chip-BwecFSjE.esm.js +89 -0
  128. package/dist/chunks/chip-BwecFSjE.esm.js.map +1 -0
  129. package/dist/chunks/chip-CXTL57eK.js +88 -0
  130. package/dist/chunks/chip-CXTL57eK.js.map +1 -0
  131. package/dist/chunks/chip-generator-D4Bm-4HK.esm.js +320 -0
  132. package/dist/chunks/chip-generator-D4Bm-4HK.esm.js.map +1 -0
  133. package/dist/chunks/chip-generator-DX_FFKqi.js +319 -0
  134. package/dist/chunks/chip-generator-DX_FFKqi.js.map +1 -0
  135. package/dist/chunks/chip-or-placeholder-C7wvOb-o.esm.js +25 -0
  136. package/dist/chunks/chip-or-placeholder-C7wvOb-o.esm.js.map +1 -0
  137. package/dist/chunks/chip-or-placeholder-CHWlDWBU.js +39 -0
  138. package/dist/chunks/chip-or-placeholder-CHWlDWBU.js.map +1 -0
  139. package/dist/chunks/chip-or-placeholder-DcKG1oF7.js +24 -0
  140. package/dist/chunks/chip-or-placeholder-DcKG1oF7.js.map +1 -0
  141. package/dist/chunks/chip-or-placeholder-X8ZhVrlj.esm.js +40 -0
  142. package/dist/chunks/chip-or-placeholder-X8ZhVrlj.esm.js.map +1 -0
  143. package/dist/chunks/column-width-C7-lFvRH.js +87 -0
  144. package/dist/chunks/column-width-C7-lFvRH.js.map +1 -0
  145. package/dist/chunks/column-width-D0z-uLsT.esm.js +88 -0
  146. package/dist/chunks/column-width-D0z-uLsT.esm.js.map +1 -0
  147. package/dist/chunks/combinator-select-CpP0xemW.esm.js +31 -0
  148. package/dist/chunks/combinator-select-CpP0xemW.esm.js.map +1 -0
  149. package/dist/chunks/combinator-select-DwmyfH56.js +30 -0
  150. package/dist/chunks/combinator-select-DwmyfH56.js.map +1 -0
  151. package/dist/chunks/common-utility-Bf3Bl68o.esm.js +299 -0
  152. package/dist/chunks/common-utility-Bf3Bl68o.esm.js.map +1 -0
  153. package/dist/chunks/common-utility-DxcYokAb.js +298 -0
  154. package/dist/chunks/common-utility-DxcYokAb.js.map +1 -0
  155. package/dist/chunks/company-selection-modal-BQ0IzQj2.esm.js +83 -0
  156. package/dist/chunks/company-selection-modal-BQ0IzQj2.esm.js.map +1 -0
  157. package/dist/chunks/company-selection-modal-DpGHEs6f.js +82 -0
  158. package/dist/chunks/company-selection-modal-DpGHEs6f.js.map +1 -0
  159. package/dist/chunks/confirm-modal-BFnZJyXB.esm.js +83 -0
  160. package/dist/chunks/confirm-modal-BFnZJyXB.esm.js.map +1 -0
  161. package/dist/chunks/confirm-modal-DZ6x3OoV.js +82 -0
  162. package/dist/chunks/confirm-modal-DZ6x3OoV.js.map +1 -0
  163. package/dist/chunks/contact-modal-B2yXUvSG.js +205 -0
  164. package/dist/chunks/contact-modal-B2yXUvSG.js.map +1 -0
  165. package/dist/chunks/contact-modal-CUL96bJO.esm.js +189 -0
  166. package/dist/chunks/contact-modal-CUL96bJO.esm.js.map +1 -0
  167. package/dist/chunks/controller-select-CMfDlRXJ.js +162 -0
  168. package/dist/chunks/controller-select-CMfDlRXJ.js.map +1 -0
  169. package/dist/chunks/controller-select-DE9i-MpU.esm.js +163 -0
  170. package/dist/chunks/controller-select-DE9i-MpU.esm.js.map +1 -0
  171. package/dist/chunks/country-select-CWDScHP8.js +68 -0
  172. package/dist/chunks/country-select-CWDScHP8.js.map +1 -0
  173. package/dist/chunks/country-select-zdLEE3il.esm.js +69 -0
  174. package/dist/chunks/country-select-zdLEE3il.esm.js.map +1 -0
  175. package/dist/chunks/custom-date-picker-C4pUQOo3.esm.js +56 -0
  176. package/dist/chunks/custom-date-picker-C4pUQOo3.esm.js.map +1 -0
  177. package/dist/chunks/custom-date-picker-Y8Gbm1QH.js +55 -0
  178. package/dist/chunks/custom-date-picker-Y8Gbm1QH.js.map +1 -0
  179. package/dist/chunks/custom-form-DNEGYxgZ.js +1145 -0
  180. package/dist/chunks/custom-form-DNEGYxgZ.js.map +1 -0
  181. package/dist/chunks/custom-form-DtZTIRz-.esm.js +1146 -0
  182. package/dist/chunks/custom-form-DtZTIRz-.esm.js.map +1 -0
  183. package/dist/chunks/custom-grid-card-CvXYdQt1.esm.js +127 -0
  184. package/dist/chunks/custom-grid-card-CvXYdQt1.esm.js.map +1 -0
  185. package/dist/chunks/custom-grid-card-D92tDY8e.js +126 -0
  186. package/dist/chunks/custom-grid-card-D92tDY8e.js.map +1 -0
  187. package/dist/chunks/custom-snackbar-B90vDQjz.js +114 -0
  188. package/dist/chunks/custom-snackbar-B90vDQjz.js.map +1 -0
  189. package/dist/chunks/custom-snackbar-CpZuHpNb.esm.js +115 -0
  190. package/dist/chunks/custom-snackbar-CpZuHpNb.esm.js.map +1 -0
  191. package/dist/chunks/custom-toggle-switch-BUmTux3W.js +117 -0
  192. package/dist/chunks/custom-toggle-switch-BUmTux3W.js.map +1 -0
  193. package/dist/chunks/custom-toggle-switch-Bs_JRdC6.esm.js +118 -0
  194. package/dist/chunks/custom-toggle-switch-Bs_JRdC6.esm.js.map +1 -0
  195. package/dist/chunks/dashboard-Cggk8pYJ.esm.js +75 -0
  196. package/dist/chunks/dashboard-Cggk8pYJ.esm.js.map +1 -0
  197. package/dist/chunks/dashboard-CjdQdUjK.js +74 -0
  198. package/dist/chunks/dashboard-CjdQdUjK.js.map +1 -0
  199. package/dist/chunks/dashboard-card-CcDZ9m-h.js +16 -0
  200. package/dist/chunks/dashboard-card-CcDZ9m-h.js.map +1 -0
  201. package/dist/chunks/dashboard-card-WbHvPS6T.esm.js +17 -0
  202. package/dist/chunks/dashboard-card-WbHvPS6T.esm.js.map +1 -0
  203. package/dist/chunks/dashboard-header-BCWJ0KJJ.esm.js +67 -0
  204. package/dist/chunks/dashboard-header-BCWJ0KJJ.esm.js.map +1 -0
  205. package/dist/chunks/dashboard-header-CbCfWzL0.js +66 -0
  206. package/dist/chunks/dashboard-header-CbCfWzL0.js.map +1 -0
  207. package/dist/chunks/date-B8_QC3c1.esm.js +56 -0
  208. package/dist/chunks/date-B8_QC3c1.esm.js.map +1 -0
  209. package/dist/chunks/date-DS6maLHV.js +55 -0
  210. package/dist/chunks/date-DS6maLHV.js.map +1 -0
  211. package/dist/chunks/date-picker-BpyXaxie.js +140 -0
  212. package/dist/chunks/date-picker-BpyXaxie.js.map +1 -0
  213. package/dist/chunks/date-picker-CqwpkpIn.esm.js +141 -0
  214. package/dist/chunks/date-picker-CqwpkpIn.esm.js.map +1 -0
  215. package/dist/chunks/date-time-DXBBF30I.js +54 -0
  216. package/dist/chunks/date-time-DXBBF30I.js.map +1 -0
  217. package/dist/chunks/date-time-LCjCAenY.esm.js +55 -0
  218. package/dist/chunks/date-time-LCjCAenY.esm.js.map +1 -0
  219. package/dist/chunks/date-time-picker-BH9764sg.js +127 -0
  220. package/dist/chunks/date-time-picker-BH9764sg.js.map +1 -0
  221. package/dist/chunks/date-time-picker-CdSo4Jnu.esm.js +128 -0
  222. package/dist/chunks/date-time-picker-CdSo4Jnu.esm.js.map +1 -0
  223. package/dist/chunks/delete-group-DhjcNgNF.js +27 -0
  224. package/dist/chunks/delete-group-DhjcNgNF.js.map +1 -0
  225. package/dist/chunks/delete-group-lMI9ok86.esm.js +28 -0
  226. package/dist/chunks/delete-group-lMI9ok86.esm.js.map +1 -0
  227. package/dist/chunks/detail-drawer-C0oCMMUk.esm.js +259 -0
  228. package/dist/chunks/detail-drawer-C0oCMMUk.esm.js.map +1 -0
  229. package/dist/chunks/detail-drawer-CTHVP9KK.js +258 -0
  230. package/dist/chunks/detail-drawer-CTHVP9KK.js.map +1 -0
  231. package/dist/chunks/discount-summary-CaACDoO0.esm.js +60 -0
  232. package/dist/chunks/discount-summary-CaACDoO0.esm.js.map +1 -0
  233. package/dist/chunks/discount-summary-DSvcEN5X.js +59 -0
  234. package/dist/chunks/discount-summary-DSvcEN5X.js.map +1 -0
  235. package/dist/chunks/document-preview-CEn4q77X.js +143 -0
  236. package/dist/chunks/document-preview-CEn4q77X.js.map +1 -0
  237. package/dist/chunks/document-preview-vJQ_vqgA.esm.js +144 -0
  238. package/dist/chunks/document-preview-vJQ_vqgA.esm.js.map +1 -0
  239. package/dist/chunks/donut-chart-CxQJHsJy.js +123 -0
  240. package/dist/chunks/donut-chart-CxQJHsJy.js.map +1 -0
  241. package/dist/chunks/donut-chart-D4Ixxqkm.esm.js +107 -0
  242. package/dist/chunks/donut-chart-D4Ixxqkm.esm.js.map +1 -0
  243. package/dist/chunks/dropdown-button-B8O5QLfL.js +162 -0
  244. package/dist/chunks/dropdown-button-B8O5QLfL.js.map +1 -0
  245. package/dist/chunks/dropdown-button-D5UzFXsS.esm.js +146 -0
  246. package/dist/chunks/dropdown-button-D5UzFXsS.esm.js.map +1 -0
  247. package/dist/chunks/dynamic-layout-wrapper-Du2a-Ojn.esm.js +229 -0
  248. package/dist/chunks/dynamic-layout-wrapper-Du2a-Ojn.esm.js.map +1 -0
  249. package/dist/chunks/dynamic-layout-wrapper-ZruLvupY.js +228 -0
  250. package/dist/chunks/dynamic-layout-wrapper-ZruLvupY.js.map +1 -0
  251. package/dist/chunks/dynamic-modal-CcpPekjs.js +77 -0
  252. package/dist/chunks/dynamic-modal-CcpPekjs.js.map +1 -0
  253. package/dist/chunks/dynamic-modal-CrPfucEZ.esm.js +78 -0
  254. package/dist/chunks/dynamic-modal-CrPfucEZ.esm.js.map +1 -0
  255. package/dist/chunks/dynamic-report-CwAXPnEQ.js +588 -0
  256. package/dist/chunks/dynamic-report-CwAXPnEQ.js.map +1 -0
  257. package/dist/chunks/dynamic-report-DMdraVJj.esm.js +589 -0
  258. package/dist/chunks/dynamic-report-DMdraVJj.esm.js.map +1 -0
  259. package/dist/chunks/dynamic-rows-D6Aeto4g.esm.js +257 -0
  260. package/dist/chunks/dynamic-rows-D6Aeto4g.esm.js.map +1 -0
  261. package/dist/chunks/dynamic-rows-DsAaBmlI.js +256 -0
  262. package/dist/chunks/dynamic-rows-DsAaBmlI.js.map +1 -0
  263. package/dist/chunks/dynamic-tags-input-Cge5cpvg.esm.js +77 -0
  264. package/dist/chunks/dynamic-tags-input-Cge5cpvg.esm.js.map +1 -0
  265. package/dist/chunks/dynamic-tags-input-DUlwuzAD.js +76 -0
  266. package/dist/chunks/dynamic-tags-input-DUlwuzAD.js.map +1 -0
  267. package/dist/chunks/edit-section-modal-C77jXksP.js +76 -0
  268. package/dist/chunks/edit-section-modal-C77jXksP.js.map +1 -0
  269. package/dist/chunks/edit-section-modal-CLKM84CA.esm.js +77 -0
  270. package/dist/chunks/edit-section-modal-CLKM84CA.esm.js.map +1 -0
  271. package/dist/chunks/element-controller-CxGxguJe.js +85 -0
  272. package/dist/chunks/element-controller-CxGxguJe.js.map +1 -0
  273. package/dist/chunks/element-controller-DIKpYzPx.esm.js +86 -0
  274. package/dist/chunks/element-controller-DIKpYzPx.esm.js.map +1 -0
  275. package/dist/chunks/ellipsis-cell-48gwObsi.esm.js +55 -0
  276. package/dist/chunks/ellipsis-cell-48gwObsi.esm.js.map +1 -0
  277. package/dist/chunks/ellipsis-cell-DSvF8Oc0.js +54 -0
  278. package/dist/chunks/ellipsis-cell-DSvF8Oc0.js.map +1 -0
  279. package/dist/chunks/entity-view-wrapper--_4hE8JY.esm.js +48 -0
  280. package/dist/chunks/entity-view-wrapper--_4hE8JY.esm.js.map +1 -0
  281. package/dist/chunks/entity-view-wrapper-xTxtokUV.js +47 -0
  282. package/dist/chunks/entity-view-wrapper-xTxtokUV.js.map +1 -0
  283. package/dist/chunks/erp-loader-BIvaNYcf.esm.js +15 -0
  284. package/dist/chunks/erp-loader-BIvaNYcf.esm.js.map +1 -0
  285. package/dist/chunks/erp-loader-ID0aVi-B.js +14 -0
  286. package/dist/chunks/erp-loader-ID0aVi-B.js.map +1 -0
  287. package/dist/chunks/expandable-summary-wrapper-B-ZTHCIv.esm.js +242 -0
  288. package/dist/chunks/expandable-summary-wrapper-B-ZTHCIv.esm.js.map +1 -0
  289. package/dist/chunks/expandable-summary-wrapper-D20VOx0y.js +241 -0
  290. package/dist/chunks/expandable-summary-wrapper-D20VOx0y.js.map +1 -0
  291. package/dist/chunks/field-select-10EXabtx.js +65 -0
  292. package/dist/chunks/field-select-10EXabtx.js.map +1 -0
  293. package/dist/chunks/field-select-BwSHuUFx.esm.js +66 -0
  294. package/dist/chunks/field-select-BwSHuUFx.esm.js.map +1 -0
  295. package/dist/chunks/file-confirmation-BewmfobO.js +33 -0
  296. package/dist/chunks/file-confirmation-BewmfobO.js.map +1 -0
  297. package/dist/chunks/file-confirmation-Bvxw6z06.esm.js +37 -0
  298. package/dist/chunks/file-confirmation-Bvxw6z06.esm.js.map +1 -0
  299. package/dist/chunks/file-confirmation-CItC08g8.js +36 -0
  300. package/dist/chunks/file-confirmation-CItC08g8.js.map +1 -0
  301. package/dist/chunks/file-confirmation-CpuoUfVk.esm.js +34 -0
  302. package/dist/chunks/file-confirmation-CpuoUfVk.esm.js.map +1 -0
  303. package/dist/chunks/filter-C0Q4m9qz.esm.js +415 -0
  304. package/dist/chunks/filter-C0Q4m9qz.esm.js.map +1 -0
  305. package/dist/chunks/filter-CE94nkSs.js +414 -0
  306. package/dist/chunks/filter-CE94nkSs.js.map +1 -0
  307. package/dist/chunks/footer-BhcC7km8.js +63 -0
  308. package/dist/chunks/footer-BhcC7km8.js.map +1 -0
  309. package/dist/chunks/footer-DdG_igd-.esm.js +64 -0
  310. package/dist/chunks/footer-DdG_igd-.esm.js.map +1 -0
  311. package/dist/chunks/forgot-password-CtNDX6G_.esm.js +177 -0
  312. package/dist/chunks/forgot-password-CtNDX6G_.esm.js.map +1 -0
  313. package/dist/chunks/forgot-password-XYdT5_8l.js +193 -0
  314. package/dist/chunks/forgot-password-XYdT5_8l.js.map +1 -0
  315. package/dist/chunks/form-fields-BFPSImVD.js +354 -0
  316. package/dist/chunks/form-fields-BFPSImVD.js.map +1 -0
  317. package/dist/chunks/form-fields-CA5RcavI.esm.js +355 -0
  318. package/dist/chunks/form-fields-CA5RcavI.esm.js.map +1 -0
  319. package/dist/chunks/form-loader-BPTUoWe6.esm.js +27 -0
  320. package/dist/chunks/form-loader-BPTUoWe6.esm.js.map +1 -0
  321. package/dist/chunks/form-loader-Dd7kk3wF.js +26 -0
  322. package/dist/chunks/form-loader-Dd7kk3wF.js.map +1 -0
  323. package/dist/chunks/form-parser-BaQ8BAAA.js +607 -0
  324. package/dist/chunks/form-parser-BaQ8BAAA.js.map +1 -0
  325. package/dist/chunks/form-parser-DbS3uWAl.esm.js +591 -0
  326. package/dist/chunks/form-parser-DbS3uWAl.esm.js.map +1 -0
  327. package/dist/chunks/form-section-B92VXkma.js +475 -0
  328. package/dist/chunks/form-section-B92VXkma.js.map +1 -0
  329. package/dist/chunks/form-section-hwCbIyfx.esm.js +476 -0
  330. package/dist/chunks/form-section-hwCbIyfx.esm.js.map +1 -0
  331. package/dist/chunks/form-switcher-BGU3lnIC.js +61 -0
  332. package/dist/chunks/form-switcher-BGU3lnIC.js.map +1 -0
  333. package/dist/chunks/form-switcher-DHmceAHD.esm.js +62 -0
  334. package/dist/chunks/form-switcher-DHmceAHD.esm.js.map +1 -0
  335. package/dist/chunks/fullScreen-BYUTnjo0.esm.js +21 -0
  336. package/dist/chunks/fullScreen-BYUTnjo0.esm.js.map +1 -0
  337. package/dist/chunks/fullScreen-HQ3WaBfM.js +20 -0
  338. package/dist/chunks/fullScreen-HQ3WaBfM.js.map +1 -0
  339. package/dist/chunks/global-search-CHxa0fWf.esm.js +150 -0
  340. package/dist/chunks/global-search-CHxa0fWf.esm.js.map +1 -0
  341. package/dist/chunks/global-search-yBeZRsV-.js +149 -0
  342. package/dist/chunks/global-search-yBeZRsV-.js.map +1 -0
  343. package/dist/chunks/grid-card-BchR4Nfu.js +100 -0
  344. package/dist/chunks/grid-card-BchR4Nfu.js.map +1 -0
  345. package/dist/chunks/grid-card-CaMxxP-Z.esm.js +101 -0
  346. package/dist/chunks/grid-card-CaMxxP-Z.esm.js.map +1 -0
  347. package/dist/chunks/grid-view-CXxQ3SZm.js +51 -0
  348. package/dist/chunks/grid-view-CXxQ3SZm.js.map +1 -0
  349. package/dist/chunks/grid-view-DiftUAUv.esm.js +52 -0
  350. package/dist/chunks/grid-view-DiftUAUv.esm.js.map +1 -0
  351. package/dist/chunks/grid-wrapper-DWJPYWa5.js +16 -0
  352. package/dist/chunks/grid-wrapper-DWJPYWa5.js.map +1 -0
  353. package/dist/chunks/grid-wrapper-DYBremQx.esm.js +17 -0
  354. package/dist/chunks/grid-wrapper-DYBremQx.esm.js.map +1 -0
  355. package/dist/chunks/header-BN5hwus3.js +90 -0
  356. package/dist/chunks/header-BN5hwus3.js.map +1 -0
  357. package/dist/chunks/header-D9TfP6lT.esm.js +91 -0
  358. package/dist/chunks/header-D9TfP6lT.esm.js.map +1 -0
  359. package/dist/chunks/header-enhanced-CeeCynVk.js +400 -0
  360. package/dist/chunks/header-enhanced-CeeCynVk.js.map +1 -0
  361. package/dist/chunks/header-enhanced-hs6nzRFL.esm.js +401 -0
  362. package/dist/chunks/header-enhanced-hs6nzRFL.esm.js.map +1 -0
  363. package/dist/chunks/industry-add-modal-M2TnYeDQ.esm.js +110 -0
  364. package/dist/chunks/industry-add-modal-M2TnYeDQ.esm.js.map +1 -0
  365. package/dist/chunks/industry-add-modal-j_av7SeT.js +126 -0
  366. package/dist/chunks/industry-add-modal-j_av7SeT.js.map +1 -0
  367. package/dist/chunks/inline-edit-fields-C4Hyyaf-.js +340 -0
  368. package/dist/chunks/inline-edit-fields-C4Hyyaf-.js.map +1 -0
  369. package/dist/chunks/inline-edit-fields-CuhoOJ8W.esm.js +324 -0
  370. package/dist/chunks/inline-edit-fields-CuhoOJ8W.esm.js.map +1 -0
  371. package/dist/chunks/inventory-reports-title-bar-CisZqAXt.js +734 -0
  372. package/dist/chunks/inventory-reports-title-bar-CisZqAXt.js.map +1 -0
  373. package/dist/chunks/inventory-reports-title-bar-DBfoc4ms.esm.js +735 -0
  374. package/dist/chunks/inventory-reports-title-bar-DBfoc4ms.esm.js.map +1 -0
  375. package/dist/chunks/item-response-details-BEkFa2o4.esm.js +79 -0
  376. package/dist/chunks/item-response-details-BEkFa2o4.esm.js.map +1 -0
  377. package/dist/chunks/item-response-details-BWJCChxB.js +78 -0
  378. package/dist/chunks/item-response-details-BWJCChxB.js.map +1 -0
  379. package/dist/chunks/items-summary-BN-6qoxr.js +36 -0
  380. package/dist/chunks/items-summary-BN-6qoxr.js.map +1 -0
  381. package/dist/chunks/items-summary-D8puLoVg.esm.js +37 -0
  382. package/dist/chunks/items-summary-D8puLoVg.esm.js.map +1 -0
  383. package/dist/chunks/journal-type-add-modal-BcG9z5_3.esm.js +112 -0
  384. package/dist/chunks/journal-type-add-modal-BcG9z5_3.esm.js.map +1 -0
  385. package/dist/chunks/journal-type-add-modal-CjLMI4Ew.js +128 -0
  386. package/dist/chunks/journal-type-add-modal-CjLMI4Ew.js.map +1 -0
  387. package/dist/chunks/listing-Dh2cgJiV.js +275 -0
  388. package/dist/chunks/listing-Dh2cgJiV.js.map +1 -0
  389. package/dist/chunks/listing-j8fVJvYu.esm.js +276 -0
  390. package/dist/chunks/listing-j8fVJvYu.esm.js.map +1 -0
  391. package/dist/chunks/location-select-8lwOrgVY.js +85 -0
  392. package/dist/chunks/location-select-8lwOrgVY.js.map +1 -0
  393. package/dist/chunks/location-select-g8GNRizB.esm.js +86 -0
  394. package/dist/chunks/location-select-g8GNRizB.esm.js.map +1 -0
  395. package/dist/chunks/material-editable-table-DLRqiEPP.js +1491 -0
  396. package/dist/chunks/material-editable-table-DLRqiEPP.js.map +1 -0
  397. package/dist/chunks/material-editable-table-M7hWjx9k.esm.js +1475 -0
  398. package/dist/chunks/material-editable-table-M7hWjx9k.esm.js.map +1 -0
  399. package/dist/chunks/media-BRSTn0Qo.js +44 -0
  400. package/dist/chunks/media-BRSTn0Qo.js.map +1 -0
  401. package/dist/chunks/media-CSgb3SoI.esm.js +45 -0
  402. package/dist/chunks/media-CSgb3SoI.esm.js.map +1 -0
  403. package/dist/chunks/modal-B4a7X75N.esm.js +26 -0
  404. package/dist/chunks/modal-B4a7X75N.esm.js.map +1 -0
  405. package/dist/chunks/modal-Gur8qk4u.js +25 -0
  406. package/dist/chunks/modal-Gur8qk4u.js.map +1 -0
  407. package/dist/chunks/modal-loader-CGahoKoj.js +26 -0
  408. package/dist/chunks/modal-loader-CGahoKoj.js.map +1 -0
  409. package/dist/chunks/modal-loader-UrAS8VTp.esm.js +27 -0
  410. package/dist/chunks/modal-loader-UrAS8VTp.esm.js.map +1 -0
  411. package/dist/chunks/module-skeleton-BC3WF2hF.esm.js +180 -0
  412. package/dist/chunks/module-skeleton-BC3WF2hF.esm.js.map +1 -0
  413. package/dist/chunks/module-skeleton-BdMbkOa-.js +179 -0
  414. package/dist/chunks/module-skeleton-BdMbkOa-.js.map +1 -0
  415. package/dist/chunks/mui.constants-DutwSAKL.js +6 -0
  416. package/dist/chunks/mui.constants-DutwSAKL.js.map +1 -0
  417. package/dist/chunks/mui.constants-iiWY0Bap.esm.js +7 -0
  418. package/dist/chunks/mui.constants-iiWY0Bap.esm.js.map +1 -0
  419. package/dist/chunks/multi-select-BSa2nlaQ.esm.js +237 -0
  420. package/dist/chunks/multi-select-BSa2nlaQ.esm.js.map +1 -0
  421. package/dist/chunks/multi-select-BvrnyPYk.js +236 -0
  422. package/dist/chunks/multi-select-BvrnyPYk.js.map +1 -0
  423. package/dist/chunks/multiline-BSRzLvkX.esm.js +60 -0
  424. package/dist/chunks/multiline-BSRzLvkX.esm.js.map +1 -0
  425. package/dist/chunks/multiline-BY1IftAD.js +59 -0
  426. package/dist/chunks/multiline-BY1IftAD.js.map +1 -0
  427. package/dist/chunks/notification-menu-Bfz_6igL.js +500 -0
  428. package/dist/chunks/notification-menu-Bfz_6igL.js.map +1 -0
  429. package/dist/chunks/notification-menu-HaII1KLu.esm.js +501 -0
  430. package/dist/chunks/notification-menu-HaII1KLu.esm.js.map +1 -0
  431. package/dist/chunks/operator-select-Cziy6dy-.esm.js +32 -0
  432. package/dist/chunks/operator-select-Cziy6dy-.esm.js.map +1 -0
  433. package/dist/chunks/operator-select-snVpIgmZ.js +31 -0
  434. package/dist/chunks/operator-select-snVpIgmZ.js.map +1 -0
  435. package/dist/chunks/page-action-6XQteq6r.js +324 -0
  436. package/dist/chunks/page-action-6XQteq6r.js.map +1 -0
  437. package/dist/chunks/page-action-CtLGQOMh.esm.js +325 -0
  438. package/dist/chunks/page-action-CtLGQOMh.esm.js.map +1 -0
  439. package/dist/chunks/page-loader-BZXVIc77.js +14 -0
  440. package/dist/chunks/page-loader-BZXVIc77.js.map +1 -0
  441. package/dist/chunks/page-loader-C-GDnlQU.esm.js +15 -0
  442. package/dist/chunks/page-loader-C-GDnlQU.esm.js.map +1 -0
  443. package/dist/chunks/page-navigator-BGYO2moT.esm.js +243 -0
  444. package/dist/chunks/page-navigator-BGYO2moT.esm.js.map +1 -0
  445. package/dist/chunks/page-navigator-DMXh0Afc.js +242 -0
  446. package/dist/chunks/page-navigator-DMXh0Afc.js.map +1 -0
  447. package/dist/chunks/page-skeleton-DP9C12GU.esm.js +73 -0
  448. package/dist/chunks/page-skeleton-DP9C12GU.esm.js.map +1 -0
  449. package/dist/chunks/page-skeleton-ZJv9y4qh.js +72 -0
  450. package/dist/chunks/page-skeleton-ZJv9y4qh.js.map +1 -0
  451. package/dist/chunks/page-view-3Ve58ZCK.js +323 -0
  452. package/dist/chunks/page-view-3Ve58ZCK.js.map +1 -0
  453. package/dist/chunks/page-view-7otwcpx6.esm.js +324 -0
  454. package/dist/chunks/page-view-7otwcpx6.esm.js.map +1 -0
  455. package/dist/chunks/pagination-BukxI7GQ.esm.js +135 -0
  456. package/dist/chunks/pagination-BukxI7GQ.esm.js.map +1 -0
  457. package/dist/chunks/pagination-NSSPx9-I.js +134 -0
  458. package/dist/chunks/pagination-NSSPx9-I.js.map +1 -0
  459. package/dist/chunks/phone-C_3K9t_-.js +37 -0
  460. package/dist/chunks/phone-C_3K9t_-.js.map +1 -0
  461. package/dist/chunks/phone-DpfHn1LS.esm.js +38 -0
  462. package/dist/chunks/phone-DpfHn1LS.esm.js.map +1 -0
  463. package/dist/chunks/phone-input-BJlmEF5j.js +283 -0
  464. package/dist/chunks/phone-input-BJlmEF5j.js.map +1 -0
  465. package/dist/chunks/phone-input-BdAgpa6E.esm.js +284 -0
  466. package/dist/chunks/phone-input-BdAgpa6E.esm.js.map +1 -0
  467. package/dist/chunks/protected-route-BN_JPSvO.js +134 -0
  468. package/dist/chunks/protected-route-BN_JPSvO.js.map +1 -0
  469. package/dist/chunks/protected-route-CnB8WNAu.esm.js +135 -0
  470. package/dist/chunks/protected-route-CnB8WNAu.esm.js.map +1 -0
  471. package/dist/chunks/quick-approval-modal-CDaFpmvQ.js +272 -0
  472. package/dist/chunks/quick-approval-modal-CDaFpmvQ.js.map +1 -0
  473. package/dist/chunks/quick-approval-modal-CMCznXC8.esm.js +256 -0
  474. package/dist/chunks/quick-approval-modal-CMCznXC8.esm.js.map +1 -0
  475. package/dist/chunks/radio-button-3ZmV6AHG.esm.js +125 -0
  476. package/dist/chunks/radio-button-3ZmV6AHG.esm.js.map +1 -0
  477. package/dist/chunks/radio-button-CEBWFLmz.js +124 -0
  478. package/dist/chunks/radio-button-CEBWFLmz.js.map +1 -0
  479. package/dist/chunks/report-buttons-Cf51swba.js +45 -0
  480. package/dist/chunks/report-buttons-Cf51swba.js.map +1 -0
  481. package/dist/chunks/report-buttons-CrN9Xzo8.esm.js +60 -0
  482. package/dist/chunks/report-buttons-CrN9Xzo8.esm.js.map +1 -0
  483. package/dist/chunks/report-buttons-Db_u_LCW.esm.js +46 -0
  484. package/dist/chunks/report-buttons-Db_u_LCW.esm.js.map +1 -0
  485. package/dist/chunks/report-buttons-DjYf21yy.js +59 -0
  486. package/dist/chunks/report-buttons-DjYf21yy.js.map +1 -0
  487. package/dist/chunks/reportFilter-D7PNc5ui.js +394 -0
  488. package/dist/chunks/reportFilter-D7PNc5ui.js.map +1 -0
  489. package/dist/chunks/reportFilter-Xvgx6cjL.esm.js +395 -0
  490. package/dist/chunks/reportFilter-Xvgx6cjL.esm.js.map +1 -0
  491. package/dist/chunks/reports-title-bar-6JksvVoQ.js +1017 -0
  492. package/dist/chunks/reports-title-bar-6JksvVoQ.js.map +1 -0
  493. package/dist/chunks/reports-title-bar-CreXRZ3e.esm.js +1018 -0
  494. package/dist/chunks/reports-title-bar-CreXRZ3e.esm.js.map +1 -0
  495. package/dist/chunks/reset-password-modal-B4MSjiiD.js +160 -0
  496. package/dist/chunks/reset-password-modal-B4MSjiiD.js.map +1 -0
  497. package/dist/chunks/reset-password-modal-L0cjdquS.esm.js +144 -0
  498. package/dist/chunks/reset-password-modal-L0cjdquS.esm.js.map +1 -0
  499. package/dist/chunks/routes-CLHotBuV.esm.js +47 -0
  500. package/dist/chunks/routes-CLHotBuV.esm.js.map +1 -0
  501. package/dist/chunks/routes-Cv2WNTzP.js +46 -0
  502. package/dist/chunks/routes-Cv2WNTzP.js.map +1 -0
  503. package/dist/chunks/save-filter-modal-CZA9tMi2.esm.js +68 -0
  504. package/dist/chunks/save-filter-modal-CZA9tMi2.esm.js.map +1 -0
  505. package/dist/chunks/save-filter-modal-D7hXxGix.js +67 -0
  506. package/dist/chunks/save-filter-modal-D7hXxGix.js.map +1 -0
  507. package/dist/chunks/schedule-report-DzjcTj8b.js +235 -0
  508. package/dist/chunks/schedule-report-DzjcTj8b.js.map +1 -0
  509. package/dist/chunks/schedule-report-FlV5yhW3.esm.js +236 -0
  510. package/dist/chunks/schedule-report-FlV5yhW3.esm.js.map +1 -0
  511. package/dist/chunks/schedule-report-modal-C2iRXe_S.esm.js +288 -0
  512. package/dist/chunks/schedule-report-modal-C2iRXe_S.esm.js.map +1 -0
  513. package/dist/chunks/schedule-report-modal-Caw5jD70.js +287 -0
  514. package/dist/chunks/schedule-report-modal-Caw5jD70.js.map +1 -0
  515. package/dist/chunks/search-bar-BpByT5Mp.esm.js +136 -0
  516. package/dist/chunks/search-bar-BpByT5Mp.esm.js.map +1 -0
  517. package/dist/chunks/search-bar-DFQDPFBq.js +135 -0
  518. package/dist/chunks/search-bar-DFQDPFBq.js.map +1 -0
  519. package/dist/chunks/searchable-select-DKVPPyzX.esm.js +5436 -0
  520. package/dist/chunks/searchable-select-DKVPPyzX.esm.js.map +1 -0
  521. package/dist/chunks/searchable-select-KUXzPGif.js +5452 -0
  522. package/dist/chunks/searchable-select-KUXzPGif.js.map +1 -0
  523. package/dist/chunks/section-N9w1tnxm.js +97 -0
  524. package/dist/chunks/section-N9w1tnxm.js.map +1 -0
  525. package/dist/chunks/section-eCDRFKfa.esm.js +98 -0
  526. package/dist/chunks/section-eCDRFKfa.esm.js.map +1 -0
  527. package/dist/chunks/select-04sBk2tH.esm.js +172 -0
  528. package/dist/chunks/select-04sBk2tH.esm.js.map +1 -0
  529. package/dist/chunks/select-CrH4_YSy.js +171 -0
  530. package/dist/chunks/select-CrH4_YSy.js.map +1 -0
  531. package/dist/chunks/select-ZiT5_0HD.js +232 -0
  532. package/dist/chunks/select-ZiT5_0HD.js.map +1 -0
  533. package/dist/chunks/select-iIz7q6PU.esm.js +233 -0
  534. package/dist/chunks/select-iIz7q6PU.esm.js.map +1 -0
  535. package/dist/chunks/share-modal-BwtQWaxB.js +217 -0
  536. package/dist/chunks/share-modal-BwtQWaxB.js.map +1 -0
  537. package/dist/chunks/share-modal-DKAhOqOO.esm.js +218 -0
  538. package/dist/chunks/share-modal-DKAhOqOO.esm.js.map +1 -0
  539. package/dist/chunks/share-modal-enhanced-BXiXlC_V.js +269 -0
  540. package/dist/chunks/share-modal-enhanced-BXiXlC_V.js.map +1 -0
  541. package/dist/chunks/share-modal-enhanced-DUMLlC25.esm.js +270 -0
  542. package/dist/chunks/share-modal-enhanced-DUMLlC25.esm.js.map +1 -0
  543. package/dist/chunks/shared-page-modal-CyMG_SKv.esm.js +202 -0
  544. package/dist/chunks/shared-page-modal-CyMG_SKv.esm.js.map +1 -0
  545. package/dist/chunks/shared-page-modal-Um57icXe.js +201 -0
  546. package/dist/chunks/shared-page-modal-Um57icXe.js.map +1 -0
  547. package/dist/chunks/sidebar-I-khG38I.esm.js +858 -0
  548. package/dist/chunks/sidebar-I-khG38I.esm.js.map +1 -0
  549. package/dist/chunks/sidebar-wuyRmXeE.js +857 -0
  550. package/dist/chunks/sidebar-wuyRmXeE.js.map +1 -0
  551. package/dist/chunks/sidebarScreen-DOAveFjk.js +200 -0
  552. package/dist/chunks/sidebarScreen-DOAveFjk.js.map +1 -0
  553. package/dist/chunks/sidebarScreen-DRAkGEzP.esm.js +201 -0
  554. package/dist/chunks/sidebarScreen-DRAkGEzP.esm.js.map +1 -0
  555. package/dist/chunks/source-type-add-modal-BYMb2wBj.js +152 -0
  556. package/dist/chunks/source-type-add-modal-BYMb2wBj.js.map +1 -0
  557. package/dist/chunks/source-type-add-modal-CBNGfanW.esm.js +136 -0
  558. package/dist/chunks/source-type-add-modal-CBNGfanW.esm.js.map +1 -0
  559. package/dist/chunks/sub-header-doc-DO6Zmgks.esm.js +20 -0
  560. package/dist/chunks/sub-header-doc-DO6Zmgks.esm.js.map +1 -0
  561. package/dist/chunks/sub-header-doc-DcTdfLTQ.js +19 -0
  562. package/dist/chunks/sub-header-doc-DcTdfLTQ.js.map +1 -0
  563. package/dist/chunks/subtotal-summary-DGwPouGt.esm.js +41 -0
  564. package/dist/chunks/subtotal-summary-DGwPouGt.esm.js.map +1 -0
  565. package/dist/chunks/subtotal-summary-yxlJKl6L.js +40 -0
  566. package/dist/chunks/subtotal-summary-yxlJKl6L.js.map +1 -0
  567. package/dist/chunks/table-DXdjJ5pt.esm.js +185 -0
  568. package/dist/chunks/table-DXdjJ5pt.esm.js.map +1 -0
  569. package/dist/chunks/table-DgMZ7j_f.js +184 -0
  570. package/dist/chunks/table-DgMZ7j_f.js.map +1 -0
  571. package/dist/chunks/table-form-DK2tpS56.js +1536 -0
  572. package/dist/chunks/table-form-DK2tpS56.js.map +1 -0
  573. package/dist/chunks/table-form-r074ihDd.esm.js +1537 -0
  574. package/dist/chunks/table-form-r074ihDd.esm.js.map +1 -0
  575. package/dist/chunks/tabs-I6QxLBJZ.esm.js +76 -0
  576. package/dist/chunks/tabs-I6QxLBJZ.esm.js.map +1 -0
  577. package/dist/chunks/tabs-pXiAwLtm.js +75 -0
  578. package/dist/chunks/tabs-pXiAwLtm.js.map +1 -0
  579. package/dist/chunks/taxes-and-charges-summary-CWo3OWYy.esm.js +86 -0
  580. package/dist/chunks/taxes-and-charges-summary-CWo3OWYy.esm.js.map +1 -0
  581. package/dist/chunks/taxes-and-charges-summary-DJTgZ4Cz.js +85 -0
  582. package/dist/chunks/taxes-and-charges-summary-DJTgZ4Cz.js.map +1 -0
  583. package/dist/chunks/template-editor-router-BlWisfwO.esm.js +9 -0
  584. package/dist/chunks/template-editor-router-BlWisfwO.esm.js.map +1 -0
  585. package/dist/chunks/template-editor-router-Cgjlcjt2.js +8 -0
  586. package/dist/chunks/template-editor-router-Cgjlcjt2.js.map +1 -0
  587. package/dist/chunks/template-modal--F_2sd69.js +768 -0
  588. package/dist/chunks/template-modal--F_2sd69.js.map +1 -0
  589. package/dist/chunks/template-modal-DbYVIfQS.esm.js +769 -0
  590. package/dist/chunks/template-modal-DbYVIfQS.esm.js.map +1 -0
  591. package/dist/chunks/template-name-modal-BBidMkS5.js +117 -0
  592. package/dist/chunks/template-name-modal-BBidMkS5.js.map +1 -0
  593. package/dist/chunks/template-name-modal-D_-PpJwg.esm.js +101 -0
  594. package/dist/chunks/template-name-modal-D_-PpJwg.esm.js.map +1 -0
  595. package/dist/chunks/templates-C6Ci8S5N.esm.js +279 -0
  596. package/dist/chunks/templates-C6Ci8S5N.esm.js.map +1 -0
  597. package/dist/chunks/templates-ZhIhcCXx.js +278 -0
  598. package/dist/chunks/templates-ZhIhcCXx.js.map +1 -0
  599. package/dist/chunks/text-area-BtCUXzO3.esm.js +311 -0
  600. package/dist/chunks/text-area-BtCUXzO3.esm.js.map +1 -0
  601. package/dist/chunks/text-area-CgULRnyN.js +327 -0
  602. package/dist/chunks/text-area-CgULRnyN.js.map +1 -0
  603. package/dist/chunks/theme-impl-Ct1o0O6w.esm.js +2203 -0
  604. package/dist/chunks/theme-impl-Ct1o0O6w.esm.js.map +1 -0
  605. package/dist/chunks/theme-impl-DnAy6KJK.js +2202 -0
  606. package/dist/chunks/theme-impl-DnAy6KJK.js.map +1 -0
  607. package/dist/chunks/themeSelector-B6wOnMBx.js +19 -0
  608. package/dist/chunks/themeSelector-B6wOnMBx.js.map +1 -0
  609. package/dist/chunks/themeSelector-GMxyhKZ3.esm.js +20 -0
  610. package/dist/chunks/themeSelector-GMxyhKZ3.esm.js.map +1 -0
  611. package/dist/chunks/time-Bm9zMVd1.js +40 -0
  612. package/dist/chunks/time-Bm9zMVd1.js.map +1 -0
  613. package/dist/chunks/time-D87YyhKX.esm.js +41 -0
  614. package/dist/chunks/time-D87YyhKX.esm.js.map +1 -0
  615. package/dist/chunks/time-picker-BfVxyYs2.esm.js +114 -0
  616. package/dist/chunks/time-picker-BfVxyYs2.esm.js.map +1 -0
  617. package/dist/chunks/time-picker-bqBivxvY.js +113 -0
  618. package/dist/chunks/time-picker-bqBivxvY.js.map +1 -0
  619. package/dist/chunks/toast-B5NYTOLT.js +72 -0
  620. package/dist/chunks/toast-B5NYTOLT.js.map +1 -0
  621. package/dist/chunks/toast-gmkK80xp.esm.js +73 -0
  622. package/dist/chunks/toast-gmkK80xp.esm.js.map +1 -0
  623. package/dist/chunks/toggle-button-CM6m6FVp.js +54 -0
  624. package/dist/chunks/toggle-button-CM6m6FVp.js.map +1 -0
  625. package/dist/chunks/toggle-button-DUfyPew6.esm.js +55 -0
  626. package/dist/chunks/toggle-button-DUfyPew6.esm.js.map +1 -0
  627. package/dist/chunks/toggle-switch-9aclVkQy.js +80 -0
  628. package/dist/chunks/toggle-switch-9aclVkQy.js.map +1 -0
  629. package/dist/chunks/toggle-switch-Dw8LyaNp.esm.js +81 -0
  630. package/dist/chunks/toggle-switch-Dw8LyaNp.esm.js.map +1 -0
  631. package/dist/chunks/total-summary-DqOlxmaV.esm.js +41 -0
  632. package/dist/chunks/total-summary-DqOlxmaV.esm.js.map +1 -0
  633. package/dist/chunks/total-summary-KQjycQqv.js +40 -0
  634. package/dist/chunks/total-summary-KQjycQqv.js.map +1 -0
  635. package/dist/chunks/uom-field-wrapper-DKQZGG4z.js +79 -0
  636. package/dist/chunks/uom-field-wrapper-DKQZGG4z.js.map +1 -0
  637. package/dist/chunks/uom-field-wrapper-JkPlQY59.esm.js +80 -0
  638. package/dist/chunks/uom-field-wrapper-JkPlQY59.esm.js.map +1 -0
  639. package/dist/chunks/upload-excel-BQuE3Y9j.js +360 -0
  640. package/dist/chunks/upload-excel-BQuE3Y9j.js.map +1 -0
  641. package/dist/chunks/upload-excel-CKz6scHw.esm.js +361 -0
  642. package/dist/chunks/upload-excel-CKz6scHw.esm.js.map +1 -0
  643. package/dist/chunks/upload-media-6u1Vs5qH.esm.js +524 -0
  644. package/dist/chunks/upload-media-6u1Vs5qH.esm.js.map +1 -0
  645. package/dist/chunks/upload-media-BeOYqhda.js +523 -0
  646. package/dist/chunks/upload-media-BeOYqhda.js.map +1 -0
  647. package/dist/chunks/upload-oZyBOsNc.js +733 -0
  648. package/dist/chunks/upload-oZyBOsNc.js.map +1 -0
  649. package/dist/chunks/upload-tjJ7nyO_.esm.js +734 -0
  650. package/dist/chunks/upload-tjJ7nyO_.esm.js.map +1 -0
  651. package/dist/chunks/use-open-on-input-click-Ds_e69Mg.js +22 -0
  652. package/dist/chunks/use-open-on-input-click-Ds_e69Mg.js.map +1 -0
  653. package/dist/chunks/use-open-on-input-click-_lNFHgPZ.esm.js +23 -0
  654. package/dist/chunks/use-open-on-input-click-_lNFHgPZ.esm.js.map +1 -0
  655. package/dist/chunks/useReduxIntegration-D5IceA_z.esm.js +39 -0
  656. package/dist/chunks/useReduxIntegration-D5IceA_z.esm.js.map +1 -0
  657. package/dist/chunks/useReduxIntegration-x_G2dS0W.js +38 -0
  658. package/dist/chunks/useReduxIntegration-x_G2dS0W.js.map +1 -0
  659. package/dist/chunks/user-menu-WeGaId3S.js +103 -0
  660. package/dist/chunks/user-menu-WeGaId3S.js.map +1 -0
  661. package/dist/chunks/user-menu-zUDkx4Vy.esm.js +104 -0
  662. package/dist/chunks/user-menu-zUDkx4Vy.esm.js.map +1 -0
  663. package/dist/chunks/value-editor-CXMRBWms.js +284 -0
  664. package/dist/chunks/value-editor-CXMRBWms.js.map +1 -0
  665. package/dist/chunks/value-editor-E276Dqye.esm.js +285 -0
  666. package/dist/chunks/value-editor-E276Dqye.esm.js.map +1 -0
  667. package/dist/chunks/vendor-ai-summary-CeAiMe7q.esm.js +228 -0
  668. package/dist/chunks/vendor-ai-summary-CeAiMe7q.esm.js.map +1 -0
  669. package/dist/chunks/vendor-ai-summary-DB1L_f6v.js +227 -0
  670. package/dist/chunks/vendor-ai-summary-DB1L_f6v.js.map +1 -0
  671. package/dist/chunks/view-modal-CGmxopm2.js +193 -0
  672. package/dist/chunks/view-modal-CGmxopm2.js.map +1 -0
  673. package/dist/chunks/view-modal-DAU9RtfE.esm.js +194 -0
  674. package/dist/chunks/view-modal-DAU9RtfE.esm.js.map +1 -0
  675. package/dist/components/Dashboard/dashboard-card/index.esm.js +1 -1
  676. package/dist/components/Dashboard/dashboard-card/index.js +1 -1
  677. package/dist/components/Dashboard/dashboard-header/index.esm.js +1 -1
  678. package/dist/components/Dashboard/dashboard-header/index.js +1 -1
  679. package/dist/components/Dashboard/index.esm.js +2 -2
  680. package/dist/components/Dashboard/index.js +2 -2
  681. package/dist/components/accordion/accordion/index.esm.js +1 -1
  682. package/dist/components/accordion/accordion/index.js +1 -1
  683. package/dist/components/accordion/index.esm.js +1 -1
  684. package/dist/components/accordion/index.js +1 -1
  685. package/dist/components/action-bar/action-bar/index.esm.js +1 -1
  686. package/dist/components/action-bar/action-bar/index.js +1 -1
  687. package/dist/components/action-bar/index.esm.js +1 -1
  688. package/dist/components/action-bar/index.js +1 -1
  689. package/dist/components/activity-tag/activity-tag/index.esm.js +1 -1
  690. package/dist/components/activity-tag/activity-tag/index.js +1 -1
  691. package/dist/components/activity-tag/index.esm.js +1 -1
  692. package/dist/components/activity-tag/index.js +1 -1
  693. package/dist/components/activityArea/activityArea/index.esm.js +1 -1
  694. package/dist/components/activityArea/activityArea/index.js +1 -1
  695. package/dist/components/activityArea/index.esm.js +1 -1
  696. package/dist/components/activityArea/index.js +1 -1
  697. package/dist/components/activityLog/activity-log/index.esm.js +1 -1
  698. package/dist/components/activityLog/activity-log/index.js +1 -1
  699. package/dist/components/activityLog/index.esm.js +1 -1
  700. package/dist/components/activityLog/index.js +1 -1
  701. package/dist/components/address-modal/index.esm.js +1 -1
  702. package/dist/components/address-modal/index.js +1 -1
  703. package/dist/components/ai-disclaimer/index.esm.js +1 -1
  704. package/dist/components/ai-disclaimer/index.js +1 -1
  705. package/dist/components/ai-summary/ai-summary/index.esm.js +1 -1
  706. package/dist/components/ai-summary/ai-summary/index.js +1 -1
  707. package/dist/components/ai-summary/chart/donut-chart/index.esm.js +1 -1
  708. package/dist/components/ai-summary/chart/donut-chart/index.js +1 -1
  709. package/dist/components/ai-summary/chart/index.esm.js +1 -1
  710. package/dist/components/ai-summary/chart/index.js +1 -1
  711. package/dist/components/ai-summary/index.esm.js +1 -1
  712. package/dist/components/ai-summary/index.js +1 -1
  713. package/dist/components/appbar/appbar/index.esm.js +1 -1
  714. package/dist/components/appbar/appbar/index.js +1 -1
  715. package/dist/components/appbar/index.esm.js +1 -1
  716. package/dist/components/appbar/index.js +1 -1
  717. package/dist/components/approval-wrapper/approval-wrapper/index.esm.js +1 -1
  718. package/dist/components/approval-wrapper/approval-wrapper/index.js +1 -1
  719. package/dist/components/approval-wrapper/index.esm.js +1 -1
  720. package/dist/components/approval-wrapper/index.js +1 -1
  721. package/dist/components/brand-add-modal/index.esm.js +1 -1
  722. package/dist/components/brand-add-modal/index.js +1 -1
  723. package/dist/components/button/button/index.esm.js +1 -1
  724. package/dist/components/button/button/index.js +1 -1
  725. package/dist/components/button/index.esm.js +2 -2
  726. package/dist/components/button/index.js +2 -2
  727. package/dist/components/calculation-summary/calculation-summary/index.esm.js +1 -1
  728. package/dist/components/calculation-summary/calculation-summary/index.js +1 -1
  729. package/dist/components/calculation-summary/components/discount-summary/index.esm.js +1 -1
  730. package/dist/components/calculation-summary/components/discount-summary/index.js +1 -1
  731. package/dist/components/calculation-summary/components/index.esm.js +5 -5
  732. package/dist/components/calculation-summary/components/index.js +5 -5
  733. package/dist/components/calculation-summary/components/items-summary/index.esm.js +1 -1
  734. package/dist/components/calculation-summary/components/items-summary/index.js +1 -1
  735. package/dist/components/calculation-summary/components/subtotal-summary/index.esm.js +1 -1
  736. package/dist/components/calculation-summary/components/subtotal-summary/index.js +1 -1
  737. package/dist/components/calculation-summary/components/taxes-and-charges-summary/index.esm.js +1 -1
  738. package/dist/components/calculation-summary/components/taxes-and-charges-summary/index.js +1 -1
  739. package/dist/components/calculation-summary/components/total-summary/index.esm.js +1 -1
  740. package/dist/components/calculation-summary/components/total-summary/index.js +1 -1
  741. package/dist/components/calculation-summary/index.esm.js +6 -6
  742. package/dist/components/calculation-summary/index.js +6 -6
  743. package/dist/components/category-add-modal/index.esm.js +1 -1
  744. package/dist/components/category-add-modal/index.js +1 -1
  745. package/dist/components/change-user-password-modal/change-user-password-modal/index.esm.js +1 -1
  746. package/dist/components/change-user-password-modal/change-user-password-modal/index.js +1 -1
  747. package/dist/components/change-user-password-modal/index.esm.js +1 -1
  748. package/dist/components/change-user-password-modal/index.js +1 -1
  749. package/dist/components/charts/ChartLegends/index.esm.js +1 -1
  750. package/dist/components/charts/ChartLegends/index.js +1 -1
  751. package/dist/components/charts/areaLinerChart/index.esm.js +1 -1
  752. package/dist/components/charts/areaLinerChart/index.js +1 -1
  753. package/dist/components/charts/index.esm.js +2 -2
  754. package/dist/components/charts/index.js +2 -2
  755. package/dist/components/chat-bot/index.esm.js +1 -1
  756. package/dist/components/chat-bot/index.js +1 -1
  757. package/dist/components/chip/chip/index.esm.js +1 -1
  758. package/dist/components/chip/chip/index.js +1 -1
  759. package/dist/components/chip/index.esm.js +1 -1
  760. package/dist/components/chip/index.js +1 -1
  761. package/dist/components/chip-generator/chip-generator/index.esm.js +1 -1
  762. package/dist/components/chip-generator/chip-generator/index.js +1 -1
  763. package/dist/components/chip-generator/index.esm.js +1 -1
  764. package/dist/components/chip-generator/index.js +1 -1
  765. package/dist/components/confirm-modal/confirm-modal/index.esm.js +1 -1
  766. package/dist/components/confirm-modal/confirm-modal/index.js +1 -1
  767. package/dist/components/confirm-modal/index.esm.js +1 -1
  768. package/dist/components/confirm-modal/index.js +1 -1
  769. package/dist/components/contact-modal/index.esm.js +1 -1
  770. package/dist/components/contact-modal/index.js +1 -1
  771. package/dist/components/country-select/country-select/index.esm.js +1 -1
  772. package/dist/components/country-select/country-select/index.js +1 -1
  773. package/dist/components/country-select/index.esm.js +1 -1
  774. package/dist/components/country-select/index.js +1 -1
  775. package/dist/components/custom-forms/FORMS/index.esm.js +1 -1
  776. package/dist/components/custom-forms/FORMS/index.js +1 -1
  777. package/dist/components/custom-forms/grid-view/grid-view/index.esm.js +1 -1
  778. package/dist/components/custom-forms/grid-view/grid-view/index.js +1 -1
  779. package/dist/components/custom-forms/grid-view/index.esm.js +1 -1
  780. package/dist/components/custom-forms/grid-view/index.js +1 -1
  781. package/dist/components/custom-forms/index.esm.js +2 -2
  782. package/dist/components/custom-forms/index.js +2 -2
  783. package/dist/components/custom-snackbar/custom-snackbar/index.esm.js +1 -1
  784. package/dist/components/custom-snackbar/custom-snackbar/index.js +1 -1
  785. package/dist/components/custom-snackbar/index.esm.js +1 -1
  786. package/dist/components/custom-snackbar/index.js +1 -1
  787. package/dist/components/custom-toggle-switch/custom-toggle-switch/index.esm.js +1 -1
  788. package/dist/components/custom-toggle-switch/custom-toggle-switch/index.js +1 -1
  789. package/dist/components/custom-toggle-switch/index.esm.js +1 -1
  790. package/dist/components/custom-toggle-switch/index.js +1 -1
  791. package/dist/components/customer-ai-summary/index.esm.js +4 -4
  792. package/dist/components/customer-ai-summary/index.esm.js.map +1 -1
  793. package/dist/components/customer-ai-summary/index.js +4 -4
  794. package/dist/components/customer-ai-summary/index.js.map +1 -1
  795. package/dist/components/date-picker/date-picker/index.esm.js +1 -1
  796. package/dist/components/date-picker/date-picker/index.js +1 -1
  797. package/dist/components/date-picker/index.esm.js +2 -2
  798. package/dist/components/date-picker/index.js +2 -2
  799. package/dist/components/date-time-picker/date-time-picker/index.esm.js +1 -1
  800. package/dist/components/date-time-picker/date-time-picker/index.js +1 -1
  801. package/dist/components/date-time-picker/index.esm.js +2 -2
  802. package/dist/components/date-time-picker/index.js +2 -2
  803. package/dist/components/department-add-modal/index.esm.js +1 -1
  804. package/dist/components/department-add-modal/index.js +1 -1
  805. package/dist/components/designation-add-modal/index.esm.js +1 -1
  806. package/dist/components/designation-add-modal/index.js +1 -1
  807. package/dist/components/detail-drawer/index.esm.js +1 -1
  808. package/dist/components/detail-drawer/index.js +1 -1
  809. package/dist/components/document-preview/index.esm.js +1 -1
  810. package/dist/components/document-preview/index.js +1 -1
  811. package/dist/components/dropdown-button/dropdown-button/index.esm.js +1 -1
  812. package/dist/components/dropdown-button/dropdown-button/index.js +1 -1
  813. package/dist/components/dropdown-button/index.esm.js +1 -1
  814. package/dist/components/dropdown-button/index.js +1 -1
  815. package/dist/components/dynamic-layout-wrapper/dynamic-layout-wrapper/index.esm.js +1 -1
  816. package/dist/components/dynamic-layout-wrapper/dynamic-layout-wrapper/index.js +1 -1
  817. package/dist/components/dynamic-layout-wrapper/index.esm.js +1 -1
  818. package/dist/components/dynamic-layout-wrapper/index.js +1 -1
  819. package/dist/components/dynamic-modal/index.esm.js +1 -1
  820. package/dist/components/dynamic-modal/index.js +1 -1
  821. package/dist/components/entity-view-wrapper/entity-view-wrapper/index.esm.js +1 -1
  822. package/dist/components/entity-view-wrapper/entity-view-wrapper/index.js +1 -1
  823. package/dist/components/entity-view-wrapper/index.esm.js +1 -1
  824. package/dist/components/entity-view-wrapper/index.js +1 -1
  825. package/dist/components/examples/FlexibleReduxExample/index.esm.js +1 -1
  826. package/dist/components/examples/FlexibleReduxExample/index.js +1 -1
  827. package/dist/components/examples/index.esm.js +1 -1
  828. package/dist/components/examples/index.js +1 -1
  829. package/dist/components/expandable-summary-wrapper/expandable-summary-wrapper/index.esm.js +1 -1
  830. package/dist/components/expandable-summary-wrapper/expandable-summary-wrapper/index.js +1 -1
  831. package/dist/components/expandable-summary-wrapper/index.esm.js +1 -1
  832. package/dist/components/expandable-summary-wrapper/index.js +1 -1
  833. package/dist/components/filter/components/add-filter/index.esm.js +1 -1
  834. package/dist/components/filter/components/add-filter/index.js +1 -1
  835. package/dist/components/filter/components/add-group/index.esm.js +1 -1
  836. package/dist/components/filter/components/add-group/index.js +1 -1
  837. package/dist/components/filter/components/combinator-select/index.esm.js +1 -1
  838. package/dist/components/filter/components/combinator-select/index.js +1 -1
  839. package/dist/components/filter/components/delete-group/index.esm.js +1 -1
  840. package/dist/components/filter/components/delete-group/index.js +1 -1
  841. package/dist/components/filter/components/field-select/index.esm.js +1 -1
  842. package/dist/components/filter/components/field-select/index.js +1 -1
  843. package/dist/components/filter/components/index.esm.js +7 -7
  844. package/dist/components/filter/components/index.js +7 -7
  845. package/dist/components/filter/components/operator-select/index.esm.js +1 -1
  846. package/dist/components/filter/components/operator-select/index.js +1 -1
  847. package/dist/components/filter/components/value-editor/index.esm.js +1 -1
  848. package/dist/components/filter/components/value-editor/index.js +1 -1
  849. package/dist/components/filter/filter/index.esm.js +1 -1
  850. package/dist/components/filter/filter/index.js +1 -1
  851. package/dist/components/filter/index.esm.js +8 -8
  852. package/dist/components/filter/index.js +8 -8
  853. package/dist/components/footer/footer/index.esm.js +1 -1
  854. package/dist/components/footer/footer/index.js +1 -1
  855. package/dist/components/footer/index.esm.js +1 -1
  856. package/dist/components/footer/index.js +1 -1
  857. package/dist/components/form-control/form-builder/element-controller/index.esm.js +1 -1
  858. package/dist/components/form-control/form-builder/element-controller/index.js +1 -1
  859. package/dist/components/form-control/form-builder/form-builder-element/button/index.esm.js +1 -1
  860. package/dist/components/form-control/form-builder/form-builder-element/button/index.js +1 -1
  861. package/dist/components/form-control/form-builder/form-builder-element/chip-or-placeholder/index.esm.js +1 -1
  862. package/dist/components/form-control/form-builder/form-builder-element/chip-or-placeholder/index.js +1 -1
  863. package/dist/components/form-control/form-builder/form-builder-element/custom-date-picker/index.esm.js +1 -1
  864. package/dist/components/form-control/form-builder/form-builder-element/custom-date-picker/index.js +1 -1
  865. package/dist/components/form-control/form-builder/form-builder-element/date/index.esm.js +1 -1
  866. package/dist/components/form-control/form-builder/form-builder-element/date/index.js +1 -1
  867. package/dist/components/form-control/form-builder/form-builder-element/date-time/index.esm.js +1 -1
  868. package/dist/components/form-control/form-builder/form-builder-element/date-time/index.js +1 -1
  869. package/dist/components/form-control/form-builder/form-builder-element/dynamic-dependent-field/index.esm.js +1 -1
  870. package/dist/components/form-control/form-builder/form-builder-element/dynamic-dependent-field/index.js +1 -1
  871. package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.esm.js +1 -1
  872. package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.js +1 -1
  873. package/dist/components/form-control/form-builder/form-builder-element/dynamic-tags-input/index.esm.js +1 -1
  874. package/dist/components/form-control/form-builder/form-builder-element/dynamic-tags-input/index.js +1 -1
  875. package/dist/components/form-control/form-builder/form-builder-element/fixed-asset-item-add-modal/index.esm.js +1 -1
  876. package/dist/components/form-control/form-builder/form-builder-element/fixed-asset-item-add-modal/index.js +1 -1
  877. package/dist/components/form-control/form-builder/form-builder-element/index.esm.js +16 -16
  878. package/dist/components/form-control/form-builder/form-builder-element/index.js +16 -16
  879. package/dist/components/form-control/form-builder/form-builder-element/location-add-modal/index.esm.js +1 -1
  880. package/dist/components/form-control/form-builder/form-builder-element/location-add-modal/index.js +1 -1
  881. package/dist/components/form-control/form-builder/form-builder-element/media/index.esm.js +1 -1
  882. package/dist/components/form-control/form-builder/form-builder-element/media/index.js +1 -1
  883. package/dist/components/form-control/form-builder/form-builder-element/phone/index.esm.js +1 -1
  884. package/dist/components/form-control/form-builder/form-builder-element/phone/index.js +1 -1
  885. package/dist/components/form-control/form-builder/form-builder-element/radio-button/index.esm.js +1 -1
  886. package/dist/components/form-control/form-builder/form-builder-element/radio-button/index.js +1 -1
  887. package/dist/components/form-control/form-builder/form-builder-element/section/index.esm.js +1 -1
  888. package/dist/components/form-control/form-builder/form-builder-element/section/index.js +1 -1
  889. package/dist/components/form-control/form-builder/form-builder-element/select/index.esm.js +1 -1
  890. package/dist/components/form-control/form-builder/form-builder-element/select/index.js +1 -1
  891. package/dist/components/form-control/form-builder/form-builder-element/select-configuration/index.esm.js +1 -1
  892. package/dist/components/form-control/form-builder/form-builder-element/select-configuration/index.js +1 -1
  893. package/dist/components/form-control/form-builder/form-builder-element/table/index.esm.js +1 -1
  894. package/dist/components/form-control/form-builder/form-builder-element/table/index.js +1 -1
  895. package/dist/components/form-control/form-builder/form-builder-element/time/index.esm.js +1 -1
  896. package/dist/components/form-control/form-builder/form-builder-element/time/index.js +1 -1
  897. package/dist/components/form-control/form-builder/form-builder-element/toggle-button/index.esm.js +1 -1
  898. package/dist/components/form-control/form-builder/form-builder-element/toggle-button/index.js +1 -1
  899. package/dist/components/form-control/form-builder/index.esm.js +17 -17
  900. package/dist/components/form-control/form-builder/index.js +17 -17
  901. package/dist/components/form-control/form-parser/form-parser/index.esm.js +1 -1
  902. package/dist/components/form-control/form-parser/form-parser/index.js +1 -1
  903. package/dist/components/form-control/form-parser/form-section/index.esm.js +1 -1
  904. package/dist/components/form-control/form-parser/form-section/index.js +1 -1
  905. package/dist/components/form-control/form-parser/form-switcher/index.esm.js +1 -1
  906. package/dist/components/form-control/form-parser/form-switcher/index.js +1 -1
  907. package/dist/components/form-control/form-parser/index.esm.js +3 -3
  908. package/dist/components/form-control/form-parser/index.js +3 -3
  909. package/dist/components/form-control/index.esm.js +20 -20
  910. package/dist/components/form-control/index.js +20 -20
  911. package/dist/components/grid/custom-grid-card/custom-grid-card/index.esm.js +1 -1
  912. package/dist/components/grid/custom-grid-card/custom-grid-card/index.js +1 -1
  913. package/dist/components/grid/custom-grid-card/index.esm.js +1 -1
  914. package/dist/components/grid/custom-grid-card/index.js +1 -1
  915. package/dist/components/grid/grid-card/grid-card/index.esm.js +1 -1
  916. package/dist/components/grid/grid-card/grid-card/index.js +1 -1
  917. package/dist/components/grid/grid-card/index.esm.js +1 -1
  918. package/dist/components/grid/grid-card/index.js +1 -1
  919. package/dist/components/grid/grid-wrapper/grid-wrapper/index.esm.js +1 -1
  920. package/dist/components/grid/grid-wrapper/grid-wrapper/index.js +1 -1
  921. package/dist/components/grid/grid-wrapper/index.esm.js +1 -1
  922. package/dist/components/grid/grid-wrapper/index.js +1 -1
  923. package/dist/components/grid/index.esm.js +3 -3
  924. package/dist/components/grid/index.js +3 -3
  925. package/dist/components/header/components/global-search/index.esm.js +1 -1
  926. package/dist/components/header/components/global-search/index.js +1 -1
  927. package/dist/components/header/components/index.esm.js +1 -1
  928. package/dist/components/header/components/index.js +1 -1
  929. package/dist/components/header/components/notification-menu/index.esm.js +1 -1
  930. package/dist/components/header/components/notification-menu/index.js +1 -1
  931. package/dist/components/header/components/notification-menu/notification-menu/index.esm.js +1 -1
  932. package/dist/components/header/components/notification-menu/notification-menu/index.js +1 -1
  933. package/dist/components/header/components/user-menu/index.esm.js +1 -1
  934. package/dist/components/header/components/user-menu/index.js +1 -1
  935. package/dist/components/header/header/index.esm.js +1 -1
  936. package/dist/components/header/header/index.js +1 -1
  937. package/dist/components/header/header-enhanced/index.esm.js +1 -1
  938. package/dist/components/header/header-enhanced/index.js +1 -1
  939. package/dist/components/header/index.esm.js +3 -3
  940. package/dist/components/header/index.js +3 -3
  941. package/dist/components/header copy/index.esm.js +9 -9
  942. package/dist/components/header copy/index.esm.js.map +1 -1
  943. package/dist/components/header copy/index.js +9 -9
  944. package/dist/components/header copy/index.js.map +1 -1
  945. package/dist/components/index.esm.js +119 -119
  946. package/dist/components/index.js +119 -119
  947. package/dist/components/industry-add-modal/index.esm.js +1 -1
  948. package/dist/components/industry-add-modal/index.js +1 -1
  949. package/dist/components/inventory-reports-title-bar/component/index.esm.js +1 -1
  950. package/dist/components/inventory-reports-title-bar/component/index.js +1 -1
  951. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.esm.js +1 -1
  952. package/dist/components/inventory-reports-title-bar/component/reportFilter/index.js +1 -1
  953. package/dist/components/inventory-reports-title-bar/index.esm.js +3 -3
  954. package/dist/components/inventory-reports-title-bar/index.js +3 -3
  955. package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.esm.js +1 -1
  956. package/dist/components/inventory-reports-title-bar/inventory-reports-title-bar/index.js +1 -1
  957. package/dist/components/inventory-reports-title-bar/report-buttons/index.esm.js +1 -1
  958. package/dist/components/inventory-reports-title-bar/report-buttons/index.js +1 -1
  959. package/dist/components/inventory-reports-title-bar/report-buttons/report-buttons/index.esm.js +1 -1
  960. package/dist/components/inventory-reports-title-bar/report-buttons/report-buttons/index.js +1 -1
  961. package/dist/components/journal-type-add-modal/index.esm.js +1 -1
  962. package/dist/components/journal-type-add-modal/index.js +1 -1
  963. package/dist/components/listing/index.esm.js +1 -1
  964. package/dist/components/listing/index.js +1 -1
  965. package/dist/components/listing/listing/index.esm.js +1 -1
  966. package/dist/components/listing/listing/index.js +1 -1
  967. package/dist/components/loaders/erp-loader/index.esm.js +1 -1
  968. package/dist/components/loaders/erp-loader/index.js +1 -1
  969. package/dist/components/loaders/form-loader/index.esm.js +1 -1
  970. package/dist/components/loaders/form-loader/index.js +1 -1
  971. package/dist/components/loaders/index.esm.js +6 -6
  972. package/dist/components/loaders/index.js +6 -6
  973. package/dist/components/loaders/modal-loader/index.esm.js +1 -1
  974. package/dist/components/loaders/modal-loader/index.js +1 -1
  975. package/dist/components/loaders/module-skeleton/index.esm.js +1 -1
  976. package/dist/components/loaders/module-skeleton/index.js +1 -1
  977. package/dist/components/loaders/page-loader/index.esm.js +1 -1
  978. package/dist/components/loaders/page-loader/index.js +1 -1
  979. package/dist/components/loaders/page-skeleton/index.esm.js +1 -1
  980. package/dist/components/loaders/page-skeleton/index.js +1 -1
  981. package/dist/components/location-select/index.esm.js +1 -1
  982. package/dist/components/location-select/index.js +1 -1
  983. package/dist/components/material-editable-table/components/index.esm.js +1 -1
  984. package/dist/components/material-editable-table/components/index.js +1 -1
  985. package/dist/components/material-editable-table/components/inline-edit-fields/index.esm.js +1 -1
  986. package/dist/components/material-editable-table/components/inline-edit-fields/index.js +1 -1
  987. package/dist/components/material-editable-table/index.esm.js +2 -2
  988. package/dist/components/material-editable-table/index.js +2 -2
  989. package/dist/components/material-editable-table/material-editable-table/index.esm.js +1 -1
  990. package/dist/components/material-editable-table/material-editable-table/index.js +1 -1
  991. package/dist/components/material-table/components/index.esm.js +1 -1
  992. package/dist/components/material-table/components/index.js +1 -1
  993. package/dist/components/material-table/components/inline-edit-fields/index.esm.js +1 -1
  994. package/dist/components/material-table/components/inline-edit-fields/index.js +1 -1
  995. package/dist/components/material-table/index.esm.js +1 -1
  996. package/dist/components/material-table/index.js +1 -1
  997. package/dist/components/material-table/material-table/index.esm.js +1 -1
  998. package/dist/components/material-table/material-table/index.js +1 -1
  999. package/dist/components/modal/index.esm.js +1 -1
  1000. package/dist/components/modal/index.js +1 -1
  1001. package/dist/components/modal/modal/index.esm.js +1 -1
  1002. package/dist/components/modal/modal/index.js +1 -1
  1003. package/dist/components/mulitline/index.esm.js +1 -1
  1004. package/dist/components/mulitline/index.js +1 -1
  1005. package/dist/components/mulitline/multiline/index.esm.js +1 -1
  1006. package/dist/components/mulitline/multiline/index.js +1 -1
  1007. package/dist/components/multi-select/index.esm.js +1 -1
  1008. package/dist/components/multi-select/index.js +1 -1
  1009. package/dist/components/multi-select/multi-select/index.esm.js +1 -1
  1010. package/dist/components/multi-select/multi-select/index.js +1 -1
  1011. package/dist/components/page-navigator/components/add-page/index.esm.js +1 -1
  1012. package/dist/components/page-navigator/components/add-page/index.js +1 -1
  1013. package/dist/components/page-navigator/components/add-page-modal/index.esm.js +1 -1
  1014. package/dist/components/page-navigator/components/add-page-modal/index.js +1 -1
  1015. package/dist/components/page-navigator/components/index.esm.js +4 -4
  1016. package/dist/components/page-navigator/components/index.js +4 -4
  1017. package/dist/components/page-navigator/components/page-action/index.esm.js +1 -1
  1018. package/dist/components/page-navigator/components/page-action/index.js +1 -1
  1019. package/dist/components/page-navigator/components/shared-page-modal/index.esm.js +1 -1
  1020. package/dist/components/page-navigator/components/shared-page-modal/index.js +1 -1
  1021. package/dist/components/page-navigator/index.esm.js +5 -5
  1022. package/dist/components/page-navigator/index.js +5 -5
  1023. package/dist/components/page-navigator/page-navigator/index.esm.js +1 -1
  1024. package/dist/components/page-navigator/page-navigator/index.js +1 -1
  1025. package/dist/components/pagination/index.esm.js +1 -1
  1026. package/dist/components/pagination/index.js +1 -1
  1027. package/dist/components/pagination/pagination/index.esm.js +1 -1
  1028. package/dist/components/pagination/pagination/index.js +1 -1
  1029. package/dist/components/parties-modal/index.esm.js +1 -1
  1030. package/dist/components/parties-modal/index.js +1 -1
  1031. package/dist/components/parties-modal/parties-modal/index.esm.js +1 -1
  1032. package/dist/components/parties-modal/parties-modal/index.js +1 -1
  1033. package/dist/components/phone-input/index.esm.js +1 -1
  1034. package/dist/components/phone-input/index.js +1 -1
  1035. package/dist/components/phone-input/phone-input/index.esm.js +1 -1
  1036. package/dist/components/phone-input/phone-input/index.js +1 -1
  1037. package/dist/components/protected-route/index.esm.js +1 -1
  1038. package/dist/components/protected-route/index.js +1 -1
  1039. package/dist/components/providers/ERPUIProvider/index.esm.js +1 -1
  1040. package/dist/components/providers/ERPUIProvider/index.js +1 -1
  1041. package/dist/components/providers/index.esm.js +1 -1
  1042. package/dist/components/providers/index.js +1 -1
  1043. package/dist/components/quick-approval-modal/index.esm.js +1 -1
  1044. package/dist/components/quick-approval-modal/index.js +1 -1
  1045. package/dist/components/quick-approval-modal/quick-approval-modal/index.esm.js +1 -1
  1046. package/dist/components/quick-approval-modal/quick-approval-modal/index.js +1 -1
  1047. package/dist/components/radio/index.esm.js +1 -1
  1048. package/dist/components/radio/index.js +1 -1
  1049. package/dist/components/reports/dynamic-report/dynamic-report/index.esm.js +1 -1
  1050. package/dist/components/reports/dynamic-report/dynamic-report/index.js +1 -1
  1051. package/dist/components/reports/dynamic-report/dynamic-rows/index.esm.js +1 -1
  1052. package/dist/components/reports/dynamic-report/dynamic-rows/index.js +1 -1
  1053. package/dist/components/reports/dynamic-report/index.esm.js +2 -2
  1054. package/dist/components/reports/dynamic-report/index.js +2 -2
  1055. package/dist/components/reports/index.esm.js +2 -2
  1056. package/dist/components/reports/index.js +2 -2
  1057. package/dist/components/reports-title-bar/index.esm.js +2 -2
  1058. package/dist/components/reports-title-bar/index.js +2 -2
  1059. package/dist/components/reports-title-bar/report-buttons/index.esm.js +1 -1
  1060. package/dist/components/reports-title-bar/report-buttons/index.js +1 -1
  1061. package/dist/components/reports-title-bar/report-buttons/report-buttons/index.esm.js +1 -1
  1062. package/dist/components/reports-title-bar/report-buttons/report-buttons/index.js +1 -1
  1063. package/dist/components/reports-title-bar/reports-title-bar/index.esm.js +1 -1
  1064. package/dist/components/reports-title-bar/reports-title-bar/index.js +1 -1
  1065. package/dist/components/reset-password-modal/index.esm.js +1 -1
  1066. package/dist/components/reset-password-modal/index.js +1 -1
  1067. package/dist/components/reset-password-modal/reset-password-modal/index.esm.js +1 -1
  1068. package/dist/components/reset-password-modal/reset-password-modal/index.js +1 -1
  1069. package/dist/components/rfq-response/index.esm.js +1 -1
  1070. package/dist/components/rfq-response/index.js +1 -1
  1071. package/dist/components/rfq-response/item-response-details/index.esm.js +1 -1
  1072. package/dist/components/rfq-response/item-response-details/index.js +1 -1
  1073. package/dist/components/save-filter-modal/index.esm.js +1 -1
  1074. package/dist/components/save-filter-modal/index.js +1 -1
  1075. package/dist/components/save-filter-modal/save-filter-modal/index.esm.js +1 -1
  1076. package/dist/components/save-filter-modal/save-filter-modal/index.js +1 -1
  1077. package/dist/components/schedule-report/index.esm.js +2 -2
  1078. package/dist/components/schedule-report/index.js +2 -2
  1079. package/dist/components/schedule-report/schedule-report/index.esm.js +1 -1
  1080. package/dist/components/schedule-report/schedule-report/index.js +1 -1
  1081. package/dist/components/schedule-report/schedule-report-modal/index.esm.js +1 -1
  1082. package/dist/components/schedule-report/schedule-report-modal/index.js +1 -1
  1083. package/dist/components/search-bar/index.esm.js +1 -1
  1084. package/dist/components/search-bar/index.js +1 -1
  1085. package/dist/components/search-bar/search-bar/index.esm.js +1 -1
  1086. package/dist/components/search-bar/search-bar/index.js +1 -1
  1087. package/dist/components/searchable-select/index.esm.js +1 -1
  1088. package/dist/components/searchable-select/index.js +1 -1
  1089. package/dist/components/select/controller/chip-or-placeholder/index.esm.js +1 -1
  1090. package/dist/components/select/controller/chip-or-placeholder/index.js +1 -1
  1091. package/dist/components/select/controller/controller-select/index.esm.js +1 -1
  1092. package/dist/components/select/controller/controller-select/index.js +1 -1
  1093. package/dist/components/select/controller/index.esm.js +2 -2
  1094. package/dist/components/select/controller/index.js +2 -2
  1095. package/dist/components/select/index.esm.js +4 -4
  1096. package/dist/components/select/index.js +4 -4
  1097. package/dist/components/select/select/index.esm.js +1 -1
  1098. package/dist/components/select/select/index.js +1 -1
  1099. package/dist/components/share-modal/index.esm.js +2 -2
  1100. package/dist/components/share-modal/index.js +2 -2
  1101. package/dist/components/share-modal/share-modal/index.esm.js +1 -1
  1102. package/dist/components/share-modal/share-modal/index.js +1 -1
  1103. package/dist/components/share-modal/share-modal-enhanced/index.esm.js +1 -1
  1104. package/dist/components/share-modal/share-modal-enhanced/index.js +1 -1
  1105. package/dist/components/sidebar/index.esm.js +1 -1
  1106. package/dist/components/sidebar/index.js +1 -1
  1107. package/dist/components/sidebar/sidebar/index.esm.js +1 -1
  1108. package/dist/components/sidebar/sidebar/index.js +1 -1
  1109. package/dist/components/source-type-add-modal/index.esm.js +1 -1
  1110. package/dist/components/source-type-add-modal/index.js +1 -1
  1111. package/dist/components/source-type-add-modal/source-type-add-modal/index.esm.js +1 -1
  1112. package/dist/components/source-type-add-modal/source-type-add-modal/index.js +1 -1
  1113. package/dist/components/sub-header-doc/index.esm.js +1 -1
  1114. package/dist/components/sub-header-doc/index.js +1 -1
  1115. package/dist/components/sub-header-doc/sub-header-doc/index.esm.js +1 -1
  1116. package/dist/components/sub-header-doc/sub-header-doc/index.js +1 -1
  1117. package/dist/components/tabs/index.esm.js +1 -1
  1118. package/dist/components/tabs/index.js +1 -1
  1119. package/dist/components/tabs/tabs/index.esm.js +1 -1
  1120. package/dist/components/tabs/tabs/index.js +1 -1
  1121. package/dist/components/team-add-modal/index.esm.js +1 -1
  1122. package/dist/components/team-add-modal/index.js +1 -1
  1123. package/dist/components/text-area/index.esm.js +1 -1
  1124. package/dist/components/text-area/index.js +1 -1
  1125. package/dist/components/text-area/text-area/index.esm.js +1 -1
  1126. package/dist/components/text-area/text-area/index.js +1 -1
  1127. package/dist/components/time-picker/index.esm.js +1 -1
  1128. package/dist/components/time-picker/index.js +1 -1
  1129. package/dist/components/time-picker/time-picker/index.esm.js +1 -1
  1130. package/dist/components/time-picker/time-picker/index.js +1 -1
  1131. package/dist/components/toast/index.esm.js +1 -1
  1132. package/dist/components/toast/index.js +1 -1
  1133. package/dist/components/toast/toast/index.esm.js +1 -1
  1134. package/dist/components/toast/toast/index.js +1 -1
  1135. package/dist/components/toggle-switch/index.esm.js +1 -1
  1136. package/dist/components/toggle-switch/index.js +1 -1
  1137. package/dist/components/toggle-switch/toggle-switch/index.esm.js +1 -1
  1138. package/dist/components/toggle-switch/toggle-switch/index.js +1 -1
  1139. package/dist/components/tooltip/Tooltip/index.esm.js +1 -1
  1140. package/dist/components/tooltip/Tooltip/index.js +1 -1
  1141. package/dist/components/tooltip/index.esm.js +1 -1
  1142. package/dist/components/tooltip/index.js +1 -1
  1143. package/dist/components/uom-field-wrapper/index.esm.js +1 -1
  1144. package/dist/components/uom-field-wrapper/index.js +1 -1
  1145. package/dist/components/uom-field-wrapper/uom-field-wrapper/index.esm.js +1 -1
  1146. package/dist/components/uom-field-wrapper/uom-field-wrapper/index.js +1 -1
  1147. package/dist/components/upload/file-confirmation/index.esm.js +1 -1
  1148. package/dist/components/upload/file-confirmation/index.js +1 -1
  1149. package/dist/components/upload/index.esm.js +2 -2
  1150. package/dist/components/upload/index.js +2 -2
  1151. package/dist/components/upload/upload/index.esm.js +1 -1
  1152. package/dist/components/upload/upload/index.js +1 -1
  1153. package/dist/components/upload-excel/file-confirmation/index.esm.js +1 -1
  1154. package/dist/components/upload-excel/file-confirmation/index.js +1 -1
  1155. package/dist/components/upload-excel/index.esm.js +2 -2
  1156. package/dist/components/upload-excel/index.js +2 -2
  1157. package/dist/components/upload-excel/upload-excel/index.esm.js +1 -1
  1158. package/dist/components/upload-excel/upload-excel/index.js +1 -1
  1159. package/dist/components/upload-media/index.esm.js +1 -1
  1160. package/dist/components/upload-media/index.js +1 -1
  1161. package/dist/components/upload-media/upload-media/index.esm.js +1 -1
  1162. package/dist/components/upload-media/upload-media/index.js +1 -1
  1163. package/dist/components/vendor-ai-summary/index.esm.js +1 -1
  1164. package/dist/components/vendor-ai-summary/index.js +1 -1
  1165. package/dist/components/view-modal/index.esm.js +1 -1
  1166. package/dist/components/view-modal/index.js +1 -1
  1167. package/dist/components/view-modal/view-modal/index.esm.js +1 -1
  1168. package/dist/components/view-modal/view-modal/index.js +1 -1
  1169. package/dist/constants/index.esm.js +4 -3
  1170. package/dist/constants/index.js +2 -1
  1171. package/dist/constants/index.js.map +1 -1
  1172. package/dist/hooks/index.esm.js +1 -1
  1173. package/dist/hooks/index.js +1 -1
  1174. package/dist/hooks/useReduxIntegration/index.esm.js +1 -1
  1175. package/dist/hooks/useReduxIntegration/index.js +1 -1
  1176. package/dist/index.esm.js +183 -182
  1177. package/dist/index.js +143 -142
  1178. package/dist/index.js.map +1 -1
  1179. package/dist/layout/fullScreen/index.esm.js +1 -1
  1180. package/dist/layout/fullScreen/index.js +1 -1
  1181. package/dist/layout/index.esm.js +2 -2
  1182. package/dist/layout/index.js +2 -2
  1183. package/dist/layout/sidebarScreen/index.esm.js +1 -1
  1184. package/dist/layout/sidebarScreen/index.js +1 -1
  1185. package/dist/runtime/index.esm.js +2 -2
  1186. package/dist/runtime/index.js +2 -2
  1187. package/dist/src/components/date-picker/use-open-on-input-click.d.ts +20 -0
  1188. package/dist/src/components/material-table/components/ellipsis-cell.d.ts +13 -0
  1189. package/dist/src/constants/mui.constants.d.ts +2 -1
  1190. package/dist/style.css +1420 -826
  1191. package/dist/theme/index.esm.js +2 -2
  1192. package/dist/theme/index.js +2 -2
  1193. package/dist/utils/common-utility/index.esm.js +1 -1
  1194. package/dist/utils/common-utility/index.js +1 -1
  1195. package/dist/utils/index.esm.js +1 -1
  1196. package/dist/utils/index.js +1 -1
  1197. package/dist/views/afterAuth/dashboard/index.esm.js +1 -1
  1198. package/dist/views/afterAuth/dashboard/index.js +1 -1
  1199. package/dist/views/afterAuth/index.esm.js +2 -2
  1200. package/dist/views/afterAuth/index.js +2 -2
  1201. package/dist/views/afterAuth/page-view/index.esm.js +1 -1
  1202. package/dist/views/afterAuth/page-view/index.js +1 -1
  1203. package/dist/views/beforeAuth/change-password/index.esm.js +1 -1
  1204. package/dist/views/beforeAuth/change-password/index.js +1 -1
  1205. package/dist/views/beforeAuth/forgot-password/index.esm.js +1 -1
  1206. package/dist/views/beforeAuth/forgot-password/index.js +1 -1
  1207. package/dist/views/beforeAuth/index.esm.js +2 -2
  1208. package/dist/views/beforeAuth/index.js +2 -2
  1209. package/dist/views/beforeAuth/login/index.esm.js +8 -8
  1210. package/dist/views/beforeAuth/login/index.esm.js.map +1 -1
  1211. package/dist/views/beforeAuth/login/index.js +8 -8
  1212. package/dist/views/beforeAuth/login/index.js.map +1 -1
  1213. package/dist/views/form-builder/custom-form/index.esm.js +1 -1
  1214. package/dist/views/form-builder/custom-form/index.js +1 -1
  1215. package/dist/views/form-builder/element-edit-forms/index.esm.js +2 -2
  1216. package/dist/views/form-builder/element-edit-forms/index.js +2 -2
  1217. package/dist/views/form-builder/form-fields/index.esm.js +1 -1
  1218. package/dist/views/form-builder/form-fields/index.js +1 -1
  1219. package/dist/views/form-builder/index.esm.js +4 -4
  1220. package/dist/views/form-builder/index.js +4 -4
  1221. package/dist/views/index.esm.js +17 -17
  1222. package/dist/views/index.js +17 -17
  1223. package/dist/views/template-editor/add-template/index.esm.js +1 -1
  1224. package/dist/views/template-editor/add-template/index.js +1 -1
  1225. package/dist/views/template-editor/company-selection-modal/index.esm.js +1 -1
  1226. package/dist/views/template-editor/company-selection-modal/index.js +1 -1
  1227. package/dist/views/template-editor/components/index.esm.js +1 -1
  1228. package/dist/views/template-editor/components/index.js +1 -1
  1229. package/dist/views/template-editor/edit-section-modal/index.esm.js +1 -1
  1230. package/dist/views/template-editor/edit-section-modal/index.js +1 -1
  1231. package/dist/views/template-editor/index.esm.js +9 -9
  1232. package/dist/views/template-editor/index.js +9 -9
  1233. package/dist/views/template-editor/routes/index.esm.js +1 -1
  1234. package/dist/views/template-editor/routes/index.js +1 -1
  1235. package/dist/views/template-editor/template-modal/index.esm.js +1 -1
  1236. package/dist/views/template-editor/template-modal/index.js +1 -1
  1237. package/dist/views/template-editor/template-name-modal/index.esm.js +1 -1
  1238. package/dist/views/template-editor/template-name-modal/index.js +1 -1
  1239. package/dist/views/template-editor/templates/index.esm.js +1 -1
  1240. package/dist/views/template-editor/templates/index.js +1 -1
  1241. package/package.json +1 -1
  1242. package/src/styles/all.scss +7 -7
  1243. package/src/styles/animations.scss +5 -5
  1244. package/src/styles/mixins.scss +5 -5
  1245. package/src/styles/sass/_animations.scss +165 -165
  1246. package/src/styles/sass/_mixins.scss +97 -97
  1247. package/src/styles/sass/_pickers.scss +156 -0
  1248. package/src/styles/sass/_rdr.scss +83 -0
  1249. package/src/styles/sass/_utils.scss +296 -296
  1250. package/src/styles/sass/_variables.scss +114 -114
  1251. package/src/styles/sass/main.scss +11 -11
  1252. package/src/styles/utils.scss +5 -5
  1253. package/src/styles/variables.scss +4 -4
  1254. package/dist/chunks/ChartLegends-B4GXMq8u.esm.js +0 -30
  1255. package/dist/chunks/ChartLegends-B4GXMq8u.esm.js.map +0 -1
  1256. package/dist/chunks/ChartLegends-DcM5nrjg.js +0 -29
  1257. package/dist/chunks/ChartLegends-DcM5nrjg.js.map +0 -1
  1258. package/dist/chunks/DynamicDependentField-B8dllcaD.js +0 -127
  1259. package/dist/chunks/DynamicDependentField-B8dllcaD.js.map +0 -1
  1260. package/dist/chunks/DynamicDependentField-Bpa2Pmpl.esm.js +0 -128
  1261. package/dist/chunks/DynamicDependentField-Bpa2Pmpl.esm.js.map +0 -1
  1262. package/dist/chunks/ERPUIProvider-78z2sKPD.js +0 -129
  1263. package/dist/chunks/ERPUIProvider-78z2sKPD.js.map +0 -1
  1264. package/dist/chunks/ERPUIProvider-QC1rbfhk.esm.js +0 -130
  1265. package/dist/chunks/ERPUIProvider-QC1rbfhk.esm.js.map +0 -1
  1266. package/dist/chunks/FORMS-CDkS2C0J.js +0 -295
  1267. package/dist/chunks/FORMS-CDkS2C0J.js.map +0 -1
  1268. package/dist/chunks/FORMS-D5JqsK-A.esm.js +0 -296
  1269. package/dist/chunks/FORMS-D5JqsK-A.esm.js.map +0 -1
  1270. package/dist/chunks/FlexibleReduxExample-Ctu0-SWo.js +0 -148
  1271. package/dist/chunks/FlexibleReduxExample-Ctu0-SWo.js.map +0 -1
  1272. package/dist/chunks/FlexibleReduxExample-v6SRyEwk.esm.js +0 -149
  1273. package/dist/chunks/FlexibleReduxExample-v6SRyEwk.esm.js.map +0 -1
  1274. package/dist/chunks/SectionFlowEditor-DV3MfFLA.js +0 -5478
  1275. package/dist/chunks/SectionFlowEditor-DV3MfFLA.js.map +0 -1
  1276. package/dist/chunks/SectionFlowEditor-f5M4kOO2.esm.js +0 -5479
  1277. package/dist/chunks/SectionFlowEditor-f5M4kOO2.esm.js.map +0 -1
  1278. package/dist/chunks/Tooltip-2SPKKR77.js +0 -28
  1279. package/dist/chunks/Tooltip-2SPKKR77.js.map +0 -1
  1280. package/dist/chunks/Tooltip-C4ENi_0y.esm.js +0 -29
  1281. package/dist/chunks/Tooltip-C4ENi_0y.esm.js.map +0 -1
  1282. package/dist/chunks/accordion-CHRmZ97h.js +0 -52
  1283. package/dist/chunks/accordion-CHRmZ97h.js.map +0 -1
  1284. package/dist/chunks/accordion-DlkIh3BF.esm.js +0 -53
  1285. package/dist/chunks/accordion-DlkIh3BF.esm.js.map +0 -1
  1286. package/dist/chunks/action-bar-D0DzBTbr.esm.js +0 -660
  1287. package/dist/chunks/action-bar-D0DzBTbr.esm.js.map +0 -1
  1288. package/dist/chunks/action-bar-Sdwggg4-.js +0 -659
  1289. package/dist/chunks/action-bar-Sdwggg4-.js.map +0 -1
  1290. package/dist/chunks/activity-log-3DTR9uiM.esm.js +0 -103
  1291. package/dist/chunks/activity-log-3DTR9uiM.esm.js.map +0 -1
  1292. package/dist/chunks/activity-log-Hw1K_cMJ.js +0 -102
  1293. package/dist/chunks/activity-log-Hw1K_cMJ.js.map +0 -1
  1294. package/dist/chunks/activity-tag-CZN0DgQV.esm.js +0 -152
  1295. package/dist/chunks/activity-tag-CZN0DgQV.esm.js.map +0 -1
  1296. package/dist/chunks/activity-tag-CwjKG46V.js +0 -151
  1297. package/dist/chunks/activity-tag-CwjKG46V.js.map +0 -1
  1298. package/dist/chunks/activityArea-BSwK0nxT.esm.js +0 -19
  1299. package/dist/chunks/activityArea-BSwK0nxT.esm.js.map +0 -1
  1300. package/dist/chunks/activityArea-C9-Nfhjc.js +0 -18
  1301. package/dist/chunks/activityArea-C9-Nfhjc.js.map +0 -1
  1302. package/dist/chunks/add-filter-Ckn4mlgF.js +0 -34
  1303. package/dist/chunks/add-filter-Ckn4mlgF.js.map +0 -1
  1304. package/dist/chunks/add-filter-DfJzrzmB.esm.js +0 -35
  1305. package/dist/chunks/add-filter-DfJzrzmB.esm.js.map +0 -1
  1306. package/dist/chunks/add-group-CHJbmba2.esm.js +0 -35
  1307. package/dist/chunks/add-group-CHJbmba2.esm.js.map +0 -1
  1308. package/dist/chunks/add-group-DVH6RTnh.js +0 -34
  1309. package/dist/chunks/add-group-DVH6RTnh.js.map +0 -1
  1310. package/dist/chunks/add-page-4Mhq7-xK.js +0 -76
  1311. package/dist/chunks/add-page-4Mhq7-xK.js.map +0 -1
  1312. package/dist/chunks/add-page-Bu9Xd2_7.esm.js +0 -77
  1313. package/dist/chunks/add-page-Bu9Xd2_7.esm.js.map +0 -1
  1314. package/dist/chunks/add-page-modal-Dh7O4CUf.js +0 -83
  1315. package/dist/chunks/add-page-modal-Dh7O4CUf.js.map +0 -1
  1316. package/dist/chunks/add-page-modal-gFgr2t09.esm.js +0 -84
  1317. package/dist/chunks/add-page-modal-gFgr2t09.esm.js.map +0 -1
  1318. package/dist/chunks/add-template-BRtL1Csq.esm.js +0 -11
  1319. package/dist/chunks/add-template-BRtL1Csq.esm.js.map +0 -1
  1320. package/dist/chunks/add-template-CxU18unB.js +0 -10
  1321. package/dist/chunks/add-template-CxU18unB.js.map +0 -1
  1322. package/dist/chunks/address-modal-B2m_8W1f.js +0 -680
  1323. package/dist/chunks/address-modal-B2m_8W1f.js.map +0 -1
  1324. package/dist/chunks/address-modal-DtJyVXu6.esm.js +0 -664
  1325. package/dist/chunks/address-modal-DtJyVXu6.esm.js.map +0 -1
  1326. package/dist/chunks/ai-disclaimer-DAecPGGI.js +0 -18
  1327. package/dist/chunks/ai-disclaimer-DAecPGGI.js.map +0 -1
  1328. package/dist/chunks/ai-disclaimer-kOtXrSve.esm.js +0 -19
  1329. package/dist/chunks/ai-disclaimer-kOtXrSve.esm.js.map +0 -1
  1330. package/dist/chunks/ai-summary-CY8Sxr9w.js +0 -350
  1331. package/dist/chunks/ai-summary-CY8Sxr9w.js.map +0 -1
  1332. package/dist/chunks/ai-summary-DeaxFxZ1.esm.js +0 -351
  1333. package/dist/chunks/ai-summary-DeaxFxZ1.esm.js.map +0 -1
  1334. package/dist/chunks/appbar-ChGJ8Rse.esm.js +0 -57
  1335. package/dist/chunks/appbar-ChGJ8Rse.esm.js.map +0 -1
  1336. package/dist/chunks/appbar-NOJ5cWpF.js +0 -56
  1337. package/dist/chunks/appbar-NOJ5cWpF.js.map +0 -1
  1338. package/dist/chunks/approval-wrapper-CRtaHN2Z.esm.js +0 -140
  1339. package/dist/chunks/approval-wrapper-CRtaHN2Z.esm.js.map +0 -1
  1340. package/dist/chunks/approval-wrapper-DVZ1ilVi.js +0 -139
  1341. package/dist/chunks/approval-wrapper-DVZ1ilVi.js.map +0 -1
  1342. package/dist/chunks/areaLinerChart-D152JJx8.js +0 -120
  1343. package/dist/chunks/areaLinerChart-D152JJx8.js.map +0 -1
  1344. package/dist/chunks/areaLinerChart-M5YEwuyf.esm.js +0 -104
  1345. package/dist/chunks/areaLinerChart-M5YEwuyf.esm.js.map +0 -1
  1346. package/dist/chunks/brand-add-modal-DgX1IjMr.esm.js +0 -92
  1347. package/dist/chunks/brand-add-modal-DgX1IjMr.esm.js.map +0 -1
  1348. package/dist/chunks/brand-add-modal-LX1T3kkF.js +0 -108
  1349. package/dist/chunks/brand-add-modal-LX1T3kkF.js.map +0 -1
  1350. package/dist/chunks/button-BtdpXmjA.esm.js +0 -71
  1351. package/dist/chunks/button-BtdpXmjA.esm.js.map +0 -1
  1352. package/dist/chunks/button-CYiSRppg.js +0 -70
  1353. package/dist/chunks/button-CYiSRppg.js.map +0 -1
  1354. package/dist/chunks/button-Kr1nryDd.js +0 -19
  1355. package/dist/chunks/button-Kr1nryDd.js.map +0 -1
  1356. package/dist/chunks/button-i0exxOrL.esm.js +0 -20
  1357. package/dist/chunks/button-i0exxOrL.esm.js.map +0 -1
  1358. package/dist/chunks/calculation-summary-BhWssEJP.esm.js +0 -182
  1359. package/dist/chunks/calculation-summary-BhWssEJP.esm.js.map +0 -1
  1360. package/dist/chunks/calculation-summary-DdAaSwoG.js +0 -181
  1361. package/dist/chunks/calculation-summary-DdAaSwoG.js.map +0 -1
  1362. package/dist/chunks/category-add-modal-VHq3nNRZ.esm.js +0 -124
  1363. package/dist/chunks/category-add-modal-VHq3nNRZ.esm.js.map +0 -1
  1364. package/dist/chunks/category-add-modal-dkLz7btj.js +0 -140
  1365. package/dist/chunks/category-add-modal-dkLz7btj.js.map +0 -1
  1366. package/dist/chunks/change-password-BenyTwHh.js +0 -198
  1367. package/dist/chunks/change-password-BenyTwHh.js.map +0 -1
  1368. package/dist/chunks/change-password-Bxz7ccYY.esm.js +0 -182
  1369. package/dist/chunks/change-password-Bxz7ccYY.esm.js.map +0 -1
  1370. package/dist/chunks/change-user-password-modal-BB6ZIoCY.js +0 -135
  1371. package/dist/chunks/change-user-password-modal-BB6ZIoCY.js.map +0 -1
  1372. package/dist/chunks/change-user-password-modal-TxaYJcPe.esm.js +0 -119
  1373. package/dist/chunks/change-user-password-modal-TxaYJcPe.esm.js.map +0 -1
  1374. package/dist/chunks/chat-bot-BCtYs9xu.esm.js +0 -3547
  1375. package/dist/chunks/chat-bot-BCtYs9xu.esm.js.map +0 -1
  1376. package/dist/chunks/chat-bot-p4vm2Ap2.js +0 -3546
  1377. package/dist/chunks/chat-bot-p4vm2Ap2.js.map +0 -1
  1378. package/dist/chunks/chip-CPZBkY1x.js +0 -88
  1379. package/dist/chunks/chip-CPZBkY1x.js.map +0 -1
  1380. package/dist/chunks/chip-CrHuY2_O.esm.js +0 -89
  1381. package/dist/chunks/chip-CrHuY2_O.esm.js.map +0 -1
  1382. package/dist/chunks/chip-generator-BGXGiGyM.esm.js +0 -320
  1383. package/dist/chunks/chip-generator-BGXGiGyM.esm.js.map +0 -1
  1384. package/dist/chunks/chip-generator-CZoHjgXX.js +0 -319
  1385. package/dist/chunks/chip-generator-CZoHjgXX.js.map +0 -1
  1386. package/dist/chunks/chip-or-placeholder-C3aQyZ1k.js +0 -24
  1387. package/dist/chunks/chip-or-placeholder-C3aQyZ1k.js.map +0 -1
  1388. package/dist/chunks/chip-or-placeholder-CU_O7PFw.esm.js +0 -40
  1389. package/dist/chunks/chip-or-placeholder-CU_O7PFw.esm.js.map +0 -1
  1390. package/dist/chunks/chip-or-placeholder-KmtpCMm1.js +0 -39
  1391. package/dist/chunks/chip-or-placeholder-KmtpCMm1.js.map +0 -1
  1392. package/dist/chunks/chip-or-placeholder-PB9T7DKn.esm.js +0 -25
  1393. package/dist/chunks/chip-or-placeholder-PB9T7DKn.esm.js.map +0 -1
  1394. package/dist/chunks/column-width-DUiFD1ia.js +0 -87
  1395. package/dist/chunks/column-width-DUiFD1ia.js.map +0 -1
  1396. package/dist/chunks/column-width-yleuuXlA.esm.js +0 -88
  1397. package/dist/chunks/column-width-yleuuXlA.esm.js.map +0 -1
  1398. package/dist/chunks/combinator-select-CJxe_tir.esm.js +0 -31
  1399. package/dist/chunks/combinator-select-CJxe_tir.esm.js.map +0 -1
  1400. package/dist/chunks/combinator-select-F7rHYqc-.js +0 -30
  1401. package/dist/chunks/combinator-select-F7rHYqc-.js.map +0 -1
  1402. package/dist/chunks/common-utility-Cy_Y0xx4.esm.js +0 -299
  1403. package/dist/chunks/common-utility-Cy_Y0xx4.esm.js.map +0 -1
  1404. package/dist/chunks/common-utility-DiN8FYSv.js +0 -298
  1405. package/dist/chunks/common-utility-DiN8FYSv.js.map +0 -1
  1406. package/dist/chunks/company-selection-modal-B7jFVWWs.js +0 -82
  1407. package/dist/chunks/company-selection-modal-B7jFVWWs.js.map +0 -1
  1408. package/dist/chunks/company-selection-modal-Dn2L_skh.esm.js +0 -83
  1409. package/dist/chunks/company-selection-modal-Dn2L_skh.esm.js.map +0 -1
  1410. package/dist/chunks/confirm-modal-BpCtXddt.js +0 -82
  1411. package/dist/chunks/confirm-modal-BpCtXddt.js.map +0 -1
  1412. package/dist/chunks/confirm-modal-PbguB4YV.esm.js +0 -83
  1413. package/dist/chunks/confirm-modal-PbguB4YV.esm.js.map +0 -1
  1414. package/dist/chunks/contact-modal-Bmst_DoT.js +0 -205
  1415. package/dist/chunks/contact-modal-Bmst_DoT.js.map +0 -1
  1416. package/dist/chunks/contact-modal-Dphrlh8A.esm.js +0 -189
  1417. package/dist/chunks/contact-modal-Dphrlh8A.esm.js.map +0 -1
  1418. package/dist/chunks/controller-select-D8Bg1HSD.esm.js +0 -163
  1419. package/dist/chunks/controller-select-D8Bg1HSD.esm.js.map +0 -1
  1420. package/dist/chunks/controller-select-zYh5kHod.js +0 -162
  1421. package/dist/chunks/controller-select-zYh5kHod.js.map +0 -1
  1422. package/dist/chunks/country-select-7O1QZnGs.js +0 -68
  1423. package/dist/chunks/country-select-7O1QZnGs.js.map +0 -1
  1424. package/dist/chunks/country-select-DrUfDTlh.esm.js +0 -69
  1425. package/dist/chunks/country-select-DrUfDTlh.esm.js.map +0 -1
  1426. package/dist/chunks/custom-date-picker-Bj_9n8p8.esm.js +0 -56
  1427. package/dist/chunks/custom-date-picker-Bj_9n8p8.esm.js.map +0 -1
  1428. package/dist/chunks/custom-date-picker-Dt54H6AR.js +0 -55
  1429. package/dist/chunks/custom-date-picker-Dt54H6AR.js.map +0 -1
  1430. package/dist/chunks/custom-form-C7zHxMLq.esm.js +0 -1146
  1431. package/dist/chunks/custom-form-C7zHxMLq.esm.js.map +0 -1
  1432. package/dist/chunks/custom-form-D3cakAj0.js +0 -1145
  1433. package/dist/chunks/custom-form-D3cakAj0.js.map +0 -1
  1434. package/dist/chunks/custom-grid-card-25R5RDYY.js +0 -126
  1435. package/dist/chunks/custom-grid-card-25R5RDYY.js.map +0 -1
  1436. package/dist/chunks/custom-grid-card-ChSQynhf.esm.js +0 -127
  1437. package/dist/chunks/custom-grid-card-ChSQynhf.esm.js.map +0 -1
  1438. package/dist/chunks/custom-snackbar-C9owxdyI.js +0 -114
  1439. package/dist/chunks/custom-snackbar-C9owxdyI.js.map +0 -1
  1440. package/dist/chunks/custom-snackbar-mSHHtSAs.esm.js +0 -115
  1441. package/dist/chunks/custom-snackbar-mSHHtSAs.esm.js.map +0 -1
  1442. package/dist/chunks/custom-toggle-switch-C3xov22c.js +0 -117
  1443. package/dist/chunks/custom-toggle-switch-C3xov22c.js.map +0 -1
  1444. package/dist/chunks/custom-toggle-switch-CE-IEv7K.esm.js +0 -118
  1445. package/dist/chunks/custom-toggle-switch-CE-IEv7K.esm.js.map +0 -1
  1446. package/dist/chunks/dashboard-6SwOiSiz.esm.js +0 -75
  1447. package/dist/chunks/dashboard-6SwOiSiz.esm.js.map +0 -1
  1448. package/dist/chunks/dashboard-CQY4iEt9.js +0 -74
  1449. package/dist/chunks/dashboard-CQY4iEt9.js.map +0 -1
  1450. package/dist/chunks/dashboard-card-Bq0P-n-e.js +0 -16
  1451. package/dist/chunks/dashboard-card-Bq0P-n-e.js.map +0 -1
  1452. package/dist/chunks/dashboard-card-CGOGwGd4.esm.js +0 -17
  1453. package/dist/chunks/dashboard-card-CGOGwGd4.esm.js.map +0 -1
  1454. package/dist/chunks/dashboard-header-CCrIQfSb.js +0 -66
  1455. package/dist/chunks/dashboard-header-CCrIQfSb.js.map +0 -1
  1456. package/dist/chunks/dashboard-header-j8qU_a5o.esm.js +0 -67
  1457. package/dist/chunks/dashboard-header-j8qU_a5o.esm.js.map +0 -1
  1458. package/dist/chunks/date-BEkOnPLg.js +0 -55
  1459. package/dist/chunks/date-BEkOnPLg.js.map +0 -1
  1460. package/dist/chunks/date-DWW33q1y.esm.js +0 -56
  1461. package/dist/chunks/date-DWW33q1y.esm.js.map +0 -1
  1462. package/dist/chunks/date-picker-C0qJ2Ceq.js +0 -127
  1463. package/dist/chunks/date-picker-C0qJ2Ceq.js.map +0 -1
  1464. package/dist/chunks/date-picker-CqiwV3fq.esm.js +0 -128
  1465. package/dist/chunks/date-picker-CqiwV3fq.esm.js.map +0 -1
  1466. package/dist/chunks/date-time-Bmf9tUWN.js +0 -54
  1467. package/dist/chunks/date-time-Bmf9tUWN.js.map +0 -1
  1468. package/dist/chunks/date-time-TwBpGcVi.esm.js +0 -55
  1469. package/dist/chunks/date-time-TwBpGcVi.esm.js.map +0 -1
  1470. package/dist/chunks/date-time-picker-BiVDvz7V.esm.js +0 -115
  1471. package/dist/chunks/date-time-picker-BiVDvz7V.esm.js.map +0 -1
  1472. package/dist/chunks/date-time-picker-HC1XkaJG.js +0 -114
  1473. package/dist/chunks/date-time-picker-HC1XkaJG.js.map +0 -1
  1474. package/dist/chunks/delete-group-DaaCveWI.esm.js +0 -28
  1475. package/dist/chunks/delete-group-DaaCveWI.esm.js.map +0 -1
  1476. package/dist/chunks/delete-group-s9sZasnn.js +0 -27
  1477. package/dist/chunks/delete-group-s9sZasnn.js.map +0 -1
  1478. package/dist/chunks/detail-drawer-hBSrLTZn.js +0 -258
  1479. package/dist/chunks/detail-drawer-hBSrLTZn.js.map +0 -1
  1480. package/dist/chunks/detail-drawer-pQs33XEw.esm.js +0 -259
  1481. package/dist/chunks/detail-drawer-pQs33XEw.esm.js.map +0 -1
  1482. package/dist/chunks/discount-summary-Cfxk2tZa.esm.js +0 -60
  1483. package/dist/chunks/discount-summary-Cfxk2tZa.esm.js.map +0 -1
  1484. package/dist/chunks/discount-summary-RCy2t_AM.js +0 -59
  1485. package/dist/chunks/discount-summary-RCy2t_AM.js.map +0 -1
  1486. package/dist/chunks/document-preview-CeP63tE-.esm.js +0 -144
  1487. package/dist/chunks/document-preview-CeP63tE-.esm.js.map +0 -1
  1488. package/dist/chunks/document-preview-L4uj-kbX.js +0 -143
  1489. package/dist/chunks/document-preview-L4uj-kbX.js.map +0 -1
  1490. package/dist/chunks/donut-chart-BUGQ6PrG.esm.js +0 -107
  1491. package/dist/chunks/donut-chart-BUGQ6PrG.esm.js.map +0 -1
  1492. package/dist/chunks/donut-chart-D_uzKul7.js +0 -123
  1493. package/dist/chunks/donut-chart-D_uzKul7.js.map +0 -1
  1494. package/dist/chunks/dropdown-button-BwOoxO0G.esm.js +0 -146
  1495. package/dist/chunks/dropdown-button-BwOoxO0G.esm.js.map +0 -1
  1496. package/dist/chunks/dropdown-button-CGs2RJcs.js +0 -162
  1497. package/dist/chunks/dropdown-button-CGs2RJcs.js.map +0 -1
  1498. package/dist/chunks/dynamic-layout-wrapper-3eOKobbc.esm.js +0 -229
  1499. package/dist/chunks/dynamic-layout-wrapper-3eOKobbc.esm.js.map +0 -1
  1500. package/dist/chunks/dynamic-layout-wrapper-YeVjwZVX.js +0 -228
  1501. package/dist/chunks/dynamic-layout-wrapper-YeVjwZVX.js.map +0 -1
  1502. package/dist/chunks/dynamic-modal-CbaBm-rg.esm.js +0 -78
  1503. package/dist/chunks/dynamic-modal-CbaBm-rg.esm.js.map +0 -1
  1504. package/dist/chunks/dynamic-modal-PC4ONX2X.js +0 -77
  1505. package/dist/chunks/dynamic-modal-PC4ONX2X.js.map +0 -1
  1506. package/dist/chunks/dynamic-report-8QMsk-vY.esm.js +0 -589
  1507. package/dist/chunks/dynamic-report-8QMsk-vY.esm.js.map +0 -1
  1508. package/dist/chunks/dynamic-report-DZWN4KdJ.js +0 -588
  1509. package/dist/chunks/dynamic-report-DZWN4KdJ.js.map +0 -1
  1510. package/dist/chunks/dynamic-rows-B4rVdKeI.js +0 -249
  1511. package/dist/chunks/dynamic-rows-B4rVdKeI.js.map +0 -1
  1512. package/dist/chunks/dynamic-rows-s_XGjd2Z.esm.js +0 -250
  1513. package/dist/chunks/dynamic-rows-s_XGjd2Z.esm.js.map +0 -1
  1514. package/dist/chunks/dynamic-tags-input-CwF4Mm_r.esm.js +0 -77
  1515. package/dist/chunks/dynamic-tags-input-CwF4Mm_r.esm.js.map +0 -1
  1516. package/dist/chunks/dynamic-tags-input-DEaIUdTX.js +0 -76
  1517. package/dist/chunks/dynamic-tags-input-DEaIUdTX.js.map +0 -1
  1518. package/dist/chunks/edit-section-modal-B3gtnrOQ.js +0 -76
  1519. package/dist/chunks/edit-section-modal-B3gtnrOQ.js.map +0 -1
  1520. package/dist/chunks/edit-section-modal-CKE2_Mlw.esm.js +0 -77
  1521. package/dist/chunks/edit-section-modal-CKE2_Mlw.esm.js.map +0 -1
  1522. package/dist/chunks/element-controller-CR-qXwHZ.js +0 -85
  1523. package/dist/chunks/element-controller-CR-qXwHZ.js.map +0 -1
  1524. package/dist/chunks/element-controller-D2ZWOJk6.esm.js +0 -86
  1525. package/dist/chunks/element-controller-D2ZWOJk6.esm.js.map +0 -1
  1526. package/dist/chunks/entity-view-wrapper-DEMLj0qw.js +0 -47
  1527. package/dist/chunks/entity-view-wrapper-DEMLj0qw.js.map +0 -1
  1528. package/dist/chunks/entity-view-wrapper-DNXKvSrU.esm.js +0 -48
  1529. package/dist/chunks/entity-view-wrapper-DNXKvSrU.esm.js.map +0 -1
  1530. package/dist/chunks/erp-loader-CFXstBcW.esm.js +0 -15
  1531. package/dist/chunks/erp-loader-CFXstBcW.esm.js.map +0 -1
  1532. package/dist/chunks/erp-loader-Ca8C6S9x.js +0 -14
  1533. package/dist/chunks/erp-loader-Ca8C6S9x.js.map +0 -1
  1534. package/dist/chunks/expandable-summary-wrapper-DI-D5_ha.js +0 -241
  1535. package/dist/chunks/expandable-summary-wrapper-DI-D5_ha.js.map +0 -1
  1536. package/dist/chunks/expandable-summary-wrapper-srr2ugND.esm.js +0 -242
  1537. package/dist/chunks/expandable-summary-wrapper-srr2ugND.esm.js.map +0 -1
  1538. package/dist/chunks/field-select-CSW9YvY5.js +0 -65
  1539. package/dist/chunks/field-select-CSW9YvY5.js.map +0 -1
  1540. package/dist/chunks/field-select-Da0SqSbF.esm.js +0 -66
  1541. package/dist/chunks/field-select-Da0SqSbF.esm.js.map +0 -1
  1542. package/dist/chunks/file-confirmation-B5dsa_IM.js +0 -36
  1543. package/dist/chunks/file-confirmation-B5dsa_IM.js.map +0 -1
  1544. package/dist/chunks/file-confirmation-BIvdtaUo.esm.js +0 -37
  1545. package/dist/chunks/file-confirmation-BIvdtaUo.esm.js.map +0 -1
  1546. package/dist/chunks/file-confirmation-BfofOPnR.esm.js +0 -34
  1547. package/dist/chunks/file-confirmation-BfofOPnR.esm.js.map +0 -1
  1548. package/dist/chunks/file-confirmation-EAG0gSvW.js +0 -33
  1549. package/dist/chunks/file-confirmation-EAG0gSvW.js.map +0 -1
  1550. package/dist/chunks/filter--uVB8hUt.esm.js +0 -415
  1551. package/dist/chunks/filter--uVB8hUt.esm.js.map +0 -1
  1552. package/dist/chunks/filter-B6HhZxRs.js +0 -414
  1553. package/dist/chunks/filter-B6HhZxRs.js.map +0 -1
  1554. package/dist/chunks/footer-BNNFMlSh.esm.js +0 -64
  1555. package/dist/chunks/footer-BNNFMlSh.esm.js.map +0 -1
  1556. package/dist/chunks/footer-BxgPafOy.js +0 -63
  1557. package/dist/chunks/footer-BxgPafOy.js.map +0 -1
  1558. package/dist/chunks/forgot-password-DakmRriu.js +0 -193
  1559. package/dist/chunks/forgot-password-DakmRriu.js.map +0 -1
  1560. package/dist/chunks/forgot-password-Dc4dVSLx.esm.js +0 -177
  1561. package/dist/chunks/forgot-password-Dc4dVSLx.esm.js.map +0 -1
  1562. package/dist/chunks/form-fields-Co6MK4qD.js +0 -354
  1563. package/dist/chunks/form-fields-Co6MK4qD.js.map +0 -1
  1564. package/dist/chunks/form-fields-Dy5nowYk.esm.js +0 -355
  1565. package/dist/chunks/form-fields-Dy5nowYk.esm.js.map +0 -1
  1566. package/dist/chunks/form-loader-DpIR10fO.esm.js +0 -27
  1567. package/dist/chunks/form-loader-DpIR10fO.esm.js.map +0 -1
  1568. package/dist/chunks/form-loader-Y9ctFw-1.js +0 -26
  1569. package/dist/chunks/form-loader-Y9ctFw-1.js.map +0 -1
  1570. package/dist/chunks/form-parser-D7Mq3Sd1.js +0 -607
  1571. package/dist/chunks/form-parser-D7Mq3Sd1.js.map +0 -1
  1572. package/dist/chunks/form-parser-mWvXcXR_.esm.js +0 -591
  1573. package/dist/chunks/form-parser-mWvXcXR_.esm.js.map +0 -1
  1574. package/dist/chunks/form-section-Dk8pCoyF.esm.js +0 -476
  1575. package/dist/chunks/form-section-Dk8pCoyF.esm.js.map +0 -1
  1576. package/dist/chunks/form-section-TJWkgLu5.js +0 -475
  1577. package/dist/chunks/form-section-TJWkgLu5.js.map +0 -1
  1578. package/dist/chunks/form-switcher-BkC784Rb.js +0 -61
  1579. package/dist/chunks/form-switcher-BkC784Rb.js.map +0 -1
  1580. package/dist/chunks/form-switcher-DeIv-bQS.esm.js +0 -62
  1581. package/dist/chunks/form-switcher-DeIv-bQS.esm.js.map +0 -1
  1582. package/dist/chunks/fullScreen-CUhSVTnx.js +0 -20
  1583. package/dist/chunks/fullScreen-CUhSVTnx.js.map +0 -1
  1584. package/dist/chunks/fullScreen-DvJJw6jm.esm.js +0 -21
  1585. package/dist/chunks/fullScreen-DvJJw6jm.esm.js.map +0 -1
  1586. package/dist/chunks/global-search-BwWU45Bm.js +0 -149
  1587. package/dist/chunks/global-search-BwWU45Bm.js.map +0 -1
  1588. package/dist/chunks/global-search-CTpvtwNX.esm.js +0 -150
  1589. package/dist/chunks/global-search-CTpvtwNX.esm.js.map +0 -1
  1590. package/dist/chunks/grid-card-BLwyzL-3.js +0 -100
  1591. package/dist/chunks/grid-card-BLwyzL-3.js.map +0 -1
  1592. package/dist/chunks/grid-card-BYOWngMT.esm.js +0 -101
  1593. package/dist/chunks/grid-card-BYOWngMT.esm.js.map +0 -1
  1594. package/dist/chunks/grid-view-D7uNs1dz.esm.js +0 -52
  1595. package/dist/chunks/grid-view-D7uNs1dz.esm.js.map +0 -1
  1596. package/dist/chunks/grid-view-Dp9R1Cik.js +0 -51
  1597. package/dist/chunks/grid-view-Dp9R1Cik.js.map +0 -1
  1598. package/dist/chunks/grid-wrapper-CeQKd_Gw.js +0 -16
  1599. package/dist/chunks/grid-wrapper-CeQKd_Gw.js.map +0 -1
  1600. package/dist/chunks/grid-wrapper-x2Rr-M3N.esm.js +0 -17
  1601. package/dist/chunks/grid-wrapper-x2Rr-M3N.esm.js.map +0 -1
  1602. package/dist/chunks/header-9D0sUYAd.js +0 -90
  1603. package/dist/chunks/header-9D0sUYAd.js.map +0 -1
  1604. package/dist/chunks/header-BSyy4wDW.esm.js +0 -91
  1605. package/dist/chunks/header-BSyy4wDW.esm.js.map +0 -1
  1606. package/dist/chunks/header-enhanced-BRLaeZfG.js +0 -400
  1607. package/dist/chunks/header-enhanced-BRLaeZfG.js.map +0 -1
  1608. package/dist/chunks/header-enhanced-DMblko0m.esm.js +0 -401
  1609. package/dist/chunks/header-enhanced-DMblko0m.esm.js.map +0 -1
  1610. package/dist/chunks/industry-add-modal-2Yr47uQQ.esm.js +0 -110
  1611. package/dist/chunks/industry-add-modal-2Yr47uQQ.esm.js.map +0 -1
  1612. package/dist/chunks/industry-add-modal-BT1pnS-Q.js +0 -126
  1613. package/dist/chunks/industry-add-modal-BT1pnS-Q.js.map +0 -1
  1614. package/dist/chunks/inline-edit-fields-CRjOrdCm.js +0 -340
  1615. package/dist/chunks/inline-edit-fields-CRjOrdCm.js.map +0 -1
  1616. package/dist/chunks/inline-edit-fields-Wxl4rzUb.esm.js +0 -324
  1617. package/dist/chunks/inline-edit-fields-Wxl4rzUb.esm.js.map +0 -1
  1618. package/dist/chunks/inventory-reports-title-bar-BK4DbdX5.esm.js +0 -733
  1619. package/dist/chunks/inventory-reports-title-bar-BK4DbdX5.esm.js.map +0 -1
  1620. package/dist/chunks/inventory-reports-title-bar-T2N3SmFL.js +0 -732
  1621. package/dist/chunks/inventory-reports-title-bar-T2N3SmFL.js.map +0 -1
  1622. package/dist/chunks/item-response-details-CCXBczDN.js +0 -78
  1623. package/dist/chunks/item-response-details-CCXBczDN.js.map +0 -1
  1624. package/dist/chunks/item-response-details-ghi6e2Kh.esm.js +0 -79
  1625. package/dist/chunks/item-response-details-ghi6e2Kh.esm.js.map +0 -1
  1626. package/dist/chunks/items-summary-COPZ_iG8.js +0 -36
  1627. package/dist/chunks/items-summary-COPZ_iG8.js.map +0 -1
  1628. package/dist/chunks/items-summary-Dc_r93ri.esm.js +0 -37
  1629. package/dist/chunks/items-summary-Dc_r93ri.esm.js.map +0 -1
  1630. package/dist/chunks/journal-type-add-modal-Ddchnat5.js +0 -128
  1631. package/dist/chunks/journal-type-add-modal-Ddchnat5.js.map +0 -1
  1632. package/dist/chunks/journal-type-add-modal-VLo8HVRR.esm.js +0 -112
  1633. package/dist/chunks/journal-type-add-modal-VLo8HVRR.esm.js.map +0 -1
  1634. package/dist/chunks/listing-CORlSp_a.esm.js +0 -276
  1635. package/dist/chunks/listing-CORlSp_a.esm.js.map +0 -1
  1636. package/dist/chunks/listing-hj17tvsG.js +0 -275
  1637. package/dist/chunks/listing-hj17tvsG.js.map +0 -1
  1638. package/dist/chunks/location-select-B322V2tM.esm.js +0 -86
  1639. package/dist/chunks/location-select-B322V2tM.esm.js.map +0 -1
  1640. package/dist/chunks/location-select-BdbLMcqd.js +0 -85
  1641. package/dist/chunks/location-select-BdbLMcqd.js.map +0 -1
  1642. package/dist/chunks/material-editable-table-6_n1LvzD.js +0 -1485
  1643. package/dist/chunks/material-editable-table-6_n1LvzD.js.map +0 -1
  1644. package/dist/chunks/material-editable-table-BDRQxkq2.esm.js +0 -1469
  1645. package/dist/chunks/material-editable-table-BDRQxkq2.esm.js.map +0 -1
  1646. package/dist/chunks/media-Bba1HXPh.esm.js +0 -45
  1647. package/dist/chunks/media-Bba1HXPh.esm.js.map +0 -1
  1648. package/dist/chunks/media-D-ytT_Dz.js +0 -44
  1649. package/dist/chunks/media-D-ytT_Dz.js.map +0 -1
  1650. package/dist/chunks/modal-DCla9U60.esm.js +0 -26
  1651. package/dist/chunks/modal-DCla9U60.esm.js.map +0 -1
  1652. package/dist/chunks/modal-DSRF4Kmh.js +0 -25
  1653. package/dist/chunks/modal-DSRF4Kmh.js.map +0 -1
  1654. package/dist/chunks/modal-loader-B8S5-RWv.esm.js +0 -27
  1655. package/dist/chunks/modal-loader-B8S5-RWv.esm.js.map +0 -1
  1656. package/dist/chunks/modal-loader-hJvPfA_7.js +0 -26
  1657. package/dist/chunks/modal-loader-hJvPfA_7.js.map +0 -1
  1658. package/dist/chunks/module-skeleton-B3t-SF2a.js +0 -178
  1659. package/dist/chunks/module-skeleton-B3t-SF2a.js.map +0 -1
  1660. package/dist/chunks/module-skeleton-DGYvAX5H.esm.js +0 -179
  1661. package/dist/chunks/module-skeleton-DGYvAX5H.esm.js.map +0 -1
  1662. package/dist/chunks/mui.constants-BFBzxaiA.esm.js +0 -5
  1663. package/dist/chunks/mui.constants-BFBzxaiA.esm.js.map +0 -1
  1664. package/dist/chunks/mui.constants-CJEIUmWO.js +0 -4
  1665. package/dist/chunks/mui.constants-CJEIUmWO.js.map +0 -1
  1666. package/dist/chunks/multi-select-6Eek-kki.esm.js +0 -237
  1667. package/dist/chunks/multi-select-6Eek-kki.esm.js.map +0 -1
  1668. package/dist/chunks/multi-select-Cwrh7yg_.js +0 -236
  1669. package/dist/chunks/multi-select-Cwrh7yg_.js.map +0 -1
  1670. package/dist/chunks/multiline-Bsz2D2qc.js +0 -59
  1671. package/dist/chunks/multiline-Bsz2D2qc.js.map +0 -1
  1672. package/dist/chunks/multiline-Dhdlnw2H.esm.js +0 -60
  1673. package/dist/chunks/multiline-Dhdlnw2H.esm.js.map +0 -1
  1674. package/dist/chunks/notification-menu-C0VTMOWY.esm.js +0 -601
  1675. package/dist/chunks/notification-menu-C0VTMOWY.esm.js.map +0 -1
  1676. package/dist/chunks/notification-menu-DebEwEox.js +0 -600
  1677. package/dist/chunks/notification-menu-DebEwEox.js.map +0 -1
  1678. package/dist/chunks/operator-select-B0zEa7Ul.esm.js +0 -32
  1679. package/dist/chunks/operator-select-B0zEa7Ul.esm.js.map +0 -1
  1680. package/dist/chunks/operator-select-CBipeNV9.js +0 -31
  1681. package/dist/chunks/operator-select-CBipeNV9.js.map +0 -1
  1682. package/dist/chunks/page-action-Bhgp3VwU.js +0 -324
  1683. package/dist/chunks/page-action-Bhgp3VwU.js.map +0 -1
  1684. package/dist/chunks/page-action-D79l41CZ.esm.js +0 -325
  1685. package/dist/chunks/page-action-D79l41CZ.esm.js.map +0 -1
  1686. package/dist/chunks/page-loader-B5Tz39wg.esm.js +0 -15
  1687. package/dist/chunks/page-loader-B5Tz39wg.esm.js.map +0 -1
  1688. package/dist/chunks/page-loader-DoIAjHMe.js +0 -14
  1689. package/dist/chunks/page-loader-DoIAjHMe.js.map +0 -1
  1690. package/dist/chunks/page-navigator-CFb3AekX.esm.js +0 -243
  1691. package/dist/chunks/page-navigator-CFb3AekX.esm.js.map +0 -1
  1692. package/dist/chunks/page-navigator-RyiSLjYf.js +0 -242
  1693. package/dist/chunks/page-navigator-RyiSLjYf.js.map +0 -1
  1694. package/dist/chunks/page-skeleton-CTVev4qf.js +0 -72
  1695. package/dist/chunks/page-skeleton-CTVev4qf.js.map +0 -1
  1696. package/dist/chunks/page-skeleton-DRUJi2fG.esm.js +0 -73
  1697. package/dist/chunks/page-skeleton-DRUJi2fG.esm.js.map +0 -1
  1698. package/dist/chunks/page-view-B_-lOYvf.js +0 -323
  1699. package/dist/chunks/page-view-B_-lOYvf.js.map +0 -1
  1700. package/dist/chunks/page-view-DT57mnAK.esm.js +0 -324
  1701. package/dist/chunks/page-view-DT57mnAK.esm.js.map +0 -1
  1702. package/dist/chunks/pagination-Cxgus1Zm.esm.js +0 -135
  1703. package/dist/chunks/pagination-Cxgus1Zm.esm.js.map +0 -1
  1704. package/dist/chunks/pagination-teOvHbVT.js +0 -134
  1705. package/dist/chunks/pagination-teOvHbVT.js.map +0 -1
  1706. package/dist/chunks/phone-4yVXJQwX.esm.js +0 -38
  1707. package/dist/chunks/phone-4yVXJQwX.esm.js.map +0 -1
  1708. package/dist/chunks/phone-JFLN7D7A.js +0 -37
  1709. package/dist/chunks/phone-JFLN7D7A.js.map +0 -1
  1710. package/dist/chunks/phone-input-BwrkhpbY.js +0 -283
  1711. package/dist/chunks/phone-input-BwrkhpbY.js.map +0 -1
  1712. package/dist/chunks/phone-input-CUBzAgfr.esm.js +0 -284
  1713. package/dist/chunks/phone-input-CUBzAgfr.esm.js.map +0 -1
  1714. package/dist/chunks/protected-route-CyXqqD-0.js +0 -134
  1715. package/dist/chunks/protected-route-CyXqqD-0.js.map +0 -1
  1716. package/dist/chunks/protected-route-DYJ3vyHs.esm.js +0 -135
  1717. package/dist/chunks/protected-route-DYJ3vyHs.esm.js.map +0 -1
  1718. package/dist/chunks/quick-approval-modal-DLsb-8S5.esm.js +0 -256
  1719. package/dist/chunks/quick-approval-modal-DLsb-8S5.esm.js.map +0 -1
  1720. package/dist/chunks/quick-approval-modal-DSpziG73.js +0 -272
  1721. package/dist/chunks/quick-approval-modal-DSpziG73.js.map +0 -1
  1722. package/dist/chunks/radio-button-CCVMuvMJ.js +0 -124
  1723. package/dist/chunks/radio-button-CCVMuvMJ.js.map +0 -1
  1724. package/dist/chunks/radio-button-CJcVVXzv.esm.js +0 -125
  1725. package/dist/chunks/radio-button-CJcVVXzv.esm.js.map +0 -1
  1726. package/dist/chunks/report-buttons-9reoQ_LT.js +0 -45
  1727. package/dist/chunks/report-buttons-9reoQ_LT.js.map +0 -1
  1728. package/dist/chunks/report-buttons-C06BIdDM.esm.js +0 -46
  1729. package/dist/chunks/report-buttons-C06BIdDM.esm.js.map +0 -1
  1730. package/dist/chunks/report-buttons-JZvDOTpb.js +0 -59
  1731. package/dist/chunks/report-buttons-JZvDOTpb.js.map +0 -1
  1732. package/dist/chunks/report-buttons-d1KxsAQD.esm.js +0 -60
  1733. package/dist/chunks/report-buttons-d1KxsAQD.esm.js.map +0 -1
  1734. package/dist/chunks/reportFilter-CqxvTM6T.js +0 -394
  1735. package/dist/chunks/reportFilter-CqxvTM6T.js.map +0 -1
  1736. package/dist/chunks/reportFilter-DTsM7pWt.esm.js +0 -395
  1737. package/dist/chunks/reportFilter-DTsM7pWt.esm.js.map +0 -1
  1738. package/dist/chunks/reports-title-bar-BUWVSD-G.esm.js +0 -1016
  1739. package/dist/chunks/reports-title-bar-BUWVSD-G.esm.js.map +0 -1
  1740. package/dist/chunks/reports-title-bar-BacN9c2m.js +0 -1015
  1741. package/dist/chunks/reports-title-bar-BacN9c2m.js.map +0 -1
  1742. package/dist/chunks/reset-password-modal-D_hnpcKu.js +0 -160
  1743. package/dist/chunks/reset-password-modal-D_hnpcKu.js.map +0 -1
  1744. package/dist/chunks/reset-password-modal-x82f8yfU.esm.js +0 -144
  1745. package/dist/chunks/reset-password-modal-x82f8yfU.esm.js.map +0 -1
  1746. package/dist/chunks/routes-Byvjk26N.esm.js +0 -47
  1747. package/dist/chunks/routes-Byvjk26N.esm.js.map +0 -1
  1748. package/dist/chunks/routes-Donz-BtO.js +0 -46
  1749. package/dist/chunks/routes-Donz-BtO.js.map +0 -1
  1750. package/dist/chunks/save-filter-modal-DUJ9-RJb.esm.js +0 -68
  1751. package/dist/chunks/save-filter-modal-DUJ9-RJb.esm.js.map +0 -1
  1752. package/dist/chunks/save-filter-modal-Da5N6i6s.js +0 -67
  1753. package/dist/chunks/save-filter-modal-Da5N6i6s.js.map +0 -1
  1754. package/dist/chunks/schedule-report-Cgm8W4WS.js +0 -235
  1755. package/dist/chunks/schedule-report-Cgm8W4WS.js.map +0 -1
  1756. package/dist/chunks/schedule-report-D9-Wun1T.esm.js +0 -236
  1757. package/dist/chunks/schedule-report-D9-Wun1T.esm.js.map +0 -1
  1758. package/dist/chunks/schedule-report-modal-C9_CyRGY.esm.js +0 -288
  1759. package/dist/chunks/schedule-report-modal-C9_CyRGY.esm.js.map +0 -1
  1760. package/dist/chunks/schedule-report-modal-smFSeQ9E.js +0 -287
  1761. package/dist/chunks/schedule-report-modal-smFSeQ9E.js.map +0 -1
  1762. package/dist/chunks/search-bar-B9qZQual.esm.js +0 -127
  1763. package/dist/chunks/search-bar-B9qZQual.esm.js.map +0 -1
  1764. package/dist/chunks/search-bar-CKXyIa-m.js +0 -126
  1765. package/dist/chunks/search-bar-CKXyIa-m.js.map +0 -1
  1766. package/dist/chunks/searchable-select-8AgyDXwY.esm.js +0 -5431
  1767. package/dist/chunks/searchable-select-8AgyDXwY.esm.js.map +0 -1
  1768. package/dist/chunks/searchable-select-Ce4r6ddr.js +0 -5447
  1769. package/dist/chunks/searchable-select-Ce4r6ddr.js.map +0 -1
  1770. package/dist/chunks/section-B3Nomltn.js +0 -97
  1771. package/dist/chunks/section-B3Nomltn.js.map +0 -1
  1772. package/dist/chunks/section-DSW0gUko.esm.js +0 -98
  1773. package/dist/chunks/section-DSW0gUko.esm.js.map +0 -1
  1774. package/dist/chunks/select-8090TkKk.esm.js +0 -233
  1775. package/dist/chunks/select-8090TkKk.esm.js.map +0 -1
  1776. package/dist/chunks/select-B0WWMf6p.js +0 -232
  1777. package/dist/chunks/select-B0WWMf6p.js.map +0 -1
  1778. package/dist/chunks/select-CVxEdXzL.esm.js +0 -174
  1779. package/dist/chunks/select-CVxEdXzL.esm.js.map +0 -1
  1780. package/dist/chunks/select-xEdBPnWK.js +0 -173
  1781. package/dist/chunks/select-xEdBPnWK.js.map +0 -1
  1782. package/dist/chunks/share-modal--YjE6ifA.js +0 -217
  1783. package/dist/chunks/share-modal--YjE6ifA.js.map +0 -1
  1784. package/dist/chunks/share-modal-Dh3-PB-I.esm.js +0 -218
  1785. package/dist/chunks/share-modal-Dh3-PB-I.esm.js.map +0 -1
  1786. package/dist/chunks/share-modal-enhanced-BVgaxfCr.esm.js +0 -270
  1787. package/dist/chunks/share-modal-enhanced-BVgaxfCr.esm.js.map +0 -1
  1788. package/dist/chunks/share-modal-enhanced-BgK7LdiZ.js +0 -269
  1789. package/dist/chunks/share-modal-enhanced-BgK7LdiZ.js.map +0 -1
  1790. package/dist/chunks/shared-page-modal-B5gjjYSO.esm.js +0 -202
  1791. package/dist/chunks/shared-page-modal-B5gjjYSO.esm.js.map +0 -1
  1792. package/dist/chunks/shared-page-modal-D_Wy0FGc.js +0 -201
  1793. package/dist/chunks/shared-page-modal-D_Wy0FGc.js.map +0 -1
  1794. package/dist/chunks/sidebar-BlK70C6Y.esm.js +0 -882
  1795. package/dist/chunks/sidebar-BlK70C6Y.esm.js.map +0 -1
  1796. package/dist/chunks/sidebar-DQ3VIPSE.js +0 -881
  1797. package/dist/chunks/sidebar-DQ3VIPSE.js.map +0 -1
  1798. package/dist/chunks/sidebarScreen-Cr11x8sq.js +0 -200
  1799. package/dist/chunks/sidebarScreen-Cr11x8sq.js.map +0 -1
  1800. package/dist/chunks/sidebarScreen-DZJ5mYzP.esm.js +0 -201
  1801. package/dist/chunks/sidebarScreen-DZJ5mYzP.esm.js.map +0 -1
  1802. package/dist/chunks/source-type-add-modal-By-lqgzu.esm.js +0 -136
  1803. package/dist/chunks/source-type-add-modal-By-lqgzu.esm.js.map +0 -1
  1804. package/dist/chunks/source-type-add-modal-oc3hXRtC.js +0 -152
  1805. package/dist/chunks/source-type-add-modal-oc3hXRtC.js.map +0 -1
  1806. package/dist/chunks/sub-header-doc-B_k8UbyV.esm.js +0 -20
  1807. package/dist/chunks/sub-header-doc-B_k8UbyV.esm.js.map +0 -1
  1808. package/dist/chunks/sub-header-doc-stqzJ5aX.js +0 -19
  1809. package/dist/chunks/sub-header-doc-stqzJ5aX.js.map +0 -1
  1810. package/dist/chunks/subtotal-summary-BsvvoHJy.esm.js +0 -41
  1811. package/dist/chunks/subtotal-summary-BsvvoHJy.esm.js.map +0 -1
  1812. package/dist/chunks/subtotal-summary-CMx0d-6f.js +0 -40
  1813. package/dist/chunks/subtotal-summary-CMx0d-6f.js.map +0 -1
  1814. package/dist/chunks/table-Bp4RBcd5.esm.js +0 -185
  1815. package/dist/chunks/table-Bp4RBcd5.esm.js.map +0 -1
  1816. package/dist/chunks/table-CbFA1phD.js +0 -184
  1817. package/dist/chunks/table-CbFA1phD.js.map +0 -1
  1818. package/dist/chunks/table-form-COGVBsJa.js +0 -1536
  1819. package/dist/chunks/table-form-COGVBsJa.js.map +0 -1
  1820. package/dist/chunks/table-form-Chkazgwf.esm.js +0 -1537
  1821. package/dist/chunks/table-form-Chkazgwf.esm.js.map +0 -1
  1822. package/dist/chunks/tabs-Bl9bFBv5.js +0 -75
  1823. package/dist/chunks/tabs-Bl9bFBv5.js.map +0 -1
  1824. package/dist/chunks/tabs-wL47XgLZ.esm.js +0 -76
  1825. package/dist/chunks/tabs-wL47XgLZ.esm.js.map +0 -1
  1826. package/dist/chunks/taxes-and-charges-summary-CEpl_NAt.esm.js +0 -86
  1827. package/dist/chunks/taxes-and-charges-summary-CEpl_NAt.esm.js.map +0 -1
  1828. package/dist/chunks/taxes-and-charges-summary-CotMEPoT.js +0 -85
  1829. package/dist/chunks/taxes-and-charges-summary-CotMEPoT.js.map +0 -1
  1830. package/dist/chunks/template-editor-router-Bh_HSMMc.esm.js +0 -9
  1831. package/dist/chunks/template-editor-router-Bh_HSMMc.esm.js.map +0 -1
  1832. package/dist/chunks/template-editor-router-DD_yLDyR.js +0 -8
  1833. package/dist/chunks/template-editor-router-DD_yLDyR.js.map +0 -1
  1834. package/dist/chunks/template-modal-Cu6A2BAa.esm.js +0 -769
  1835. package/dist/chunks/template-modal-Cu6A2BAa.esm.js.map +0 -1
  1836. package/dist/chunks/template-modal-DNYhvCIp.js +0 -768
  1837. package/dist/chunks/template-modal-DNYhvCIp.js.map +0 -1
  1838. package/dist/chunks/template-name-modal-CLROXhxo.esm.js +0 -101
  1839. package/dist/chunks/template-name-modal-CLROXhxo.esm.js.map +0 -1
  1840. package/dist/chunks/template-name-modal-CeqxIE2r.js +0 -117
  1841. package/dist/chunks/template-name-modal-CeqxIE2r.js.map +0 -1
  1842. package/dist/chunks/templates-DikQL-dT.js +0 -278
  1843. package/dist/chunks/templates-DikQL-dT.js.map +0 -1
  1844. package/dist/chunks/templates-Dwavx9W9.esm.js +0 -279
  1845. package/dist/chunks/templates-Dwavx9W9.esm.js.map +0 -1
  1846. package/dist/chunks/text-area-B3nAZgFI.js +0 -327
  1847. package/dist/chunks/text-area-B3nAZgFI.js.map +0 -1
  1848. package/dist/chunks/text-area-xMWbJY0H.esm.js +0 -311
  1849. package/dist/chunks/text-area-xMWbJY0H.esm.js.map +0 -1
  1850. package/dist/chunks/theme-impl-CIpXkoCz.js +0 -1948
  1851. package/dist/chunks/theme-impl-CIpXkoCz.js.map +0 -1
  1852. package/dist/chunks/theme-impl-icduoRoN.esm.js +0 -1949
  1853. package/dist/chunks/theme-impl-icduoRoN.esm.js.map +0 -1
  1854. package/dist/chunks/themeSelector-BRHSLkV-.esm.js +0 -20
  1855. package/dist/chunks/themeSelector-BRHSLkV-.esm.js.map +0 -1
  1856. package/dist/chunks/themeSelector-JDsy4pXI.js +0 -19
  1857. package/dist/chunks/themeSelector-JDsy4pXI.js.map +0 -1
  1858. package/dist/chunks/time-BRlAFG0U.esm.js +0 -41
  1859. package/dist/chunks/time-BRlAFG0U.esm.js.map +0 -1
  1860. package/dist/chunks/time-picker-BzKQi5qn.js +0 -104
  1861. package/dist/chunks/time-picker-BzKQi5qn.js.map +0 -1
  1862. package/dist/chunks/time-picker-CJ7ZnL8e.esm.js +0 -105
  1863. package/dist/chunks/time-picker-CJ7ZnL8e.esm.js.map +0 -1
  1864. package/dist/chunks/time-xqicD8tk.js +0 -40
  1865. package/dist/chunks/time-xqicD8tk.js.map +0 -1
  1866. package/dist/chunks/toast-D6pKuNek.js +0 -72
  1867. package/dist/chunks/toast-D6pKuNek.js.map +0 -1
  1868. package/dist/chunks/toast-P3z45nme.esm.js +0 -73
  1869. package/dist/chunks/toast-P3z45nme.esm.js.map +0 -1
  1870. package/dist/chunks/toggle-button-CfDnCcUA.js +0 -54
  1871. package/dist/chunks/toggle-button-CfDnCcUA.js.map +0 -1
  1872. package/dist/chunks/toggle-button-DaKspbiP.esm.js +0 -55
  1873. package/dist/chunks/toggle-button-DaKspbiP.esm.js.map +0 -1
  1874. package/dist/chunks/toggle-switch-Ct_0GE_-.js +0 -80
  1875. package/dist/chunks/toggle-switch-Ct_0GE_-.js.map +0 -1
  1876. package/dist/chunks/toggle-switch-DaTupiKq.esm.js +0 -81
  1877. package/dist/chunks/toggle-switch-DaTupiKq.esm.js.map +0 -1
  1878. package/dist/chunks/total-summary-BCNJd8iL.esm.js +0 -41
  1879. package/dist/chunks/total-summary-BCNJd8iL.esm.js.map +0 -1
  1880. package/dist/chunks/total-summary-BhLK6YOW.js +0 -40
  1881. package/dist/chunks/total-summary-BhLK6YOW.js.map +0 -1
  1882. package/dist/chunks/uom-field-wrapper-C8YxRkqZ.js +0 -79
  1883. package/dist/chunks/uom-field-wrapper-C8YxRkqZ.js.map +0 -1
  1884. package/dist/chunks/uom-field-wrapper-DnymPkSM.esm.js +0 -80
  1885. package/dist/chunks/uom-field-wrapper-DnymPkSM.esm.js.map +0 -1
  1886. package/dist/chunks/upload-SyjXw_LU.js +0 -733
  1887. package/dist/chunks/upload-SyjXw_LU.js.map +0 -1
  1888. package/dist/chunks/upload-excel-C6PQjAid.esm.js +0 -361
  1889. package/dist/chunks/upload-excel-C6PQjAid.esm.js.map +0 -1
  1890. package/dist/chunks/upload-excel-CmJKqs_P.js +0 -360
  1891. package/dist/chunks/upload-excel-CmJKqs_P.js.map +0 -1
  1892. package/dist/chunks/upload-media-COLbbU-V.esm.js +0 -524
  1893. package/dist/chunks/upload-media-COLbbU-V.esm.js.map +0 -1
  1894. package/dist/chunks/upload-media-_L_CsSat.js +0 -523
  1895. package/dist/chunks/upload-media-_L_CsSat.js.map +0 -1
  1896. package/dist/chunks/upload-v5SK3D6G.esm.js +0 -734
  1897. package/dist/chunks/upload-v5SK3D6G.esm.js.map +0 -1
  1898. package/dist/chunks/useReduxIntegration-B9-AIway.js +0 -38
  1899. package/dist/chunks/useReduxIntegration-B9-AIway.js.map +0 -1
  1900. package/dist/chunks/useReduxIntegration-BArIG7Q0.esm.js +0 -39
  1901. package/dist/chunks/useReduxIntegration-BArIG7Q0.esm.js.map +0 -1
  1902. package/dist/chunks/user-menu-BOV3egnJ.esm.js +0 -104
  1903. package/dist/chunks/user-menu-BOV3egnJ.esm.js.map +0 -1
  1904. package/dist/chunks/user-menu-BXm0FBnk.js +0 -103
  1905. package/dist/chunks/user-menu-BXm0FBnk.js.map +0 -1
  1906. package/dist/chunks/value-editor-BLEpxGmy.js +0 -265
  1907. package/dist/chunks/value-editor-BLEpxGmy.js.map +0 -1
  1908. package/dist/chunks/value-editor-BRPBPSyV.esm.js +0 -266
  1909. package/dist/chunks/value-editor-BRPBPSyV.esm.js.map +0 -1
  1910. package/dist/chunks/vendor-ai-summary-DokzWcys.esm.js +0 -228
  1911. package/dist/chunks/vendor-ai-summary-DokzWcys.esm.js.map +0 -1
  1912. package/dist/chunks/vendor-ai-summary-DyBnunJN.js +0 -227
  1913. package/dist/chunks/vendor-ai-summary-DyBnunJN.js.map +0 -1
  1914. package/dist/chunks/view-modal-DI9S57vC.esm.js +0 -194
  1915. package/dist/chunks/view-modal-DI9S57vC.esm.js.map +0 -1
  1916. package/dist/chunks/view-modal-Oz37YEVP.js +0 -193
  1917. package/dist/chunks/view-modal-Oz37YEVP.js.map +0 -1
@@ -0,0 +1,3546 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const React = require("react");
4
+ const marked = require("marked");
5
+ const iconsMaterial = require("@mui/icons-material");
6
+ const runtime = require("@erpsquad/common/runtime");
7
+ const utils_apiConfig = require("../utils/api-config/index.js");
8
+ const api = require("./api-C3OU7TG2.js");
9
+ const api$1 = require("./api-Dw0ZiKMR.js");
10
+ const api$2 = require("./api-BhYzlgpk.js");
11
+ const lucideReact = require("lucide-react");
12
+ const reactI18next = require("react-i18next");
13
+ const ReactDOM = require("react-dom");
14
+ const aiDisclaimer = require("./ai-disclaimer-4Pudkx86.js");
15
+ const button = require("./button-CI6cNGQP.js");
16
+ const save = require("./save-omAUfbkE.js");
17
+ const tick = require("./tick-CQMWRTch.js");
18
+ const trash = require("./trash-DWY4lso3.js");
19
+ const confirmModal = require("./confirm-modal-DZ6x3OoV.js");
20
+ const toast = require("react-hot-toast");
21
+ const chatDockState = require("./chat-dock-state-DXegFiEF.js");
22
+ const FORM_TYPE_LABELS = {
23
+ sales_invoice: "Sales Invoice",
24
+ purchase_invoice: "Purchase Invoice"
25
+ };
26
+ const ACCEPTED_FILE_EXTENSIONS = {
27
+ pdf: [".pdf"],
28
+ excel: [".xls", ".xlsx"],
29
+ doc: [".doc", ".docx"],
30
+ md: [".md"],
31
+ image: [".png", ".jpg", ".jpeg"]
32
+ };
33
+ const ACCEPT_ATTR = Object.values(ACCEPTED_FILE_EXTENSIONS).flat().join(",");
34
+ const getFileCategory = (filename) => {
35
+ const lower = filename.toLowerCase();
36
+ return Object.keys(ACCEPTED_FILE_EXTENSIONS).find(
37
+ (category) => ACCEPTED_FILE_EXTENSIONS[category].some((ext) => lower.endsWith(ext))
38
+ ) || null;
39
+ };
40
+ const getTime = () => (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
41
+ const getGreeting = () => {
42
+ const h = (/* @__PURE__ */ new Date()).getHours();
43
+ if (h < 12) return "Good morning";
44
+ if (h < 17) return "Good afternoon";
45
+ return "Good evening";
46
+ };
47
+ const formatDuration = (ms) => `${(ms / 1e3).toFixed(1)}s`;
48
+ const formatTokens = (n) => n >= 1e4 ? `${(n / 1e3).toFixed(1)}k` : n.toLocaleString();
49
+ const IcWarning = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsxs(
50
+ "svg",
51
+ {
52
+ viewBox: "0 0 24 24",
53
+ stroke: "currentColor",
54
+ fill: "none",
55
+ strokeWidth: "2",
56
+ style: { width: size, height: size, flexShrink: 0 },
57
+ children: [
58
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z" }),
59
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
60
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
61
+ ]
62
+ }
63
+ );
64
+ const IcBox = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsxs(
65
+ "svg",
66
+ {
67
+ viewBox: "0 0 24 24",
68
+ stroke: "currentColor",
69
+ fill: "none",
70
+ strokeWidth: "2",
71
+ style: { width: size, height: size, flexShrink: 0 },
72
+ children: [
73
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" }),
74
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "3.3 7 12 12 20.7 7" }),
75
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "22", x2: "12", y2: "12" })
76
+ ]
77
+ }
78
+ );
79
+ const IcCalendar = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsxs(
80
+ "svg",
81
+ {
82
+ viewBox: "0 0 24 24",
83
+ stroke: "currentColor",
84
+ fill: "none",
85
+ strokeWidth: "2",
86
+ style: { width: size, height: size, flexShrink: 0 },
87
+ children: [
88
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
89
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
90
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
91
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
92
+ ]
93
+ }
94
+ );
95
+ const IcChevR = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsx(
96
+ "svg",
97
+ {
98
+ viewBox: "0 0 24 24",
99
+ stroke: "currentColor",
100
+ fill: "none",
101
+ strokeWidth: "2",
102
+ style: { width: size, height: size, flexShrink: 0 },
103
+ children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "9 6 15 12 9 18" })
104
+ }
105
+ );
106
+ const IcSearch = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsxs(
107
+ "svg",
108
+ {
109
+ viewBox: "0 0 24 24",
110
+ stroke: "currentColor",
111
+ fill: "none",
112
+ strokeWidth: "2",
113
+ style: { width: size, height: size, flexShrink: 0 },
114
+ children: [
115
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "7" }),
116
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
117
+ ]
118
+ }
119
+ );
120
+ const IcTarget = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsxs(
121
+ "svg",
122
+ {
123
+ viewBox: "0 0 24 24",
124
+ stroke: "currentColor",
125
+ fill: "none",
126
+ strokeWidth: "2",
127
+ style: { width: size, height: size, flexShrink: 0 },
128
+ children: [
129
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "9" }),
130
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "5" }),
131
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "1.5", fill: "currentColor", stroke: "none" })
132
+ ]
133
+ }
134
+ );
135
+ const IcBolt = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsx(
136
+ "svg",
137
+ {
138
+ viewBox: "0 0 24 24",
139
+ fill: "currentColor",
140
+ stroke: "none",
141
+ style: { width: size, height: size, flexShrink: 0 },
142
+ children: /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" })
143
+ }
144
+ );
145
+ const IcFlame = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsx(
146
+ "svg",
147
+ {
148
+ viewBox: "0 0 24 24",
149
+ stroke: "currentColor",
150
+ fill: "none",
151
+ strokeWidth: "1.8",
152
+ style: { width: size, height: size, flexShrink: 0 },
153
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.5 14.5A2.5 2.5 0 0 0 11 17c1.4 0 2-1 2-2 0-1-.6-2-2-2-1 0-1.5.5-1.5 1zM12 2c0 4-3 5-3 9a5 5 0 0 0 10 0c0-2-1-3-2-4 0-1 0-2-1-3-1.5-1.5-3-2-4-2z" })
154
+ }
155
+ );
156
+ const SparkMark = ({ size = 20 }) => /* @__PURE__ */ jsxRuntime.jsx(
157
+ "span",
158
+ {
159
+ className: "chatBot--spark-mark",
160
+ style: { width: size, height: size, borderRadius: Math.round(size * 0.3) },
161
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
162
+ "svg",
163
+ {
164
+ viewBox: "0 0 24 24",
165
+ stroke: "currentColor",
166
+ fill: "none",
167
+ strokeWidth: "2",
168
+ style: { width: "58%", height: "58%" },
169
+ children: [
170
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z" }),
171
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 3l.6 1.8L21 5.4l-1.4.6L19 7.8l-.6-1.8L17 5.4l1.4-.6z" })
172
+ ]
173
+ }
174
+ )
175
+ }
176
+ );
177
+ const IcInvoice = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsxs(
178
+ "svg",
179
+ {
180
+ viewBox: "0 0 24 24",
181
+ stroke: "currentColor",
182
+ fill: "none",
183
+ strokeWidth: "2",
184
+ style: { width: size, height: size, flexShrink: 0 },
185
+ children: [
186
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
187
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "14 2 14 8 20 8" }),
188
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
189
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "8", y1: "17", x2: "14", y2: "17" })
190
+ ]
191
+ }
192
+ );
193
+ const SparkSvg = ({ size = 12 }) => /* @__PURE__ */ jsxRuntime.jsxs(
194
+ "svg",
195
+ {
196
+ viewBox: "0 0 24 24",
197
+ stroke: "currentColor",
198
+ fill: "none",
199
+ strokeWidth: "2",
200
+ style: { width: size, height: size, flexShrink: 0 },
201
+ children: [
202
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z" }),
203
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 3l.6 1.8L21 5.4l-1.4.6L19 7.8l-.6-1.8L17 5.4l1.4-.6z" })
204
+ ]
205
+ }
206
+ );
207
+ const IcInfo = ({ size = 14 }) => /* @__PURE__ */ jsxRuntime.jsxs(
208
+ "svg",
209
+ {
210
+ viewBox: "0 0 24 24",
211
+ stroke: "currentColor",
212
+ fill: "none",
213
+ strokeWidth: "2",
214
+ strokeLinecap: "round",
215
+ strokeLinejoin: "round",
216
+ style: { width: size, height: size, flexShrink: 0, fill: "none" },
217
+ children: [
218
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
219
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
220
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
221
+ ]
222
+ }
223
+ );
224
+ const SLASH_COMMANDS = [
225
+ // {
226
+ // id: 'conversation',
227
+ // label: 'Conversation',
228
+ // description: 'Chat with the ERP AI assistant'
229
+ // },
230
+ // {
231
+ // id: 'agent',
232
+ // label: 'Agent',
233
+ // description: 'Let AI take actions in your ERP'
234
+ // },
235
+ // {
236
+ // id: 'doc_qa',
237
+ // label: 'Document',
238
+ // description: 'Upload a document and ask questions about it'
239
+ // },
240
+ {
241
+ id: "smart",
242
+ label: "Smart",
243
+ description: "Automatically routes your query to the right service"
244
+ }
245
+ ];
246
+ const INSIGHTS = [
247
+ { icon: IcWarning, kind: "red", title: "Overdue invoices need attention", sub: "Review receivables aging for payment follow-up" },
248
+ { icon: IcBox, kind: "amber", title: "Items below reorder level detected", sub: "Check inventory before the next purchase order cycle" },
249
+ { icon: IcCalendar, kind: "blue", title: "Pending leave requests awaiting approval", sub: "Some requests are past the standard SLA" }
250
+ ];
251
+ const SUGGEST_TILES = [
252
+ { icon: IcSearch, kind: "", cat: "ASK", mode: "conversation", prompt: "List the 5 most recent purchase orders" },
253
+ { icon: IcSearch, kind: "", cat: "ASK", mode: "conversation", prompt: "Show me journal entries from last month" },
254
+ { icon: IcBolt, kind: "amber", cat: "AGENT", mode: "agent", formType: "sales_invoice", prompt: "Create a sales invoice" },
255
+ { icon: IcBolt, kind: "amber", cat: "AGENT", mode: "agent", formType: "purchase_invoice", prompt: "Create a purchase invoice" },
256
+ { icon: IcSearch, kind: "blue", cat: "DOC", mode: "doc_qa", prompt: "Upload a document to get started" },
257
+ { icon: IcTarget, kind: "blue", cat: "DOC", mode: "doc_qa", prompt: "Ask questions about any uploaded document" }
258
+ ];
259
+ const HISTORY_PAGE_SIZE = 20;
260
+ const historyServiceForMode = (mode) => {
261
+ if (mode === "smart") return "copilot_smart";
262
+ if (mode === "conversation" || mode === "doc_qa") return "copilot_chat";
263
+ return null;
264
+ };
265
+ const toTimestamp = (value) => value ? new Date(value).getTime() || 0 : 0;
266
+ const toChatSession = (session) => {
267
+ var _a, _b;
268
+ const createdAt = toTimestamp(session.created_at);
269
+ return {
270
+ id: session.session_id,
271
+ title: session.title || ((_a = session.metadata) == null ? void 0 : _a.title) || "New chat",
272
+ service: session.service,
273
+ totalMessages: session.total_messages ?? ((_b = session.metadata) == null ? void 0 : _b.total_messages) ?? 0,
274
+ createdAt,
275
+ updatedAt: toTimestamp(session.updated_at) || createdAt
276
+ };
277
+ };
278
+ const toChatMessages = (messages, mode) => {
279
+ const baseId = Date.now();
280
+ return messages.map((m, i) => ({
281
+ id: baseId + i,
282
+ role: m.role === "user" ? "user" : "ai",
283
+ text: m.content ?? "",
284
+ mode
285
+ }));
286
+ };
287
+ const groupChatSessions = (sessions) => {
288
+ const startOfToday = /* @__PURE__ */ new Date();
289
+ startOfToday.setHours(0, 0, 0, 0);
290
+ const today = startOfToday.getTime();
291
+ const yesterday = today - 24 * 60 * 60 * 1e3;
292
+ const weekAgo = today - 7 * 24 * 60 * 60 * 1e3;
293
+ const groups = [
294
+ { label: "Today", sessions: [] },
295
+ { label: "Yesterday", sessions: [] },
296
+ { label: "Previous 7 days", sessions: [] },
297
+ { label: "Older", sessions: [] }
298
+ ];
299
+ [...sessions].sort((a, b) => b.updatedAt - a.updatedAt).forEach((s) => {
300
+ if (s.updatedAt >= today) groups[0].sessions.push(s);
301
+ else if (s.updatedAt >= yesterday) groups[1].sessions.push(s);
302
+ else if (s.updatedAt >= weekAgo) groups[2].sessions.push(s);
303
+ else groups[3].sessions.push(s);
304
+ });
305
+ return groups.filter((g) => g.sessions.length > 0);
306
+ };
307
+ const formatSessionTime = (ts) => {
308
+ const d = new Date(ts);
309
+ const startOfToday = /* @__PURE__ */ new Date();
310
+ startOfToday.setHours(0, 0, 0, 0);
311
+ if (ts >= startOfToday.getTime() - 24 * 60 * 60 * 1e3) {
312
+ return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
313
+ }
314
+ return d.toLocaleDateString([], { day: "numeric", month: "short" });
315
+ };
316
+ const ChatBotHistoryButton = ({ open, onClick }) => /* @__PURE__ */ jsxRuntime.jsxs(
317
+ "button",
318
+ {
319
+ type: "button",
320
+ className: `chatBot--history-btn ${open ? "chatBot--history-btn--active" : ""}`,
321
+ onClick,
322
+ "aria-pressed": open,
323
+ "aria-controls": "chatBot-history-panel",
324
+ children: [
325
+ /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.History, { style: { fontSize: 16 } }),
326
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "History" })
327
+ ]
328
+ }
329
+ );
330
+ const ChatBotHistoryIconButton = ({ open, onClick }) => /* @__PURE__ */ jsxRuntime.jsx(
331
+ "button",
332
+ {
333
+ type: "button",
334
+ className: `chatBot--hd-history-btn ${open ? "chatBot--hd-history-btn--active" : ""}`,
335
+ onClick,
336
+ "aria-label": "Chat history",
337
+ "aria-pressed": open,
338
+ title: "History",
339
+ children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.History, { style: { fontSize: 18 } })
340
+ }
341
+ );
342
+ const ChatBotNewChatButton = ({ onClick }) => /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "chatBot--history-btn", onClick, children: [
343
+ /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Add, { style: { fontSize: 17 } }),
344
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "New chat" })
345
+ ] });
346
+ const ChatBotHistory = ({
347
+ open,
348
+ sessions,
349
+ activeId,
350
+ onClose,
351
+ onSelect,
352
+ onDelete,
353
+ loading = false,
354
+ error = null,
355
+ onRetry,
356
+ hasMore = false,
357
+ loadingMore = false,
358
+ onLoadMore,
359
+ unavailableMessage = null,
360
+ variant = "side"
361
+ }) => {
362
+ const { t } = reactI18next.useTranslation();
363
+ const [query, setQuery] = React.useState("");
364
+ const closeBtnRef = React.useRef(null);
365
+ const isEmbedded = variant === "embedded";
366
+ React.useEffect(() => {
367
+ if (open) setTimeout(() => {
368
+ var _a;
369
+ return (_a = closeBtnRef.current) == null ? void 0 : _a.focus();
370
+ }, 50);
371
+ else setQuery("");
372
+ }, [open]);
373
+ const groups = React.useMemo(() => {
374
+ if (unavailableMessage || loading || error) return [];
375
+ const q = query.trim().toLowerCase();
376
+ const filtered = q ? sessions.filter((s) => s.title.toLowerCase().includes(q)) : sessions;
377
+ return groupChatSessions(filtered);
378
+ }, [sessions, query, unavailableMessage, loading, error]);
379
+ if (!open) return null;
380
+ const Wrapper = isEmbedded ? "section" : "aside";
381
+ return /* @__PURE__ */ jsxRuntime.jsxs(
382
+ Wrapper,
383
+ {
384
+ id: "chatBot-history-panel",
385
+ className: isEmbedded ? "chatBot--history-embedded" : "chatBot--history-panel",
386
+ "aria-label": "Chat history",
387
+ onKeyDown: (e) => {
388
+ if (e.key === "Escape") onClose();
389
+ },
390
+ children: [
391
+ isEmbedded ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--history-head chatBot--history-head--embedded", children: [
392
+ /* @__PURE__ */ jsxRuntime.jsx("button", { ref: closeBtnRef, type: "button", className: "chatBot--history-icon-btn", onClick: onClose, "aria-label": "Back to chat", children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ChevronLeft, { style: { fontSize: 22 } }) }),
393
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--history-head-title", children: [
394
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { children: "History" }),
395
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--history-count", children: [
396
+ sessions.length,
397
+ hasMore ? "+" : "",
398
+ " ",
399
+ sessions.length === 1 && !hasMore ? "chat" : "chats"
400
+ ] })
401
+ ] })
402
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--history-head", children: [
403
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--history-head-title", children: [
404
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { children: "History" }),
405
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--history-count", children: [
406
+ sessions.length,
407
+ hasMore ? "+" : "",
408
+ " ",
409
+ sessions.length === 1 && !hasMore ? "chat" : "chats"
410
+ ] })
411
+ ] }),
412
+ /* @__PURE__ */ jsxRuntime.jsx("button", { ref: closeBtnRef, type: "button", className: "chatBot--history-icon-btn", onClick: onClose, "aria-label": "Close history", children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Close, { style: { fontSize: 18 } }) })
413
+ ] }),
414
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--history-search-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "chatBot--history-search", children: [
415
+ /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Search, { style: { fontSize: 16 } }),
416
+ /* @__PURE__ */ jsxRuntime.jsx(
417
+ "input",
418
+ {
419
+ "aria-label": "Search chats",
420
+ placeholder: "Search chats",
421
+ value: query,
422
+ onChange: (e) => setQuery(e.target.value)
423
+ }
424
+ )
425
+ ] }) }),
426
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--history-list", children: [
427
+ groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--history-group", children: [
428
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--history-group-lbl", children: group.label }),
429
+ group.sessions.map((s) => {
430
+ const isActive = s.id === activeId;
431
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `chatBot--history-row ${isActive ? "chatBot--history-row--active" : ""}`, children: [
432
+ /* @__PURE__ */ jsxRuntime.jsxs(
433
+ "button",
434
+ {
435
+ type: "button",
436
+ className: "chatBot--history-open",
437
+ onClick: () => onSelect(s),
438
+ "aria-current": isActive ? "true" : void 0,
439
+ title: s.title,
440
+ children: [
441
+ /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ChatBubbleOutline, { className: "chatBot--history-row-ic", style: { fontSize: 15 } }),
442
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--history-row-body", children: [
443
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--history-row-title", children: s.title }),
444
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--history-row-time", children: formatSessionTime(s.updatedAt) })
445
+ ] })
446
+ ]
447
+ }
448
+ ),
449
+ /* @__PURE__ */ jsxRuntime.jsx(
450
+ "button",
451
+ {
452
+ type: "button",
453
+ className: "chatBot--history-del",
454
+ onClick: () => onDelete(s),
455
+ "aria-label": `Delete chat: ${s.title}`,
456
+ title: "Delete chat",
457
+ children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.DeleteOutline, { style: { fontSize: 17 } })
458
+ }
459
+ )
460
+ ] }, s.id);
461
+ })
462
+ ] }, group.label)),
463
+ unavailableMessage ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--history-empty", children: unavailableMessage }) : loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--history-empty", children: "Loading chats…" }) : error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--history-empty", children: [
464
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Couldn't load your chats." }),
465
+ onRetry && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "chatBot--history-more", onClick: onRetry, children: "Try again" })
466
+ ] }) : groups.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--history-empty", children: query ? "No chats found" : "No conversations yet. Your chats will appear here." }),
467
+ !unavailableMessage && !loading && !error && hasMore && onLoadMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--history-load-more", children: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "chatBot--history-load-more-pill", onClick: onLoadMore, disabled: loadingMore, children: [
468
+ loadingMore ? "Loading…" : t("common.load_more"),
469
+ !loadingMore && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { size: 13 })
470
+ ] }) })
471
+ ] })
472
+ ]
473
+ }
474
+ );
475
+ };
476
+ const ChatBotHeader = ({ onClose, onNewChat, sessionTokens = 0, sessionMs = 0, onHistory, historyOpen = false }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
477
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--header", children: [
478
+ /* @__PURE__ */ jsxRuntime.jsx(SparkMark, { size: 34 }),
479
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--hd-info", children: [
480
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--hd-name", children: [
481
+ "NovaForce",
482
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--hd-beta", children: "Beta" })
483
+ ] }),
484
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--hd-sub", children: "AI-powered ERP assistant" })
485
+ ] }),
486
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--hd-actions", children: [
487
+ onHistory && /* @__PURE__ */ jsxRuntime.jsx(ChatBotHistoryIconButton, { open: historyOpen, onClick: onHistory }),
488
+ /* @__PURE__ */ jsxRuntime.jsx("button", { title: "New chat", onClick: onNewChat, children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Add, { style: { fontSize: 18 } }) }),
489
+ /* @__PURE__ */ jsxRuntime.jsx("button", { title: "Expand", children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.OpenInFullRounded, { style: { fontSize: 16 } }) }),
490
+ /* @__PURE__ */ jsxRuntime.jsx("button", { title: "Close", onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Close, { style: { fontSize: 18 } }) })
491
+ ] })
492
+ ] }),
493
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--ctx-bar", children: [
494
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--ctx-chip", children: [
495
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--ctx-dot" }),
496
+ "ERP Data"
497
+ ] }),
498
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--ctx-label", children: "All modules · Live data" }),
499
+ sessionMs > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--ctx-session", children: [
500
+ "Session ",
501
+ sessionTokens > 0 ? `${formatTokens(sessionTokens)} tok · ` : "",
502
+ formatDuration(sessionMs)
503
+ ] })
504
+ ] })
505
+ ] });
506
+ const ChatBotWelcome = ({ firstName, onSuggestion, dynamicQuestions = [], mode, dashboardMode = false, inputSlot }) => {
507
+ const greeting = getGreeting();
508
+ const dynamicTiles = dynamicQuestions.map((dq) => ({
509
+ icon: IcSearch,
510
+ kind: dq.kind || "blue",
511
+ cat: dq.cat,
512
+ mode: dq.mode,
513
+ formType: dq.formType,
514
+ prompt: dq.prompt
515
+ }));
516
+ const askTiles = dynamicQuestions.length > 0 ? dynamicTiles : SUGGEST_TILES.filter((t) => t.cat === "ASK");
517
+ const agentTiles = SUGGEST_TILES.filter((t) => t.cat === "AGENT");
518
+ const docTiles = SUGGEST_TILES.filter((t) => t.cat === "DOC");
519
+ const displayTiles = mode === "smart" ? [...askTiles, ...agentTiles, ...docTiles] : mode === "conversation" ? askTiles : mode === "agent" ? agentTiles : docTiles;
520
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `chatBot--welcome ${dashboardMode ? "chatBot--welcome--center" : ""}`, children: [
521
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--greeting", children: dashboardMode ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
522
+ "Hi ",
523
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--grad", children: firstName }),
524
+ ", how's your day going?"
525
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
526
+ greeting,
527
+ firstName && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
528
+ ", ",
529
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--grad", children: firstName })
530
+ ] })
531
+ ] }) }),
532
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--greeting-sub", children: dashboardMode ? "Shall we start with your action items, or with what's on your agenda today?" : "NovaForce is watching your ERP data. Here's what stands out today." }),
533
+ inputSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--welcome-input", children: inputSlot }),
534
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--section-lbl", children: [
535
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Try asking" }),
536
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--ln" })
537
+ ] }),
538
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--suggest-grid", children: displayTiles.map((tile, i) => /* @__PURE__ */ jsxRuntime.jsxs(
539
+ "button",
540
+ {
541
+ className: "chatBot--suggest-tile",
542
+ onClick: () => onSuggestion(tile.prompt, tile.mode, tile.formType),
543
+ children: [
544
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--suggest-head", children: [
545
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `chatBot--ic chatBot--ic--${tile.kind}`, children: /* @__PURE__ */ jsxRuntime.jsx(tile.icon, { size: 13 }) }),
546
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--suggest-cat", children: tile.cat })
547
+ ] }),
548
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--suggest-prompt", children: tile.prompt })
549
+ ]
550
+ },
551
+ i
552
+ )) })
553
+ ] });
554
+ };
555
+ const DEFAULT_CURRENCY = "AED";
556
+ function formatDeltaAmount(delta) {
557
+ if (delta.unit === "new") return "New";
558
+ const amount = +Math.abs(delta.value).toFixed(1);
559
+ return delta.unit === "percent" ? `${amount}%` : `${amount}`;
560
+ }
561
+ function formatProvenance(provenance, { currency, rowCount } = {}) {
562
+ var _a, _b;
563
+ const rows = (provenance == null ? void 0 : provenance.row_count) ?? rowCount;
564
+ return [
565
+ (_a = provenance == null ? void 0 : provenance.source) == null ? void 0 : _a.trim(),
566
+ (_b = provenance == null ? void 0 : provenance.period) == null ? void 0 : _b.trim(),
567
+ typeof rows === "number" ? `${rows.toLocaleString("en-US")} ${rows === 1 ? "record" : "records"}` : void 0,
568
+ currency
569
+ ].filter(Boolean).join(" · ");
570
+ }
571
+ function CardFooter({
572
+ provenance,
573
+ rowCount,
574
+ currency
575
+ }) {
576
+ const text = formatProvenance(provenance, { rowCount });
577
+ if (!text && !currency) return null;
578
+ return /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "card-footer", children: [
579
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "card-footer__dot", "aria-hidden": "true" }),
580
+ text && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "card-footer__text", children: [
581
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "card-footer__sr", children: "Source: " }),
582
+ text
583
+ ] }),
584
+ currency && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
585
+ text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "card-footer__sep", children: "·" }),
586
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "card-footer__chip", children: currency })
587
+ ] })
588
+ ] });
589
+ }
590
+ const HALF_WIDTH = 70;
591
+ const HEIGHT = 50;
592
+ const GAP = 8;
593
+ function exactValue(value, format, currency = DEFAULT_CURRENCY) {
594
+ const number = value.toLocaleString("en-US", { maximumFractionDigits: 2 });
595
+ if (format === "percent") return `${number}%`;
596
+ return format === "currency" ? `${currency} ${number}` : number;
597
+ }
598
+ function useTip() {
599
+ const [tip, setTip] = React.useState(null);
600
+ const bind = React.useCallback(
601
+ (content) => ({
602
+ onMouseEnter: (e) => {
603
+ const r = e.currentTarget.getBoundingClientRect();
604
+ setTip({ ...content, x: r.left + r.width / 2, top: r.top, bottom: r.bottom });
605
+ },
606
+ onMouseLeave: () => setTip(null)
607
+ }),
608
+ []
609
+ );
610
+ const below = tip ? tip.top < HEIGHT : false;
611
+ const tooltip = tip ? ReactDOM.createPortal(
612
+ /* @__PURE__ */ jsxRuntime.jsxs(
613
+ "div",
614
+ {
615
+ className: "gen-tip",
616
+ style: {
617
+ left: Math.min(Math.max(tip.x, HALF_WIDTH), window.innerWidth - HALF_WIDTH),
618
+ top: below ? tip.bottom + GAP : tip.top - GAP,
619
+ transform: below ? "translateX(-50%)" : "translate(-50%, -100%)"
620
+ },
621
+ children: [
622
+ tip.title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "gen-tip__title", children: tip.title }),
623
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "gen-tip__value", children: tip.value })
624
+ ]
625
+ }
626
+ ),
627
+ document.body
628
+ ) : null;
629
+ return { bind, tooltip };
630
+ }
631
+ const MONTHS = {
632
+ jan: "January",
633
+ feb: "February",
634
+ mar: "March",
635
+ apr: "April",
636
+ may: "May",
637
+ jun: "June",
638
+ jul: "July",
639
+ aug: "August",
640
+ sep: "September",
641
+ oct: "October",
642
+ nov: "November",
643
+ dec: "December"
644
+ };
645
+ const fullMonth = (label) => MONTHS[label.slice(0, 3).toLowerCase()] ?? label;
646
+ function compact(value) {
647
+ const abs = Math.abs(value);
648
+ if (abs >= 1e9) return `${Math.round(value / 1e7) / 100}B`;
649
+ if (abs >= 1e6) return `${Math.round(value / 1e4) / 100}M`;
650
+ if (abs >= 1e3) return `${Math.round(value / 100) / 10}K`;
651
+ return `${value}`;
652
+ }
653
+ function formatValue(value, format, currency = DEFAULT_CURRENCY) {
654
+ if (format === "percent") return `${value}%`;
655
+ if (format === "currency") return `${currency} ${compact(value)}`;
656
+ return compact(value);
657
+ }
658
+ function buildHeadline$7(metric, series, currency) {
659
+ const subject = metric.label.split("·")[0].trim();
660
+ let text = `${subject} is sitting at ${formatValue(metric.value, metric.format, currency)}`;
661
+ const { delta } = metric;
662
+ if (delta && delta.direction !== "flat") {
663
+ const change = delta.unit === "new" ? "new this period" : `${delta.direction} ${formatDeltaAmount(delta)}`;
664
+ text += `, ${change}${delta.basis ? ` ${delta.basis}` : ""}`;
665
+ }
666
+ if (series == null ? void 0 : series.points.length) {
667
+ const peak = series.points.reduce((max, p) => p.value > max.value ? p : max);
668
+ text += `, with the peak in ${fullMonth(peak.label)}`;
669
+ }
670
+ return `${text}.`;
671
+ }
672
+ const SKEW_RATIO = 20;
673
+ function scaleValues(values) {
674
+ const positives = values.filter((v) => v > 0).sort((a, b) => a - b);
675
+ const median = positives[Math.floor(positives.length / 2)] ?? 0;
676
+ const skewed = positives.length > 1 && median > 0 && positives[positives.length - 1] / median > SKEW_RATIO;
677
+ return skewed ? (v) => Math.sign(v) * Math.log10(1 + Math.abs(v)) : (v) => v;
678
+ }
679
+ const BAR_MIN_WIDTH = 52;
680
+ const DELTA_ARROW = { up: "↑", down: "↓", flat: "→" };
681
+ function splitValue(value, format, currency) {
682
+ if (format === "currency") return { unit: currency, figure: compact(value) };
683
+ if (format === "percent") return { unit: void 0, figure: `${value}%` };
684
+ return { unit: void 0, figure: compact(value) };
685
+ }
686
+ const AREA_W = 160;
687
+ const AREA_H = 56;
688
+ const AREA_PAD = 6;
689
+ function smoothPath(coords) {
690
+ const clampY = (y, a, b) => Math.min(Math.max(y, Math.min(a, b)), Math.max(a, b));
691
+ let d = `M${coords[0][0].toFixed(1)},${coords[0][1].toFixed(1)}`;
692
+ for (let i = 0; i < coords.length - 1; i++) {
693
+ const p0 = coords[i - 1] ?? coords[i];
694
+ const p1 = coords[i];
695
+ const p2 = coords[i + 1];
696
+ const p3 = coords[i + 2] ?? p2;
697
+ const c1x = p1[0] + (p2[0] - p0[0]) / 6;
698
+ const c1y = clampY(p1[1] + (p2[1] - p0[1]) / 6, p1[1], p2[1]);
699
+ const c2x = p2[0] - (p3[0] - p1[0]) / 6;
700
+ const c2y = clampY(p2[1] - (p3[1] - p1[1]) / 6, p1[1], p2[1]);
701
+ d += ` C${c1x.toFixed(1)},${c1y.toFixed(1)} ${c2x.toFixed(1)},${c2y.toFixed(1)} ${p2[0].toFixed(1)},${p2[1].toFixed(1)}`;
702
+ }
703
+ return d;
704
+ }
705
+ function AreaTrend({ data, className = "metric-hero__trend", tone }) {
706
+ const gradientId = React.useId();
707
+ if (data.length < 2) return null;
708
+ const scale = scaleValues(data);
709
+ const scaled = data.map(scale);
710
+ const min = Math.min(...scaled);
711
+ const range = Math.max(...scaled) - min || 1;
712
+ const step = (AREA_W - AREA_PAD * 2) / (data.length - 1);
713
+ const baseY = AREA_H - AREA_PAD;
714
+ const coords = data.map((v, i) => [AREA_PAD + i * step, baseY - (scale(v) - min) / range * (AREA_H - AREA_PAD * 2)]);
715
+ const line = smoothPath(coords);
716
+ const first = coords[0];
717
+ const last = coords[coords.length - 1];
718
+ const area = `${line} L${last[0].toFixed(1)},${baseY} L${first[0].toFixed(1)},${baseY} Z`;
719
+ const peak = data.reduce((best, v, i) => v > data[best] ? i : best, 0);
720
+ const at = ([x, y]) => ({ left: `${x / AREA_W * 100}%`, top: `${y / AREA_H * 100}%` });
721
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `area-trend ${className}${tone ? ` area-trend--${tone}` : ""}`, "aria-hidden": "true", children: [
722
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: `0 0 ${AREA_W} ${AREA_H}`, preserveAspectRatio: "none", children: [
723
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
724
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: 0.22 }),
725
+ /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: 0 })
726
+ ] }) }),
727
+ /* @__PURE__ */ jsxRuntime.jsx("line", { className: "area-trend__baseline", x1: first[0], x2: last[0], y1: baseY, y2: baseY, vectorEffect: "non-scaling-stroke" }),
728
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: area, fill: `url(#${gradientId})` }),
729
+ /* @__PURE__ */ jsxRuntime.jsx(
730
+ "path",
731
+ {
732
+ d: line,
733
+ fill: "none",
734
+ stroke: "currentColor",
735
+ strokeWidth: 2,
736
+ strokeLinejoin: "round",
737
+ strokeLinecap: "round",
738
+ vectorEffect: "non-scaling-stroke"
739
+ }
740
+ )
741
+ ] }),
742
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "area-trend__marker", style: at(coords[peak]) }),
743
+ peak !== coords.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "area-trend__marker area-trend__marker--end", style: at(last) })
744
+ ] });
745
+ }
746
+ function MetricHero({ label, value, format, delta, sparkline_data, currency = DEFAULT_CURRENCY }) {
747
+ const { unit, figure } = splitValue(value, format, currency);
748
+ const { bind, tooltip } = useTip();
749
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "metric-hero", children: [
750
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "metric-hero__body", children: [
751
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "metric-hero__label", children: label }),
752
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "metric-hero__value", ...bind({ title: label, value: exactValue(value, format, currency) }), children: [
753
+ unit && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-hero__unit", children: unit }),
754
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-hero__figure", children: figure })
755
+ ] }),
756
+ delta && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "metric-hero__delta", children: [
757
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `metric-hero__pill metric-hero__pill--${delta.polarity}`, children: [
758
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-hero__arrow", children: DELTA_ARROW[delta.direction] }),
759
+ formatDeltaAmount(delta)
760
+ ] }),
761
+ delta.basis && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-hero__basis", children: delta.basis })
762
+ ] })
763
+ ] }),
764
+ sparkline_data && /* @__PURE__ */ jsxRuntime.jsx(AreaTrend, { data: sparkline_data, tone: delta == null ? void 0 : delta.polarity }),
765
+ tooltip
766
+ ] });
767
+ }
768
+ function PillBars({ label, points, emphasis_index, format, currency = DEFAULT_CURRENCY }) {
769
+ const { bind, tooltip } = useTip();
770
+ const scale = scaleValues(points.map((p) => p.value));
771
+ const max = Math.max(...points.map((p) => scale(p.value)), 0);
772
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pill-bars", children: [
773
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "pill-bars__label", children: label }),
774
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pill-bars__plot", style: { gridTemplateColumns: `repeat(${points.length}, minmax(${BAR_MIN_WIDTH}px, 1fr))` }, children: points.map((p, i) => {
775
+ const active = i === emphasis_index;
776
+ const height = max > 0 && p.value > 0 ? `max(${scale(p.value) / max * 100}%, 8px)` : "0";
777
+ return /* @__PURE__ */ jsxRuntime.jsxs(
778
+ "div",
779
+ {
780
+ className: `pill-bars__col${active ? " is-active" : ""}`,
781
+ ...bind({ title: p.label, value: exactValue(p.value, format, currency) }),
782
+ children: [
783
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pill-bars__value", children: format === "percent" ? `${p.value}%` : compact(p.value) }),
784
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pill-bars__track", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pill-bars__bar", style: { height } }) }),
785
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pill-bars__axis-label", children: p.label })
786
+ ]
787
+ },
788
+ p.label
789
+ );
790
+ }) }),
791
+ tooltip
792
+ ] });
793
+ }
794
+ function MetricCard({
795
+ payload = [],
796
+ currency = DEFAULT_CURRENCY
797
+ }) {
798
+ var _a, _b, _c;
799
+ const blocks = payload.flatMap((item) => item.data);
800
+ const metric = (_a = blocks.find((b) => b.type === "metric")) == null ? void 0 : _a.props;
801
+ const series = (_b = blocks.find((b) => b.type === "bar_series")) == null ? void 0 : _b.props;
802
+ const provenance = (_c = blocks.find((b) => b.type === "provenance")) == null ? void 0 : _c.props;
803
+ const headline = React.useMemo(
804
+ () => metric ? buildHeadline$7(metric, series, currency) : null,
805
+ [metric, series, currency]
806
+ );
807
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "metric-card", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "metric-card__panel", children: [
808
+ headline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "metric-card__headline", children: headline }),
809
+ metric && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "metric-card__hero", children: /* @__PURE__ */ jsxRuntime.jsx(MetricHero, { ...metric, currency }) }),
810
+ series && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "metric-card__section", children: /* @__PURE__ */ jsxRuntime.jsx(PillBars, { ...series, currency }) }),
811
+ provenance && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { provenance, currency: (metric == null ? void 0 : metric.format) === "currency" ? currency : void 0 })
812
+ ] }) });
813
+ }
814
+ const splitLabel = (label) => {
815
+ const [name, ...rest] = label.split("·").map((s) => s.trim());
816
+ return { name, period: rest.join(" · ") || void 0 };
817
+ };
818
+ function buildHeadline$6(metrics, currency) {
819
+ if (metrics.length === 0) return null;
820
+ const parts = metrics.map((m) => ({ ...splitLabel(m.label), m }));
821
+ const fmt = (m) => formatValue(m.value, m.format, currency);
822
+ const sameMetric = parts.every((p) => p.name === parts[0].name && p.period);
823
+ if (sameMetric && metrics.every((m) => m.format !== "percent")) {
824
+ const total = metrics.reduce((sum, m) => sum + m.value, 0);
825
+ const top = parts.reduce((a, b) => b.m.value > a.m.value ? b : a);
826
+ const first = parts[0].period;
827
+ const last = parts[parts.length - 1].period;
828
+ return `${parts[0].name} across ${first} to ${last} totals ${formatValue(total, metrics[0].format, currency)}, with ${top.period} the largest at ${fmt(top.m)}.`;
829
+ }
830
+ const items = parts.map((p, i) => i === 0 ? `${p.name} is ${fmt(p.m)}` : `${p.name} ${fmt(p.m)}`);
831
+ const sentence = items.length > 1 ? `${items.slice(0, -1).join(", ")} and ${items[items.length - 1]}` : items[0];
832
+ return `${sentence}.`;
833
+ }
834
+ function MetricTile({ metric, currency = DEFAULT_CURRENCY }) {
835
+ const { name, period } = splitLabel(metric.label);
836
+ const { delta } = metric;
837
+ const { unit, figure } = splitValue(metric.value, metric.format, currency);
838
+ const { bind, tooltip } = useTip();
839
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "metric-tile", children: [
840
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "metric-tile__header", children: [
841
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-tile__name", children: name }),
842
+ period && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-tile__period", children: period })
843
+ ] }),
844
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "metric-tile__value", ...bind({ title: metric.label, value: exactValue(metric.value, metric.format, currency) }), children: [
845
+ unit && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-tile__unit", children: unit }),
846
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-tile__figure", children: figure })
847
+ ] }),
848
+ (delta || metric.sparkline_data) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "metric-tile__footer", children: [
849
+ delta && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `metric-tile__badge metric-tile__badge--${delta.polarity}`, children: [
850
+ DELTA_ARROW[delta.direction],
851
+ " ",
852
+ formatDeltaAmount(delta)
853
+ ] }),
854
+ (delta == null ? void 0 : delta.basis) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "metric-tile__basis", children: delta.basis }),
855
+ metric.sparkline_data && /* @__PURE__ */ jsxRuntime.jsx(AreaTrend, { data: metric.sparkline_data, className: "metric-tile__trend", tone: delta == null ? void 0 : delta.polarity })
856
+ ] }),
857
+ tooltip
858
+ ] });
859
+ }
860
+ const columnsFor = (count) => count <= 3 ? Math.max(count, 1) : 2;
861
+ function MetricRow({ metrics, currency = DEFAULT_CURRENCY }) {
862
+ const columns = columnsFor(metrics.length);
863
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "metric-row", "data-cols": columns, style: { ["--metric-row-cols"]: columns }, children: metrics.map((m, i) => /* @__PURE__ */ jsxRuntime.jsx(MetricTile, { metric: m, currency }, `${m.label}-${i}`)) });
864
+ }
865
+ function MetricRowCard({
866
+ payload = [],
867
+ currency = DEFAULT_CURRENCY
868
+ }) {
869
+ var _a, _b, _c;
870
+ const blocks = payload.flatMap((item) => item.data);
871
+ const row = (_a = blocks.find((b) => b.type === "metric_row")) == null ? void 0 : _a.props;
872
+ const series = (_b = blocks.find((b) => b.type === "bar_series")) == null ? void 0 : _b.props;
873
+ const provenance = (_c = blocks.find((b) => b.type === "provenance")) == null ? void 0 : _c.props;
874
+ const headline = React.useMemo(() => row ? buildHeadline$6(row.metrics, currency) : null, [row, currency]);
875
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "metric-row-card", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "metric-row-card__panel", children: [
876
+ headline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "metric-row-card__headline", children: headline }),
877
+ row && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "metric-row-card__section", children: /* @__PURE__ */ jsxRuntime.jsx(MetricRow, { metrics: row.metrics, currency }) }),
878
+ series && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "metric-row-card__section", children: /* @__PURE__ */ jsxRuntime.jsx(PillBars, { ...series, currency }) }),
879
+ provenance && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { provenance, currency })
880
+ ] }) });
881
+ }
882
+ function changeBetween(current, previous) {
883
+ if (!previous) return null;
884
+ if (current.value === previous.value) {
885
+ return { value: 0, unit: "percent", direction: "flat", polarity: "neutral" };
886
+ }
887
+ if (previous.value === 0) return null;
888
+ const change = (current.value - previous.value) / Math.abs(previous.value) * 100;
889
+ const up = change > 0;
890
+ return {
891
+ value: Math.round(Math.abs(change) * 10) / 10,
892
+ unit: "percent",
893
+ direction: up ? "up" : "down",
894
+ polarity: up ? "positive" : "negative"
895
+ };
896
+ }
897
+ function resolveDelta({ delta, entries }) {
898
+ return delta ?? changeBetween(entries[0], entries[1]);
899
+ }
900
+ const arrowFor = (delta) => DELTA_ARROW[delta.direction];
901
+ const hasChange = (delta) => !!delta && delta.direction !== "flat" && delta.value !== 0;
902
+ const periodText = (label) => /^(this|last|previous|current)\b/i.test(label) ? label.toLowerCase() : label;
903
+ const withPeriod = (name, entry) => /^(this|last|previous|current)\b/i.test(entry.label) ? `${name} ${periodText(entry.label)}` : `${name} in ${entry.label}`;
904
+ function buildHeadline$5(props, delta, currency) {
905
+ const { entries } = props;
906
+ const [current, previous] = entries;
907
+ if (!current) return null;
908
+ const fmt = (v) => formatValue(v, props.format, currency);
909
+ const subject = `${withPeriod(props.label, current)} are ${fmt(current.value)}`;
910
+ if (!previous) return `${subject}.`;
911
+ const prev = `${periodText(previous.label)}'s ${fmt(previous.value)}`;
912
+ let text;
913
+ if (!delta) text = `${subject}, compared with ${prev}`;
914
+ else if (!hasChange(delta)) text = `${subject}, identical to ${prev}, so there's no change`;
915
+ else text = `${subject}, ${delta.direction} ${formatDeltaAmount(delta)} from ${prev}`;
916
+ if (entries.length > 2) {
917
+ const values = entries.map((e) => e.value);
918
+ if (current.value === Math.max(...values) && current.value !== Math.min(...values)) {
919
+ text += ` — the highest of the ${entries.length} periods shown`;
920
+ } else if (current.value === Math.min(...values) && current.value !== Math.max(...values)) {
921
+ text += ` — the lowest of the ${entries.length} periods shown`;
922
+ }
923
+ }
924
+ return `${text}.`;
925
+ }
926
+ function Comparison({ props, currency = DEFAULT_CURRENCY }) {
927
+ const { entries } = props;
928
+ const [current, previous] = entries;
929
+ if (!current) return null;
930
+ const delta = resolveDelta(props);
931
+ const fmt = (v) => formatValue(v, props.format, currency);
932
+ const history = entries.slice(1);
933
+ const { bind, tooltip } = useTip();
934
+ const { unit, figure } = splitValue(current.value, props.format, currency);
935
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "comparison", children: [
936
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "comparison__tile", children: [
937
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "comparison__header", children: [
938
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "comparison__name", children: props.label }),
939
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "comparison__period", children: current.label })
940
+ ] }),
941
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "comparison__value", ...bind({ title: current.label, value: exactValue(current.value, props.format, currency) }), children: [
942
+ unit && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "comparison__unit", children: unit }),
943
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "comparison__figure", children: figure })
944
+ ] }),
945
+ hasChange(delta) && previous && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "comparison__delta", children: [
946
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `comparison__badge comparison__badge--${delta.polarity}`, children: [
947
+ arrowFor(delta),
948
+ " ",
949
+ formatDeltaAmount(delta)
950
+ ] }),
951
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "comparison__basis", children: delta.basis ?? `vs. ${periodText(previous.label)}` })
952
+ ] })
953
+ ] }),
954
+ history.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "comparison__history", children: history.map((entry, i) => {
955
+ const rowDelta = history.length > 1 ? changeBetween(entry, history[i + 1]) : null;
956
+ return /* @__PURE__ */ jsxRuntime.jsxs(
957
+ "div",
958
+ {
959
+ className: "comparison__previous",
960
+ ...bind({ title: entry.label, value: exactValue(entry.value, props.format, currency) }),
961
+ children: [
962
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "comparison__previous-label", children: entry.label }),
963
+ hasChange(rowDelta) && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `comparison__row-badge comparison__badge--${rowDelta.polarity}`, children: [
964
+ arrowFor(rowDelta),
965
+ " ",
966
+ rowDelta.value,
967
+ "%"
968
+ ] }),
969
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "comparison__previous-value", children: fmt(entry.value) })
970
+ ]
971
+ },
972
+ `${entry.label}-${i}`
973
+ );
974
+ }) }),
975
+ tooltip
976
+ ] });
977
+ }
978
+ function ComparisonCard({
979
+ payload = [],
980
+ currency = DEFAULT_CURRENCY
981
+ }) {
982
+ var _a, _b;
983
+ const blocks = payload.flatMap((item) => item.data);
984
+ const comparison = (_a = blocks.find((b) => b.type === "comparison")) == null ? void 0 : _a.props;
985
+ const provenance = (_b = blocks.find((b) => b.type === "provenance")) == null ? void 0 : _b.props;
986
+ const headline = React.useMemo(
987
+ () => comparison ? buildHeadline$5(comparison, resolveDelta(comparison), currency) : null,
988
+ [comparison, currency]
989
+ );
990
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "comparison-card", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "comparison-card__panel", children: [
991
+ headline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "comparison-card__headline", children: headline }),
992
+ comparison && /* @__PURE__ */ jsxRuntime.jsx(Comparison, { props: comparison, currency }),
993
+ provenance && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { provenance, currency })
994
+ ] }) });
995
+ }
996
+ const peakIndex = (points) => points.reduce((best, p, i) => p.value > points[best].value ? i : best, 0);
997
+ const isMonth = (label) => fullMonth(label) !== label;
998
+ function buildHeadline$4({ label, points, format }, currency) {
999
+ if (points.length === 0) return null;
1000
+ const fmt = (v) => formatValue(v, format, currency);
1001
+ const unit = points.every((p) => isMonth(p.label)) ? "months" : "periods";
1002
+ const total = points.reduce((sum, p) => sum + p.value, 0);
1003
+ let text = `The past ${points.length} ${unit} delivered ${fmt(total)} in ${label.toLowerCase()}`;
1004
+ if (total > 0) {
1005
+ const peak = points[peakIndex(points)];
1006
+ text += `, driven primarily by the ${fullMonth(peak.label)} figure (${fmt(peak.value)})`;
1007
+ }
1008
+ return `${text}.`;
1009
+ }
1010
+ function SeriesSummary({ label, points, format, currency = DEFAULT_CURRENCY }) {
1011
+ if (points.length === 0) return null;
1012
+ const latest = points[points.length - 1];
1013
+ const peak = points[peakIndex(points)];
1014
+ const { unit, figure } = splitValue(latest.value, format, currency);
1015
+ const { bind, tooltip } = useTip();
1016
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "series-summary", children: [
1017
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "series-summary__header", children: [
1018
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "series-summary__name", children: label }),
1019
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "series-summary__period", children: latest.label })
1020
+ ] }),
1021
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "series-summary__main", children: [
1022
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "series-summary__body", children: [
1023
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "series-summary__value", ...bind({ title: latest.label, value: exactValue(latest.value, format, currency) }), children: [
1024
+ unit && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "series-summary__unit", children: unit }),
1025
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "series-summary__figure", children: figure })
1026
+ ] }),
1027
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "series-summary__peak", children: [
1028
+ "Peak: ",
1029
+ peak.label,
1030
+ " · ",
1031
+ formatValue(peak.value, format, currency)
1032
+ ] })
1033
+ ] }),
1034
+ /* @__PURE__ */ jsxRuntime.jsx(AreaTrend, { data: points.map((p) => p.value), className: "series-summary__trend" })
1035
+ ] }),
1036
+ tooltip
1037
+ ] });
1038
+ }
1039
+ function BarSeriesCard({
1040
+ payload = [],
1041
+ currency = DEFAULT_CURRENCY
1042
+ }) {
1043
+ var _a, _b;
1044
+ const blocks = payload.flatMap((item) => item.data);
1045
+ const series = (_a = blocks.find((b) => b.type === "bar_series")) == null ? void 0 : _a.props;
1046
+ const provenance = (_b = blocks.find((b) => b.type === "provenance")) == null ? void 0 : _b.props;
1047
+ const headline = React.useMemo(() => series ? buildHeadline$4(series, currency) : null, [series, currency]);
1048
+ const emphasis = series ? series.emphasis_index ?? peakIndex(series.points) : void 0;
1049
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bar-series-card", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "bar-series-card__panel", children: [
1050
+ headline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "bar-series-card__headline", children: headline }),
1051
+ series && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1052
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bar-series-card__section bar-series-card__section--hero", children: /* @__PURE__ */ jsxRuntime.jsx(SeriesSummary, { ...series, currency }) }),
1053
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bar-series-card__section", children: /* @__PURE__ */ jsxRuntime.jsx(PillBars, { ...series, label: `${series.label} by period`, emphasis_index: emphasis, currency }) })
1054
+ ] }),
1055
+ /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { provenance, rowCount: (series == null ? void 0 : series.points.length) ?? 0, currency })
1056
+ ] }) });
1057
+ }
1058
+ function formatFull(value, format, currency = DEFAULT_CURRENCY) {
1059
+ if (format === "percent") return `${value}%`;
1060
+ const number = value.toLocaleString("en-US", {
1061
+ minimumFractionDigits: Number.isInteger(value) ? 0 : 2,
1062
+ maximumFractionDigits: 2
1063
+ });
1064
+ return format === "currency" ? `${currency} ${number}` : number;
1065
+ }
1066
+ const subjectOf = (label) => label.replace(/^top\s+/i, "").trim();
1067
+ const joinList = (items) => items.length > 1 ? `${items.slice(0, -1).join(", ")} and ${items[items.length - 1]}` : items[0];
1068
+ function buildHeadline$3({ label, entries, format }, currency) {
1069
+ if (entries.length === 0) return null;
1070
+ const list = entries.map((e) => `${e.label} (${formatFull(e.value, format, currency)})`);
1071
+ return `Our top ${entries.length} ${subjectOf(label)} are ${joinList(list)}.`;
1072
+ }
1073
+ function RankedBars({ label, entries, format, total_row_count, currency = DEFAULT_CURRENCY }) {
1074
+ const max = Math.max(...entries.map((e) => e.value), 0);
1075
+ const truncated = total_row_count !== void 0 && total_row_count > entries.length;
1076
+ const { bind, tooltip } = useTip();
1077
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ranked-bars", children: [
1078
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ranked-bars__heading", children: [
1079
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "ranked-bars__label", children: label }),
1080
+ truncated && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ranked-bars__count", children: [
1081
+ "Top ",
1082
+ entries.length,
1083
+ " of ",
1084
+ total_row_count
1085
+ ] })
1086
+ ] }),
1087
+ /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "ranked-bars__list", children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs(
1088
+ "li",
1089
+ {
1090
+ className: `ranked-bars__row${i === 0 ? " is-top" : ""}`,
1091
+ ...bind({ title: e.label, value: exactValue(e.value, format, currency) }),
1092
+ children: [
1093
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ranked-bars__line", children: [
1094
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ranked-bars__name", children: e.label }),
1095
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ranked-bars__value", children: formatFull(e.value, format, currency) })
1096
+ ] }),
1097
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ranked-bars__track", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ranked-bars__bar", style: { width: `${max > 0 ? Math.max(e.value / max * 100, 0) : 0}%` } }) })
1098
+ ]
1099
+ },
1100
+ `${e.label}-${i}`
1101
+ )) }),
1102
+ tooltip
1103
+ ] });
1104
+ }
1105
+ function RankedBarsCard({
1106
+ payload = [],
1107
+ currency = DEFAULT_CURRENCY
1108
+ }) {
1109
+ var _a, _b;
1110
+ const blocks = payload.flatMap((item) => item.data);
1111
+ const ranked = (_a = blocks.find((b) => b.type === "ranked_bars")) == null ? void 0 : _a.props;
1112
+ const provenance = (_b = blocks.find((b) => b.type === "provenance")) == null ? void 0 : _b.props;
1113
+ const headline = React.useMemo(() => ranked ? buildHeadline$3(ranked, currency) : null, [ranked, currency]);
1114
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ranked-bars-card", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "ranked-bars-card__panel", children: [
1115
+ headline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ranked-bars-card__headline", children: headline }),
1116
+ ranked && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ranked-bars-card__section", children: /* @__PURE__ */ jsxRuntime.jsx(RankedBars, { ...ranked, currency }) }),
1117
+ provenance && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { provenance, currency: (ranked == null ? void 0 : ranked.format) === "currency" ? currency : void 0 })
1118
+ ] }) });
1119
+ }
1120
+ const STATUS_COLOR_RULES = [
1121
+ { color: "#9f2f24", keywords: ["rejected", "cancelled", "canceled", "void", "refunded", "returned", "written off", "terminated", "declined"] },
1122
+ { color: "#c9402f", keywords: ["overdue", "failed", "late", "disputed", "expired", "blocked", "inactive", "deactive", "error"] },
1123
+ { color: "#b5690f", keywords: ["pending", "unpaid", "partially", "partial", "draft", "open", "submitted", "awaiting", "in progress", "on hold"] },
1124
+ { color: "#1f8a55", keywords: ["paid", "settled", "approved", "active", "completed", "complete", "closed", "delivered", "received", "posted"] }
1125
+ ];
1126
+ const NEUTRAL_COLOR = "#8a9099";
1127
+ const RULE_PATTERNS = STATUS_COLOR_RULES.map(({ color, keywords }) => ({
1128
+ color,
1129
+ match: new RegExp(`\\b(?:${keywords.join("|")})\\b`, "i")
1130
+ }));
1131
+ const colorForStatus = (label) => {
1132
+ var _a;
1133
+ return ((_a = RULE_PATTERNS.find((rule) => rule.match.test(label))) == null ? void 0 : _a.color) ?? NEUTRAL_COLOR;
1134
+ };
1135
+ const pct = (value, total) => total > 0 ? Math.round(value / total * 100) : 0;
1136
+ const resolveTotal = ({ total, segments }) => total ?? segments.reduce((sum, s) => sum + s.value, 0);
1137
+ function nounOf(label) {
1138
+ const base = label.split("·")[0].replace(/\s+by\s+.*$/i, "").replace(/\s+status$/i, "").trim().toLowerCase();
1139
+ return base.endsWith("s") ? base : `${base}s`;
1140
+ }
1141
+ function buildHeadline$2(props) {
1142
+ var _a;
1143
+ const { label, segments } = props;
1144
+ if (segments.length === 0) return null;
1145
+ const total = resolveTotal(props);
1146
+ const year = (_a = label.match(/\b(19|20)\d{2}\b/)) == null ? void 0 : _a[0];
1147
+ const [first] = segments;
1148
+ const overdue = segments.find((s) => s !== first && /overdue/i.test(s.label));
1149
+ const second = overdue ?? segments[1];
1150
+ let text = `Of ${total} ${nounOf(label)}${year ? ` in ${year}` : ""}, ${first.value} are ${first.label.toLowerCase()}`;
1151
+ if (second) text += ` and ${second.value} are ${second.label.toLowerCase()}`;
1152
+ return `${text}.`;
1153
+ }
1154
+ function Donut({ segments, total, size = 148, stroke = 20 }) {
1155
+ const radius = (size - stroke) / 2;
1156
+ const circumference = 2 * Math.PI * radius;
1157
+ const { bind, tooltip } = useTip();
1158
+ const gap = segments.filter((s) => s.value > 0).length > 1 ? 2 : 0;
1159
+ let offset = 0;
1160
+ const arcs = segments.map((seg) => {
1161
+ const length = total > 0 ? seg.value / total * circumference : 0;
1162
+ const visible = Math.max(length - gap, 0);
1163
+ const arc = /* @__PURE__ */ jsxRuntime.jsx(
1164
+ "circle",
1165
+ {
1166
+ cx: size / 2,
1167
+ cy: size / 2,
1168
+ r: radius,
1169
+ fill: "none",
1170
+ stroke: colorForStatus(seg.label),
1171
+ strokeWidth: stroke,
1172
+ strokeDasharray: `${visible} ${circumference - visible}`,
1173
+ strokeDashoffset: -offset,
1174
+ ...bind({ title: seg.label, value: `${seg.value.toLocaleString("en-US")} (${pct(seg.value, total)}%)` })
1175
+ },
1176
+ seg.label
1177
+ );
1178
+ offset += length;
1179
+ return arc;
1180
+ });
1181
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "status-donut__chart", style: { width: size, height: size }, children: [
1182
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, role: "img", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("g", { transform: `rotate(-90 ${size / 2} ${size / 2})`, children: arcs }) }),
1183
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "status-donut__center", children: [
1184
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "status-donut__total", children: total }),
1185
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "status-donut__total-label", children: "Total" })
1186
+ ] }),
1187
+ tooltip
1188
+ ] });
1189
+ }
1190
+ function Legend({ segments, total }) {
1191
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "status-donut__legend", children: segments.map((seg) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "status-donut__legend-row", children: [
1192
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "status-donut__dot", style: { background: colorForStatus(seg.label) } }),
1193
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "status-donut__legend-label", children: seg.label }),
1194
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "status-donut__legend-value", children: seg.value }),
1195
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "status-donut__legend-pct", children: [
1196
+ pct(seg.value, total),
1197
+ "%"
1198
+ ] })
1199
+ ] }, seg.label)) });
1200
+ }
1201
+ function StatusDonut({ donut, provenance }) {
1202
+ const headline = React.useMemo(() => buildHeadline$2(donut), [donut]);
1203
+ const total = resolveTotal(donut);
1204
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "status-donut", children: [
1205
+ headline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "status-donut__headline", children: headline }),
1206
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "status-donut__body", children: [
1207
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "status-donut__label", children: donut.label }),
1208
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "status-donut__content", children: [
1209
+ /* @__PURE__ */ jsxRuntime.jsx(Donut, { segments: donut.segments, total }),
1210
+ /* @__PURE__ */ jsxRuntime.jsx(Legend, { segments: donut.segments, total })
1211
+ ] })
1212
+ ] }),
1213
+ provenance && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { provenance })
1214
+ ] });
1215
+ }
1216
+ function StatusDonutCard({ payload = [] }) {
1217
+ const blocks = payload.flatMap((item) => item.data);
1218
+ const donut = blocks.find((b) => b.type === "status_donut");
1219
+ const provenance = blocks.find((b) => b.type === "provenance");
1220
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "status-donut-card", children: (donut == null ? void 0 : donut.type) === "status_donut" && /* @__PURE__ */ jsxRuntime.jsx(
1221
+ StatusDonut,
1222
+ {
1223
+ donut: donut.props,
1224
+ provenance: (provenance == null ? void 0 : provenance.type) === "provenance" ? provenance.props : void 0
1225
+ }
1226
+ ) });
1227
+ }
1228
+ const NUMBER_WORDS = [
1229
+ "zero",
1230
+ "one",
1231
+ "two",
1232
+ "three",
1233
+ "four",
1234
+ "five",
1235
+ "six",
1236
+ "seven",
1237
+ "eight",
1238
+ "nine",
1239
+ "ten",
1240
+ "eleven",
1241
+ "twelve",
1242
+ "thirteen",
1243
+ "fourteen",
1244
+ "fifteen",
1245
+ "sixteen",
1246
+ "seventeen",
1247
+ "eighteen",
1248
+ "nineteen",
1249
+ "twenty"
1250
+ ];
1251
+ const inWords = (n) => NUMBER_WORDS[n] ?? `${n}`;
1252
+ const capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1);
1253
+ function formatCell(value) {
1254
+ if (value === null || value === void 0 || value === "") return "—";
1255
+ if (typeof value === "number") {
1256
+ return value.toLocaleString("en-US", {
1257
+ minimumFractionDigits: Number.isInteger(value) ? 0 : 2,
1258
+ maximumFractionDigits: 2
1259
+ });
1260
+ }
1261
+ return value;
1262
+ }
1263
+ function buildHeadline$1({ label, rows, total_row_count }) {
1264
+ const noun = label.toLowerCase();
1265
+ const total = total_row_count ?? rows.length;
1266
+ if (total === 0) return `No ${noun} found.`;
1267
+ if (total > rows.length) {
1268
+ const verb = rows.length === 1 ? "is" : "are";
1269
+ return `${capitalize(inWords(total))} ${noun} in total. Here ${verb} the first ${inWords(rows.length)}.`;
1270
+ }
1271
+ return `${capitalize(inWords(total))} ${noun}.`;
1272
+ }
1273
+ function StatusPill({ value }) {
1274
+ if (value === null || value === "") return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "data-table__empty", children: "—" });
1275
+ const color = colorForStatus(String(value));
1276
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "data-table__pill", style: { color, background: `${color}1a` }, children: value });
1277
+ }
1278
+ function Cell({ column, value, first }) {
1279
+ const classes = [
1280
+ "data-table__cell",
1281
+ `data-table__cell--${column.align ?? "left"}`,
1282
+ typeof value === "number" ? "data-table__cell--number" : "",
1283
+ first ? "data-table__cell--key" : ""
1284
+ ].filter(Boolean).join(" ");
1285
+ return /* @__PURE__ */ jsxRuntime.jsx("td", { className: classes, children: column.role === "status" ? /* @__PURE__ */ jsxRuntime.jsx(StatusPill, { value }) : formatCell(value) });
1286
+ }
1287
+ function DataTable({ label, columns, rows, total_row_count }) {
1288
+ const truncated = total_row_count !== void 0 && total_row_count > rows.length;
1289
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "data-table", children: [
1290
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "data-table__label", children: label }),
1291
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "data-table__scroll", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "data-table__table", children: [
1292
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", className: `data-table__head data-table__cell--${c.align ?? "left"}`, children: c.label }, c.key)) }) }),
1293
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row, r) => /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "data-table__row", children: columns.map((c, i) => /* @__PURE__ */ jsxRuntime.jsx(Cell, { column: c, value: row[c.key] ?? null, first: i === 0 }, c.key)) }, r)) })
1294
+ ] }) }),
1295
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "data-table__count", children: [
1296
+ "Showing ",
1297
+ rows.length,
1298
+ " of ",
1299
+ truncated ? total_row_count : rows.length
1300
+ ] })
1301
+ ] });
1302
+ }
1303
+ function TableCard({ payload = [] }) {
1304
+ var _a, _b;
1305
+ const blocks = payload.flatMap((item) => item.data);
1306
+ const table = (_a = blocks.find((b) => b.type === "table")) == null ? void 0 : _a.props;
1307
+ const provenance = (_b = blocks.find((b) => b.type === "provenance")) == null ? void 0 : _b.props;
1308
+ const headline = React.useMemo(() => table ? buildHeadline$1(table) : null, [table]);
1309
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "table-card", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "table-card__panel", children: [
1310
+ headline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "table-card__headline", children: headline }),
1311
+ table && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "table-card__section", children: /* @__PURE__ */ jsxRuntime.jsx(DataTable, { ...table }) }),
1312
+ provenance && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { provenance })
1313
+ ] }) });
1314
+ }
1315
+ function formatField(value) {
1316
+ if (value === null || value === void 0 || value === "") return "—";
1317
+ if (typeof value === "number") {
1318
+ return value.toLocaleString("en-US", {
1319
+ minimumFractionDigits: Number.isInteger(value) ? 0 : 2,
1320
+ maximumFractionDigits: 2
1321
+ });
1322
+ }
1323
+ return value;
1324
+ }
1325
+ function recordName(fields) {
1326
+ var _a;
1327
+ const named = fields.find((f) => /\bname\b/i.test(f.label) && f.value !== null && f.value !== "");
1328
+ const value = (_a = named ?? fields[0]) == null ? void 0 : _a.value;
1329
+ return value === null || value === void 0 || value === "" ? null : String(value);
1330
+ }
1331
+ function buildHeadline({ label, fields }) {
1332
+ const name = recordName(fields);
1333
+ return `Here's what we have on file for ${name ?? `this ${label.toLowerCase()}`}.`;
1334
+ }
1335
+ function RecordList({ label, fields }) {
1336
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "record-list", children: [
1337
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "record-list__label", children: label }),
1338
+ /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "record-list__fields", children: fields.map((f, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "record-list__row", children: [
1339
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "record-list__key", children: f.label }),
1340
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: `record-list__value${f.value === null || f.value === "" ? " is-empty" : ""}`, children: formatField(f.value) })
1341
+ ] }, `${f.label}-${i}`)) })
1342
+ ] });
1343
+ }
1344
+ function RecordListCard({ payload = [] }) {
1345
+ var _a, _b;
1346
+ const blocks = payload.flatMap((item) => item.data);
1347
+ const record = (_a = blocks.find((b) => b.type === "record_list")) == null ? void 0 : _a.props;
1348
+ const provenance = (_b = blocks.find((b) => b.type === "provenance")) == null ? void 0 : _b.props;
1349
+ const headline = React.useMemo(() => record ? buildHeadline(record) : null, [record]);
1350
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "record-list-card", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "record-list-card__panel", children: [
1351
+ headline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "record-list-card__headline", children: headline }),
1352
+ record && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "record-list-card__section", children: /* @__PURE__ */ jsxRuntime.jsx(RecordList, { ...record }) }),
1353
+ provenance && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { provenance })
1354
+ ] }) });
1355
+ }
1356
+ const SEVERITY_LABEL = {
1357
+ info: "Note",
1358
+ warning: "Warning",
1359
+ critical: "Critical",
1360
+ positive: "Good news"
1361
+ };
1362
+ function Callout({ severity, text }) {
1363
+ const level = SEVERITY_LABEL[severity] ? severity : "info";
1364
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `callout callout--${level}`, role: level === "critical" ? "alert" : "note", children: [
1365
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "callout__sr", children: [
1366
+ SEVERITY_LABEL[level],
1367
+ ": "
1368
+ ] }),
1369
+ text
1370
+ ] });
1371
+ }
1372
+ function CalloutCard({
1373
+ payload = [],
1374
+ answer
1375
+ }) {
1376
+ const callouts = payload.flatMap((item) => item.data).filter((b) => b.type === "callout");
1377
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "callout-card", children: /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "callout-card__panel", children: [
1378
+ answer && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "callout-card__answer", children: answer }),
1379
+ callouts.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "callout-card__callouts", children: callouts.map((b) => /* @__PURE__ */ jsxRuntime.jsx(Callout, { ...b.props }, b.id)) })
1380
+ ] }) });
1381
+ }
1382
+ const CARDS = {
1383
+ metric: MetricCard,
1384
+ metric_row: MetricRowCard,
1385
+ comparison: ComparisonCard,
1386
+ bar_series: BarSeriesCard,
1387
+ ranked_bars: RankedBarsCard,
1388
+ status_donut: StatusDonutCard,
1389
+ table: TableCard,
1390
+ record_list: RecordListCard,
1391
+ callout: CalloutCard
1392
+ };
1393
+ const HOSTS_BAR_SERIES = /* @__PURE__ */ new Set(["metric", "metric_row"]);
1394
+ class CardBoundary extends React.Component {
1395
+ constructor() {
1396
+ super(...arguments);
1397
+ this.state = { failed: false };
1398
+ }
1399
+ static getDerivedStateFromError() {
1400
+ return { failed: true };
1401
+ }
1402
+ componentDidCatch(error) {
1403
+ console.error(`GenUI card "${this.props.type}" failed to render`, error);
1404
+ }
1405
+ render() {
1406
+ return this.state.failed ? null : this.props.children;
1407
+ }
1408
+ }
1409
+ function BlockRenderer({ blocks }) {
1410
+ if (!(blocks == null ? void 0 : blocks.length)) return null;
1411
+ const provenance = blocks.find((b) => b.type === "provenance");
1412
+ const hasHost = blocks.some((b) => HOSTS_BAR_SERIES.has(b.type));
1413
+ const hostedSeries = hasHost ? blocks.filter((b) => b.type === "bar_series") : [];
1414
+ const primary = blocks.filter(
1415
+ (b) => CARDS[b.type] && !hostedSeries.includes(b)
1416
+ );
1417
+ const lastData = [...primary].reverse().find((b) => b.type !== "callout");
1418
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--blocks", children: primary.map((block, i) => {
1419
+ const Card = CARDS[block.type];
1420
+ const data = [block];
1421
+ if (HOSTS_BAR_SERIES.has(block.type)) data.push(...hostedSeries);
1422
+ if (provenance && block === lastData) data.push(provenance);
1423
+ return /* @__PURE__ */ jsxRuntime.jsx(CardBoundary, { type: block.type, children: /* @__PURE__ */ jsxRuntime.jsx(Card, { payload: [{ type: "blocks", data }] }) }, block.id || `${block.type}-${i}`);
1424
+ }) });
1425
+ }
1426
+ const ChatBotMessages = ({ messages, isTyping, bodyRef, footer }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: bodyRef, className: "chatBot--body", children: [
1427
+ messages.map((msg) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `chatBot--msg-row chatBot--msg-row--${msg.role}`, children: [
1428
+ msg.role === "user" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--user-bubble", children: msg.text }),
1429
+ msg.role === "ai" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--ai-msg", children: [
1430
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--ai-sender", children: [
1431
+ /* @__PURE__ */ jsxRuntime.jsx(SparkMark, { size: 22 }),
1432
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--ai-name", children: "NovaForce" }),
1433
+ (msg.durationMs !== void 0 || msg.time) && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--ai-time", children: [
1434
+ "· ",
1435
+ msg.durationMs !== void 0 ? formatDuration(msg.durationMs) : msg.time
1436
+ ] }),
1437
+ msg.inputTokens !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--ai-stat", "data-tip": `${msg.inputTokens.toLocaleString()} input tokens`, children: [
1438
+ "↓ ",
1439
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: formatTokens(msg.inputTokens) }),
1440
+ " in"
1441
+ ] }),
1442
+ msg.outputTokens !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--ai-stat", "data-tip": `${msg.outputTokens.toLocaleString()} output tokens`, children: [
1443
+ "↑ ",
1444
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: formatTokens(msg.outputTokens) }),
1445
+ " out"
1446
+ ] }),
1447
+ !!msg.tokens && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--ai-stat", "data-tip": `${msg.tokens.toLocaleString()} total tokens`, children: [
1448
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: formatTokens(msg.tokens) }),
1449
+ " tokens"
1450
+ ] })
1451
+ ] }),
1452
+ /* @__PURE__ */ jsxRuntime.jsx(
1453
+ "div",
1454
+ {
1455
+ className: "chatBot--ai-text",
1456
+ dangerouslySetInnerHTML: { __html: marked.marked.parse(msg.text) }
1457
+ }
1458
+ ),
1459
+ msg.blocks && /* @__PURE__ */ jsxRuntime.jsx(BlockRenderer, { blocks: msg.blocks })
1460
+ ] })
1461
+ ] }, msg.id)),
1462
+ isTyping && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--ai-msg", children: [
1463
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--ai-sender", children: [
1464
+ /* @__PURE__ */ jsxRuntime.jsx(SparkMark, { size: 22 }),
1465
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--ai-name", children: "NovaForce" })
1466
+ ] }),
1467
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--typing-dots", children: [
1468
+ /* @__PURE__ */ jsxRuntime.jsx("span", {}),
1469
+ /* @__PURE__ */ jsxRuntime.jsx("span", {}),
1470
+ /* @__PURE__ */ jsxRuntime.jsx("span", {})
1471
+ ] })
1472
+ ] }),
1473
+ footer
1474
+ ] });
1475
+ const FORM_TYPES = ["sales_invoice", "purchase_invoice"];
1476
+ const ChatBotInput = ({
1477
+ inputValue,
1478
+ isTyping,
1479
+ mode,
1480
+ formType,
1481
+ showSlashMenu,
1482
+ filteredCommands,
1483
+ slashIndex,
1484
+ textareaRef,
1485
+ onChange,
1486
+ onKeyDown,
1487
+ onSend,
1488
+ onSlashHover,
1489
+ onSlashSelect,
1490
+ onModeChange,
1491
+ onFormTypeChange,
1492
+ activeDocument,
1493
+ activeDocuments,
1494
+ onDocDelete,
1495
+ onDocUpload,
1496
+ onMultiDocDelete
1497
+ }) => {
1498
+ const canSend = mode === "agent" ? formType !== null && !isTyping : mode === "doc_qa" ? activeDocuments && activeDocuments.length > 0 ? activeDocuments.every((d) => d.status === "ready") && !!inputValue.trim() && !isTyping : (activeDocument == null ? void 0 : activeDocument.status) === "ready" && !!inputValue.trim() && !isTyping : !!inputValue.trim() && !isTyping;
1499
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--input-area", children: [
1500
+ showSlashMenu && filteredCommands.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--slash-menu", children: [
1501
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--slash-menu-label", children: "Commands" }),
1502
+ filteredCommands.map((cmd, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
1503
+ "button",
1504
+ {
1505
+ className: `chatBot--slash-item${idx === slashIndex ? " chatBot--slash-item--active" : ""}`,
1506
+ onMouseEnter: () => onSlashHover(idx),
1507
+ onClick: () => onSlashSelect(cmd.id),
1508
+ children: [
1509
+ /* @__PURE__ */ jsxRuntime.jsx(SparkMark, { size: 28 }),
1510
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1511
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--slash-item-label", children: cmd.label }),
1512
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--slash-item-desc", children: cmd.description })
1513
+ ] })
1514
+ ]
1515
+ },
1516
+ cmd.id
1517
+ ))
1518
+ ] }),
1519
+ mode === "agent" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--form-type-bar", children: [
1520
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--form-type-label", children: "Form type" }),
1521
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--form-type-options", children: FORM_TYPES.map((ft) => /* @__PURE__ */ jsxRuntime.jsx(
1522
+ "button",
1523
+ {
1524
+ className: `chatBot--form-type-btn${formType === ft ? " chatBot--form-type-btn--active" : ""}`,
1525
+ onClick: () => onFormTypeChange(ft),
1526
+ children: FORM_TYPE_LABELS[ft]
1527
+ },
1528
+ ft
1529
+ )) })
1530
+ ] }),
1531
+ (mode === "doc_qa" || mode === "smart") && activeDocument && (!activeDocuments || activeDocuments.length === 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-chip-bar", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-chip", children: [
1532
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-chip-dot", style: {
1533
+ background: activeDocument.status === "ready" ? "#2EB273" : activeDocument.status === "failed" ? "#C62828" : "#2EB273"
1534
+ } }),
1535
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-chip-name", children: activeDocument.filename }),
1536
+ activeDocument.status === "ready" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-chip-badge", children: "Ready" })
1537
+ ] }) }),
1538
+ (mode === "doc_qa" || mode === "smart") && activeDocuments && activeDocuments.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-chip-bar", children: activeDocuments.map((doc) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-chip", children: [
1539
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-chip-dot", style: {
1540
+ background: doc.status === "ready" ? "#2EB273" : doc.status === "failed" ? "#C62828" : "#2EB273"
1541
+ } }),
1542
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-chip-name", title: doc.filename, children: doc.filename }),
1543
+ doc.status === "ready" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-chip-badge", children: "Ready" })
1544
+ ] }, doc.doc_id)) }),
1545
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--input-wrap", children: [
1546
+ /* @__PURE__ */ jsxRuntime.jsx(
1547
+ "textarea",
1548
+ {
1549
+ ref: textareaRef,
1550
+ className: "chatBot--textarea",
1551
+ rows: 2,
1552
+ placeholder: (mode === "doc_qa" || mode === "smart") && (activeDocument || activeDocuments && activeDocuments.length > 0) ? activeDocuments && activeDocuments.length > 0 ? activeDocuments.every((d) => d.status === "ready") ? "Ask a question about the document(s)…" : "Documents are processing…" : (activeDocument == null ? void 0 : activeDocument.status) === "ready" ? "Ask a question about this document…" : activeDocument ? "Document is still processing…" : "Upload PDF(s) above, then ask questions…" : mode === "agent" ? "Add any context for the agent…" : "Ask anything, or describe an action…",
1553
+ value: inputValue,
1554
+ onChange,
1555
+ onKeyDown,
1556
+ disabled: isTyping || (mode === "doc_qa" || mode === "smart") && !!activeDocument && activeDocument.status !== "ready" || (mode === "doc_qa" || mode === "smart") && !!activeDocuments && activeDocuments.length > 0 && activeDocuments.some((d) => d.status !== "ready")
1557
+ }
1558
+ ),
1559
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--ctrls", children: [
1560
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--ctrls-grow" }),
1561
+ mode === "smart" && !activeDocument && (!activeDocuments || activeDocuments.length === 0) && /* @__PURE__ */ jsxRuntime.jsx(
1562
+ "button",
1563
+ {
1564
+ className: "chatBot--attach-btn",
1565
+ onClick: onDocUpload,
1566
+ disabled: isTyping,
1567
+ title: "Attach Document",
1568
+ children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.UploadFileRounded, { style: { fontSize: 15 } })
1569
+ }
1570
+ ),
1571
+ /* @__PURE__ */ jsxRuntime.jsx(
1572
+ "button",
1573
+ {
1574
+ className: `chatBot--send-btn${canSend ? " active" : ""}`,
1575
+ onClick: onSend,
1576
+ disabled: !canSend,
1577
+ title: "Send",
1578
+ children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ArrowUpwardRounded, { style: { fontSize: 15 } })
1579
+ }
1580
+ )
1581
+ ] })
1582
+ ] }),
1583
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--hints", style: { display: "flex", alignItems: "center", justifyContent: "center", gap: "6px", overflow: "hidden" }, children: [
1584
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "#9ca3af", fontSize: "10px", whiteSpace: "nowrap" }, children: mode === "doc_qa" ? "Document Q&A mode" : "Replies use ERP data only" }),
1585
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "1px", height: "10px", background: "#d1d5db", flexShrink: 0 } }),
1586
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: "-16px", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: /* @__PURE__ */ jsxRuntime.jsx(aiDisclaimer.AIDisclaimer, { showIcon: false, justifyContent: "flex-start" }) })
1587
+ ] })
1588
+ ] });
1589
+ };
1590
+ const ChatBotLauncher = ({ onOpen }) => /* @__PURE__ */ jsxRuntime.jsxs("button", { className: "chatBot--launcher", onClick: onOpen, children: [
1591
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--launcher-icon", children: /* @__PURE__ */ jsxRuntime.jsxs(
1592
+ "svg",
1593
+ {
1594
+ viewBox: "0 0 24 24",
1595
+ stroke: "currentColor",
1596
+ fill: "none",
1597
+ strokeWidth: "2",
1598
+ style: { width: 22, height: 22, flexShrink: 0 },
1599
+ children: [
1600
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z" }),
1601
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 3l.6 1.8L21 5.4l-1.4.6L19 7.8l-.6-1.8L17 5.4l1.4-.6z" })
1602
+ ]
1603
+ }
1604
+ ) }),
1605
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--launcher-label", children: "Ask NovaForce" })
1606
+ ] });
1607
+ const ItemEntryTable = ({ fieldUpdates, resolvedLabels }) => {
1608
+ const prefix = fieldUpdates["sales_item_entries.items.name"] ? "sales_item_entries" : fieldUpdates["purchase_item_entries.items.name"] ? "purchase_item_entries" : null;
1609
+ if (!prefix) return null;
1610
+ const names = fieldUpdates[`${prefix}.items.name`];
1611
+ const quantities = fieldUpdates[`${prefix}.quantity`];
1612
+ const rates = fieldUpdates[`${prefix}.rate`];
1613
+ const discountAmounts = fieldUpdates[`${prefix}.discount_amount`];
1614
+ const taxAmounts = fieldUpdates[`${prefix}.tax_amount`];
1615
+ const totalAmounts = fieldUpdates[`${prefix}.total_amount`];
1616
+ if (!Array.isArray(names) || names.length === 0) return null;
1617
+ const rows = names.map((_, i) => {
1618
+ const itemId = names[i];
1619
+ const qty = parseFloat(quantities == null ? void 0 : quantities[i]) || 0;
1620
+ const rate = parseFloat(rates == null ? void 0 : rates[i]) || 0;
1621
+ const gross = qty * rate;
1622
+ const discount = parseFloat(discountAmounts == null ? void 0 : discountAmounts[i]) || 0;
1623
+ const tax = parseFloat(taxAmounts == null ? void 0 : taxAmounts[i]) || 0;
1624
+ const total = parseFloat(totalAmounts == null ? void 0 : totalAmounts[i]) || 0;
1625
+ const resolvedKey = `${prefix}.items.name:${itemId}`;
1626
+ const itemName = resolvedLabels[resolvedKey] || `Item #${itemId}`;
1627
+ return { itemName, qty, rate, gross, discount, tax, total };
1628
+ });
1629
+ const subtotal = rows.reduce((sum, r) => sum + r.gross, 0);
1630
+ const totalDiscount = rows.reduce((sum, r) => sum + r.discount, 0);
1631
+ rows.reduce((sum, r) => sum + r.tax, 0);
1632
+ const totalDue = rows.reduce((sum, r) => sum + r.total, 0);
1633
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1634
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-li", style: { gridTemplateColumns: "1fr repeat(6, 85px)" }, children: [
1635
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h", children: "Item" }),
1636
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Qty" }),
1637
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Rate" }),
1638
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Gross" }),
1639
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Discount" }),
1640
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Tax" }),
1641
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Total" }),
1642
+ rows.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
1643
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c", children: r.itemName }),
1644
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: r.qty }),
1645
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.rate, api.defaultCurrencyFormat()) }),
1646
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.gross, api.defaultCurrencyFormat()) }),
1647
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.discount, api.defaultCurrencyFormat()) }),
1648
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.tax, api.defaultCurrencyFormat()) }),
1649
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.total, api.defaultCurrencyFormat()) })
1650
+ ] }, i))
1651
+ ] }) }),
1652
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot", children: [
1653
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row", children: [
1654
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Subtotal" }),
1655
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-tot-row-val", children: api.formatAmount(subtotal, api.defaultCurrencyFormat()) })
1656
+ ] }),
1657
+ totalDiscount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row", children: [
1658
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Discount" }),
1659
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--preview-tot-row-val", children: [
1660
+ "-",
1661
+ api.formatAmount(totalDiscount, api.defaultCurrencyFormat())
1662
+ ] })
1663
+ ] }),
1664
+ rows.filter((r) => r.tax).map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row", children: [
1665
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Tax" }),
1666
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-tot-row-val", children: api.formatAmount(r.tax, api.defaultCurrencyFormat()) })
1667
+ ] }, i)),
1668
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row total", children: [
1669
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Total due (items)" }),
1670
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-tot-row-val", children: api.formatAmount(totalDue, api.defaultCurrencyFormat()) })
1671
+ ] })
1672
+ ] })
1673
+ ] });
1674
+ };
1675
+ const ExpenseEntryTable = ({ fieldUpdates, resolvedLabels }) => {
1676
+ const accountIds = fieldUpdates["purchase_expense_entries.accounts.account_name"];
1677
+ const rates = fieldUpdates["purchase_expense_entries.rate"];
1678
+ const discountAmounts = fieldUpdates["purchase_expense_entries.discount_amount"];
1679
+ const taxAmounts = fieldUpdates["purchase_expense_entries.tax_amount"];
1680
+ const totalAmounts = fieldUpdates["purchase_expense_entries.total_amount"];
1681
+ if (!Array.isArray(accountIds) || accountIds.length === 0) return null;
1682
+ const rows = accountIds.map((_, i) => {
1683
+ const accountId = accountIds[i];
1684
+ const rate = parseFloat(rates == null ? void 0 : rates[i]) || 0;
1685
+ const gross = rate;
1686
+ const discount = parseFloat(discountAmounts == null ? void 0 : discountAmounts[i]) || 0;
1687
+ const tax = parseFloat(taxAmounts == null ? void 0 : taxAmounts[i]) || 0;
1688
+ const total = parseFloat(totalAmounts == null ? void 0 : totalAmounts[i]) || 0;
1689
+ const resolvedKey = `purchase_expense_entries.accounts.account_name:${accountId}`;
1690
+ const accountName = resolvedLabels[resolvedKey] || `Account #${accountId}`;
1691
+ return { accountName, rate, gross, discount, tax, total };
1692
+ });
1693
+ const subtotal = rows.reduce((sum, r) => sum + r.gross, 0);
1694
+ const totalDiscount = rows.reduce((sum, r) => sum + r.discount, 0);
1695
+ const totalTax = rows.reduce((sum, r) => sum + r.tax, 0);
1696
+ const totalDue = rows.reduce((sum, r) => sum + r.total, 0);
1697
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1698
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-li", style: { gridTemplateColumns: "1fr repeat(5, 85px)" }, children: [
1699
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h", children: "Account" }),
1700
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Rate" }),
1701
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Gross" }),
1702
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Discount" }),
1703
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Tax" }),
1704
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-h right", children: "Total" }),
1705
+ rows.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
1706
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c", children: r.accountName }),
1707
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.rate, api.defaultCurrencyFormat()) }),
1708
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.gross, api.defaultCurrencyFormat()) }),
1709
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.discount, api.defaultCurrencyFormat()) }),
1710
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.tax, api.defaultCurrencyFormat()) }),
1711
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--preview-li-c right", children: api.formatAmount(r.total, api.defaultCurrencyFormat()) })
1712
+ ] }, i))
1713
+ ] }) }),
1714
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot", children: [
1715
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row", children: [
1716
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Subtotal" }),
1717
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-tot-row-val", children: api.formatAmount(subtotal, api.defaultCurrencyFormat()) })
1718
+ ] }),
1719
+ totalDiscount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row", children: [
1720
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Discount" }),
1721
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--preview-tot-row-val", children: [
1722
+ "-",
1723
+ api.formatAmount(totalDiscount, api.defaultCurrencyFormat())
1724
+ ] })
1725
+ ] }),
1726
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row", children: [
1727
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Total Tax" }),
1728
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-tot-row-val", children: api.formatAmount(totalTax, api.defaultCurrencyFormat()) })
1729
+ ] }),
1730
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row total", children: [
1731
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Total due (expenses)" }),
1732
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-tot-row-val", children: api.formatAmount(totalDue, api.defaultCurrencyFormat()) })
1733
+ ] })
1734
+ ] })
1735
+ ] });
1736
+ };
1737
+ const sumField = (updates, key) => (updates[key] || []).reduce((s, v) => s + (parseFloat(v) || 0), 0);
1738
+ const FIELD_LABELS = {
1739
+ customer_id: "Customer",
1740
+ vendor_id: "Vendor",
1741
+ date: "Date",
1742
+ bill_date: "Bill Date",
1743
+ invoice_date: "Invoice Date",
1744
+ due_date: "Due Date",
1745
+ posting_time: "Posting Time",
1746
+ payment_term_id: "Payment Term",
1747
+ company_id: "Company",
1748
+ exchange_rate: "Exchange Rate",
1749
+ account_payable_id: "Account Payable",
1750
+ account_receivable_id: "Account Receivable",
1751
+ currency_id: "Currency",
1752
+ supplier_currency_id: "Supplier Currency",
1753
+ supplier_invoice_number: "Supplier Invoice #",
1754
+ supplier_invoice_date: "Supplier Invoice Date",
1755
+ transaction_type: "Transaction Type",
1756
+ narration: "Narration",
1757
+ department: "Department",
1758
+ department_id: "Department",
1759
+ location: "Location",
1760
+ incoterm_id: "Incoterm",
1761
+ region_id: "Region",
1762
+ series_number: "Series Number",
1763
+ attachment_url: "Attachment",
1764
+ additional_discount_on: "Discount On",
1765
+ additional_discount_percentage: "Discount Percentage",
1766
+ additional_discount_amount: "Discount Amount",
1767
+ round_off: "Round Off",
1768
+ round_off_option: "Round Off Option",
1769
+ is_cash: "Cash Transaction",
1770
+ discount_amount: "Discount Amount",
1771
+ total_invoice_amount: "Total Amount",
1772
+ supplier_address: "Supplier Address",
1773
+ contact_person: "Contact Person",
1774
+ shipping_address: "Shipping Address",
1775
+ billing_address: "Billing Address",
1776
+ place_of_supply: "Place of Supply"
1777
+ };
1778
+ const InvoicePreview = ({ fieldUpdates, resolvedLabels, formStatus, useActionGating, pendingFormAction, onSave, onSubmit, onDiscard }) => {
1779
+ const itemTotalKey = fieldUpdates["purchase_item_entries.total_amount"] ? "purchase_item_entries.total_amount" : fieldUpdates["sales_item_entries.total_amount"] ? "sales_item_entries.total_amount" : null;
1780
+ const itemTotal = itemTotalKey ? sumField(fieldUpdates, itemTotalKey) : 0;
1781
+ const expenseTotal = sumField(fieldUpdates, "purchase_expense_entries.total_amount");
1782
+ const grandTotal = itemTotal + expenseTotal;
1783
+ const displayKey = (key) => {
1784
+ const shortKey = key.startsWith("invoice_addresses.") ? key.slice("invoice_addresses.".length) : key;
1785
+ return FIELD_LABELS[shortKey] || FIELD_LABELS[key] || key;
1786
+ };
1787
+ const entries = Object.entries(fieldUpdates).filter(([key]) => {
1788
+ if (key.startsWith("sales_item_entries.") || key.startsWith("purchase_item_entries.") || key.startsWith("purchase_expense_entries.")) return false;
1789
+ return true;
1790
+ });
1791
+ if (Object.keys(fieldUpdates).length === 0) return null;
1792
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-card", children: [
1793
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-head", children: [
1794
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-head-ic", children: /* @__PURE__ */ jsxRuntime.jsx(IcInvoice, { size: 14 }) }),
1795
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-head-ttl", children: [
1796
+ "Draft Invoice",
1797
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--preview-head-sub", children: [
1798
+ "AI-prepared · ",
1799
+ entries.length,
1800
+ " fields locked"
1801
+ ] })
1802
+ ] }),
1803
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-badge", children: "DRAFT" })
1804
+ ] }),
1805
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-body", children: [
1806
+ entries.map(([key, value]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-row", children: [
1807
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-row-key", children: displayKey(key) }),
1808
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-row-val", children: resolvedLabels[key] || String(value ?? "") })
1809
+ ] }, key)),
1810
+ /* @__PURE__ */ jsxRuntime.jsx(ItemEntryTable, { fieldUpdates, resolvedLabels }),
1811
+ /* @__PURE__ */ jsxRuntime.jsx(ExpenseEntryTable, { fieldUpdates, resolvedLabels }),
1812
+ (itemTotal > 0 || expenseTotal > 0) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-tot-row total", style: { marginTop: 8 }, children: [
1813
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Grand Total" }),
1814
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-tot-row-val", children: api.formatAmount(grandTotal, api.defaultCurrencyFormat()) })
1815
+ ] })
1816
+ ] }),
1817
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--preview-foot", children: [
1818
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--preview-foot-grow" }),
1819
+ useActionGating ? (
1820
+ // Smart mode: each button only appears when the AI's last action explicitly signalled
1821
+ // it — status is fill-completeness only and never gates these (Copilot Smart API contract).
1822
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1823
+ pendingFormAction === "discard_form" && onDiscard && /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outlined", startIcon: /* @__PURE__ */ jsxRuntime.jsx(trash.Trash, { fontSize: "small", sx: { stroke: "currentColor", strokeWidth: 0.5 } }), onClick: onDiscard, sx: { mr: 1 }, children: "Discard" }),
1824
+ pendingFormAction === "save_draft" && /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outlined", startIcon: /* @__PURE__ */ jsxRuntime.jsx(save.Save, { fontSize: "small", sx: { stroke: "currentColor", strokeWidth: 0.5 } }), onClick: onSave, sx: { mr: 1 }, children: "Save Draft" }),
1825
+ pendingFormAction === "submit_form" && onSubmit && /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "contained", startIcon: /* @__PURE__ */ jsxRuntime.jsx(tick.Tick, { fontSize: "small", sx: { stroke: "currentColor", strokeWidth: 0.5 } }), onClick: onSubmit, children: "Submit" })
1826
+ ] })
1827
+ ) : formStatus === "ready_to_submit" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1828
+ onDiscard && /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outlined", startIcon: /* @__PURE__ */ jsxRuntime.jsx(trash.Trash, { fontSize: "small", sx: { stroke: "currentColor", strokeWidth: 0.5 } }), onClick: onDiscard, sx: { mr: 1 }, children: "Discard" }),
1829
+ /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outlined", startIcon: /* @__PURE__ */ jsxRuntime.jsx(save.Save, { fontSize: "small", sx: { stroke: "currentColor", strokeWidth: 0.5 } }), onClick: onSave, sx: { mr: 1 }, children: "Save Draft" }),
1830
+ onSubmit && /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "contained", startIcon: /* @__PURE__ */ jsxRuntime.jsx(tick.Tick, { fontSize: "small", sx: { stroke: "currentColor", strokeWidth: 0.5 } }), onClick: onSubmit, children: "Submit" })
1831
+ ] })
1832
+ ] })
1833
+ ] });
1834
+ };
1835
+ const ICON_BY_CATEGORY = {
1836
+ pdf: { Icon: iconsMaterial.PictureAsPdfRounded, color: "#C62828" },
1837
+ excel: { Icon: iconsMaterial.TableChartRounded, color: "#1E7E34" },
1838
+ doc: { Icon: iconsMaterial.DescriptionRounded, color: "#1B5FBD" },
1839
+ md: { Icon: iconsMaterial.ArticleRounded, color: "#5C5C5C" },
1840
+ image: { Icon: iconsMaterial.ImageRounded, color: "#8E24AA" }
1841
+ };
1842
+ const DocFileIcon = ({ filename, fontSize = 16 }) => {
1843
+ const category = getFileCategory(filename);
1844
+ const { Icon, color } = category ? ICON_BY_CATEGORY[category] : { Icon: iconsMaterial.InsertDriveFileRounded, color: "#9E9E9E" };
1845
+ return /* @__PURE__ */ jsxRuntime.jsx(Icon, { sx: { fontSize, color } });
1846
+ };
1847
+ const DocUpload = ({ onUploadComplete, onUploadError, uploadDocument, uploadDocuments }) => {
1848
+ const [isDragging, setIsDragging] = React.useState(false);
1849
+ const [progress, setProgress] = React.useState(null);
1850
+ const [fileNames, setFileNames] = React.useState([]);
1851
+ const fileInputRef = React.useRef(null);
1852
+ const handleFiles = React.useCallback(async (files) => {
1853
+ if (files.length === 0) return;
1854
+ if (files.length > 10) {
1855
+ onUploadError("Maximum 10 files allowed per request.");
1856
+ return;
1857
+ }
1858
+ for (const file of files) {
1859
+ if (!getFileCategory(file.name)) {
1860
+ onUploadError("Unsupported file type. Accepted: PDF, Word, Excel, Markdown, image.");
1861
+ return;
1862
+ }
1863
+ if (file.size > 50 * 1024 * 1024) {
1864
+ onUploadError(`File too large (${file.name}). Maximum 50MB.`);
1865
+ return;
1866
+ }
1867
+ }
1868
+ setFileNames(files.map((f) => f.name));
1869
+ setProgress(0);
1870
+ try {
1871
+ if (files.length === 1) {
1872
+ const doc = await uploadDocument(files[0], (pct2) => setProgress(pct2));
1873
+ onUploadComplete([doc]);
1874
+ } else {
1875
+ const docs = await uploadDocuments(files, (pct2) => setProgress(pct2));
1876
+ onUploadComplete(docs);
1877
+ }
1878
+ } catch (err) {
1879
+ onUploadError(err.message || "Upload failed");
1880
+ } finally {
1881
+ setProgress(null);
1882
+ setFileNames([]);
1883
+ }
1884
+ }, [uploadDocument, uploadDocuments, onUploadComplete, onUploadError]);
1885
+ const handleDrop = React.useCallback((e) => {
1886
+ e.preventDefault();
1887
+ setIsDragging(false);
1888
+ const files = Array.from(e.dataTransfer.files);
1889
+ if (files.length) handleFiles(files);
1890
+ }, [handleFiles]);
1891
+ const handleDragOver = React.useCallback((e) => {
1892
+ e.preventDefault();
1893
+ setIsDragging(true);
1894
+ }, []);
1895
+ const handleDragLeave = React.useCallback(() => setIsDragging(false), []);
1896
+ const handleClick = () => {
1897
+ var _a;
1898
+ return (_a = fileInputRef.current) == null ? void 0 : _a.click();
1899
+ };
1900
+ const handleChange = (e) => {
1901
+ const files = Array.from(e.target.files || []);
1902
+ if (files.length) handleFiles(files);
1903
+ e.target.value = "";
1904
+ };
1905
+ if (progress !== null) {
1906
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-progress-wrap", children: [
1907
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-progress-info", children: [
1908
+ /* @__PURE__ */ jsxRuntime.jsx(DocFileIcon, { filename: fileNames[0] || "", fontSize: 16 }),
1909
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-progress-name", children: fileNames.length === 1 ? fileNames[0] : `${fileNames.length} files uploading...` }),
1910
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--doc-progress-pct", children: [
1911
+ progress,
1912
+ "%"
1913
+ ] })
1914
+ ] }),
1915
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-progress-bar", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-progress-fill", style: { width: `${progress}%` } }) })
1916
+ ] });
1917
+ }
1918
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1919
+ "div",
1920
+ {
1921
+ className: `chatBot--doc-dropzone${isDragging ? " chatBot--doc-dropzone--active" : ""}`,
1922
+ onDrop: handleDrop,
1923
+ onDragOver: handleDragOver,
1924
+ onDragLeave: handleDragLeave,
1925
+ onClick: handleClick,
1926
+ children: [
1927
+ /* @__PURE__ */ jsxRuntime.jsx(
1928
+ "input",
1929
+ {
1930
+ ref: fileInputRef,
1931
+ type: "file",
1932
+ accept: ACCEPT_ATTR,
1933
+ multiple: true,
1934
+ style: { display: "none" },
1935
+ onChange: handleChange
1936
+ }
1937
+ ),
1938
+ /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.CloudUploadRounded, { sx: { fontSize: 28, color: "#2EB273", mb: 0.5 } }),
1939
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-drop-label", children: "Drop files here or click to browse" }),
1940
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-drop-sub", children: "Max 50MB per file · PDF, Word, Excel, Markdown, image · Up to 10 files" })
1941
+ ]
1942
+ }
1943
+ );
1944
+ };
1945
+ const STATUS_LABELS = {
1946
+ uploading: "Uploading…",
1947
+ pending: "Queued",
1948
+ processing: "Processing",
1949
+ parsing: "Extracting text",
1950
+ embedding: "Generating embeddings",
1951
+ indexing: "Indexing",
1952
+ ready: "Ready",
1953
+ failed: "Failed"
1954
+ };
1955
+ const ACTIVE_STATUSES = ["pending", "processing", "parsing", "embedding", "indexing"];
1956
+ const DocStatus = ({ document: document2, onReady, onError, getStatus }) => {
1957
+ const [doc, setDoc] = React.useState(document2);
1958
+ const [pollCount, setPollCount] = React.useState(0);
1959
+ const mountedRef = React.useRef(true);
1960
+ const pollDocIdRef = React.useRef(doc.doc_id);
1961
+ pollDocIdRef.current = doc.doc_id;
1962
+ React.useEffect(() => {
1963
+ mountedRef.current = true;
1964
+ return () => {
1965
+ mountedRef.current = false;
1966
+ };
1967
+ }, []);
1968
+ React.useEffect(() => {
1969
+ if (!ACTIVE_STATUSES.includes(doc.status)) return;
1970
+ const interval = setInterval(async () => {
1971
+ try {
1972
+ const updated = await getStatus(doc.doc_id);
1973
+ if (!mountedRef.current || updated.doc_id !== pollDocIdRef.current) return;
1974
+ setDoc(updated);
1975
+ setPollCount((c) => c + 1);
1976
+ if (updated.status === "ready") {
1977
+ clearInterval(interval);
1978
+ onReady(updated);
1979
+ } else if (updated.status === "failed") {
1980
+ clearInterval(interval);
1981
+ onError(updated);
1982
+ }
1983
+ } catch {
1984
+ setPollCount((c) => c + 1);
1985
+ }
1986
+ }, 3e3);
1987
+ return () => clearInterval(interval);
1988
+ }, [doc.doc_id, doc.status]);
1989
+ const isActive = ACTIVE_STATUSES.includes(doc.status);
1990
+ const isReady = doc.status === "ready";
1991
+ const isFailed = doc.status === "failed";
1992
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-status-card", children: [
1993
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-status-head", children: [
1994
+ isReady && /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.CheckCircleRounded, { sx: { fontSize: 18, color: "#2EB273" } }),
1995
+ isFailed && /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.ErrorRounded, { sx: { fontSize: 18, color: "#C62828" } }),
1996
+ isActive && /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.HourglassBottomRounded, { sx: { fontSize: 18, color: "#2EB273" }, className: "chatBot--doc-status-spin" }),
1997
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-status-info", children: [
1998
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-status-name", children: doc.filename }),
1999
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "chatBot--doc-status-label", children: [
2000
+ STATUS_LABELS[doc.status],
2001
+ doc.pages ? ` · ${doc.pages} pages` : "",
2002
+ doc.category ? ` · ${doc.category}` : ""
2003
+ ] })
2004
+ ] })
2005
+ ] }),
2006
+ isActive && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-progress-bar", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-progress-fill chatBot--doc-progress-fill--indeterminate" }) }),
2007
+ isFailed && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-status-error", children: [
2008
+ doc.error || "Document processing failed",
2009
+ doc.error_code && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-status-error-code", children: doc.error_code })
2010
+ ] }),
2011
+ isReady && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-status-ready", children: [
2012
+ doc.chunk_count,
2013
+ " chunks indexed · Ready to chat"
2014
+ ] })
2015
+ ] });
2016
+ };
2017
+ const DocIntro = ({ document: document2, documents, suggestedQuestions, onSuggestion }) => {
2018
+ const docsToRender = documents && documents.length > 0 ? documents : document2 ? [document2] : [];
2019
+ const questionsToRender = suggestedQuestions && suggestedQuestions.length > 0 ? suggestedQuestions : document2 == null ? void 0 : document2.suggested_questions;
2020
+ if (docsToRender.length === 0) return null;
2021
+ if (!docsToRender.some((d) => d.summary) && !(questionsToRender == null ? void 0 : questionsToRender.length)) return null;
2022
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-intro-card", children: [
2023
+ docsToRender.map((doc, idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { borderBottom: idx < docsToRender.length - 1 && docsToRender.length > 1 ? "1px solid #F2F3F4" : "none" }, children: [
2024
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-intro-head", children: [
2025
+ /* @__PURE__ */ jsxRuntime.jsx(DocFileIcon, { filename: doc.filename, fontSize: 16 }),
2026
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-intro-head-info", children: [
2027
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-intro-filename", children: doc.filename }),
2028
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chatBot--doc-intro-meta", children: doc.category && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2029
+ doc.category,
2030
+ doc.sub_category ? ` · ${doc.sub_category}` : ""
2031
+ ] }) })
2032
+ ] })
2033
+ ] }),
2034
+ doc.summary && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-intro-summary", children: doc.summary })
2035
+ ] }, doc.doc_id || idx)),
2036
+ questionsToRender && questionsToRender.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-intro-questions", children: [
2037
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-intro-q-label", children: "Suggested questions" }),
2038
+ questionsToRender.map((q, i) => /* @__PURE__ */ jsxRuntime.jsx("button", { className: "chatBot--doc-intro-q-btn", onClick: () => onSuggestion(q), children: q }, i))
2039
+ ] })
2040
+ ] });
2041
+ };
2042
+ const mergeById = (first, rest) => {
2043
+ const ids = new Set(first.map((s) => s.id));
2044
+ return [...first, ...rest.filter((s) => !ids.has(s.id))];
2045
+ };
2046
+ const useChatHistory = (service, enabled) => {
2047
+ const [sessions, setSessions] = React.useState([]);
2048
+ const [nextCursor, setNextCursor] = React.useState(null);
2049
+ const [loading, setLoading] = React.useState(false);
2050
+ const [loadingMore, setLoadingMore] = React.useState(false);
2051
+ const [error, setError] = React.useState(null);
2052
+ const sessionsRef = React.useRef([]);
2053
+ const requestIdRef = React.useRef(0);
2054
+ React.useEffect(() => {
2055
+ sessionsRef.current = sessions;
2056
+ }, [sessions]);
2057
+ const refresh = React.useCallback(async (keepLoaded = false) => {
2058
+ const requestId = ++requestIdRef.current;
2059
+ if (!service) {
2060
+ setSessions([]);
2061
+ setNextCursor(null);
2062
+ setError(null);
2063
+ return;
2064
+ }
2065
+ const merge = keepLoaded && sessionsRef.current.length > 0;
2066
+ if (!merge) setLoading(true);
2067
+ setError(null);
2068
+ try {
2069
+ const page = await api$1.getV1CopilotHistory({ service, limit: HISTORY_PAGE_SIZE }, api.getToken()["x-token"]);
2070
+ if (requestId !== requestIdRef.current) return;
2071
+ const firstPage = page.sessions.map(toChatSession);
2072
+ if (merge) {
2073
+ setSessions((prev) => mergeById(firstPage, prev));
2074
+ } else {
2075
+ setSessions(firstPage);
2076
+ setNextCursor(page.next_cursor);
2077
+ }
2078
+ } catch (e) {
2079
+ if (requestId === requestIdRef.current) setError((e == null ? void 0 : e.message) || "Failed to load chat history");
2080
+ } finally {
2081
+ if (requestId === requestIdRef.current) setLoading(false);
2082
+ }
2083
+ }, [service]);
2084
+ const loadMore = React.useCallback(async () => {
2085
+ if (!service || !nextCursor || loadingMore) return;
2086
+ const requestId = requestIdRef.current;
2087
+ setLoadingMore(true);
2088
+ try {
2089
+ const page = await api$1.getV1CopilotHistory({ service, limit: HISTORY_PAGE_SIZE, cursor: nextCursor }, api.getToken()["x-token"]);
2090
+ if (requestId !== requestIdRef.current) return;
2091
+ setSessions((prev) => mergeById(prev, page.sessions.map(toChatSession)));
2092
+ setNextCursor(page.next_cursor);
2093
+ } catch {
2094
+ if (requestId === requestIdRef.current) await refresh();
2095
+ } finally {
2096
+ setLoadingMore(false);
2097
+ }
2098
+ }, [service, nextCursor, loadingMore, refresh]);
2099
+ const openSession = React.useCallback(
2100
+ (session) => api$1.getV1CopilotHistorySession(session.id, session.service, api.getToken()["x-token"]),
2101
+ []
2102
+ );
2103
+ const removeSession = React.useCallback(async (session) => {
2104
+ await api$1.deleteV1CopilotHistorySession(session.id, session.service, api.getToken()["x-token"]);
2105
+ setSessions((prev) => prev.filter((s) => s.id !== session.id));
2106
+ }, []);
2107
+ React.useEffect(() => {
2108
+ if (!enabled) return;
2109
+ setSessions([]);
2110
+ setNextCursor(null);
2111
+ refresh();
2112
+ }, [enabled, refresh]);
2113
+ return {
2114
+ sessions,
2115
+ loading,
2116
+ loadingMore,
2117
+ error,
2118
+ hasMore: !!nextCursor,
2119
+ refresh,
2120
+ loadMore,
2121
+ openSession,
2122
+ removeSession
2123
+ };
2124
+ };
2125
+ marked.marked.use({ breaks: true, gfm: true });
2126
+ const ChatBot = ({ inline = false, dashboardMode = false } = {}) => {
2127
+ var _a;
2128
+ const isAiEnabled = ((_a = utils_apiConfig.getApiConfigSafe()) == null ? void 0 : _a.aiFeatureEnabled) === "true";
2129
+ if (!isAiEnabled) return null;
2130
+ const uData = JSON.parse(localStorage.getItem("_u_data") || "{}");
2131
+ if (uData.role_type !== "Admin") return null;
2132
+ const { user } = runtime.useAuth();
2133
+ const [isOpen, setIsOpen] = React.useState(inline ? true : false);
2134
+ const [messages, setMessages] = React.useState([]);
2135
+ const [isTyping, setIsTyping] = React.useState(false);
2136
+ const [inputValue, setInputValue] = React.useState("");
2137
+ const [mode, setMode] = React.useState("smart");
2138
+ const [formType, setFormType] = React.useState(null);
2139
+ const [formStatus, setFormStatus] = React.useState("in_progress");
2140
+ const [currentFieldUpdates, setCurrentFieldUpdates] = React.useState(null);
2141
+ const [pendingFormAction, setPendingFormAction] = React.useState(null);
2142
+ const [resolvedLabels, setResolvedLabels] = React.useState({});
2143
+ const [dynamicQuestions, setDynamicQuestions] = React.useState([]);
2144
+ const [showSlashMenu, setShowSlashMenu] = React.useState(false);
2145
+ const [slashIndex, setSlashIndex] = React.useState(0);
2146
+ const labelCacheRef = React.useRef({});
2147
+ const bodyRef = React.useRef(null);
2148
+ const textareaRef = React.useRef(null);
2149
+ const userScrolledUp = React.useRef(false);
2150
+ const agentStarted = React.useRef(false);
2151
+ const smartSessionIdRef = React.useRef(null);
2152
+ const formSessionIdRef = React.useRef(null);
2153
+ const [activeDocument, setActiveDocument] = React.useState(null);
2154
+ const [docIntroSent, setDocIntroSent] = React.useState(false);
2155
+ const [docError, setDocError] = React.useState(null);
2156
+ const [showUploadArea, setShowUploadArea] = React.useState(false);
2157
+ const [activeDocuments, setActiveDocuments] = React.useState([]);
2158
+ const [suggestedQuestions, setSuggestedQuestions] = React.useState([]);
2159
+ const fetchedMultiDocIntroIds = React.useRef("");
2160
+ const tabStateRef = React.useRef({});
2161
+ const [historyOpen, setHistoryOpen] = React.useState(false);
2162
+ const historyService = historyServiceForMode(mode);
2163
+ const chatHistory = useChatHistory(historyService, historyOpen);
2164
+ const [activeSessionId, setActiveSessionId] = React.useState(null);
2165
+ const activeSessionIdRef = React.useRef(null);
2166
+ const chatSessionIdRef = React.useRef(null);
2167
+ const conversationRef = React.useRef(0);
2168
+ const [pendingDeleteSession, setPendingDeleteSession] = React.useState(null);
2169
+ const [deletingSession, setDeletingSession] = React.useState(false);
2170
+ const markActiveSession = (sessionId) => {
2171
+ activeSessionIdRef.current = sessionId;
2172
+ setActiveSessionId(sessionId);
2173
+ };
2174
+ const firstName = (user == null ? void 0 : user.first_name) || "";
2175
+ const filteredMessages = React.useMemo(
2176
+ () => messages.filter((m) => {
2177
+ if (!m.mode) return true;
2178
+ if (m.mode === mode) return true;
2179
+ return false;
2180
+ }),
2181
+ [messages, mode]
2182
+ );
2183
+ React.useEffect(() => {
2184
+ const config = utils_apiConfig.getApiConfigSafe();
2185
+ if (config == null ? void 0 : config.backendBaseUrl) {
2186
+ api$1.setAiFeatureBaseUrl(`${config.backendBaseUrl}/ai-feature`);
2187
+ }
2188
+ }, []);
2189
+ const slashQuery = inputValue.startsWith("/") ? inputValue.slice(1).toLowerCase() : "";
2190
+ const filteredCommands = SLASH_COMMANDS.filter(
2191
+ (cmd) => cmd.label.toLowerCase().startsWith(slashQuery)
2192
+ );
2193
+ const fetchQuestions = React.useCallback(async () => {
2194
+ try {
2195
+ const { "x-token": token } = api.getToken();
2196
+ const uData2 = api.getDefaultUserData();
2197
+ const mapLocalToApiModule = (localName) => {
2198
+ switch (localName) {
2199
+ case "accounts-and-finance":
2200
+ return "Accounting";
2201
+ case "inventory":
2202
+ return "Inventory";
2203
+ case "manufacturing":
2204
+ return "Manufacturing";
2205
+ case "purchase":
2206
+ return "Procurement";
2207
+ case "sales":
2208
+ return "CRM";
2209
+ case "hrms":
2210
+ return "HRMS";
2211
+ case "rental":
2212
+ return "Rental";
2213
+ case "rbac":
2214
+ case "user":
2215
+ return "Users";
2216
+ default:
2217
+ return null;
2218
+ }
2219
+ };
2220
+ const mappedModules = ((uData2 == null ? void 0 : uData2.module_access) || []).map((m) => mapLocalToApiModule(m.module_name)).filter(Boolean);
2221
+ const uniqueModules = Array.from(new Set(mappedModules));
2222
+ if (uniqueModules.length === 0) {
2223
+ setDynamicQuestions([]);
2224
+ return;
2225
+ }
2226
+ const modules = [...uniqueModules].sort(() => Math.random() - 0.5).slice(0, 4);
2227
+ const res = await api$1.getV1CopilotQuestions(modules, token);
2228
+ if (res && res.modules) {
2229
+ const questions = [];
2230
+ res.modules.forEach((mod) => {
2231
+ if (mod.questions) {
2232
+ mod.questions.forEach((q) => {
2233
+ questions.push({
2234
+ prompt: q,
2235
+ cat: mod.module.toUpperCase(),
2236
+ mode: "conversation",
2237
+ kind: "blue"
2238
+ });
2239
+ });
2240
+ }
2241
+ });
2242
+ setDynamicQuestions(questions);
2243
+ }
2244
+ } catch (e) {
2245
+ console.error("Failed to fetch copilot questions", e);
2246
+ }
2247
+ }, []);
2248
+ React.useEffect(() => {
2249
+ if (isOpen) {
2250
+ setTimeout(() => {
2251
+ var _a2;
2252
+ return (_a2 = textareaRef.current) == null ? void 0 : _a2.focus();
2253
+ }, 100);
2254
+ if (dynamicQuestions.length === 0) {
2255
+ fetchQuestions();
2256
+ }
2257
+ }
2258
+ }, [isOpen, dynamicQuestions.length, fetchQuestions]);
2259
+ React.useEffect(() => {
2260
+ if (!isTyping && isOpen) {
2261
+ setTimeout(() => {
2262
+ var _a2;
2263
+ return (_a2 = textareaRef.current) == null ? void 0 : _a2.focus();
2264
+ }, 100);
2265
+ }
2266
+ }, [isTyping, isOpen]);
2267
+ const handleDockAsk = React.useCallback(({ prefill }) => {
2268
+ setIsOpen(true);
2269
+ if (prefill) setInputValue(prefill);
2270
+ setTimeout(() => {
2271
+ const ta = textareaRef.current;
2272
+ if (!ta) return;
2273
+ ta.focus();
2274
+ ta.scrollIntoView({ block: "nearest", behavior: "smooth" });
2275
+ if (prefill) ta.selectionStart = ta.selectionEnd = prefill.length;
2276
+ }, 120);
2277
+ }, []);
2278
+ chatDockState.useChatFocusListener(handleDockAsk);
2279
+ const panelRef = React.useRef(null);
2280
+ const [panelHeight, setPanelHeight] = React.useState(null);
2281
+ React.useLayoutEffect(() => {
2282
+ if (!(inline && dashboardMode)) return;
2283
+ const GAP2 = 16;
2284
+ const restTop = (el) => window.innerHeight - parseFloat(getComputedStyle(el).bottom || "0") - el.offsetHeight;
2285
+ const calc = () => {
2286
+ const el = panelRef.current;
2287
+ if (!el) return;
2288
+ const top = el.getBoundingClientRect().top + window.scrollY;
2289
+ const dock2 = document.querySelector(".fmd");
2290
+ const pill = document.querySelector(".fmd-pill");
2291
+ let limit = window.innerHeight - GAP2;
2292
+ if (dock2) {
2293
+ const collapsed = dock2.dataset.collapsed === "true";
2294
+ limit = collapsed && pill ? restTop(pill) - 14 : restTop(dock2) - GAP2;
2295
+ }
2296
+ setPanelHeight(Math.max(320, Math.floor(limit - top)));
2297
+ };
2298
+ calc();
2299
+ window.addEventListener("resize", calc);
2300
+ window.addEventListener(chatDockState.DOCK_LAYOUT_EVENT, calc);
2301
+ const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(calc) : null;
2302
+ const dock = document.querySelector(".fmd");
2303
+ if (ro && dock) ro.observe(dock);
2304
+ return () => {
2305
+ window.removeEventListener("resize", calc);
2306
+ window.removeEventListener(chatDockState.DOCK_LAYOUT_EVENT, calc);
2307
+ ro == null ? void 0 : ro.disconnect();
2308
+ };
2309
+ }, [inline, dashboardMode]);
2310
+ React.useEffect(() => {
2311
+ const container = bodyRef.current;
2312
+ if (!container) return;
2313
+ const onScroll = () => {
2314
+ const atBottom = container.scrollHeight - container.scrollTop - container.clientHeight < 40;
2315
+ userScrolledUp.current = !atBottom;
2316
+ };
2317
+ container.addEventListener("scroll", onScroll);
2318
+ return () => container.removeEventListener("scroll", onScroll);
2319
+ }, []);
2320
+ React.useEffect(() => {
2321
+ if (!userScrolledUp.current && bodyRef.current) {
2322
+ bodyRef.current.scrollTop = bodyRef.current.scrollHeight;
2323
+ }
2324
+ }, [messages, isTyping, currentFieldUpdates, resolvedLabels, activeDocument, activeDocuments, suggestedQuestions]);
2325
+ const selectCommand = (id) => {
2326
+ if (id !== mode) {
2327
+ tabStateRef.current[mode] = {
2328
+ doc: activeDocument,
2329
+ docs: activeDocuments,
2330
+ suggested: suggestedQuestions,
2331
+ introSent: docIntroSent,
2332
+ error: docError,
2333
+ multiDocIds: fetchedMultiDocIntroIds.current
2334
+ };
2335
+ const nextState = tabStateRef.current[id] || { doc: null, docs: [], suggested: [], introSent: false, error: null, multiDocIds: "" };
2336
+ setActiveDocument(nextState.doc);
2337
+ setActiveDocuments(nextState.docs);
2338
+ setSuggestedQuestions(nextState.suggested);
2339
+ setDocIntroSent(nextState.introSent);
2340
+ setDocError(nextState.error);
2341
+ fetchedMultiDocIntroIds.current = nextState.multiDocIds;
2342
+ }
2343
+ setMode(id);
2344
+ setShowSlashMenu(false);
2345
+ setSlashIndex(0);
2346
+ if (id === "conversation") {
2347
+ setFormType(null);
2348
+ setFormStatus("in_progress");
2349
+ setPendingFormAction(null);
2350
+ agentStarted.current = false;
2351
+ } else if (id === "agent" && !formType) {
2352
+ setFormType("sales_invoice");
2353
+ }
2354
+ setTimeout(() => {
2355
+ var _a2;
2356
+ return (_a2 = textareaRef.current) == null ? void 0 : _a2.focus();
2357
+ }, 0);
2358
+ };
2359
+ const handleModeChange = (id) => {
2360
+ selectCommand(id);
2361
+ };
2362
+ const handleInputChange = (e) => {
2363
+ const val = e.target.value;
2364
+ setInputValue(val);
2365
+ if (val.startsWith("/")) {
2366
+ setShowSlashMenu(true);
2367
+ setSlashIndex(0);
2368
+ } else {
2369
+ setShowSlashMenu(false);
2370
+ }
2371
+ };
2372
+ const handleSuggestion = (prompt, suggestionMode, suggestionFormType) => {
2373
+ if (mode !== "smart") {
2374
+ setMode(suggestionMode);
2375
+ }
2376
+ if (suggestionFormType) setFormType(suggestionFormType);
2377
+ setInputValue(prompt);
2378
+ setTimeout(() => {
2379
+ const ta = textareaRef.current;
2380
+ if (ta) {
2381
+ ta.focus();
2382
+ ta.selectionStart = ta.selectionEnd = prompt.length;
2383
+ }
2384
+ }, 0);
2385
+ };
2386
+ const handleDocUpload = React.useCallback(async (file, onProgress) => {
2387
+ const { "x-token": token } = api.getToken();
2388
+ setDocError(null);
2389
+ const result = await api$1.uploadDocument(file, token, void 0, onProgress);
2390
+ const doc = {
2391
+ doc_id: result.doc_id,
2392
+ filename: result.filename,
2393
+ status: result.status,
2394
+ pages: result.pages
2395
+ };
2396
+ setActiveDocument(doc);
2397
+ if (result.deduplicated && result.status === "ready") {
2398
+ const fullStatus = await api$1.getDocumentStatus(result.doc_id, token);
2399
+ const fullDoc = {
2400
+ doc_id: fullStatus.doc_id,
2401
+ filename: fullStatus.filename || result.filename,
2402
+ status: fullStatus.status,
2403
+ pages: fullStatus.pages || result.pages,
2404
+ category: fullStatus.category || void 0,
2405
+ sub_category: fullStatus.sub_category || void 0,
2406
+ chunk_count: fullStatus.chunk_count || void 0
2407
+ };
2408
+ setActiveDocument(fullDoc);
2409
+ setDocIntroSent(false);
2410
+ const onDocIntro = (data) => {
2411
+ if (data == null ? void 0 : data.found) {
2412
+ setActiveDocument((prev) => prev && prev.doc_id === fullDoc.doc_id ? {
2413
+ ...prev,
2414
+ summary: data.summary,
2415
+ suggested_questions: data.suggested_questions,
2416
+ category: data.category || prev.category,
2417
+ sub_category: data.sub_category || prev.sub_category
2418
+ } : prev);
2419
+ }
2420
+ };
2421
+ if (mode === "smart") {
2422
+ smartSessionIdRef.current = null;
2423
+ formSessionIdRef.current = null;
2424
+ agentStarted.current = false;
2425
+ setFormType(null);
2426
+ setFormStatus("in_progress");
2427
+ setPendingFormAction(null);
2428
+ setCurrentFieldUpdates(null);
2429
+ setResolvedLabels({});
2430
+ }
2431
+ api$1.streamV1CopilotChat(
2432
+ { ...api.getToken(), query: "", doc_id: fullDoc.doc_id, doc_intro: true },
2433
+ () => {
2434
+ },
2435
+ () => {
2436
+ },
2437
+ () => {
2438
+ },
2439
+ () => {
2440
+ },
2441
+ onDocIntro
2442
+ ).catch(() => {
2443
+ });
2444
+ return fullDoc;
2445
+ }
2446
+ return doc;
2447
+ }, []);
2448
+ const handleDocUploadComplete = React.useCallback((doc) => {
2449
+ setDocIntroSent(false);
2450
+ }, []);
2451
+ const handleDocUploadError = React.useCallback((msg) => {
2452
+ setDocError(msg);
2453
+ }, []);
2454
+ const handleDocReady = React.useCallback((doc) => {
2455
+ setActiveDocument(doc);
2456
+ setDocIntroSent(false);
2457
+ const onDocIntro = (data) => {
2458
+ if (data == null ? void 0 : data.found) {
2459
+ setActiveDocument((prev) => prev && prev.doc_id === doc.doc_id ? {
2460
+ ...prev,
2461
+ summary: data.summary,
2462
+ suggested_questions: data.suggested_questions,
2463
+ category: data.category || prev.category,
2464
+ sub_category: data.sub_category || prev.sub_category
2465
+ } : prev);
2466
+ }
2467
+ };
2468
+ if (mode === "smart") {
2469
+ smartSessionIdRef.current = null;
2470
+ formSessionIdRef.current = null;
2471
+ agentStarted.current = false;
2472
+ setFormType(null);
2473
+ setFormStatus("in_progress");
2474
+ setPendingFormAction(null);
2475
+ setCurrentFieldUpdates(null);
2476
+ setResolvedLabels({});
2477
+ }
2478
+ api$1.streamV1CopilotChat(
2479
+ { ...api.getToken(), query: "", doc_id: doc.doc_id, doc_intro: true },
2480
+ () => {
2481
+ },
2482
+ () => {
2483
+ },
2484
+ () => {
2485
+ },
2486
+ () => {
2487
+ },
2488
+ onDocIntro
2489
+ ).catch(() => {
2490
+ });
2491
+ }, []);
2492
+ const handleDocError = React.useCallback((doc) => {
2493
+ setActiveDocument(null);
2494
+ setDocError(doc.error || "Document processing failed");
2495
+ }, []);
2496
+ const handleDocDelete = React.useCallback(async () => {
2497
+ if (!activeDocument) return;
2498
+ const docId = activeDocument.doc_id;
2499
+ try {
2500
+ const { "x-token": token } = api.getToken();
2501
+ const { deleteDocument } = await Promise.resolve().then(() => require("./api-Dw0ZiKMR.js")).then((n) => n.api$1);
2502
+ await deleteDocument(docId, token);
2503
+ setActiveDocument(
2504
+ (current) => (current == null ? void 0 : current.doc_id) === docId ? null : current
2505
+ );
2506
+ setDocIntroSent(false);
2507
+ setDocError(null);
2508
+ } catch {
2509
+ setDocError("Failed to delete document. Please try again.");
2510
+ }
2511
+ }, [activeDocument]);
2512
+ const checkAndSendMultiDocIntro = React.useCallback((docs) => {
2513
+ if (docs.length === 0) return;
2514
+ if (docs.some((d) => d.status !== "ready")) return;
2515
+ const currentIds = docs.map((d) => d.doc_id).sort().join(",");
2516
+ if (fetchedMultiDocIntroIds.current === currentIds) return;
2517
+ fetchedMultiDocIntroIds.current = currentIds;
2518
+ const onDocIntro = (data) => {
2519
+ if (data == null ? void 0 : data.found) {
2520
+ if (data.suggested_questions) {
2521
+ setSuggestedQuestions(data.suggested_questions);
2522
+ }
2523
+ setActiveDocuments((prev) => prev.map((p) => {
2524
+ if (docs.length === 1) {
2525
+ return {
2526
+ ...p,
2527
+ summary: data.summary,
2528
+ category: data.category || p.category,
2529
+ sub_category: data.sub_category || p.sub_category
2530
+ };
2531
+ } else if (data.docs && Array.isArray(data.docs)) {
2532
+ const dData = data.docs.find((d) => d.doc_id === p.doc_id);
2533
+ if (dData) {
2534
+ return {
2535
+ ...p,
2536
+ summary: dData.summary,
2537
+ category: dData.category || p.category,
2538
+ sub_category: dData.sub_category || p.sub_category
2539
+ };
2540
+ }
2541
+ }
2542
+ return p;
2543
+ }));
2544
+ }
2545
+ };
2546
+ if (mode === "smart") {
2547
+ smartSessionIdRef.current = null;
2548
+ formSessionIdRef.current = null;
2549
+ agentStarted.current = false;
2550
+ setFormType(null);
2551
+ setFormStatus("in_progress");
2552
+ setPendingFormAction(null);
2553
+ setCurrentFieldUpdates(null);
2554
+ setResolvedLabels({});
2555
+ }
2556
+ api$1.streamV1CopilotChat(
2557
+ { ...api.getToken(), query: "", doc_ids: docs.map((d) => d.doc_id), doc_intro: true },
2558
+ () => {
2559
+ },
2560
+ () => {
2561
+ },
2562
+ () => {
2563
+ },
2564
+ () => {
2565
+ },
2566
+ onDocIntro
2567
+ ).catch(() => {
2568
+ });
2569
+ }, [docIntroSent, mode]);
2570
+ const handleMultiDocUpload = React.useCallback(async (files, onProgress) => {
2571
+ const { "x-token": token } = api.getToken();
2572
+ setDocError(null);
2573
+ const result = await api$1.uploadDocuments(files, token, void 0, onProgress);
2574
+ const items = Array.isArray(result) ? result : result.items || [];
2575
+ const docs = items.map((r) => ({
2576
+ doc_id: r.doc_id,
2577
+ filename: r.filename,
2578
+ status: r.status,
2579
+ pages: r.pages,
2580
+ error: r.error
2581
+ }));
2582
+ setActiveDocuments((prev) => {
2583
+ const newDocs = [...prev];
2584
+ docs.forEach((d) => {
2585
+ if (!newDocs.find((x) => x.doc_id === d.doc_id)) newDocs.push(d);
2586
+ });
2587
+ return newDocs;
2588
+ });
2589
+ setDocIntroSent(false);
2590
+ const readyDocs = items.filter((r) => r.deduplicated && r.status === "ready");
2591
+ if (readyDocs.length > 0) {
2592
+ const fullStatuses = await Promise.all(readyDocs.map((r) => api$1.getDocumentStatus(r.doc_id, token)));
2593
+ setActiveDocuments((prev) => {
2594
+ const updated = prev.map((p) => {
2595
+ const full = fullStatuses.find((fs) => fs.doc_id === p.doc_id);
2596
+ if (full) {
2597
+ return {
2598
+ ...p,
2599
+ filename: full.filename || p.filename,
2600
+ status: full.status,
2601
+ pages: full.pages || p.pages,
2602
+ category: full.category || p.category,
2603
+ sub_category: full.sub_category || p.sub_category,
2604
+ chunk_count: full.chunk_count || p.chunk_count
2605
+ };
2606
+ }
2607
+ return p;
2608
+ });
2609
+ setTimeout(() => checkAndSendMultiDocIntro(updated), 0);
2610
+ return updated;
2611
+ });
2612
+ }
2613
+ return docs;
2614
+ }, [checkAndSendMultiDocIntro]);
2615
+ const handleMultiDocUploadComplete = React.useCallback((docs) => {
2616
+ setDocIntroSent(false);
2617
+ }, []);
2618
+ React.useCallback((msg) => {
2619
+ setDocError(msg);
2620
+ }, []);
2621
+ const handleMultiDocReady = React.useCallback((doc) => {
2622
+ setActiveDocuments((prev) => {
2623
+ const updated = prev.map((p) => p.doc_id === doc.doc_id ? doc : p);
2624
+ setTimeout(() => checkAndSendMultiDocIntro(updated), 0);
2625
+ return updated;
2626
+ });
2627
+ }, [checkAndSendMultiDocIntro]);
2628
+ const handleMultiDocError = React.useCallback((doc) => {
2629
+ setActiveDocuments((prev) => prev.filter((p) => p.doc_id !== doc.doc_id));
2630
+ setDocError(doc.error || "Document processing failed");
2631
+ }, []);
2632
+ const handleMultiDocDelete = React.useCallback(async (docId) => {
2633
+ if (activeDocuments.length === 0) return;
2634
+ const docsToDelete = docId ? activeDocuments.filter((d) => d.doc_id === docId) : activeDocuments;
2635
+ try {
2636
+ const { "x-token": token } = api.getToken();
2637
+ const { deleteDocument } = await Promise.resolve().then(() => require("./api-Dw0ZiKMR.js")).then((n) => n.api$1);
2638
+ await Promise.all(docsToDelete.map((d) => deleteDocument(d.doc_id, token)));
2639
+ setActiveDocuments((current) => docId ? current.filter((c) => c.doc_id !== docId) : []);
2640
+ setDocIntroSent(false);
2641
+ setDocError(null);
2642
+ setSuggestedQuestions([]);
2643
+ fetchedMultiDocIntroIds.current = "";
2644
+ } catch {
2645
+ setDocError("Failed to delete document(s). Please try again.");
2646
+ }
2647
+ }, [activeDocuments]);
2648
+ const sendMessage = React.useCallback(
2649
+ async (text) => {
2650
+ if (isTyping) return;
2651
+ if (mode === "conversation" && !text.trim()) return;
2652
+ if (mode === "agent" && !formType) return;
2653
+ if (mode === "doc_qa" && !activeDocument && activeDocuments.length === 0) return;
2654
+ if (mode === "smart" && !text.trim()) return;
2655
+ const userText = text;
2656
+ setMessages((prev) => [
2657
+ ...prev,
2658
+ { id: Date.now(), role: "user", text: userText, mode }
2659
+ ]);
2660
+ setInputValue("");
2661
+ setIsTyping(true);
2662
+ let aiMsgId = null;
2663
+ const startTime = Date.now();
2664
+ const conversation = conversationRef.current;
2665
+ const isCurrentConversation = () => conversationRef.current === conversation;
2666
+ const setTurnMessages = (value) => {
2667
+ if (isCurrentConversation()) setMessages(value);
2668
+ };
2669
+ const appendToken = (chunk) => {
2670
+ if (aiMsgId === null) {
2671
+ aiMsgId = Date.now() + 1;
2672
+ const responseTime = `${((Date.now() - startTime) / 1e3).toFixed(1)}s`;
2673
+ setIsTyping(false);
2674
+ setTurnMessages((prev) => [
2675
+ ...prev,
2676
+ { id: aiMsgId, role: "ai", text: chunk, time: responseTime, mode }
2677
+ ]);
2678
+ } else {
2679
+ setTurnMessages(
2680
+ (prev) => prev.map((m) => m.id === aiMsgId ? { ...m, text: m.text + chunk } : m)
2681
+ );
2682
+ }
2683
+ };
2684
+ const onBlocks = (blocks) => {
2685
+ if (blocks.length === 0) return;
2686
+ if (aiMsgId === null) {
2687
+ aiMsgId = Date.now() + 1;
2688
+ const responseTime = `${((Date.now() - startTime) / 1e3).toFixed(1)}s`;
2689
+ setIsTyping(false);
2690
+ setTurnMessages((prev) => [
2691
+ ...prev,
2692
+ { id: aiMsgId, role: "ai", text: "", time: responseTime, mode, blocks }
2693
+ ]);
2694
+ } else {
2695
+ setTurnMessages((prev) => prev.map((m) => m.id === aiMsgId ? { ...m, blocks } : m));
2696
+ }
2697
+ };
2698
+ const onDone = (usage) => {
2699
+ setIsTyping(false);
2700
+ if (aiMsgId === null) return;
2701
+ const durationMs = Date.now() - startTime;
2702
+ const inputTokens = (usage == null ? void 0 : usage.input_tokens) ?? (usage == null ? void 0 : usage.prompt_tokens);
2703
+ const outputTokens = (usage == null ? void 0 : usage.output_tokens) ?? (usage == null ? void 0 : usage.completion_tokens);
2704
+ const tokens = (usage == null ? void 0 : usage.total_tokens) ?? (inputTokens !== void 0 || outputTokens !== void 0 ? (inputTokens ?? 0) + (outputTokens ?? 0) : void 0);
2705
+ setTurnMessages((prev) => prev.map((m) => m.id === aiMsgId ? { ...m, durationMs, tokens, inputTokens, outputTokens } : m));
2706
+ };
2707
+ const onError = (message) => {
2708
+ setIsTyping(false);
2709
+ const errorText = message || "Sorry, something went wrong. Please try again.";
2710
+ if (aiMsgId !== null) {
2711
+ setTurnMessages((prev) => prev.map(
2712
+ (m) => m.id === aiMsgId ? { ...m, text: m.text + "\n\n⚠️ " + errorText } : m
2713
+ ));
2714
+ } else {
2715
+ setTurnMessages((prev) => [
2716
+ ...prev,
2717
+ { id: Date.now() + 1, role: "ai", text: errorText, time: getTime(), mode }
2718
+ ]);
2719
+ }
2720
+ };
2721
+ const onOffTopic = () => {
2722
+ setIsTyping(false);
2723
+ if (aiMsgId === null) {
2724
+ setTurnMessages((prev) => [
2725
+ ...prev,
2726
+ { id: Date.now() + 1, role: "ai", text: "That question is outside the scope of ERP data.", time: getTime(), mode }
2727
+ ]);
2728
+ }
2729
+ };
2730
+ const resolveFieldLabel = async (key, value) => {
2731
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
2732
+ const cacheKey = `${key}:${value}`;
2733
+ if (labelCacheRef.current[cacheKey]) return labelCacheRef.current[cacheKey];
2734
+ let label = String(value ?? "");
2735
+ try {
2736
+ if (key === "customer_id" || key === "vendor_id") {
2737
+ const res = await api$1.getV1PartiesId({ ...api.getToken(), id: value });
2738
+ const p = ((_c = (_b = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.parties) == null ? void 0 : _b.party) == null ? void 0 : _c.data) || ((_e = (_d = res == null ? void 0 : res.data) == null ? void 0 : _d.parties) == null ? void 0 : _e.party) || {};
2739
+ label = p.company_name || `${p.first_name || ""} ${p.last_name || ""}`.trim() || label;
2740
+ } else if (key === "payment_term_id") {
2741
+ const res = await api$1.getV1PaymentTermsId({ ...api.getToken(), id: value });
2742
+ const pt = ((_h = (_g = (_f = res == null ? void 0 : res.data) == null ? void 0 : _f.payment_term) == null ? void 0 : _g.payment_term) == null ? void 0 : _h.data) || {};
2743
+ label = pt.name || label;
2744
+ } else if (key === "account_payable_id" || key === "account_receivable_id") {
2745
+ const res = await api$1.getV1ChartOfAccountId({ ...api.getToken(), id: value });
2746
+ const c = ((_k = (_j = (_i = res == null ? void 0 : res.data) == null ? void 0 : _i.chart_of_account) == null ? void 0 : _j.account) == null ? void 0 : _k.data) || {};
2747
+ label = c.account_name || label;
2748
+ } else if (key === "company_id") {
2749
+ const res = await api$2.getV1CompanyId({ ...api.getToken(), id: value });
2750
+ const c = ((_m = (_l = res == null ? void 0 : res.data) == null ? void 0 : _l.company) == null ? void 0 : _m.data) || {};
2751
+ label = c.company_name || label;
2752
+ } else if (key === "currency_id" || key === "supplier_currency_id") {
2753
+ const res = await api$1.getV1CurrencyId({ ...api.getToken(), id: value });
2754
+ const c = ((_o = (_n = res == null ? void 0 : res.data) == null ? void 0 : _n.currency) == null ? void 0 : _o.data) || {};
2755
+ label = c.currency_name || label;
2756
+ } else if (key === "region_id") {
2757
+ const res = await api$2.getV1LocationsStates({ ...api.getToken(), id: Number(value) });
2758
+ const r = ((_p = res == null ? void 0 : res.data) == null ? void 0 : _p.state) || (res == null ? void 0 : res.data) || {};
2759
+ label = r.name || r.state_name || label;
2760
+ } else if (key === "location" || key.startsWith("invoice_addresses.shipping_address") || key.startsWith("invoice_addresses.billing_address") || key.startsWith("invoice_addresses.place_of_supply")) {
2761
+ const res = await api$1.getV1WarehouseLocationId({ ...api.getToken(), id: value });
2762
+ const wl = ((_s = (_r = (_q = res == null ? void 0 : res.data) == null ? void 0 : _q.warehouse_location) == null ? void 0 : _r.warehouse_location) == null ? void 0 : _s.data) || {};
2763
+ label = wl.name || label;
2764
+ } else if (key === "department" || key === "department_id") {
2765
+ const res = await api.getV1DepartmentsId({ ...api.getToken(), id: value });
2766
+ const d = ((_v = (_u = (_t = res == null ? void 0 : res.data) == null ? void 0 : _t.department) == null ? void 0 : _u.department) == null ? void 0 : _v.data) || {};
2767
+ label = d.name || label;
2768
+ } else if (key.startsWith("invoice_addresses.supplier_address") || key.startsWith("invoice_addresses.contact_person")) {
2769
+ const res = await api$1.getV1PartiesId({ ...api.getToken(), id: value });
2770
+ const p = ((_y = (_x = (_w = res == null ? void 0 : res.data) == null ? void 0 : _w.parties) == null ? void 0 : _x.party) == null ? void 0 : _y.data) || ((_A = (_z = res == null ? void 0 : res.data) == null ? void 0 : _z.parties) == null ? void 0 : _A.party) || {};
2771
+ label = p.company_name || `${p.first_name || ""} ${p.last_name || ""}`.trim() || label;
2772
+ }
2773
+ } catch {
2774
+ }
2775
+ labelCacheRef.current[cacheKey] = label;
2776
+ return label;
2777
+ };
2778
+ const onFieldUpdates = async (updates) => {
2779
+ if (Object.keys(updates).length === 0) return;
2780
+ setCurrentFieldUpdates((prev) => ({ ...prev || {}, ...updates }));
2781
+ const newLabels = {};
2782
+ const expenseAccountIds = updates["purchase_expense_entries.accounts.account_name"];
2783
+ if (Array.isArray(expenseAccountIds)) {
2784
+ const accountPromises = expenseAccountIds.map(async (accountId) => {
2785
+ var _a2, _b, _c;
2786
+ const cacheKey = `purchase_expense_entries.accounts.account_name:${accountId}`;
2787
+ if (labelCacheRef.current[cacheKey]) {
2788
+ newLabels[cacheKey] = labelCacheRef.current[cacheKey];
2789
+ return;
2790
+ }
2791
+ try {
2792
+ const res = await api$1.getV1ChartOfAccountId({ ...api.getToken(), id: accountId });
2793
+ const c = ((_c = (_b = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.chart_of_account) == null ? void 0 : _b.account) == null ? void 0 : _c.data) || {};
2794
+ const label = c.account_name || `Account #${accountId}`;
2795
+ labelCacheRef.current[cacheKey] = label;
2796
+ newLabels[cacheKey] = label;
2797
+ } catch {
2798
+ newLabels[cacheKey] = `Account #${accountId}`;
2799
+ }
2800
+ });
2801
+ await Promise.all(accountPromises);
2802
+ }
2803
+ const expenseTaxCodes = updates["purchase_expense_entries.tax_codes"];
2804
+ if (Array.isArray(expenseTaxCodes)) {
2805
+ const uniqueTaxIds = [...new Set(expenseTaxCodes.filter(Boolean))];
2806
+ const taxPromises = uniqueTaxIds.map(async (taxId) => {
2807
+ var _a2, _b;
2808
+ const cacheKey = `tax_code_data:${taxId}`;
2809
+ if (labelCacheRef.current[cacheKey]) {
2810
+ newLabels[cacheKey] = labelCacheRef.current[cacheKey];
2811
+ return;
2812
+ }
2813
+ try {
2814
+ const res = await api$1.getV1TaxCodeId({ ...api.getToken(), id: taxId });
2815
+ const taxCode = ((_b = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.taxCode) == null ? void 0 : _b.data) || {};
2816
+ const taxRate = Number(taxCode.rate) || 0;
2817
+ const taxName = taxCode.name || `Tax #${taxId}`;
2818
+ const label = JSON.stringify({ name: `${taxName} (${taxRate}%)`, rate: taxRate });
2819
+ labelCacheRef.current[cacheKey] = label;
2820
+ newLabels[cacheKey] = label;
2821
+ } catch {
2822
+ newLabels[cacheKey] = JSON.stringify({ name: `Tax #${taxId}`, rate: 0 });
2823
+ }
2824
+ });
2825
+ await Promise.all(taxPromises);
2826
+ }
2827
+ const itemNames = updates["sales_item_entries.items.name"] || updates["purchase_item_entries.items.name"];
2828
+ const itemPrefix = updates["sales_item_entries.items.name"] ? "sales_item_entries" : "purchase_item_entries";
2829
+ if (Array.isArray(itemNames)) {
2830
+ const itemPromises = itemNames.map(async (itemId) => {
2831
+ var _a2;
2832
+ const cacheKey = `${itemPrefix}.items.name:${itemId}`;
2833
+ if (labelCacheRef.current[cacheKey]) {
2834
+ newLabels[cacheKey] = labelCacheRef.current[cacheKey];
2835
+ return;
2836
+ }
2837
+ try {
2838
+ const res = await api$1.getV1InventoryItemsId({ ...api.getToken(), id: itemId });
2839
+ const item = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) || {};
2840
+ const label = item.name || `Item #${itemId}`;
2841
+ labelCacheRef.current[cacheKey] = label;
2842
+ newLabels[cacheKey] = label;
2843
+ } catch {
2844
+ newLabels[cacheKey] = `Item #${itemId}`;
2845
+ }
2846
+ });
2847
+ await Promise.all(itemPromises);
2848
+ }
2849
+ const taxCodes = updates["sales_item_entries.tax_codes"] || updates["purchase_item_entries.tax_codes"];
2850
+ if (Array.isArray(taxCodes)) {
2851
+ const uniqueTaxIds = [...new Set(taxCodes.filter(Boolean))];
2852
+ const taxPromises = uniqueTaxIds.map(async (taxId) => {
2853
+ var _a2, _b;
2854
+ const cacheKey = `tax_code_data:${taxId}`;
2855
+ if (labelCacheRef.current[cacheKey]) {
2856
+ newLabels[cacheKey] = labelCacheRef.current[cacheKey];
2857
+ return;
2858
+ }
2859
+ try {
2860
+ const res = await api$1.getV1TaxCodeId({ ...api.getToken(), id: taxId });
2861
+ const taxCode = ((_b = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.taxCode) == null ? void 0 : _b.data) || {};
2862
+ const taxRate = Number(taxCode.rate) || 0;
2863
+ const taxName = taxCode.name || `Tax #${taxId}`;
2864
+ const label = JSON.stringify({ name: `${taxName} (${taxRate}%)`, rate: taxRate });
2865
+ labelCacheRef.current[cacheKey] = label;
2866
+ newLabels[cacheKey] = label;
2867
+ } catch {
2868
+ newLabels[cacheKey] = JSON.stringify({ name: `Tax #${taxId}`, rate: 0 });
2869
+ }
2870
+ });
2871
+ await Promise.all(taxPromises);
2872
+ }
2873
+ const uomKeys = ["sales_item_entries.units_of_measurement.uom_name", "sales_item_entries.units_of_measurement.name", "purchase_item_entries.units_of_measurement.uom_name"];
2874
+ const uomIdsForKey = uomKeys.find((k) => Array.isArray(updates[k]));
2875
+ if (uomIdsForKey) {
2876
+ const uomIds = updates[uomIdsForKey];
2877
+ const uomPrefix = uomIdsForKey.startsWith("sales") ? "sales_item_entries" : "purchase_item_entries";
2878
+ const uomPromises = uomIds.map(async (uomId) => {
2879
+ var _a2, _b;
2880
+ const cacheKey = `${uomPrefix}.units_of_measurement:${uomId}`;
2881
+ if (labelCacheRef.current[cacheKey]) {
2882
+ newLabels[cacheKey] = labelCacheRef.current[cacheKey];
2883
+ return;
2884
+ }
2885
+ try {
2886
+ const res = await api$1.getV1Uom({ ...api.getToken(), filters: JSON.stringify({ id: uomId }) });
2887
+ const uomList = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2["uom"]) || ((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.data) || [];
2888
+ const uom = Array.isArray(uomList) ? uomList[0] : uomList;
2889
+ const label = (uom == null ? void 0 : uom.name) || (uom == null ? void 0 : uom.uom_name) || `UOM #${uomId}`;
2890
+ labelCacheRef.current[cacheKey] = label;
2891
+ newLabels[cacheKey] = label;
2892
+ } catch {
2893
+ newLabels[cacheKey] = `UOM #${uomId}`;
2894
+ }
2895
+ });
2896
+ await Promise.all(uomPromises);
2897
+ }
2898
+ const promises = Object.entries(updates).map(async ([key, value]) => {
2899
+ if (value !== void 0 && value !== null && value !== "") {
2900
+ if (key === "sales_item_entries.items.name" || key === "purchase_item_entries.items.name" || key === "purchase_expense_entries.accounts.account_name") return;
2901
+ if (uomKeys.includes(key)) return;
2902
+ newLabels[key] = await resolveFieldLabel(key, value);
2903
+ }
2904
+ });
2905
+ await Promise.all(promises);
2906
+ setResolvedLabels((prev) => ({ ...prev, ...newLabels }));
2907
+ };
2908
+ const onChatSessionId = (sessionId) => {
2909
+ if (!isCurrentConversation()) return;
2910
+ chatSessionIdRef.current = sessionId;
2911
+ markActiveSession(sessionId);
2912
+ };
2913
+ try {
2914
+ if (mode === "smart") {
2915
+ const docsToPass = activeDocuments.length > 0 ? activeDocuments.map((d) => ({ doc_id: d.doc_id, filename: d.filename, sub_category: d.sub_category || "General" })) : activeDocument ? [{ doc_id: activeDocument.doc_id, filename: activeDocument.filename, sub_category: activeDocument.sub_category || "General" }] : void 0;
2916
+ await api$1.streamV1CopilotSmart(
2917
+ { ...api.getToken(), query: text, docs: docsToPass, "x-timezone": (/* @__PURE__ */ new Date()).getTimezoneOffset(), session_id: smartSessionIdRef.current || void 0 },
2918
+ appendToken,
2919
+ onDone,
2920
+ onError,
2921
+ onOffTopic,
2922
+ void 0,
2923
+ (planData) => {
2924
+ },
2925
+ onFieldUpdates,
2926
+ (citationsData) => {
2927
+ if (citationsData && citationsData.length > 0) {
2928
+ const docGroups = {};
2929
+ citationsData.forEach((c) => {
2930
+ const key = c.doc_id || c.filename;
2931
+ if (!docGroups[key]) {
2932
+ docGroups[key] = { filename: c.filename, chunks: [] };
2933
+ }
2934
+ docGroups[key].chunks.push(c);
2935
+ });
2936
+ let citationText = "\n\n**Sources:**\n\n";
2937
+ Object.values(docGroups).forEach((group) => {
2938
+ citationText += `📄 **${group.filename}**
2939
+ `;
2940
+ const pages = [...new Set(group.chunks.map((c) => c.page_num).filter((p) => p !== void 0 && p !== null))].sort((a, b) => a - b);
2941
+ if (pages.length > 0) {
2942
+ if (pages.length === 1) {
2943
+ citationText += ` Page ${pages[0]}
2944
+
2945
+ `;
2946
+ } else {
2947
+ citationText += ` Pages ${pages[0]}–${pages[pages.length - 1]}
2948
+
2949
+ `;
2950
+ }
2951
+ } else {
2952
+ citationText += "\n";
2953
+ }
2954
+ });
2955
+ appendToken(citationText);
2956
+ }
2957
+ },
2958
+ async (action) => {
2959
+ if (["save_draft", "submit_form", "discard_form"].includes(action)) {
2960
+ setPendingFormAction(action);
2961
+ }
2962
+ },
2963
+ (status) => {
2964
+ setFormStatus(status);
2965
+ },
2966
+ (newFormType) => {
2967
+ setFormType(newFormType);
2968
+ },
2969
+ (sessionId) => {
2970
+ if (!isCurrentConversation()) return;
2971
+ smartSessionIdRef.current = sessionId;
2972
+ markActiveSession(sessionId);
2973
+ },
2974
+ (formSessionId) => {
2975
+ formSessionIdRef.current = formSessionId;
2976
+ },
2977
+ onBlocks
2978
+ );
2979
+ } else if (mode === "doc_qa") {
2980
+ if (activeDocuments && activeDocuments.length > 0) {
2981
+ await api$1.streamV1CopilotChat(
2982
+ { ...api.getToken(), query: text, doc_ids: activeDocuments.map((d) => d.doc_id), session_id: chatSessionIdRef.current || void 0 },
2983
+ appendToken,
2984
+ onDone,
2985
+ onError,
2986
+ onOffTopic,
2987
+ void 0,
2988
+ onChatSessionId
2989
+ );
2990
+ } else if (activeDocument) {
2991
+ await api$1.streamV1CopilotChat(
2992
+ { ...api.getToken(), query: text, doc_id: activeDocument.doc_id, session_id: chatSessionIdRef.current || void 0 },
2993
+ appendToken,
2994
+ onDone,
2995
+ onError,
2996
+ onOffTopic,
2997
+ void 0,
2998
+ onChatSessionId
2999
+ );
3000
+ }
3001
+ } else if (mode === "agent" && formType) {
3002
+ if (!agentStarted.current) {
3003
+ await api$1.startV1CopilotAgent(
3004
+ { ...api.getToken(), form_type: formType },
3005
+ appendToken,
3006
+ () => {
3007
+ agentStarted.current = true;
3008
+ },
3009
+ onError,
3010
+ onOffTopic
3011
+ );
3012
+ }
3013
+ await api$1.formAssistV1Copilot(
3014
+ { ...api.getToken(), message: text },
3015
+ appendToken,
3016
+ onDone,
3017
+ onError,
3018
+ onFieldUpdates,
3019
+ async (action) => {
3020
+ if (["save_draft", "submit_form", "discard_form"].includes(action)) {
3021
+ try {
3022
+ const token = api.getToken()["x-token"];
3023
+ const sessionId = "current_session";
3024
+ if (action === "submit_form") {
3025
+ await api$1.postV1CopilotSubmit(sessionId, token, formType, currentFieldUpdates);
3026
+ toast.success("Form submitted successfully!");
3027
+ } else if (action === "save_draft") {
3028
+ await api$1.postV1CopilotSaveDraft(sessionId, token, formType, currentFieldUpdates);
3029
+ toast.success("Draft saved successfully!");
3030
+ } else if (action === "discard_form") {
3031
+ await api$1.postV1CopilotDiscard(sessionId, token, formType, currentFieldUpdates);
3032
+ toast.success("Form discarded");
3033
+ }
3034
+ agentStarted.current = false;
3035
+ setCurrentFieldUpdates(null);
3036
+ setResolvedLabels({});
3037
+ labelCacheRef.current = {};
3038
+ setFormStatus("in_progress");
3039
+ } catch (e) {
3040
+ console.error("Failed to perform copilot action", e);
3041
+ let errMsg = "Action failed. Please try again.";
3042
+ try {
3043
+ const parsed = JSON.parse(e.message);
3044
+ if (parsed.message) errMsg = parsed.message;
3045
+ } catch (err) {
3046
+ if (e.message) errMsg = e.message;
3047
+ }
3048
+ toast.error(errMsg);
3049
+ setMessages((prev) => [
3050
+ ...prev,
3051
+ {
3052
+ id: Date.now(),
3053
+ role: "ai",
3054
+ text: `Validation Error: ${errMsg}
3055
+
3056
+ Please correct the details and try again.`,
3057
+ time: (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }),
3058
+ mode: "agent"
3059
+ }
3060
+ ]);
3061
+ }
3062
+ }
3063
+ },
3064
+ (status) => {
3065
+ console.log("Copilot Form Status:", status);
3066
+ setFormStatus(status);
3067
+ }
3068
+ );
3069
+ } else {
3070
+ await api$1.streamV1CopilotChat(
3071
+ { ...api.getToken(), query: text, "x-timezone": (/* @__PURE__ */ new Date()).getTimezoneOffset(), session_id: chatSessionIdRef.current || void 0 },
3072
+ appendToken,
3073
+ onDone,
3074
+ onError,
3075
+ onOffTopic,
3076
+ void 0,
3077
+ onChatSessionId
3078
+ );
3079
+ }
3080
+ } catch {
3081
+ setIsTyping(false);
3082
+ if (aiMsgId === null) {
3083
+ setTurnMessages((prev) => [
3084
+ ...prev,
3085
+ { id: Date.now() + 1, role: "ai", text: "Connection error. Please try again.", time: getTime(), mode }
3086
+ ]);
3087
+ }
3088
+ }
3089
+ },
3090
+ [isTyping, mode, formType, activeDocument, activeDocuments]
3091
+ );
3092
+ const handleKeyDown = (e) => {
3093
+ if (showSlashMenu && filteredCommands.length > 0) {
3094
+ if (e.key === "ArrowDown") {
3095
+ e.preventDefault();
3096
+ setSlashIndex((i) => (i + 1) % filteredCommands.length);
3097
+ return;
3098
+ }
3099
+ if (e.key === "ArrowUp") {
3100
+ e.preventDefault();
3101
+ setSlashIndex((i) => (i - 1 + filteredCommands.length) % filteredCommands.length);
3102
+ return;
3103
+ }
3104
+ if (e.key === "Enter" || e.key === "Tab") {
3105
+ e.preventDefault();
3106
+ const cmdId = filteredCommands[slashIndex].id;
3107
+ setInputValue("");
3108
+ selectCommand(cmdId);
3109
+ return;
3110
+ }
3111
+ if (e.key === "Escape") {
3112
+ setShowSlashMenu(false);
3113
+ setInputValue("");
3114
+ return;
3115
+ }
3116
+ }
3117
+ if (e.key === "Enter" && !e.shiftKey) {
3118
+ e.preventDefault();
3119
+ sendMessage(inputValue);
3120
+ }
3121
+ };
3122
+ const executeSmartFormAction = React.useCallback(async (action) => {
3123
+ const sessionId = formSessionIdRef.current;
3124
+ if (!sessionId) {
3125
+ toast.error("No active form session to act on.");
3126
+ return;
3127
+ }
3128
+ try {
3129
+ const token = api.getToken()["x-token"];
3130
+ if (action === "submit_form") {
3131
+ await api$1.postV1CopilotSubmit(sessionId, token, formType, currentFieldUpdates);
3132
+ toast.success("Form submitted successfully!");
3133
+ } else if (action === "save_draft") {
3134
+ await api$1.postV1CopilotSaveDraft(sessionId, token, formType, currentFieldUpdates);
3135
+ toast.success("Draft saved successfully!");
3136
+ } else {
3137
+ await api$1.postV1CopilotDiscard(sessionId, token, formType, currentFieldUpdates);
3138
+ toast.success("Form discarded");
3139
+ }
3140
+ agentStarted.current = false;
3141
+ setCurrentFieldUpdates(null);
3142
+ setResolvedLabels({});
3143
+ labelCacheRef.current = {};
3144
+ setFormStatus("in_progress");
3145
+ setFormType(null);
3146
+ setPendingFormAction(null);
3147
+ smartSessionIdRef.current = null;
3148
+ formSessionIdRef.current = null;
3149
+ } catch (e) {
3150
+ console.error("Failed to perform copilot action", e);
3151
+ let errMsg = "Action failed. Please try again.";
3152
+ try {
3153
+ const parsed = JSON.parse(e.message);
3154
+ if (parsed.message) errMsg = parsed.message;
3155
+ } catch {
3156
+ if (e.message) errMsg = e.message;
3157
+ }
3158
+ toast.error(errMsg);
3159
+ setMessages((prev) => [
3160
+ ...prev,
3161
+ {
3162
+ id: Date.now(),
3163
+ role: "ai",
3164
+ text: `Validation Error: ${errMsg}
3165
+
3166
+ Please correct the details and try again.`,
3167
+ time: (/* @__PURE__ */ new Date()).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }),
3168
+ mode: "smart"
3169
+ }
3170
+ ]);
3171
+ }
3172
+ }, [formType, currentFieldUpdates]);
3173
+ const handleSave = React.useCallback(async () => {
3174
+ if (mode === "smart") return executeSmartFormAction("save_draft");
3175
+ await sendMessage("Save the draft");
3176
+ }, [mode, executeSmartFormAction, sendMessage]);
3177
+ const handleDiscard = React.useCallback(async () => {
3178
+ if (mode === "smart") return executeSmartFormAction("discard_form");
3179
+ await sendMessage("Discard this form");
3180
+ }, [mode, executeSmartFormAction, sendMessage]);
3181
+ const handleSubmit = React.useCallback(async () => {
3182
+ if (mode === "smart") return executeSmartFormAction("submit_form");
3183
+ await sendMessage("Submit this form");
3184
+ }, [mode, executeSmartFormAction, sendMessage]);
3185
+ const handleNewChat = React.useCallback(async () => {
3186
+ conversationRef.current += 1;
3187
+ const { "x-token": token } = api.getToken();
3188
+ await api$1.resetV1CopilotSession(token);
3189
+ setIsTyping(false);
3190
+ setFormType(null);
3191
+ setFormStatus("in_progress");
3192
+ setPendingFormAction(null);
3193
+ agentStarted.current = false;
3194
+ smartSessionIdRef.current = null;
3195
+ chatSessionIdRef.current = null;
3196
+ formSessionIdRef.current = null;
3197
+ setCurrentFieldUpdates(null);
3198
+ setResolvedLabels({});
3199
+ labelCacheRef.current = {};
3200
+ setActiveDocument(null);
3201
+ setDocIntroSent(false);
3202
+ setDocError(null);
3203
+ setActiveDocuments([]);
3204
+ setSuggestedQuestions([]);
3205
+ setMessages([]);
3206
+ fetchedMultiDocIntroIds.current = "";
3207
+ tabStateRef.current = {};
3208
+ fetchQuestions();
3209
+ }, [fetchQuestions]);
3210
+ React.useEffect(() => {
3211
+ activeSessionIdRef.current = activeSessionId;
3212
+ }, [activeSessionId]);
3213
+ React.useEffect(() => {
3214
+ if (messages.length === 0) {
3215
+ activeSessionIdRef.current = null;
3216
+ setActiveSessionId(null);
3217
+ }
3218
+ }, [messages.length]);
3219
+ const wasTypingRef = React.useRef(false);
3220
+ const refreshHistory = chatHistory.refresh;
3221
+ React.useEffect(() => {
3222
+ if (wasTypingRef.current && !isTyping && historyOpen) refreshHistory(true);
3223
+ wasTypingRef.current = isTyping;
3224
+ }, [isTyping, historyOpen, refreshHistory]);
3225
+ const handleOpenSession = React.useCallback(async (session) => {
3226
+ if (session.id === activeSessionIdRef.current) return;
3227
+ const conversation = ++conversationRef.current;
3228
+ let detail;
3229
+ try {
3230
+ detail = await chatHistory.openSession(session);
3231
+ } catch (e) {
3232
+ if (conversation !== conversationRef.current) return;
3233
+ toast.error((e == null ? void 0 : e.message) || "Failed to open chat");
3234
+ refreshHistory();
3235
+ return;
3236
+ }
3237
+ if (conversation !== conversationRef.current) return;
3238
+ try {
3239
+ await api$1.resetV1CopilotSession(api.getToken()["x-token"]);
3240
+ } catch {
3241
+ }
3242
+ if (conversation !== conversationRef.current) return;
3243
+ const sessionMode = session.service === "copilot_smart" ? "smart" : "conversation";
3244
+ setIsTyping(false);
3245
+ setFormType(null);
3246
+ setFormStatus("in_progress");
3247
+ setPendingFormAction(null);
3248
+ agentStarted.current = false;
3249
+ smartSessionIdRef.current = null;
3250
+ formSessionIdRef.current = null;
3251
+ setCurrentFieldUpdates(null);
3252
+ setResolvedLabels({});
3253
+ labelCacheRef.current = {};
3254
+ setActiveDocument(null);
3255
+ setDocIntroSent(false);
3256
+ setDocError(null);
3257
+ setActiveDocuments([]);
3258
+ setSuggestedQuestions([]);
3259
+ fetchedMultiDocIntroIds.current = "";
3260
+ tabStateRef.current = {};
3261
+ userScrolledUp.current = false;
3262
+ smartSessionIdRef.current = session.service === "copilot_smart" ? session.id : null;
3263
+ chatSessionIdRef.current = session.service === "copilot_chat" ? session.id : null;
3264
+ markActiveSession(session.id);
3265
+ setMode(sessionMode);
3266
+ setMessages(toChatMessages(detail.messages || [], sessionMode));
3267
+ }, [chatHistory.openSession, refreshHistory]);
3268
+ const handleConfirmDeleteSession = React.useCallback(async () => {
3269
+ const session = pendingDeleteSession;
3270
+ if (!session) return;
3271
+ setDeletingSession(true);
3272
+ try {
3273
+ await chatHistory.removeSession(session);
3274
+ if (session.id === activeSessionIdRef.current) handleNewChat();
3275
+ setPendingDeleteSession(null);
3276
+ } catch (e) {
3277
+ toast.error((e == null ? void 0 : e.message) || "Failed to delete chat");
3278
+ setPendingDeleteSession(null);
3279
+ refreshHistory();
3280
+ } finally {
3281
+ setDeletingSession(false);
3282
+ }
3283
+ }, [pendingDeleteSession, chatHistory.removeSession, handleNewChat, refreshHistory]);
3284
+ const historyPanelProps = {
3285
+ sessions: chatHistory.sessions,
3286
+ activeId: activeSessionId,
3287
+ onClose: () => setHistoryOpen(false),
3288
+ onDelete: setPendingDeleteSession,
3289
+ loading: chatHistory.loading,
3290
+ error: chatHistory.error,
3291
+ onRetry: () => refreshHistory(),
3292
+ hasMore: chatHistory.hasMore,
3293
+ loadingMore: chatHistory.loadingMore,
3294
+ onLoadMore: chatHistory.loadMore,
3295
+ unavailableMessage: historyService ? null : "History isn't available for Agent mode."
3296
+ };
3297
+ const isEmptyChat = filteredMessages.length === 0 && !activeDocument && activeDocuments.length === 0;
3298
+ const centerInput = inline && dashboardMode && isEmptyChat;
3299
+ const dashboardChatActive = inline && dashboardMode && !isEmptyChat;
3300
+ React.useEffect(() => {
3301
+ if (inline && dashboardMode) chatDockState.setChatActive(dashboardChatActive);
3302
+ }, [inline, dashboardMode, dashboardChatActive]);
3303
+ React.useEffect(() => () => {
3304
+ if (inline && dashboardMode) chatDockState.setChatActive(false);
3305
+ }, [inline, dashboardMode]);
3306
+ const chatInput = /* @__PURE__ */ jsxRuntime.jsx(
3307
+ ChatBotInput,
3308
+ {
3309
+ inputValue,
3310
+ isTyping,
3311
+ mode,
3312
+ formType,
3313
+ showSlashMenu,
3314
+ filteredCommands,
3315
+ slashIndex,
3316
+ textareaRef,
3317
+ onChange: handleInputChange,
3318
+ onKeyDown: handleKeyDown,
3319
+ onSend: () => sendMessage(inputValue),
3320
+ onSlashHover: setSlashIndex,
3321
+ onSlashSelect: selectCommand,
3322
+ onModeChange: handleModeChange,
3323
+ onFormTypeChange: setFormType,
3324
+ activeDocument,
3325
+ activeDocuments,
3326
+ onDocDelete: handleDocDelete,
3327
+ onDocUpload: () => setShowUploadArea(!showUploadArea),
3328
+ onMultiDocDelete: handleMultiDocDelete
3329
+ }
3330
+ );
3331
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3332
+ (isOpen || inline) && /* @__PURE__ */ jsxRuntime.jsxs(
3333
+ "div",
3334
+ {
3335
+ ref: panelRef,
3336
+ className: `chatBot--panel ${inline ? "chatBot--panel--inline" : ""} ${inline && dashboardMode ? "chatBot--panel--dashboard" : ""}`,
3337
+ style: panelHeight ? { height: panelHeight, minHeight: 0 } : void 0,
3338
+ children: [
3339
+ inline && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--history-bar", children: [
3340
+ (filteredMessages.length > 0 || activeDocument || activeDocuments.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(ChatBotNewChatButton, { onClick: handleNewChat }),
3341
+ /* @__PURE__ */ jsxRuntime.jsx(ChatBotHistoryButton, { open: historyOpen, onClick: () => setHistoryOpen((o) => !o) })
3342
+ ] }),
3343
+ inline && (filteredMessages.length > 0 || activeDocument || activeDocuments.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--inline-actions", children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: "chatBot--new-chat-btn", onClick: handleNewChat, title: "New Chat", children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Add, { style: { fontSize: 20 } }) }) }),
3344
+ !inline && /* @__PURE__ */ jsxRuntime.jsx(
3345
+ ChatBotHeader,
3346
+ {
3347
+ onClose: () => setIsOpen(false),
3348
+ onNewChat: () => {
3349
+ setHistoryOpen(false);
3350
+ handleNewChat();
3351
+ },
3352
+ sessionTokens: messages.reduce((sum, m) => sum + (m.tokens ?? 0), 0),
3353
+ sessionMs: messages.reduce((sum, m) => sum + (m.durationMs ?? 0), 0),
3354
+ onHistory: () => setHistoryOpen((o) => !o),
3355
+ historyOpen
3356
+ }
3357
+ ),
3358
+ !inline && /* @__PURE__ */ jsxRuntime.jsx(
3359
+ ChatBotHistory,
3360
+ {
3361
+ ...historyPanelProps,
3362
+ variant: "embedded",
3363
+ open: historyOpen,
3364
+ onSelect: (session) => {
3365
+ setHistoryOpen(false);
3366
+ handleOpenSession(session);
3367
+ }
3368
+ }
3369
+ ),
3370
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `chatBot--main-view ${!inline && historyOpen ? "chatBot--main-view--hidden" : ""}`, children: [
3371
+ filteredMessages.length === 0 && !activeDocument && activeDocuments.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { ref: bodyRef, className: "chatBot--body", children: /* @__PURE__ */ jsxRuntime.jsx(ChatBotWelcome, { firstName, onSuggestion: handleSuggestion, dynamicQuestions, mode, dashboardMode, inputSlot: centerInput ? chatInput : void 0 }) }) : /* @__PURE__ */ jsxRuntime.jsx(
3372
+ ChatBotMessages,
3373
+ {
3374
+ messages: filteredMessages,
3375
+ isTyping,
3376
+ bodyRef,
3377
+ footer: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3378
+ activeDocument && activeDocuments.length === 0 && (mode === "doc_qa" || mode === "smart") && activeDocument.status === "ready" && !docIntroSent && /* @__PURE__ */ jsxRuntime.jsx(
3379
+ DocIntro,
3380
+ {
3381
+ document: activeDocument,
3382
+ onSuggestion: (q) => {
3383
+ setDocIntroSent(true);
3384
+ setInputValue(q);
3385
+ setTimeout(() => sendMessage(q), 0);
3386
+ }
3387
+ }
3388
+ ),
3389
+ activeDocuments.length > 0 && (mode === "doc_qa" || mode === "smart") && activeDocuments.every((d) => d.status === "ready") && !docIntroSent && /* @__PURE__ */ jsxRuntime.jsx(
3390
+ DocIntro,
3391
+ {
3392
+ documents: activeDocuments,
3393
+ suggestedQuestions: suggestedQuestions.length > 0 ? suggestedQuestions : activeDocuments[0].suggested_questions,
3394
+ onSuggestion: (q) => {
3395
+ setDocIntroSent(true);
3396
+ setInputValue(q);
3397
+ setTimeout(() => sendMessage(q), 0);
3398
+ }
3399
+ }
3400
+ ),
3401
+ currentFieldUpdates && (mode === "agent" || mode === "smart") && /* @__PURE__ */ jsxRuntime.jsx(
3402
+ InvoicePreview,
3403
+ {
3404
+ fieldUpdates: currentFieldUpdates,
3405
+ resolvedLabels,
3406
+ formStatus,
3407
+ useActionGating: mode === "smart",
3408
+ pendingFormAction,
3409
+ onSave: handleSave,
3410
+ onDiscard: handleDiscard,
3411
+ onSubmit: handleSubmit
3412
+ }
3413
+ )
3414
+ ] })
3415
+ }
3416
+ ),
3417
+ (mode === "doc_qa" || mode === "smart" && showUploadArea) && !activeDocument && activeDocuments.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "chatBot--doc-upload-area", children: [
3418
+ /* @__PURE__ */ jsxRuntime.jsx(
3419
+ DocUpload,
3420
+ {
3421
+ onUploadComplete: (docs) => {
3422
+ if (docs.length === 1 && (!activeDocuments || activeDocuments.length === 0)) {
3423
+ handleDocUploadComplete(docs[0]);
3424
+ } else {
3425
+ handleMultiDocUploadComplete(docs);
3426
+ }
3427
+ },
3428
+ onUploadError: handleDocUploadError,
3429
+ uploadDocument: handleDocUpload,
3430
+ uploadDocuments: handleMultiDocUpload
3431
+ }
3432
+ ),
3433
+ docError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-error", children: docError })
3434
+ ] }),
3435
+ activeDocument && activeDocuments.length === 0 && (mode === "doc_qa" || mode === "smart") && ["pending", "processing", "parsing", "embedding", "indexing"].includes(activeDocument.status) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-status-area", children: /* @__PURE__ */ jsxRuntime.jsx(
3436
+ DocStatus,
3437
+ {
3438
+ document: activeDocument,
3439
+ onReady: handleDocReady,
3440
+ onError: handleDocError,
3441
+ getStatus: async (docId) => {
3442
+ const { "x-token": token } = api.getToken();
3443
+ const res = await api$1.getDocumentStatus(docId, token);
3444
+ return {
3445
+ doc_id: res.doc_id,
3446
+ filename: res.filename || activeDocument.filename,
3447
+ status: res.status,
3448
+ pages: res.pages || activeDocument.pages,
3449
+ category: res.category || void 0,
3450
+ sub_category: res.sub_category || void 0,
3451
+ chunk_count: res.chunk_count || void 0,
3452
+ error: res.error || void 0,
3453
+ error_code: res.error_code || void 0
3454
+ };
3455
+ }
3456
+ },
3457
+ activeDocument.doc_id
3458
+ ) }),
3459
+ (mode === "doc_qa" || mode === "smart") && activeDocuments.length > 0 && activeDocuments.some((d) => ["pending", "processing", "parsing", "embedding", "indexing"].includes(d.status)) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-status-area chatBot--doc-status-area--multiple", children: activeDocuments.filter((d) => ["pending", "processing", "parsing", "embedding", "indexing"].includes(d.status)).map((doc) => /* @__PURE__ */ jsxRuntime.jsx(
3460
+ DocStatus,
3461
+ {
3462
+ document: doc,
3463
+ onReady: handleMultiDocReady,
3464
+ onError: handleMultiDocError,
3465
+ getStatus: async (docId) => {
3466
+ const { "x-token": token } = api.getToken();
3467
+ const res = await api$1.getDocumentStatus(docId, token);
3468
+ return {
3469
+ doc_id: res.doc_id,
3470
+ filename: res.filename || doc.filename,
3471
+ status: res.status,
3472
+ pages: res.pages || doc.pages,
3473
+ category: res.category || void 0,
3474
+ sub_category: res.sub_category || void 0,
3475
+ chunk_count: res.chunk_count || void 0,
3476
+ error: res.error || void 0,
3477
+ error_code: res.error_code || void 0
3478
+ };
3479
+ }
3480
+ },
3481
+ doc.doc_id
3482
+ )) }),
3483
+ docError && (mode === "doc_qa" || mode === "smart") && !!(activeDocument || activeDocuments.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "chatBot--doc-error-floating", onClick: () => setDocError(null), children: docError }),
3484
+ !centerInput && chatInput
3485
+ ] })
3486
+ ]
3487
+ }
3488
+ ),
3489
+ inline && /* @__PURE__ */ jsxRuntime.jsx(
3490
+ ChatBotHistory,
3491
+ {
3492
+ ...historyPanelProps,
3493
+ open: historyOpen,
3494
+ onSelect: handleOpenSession
3495
+ }
3496
+ ),
3497
+ /* @__PURE__ */ jsxRuntime.jsx(
3498
+ confirmModal.ConfirmPopUp,
3499
+ {
3500
+ open: !!pendingDeleteSession,
3501
+ title: "Delete chat",
3502
+ description: `"${(pendingDeleteSession == null ? void 0 : pendingDeleteSession.title) ?? ""}" will be permanently deleted. This cannot be undone.`,
3503
+ loading: deletingSession,
3504
+ onClose: () => !deletingSession && setPendingDeleteSession(null),
3505
+ onConfirm: handleConfirmDeleteSession
3506
+ }
3507
+ ),
3508
+ !isOpen && !inline && /* @__PURE__ */ jsxRuntime.jsx(ChatBotLauncher, { onOpen: () => setIsOpen(true) })
3509
+ ] });
3510
+ };
3511
+ exports.ACCEPTED_FILE_EXTENSIONS = ACCEPTED_FILE_EXTENSIONS;
3512
+ exports.ACCEPT_ATTR = ACCEPT_ATTR;
3513
+ exports.ChatBot = ChatBot;
3514
+ exports.ChatBotHeader = ChatBotHeader;
3515
+ exports.ChatBotInput = ChatBotInput;
3516
+ exports.ChatBotLauncher = ChatBotLauncher;
3517
+ exports.ChatBotMessages = ChatBotMessages;
3518
+ exports.ChatBotWelcome = ChatBotWelcome;
3519
+ exports.DocIntro = DocIntro;
3520
+ exports.DocStatus = DocStatus;
3521
+ exports.DocUpload = DocUpload;
3522
+ exports.ExpenseEntryTable = ExpenseEntryTable;
3523
+ exports.FORM_TYPE_LABELS = FORM_TYPE_LABELS;
3524
+ exports.INSIGHTS = INSIGHTS;
3525
+ exports.IcBolt = IcBolt;
3526
+ exports.IcBox = IcBox;
3527
+ exports.IcCalendar = IcCalendar;
3528
+ exports.IcChevR = IcChevR;
3529
+ exports.IcFlame = IcFlame;
3530
+ exports.IcInfo = IcInfo;
3531
+ exports.IcInvoice = IcInvoice;
3532
+ exports.IcSearch = IcSearch;
3533
+ exports.IcTarget = IcTarget;
3534
+ exports.IcWarning = IcWarning;
3535
+ exports.InvoicePreview = InvoicePreview;
3536
+ exports.ItemEntryTable = ItemEntryTable;
3537
+ exports.SLASH_COMMANDS = SLASH_COMMANDS;
3538
+ exports.SUGGEST_TILES = SUGGEST_TILES;
3539
+ exports.SparkMark = SparkMark;
3540
+ exports.SparkSvg = SparkSvg;
3541
+ exports.formatDuration = formatDuration;
3542
+ exports.formatTokens = formatTokens;
3543
+ exports.getFileCategory = getFileCategory;
3544
+ exports.getGreeting = getGreeting;
3545
+ exports.getTime = getTime;
3546
+ //# sourceMappingURL=chat-bot-xy9T4Jt4.js.map