@zeniai/web-app-ui 5.0.1-qa → 5.0.2-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-D4ZwWdW3.js +1 -0
  2. package/dist/assets/AddressScreen-DG2igJ3e.js +9 -0
  3. package/dist/assets/AiCfoScreen-zU1Nx73v.js +11 -0
  4. package/dist/assets/BillPayApprovalRoutes-5SmQw6w5.js +1 -0
  5. package/dist/assets/{BillPayRoutes-B7eECbMR.js → BillPayRoutes-be_i6u1i.js} +7 -7
  6. package/dist/assets/{BusinessVerificationPageScreen-D_IL11BU.js → BusinessVerificationPageScreen-D-2VpDbP.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-MbQ6GwxR.js → ChargeCardRoutes-B9FmCIkx.js} +9 -9
  8. package/dist/assets/CompanyPassportScreen-BIqiLLcA.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-Dah9BIfx.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-BCDiCbBG.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-DEmyPEG9.js → CustomerOnboardingRoutes-hpECeIAZ.js} +3 -3
  12. package/dist/assets/{DashboardRoutes-LUXfYRYr.js → DashboardRoutes-9GSNK76c.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-CsgBmyY-.js → DefaultTenantHome-D1vXY83X.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-Byk3gNE9.js → DomesticWireDetailScreen-CBvkPR3e.js} +3 -3
  15. package/dist/assets/DrawerScreen-B_llN9HS.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-BQvHfHXF.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-DzZ2kzOA.js → ExpenseAutomationRoutes-DkcdbkvF.js} +4 -4
  18. package/dist/assets/FeaturePreviewScreen-BZdfwZgd.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-B3KZdLtz.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-BKi_zF71.js +12 -0
  21. package/dist/assets/MobileAppDrawer-Q6-14poV.js +1 -0
  22. package/dist/assets/NotFoundScreen-Cz9quvZz.js +1 -0
  23. package/dist/assets/{NotificationRoutes-DzMqKa9n.js → NotificationRoutes-eISVis3N.js} +1 -1
  24. package/dist/assets/PandLWithForecastRoutes-CJ17X8Du.js +1 -0
  25. package/dist/assets/{PeopleRoutes-BswRWZQg.js → PeopleRoutes-D7cCmX3b.js} +5 -5
  26. package/dist/assets/PerformanceRoutes-BfV7NXh6.js +1 -0
  27. package/dist/assets/{Preview--bb5p9Hr.js → Preview-hp5oXBDl.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-C_qIc23z.js → QBOConnectionScreen-DQ1AuSJF.js} +34 -34
  29. package/dist/assets/ReferralListScreen-eM-LRvxR.js +5 -0
  30. package/dist/assets/ReimbursementApprovalRoutes-CFORcsiU.js +1 -0
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.js → ReimbursementApprovalRuleDetailScreen-DAGX2Bpj.js} +1 -1
  32. package/dist/assets/ReimbursementRoutes-B_ZwbgUK.js +68 -0
  33. package/dist/assets/ReportsRoutes-Cjg471Jx.js +1 -0
  34. package/dist/assets/RewardsRoutes-akBEyetT.js +1 -0
  35. package/dist/assets/ScreenRoutes-DNdR3Wy8.js +2 -0
  36. package/dist/assets/SettingsRoutes-BZEUVpEo.js +57 -0
  37. package/dist/assets/{SetupPagesScreen-vY1ujDKJ.js → SetupPagesScreen-hvGS92ve.js} +5 -5
  38. package/dist/assets/{SignInScreen-ClbKNS4x.js → SignInScreen-BJuZCyu8.js} +1 -1
  39. package/dist/assets/SignOutScreen-CGW09UIk.js +9 -0
  40. package/dist/assets/TaskListScreen-tJJhpcmp.js +9 -0
  41. package/dist/assets/TaskRoutes-DCNhNgxM.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-RIZOkAYz.js +1 -0
  43. package/dist/assets/TransactionDetailScreen-BeTw-X5z.js +5 -0
  44. package/dist/assets/TransactionListRoutes-ZRAuVXeU.js +1 -0
  45. package/dist/assets/{TreasuryRoutes-CtBzkTMx.js → TreasuryRoutes-BaR7b6eY.js} +6 -6
  46. package/dist/assets/{VendorsRoutes-aBYOoTKe.js → VendorsRoutes-B4vpI764.js} +20 -20
  47. package/dist/assets/{WiseConfirmationScreen-s0eoug7u.js → WiseConfirmationScreen-v0Wu2mUB.js} +1 -1
  48. package/dist/assets/ZeniAccountRoutes-CjxtzBYh.js +66 -0
  49. package/dist/assets/ZeniAccountStatementScreen-C-RdVVLR.js +9 -0
  50. package/dist/assets/{accountMappingHelper-CEUIWp7O.js → accountMappingHelper-B_vdVXJd.js} +1 -1
  51. package/dist/assets/{analytics-BkhHPaQ4.js → analytics-B_kykzhy.js} +1 -1
  52. package/dist/assets/{analyticsHelper-CSpNHX-t.js → analyticsHelper-RuE4CbDL.js} +1 -1
  53. package/dist/assets/{core-C_NeXleM.js → core-C7cnuUop.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-Drd7YS9D.js → decodeURIComponentSafe-rDkCEJpn.js} +1 -1
  55. package/dist/assets/{dnd-C0SdDgY2.js → dnd-TzLeX35A.js} +1 -1
  56. package/dist/assets/{empty-5JhUjXJf.js → empty-7vbmHAL6.js} +1 -1
  57. package/dist/assets/{empty-CDZc49VR.js → empty-B375B_HA.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-SE9UwlDX.js → emptyVideoElement-BGxjtXTu.js} +1 -1
  59. package/dist/assets/epic-DefpUSD4.js +2 -0
  60. package/dist/assets/getLocaleForTenant-BRT6_AeC.js +1 -0
  61. package/dist/assets/{index-3wKQcxVk.js → index-BAxpczYf.js} +2 -2
  62. package/dist/assets/{index-DEiuB93P.js → index-CcLDrNJO.js} +1 -1
  63. package/dist/assets/{index-BaZ8-9eR.js → index-DGKR7P5A.js} +13079 -12937
  64. package/dist/assets/{index-Y_8J-EV-.js → index-DrxEgkQ-.js} +1 -1
  65. package/dist/assets/{index-COcEChnY.js → index-Qmma5Ck1.js} +1 -1
  66. package/dist/assets/{index-DYUyEm6J.js → index-_vh22_qX.js} +1 -1
  67. package/dist/assets/{index-Dmixh63m.js → index-m-Adf2ll.js} +1 -1
  68. package/dist/assets/{lexical-B1vtLf4F.js → lexical-Dp9Fvoo6.js} +1 -1
  69. package/dist/assets/{liveblocks-BCZSgQbG.js → liveblocks-jLbycGCP.js} +1 -1
  70. package/dist/assets/{lottie-BdeQlKTG.js → lottie-SbVYeXJk.js} +1 -1
  71. package/dist/assets/{mui-CgjVMn8C.js → mui-BkznVaFh.js} +1 -1
  72. package/dist/assets/{pathToGoBack-BDpRzqvH.js → pathToGoBack-DXgc_G9d.js} +1 -1
  73. package/dist/assets/{pdf-CQPNphc4.js → pdf-DQg4OfsP.js} +4 -4
  74. package/dist/assets/{pdf-lib-DznUmqID.js → pdf-lib-CDsnDRGG.js} +1 -1
  75. package/dist/assets/{plaid-B3UNGbGB.js → plaid-DfnoQTVm.js} +1 -1
  76. package/dist/assets/{pusher-SrZYiYid.js → pusher-CQHA__kt.js} +1 -1
  77. package/dist/assets/{react-B1LuGLWv.js → react-BfsHsZ2B.js} +1 -1
  78. package/dist/assets/{react-CkJUroZo.js → react-CCO8orgk.js} +1 -1
  79. package/dist/assets/{react-CUvZ-QKI.js → react-CJwzWgLi.js} +1 -1
  80. package/dist/assets/{react-BLym8SqS.js → react-DPNnFJXW.js} +1 -1
  81. package/dist/assets/{react-BR-uiB3M.js → react-pHyk9OpQ.js} +1 -1
  82. package/dist/assets/{react-BUr4gNxK.js → react-tE35hRos.js} +1 -1
  83. package/dist/assets/{recharts-NCr2Pwd1.js → recharts-Dt8COHEP.js} +1 -1
  84. package/dist/assets/{routePaths-CXa3WNDm.js → routePaths-BjxXYb1e.js} +1 -1
  85. package/dist/assets/{sentry-CGkVgbup.js → sentry-CflaePyQ.js} +1 -1
  86. package/dist/assets/{url-D7JZ1pkZ.js → url-CMgR7Whs.js} +1 -1
  87. package/dist/assets/{url-ax2xfQkc.js → url-DZF6CZ5y.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-BhmP_lnc.js +1 -0
  89. package/dist/assets/{useDeviceId-DxDe1m2N.js → useDeviceId-aTbWtPu7.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-Ex4_WTph.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-B7p2SBgg.js → useInitialThreadRequest-DoYKoe1O.js} +1 -1
  92. package/dist/assets/{utils-CTLGOmjC.js → utils-t3ltqqZ0.js} +1 -1
  93. package/dist/assets/withTransactionSidePanel-BBmA3NZ6.js +8 -0
  94. package/dist/assets/zeni-epic-state-DPGmsT0c.js +14 -0
  95. package/dist/index.html +1 -1
  96. package/package.json +4 -4
  97. package/dist/assets/AddressRoutes-Ccdt31hR.js +0 -1
  98. package/dist/assets/AddressScreen-DG9DlRXT.js +0 -9
  99. package/dist/assets/AiCfoScreen-BySJdfdn.js +0 -11
  100. package/dist/assets/BillPayApprovalRoutes-7ZgXY6Qr.js +0 -1
  101. package/dist/assets/CompanyPassportScreen-0tGZqhHr.js +0 -1
  102. package/dist/assets/ConnectionAuthScreen-Ng7EqaWr.js +0 -11
  103. package/dist/assets/CustomerOnboardingAuthScreen-DHzsN76N.js +0 -1
  104. package/dist/assets/DrawerScreen-CN6TBpYY.js +0 -1
  105. package/dist/assets/EntityDetailRoutes-BVmRwPcm.js +0 -1
  106. package/dist/assets/FeaturePreviewScreen-ArEP4se9.js +0 -1
  107. package/dist/assets/MagicLinkRoutes-C8RQWz8N.js +0 -72
  108. package/dist/assets/MagicLinkSignInScreen-raeb9t11.js +0 -12
  109. package/dist/assets/MobileAppDrawer-CowqUthz.js +0 -1
  110. package/dist/assets/NotFoundScreen-0ajohMSv.js +0 -1
  111. package/dist/assets/PandLWithForecastRoutes-DdGQfKKW.js +0 -1
  112. package/dist/assets/PerformanceRoutes-ChMRcywH.js +0 -1
  113. package/dist/assets/ReferralListScreen-BAK4p9-3.js +0 -5
  114. package/dist/assets/ReimbursementApprovalRoutes-ogcfMEcC.js +0 -1
  115. package/dist/assets/ReimbursementRoutes-0m6W0X2g.js +0 -68
  116. package/dist/assets/ReportsRoutes-1TXSN037.js +0 -1
  117. package/dist/assets/RewardsRoutes-B8FReE5j.js +0 -1
  118. package/dist/assets/ScreenRoutes-DRzB_14n.js +0 -2
  119. package/dist/assets/SettingsRoutes-BGCZcWYL.js +0 -57
  120. package/dist/assets/SignOutScreen-Dvb2Qc0l.js +0 -9
  121. package/dist/assets/TaskListScreen-CaGy-z1x.js +0 -9
  122. package/dist/assets/TaskRoutes-9joFCtVs.js +0 -9
  123. package/dist/assets/TransactionDetailRoutes-CWNaQpCz.js +0 -1
  124. package/dist/assets/TransactionDetailScreen-DXlYmq7Y.js +0 -5
  125. package/dist/assets/TransactionListRoutes-FH_uc507.js +0 -1
  126. package/dist/assets/ZeniAccountRoutes-BcBOPI_A.js +0 -66
  127. package/dist/assets/ZeniAccountStatementScreen-BOfH7mnf.js +0 -9
  128. package/dist/assets/epic-CBKcA32L.js +0 -2
  129. package/dist/assets/getLocaleForTenant-Ab1B3PjW.js +0 -1
  130. package/dist/assets/useAskAiCfoHostNavButtonProps-Crpk73sU.js +0 -1
  131. package/dist/assets/useFetchSuggestedQuestionsWhenReady-sxquM27W.js +0 -1
  132. package/dist/assets/withTransactionSidePanel-CB8Jp1hw.js +0 -8
  133. package/dist/assets/zeni-epic-state-Dp14ovRw.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-BaZ8-9eR.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CGkVgbup.js"><link rel="modulepreload" crossorigin href="/assets/core-C_NeXleM.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-Dp14ovRw.js"><link rel="modulepreload" crossorigin href="/assets/mui-CgjVMn8C.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BkhHPaQ4.js"><link rel="modulepreload" crossorigin href="/assets/utils-CTLGOmjC.js"><link rel="stylesheet" crossorigin href="/assets/index-D-vub4_t.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-DGKR7P5A.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CflaePyQ.js"><link rel="modulepreload" crossorigin href="/assets/core-C7cnuUop.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DPGmsT0c.js"><link rel="modulepreload" crossorigin href="/assets/mui-BkznVaFh.js"><link rel="modulepreload" crossorigin href="/assets/analytics-B_kykzhy.js"><link rel="modulepreload" crossorigin href="/assets/utils-t3ltqqZ0.js"><link rel="stylesheet" crossorigin href="/assets/index-D-vub4_t.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.1-qa",
3
+ "version": "5.0.2-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.0",
31
- "@zeniai/client-epic-state": "5.0.0",
32
- "@zeniai/web-components": "4.0.1",
30
+ "@zeniai/client-analytics": "2.0.1",
31
+ "@zeniai/client-epic-state": "5.0.2",
32
+ "@zeniai/web-components": "4.0.2",
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-BCZSgQbG.js";import{A as i}from"./AddressScreen-DG9DlRXT.js";import s from"./NotFoundScreen-0ajohMSv.js";import"./sentry-CGkVgbup.js";import{n as d,o as r}from"./core-C_NeXleM.js";import"./zeni-epic-state-Dp14ovRw.js";import"./recharts-NCr2Pwd1.js";import"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.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]="339d6624-b51b-426b-a0cc-e8e8bd837ae0",t._sentryDebugIdIdentifier="sentry-dbid-339d6624-b51b-426b-a0cc-e8e8bd837ae0")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-BCZSgQbG.js";import{a as h}from"./sentry-CGkVgbup.js";import{j as P,h as _,u as j,l as B,g as E,k as $}from"./core-C_NeXleM.js";import{K as L,m as M,z as D,S as K,B as G,q as z,c as C,e as m,j as F,h as b,p as N}from"./index-BaZ8-9eR.js";import{IA as I,gG as O,eL as R,IB as U,b$ as q,IC as V,jO as H}from"./zeni-epic-state-Dp14ovRw.js";import{n as J}from"./mui-CgjVMn8C.js";import Q from"./NotFoundScreen-0ajohMSv.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]="079074c8-d43d-4780-ab7c-56372e180ddc",e._sentryDebugIdIdentifier="sentry-dbid-079074c8-d43d-4780-ab7c-56372e180ddc")}catch{}})();const W=J.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,X=$(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=R(e),a=t.roleMap!=null&&U(t.roleMap),d=i||c==="user_address"||q(l?.userRole??[])||a?void 0:"readonly";if(o==null){const s=V(c,e);return{addressToEdit:s?.addressToCreate,loadingState:s?.status?.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:t.dontShowSaveConfirmation}}const n=I(e,o);return{addressToEdit:n.address,loadingState:n.fetchState,googleAPIKey:b.googleMapsAPIKey,isDisabled:d}},function(e,t){const{navigate:o,location:i,addressType:c}=t,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,n=N(d?.pathnameStackToGoBack);let s=n.poppedPathname??k();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(s=`${s}?${g}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const d=Y(a);e(H({addressType:c,addressToCreate:d})),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)}}})(F);function re({isSubPage:e,hideAddressSubTitle:t=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=P(),d=_(),n=j(),{addressId:s,addressType:u}=B(),g=L(),w=M(),A=D.getSignedInUser(),[p,v]=h.useState(s==null),f=E(S=>s!=null?I(S,s).fetchState:"Not-Started"),x=K();if(A==null)throw Error("Can't access address page without signing in...");const T=S=>S.trackPageLoaded(s!=null?m.Event.editAddress:m.Event.addAddress),y=l??u;return h.useEffect(()=>{p||s==null||(v(!0),d(O(s,!1)))},[p,s,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!p&&f==="Not-Started"||p&&f==="In-Progress"?r.jsx(G,{fetchState:f,style:{backgroundColor:w.colors.grey5}}):s!=null&&f==="Error"?(a(`${k(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(z,{analytics:C,onLoad:T}),r.jsx(W,{windowSize:g,children:r.jsx(X,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:x?.loggedInUserRoleMap})})]}):r.jsx(Q,{})}const k=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{re as A,Y as t};
@@ -1,11 +0,0 @@
1
- import{j as S}from"./liveblocks-BCZSgQbG.js";import{a as i}from"./sentry-CGkVgbup.js";import{h as ee,j as te,u as se,g as B,l as ae,k as ne}from"./core-C_NeXleM.js";import{D as oe,cB as ie,z as re,K as le,cC as ce,cD as ue,cE as $,q as de,c as _,J as R,cF as me,cG as fe,e as pe,a1 as he,cH as Se,M as ge,k as Ce,p as be,cI as we,cJ as Ie}from"./index-BaZ8-9eR.js";import{fD as ke,f2 as q,eL as Ee,h6 as ye,P6 as Pe,eK as Te,hg as _e,hc as xe,ft as ve,fn as Qe,fg as Ae,fk as j,fo as De,fp as Oe,fq as Fe,fr as Le,fs as Me}from"./zeni-epic-state-Dp14ovRw.js";import{D as Ue,n as x,P as Be,S as Re}from"./mui-CgjVMn8C.js";import{p as je}from"./pathToGoBack-BDpRzqvH.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new a.Error().stack;r&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[r]="c3f7f9b9-6b54-4b7c-af40-24127f1a0843",a._sentryDebugIdIdentifier="sentry-dbid-c3f7f9b9-6b54-4b7c-af40-24127f1a0843")}catch{}})();const N="chat-response-generated",$e=ne(function(a,r){const n=q(a),d=r.isSubmitting;return{showSampleQuestions:r.sessionFromUrl==="explore"&&n.uiState.currentChatSessionId==null,aiCfoView:n,isSubmitting:d,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${ge}/tableDownload`,emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,isFileUploadEnabled:r.isFileUploadEnabled}},function(a,r){const{location:n,currentTenant:d,userId:c,navigate:f,currentChatSessionId:p,allSessionsWithOrderedQuestionAnswers:g}=r;return{onEventReceived:(e,o)=>{if(e===N&&typeof o.text=="string"&&typeof o.metadata=="object"){const t=o,m=Oe(t.type),u=t.metadata.chat_session_id??null,{currentChatSession:s,currentQuestionAnswer:C,currentQuestionAnswerSummary:h}=$(g,u);m!=="answer"?_.trackAICFOChatResponseGenerated(m,C?.question.questionText??"",t.text,u,Ie(h,s),t.metadata.message_id??null):_.trackAICFOChatAnswerGenerated(t.text,C?.question.questionText??"",(t.follow_up_questions?.length??0)>0,!!t.assumptions,!!t.insights,t.visualization!=null,Fe(t.visualization?.type??"")??null,u,t.summarized_title,t.metadata.message_id??null),a(Le({chatSessionId:t.metadata.chat_session_id,responseType:m,fetchState:{fetchState:"Completed",error:void 0}})),a(Me({chatSessionId:t.metadata.chat_session_id,answerPayload:t,userId:c}))}},onSubmit:(e,o,t,m)=>{e&&we(a,e,o,p,g,c,m,t)},updateCurrentInput:e=>{a(j(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{a(De(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{f(-1)},onCloseClick:()=>{const e=be(n.state?.pathnameStackToGoBack),o=e.poppedPathname??je(1);f(o,{state:{...n.state,pathnameStackToGoBack:e.newStack}}),a(j(""))},togglePageView:()=>{f(`/${d.tenantEmailDomain}/dashboard`,{state:{...n.state,message:"open_ai_cfo_drawer"}})},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{f(-1)},onNewChatClick:()=>{p!=null&&a(Ae());const e=Ce(n.state?.pathnameStackToGoBack,n.pathname);f(`/${d.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{a(Qe({questionAnswerId:e,isCollapsed:o}))},onMenuClick:r.onMenuClick}})(he(Se)),rt=({isFileUploadEnabled:a})=>{const{setIsAiCfoOpen:r}=oe(),n=ee(),d=te(),c=se(),[f,p]=i.useState(!1);i.useEffect(()=>{n(ke())},[n]);const{customPageTitle:g}=ie(),e=B(l=>q(l)),o=re.getSignedInUser(),{session_id:t}=ae(),m=le(),u=B(l=>Ee(l)),s=e.uiState.currentChatSessionId,C=ce({currentTenant:u,currentChatSessionId:s,aiCfoView:e}),h=c.state,b=h?.aiCfoInitialQuestion,v=!!h?.aiCfoShouldSubmit,[G,k]=i.useState(null),[V,E]=i.useState(!1),Q=i.useRef(!1);i.useEffect(()=>{Q.current||b==null||b===""||(k(b),E(v),Q.current=!0)},[b,v]);const H=i.useCallback(()=>{k(null),E(!1)},[]),A=i.useMemo(()=>new URLSearchParams(c.search),[c.search]),D=A.get("ref")??h?.aiCfoRef,y=A.get("emailRefId")??h?.aiCfoEmailRefId,O=i.useRef(!1);i.useEffect(()=>{O.current||D!=="month-end-email"||y==null||s!=null||o==null||(n(ye("controller",o.userId,y,"MONTH_END_EMAIL")),O.current=!0)},[D,y,s,n,o]);const w=e.uiState.lastContextMessage;i.useEffect(()=>{w!=null&&w!==""&&s!=null&&(k(w),E(!0),n(Pe()))},[w,s,n]);const W=u.masterTOSInfo,I=W?.isMasterTOSAccepted??!1,{visitedSessions:F}=ue(s),P=e.fetchState,T=e.uiState.chatSessionsNextPageToken.hasMore||!e.uiState.chatSessionsFirstPageFetched,L=s!=null?e.fetchChatSessionHistoryByChatSessionId?.[s]?.fetchState??"Not-Started":"Not-Started",M=s==null||(e.uiState.chatHistoryNextPageToken[s]?.hasMore??!0),U=e.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:z}=$(U,s),J=z.length===0;i.useEffect(()=>{I||d("../dashboard",{state:{...c.state,message:"open_ai_cfo_drawer"}})},[I]),i.useEffect(()=>{s!=null&&t!==s&&d(`../ai-cfo/${s}`,{state:{...c.state}})},[s,t]),i.useEffect(()=>{t!=null&&s==null&&t!=="new_chat"&&t!=="explore"&&n(Te({sessionId:t,agentId:"controller"}))},[]);const K=i.useMemo(()=>({events:F.map(l=>`private-chat-${l}.${N}`),eventCallback:(l,Y,Z)=>Z.onEventReceived(l,Y)}),[F]);if(i.useEffect(()=>{P!=="In-Progress"&&T&&n(_e())},[P,T,n]),i.useEffect(()=>{s!=null&&L!=="In-Progress"&&M&&o!=null&&P==="Completed"&&!T&&n(xe(s,o.userId))},[L,M,s,o,n]),o==null||t==null)throw Error("Can't access AI Controller page without signing in...");const X=s!=null&&e.responseStateByChatSessionId?.[s]?.answer?.fetchState==="In-Progress";return S.jsxs(Ne,{children:[S.jsx(de,{analytics:_,onLoad:l=>l.trackPageLoaded(pe.Event.aiCFOPage)}),R(m)&&C.drawerElement,S.jsx($e,{...K,currentChatSessionId:s,allSessionsWithOrderedQuestionAnswers:U,openOnboardingPage:()=>p(!0),userId:o.userId,setIsAiCfoOpen:r,navigate:d,sessionFromUrl:t,location:c,isSubmitting:X,isEmptyChatWithSession:J,customPageTitle:g,currentTenant:u,emailLinkQuestion:G??void 0,autoSubmitEmailLinkQuestion:V,onEmailLinkQuestionProcessed:H,onMenuClick:R(m)?C.open:void 0,isFileUploadEnabled:a}),S.jsx(Ue,{anchor:"right",open:f,transitionDuration:250,PaperProps:{component:Ge,style:{width:`${me}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>p(!1),children:S.jsx(qe,{onClick:l=>l.stopPropagation(),children:S.jsx(fe,{isTOSAccepted:I,acceptMasterTOSState:e.masterTOSAcceptanceState,customPageTitle:g,onCloseClick:()=>p(!1),onCompleteClick:()=>{I||u.userRoleId==null||n(ve(u.userRoleId)),p(!1)}})})})]})},qe=x(Re)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Ne=x.div`
6
- height: 100vh;
7
- width: 100%;
8
- `,Ge=x(Be)`
9
- box-shadow: ${({theme:a})=>a.colors.elevation2};
10
- color: ${({theme:a})=>a.colors.grey4};
11
- `;export{rt as default};
@@ -1 +0,0 @@
1
- import{j as l}from"./liveblocks-BCZSgQbG.js";import{a as f}from"./sentry-CGkVgbup.js";import{j as B,u as U,h as T,g as v,N as L,k as j,l as O,n as $,o as h}from"./core-C_NeXleM.js";import{eL as N,LT as A,Lz as b,wM as w,wG as F,wK as I,wz as z,LB as W,wC as q,wO as G,wN as E}from"./zeni-epic-state-Dp14ovRw.js";import{m as P,z as k,B as V,a1 as K,bu as M,aa as _,bv as H}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.js";import Q from"./NotFoundScreen-0ajohMSv.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]="b2ac5595-dd75-41ef-92ad-9be7d3fe5495",e._sentryDebugIdIdentifier="sentry-dbid-b2ac5595-dd75-41ef-92ad-9be7d3fe5495")}catch{}})();const R="bill-approval-rule-update",X=j(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(R)&&e(W(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(z(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(K(M)),Y=()=>{const e=B(),o=U(),t=T(),[p,a]=f.useState(!1),[u,s]=f.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>N(i)),r=v(i=>A(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(f.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),f.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(F(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");f.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(I())),e("./new"))},[u,r,t]);const y={events:c.companyId!=null?[`private-${c.companyId}.${R}`]:[],eventCallback:(i,x,m)=>{i.endsWith(R)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(L,{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(X,{currentTenant:c,location:o,navigate:e,...y})},Z=j(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(y=>{const i=y.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),x=y.actors.selectedNonUsers.map(S=>{const C=!!J(S.value);return{type:C?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!C}}),m=i.concat(x);g.push({action:y.stepType.selectedOption,actors:m,operator:m.length>1?y.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(E(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(E(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(G())},onSaveRuleSuccess:()=>{t("../")}}})(H);function D(){const e=B(),o=T(),t=U(),{approvalRuleId:p}=O(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>A(r)),[n,c]=f.useState(!1);if(f.useEffect(()=>{n||(c(!0),o(q(!0)))}),f.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($,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),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(Q,{})})]})}export{se as B};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-BCZSgQbG.js";import{a as g}from"./sentry-CGkVgbup.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-C_NeXleM.js";import{z as C,aZ as F,q as L,c as P,e as V,aa as b,a_ as j,ao as A,ap as B,k as U}from"./index-BaZ8-9eR.js";import{eL as D,fB as _,rd as M,fw as G,b$ as R,L4 as z,bm as Y,pl as Z,p9 as $,jG as q,la as S,L5 as H,bB as J,cr as N,li as K,ll as Q}from"./zeni-epic-state-Dp14ovRw.js";import"./mui-CgjVMn8C.js";import{c as W}from"./routePaths-CXa3WNDm.js";import{M as X}from"./MobileAppDrawer-CowqUthz.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="7690aa0b-2bc4-499b-86c4-9d8a39246444",t._sentryDebugIdIdentifier="sentry-dbid-7690aa0b-2bc4-499b-86c4-9d8a39246444")}catch{}})();const ee=E(function(t){const n=G(t),i=C.getSignedInUser(),l=D(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(t.companyConfigState),a=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:n.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:n,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(t,n){const{companyId:i,currentTenant:l,navigate:c,location:p}=n,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const a=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.subIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:B(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{t(H(e))},onCompanyOfficerUpdated:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{t(q({files:e}))},onDeleteFile:e=>{t($(e))},onEditFileName:(e,a)=>{t(Z(e,a.split(".")[0]))}}})(j);function de(){const t=w(),n=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),n(_(d)))},[c,a,d,n]),g.useEffect(()=>{o==="Not-Started"&&n(M())},[o,n]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(L,{analytics:P,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,11 +0,0 @@
1
- import{j as I}from"./liveblocks-BCZSgQbG.js";import{a}from"./sentry-CGkVgbup.js";import{h as x,g as f,N as S}from"./core-C_NeXleM.js";import{HT as T,eL as y,fi as N,m1 as D,fI as E,fh as v,eM as w,H$ as O}from"./zeni-epic-state-Dp14ovRw.js";import{u as A,z as m,L as C,O as L,o as U}from"./index-BaZ8-9eR.js";import{n as _}from"./mui-CgjVMn8C.js";import{t as j}from"./getLocaleForTenant-Ab1B3PjW.js";import{Q as F}from"./QBOConnectionScreen-C_qIc23z.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./empty-CDZc49VR.js";import"./pdf-lib-DznUmqID.js";import"./index-Y_8J-EV-.js";import"./url-ax2xfQkc.js";import"./index-DEiuB93P.js";import"./decodeURIComponentSafe-Drd7YS9D.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]="101c5b44-450f-421f-a037-fa1c15bc987a",t._sentryDebugIdIdentifier="sentry-dbid-101c5b44-450f-421f-a037-fa1c15bc987a")}catch{}})();const H=_.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 ${U.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function se(){const t=x(),{setLoading:s,clearAllLoading:g}=A(),u=a.useRef(!1),c=a.useRef(!1),p=f(i=>T(i)),e=f(i=>y(i)),n=f(i=>i.tenantState.fetchState),r=f(i=>i.tenantState.activeTenantFetchState.fetchState),o=m.getSignedInUser(),d=m.getActiveTenantForUser()?.tenantId,l=e?.externalConnections?.fetchState,h=e?.externalConnections?.saveConnectionState,b=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{s(C.CONNECTION_AUTH)},[s]),a.useEffect(()=>{u.current||o==null||d==null||(u.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(s(C.TENANT_FETCHING),t(N(o.userId,d))))},[u,n,s]),a.useEffect(()=>{e.tenantId==null&&!c.current&&o!=null&&(c.current=!0,!(d==null||d!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(D(o.userId)))},[c,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||h!=="Error"||(s(C.CONNECTION_AUTH),t(E(o.userId,e.tenantId)))},[h]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(v(e.tenantId)),m.saveActiveTenantDomainForUser(e.tenantEmailDomain),w(o?.userId,o?.zeniSessionId,e.tenantId),L.updateAppLocaleID(j(O(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||o==null||e==null||t(E(o.userId,e.tenantId)))},[n,r,l]),a.useEffect(()=>{p.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&m.saveSignedInUserTenants(p.tenantsCoreDetailsInOrder)},[p.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||g()},[n,r,l]),e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed"?null:b===!1?I.jsx(H,{children:I.jsx(F,{})}):I.jsx(S,{to:"/",replace:!0})}export{se as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BCZSgQbG.js";import{z as m}from"./index-BaZ8-9eR.js";import{g as n}from"./QBOConnectionScreen-C_qIc23z.js";import"./sentry-CGkVgbup.js";import{u as p,N as a}from"./core-C_NeXleM.js";import"./zeni-epic-state-Dp14ovRw.js";import"./recharts-NCr2Pwd1.js";import"./mui-CgjVMn8C.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./empty-CDZc49VR.js";import"./pdf-lib-DznUmqID.js";import"./index-Y_8J-EV-.js";import"./url-ax2xfQkc.js";import"./index-DEiuB93P.js";import"./decodeURIComponentSafe-Drd7YS9D.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]="34360189-ad08-40f6-93e1-76035a2c6a6d",t._sentryDebugIdIdentifier="sentry-dbid-34360189-ad08-40f6-93e1-76035a2c6a6d")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-BCZSgQbG.js";import{K as l,w as c,m as f}from"./index-BaZ8-9eR.js";import{D as p}from"./mui-CgjVMn8C.js";import"./sentry-CGkVgbup.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]="e370889e-0185-4653-8e47-37d5e1c510f1",e._sentryDebugIdIdentifier="sentry-dbid-e370889e-0185-4653-8e47-37d5e1c510f1")}catch{}})();const u={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=l(),a=o?.valuePx(n)??u.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BCZSgQbG.js";import{a as d}from"./sentry-CGkVgbup.js";import{j as A,h as B,u as F,l as q,g as c,N,k as J,n as M,o as W}from"./core-C_NeXleM.js";import{K0 as _,eL as O,Jp as K,k6 as R,Gb as I,K5 as V,IU as Y,j6 as $,Gc as S,Ju as z,Jv as L,IW as U,IV as H}from"./zeni-epic-state-Dp14ovRw.js";import{aM as Q,c as X,p as Z,k as tt}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{d as k}from"./decodeURIComponentSafe-Drd7YS9D.js";import{w as et}from"./withTransactionSidePanel-CB8Jp1hw.js";import{e as at,b as nt}from"./routePaths-CXa3WNDm.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import"./TransactionDetailScreen-DXlYmq7Y.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]="052b78c0-70a0-4739-9351-b9c310dfa562",a._sentryDebugIdIdentifier="sentry-dbid-052b78c0-70a0-4739-9351-b9c310dfa562")}catch{}})();const ot=J(function(a,t){const e=t.entity,o=V(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(U({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(H("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(z()),a(L()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=F(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=q(),r=k(j??""),p=k(x??""),u=rt(r,p),G=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=c(n=>O(n).company?.companyInfo.firstMonthOfFY??1),f=c(n=>K(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(R(i)))},[m,u,i]);const E=c(n=>n.trendState.fetchState),P=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&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:b(G.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(M,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BCZSgQbG.js";import{a as r}from"./sentry-CGkVgbup.js";import{U as d,X as l,Y as p,p as f}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import m from"./NotFoundScreen-0ajohMSv.js";import{j as u,u as b}from"./core-C_NeXleM.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]="38e608e5-de50-4e69-af6e-acb144ce9161",e._sentryDebugIdIdentifier="sentry-dbid-38e608e5-de50-4e69-af6e-acb144ce9161")}catch{}})();const D=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=d(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
@@ -1,72 +0,0 @@
1
- import{j as a}from"./liveblocks-BCZSgQbG.js";import{l as w,k as x,j,u as y,h as Y,q as ee,g as A,N as ae,n as te,o as p}from"./core-C_NeXleM.js";import{I9 as S,Ia as k,Ib as N,yv as $,yh as L,Ic as C,Id as ne,Ie as oe,yl as ie,eM as I,ys as se,yp as le}from"./zeni-epic-state-Dp14ovRw.js";import{K as g,o as d,F as de,c as v,h as E,j as re,p as ce,N as me,k as F,Z as pe,i as ue,H as he,n as xe,m as ge,B as be,q as fe,$ as we,r as ye,s as Se,w as ke,x as ve}from"./index-BaZ8-9eR.js";import{n as c}from"./mui-CgjVMn8C.js";import b from"./NotFoundScreen-0ajohMSv.js";import{a as P}from"./sentry-CGkVgbup.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.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]="0b8bab91-7ae0-463a-99bd-c3bb8dd64f26",e._sentryDebugIdIdentifier="sentry-dbid-0b8bab91-7ae0-463a-99bd-c3bb8dd64f26")}catch{}})();const Ie=c.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 ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,je=x(function(e){const t=S(e),n=k(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(L(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(N({data:l}))}}})(de);function z(){const e=g(),{vendorId:t,billId:n}=w();return t==null||n==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(je,{vendorId:t,billId:n})})})}const $e=c.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 ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,Ce=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ae(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(re);function Be({isSubPage:e}){const t=j(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx($e,{windowSize:o,children:a.jsx(Ce,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const De=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Ae=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}),Pe=c.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 ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,ze=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(L(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(N({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),r=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}})(me);function Ne(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=w();return o==null||i==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Pe,{windowSize:n,children:a.jsx(ze,{location:t,navigate:e,vendorId:o,billId:i})})})}const Le=c.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 ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Ee=x(function(e){const t=S(e),n=k(e),o=C(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:r}=s;e(oe({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),r=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}})(he);function Fe(){const e=j(),t=y(),n=g(),{vendorId:o,billId:i}=w(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(b,{}):a.jsx(Le,{windowSize:n,children:a.jsx(Ee,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Te={containerWidth:new ke(100,58)},Ge=c(ye)`
38
- width: ${d.sp4};
39
- height: ${d.sp4};
40
- margin-bottom: ${d.sp3};
41
- margin-top: ${d.sp3};
42
- margin-left: ${d.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,He=c.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,Me=c.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Te.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
61
- `,Ke=c.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.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
- `,Ve=x(function(e,t){return{file:t.file,type:t.type}})(Se);function h({appContent:e}){const t=Y(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=w(),[s]=ee(),r=s.get("token"),T=n.pathname.includes("address"),f=g(),G=xe(),B=ge(),H=()=>{G.toggle()},M=A(u=>S(u)),K=A(u=>k(u)),{authParams:V,fetchState:m,billAttachment:W,billFetchState:D,companyName:_,currencySymbol:U,amount:q}=M,{tenantId:O,userId:Z,sessionId:J}=V,{fetchState:Q,internationalBankAccountCreateStatus:R}=K;return P.useEffect(()=>{I(),m==="Not-Started"&&i!=null&&o!=null&&r!=null&&t(se(i,o,r))},[]),P.useEffect(()=>{m==="Completed"&&(I(Z,J,O),l!=null&&t(le(l)))},[m]),m==="Error"?a.jsx(b,{}):Q==="Completed"||R.fetchState==="Completed"?(I(),a.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):m==="In-Progress"?a.jsx(be,{fetchState:m,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[m==="Completed"&&D==="Completed"&&a.jsx(fe,{analytics:v,onLoad:u=>(X=>X.trackBillPayMagicLinkPageLoad(o??"",i??"",_,l??"",We(n.pathname),U,q))(u)}),a.jsxs(He,{windowSize:f,children:[f!=="small"?a.jsx(Ge,{onClick:H}):null,a.jsx(Ke,{windowSize:f,isAddressPage:T,children:D==="In-Progress"?a.jsx(we,{size:"ExtraLarge",start:!0}):a.jsx(Ve,{file:W,type:"bill"})}),a.jsx(Me,{windowSize:f,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function _e(){return a.jsx(ve,{})}function la(){return a.jsxs(te,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(_e,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(z,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ne,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Fe,{})})}),a.jsx(p,{path:"*",element:a.jsx(b,{})})]})}export{la as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-BCZSgQbG.js";import{a as f}from"./sentry-CGkVgbup.js";import{h as U,u as _,j as w,q as M,g as l,N as T}from"./core-C_NeXleM.js";import{z as r,m as V,O as P,d as A,c as N,e as H,T as R,$ as W,g as $}from"./index-BaZ8-9eR.js";import{eL as q,HV as B,I4 as G,HW as J,eM as K,fh as Q,I0 as X,fE as Y,cR as Z,I5 as ee,I6 as te}from"./zeni-epic-state-Dp14ovRw.js";import{n as ne}from"./mui-CgjVMn8C.js";import{u as se}from"./useDeviceId-DxDe1m2N.js";import{f as ae}from"./analyticsHelper-CSpNHX-t.js";import{t as ie}from"./getLocaleForTenant-Ab1B3PjW.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.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]="c6bd8a29-742d-4fe8-9cf0-b59fe886d0b5",t._sentryDebugIdIdentifier="sentry-dbid-c6bd8a29-742d-4fe8-9cf0-b59fe886d0b5")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=U(),a=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>q(e)),b=l(e=>B(e)),E=r.getSignedInUser(),v=V().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),f.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=$();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(H.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,y,s,o,b,v,a.state,t]);const O=f.useCallback(()=>{m("/signin/auth")},[m]),j=f.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=f.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(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:O});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!C(n,p)||g==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{Ce as default};
@@ -1 +0,0 @@
1
- import{j as U}from"./liveblocks-BCZSgQbG.js";import{a as c}from"./sentry-CGkVgbup.js";import{h as pe,g as a,l as We,u as Ke,j as qe,i as x}from"./core-C_NeXleM.js";import{eL as he,eT as Je,eU as Se,eN as Qe,bm as Xe,f2 as ea,eV as aa,eW as ta,eY as na,f0 as sa,fa as oa,f1 as g,f4 as ia,f5 as ue,f8 as ra,f6 as da,f7 as la,f9 as ca,cF as ua,fc as fa,cL as ma,bu as ba,eK as pa,fh as ha,fi as Sa,fg as ga}from"./zeni-epic-state-Dp14ovRw.js";import{a1 as Ea,a2 as ka,n as Ca,Z as ya,z as k,a3 as Ia,u as Ta,i as r,a4 as wa,a5 as Fa,S as Aa,a as _a,a6 as Da,U as va,a7 as $a,a8 as Ba,a9 as fe,aa as me,L as Pa,ab as Ra,ac as be,c as M,k as F,ad as N,ae as xa}from"./index-BaZ8-9eR.js";import{D as Ma}from"./mui-CgjVMn8C.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]="f6352ff3-5a3e-4527-9f3c-244fd03093ba",f._sentryDebugIdIdentifier="sentry-dbid-f6352ff3-5a3e-4527-9f3c-244fd03093ba")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),n=Ke(),C=Ca(),o=qe(),V=Qe(),m=pe(),{useFeatureGate:i}=ya(),G=k.getSignedInUser(),A=Xe(G),s=a(e=>he(e)),L=a(e=>ea(e)),j=L.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,O]=c.useState(void 0),D=x("/:tenantEmailDomain/dashboard")!==null,z=x("/:tenantEmailDomain/reports")!==null,I=x("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,Z),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),H=a(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=a(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=a(e=>e.tenantState),ye=a(e=>$.fetchState==="Completed"?sa(e):[]),E=a(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:K}=i(r.isExpenseAutomationEnabledV2),q=K||W&&A,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=A||!A&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Pe=a(e=>g(e).totalUnreadCount),Re=a(e=>g(e).reducedFetchCountState),J=a(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=a(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),xe=a(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=a(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Me}=Fa();c.useEffect(()=>{const e=setTimeout(()=>Me?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;O(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else O(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&xe.fetchState==="Not-Started"&&V.tenantId!=null&&m(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:Re,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=a(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Ue=Aa(),oe=a(e=>da(e,S,h,K,W,w).fetchState),ie=a(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Ge=c.useMemo(()=>ca(s.userRole),[s.userRole]),Le=ua(Ge),je=s?.rewardsLastViewedTime==null,Oe=h?.userEmail!=null&&H.fetchState==="Completed"&&fa(H.notificationSettings,h.userEmail,Z,s),re=_a(),ze=re&&Da(n),de=ma(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&va(n.pathname)!=="treasury",[w,de,le,n.pathname,t]),[Ye,ce]=c.useState(P);c.useEffect(()=>{ce(P())},[P]);const Ze=a(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=$a(Ze);return U.jsx(Ma,{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:U.jsx(Ba,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:me(n),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:Y,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:He,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:Oe,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:q&&ba(s.userRole)===!1,selectedMenu:fe(n),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:je,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&Q>0?"notifications/comments":"notifications/tasks";me(n)&&(e=J===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=F(n.state?.pathnameStackToGoBack,n.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=F(n.state?.pathnameStackToGoBack,n.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=F(n.state?.pathnameStackToGoBack,n.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=F(n.state?.pathnameStackToGoBack,n.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&M.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const R=xa(e.type);be(e.type)?(j!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${R}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{ge(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(n);let b=`/${encodeURIComponent(u)}/`;const R=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ra(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":R?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;M.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`)},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Fe,christmasAnimationEnabled:Ae,newYearAnimationEnabled:_e})})}),za=f=>{const d=pe(),t=a(C=>he(C)),n={events:t.userRoleId!=null?[`private-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...f,...n})};export{za as M};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-BCZSgQbG.js";import{j as e,k as i}from"./core-C_NeXleM.js";import{R as n}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import"./sentry-CGkVgbup.js";import"./zeni-epic-state-Dp14ovRw.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.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]="b6d02d00-6f13-4ce0-b317-0d40d9650c87",o._sentryDebugIdIdentifier="sentry-dbid-b6d02d00-6f13-4ce0-b317-0d40d9650c87")}catch{}})();const d=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=e();return r.jsx(d,{navigate:o})}export{h as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-BCZSgQbG.js";import{j as Z,h as J,u as K,l as X,g as d,k as H,n as ee,o as C}from"./core-C_NeXleM.js";import{eL as M,pX as v,pv as ae,II as $,pq as A,bu as te,bm as se,bQ as oe,pr as re,IJ as ne,It as S,dF as ie,td as ce,IK as le,tA as de,eS as me,eQ as fe}from"./zeni-epic-state-Dp14ovRw.js";import{D as pe,z as ue,E as he,S as Fe,Z as w,i as q,q as ge,c as B,aj as Ie,k as be}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import Ce from"./NotFoundScreen-0ajohMSv.js";import{F as Se}from"./FeaturePreviewScreen-ArEP4se9.js";import{a as h}from"./sentry-CGkVgbup.js";import{u as Ae}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as Te}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{u as ye}from"./useInitialThreadRequest-B7p2SBgg.js";import{t as ke}from"./routePaths-CXa3WNDm.js";import{M as De}from"./MobileAppDrawer-CowqUthz.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="a8ed8dea-ce3b-450d-8305-a87705cfb3bf",s._sentryDebugIdIdentifier="sentry-dbid-a8ed8dea-ce3b-450d-8305-a87705cfb3bf")}catch{}})();const T=(s,a,e,o)=>{if(s!=a){const r=o||"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},xe=H(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(A(e)),T(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const F=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=ke(a.tenantEmailDomain,e.accountId,e.accountType,F,r,i),p=be(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(S({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(S({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(Ie);function U(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=Z(),o=J(),r=K(),{forecastId:i,tenantEmailDomain:F}=X(),[f,p]=h.useState(!1),[g,y]=h.useState(!1),u=ue.getSignedInUser(),k=d(t=>M(t)),G=k.company?.companyInfo.firstMonthOfFY??1,c=d(t=>v(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),D=d(t=>t.profitAndLossState),x=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>D.pandLByForecastID[t]!=null&&re(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=he();Te({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:_}=Ae({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&I)p(!0),l||o(ae());else if(l&&!g){y(!0);const t=((m,P,R)=>P!=null?m.forecasts.findIndex(b=>b.id===P):R!=null?m.forecasts.findIndex(b=>b.id===R):m.forecasts.length>0?0:-1)(c,i,x?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(o($(c.forecasts[t].id,t)),T(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&T(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&I&&o(A(c.forecasts[t].id))}},[f,p,o,l,c,g,y,v,A,I]);const E=Fe(),W=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:Y}=w(),{isFeatureEnabled:L}=Y(q.isReportsCommentingEnabled),V=ye(L?k?.companyId:void 0,{clearParams:l&&g}),[z,Q]=h.useState(!1),O=t=>{Q(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:B,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(De,{isAppContentDrawerOpen:z,handleDrawerToggle:O}),n.jsx(xe,{firstMonthOfFY:G,tenantEmailDomain:F,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:N,onAskAiCfoClick:_,isReportsCommentingEnabled:L,isZeniUser:se(u),initialOpenThreadRequest:V,onClickMenuIcon:()=>{O(!0)}})]})}function Je(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(q.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Je as PandLWithForecastRoutes,Je as default};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-BCZSgQbG.js";import _ from"./NotFoundScreen-0ajohMSv.js";import{a as r}from"./sentry-CGkVgbup.js";import{j as v,u as M,g as u,l as U,h as P,N as z,k as V,n as B,o as h}from"./core-C_NeXleM.js";import{eL as F,Oi as b,bn as L,bm as N,gO as H,gw as $}from"./zeni-epic-state-Dp14ovRw.js";import{n as q,z as I,D as G,cp as J}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{u as K}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{M as W}from"./MobileAppDrawer-CowqUthz.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.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]="67a31a73-2ef1-4d87-94cc-e8038d24c8d1",e._sentryDebugIdIdentifier="sentry-dbid-67a31a73-2ef1-4d87-94cc-e8038d24c8d1")}catch{}})();const X=V(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)}}})(J),Y=()=>{const e=v(),t=M(),c=q(),o=u(s=>F(s)),{aggregatedReportViewState:n}=u(s=>b(s)),{tenantEmailDomain:m}=U(),p=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,w]=r.useState(!1),S=L(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,D=N(l),A=S||k||D,d=r.useCallback((s,i,O)=>{p(H({fromMonth:s,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const x=r.useCallback((s,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(s,i,!0),f.current=!0},[n?.fetchState,d]),y=r.useCallback((s,i)=>{d(s,i,!1)},[d]),g=s=>{w(s)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=G(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=K({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),A?a.jsxs(a.Fragment,{children:[a.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:g}),a.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:x,onTimeRangeSelect:y,handleDrawerToggle:g,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):a.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return a.jsxs(B,{children:[a.jsx(h,{path:"*",element:a.jsx(Y,{})}),a.jsx(h,{path:"*",element:a.jsx(_,{})})]})}export{Ie as default};
@@ -1,5 +0,0 @@
1
- import{j as t}from"./liveblocks-BCZSgQbG.js";import{a as o}from"./sentry-CGkVgbup.js";import{g as f,j as F,h as H,u as W,k as N}from"./core-C_NeXleM.js";import{m as $,K as M,z as R,a$ as U,w as q,E as z,D as Y,q as G,c as l,e as J,a1 as K,b0 as Q}from"./index-BaZ8-9eR.js";import{eW as X,eL as Z,L6 as I,L7 as ee,t3 as ae,sV as g,eY as re,bL as ne,s_ as se,L8 as te}from"./zeni-epic-state-Dp14ovRw.js";import{D as oe,e as ie,n as le,S as ce}from"./mui-CgjVMn8C.js";import{u as de}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{M as ue}from"./MobileAppDrawer-CowqUthz.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]="c52d9c23-fd86-4ba2-9395-a2201488f4c1",e._sentryDebugIdIdentifier="sentry-dbid-c52d9c23-fd86-4ba2-9395-a2201488f4c1")}catch{}})();const pe={overlayWidth:new q(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=$(),n=M();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>X(c));return t.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:t.jsx(ie,{in:e,direction:"left",children:t.jsx(ge,{onClick:c=>c.stopPropagation(),children:t.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(ce)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,P="refer-and-earn-status-update",ke=N(function(e){const a=I(e),r=e.referralViewState.rewardsPlanFetchState,n=ne([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(te({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(se(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(K(Q));function Pe({isReferralDrawerOpen:e}){const a=F(),r=H(),n=W(),[i,u]=o.useState(!1),[c,D]=o.useState(!1),[x,E]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),h=f(s=>Z(s)),m=f(s=>I(s)),v=m.fetchState,w=f(s=>s.referralViewState.rewardsPlanFetchState),y=ee([m,w]),{areTenantIdsInSync:d}=z();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&x===!1&&(r(ae()),E(!0))},[]),o.useEffect(()=>{!i&&v==="Not-Started"&&d&&(u(!0),r(g(!0)))},[v,r,d]),o.useEffect(()=>{!c&&w.fetchState==="Not-Started"&&d&&(D(!0),r(re(!0)))},[w,r,d]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[A,j]=o.useState(!1),S=s=>{j(s)},{isAiCfoOpen:L,setIsAiCfoOpen:O}=Y(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:V}=de({isAiCfoOpen:L,setIsAiCfoOpen:O,mobileExploreReferrer:"Rewards"});fe({isDataReady:y===!0});const B={events:p?.userId!=null?[`private-${p.userId}.${P}`]:[],eventCallback:(s,b,_)=>{_.onEventReceived(s)}};return t.jsxs(t.Fragment,{children:[y===!0?t.jsx(G,{analytics:l,onLoad:s=>(b=>{p!=null&&b.trackPageLoaded(J.Event.rewardsPageViewed)})(s)}):null,t.jsx(ue,{isAppContentDrawerOpen:A,handleDrawerToggle:S}),k===!0?t.jsx(we,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,t.jsx(ke,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{S(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:V,...B})]})}export{Pe as R};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-BCZSgQbG.js";import x from"./NotFoundScreen-0ajohMSv.js";import{a as p}from"./sentry-CGkVgbup.js";import{j as I,u as C,h as A,g as u,N as E,k,n as D,o as c}from"./core-C_NeXleM.js";import{eL as B,M0 as S,Mg as b,C0 as T,B9 as V,B$ as m,BS as U,Mv as _}from"./zeni-epic-state-Dp14ovRw.js";import{m as $,z as M,B as N,a1 as O,bF as W,aa as z}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.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]="24375af8-cd2e-4c45-8ed2-9f958a017331",e._sentryDebugIdIdentifier="sentry-dbid-24375af8-cd2e-4c45-8ed2-9f958a017331")}catch{}})();const d="reimbursement-approval-rule-update",F=k(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:b(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(U(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),L=()=>{const e=I(),r=C(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),v=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>B(s)),w=$(),i=u(s=>S(s)),g=u(s=>b(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&a(T())},[g]),p.useEffect(()=>{l||v!=="Not-Started"||(n(!0),a(V(!0)))},[l,v,a]),M.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-${o.companyId}.${d}`]:[],eventCallback:(s,P,R)=>{s.endsWith(d)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(L,{})}),t.jsx(c,{path:"/new",element:t.jsx(h,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
@@ -1,68 +0,0 @@
1
- import{j as s}from"./liveblocks-BCZSgQbG.js";import{j as K,h as le,u as V,l as Y,g as w,N as O,k as J,i as ut,n as pt,o as B}from"./core-C_NeXleM.js";import{eL as W,Mw as me,b$ as ce,B4 as xe,jh as bt,Bh as ae,Bg as se,Mx as gt,bm as de,fF as Te,My as ht,IU as ft,j6 as De,IV as Se,IW as St,h$ as It,LO as yt,ie as Rt,AU as At,rO as vt,i6 as Ct,BE as je,Mz as Fe,MA as kt,MB as Et,MC as Bt,MD as wt,ME as xt,Bo as Ie,il as Tt,LX as Dt,Bi as jt,B2 as Ft,MF as Mt,B1 as Ut,MG as Lt,Ba as ye,Bs as Pt,Br as $t,Bn as Ot,MH as Me,Gf as _t,bn as Nt,Bd as zt,BW as Gt,MI as Ht,MJ as Zt,BA as Vt,Bx as Re,Lh as Wt,A$ as Kt,MK as Ue,Cj as Ae,Cr as Jt,ML as qt,MM as H,MN as Xt,MO as Le,MP as Qt,MQ as Pe,MR as $e,BM as ie,bs as Yt,bD as ue,cy as pe,eS as Oe,eQ as _e,MS as en,gw as tn,Lu as nn,MT as an,MU as Ne,Ly as sn,Mg as on,MV as rn,Mv as ln,Co as ve,Cn as mn,MW as cn,MX as dn,MY as un,MZ as pn,M_ as bn,M1 as gn,Ce as hn,Ci as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,HX as vn,cJ as Cn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-Dp14ovRw.js";import{n as ze,K as Ge,Z as ee,i as v,z as P,bG as He,q as te,c as C,aC as Ce,o as M,ao as Q,y as wn,O as Ze,bH as xn,k as Z,D as Ve,bI as Tn,S as ne,bJ as Dn,E as jn,w as Fn,B as be,e as We,a1 as Mn,b7 as Un,M as Ln,m as Ke,bK as Pn,a4 as $n}from"./index-BaZ8-9eR.js";import{n as _,S as On}from"./mui-CgjVMn8C.js";import oe from"./NotFoundScreen-0ajohMSv.js";import{S as ke}from"./SetupPagesScreen-vY1ujDKJ.js";import{F as Je}from"./FeaturePreviewScreen-ArEP4se9.js";import{a as g}from"./sentry-CGkVgbup.js";import{u as qe}from"./useInitialThreadRequest-B7p2SBgg.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{D as _n}from"./DrawerScreen-CN6TBpYY.js";import{M as Ye}from"./MobileAppDrawer-CowqUthz.js";import{R as Nn}from"./ReimbursementApprovalRoutes-ogcfMEcC.js";import{FallBackRoute as zn}from"./ScreenRoutes-DRzB_14n.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./analyticsHelper-CSpNHX-t.js";import"./routePaths-CXa3WNDm.js";import"./BusinessVerificationPageScreen-D_IL11BU.js";import"./ReimbursementApprovalRuleDetailScreen-Cg7X5Fv7.js";import"./getLocaleForTenant-Ab1B3PjW.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]="3ad5671d-69e0-422c-acaa-b9bc5148febe",e._sentryDebugIdIdentifier="sentry-dbid-3ad5671d-69e0-422c-acaa-b9bc5148febe")}catch{}})();const et=e=>`/${e}/reimbursements`,Gn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Ze.getLocalizedStrings(),Hn=J(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ot(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Pt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Lt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ut(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Mt({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(jt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Dt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Ct(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=K(),t=le(),n=V(),{reimbursementId:r}=Y(),c=ze(),d=Ge(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),D=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=P.getSignedInUser(),T=w(u=>W(u)),f=w(u=>me(u,r)),j=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),$=ce(T?.userRole??[]);g.useEffect(()=>{(D&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||$&&f.billStatus==="rejected"||$===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx(O,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:C,onLoad:u=>(L=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&L.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:M.sp3,paddingBottom:"15px",paddingLeft:M.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Kn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:M.sp5,paddingRight:M.sp3,paddingBottom:M.sp5,paddingLeft:M.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:j??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
2
- display: flex;
3
- position: relative;
4
- height: 100vh;
5
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
6
- background-color: ${e=>e.theme.colors.grey4};
7
- `,Vn=_.div`
8
- position: fixed;
9
- top: 0;
10
- left: 0;
11
- right: 0;
12
- bottom: 0;
13
- background-color: ${wn.overlayBackgroundBlack};
14
- z-index: 5;
15
- `,Wn=_.div`
16
- position: absolute;
17
- top: 0;
18
- left: 0;
19
- width: 42%;
20
- height: 100%;
21
- z-index: 6;
22
- display: flex;
23
- background-color: transparent;
24
- overflow: hidden;
25
- `,Kn=_.div`
26
- position: fixed;
27
- top: 0;
28
- left: 0;
29
- right: 0;
30
- bottom: 0;
31
- z-index: 11;
32
- display: flex;
33
- flex-direction: column;
34
- overflow-y: auto;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- `,Jn=_.button`
37
- align-self: flex-end;
38
- background: none;
39
- border: none;
40
- cursor: pointer;
41
- padding: ${M.sp2} ${M.sp3};
42
- line-height: 1;
43
- color: ${e=>e.theme.colors.hero};
44
- &:hover {
45
- color: ${e=>e.theme.colors.primary};
46
- }
47
- svg {
48
- width: ${M.sp4};
49
- height: ${M.sp4};
50
- }
51
- `,qn=_.div`
52
- display: flex;
53
- flex-direction: column;
54
- width: 100%;
55
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
56
- `,Xn=J(function(e,t){const n=Me(e,t.reimbursementId),r=P.getSignedInUser(),c=de(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ht(n.remiActivities,Zt(t.currentTenant),r));const i=ce(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=et(o),i=Z(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Kt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Wt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=Z(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{C.trackReimbursementDeleteReimbursement(n),e(je(n))},cancelAndDeleteReport:a=>{a===!0?C.trackReimbursementCancelAndDeleteReimbursement(n):C.trackReimbursementCancelReimbursement(n),e(Vt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(Tn);function Qn(){const e=K(),t=le(),n=V(),r=n.hash.substring(1),c=ze(),{reimbursementId:d}=Y(),m=P.getSignedInUser(),o=w(E=>W(E)),a=w(E=>Me(E,d??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=qe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoOpen:p,setIsAiCfoOpen:I}=Ve(),{isAiCfoAccessEnabled:S,onAskAiCfoClick:x}=Xe({isAiCfoOpen:p,setIsAiCfoOpen:I,mobileExploreReferrer:"Reimbursement Details"});Qe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:R}=ee(),{isFeatureEnabled:D}=R(v.isLimitedCategoryForReimbursement),[b,k]=g.useState(!1),[y,T]=g.useState(!1),[f,j]=g.useState(!1),{isFeatureEnabled:$}=R(v.isReimbursementCommentingEnabled),{isFeatureEnabled:A}=R(v.isShowDeletedReimbursementsFeatureEnabled),F=w(E=>me(E,d??"")),u=_t(o),L=Nt(o.userRole),G=a.fetchState;if(g.useEffect(()=>{b||d==null?b==1&&G==="Error"&&e("page-not-found",{replace:!0}):(k(!0),t(zt(d,!1,A)))},[b,d,t,G]),g.useEffect(()=>{A&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&u===!1?j(!1):j(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(L||a.allApprovers.find(E=>E.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,L,o.isZeni,u,m]),g.useEffect(()=>{y||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||F.fetchState=="Completed"||F.fetchState=="In-Progress"||(T(!0),t(xe(!1,D,A,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Gt(!1,!0,!0,a.lastUpdatedByUserId)))},[y,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&F.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(O,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&F.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(He,{}):s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:C,onLoad:E=>(q=>{d!=null&&q.trackReimbursementReimbursementDetails(d)})(E)}),s.jsx(Xn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:$,isShowDeletedReimbursementEnabled:A,location:n,navigate:e,isRealTimeApprovalEnabled:f,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:S,onAskAiCfoClick:x})]})}const Yn=J(function(e,t){return{remisReviewView:Ue(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(H())},onCloseReviewItem:n=>{e(qt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Jt());break;case"approve":e(Ae("approved",r??""));break;case"reject":e(Ae("rejected",r??""))}}}})(Dn);function ea(){const e=K(),t=w(d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=w(d=>Ue(d)),r=ne(),c=r?.loggedInUserRole?.includes("admin")===!0;return g.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Yn,{navigate:e,analytics:C,isAdmin:c})}const z=sn(),tt="bulk-operation-update",re="reimbursement-approval-rule-update",{spendManagement:ta,common:Be}=Ze.getLocalizedStrings(),we=ta.reimbursement.bulkActions,na=_.div`
57
- display: flex;
58
- min-height: 100%;
59
- width: 100%;
60
- flex: 1 1 auto;
61
- flex-direction: column;
62
- align-items: center;
63
- background-color: ${e=>e.theme.colors.grey4};
64
- `,aa=J(function(e,t){const n=$e(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const c=P.getSignedInUser(),d=de(c),m=e.tenantState.currentTenantId,o=W(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(S=>S!=="deleted"));const p=n.fetchState,I=on(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(S=>S.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:C,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${Ln}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:I.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(H()),e(Le(o))},onSubtabChange:o=>{e(H()),e(Pe(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=Z(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=Z(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;C?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=Z(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(bn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(pn(o))},onFiltersChange:o=>{e(un({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&C.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&C.trackSpendManagementDownloadClick("reimbursement"),e(dn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(ie(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(cn(o))},removeAllTransactionsFromBulkActionList:()=>{e(H())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(mn(o,a??""));break;case"send_for_approval":e(ve("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(ve("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(re)&&e(ln(!1))},onEventReceived:o=>{o===tt&&e(rn())}}})(Mn(Un));function sa(){const{isAiCfoOpen:e,setIsAiCfoOpen:t}=Ve(),n=K(),r=le(),c=V(),d=c.state,m=Ge(),[o,a]=g.useState(null),i=ut("/:tenantEmailDomain/reimbursements/bulk-review")!=null;g.useEffect(()=>{if(d?.tab!=null&&d?.subTab!=null){const h=Xt(d.tab.toString());h!=null?r(Le(h)):console.log("Warning:Not a valid remiListTab");const N=Qt(d.subTab.toString());N!=null?r(Pe(N)):console.log("Warning:Not a valid remiListSubTab")}return()=>{r(H())}},[]);const{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isBillPayCommentingEnabled),{isFeatureEnabled:x}=l(v.isReimbursementCommentingEnabled),{isFeatureEnabled:R}=l(v.isReimbursementBulkActionEnabled),D=P.getSignedInUser(),b=w(h=>W(h)),[k,y]=g.useState(!1),[T,f]=g.useState(!1),j=ne(),$=j?.loggedInUserRole?.includes("admin")===!0,A=w(h=>$e(h,z,R)),{areTenantIdsInSync:F}=jn(),u=A.fetchState,{isAiCfoAccessEnabled:L,onAskAiCfoClick:G}=Xe({isAiCfoOpen:e,setIsAiCfoOpen:t,mobileExploreReferrer:"Reimbursement List"});if(Qe({isDataReady:u==="Completed"}),g.useEffect(()=>{!T&&F&&(f(!0),r(ie(z,!0,I,!1,!0)))},[T,z,r,F]),D==null)throw Error("Can't access address page without signing in...");const E=!!b?.userRole&&Yt(b),q=ue(j?.loggedInUserRoleMap),nt=pe(j?.loggedInUserRoleMap),at=!!b.userReimbursementInfo?.isReimbursementTOSAccepted,st=!!b.companyReimbursementInfo?.info?.isReimbursementEnabled,it=!!b.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,ot=w(h=>Te(h.companyState,b.companyId)),rt=ot?.company.featuresActivationInfo.connectedAccountProvider,ge=h=>{y(h)},{isFeatureEnabled:lt}=l(v.isDebitCardFeatureEnabled),mt=Oe(lt,b),ct=_e(b),{remisProcessed:X,remisProcessing:he}=w(h=>en(h));g.useEffect(()=>{X===he&&o!=null&&(r(tn({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:X>1?we.reports:we.report},{variableName:"_has_",variableValue:X>1?Be.texts.have:Be.texts.has},{variableName:"_action_",variableValue:nn(o)}]})),r(an()),setTimeout(()=>{r(ie(z,!0,I,!1,!0,!0))},3e3),a(null))},[X,he]);const dt={events:b.companyId!=null?[`private-${b.companyId}.${tt}`,`private-${b.companyId}.${re}`]:[],eventCallback:(h,N,fe)=>{h.endsWith(re)?fe.onReimbursementApprovalRulesEventReceived?.(h):N.entity_type==="reimbursement"&&(a(N.operation_type),fe.onEventReceived(h))}};return c.pathname.endsWith("/reimbursements/")||c.pathname.endsWith("/reimbursements")||c.pathname.endsWith("/reimbursements/bulk-review")?mt===!0||ct===!0?s.jsx(Je,{}):st&&(!E||q)||nt&&at?s.jsxs(s.Fragment,{children:[u==="Completed"?s.jsx(te,{analytics:C,onLoad:h=>(N=>N.trackPageLoaded(We.Event.reimbursementHome))(h)}):null,s.jsx(Ye,{isAppContentDrawerOpen:k,handleDrawerToggle:ge}),s.jsxs(na,{windowSize:m,children:[s.jsx(_n,{isOpen:i,drawerLeftMargin:new Fn(0,0,300,600),onClose:()=>{n("./"),r(H())},children:s.jsx(ra,{onClick:h=>h.stopPropagation(),children:s.jsx(ea,{})})}),s.jsx(aa,{isShowDeletedBillsEnabled:p,isShowDeletedReimbursementEnabled:I,isBillPayCommentingEnabled:S,isReimbursementCommentingEnabled:x,location:c,navigate:n,currentTenant:b,period:z,isAdmin:$,isEmployee:E,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:A.createdByUserList,createdByUserListFetchState:A.createdByUserListFetchState,isDownloadEnabled:A.isDownloadEnabled,connectedAccountProvider:rt,isBulkActionEnabled:R,bulkSubmissionLimit:A.remiBulkSubmissionLimit,bulkSubmissionFetchState:A.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:L,onAskAiCfoClick:G,...dt})]})]}):it&&q?s.jsx(O,{to:"../setup"}):j!=null&&Ne(b,j.loggedInUserRoleMap)?s.jsx(O,{to:"../promo"}):s.jsx(be,{fetchState:"In-Progress"}):s.jsx(oe,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=_(On)`
65
- display: flex;
66
- min-height: 100%;
67
- flex-direction: column;
68
- `,la=J(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:gn(e,n),analytics:C,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(fn(n))},onCreateNewRemiButtonClick:()=>{e(hn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Pn),ma=()=>{const e=K(),t=V(),{tenantEmailDomain:n}=Y(),r=Ke(),[c,d]=g.useState(!1),m=w(k=>W(k)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),p=ne(),I=ue(p?.loggedInUserRoleMap),S=pe(p?.loggedInUserRoleMap),x=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,R=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,b=k=>{d(k)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return R&&S&&x?s.jsx(O,{to:"../../../reimbursements"}):D&&I?s.jsx(O,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!D||m.userReimbursementInfo&&S&&x===!1?s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:C,onLoad:k=>(y=>y.trackPageLoaded(We.Event.reimbursementPromoPage))(k)}),s.jsx(Ye,{isAppContentDrawerOpen:c,handleDrawerToggle:b}),s.jsx(la,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{b(!0)}})]}):s.jsx(be,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function _a(){const e=w(E=>W(E)),t=ne(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ke(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ee(),{isFeatureEnabled:o}=m(v.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(v.isDebitCardFeatureEnabled),i=Oe(a,e),l=_e(e),p=e?.userRole!=null&&Sn(e?.userRole),I=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&In(t?.loggedInUserRoleMap),S=yn(t?.loggedInUserRoleMap),x=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p,R=ue(t?.loggedInUserRoleMap),D=x&&R,{isFeatureEnabled:b}=m(v.isDepositAccountsFeatureEnabled),k=b&&!p&&Rn(t?.loggedInUserRoleMap),y=$n(e,o,a)&&!p&&An(t?.loggedInUserRoleMap),T=vn(t?.loggedInUserRoleMap),f=Cn(t?.loggedInUserRoleMap),j=kn(t?.loggedInUserRoleMap),$=En(t?.loggedInUserRoleMap),A=Bn(t?.loggedInUserRoleMap),F=pe(t?.loggedInUserRoleMap),{tenantEmailDomain:u}=Y(),L=V(),G=n===!0&&(R||F&&d);return s.jsxs(pt,{children:[L.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(B,{path:"verification",element:s.jsx(ke,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:D,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:y,isUserHasOnlyCardAccess:T,productType:"reimbursement",type:"verification"})}),s.jsx(B,{path:"setup",element:s.jsx(ke,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:S,isReimbursementAdminLevelAccess:D,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:y,isUserHasOnlyCardAccess:T,productType:"reimbursement",type:"setup"})}),s.jsx(B,{path:"promo",element:s.jsx(ma,{})}),s.jsx(B,{path:"approval-rules/*",element:D?s.jsx(Nn,{}):s.jsx(zn,{isUserHasZeniAccountsAccess:f,isUserHasChargeCardAccess:$,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:F,isUserHasTreasuryAccess:j,isTenantBankingOnly:i,tenantEmailDomain:u??""})}),G&&s.jsx(B,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(B,{path:"/*",element:s.jsx(Je,{})}),t!=null&&Ne(e,t?.loggedInUserRoleMap)&&s.jsx(B,{path:"*",element:s.jsx(O,{to:"../promo"})}),c&&R&&s.jsx(B,{path:"*",element:s.jsx(O,{to:"../setup"})})]}):L.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(B,{path:"new",element:s.jsx(Ee,{})}),s.jsx(B,{path:":reimbursementId",element:s.jsx(Qn,{})}),s.jsx(B,{path:":reimbursementId/edit",element:s.jsx(Ee,{})}),s.jsx(B,{path:"*",element:s.jsx(oe,{})})]}):s.jsx(B,{path:"*",element:s.jsx(be,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${M.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(B,{path:"*",element:s.jsx(oe,{})})]})}export{_a as default};
@@ -1 +0,0 @@
1
- import{j as d}from"./liveblocks-BCZSgQbG.js";import{u as V,j as me,h as fe,l as ue,g as f,k as _e,n as he,o as z}from"./core-C_NeXleM.js";import{eL as M,f7 as g,Ii as be,pp as F,iW as Ie,hY as ye,pu as Ce,bu as ge,Ij as Se,j6 as we,bm as Te,tI as Re,Ik as Fe,Il as Oe,sG as ke,Im as G,In as De,Io as Ae,Ip as T,Iq as O,Ir as k,Is as D,It as A,dF as Ee,to as Le,tc as Y,td as H,tu as Me,th as N,tA as Be,Iu as Pe,Iv as ve,Iw as xe,Ix as Ue,Iy as je,eS as Ve,eQ as ze}from"./zeni-epic-state-Dp14ovRw.js";import{C as Ge,D as Ye,K as He,Z as Q,i as E,z as Z,E as Ne,S as qe,a as $e,q as Qe,c as L,e as Ze,k as J,G as Je,J as Ke,M as We}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import Xe from"./NotFoundScreen-0ajohMSv.js";import{F as ea}from"./FeaturePreviewScreen-ArEP4se9.js";import{a as _}from"./sentry-CGkVgbup.js";import{u as aa,a as sa,b as ta,c as oa}from"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import{u as na}from"./useInitialThreadRequest-B7p2SBgg.js";import{t as q,a as $}from"./routePaths-CXa3WNDm.js";import{M as ra}from"./MobileAppDrawer-CowqUthz.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.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]="5dd88472-2c24-46b2-ab0d-8d94b0448c22",e._sentryDebugIdIdentifier="sentry-dbid-5dd88472-2c24-46b2-ab0d-8d94b0448c22")}catch{}})();const ia=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(A({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},la=e=>{e(ve()),e(xe()),e(Ue()),e(je())},ca=_e(function(e){const o=Z.getSignedInUser(),p=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Se(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,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:L,isZeniUser:Te(o),showAccountGroups:r===!0,isAccountingClassesEnabled:we(e),currentTenantCompanyName:a,statementEndPoint:`${We}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Pe(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Be(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(Y(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),m.length>0&&e(H(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(T(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(N({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(N(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(Me(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(Y(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(H(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Le({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4: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=Ee(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 $(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?$(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=J(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:R(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(A({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({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(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(Ae({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",R(o.selectedReportID)),e(T("profit_and_loss_by_classes"))):(o.analytics?.trackGroupBySwitch("Accounts",R(o.selectedReportID)),e(T("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(De({classesToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(ke())},onUpdateDisplayOrder:a=>{e(Oe(a))},onUpdateReportFormat:a=>{la(e),e(Fe(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(Re("profit_and_loss_by_classes"))}}})(Je);function da(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ye(),p=He(),u=Ke(p),a=me(),s=fe(),t=V(),{tenantEmailDomain:r}=ue(),{useFeatureGate:c}=Q(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=Z.getSignedInUser(),[i,y]=_.useState(!1),[B,K]=_.useState(!1),{isFeatureEnabled:P}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=f(n=>M(n)),W=v.company?.companyInfo.firstMonthOfFY??1,X=na(P?v?.companyId:void 0),C=f(n=>g(n).fetchState),ee=f(n=>be(n)),{areTenantIdsInSync:h}=Ne(),S=f(n=>n.financeStatementState.selectedReportId),ae=f(n=>g(n).isCompareModeOn),b=f(n=>g(n).filter),w=f(n=>g(n).selectedReportAndTimeframeFetchState),se=f(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(y(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!B&&C==="Completed"&&h&&(s(F(l.userId,!1,!0,!1)),K(!0))},[i,B,C,h]),_.useEffect(()=>{if(i&&w.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(S){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ce(b.timeframe));break;case"balance_sheet":s(ye(b.timeframe));break;case"cash_flow":s(Ie(b.timeframe))}},[i,S,w,h]);const x=qe(),te=x?.loggedInUserRole!=null&&ge(x?.loggedInUserRole)!==!0,[oe,ne]=_.useState(!1),U=n=>{ne(n)},re=$e(),ie=ta();return function(n){const{isDataReady:le}=n,{pathname:ce}=V(),j=Ge(ce??"")==="reports",de=aa(le),pe=_.useMemo(()=>j?ia:void 0,[j]);sa({canFetchSuggestedQuestions:de,pageContexts:pe})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(Qe,{analytics:L,onLoad:n=>n.trackPageLoaded(Ze.Event.reports)}):null,d.jsx(ra,{isAppContentDrawerOpen:oe,handleDrawerToggle:U}),d.jsx(ca,{firstMonthOfFY:W,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:se,selectedReportID:S,analytics:L,filter:b,isCompareModeOn:ae,hasTransactionAccess:te,signedInUser:l,selectedReportAndTimeframeFetchState:w,handleDrawerToggle:U,reportsResyncFetchState:ee.reportsResyncFetchState,isAiCfoAccessEnabled:ie&&re&&!e,onAskAiCfoClick:()=>{if(u){const n=J(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:P,initialOpenThreadRequest:X})]})}const R=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 La(){const e=f(s=>M(s)),{useFeatureGate:o}=Q(),{isFeatureEnabled:p}=o(E.isDebitCardFeatureEnabled),u=Ve(p,e),a=ze(e);return u===!0||a===!0?d.jsx(ea,{}):d.jsxs(he,{children:[d.jsx(z,{path:"/",element:d.jsx(da,{})}),d.jsx(z,{path:"*",element:d.jsx(Xe,{})})]})}export{La as default};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-BCZSgQbG.js";import{Z as j,z as w,aI as h,q as E,c as p,e as F,cy as L,i as P}from"./index-BaZ8-9eR.js";import"./mui-CgjVMn8C.js";import l from"./NotFoundScreen-0ajohMSv.js";import{a as u}from"./sentry-CGkVgbup.js";import{h as R,g as y,j as T,u as V,k as O,n as U,o as f}from"./core-C_NeXleM.js";import{eL as z,OR as C,LH as A,OS as k,t3 as Y,eY as q,OT as G,t1 as H}from"./zeni-epic-state-Dp14ovRw.js";import{R as x}from"./ReferralListScreen-BAK4p9-3.js";import"./recharts-NCr2Pwd1.js";import"./lottie-BdeQlKTG.js";import"./analytics-BkhHPaQ4.js";import"./plaid-B3UNGbGB.js";import"./dnd-C0SdDgY2.js";import"./stripe-DMRn4zHo.js";import"./lexical-B1vtLf4F.js";import"./pdf-CQPNphc4.js";import"./utils-CTLGOmjC.js";import"./useAskAiCfoHostNavButtonProps-Crpk73sU.js";import"./useFetchSuggestedQuestionsWhenReady-sxquM27W.js";import"./MobileAppDrawer-CowqUthz.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]="72ab78b5-1bbb-4e8c-9e9c-c1787afb42bf",e._sentryDebugIdIdentifier="sentry-dbid-72ab78b5-1bbb-4e8c-9e9c-c1787afb42bf")}catch{}})();const Z=O(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,o=w.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=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(H())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const e=R(),[t,n]=u.useState(!1),[o,s]=u.useState(!1),r=y(i=>z(i)),c=T(),S=V(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=y(i=>C(i)),_=d?.firstName!=null?d.firstName:"User",{configValue:b}=g(h.zeniCardsConfig),{configValue:v}=g(h.zeniAccountsConfig),D=A(v);u.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(Y()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(q(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:S,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:b.charge_card_cashback_rate_per_transaction!=null?b.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(P.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(f,{path:"*",element:a.jsx(l,{})})]})}export{de as default};