@zeniai/web-app-ui 5.3.31-prod → 5.3.31-qa

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 (147) hide show
  1. package/dist/assets/AccountMappingScreen-CupMTigH.js +9 -0
  2. package/dist/assets/AddressRoutes-Dl9VBt3Q.js +1 -0
  3. package/dist/assets/{AddressScreen-lw7TKwyq.js → AddressScreen-7Rdc5zR7.js} +2 -2
  4. package/dist/assets/{AiCfoScreen-DCL1Hzq-.js → AiCfoScreen-DVQ_t0c7.js} +1 -1
  5. package/dist/assets/{AppDrawer-BIgFOgvw.js → AppDrawer-Byg2zZqD.js} +3 -3
  6. package/dist/assets/{BillPayApprovalRoutes-CXiRj9PG.js → BillPayApprovalRoutes-CgUppIio.js} +1 -1
  7. package/dist/assets/{BillPayRoutes-DOVyvcf4.js → BillPayRoutes-CXKpK2bJ.js} +18 -18
  8. package/dist/assets/BusinessVerificationPageScreen-BFOteU2M.js +9 -0
  9. package/dist/assets/{CardsAiCfoScreen-yIiz5h6K.js → CardsAiCfoScreen-v5tU-ZfS.js} +2 -2
  10. package/dist/assets/{ChargeCardRoutes-DiWZ-ZiS.js → ChargeCardRoutes-DwymVb62.js} +7 -7
  11. package/dist/assets/CompanyPassportScreen-utB7lZkj.js +1 -0
  12. package/dist/assets/ConnectionAuthScreen-BwakY8o8.js +11 -0
  13. package/dist/assets/CustomerOnboardingAuthScreen-B6op5KAk.js +1 -0
  14. package/dist/assets/CustomerOnboardingRoutes-saQzhNA9.js +30 -0
  15. package/dist/assets/{DashboardRoutes-DHewAcPg.js → DashboardRoutes-BuLifRpO.js} +3 -3
  16. package/dist/assets/{DefaultTenantHome-BqNVIe7c.js → DefaultTenantHome-CylRFvvL.js} +1 -1
  17. package/dist/assets/DomesticWireDetailScreen-DTFcVLoj.js +18 -0
  18. package/dist/assets/{DrawerScreen-C-8KLRJM.js → DrawerScreen-DqtmYrs5.js} +1 -1
  19. package/dist/assets/EntityDetailRoutes-B8mP-6X6.js +1 -0
  20. package/dist/assets/{ExpenseAutomationRoutes-eoCnwcrW.js → ExpenseAutomationRoutes-Bc3GNKNu.js} +4 -4
  21. package/dist/assets/FeaturePreviewScreen-D0Rb49Tz.js +1 -0
  22. package/dist/assets/HubSpotOAuthCallbackScreen-sTCS8f4W.js +1 -0
  23. package/dist/assets/{InboxNotificationsProvider-5qCqmUI8.js → InboxNotificationsProvider-h7_KMFLu.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-CBnQHbV_.js → InvoicingRoutes-LWSyD852.js} +2 -2
  25. package/dist/assets/{MagicLinkRoutes-eKUojX66.js → MagicLinkRoutes-D0kKwc7o.js} +7 -7
  26. package/dist/assets/MagicLinkSignInScreen-Cdra0aq0.js +12 -0
  27. package/dist/assets/MobileAppDrawer-8-nkE7E_.js +1 -0
  28. package/dist/assets/NotFoundScreen-CRI1U8Gu.js +1 -0
  29. package/dist/assets/NotificationRoutes-CQy37hN8.js +1 -0
  30. package/dist/assets/OAuthConsentScreen-CZkNJkg-.js +1 -0
  31. package/dist/assets/{PandLWithForecastRoutes-CXuH6-lq.js → PandLWithForecastRoutes-DukUJSBr.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-Cb7u9fKa.js → PaymentLinkScreen-rlQGHJ7n.js} +4 -4
  33. package/dist/assets/PeopleRoutes-BgwOdyXO.js +22 -0
  34. package/dist/assets/PerformanceRoutes-svyo7Mn4.js +1 -0
  35. package/dist/assets/{Preview-CJfcRzEF.js → Preview-COZy1LeJ.js} +1 -1
  36. package/dist/assets/QBOConnectionScreen-EiJ0MTW6.js +100 -0
  37. package/dist/assets/ReimbursementApprovalRoutes-DTdueNi4.js +1 -0
  38. package/dist/assets/ReimbursementApprovalRuleDetailScreen-D4A6S06R.js +1 -0
  39. package/dist/assets/ReimbursementRoutes-Dm7xLzMf.js +68 -0
  40. package/dist/assets/{ReportsRoutes-DiYTJu27.js → ReportsRoutes-2q9mo0td.js} +1 -1
  41. package/dist/assets/RewardsRoutes-DFx8wKNx.js +1 -0
  42. package/dist/assets/ScreenRoutes-BrzOIxxI.js +2 -0
  43. package/dist/assets/{SettingsRoutes-BACEcxdy.js → SettingsRoutes-kSj24ojj.js} +7 -7
  44. package/dist/assets/{SetupPagesScreen-BjTv-gJ-.js → SetupPagesScreen-DkEKEkoW.js} +5 -5
  45. package/dist/assets/SignInScreen-DwAgsq79.js +1 -0
  46. package/dist/assets/SignOutScreen-BTQOfvWQ.js +9 -0
  47. package/dist/assets/TaskListScreen-DoPq1Pre.js +9 -0
  48. package/dist/assets/TaskRoutes-BBHdJCV8.js +9 -0
  49. package/dist/assets/TransactionDetailRoutes-DJS8unhL.js +1 -0
  50. package/dist/assets/{TransactionDetailScreen-CYqaDKU1.js → TransactionDetailScreen-DSG2Y77G.js} +2 -2
  51. package/dist/assets/TransactionListRoutes-COZhDXG5.js +1 -0
  52. package/dist/assets/TreasuryRoutes-_vkK34r4.js +37 -0
  53. package/dist/assets/{VendorsRoutes-DHhjevDF.js → VendorsRoutes-B5aggVlr.js} +20 -20
  54. package/dist/assets/WiseConfirmationScreen-QsG4fbOf.js +12 -0
  55. package/dist/assets/{ZeniAccountRoutes-BI1Dy1bu.js → ZeniAccountRoutes-DhzDRtko.js} +9 -9
  56. package/dist/assets/ZeniAccountStatementScreen-DJS9ac9i.js +9 -0
  57. package/dist/assets/{accountMappingHelper-B06MQSKH.js → accountMappingHelper-BxM8NKmK.js} +1 -1
  58. package/dist/assets/{analytics-DZ_IK-Kq.js → analytics-Dx2eSpQ1.js} +1 -1
  59. package/dist/assets/{analyticsHelper-CcegxGUw.js → analyticsHelper-QOEKWZjs.js} +1 -1
  60. package/dist/assets/{core-BZ1rdEBJ.js → core-BGEbI5zp.js} +1 -1
  61. package/dist/assets/{decodeURIComponentSafe-Bqc80Z_5.js → decodeURIComponentSafe-BTr9m2j1.js} +1 -1
  62. package/dist/assets/{dnd-DzXS-Yl8.js → dnd-T8ObM0YX.js} +1 -1
  63. package/dist/assets/{empty-cCNdrc28.js → empty-C3MaU6LT.js} +1 -1
  64. package/dist/assets/{empty-AsM4qApo.js → empty-jTv5TCv9.js} +1 -1
  65. package/dist/assets/{emptyVideoElement-Rzrwu9a7.js → emptyVideoElement-CnJKBKUj.js} +1 -1
  66. package/dist/assets/epic-yA5r9KNk.js +2 -0
  67. package/dist/assets/{expenseAutomationHelper-L0bEaNW0.js → expenseAutomationHelper-DH2BthMK.js} +1 -1
  68. package/dist/assets/{getLocaleForTenant-pNMINwIt.js → getLocaleForTenant-ml8Lv4yj.js} +1 -1
  69. package/dist/assets/{index-BtxI1s-C.js → index-BDlkSmee.js} +1 -1
  70. package/dist/assets/{index-DUwNnz-H.js → index-CMDDlNB5.js} +1 -1
  71. package/dist/assets/{index-CTFYwhi_.js → index-CbVCjNrX.js} +31275 -30310
  72. package/dist/assets/{index-C2_5ePPm.js → index-DAcZO5Zt.js} +2 -2
  73. package/dist/assets/{index-D6ajdYmw.js → index-DIzh5z1j.js} +1 -1
  74. package/dist/assets/{index-BCqMFJBd.js → index-Dkf-udtu.js} +1 -1
  75. package/dist/assets/{index-s3SqlTSi.js → index-DqqFDBxB.js} +1 -1
  76. package/dist/assets/{index-CD2K4LCZ.js → index-Dzir2W9N.js} +1 -1
  77. package/dist/assets/{lexical-CXbrQPvX.js → lexical-DnYH35PF.js} +1 -1
  78. package/dist/assets/{liveblocks-BlM-yJIK.js → liveblocks-KCYiRihD.js} +1 -1
  79. package/dist/assets/{lottie-BRnok4t-.js → lottie-BxK0tlAD.js} +1 -1
  80. package/dist/assets/{mui-BFHFLIBn.js → mui-cunrsbJu.js} +1 -1
  81. package/dist/assets/{pathToGoBack-3nPRQATL.js → pathToGoBack-7_nkp6kb.js} +1 -1
  82. package/dist/assets/{pdf-CCE45QO9.js → pdf-Bh4iBuik.js} +3 -3
  83. package/dist/assets/{pdf-lib-C7pdf7jS.js → pdf-lib-DDl0uYOp.js} +1 -1
  84. package/dist/assets/{plaid-B4PUsiXy.js → plaid-D11-YUGV.js} +1 -1
  85. package/dist/assets/{pusher-CXiKJSqU.js → pusher-C1UmEW13.js} +1 -1
  86. package/dist/assets/{react-DyJyDxfJ.js → react-BbnwHKyH.js} +1 -1
  87. package/dist/assets/{react-DP4ZD9OQ.js → react-BjynOnaH.js} +1 -1
  88. package/dist/assets/{react-BS78iUa1.js → react-Bn1nTL0Z.js} +1 -1
  89. package/dist/assets/{react-DSLLCnPg.js → react-CuAw85RE.js} +1 -1
  90. package/dist/assets/{react-CfJUXWQ6.js → react-DPeHJRL0.js} +1 -1
  91. package/dist/assets/{react-B1sjzw5V.js → react-Yy-vKtml.js} +1 -1
  92. package/dist/assets/{recharts-Cp8vAfrX.js → recharts-BoHacKM2.js} +1 -1
  93. package/dist/assets/{routePaths-B_N5gTZd.js → routePaths-BROTkNnk.js} +1 -1
  94. package/dist/assets/{sentry-CoUvtkTT.js → sentry-KGOKqyMP.js} +1 -1
  95. package/dist/assets/url-B1PKD80i.js +6 -0
  96. package/dist/assets/{url-CnOwCc5F.js → url-UrJjK7No.js} +1 -1
  97. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-RsZy7Pno.js → useAiCfoDashboardSuggestedQuestionsChips-DWsRFeM1.js} +1 -1
  98. package/dist/assets/useAskAiCfoHostNavButtonProps-Y-q0D3Y1.js +1 -0
  99. package/dist/assets/{useChargeCardPusherEvents-BUm4XlrP.js → useChargeCardPusherEvents-BTVOrrSC.js} +1 -1
  100. package/dist/assets/{useDeviceId-Cm20XW3g.js → useDeviceId-Ce2HXhr6.js} +1 -1
  101. package/dist/assets/useEmailConnectResultRefresh-kJ8vXxJr.js +1 -0
  102. package/dist/assets/{useInitialThreadRequest-DLJzdGrt.js → useInitialThreadRequest-D9NMMqdc.js} +1 -1
  103. package/dist/assets/useTaskManagerAccess-COaL31tN.js +1 -0
  104. package/dist/assets/utils-Ckdq4DN5.js +36 -0
  105. package/dist/assets/{withTransactionSidePanel-DeFt4H26.js → withTransactionSidePanel-CZenmQPT.js} +2 -2
  106. package/dist/assets/{zeni-epic-state-CRmviUHA.js → zeni-epic-state-d5rZdIxa.js} +3 -3
  107. package/dist/index.html +1 -1
  108. package/package.json +1 -1
  109. package/dist/assets/AccountMappingScreen-D5SnfpgG.js +0 -9
  110. package/dist/assets/AddressRoutes-DxNwOKyW.js +0 -1
  111. package/dist/assets/BusinessVerificationPageScreen-B3ZQAAhl.js +0 -9
  112. package/dist/assets/CompanyPassportScreen-CZzl3z9T.js +0 -1
  113. package/dist/assets/ConnectionAuthScreen-C42jakDq.js +0 -11
  114. package/dist/assets/CustomerOnboardingAuthScreen-C14qTLI_.js +0 -1
  115. package/dist/assets/CustomerOnboardingRoutes-O_YOoRN1.js +0 -30
  116. package/dist/assets/DomesticWireDetailScreen-CFzZ2YyI.js +0 -18
  117. package/dist/assets/EntityDetailRoutes-0kc30WGx.js +0 -1
  118. package/dist/assets/FeaturePreviewScreen-gRTJmh4o.js +0 -1
  119. package/dist/assets/HubSpotOAuthCallbackScreen-D8IxiMzs.js +0 -1
  120. package/dist/assets/MagicLinkSignInScreen-D9n4aCxk.js +0 -12
  121. package/dist/assets/MobileAppDrawer-Cwqn_b45.js +0 -1
  122. package/dist/assets/NotFoundScreen-75_Gn0cI.js +0 -1
  123. package/dist/assets/NotificationRoutes-BrErGUvj.js +0 -1
  124. package/dist/assets/OAuthConsentScreen-CicUQ_O4.js +0 -1
  125. package/dist/assets/PeopleRoutes-DbLiKITu.js +0 -22
  126. package/dist/assets/PerformanceRoutes-Cs1f1cGn.js +0 -1
  127. package/dist/assets/QBOConnectionScreen-DMWIfg2I.js +0 -100
  128. package/dist/assets/ReimbursementApprovalRoutes-D6JXZy7H.js +0 -1
  129. package/dist/assets/ReimbursementApprovalRuleDetailScreen-DfsoUCdz.js +0 -1
  130. package/dist/assets/ReimbursementRoutes-wJV0bMxF.js +0 -68
  131. package/dist/assets/RewardsRoutes-hsuwRKfr.js +0 -1
  132. package/dist/assets/ScreenRoutes-Dd_1LkfX.js +0 -2
  133. package/dist/assets/SignInScreen-uIYYM64L.js +0 -1
  134. package/dist/assets/SignOutScreen-CDaf30dp.js +0 -9
  135. package/dist/assets/TaskListScreen-J9jUMTBb.js +0 -9
  136. package/dist/assets/TaskRoutes-t8wf1y1X.js +0 -9
  137. package/dist/assets/TransactionDetailRoutes-Cfne4xm1.js +0 -1
  138. package/dist/assets/TransactionListRoutes-CowKNLk5.js +0 -1
  139. package/dist/assets/TreasuryRoutes-Dt8Cgba2.js +0 -37
  140. package/dist/assets/WiseConfirmationScreen-BluQRSGS.js +0 -12
  141. package/dist/assets/ZeniAccountStatementScreen-y7BZNAye.js +0 -9
  142. package/dist/assets/epic-Bave6uHn.js +0 -2
  143. package/dist/assets/url-DpG-51AL.js +0 -6
  144. package/dist/assets/useAskAiCfoHostNavButtonProps-fRSEHozy.js +0 -1
  145. package/dist/assets/useEmailConnectResultRefresh-BHeKh6Ep.js +0 -1
  146. package/dist/assets/useTaskManagerAccess-D9-djiWT.js +0 -1
  147. package/dist/assets/utils-BKpHrBI5.js +0 -36
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-CTFYwhi_.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CoUvtkTT.js"><link rel="modulepreload" crossorigin href="/assets/core-BZ1rdEBJ.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-CRmviUHA.js"><link rel="modulepreload" crossorigin href="/assets/mui-BFHFLIBn.js"><link rel="modulepreload" crossorigin href="/assets/analytics-DZ_IK-Kq.js"><link rel="modulepreload" crossorigin href="/assets/utils-BKpHrBI5.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-CbVCjNrX.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-KGOKqyMP.js"><link rel="modulepreload" crossorigin href="/assets/core-BGEbI5zp.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-d5rZdIxa.js"><link rel="modulepreload" crossorigin href="/assets/mui-cunrsbJu.js"><link rel="modulepreload" crossorigin href="/assets/analytics-Dx2eSpQ1.js"><link rel="modulepreload" crossorigin href="/assets/utils-Ckdq4DN5.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.31-prod",
3
+ "version": "5.3.31-qa",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -1,9 +0,0 @@
1
- import{j as B}from"./liveblocks-BlM-yJIK.js";import{a as o}from"./sentry-CoUvtkTT.js";import{h as K,g as W,u as X,j as m,s as q,l as Y}from"./core-BZ1rdEBJ.js";import{ag as Z,I as ee,d as G,z as te,q as $,ah as ne,k as ae,S as ce}from"./index-CTFYwhi_.js";import{bn as se,fB as oe,gS as ie,of as H,TD as re,i5 as J,gd as le,o6 as ue,TE as de,TF as pe,tg as ge,lF as me,o4 as Ae,o0 as be,ob as fe,i7 as Ie,TG as ye,TH as Se}from"./zeni-epic-state-CRmviUHA.js";import{n as he}from"./mui-BFHFLIBn.js";import{M as Ee}from"./MobileAppDrawer-Cwqn_b45.js";import{q as R}from"./QBOConnectionScreen-DMWIfg2I.js";import{g as h,a as E,m as ze}from"./accountMappingHelper-B06MQSKH.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]="bc185fe6-1781-438d-8ff9-01654a7178b6",a._sentryDebugIdIdentifier="sentry-dbid-bc185fe6-1781-438d-8ff9-01654a7178b6")}catch{}})();const l="zeni_pending_projects_enable",u={pending:"pending",ready:"ready"},ve=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
- `,we=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(l),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:A}=e;return{onAccountMappingChange:r=>{const{uncategorizedAccountSection:d,billsAccountSection:z,reimbursementsAccountSection:v,vendorsAccountSection:w,filing1099Section:C}=r,{incomeAccount:x,expenseAccount:F}=d,{billPayAccount:s}=z,{reimbursementsAccount:T}=v,{prepaidExpensesAccount:p,fixedAssetsAccount:V,accruedExpensesAccount:O}=w,{bankAccount:M,expenseCategory1099:k}=C,b=h(e.accountMappingView.incomeAccountList,x.selectedOption),_=h(e.accountMappingView.expenseAccountList,F.selectedOption),f=h(e.accountMappingView.billPayAccountList,s.selectedOption),j=h(e.accountMappingView.reimbursementsAccountList,T.selectedOption),P=E(e.accountMappingView.prepaidExpensesAccountList,p.selectedOptions),D=E(e.accountMappingView.fixedAssetsAccountList,V.selectedOptions),I=E(e.accountMappingView.accruedExpensesAccountList,O.selectedOptions),L=E(e.accountMappingView.bankAccounts1099FilingAccountList,M.selectedOptions),y=ze(e.accountMappingView.expenseAccounts1099FilingAccountList,k),t={selectedIncomeAccountId:b?.accountId,selectedExpenseAccountId:_?.accountId,selectedBillPayAccountId:f?.accountId,selectedReimbursementsAccountId:j?.accountId,selectedPrepaidExpensesAccountIds:P.map((n=>n.accountId)),selectedFixedAssetsAccountIds:D.map((n=>n.accountId)),selectedAccruedExpensesAccountIds:I.map((n=>n.accountId)),selectedBankAccounts1099FilingAccountIds:L.map((n=>n.accountId)),selectedExpenseAccounts1099FilingAccountIds:y};a(Se({data:t}))},onBackClick:()=>{$(c)===!1?(i("../../dashboard"),a(ye())):a(J())},onSaveClick:()=>{a(Ie()),A&&ae.track(ce.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:r=>{a(fe(e.currentTenant.companyId,r))},onAccountingProjectsToggle:r=>{const d=sessionStorage.getItem(l);d===u.pending||d===u.ready||a(r?Ae(e.currentTenant.companyId):be(e.currentTenant.companyId))}}}))(ne),je=()=>{const a=Z(),e=K(),i=W(),c=X(),{useFeatureGate:A,useDynamicConfig:r}=ee(),{isFeatureEnabled:d}=A(G.isFiling1099FeatureEnabled),{isFeatureEnabled:z}=A(G.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:v,isDynamicConfigLoading:w}=r("transaction_categorization_config"),C=!w&&v?.capitalization_enabled===!0,x=te.getSignedInUser(),F=se(x),s=m((t=>oe(t))),{capitalizableAccounts:T,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??"$"}}),q),M=o.useCallback(((t,n)=>{c(H(s.companyId,t,n))}),[c,s.companyId]),k=o.useCallback((t=>{const n={...p??{}},g=Object.entries(t);for(const[U,N]of g)N===null?delete n[U]:n[U]=N;const[S,Q]=g[0]??[];S!=null&&c(H(s.companyId,S,Q,void 0,Object.keys(n).length>0?n:null))}),[c,s.companyId,p]),b=m((t=>re(t.accountState)),q),_=o.useMemo((()=>{const t={};for(const n of b)n.accountId!=null&&n.accountName!=null&&(t[n.accountId]=n.accountName);return t}),[b]),[f,j]=o.useState(!1),[P,D]=o.useState(!1);o.useEffect((()=>{f===!1&&(c(J()),j(!0))}),[f]);const I=m((t=>t.companyViewState.passportView?.needsQboProjectsReconnect===!0));o.useEffect((()=>{sessionStorage.getItem(l)===u.pending&&(sessionStorage.removeItem(l),c(le({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})))}),[c]),o.useEffect((()=>{sessionStorage.getItem(l)===u.ready&&s?.companyId!=null&&(sessionStorage.removeItem(l),c(ue(s.companyId)))}),[s?.companyId,c]),o.useEffect((()=>{I&&s?.tenantEmailDomain!=null&&(sessionStorage.setItem(l,u.pending),c(de()),R.init("/connection/auth",s.tenantEmailDomain),R.handleClick())}),[I,s?.tenantEmailDomain,c]);const L=m((t=>pe(t))),y=t=>{D(t)};return B.jsxs(ve,{children:[B.jsx(Ee,{isAppContentDrawerOpen:P,handleDrawerToggle:y}),B.jsx(we,{currentTenant:s,navigate:e,meetingUrl:a("account_mapping"),accountMappingView:L,isFiling1099FeatureEnabled:d&&F,isAccruedExpensesFeatureEnabled:z,isCapitalizationFeatureEnabled:C,capitalizableAccounts:T,accountNamesById:_,capitalizableAccountOverrides:p,currencySymbol:O,isCapitalizationThresholdSaving:V,onSaveCapitalizationAccountThreshold:M,onSaveCapitalizationAccountThresholds:k,location:i,isSettings:$(i),onClickMenuIcon:()=>y(!0)})]})};export{l as P,je as U,u as a};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-BlM-yJIK.js";import{A as o}from"./AddressScreen-lw7TKwyq.js";import i from"./NotFoundScreen-75_Gn0cI.js";import"./sentry-CoUvtkTT.js";import{n as s,o as r}from"./core-BZ1rdEBJ.js";import"./zeni-epic-state-CRmviUHA.js";import"./recharts-Cp8vAfrX.js";import"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.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{a as V}from"./sentry-CoUvtkTT.js";import{u as Y,j as h,h as ne,g as se,i as oe,N as ie,l as re}from"./core-BZ1rdEBJ.js";import{fB as U,GC as ce,Y3 as ue,AG as de,Rk as pe,GS as le,K1 as me,MQ as fe,Nu as ye,Oj as Se,Y4 as ge,Y5 as Ie,Y6 as be,Y7 as he,Y8 as Te,Uj as De,X9 as Oe,Uy as Ce,L5 as ke,Uz as Ve,L9 as Ae,ml as we,gD as Ne,gC as Fe,gB as _e,u1 as ve,tU as xe,tR as Ee,md as Be,AP as Ue,AN as z,bE as R,A$ as P,cD as ze}from"./zeni-epic-state-CRmviUHA.js";import{bQ as Re,U as Pe,I as Le,bg as je,z as B,a6 as Me,k as L,q as x,S as E,bS as Ge,ac as Ye,p as j,aE as M}from"./index-CTFYwhi_.js";import{n as qe}from"./mui-BFHFLIBn.js";import{j as k}from"./liveblocks-BlM-yJIK.js";import{d as G}from"./routePaths-B_N5gTZd.js";import{M as $e}from"./MobileAppDrawer-Cwqn_b45.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="fabe978e-a32c-442c-9ba0-18b8815907d3",t._sentryDebugIdIdentifier="sentry-dbid-fabe978e-a32c-442c-9ba0-18b8815907d3")}catch{}})();function nt(){const t=Y(),u=h((r=>U(r))),n=u?.tenantId,{isApprovalRulesV3Enabled:i,isLoading:d}=Re(n),p=h((r=>r.billPaySetupApproverViewState.fetchState));V.useEffect((()=>{n==null||d||p==="Not-Started"&&t(ce(!0,!0,i))}),[n,d,i,p,t])}const Qe=qe.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${t=>t.theme.colors.grey4};
9
- `,Ze=re((function(t,u){const{businessVerificationDetails:n}=u,i=U(t),d=B.getSignedInUser(),p=i.tenantId,r={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:p??""},T=De(u.roleMap)&&n.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Oe(t.companyConfigState),s=Ce(t.userRoleConfigState);return{businessVerificationDetails:n,verficationDetailsFetchState:n.fetchState,isRefreshingViewInBackground:n.isRefreshingViewInBackground,allNationalityCountries:n.allNationalityCountries,filesEndPoint:`${Ye.fileMicroServiceBaseUrl}`,authParams:r,isDisabled:T,allIndustries:e.companyIndustries??[],companyTitles:s.companyTitles}}),(function(t,u){const{companyId:n,productType:i,currentTenant:d,navigate:p,location:r}=u,{tenantEmailDomain:T}=d;return{onCompanyDetailsChanged:e=>{const{companyDescription:s,companyIndustry:m,companyIndustryType:O,companyLegalName:C,companyTaxId:g,companyWebsite:y,companyPhone:I,primaryContactEmail:c,primaryContactName:o,primaryContactUserId:l,primaryContactSyncToken:D,syncToken:S,fileIds:a,incDate:f,typeOfIncorporation:A,stateOfIncorporation:w,sourceOfFunds:N,companySubIndustry:F,countriesOfOperations:b,companySourceOfFunds:q,companySourceOfFundsDescription:$,transactionVolume:Q,transactionVolumeDescription:Z,purposeOfAccount:K,purposeOfAccountDescription:W,regulatedStatus:X,regulatedStatusDescription:H,usNexus:J,usNexusTypes:ee}=e,_=O?.selectedOption,te={companyId:n,companyDescription:s,companyIndustry:m.selectedOption,companyIndustryType:_==null||_===""?void 0:_,companyLegalName:C,taxIdOrEIN:g,website:y!=""&&y!=null?ze(y):void 0,phone:I,syncToken:S,fileIds:a,incDate:f!=null?R(f?.toString()):f,typeOfIncorporation:A?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:b?.selectedOptions.map((v=>v.length===2?v:M(v)))??[],companySourceOfFunds:q?.selectedOption??"",companySourceOfFundsDescription:$,transactionVolume:Q?.selectedOption??"",transactionVolumeDescription:Z,purposeOfAccount:K?.selectedOption??"",purposeOfAccountDescription:W,regulatedStatus:X??"",regulatedStatusDescription:H,usNexus:J,usNexusTypes:ee?.selectedOptions??[]},ae={userId:l,firstName:o.firstName,lastName:o.lastName,email:c,syncToken:D};t(P({companyDetails:te,primaryContactDetails:ae}))},onCompanyOfficerUpdated:e=>{const s=e.map((m=>{const{officerType:O,userId:C,name:g,email:y,nationalityCountryCode:I,ssn:c,dob:o,phone:l,syncToken:D,selectDocument:S,role:a,ownership:f,isSelectedForVerification:A,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F}=m;let b;return S.selectDocumentType==="driverLicense"?b="driving_license":S.selectDocumentType==="passport"?b="passport":S.selectDocumentType==="stateId"?b="id_document":S.selectDocumentType==="ssnCard"&&(b="social_security_card"),{officerType:O,userId:C,firstName:g.firstName,lastName:g.lastName,email:y,ssn:c,nationalityCountryCode:I?.selectedOption!=null?M(I.selectedOption):void 0,phone:l,birthday:o!=null?R(o?.toString()):o,syncToken:D,titleAtCompany:a.selectedOption,ownershipInCompany:f,documentTypeSelectedForVerification:b,isSelectedForVerification:A,userVerificationStatus:w,treasuryUserVerificationStatus:N,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));t(P({officers:s}))},onSaveDetailsClick:e=>{t(z(n,e,i))},onSendForVerificationClick:e=>{t(z(n,e,i,!0))},onAddressClick:e=>{const s=G(T,e),m=j(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:e=>{const s=G(T,e),m=j(r.state?.pathnameStackToGoBack,r.pathname);p(s,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{t(Ue({companyId:n})),p("../setup")},updateFilesEntity:e=>{t(Be({files:e}))},onDeleteFile:e=>{t(Ee(e))},onDeleteFileList:e=>{t(xe(e))},onEditFileName:(e,s)=>{t(ve(e,s.split(".")[0]))},onGetOtp:e=>{t(_e(e,"SpendManagementSetup"))},onResendOtp:e=>{t(Fe(e,"SpendManagementSetup"))},onVerifyOtp:(e,s)=>{t(Ne(e,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(e,s)=>{t(we({addressType:e,addressToCreate:s}))},onIdentityDocumentUploadedForAutofill:e=>{if(n==null)return;const s=Ve(e.documentType);s!=null&&t(Ae({target:"setup",companyId:n,officerType:e.officerType,fileId:e.fileId,documentType:s}))},onCompanyDocumentUploadedForAutofill:e=>{n!=null&&t(ke({target:"setup",companyId:n,fileId:e.fileId,documentType:e.documentType}))}}}))(Ge),st=({productType:t})=>{const u=ne(),n=se(),i=Y(),[d,p]=V.useState(!1),[r,T]=V.useState(!1),{tenantEmailDomain:e}=oe(),s=Pe(),{useDynamicConfig:m}=Le(),{configValue:O}=m(je.zeniAccountsConfig),C=ue(O),g=h((a=>{switch(t){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}})),y=h((a=>a.companyConfigState.fetchState)),I=h((a=>a.userRoleConfigState.fetchState)),c=h((a=>U(a))),o=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(V.useEffect((()=>{y==="Not-Started"&&i(de()),I==="Not-Started"&&i(pe(!0))}),[y,I,i]),V.useEffect((()=>{if(!d&&g==="Not-Started"&&o!=null)switch(p(!0),t){case"zeni_accounts":i(Se(o,!0));break;case"zeni_treasury":i(ye(o,!0));break;case"reimbursement":i(fe(o,!0));break;case"charge_cards":i(me(o,!0));break;default:i(le(o,!0))}}),[d,g,o,i]),B.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let l;switch(t){case"zeni_accounts":l=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":l=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":l=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":l=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:l=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const D=a=>{T(a)},S=h((a=>{switch(t){case"zeni_accounts":return Te(a,o);case"zeni_treasury":return he(a,o);case"charge_cards":return be(a,o);case"reimbursement":return Ie(a,o);default:return ge(a,o)}}));return l===!1?k.jsx(ie,{to:"../promo"}):k.jsxs(Qe,{children:[k.jsx(Me,{analytics:L,onLoad:a=>(f=>{switch(t){case"zeni_accounts":return f.trackPageLoaded(E.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return f.trackPageLoaded(E.Event.reimbursementBusinessVerification);default:return f.trackPageLoaded(E.Event.billPayBusinessVerification,x(n)?"Settings":void 0)}})(a)}),x(n)?k.jsx($e,{isAppContentDrawerOpen:r,handleDrawerToggle:D}):null,k.jsx(Ze,{businessVerificationDetails:S,navigate:u,location:n,companyId:o,analytics:L,currentTenant:c,productType:t,isSettings:x(n),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{D(!0)},maxInsuredAmount:C.maxInsuredAmount})]})};export{st as B,nt as u};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-BlM-yJIK.js";import{a as g}from"./sentry-CoUvtkTT.js";import{h as w,u as k,g as x,i as T,j as O,l as E}from"./core-BZ1rdEBJ.js";import{z as C,bp as F,a6 as P,k as A,S as V,q as b,bq as j,ac as L,aE as U,p as B}from"./index-CTFYwhi_.js";import{fB as N,gF as M,AG as R,gA as _,c7 as G,X9 as z,bn as q,u1 as X,tR as Y,md as Z,nO as S,Xa as H,bE as $,cD as D,nZ as J,o7 as K}from"./zeni-epic-state-CRmviUHA.js";import"./mui-BFHFLIBn.js";import{d as Q}from"./routePaths-B_N5gTZd.js";import{M as W}from"./MobileAppDrawer-Cwqn_b45.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="daf62152-8d7b-42bd-8aaf-9adc11391803",n._sentryDebugIdIdentifier="sentry-dbid-daf62152-8d7b-42bd-8aaf-9adc11391803")}catch{}})();const ee=E((function(n){const t=_(n),i=C.getSignedInUser(),p=N(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:l,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:q(i)}}),(function(n,t){const{companyId:i,currentTenant:p,navigate:c,location:l}=t,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(K())},onAddressClick:e=>{const a=Q(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?D(u):void 0,meetingLink:y!=""&&y!=null?D(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(H(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(Z({files:e}))},onDeleteFile:e=>{n(Y(e))},onEditFileName:(e,a)=>{n(X(e,a.split(".")[0]))}}}))(j);function de(){const n=w(),t=k(),i=x(),{tenantEmailDomain:p}=T(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),a=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>N(s))),d=r.companyId??C.getSignedInUserTenant(p)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||a!=="Not-Started"||d==null||(l(!0),t(M(d)))}),[c,a,d,t]),g.useEffect((()=>{o==="Not-Started"&&t(R())}),[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:A,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(W,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-BlM-yJIK.js";import{a as o}from"./sentry-CoUvtkTT.js";import{u as R,h as k,g as H,j as C,N as j}from"./core-BZ1rdEBJ.js";import{SV as q,fB as z,gh as G,pw as V,gJ as A,gg as B,ge as J,Tf as K,gd as O}from"./zeni-epic-state-CRmviUHA.js";import{u as Q,z as E,L as D,G as M,K as W}from"./index-CTFYwhi_.js";import{n as X}from"./mui-BFHFLIBn.js";import{P as h,a as _}from"./AccountMappingScreen-D5SnfpgG.js";import{t as Y}from"./getLocaleForTenant-pNMINwIt.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-DMWIfg2I.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./MobileAppDrawer-Cwqn_b45.js";import"./InboxNotificationsProvider-5qCqmUI8.js";import"./useTaskManagerAccess-D9-djiWT.js";import"./accountMappingHelper-B06MQSKH.js";import"./empty-AsM4qApo.js";import"./pdf-lib-C7pdf7jS.js";import"./index-BCqMFJBd.js";import"./url-DpG-51AL.js";import"./index-s3SqlTSi.js";import"./decodeURIComponentSafe-Bqc80Z_5.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]="2090b9db-1f32-4376-a169-e6361ec22e6f",t._sentryDebugIdIdentifier="sentry-dbid-2090b9db-1f32-4376-a169-e6361ec22e6f")}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 je(){const t=R(),i=k(),v=H(),{setLoading:c,clearAllLoading:m}=Q(),S=o.useRef(!1),b=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:U,realmId:$,state:L}=Z(v.search),f=U!==""&&$!==""&&L!=="";f&&(N.current=!0);const w=sessionStorage.getItem(h),u=w===_.pending,F=w===_.ready,x=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(D.CONNECTION_AUTH)}),[c]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(c(D.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,c]),o.useEffect((()=>{e.tenantId==null&&!b.current&&a!=null&&(b.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(V(a.userId)))}),[b,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(c(D.CONNECTION_AUTH),t(A(a.userId,e.tenantId)))}),[d]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(B(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),J(a?.userId,a?.zeniSessionId,e.tenantId),M.updateAppLocaleID(Y(K(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||a==null||e==null||t(A(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{x.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(x.tenantsCoreDetailsInOrder)}),[x.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"&&(p.current=!0)}),[u,d]),o.useEffect((()=>{if(!u||T)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&d==="Completed"?(sessionStorage.setItem(h,_.ready),m(),void i(s,{replace:!0})):p.current&&d==="Error"?(sessionStorage.removeItem(h),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(f||N.current||p.current||y!==!0||(sessionStorage.removeItem(h),t(O({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,T,d,f,y,e.tenantEmailDomain,m,t,i]),T)return null;if(f||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const P=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return F?I.jsx(j,{to:P,replace:!0}):I.jsx(j,{to:"/",replace:!0})}export{je as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BlM-yJIK.js";import{z as a}from"./index-CTFYwhi_.js";import{g as n}from"./QBOConnectionScreen-DMWIfg2I.js";import"./sentry-CoUvtkTT.js";import{g as p,N as s}from"./core-BZ1rdEBJ.js";import"./zeni-epic-state-CRmviUHA.js";import"./recharts-Cp8vAfrX.js";import"./mui-BFHFLIBn.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./empty-AsM4qApo.js";import"./pdf-lib-C7pdf7jS.js";import"./index-BCqMFJBd.js";import"./url-DpG-51AL.js";import"./index-s3SqlTSi.js";import"./decodeURIComponentSafe-Bqc80Z_5.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-BlM-yJIK.js";import{t as At,A as Ge}from"./AddressScreen-lw7TKwyq.js";import Et from"./NotFoundScreen-75_Gn0cI.js";import{a as d,t as Me}from"./sentry-CoUvtkTT.js";import{h as _e,g as Te,u as se,i as xe,j as A,N as Q,q as wt,l as it,n as Pt,o as H}from"./core-BZ1rdEBJ.js";import{fB as Y,dV as Ae,dU as Ee,bq as Dt,T7 as jt,bR as Ut,pu as Bt,Aq as Ft,At as Rt,Us as Vt,Ut as Lt,l8 as Oe,lb as ct,TI as Nt,b_ as $t,c7 as fe,AU as we,AF as Gt,Uu as me,AV as dt,Rk as Mt,ml as ut,de as lt,Uv as Qt,Uw as Kt,tK as zt,Tw as Ce,hS as qt,Tv as be,hP as Ht,Fi as Zt,tO as Jt,hH as Wt,hK as Qe,Ux as pt,Uy as Xt,L5 as Yt,Uz as en,L9 as tn,Aw as nn,UA as an,UB as on,l6 as sn,l9 as rn,B5 as cn,AH as mt,AT as dn,bE as Ke,cD as un,B4 as ze,u1 as ln,tR as pn,md as mn,gD as gn,gC as fn,gB as yn,UC as hn,Az as Cn,B6 as bn,B9 as Sn,Bc as In,Bi as kn,df as On}from"./zeni-epic-state-CRmviUHA.js";import{z,I as Pe,d as W,F as vn,p as q,a6 as re,k as g,aC as _n,ag as gt,$ as Tn,c as ft,U as yt,j as X,X as ge,S as ve,aD as xn,K as qe,x as He,ac as An,aE as Ze,aF as En,aG as wn}from"./index-CTFYwhi_.js";import{n as De}from"./mui-BFHFLIBn.js";import{g as Pn,h as Dn,q as ie}from"./QBOConnectionScreen-DMWIfg2I.js";import{u as jn,a as Un}from"./useEmailConnectResultRefresh-BHeKh6Ep.js";import{u as Bn}from"./useChargeCardPusherEvents-BUm4XlrP.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./empty-AsM4qApo.js";import"./pdf-lib-C7pdf7jS.js";import"./index-BCqMFJBd.js";import"./url-DpG-51AL.js";import"./index-s3SqlTSi.js";import"./decodeURIComponentSafe-Bqc80Z_5.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]="9bf3ca53-b53a-4dba-b168-3d59e94d0989",e._sentryDebugIdIdentifier="sentry-dbid-9bf3ca53-b53a-4dba-b168-3d59e94d0989")}catch{}})();const Je=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Fn=()=>{const e=_e(),l=Te(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),t=z.getSignedInUser(),{useFeatureGate:n}=Pe(),{isFeatureEnabled:C}=n(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=n(W.isArAgingFeatureEnabled),{isFeatureEnabled:w}=n(W.isReferralFeatureEnabled),{isFeatureEnabled:E}=n(W.isDebitCardFeatureEnabled),k=vn(),O=A((S=>Y(S))),P=A((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,B=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(t==null)throw Error("Can't access onboarding flow without signing in...");const m=Ae(E,O),b=Ee(O),D=[],R=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&Dt(O?.userRole),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;R===!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=A((S=>{const F=[];C===!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 Z=jt(S,F);return Ut(Z.reportsInOrder.map((G=>({fetchState:G.fetchState,error:G.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Bt(t.userId,B,O.tenantId,!0,!1,D)))}),[a,P,m,b,t,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),$=d.useCallback((()=>{j.current||(j.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||b||!u||f!=="Completed"&&f!=="Error"||$()}),[u,f,m,b,$]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Je(L?.businessVerified?.status),isKycDone:Je(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(_n,{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
- `,et=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
- `,tt=it((function(e,l){const{companyId:i,isAdmin:a,currentTenant:p,isOnAddressPage:u}=l,c=z.getSignedInUser(),v=p.tenantId,t={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:v??""},n=Y(e),C=we(e,i),o=pt(e),w=fe(p?.userRole??[])&&C.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",E=Xt(e.userRoleConfigState);return{onboardingCustomerView:C,analytics:g,isRefreshingViewInBackground:!1,isDisabled:w,companyTitles:E.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:An.fileMicroServiceBaseUrl,authParams:t},signedInUser:z.getSignedInUser(),currentTenant:n,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:(t,n)=>{e(kn(t,n))},onEstablishConnectionClick:(t,n)=>{e(In(t,n))},onUpdatePaymentAccountStatus:(t,n,C)=>{e(Sn(t,n,C))},onUpdatePaymentAccountLoginStatus:(t,n)=>{e(bn(!1,t,n))},onEstablishConnectionSuccess:()=>{e(Cn(i,!0,!1))},handleOnConnectClick:()=>{g.trackOnboardingConnectQBO(),ie.handleClick()},updateQBOPopupState:t=>{e(me({isQBOPopupOpen:t}))},onCompanyOfficerUpdated:t=>{const n=t.map((C=>{const{officerType:o,userId:w,name:E,email:k,ssn:O,nationalityCountryCode:P,dob:_,phone:B,syncToken:m,selectDocument:b,role:D,ownership:R,isSelectedForVerification:h,userVerificationStatus:r,fileIds:T,isPhoneVerified:x}=C;let f;return b.selectDocumentType==="driverLicense"?f="driving_license":b.selectDocumentType==="passport"?f="passport":b.selectDocumentType==="stateId"?f="id_document":b.selectDocumentType==="ssnCard"&&(f="social_security_card"),{officerType:o,userId:w,firstName:E.firstName,lastName:E.lastName,email:k,ssn:O,nationalityCountryCode:P?.selectedOption!=null?Ze(P.selectedOption):void 0,phone:B,birthday:_!=null?Ke(_?.toString()):_,syncToken:m,titleAtCompany:D.selectedOption,ownershipInCompany:R,documentTypeSelectedForVerification:f,isSelectedForVerification:h,userVerificationStatus:r,fileIds:T,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:x}}));e(ze({officers:n}))},onGetOtp:(t,n)=>{e(yn(t,"CustomerOnboarding")),n!=null&&e(hn({officerType:n,phone:t}))},onResendOtp:t=>{e(fn(t,"CustomerOnboarding"))},onVerifyOtp:(t,n)=>{g.trackOnboardingPhoneVerified(),e(gn(t,n,"CustomerOnboarding"))},updateFilesEntity:t=>{e(mn({files:t}))},onDeleteFile:t=>{e(pn(t))},onEditFileName:(t,n)=>{e(ln(t,n.split(".")[0]))},onCompanyDetailsChanged:t=>{const{companyDescription:n,companyIndustry:C,companyIndustryType:o,companyLegalName:w,companyTaxId:E,companyWebsite:k,companyPhone:O,primaryContactEmail:P,primaryContactName:_,primaryContactUserId:B,primaryContactSyncToken:m,syncToken:b,fileIds:D,typeOfIncorporation:R,stateOfIncorporation:h,incDate:r,companySourceOfFunds:T,companySourceOfFundsDescription:x,companySubIndustry:f,countriesOfOperations:j,purposeOfAccount:N,purposeOfAccountDescription:$,regulatedStatus:L,regulatedStatusDescription:ee,transactionVolume:S,transactionVolumeDescription:F,usNexus:Z,usNexusTypes:G}=t,M={companyId:i,companyDescription:n,companyIndustry:C.selectedOption,companyIndustryType:o?.selectedOption??"",companyLegalName:w,taxIdOrEIN:E,website:k!=""&&k!=null?un(k):void 0,phone:O,syncToken:b,fileIds:D,incDate:r!=null?Ke(r?.toString()):r,typeOfIncorporation:R?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",companySourceOfFunds:T?.selectedOption??"",companySourceOfFundsDescription:x,companySubIndustry:f?.selectedOption??"",countriesOfOperations:j?.selectedOptions.map((V=>V.length===2?V:Ze(V)))??[],purposeOfAccount:N?.selectedOption??"",purposeOfAccountDescription:$,regulatedStatus:L??"",regulatedStatusDescription:ee,transactionVolume:S?.selectedOption??"",transactionVolumeDescription:F,usNexus:Z,usNexusTypes:G?.selectedOptions??[]},ce={userId:B,firstName:_.firstName,lastName:_.lastName,email:P,syncToken:m};e(ze({companyDetails:M,primaryContactDetails:ce}))},onAddressClick:(t,n)=>{const C=at(v,t,n),o=q(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:o}})},onRegisteredAddressClick:(t,n)=>{const C=at(v,t,n),o=q(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:o}})},onUpdateCustomerView:(t,n,C)=>{e(dn(i,!1,n,C,t))},onAddressEditHandler:t=>{if(t!=null){const n=At(t);e(ut({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const t=q(c.state?.pathnameStackToGoBack,c.pathname);e(mt(i,!1,!1)),u("./activation",{state:{pathnameStackToGoBack:t}})},onUpdateStep:t=>{e(dt({step:t}))},onUpdateSubStep:t=>{e(cn({subStep:t}))},onZeniLogoClick:()=>{p.toggle()},handleLogOutClick:()=>{const t=q(c.state?.pathnameStackToGoBack,c.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:t,message:"logout"}})},handleCockpitClick:()=>{g.trackOnboardingFlowExited("cockpit"),window.open("/cockpit")},handleReferralsClick:()=>{u(`/${v}/rewards`)},handleCreateCardSetupIntent:t=>{e(ct(t))},handleConfirmCardSetupIntent:t=>{e(rn(t))},updateCardPaymentModalState:t=>{e(me({isCardPaymentPopupOpen:t}))},handleAddCardPaymentSource:(t,n,C)=>{e(sn(t,n,C))},handleFetchPaymentSources:()=>{e(Oe())},resetCardPaymentViewState:()=>{e(on())},handleResetCardPaymentErrorStatuses:()=>{e(an())},redirectToProductSuitePage:()=>{g.trackOnboardingFlowExited("product_suite");const t=q(c.state?.pathnameStackToGoBack,c.pathname);u(`/${v}/onboarding/thankyou`,{state:{pathnameStackToGoBack:t,message:"OnboardingThankyou"},replace:!0})},onAcknowledgeAiFinanceTeam:()=>{i!=null&&(g.trackOnboardingAiFinanceTeamAcknowledged(),e(nn(i)))},onIdentityDocumentUploadedForAutofill:t=>{if(i==null)return;const n=en(t.documentType);n!=null&&(g.trackOnboardingDocumentUploaded("kyc",n),e(tn({target:"onboarding",companyId:i,officerType:t.officerType,fileId:t.fileId,documentType:n})))},onCompanyDocumentUploadedForAutofill:t=>{i!=null&&(g.trackOnboardingDocumentUploaded("kyb",t.documentType),e(Yt({target:"onboarding",companyId:i,fileId:t.fileId,documentType:t.documentType})))}}}))(xn),le=({taxCFOCustomer:e=!1,isOnAddressPage:l=!1,appContent:i})=>{const a=gt(),p=_e(),u=Te(),c=se(),v=Tn(),t=ft(),[n,C]=d.useState(!1),[o,w]=d.useState(!1),[E,k]=d.useState(!1),{tenantEmailDomain:O}=xe(),P=yt(),{useFeatureGate:_}=Pe(),{isFeatureEnabled:B}=_(W.isDebitCardFeatureEnabled),m=wt("/:tenantEmailDomain/onboarding")!==null&&u.search?.includes("code"),b=A((y=>y.onboardingCustomerViewState.fetchState)),D=A((y=>y.onboardingCustomerViewState.currentStep)),R=A((y=>y.onboardingCustomerViewState.uiState)),h=A((y=>Y(y))),r=A((y=>y.userRoleConfigState.fetchState)),T=A((y=>y.cardPaymentViewState)),x=X(T.addCardPaymentSourceStatus.fetchState),f=T.addCardPaymentSourceStatus.fetchState,{code:j,realmId:N,state:$}=Pn(u.search),L=h.externalConnections?.accounting[0],ee=L?.connectionType,S=L?.connectionName,F=L?.connectionId??"",Z=z.getSignedInUser()?.userId??"",G=d.useRef({realmId:"",connectionId:""});d.useEffect((()=>{o||(w(!0),c(Oe()))}),[o,c]),d.useEffect((()=>{E||(ct(["card"]),k(!0))}),[E]),d.useEffect((()=>{x==="In-Progress"&&f==="Completed"&&c(Oe())}),[x,f]),d.useEffect((()=>{Dn(j,N,$,F,Z)===!0&&h.externalConnections?.saveConnectionState!=="In-Progress"&&b==="Completed"&&(c(Nt(h.tenantId,{connection_type:ee??"accounting",connection_name:S??"quickbooks_online",authorization_code:j,realm_id:N,connection_id:F,user_id:Z},$t(window.location.origin+"/onboarding/auth"))),G.current={realmId:N,connectionId:F},g.trackOnboardingSaveQBOConnection(N,F),p(u.pathname))}),[j,N,$,u.pathname,b]),d.useEffect((()=>{ie.isInitiated===!1&&b==="Completed"&&ie.init("/onboarding/auth",h.tenantEmailDomain)}),[b]);const M=h.companyId??z.getSignedInUserTenant(O)?.companyId,ce=fe(h?.userRole??[]),V=A((y=>we(y,M)));d.useEffect((()=>{n||b!=="Not-Started"||M==null||(C(!0),c(Gt(M,!0,!m)))}),[n,b,M]);const te=h.externalConnections?.saveConnectionState,je=X(te);d.useEffect((()=>{je==="In-Progress"&&(te==="Completed"||te==="Error")&&R.isQBOPopupOpen&&D==="connect_ledger"&&(te==="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})))}),[te,je,R.isQBOPopupOpen,D,g,c]),d.useEffect((()=>{b==="Completed"&&m&&(c(dt({step:"connect_ledger"})),c(me({isQBOPopupOpen:!0})))}),[m,b]),d.useEffect((()=>{r==="Not-Started"&&c(Mt(!0))}),[r,c]);const ht=X(V.companyDetailsLocalData?.addressStatus);d.useEffect((()=>{V.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&V.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&ht==null&&c(ut({addressType:"company_registered_address",addressToCreate:V.companyDetailsLocalData?.addressStatus?.addressToCreate}))}),[V.companyDetailsLocalData?.addressStatus?.addressToCreate,V.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const Ct=V.isInterimEmailSent,Ue=z.getSignedInUser();if(Ue==null)throw Error("Can't access onboarding flow without signing in...");const bt=Ae(B,h),St=Ee(h),Be=h.company?.companyOnboardingInfo.isOnboardingCompleted,Fe=y=>y.trackPageLoaded(ve.Event.onboardingPage),ye=h.productSettings.isOtherProductsEnabled,It=ye===!0&&!lt(h),kt=h.productSettings.isTreasuryEnabled,Re=Rn({tenantEmailDomain:O??"",signedInUserEmail:Ue.userEmail??"",companyId:M}),Ve=(({companyId:y})=>{const K=se(),de=A((U=>U.onboardingCustomerViewState?.aiAgentsActivation)),ne=A((U=>Y(U).company?.companyOnboardingInfo?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1)),he=d.useCallback((()=>{K(Ft())}),[K]);d.useEffect((()=>{he()}),[he]);const Le=d.useCallback((()=>{y==null||y===""||ne||K(Rt(y))}),[y,ne,K]),Ot=d.useMemo((()=>{if(y==null||y==="")return[];const U=`private-encrypted-${y}`;return[`${U}.ledger-ingestion.counts-updated`,`${U}.ai-agents-activation.phase-changed`]}),[y]),vt=d.useCallback(((U,ae)=>{if(ae==null||typeof ae!="object")return;const I=ae;if(U!=="ledger-ingestion.counts-updated"){if(U==="ai-agents-activation.phase-changed"){const ue=typeof I.phase_key=="string"?I.phase_key:typeof I.key=="string"?I.key:"",J=typeof I.status=="string"?I.status:"idle";if(ue==="")return;K(Lt({key:ue,status:J==="starting"||J==="building"||J==="ready"?J:"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(Vt({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 Bn({events:Ot,onEvent:vt,onSubscribed:he}),d.useMemo((()=>{const U=de?.phases??[],ae=We(U,Se),I=We(U,Ie),ue=Xe(U,Se),J=Xe(U,Ie),Ne=U.some((xt=>xt.status!=="idle")),oe=!ne&&!Ne,$e=ne&&!Ne,_t=$e?Se.map((()=>"building")):ae,Tt=$e?Ie.map((()=>"building")):I;return{ledgerRowStatuses:oe?void 0:_t,backgroundRowStatuses:oe?void 0:Tt,showLedgerReadyInLabel:oe?void 0:ue,showBackgroundReadyInLabel:oe?void 0:J,forceContinueEnabled:!oe||void 0,counts:de?.counts,onContinueClicked:Le}}),[de?.phases,de?.counts,ne,Le])})({companyId:M});if(Be===!0){if(!ye)return kt?s.jsx(Q,{to:"../../treasury"}):bt?s.jsx(Q,{to:"../../checking"}):St?s.jsx(Q,{to:"../../cards"}):s.jsx(Q,{to:"../../dashboard"});const y=V.updateStatus.fetchState==="In-Progress";if(ye&&!y)return e?s.jsxs(Ye,{children:[s.jsx(re,{analytics:g,onLoad:K=>Fe(K)}),s.jsx(tt,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:t,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Re,aiAgentsActivationProps:Ve,meetingUrl:a("onboarding_overview")}),i!=null?s.jsx(et,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]}):s.jsx(Q,{to:"../../onboarding/thankyou"})}else if(Be===!1&&P?.loggedInUserRoleMap!=null)return Ct===!0&&It?s.jsx(Q,{to:"../../onboarding/thankyou"}):s.jsxs(Ye,{children:[s.jsx(re,{analytics:g,onLoad:y=>Fe(y)}),s.jsx(tt,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:t,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Re,aiAgentsActivationProps:Ve,meetingUrl:a("onboarding_overview")}),i!=null?s.jsx(et,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]});return null},ke="external_integrations",Rn=({tenantEmailDomain:e,signedInUserEmail:l,companyId:i})=>{const a=se(),{pendingAutoFocusTabId:p}=jn(),{plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v}=Un({companyId:i}),t=A((r=>r.plaidAccountViewState.external_account.plaidConnectionDetails)),n=A((r=>Y(r))),C=A((r=>r.tenantState.fetchState)),o=A((r=>Qt(r,i))),w=A((r=>Kt(r,ke))),E=d.useMemo((()=>new Set(w.map((r=>r.additionalInfo)).filter((r=>r!=null)))),[w]),k=n.tenantId,O=fe(n.userRole??[]);d.useEffect((()=>{a(zt(ke))}),[a]);const P=o.externalConnections?.saveAPIKeyConnectionState,_=o.externalConnections?.saveAPIKeyConnectionError?.message,B=X(P);d.useEffect((()=>{B==="In-Progress"&&(P==="Completed"?g.trackIntegrationConnected("chargebee","Onboarding","revenue"):P==="Error"&&g.trackIntegrationConnectFailed("chargebee","Onboarding","revenue",_??""))}),[P,B,_]);const m=o.externalConnections?.saveOAuthConnectionState,b=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",b??""))}),[m,D,b]);const R=o.externalConnections?.saveConnectorCredentialsStateBySlug,h=X(R);return d.useEffect((()=>{const r=R??{},T=h??{},x=o.externalConnections?.saveConnectorCredentialsErrorBySlug??{};Object.keys(r).forEach((f=>{if(T[f]!=="In-Progress")return;let j;try{j=Ce(f)}catch{return}r[f]==="Completed"?g.trackIntegrationConnected(j,"Onboarding","payments"):r[f]==="Error"&&g.trackIntegrationConnectFailed(j,"Onboarding","payments",x[f]?.message??"")}))}),[R,h,o]),d.useMemo((()=>({isAdmin:O,analytics:g,referrer:"Onboarding",integrationsView:o,isLoading:C==="In-Progress",notifyMeRegisteredSlugs:E,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",nt()))},onConnectOutlook:()=>{g.trackIntegrationConnectClicked("outlook","Onboarding","email"),a(Qe(k,"outlook",nt()))},onConnectHubSpot:(r,T)=>{const x=o.externalConnections?.revenue?.find((j=>j.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((j=>j.connectionId===r))?.connectionName;let f;try{f=x!=null?Ce(x):void 0}catch{f=void 0}f!=null&&g.trackIntegrationDisconnected(f,"Onboarding",T),a(Wt(k,r,be(T)))},onNotifyMe:r=>{g.trackIntegrationsNotifyMeClicked("Onboarding",r),a(Jt(ke,r,l))},onReconnectQBO:()=>{ie.init("/onboarding/auth",e),ie.handleClick()},onRefreshClick:()=>{o.integrations.refreshQBO.fetchState!=="In-Progress"&&a(Zt())},onSaveChargeBeeCredentials:(r,T)=>{const x=o.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;x!=null&&(g.trackIntegrationCredentialsSubmitted("chargebee","Onboarding","revenue"),a(Ht(k,x,be("revenue"),Ce("chargebee"),{api_key:r,site:T})))},onSaveConnectorCredentials:r=>{g.trackIntegrationCredentialsSubmitted(r.connectionName,"Onboarding","payments"),a(qt(k,be("payments"),r))},plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v,plaidConnectionDetails:t})),[O,o,C,E,p,k,l,e,a,u,c,v,t])};function nt(){const e=new URL(window.location.href);return e.searchParams.set("onboarding_step","connect_data_source"),e.toString()}function at(e,l,i){let a=`/${e}/onboarding/address`;return a=i!=null?a.concat(`/edit/${l}/${encodeURIComponent(i)}`):a.concat(`/new/${l}`),a}const ot=De.div`
27
- display: flex;
28
- height: 100vh;
29
- background-color: ${e=>e.theme.colors.grey4};
30
- `,st=it((function(e,l){const{companyId:i,currentTenant:a}=l,p=we(e,i),u=pt(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"}})}}}))(wn),Vn=()=>{const e=gt(),l=_e(),i=se(),a=Te(),p=ft(),{useFeatureGate:u}=Pe(),{isFeatureEnabled:c}=u(W.isDebitCardFeatureEnabled),{tenantEmailDomain:v}=xe(),t=yt(),[n,C]=d.useState(!1);d.useEffect((()=>{n===!1&&a.state?.message==="OnboardingThankyou"&&C(!0)}),[a.state]);const o=A((m=>Y(m))),w=o.productSettings.isOtherProductsEnabled,E=w===!0&&!lt(o);d.useEffect((()=>{i(mt(k,!1,!E))}),[]);const k=o.companyId??z.getSignedInUserTenant(v)?.companyId;if(t.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const O=Ae(c,o),P=Ee(o),_=A((m=>m.onboardingCustomerViewState.updateStatus.fetchState)),B=o.company?.companyOnboardingInfo.isOnboardingCompleted;if(B!==!0||E)return _==="Completed"&&B===!0&&E&&t?.loggedInUserRoleMap!=null?s.jsxs(ot,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingLandingPage,"Onboarding",On(o.productSettings))}}),s.jsx(st,{navigate:l,showUpdatePaymentDetailButton:w,location:a,companyId:k,currentTenant:o,themeState:p,isVisitingFirstTime:n,meetingUrl:e("onboarding_overview")})]}):_==="Completed"&&B===!1&&t?.loggedInUserRoleMap!=null?s.jsxs(ot,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingInterimPage)}}),s.jsx(st,{navigate:l,showUpdatePaymentDetailButton:w,location:a,companyId:k,currentTenant:o,themeState:p,isVisitingFirstTime:n,meetingUrl:e("onboarding_overview")})]}):s.jsx(En,{});{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 rt(){return typeof Me=="function"?Me():void 0}let pe=0;function Ln(){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=rt();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=rt();if(u===void 0)return;const c=()=>{if(pe===0)try{u.startBuffering()}catch{}};u.stop().then(c,c)})()}))}}),[])}function pa(){return Ln(),s.jsxs(Pt,{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(Vn,{})}),s.jsx(H,{path:"/activation",element:s.jsx(Fn,{})}),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(Et,{})})]})}export{pa as default};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-BlM-yJIK.js";import{h as w,g as C,j as h,l as A,i as B}from"./core-BZ1rdEBJ.js";import{XO as k,XV as _,gD as K,gC as M,gB as L,kt as W,UN as Y,tU as q,fB as V,Xl as D,kr as T,XP as S,XY as F,kp as G,kM as j}from"./zeni-epic-state-CRmviUHA.js";import{bK as J,$ as N,I as R,z as U,E as O,a2 as p,d as v,a5 as X,bL as Q,K as Z,bM as ee,p as te}from"./index-CTFYwhi_.js";import{n as z}from"./mui-BFHFLIBn.js";import"./sentry-CoUvtkTT.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]="b96a6880-0d86-4980-908d-b4fd6de8dbb3",e._sentryDebugIdIdentifier="sentry-dbid-b96a6880-0d86-4980-908d-b4fd6de8dbb3")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),n!=null&&e(q(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(K(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(J);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((r=>k(r,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),r=s.poppedPathname??P();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(Q);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),c=e??s,{useFeatureGate:d}=R(),i=U.getSignedInUser(),b=h((u=>V(u))),g=O(),I=p(a.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,c))),{isFeatureEnabled:x}=d(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(X,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(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},E=(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 E(e,"ach",t,n)}function ve(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(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},de=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 ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,re=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:r}=t,{tenantEmailDomain:c}=r;return{onFetchBankName:d=>{e(j(d))},onSaveHandler:d=>{e(G(t.bankAccountContext,d,"us-domestic",s))},onWireDetailsUpdated:d=>{const{bankAccountSection:i}=d;e(F({data:i}))},onCancel:()=>{(()=>{const d=p(o.state?.pathnameStackToGoBack),i=d.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:d.newStack}})})(),e(S())},onAddressClick:d=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(c,d,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const d=p(t.location.state?.pathnameStackToGoBack),i=d.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:d.newStack}})}e(S())}}}))(ee);function Ie({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),c=e??s,d=U.getSignedInUser(),{useFeatureGate:i}=R(),b=O(),g=h((u=>V(u))),I=p(a.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,c))),{isFeatureEnabled:x}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(X,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(de,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,Ie as D,H as V,me 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 s}from"./liveblocks-BlM-yJIK.js";import{a as d}from"./sentry-CoUvtkTT.js";import{h as G,u as A,g as F,i as V,j as l,N as q,l as R,n as N,o as O}from"./core-BZ1rdEBJ.js";import{VR as _,fB as M,Vh as U,mF as W,Rd as k,VW as Y,UM as $,lF as z,Re as P,Vm as H,Vn as J,UO as K,UN as L}from"./zeni-epic-state-CRmviUHA.js";import{b6 as Q,k as X,a2 as Z,p as tt}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import{d as S}from"./decodeURIComponentSafe-Bqc80Z_5.js";import{w as et}from"./withTransactionSidePanel-DeFt4H26.js";import{f as at,c as nt}from"./routePaths-B_N5gTZd.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./useAskAiCfoHostNavButtonProps-fRSEHozy.js";import"./TransactionDetailScreen-CYqaDKU1.js";import"./useInitialThreadRequest-DLJzdGrt.js";import"./expenseAutomationHelper-L0bEaNW0.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]="2e947abe-e8b9-49bc-b541-a66d3c6937b8",a._sentryDebugIdIdentifier="sentry-dbid-2e947abe-e8b9-49bc-b541-a66d3c6937b8")}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:X,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??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(P(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(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=G(),o=A(),c=F(),[m,h]=d.useState(!1),[T,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=V(),r=S(x??""),p=S(j??""),u=rt(r,p),v=[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"))),w=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>U(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(h(!0),o(W(i)))}),[m,u,i]);const b=l((n=>n.trendState.fetchState)),E=f?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&T===!1&&b==="Completed"&&(D(!0),E!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,T,b]),u?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{h(!1),D(!1)},...t}):s.jsx(q,{to:I(v.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function vt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BlM-yJIK.js";import{a as r}from"./sentry-CoUvtkTT.js";import{au as i,av as b,r as f,a2 as l}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import p from"./NotFoundScreen-75_Gn0cI.js";import{h as m,g as u}from"./core-BZ1rdEBJ.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]="3e0b62bd-24c2-4dc7-beeb-ffec556cb516",e._sentryDebugIdIdentifier="sentry-dbid-3e0b62bd-24c2-4dc7-beeb-ffec556cb516")}catch{}})();const _=()=>{const e=m(),t=u(),a=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),c=r.useCallback((()=>{(()=>{const n=l(t.state?.pathnameStackToGoBack),d=n.poppedPathname??k();e(d,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(t.pathname);return o!=null?s.jsx(b,{menuItem:f(o),onDemoClick:a,onGoBack:c}):s.jsx(p,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{_ as F};
@@ -1 +0,0 @@
1
- import{a as r}from"./sentry-CoUvtkTT.js";import{u as l,h as f,g as m}from"./core-BZ1rdEBJ.js";import{hV as p,Tv as g,Tw as _}from"./zeni-epic-state-CRmviUHA.js";import{u as b,L as h,z as y}from"./index-CTFYwhi_.js";import"./liveblocks-BlM-yJIK.js";import"./recharts-Cp8vAfrX.js";import"./mui-BFHFLIBn.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c4d32c4d-de76-41fa-b7d5-e5b16e46ad70",e._sentryDebugIdIdentifier="sentry-dbid-c4d32c4d-de76-41fa-b7d5-e5b16e46ad70")}catch{}})();function j(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:u}=b(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};
@@ -1,12 +0,0 @@
1
- import{j as g}from"./liveblocks-BlM-yJIK.js";import{a as u}from"./sentry-CoUvtkTT.js";import{u as U,g as _,h as w,t as V,j as l,N as L}from"./core-BZ1rdEBJ.js";import{z as r,E as M,G as P,R as A,k as N,S as R,Y as B,Z as G,V as W}from"./index-CTFYwhi_.js";import{fB as X,SX as Y,Tk as Z,Tb as $,ge as q,gg as H,Tg as J,gR as K,df as Q,Tl as ee,Tm as te}from"./zeni-epic-state-CRmviUHA.js";import{n as ne}from"./mui-BFHFLIBn.js";import{u as se}from"./useDeviceId-Cm20XW3g.js";import{f as ae}from"./analyticsHelper-CcegxGUw.js";import{t as ie}from"./getLocaleForTenant-pNMINwIt.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="2d72e980-59c4-43cb-9933-6d6ca74de767",t._sentryDebugIdIdentifier="sentry-dbid-2d72e980-59c4-43cb-9933-6d6ca74de767")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=U(),a=_(),f=w(),[y]=V(),n=y.get("token"),p=y.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),b=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>X(e))),k=l((e=>Y(e))),E=r.getSignedInUser(),v=M().mode;u.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(Z(n,i,m)))}),[n,p,t,i,m,s?.zeniSessionId]),u.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants($(k.tenantsInOrder),s.zeniSessionId),q(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(J("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),K().then((()=>{const e=W();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(R.Event.loginSuccess,"email",Q(o.productSettings))}),2e3))}),[I,S,b,s,o,k,v,a.state,t]);const j=u.useCallback((()=>{f("/signin/auth")}),[f]),F=u.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),O=u.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return g.jsx(B,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return g.jsx(L,{to:e,state:{...a.state,origin:""}})}if(!C(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",T=n!=null&&r.getLastUsedMagicLinkToken()===n;return g.jsx(L,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:T,magicLinkExpired:!T&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return g.jsx(oe,{"data-testid":"smooth-loader",children:g.jsx(G,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{Ce as default};
@@ -1 +0,0 @@
1
- import{j as _}from"./liveblocks-BlM-yJIK.js";import{a as f}from"./sentry-CoUvtkTT.js";import{u as te,j as t,i as $e,g as Ge,h as Me,q as F}from"./core-BZ1rdEBJ.js";import{fB as ne,SY as xe,SZ as se,g5 as Ne,fA as Pe,T3 as Re,S_ as Ve,S$ as je,pF as Le,gi as Oe,T2 as b,T5 as Ue,T6 as Q,gj as Ze,T7 as ze,Db as He,g_ as Ye,cS as qe,T8 as We,g4 as Je,gk as Ke}from"./zeni-epic-state-CRmviUHA.js";import{w as Qe,i as Xe,c as ea,I as aa,e as ta,g as na,u as sa,d as c,h as oa,F as ia,z as ra,f as da,l as ca,n as la,s as ua,o as fa,q as X,L as ma,D as ha,H as ba,p as g,k as ee,y as pa,M as ae,B as Sa,C as ga}from"./index-CTFYwhi_.js";import{D as ka}from"./mui-BFHFLIBn.js";import{u as Ea}from"./InboxNotificationsProvider-5qCqmUI8.js";import{u as Ta}from"./useTaskManagerAccess-D9-djiWT.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="5c703fca-141e-4ffc-84c2-8eb38d30f615",l._sentryDebugIdIdentifier="sentry-dbid-5c703fca-141e-4ffc-84c2-8eb38d30f615")}catch{}})();const Ca=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),k=ea(),n=Me(),B=Ne(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:E}=Ta(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Pe(e))),{status:ie}=t(Re),G=$.uiState.currentChatSessionId,T=na(),{setLoading:re}=sa(),[w,M]=f.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,x=F("/:tenantEmailDomain/reports")!==null,m=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:N}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,N),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),P=t((e=>Ve(e))),{isFeatureEnabled:C}=d(c.isReferralFeatureEnabled),v=t((e=>je(e)));f.useEffect((()=>{T&&C&&!m&&v.fetchState==="Not-Started"&&r(Le(!0))}),[T,C,v.fetchState,m]);const D=t((e=>e.tenantState)),fe=t((e=>D.fetchState==="Completed"?Oe(e):[])),S=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:me}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),R=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarNewYearAnimationEnabled),ke=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",Ee=t((e=>b(e).totalUnreadCount)),Te=t((e=>b(e).reducedFetchCountState)),V=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),j=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:O,isLoading:U,isFetchingMore:Z,hasFetchedAll:z,fetchMore:Ce}=Ea();f.useEffect((()=>{const e=setTimeout((()=>Ce?.()),0);return()=>clearTimeout(e)})),f.useEffect((()=>{if(U===!1&&Z===!1&&z===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;M(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else M(0)}),[U,Z,z]),f.useEffect((()=>{T&&E&&!m&&L.fetchState==="Not-Started"&&B.tenantId!=null&&r(Ue("task_manager","dashboard"))}),[T,E,m,L.fetchState,B.tenantId,r]),f.useEffect((()=>{m||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[m,I.fetchState,r]),f.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Te,count:Ee},H=s!=null?ra.getSignedInUserTenant(s):null,Y=t((e=>H?.tenantId!=null?Ze(e,H.tenantId):void 0)),h=[];me===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),C===!1&&h.push("rewards_card"),R===!1&&h.push("expense_automation_card");const q=t((e=>ze(e,h).fetchState)),W=t((e=>He(e).fetchState)),ye=A&&(q==="Completed"||q==="Error")||x&&(W==="Completed"||W==="Error")||!A&&!x?void 0:"disabled",we=f.useMemo((()=>Ye(o.userRole)),[o.userRole]),Ae=qe(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&P.fetchState==="Completed"&&We(P.notificationSettings,p.userEmail,N,o,E),J=da(),Fe=J&&ca(a);return _.jsx(ka,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:_.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?fe:Y!=null?[Y]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:fa(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:ke,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:C,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=V===0&&j>0?"notifications/comments":"notifications/tasks";X(a)&&(e=V===0&&j>0?"../../notifications/comments":"../../notifications/tasks");const u=g(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=g(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:g(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=g(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=g(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,_e=ae(K)&&K!=="command_center";if(ae(e.type)&&S[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(S[o.tenantId].month,S[o.tenantId].year,"Sidebar"),_e&&S[o.tenantId]!=null){const y=S[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Be=Sa(e.type);ga(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Be}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(ma.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{k.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:E,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:Se,newYearAnimationEnabled:ge})})})),Ba=l=>{const i=te(),s=t((k=>ne(k))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,n)=>{Xe(n)&&xe(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return _.jsx(Ca,{...l,...a})};export{Ba as M};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-BlM-yJIK.js";import{h as r,l as i}from"./core-BZ1rdEBJ.js";import{ak as n}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import"./sentry-CoUvtkTT.js";import"./zeni-epic-state-CRmviUHA.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{m as mt,a as lt,n as ft,j as N}from"./liveblocks-BlM-yJIK.js";import ut from"./NotFoundScreen-75_Gn0cI.js";import{a as k}from"./sentry-CoUvtkTT.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as Z}from"./core-BZ1rdEBJ.js";import{cz as It,S_ as O,fB as X,g_ as Tt,T2 as b,$V as H,T6 as m,SZ as E,zt as j,F9 as Ct,$W as yt,SY as Et,T8 as At,zy as _t,$X as M,br as F,gd as x,zC as J,$Y as Nt,cL as Bt,cE as wt}from"./zeni-epic-state-CRmviUHA.js";import{ao as xt,e as vt,I as Rt,d as Dt,aq as Pt,dI as Gt,p as B,dJ as Ut,w as $t,dK as Mt,i as Ft,a2 as jt}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-fRSEHozy.js";import{u as zt}from"./useTaskManagerAccess-D9-djiWT.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="b43d38ef-41d5-41a5-96e5-d8b7092fe39e",t._sentryDebugIdIdentifier="sentry-dbid-b43d38ef-41d5-41a5-96e5-d8b7092fe39e")}catch{}})();const Lt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Wt=St((function(t,l){const n=O(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=X(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&At(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t(M([a],F())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(E(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(H(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else R?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(J("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t(M([i],F())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(E({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Lt(o,I).then((()=>{t(M(o,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(E({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=jt(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))($t(Mt)),Yt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=vt(),[I,R]=k.useState(!1),a=S((e=>O(e))),s=S((e=>X(e))),{useFeatureGate:d}=Rt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Pt({isDataReady:!0});const Q=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),z=S((e=>b(e).currentTab)),D=S((e=>b(e).currentSubTab)),tt=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),P=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),et=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:L,isLoading:W,fetchMore:Y,isFetchingMore:q,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(z!==c&&c!=null&&o(H(c)),c==null){const e=`../${z}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(A===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((y=>y.roomId===e&&y.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(E({unreadCount:p},"comments"))}}),[A,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(j("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=A||G===!0||C!==!0||A||G===!0||C!==!0;k.useEffect((()=>{U&&P!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):U||P!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[U,P]),k.useEffect((()=>{o(E({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(R(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(A===!1&&W===!1&&w!=null&&L!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Ut(u.kind))),y=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const $=L.find((dt=>{return dt.id===((v=u).kind==="thread"?v.threadId:"subjectId"in v?v.subjectId:void 0);var v}));return $!=null?{inboxNotification:{...u,threadId:$.id},thread:$}:(q||K===!0||Y==null||Y(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(E({totalCount:_.length,unreadCount:y.length},"comments")),o(yt(ct))}}),[A,G,q,C,K,W,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ft(p)){const y=Et(p.mode);if(y==="dashboard"&&o(E({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(j("task_manager",y,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=zt(f);return N.jsx(Wt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(bt,{children:[N.jsx(Z,{path:"/:selectedTab",element:N.jsx(Yt,{})}),N.jsx(Z,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-BlM-yJIK.js";import{a as r}from"./sentry-CoUvtkTT.js";import{u as A,g as C,j as o,N as j}from"./core-BZ1rdEBJ.js";import{Ty as z,fB as P,gi as x,Tz as D,TA as M,TB as R,TC as B,pw as k,Sh as L}from"./zeni-epic-state-CRmviUHA.js";import{z as h,af as I}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="cc779f62-37dc-4c1a-acfa-672e1c6f32db",n._sentryDebugIdIdentifier="sentry-dbid-cc779f62-37dc-4c1a-acfa-672e1c6f32db")}catch{}})();function ee(){const n=A(),a=C(),{params:t,error:i}=r.useMemo((()=>z(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>P(e))),l=o((e=>x(e))),c=o((e=>e.tenantState.fetchState)),y=o(D),S=o(M),d=o(R),[v,b]=r.useState(null),[T,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(B())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(c!=="Not-Started"&&c!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,c,n]),r.useEffect((()=>{d!=null&&d!==""&&(window.location.href=d)}),[d]);const _=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),u=v??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:c!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:T??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(L(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-BlM-yJIK.js";import{Ul as re,fB as Y,lF as G,dV as N,dU as le,Rh as Q,TK as de,BZ as Pe,Um as J,BO as je,C7 as Le,C1 as ce,BS as pe,C5 as Te,C2 as ve,Un as ue,rr as Ae,g2 as Oe,gA as Re,Uo as H,BW as me,BV as ge,Ca as Ve,c7 as Fe}from"./zeni-epic-state-CRmviUHA.js";import{$ as he,I as X,d as _,z as K,h as fe,O as Ce,ad as ye,ax as be,ay as Be,a9 as Se,K as V,ae as we,G as W,az as Ue,ao as Ze,aq as $e,a6 as ze,k as xe,S as He,p as _e,aA as Ge,U as Ke}from"./index-CTFYwhi_.js";import{D as De,n as M,S as Ie}from"./mui-BFHFLIBn.js";import ae from"./NotFoundScreen-75_Gn0cI.js";import{a as d}from"./sentry-CoUvtkTT.js";import{u as ee,i as We,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-BZ1rdEBJ.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-fRSEHozy.js";import{M as Ne}from"./MobileAppDrawer-Cwqn_b45.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./InboxNotificationsProvider-5qCqmUI8.js";import"./useTaskManagerAccess-D9-djiWT.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]="ca6b62d3-7dfa-41d1-b615-e6610799cd55",e._sentryDebugIdIdentifier="sentry-dbid-ca6b62d3-7dfa-41d1-b615-e6610799cd55")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=W.getLocalizedStrings().peoplePage.invitePage,ne=W.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const f=he(),m=ee(),[F,B]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=We(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>G(l))),{useFeatureGate:D}=X(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),P=N(I,p),T=le(p),v=Q(p),U=de(p),Z=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},A=()=>{F===!0?S(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(_.isChargeCardFeatureEnabled),L=fe(p,j,I),{isCardsHidden:O}=Ce(p?.tenantId),y=!L||O,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(h==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{x===!1&&w!=null&&m(Pe(w))}),[x,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,ke=M(we.H6Regular)`
6
- margin-top: ${V.sp7};
7
- padding-left: ${V.sp8};
8
- padding-right: ${V.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ee=M(we.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${V.sp8};
14
- padding-right: ${V.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${V.sp4};
17
- white-space: pre-line;
18
- `,aa={overlayWidth:new Se(100,100,48)},oe=W.getLocalizedStrings().peoplePage.invitePage,ie=W.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const f=he(),m=ee(),[F,B]=d.useState(!1),[k,S]=d.useState(!1),w=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>G(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:D}=E(_.isDebitCardFeatureEnabled),I=N(D,r),P=le(r),T=Q(r),v=de(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(J())},C=()=>{F===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(_.isChargeCardFeatureEnabled),L=fe(r,j,D),{isCardsHidden:O}=Ce(r?.tenantId),y=!L||O,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(ce({peopleLocalData:o})),B(!0)},onResetClick:x,onSaveClick:()=>{m(h==="zeni_only"?Te(e):ve())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:Z};return d.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(J()))}),[w.invitePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:A}):null,a.jsx(Ue,{...s})]})})},ta=M(Ie)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,na=Je((function(e,t){const c=ue(e),n=K.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:xe}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:h}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Ve(i))},onReloadPeople:()=>{e(me()),e(ge(n,h))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(Ge);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=Me(),n=ee(),h=qe(),{areTenantIdsInSync:i}=Ze(),b=K.getSignedInUser(),f=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),B=g((s=>G(s))),k=!N(F,f)&&B,S=Q(f),w=f?.tenantId,{tenantEmailDomain:r}=f,[p,E]=d.useState(!1),[D,I]=d.useState(!1),[P,T]=d.useState(!1),[v,U]=d.useState("off"),[Z,x]=d.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Ye({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Oe(s.userState,s.userRoleState,s.userListViewState,"manager"))),O=g((s=>Re(s))),y=f?.companyId;d.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,b,w,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),T(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:xe,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:L,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:f.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=_e(h.state?.pathnameStackToGoBack,h.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=Ke();return Fe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BlM-yJIK.js";import E from"./NotFoundScreen-75_Gn0cI.js";import{a as r}from"./sentry-CoUvtkTT.js";import{h as _,g as v,j as p,i as M,u as U,N as P,l as z,n as B,o as b}from"./core-BZ1rdEBJ.js";import{fB as O,$Z as h,bo as F,bn as N,iI as V,gd as $}from"./zeni-epic-state-CRmviUHA.js";import{c as q,z as I,aq as L,dL as Z}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-fRSEHozy.js";import{M as H}from"./MobileAppDrawer-Cwqn_b45.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./InboxNotificationsProvider-5qCqmUI8.js";import"./useTaskManagerAccess-D9-djiWT.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]="5b1ca5eb-8922-47a1-b48b-d0efe53e39c0",e._sentryDebugIdIdentifier="sentry-dbid-5b1ca5eb-8922-47a1-b48b-d0efe53e39c0")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(Z),K=()=>{const e=_(),t=v(),c=q(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return L({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(B,{children:[s.jsx(b,{path:"*",element:s.jsx(K,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};