@zeniai/web-app-ui 5.3.32-qa → 5.3.33-dev

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 (156) hide show
  1. package/dist/assets/AccountMappingScreen-DDC4e1RD.js +9 -0
  2. package/dist/assets/AddressRoutes-zzmrmZ16.js +1 -0
  3. package/dist/assets/AddressScreen-BtP59nWf.js +9 -0
  4. package/dist/assets/AiCfoScreen-0WwVR_RT.js +22 -0
  5. package/dist/assets/AppDrawer-C7u6yO5k.js +10 -0
  6. package/dist/assets/{BillPayApprovalRoutes-B-dRM1ET.js → BillPayApprovalRoutes-B12E_S91.js} +1 -1
  7. package/dist/assets/{BillPayRoutes-Bw7Zsd_q.js → BillPayRoutes-D3YiGZXB.js} +18 -18
  8. package/dist/assets/{BusinessVerificationPageScreen-BpB36lD4.js → BusinessVerificationPageScreen-Bh5Bjz_t.js} +2 -2
  9. package/dist/assets/CardsAiCfoScreen-StazhLCy.js +14 -0
  10. package/dist/assets/{ChargeCardRoutes-BN5gmMDY.js → ChargeCardRoutes-BpwgRJW2.js} +1 -1
  11. package/dist/assets/{CompanyPassportScreen-BgOKbeIV.js → CompanyPassportScreen-1B8KqxCX.js} +1 -1
  12. package/dist/assets/ConnectionAuthScreen-_WPAiqQD.js +11 -0
  13. package/dist/assets/CustomerOnboardingAuthScreen-B2-KkeTM.js +1 -0
  14. package/dist/assets/CustomerOnboardingRoutes-eoKq-jK4.js +30 -0
  15. package/dist/assets/{DashboardRoutes-C--0vzwA.js → DashboardRoutes-CKdZegGm.js} +4 -4
  16. package/dist/assets/DefaultTenantHome-CvzwpBoC.js +1 -0
  17. package/dist/assets/DomesticWireDetailScreen-BOxoSeoJ.js +18 -0
  18. package/dist/assets/DrawerScreen-Cvypy_pu.js +1 -0
  19. package/dist/assets/EntityDetailRoutes-BLeAjK3e.js +1 -0
  20. package/dist/assets/ExpenseAutomationRoutes-t_w4KaUv.js +38 -0
  21. package/dist/assets/FeaturePreviewScreen-KgN7vGcF.js +1 -0
  22. package/dist/assets/HubSpotOAuthCallbackScreen-Bj9Wgjht.js +1 -0
  23. package/dist/assets/InboxNotificationsProvider-B-NFQuyv.js +1 -0
  24. package/dist/assets/InvoicingRoutes-DD8ii9Jo.js +2 -0
  25. package/dist/assets/{MagicLinkRoutes-B3OI8_Y8.js → MagicLinkRoutes-B5onTuVg.js} +7 -7
  26. package/dist/assets/MagicLinkSignInScreen-Z_KEEjY_.js +12 -0
  27. package/dist/assets/MobileAppDrawer-PtjV_ofL.js +1 -0
  28. package/dist/assets/NotFoundScreen-BYb00fRD.js +1 -0
  29. package/dist/assets/NotificationRoutes-Ct_RdrSm.js +1 -0
  30. package/dist/assets/OAuthConsentScreen-Cp21VEUM.js +1 -0
  31. package/dist/assets/PandLWithForecastRoutes-B8aCeyQm.js +1 -0
  32. package/dist/assets/{PaymentLinkScreen-oiuP5YE8.js → PaymentLinkScreen-Dom-ZdiQ.js} +6 -6
  33. package/dist/assets/PeopleRoutes-CMQ5JoaT.js +22 -0
  34. package/dist/assets/PerformanceRoutes-BaFYyetl.js +1 -0
  35. package/dist/assets/{Preview-C7FOgz3Q.js → Preview-BUFd_sPW.js} +1 -1
  36. package/dist/assets/{QBOConnectionScreen-CiKgrKX6.js → QBOConnectionScreen-DLKvgPCe.js} +23 -23
  37. package/dist/assets/ReimbursementApprovalRoutes-yZ6qt8vR.js +1 -0
  38. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-D7_1V-ZV.js → ReimbursementApprovalRuleDetailScreen-PjSqLE3K.js} +1 -1
  39. package/dist/assets/{ReimbursementRoutes-CfqcRhl_.js → ReimbursementRoutes-BHhFNphA.js} +9 -9
  40. package/dist/assets/ReportsRoutes-DwjpNsBH.js +1 -0
  41. package/dist/assets/RewardsRoutes-D1qLb1Hr.js +1 -0
  42. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-BXydpQNl.js +25 -0
  43. package/dist/assets/ScreenRoutes-C2Pczg6X.js +2 -0
  44. package/dist/assets/{SettingsRoutes-C_BHKgxc.js → SettingsRoutes-DNifcLKF.js} +6 -6
  45. package/dist/assets/{SetupPagesScreen-CZfthydR.js → SetupPagesScreen-DxyeAl-N.js} +5 -5
  46. package/dist/assets/SignInScreen-xjjVbfK1.js +1 -0
  47. package/dist/assets/SignOutScreen-z53qiWi7.js +9 -0
  48. package/dist/assets/{TaskListScreen-vihEMCMo.js → TaskListScreen-B_OtLRex.js} +2 -2
  49. package/dist/assets/TaskRoutes-CwGUiyuW.js +9 -0
  50. package/dist/assets/TransactionDetailRoutes-Dlicv1YU.js +1 -0
  51. package/dist/assets/{TransactionDetailScreen-dG3SEGK8.js → TransactionDetailScreen-C21UfodB.js} +2 -2
  52. package/dist/assets/TransactionListRoutes-c14Zp_GU.js +1 -0
  53. package/dist/assets/TreasuryRoutes-BOUBbZba.js +37 -0
  54. package/dist/assets/VendorsRoutes-DQPJ2ahX.js +88 -0
  55. package/dist/assets/WiseConfirmationScreen-BgAYLRbZ.js +12 -0
  56. package/dist/assets/{ZeniAccountRoutes-C9gyx-Lb.js → ZeniAccountRoutes-Cm5PZOYy.js} +10 -10
  57. package/dist/assets/ZeniAccountStatementScreen-C-8gKp6H.js +9 -0
  58. package/dist/assets/{accountMappingHelper-DOs7iAIL.js → accountMappingHelper-C_PJMCg9.js} +1 -1
  59. package/dist/assets/{analytics-DZ6cwnOO.js → analytics-elDziMbO.js} +1 -1
  60. package/dist/assets/{analyticsHelper-D6TeBlJQ.js → analyticsHelper-vLClPvL0.js} +1 -1
  61. package/dist/assets/{core-BL7rYGUF.js → core-DF6XZR6t.js} +1 -1
  62. package/dist/assets/{decodeURIComponentSafe-B4a7LpJx.js → decodeURIComponentSafe-DjR1JOrN.js} +1 -1
  63. package/dist/assets/{dnd-BsiKGZTJ.js → dnd-Cjk62kit.js} +1 -1
  64. package/dist/assets/{empty-SbPe4M90.js → empty-BFMGUQ5p.js} +1 -1
  65. package/dist/assets/{empty-qvcbLK7S.js → empty-Blp6QSRg.js} +1 -1
  66. package/dist/assets/{emptyVideoElement-BMPAb-cr.js → emptyVideoElement-BxiyyOIX.js} +1 -1
  67. package/dist/assets/{epic-Bt3rVBX8.js → epic-CjuOPpmP.js} +2 -2
  68. package/dist/assets/{expenseAutomationHelper-DfYMglD1.js → expenseAutomationHelper-DtYcu9lZ.js} +1 -1
  69. package/dist/assets/getLocaleForTenant-BghPhTTn.js +1 -0
  70. package/dist/assets/{index-CPdgrrgU.js → index-73l2EN6L.js} +1 -1
  71. package/dist/assets/{index-BRAI-aTk.js → index-BJMpQHkg.js} +1 -1
  72. package/dist/assets/{index-DLTi5gVy.js → index-BN3P-M0E.js} +1 -1
  73. package/dist/assets/{index-BtCYCCEX.js → index-CGw0d03E.js} +1 -1
  74. package/dist/assets/{index-te7nCILo.js → index-Cm1WGUI8.js} +1 -1
  75. package/dist/assets/{index-E1NwyJIP.js → index-DDlsb2Pe.js} +12665 -12665
  76. package/dist/assets/{index-B_AHleOS.js → index-DV9ITGuT.js} +2 -2
  77. package/dist/assets/{index-C4WC13bA.js → index-DvD4ADMb.js} +1 -1
  78. package/dist/assets/{lexical-BSRawlvX.js → lexical-CSD0azk6.js} +1 -1
  79. package/dist/assets/{liveblocks-BeSMR7a1.js → liveblocks-D4WYBu5d.js} +1 -1
  80. package/dist/assets/{lottie-joMwFamf.js → lottie-BmpBYIvu.js} +1 -1
  81. package/dist/assets/{mui-CPSuUssr.js → mui-B4yW9pH-.js} +1 -1
  82. package/dist/assets/{pathToGoBack-rem3sHLx.js → pathToGoBack-D8-KE8Du.js} +1 -1
  83. package/dist/assets/{pdf-CcTg_U5O.js → pdf-CGyqZzIC.js} +4 -4
  84. package/dist/assets/{pdf-lib-Cu5wZc2A.js → pdf-lib-Dh61rZh4.js} +1 -1
  85. package/dist/assets/{plaid-DMXel13h.js → plaid-D38FQUk-.js} +1 -1
  86. package/dist/assets/{pusher-IEbMI61m.js → pusher-CqUxDVhu.js} +1 -1
  87. package/dist/assets/{react-34F3zNgD.js → react-BMMd1waU.js} +1 -1
  88. package/dist/assets/{react-B6LrhCL-.js → react-BMRcwifd.js} +1 -1
  89. package/dist/assets/{react-D5rCBPHe.js → react-CIXsO3WM.js} +1 -1
  90. package/dist/assets/{react-p4SZ9iHE.js → react-DhQUnxri.js} +1 -1
  91. package/dist/assets/{react-Cyo5bdBF.js → react-DuBQLZ-9.js} +1 -1
  92. package/dist/assets/{react-BtgwZRYq.js → react-Uo80T9aY.js} +1 -1
  93. package/dist/assets/{recharts-BP8J0UHA.js → recharts-BiczA0FA.js} +1 -1
  94. package/dist/assets/routePaths-DGP8B7_s.js +1 -0
  95. package/dist/assets/{sentry-Uj7AWjah.js → sentry-xA0rcm0B.js} +1 -1
  96. package/dist/assets/{url-Cc0feVFM.js → url-D7Tfrndr.js} +1 -1
  97. package/dist/assets/{url-CnKkchc3.js → url-teROgVHf.js} +1 -1
  98. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-p6fhiYGJ.js +1 -0
  99. package/dist/assets/useAskAiCfoHostNavButtonProps-d04WxUMr.js +1 -0
  100. package/dist/assets/useChargeCardPusherEvents-EdGQYrNX.js +1 -0
  101. package/dist/assets/{useDeviceId-CR3YwHzW.js → useDeviceId-CIwJhP5U.js} +1 -1
  102. package/dist/assets/useEmailConnectResultRefresh-DkeO72N3.js +1 -0
  103. package/dist/assets/useInitialThreadRequest-BCZ9SXeA.js +1 -0
  104. package/dist/assets/{useTaskManagerAccess-BVyRgvZH.js → useTaskManagerAccess-GgG1qznV.js} +1 -1
  105. package/dist/assets/{utils-Dn95OB7n.js → utils-Tr_0gxNT.js} +1 -1
  106. package/dist/assets/withTransactionSidePanel-DKKp2Btj.js +25 -0
  107. package/dist/assets/{zeni-epic-state-CxdZGPla.js → zeni-epic-state-C1PKBe4c.js} +5 -5
  108. package/dist/index.html +1 -1
  109. package/package.json +4 -4
  110. package/dist/assets/AccountMappingScreen-Cv_JISNl.js +0 -9
  111. package/dist/assets/AddressRoutes-D1wfXuM-.js +0 -1
  112. package/dist/assets/AddressScreen-DKIOTZOx.js +0 -9
  113. package/dist/assets/AiCfoScreen-BbhOSIw9.js +0 -22
  114. package/dist/assets/AppDrawer-DyJQZA6-.js +0 -10
  115. package/dist/assets/CardsAiCfoScreen-ZXvSY5tv.js +0 -14
  116. package/dist/assets/ConnectionAuthScreen-DXPq3qhF.js +0 -11
  117. package/dist/assets/CustomerOnboardingAuthScreen-C1BQROr2.js +0 -1
  118. package/dist/assets/CustomerOnboardingRoutes-BbMnpjPH.js +0 -30
  119. package/dist/assets/DefaultTenantHome-gR6Y3pYc.js +0 -1
  120. package/dist/assets/DomesticWireDetailScreen-B6SysKxJ.js +0 -18
  121. package/dist/assets/DrawerScreen-BUtXmCMv.js +0 -1
  122. package/dist/assets/EntityDetailRoutes-BJRFJx06.js +0 -1
  123. package/dist/assets/ExpenseAutomationRoutes-8h-9Hyes.js +0 -25
  124. package/dist/assets/FeaturePreviewScreen-07vQ7ieK.js +0 -1
  125. package/dist/assets/HubSpotOAuthCallbackScreen-B6PLbaf4.js +0 -1
  126. package/dist/assets/InboxNotificationsProvider-BH2D62uC.js +0 -1
  127. package/dist/assets/InvoicingRoutes-C2RjAxZA.js +0 -2
  128. package/dist/assets/MagicLinkSignInScreen-Y0R0oylb.js +0 -12
  129. package/dist/assets/MobileAppDrawer-CjyikhYJ.js +0 -1
  130. package/dist/assets/NotFoundScreen-C2tiSpQ7.js +0 -1
  131. package/dist/assets/NotificationRoutes-CFog6J5Q.js +0 -1
  132. package/dist/assets/OAuthConsentScreen-g72Ugnk9.js +0 -1
  133. package/dist/assets/PandLWithForecastRoutes-CMaqNXj1.js +0 -1
  134. package/dist/assets/PeopleRoutes-sgSiMpSO.js +0 -22
  135. package/dist/assets/PerformanceRoutes-CjfeH4u4.js +0 -1
  136. package/dist/assets/ReimbursementApprovalRoutes-LWePNTvC.js +0 -1
  137. package/dist/assets/ReportsRoutes-uMoEApCu.js +0 -1
  138. package/dist/assets/RewardsRoutes-CCLIDX41.js +0 -1
  139. package/dist/assets/ScreenRoutes-T2NqNjGF.js +0 -2
  140. package/dist/assets/SignInScreen-Ch6DTnK6.js +0 -1
  141. package/dist/assets/SignOutScreen-CfAh7qk3.js +0 -9
  142. package/dist/assets/TaskRoutes-DO-tMTQu.js +0 -9
  143. package/dist/assets/TransactionDetailRoutes-zmryAi6y.js +0 -1
  144. package/dist/assets/TransactionListRoutes-D_3U5FSp.js +0 -1
  145. package/dist/assets/TreasuryRoutes-XotmNx9W.js +0 -37
  146. package/dist/assets/VendorsRoutes-DCuo1D8L.js +0 -112
  147. package/dist/assets/WiseConfirmationScreen-D3ybpk8W.js +0 -12
  148. package/dist/assets/ZeniAccountStatementScreen-4u5gSdu6.js +0 -9
  149. package/dist/assets/getLocaleForTenant-akYNGA2f.js +0 -1
  150. package/dist/assets/routePaths-Cf2E-_nR.js +0 -1
  151. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DABf-MX6.js +0 -1
  152. package/dist/assets/useAskAiCfoHostNavButtonProps-CC7G-KyB.js +0 -1
  153. package/dist/assets/useChargeCardPusherEvents-DJOucGr5.js +0 -1
  154. package/dist/assets/useEmailConnectResultRefresh-DDRUKxe2.js +0 -1
  155. package/dist/assets/useInitialThreadRequest-DifgMaO6.js +0 -1
  156. package/dist/assets/withTransactionSidePanel-CPfQcd4u.js +0 -25
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-E1NwyJIP.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-Uj7AWjah.js"><link rel="modulepreload" crossorigin href="/assets/core-BL7rYGUF.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-CxdZGPla.js"><link rel="modulepreload" crossorigin href="/assets/mui-CPSuUssr.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DZ6cwnOO.js"><link rel="modulepreload" crossorigin href="/assets/utils-Dn95OB7n.js"><link rel="stylesheet" crossorigin href="/assets/index-BhC2LNQw.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-DDlsb2Pe.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-xA0rcm0B.js"><link rel="modulepreload" crossorigin href="/assets/core-DF6XZR6t.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-C1PKBe4c.js"><link rel="modulepreload" crossorigin href="/assets/mui-B4yW9pH-.js"><link rel="modulepreload" crossorigin href="/assets/analytics-elDziMbO.js"><link rel="modulepreload" crossorigin href="/assets/utils-Tr_0gxNT.js"><link rel="stylesheet" crossorigin href="/assets/index-BhC2LNQw.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-app-ui",
3
- "version": "5.3.32-qa",
3
+ "version": "5.3.33-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -28,9 +28,9 @@
28
28
  "@sentry/core": "^9.42.1",
29
29
  "@sentry/react": "^9.42.1",
30
30
  "@stripe/stripe-js": "^4.4.0",
31
- "@zeniai/client-analytics": "2.0.88",
32
- "@zeniai/client-epic-state": "5.2.36",
33
- "@zeniai/web-components": "4.3.68",
31
+ "@zeniai/client-analytics": "2.0.87",
32
+ "@zeniai/client-epic-state": "5.2.35",
33
+ "@zeniai/web-components": "4.3.69",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1,9 +0,0 @@
1
- import{j as U}from"./liveblocks-BeSMR7a1.js";import{a as o}from"./sentry-Uj7AWjah.js";import{h as W,g as H,u as K,j as m,s as R,l as Y}from"./core-BL7rYGUF.js";import{ag as Z,O as ee,y as q,z as te,l as G,ah as ne,h as ae,N as ce}from"./index-E1NwyJIP.js";import{bn as se,fB as oe,gS as ie,ox as X,TT as le,i5 as J,gd as re,oo as ue,TU as de,TV as pe,tx as ge,lX as me,om as be,oi as Ae,ot as fe,i7 as ye,TW as Ie,TX as Se}from"./zeni-epic-state-CxdZGPla.js";import{n as he}from"./mui-CPSuUssr.js";import{M as Ee}from"./MobileAppDrawer-CjyikhYJ.js";import{q as $}from"./QBOConnectionScreen-CiKgrKX6.js";import{g as h,a as E,m as ze}from"./accountMappingHelper-DOs7iAIL.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="7d8da5d4-feb0-47ba-a525-9b6c02ef6be0",a._sentryDebugIdIdentifier="sentry-dbid-7d8da5d4-feb0-47ba-a525-9b6c02ef6be0")}catch{}})();const r="zeni_pending_projects_enable",u={pending:"pending",ready:"ready"},xe=he.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${a=>a.theme.colors.grey4};
9
- `,ve=Y((function(a,e){return{accountMappingView:e.accountMappingView,isFiling1099FeatureEnabled:e.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:e.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:me(a),isAccountingClassesUpdateInProgress:a.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:ge(a),isAccountingProjectsUpdateInProgress:(()=>{const i=sessionStorage.getItem(r),c=i===u.pending||i===u.ready;return a.companyViewState.passportView?.accountingProjectsUpdateStatus?.fetchState==="In-Progress"||c})(),isCapitalizationFeatureEnabled:e.isCapitalizationFeatureEnabled,capitalizableAccounts:e.capitalizableAccounts,accountNamesById:e.accountNamesById,capitalizableAccountOverrides:e.capitalizableAccountOverrides,isCapitalizationThresholdSaving:e.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:e.onSaveCapitalizationAccountThreshold}}),(function(a,e){const{navigate:i,location:c,isFiling1099FeatureEnabled:b}=e;return{onAccountMappingChange:l=>{const{uncategorizedAccountSection:d,billsAccountSection:z,reimbursementsAccountSection:x,vendorsAccountSection:v,filing1099Section:w}=l,{incomeAccount:C,expenseAccount:T}=d,{billPayAccount:s}=z,{reimbursementsAccount:F}=x,{prepaidExpensesAccount:p,fixedAssetsAccount:V,accruedExpensesAccount:O}=v,{bankAccount:M,expenseCategory1099:P}=w,A=h(e.accountMappingView.incomeAccountList,C.selectedOption),_=h(e.accountMappingView.expenseAccountList,T.selectedOption),f=h(e.accountMappingView.billPayAccountList,s.selectedOption),j=h(e.accountMappingView.reimbursementsAccountList,F.selectedOption),k=E(e.accountMappingView.prepaidExpensesAccountList,p.selectedOptions),D=E(e.accountMappingView.fixedAssetsAccountList,V.selectedOptions),y=E(e.accountMappingView.accruedExpensesAccountList,O.selectedOptions),L=E(e.accountMappingView.bankAccounts1099FilingAccountList,M.selectedOptions),I=ze(e.accountMappingView.expenseAccounts1099FilingAccountList,P),t={selectedIncomeAccountId:A?.accountId,selectedExpenseAccountId:_?.accountId,selectedBillPayAccountId:f?.accountId,selectedReimbursementsAccountId:j?.accountId,selectedPrepaidExpensesAccountIds:k.map((n=>n.accountId)),selectedFixedAssetsAccountIds:D.map((n=>n.accountId)),selectedAccruedExpensesAccountIds:y.map((n=>n.accountId)),selectedBankAccounts1099FilingAccountIds:L.map((n=>n.accountId)),selectedExpenseAccounts1099FilingAccountIds:I};a(Se({data:t}))},onBackClick:()=>{G(c)===!1?(i("../../dashboard"),a(Ie())):a(J())},onSaveClick:()=>{a(ye()),b&&ae.track(ce.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:l=>{a(fe(e.currentTenant.companyId,l))},onAccountingProjectsToggle:l=>{const d=sessionStorage.getItem(r);d===u.pending||d===u.ready||a(l?be(e.currentTenant.companyId):Ae(e.currentTenant.companyId))}}}))(ne),je=()=>{const a=Z(),e=W(),i=H(),c=K(),{useFeatureGate:b,useDynamicConfig:l}=ee(),{isFeatureEnabled:d}=b(q.isFiling1099FeatureEnabled),{isFeatureEnabled:z}=b(q.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:x,isDynamicConfigLoading:v}=l("transaction_categorization_config"),w=!v&&x?.capitalization_enabled===!0,C=te.getSignedInUser(),T=se(C),s=m((t=>oe(t))),{capitalizableAccounts:F,capitalizableAccountOverrides:p,isCapitalizationThresholdSaving:V,currencySymbol:O}=m((t=>{const n=t.tenantState.currentTenantId,g=n!=null?t.tenantState.tenantsById[n]:void 0,S=ie(t.companyState,s.companyId);return{capitalizableAccounts:g?.capitalizableAccounts??null,capitalizableAccountOverrides:g?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:t.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:S?.company.companyLocaleInfo?.currencySymbol??"$"}}),R),M=o.useCallback(((t,n)=>{c(X(s.companyId,t,n))}),[c,s.companyId]),P=o.useCallback((t=>{const n={...p??{}},g=Object.entries(t);for(const[B,N]of g)N===null?delete n[B]:n[B]=N;const[S,Q]=g[0]??[];S!=null&&c(X(s.companyId,S,Q,void 0,Object.keys(n).length>0?n:null))}),[c,s.companyId,p]),A=m((t=>le(t.accountState)),R),_=o.useMemo((()=>{const t={};for(const n of A)n.accountId!=null&&n.accountName!=null&&(t[n.accountId]=n.accountName);return t}),[A]),[f,j]=o.useState(!1),[k,D]=o.useState(!1);o.useEffect((()=>{f===!1&&(c(J()),j(!0))}),[f]);const y=m((t=>t.companyViewState.passportView?.needsQboProjectsReconnect===!0));o.useEffect((()=>{sessionStorage.getItem(r)===u.pending&&(sessionStorage.removeItem(r),c(re({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})))}),[c]),o.useEffect((()=>{sessionStorage.getItem(r)===u.ready&&s?.companyId!=null&&(sessionStorage.removeItem(r),c(ue(s.companyId)))}),[s?.companyId,c]),o.useEffect((()=>{y&&s?.tenantEmailDomain!=null&&(sessionStorage.setItem(r,u.pending),c(de()),$.init("/connection/auth",s.tenantEmailDomain),$.handleClick())}),[y,s?.tenantEmailDomain,c]);const L=m((t=>pe(t))),I=t=>{D(t)};return U.jsxs(xe,{children:[U.jsx(Ee,{isAppContentDrawerOpen:k,handleDrawerToggle:I}),U.jsx(ve,{currentTenant:s,navigate:e,meetingUrl:a("account_mapping"),accountMappingView:L,isFiling1099FeatureEnabled:d&&T,isAccruedExpensesFeatureEnabled:z,isCapitalizationFeatureEnabled:w,capitalizableAccounts:F,accountNamesById:_,capitalizableAccountOverrides:p,currencySymbol:O,isCapitalizationThresholdSaving:V,onSaveCapitalizationAccountThreshold:M,onSaveCapitalizationAccountThresholds:P,location:i,isSettings:G(i),onClickMenuIcon:()=>I(!0)})]})};export{r as P,je as U,u as a};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-BeSMR7a1.js";import{A as o}from"./AddressScreen-DKIOTZOx.js";import i from"./NotFoundScreen-C2tiSpQ7.js";import"./sentry-Uj7AWjah.js";import{n as s,o as r}from"./core-BL7rYGUF.js";import"./zeni-epic-state-CxdZGPla.js";import"./recharts-BP8J0UHA.js";import"./index-E1NwyJIP.js";import"./mui-CPSuUssr.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="31d0e0e8-dcf1-419d-b2be-6dc359df28c9",t._sentryDebugIdIdentifier="sentry-dbid-31d0e0e8-dcf1-419d-b2be-6dc359df28c9")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(o,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(o,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-BeSMR7a1.js";import{a as h}from"./sentry-Uj7AWjah.js";import{h as T,u as P,g as j,i as E,j as B,l as D}from"./core-BL7rYGUF.js";import{$,E as M,z as U,V as L,a5 as K,a6 as z,h as C,N as S,a1 as N,T as b,a2 as R}from"./index-E1NwyJIP.js";import{Uy as _,il as V,fB as F,Uz as G,c7 as O,UA as q,mD as H}from"./zeni-epic-state-CxdZGPla.js";import{n as J}from"./mui-CPSuUssr.js";import Q from"./NotFoundScreen-C2tiSpQ7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="3fa510e1-d7dc-49b2-9370-b1d1333fc69d",e._sentryDebugIdIdentifier="sentry-dbid-3fa510e1-d7dc-49b2-9370-b1d1333fc69d")}catch{}})();const W=J.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,X=D((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=F(e),a=s.roleMap!=null&&G(s.roleMap),d=i||c==="user_address"||O(l?.userRole??[])||a?void 0:"readonly";if(o==null){const t=q(c,e);return{addressToEdit:t?.addressToCreate,loadingState:t?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const r=_(e,o);return{addressToEdit:r.address,loadingState:r.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,r=R(d?.pathnameStackToGoBack);let t=r.poppedPathname??v();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(t=`${t}?${g}`)}o(t,{state:{pathnameStackToGoBack:r.newStack}})}};return{onSubmitHandler:a=>{const d=Y(a);e(H({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(N);function ne({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),d=P(),r=j(),{addressId:t,addressType:u}=E(),g=$(),I=M(),k=U.getSignedInUser(),[f,w]=h.useState(t==null),p=B((m=>t!=null?_(m,t).fetchState:"Not-Started")),A=L();if(k==null)throw Error("Can't access address page without signing in...");const x=m=>m.trackPageLoaded(t!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect((()=>{f||t==null||(w(!0),d(V(t,!1)))}),[f,t,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address|invoicing_customer_billing_address|invoicing_subscription_shipping_address|invoicing_business_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?n.jsx(K,{fetchState:p,style:{backgroundColor:I.colors.grey5}}):t!=null&&p==="Error"?(a(`${v(1)}/new`,{replace:!0}),n.jsx(n.Fragment,{})):n.jsxs(n.Fragment,{children:[n.jsx(z,{analytics:C,onLoad:x}),n.jsx(W,{windowSize:g,children:n.jsx(X,{location:r,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:t,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):n.jsx(Q,{})}const v=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{ne as A,Y as t};
@@ -1,22 +0,0 @@
1
- import{j as m}from"./liveblocks-BeSMR7a1.js";import{a as l}from"./sentry-Uj7AWjah.js";import{u as Ue,h as Le,g as Fe,j as _,i as Be,l as Re}from"./core-BL7rYGUF.js";import{a as Ve,e2 as Me,z as $e,$ as Ne,e3 as qe,e4 as Ge,bm as le,e5 as he,e6 as He,bl as ge,a2 as H,a6 as $,h as x,e7 as N,e8 as ze,e9 as We,as as Je,N as Ke,w as Xe,ea as Ye,eb as Ze,at as et,ec as tt,ed as st,ee as at,ef as ot,p as nt,bi as re,eg as it}from"./index-E1NwyJIP.js";import{fA as z,gp as E,gx as W,Tq as lt,gr as J,gH as rt,fB as dt,j0 as ct,a1k as ut,g4 as mt,je as pt,ja as St,fC as q,gb as ht,a1l as gt,a1m as ft,a1n as Ct,jP as G,gq as kt,gk as de,k0 as ce,gm as ue,gs as It,a1o as me,jR as bt,j7 as vt,jl as Et,jN as pe,ji as Pt,jo as wt,gt as xt,gu as yt,gv as Tt,gw as At}from"./zeni-epic-state-CxdZGPla.js";import{D as Qt,n as y,S as jt,P as Ot}from"./mui-CPSuUssr.js";import{u as _t}from"./useAiCfoDashboardSuggestedQuestionsChips-DABf-MX6.js";import{p as Dt}from"./pathToGoBack-rem3sHLx.js";import"./recharts-BP8J0UHA.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="8eb2a734-cd67-46b6-b69a-5418237b214d",e._sentryDebugIdIdentifier="sentry-dbid-8eb2a734-cd67-46b6-b69a-5418237b214d")}catch{}})();const fe="chat-response-generated";function Ut(e,o){if(o.kind!=="save")return;if(o.fetchState==="In-Progress")return{status:"saving"};if(o.fetchState==="Error")return{status:"failed"};if(o.fetchState!=="Completed")return;const s=E(e).skills.find((p=>p.macroId===o.savedMacroId));return s==null?void 0:{status:"saved",command:s.name}}const Lt=Re((function(e,o){const s=z(e),p=o.isSubmitting,n=s.uiState?.currentChatSessionId,S=n!=null?ht(e.aiCfoState,n):[],c=Ze(e,{allUsers:o.allUsers,onCardPolicyVendorSearchTextChange:o.onCardPolicyVendorSearchTextChange}),C=gt(e),g=ft(e),P=Ct(e);return{showSampleQuestions:o.sessionFromUrl==="explore"&&s.uiState.currentChatSessionId==null,aiCfoView:s,isSubmitting:p,isNewChatSession:o.sessionFromUrl==="new_chat"||o.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${et}/tableDownload`,exportDownloadEndPoint:at(),emailLinkQuestion:o.emailLinkQuestion,autoSubmitEmailLinkQuestion:o.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:o.onEmailLinkQuestionProcessed,routedInitialQuestionSource:o.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:o.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:o.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:o.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:o.isFileUploadEnabled,isUploadPromoVisible:o.isUploadPromoVisible,onUploadPromoClose:o.onUploadPromoClose,skills:E(e).skills,skillSaveState:Ut(e,P),skillsEnabled:E(e).skillsEnabled,skillsList:E(e).skills,skillsListError:E(e).fetchState==="Error",skillsListLoading:E(e).fetchState==="In-Progress",skillsCanPublish:E(e).canPublish,skillSaving:P.fetchState==="In-Progress",skillSaveError:P.fetchState==="Error",skillVersionHistory:C.macroId!=null?{macroId:C.macroId,versions:C.versions,error:C.fetchState==="Error",loading:C.fetchState==="In-Progress"}:void 0,skillRestoreBody:g.macroId!=null&&g.version!=null?{macroId:g.macroId,version:g.version,instructions:g.instructions,error:g.fetchState==="Error",loading:g.fetchState==="In-Progress"}:void 0,skillDetail:G(e).detail,skillDetailError:G(e).fetchState==="Error",skillDetailLoading:G(e).fetchState==="In-Progress",syntheticAnswers:S,resolveSyntheticAnswerCardTile:st(e),resolveSyntheticAnswerPolicyTile:tt(e),...c}}),(function(e,o){const{location:s,currentTenant:p,userId:n,navigate:S,currentChatSessionId:c,allSessionsWithOrderedQuestionAnswers:C,isAiCardCreationEnabled:g,isCardPolicyEnabled:P,setIsAiCfoOpen:w}=o,T=p.tenantEmailDomain;return{onEventReceived:(t,a)=>{if(t===fe&&typeof a.text=="string"&&typeof a.metadata=="object"){const d=a,u=xt(d.type),h=d.metadata.chat_session_id??null,{currentChatSession:k,currentQuestionAnswer:A,currentQuestionAnswerSummary:b}=ge(C,h);u!=="answer"?x.trackAICFOChatResponseGenerated(u,A?.question.questionText??"",d.text,h,it(b,k),d.metadata.message_id??null):x.trackAICFOChatAnswerGenerated(d.text,A?.question.questionText??"",(d.follow_up_questions?.length??0)>0,!!d.assumptions,!!d.insights,d.visualization!=null,yt(d.visualization?.type??"")??null,h,d.summarized_title,d.metadata.message_id??null),e(Tt({chatSessionId:d.metadata.chat_session_id,responseType:u,fetchState:{fetchState:"Completed",error:void 0}})),e(At({chatSessionId:d.metadata.chat_session_id,answerPayload:d,userId:n}))}},onSubmit:(t,a,d,u,h)=>{t&&re(e,t,a,c,C,n,u,d,void 0,h)},onFetchSkills:()=>{e(W())},onOpenSkill:t=>{e(Pt({macroId:t})),e(wt({macroId:t}))},onSaveSkill:(t,a)=>{e(pe({draft:t,macroId:a}))},onSaveSkillDraft:t=>{const a=t.displayName?.trim()??"",d=t.name?.trim()??"";e(pe({draft:{name:a.length>0?a:d,description:t.description?.trim()??null,instructions:t.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(t,a)=>{e(Et({macroId:t,version:a}))},onDeleteSkill:t=>{e(vt({macroId:t}))},onSetSkillVisibility:(t,a)=>{e(bt({macroId:t,visibility:a}))},onCloseSkillDetail:()=>{e(me())},onRunSkill:(t,a)=>{e(J()),e(de()),re(e,a,"user_input",void 0,C,n,void 0,void 0,void 0,t),e(me())},updateCurrentInput:t=>{e(ue(t))},onStopSubmit:()=>{},onUpdateScrollYOffset:t=>{e(It(t))},onSelectSampleQuestion:()=>{},onBackClick:()=>{S(-1)},onCloseClick:()=>{const t=H(s.state?.pathnameStackToGoBack),a=t.poppedPathname??Dt(1);S(a,{state:{...s.state,pathnameStackToGoBack:t.newStack}}),e(ue(""))},togglePageView:()=>{const t=H(s.state?.pathnameStackToGoBack),a=t.poppedPathname??`/${p.tenantEmailDomain}/dashboard`;S(a,{state:{...he(s.state),pathnameStackToGoBack:t.newStack,message:"open_ai_cfo_drawer"}}),w(!0)},onCopy:()=>{},onThumbsUp:(t,a)=>{c!=null&&a?.messageId!=null&&e(ce(c,a.messageId,"positive",a.questionText,a.answerText))},onThumbsDown:(t,a)=>{c!=null&&a?.messageId!=null&&e(ce(c,a.messageId,"negative",a.questionText,a.answerText))},onTogglePageView:()=>{S(-1)},onNewChatClick:()=>{e(J()),c!=null&&e(de());const t=nt(s.state?.pathnameStackToGoBack,s.pathname);S(`/${p.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:t.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(t,a)=>{e(kt({questionAnswerId:t,isCollapsed:a}))},onMenuClick:o.onMenuClick,...ot(e,{isAiCardCreationEnabled:g,isCardPolicyEnabled:P,currentChatSessionId:c,onAfterCardsCreationSubmit:()=>{w(!0),S(`/${T}/cards`,{state:{...s.state}})},onAfterCardPolicySubmit:()=>{w(!0),S(`/${T}/cards/policy`,{state:{...s.state}})}})}}))(Xe(Ye)),os=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:o}=Ve(),s=Ue(),p=Le(),n=Fe(),[S,c]=l.useState(!1),C=_((i=>z(i).uiState.isSkillsBrowserOpen===!0)),g=_((i=>E(i).skillsEnabled)),P=l.useCallback((()=>{s(W()),s(lt())}),[s]),w=l.useCallback((()=>{s(J())}),[s]);l.useEffect((()=>{s(W())}),[s]);const{allUsers:T,isAiCardCreationEnabled:t,isCardPolicyEnabled:a,onCardPolicyVendorSearchTextChange:d}=Me();l.useEffect((()=>{s(rt())}),[s]);const u=_((i=>z(i))),h=$e.getSignedInUser(),{session_id:k}=Be(),A=Ne(),b=Je(A),f=_((i=>dt(i))),r=u.uiState.currentChatSessionId,K=f.tenantEmailDomain,{handleUploadPromoClose:Ce,isUploadPromoVisible:ke}=qe({isFileUploadEnabled:e,tenantEmailDomain:K}),D=Ge({currentTenant:f,currentChatSessionId:r,aiCfoView:u,skillsEnabled:g,onCloseSkills:w,onOpenSkills:P}),{isSuggestedQuestionsLoading:Ie,suggestedPromptQuestions:be}=_t(),Q=n.state,j=Q?.aiCfoInitialQuestion,X=!!Q?.aiCfoShouldSubmit;l.useEffect((()=>{const i=n.state;if(i?.[le]!==!0)return;c(!0);const I={...i};delete I[le],p(n,{replace:!0,state:I})}),[n.pathname,n.search,n.state,p]);const[ve,U]=l.useState(null),[Ee,L]=l.useState(!1),[Pe,F]=l.useState(void 0),[we,B]=l.useState(void 0),Y=l.useRef(!1);l.useEffect((()=>{if(!Y.current&&j!=null&&j!==""){const i=n.state;U(j),L(X),F(i?.aiCfoInitialSubmissionSource!=null?i.aiCfoInitialSubmissionSource:void 0);const I=i?.aiCfoSuggestionIndex;B(typeof I=="number"?I:void 0),Y.current=!0}}),[j,X,n.state]);const xe=l.useCallback((()=>{U(null),L(!1),F(void 0),B(void 0),p(n.pathname,{replace:!0,state:he(n.state)})}),[n.pathname,n.state,p]),Z=l.useMemo((()=>new URLSearchParams(n.search)),[n.search]),ee=Z.get("ref")??Q?.aiCfoRef,R=Z.get("emailRefId")??Q?.aiCfoEmailRefId,te=l.useRef(!1);l.useEffect((()=>{te.current||ee!=="month-end-email"||R==null||r!=null||h==null||(s(ct("controller",h.userId,R,"MONTH_END_EMAIL")),te.current=!0)}),[ee,R,r,s,h]);const O=u.uiState.lastContextMessage;l.useEffect((()=>{O!=null&&O!==""&&r!=null&&(U(O),L(!0),F(void 0),B(void 0),s(ut()))}),[O,r,s]);const ye=f.masterTOSInfo,v=ye?.isMasterTOSAccepted??!1,{visitedSessions:se}=He(r),V=u.fetchState,M=u.uiState.chatSessionsNextPageToken.hasMore||!u.uiState.chatSessionsFirstPageFetched,ae=r!=null?u.fetchChatSessionHistoryByChatSessionId?.[r]?.fetchState??"Not-Started":"Not-Started",oe=r==null||(u.uiState.chatHistoryNextPageToken[r]?.hasMore??!0),ne=u.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Te}=ge(ne,r),Ae=Te.length===0;l.useEffect((()=>{v||b||p("../dashboard",{state:{...n.state,message:"open_ai_cfo_drawer"}})}),[v,b,p,n.state]);const Qe=l.useCallback((()=>{const i=H(n.state?.pathnameStackToGoBack),I=f.tenantEmailDomain;p(i.poppedPathname??(I!=null?`/${I}/dashboard`:".."),{state:{...n.state,pathnameStackToGoBack:i.newStack}})}),[f.tenantEmailDomain,n.state,p]);l.useEffect((()=>{r!=null&&k!==r&&p(`../ai-cfo/${r}`,{state:{...n.state}})}),[r,k]),l.useEffect((()=>{k!=null&&r==null&&k!=="new_chat"&&k!=="explore"&&s(mt({sessionId:k,agentId:"controller"}))}),[]);const je=l.useMemo((()=>({events:se.map((i=>`private-encrypted-chat-${i}.${fe}`)),eventCallback:(i,I,De)=>De.onEventReceived(i,I)})),[se]);l.useEffect((()=>{V!=="In-Progress"&&M&&s(pt())}),[V,M,s]),l.useEffect((()=>{r!=null&&ae!=="In-Progress"&&oe&&h!=null&&V==="Completed"&&!M&&s(St(r,h.userId))}),[ae,oe,r,h,s]);const ie=i=>i.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(h==null||k==null)throw Error("Can't access AI Controller page without signing in...");const Oe=r!=null&&u.responseStateByChatSessionId?.[r]?.answer?.fetchState==="In-Progress";if(!v&&b)return m.jsxs(Bt,{children:[m.jsx($,{analytics:x,onLoad:ie}),D.drawerElement,m.jsx(Rt,{children:m.jsx(Se,{children:m.jsx(N,{isTOSAccepted:!1,acceptMasterTOSState:u.masterTOSAcceptanceState,onCloseClick:Qe,onCompleteClick:()=>{f.userRoleId!=null&&s(q(f.userRoleId))}})})})]});const _e=m.jsxs(m.Fragment,{children:[S&&!v?m.jsx($,{analytics:x,onLoad:ie}):null,m.jsx(N,{isTOSAccepted:v,acceptMasterTOSState:u.masterTOSAcceptanceState,showHeader:!1,togglePageView:v?()=>c(!1):void 0,onCloseClick:()=>c(!1),onCompleteClick:()=>{v||f.userRoleId==null||s(q(f.userRoleId)),c(!1)}})]});return m.jsxs(m.Fragment,{children:[m.jsxs(Ft,{children:[m.jsx($,{analytics:x,onLoad:i=>i.trackPageLoaded(Ke.Event.aiCFOPage)}),b&&D.drawerElement,m.jsx(Lt,{...je,currentChatSessionId:r,allSessionsWithOrderedQuestionAnswers:ne,allUsers:T,isAiCardCreationEnabled:t,isCardPolicyEnabled:a,openOnboardingPage:()=>c(!0),userId:h.userId,setIsAiCfoOpen:o,navigate:p,sessionFromUrl:k,location:n,isSubmitting:Oe,isEmptyChatWithSession:Ae,currentTenant:f,emailLinkQuestion:ve??void 0,autoSubmitEmailLinkQuestion:Ee,onEmailLinkQuestionProcessed:xe,routedInitialQuestionSource:Pe,routedInitialQuestionSuggestionIndex:we,onCardPolicyVendorSearchTextChange:d,onMenuClick:b?D.open:void 0,isFileUploadEnabled:e,isUploadPromoVisible:ke,onUploadPromoClose:Ce,exploreSuggestedPromptQuestions:be,exploreSuggestedPromptQuestionsLoading:Ie,isSkillsOpen:C,isCreateSkillEnabled:g,promoDismissalScope:K}),S&&b?m.jsx(Qt,{anchor:"right",open:S,transitionDuration:250,PaperProps:{component:Vt,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>c(!1),children:m.jsx(Se,{onClick:i=>i.stopPropagation(),children:m.jsx(N,{isTOSAccepted:v,acceptMasterTOSState:u.masterTOSAcceptanceState,onCloseClick:()=>c(!1),onCompleteClick:()=>{v||f.userRoleId==null||s(q(f.userRoleId)),c(!1)}})})}):null]}),S&&!b?m.jsx(ze,{open:S,onClose:()=>c(!1),children:m.jsx(We,{children:_e})}):null]})},Se=y(jt)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Ft=y.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Bt=y.div`
9
- height: 100vh;
10
- width: 100%;
11
- display: flex;
12
- flex-direction: column;
13
- min-height: 0;
14
- `,Rt=y.div`
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- `,Vt=y(Ot)`
20
- box-shadow: ${({theme:e})=>e.colors.elevation2};
21
- color: ${({theme:e})=>e.colors.grey4};
22
- `;export{os as default};
@@ -1,10 +0,0 @@
1
- import{j as l}from"./liveblocks-BeSMR7a1.js";import{a as n,R as ba}from"./sentry-Uj7AWjah.js";import{u as Ae,j as r,g as Sa,h as ka,q as j}from"./core-BL7rYGUF.js";import{fB as _e,Tc as Ea,Td as De,g5 as wa,gr as K,gx as ke,Te as Ta,Tf as ya,gL as va,pX as Ia,Tg as Ba,Th as Ee,gi as $a,Ti as I,fA as xa,gp as Aa,Tj as _a,Tk as we,Tl as Da,Tm as Te,Tn as Fa,Dr as Ma,gj as Za,g_ as Ga,cS as ja,To as Ha,Tp as La,qy as Va,g4 as Na,j3 as Pa,Tq as Ra,vR as Oa,gk as Ua}from"./zeni-epic-state-CxdZGPla.js";import{w as za,i as qa,a as Ya,U as Ka,E as Wa,O as Xa,y as C,c as Ja,u as Qa,d as et,n as at,e as tt,f as nt,g as ot,z as st,h as H,p as g,m as ye,j as rt,K as it,k as ve,l as lt,Y as Ie,o as dt,q as ct,r as W,s as Be,v as ut,x as Ct,A as mt,L as pt,B as ht,C as ft,D as X,F as gt,Z as bt}from"./index-E1NwyJIP.js";import{A as St,b as kt,I as Et,a as $e,d as wt,D as xe}from"./mui-CPSuUssr.js";import{u as Tt}from"./InboxNotificationsProvider-BH2D62uC.js";import{u as yt}from"./useTaskManagerAccess-BVyRgvZH.js";import{u as vt}from"./expenseAutomationHelper-DfYMglD1.js";import"./recharts-BP8J0UHA.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},m=new a.Error().stack;m&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[m]="3cb892f2-d034-4a79-aa0f-2e795650f2d7",a._sentryDebugIdIdentifier="sentry-dbid-3cb892f2-d034-4a79-aa0f-2e795650f2d7")}catch{}})();const B="AppDrawer",c={root:`${B}-root`,drawer:`${B}-drawer`,appBar:`${B}-appBar`,menuButton:`${B}-menuButton`,appBarZenilogo:`${B}-appBarZenilogo`,drawerZenilogo:`${B}-drawerZenilogo`},It=X("div",{slot:"Root"})((({theme:a})=>({[`&.${c.root}`]:{display:"flex"},[`& .${c.drawer}`]:{[a.breakpoints.up("md")]:{width:W,flexShrink:0,backgroundColor:a.colors.background}},[`& .${c.appBar}`]:{color:a.colors.primary,backgroundColor:a.colors.background,boxShadow:"none"},"& .MuiToolbar-root":{backgroundColor:a.colors.background},[`& .${c.menuButton}`]:{marginRight:a.spacing(2),[a.breakpoints.up("md")]:{display:"none"}},[`& .${c.appBarZenilogo}`]:{fill:a.colors.primary,cursor:"pointer",width:"100%",marginLeft:a.spacing(-6)},[`& .${c.drawerZenilogo}`]:{margin:`${a.spacing(3)} ${a.spacing(3)} ${a.spacing(0)}`,fill:a.colors.primary,cursor:"pointer"}}))),Bt=za((function({tenantEmailDomain:a}){const{isAiCfoOpen:m,setIsAiCfoOpen:b}=Ya(),[L,A]=ba.useState(!1),[S,Fe]=n.useState(!1),t=Sa(),i=ka(),J=wa(),Q=Ka(),o=Ae(),[Me,Ze]=n.useState(!1),V=Wa(),ee=t.pathname.includes("/ai-cfo/");n.useEffect((()=>{ee||o(K())}),[o,ee]),n.useEffect((()=>{o(K())}),[o,a]);const{useFeatureGate:u}=Xa(),{isFeatureEnabled:ae}=u(C.isDebitCardFeatureEnabled),k=Ja(),s=r((e=>_e(e))),te=s.masterTOSInfo?.isMasterTOSAccepted??!1,{setLoading:Ge}=Qa(),$=et(),{isTaskManagerAccessEnabled:_,isZeniUser:je}=yt(k),ne=at(),E=tt();n.useEffect((()=>{E&&$&&o(ke())}),[o,E,s.tenantId,$]);const[N,He]=n.useState(void 0),Le=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:Ve}=u(C.isChargeCardFeatureEnabled),Ne=nt(s,Ve,ae),{isFeatureEnabled:Pe}=u(C.isSettingsFeatureEnabled),{isFeatureEnabled:D}=u(C.isReferralFeatureEnabled),Re=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",oe=r((e=>Ta(e)));n.useEffect((()=>{const e=()=>{Ze(window.scrollY>10)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]);const P=r((e=>ya(e))),p=r((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),h=r((e=>va(e))),{monthEndCloseChecksView:w}=h,Oe=j("/signout")!==null,F=j("/:tenantEmailDomain/dashboard")!==null,se=j("/:tenantEmailDomain/reports")!==null,f=j("/:tenantEmailDomain/onboarding/*")!==null,re=vt();n.useEffect((()=>{E&&D&&!f&&P.fetchState==="Not-Started"&&o(Ia(!0))}),[E,D,P.fetchState,f]),n.useEffect((()=>{if(re){const e=t.state?.origin;if(e!=null){const d=Ba(e);d!=null&&o(Ee(d))}}}),[re,t.state]);const Ue=Oe||f,R=r((e=>e.tenantState)),ze=r((e=>R.fetchState==="Completed"?$a(e):[])),{isFeatureEnabled:qe}=u(C.isApAgingFeatureEnabled),{isFeatureEnabled:Ye}=u(C.isArAgingFeatureEnabled),{isFeatureEnabled:Ke}=u(C.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:We}=u(C.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Xe}=u(C.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Je}=u(C.isDashboardSidebarNewYearAnimationEnabled),Qe=r((e=>I(e).totalUnreadCount)),ea=r((e=>I(e).notificationDetailsByTab.tasks.uiState.unreadCount)),aa=r((e=>I(e).notificationDetailsByTab.comments.uiState.unreadCount)),ta=r((e=>I(e).reducedFetchCountState)),ie=r((e=>I(e).notificationDetailsByTab.tasks.fetchCountState)),O=r((e=>xa(e))),na=r((e=>Aa(e).skillsEnabled)),{status:le}=r(_a),[T,U]=n.useState(void 0),z=O.uiState.currentChatSessionId,M=T!=null?O.deleteChatSessionStateByChatSessionId[T]?.fetchState:void 0,de=ot(M),{inboxNotifications:q,isLoading:ce,isFetchingMore:ue,hasFetchedAll:Ce,fetchMore:oa}=Tt(),Z=r((e=>I(e).notificationDetailsByTab.comments.fetchCountState));n.useEffect((()=>{const e=setTimeout((()=>oa?.()),0);return()=>clearTimeout(e)})),n.useEffect((()=>{if(T!=null)return de==="In-Progress"&&M==="Completed"?(o(we({chatSessionId:T})),U(void 0),void i(`/${a}/ai-cfo/explore`,{state:{...t.state,referrer:"Sidebar"}})):void(M==="Error"&&(o(we({chatSessionId:T})),U(void 0)))}),[o,t.state,i,M,T,de,a]),n.useEffect((()=>{if(ce===!1&&ue===!1&&Ce===!0&&s?.companyId!=null&&q!=null){const e=`dashboard_${s.companyId}`;He(q.filter((d=>d.roomId===e&&d.readAt==null)).length)}}),[ce,ue,Ce,s?.companyId,q]),n.useEffect((()=>{E&&_&&!f&&ie.fetchState==="Not-Started"&&J.tenantId!=null&&o(Da("task_manager","dashboard"))}),[E,_,f,ie.fetchState,J.tenantId,o]),n.useEffect((()=>{f||Z.fetchState!=="Not-Started"||o(Te({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,Z.fetchState,o]),n.useEffect((()=>{if(N!=null){const{fetchState:e}=Z;e!=="In-Progress"&&e!=="Completed"||(e==="In-Progress"&&o(Te({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(De({unreadCount:N},"comments")))}}),[N,Z.fetchState]);const sa={fetchStatus:ta,count:Qe},y=[];qe===!1&&y.push("accounts_payable_aging"),Ye===!1&&y.push("accounts_receivable_aging"),y.push("zeni_accounts_promo_card","treasury_promo_card"),D===!1&&y.push("rewards_card"),ne===!1&&y.push("expense_automation_card");const me=r((e=>Fa(e,y).fetchState)),pe=r((e=>Ma(e).fetchState)),he=a!=null?st.getSignedInUserTenant(a):null,fe=r((e=>he?.tenantId!=null?Za(e,he.tenantId):void 0)),ra=F&&(me==="Completed"||me==="Error")||se&&(pe==="Completed"||pe==="Error")||!F&&!se?void 0:"disabled",ia=n.useMemo((()=>Ga(s.userRole)),[s.userRole]),la=ja(ia),v=e=>{A(e)},da=Re,ca=s?.rewardsLastViewedTime==null,ua=k?.userEmail!=null&&oe.fetchState==="Completed"&&Ha(oe.notificationSettings,k.userEmail,ae,s,_),Ca=n.useCallback((e=>{const d=t.state?.referrer;if(w.monthEndCloseChecks?.auditSummary!=null&&H.trackMonthCloseAuditPage(e.month,e.year,w.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",w.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null),o(La(s.tenantId,e)),p[s.tenantId]!=null){const x=g(t.state?.pathnameStackToGoBack,t.pathname);i(`/${a}/month_end_close_checks/review/${h.currentSelectedView}/${e.month}-${e.year}`,{state:{pathnameStackToGoBack:x,referrer:h.currentSelectedView}})}o(Ee(h.currentSelectedView)),h.reconciliation.selectedAccountId!=null&&o(Va({selectedAccountId:void 0}))}),[h.reconciliation.selectedAccountId,h.currentSelectedView,s.tenantId,w.monthEndCloseChecks?.auditSummary,w.monthEndCloseChecks?.reportEmailSentDate,p,a,t.state,t.pathname]),ma=n.useMemo((()=>({zIndex:S?12:ye[2]})),[S]),pa=$&&rt(t),ge=l.jsx(it,{signedInUser:k,currentTenantId:R.currentTenantId??"",tenants:R.fetchState==="Completed"?ze:fe!=null?[fe]:[],rewardsConfiguration:{isRewardsTabVisible:D,isRewardsAnimated:ca,rewardsPlan:P.rewardsPlan},selectedMenu:m===!0?Ie("ai_cfo"):ve(t)&&le!=="completed"?Ie("invoicing"):dt(t),isTenantDropdownDisabled:ra,isSettings:lt(t),isInvoicing:ve(t)&&le==="completed",isSettingsFeatureEnabled:Pe,currentTenant:s,isVendorsTabVisible:la,isZeniAccountEnabled:Le,isChargeCardEnabled:Ne,isTreasuryEnabled:da,isNotificationsTabVisible:ua,notificationCountDetails:sa,isExpenseAutomationEnabledForUser:ne,isAiCfoAccessEnabled:$,skillsEnabled:na&&$,onNotificationIconClick:()=>{v(!1);const e=je?ea===0&&aa>0?"notifications/comments":"notifications/tasks":"notifications/comments",d=g(t.state?.pathnameStackToGoBack,t.pathname);i(`${a}/${e}`,{state:{pathnameStackToGoBack:d}})},onZeniLogoClick:()=>{Q.toggle()},handleTenantSelect:e=>{Ge(pt.TENANT_SWITCHING),v(!1),ht({dispatch:o,navigate:i,pathToNavigate:ft(e.tenantEmailDomain,t),selectedTenant:e,signedInUser:k})},handleMenuChange:(e,d)=>{if(k!=null&&H.trackSidePanelClicked(e.type,e.group),v(!1),a==null)return;if(e.type==="skills")return te?(o(ke()),o(Ra()),void i(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:g(t.state?.pathnameStackToGoBack,t.pathname),referrer:"Sidebar"}})):void Be({location:t,navigate:i,mergeState:{referrer:"Sidebar"}});if(o(K()),e.type==="invoicing")return m&&b(!1),o(Oa({cacheOverride:!1})),void i(`../${a}/invoicing/overview`,{state:{pathnameStackToGoBack:g(t.state?.pathnameStackToGoBack,t.pathname),referrer:"Sidebar"}});if(m&&ut(e.type)&&b(!1),e.type==="ai_cfo"){if(H.trackAICFOChatScreenStateChanged("viewed","left_menu",z??null,null),!te)return void Be({location:t,navigate:i,mergeState:{referrer:"Sidebar"}});const G=g(t.state?.pathnameStackToGoBack,t.pathname);return void i(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:G,referrer:"Sidebar"}})}const x=g(t.state?.pathnameStackToGoBack,t.pathname),Y=e.type,Se=bt(Y)&&Y!=="command_center";if(Y!=="command_center"&&!Se||p[s.tenantId]==null||H.trackMonthEndCloseClicked(p[s.tenantId].month,p[s.tenantId].year,"Sidebar"),Se&&p[s.tenantId]!=null){const G=p[s.tenantId];return void i(`/${a}/month_end_close_checks/review/${e.type}/${G.month}-${G.year}`,{state:{pathnameStackToGoBack:x,message:d,referrer:"Sidebar"}})}const ga=Ct(e.type);mt(e.type)?(z!=null&&o(Ua()),i(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:x.slice(0,-1),message:d,referrer:"Sidebar"}})):i(`../${a}/${ga}`,{state:{pathnameStackToGoBack:x,message:d,referrer:"Sidebar"}})},onDeleteChatSession:e=>{o(Pa(e)),z===e&&U(e)},handleLogOutClick:()=>{v(!1);const e=g(t.state?.pathnameStackToGoBack,t.pathname);i("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMyProfileClick:()=>{i(`${a}/settings/my_profile`)},handleReferralsClick:()=>{i(`${a}/rewards/refer`)},handleBackClick:()=>{i(`${a}/dashboard`)},handleCockpitClick:()=>{window.open("/cockpit")},monthEndCloseChecksView:w,onPeriodChange:Ca,onCalendarOpen:Fe,aiCfoView:O,isAiCfo:pa,isOnDashboard:F,isTaskManagerAccessEnabled:_,updateCurrentChatSessionId:e=>{o(Na({sessionId:e,agentId:"controller"})),i(`../${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:Ke,thanksGivingAnimationEnabled:We,christmasAnimationEnabled:Xe,newYearAnimationEnabled:Je}),ha=l.jsx(St,{position:"fixed",className:c.appBar,style:{borderBottom:Me?`1px solid ${V.colors.grey2}`:""},children:l.jsxs(kt,{style:{minHeight:ct},children:[l.jsx(Et,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:()=>v(!0),className:c.menuButton,size:"large",children:l.jsx($t,{})}),l.jsx(xt,{className:c.appBarZenilogo,onClick:()=>{Q.toggle()}})]})}),be=$e((e=>e.breakpoints.up("md"))),fa=$e((e=>e.breakpoints.down("md")));return a==null?null:l.jsxs(It,{className:c.root,children:[l.jsx(wt,{}),Ue===!1?l.jsxs(l.Fragment,{children:[be||!F?null:ha,l.jsxs("nav",{className:c.drawer,children:[be?null:l.jsx(xe,{container:window.document.body,variant:"temporary",open:L,onClose:()=>v(!1),PaperProps:{sx:{width:W,zIndex:ye[2],borderRight:"none",backgroundImage:"none",backgroundColor:V.colors.background}},ModalProps:{keepMounted:!0},children:ge}),fa?null:l.jsx(xe,{PaperProps:{sx:{width:W,borderRight:"none",backgroundImage:"none",backgroundColor:V.colors.background,...ma}},variant:"permanent",open:!0,children:ge})]})]}):null]})})),Yt=({tenantEmailDomain:a})=>{const m=Ae(),b=r((A=>_e(A))),L={events:b.userRoleId!=null?[`private-encrypted-${b.userRoleId}.dashboard-user-notification`]:[],eventCallback:(A,S)=>{qa(S)&&Ea(S.mode)==="dashboard"&&m(De({unreadCount:S.data.unread},"tasks"))}};return l.jsx(Bt,{tenantEmailDomain:a,...L})},$t=X((a=>n.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...a},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.604839 4.51889C0.333157 4.57797 0.0879194 4.8318 0.0182541 5.12602C-0.00534674 5.22569 -0.00534674 5.4412 0.0182541 5.54086C0.0523791 5.685 0.117181 5.80198 0.22956 5.92229C0.346814 6.04782 0.459133 6.11627 0.600351 6.14826C0.726193 6.17676 23.2738 6.17676 23.3997 6.14826C23.5409 6.11627 23.6532 6.04782 23.7704 5.92229C23.9348 5.74632 24 5.57908 24 5.33344C24 5.1793 23.9797 5.08352 23.9199 4.95575C23.8455 4.79698 23.6879 4.63709 23.5343 4.56468C23.3857 4.49468 24.2116 4.49926 11.9899 4.50058C2.66632 4.50157 0.669677 4.50479 0.604839 4.51889ZM0.669895 11.1732C0.365117 11.2113 0.0889356 11.4752 0.0182179 11.7958C-0.00468131 11.8996 -0.00469357 12.0996 0.0181935 12.2034C0.0806855 12.4867 0.305734 12.7294 0.581516 12.8108C0.65573 12.8327 1.1761 12.8337 12 12.8337C22.8591 12.8337 23.3441 12.8327 23.4192 12.8106C23.6933 12.7297 23.9196 12.4855 23.9818 12.2034C24.0047 12.0996 24.0047 11.8997 23.9818 11.7959C23.9201 11.516 23.7014 11.2776 23.425 11.1888C23.3558 11.1665 22.8817 11.1655 12.0544 11.164C5.84032 11.1631 0.717278 11.1672 0.669895 11.1732ZM0.594774 17.8516C0.458952 17.8831 0.344939 17.9535 0.22956 18.077C0.0652015 18.253 0 18.4202 0 18.6659C0 18.82 0.0203225 18.9158 0.0801289 19.0435C0.154452 19.2023 0.312097 19.3622 0.465726 19.4346C0.614214 19.5046 -0.209758 19.4999 12 19.4999C21.8294 19.4999 23.3082 19.4975 23.3881 19.4811C23.6596 19.4256 23.9122 19.1669 23.9817 18.8733C24.0053 18.7736 24.0053 18.5581 23.9817 18.4584C23.9476 18.3143 23.8828 18.1973 23.7704 18.077C23.6532 17.9515 23.5409 17.883 23.3997 17.851C23.2779 17.8235 0.713601 17.824 0.594774 17.8516Z",fill:"currentColor"}))))`
2
- height: 20px;
3
- width: 20px;
4
- color: ${a=>a.theme.colors.primary};
5
- `,xt=X((a=>n.createElement("svg",{viewBox:"0 0 102 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...a},n.createElement("path",{d:"M73.4046 13.2609H57.77C58.0392 15.0844 58.8324 16.5249 60.352 17.5133C61.5784 18.3113 62.9424 18.5733 64.3842 18.407C64.8867 18.3484 65.3952 18.2539 65.8738 18.0935C67.1433 17.6676 68.0945 16.8923 68.4559 15.5031H73.2777C73.1629 16.3885 72.8877 17.1866 72.4845 17.938C71.4734 19.8189 69.9228 21.1159 67.9414 21.8302C64.3076 23.138 60.7875 22.9178 57.5642 20.6588C55.1293 18.9526 53.7318 16.5465 53.3034 13.6055C52.9959 11.4973 53.2065 9.43809 54.1374 7.49857C55.6988 4.2453 58.2761 2.29381 61.8273 1.67642C64.048 1.28995 66.2124 1.54361 68.2202 2.60969C71.2784 4.23333 73.0085 6.79743 73.4405 10.2314C73.5649 11.2161 73.5374 12.202 73.407 13.2621L73.4046 13.2609ZM68.3554 9.72765C68.3278 9.51706 68.3159 9.334 68.2788 9.15692C68.0622 8.12913 67.4915 7.32388 66.6767 6.68735C65.7697 5.97902 64.7264 5.68349 63.5825 5.62486C61.0543 5.49444 58.8289 7.02356 58.0918 9.44408C58.0655 9.52903 58.0595 9.62116 58.0416 9.72765H68.3566H68.3554Z",fill:"currentColor"}),n.createElement("path",{d:"M52.7423 17.86V21.9162C52.7423 22.0478 52.6346 22.1555 52.503 22.1555H34.5854C34.5854 22.1555 34.595 19.9659 34.5783 19.1008C34.5723 18.7861 34.662 18.5528 34.8786 18.3183C38.3664 14.535 41.8458 10.7445 45.3276 6.95397C45.452 6.81877 45.744 6.49093 45.744 6.49093H35.6396C35.5079 6.49093 35.4003 6.38324 35.4003 6.25163V2.14645C35.4003 2.01483 35.5079 1.90715 35.6396 1.90715H52.6334C52.6334 1.90715 52.6274 4.18288 52.6418 5.17239C52.6454 5.41767 52.5341 5.57321 52.3833 5.73713C50.1543 8.15884 41.5048 17.6219 41.5048 17.6219H52.5042C52.6358 17.6219 52.7435 17.7296 52.7435 17.8612L52.7423 17.86Z",fill:"currentColor"}),n.createElement("path",{d:"M94.0631 22.0758H89.7353C89.6037 22.0758 89.496 21.9694 89.496 21.8377C89.4925 20.5539 89.4733 14.3919 89.4769 11.3696C89.4769 10.6397 89.4195 9.92064 89.2041 9.21829C88.6142 7.29553 87.0528 6.12056 85.0367 6.07151C83.7122 6.0392 82.5288 6.37542 81.58 7.34578C80.8406 8.10196 80.4386 9.02686 80.2998 10.0642C80.2388 10.5213 80.2148 10.9879 80.2136 11.4498C80.2076 14.429 80.2088 20.5539 80.21 21.8365C80.21 21.9682 80.1023 22.0758 79.9707 22.0758H75.6047C75.4731 22.0758 75.3654 21.9705 75.3654 21.8389C75.3606 20.512 75.3403 13.9576 75.387 10.6349C75.4205 8.27546 76.1838 6.1433 77.78 4.36411C79.2062 2.77516 80.9973 1.84189 83.1056 1.52243C84.8441 1.258 86.5658 1.3286 88.2254 1.93642C91.4727 3.12454 93.3954 5.47924 94.093 8.83302C94.2557 9.61314 94.3072 10.4268 94.3131 11.226C94.3335 14.3321 94.3083 20.5503 94.3036 21.8401C94.3036 21.9717 94.1959 22.077 94.0643 22.077L94.0631 22.0758Z",fill:"currentColor"}),n.createElement("path",{d:"M97.2196 1.90527H101.482C101.613 1.90527 101.721 2.01176 101.721 2.14338L101.772 21.9035C101.772 22.0363 101.666 22.144 101.533 22.144H97.2256C97.094 22.144 96.9863 22.0363 96.9863 21.9047L96.9803 2.14457C96.9803 2.01296 97.088 1.90527 97.2196 1.90527Z",fill:"currentColor"}),n.createElement("path",{d:"M17.1795 0.0270299C16.9776 -0.0551712 16.7491 0.057251 16.6911 0.267589C16.6706 0.342537 16.6476 0.417486 16.6234 0.491225C16.4022 1.1573 16.0299 1.76655 15.5197 2.27789C14.6566 3.14221 13.5082 3.61971 12.2861 3.62091H12.2825C11.0627 3.62091 9.91435 3.14584 9.05124 2.28394C8.54111 1.77381 8.16636 1.16455 7.94394 0.499687C7.91976 0.425947 7.89679 0.350999 7.87503 0.276051C7.81701 0.0657128 7.58854 -0.0455005 7.38666 0.0367007C6.20321 0.522655 5.108 1.17906 4.13125 1.97447C4.00795 2.07481 3.96806 2.24525 4.02729 2.39273C4.07686 2.51603 4.13004 2.63813 4.18565 2.7578C4.62204 3.70916 5.22888 4.58557 5.99166 5.34714C7.67316 7.02501 9.90589 7.94977 12.2813 7.94977H12.2897C14.6675 7.94736 16.9027 7.01897 18.5829 5.33626C19.3445 4.57348 19.9489 3.69586 20.3841 2.7445C20.4397 2.62362 20.4917 2.50153 20.5413 2.37823C20.6005 2.23075 20.5606 2.0603 20.4373 1.95997C19.4594 1.16576 18.3629 0.511775 17.1795 0.0270299Z",fill:"#97C3B9"}),n.createElement("path",{d:"M20.3984 21.2422C19.962 20.2933 19.3564 19.4193 18.596 18.6602C16.9133 16.9799 14.6733 16.0527 12.2979 16.0575C8.71131 16.0611 5.61789 18.196 4.2108 21.2604C4.1564 21.38 4.10321 21.5009 4.05244 21.623C3.992 21.7705 4.03189 21.9422 4.1564 22.0437C5.13435 22.8367 6.22956 23.4895 7.41181 23.973C7.61369 24.0552 7.84095 23.944 7.90018 23.7337C7.92073 23.6575 7.9437 23.5838 7.96908 23.5088C8.57713 21.698 10.2876 20.3888 12.3016 20.3864H12.3064C13.5261 20.3864 14.6745 20.8615 15.5376 21.7234C16.0466 22.2311 16.4189 22.8379 16.6413 23.5004C16.6667 23.5741 16.6897 23.649 16.7102 23.724C16.7694 23.9343 16.9967 24.0455 17.1986 23.9621C18.382 23.4762 19.476 22.821 20.4528 22.0256C20.5761 21.9252 20.616 21.7536 20.5567 21.6061C20.5072 21.4828 20.454 21.3619 20.3984 21.241V21.2422Z",fill:"#97C3B9"}),n.createElement("path",{d:"M0.494416 9.85376C0.31309 9.85376 0.161985 9.98795 0.13539 10.1669C0.045936 10.7676 0 11.3829 0 12.0091C0 12.6401 0.0483536 13.2603 0.141434 13.8659C0.169238 14.0448 0.320343 14.1778 0.501669 14.1778L24.0934 14.1427C24.2747 14.1427 24.4258 14.0086 24.4524 13.8296C24.5419 13.2288 24.589 12.6135 24.5878 11.9862C24.5878 11.3551 24.5395 10.735 24.4464 10.1294C24.4186 9.95047 24.2675 9.8175 24.0862 9.8175L0.494416 9.85256V9.85376Z",fill:"#97C3B9"}))))`
6
- height: ${gt.sp4};
7
- width: 102px;
8
- color: ${a=>a.theme.colors.primary};
9
- cursor: pointer;
10
- `;export{Yt as default};
@@ -1,14 +0,0 @@
1
- import{j as S}from"./liveblocks-BeSMR7a1.js";import{a as l}from"./sentry-Uj7AWjah.js";import{u as pe,h as he,g as Ce,j as B,i as fe,l as ge}from"./core-BL7rYGUF.js";import{a as Se,e2 as be,z as ye,e3 as Pe,e5 as z,e6 as Ie,bl as W,a6 as we,h as $,e7 as H,eh as Ee,G as ke,N as Ae,w as Te,ea as xe,eb as Ue,at as _e,ee as Oe,ef as ve,bi as Qe,eg as Fe}from"./index-E1NwyJIP.js";import{gH as $e,fA as G,fB as je,g4 as De,je as Le,ja as Ve,fC as M,gq as qe,gk as Re,gm as N,gs as Be,gt as He,gu as Me,gv as Ne,gw as ze}from"./zeni-epic-state-CxdZGPla.js";import{D as We,n as D,P as Ge,S as Ye}from"./mui-CPSuUssr.js";import"./recharts-BP8J0UHA.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="b522840b-d5a2-45f2-930c-66d6d023f74d",e._sentryDebugIdIdentifier="sentry-dbid-b522840b-d5a2-45f2-930c-66d6d023f74d")}catch{}})();const Y="chat-response-generated",J="cards/ask",K="card_policy_hero";function j(e){return`/${e}/cards`}function X(e){return`/${e}/cards/policy`}const Je=ge((function(e,a){const o=G(e),c=a.isSubmitting,d=Ue(e,{allUsers:a.allUsers,onCardPolicyVendorSearchTextChange:a.onCardPolicyVendorSearchTextChange});return{showSampleQuestions:a.sessionFromUrl==="new_chat"&&o.uiState.currentChatSessionId==null,aiCfoView:o,isSubmitting:c,isNewChatSession:a.sessionFromUrl==="new_chat",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,exportDownloadEndPoint:Oe(),emailLinkQuestion:a.emailLinkQuestion,autoSubmitEmailLinkQuestion:a.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:a.onEmailLinkQuestionProcessed,isFileUploadEnabled:a.isFileUploadEnabled,isUploadPromoVisible:a.isUploadPromoVisible,onUploadPromoClose:a.onUploadPromoClose,...d}}),(function(e,a){const{location:o,currentTenant:c,userId:d,navigate:m,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:E,isAiCardCreationEnabled:T,isCardPolicyEnabled:x,cardPolicyPageContext:U}=a,i=c.tenantEmailDomain,C=o.state?.referrer,p=C===K?X(i):j(i);return{onEventReceived:(n,t)=>{if(n===Y&&typeof t.text=="string"&&typeof t.metadata=="object"){const s=t,f=He(s.type),b=s.metadata.chat_session_id??null,{currentChatSession:y,currentQuestionAnswer:u,currentQuestionAnswerSummary:P}=W(E,b);f!=="answer"?$.trackAICFOChatResponseGenerated(f,u?.question.questionText??"",s.text,b,Fe(P,y),s.metadata.message_id??null):$.trackAICFOChatAnswerGenerated(s.text,u?.question.questionText??"",(s.follow_up_questions?.length??0)>0,!!s.assumptions,!!s.insights,s.visualization!=null,Me(s.visualization?.type??"")??null,b,s.summarized_title,s.metadata.message_id??null),e(Ne({chatSessionId:s.metadata.chat_session_id,responseType:f,fetchState:{fetchState:"Completed",error:void 0}})),e(ze({chatSessionId:s.metadata.chat_session_id,answerPayload:s,userId:d}))}},onSubmit:(n,t,s,f)=>{n&&Qe(e,n,t,h,E,d,f,s,U)},updateCurrentInput:n=>{e(N(n))},onStopSubmit:()=>{},onUpdateScrollYOffset:n=>{e(Be(n))},onSelectSampleQuestion:()=>{},onBackClick:()=>{m(-1)},onCloseClick:()=>{m(p,{state:{...o.state}}),e(N(""))},togglePageView:()=>{m(p,{state:z(o.state)}),a.setIsAiCfoOpen(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{m(-1)},onNewChatClick:()=>{h!=null&&e(Re()),m((function(n){return`/${n}/${J}`})(i),{state:{...o.state}})},onToggleCotCollapsed:(n,t)=>{e(qe({questionAnswerId:n,isCollapsed:t}))},...ve(e,{isAiCardCreationEnabled:T,isCardPolicyEnabled:x,currentChatSessionId:h,onAfterCardsCreationSubmit:()=>{a.setIsAiCfoOpen(!0),m(j(i),{state:{...o.state}})},onAfterCardPolicySubmit:()=>{a.setIsAiCfoOpen(!0),m(`/${i}/cards/policy`,{state:{...o.state}})}})}}))(Te(xe)),{spendManagement:{chargeCard:{cardsAiCfoHero:Z,cardPolicyAiCfoHero:ee}}}=ke.getLocalizedStrings(),A=Z.pageTitle,Ke=ee.pageTitle,Xe=Z.chatHeaderSubtitle,Ze=ee.chatHeaderSubtitle,St=({isFileUploadEnabled:e})=>{const{setIsAiCfoOpen:a}=Se(),o=pe(),c=he(),d=Ce(),[m,h]=l.useState(!1),{allUsers:E,isAiCardCreationEnabled:T,isCardPolicyEnabled:x,onCardPolicyVendorSearchTextChange:U}=be();l.useEffect((()=>{o($e())}),[o]);const i=B((r=>G(r))),C=ye.getSignedInUser(),{session_id:p}=fe(),n=B((r=>je(r))),t=i.uiState.currentChatSessionId,s=n.tenantEmailDomain,{handleUploadPromoClose:f,isUploadPromoVisible:b}=Pe({isFileUploadEnabled:e,tenantEmailDomain:s}),y=d.state,u=y?.aiCfoInitialQuestion??null,P=!!y?.aiCfoShouldSubmit,I=y?.referrer===K,te=I?"card_policy":void 0,se=l.useMemo((()=>({title:I?Ke:A,subtitle:I?Ze:Xe})),[I]),[ae,_]=l.useState(null),[oe,O]=l.useState(!1),v=l.useRef(!1);l.useEffect((()=>{v.current||u==null||u===""||(_(u),O(P),v.current=!0)}),[u,P]);const ne=l.useCallback((()=>{_(null),O(!1),c(d.pathname,{replace:!0,state:z(d.state)})}),[d.pathname,d.state,c]),ie=n.masterTOSInfo,g=ie?.isMasterTOSAccepted??!1,k=l.useRef(null);l.useEffect((()=>{if(g&&k.current!=null){const{question:r,shouldSubmit:w}=k.current;k.current=null,_(r),O(w),v.current=!1}}),[g]);const{visitedSessions:L}=Ie(t),Q=i.fetchState,F=i.uiState.chatSessionsNextPageToken.hasMore||!i.uiState.chatSessionsFirstPageFetched,V=t!=null?i.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",q=t==null||(i.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),R=i.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:re}=W(R,t),le=re.length===0;l.useEffect((()=>{t!=null&&p!==t&&c((function(r,w){return`/${r}/${J}/${w}`})(s,t),{state:{...d.state},replace:!0})}),[t,p,s,c,d.state]),l.useEffect((()=>{p!=null&&t==null&&p!=="new_chat"&&o(De({sessionId:p,agentId:"controller"}))}),[]);const de=l.useMemo((()=>({events:L.map((r=>`private-encrypted-chat-${r}.${Y}`)),eventCallback:(r,w,me)=>me.onEventReceived(r,w)})),[L]);if(l.useEffect((()=>{Q!=="In-Progress"&&F&&o(Le())}),[Q,F,o]),l.useEffect((()=>{t!=null&&V!=="In-Progress"&&q&&C!=null&&Q==="Completed"&&!F&&o(Ve(t,C.userId))}),[V,q,t,C,o]),C==null)throw Error("Can't access Cards AI CFO page without signing in...");const ce=p??"new_chat",ue=t!=null&&i.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return S.jsxs(tt,{children:[S.jsx(we,{analytics:$,onLoad:r=>r.trackPageLoaded(Ae.Event.aiCFOPage)}),g?S.jsx(Je,{...de,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:R,allUsers:E,isAiCardCreationEnabled:T,isCardPolicyEnabled:x,openOnboardingPage:()=>h(!0),userId:C.userId,setIsAiCfoOpen:a,navigate:c,sessionFromUrl:ce,location:d,isSubmitting:ue,isEmptyChatWithSession:le,customPageTitle:A,chatHeader:se,currentTenant:n,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:oe,onEmailLinkQuestionProcessed:ne,isFileUploadEnabled:e,isUploadPromoVisible:b,onUploadPromoClose:f,onCardPolicyVendorSearchTextChange:U,cardPolicyPageContext:te}):S.jsx(H,{isTOSAccepted:g,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>{c(I?X(s):j(s),{state:{...d.state}})},onCompleteClick:()=>{g||n.userRoleId==null||(u!=null&&u!==""&&(k.current={question:u,shouldSubmit:P}),o(M(n.userRoleId)))}}),S.jsx(We,{anchor:"right",open:m,transitionDuration:250,PaperProps:{component:st,style:{width:`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:S.jsx(et,{onClick:r=>r.stopPropagation(),children:S.jsx(H,{isTOSAccepted:g,acceptMasterTOSState:i.masterTOSAcceptanceState,customPageTitle:A,onCloseClick:()=>h(!1),onCompleteClick:()=>{g||n.userRoleId==null||o(M(n.userRoleId)),h(!1)}})})})]})},et=D(Ye)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,tt=D.div`
6
- flex: 1 1 auto;
7
- display: flex;
8
- flex-direction: column;
9
- min-height: 0;
10
- width: 100%;
11
- `,st=D(Ge)`
12
- box-shadow: ${({theme:e})=>e.colors.elevation2};
13
- color: ${({theme:e})=>e.colors.grey4};
14
- `;export{St as default};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-BeSMR7a1.js";import{a as o}from"./sentry-Uj7AWjah.js";import{u as R,h as k,g as H,j as C,N as w}from"./core-BL7rYGUF.js";import{T9 as q,fB as z,gh as G,pO as B,gJ as O,gg as J,ge as Q,Tv as V,gd as A}from"./zeni-epic-state-CxdZGPla.js";import{u as K,z as E,L as v,G as M,F as W}from"./index-E1NwyJIP.js";import{n as X}from"./mui-CPSuUssr.js";import{P as h,a as D}from"./AccountMappingScreen-Cv_JISNl.js";import{t as Y}from"./getLocaleForTenant-akYNGA2f.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CiKgrKX6.js";import"./recharts-BP8J0UHA.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";import"./MobileAppDrawer-CjyikhYJ.js";import"./InboxNotificationsProvider-BH2D62uC.js";import"./useTaskManagerAccess-BVyRgvZH.js";import"./accountMappingHelper-DOs7iAIL.js";import"./empty-qvcbLK7S.js";import"./pdf-lib-Cu5wZc2A.js";import"./index-te7nCILo.js";import"./url-CnKkchc3.js";import"./index-BtCYCCEX.js";import"./decodeURIComponentSafe-B4a7LpJx.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="0e6f07f7-cda6-4aff-8d67-bc131e2a1225",t._sentryDebugIdIdentifier="sentry-dbid-0e6f07f7-cda6-4aff-8d67-bc131e2a1225")}catch{}})();const te=X.div`
2
- display: flex;
3
- flex: 1 1 auto;
4
- flex-direction: row;
5
- justify-content: center;
6
- align-items: center;
7
- width: 100%;
8
- height: 100vh;
9
- background-color: ${t=>t.theme.colors.background};
10
- box-shadow: ${t=>`0px 2px ${W.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function we(){const t=R(),i=k(),_=H(),{setLoading:c,clearAllLoading:m}=K(),S=o.useRef(!1),x=o.useRef(!1),N=o.useRef(!1),f=o.useRef(!1),{code:U,realmId:$,state:F}=Z(_.search),p=U!==""&&$!==""&&F!=="";p&&(N.current=!0);const j=sessionStorage.getItem(h),u=j===D.pending,L=j===D.ready,b=C((s=>q(s))),e=C((s=>z(s))),n=C((s=>s.tenantState.fetchState)),r=C((s=>s.tenantState.activeTenantFetchState.fetchState)),a=E.getSignedInUser(),g=E.getActiveTenantForUser()?.tenantId,l=e?.externalConnections?.fetchState,d=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{c(v.CONNECTION_AUTH)}),[c]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(c(v.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,c]),o.useEffect((()=>{e.tenantId==null&&!x.current&&a!=null&&(x.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(B(a.userId)))}),[x,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(c(v.CONNECTION_AUTH),t(O(a.userId,e.tenantId)))}),[d]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(J(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),Q(a?.userId,a?.zeniSessionId,e.tenantId),M.updateAppLocaleID(Y(V(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||a==null||e==null||t(O(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{b.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder)}),[b.tenantsCoreDetailsInOrder.length,n]);const T=e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed";if(o.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||m()}),[n,r,l]),o.useEffect((()=>{u&&d==="In-Progress"&&(f.current=!0)}),[u,d]),o.useEffect((()=>{if(!u||T)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return f.current&&d==="Completed"?(sessionStorage.setItem(h,D.ready),m(),void i(s,{replace:!0})):f.current&&d==="Error"?(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(p||N.current||f.current||y!==!0||(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,T,d,p,y,e.tenantEmailDomain,m,t,i]),T)return null;if(p||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const P=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return L?I.jsx(w,{to:P,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BeSMR7a1.js";import{z as a}from"./index-E1NwyJIP.js";import{g as n}from"./QBOConnectionScreen-CiKgrKX6.js";import"./sentry-Uj7AWjah.js";import{g as p,N as s}from"./core-BL7rYGUF.js";import"./zeni-epic-state-CxdZGPla.js";import"./recharts-BP8J0UHA.js";import"./mui-CPSuUssr.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";import"./empty-qvcbLK7S.js";import"./pdf-lib-Cu5wZc2A.js";import"./index-te7nCILo.js";import"./url-CnKkchc3.js";import"./index-BtCYCCEX.js";import"./decodeURIComponentSafe-B4a7LpJx.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="c18cd95e-770d-4ff7-92bf-3374948ea538",t._sentryDebugIdIdentifier="sentry-dbid-c18cd95e-770d-4ff7-92bf-3374948ea538")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,30 +0,0 @@
1
- import{j as s}from"./liveblocks-BeSMR7a1.js";import{t as An,A as Ge}from"./AddressScreen-DKIOTZOx.js";import wn from"./NotFoundScreen-C2tiSpQ7.js";import{a as d,t as Me}from"./sentry-Uj7AWjah.js";import{h as _e,g as Te,u as se,i as xe,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-BL7rYGUF.js";import{fB as Y,dV as Ee,dU as Ae,bq as Bn,Tn as jn,bR as Un,pM as Fn,AG as Vn,AJ as Rn,UI as Ln,UJ as Nn,lq as Oe,lt as dn,TY as $n,b_ as Gn,c7 as fe,B8 as we,AV as Mn,UK as me,B9 as un,RA as Qn,mD as ln,de as pn,UL as Kn,UM as zn,t$ as qn,TM as be,hS as Hn,TL as Ce,hP as Jn,Fy as Zn,u3 as Wn,hH as Xn,hK as Qe,UN as mn,UO as Yn,Ll as et,UP as nt,Lp as tt,AM as at,UQ as ot,UR as st,lo as rt,lr as it,Bl as ct,AX as gn,B7 as dt,bE as Ke,cD as ut,Bk as ze,ui as lt,u6 as pt,mv as mt,gD as gt,gC as ft,gB as yt,US as ht,AP as bt,Bm as Ct,Bp as St,Bs as It,By as kt,df as Ot}from"./zeni-epic-state-CxdZGPla.js";import{z,O as Pe,y as W,n as vt,p as q,a6 as re,h as g,aC as _t,ag as fn,$ as Tt,U as yn,V as hn,g as X,T as ge,N as ve,aD as xt,F as qe,r as He,ac as Et,aE as Je,aF as At,aG as wt}from"./index-E1NwyJIP.js";import{n as De}from"./mui-CPSuUssr.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CiKgrKX6.js";import{u as Bt,a as jt}from"./useEmailConnectResultRefresh-DDRUKxe2.js";import{u as Ut}from"./useChargeCardPusherEvents-DJOucGr5.js";import"./recharts-BP8J0UHA.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";import"./empty-qvcbLK7S.js";import"./pdf-lib-Cu5wZc2A.js";import"./index-te7nCILo.js";import"./url-CnKkchc3.js";import"./index-BtCYCCEX.js";import"./decodeURIComponentSafe-B4a7LpJx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="95b9f1bb-e5f1-41eb-a16d-1a08cea986eb",e._sentryDebugIdIdentifier="sentry-dbid-95b9f1bb-e5f1-41eb-a16d-1a08cea986eb")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Ft=()=>{const e=_e(),l=Te(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:b}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:w}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:A}=t(W.isDebitCardFeatureEnabled),k=vt(),O=E((S=>Y(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,U=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(A,O),C=Ae(O),D=[],V=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&Bn(O?.userRole),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;V===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),T===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),w===!1&&D.push("rewards_card");const f=E((S=>{const F=[];b===!1&&F.push("accounts_payable_aging"),o===!1&&F.push("accounts_receivable_aging"),F.push("zeni_accounts_promo_card","treasury_promo_card"),w===!1&&F.push("rewards_card"),k===!1&&F.push("expense_automation_card");const J=jn(S,F);return Un(J.reportsInOrder.map((G=>({fetchState:G.fetchState,error:G.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||C||(p(!0),i(Fn(n.userId,U,O.tenantId,!0,!1,D)))}),[a,P,m,C,n,O.tenantId,i]);const B=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":C?"../../cards":"../../dashboard",{state:S})}),[e,l,m,C]),$=d.useCallback((()=>{B.current||(B.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout($,6e3);return()=>clearTimeout(S)}),[$]),d.useEffect((()=>{m||C||!u||f!=="Completed"&&f!=="Error"||$()}),[u,f,m,C,$]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:$})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Ye=De.div`
2
- display: flex;
3
- height: 100vh;
4
- background-color: ${e=>e.theme.colors.grey4};
5
- `,en=De.div`
6
- display: flex;
7
- flex-direction: column;
8
- align-items: center;
9
- flex: 1;
10
- min-width: 0;
11
-
12
- ${e=>e.skipLegacyDrawerOffset?`
13
- width: 100%;
14
- padding-left: ${qe.sp0};
15
- `:`
16
- min-width: calc(100% - ${He}px);
17
- padding-left: ${He}px;
18
- `}
19
-
20
- ${e=>e.theme.breakpoints.down("md")} {
21
- width: 100%;
22
- padding-left: ${qe.sp0};
23
- }
24
-
25
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
26
- `,nn=cn((function(e,l){const{companyId:i,isAdmin:a,currentTenant:p,isOnAddressPage:u}=l,c=z.getSignedInUser(),v=p.tenantId,n={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:v??""},t=Y(e),b=we(e,i),o=mn(e),w=fe(p?.userRole??[])&&b.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",A=Yn(e.userRoleConfigState);return{onboardingCustomerView:b,analytics:g,isRefreshingViewInBackground:!1,isDisabled:w,companyTitles:A.companyTitles,connectedAccountProvider:t.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:Et.fileMicroServiceBaseUrl,authParams:n},signedInUser:z.getSignedInUser(),currentTenant:t,isAdmin:a,isOnAddressPage:u,cardPaymentView:o,isCardPaymentPopupOpen:!1,stripeKey:ge.stripeKey}}),(function(e,l){const{companyId:i,currentTenant:a,themeState:p,navigate:u,location:c}=l,{tenantEmailDomain:v}=a;return{onFetchLinkTokenClick:(n,t)=>{e(kt(n,t))},onEstablishConnectionClick:(n,t)=>{e(It(n,t))},onUpdatePaymentAccountStatus:(n,t,b)=>{e(St(n,t,b))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(Ct(!1,n,t))},onEstablishConnectionSuccess:()=>{e(bt(i,!0,!1))},handleOnConnectClick:()=>{g.trackOnboardingConnectQBO(),ie.handleClick()},updateQBOPopupState:n=>{e(me({isQBOPopupOpen:n}))},onCompanyOfficerUpdated:n=>{const t=n.map((b=>{const{officerType:o,userId:w,name:A,email:k,ssn:O,nationalityCountryCode:P,dob:_,phone:U,syncToken:m,selectDocument:C,role:D,ownership:V,isSelectedForVerification:h,userVerificationStatus:r,fileIds:T,isPhoneVerified:x}=b;let f;return C.selectDocumentType==="driverLicense"?f="driving_license":C.selectDocumentType==="passport"?f="passport":C.selectDocumentType==="stateId"?f="id_document":C.selectDocumentType==="ssnCard"&&(f="social_security_card"),{officerType:o,userId:w,firstName:A.firstName,lastName:A.lastName,email:k,ssn:O,nationalityCountryCode:P?.selectedOption!=null?Je(P.selectedOption):void 0,phone:U,birthday:_!=null?Ke(_?.toString()):_,syncToken:m,titleAtCompany:D.selectedOption,ownershipInCompany:V,documentTypeSelectedForVerification:f,isSelectedForVerification:h,userVerificationStatus:r,fileIds:T,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:x}}));e(ze({officers:t}))},onGetOtp:(n,t)=>{e(yt(n,"CustomerOnboarding")),t!=null&&e(ht({officerType:t,phone:n}))},onResendOtp:n=>{e(ft(n,"CustomerOnboarding"))},onVerifyOtp:(n,t)=>{g.trackOnboardingPhoneVerified(),e(gt(n,t,"CustomerOnboarding"))},updateFilesEntity:n=>{e(mt({files:n}))},onDeleteFile:n=>{e(pt(n))},onEditFileName:(n,t)=>{e(lt(n,t.split(".")[0]))},onCompanyDetailsChanged:n=>{const{companyDescription:t,companyIndustry:b,companyIndustryType:o,companyLegalName:w,companyTaxId:A,companyWebsite:k,companyPhone:O,primaryContactEmail:P,primaryContactName:_,primaryContactUserId:U,primaryContactSyncToken:m,syncToken:C,fileIds:D,typeOfIncorporation:V,stateOfIncorporation:h,incDate:r,companySourceOfFunds:T,companySourceOfFundsDescription:x,companySubIndustry:f,countriesOfOperations:B,purposeOfAccount:N,purposeOfAccountDescription:$,regulatedStatus:L,regulatedStatusDescription:ee,transactionVolume:S,transactionVolumeDescription:F,usNexus:J,usNexusTypes:G}=n,M={companyId:i,companyDescription:t,companyIndustry:b.selectedOption,companyIndustryType:o?.selectedOption??"",companyLegalName:w,taxIdOrEIN:A,website:k!=""&&k!=null?ut(k):void 0,phone:O,syncToken:C,fileIds:D,incDate:r!=null?Ke(r?.toString()):r,typeOfIncorporation:V?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",companySourceOfFunds:T?.selectedOption??"",companySourceOfFundsDescription:x,companySubIndustry:f?.selectedOption??"",countriesOfOperations:B?.selectedOptions.map((R=>R.length===2?R:Je(R)))??[],purposeOfAccount:N?.selectedOption??"",purposeOfAccountDescription:$,regulatedStatus:L??"",regulatedStatusDescription:ee,transactionVolume:S?.selectedOption??"",transactionVolumeDescription:F,usNexus:J,usNexusTypes:G?.selectedOptions??[]},ce={userId:U,firstName:_.firstName,lastName:_.lastName,email:P,syncToken:m};e(ze({companyDetails:M,primaryContactDetails:ce}))},onAddressClick:(n,t)=>{const b=an(v,n,t),o=q(c.state?.pathnameStackToGoBack,c.pathname);u(b,{state:{pathnameStackToGoBack:o}})},onRegisteredAddressClick:(n,t)=>{const b=an(v,n,t),o=q(c.state?.pathnameStackToGoBack,c.pathname);u(b,{state:{pathnameStackToGoBack:o}})},onUpdateCustomerView:(n,t,b)=>{e(dt(i,!1,t,b,n))},onAddressEditHandler:n=>{if(n!=null){const t=An(n);e(ln({addressType:"subscription_billing_address",addressToCreate:t}))}},onSkipSetupClick:()=>{const n=q(c.state?.pathnameStackToGoBack,c.pathname);e(gn(i,!1,!1)),u("./activation",{state:{pathnameStackToGoBack:n}})},onUpdateStep:n=>{e(un({step:n}))},onUpdateSubStep:n=>{e(ct({subStep:n}))},onZeniLogoClick:()=>{p.toggle()},handleLogOutClick:()=>{const n=q(c.state?.pathnameStackToGoBack,c.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:n,message:"logout"}})},handleCockpitClick:()=>{g.trackOnboardingFlowExited("cockpit"),window.open("/cockpit")},handleReferralsClick:()=>{u(`/${v}/rewards`)},handleCreateCardSetupIntent:n=>{e(dn(n))},handleConfirmCardSetupIntent:n=>{e(it(n))},updateCardPaymentModalState:n=>{e(me({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,b)=>{e(rt(n,t,b))},handleFetchPaymentSources:()=>{e(Oe())},resetCardPaymentViewState:()=>{e(st())},handleResetCardPaymentErrorStatuses:()=>{e(ot())},redirectToProductSuitePage:()=>{g.trackOnboardingFlowExited("product_suite");const n=q(c.state?.pathnameStackToGoBack,c.pathname);u(`/${v}/onboarding/thankyou`,{state:{pathnameStackToGoBack:n,message:"OnboardingThankyou"},replace:!0})},onAcknowledgeAiFinanceTeam:()=>{i!=null&&(g.trackOnboardingAiFinanceTeamAcknowledged(),e(at(i)))},onIdentityDocumentUploadedForAutofill:n=>{if(i==null)return;const t=nt(n.documentType);t!=null&&(g.trackOnboardingDocumentUploaded("kyc",t),e(tt({target:"onboarding",companyId:i,officerType:n.officerType,fileId:n.fileId,documentType:t})))},onCompanyDocumentUploadedForAutofill:n=>{i!=null&&(g.trackOnboardingDocumentUploaded("kyb",n.documentType),e(et({target:"onboarding",companyId:i,fileId:n.fileId,documentType:n.documentType})))}}}))(xt),le=({taxCFOCustomer:e=!1,isOnAddressPage:l=!1,appContent:i})=>{const a=fn(),p=_e(),u=Te(),c=se(),v=Tt(),n=yn(),[t,b]=d.useState(!1),[o,w]=d.useState(!1),[A,k]=d.useState(!1),{tenantEmailDomain:O}=xe(),P=hn(),{useFeatureGate:_}=Pe(),{isFeatureEnabled:U}=_(W.isDebitCardFeatureEnabled),m=Pn("/:tenantEmailDomain/onboarding")!==null&&u.search?.includes("code"),C=E((y=>y.onboardingCustomerViewState.fetchState)),D=E((y=>y.onboardingCustomerViewState.currentStep)),V=E((y=>y.onboardingCustomerViewState.uiState)),h=E((y=>Y(y))),r=E((y=>y.userRoleConfigState.fetchState)),T=E((y=>y.cardPaymentViewState)),x=X(T.addCardPaymentSourceStatus.fetchState),f=T.addCardPaymentSourceStatus.fetchState,{code:B,realmId:N,state:$}=Pt(u.search),L=h.externalConnections?.accounting[0],ee=L?.connectionType,S=L?.connectionName,F=L?.connectionId??"",J=z.getSignedInUser()?.userId??"",G=d.useRef({realmId:"",connectionId:""});d.useEffect((()=>{o||(w(!0),c(Oe()))}),[o,c]),d.useEffect((()=>{A||(dn(["card"]),k(!0))}),[A]),d.useEffect((()=>{x==="In-Progress"&&f==="Completed"&&c(Oe())}),[x,f]),d.useEffect((()=>{Dt(B,N,$,F,J)===!0&&h.externalConnections?.saveConnectionState!=="In-Progress"&&C==="Completed"&&(c($n(h.tenantId,{connection_type:ee??"accounting",connection_name:S??"quickbooks_online",authorization_code:B,realm_id:N,connection_id:F,user_id:J},Gn(window.location.origin+"/onboarding/auth"))),G.current={realmId:N,connectionId:F},g.trackOnboardingSaveQBOConnection(N,F),p(u.pathname))}),[B,N,$,u.pathname,C]),d.useEffect((()=>{ie.isInitiated===!1&&C==="Completed"&&ie.init("/onboarding/auth",h.tenantEmailDomain)}),[C]);const M=h.companyId??z.getSignedInUserTenant(O)?.companyId,ce=fe(h?.userRole??[]),R=E((y=>we(y,M)));d.useEffect((()=>{t||C!=="Not-Started"||M==null||(b(!0),c(Mn(M,!0,!m)))}),[t,C,M]);const ne=h.externalConnections?.saveConnectionState,Be=X(ne);d.useEffect((()=>{Be==="In-Progress"&&(ne==="Completed"||ne==="Error")&&V.isQBOPopupOpen&&D==="connect_ledger"&&(ne==="Completed"?g.trackOnboardingQBOConnectionSuccess(G.current.realmId,G.current.connectionId):g.trackOnboardingQBOConnectionFailed(G.current.realmId,G.current.connectionId,h.externalConnections?.saveOAuthConnectionError?.message??""),c(me({isQBOPopupOpen:!1})))}),[ne,Be,V.isQBOPopupOpen,D,g,c]),d.useEffect((()=>{C==="Completed"&&m&&(c(un({step:"connect_ledger"})),c(me({isQBOPopupOpen:!0})))}),[m,C]),d.useEffect((()=>{r==="Not-Started"&&c(Qn(!0))}),[r,c]);const bn=X(R.companyDetailsLocalData?.addressStatus);d.useEffect((()=>{R.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&R.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&bn==null&&c(ln({addressType:"company_registered_address",addressToCreate:R.companyDetailsLocalData?.addressStatus?.addressToCreate}))}),[R.companyDetailsLocalData?.addressStatus?.addressToCreate,R.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const Cn=R.isInterimEmailSent,je=z.getSignedInUser();if(je==null)throw Error("Can't access onboarding flow without signing in...");const Sn=Ee(U,h),In=Ae(h),Ue=h.company?.companyOnboardingInfo.isOnboardingCompleted,Fe=y=>y.trackPageLoaded(ve.Event.onboardingPage),ye=h.productSettings.isOtherProductsEnabled,kn=ye===!0&&!pn(h),On=h.productSettings.isTreasuryEnabled,Ve=Vt({tenantEmailDomain:O??"",signedInUserEmail:je.userEmail??"",companyId:M}),Re=(({companyId:y})=>{const K=se(),de=E((j=>j.onboardingCustomerViewState?.aiAgentsActivation)),te=E((j=>Y(j).company?.companyOnboardingInfo?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1)),he=d.useCallback((()=>{K(Vn())}),[K]);d.useEffect((()=>{he()}),[he]);const Le=d.useCallback((()=>{y==null||y===""||te||K(Rn(y))}),[y,te,K]),vn=d.useMemo((()=>{if(y==null||y==="")return[];const j=`private-encrypted-${y}`;return[`${j}.ledger-ingestion.counts-updated`,`${j}.ai-agents-activation.phase-changed`]}),[y]),_n=d.useCallback(((j,ae)=>{if(ae==null||typeof ae!="object")return;const I=ae;if(j!=="ledger-ingestion.counts-updated"){if(j==="ai-agents-activation.phase-changed"){const ue=typeof I.phase_key=="string"?I.phase_key:typeof I.key=="string"?I.key:"",Z=typeof I.status=="string"?I.status:"idle";if(ue==="")return;K(Nn({key:ue,status:Z==="starting"||Z==="building"||Z==="ready"?Z:"idle",startedAt:typeof I.started_at=="string"?I.started_at:void 0,completedAt:typeof I.completed_at=="string"?I.completed_at:void 0}))}}else K(Ln({customerCount:typeof I.customer_count=="number"?I.customer_count:void 0,glAccountCount:typeof I.gl_account_count=="number"?I.gl_account_count:void 0,targetTransactionCount:typeof I.target_transaction_count=="number"?I.target_transaction_count:void 0,transactionCount:typeof I.transaction_count=="number"?I.transaction_count:void 0,vendorCount:typeof I.vendor_count=="number"?I.vendor_count:void 0}))}),[K]);return Ut({events:vn,onEvent:_n,onSubscribed:he}),d.useMemo((()=>{const j=de?.phases??[],ae=We(j,Se),I=We(j,Ie),ue=Xe(j,Se),Z=Xe(j,Ie),Ne=j.some((En=>En.status!=="idle")),oe=!te&&!Ne,$e=te&&!Ne,Tn=$e?Se.map((()=>"building")):ae,xn=$e?Ie.map((()=>"building")):I;return{ledgerRowStatuses:oe?void 0:Tn,backgroundRowStatuses:oe?void 0:xn,showLedgerReadyInLabel:oe?void 0:ue,showBackgroundReadyInLabel:oe?void 0:Z,forceContinueEnabled:!oe||void 0,counts:de?.counts,onContinueClicked:Le}}),[de?.phases,de?.counts,te,Le])})({companyId:M});if(Ue===!0){if(!ye)return On?s.jsx(Q,{to:"../../treasury"}):Sn?s.jsx(Q,{to:"../../checking"}):In?s.jsx(Q,{to:"../../cards"}):s.jsx(Q,{to:"../../dashboard"});const y=R.updateStatus.fetchState==="In-Progress";if(ye&&!y)return e?s.jsxs(Ye,{children:[s.jsx(re,{analytics:g,onLoad:K=>Fe(K)}),s.jsx(nn,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ve,aiAgentsActivationProps:Re,meetingUrl:a("onboarding_overview")}),i!=null?s.jsx(en,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]}):s.jsx(Q,{to:"../../onboarding/thankyou"})}else if(Ue===!1&&P?.loggedInUserRoleMap!=null)return Cn===!0&&kn?s.jsx(Q,{to:"../../onboarding/thankyou"}):s.jsxs(Ye,{children:[s.jsx(re,{analytics:g,onLoad:y=>Fe(y)}),s.jsx(nn,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ve,aiAgentsActivationProps:Re,meetingUrl:a("onboarding_overview")}),i!=null?s.jsx(en,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]});return null},ke="external_integrations",Vt=({tenantEmailDomain:e,signedInUserEmail:l,companyId:i})=>{const a=se(),{pendingAutoFocusTabId:p}=Bt(),{plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v}=jt({companyId:i}),n=E((r=>r.plaidAccountViewState.external_account.plaidConnectionDetails)),t=E((r=>Y(r))),b=E((r=>r.tenantState.fetchState)),o=E((r=>Kn(r,i))),w=E((r=>zn(r,ke))),A=d.useMemo((()=>new Set(w.map((r=>r.additionalInfo)).filter((r=>r!=null)))),[w]),k=t.tenantId,O=fe(t.userRole??[]);d.useEffect((()=>{a(qn(ke))}),[a]);const P=o.externalConnections?.saveAPIKeyConnectionState,_=o.externalConnections?.saveAPIKeyConnectionError?.message,U=X(P);d.useEffect((()=>{U==="In-Progress"&&(P==="Completed"?g.trackIntegrationConnected("chargebee","Onboarding","revenue"):P==="Error"&&g.trackIntegrationConnectFailed("chargebee","Onboarding","revenue",_??""))}),[P,U,_]);const m=o.externalConnections?.saveOAuthConnectionState,C=o.externalConnections?.saveOAuthConnectionError?.message,D=X(m);d.useEffect((()=>{D==="In-Progress"&&(m==="Completed"?g.trackIntegrationConnected("hubspot","Onboarding","revenue"):m==="Error"&&g.trackIntegrationConnectFailed("hubspot","Onboarding","revenue",C??""))}),[m,D,C]);const V=o.externalConnections?.saveConnectorCredentialsStateBySlug,h=X(V);return d.useEffect((()=>{const r=V??{},T=h??{},x=o.externalConnections?.saveConnectorCredentialsErrorBySlug??{};Object.keys(r).forEach((f=>{if(T[f]!=="In-Progress")return;let B;try{B=be(f)}catch{return}r[f]==="Completed"?g.trackIntegrationConnected(B,"Onboarding","payments"):r[f]==="Error"&&g.trackIntegrationConnectFailed(B,"Onboarding","payments",x[f]?.message??"")}))}),[V,h,o]),d.useMemo((()=>({isAdmin:O,analytics:g,referrer:"Onboarding",integrationsView:o,isLoading:b==="In-Progress",notifyMeRegisteredSlugs:A,autoFocusTabId:p??void 0,saveChargeBeeState:o.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:o.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:o.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:o.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:o.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(o.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([r,T])=>[r,T?.message]))),deleteConnectionState:o.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:o.externalConnections?.deleteConnectionError?.message,onConnectGmail:()=>{g.trackIntegrationConnectClicked("gmail","Onboarding","email"),a(Qe(k,"gmail",tn()))},onConnectOutlook:()=>{g.trackIntegrationConnectClicked("outlook","Onboarding","email"),a(Qe(k,"outlook",tn()))},onConnectHubSpot:(r,T)=>{const x=o.externalConnections?.revenue?.find((B=>B.connectionName==="hubspot"))?.connectionId;if(x==null)return;g.trackIntegrationCredentialsSubmitted("hubspot","Onboarding","revenue");const f=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:T,connection_id:x,redirect_uri:f,tenant_id:k})),window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent("oauth crm.objects.deals.read crm.objects.owners.read")}&redirect_uri=${encodeURIComponent(f)}`},onDisconnect:(r,T)=>{const x=[...o.externalConnections?.accounting??[],...o.externalConnections?.payments??[],...o.externalConnections?.revenue??[]].find((B=>B.connectionId===r))?.connectionName;let f;try{f=x!=null?be(x):void 0}catch{f=void 0}f!=null&&g.trackIntegrationDisconnected(f,"Onboarding",T),a(Xn(k,r,Ce(T)))},onNotifyMe:r=>{g.trackIntegrationsNotifyMeClicked("Onboarding",r),a(Wn(ke,r,l))},onReconnectQBO:()=>{ie.init("/onboarding/auth",e),ie.handleClick()},onRefreshClick:()=>{o.integrations.refreshQBO.fetchState!=="In-Progress"&&a(Zn())},onSaveChargeBeeCredentials:(r,T)=>{const x=o.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;x!=null&&(g.trackIntegrationCredentialsSubmitted("chargebee","Onboarding","revenue"),a(Jn(k,x,Ce("revenue"),be("chargebee"),{api_key:r,site:T})))},onSaveConnectorCredentials:r=>{g.trackIntegrationCredentialsSubmitted(r.connectionName,"Onboarding","payments"),a(Hn(k,Ce("payments"),r))},plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v,plaidConnectionDetails:n})),[O,o,b,A,p,k,l,e,a,u,c,v,n])};function tn(){const e=new URL(window.location.href);return e.searchParams.set("onboarding_step","connect_data_source"),e.toString()}function an(e,l,i){let a=`/${e}/onboarding/address`;return a=i!=null?a.concat(`/edit/${l}/${encodeURIComponent(i)}`):a.concat(`/new/${l}`),a}const on=De.div`
27
- display: flex;
28
- height: 100vh;
29
- background-color: ${e=>e.theme.colors.grey4};
30
- `,sn=cn((function(e,l){const{companyId:i,currentTenant:a}=l,p=we(e,i),u=mn(e);return{hasVerifiedBankAccount:(p.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(u.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:fe(a?.userRole??[])&&p.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:z.getSignedInUser(),currentTenant:a}}),(function(e,l){const{currentTenant:i,themeState:a,navigate:p,location:u}=l,{tenantEmailDomain:c}=i;return{onZeniLogoClick:()=>{a.toggle()},handleLogOutClick:()=>{const v=q(u.state?.pathnameStackToGoBack,u.pathname);p("/signout",{replace:!0,state:{pathnameStackToGoBack:v,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleReferralsClick:()=>{p(`/${c}/rewards`)},handleUpdatePaymentAddressDetailClick:()=>{const v=q(u.state?.pathnameStackToGoBack,u.pathname);p(`/${c}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:v,message:"UpdatePaymentAddressDetail"}})}}}))(wt),Rt=()=>{const e=fn(),l=_e(),i=se(),a=Te(),p=yn(),{useFeatureGate:u}=Pe(),{isFeatureEnabled:c}=u(W.isDebitCardFeatureEnabled),{tenantEmailDomain:v}=xe(),n=hn(),[t,b]=d.useState(!1);d.useEffect((()=>{t===!1&&a.state?.message==="OnboardingThankyou"&&b(!0)}),[a.state]);const o=E((m=>Y(m))),w=o.productSettings.isOtherProductsEnabled,A=w===!0&&!pn(o);d.useEffect((()=>{i(gn(k,!1,!A))}),[]);const k=o.companyId??z.getSignedInUserTenant(v)?.companyId;if(n.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const O=Ee(c,o),P=Ae(o),_=E((m=>m.onboardingCustomerViewState.updateStatus.fetchState)),U=o.company?.companyOnboardingInfo.isOnboardingCompleted;if(U!==!0||A)return _==="Completed"&&U===!0&&A&&n?.loggedInUserRoleMap!=null?s.jsxs(on,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingLandingPage,"Onboarding",Ot(o.productSettings))}}),s.jsx(sn,{navigate:l,showUpdatePaymentDetailButton:w,location:a,companyId:k,currentTenant:o,themeState:p,isVisitingFirstTime:t,meetingUrl:e("onboarding_overview")})]}):_==="Completed"&&U===!1&&n?.loggedInUserRoleMap!=null?s.jsxs(on,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingInterimPage)}}),s.jsx(sn,{navigate:l,showUpdatePaymentDetailButton:w,location:a,companyId:k,currentTenant:o,themeState:p,isVisitingFirstTime:t,meetingUrl:e("onboarding_overview")})]}):s.jsx(At,{});{const m={pathnameStackToGoBack:a.state?.pathnameStackToGoBack,message:"activation"};return O?s.jsx(Q,{to:"../../checking",state:m,replace:!0}):P?s.jsx(Q,{to:"../../cards",state:m,replace:!0}):s.jsx(Q,{to:"../../dashboard",state:m,replace:!0})}};function rn(){return typeof Me=="function"?Me():void 0}let pe=0;function Lt(){d.useEffect((()=>{if(!ge.sentryDsn?.trim())return;let e,l=!1,i=0;const a=()=>{e!==void 0&&(clearInterval(e),e=void 0)},p=()=>{const u=rn();return u!==void 0&&(u.flush(),!0)};return pe+=1,p()||(e=setInterval((()=>{i+=1,(l||p()||i>=10)&&a()}),1e3)),()=>{l=!0,a(),pe-=1,queueMicrotask((()=>{pe===0&&(function(){const u=rn();if(u===void 0)return;const c=()=>{if(pe===0)try{u.startBuffering()}catch{}};u.stop().then(c,c)})()}))}}),[])}function pa(){return Lt(),s.jsxs(Dn,{children:[s.jsx(H,{path:"/",element:s.jsx(le,{})}),s.jsx(H,{path:"/billing/edit",element:s.jsx(le,{taxCFOCustomer:!0})}),s.jsx(H,{path:"/thankyou",element:s.jsx(Rt,{})}),s.jsx(H,{path:"/activation",element:s.jsx(Ft,{})}),s.jsx(H,{path:"/address/edit/:addressType/:addressId",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx(Ge,{})})}),s.jsx(H,{path:"/address/new/:addressType",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx(Ge,{})})}),s.jsx(H,{path:"*",element:s.jsx(wn,{})})]})}export{pa as default};
@@ -1 +0,0 @@
1
- import{j as v}from"./liveblocks-BeSMR7a1.js";import{a as u}from"./sentry-Uj7AWjah.js";import{u as y,j as b,l as w,g as A,N}from"./core-BL7rYGUF.js";import{T9 as U,fB as _,gh as k,Ta as L,pO as R,Tb as z}from"./zeni-epic-state-CxdZGPla.js";import{u as O,z as f,L as C,t as I,G as j,b as $}from"./index-E1NwyJIP.js";import"./mui-CPSuUssr.js";import{t as P}from"./getLocaleForTenant-akYNGA2f.js";import"./recharts-BP8J0UHA.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="9e10973a-e042-40b8-8508-08a07badb79f",t._sentryDebugIdIdentifier="sentry-dbid-9e10973a-e042-40b8-8508-08a07badb79f")}catch{}})();const G=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,m="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>U(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(C.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(C.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-BeSMR7a1.js";import{h as w,g as C,j as h,l as A,i as P}from"./core-BL7rYGUF.js";import{Y2 as k,Y9 as _,gD as L,gC as J,gB as K,kL as M,V1 as W,u9 as X,fB as V,XB as D,kJ as F,Y3 as S,Yc as T,kH as G,l2 as j}from"./zeni-epic-state-CxdZGPla.js";import{bK as q,$ as R,O as N,z as U,E as O,a2 as p,y as v,a5 as H,bL as Q,F as Y,bM as ee,p as te}from"./index-E1NwyJIP.js";import{n as Z}from"./mui-CPSuUssr.js";import"./sentry-Uj7AWjah.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dc4dec97-69c6-497c-9dbc-d80a086958b4",e._sentryDebugIdIdentifier="sentry-dbid-dc4dec97-69c6-497c-9dbc-d80a086958b4")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(M(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(W("common")),n!=null&&e(X(n))},onGetOtp:n=>{e(K(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(L(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(q);function z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((d=>k(d,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Z.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,oe=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),d=s.poppedPathname??E();n(d,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(T({data:d}))},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),d=s.poppedPathname??E(0);t.navigate(d,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(Q);function me({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:d}=P(),i=e??s,{useFeatureGate:c}=N(),r=U.getSignedInUser(),b=h((u=>V(u))),g=O(),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h((u=>k(u,i))),{isFeatureEnabled:I}=c(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(H,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(z,{vendorId:i,billId:d}),l.jsx(oe,{location:a,navigate:n,billId:d,vendorId:i,currentTenant:b,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},fe=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},B=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return B(e,"ach",t,n)}function ve(e,t,n){return B(e,"domestic",t,n)}function ge(e,t,n){return B(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},ce=Z.div`
10
- display: flex;
11
- height: 100vh;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${Y.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,de=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:d}=t,{tenantEmailDomain:i}=d;return{onFetchBankName:c=>{e(j(c))},onSaveHandler:c=>{e(G(t.bankAccountContext,c,"us-domestic",s))},onWireDetailsUpdated:c=>{const{bankAccountSection:r}=c;e(T({data:r}))},onCancel:()=>{(()=>{const c=p(o.state?.pathnameStackToGoBack),r=c.poppedPathname??$();a(r,{state:{pathnameStackToGoBack:c.newStack}})})(),e(S())},onAddressClick:c=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const r=se(i,c,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(r,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(F({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const c=p(t.location.state?.pathnameStackToGoBack),r=c.poppedPathname??$(0);t.navigate(r,{state:{pathnameStackToGoBack:c.newStack}})}e(S())}}}))(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:d}=P(),i=e??s,c=U.getSignedInUser(),{useFeatureGate:r}=N(),b=O(),g=h((u=>V(u))),x=p(a.state?.pathnameStackToGoBack),m=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),f=h((u=>k(u,i))),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return m==="billDetail"&&f.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(H,{fetchState:f.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Y.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ce,{windowSize:o,children:[l.jsx(z,{vendorId:i,billId:d}),l.jsx(de,{location:a,navigate:n,billId:d,vendorId:i,currentTenant:g,bankAccountContext:m,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{me as A,xe as D,z as V,fe as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BeSMR7a1.js";import{$ as l,a9 as c,E as f}from"./index-E1NwyJIP.js";import{D as p}from"./mui-CPSuUssr.js";import"./sentry-Uj7AWjah.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="2824c378-4612-492a-96d5-c25aed4d9576",e._sentryDebugIdIdentifier="sentry-dbid-2824c378-4612-492a-96d5-c25aed4d9576")}catch{}})();const u={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BeSMR7a1.js";import{a as d}from"./sentry-Uj7AWjah.js";import{h as V,u as G,g as A,i as q,j as l,N as F,l as R,n as W,o as N}from"./core-BL7rYGUF.js";import{W5 as _,fB as O,Vx as M,mX as X,Rt as I,Wa as Y,V0 as $,lX as z,Ru as S,VC as H,VD as J,V2 as K,V1 as L}from"./zeni-epic-state-CxdZGPla.js";import{b6 as Q,h as U,a2 as Z,p as tt}from"./index-E1NwyJIP.js";import"./mui-CPSuUssr.js";import{d as k}from"./decodeURIComponentSafe-B4a7LpJx.js";import{w as et}from"./withTransactionSidePanel-CPfQcd4u.js";import{f as at,c as nt}from"./routePaths-Cf2E-_nR.js";import"./recharts-BP8J0UHA.js";import"./analytics-DZ6cwnOO.js";import"./plaid-DMXel13h.js";import"./dnd-BsiKGZTJ.js";import"./stripe-cKAAJElX.js";import"./lottie-joMwFamf.js";import"./lexical-BSRawlvX.js";import"./pdf-CcTg_U5O.js";import"./utils-Dn95OB7n.js";import"./useAskAiCfoHostNavButtonProps-CC7G-KyB.js";import"./TransactionDetailScreen-dG3SEGK8.js";import"./useInitialThreadRequest-DifgMaO6.js";import"./expenseAutomationHelper-DfYMglD1.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="d6888d25-15c1-42f6-bae3-fa13497d97e2",a._sentryDebugIdIdentifier="sentry-dbid-d6888d25-15c1-42f6-bae3-fa13497d97e2")}catch{}})();const ot=R((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:z(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=V(),o=G(),c=A(),[m,h]=d.useState(!1),[T,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:x,entityNameEncoded:w}=q(),r=k(x??""),p=k(w??""),f=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=l((n=>O(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(h(!0),o(X(i)))}),[m,f,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&T===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,T,E]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{h(!1),D(!1)},...t}):s.jsx(F,{to:C(j.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(W,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};