@zeniai/web-app-ui 5.4.8-dev → 5.4.9-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/assets/AccountMappingScreen-BVoif-LS.js +9 -0
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-CpFxldZX.js → ActualMatchingMatchDetailScreen-37ukErZ3.js} +1 -1
  3. package/dist/assets/AddressRoutes-CTdswws_.js +1 -0
  4. package/dist/assets/AddressScreen-DIx8pAlP.js +9 -0
  5. package/dist/assets/{AiCfoScreen-D0ryurTs.js → AiCfoScreen-bkTvdFWM.js} +5 -5
  6. package/dist/assets/{AppDrawer-Bz9R1SRM.js → AppDrawer-Bqkq0J1O.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-CUhlkbFZ.js → BillPayApprovalRoutes-nVb6rKwz.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-Cq7a-pm7.js → BillPayRoutes-D7EPBDh7.js} +18 -18
  9. package/dist/assets/BusinessVerificationPageScreen-DMccZcIL.js +9 -0
  10. package/dist/assets/{CardsAiCfoScreen-i0herVW8.js → CardsAiCfoScreen-Cys2hC2x.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-DKqAyC6V.js → ChargeCardRoutes-rF3I93wy.js} +8 -8
  12. package/dist/assets/{CompanyPassportScreen-B28ZIQmd.js → CompanyPassportScreen-DzTS_PxV.js} +1 -1
  13. package/dist/assets/ConnectionAuthScreen-B7H-_PrY.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-CqKrvs3q.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-CGeTdTAp.js → CustomerOnboardingRoutes-DyQugrQS.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-Cwe3Vuyf.js → DashboardRoutes-B7G0hGYD.js} +4 -4
  17. package/dist/assets/{DefaultTenantHome-Y19U_bWi.js → DefaultTenantHome-Dpr9pT2f.js} +1 -1
  18. package/dist/assets/DomesticWireDetailScreen-BNWRfTvg.js +18 -0
  19. package/dist/assets/{DrawerScreen-BiLnsYxr.js → DrawerScreen-DEMkXBuJ.js} +1 -1
  20. package/dist/assets/EntityDetailRoutes-DlCSk6Xj.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-CwVf58CT.js → ExpenseAutomationRoutes-DcYDpqvS.js} +5 -5
  22. package/dist/assets/FeaturePreviewScreen-CZZbV-Lj.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-XzCI6Wqi.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-Lon_JjZI.js → InboxNotificationsProvider-CzZNeGt1.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-CEhIyfKx.js → InvoicingRoutes-BZEd2Xd_.js} +2 -2
  26. package/dist/assets/MagicLinkRoutes-Ch_9Qa7Y.js +72 -0
  27. package/dist/assets/MagicLinkSignInScreen-D7qEtB4W.js +12 -0
  28. package/dist/assets/MobileAppDrawer-DYOb_3zl.js +1 -0
  29. package/dist/assets/NotFoundScreen-hP5G-uHy.js +1 -0
  30. package/dist/assets/NotificationRoutes-DdgV7jbI.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-CQqkncrK.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-77IqlyFS.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-Cu5uQlbD.js → PaymentLinkScreen-DMvOIo--.js} +1 -1
  34. package/dist/assets/PeopleRoutes-BWw5-zAe.js +22 -0
  35. package/dist/assets/{PerformanceRoutes-D57LkbmT.js → PerformanceRoutes-DMlk1Yfb.js} +1 -1
  36. package/dist/assets/{Preview-B_x0UYXC.js → Preview-SrROl7l3.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-B_jTzA2E.js → QBOConnectionScreen-BJEzxzvn.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-D9UKdBqr.js → ReimbursementApprovalRoutes-BikedZ_D.js} +1 -1
  39. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BVAueb7P.js +1 -0
  40. package/dist/assets/ReimbursementRoutes-B8-BBslS.js +68 -0
  41. package/dist/assets/{ReportsRoutes-97Pz3_w0.js → ReportsRoutes-BLQeDL9q.js} +1 -1
  42. package/dist/assets/RewardsRoutes-BeComSZ4.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CXq4al_v.js → ScheduleDetailsPrepaidExpensesScreen-BTeNJoD-.js} +5 -5
  44. package/dist/assets/ScreenRoutes-C_Y9Ih-I.js +2 -0
  45. package/dist/assets/{SettingsRoutes-CXOUMEST.js → SettingsRoutes-D1KLQYfe.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-DT18jEZS.js → SetupPagesScreen-D-sIYsOb.js} +5 -5
  47. package/dist/assets/SignInScreen-DYkAG0ir.js +1 -0
  48. package/dist/assets/SignOutScreen-CnE9aVZf.js +9 -0
  49. package/dist/assets/TaskListScreen-3oMHbvzs.js +9 -0
  50. package/dist/assets/TaskRoutes-gD6fXeIa.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-CPgOmOJv.js +1 -0
  52. package/dist/assets/TransactionDetailScreen-DKDiKxK4.js +5 -0
  53. package/dist/assets/{TransactionListRoutes-DFYIfVzR.js → TransactionListRoutes-dt9sGf6m.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-DweO_eX_.js → TreasuryRoutes-CuCdm5Gl.js} +6 -6
  55. package/dist/assets/{VendorsRoutes-CtkEV-aM.js → VendorsRoutes--pMAMDSH.js} +10 -10
  56. package/dist/assets/WiseConfirmationScreen-BOUXMp2T.js +12 -0
  57. package/dist/assets/ZeniAccountRoutes-CWyEeR9A.js +57 -0
  58. package/dist/assets/ZeniAccountStatementScreen-qY5rQsAd.js +9 -0
  59. package/dist/assets/{accountMappingHelper-CCESaK7R.js → accountMappingHelper-BV1cQq3A.js} +1 -1
  60. package/dist/assets/{analytics-BSYXJeF4.js → analytics-Cfs2G4_3.js} +1 -1
  61. package/dist/assets/{analyticsHelper-w2YkQjq1.js → analyticsHelper-USl63sKg.js} +1 -1
  62. package/dist/assets/{core-k1hJbZ6L.js → core-C1WlT0Gj.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-CKsYKxPJ.js → decodeURIComponentSafe-7TTqX1My.js} +1 -1
  64. package/dist/assets/{dnd-CiTl8J_b.js → dnd-B-4X27-9.js} +1 -1
  65. package/dist/assets/{empty-DXUNZiQh.js → empty-CY_o0w8p.js} +1 -1
  66. package/dist/assets/{empty-Bzngm89v.js → empty-P6T33YMO.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-qNZVYRIB.js → emptyVideoElement-DXwM8vzz.js} +1 -1
  68. package/dist/assets/epic-C_ztG9Vn.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-DNfzvs5h.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-Bok1bQNl.js → getLocaleForTenant-GRoZrOtf.js} +1 -1
  71. package/dist/assets/{index-DGy3NvOY.js → index-BXFluF17.js} +1 -1
  72. package/dist/assets/{index-Cjqi6Pkt.js → index-BaogokNB.js} +9420 -9420
  73. package/dist/assets/{index-B1EgaaVs.js → index-C7OizTrs.js} +1 -1
  74. package/dist/assets/{index-iZXXuKOD.js → index-CBN1-9DQ.js} +2 -2
  75. package/dist/assets/{index-BKGXj7ws.js → index-CLZ8aHkZ.js} +1 -1
  76. package/dist/assets/{index-Ce30h5vk.js → index-Cqlg1yss.js} +1 -1
  77. package/dist/assets/{index-CdAfnjbO.js → index-D6d3wrtH.js} +1 -1
  78. package/dist/assets/{index-BYIWMErm.js → index-rFi6I5F-.js} +1 -1
  79. package/dist/assets/{lexical-YTMAFU1j.js → lexical-Dmnf9NSK.js} +1 -1
  80. package/dist/assets/{liveblocks-oxGmLiGE.js → liveblocks-DQb3Em37.js} +1 -1
  81. package/dist/assets/{lottie-DXQhXtqa.js → lottie-B_xwqN2A.js} +1 -1
  82. package/dist/assets/{mui-D8QuRJEy.js → mui-D2HFTrjh.js} +1 -1
  83. package/dist/assets/{pathToGoBack-BvtdrmIA.js → pathToGoBack-Djr4VFL1.js} +1 -1
  84. package/dist/assets/{pdf-QcH92u4w.js → pdf-DDFs-jyU.js} +3 -3
  85. package/dist/assets/{pdf-lib-CmPW-Sf3.js → pdf-lib-uEuVq1x5.js} +1 -1
  86. package/dist/assets/{plaid-CbZCK8Pe.js → plaid-D36sgvQh.js} +1 -1
  87. package/dist/assets/{pusher-DrskEKGJ.js → pusher-Bmhf7zdt.js} +1 -1
  88. package/dist/assets/{react-DI5Tj1pD.js → react-ABjTKzj0.js} +1 -1
  89. package/dist/assets/{react-DLwkwTYN.js → react-BNxhEAR6.js} +1 -1
  90. package/dist/assets/{react-BFUAIjFB.js → react-DEkQrWnb.js} +1 -1
  91. package/dist/assets/{react-CTz3hOfW.js → react-DQ4Bdeyq.js} +1 -1
  92. package/dist/assets/{react-bRbgXAqh.js → react-Dypy880L.js} +1 -1
  93. package/dist/assets/{react-BdEbM4Cv.js → react-_dplkTkE.js} +1 -1
  94. package/dist/assets/{recharts-DZG9umMy.js → recharts-Cqzw8WNA.js} +1 -1
  95. package/dist/assets/{reportTimeframe-BoyB48qP.js → reportTimeframe-C4q_PyKL.js} +1 -1
  96. package/dist/assets/{routePaths-BQiUfv8Y.js → routePaths-B56KGAwY.js} +1 -1
  97. package/dist/assets/{sentry-CYolppN9.js → sentry-bn66aQBn.js} +1 -1
  98. package/dist/assets/{stripSplatSuffix-yEJV_xmD.js → stripSplatSuffix-Bc1c61un.js} +1 -1
  99. package/dist/assets/{url-Dvn7w47g.js → url-DQxeYqWJ.js} +1 -1
  100. package/dist/assets/{url-BJMHxMoG.js → url-alEaciYB.js} +1 -1
  101. package/dist/assets/useActualMatchingMatchDetail-DC73Os7S.js +1 -0
  102. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BBN3Q32c.js → useAiCfoDashboardSuggestedQuestionsChips-Cj21wv_W.js} +1 -1
  103. package/dist/assets/useAskAiCfoHostNavButtonProps-GW3aOOUV.js +1 -0
  104. package/dist/assets/{useChargeCardPusherEvents-DEUPC1vA.js → useChargeCardPusherEvents-BkaiNEUC.js} +1 -1
  105. package/dist/assets/{useDeviceId-BqvO5dq-.js → useDeviceId-nnRIPwcw.js} +1 -1
  106. package/dist/assets/useEmailConnectResultRefresh-BL7F1fI2.js +1 -0
  107. package/dist/assets/{useEnsureVendorListLoaded-CbkO2307.js → useEnsureVendorListLoaded-DT9MJB3G.js} +1 -1
  108. package/dist/assets/{useInitialThreadRequest-DKk3Gbri.js → useInitialThreadRequest-rwXc-zR2.js} +1 -1
  109. package/dist/assets/useTaskManagerAccess-Bq4KBSvW.js +1 -0
  110. package/dist/assets/{useTaskManagerPusherEvents-CULNono8.js → useTaskManagerPusherEvents-DiYOmCQ4.js} +1 -1
  111. package/dist/assets/{utils-CZxvf1-B.js → utils-C55XrdHj.js} +1 -1
  112. package/dist/assets/withTransactionSidePanel-LJitfor3.js +25 -0
  113. package/dist/assets/{zeni-epic-state-C2CKsxzr.js → zeni-epic-state-VpP2uC41.js} +4 -4
  114. package/dist/index.html +1 -1
  115. package/package.json +4 -4
  116. package/dist/assets/AccountMappingScreen-DxODZ1Nk.js +0 -9
  117. package/dist/assets/AddressRoutes-K7qFYU4Q.js +0 -1
  118. package/dist/assets/AddressScreen-B7HfNJJM.js +0 -9
  119. package/dist/assets/BusinessVerificationPageScreen-YH2iMYXG.js +0 -9
  120. package/dist/assets/ConnectionAuthScreen-cnuYO2ir.js +0 -11
  121. package/dist/assets/CustomerOnboardingAuthScreen-BugwGIlC.js +0 -1
  122. package/dist/assets/DomesticWireDetailScreen-C3Fvc0vh.js +0 -18
  123. package/dist/assets/EntityDetailRoutes-DiWWQPIS.js +0 -1
  124. package/dist/assets/FeaturePreviewScreen-CVxHNITI.js +0 -1
  125. package/dist/assets/HubSpotOAuthCallbackScreen-D5mS9Mm3.js +0 -1
  126. package/dist/assets/MagicLinkRoutes-Bbw6eA7p.js +0 -72
  127. package/dist/assets/MagicLinkSignInScreen-CMSV3Ecy.js +0 -12
  128. package/dist/assets/MobileAppDrawer-D95K9MWM.js +0 -1
  129. package/dist/assets/NotFoundScreen-ngkmWfLO.js +0 -1
  130. package/dist/assets/NotificationRoutes-OU4hmCU4.js +0 -1
  131. package/dist/assets/OAuthConsentScreen-BfPvpIZK.js +0 -1
  132. package/dist/assets/PandLWithForecastRoutes-D5OxnQT-.js +0 -1
  133. package/dist/assets/PeopleRoutes-CRBdsznQ.js +0 -22
  134. package/dist/assets/ReimbursementApprovalRuleDetailScreen-CdBqEWoC.js +0 -1
  135. package/dist/assets/ReimbursementRoutes-DqKBNzYH.js +0 -68
  136. package/dist/assets/RewardsRoutes-CP48quzG.js +0 -1
  137. package/dist/assets/ScreenRoutes-EZYd0oGd.js +0 -2
  138. package/dist/assets/SignInScreen-D_kJ7A6-.js +0 -1
  139. package/dist/assets/SignOutScreen-Hgz5ILuE.js +0 -9
  140. package/dist/assets/TaskListScreen-PbWxRl0T.js +0 -9
  141. package/dist/assets/TaskRoutes-8igPnZpC.js +0 -9
  142. package/dist/assets/TransactionDetailRoutes-BkrhGwVi.js +0 -1
  143. package/dist/assets/TransactionDetailScreen-CUF4XJ-a.js +0 -5
  144. package/dist/assets/WiseConfirmationScreen-Cvz0_zLL.js +0 -12
  145. package/dist/assets/ZeniAccountRoutes-ulGvqG-O.js +0 -57
  146. package/dist/assets/ZeniAccountStatementScreen-Dff7TUu2.js +0 -9
  147. package/dist/assets/epic-BVcu5QEC.js +0 -2
  148. package/dist/assets/expenseAutomationHelper-BfCR3sLm.js +0 -1
  149. package/dist/assets/useActualMatchingMatchDetail-BRI2b5oS.js +0 -1
  150. package/dist/assets/useAskAiCfoHostNavButtonProps-BETiKk63.js +0 -1
  151. package/dist/assets/useEmailConnectResultRefresh-8S-s2Qbg.js +0 -1
  152. package/dist/assets/useTaskManagerAccess-CbR2C9f7.js +0 -1
  153. package/dist/assets/withTransactionSidePanel-zjTjrZrt.js +0 -25
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-Cjqi6Pkt.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CYolppN9.js"><link rel="modulepreload" crossorigin href="/assets/core-k1hJbZ6L.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-C2CKsxzr.js"><link rel="modulepreload" crossorigin href="/assets/mui-D8QuRJEy.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BSYXJeF4.js"><link rel="modulepreload" crossorigin href="/assets/utils-CZxvf1-B.js"><link rel="stylesheet" crossorigin href="/assets/index-BQ3cXEYt.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-BaogokNB.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-bn66aQBn.js"><link rel="modulepreload" crossorigin href="/assets/core-C1WlT0Gj.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-VpP2uC41.js"><link rel="modulepreload" crossorigin href="/assets/mui-D2HFTrjh.js"><link rel="modulepreload" crossorigin href="/assets/analytics-Cfs2G4_3.js"><link rel="modulepreload" crossorigin href="/assets/utils-C55XrdHj.js"><link rel="stylesheet" crossorigin href="/assets/index-BQ3cXEYt.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.4.8-dev",
3
+ "version": "5.4.9-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -28,9 +28,9 @@
28
28
  "@sentry/core": "^9.42.1",
29
29
  "@sentry/react": "^9.42.1",
30
30
  "@stripe/stripe-js": "^4.4.0",
31
- "@zeniai/client-analytics": "2.1.9",
32
- "@zeniai/client-epic-state": "5.3.2",
33
- "@zeniai/web-components": "4.4.44",
31
+ "@zeniai/client-analytics": "2.1.11",
32
+ "@zeniai/client-epic-state": "5.3.0",
33
+ "@zeniai/web-components": "4.4.45",
34
34
  "color": "3.1.3",
35
35
  "crypto-js": "4.2.0",
36
36
  "dnd-core": "^16.0.1",
@@ -1,9 +0,0 @@
1
- import{j as R}from"./liveblocks-oxGmLiGE.js";import{a as i}from"./sentry-CYolppN9.js";import{h as H,g as K,u as X,j as A,s as W,l as Y}from"./core-k1hJbZ6L.js";import{ag as ee,p as te,d as B,z as ne,q as $,ah as ae,k as ce,O as oe}from"./index-Cjqi6Pkt.js";import{bn as se,fI as ie,gZ as ue,oJ as J,Vv as re,ic as G,gk as le,ow as de,Vw as pe,Vx as ge,Vy as me,ul as Ae,m3 as be,ou as Ie,oq as fe,oF as ye,oB as Se,ie as he,Vz as Ee,VA as ve}from"./zeni-epic-state-C2CKsxzr.js";import{n as we}from"./mui-D8QuRJEy.js";import{M as Ce}from"./MobileAppDrawer-D95K9MWM.js";import{q as Q}from"./QBOConnectionScreen-B_jTzA2E.js";import{g as h,a as E,m as ze}from"./accountMappingHelper-CCESaK7R.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="aefd55e2-515f-4b7a-9d3f-65acfc48df95",n._sentryDebugIdIdentifier="sentry-dbid-aefd55e2-515f-4b7a-9d3f-65acfc48df95")}catch{}})();const r="zeni_pending_projects_enable",l={pending:"pending",ready:"ready"},Ve=we.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: ${n=>n.theme.colors.grey4};
9
- `,xe=Y((function(n,e){return{accountMappingView:e.accountMappingView,isFiling1099FeatureEnabled:e.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:e.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:be(n),isAccountingClassesUpdateInProgress:n.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Ae(n),isAccountingProjectsUpdateInProgress:(()=>{const u=sessionStorage.getItem(r),a=u===l.pending||u===l.ready;return n.companyViewState.passportView?.accountingProjectsUpdateStatus?.fetchState==="In-Progress"||a})(),isAutoReviewIncomeWithoutCustomerEnabled:me(n),isAutoReviewIncomeWithoutCustomerUpdateInProgress:n.companyViewState.passportView?.autoReviewIncomeWithoutCustomerUpdateStatus?.fetchState==="In-Progress",isRevenueAutomationEnabled:e.isRevenueAutomationEnabled,isCapitalizationFeatureEnabled:e.isCapitalizationFeatureEnabled,capitalizableAccounts:e.capitalizableAccounts,accountNamesById:e.accountNamesById,capitalizableAccountOverrides:e.capitalizableAccountOverrides,isCapitalizationThresholdSaving:e.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:e.onSaveCapitalizationAccountThreshold}}),(function(n,e){const{navigate:u,location:a,isFiling1099FeatureEnabled:p}=e;return{onAccountMappingChange:s=>{const{uncategorizedAccountSection:d,billsAccountSection:v,reimbursementsAccountSection:w,vendorsAccountSection:C,filing1099Section:z}=s,{incomeAccount:V,expenseAccount:x}=d,{billPayAccount:F}=v,{reimbursementsAccount:c}=w,{prepaidExpensesAccount:T,fixedAssetsAccount:g,accruedExpensesAccount:O}=C,{bankAccount:P,expenseCategory1099:k}=z,M=h(e.accountMappingView.incomeAccountList,V.selectedOption),b=h(e.accountMappingView.expenseAccountList,x.selectedOption),j=h(e.accountMappingView.billPayAccountList,F.selectedOption),I=h(e.accountMappingView.reimbursementsAccountList,c.selectedOption),_=E(e.accountMappingView.prepaidExpensesAccountList,T.selectedOptions),D=E(e.accountMappingView.fixedAssetsAccountList,g.selectedOptions),L=E(e.accountMappingView.accruedExpensesAccountList,O.selectedOptions),f=E(e.accountMappingView.bankAccounts1099FilingAccountList,P.selectedOptions),U=ze(e.accountMappingView.expenseAccounts1099FilingAccountList,k),y={selectedIncomeAccountId:M?.accountId,selectedExpenseAccountId:b?.accountId,selectedBillPayAccountId:j?.accountId,selectedReimbursementsAccountId:I?.accountId,selectedPrepaidExpensesAccountIds:_.map((t=>t.accountId)),selectedFixedAssetsAccountIds:D.map((t=>t.accountId)),selectedAccruedExpensesAccountIds:L.map((t=>t.accountId)),selectedBankAccounts1099FilingAccountIds:f.map((t=>t.accountId)),selectedExpenseAccounts1099FilingAccountIds:U};n(ve({data:y}))},onBackClick:()=>{$(a)===!1?(u("../../dashboard"),n(Ee())):n(G())},onSaveClick:()=>{n(he()),p&&ce.track(oe.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:s=>{n(Se(e.currentTenant.companyId,s))},onAutoReviewIncomeWithoutCustomerToggle:s=>{n(ye(e.currentTenant.companyId,s))},onAccountingProjectsToggle:s=>{const d=sessionStorage.getItem(r);d===l.pending||d===l.ready||n(s?Ie(e.currentTenant.companyId):fe(e.currentTenant.companyId))}}}))(ae),Le=()=>{const n=ee(),e=H(),u=K(),a=X(),{useFeatureGate:p,useDynamicConfig:s}=te(),{isFeatureEnabled:d}=p(B.isFiling1099FeatureEnabled),{isFeatureEnabled:v}=p(B.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:w}=p(B.isRevenueAutomationEnabled),{configValue:C,isDynamicConfigLoading:z}=s("transaction_categorization_config"),V=!z&&C?.capitalization_enabled===!0,x=ne.getSignedInUser(),F=se(x),c=A((t=>ie(t))),{capitalizableAccounts:T,capitalizableAccountOverrides:g,isCapitalizationThresholdSaving:O,currencySymbol:P}=A((t=>{const o=t.tenantState.currentTenantId,m=o!=null?t.tenantState.tenantsById[o]:void 0,S=ue(t.companyState,c.companyId);return{capitalizableAccounts:m?.capitalizableAccounts??null,capitalizableAccountOverrides:m?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:t.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:S?.company.companyLocaleInfo?.currencySymbol??"$"}}),W),k=i.useCallback(((t,o)=>{a(J(c.companyId,t,o))}),[a,c.companyId]),M=i.useCallback((t=>{const o={...g??{}},m=Object.entries(t);for(const[N,q]of m)q===null?delete o[N]:o[N]=q;const[S,Z]=m[0]??[];S!=null&&a(J(c.companyId,S,Z,void 0,Object.keys(o).length>0?o:null))}),[a,c.companyId,g]),b=A((t=>re(t.accountState)),W),j=i.useMemo((()=>{const t={};for(const o of b)o.accountId!=null&&o.accountName!=null&&(t[o.accountId]=o.accountName);return t}),[b]),[I,_]=i.useState(!1),[D,L]=i.useState(!1);i.useEffect((()=>{I===!1&&(a(G()),_(!0))}),[I]);const f=A((t=>t.companyViewState.passportView?.needsQboProjectsReconnect===!0));i.useEffect((()=>{sessionStorage.getItem(r)===l.pending&&(sessionStorage.removeItem(r),a(le({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})))}),[a]),i.useEffect((()=>{sessionStorage.getItem(r)===l.ready&&c?.companyId!=null&&(sessionStorage.removeItem(r),a(de(c.companyId)))}),[c?.companyId,a]),i.useEffect((()=>{f&&c?.tenantEmailDomain!=null&&(sessionStorage.setItem(r,l.pending),a(pe()),Q.init("/connection/auth",c.tenantEmailDomain),Q.handleClick())}),[f,c?.tenantEmailDomain,a]);const U=A((t=>ge(t))),y=t=>{L(t)};return R.jsxs(Ve,{children:[R.jsx(Ce,{isAppContentDrawerOpen:D,handleDrawerToggle:y}),R.jsx(xe,{currentTenant:c,navigate:e,meetingUrl:n("account_mapping"),accountMappingView:U,isFiling1099FeatureEnabled:d&&F,isAccruedExpensesFeatureEnabled:v,isRevenueAutomationEnabled:w,isCapitalizationFeatureEnabled:V,capitalizableAccounts:T,accountNamesById:j,capitalizableAccountOverrides:g,currencySymbol:P,isCapitalizationThresholdSaving:O,onSaveCapitalizationAccountThreshold:k,onSaveCapitalizationAccountThresholds:M,location:u,isSettings:$(u),onClickMenuIcon:()=>y(!0)})]})};export{r as P,Le as U,l as a};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-oxGmLiGE.js";import{A as i}from"./AddressScreen-B7HfNJJM.js";import s from"./NotFoundScreen-ngkmWfLO.js";import"./sentry-CYolppN9.js";import{n as d,o as r}from"./core-k1hJbZ6L.js";import"./zeni-epic-state-C2CKsxzr.js";import"./recharts-DZG9umMy.js";import"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="da3bef66-2720-4570-8362-1786283303d9",t._sentryDebugIdIdentifier="sentry-dbid-da3bef66-2720-4570-8362-1786283303d9")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-oxGmLiGE.js";import{a as h}from"./sentry-CYolppN9.js";import{h as T,u as P,g as j,i as E,j as $,l as B}from"./core-k1hJbZ6L.js";import{$ as L,z as M,V as D,a5 as K,a6 as W,k as C,O as S,a1 as z,W as b,a2 as F}from"./index-Cjqi6Pkt.js";import{Wc as _,it as N,fI as O,Wd as R,ca as U,We as V,mL as G}from"./zeni-epic-state-C2CKsxzr.js";import{u as q,n as H}from"./mui-D8QuRJEy.js";import J from"./NotFoundScreen-ngkmWfLO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="91e8b2c4-1801-4376-a334-cee69fae03b6",e._sentryDebugIdIdentifier="sentry-dbid-91e8b2c4-1801-4376-a334-cee69fae03b6")}catch{}})();const Q=H.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,X=B((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=O(e),a=s.roleMap!=null&&R(s.roleMap),n=i||c==="user_address"||U(l?.userRole??[])||a?void 0:"readonly";if(o==null){const t=V(c,e);return{addressToEdit:t?.addressToCreate,loadingState:t?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:n,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const d=_(e,o);return{addressToEdit:d.address,loadingState:d.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:n}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const n=i.state,d=F(n?.pathnameStackToGoBack);let t=d.poppedPathname??k();const u=n?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(t=`${t}?${g}`)}o(t,{state:{pathnameStackToGoBack:d.newStack}})}};return{onSubmitHandler:a=>{const n=Y(a);e(G({addressType:c,addressToCreate:n})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(z);function re({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),n=P(),d=j(),{addressId:t,addressType:u}=E(),g=L(),v=q(),w=M.getSignedInUser(),[p,I]=h.useState(t==null),f=$((m=>t!=null?_(m,t).fetchState:"Not-Started")),x=D();if(w==null)throw Error("Can't access address page without signing in...");const A=m=>m.trackPageLoaded(t!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect((()=>{p||t==null||(I(!0),n(N(t,!1)))}),[p,t,n]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address|invoicing_customer_billing_address|invoicing_subscription_shipping_address|invoicing_business_address)$/g)?!p&&f==="Not-Started"||p&&f==="In-Progress"?r.jsx(K,{fetchState:f,style:{backgroundColor:v.colors.grey5}}):t!=null&&f==="Error"?(a(`${k(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(W,{analytics:C,onLoad:A}),r.jsx(Q,{windowSize:g,children:r.jsx(X,{location:d,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:t,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):r.jsx(J,{})}const k=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{re as A,Y as t};
@@ -1,9 +0,0 @@
1
- import{a as O}from"./sentry-CYolppN9.js";import{u as q,j as h,h as se,g as oe,i as ie,N as ce,l as re}from"./core-k1hJbZ6L.js";import{fI as B,Ia as ue,Io as de,LA as le,Oq as pe,P4 as me,PV as fe,_b as ye,C3 as Se,T7 as ge,_c as Ie,_d as he,_e as be,_f as Te,_g as De,_h as Ce,Wd as Oe,Zh as ke,Ws as Ve,MM as Ae,ME as _e,Wt as we,MI as Ne,mL as ve,gJ as Fe,gI as Ee,gH as xe,v6 as ze,uZ as Be,uW as Pe,mD as Re,Cc as Me,Ca as P,bG as R,Co as M,cG as Le}from"./zeni-epic-state-C2CKsxzr.js";import{bU as Ue,V as je,p as Ge,bj as We,z,a6 as qe,k as L,q as E,O as x,bW as Ze,ac as Ke,l as U,aE as j}from"./index-Cjqi6Pkt.js";import{n as $e}from"./mui-D8QuRJEy.js";import{j as A}from"./liveblocks-oxGmLiGE.js";import{d as G}from"./routePaths-BQiUfv8Y.js";import{M as He}from"./MobileAppDrawer-D95K9MWM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new e.Error().stack;c&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[c]="42a7e4c1-d32d-4f88-9343-cc8698afdc8d",e._sentryDebugIdIdentifier="sentry-dbid-42a7e4c1-d32d-4f88-9343-cc8698afdc8d")}catch{}})();function it(){const e=q(),c=h((u=>B(u))),a=c?.tenantId,{isApprovalRulesV3Enabled:s,isLoading:l}=Ue(a),p=h((u=>u.billPaySetupApproverViewState.fetchState));O.useEffect((()=>{a==null||l||p==="Not-Started"&&e(ue(!0,!0,s))}),[a,l,s,p,e])}function W(e,c,a,s=!1){switch(c){case"zeni_accounts":e(fe(a,!0,s));break;case"zeni_treasury":e(me(a,!0,s));break;case"reimbursement":e(pe(a,!0,s));break;case"charge_cards":e(le(a,!0,s));break;default:e(de(a,!0,s))}}const Je=$e.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: ${e=>e.theme.colors.grey4};
9
- `,Qe=re((function(e,c){const{businessVerificationDetails:a}=c,s=B(e),l=z.getSignedInUser(),p=s.tenantId,u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:p??""},b=Oe(c.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=ke(e.companyConfigState),o=Ve(e.userRoleConfigState);return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${Ke.fileMicroServiceBaseUrl}`,authParams:u,isDisabled:b,allIndustries:t.companyIndustries??[],companyTitles:o.companyTitles}}),(function(e,c){const{companyId:a,productType:s,currentTenant:l,navigate:p,location:u}=c,{tenantEmailDomain:b}=l;return{onCompanyDetailsChanged:t=>{const{companyDescription:o,companyIndustry:m,companyIndustryType:k,companyLegalName:V,companyTaxId:y,companyWebsite:f,companyPhone:S,primaryContactEmail:d,primaryContactName:i,primaryContactUserId:T,primaryContactSyncToken:D,syncToken:r,fileIds:C,incDate:n,typeOfIncorporation:g,stateOfIncorporation:_,sourceOfFunds:w,companySubIndustry:N,countriesOfOperations:I,companySourceOfFunds:Z,companySourceOfFundsDescription:K,transactionVolume:$,transactionVolumeDescription:H,purposeOfAccount:J,purposeOfAccountDescription:Q,regulatedStatus:X,regulatedStatusDescription:Y,usNexus:ee,usNexusTypes:te}=t,v=k?.selectedOption,ae={companyId:a,companyDescription:o,companyIndustry:m.selectedOption,companyIndustryType:v==null||v===""?void 0:v,companyLegalName:V,taxIdOrEIN:y,website:f!=""&&f!=null?Le(f):void 0,phone:S,syncToken:r,fileIds:C,incDate:n!=null?R(n?.toString()):n,typeOfIncorporation:g?.selectedOption??"",stateOfIncorporation:_?.selectedOption??"",sourceOfFunds:w?.selectedOption??"",companySubIndustry:N?.selectedOption??"",countriesOfOperations:I?.selectedOptions.map((F=>F.length===2?F:j(F)))??[],companySourceOfFunds:Z?.selectedOption??"",companySourceOfFundsDescription:K,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:H,purposeOfAccount:J?.selectedOption??"",purposeOfAccountDescription:Q,regulatedStatus:X??"",regulatedStatusDescription:Y,usNexus:ee,usNexusTypes:te?.selectedOptions??[]},ne={userId:T,firstName:i.firstName,lastName:i.lastName,email:d,syncToken:D};e(M({companyDetails:ae,primaryContactDetails:ne}))},onCompanyOfficerUpdated:t=>{const o=t.map((m=>{const{officerType:k,userId:V,name:y,email:f,nationalityCountryCode:S,ssn:d,dob:i,phone:T,syncToken:D,selectDocument:r,role:C,ownership:n,isSelectedForVerification:g,userVerificationStatus:_,treasuryUserVerificationStatus:w,fileIds:N}=m;let I;return r.selectDocumentType==="driverLicense"?I="driving_license":r.selectDocumentType==="passport"?I="passport":r.selectDocumentType==="stateId"?I="id_document":r.selectDocumentType==="ssnCard"&&(I="social_security_card"),{officerType:k,userId:V,firstName:y.firstName,lastName:y.lastName,email:f,ssn:d,nationalityCountryCode:S?.selectedOption!=null?j(S.selectedOption):void 0,phone:T,birthday:i!=null?R(i?.toString()):i,syncToken:D,titleAtCompany:C.selectedOption,ownershipInCompany:n,documentTypeSelectedForVerification:I,isSelectedForVerification:g,userVerificationStatus:_,treasuryUserVerificationStatus:w,fileIds:N,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(M({officers:o}))},onSaveDetailsClick:t=>{e(P(a,t,s))},onSendForVerificationClick:t=>{e(P(a,t,s,!0))},onAddressClick:t=>{const o=G(b,t),m=U(u.state?.pathnameStackToGoBack,u.pathname);p(o,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:t=>{const o=G(b,t),m=U(u.state?.pathnameStackToGoBack,u.pathname);p(o,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{e(Me({companyId:a})),p("../setup")},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(Pe(t))},onDeleteFileList:t=>{e(Be(t))},onEditFileName:(t,o)=>{e(ze(t,o.split(".")[0]))},onGetOtp:t=>{e(xe(t,"SpendManagementSetup"))},onResendOtp:t=>{e(Ee(t,"SpendManagementSetup"))},onVerifyOtp:(t,o)=>{e(Fe(t,o,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,o)=>{e(ve({addressType:t,addressToCreate:o}))},onIdentityDocumentUploadedForAutofill:t=>{if(a==null)return;const o=we(t.documentType);o!=null&&e(Ne({target:"setup",companyId:a,officerType:t.officerType,fileId:t.fileId,documentType:o}))},onCompanyDocumentUploadedForAutofill:t=>{a!=null&&e(_e({target:"setup",companyId:a,fileId:t.fileId,documentType:t.documentType}))},onResetKycKybClick:()=>{e(Ae())}}}))(Ze),ct=({productType:e})=>{const c=se(),a=oe(),s=q(),[l,p]=O.useState(!1),[u,b]=O.useState(!1),{tenantEmailDomain:t}=ie(),o=je(),{useDynamicConfig:m}=Ge(),{configValue:k}=m(We.zeniAccountsConfig),V=ye(k),y=h((n=>{switch(e){case"zeni_accounts":return n.zeniAccountSetupViewState.fetchState;case"reimbursement":return n.remiSetupViewState.fetchState;case"charge_cards":return n.chargeCardSetupViewState.fetchState;case"zeni_treasury":return n.treasurySetupViewState.fetchState;default:return n.billPaySetupViewState.fetchState}})),f=h((n=>n.companyConfigState.fetchState)),S=h((n=>n.userRoleConfigState.fetchState)),d=h((n=>B(n))),i=d.companyId??z.getSignedInUserTenant(t)?.companyId;O.useEffect((()=>{f==="Not-Started"&&s(Se()),S==="Not-Started"&&s(ge(!0))}),[f,S,s]),O.useEffect((()=>{l||y!=="Not-Started"||i==null||(p(!0),W(s,e,i))}),[l,y,i,s]);const T=h((n=>{switch(e){case"zeni_accounts":return De(n,i);case"zeni_treasury":return Te(n,i);case"charge_cards":return be(n,i);case"reimbursement":return he(n,i);default:return Ie(n,i)}})),D=T.kycKybResetStatus.fetchState;if(O.useEffect((()=>{D==="Completed"&&i!=null&&(W(s,e,i,!0),s(Ce()))}),[D,i,e,s]),z.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let r;switch(e){case"zeni_accounts":r=d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":r=d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":r=d.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||d.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":r=d.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:r=d.companyBillPayInfo?.info?.isBillPayTOSAccepted}const C=n=>{b(n)};return r===!1?A.jsx(ce,{to:"../promo"}):A.jsxs(Je,{children:[A.jsx(qe,{analytics:L,onLoad:n=>(g=>{switch(e){case"zeni_accounts":return g.trackPageLoaded(x.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return g.trackPageLoaded(x.Event.reimbursementBusinessVerification);default:return g.trackPageLoaded(x.Event.billPayBusinessVerification,E(a)?"Settings":void 0)}})(n)}),E(a)?A.jsx(He,{isAppContentDrawerOpen:u,handleDrawerToggle:C}):null,A.jsx(Qe,{businessVerificationDetails:T,navigate:c,location:a,companyId:i,analytics:L,currentTenant:d,productType:e,isSettings:E(a),roleMap:o?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{C(!0)},maxInsuredAmount:V.maxInsuredAmount})]})};export{ct as B,W as d,it as u};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-oxGmLiGE.js";import{a as o}from"./sentry-CYolppN9.js";import{u as F,h as H,g as R,j as C,N as w}from"./core-k1hJbZ6L.js";import{UI as q,fI as z,go as G,p_ as V,gP as A,gn as Q,gl as B,V6 as J,gk as O}from"./zeni-epic-state-C2CKsxzr.js";import{u as K,z as E,L as D,G as M,H as W}from"./index-Cjqi6Pkt.js";import{n as X}from"./mui-D8QuRJEy.js";import{P as h,a as T}from"./AccountMappingScreen-DxODZ1Nk.js";import{t as Y}from"./getLocaleForTenant-Bok1bQNl.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-B_jTzA2E.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./MobileAppDrawer-D95K9MWM.js";import"./InboxNotificationsProvider-Lon_JjZI.js";import"./useTaskManagerAccess-CbR2C9f7.js";import"./accountMappingHelper-CCESaK7R.js";import"./empty-DXUNZiQh.js";import"./pdf-lib-CmPW-Sf3.js";import"./index-DGy3NvOY.js";import"./url-BJMHxMoG.js";import"./index-B1EgaaVs.js";import"./decodeURIComponentSafe-CKsYKxPJ.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]="320b49c0-fa73-4a16-ae1f-ae7277ead057",t._sentryDebugIdIdentifier="sentry-dbid-320b49c0-fa73-4a16-ae1f-ae7277ead057")}catch{}})();const te=X.div`
2
- display: flex;
3
- flex: 1 1 auto;
4
- flex-direction: row;
5
- justify-content: center;
6
- align-items: center;
7
- width: 100%;
8
- height: 100vh;
9
- background-color: ${t=>t.theme.colors.background};
10
- box-shadow: ${t=>`0px 2px ${W.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function we(){const t=F(),i=H(),v=R(),{setLoading:c,clearAllLoading:m}=K(),S=o.useRef(!1),x=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 j=sessionStorage.getItem(h),u=j===T.pending,P=j===T.ready,b=C((s=>q(s))),e=C((s=>z(s))),n=C((s=>s.tenantState.fetchState)),r=C((s=>s.tenantState.activeTenantFetchState.fetchState)),a=E.getSignedInUser(),g=E.getActiveTenantForUser()?.tenantId,l=e?.externalConnections?.fetchState,d=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{c(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&&!x.current&&a!=null&&(x.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(V(a.userId)))}),[x,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(c(D.CONNECTION_AUTH),t(A(a.userId,e.tenantId)))}),[d]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(Q(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),B(a?.userId,a?.zeniSessionId,e.tenantId),M.updateAppLocaleID(Y(J(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((()=>{b.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder)}),[b.tenantsCoreDetailsInOrder.length,n]);const _=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||_)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&d==="Completed"?(sessionStorage.setItem(h,T.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,_,d,f,y,e.tenantEmailDomain,m,t,i]),_)return null;if(f||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const k=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return P?I.jsx(w,{to:k,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-oxGmLiGE.js";import{z as m}from"./index-Cjqi6Pkt.js";import{g as n}from"./QBOConnectionScreen-B_jTzA2E.js";import"./sentry-CYolppN9.js";import{g as p,N as a}from"./core-k1hJbZ6L.js";import"./zeni-epic-state-C2CKsxzr.js";import"./recharts-DZG9umMy.js";import"./mui-D8QuRJEy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./empty-DXUNZiQh.js";import"./pdf-lib-CmPW-Sf3.js";import"./index-DGy3NvOY.js";import"./url-BJMHxMoG.js";import"./index-B1EgaaVs.js";import"./decodeURIComponentSafe-CKsYKxPJ.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]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-oxGmLiGE.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-k1hJbZ6L.js";import{ZW as k,_1 as W,gJ as X,gI as J,gH as Q,kT as q,XH as K,uZ as L,fI as B,Zt as D,kR as T,ZX as S,_4 as F,kP as G,la as j}from"./zeni-epic-state-C2CKsxzr.js";import{bO as M,$ as R,p as N,z as Z,a2 as p,d as v,a5 as H,bP as Y,H as U,bQ as ee,l as te}from"./index-Cjqi6Pkt.js";import{u as _,n as O}from"./mui-D8QuRJEy.js";import"./sentry-CYolppN9.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]="8b58171a-039b-4283-88f4-4866ebb9d136",e._sentryDebugIdIdentifier="sentry-dbid-8b58171a-039b-4283-88f4-4866ebb9d136")}catch{}})();const ae=A(null,(function(e,t){return{onSaveVendor:a=>{e(q(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),a!=null&&e(L(a))},onGetOtp:a=>{e(Q(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(X(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(W(a,n,o))}}}))(M);function z({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((i=>k(i,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=O.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:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:a,location:n,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(n.state?.pathnameStackToGoBack),i=s.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:i}=s;e(F({data:i}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(Y);function fe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=R(),{vendorId:s,billId:i}=V(),c=e??s,{useFeatureGate:r}=N(),d=Z.getSignedInUser(),b=h((u=>B(u))),g=_(),I=p(n.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,c))),{isFeatureEnabled:x}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(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(H,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ne,{windowSize:o,children:[l.jsx(z,{vendorId:c,billId:i}),l.jsx(oe,{location:n,navigate:a,billId:i,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t},me=(e,t,a)=>{let n=`/${e}/bill/${encodeURIComponent(t)}`;return a=="draft"&&(n+="/edit"),n},he=e=>`/${e}/bills`,ke=(e,t)=>{let a=`/${e}/bill`;return a=t!=null?a.concat(`/${t}/edit`):a.concat("/new"),a},E=(e,t,a,n)=>{let o=`/${e}/bill`;return o+=a!=null?`/${a}/edit/vendor`:"/new/vendor",o+=n!=null?`/${n}/edit/${t}`:`/create/${t}`,o};function Se(e,t,a){return E(e,"ach",t,a)}function ve(e,t,a){return E(e,"domestic",t,a)}function ge(e,t,a){return E(e,"international",t,a)}const se=(e,t,a)=>{let n=`/${e}/bill/`;return n=a!=null?n.concat(`${encodeURIComponent(a)}/${t}/`):n.concat(`new/${t}/`),n},re=O.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 ${U.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,ie=A((function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:a,navigate:n,location:o,vendorId:s,currentTenant:i}=t,{tenantEmailDomain:c}=i;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:d}=r;e(F({data:d}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),d=r.poppedPathname??P();n(d,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")n("./add-address");else{const d=se(c,r,a),b=te(o.state?.pathnameStackToGoBack,o.pathname);n(d,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),d=r.poppedPathname??P(0);t.navigate(d,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}}))(ee);function Ie({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=R(),{vendorId:s,billId:i}=V(),c=e??s,r=Z.getSignedInUser(),{useFeatureGate:d}=N(),b=_(),g=h((u=>B(u))),I=p(n.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(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(H,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${U.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(z,{vendorId:c,billId:i}),l.jsx(ie,{location:n,navigate:a,billId:i,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{fe as A,Ie as D,z 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-oxGmLiGE.js";import{a as d}from"./sentry-CYolppN9.js";import{h as A,u as B,g as X,i as q,j as l,N as F,l as N,n as O,o as _}from"./core-k1hJbZ6L.js";import{XZ as Y,fI as $,X1 as H,n3 as M,S$ as I,Y2 as R,XG as W,m3 as z,T0 as S,X6 as V,X7 as Z,XI as J,XH as K}from"./zeni-epic-state-C2CKsxzr.js";import{b9 as L,k as Q,a2 as U,l as tt}from"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import{d as b}from"./decodeURIComponentSafe-CKsYKxPJ.js";import{w as et}from"./withTransactionSidePanel-zjTjrZrt.js";import{f as at,c as nt}from"./routePaths-BQiUfv8Y.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import"./TransactionDetailScreen-CUF4XJ-a.js";import"./useInitialThreadRequest-DKk3Gbri.js";import"./expenseAutomationHelper-BfCR3sLm.js";import"./stripSplatSuffix-yEJV_xmD.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]="0c068df5-b76e-4639-a33b-73d2d67b8a6c",a._sentryDebugIdIdentifier="sentry-dbid-0c068df5-b76e-4639-a33b-73d2d67b8a6c")}catch{}})();const ot=N((function(a,t){const e=t.entity,o=R(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:W(a,"common")},trendWithTransactionsReport:o,analytics:Q,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(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(K("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(Z()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=U(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(L),it=et((function({entityType:a,...t}){const e=A(),o=B(),c=X(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:w,entityNameEncoded:x}=q(),r=b(w??""),p=b(x??""),u=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l((n=>Y(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),G=l((n=>$(n).company?.companyInfo.firstMonthOfFY??1)),f=l((n=>H(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&u===!0&&(T(!0),o(M(i)))}),[m,u,i]);const E=l((n=>n.trendState.fetchState)),P=f?.selectedPeriod?.timePeriod??g,v=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(f?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:k(j.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function Gt({entityType:a}){return s.jsx(O,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{Gt as EntityDetailRoutes,Gt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-oxGmLiGE.js";import{a as r}from"./sentry-CYolppN9.js";import{au as f,av as l,s as p,a2 as m}from"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import c from"./NotFoundScreen-ngkmWfLO.js";import{h as u,g as b}from"./core-k1hJbZ6L.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]="7698f57c-9ebe-4017-b325-0803d56e00f6",e._sentryDebugIdIdentifier="sentry-dbid-7698f57c-9ebe-4017-b325-0803d56e00f6")}catch{}})();const _=()=>{const e=u(),t=b(),a=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),i=r.useCallback((()=>{(()=>{const n=m(t.state?.pathnameStackToGoBack),d=n.poppedPathname??k();e(d,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(t.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:a,onGoBack:i}):s.jsx(c,{})},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 i}from"./sentry-CYolppN9.js";import{u as l,h as f,g as m}from"./core-k1hJbZ6L.js";import{i0 as p,Vm as g,Vn as _}from"./zeni-epic-state-C2CKsxzr.js";import{u as b,L as h,z as y}from"./index-Cjqi6Pkt.js";import"./liveblocks-oxGmLiGE.js";import"./recharts-DZG9umMy.js";import"./mui-D8QuRJEy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="41668f96-8f56-4b64-9d99-b7348ccd25ec",e._sentryDebugIdIdentifier="sentry-dbid-41668f96-8f56-4b64-9d99-b7348ccd25ec")}catch{}})();function V(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:u}=b(),s=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);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 d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};
@@ -1,72 +0,0 @@
1
- import{j as a}from"./liveblocks-oxGmLiGE.js";import{i as S,l as g,h as C,g as y,u as ee,t as ae,j as E,N as te,n as ne,o as p}from"./core-k1hJbZ6L.js";import{Vf as k,Vg as j,Vh as F,K3 as D,JR as T,Vi as B,Vj as oe,Vk as ie,JV as se,gl as $,K0 as le,JZ as re}from"./zeni-epic-state-C2CKsxzr.js";import{$ as x,H as r,a0 as de,k as v,W as G,a1 as ce,a2 as me,a3 as pe,l as H,p as ue,d as he,a4 as ge,c as xe,g as fe,a5 as we,a6 as be,Z as Se,a7 as ye,a8 as ke,a9 as je,aa as ve}from"./index-Cjqi6Pkt.js";import{n as m,u as $e}from"./mui-D8QuRJEy.js";import f from"./NotFoundScreen-ngkmWfLO.js";import{a as I}from"./sentry-CYolppN9.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="1dae9ab6-76fd-4b90-9020-301015f3f7e5",e._sentryDebugIdIdentifier="sentry-dbid-1dae9ab6-76fd-4b90-9020-301015f3f7e5")}catch{}})();const Ie=m.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: ${e=>e.theme.colors.grey4};
9
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=g((function(e){const t=k(e),n=j(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(D(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(F({data:l}))}}}))(de);function V(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const De=m.div`
11
- display: flex;
12
- height: 100vh;
13
- width: 100%;
14
- flex: 1 1 auto;
15
- flex-direction: column;
16
- align-items: center;
17
- background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,Be=g((function(e,t){const{isSubPage:n}=t;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}}),(function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Pe();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=ze(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}}))(ce);function Ae({isSubPage:e}){const t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(De,{windowSize:o,children:a.jsx(Be,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
20
- display: flex;
21
- height: 100%;
22
- width: 100%;
23
- flex: 1 1 auto;
24
- flex-direction: column;
25
- align-items: center;
26
- background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=g((function(e){const t=k(e),n=j(e),o=B(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(F({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(pe);function Ee(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:i})})})}const Ve=m.div`
29
- display: flex;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: column;
34
- align-items: center;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Fe=g((function(e){const t=k(e),n=j(e),o=B(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(ge);function Te(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Ve,{windowSize:n,children:a.jsx(Fe,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new je(100,58)},He=m(ye)`
38
- width: ${r.sp4};
39
- height: ${r.sp4};
40
- margin-bottom: ${r.sp3};
41
- margin-top: ${r.sp3};
42
- margin-left: ${r.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,Ke=m.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,Me=m.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
- `,We=m.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
- height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
- overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
- width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
- background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
- margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,_e=g((function(e,t){return{file:t.file,type:t.type}}))(ke);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),d=s.get("token"),K=n.pathname.includes("address"),w=x(),M=xe(),A=$e(),b=fe(),W=()=>{M.toggle()},_=E((u=>k(u))),J=E((u=>j(u))),{authParams:U,fetchState:c,billAttachment:R,billFetchState:P,companyName:Z,currencySymbol:q,amount:O}=_,{tenantId:z,userId:L,sessionId:N}=U,{fetchState:Q,internationalBankAccountCreateStatus:X}=J;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{b&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(le(i,o,d))}),[b,c,i,o,d,t]),I.useEffect((()=>{b&&c==="Completed"&&($(L,N,z),l!=null&&t(re(l)))}),[c,b,L,N,z,l,t]),c==="Error"?a.jsx(f,{}):Q==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(be,{analytics:v,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",i??"",Z,l??"",Je(n.pathname),q,O))(u)}),a.jsxs(Ke,{windowSize:w,children:[w!=="small"?a.jsx(He,{onClick:W}):null,a.jsx(We,{windowSize:w,isAddressPage:K,children:P==="In-Progress"?a.jsx(Se,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:R,type:"bill"})}),a.jsx(Me,{windowSize:w,children:e})]})]})}const Je=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return a.jsx(ve,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Ue,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(V,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(V,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Te,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-oxGmLiGE.js";import{a as g}from"./sentry-CYolppN9.js";import{u as F,g as O,h as _,t as w,j as l,N as T}from"./core-k1hJbZ6L.js";import{z as r,G as M,N as P,k as A,O as N,Y as R,Z as Y,R as G}from"./index-Cjqi6Pkt.js";import{fI as K,UK as W,Vb as Z,V2 as $,gl as q,gn as B,V7 as H,gY as J,dl as Q,Vc as X,Vd as ee}from"./zeni-epic-state-C2CKsxzr.js";import{u as te,n as ne}from"./mui-D8QuRJEy.js";import{u as se}from"./useDeviceId-BqvO5dq-.js";import{f as ae}from"./analyticsHelper-w2YkQjq1.js";import{t as ie}from"./getLocaleForTenant-Bok1bQNl.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="5a9c4bdf-5e2d-4501-abc1-4bd232297630",t._sentryDebugIdIdentifier="sentry-dbid-5a9c4bdf-5e2d-4501-abc1-4bd232297630")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=F(),a=O(),f=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=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=>K(e))),b=l((e=>W(e))),E=r.getSignedInUser(),v=te().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(Z(n,i,m)))}),[n,p,t,i,m,s?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants($(b.tenantsInOrder),s.zeniSessionId),q(s.userId,s.zeniSessionId,o.tenantId),t(B(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(H("Completed")),M.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),J().then((()=>{const e=G();e!=null&&P(e)})),setTimeout((()=>{A.trackLogin(N.Event.loginSuccess,"email",Q(o.productSettings))}),2e3))}),[I,S,y,s,o,b,v,a.state,t]);const V=g.useCallback((()=>{f("/signin/auth")}),[f]),U=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(X(i,c,d))}),[i,d,t,c]),j=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(ee(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:V});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(Y,{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{De as default};
@@ -1 +0,0 @@
1
- import{j as _}from"./liveblocks-oxGmLiGE.js";import{a as f}from"./sentry-CYolppN9.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as F}from"./core-k1hJbZ6L.js";import{fI as ne,UL as Me,UM as se,gc as xe,fH as Ne,UV as Pe,UO as Re,UP as Ve,q7 as Le,gp as Oe,US as b,UX as je,UY as K,gq as Ze,UZ as He,EH as qe,h5 as ze,cX as Xe,U_ as Ye,gb as Je,gr as We}from"./zeni-epic-state-C2CKsxzr.js";import{w as Ke,i as Qe,c as ea,p as aa,e as ta,g as na,u as sa,d as c,h as oa,r as ia,z as ra,f as da,n as ca,X as la,v as ua,o as fa,q as Q,L as ma,E as ha,F as ba,l as S,k as ee,A as pa,J as ae,C as ga,D as Sa}from"./index-Cjqi6Pkt.js";import{D as Ea}from"./mui-D8QuRJEy.js";import{u as ka}from"./InboxNotificationsProvider-Lon_JjZI.js";import{u as Ca}from"./useTaskManagerAccess-CbR2C9f7.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]="be716d24-f3cc-49cc-b3d8-2cf6a3b6565e",l._sentryDebugIdIdentifier="sentry-dbid-be716d24-f3cc-49cc-b3d8-2cf6a3b6565e")}catch{}})();const Ta=Ke((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),E=ea(),n=Ue(),B=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Ne(e))),{status:ie}=t(Pe),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=f.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,M=F("/:tenantEmailDomain/reports")!==null,m=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Re(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));f.useEffect((()=>{C&&T&&!m&&v.fetchState==="Not-Started"&&r(Le(!0))}),[C,T,v.fetchState,m]);const D=t((e=>e.tenantState)),fe=t((e=>D.fetchState==="Completed"?Oe(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:me}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),P=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Ee=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>b(e).totalUnreadCount)),Ce=t((e=>b(e).reducedFetchCountState)),R=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=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:j,isFetchingMore:Z,hasFetchedAll:H,fetchMore:Te}=ka();f.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),f.useEffect((()=>{if(j===!1&&Z===!1&&H===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;U(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[j,Z,H]),f.useEffect((()=>{C&&k&&!m&&L.fetchState==="Not-Started"&&B.tenantId!=null&&r(je("task_manager","dashboard"))}),[C,k,m,L.fetchState,B.tenantId,r]),f.useEffect((()=>{m||I.fetchState!=="Not-Started"||r(K({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[m,I.fetchState,r]),f.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(K({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:ke},q=s!=null?ra.getSignedInUserTenant(s):null,z=t((e=>q?.tenantId!=null?Ze(e,q.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"),T===!1&&h.push("rewards_card"),P===!1&&h.push("expense_automation_card");const X=t((e=>He(e,h).fetchState)),Y=t((e=>qe(e).fetchState)),ye=A&&(X==="Completed"||X==="Error")||M&&(Y==="Completed"||Y==="Error")||!A&&!M?void 0:"disabled",we=f.useMemo((()=>ze(o.userRole)),[o.userRole]),Ae=Xe(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&N.fetchState==="Completed"&&Ye(N.notificationSettings,p.userEmail,x,o,k),J=da(),Fe=J&&ca(a);return _.jsx(Ea,{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:z!=null?[z]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:Q(a),isInvoicing:fa(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Ee,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:P,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=R===0&&V>0?"notifications/comments":"notifications/tasks";Q(a)&&(e=R===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(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:S(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=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),W=e.type,_e=ae(W)&&W!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),_e&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Be=ga(e.type);Sa(e.type)?(G!=null&&r(We()),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:()=>{E.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:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Ba=l=>{const i=te(),s=t((E=>ne(E))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(E,n)=>{Qe(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return _.jsx(Ta,{...l,...a})};export{Ba as M};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-oxGmLiGE.js";import{h as r,l as i}from"./core-k1hJbZ6L.js";import{ak as n}from"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import"./sentry-CYolppN9.js";import"./zeni-epic-state-C2CKsxzr.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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{n as mt,b as lt,o as ft,j as N}from"./liveblocks-oxGmLiGE.js";import ut from"./NotFoundScreen-ngkmWfLO.js";import{a as k}from"./sentry-CYolppN9.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 K}from"./core-k1hJbZ6L.js";import{cC as It,UO as X,fI as z,h5 as Ct,US as b,a21 as J,UY as m,UM as y,AS as j,GF as Tt,a22 as At,UL as yt,U_ as Et,AX as _t,a23 as $,br as F,gk as x,A$ as Q,a24 as Nt,cO as Bt,cH as wt}from"./zeni-epic-state-C2CKsxzr.js";import{ao as xt,e as Ut,p as vt,d as Dt,aq as Rt,dL as Gt,l as B,dM as Pt,w as Mt,dN as $t,i as Ft,a2 as jt}from"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import{u as Lt}from"./useTaskManagerAccess-CbR2C9f7.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.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]="c7053d41-d5de-47d6-914a-a84fb3c3ab2d",t._sentryDebugIdIdentifier="sentry-dbid-c7053d41-d5de-47d6-914a-a84fb3c3ab2d")}catch{}})();const qt=(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=X(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=z(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(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:v}=l;return{onNotificationClick:(e,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,C=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:C,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,C=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:C,message:"triggerBackClick"}})}d==="unread"&&t(Q("task_manager","read",[e],!1))},onCommentNotificationClick:(e,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(e),t($([e],F())));let i=`/${h}/${r[1]}`;const C=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:C,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(e,s)=>{t(y(e,s))},onUpdateNotificationTabState:(e,s)=>{t(m(e,s))},onUpdateNotificationViewCurrentTabAndSubTab:(e,s)=>{t(J(e,s));const d=`../${e}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:e=>{t(Nt(e))},onFetchMoreNotifications:(e,s)=>{if(e==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(e,s,d,r)=>{e==="tasks"?t(Q("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t($([i],F())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({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:e=>{e==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),qt(o,I).then((()=>{t($(o,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({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 e=jt(n.state?.pathnameStackToGoBack),s=e.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:e.newStack}})},onSettingsClick:()=>{const e=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:e}})}}}))(Mt($t)),Ht=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),e=S((a=>X(a))),s=S((a=>z(a))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:C}=Vt({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Z=Ct(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((a=>b(a).notificationDetailsByTab.tasks.fetchState)),L=S((a=>b(a).currentTab)),D=S((a=>b(a).currentSubTab)),tt=S((a=>b(a).notificationDetailsByTab.comments.fetchCountState)),R=S((a=>b(a).notificationDetailsByTab.comments.fetchState)),at=S((a=>b(a).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((a=>b(a).allExternalNotifications)).filter((a=>a.inboxNotification.readAt==null)).map((a=>a.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:T,isFetchingMore:G,fetchMore:ot}=mt(),{threads:q,isLoading:W,fetchMore:H,isFetchingMore:O,hasFetchedAll:Y}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(J(c)),c==null){const a=`../${L}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(a,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&T===!0&&s?.companyId!=null&&w!=null){const a=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===a&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,T]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(j("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const a=setTimeout((()=>ot?.()),0);return()=>clearTimeout(a)}));const P=E||G===!0||T!==!0||E||G===!0||T!==!0;k.useEffect((()=>{P&&R!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||R!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,R]),k.useEffect((()=>{o(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{e.fetchState!=="In-Progress"&&e.fetchState!=="Completed"&&I===!1&&(v(!0),o(Tt()))}),[e.fetchState]),k.useEffect((()=>{if(E===!1&&W===!1&&w!=null&&q!=null){const a=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===a)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=q.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(O||Y===!0||H==null||H(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,G,O,T,Y,W,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(a,p)=>{if(Ft(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(j("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return N.jsx(Wt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:i,onAskAiCfoClick:C,...nt})};function ma(){return N.jsxs(bt,{children:[N.jsx(K,{path:"/:selectedTab",element:N.jsx(Ht,{})}),N.jsx(K,{path:"*",element:N.jsx(ut,{})})]})}export{ma as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-oxGmLiGE.js";import{a as r}from"./sentry-CYolppN9.js";import{u as A,g as j,j as o,N as C}from"./core-k1hJbZ6L.js";import{Vp as P,fI as V,gp as x,Vq as z,Vr as D,Vs as M,Vt as R,p_ as k,U4 as q}from"./zeni-epic-state-C2CKsxzr.js";import{z as h,af as I}from"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="919ebe7d-1dee-42a4-91f4-0b2fbd78280b",n._sentryDebugIdIdentifier="sentry-dbid-919ebe7d-1dee-42a4-91f4-0b2fbd78280b")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>P(s.search)),[s.search]),b=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>V(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),w=o(z),y=o(D),u=o(M),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const U=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),c=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(q(a.userId,a.zeniSessionId??void 0,c,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{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-oxGmLiGE.js";import{h as Y,u as G,g as z,i as H,j as d,l as J,n as K,o as S}from"./core-k1hJbZ6L.js";import{fI as v,AD as R,vg as Q,Wj as w,vb as T,bq as X,c1 as Z,vc as ee,Wk as ae,W0 as C,ek as te,Ew as se,Wl as oe,EV as re,e1 as ne,e0 as ce}from"./zeni-epic-state-C2CKsxzr.js";import{ag as ie,z as le,ao as de,aq as fe,V as me,a6 as pe,k as M,aB as ue,l as he,p as ge,d as Fe}from"./index-Cjqi6Pkt.js";import"./mui-D8QuRJEy.js";import Ie from"./NotFoundScreen-ngkmWfLO.js";import{F as be}from"./FeaturePreviewScreen-CVxHNITI.js";import{a as g}from"./sentry-CYolppN9.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import{u as Ce}from"./useInitialThreadRequest-DKk3Gbri.js";import{t as Te}from"./routePaths-BQiUfv8Y.js";import{M as ye}from"./MobileAppDrawer-D95K9MWM.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./InboxNotificationsProvider-Lon_JjZI.js";import"./useTaskManagerAccess-CbR2C9f7.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="d59af532-88f0-42dd-a5bb-9910d14f443b",s._sentryDebugIdIdentifier="sentry-dbid-d59af532-88f0-42dd-a5bb-9910d14f443b")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=J((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),f=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:f,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=Y(),a=G(),o=z(),{forecastId:r,tenantEmailDomain:c}=H(),[p,u]=g.useState(!1),[f,k]=g.useState(!1),F=le.getSignedInUser(),A=d((t=>v(t))),q=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),x=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();fe({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:B}=Se({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&I)u(!0),l||a(Q());else if(l&&!f){k(!0);const t=((m,P,O)=>P!=null?m.forecasts.findIndex((b=>b.id===P)):O!=null?m.forecasts.findIndex((b=>b.id===O)):m.forecasts.length>0?0:-1)(i,r,x?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,f,k,R,T,I]);const E=me(),_=E?.loggedInUserRole!=null&&X(E.loggedInUserRole),N=Ce(A?.companyId,{clearParams:l&&f}),[V,$]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{$(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:L}),n.jsx(ke,{firstMonthOfFY:q,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:Z(h.toString()),hasTransactionAccess:_,isAiCfoAccessEnabled:W,onAskAiCfoClick:B,initialOpenThreadRequest:N,onClickMenuIcon:()=>{L(!0)}})]})}function He(){const s=d((c=>v(c))),{useFeatureGate:e}=ge(),{isFeatureEnabled:a}=e(Fe.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{He as default};
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-oxGmLiGE.js";import{Wf as re,fI as Y,m3 as G,e1 as N,e0 as le,T3 as Q,VD as ce,Dm as Pe,Wg as J,Db as je,Dw as Le,Dq as de,Df as pe,Du as Te,Dr as ve,Wh as ue,sB as Ae,g9 as Ve,gG as Oe,Wi as H,Dj as me,Di as ge,Dz as Re,ca as Fe}from"./zeni-epic-state-C2CKsxzr.js";import{$ as he,p as X,d as W,z as _,h as fe,K as Ce,ad as be,ax as ye,ay as Be,a9 as De,H as R,ae as Se,G as K,az as Ze,ao as Ue,aq as $e,a6 as ze,k as we,O as He,l as We,aA as Ge,V as _e}from"./index-Cjqi6Pkt.js";import{D as xe,n as M,S as Ie}from"./mui-D8QuRJEy.js";import ae from"./NotFoundScreen-ngkmWfLO.js";import{a as c}from"./sentry-CYolppN9.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-k1hJbZ6L.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BETiKk63.js";import{M as Ne}from"./MobileAppDrawer-D95K9MWM.js";import"./recharts-DZG9umMy.js";import"./analytics-BSYXJeF4.js";import"./plaid-CbZCK8Pe.js";import"./dnd-CiTl8J_b.js";import"./stripe-cKAAJElX.js";import"./lottie-DXQhXtqa.js";import"./lexical-YTMAFU1j.js";import"./pdf-QcH92u4w.js";import"./utils-CZxvf1-B.js";import"./InboxNotificationsProvider-Lon_JjZI.js";import"./useTaskManagerAccess-CbR2C9f7.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]="8904b41e-bcd4-4702-9b17-87e43559780a",e._sentryDebugIdIdentifier="sentry-dbid-8904b41e-bcd4-4702-9b17-87e43559780a")}catch{}})();const Qe={overlayWidth:new De(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=he(),m=ee(),[F,B]=c.useState(!1),[k,D]=c.useState(!1),{userId:S}=Ke(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>G(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(W.isDebitCardFeatureEnabled),P=N(I,p),T=le(p),v=Q(p),Z=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),y()},A=()=>{F===!0?D(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(W.isChargeCardFeatureEnabled),L=fe(p,j,I),{isCardsHidden:V}=Ce(p?.tenantId),b=!L||V,O=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:O===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(h==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{D(!1),C()},onCancelClick:()=>{D(!1)}};return c.useEffect((()=>{w===!1&&S!=null&&m(Pe(S))}),[w,S]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{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(Se.H6Regular)`
6
- margin-top: ${R.sp7};
7
- padding-left: ${R.sp8};
8
- padding-right: ${R.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ee=M(Se.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${R.sp8};
14
- padding-right: ${R.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${R.sp4};
17
- white-space: pre-line;
18
- `,aa={overlayWidth:new De(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=he(),m=ee(),[F,B]=c.useState(!1),[k,D]=c.useState(!1),S=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>G(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:x}=E(W.isDebitCardFeatureEnabled),I=N(x,r),P=le(r),T=Q(r),v=ce(r),Z=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{y(),m(J())},C=()=>{F===!0?D(!0):w()},A={onOkClick:()=>{D(!1),w()},onCancelClick:()=>{D(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(W.isChargeCardFeatureEnabled),L=fe(r,j,x),{isCardsHidden:V}=Ce(r?.tenantId),b=!L||V,O=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),B(!0)},onResetClick:w,onSaveClick:()=>{m(h==="zeni_only"?Te(e):ve())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:p,isReimbursementDisabled:Z===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:O===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return c.useEffect((()=>{S.invitePersonState.fetchState==="Completed"&&(y(),m(J()))}),[S.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(ye,{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(Ze,{...s})]})})},ta=M(Ie)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,na=Je((function(e,t){const d=ue(e),n=_.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:h}=t;return{personAction:{onPersonDelete:(i,y)=>{e(pe(i,y))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,h))},onBackClick:()=>{d("../../")},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 d=Me(),n=ee(),h=qe(),{areTenantIdsInSync:i}=Ue(),y=_.getSignedInUser(),f=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:F}=m(W.isDebitCardFeatureEnabled),B=g((s=>G(s))),k=!N(F,f)&&B,D=Q(f),S=f?.tenantId,{tenantEmailDomain:r}=f,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,T]=c.useState(!1),[v,Z]=c.useState("off"),[U,w]=c.useState(!1),C=s=>{w(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=>Ve(s.userState,s.userRoleState,s.userListViewState,"manager"))),V=g((s=>Oe(s))),b=f?.companyId;c.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),Z(u.uiState.mode),E(!0),n(me()))}),[p,y,S,n,u.uiState.mode,i]),c.useEffect((()=>{b!=null&&i&&n(ge(b,k))}),[b,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const O=()=>{I(!1),T(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:O,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:V,classListView:j,companyId:b,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:O,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:V,classListView:j,companyId:b,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:y,isZeni:f.isZeni,isZeniTenant:D,peopleUIState:u.uiState,companyId:b,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=We(h.state?.pathnameStackToGoBack,h.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=_e();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 g}from"./liveblocks-oxGmLiGE.js";import{a as y}from"./sentry-CYolppN9.js";import{h as T,u as x,g as C,i as V,j as R,l as k}from"./core-k1hJbZ6L.js";import{_r as _,_9 as O,Oa as j,On as B,Oi as A,Oj as E,_s as F,fI as K,Oh as L}from"./zeni-epic-state-C2CKsxzr.js";import{z as N,a5 as P,c2 as W,q,bU as G,c3 as H}from"./index-Cjqi6Pkt.js";import{u as $}from"./mui-D8QuRJEy.js";import{u as J}from"./useEnsureVendorListLoaded-CbkO2307.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new e.Error().stack;p&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[p]="58dafbb9-265f-4956-94e8-b91ec87f4129",e._sentryDebugIdIdentifier="sentry-dbid-58dafbb9-265f-4956-94e8-b91ec87f4129")}catch{}})();const M=k((function(e,p){const t=_(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=o==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return p.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===p.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:o}}),(function(e,p){const{navigate:t,approvalUpdateDataView:o,approverViewData:s,approvalRuleId:i}=p,r=o.remiSetupApproverViewUpdateData?.type,l=q(p.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((m=>{const f=(S=m.value,F(S)==null);var S;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=I.concat(b);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(W);function Q(){const e=T(),p=x(),t=C(),{approvalRuleId:o}=V(),s=N.getSignedInUser(),i=$(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),p(j(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[l,o]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:o,approverViewData:l,location:t})}function se(e){return F(e)==null}const X=k((function(e,p){const t=_(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:o,allVendorIds:s,vendorNamesById:i,editingRuleId:o==="approval_update"?p.approvalRuleId:void 0,allApprovalRulesWithUser:O(e).allApprovalRules}}),(function(e,p){const{navigate:t,approvalUpdateDataView:o,approverViewData:s,approvalRuleId:i}=p,r=o.remiSetupApproverViewUpdateData?.type,l=q(p.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const S=f.actorKind?.selectedOption,z=f.selectedRole?.selectedNonUsers??[];let D=[];S==="role"?D=z.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):S==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const U=f.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const b=h?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(L(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=R((t=>K(t))),{isApprovalRulesV3Enabled:p}=G(e?.tenantId);return p?g.jsx(Y,{}):g.jsx(Q,{})}function Y(){const e=T(),p=x(),t=C(),{approvalRuleId:o}=V(),s=N.getSignedInUser(),i=$(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(J(),y.useEffect((()=>{a||(d(!0),p(j(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[l,o]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:o,approverViewData:l,location:t},o??"new")}export{ne as R,se as i};