@zeniai/web-app-ui 5.0.63-qa → 5.0.64-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 (133) hide show
  1. package/dist/assets/AddressRoutes-B4nJrkCM.js +1 -0
  2. package/dist/assets/AddressScreen-Drzqbyi9.js +9 -0
  3. package/dist/assets/AiCfoScreen-pKh05Oy_.js +11 -0
  4. package/dist/assets/BillPayApprovalRoutes-CcxoD_gw.js +1 -0
  5. package/dist/assets/{BillPayRoutes-D-I6yBtH.js → BillPayRoutes-Caanpzej.js} +33 -33
  6. package/dist/assets/BusinessVerificationPageScreen-IxDWoa9r.js +9 -0
  7. package/dist/assets/{ChargeCardRoutes-DNNVmQba.js → ChargeCardRoutes-CC4LtpXw.js} +8 -8
  8. package/dist/assets/{CompanyPassportScreen-D2jISk-U.js → CompanyPassportScreen-BRpfcja0.js} +1 -1
  9. package/dist/assets/ConnectionAuthScreen-CbWJOJ-M.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-C2D_uxb7.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-D-Ufd69Z.js → CustomerOnboardingRoutes-BFVwjpL9.js} +7 -7
  12. package/dist/assets/{DashboardRoutes-D1kbvPs7.js → DashboardRoutes-C5yY3FLO.js} +3 -3
  13. package/dist/assets/DefaultTenantHome-D7Iff23J.js +1 -0
  14. package/dist/assets/DomesticWireDetailScreen-D71-7eur.js +18 -0
  15. package/dist/assets/DrawerScreen-DP5_KQop.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-D1DTJcOs.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-DYuR5p-K.js → ExpenseAutomationRoutes-BQUQUcI4.js} +4 -4
  18. package/dist/assets/FeaturePreviewScreen-Bw8UbYar.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-B147q1ga.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-Cef0RCKo.js +12 -0
  21. package/dist/assets/MobileAppDrawer-IlLzhWb_.js +1 -0
  22. package/dist/assets/NotFoundScreen-ChgqfaBO.js +1 -0
  23. package/dist/assets/{NotificationRoutes-DKuetMHQ.js → NotificationRoutes-ByebQvOv.js} +1 -1
  24. package/dist/assets/PandLWithForecastRoutes-D-6oCGvF.js +1 -0
  25. package/dist/assets/PeopleRoutes-c87B9F7C.js +22 -0
  26. package/dist/assets/PerformanceRoutes-CWpcvA2S.js +1 -0
  27. package/dist/assets/{Preview-DdSrf9_j.js → Preview-DfCkk6kV.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-B1II2TpX.js → QBOConnectionScreen-CGHUwNJt.js} +1 -1
  29. package/dist/assets/ReferralListScreen-BzSWxhkn.js +5 -0
  30. package/dist/assets/ReimbursementApprovalRoutes-BUZTc-gr.js +1 -0
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-5oJldpZm.js → ReimbursementApprovalRuleDetailScreen-BzLt4PF4.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-BH3HNrZk.js → ReimbursementRoutes-BF_-0J0Y.js} +10 -10
  33. package/dist/assets/ReportsRoutes-BZp_WUzM.js +1 -0
  34. package/dist/assets/RewardsRoutes-B079p47v.js +1 -0
  35. package/dist/assets/ScreenRoutes-R0qHW3Ux.js +2 -0
  36. package/dist/assets/{SettingsRoutes-BJyRTm4m.js → SettingsRoutes-Bxr1shKz.js} +7 -7
  37. package/dist/assets/{SetupPagesScreen-BWmxAg5_.js → SetupPagesScreen-DVq0kj90.js} +5 -5
  38. package/dist/assets/SignInScreen-DgqBGTdZ.js +1 -0
  39. package/dist/assets/SignOutScreen-DBWP2kF4.js +9 -0
  40. package/dist/assets/TaskListScreen-C443LZLC.js +9 -0
  41. package/dist/assets/TaskRoutes-t-Lt6Tkq.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-D_iUUaaA.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-ByHgtPQ5.js → TransactionDetailScreen-D6Bb0BOx.js} +2 -2
  44. package/dist/assets/{TransactionListRoutes-Bo3hqgom.js → TransactionListRoutes-DTsda68U.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-VJBsZB_Q.js → TreasuryRoutes-CcLyI1eP.js} +6 -6
  46. package/dist/assets/{VendorsRoutes-DafxPLzK.js → VendorsRoutes-BqbSz_pv.js} +15 -15
  47. package/dist/assets/WiseConfirmationScreen-MDWr4jHL.js +12 -0
  48. package/dist/assets/{ZeniAccountRoutes-COMo322y.js → ZeniAccountRoutes-BWDOx1G8.js} +12 -12
  49. package/dist/assets/ZeniAccountStatementScreen-Cvgr-g8N.js +9 -0
  50. package/dist/assets/{accountMappingHelper-D6w4MCc5.js → accountMappingHelper-DRBA0kts.js} +1 -1
  51. package/dist/assets/{analytics-CQOsvcBG.js → analytics-BJQfczQS.js} +1 -1
  52. package/dist/assets/{analyticsHelper-CwPfLmD8.js → analyticsHelper-EC13frAK.js} +1 -1
  53. package/dist/assets/{core-CGhI3jCZ.js → core-BBidI7qX.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-CZEzMrgK.js → decodeURIComponentSafe-B_3qleD-.js} +1 -1
  55. package/dist/assets/{dnd-DKCsG5d8.js → dnd-CkhjCkb3.js} +1 -1
  56. package/dist/assets/{empty-CzOjtD5w.js → empty-948x8Pe9.js} +1 -1
  57. package/dist/assets/{empty-BAfFi45J.js → empty-BPOFy292.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-qqeUs6C2.js → emptyVideoElement--p_fkcvF.js} +1 -1
  59. package/dist/assets/epic-D2z_umEt.js +2 -0
  60. package/dist/assets/getLocaleForTenant-CDVNWQi2.js +1 -0
  61. package/dist/assets/{index-DH8cVwcc.js → index-BZpFURkG.js} +1 -1
  62. package/dist/assets/{index-DHmfzpvJ.js → index-CDWPyJDF.js} +1 -1
  63. package/dist/assets/{index-Bio3vcCU.js → index-CU483D9p.js} +2 -2
  64. package/dist/assets/{index-BDBqjJWE.js → index-D_YUt3IC.js} +1 -1
  65. package/dist/assets/{index-D7leYkuC.js → index-Da7wx085.js} +15659 -16745
  66. package/dist/assets/{index-BRtx8cu_.js → index-Do4uSC5Y.js} +1 -1
  67. package/dist/assets/{index-2FSYOFek.js → index-WL0fop-T.js} +1 -1
  68. package/dist/assets/{lexical-DT64qE89.js → lexical-ElGQdEM-.js} +1 -1
  69. package/dist/assets/{liveblocks-CzlYoB8q.js → liveblocks-Dp8Rpfa6.js} +1 -1
  70. package/dist/assets/{lottie-CLMz6y3A.js → lottie-BWQSrnVe.js} +1 -1
  71. package/dist/assets/{mui-ILn-Gd-L.js → mui-B7MJOmvc.js} +1 -1
  72. package/dist/assets/{pathToGoBack-B-0xWAao.js → pathToGoBack-DGUHQ37J.js} +1 -1
  73. package/dist/assets/{pdf-CUf9xopY.js → pdf--vBxpUYp.js} +3 -3
  74. package/dist/assets/{pdf-lib-CWTnCbuI.js → pdf-lib-55B9sG08.js} +1 -1
  75. package/dist/assets/{plaid-D8caW90M.js → plaid-C04pF6iT.js} +1 -1
  76. package/dist/assets/{pusher-ChRriP4_.js → pusher-DKy6zRtD.js} +1 -1
  77. package/dist/assets/{react-DJjQrdjO.js → react-9Uj-b_uo.js} +1 -1
  78. package/dist/assets/{react-BAtU9tgF.js → react-BGL5acbj.js} +1 -1
  79. package/dist/assets/{react-DoaQNmh0.js → react-ByuJYjMk.js} +1 -1
  80. package/dist/assets/{react-Dncm-YTr.js → react-C97QJx6o.js} +1 -1
  81. package/dist/assets/{react-DyH9BXY-.js → react-DKvTmFiF.js} +1 -1
  82. package/dist/assets/{react-DSJG23We.js → react-DcqUjxux.js} +1 -1
  83. package/dist/assets/{recharts-D6qS-pdV.js → recharts-BoxqkqlO.js} +1 -1
  84. package/dist/assets/{routePaths-DhV05MHP.js → routePaths-BmuUFrf4.js} +1 -1
  85. package/dist/assets/{sentry-CNCwYM02.js → sentry-CjhVLHR5.js} +1 -1
  86. package/dist/assets/{url-CTEP03uL.js → url-Bg25A9KK.js} +1 -1
  87. package/dist/assets/{url-CWzi7k2i.js → url-Bia2Y2hX.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-CVRBuwu7.js +1 -0
  89. package/dist/assets/{useDeviceId-D_8GbJBB.js → useDeviceId-B_FexNcs.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-Bk64M-bJ.js +1 -0
  91. package/dist/assets/useInitialThreadRequest-BoJZmQZj.js +1 -0
  92. package/dist/assets/{utils-zvjLmBW4.js → utils-DVwIdRkq.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-caCfdZEh.js → withTransactionSidePanel-BAd7sYKu.js} +2 -2
  94. package/dist/assets/zeni-epic-state-DqbxPrIr.js +14 -0
  95. package/dist/index.html +1 -1
  96. package/package.json +4 -4
  97. package/dist/assets/AddressRoutes-BGixhU4F.js +0 -1
  98. package/dist/assets/AddressScreen-BCfbWbk_.js +0 -9
  99. package/dist/assets/AiCfoScreen-NDN5qE_4.js +0 -11
  100. package/dist/assets/BillPayApprovalRoutes-Cvl_sQRW.js +0 -1
  101. package/dist/assets/BusinessVerificationPageScreen-C57FErKR.js +0 -9
  102. package/dist/assets/ConnectionAuthScreen-BUE9aXs1.js +0 -11
  103. package/dist/assets/CustomerOnboardingAuthScreen-BVuWNptI.js +0 -1
  104. package/dist/assets/DefaultTenantHome-JkQ2goKW.js +0 -1
  105. package/dist/assets/DomesticWireDetailScreen-DTmfTwYq.js +0 -18
  106. package/dist/assets/DrawerScreen-DNHIo9Ek.js +0 -1
  107. package/dist/assets/EntityDetailRoutes-8YxmqISQ.js +0 -1
  108. package/dist/assets/FeaturePreviewScreen-Xv2JpkA8.js +0 -1
  109. package/dist/assets/MagicLinkRoutes-D_-f5EfR.js +0 -72
  110. package/dist/assets/MagicLinkSignInScreen-D8SWcZwO.js +0 -12
  111. package/dist/assets/MobileAppDrawer-CMz8hWRn.js +0 -1
  112. package/dist/assets/NotFoundScreen-CojoL2wq.js +0 -1
  113. package/dist/assets/PandLWithForecastRoutes-D4EEGjw5.js +0 -1
  114. package/dist/assets/PeopleRoutes-CR2pc_sW.js +0 -22
  115. package/dist/assets/PerformanceRoutes-cynXsyNj.js +0 -1
  116. package/dist/assets/ReferralListScreen-8R81rrOx.js +0 -5
  117. package/dist/assets/ReimbursementApprovalRoutes-BGrrVRS6.js +0 -1
  118. package/dist/assets/ReportsRoutes-Dh0vOSd5.js +0 -1
  119. package/dist/assets/RewardsRoutes-RRnzfk9s.js +0 -1
  120. package/dist/assets/ScreenRoutes-DOHIbDe4.js +0 -2
  121. package/dist/assets/SignInScreen-B2_szOVQ.js +0 -1
  122. package/dist/assets/SignOutScreen-BKysr8-j.js +0 -9
  123. package/dist/assets/TaskListScreen-DYCQWF7u.js +0 -9
  124. package/dist/assets/TaskRoutes-GImULClZ.js +0 -9
  125. package/dist/assets/TransactionDetailRoutes-Dv6VDhjQ.js +0 -1
  126. package/dist/assets/WiseConfirmationScreen-CsrsS8Xt.js +0 -12
  127. package/dist/assets/ZeniAccountStatementScreen-B1lnm1eV.js +0 -9
  128. package/dist/assets/epic-CY0OxDpl.js +0 -2
  129. package/dist/assets/getLocaleForTenant-D8dvZJzp.js +0 -1
  130. package/dist/assets/useAskAiCfoHostNavButtonProps-BYwM8iQc.js +0 -1
  131. package/dist/assets/useFetchSuggestedQuestionsWhenReady-CLFroGaE.js +0 -1
  132. package/dist/assets/useInitialThreadRequest-XOr6mP2N.js +0 -1
  133. package/dist/assets/zeni-epic-state-lenVK-tm.js +0 -14
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-D7leYkuC.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CNCwYM02.js"><link rel="modulepreload" crossorigin href="/assets/core-CGhI3jCZ.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-lenVK-tm.js"><link rel="modulepreload" crossorigin href="/assets/mui-ILn-Gd-L.js"><link rel="modulepreload" crossorigin href="/assets/analytics-CQOsvcBG.js"><link rel="modulepreload" crossorigin href="/assets/utils-zvjLmBW4.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.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-Da7wx085.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CjhVLHR5.js"><link rel="modulepreload" crossorigin href="/assets/core-BBidI7qX.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DqbxPrIr.js"><link rel="modulepreload" crossorigin href="/assets/mui-B7MJOmvc.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BJQfczQS.js"><link rel="modulepreload" crossorigin href="/assets/utils-DVwIdRkq.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.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.0.63-qa",
3
+ "version": "5.0.64-dev",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -27,9 +27,9 @@
27
27
  "@sentry/core": "^9.42.1",
28
28
  "@sentry/react": "^9.42.1",
29
29
  "@stripe/stripe-js": "^4.4.0",
30
- "@zeniai/client-analytics": "2.0.7",
31
- "@zeniai/client-epic-state": "5.0.31",
32
- "@zeniai/web-components": "4.0.72",
30
+ "@zeniai/client-analytics": "2.0.8",
31
+ "@zeniai/client-epic-state": "5.0.32",
32
+ "@zeniai/web-components": "4.0.74",
33
33
  "color": "3.1.3",
34
34
  "cross-fetch": "^4.0.0",
35
35
  "crypto-js": "4.2.0",
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-CzlYoB8q.js";import{A as d}from"./AddressScreen-BCfbWbk_.js";import i from"./NotFoundScreen-CojoL2wq.js";import"./sentry-CNCwYM02.js";import{n as s,o as r}from"./core-CGhI3jCZ.js";import"./zeni-epic-state-lenVK-tm.js";import"./recharts-D6qS-pdV.js";import"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="4bd15e18-5b5f-4be1-8d33-8bd696c76da2",t._sentryDebugIdIdentifier="sentry-dbid-4bd15e18-5b5f-4be1-8d33-8bd696c76da2")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as d}from"./liveblocks-CzlYoB8q.js";import{a as h}from"./sentry-CNCwYM02.js";import{j as T,h as _,u as j,l as E,g as B,k as M}from"./core-CGhI3jCZ.js";import{Z as $,h as D,z as L,I as K,B as J,A as N,d as C,f as m,y as z,k as b,q as F}from"./index-D7leYkuC.js";import{Je as k,gN as O,eO as R,Jf as U,c1 as q,Jg as G,k7 as V}from"./zeni-epic-state-lenVK-tm.js";import{n as H}from"./mui-ILn-Gd-L.js";import Z from"./NotFoundScreen-CojoL2wq.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]="6ef395ee-b1ca-4365-98c7-26b360513fb4",e._sentryDebugIdIdentifier="sentry-dbid-6ef395ee-b1ca-4365-98c7-26b360513fb4")}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
- `,W=M(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=R(e),a=t.roleMap!=null&&U(t.roleMap),r=i||c==="user_address"||q(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=G(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:r,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=k(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:r}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const r=i.state,n=F(r?.pathnameStackToGoBack);let s=n.poppedPathname??I();const u=r?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(s=`${s}?${g}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const r=X(a);e(V({addressType:c,addressToCreate:r})),C?.trackSaveAddressClicked(m.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(t.bankAccountContext)},onCancel:()=>{l(t.bankAccountContext)}}})(z);function de({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=T(),r=_(),n=j(),{addressId:s,addressType:u}=E(),g=$(),w=D(),v=L.getSignedInUser(),[f,x]=h.useState(s==null),p=B(S=>s!=null?k(S,s).fetchState:"Not-Started"),A=K();if(v==null)throw Error("Can't access address page without signing in...");const P=S=>S.trackPageLoaded(s!=null?m.Event.editAddress:m.Event.addAddress),y=l??u;return h.useEffect(()=>{f||s==null||(x(!0),r(O(s,!1)))},[f,s,r]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?d.jsx(J,{fetchState:p,style:{backgroundColor:w.colors.grey5}}):s!=null&&p==="Error"?(a(`${I(1)}/new`,{replace:!0}),d.jsx(d.Fragment,{})):d.jsxs(d.Fragment,{children:[d.jsx(N,{analytics:C,onLoad:P}),d.jsx(Q,{windowSize:g,children:d.jsx(W,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):d.jsx(Z,{})}const I=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},X=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{de as A,X as t};
@@ -1,11 +0,0 @@
1
- import{j as h}from"./liveblocks-CzlYoB8q.js";import{a as r}from"./sentry-CNCwYM02.js";import{h as oe,j as ne,u as ie,g as j,l as re,k as le}from"./core-CGhI3jCZ.js";import{M as ce,cH as ue,z as de,Z as me,cI as pe,cJ as fe,cK as he,cL as G,A as Se,d as v,R as V,cM as ge,cN as Ce,f as be,a2 as ke,cO as we,T as Ie,s as Pe,q as $,aY as Ee,cP as Te}from"./index-D7leYkuC.js";import{fE as ye,f3 as H,eO as _e,hr as xe,PN as ve,eN as Ue,hB as Ae,hx as Oe,fu as Qe,fo as De,fh as Fe,fl as q,fp as Me,fq as Be,fr as Le,fs as Re,ft as Ne}from"./zeni-epic-state-lenVK-tm.js";import{D as je,n as U,P as Ve,S as $e}from"./mui-ILn-Gd-L.js";import{p as qe}from"./pathToGoBack-B-0xWAao.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="d906364a-751b-47b7-9043-1d69cd5ed858",s._sentryDebugIdIdentifier="sentry-dbid-d906364a-751b-47b7-9043-1d69cd5ed858")}catch{}})();const W="chat-response-generated",Ge=le(function(s,i){const a=H(s),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&a.uiState.currentChatSessionId==null,aiCfoView:a,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Ie}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(s,i){const{location:a,currentTenant:m,userId:d,navigate:p,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:S,setIsAiCfoOpen:l}=i;return{onEventReceived:(e,o)=>{if(e===W&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,c=Be(n.type),t=n.metadata.chat_session_id??null,{currentChatSession:I,currentQuestionAnswer:g,currentQuestionAnswerSummary:P}=G(S,t);c!=="answer"?v.trackAICFOChatResponseGenerated(c,g?.question.questionText??"",n.text,t,Te(P,I),n.metadata.message_id??null):v.trackAICFOChatAnswerGenerated(n.text,g?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Le(n.visualization?.type??"")??null,t,n.summarized_title,n.metadata.message_id??null),s(Re({chatSessionId:n.metadata.chat_session_id,responseType:c,fetchState:{fetchState:"Completed",error:void 0}})),s(Ne({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:d}))}},onSubmit:(e,o,n,c)=>{e&&Ee(s,e,o,f,S,d,c,n)},updateCurrentInput:e=>{s(q(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Me(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{p(-1)},onCloseClick:()=>{const e=$(a.state?.pathnameStackToGoBack),o=e.poppedPathname??qe(1);p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack}}),s(q(""))},togglePageView:()=>{const e=$(a.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),l(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{p(-1)},onNewChatClick:()=>{f!=null&&s(Fe());const e=Pe(a.state?.pathnameStackToGoBack,a.pathname);p(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(De({questionAnswerId:e,isCollapsed:o}))},onMenuClick:i.onMenuClick}})(ke(we)),dt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:i}=ce(),a=oe(),m=ne(),d=ie(),[p,f]=r.useState(!1);r.useEffect(()=>{a(ye())},[a]);const{customPageTitle:S}=ue(),l=j(u=>H(u)),e=de.getSignedInUser(),{session_id:o}=re(),n=me(),c=j(u=>_e(u)),t=l.uiState.currentChatSessionId,I=c.tenantEmailDomain,{handleUploadPromoClose:g,isUploadPromoVisible:P}=pe({isFileUploadEnabled:s,tenantEmailDomain:I}),A=fe({currentTenant:c,currentChatSessionId:t,aiCfoView:l}),C=d.state,b=C?.aiCfoInitialQuestion,O=!!C?.aiCfoShouldSubmit,[z,E]=r.useState(null),[Y,T]=r.useState(!1),Q=r.useRef(!1);r.useEffect(()=>{Q.current||b==null||b===""||(E(b),T(O),Q.current=!0)},[b,O]);const J=r.useCallback(()=>{E(null),T(!1)},[]),D=r.useMemo(()=>new URLSearchParams(d.search),[d.search]),F=D.get("ref")??C?.aiCfoRef,y=D.get("emailRefId")??C?.aiCfoEmailRefId,M=r.useRef(!1);r.useEffect(()=>{M.current||F!=="month-end-email"||y==null||t!=null||e==null||(a(xe("controller",e.userId,y,"MONTH_END_EMAIL")),M.current=!0)},[F,y,t,a,e]);const k=l.uiState.lastContextMessage;r.useEffect(()=>{k!=null&&k!==""&&t!=null&&(E(k),T(!0),a(ve()))},[k,t,a]);const Z=c.masterTOSInfo,w=Z?.isMasterTOSAccepted??!1,{visitedSessions:B}=he(t),_=l.fetchState,x=l.uiState.chatSessionsNextPageToken.hasMore||!l.uiState.chatSessionsFirstPageFetched,L=t!=null?l.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",R=t==null||(l.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),N=l.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:K}=G(N,t),X=K.length===0;r.useEffect(()=>{w||m("../dashboard",{state:{...d.state,message:"open_ai_cfo_drawer"}})},[w]),r.useEffect(()=>{t!=null&&o!==t&&m(`../ai-cfo/${t}`,{state:{...d.state}})},[t,o]),r.useEffect(()=>{o!=null&&t==null&&o!=="new_chat"&&o!=="explore"&&a(Ue({sessionId:o,agentId:"controller"}))},[]);const ee=r.useMemo(()=>({events:B.map(u=>`private-encrypted-chat-${u}.${W}`),eventCallback:(u,se,ae)=>ae.onEventReceived(u,se)}),[B]);if(r.useEffect(()=>{_!=="In-Progress"&&x&&a(Ae())},[_,x,a]),r.useEffect(()=>{t!=null&&L!=="In-Progress"&&R&&e!=null&&_==="Completed"&&!x&&a(Oe(t,e.userId))},[L,R,t,e,a]),e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const te=t!=null&&l.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return h.jsxs(We,{children:[h.jsx(Se,{analytics:v,onLoad:u=>u.trackPageLoaded(be.Event.aiCFOPage)}),V(n)&&A.drawerElement,h.jsx(Ge,{...ee,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:o,location:d,isSubmitting:te,isEmptyChatWithSession:X,customPageTitle:S,currentTenant:c,emailLinkQuestion:z??void 0,autoSubmitEmailLinkQuestion:Y,onEmailLinkQuestionProcessed:J,onMenuClick:V(n)?A.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:P,onUploadPromoClose:g}),h.jsx(je,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:ze,style:{width:`${ge}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(He,{onClick:u=>u.stopPropagation(),children:h.jsx(Ce,{isTOSAccepted:w,acceptMasterTOSState:l.masterTOSAcceptanceState,customPageTitle:S,onCloseClick:()=>f(!1),onCompleteClick:()=>{w||c.userRoleId==null||a(Qe(c.userRoleId)),f(!1)}})})})]})},He=U($e)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,We=U.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,ze=U(Ve)`
9
- box-shadow: ${({theme:s})=>s.colors.elevation2};
10
- color: ${({theme:s})=>s.colors.grey4};
11
- `;export{dt as default};
@@ -1 +0,0 @@
1
- import{j as l}from"./liveblocks-CzlYoB8q.js";import{a as y}from"./sentry-CNCwYM02.js";import{j as B,u as U,h as j,g as v,N as $,k as T,l as O,n as N,o as h}from"./core-CGhI3jCZ.js";import{eO as F,Mx as A,Md as b,x9 as w,x3 as L,x7 as x,wY as M,Mf as z,w$ as W,xb as q,xa as C}from"./zeni-epic-state-lenVK-tm.js";import{h as P,z as k,B as V,a2 as Y,by as G,ab as _,bz as H}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-5oJldpZm.js";import K from"./NotFoundScreen-CojoL2wq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="249628e7-1d36-47d6-a7ab-d855a706132d",e._sentryDebugIdIdentifier="sentry-dbid-249628e7-1d36-47d6-a7ab-d855a706132d")}catch{}})();const I="bill-approval-rule-update",Q=T(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(z(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(x(a)),t(`./${a}/edit`)):(e(x()),t("./new"))}}})(Y(G)),X=()=>{const e=B(),o=U(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>F(i)),r=v(i=>A(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(L(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(x())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${I}`]:[],eventCallback:(i,R,m)=>{i.endsWith(I)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx($,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(Q,{currentTenant:c,location:o,navigate:e,...f})},Z=T(function(e,o){const t=b(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),R=f.actors.selectedNonUsers.map(S=>{const E=!!J(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(R);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(q())},onSaveRuleSuccess:()=>{t("../")}}})(H);function D(){const e=B(),o=j(),t=U(),{approvalRuleId:p}=O(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>A(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(W(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs(N,{children:[l.jsx(h,{path:"/",element:l.jsx(X,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
@@ -1,9 +0,0 @@
1
- import{j as k}from"./liveblocks-CzlYoB8q.js";import{a as V}from"./sentry-CNCwYM02.js";import{j as ae,u as ne,h as se,l as ie,g as C,N as oe,k as re}from"./core-CGhI3jCZ.js";import{I as ce,x as ue,aJ as de,z,A as pe,d as E,ab as v,f as M,bu as le,ap as me,s as B,aq as L}from"./index-D7leYkuC.js";import{Ml as fe,eO as G,rx as ye,GW as Se,xe as ge,zX as Ie,Cu as be,D7 as he,E0 as De,MI as Oe,MJ as Te,MK as ke,ML as Ce,MM as Ve,Jf as we,LK as Ae,Jr as Ne,k7 as _e,fA as Fe,fz as xe,fy as ve,pF as Me,pw as ze,pt as Ee,j$ as Be,rG as Le,rE as P,bD as R,rS as U,cu as Pe}from"./zeni-epic-state-lenVK-tm.js";import{n as Re}from"./mui-ILn-Gd-L.js";import{c as j}from"./routePaths-DhV05MHP.js";import{M as Ue}from"./MobileAppDrawer-CMz8hWRn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="078e7be9-0194-4eb1-b0aa-054acf54e205",e._sentryDebugIdIdentifier="sentry-dbid-078e7be9-0194-4eb1-b0aa-054acf54e205")}catch{}})();const je=Re.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
- `,Ge=re(function(e,d){const{businessVerificationDetails:i}=d,r=G(e),y=z.getSignedInUser(),S=r.tenantId,l={userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:S??""},h=we(d.roleMap)&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=Ae(e.companyConfigState),s=Ne(e.userRoleConfigState);return{businessVerificationDetails:i,verficationDetailsFetchState:i.fetchState,isRefreshingViewInBackground:i.isRefreshingViewInBackground,allNationalityCountries:i.allNationalityCountries,filesEndPoint:`${me.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:h,allIndustries:t.companyIndustries??[],companyTitles:s.companyTitles}},function(e,d){const{companyId:i,productType:r,currentTenant:y,navigate:S,location:l}=d,{tenantEmailDomain:h}=y;return{onCompanyDetailsChanged:t=>{const{companyDescription:s,companyIndustry:p,companyIndustryType:O,companyLegalName:T,companyTaxId:g,companyWebsite:m,companyPhone:I,primaryContactEmail:c,primaryContactName:n,primaryContactUserId:u,primaryContactSyncToken:D,syncToken:f,fileIds:a,incDate:o,typeOfIncorporation:w,stateOfIncorporation:A,sourceOfFunds:N,companySubIndustry:_,countriesOfOperations:b,companySourceOfFunds:J,companySourceOfFundsDescription:q,transactionVolume:$,transactionVolumeDescription:K,purposeOfAccount:W,purposeOfAccountDescription:Z,regulatedStatus:X,regulatedStatusDescription:H,usNexus:Q,usNexusTypes:Y}=t,F=O?.selectedOption,ee={companyId:i,companyDescription:s,companyIndustry:p.selectedOption,companyIndustryType:F==null||F===""?void 0:F,companyLegalName:T,taxIdOrEIN:g,website:m!=""&&m!=null?Pe(m):void 0,phone:I,syncToken:f,fileIds:a,incDate:o!=null?R(o?.toString()):o,typeOfIncorporation:w?.selectedOption??"",stateOfIncorporation:A?.selectedOption??"",sourceOfFunds:N?.selectedOption??"",companySubIndustry:_?.selectedOption??"",countriesOfOperations:b?.selectedOptions.map(x=>x.length===2?x:L(x))??[],companySourceOfFunds:J?.selectedOption??"",companySourceOfFundsDescription:q,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:K,purposeOfAccount:W?.selectedOption??"",purposeOfAccountDescription:Z,regulatedStatus:X??"",regulatedStatusDescription:H,usNexus:Q,usNexusTypes:Y?.selectedOptions??[]},te={userId:u,firstName:n.firstName,lastName:n.lastName,email:c,syncToken:D};e(U({companyDetails:ee,primaryContactDetails:te}))},onCompanyOfficerUpdated:t=>{const s=t.map(p=>{const{officerType:O,userId:T,name:g,email:m,nationalityCountryCode:I,ssn:c,dob:n,phone:u,syncToken:D,selectDocument:f,role:a,ownership:o,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:_}=p;let b;return f.selectDocumentType==="driverLicense"?b="driving_license":f.selectDocumentType==="passport"?b="passport":f.selectDocumentType==="stateId"?b="id_document":f.selectDocumentType==="ssnCard"&&(b="social_security_card"),{officerType:O,userId:T,firstName:g.firstName,lastName:g.lastName,email:m,ssn:c,nationalityCountryCode:I?.selectedOption!=null?L(I.selectedOption):void 0,phone:u,birthday:n!=null?R(n?.toString()):n,syncToken:D,titleAtCompany:a.selectedOption,ownershipInCompany:o,documentTypeSelectedForVerification:b,isSelectedForVerification:w,userVerificationStatus:A,treasuryUserVerificationStatus:N,fileIds:_,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(U({officers:s}))},onSaveDetailsClick:t=>{e(P(i,t,r))},onSendForVerificationClick:t=>{e(P(i,t,r,!0))},onAddressClick:t=>{const s=j(h,t),p=B(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:p}})},onRegisteredAddressClick:t=>{const s=j(h,t),p=B(l.state?.pathnameStackToGoBack,l.pathname);S(s,{state:{pathnameStackToGoBack:p}})},onBackClick:()=>{e(Le({companyId:i})),S("../setup")},updateFilesEntity:t=>{e(Be({files:t}))},onDeleteFile:t=>{e(Ee(t))},onDeleteFileList:t=>{e(ze(t))},onEditFileName:(t,s)=>{e(Me(t,s.split(".")[0]))},onGetOtp:t=>{e(ve(t,"SpendManagementSetup"))},onResendOtp:t=>{e(xe(t,"SpendManagementSetup"))},onVerifyOtp:(t,s)=>{e(Fe(t,s,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,s)=>{e(_e({addressType:t,addressToCreate:s}))}}})(le),Qe=({productType:e})=>{const d=ae(),i=ne(),r=se(),[y,S]=V.useState(!1),[l,h]=V.useState(!1),{tenantEmailDomain:t}=ie(),s=ce(),{useDynamicConfig:p}=ue(),{configValue:O}=p(de.zeniAccountsConfig),T=fe(O),g=C(a=>{switch(e){case"zeni_accounts":return a.zeniAccountSetupViewState.fetchState;case"reimbursement":return a.remiSetupViewState.fetchState;case"charge_cards":return a.chargeCardSetupViewState.fetchState;case"zeni_treasury":return a.treasurySetupViewState.fetchState;default:return a.billPaySetupViewState.fetchState}}),m=C(a=>a.companyConfigState.fetchState),I=C(a=>a.userRoleConfigState.fetchState),c=C(a=>G(a)),n=c.companyId??z.getSignedInUserTenant(t)?.companyId;if(V.useEffect(()=>{m==="Not-Started"&&r(ye()),I==="Not-Started"&&r(Se(!0))},[m,I,r]),V.useEffect(()=>{if(!y&&g==="Not-Started"&&n!=null)switch(S(!0),e){case"zeni_accounts":r(De(n,!0));break;case"zeni_treasury":r(he(n,!0));break;case"reimbursement":r(be(n,!0));break;case"charge_cards":r(Ie(n,!0));break;default:r(ge(n,!0))}},[y,g,n,r]),z.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let u;switch(e){case"zeni_accounts":u=c.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":u=c.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":u=c.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||c.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":u=c.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:u=c.companyBillPayInfo?.info?.isBillPayTOSAccepted}const D=a=>{h(a)},f=C(a=>{let o;switch(e){case"zeni_accounts":o=Ve(a,n);break;case"zeni_treasury":o=Ce(a,n);break;case"charge_cards":o=ke(a,n);break;case"reimbursement":o=Te(a,n);break;default:o=Oe(a,n)}return o});return u===!1?k.jsx(oe,{to:"../promo"}):k.jsxs(je,{children:[k.jsx(pe,{analytics:E,onLoad:a=>(o=>{switch(e){case"zeni_accounts":return o.trackPageLoaded(M.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return o.trackPageLoaded(M.Event.reimbursementBusinessVerification);default:return o.trackPageLoaded(M.Event.billPayBusinessVerification,v(i)?"Settings":void 0)}})(a)}),v(i)?k.jsx(Ue,{isAppContentDrawerOpen:l,handleDrawerToggle:D}):null,k.jsx(Ge,{businessVerificationDetails:f,navigate:d,location:i,companyId:n,analytics:E,currentTenant:c,productType:e,isSettings:v(i),roleMap:s?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{D(!0)},maxInsuredAmount:T.maxInsuredAmount})]})};export{Qe as B};
@@ -1,11 +0,0 @@
1
- import{j as C}from"./liveblocks-CzlYoB8q.js";import{a}from"./sentry-CNCwYM02.js";import{h as D,u as v,g as m,N as w}from"./core-CGhI3jCZ.js";import{Iv as O,eO as A,fj as j,mm as L,fL as h,fi as U,eP as _,IC as F}from"./zeni-epic-state-lenVK-tm.js";import{u as $,z as u,L as g,D as k,o as H}from"./index-D7leYkuC.js";import{n as P}from"./mui-ILn-Gd-L.js";import{t as z}from"./getLocaleForTenant-D8dvZJzp.js";import{g as R,Q as G}from"./QBOConnectionScreen-B1II2TpX.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./empty-CzOjtD5w.js";import"./pdf-lib-CWTnCbuI.js";import"./index-BRtx8cu_.js";import"./url-CWzi7k2i.js";import"./index-DH8cVwcc.js";import"./decodeURIComponentSafe-CZEzMrgK.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]="64e7d4a8-3ff6-4511-9adf-12e0a696c66f",t._sentryDebugIdIdentifier="sentry-dbid-64e7d4a8-3ff6-4511-9adf-12e0a696c66f")}catch{}})();const Q=P.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 ${H.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function pe(){const t=D(),i=v(),{setLoading:d,clearAllLoading:x}=$(),p=a.useRef(!1),c=a.useRef(!1),{code:T,realmId:y,state:N}=R(i.search),S=T!==""&&y!==""&&N!=="",I=m(l=>O(l)),e=m(l=>A(l)),n=m(l=>l.tenantState.fetchState),r=m(l=>l.tenantState.activeTenantFetchState.fetchState),o=u.getSignedInUser(),f=u.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,b=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{p.current||o==null||f==null||(p.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(j(o.userId,f))))},[p,n,d]),a.useEffect(()=>{e.tenantId==null&&!c.current&&o!=null&&(c.current=!0,!(f==null||f!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(L(o.userId)))},[c,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(g.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))},[E]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(U(e.tenantId)),u.saveActiveTenantDomainForUser(e.tenantEmailDomain),_(o?.userId,o?.zeniSessionId,e.tenantId),k.updateAppLocaleID(z(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(h(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&u.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||x()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:S||b===!1?C.jsx(Q,{children:C.jsx(G,{})}):C.jsx(w,{to:"/",replace:!0})}export{pe as default};
@@ -1 +0,0 @@
1
- import{j as d}from"./liveblocks-CzlYoB8q.js";import{z as n}from"./index-D7leYkuC.js";import{g as p}from"./QBOConnectionScreen-B1II2TpX.js";import"./sentry-CNCwYM02.js";import{u as a,N as i}from"./core-CGhI3jCZ.js";import"./zeni-epic-state-lenVK-tm.js";import"./recharts-D6qS-pdV.js";import"./mui-ILn-Gd-L.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./empty-CzOjtD5w.js";import"./pdf-lib-CWTnCbuI.js";import"./index-BRtx8cu_.js";import"./url-CWzi7k2i.js";import"./index-DH8cVwcc.js";import"./decodeURIComponentSafe-CZEzMrgK.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]="b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd",t._sentryDebugIdIdentifier="sentry-dbid-b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd")}catch{}})();const U=()=>{const t=a(),{code:o,realmId:r,state:e}=p(t.search),s=n.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return d.jsx(i,{to:m})}return d.jsx(i,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1 +0,0 @@
1
- import{j as v}from"./liveblocks-CzlYoB8q.js";import{a as u}from"./sentry-CNCwYM02.js";import{h as w,g as b,k as y,u as A,N as k}from"./core-CGhI3jCZ.js";import{Iv as N,eO as _,fj as U,Iw as L,mm as R,Ix as z}from"./zeni-epic-state-lenVK-tm.js";import{u as O,z as f,L as T,t as S,D as j,b as $}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import{t as P}from"./getLocaleForTenant-D8dvZJzp.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="cf247005-59f6-41f4-a081-b4997d245f5a",t._sentryDebugIdIdentifier="sentry-dbid-cf247005-59f6-41f4-a081-b4997d245f5a")}catch{}})();const Q=y(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,I=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=w(),{setLoading:s,clearAllLoading:o}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&S.shouldFetchActiveTenant(e)&&(h.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],G={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
@@ -1,18 +0,0 @@
1
- import{j as l}from"./liveblocks-CzlYoB8q.js";import{j as w,u as C,g as h,k as A,l as P}from"./core-CGhI3jCZ.js";import{Mr as k,My as _,fA as q,fz as J,fy as L,io as W,Jz as K,pw as Q,eO as V,LZ as D,il as T,Ms as S,MB as F,ij as G,iH as j}from"./zeni-epic-state-lenVK-tm.js";import{bn as X,Z as R,x as N,z as U,h as Z,q as p,c as v,B as z,bo as Y,o as O,bp as ee,s as te}from"./index-D7leYkuC.js";import{n as H}from"./mui-ILn-Gd-L.js";import"./sentry-CNCwYM02.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]="a7c59b17-200f-4f1a-931e-424ecde4bb7f",e._sentryDebugIdIdentifier="sentry-dbid-a7c59b17-200f-4f1a-931e-424ecde4bb7f")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(X);function M({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(c=>k(c,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=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
- `,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),c=s.poppedPathname??E();n(c,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:c}=s;e(F({data:c}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??E(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:c}=P(),d=e??s,{useFeatureGate:r}=N(),i=U.getSignedInUser(),b=h(u=>V(u)),g=Z(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(M,{vendorId:d,billId:c}),l.jsx(oe,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},B=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return B(e,"ach",t,n)}function ve(e,t,n){return B(e,"domestic",t,n)}function ge(e,t,n){return B(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=H.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 ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,ce=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:c}=t,{tenantEmailDomain:d}=c;return{onFetchBankName:r=>{e(j(r))},onSaveHandler:r=>{e(G(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(F({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(d,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:c}=P(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=N(),b=Z(),g=h(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(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(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(M,{vendorId:d,billId:c}),l.jsx(ce,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,M 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 d}from"./liveblocks-CzlYoB8q.js";import{Z as c,E as l,h as f}from"./index-D7leYkuC.js";import{D as p}from"./mui-ILn-Gd-L.js";import"./sentry-CNCwYM02.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="10c380cc-f513-470e-9bfa-e47a49402143",e._sentryDebugIdIdentifier="sentry-dbid-10c380cc-f513-470e-9bfa-e47a49402143")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=c(),s=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),i=f();return d.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CzlYoB8q.js";import{a as d}from"./sentry-CNCwYM02.js";import{j as A,h as B,u as q,l as K,g as c,N,k as O,n as F,o as _}from"./core-CGhI3jCZ.js";import{KG as z,eO as J,K3 as M,kr as R,GO as I,KL as W,Jy as Y,jr as $,GP as S,K8 as L,K9 as V,JA as H,Jz as Q}from"./zeni-epic-state-lenVK-tm.js";import{aN as U,d as X,q as Z,s as tt}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import{d as k}from"./decodeURIComponentSafe-CZEzMrgK.js";import{w as et}from"./withTransactionSidePanel-caCfdZEh.js";import{e as at,b as nt}from"./routePaths-DhV05MHP.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import"./TransactionDetailScreen-ByHgtPQ5.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]="66c8f577-29f0-47d1-9c92-6d9dc40aa3c6",a._sentryDebugIdIdentifier="sentry-dbid-66c8f577-29f0-47d1-9c92-6d9dc40aa3c6")}catch{}})();const ot=O(function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:$(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(L()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:G,entityNameEncoded:j}=K(),r=k(G??""),p=k(j??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=c(n=>J(n).company?.companyInfo.firstMonthOfFY??1),f=c(n=>M(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(R(i)))},[m,u,i]);const P=c(n=>n.trendState.fetchState),E=f?.selectedPeriod?.timePeriod??g,w=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&&P==="Completed"&&(D(!0),E!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))},[m,h,P]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:C(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(F,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CzlYoB8q.js";import{a as r}from"./sentry-CNCwYM02.js";import{Y as l,_ as p,$ as d,q as f}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import m from"./NotFoundScreen-CojoL2wq.js";import{j as b,u}from"./core-CGhI3jCZ.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]="9a8f45b6-966c-4537-bc45-9574650b4550",e._sentryDebugIdIdentifier="sentry-dbid-9a8f45b6-966c-4537-bc45-9574650b4550")}catch{}})();const j=()=>{const e=b(),t=u(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=f(t.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(t.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:a,onGoBack:i}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{j as F};
@@ -1,72 +0,0 @@
1
- import{j as t}from"./liveblocks-CzlYoB8q.js";import{l as y,k as x,j as C,u as S,h as ee,q as te,g as E,N as ae,n as ne,o as p}from"./core-CGhI3jCZ.js";import{IM as k,IN as v,IO as T,yU as B,yG as G,IP as D,IQ as oe,IR as se,yK as ie,eP as j,yR as le,yO as re}from"./zeni-epic-state-lenVK-tm.js";import{Z as g,o as r,p as de,d as I,k as M,y as ce,q as me,r as pe,s as K,x as ue,c as he,C as xe,v as ge,h as fe,w as we,B as be,A as ye,m as Se,S as ke,O as ve,E as Ie,G as je}from"./index-D7leYkuC.js";import{n as m}from"./mui-ILn-Gd-L.js";import f from"./NotFoundScreen-CojoL2wq.js";import{a as $}from"./sentry-CNCwYM02.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="74983f87-9ff3-459c-99c3-993f0c4a9571",e._sentryDebugIdIdentifier="sentry-dbid-74983f87-9ff3-459c-99c3-993f0c4a9571")}catch{}})();const $e=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=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=y();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx($e,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=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
- `,De=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:M.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function Ae({isSubPage:e}){const a=C(),n=S(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:M.googleMapsAPIKey})})})}const Pe=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},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}),Ne=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
- `,Le=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=K(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=S(),n=g(),{vendorId:o,billId:s}=y();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ne,{windowSize:n,children:t.jsx(Le,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=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
- `,Te=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=K(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Ge(){const e=C(),a=S(),n=g(),{vendorId:o,billId:s}=y(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Me={containerWidth:new Ie(100,58)},Ke=m(ke)`
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
- `,Ve=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
- `,_e=m.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Me.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
- `,He=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
- `,Oe=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=S(),{tenantEmailDomain:o,vendorId:s,billId:l}=y(),[i]=te(),d=i.get("token"),V=n.pathname.includes("address"),w=g(),_=ge(),A=fe(),b=we(),H=()=>{_.toggle()},O=E(u=>k(u)),U=E(u=>v(u)),{authParams:W,fetchState:c,billAttachment:q,billFetchState:P,companyName:J,currencySymbol:Q,amount:R}=O,{tenantId:z,userId:N,sessionId:L}=W,{fetchState:Z,internationalBankAccountCreateStatus:X}=U;return $.useEffect(()=>{j()},[]),$.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[b,c,s,o,d,a]),$.useEffect(()=>{b&&c==="Completed"&&(j(N,L,z),l!=null&&a(re(l)))},[c,b,N,L,z,l,a]),c==="Error"?t.jsx(f,{}):Z==="Completed"||X.fetchState==="Completed"?(j(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(ye,{analytics:I,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",J,l??"",Ue(n.pathname),Q,R))(u)}),t.jsxs(Ve,{windowSize:w,children:[w!=="small"?t.jsx(Ke,{onClick:H}):null,t.jsx(He,{windowSize:w,isAddressPage:V,children:P==="In-Progress"?t.jsx(Se,{size:"ExtraLarge",start:!0}):t.jsx(Oe,{file:q,type:"bill"})}),t.jsx(_e,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return t.jsx(je,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(We,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Ae,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Ge,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-CzlYoB8q.js";import{a as g}from"./sentry-CNCwYM02.js";import{h as O,u as _,j as w,q as P,g as l,N as D}from"./core-CGhI3jCZ.js";import{z as r,h as M,D as V,e as A,d as N,f as H,n as q,m as J,i as R}from"./index-D7leYkuC.js";import{eO as W,Ix as $,IH as B,Iy as G,eP as K,fi as Q,ID as X,fH as Y,cT as Z,II as ee,IJ as te}from"./zeni-epic-state-lenVK-tm.js";import{n as ne}from"./mui-ILn-Gd-L.js";import{u as se}from"./useDeviceId-D_8GbJBB.js";import{f as ae}from"./analyticsHelper-CwPfLmD8.js";import{t as ie}from"./getLocaleForTenant-D8dvZJzp.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="3bde9e74-25da-4812-a5e6-53b1878e3397",t._sentryDebugIdIdentifier="sentry-dbid-3bde9e74-25da-4812-a5e6-53b1878e3397")}catch{}})();const T=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Te(){const t=O(),a=_(),f=w(),[b]=P(),n=b.get("token"),p=b.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:z}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>W(e)),y=l(e=>$(e)),E=r.getSignedInUser(),v=M().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(y.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,y.tenantsInOrder),Y().then(()=>{const e=R();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(H.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,k,s,o,y,v,a.state,t]);const U=g.useCallback(()=>{f("/signin/auth")},[f]),j=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(q,{phoneNumber:x,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(D,{to:e,state:{...a.state,origin:""}})}if(!T(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(D,{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(J,{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{Te as default};
@@ -1 +0,0 @@
1
- import{j as V}from"./liveblocks-CzlYoB8q.js";import{a as c}from"./sentry-CNCwYM02.js";import{h as pe,g as s,l as qe,u as Je,j as Ke,i as P}from"./core-CGhI3jCZ.js";import{eO as he,eV as ea,eW as Se,eQ as aa,bn as ta,f3 as na,eX as sa,eY as oa,e_ as ia,f1 as ra,fb as da,f2 as g,f5 as la,f6 as ue,f9 as ca,f7 as ua,f8 as fa,fa as ma,cI as ba,fd as pa,cO as ha,bv as Sa,eN as ga,fi as Ea,fj as ka,fh as Ca}from"./zeni-epic-state-lenVK-tm.js";import{a2 as Ia,a3 as ya,v as Ta,x as wa,z as k,a4 as _a,M as Aa,w as Fa,u as Da,c as r,a5 as va,a6 as $a,I as Ba,a as Ma,a7 as xa,Y as Pa,a8 as Ra,a9 as Na,aa as fe,ab as me,L as Va,ac as Oa,ad as be,d as R,s as _,ae as N,af as Ua}from"./index-D7leYkuC.js";import{D as Ga}from"./mui-ILn-Gd-L.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="35862f40-0435-4b90-9bb0-1a54c2d92986",f._sentryDebugIdIdentifier="sentry-dbid-35862f40-0435-4b90-9bb0-1a54c2d92986")}catch{}})();const ja=Ia(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=qe(),t=Je(),C=Ta(),o=Ke(),O=aa(),m=pe(),{useFeatureGate:i}=wa(),U=k.getSignedInUser(),A=ta(U),n=s(e=>he(e)),ge=_a(),Ee=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:ke}=Aa(),G=s(e=>na(e)),j=G.uiState.currentChatSessionId,I=Fa(),{setLoading:Ce}=Da(),[F,L]=c.useState(void 0),D=P("/:tenantEmailDomain/dashboard")!==null,Y=P("/:tenantEmailDomain/reports")!==null,y=P("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:z}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),ye=va(n,Ie,H),{isFeatureEnabled:Te}=i(r.isSettingsFeatureEnabled),W=s(e=>sa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>oa(e));c.useEffect(()=>{I&&T&&!y&&v.fetchState==="Not-Started"&&m(ia(!0))},[I,T,v.fetchState,y]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),we=s(e=>$.fetchState==="Completed"?ra(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:_e}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ae}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Z}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Q}=i(r.isExpenseAutomationEnabledV2),X=Q||Z&&A,{isFeatureEnabled:Fe}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Be}=i(r.isTreasuryEnabled),{isFeatureEnabled:Me}=i(r.isTaskManagerCustomerUserAccessEnabled),xe=A||!A&&Me,Pe=n.company!=null&&da(n.company),w=Be&&Pe,Re=s(e=>g(e).totalUnreadCount),Ne=s(e=>g(e).reducedFetchCountState),q=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),J=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ve=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Oe}=$a();c.useEffect(()=>{const e=setTimeout(()=>Oe?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&K!=null){const e=`dashboard_${n.companyId}`;L(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{I&&!y&&Ve.fetchState==="Not-Started"&&O.tenantId!=null&&m(la("task_manager","dashboard"))},[I,O.tenantId]),c.useEffect(()=>{y||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Ne,count:Re},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ca(e,ne.tenantId):void 0),S=[];_e===!1&&S.push("accounts_payable_aging"),Ae===!1&&S.push("accounts_receivable_aging"),z===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),X===!1&&S.push("expense_automation_card");const Ge=Ba(),oe=s(e=>ua(e,S,h,Q,Z,w).fetchState),ie=s(e=>fa(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||Y&&(ie==="Completed"||ie==="Error")||!D&&!Y?void 0:"disabled",Le=c.useMemo(()=>ma(n.userRole),[n.userRole]),Ye=ba(Le),ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&W.fetchState==="Completed"&&pa(W.notificationSettings,h.userEmail,H,n),re=Ma(),We=re&&xa(t),de=ha(Ge?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Pa(t.pathname)!=="treasury",[w,de,le,t.pathname,a]),[Ze,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const Qe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Xe=Ra(Qe);return V.jsx(Ga,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(Na,{signedInUser:U,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?we:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(t),isSettingsFeatureEnabled:Te,isVendorsTabVisible:Ye,isZeniAccountEnabled:z,isChargeCardEnabled:ye,isTreasuryEnabled:w,treasuryYieldPercentage:Xe,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:He,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:X&&Sa(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ze,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=q===0&&J>0?"notifications/comments":"notifications/tasks";me(t)&&(e=q===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=_(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const b=_(t.state?.pathnameStackToGoBack,t.pathname);return R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),Ee?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}}):void(ge?ke(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=_(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&E[n.tenantId]!=null){const b=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Ua(e.type);be(e.type)?(j!=null&&m(Ca()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{Ce(Va.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let p=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Oa(l)?p+="settings/my_profile":be(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(Ea(e.tenantId)),m(ka(h.userId,e.tenantId,h.zeniSessionId)));const b=e;R.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:We,aiCfoView:G,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ga({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:Fe,isTaskManagerAccessEnabled:xe,thanksGivingAnimationEnabled:De,christmasAnimationEnabled:ve,newYearAnimationEnabled:$e})})}),Qa=f=>{const d=pe(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ya(o)&&ea(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return V.jsx(ja,{...f,...t})};export{Qa as M};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-CzlYoB8q.js";import{j as r,k as i}from"./core-CGhI3jCZ.js";import{W as n}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import"./sentry-CNCwYM02.js";import"./zeni-epic-state-lenVK-tm.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="fe0dc2e3-d6a3-4690-8e18-122b6c1ede12",o._sentryDebugIdIdentifier="sentry-dbid-fe0dc2e3-d6a3-4690-8e18-122b6c1ede12")}catch{}})();const d=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(d,{navigate:o})}export{h as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-CzlYoB8q.js";import{j as Y,h as Z,u as z,l as K,g as d,k as H,n as Q,o as b}from"./core-CGhI3jCZ.js";import{eO as U,qf as O,pP as X,Jm as v,pK as S,bv as ee,bn as ae,bS as te,pL as se,Jn as oe,J7 as C,dC as re,tC as ne,Jo as ce,tZ as ie,eU as le,eS as de}from"./zeni-epic-state-lenVK-tm.js";import{z as fe,N as me,I as pe,x as M,c as w,A as ue,d as $,ak as he,s as ge}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import Fe from"./NotFoundScreen-CojoL2wq.js";import{F as Ie}from"./FeaturePreviewScreen-Xv2JpkA8.js";import{a as g}from"./sentry-CNCwYM02.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import{u as Se}from"./useInitialThreadRequest-XOr6mP2N.js";import{t as Te}from"./routePaths-DhV05MHP.js";import{M as ye}from"./MobileAppDrawer-CMz8hWRn.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="7f4a1e61-66af-4afd-930f-c05ac0f13629",s._sentryDebugIdIdentifier="sentry-dbid-7f4a1e61-66af-4afd-930f-c05ac0f13629")}catch{}})();const T=(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=H(function(s){const e=oe(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:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(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=re(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 f=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{state:{pathnameStackToGoBack:u,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("../../")}}})(he);function R(){const s=Y(),e=Z(),a=z(),{forecastId:o,tenantEmailDomain:r}=K(),[c,p]=g.useState(!1),[f,u]=g.useState(!1),h=fe.getSignedInUser(),y=d(t=>U(t)),N=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>O(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=me();Ce({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:B}=be({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!f){u(!0);const t=((m,E,P)=>E!=null?m.forecasts.findIndex(I=>I.id===E):P!=null?m.forecasts.findIndex(I=>I.id===P):m.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(S(i.forecasts[t].id))}},[c,p,e,l,i,f,u,O,S,F]);const D=pe(),_=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:G}=M(),{isFeatureEnabled:L}=G(w.isReportsCommentingEnabled),J=Se(L?y?.companyId:void 0,{clearParams:l&&f}),[V,W]=g.useState(!1),j=t=>{W(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:$,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:N,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:_,isAiCfoAccessEnabled:q,onAskAiCfoClick:B,isReportsCommentingEnabled:L,isZeniUser:ae(h),initialOpenThreadRequest:J,onClickMenuIcon:()=>{j(!0)}})]})}function Ye(){const s=d(c=>U(c)),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(b,{path:"/",element:n.jsx(R,{})}),n.jsx(b,{path:"/:forecastId",element:n.jsx(R,{})}),n.jsx(b,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-CzlYoB8q.js";import{Jh as te,eO as X,jr as z,eU as Y,eS as ne,GS as q,IW as oe,sK as Ee,Ji as N,sy as ke,sT as Ie,sN as ie,sC as re,sR as Pe,sO as je,Jj as le,uo as Te,Jk as Le,fx as ve,Jl as G,sH as de,sF as ce,sW as Fe,c1 as Ae}from"./zeni-epic-state-lenVK-tm.js";import{Z as pe,x as Q,c as E,z as K,a5 as ue,H as me,ag as ge,ah as Oe,E as he,o as O,X as fe,D as Ce,ai as Re,N as Ve,A as Ue,d as be,f as Ze,s as Be,aj as $e,I as Ge}from"./index-D7leYkuC.js";import{D as ye,n as J,S as we}from"./mui-ILn-Gd-L.js";import se from"./NotFoundScreen-CojoL2wq.js";import{a as r}from"./sentry-CNCwYM02.js";import{h as ee,l as He,g as m,j as We,u as ze,k as Ke,n as ae,o as $}from"./core-CGhI3jCZ.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import{c as Me}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import{M as _e}from"./MobileAppDrawer-CMz8hWRn.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="be8ef6b8-f284-4e76-8940-79452a6d04a7",s._sentryDebugIdIdentifier="sentry-dbid-be8ef6b8-f284-4e76-8940-79452a6d04a7")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=He(),d=m(e=>te(e)),u=m(e=>X(e)),D=m(e=>z(e)),{useFeatureGate:f}=Q(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),L=ne(u),v=q(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{R===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(s):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:a.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(Se,{children:H.discardTitle}),descriptionComponent:a.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:i,isEditPopup:!0}):null,a.jsx(Oe,{...b})]})})},Ye=J(we)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Se=J(fe.H6Regular)`
6
- margin-top: ${O.sp7};
7
- padding-left: ${O.sp8};
8
- padding-right: ${O.sp8};
9
- color: ${s=>s.theme.colors.primary};
10
- word-break: break-word;
11
- `,De=J(fe.LargeRegularSp)`
12
- color: ${s=>s.theme.colors.hero};
13
- padding-left: ${O.sp8};
14
- padding-right: ${O.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${O.sp4};
17
- white-space: pre-line;
18
- `,qe={overlayWidth:new he(100,100,48)},W=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>X(i)),u=m(i=>z(i)),{useFeatureGate:D}=Q(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Y(f,d),P=ne(d),L=q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{R===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(s):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(es,{onClick:i=>i.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(Se,{children:W.discardTitle}),descriptionComponent:a.jsx(De,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:W.no,action:F}):null,a.jsx(Re,{...b})]})})},es=J(we)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,ss=Ke(function(s,t){const l=le(s),n=K.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(s),analytics:be}},function(s,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{s(re(o,y))},onResendInvite:o=>{s(Fe(o))},onReloadPeople:()=>{s(de()),s(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{s(G({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{s(G({searchText:o}))}}}})($e);function _({isInvitePeopleDrawerOpen:s,isEditPeopleDrawerOpen:t}){const l=We(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=K.getSignedInUser(),h=m(e=>X(e)),{useFeatureGate:p}=Q(),{isFeatureEnabled:R}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!Y(R,h)&&V,w=q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=Je({mobileExploreReferrer:"People"}),c=m(e=>le(e));Me({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(s!=null&&s===!0),L(t!=null&&t===!0&&t)},[s,t]),r.useEffect(()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return a.jsxs(a.Fragment,{children:[c.fetchState==="Completed"?a.jsx(Ue,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?a.jsx(Qe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,a.jsx(_e,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),a.jsx(ss,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,M)=>{n(G({sortKey:e,sortOrder:M}))},onRowClick:e=>{const M=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Be(g.state?.pathnameStackToGoBack,g.pathname);l(M,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function Ss(){const s=Ge();return Ae(s?.loggedInUserRole??[])?a.jsxs(ae,{children:[a.jsx($,{path:"/",element:a.jsx(_,{})}),a.jsx($,{path:"new",element:a.jsx(_,{isInvitePeopleDrawerOpen:!0})}),a.jsx($,{path:":userId/edit",element:a.jsx(_,{isEditPeopleDrawerOpen:!0})}),a.jsx($,{path:"*",element:a.jsx(se,{})})]}):a.jsx(ae,{children:a.jsx($,{path:"*",element:a.jsx(se,{})})})}export{Ss as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CzlYoB8q.js";import E from"./NotFoundScreen-CojoL2wq.js";import{a as r}from"./sentry-CNCwYM02.js";import{j as _,u as v,g as p,l as M,h as O,N as U,k as P,n as z,o as h}from"./core-CGhI3jCZ.js";import{eO as B,OY as b,bo as F,bn as N,h7 as V,gD as Y}from"./zeni-epic-state-lenVK-tm.js";import{v as $,z as I,ct as q}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import{c as H}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import{M as J}from"./MobileAppDrawer-CMz8hWRn.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.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]="0b46589d-af9f-4e5a-8b95-925077ac8afe",e._sentryDebugIdIdentifier="sentry-dbid-0b46589d-af9f-4e5a-8b95-925077ac8afe")}catch{}})();const K=P(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(q),L=()=>{const e=_(),t=v(),c=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=M(),u=O(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),k=F(o?.userRole??[]),C=o?.userRole?.includes("bookkeeping_admin")??!1,D=N(d),x=k||C||D,l=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u(Y({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const y=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return H({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function pe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
@@ -1,5 +0,0 @@
1
- import{j as s}from"./liveblocks-CzlYoB8q.js";import{a as o}from"./sentry-CNCwYM02.js";import{g as f,j as B,h as V,u as _,k as F}from"./core-CGhI3jCZ.js";import{h as H,Z as M,z as R,b3 as W,E as U,N as $,A as z,d as l,f as Y,a2 as Q,b4 as Z}from"./index-D7leYkuC.js";import{eY as q,eO as G,LM as P,LN as J,ts as K,ti as g,e_ as X,bN as ee,tn as re,LO as ae}from"./zeni-epic-state-lenVK-tm.js";import{D as ne,e as te,n as se,S as oe}from"./mui-ILn-Gd-L.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import{M as de}from"./MobileAppDrawer-CMz8hWRn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="dfdfcc57-6e0d-4344-a980-425336c4870f",e._sentryDebugIdIdentifier="sentry-dbid-dfdfcc57-6e0d-4344-a980-425336c4870f")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=H(),n=M();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>q(d));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,I="refer-and-earn-status-update",pe=F(function(e){const r=P(e),a=e.referralViewState.rewardsPlanFetchState,n=ee([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ae({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(Q(Z));function be({isReferralDrawerOpen:e}){const r=B(),a=V(),n=_(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),p=R.getSignedInUser(),C=f(t=>G(t)),m=f(t=>P(t)),y=m.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),v=J([m,w]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(a(K()),E(!0))},[]),o.useEffect(()=>{!i&&y==="Not-Started"&&c&&(u(!0),a(g(!0)))},[y,a,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),a(X(!0)))},[w,a,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),S=t=>{A(t)},{isAiCfoAccessEnabled:L,onAskAiCfoClick:O}=ie({mobileExploreReferrer:"Rewards"});le({isDataReady:v===!0});const N={events:p?.userId!=null?[`private-encrypted-${p.userId}.${I}`]:[],eventCallback:(t,b,T)=>{T.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(z,{analytics:l,onLoad:t=>(b=>{p!=null&&b.trackPageLoaded(Y.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:S}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(pe,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{S(!0)},isAiCfoAccessEnabled:L,onAskAiCfoClick:O,...N})]})}export{be as R};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-CzlYoB8q.js";import x from"./NotFoundScreen-CojoL2wq.js";import{a as p}from"./sentry-CNCwYM02.js";import{j as C,u as I,h as A,g as c,N as E,k,n as D,o as u}from"./core-CGhI3jCZ.js";import{eO as T,MG as g,MW as S,Cp as V,By as U,Co as m,Cf as _,N9 as B}from"./zeni-epic-state-lenVK-tm.js";import{h as N,z as O,B as W,a2 as $,bJ as M,ab as z}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-5oJldpZm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="502fd599-1bfc-416c-9385-0e0c28a5492b",e._sentryDebugIdIdentifier="sentry-dbid-502fd599-1bfc-416c-9385-0e0c28a5492b")}catch{}})();const d="reimbursement-approval-rule-update",G=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(B(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(_(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})($(M)),J=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=c(n=>n.remiSetupApproverViewState.fetchState),o=c(n=>T(n)),w=N(),i=c(n=>g(n)),h=c(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(U(!0)))},[l,b,a]),O.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,P,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(G,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(u,{path:"/",element:t.jsx(J,{})}),t.jsx(u,{path:"/new",element:t.jsx(v,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(u,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
@@ -1 +0,0 @@
1
- import{j as p}from"./liveblocks-CzlYoB8q.js";import{u as z,j as ye,h as Ce,l as ge,g as d,k as Ie,n as Se,o as G}from"./core-CGhI3jCZ.js";import{eO as L,f8 as I,IU as we,jr as W,IV as X,pJ as A,jf as Te,ii as Re,t6 as K,pO as Oe,bv as Ae,IW as Fe,bn as ke,u5 as De,IX as Ee,IY as je,s_ as Pe,IZ as Y,I_ as Le,I$ as Me,J0 as Be,J1 as ve,J2 as S,J3 as F,J4 as k,J5 as H,J6 as D,J7 as E,dC as Ue,tN as Ve,tB as N,tC as $,tT as xe,tG as Z,tZ as Je,J8 as ze,J9 as Ge,Ja as Ye,Jb as He,Jc as Ne,eU as $e,eS as Ze}from"./zeni-epic-state-lenVK-tm.js";import{J as qe,M as Qe,Z as We,x as ee,c as j,z as ae,N as Xe,I as Ke,a as ea,A as aa,d as P,f as sa,s as se,Q as ta,R as oa,T as na}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import ra from"./NotFoundScreen-CojoL2wq.js";import{F as ia}from"./FeaturePreviewScreen-Xv2JpkA8.js";import{a as _}from"./sentry-CNCwYM02.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import{u as fa}from"./useInitialThreadRequest-XOr6mP2N.js";import{t as q,a as Q}from"./routePaths-DhV05MHP.js";import{M as ma}from"./MobileAppDrawer-CMz8hWRn.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="31c8872f-9ffc-484f-89a7-5e2151b402f2",e._sentryDebugIdIdentifier="sentry-dbid-31c8872f-9ffc-484f-89a7-5e2151b402f2")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(Ye()),e(He()),e(Ne())},ha=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Fe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Je(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{_a(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=oa(f),a=ye(),s=Ce(),t=z(),{tenantEmailDomain:r}=ge(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,C]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),g=d(n=>I(n).fetchState),re=d(n=>we(n)),{areTenantIdsInSync:h}=Xe(),T=d(n=>n.financeStatementState.selectedReportId),U=d(n=>W(n)),R=d(n=>X(n)),ie=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(A(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&g==="Completed"&&h&&(s(A(l.userId,!1,!0,!1)),te(!0))},[i,M,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(K());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,O,h,U,R]);const V=Ke(),ce=V?.loggedInUserRole!=null&&Ae(V?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),J=qe(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>J?ua:void 0,[J]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:g==="Completed"}),pa({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Va(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=$e(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{Va as default};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-CzlYoB8q.js";import{x as w,z as j,aJ as y,A as I,d as p,f as P,cD as F,c as L}from"./index-D7leYkuC.js";import"./mui-ILn-Gd-L.js";import l from"./NotFoundScreen-CojoL2wq.js";import{a as d}from"./sentry-CNCwYM02.js";import{h as A,g as x,j as T,u as V,k as R,n as U,o as u}from"./core-CGhI3jCZ.js";import{eO as z,Pv as C,Ml as O,Pw as D,ts as Y,e_ as q,Px as G,tq as J}from"./zeni-epic-state-lenVK-tm.js";import{R as b}from"./ReferralListScreen-8R81rrOx.js";import"./recharts-D6qS-pdV.js";import"./analytics-CQOsvcBG.js";import"./plaid-D8caW90M.js";import"./dnd-DKCsG5d8.js";import"./stripe-DMRn4zHo.js";import"./lottie-CLMz6y3A.js";import"./lexical-DT64qE89.js";import"./pdf-CUf9xopY.js";import"./utils-zvjLmBW4.js";import"./useAskAiCfoHostNavButtonProps-BYwM8iQc.js";import"./useFetchSuggestedQuestionsWhenReady-CLFroGaE.js";import"./MobileAppDrawer-CMz8hWRn.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]="aa5aaafa-d751-4401-b8e9-7e7e9e44d2d6",e._sentryDebugIdIdentifier="sentry-dbid-aa5aaafa-d751-4401-b8e9-7e7e9e44d2d6")}catch{}})();const M=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{e(D()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(J())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(F),B=()=>{const e=A(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=x(o=>z(o)),c=T(),_=V(),{useDynamicConfig:g}=w(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=x(o=>C(o)),k=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:v}=g(y.zeniAccountsConfig),N=O(v);d.useEffect(()=>{e(D()),r?.rewardsLastViewedTime==null&&i===!1&&(e(Y()),s(!0))},[]),d.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(q(!0)))},[m.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(P.Event.inviteEmailViewed))(o)}):null,a.jsx(M,{navigate:c,location:_,currentTenant:r,companyName:S,userName:k,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=w(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(b,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(b,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{fe as default};