@zeniai/web-app-ui 5.1.84-qa → 5.1.85-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.
- package/dist/assets/AddressRoutes-DpMeCgDh.js +1 -0
- package/dist/assets/AddressScreen-jEbIVhK3.js +9 -0
- package/dist/assets/{AiCfoScreen-vm8TgXHz.js → AiCfoScreen-D2GxwJyN.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-FbpvVFpO.js → BillPayApprovalRoutes-Csh9SPnU.js} +1 -1
- package/dist/assets/{BillPayRoutes-BBunGCd_.js → BillPayRoutes-Dg9I-63-.js} +12 -12
- package/dist/assets/{BusinessVerificationPageScreen-BemUa4lP.js → BusinessVerificationPageScreen-BLuK4dS7.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-DnFZCESR.js → CardsAiCfoScreen-D8ZPE13M.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CDBIrLG_.js → ChargeCardRoutes-CyGButQm.js} +11 -11
- package/dist/assets/{CompanyPassportScreen-DOwRqzCZ.js → CompanyPassportScreen--SPdIRlf.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-eSgLC-0p.js → ConnectionAuthScreen-C8nHjroP.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-C6uz2GLr.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-Dk5stUMd.js +30 -0
- package/dist/assets/{DashboardRoutes-CMiZYJvT.js → DashboardRoutes-B2SXqHam.js} +3 -3
- package/dist/assets/{DefaultTenantHome-CN_7Hj_x.js → DefaultTenantHome-DDzJzPvG.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-DDaUfwcf.js +18 -0
- package/dist/assets/DrawerScreen-DZ4DkgHO.js +1 -0
- package/dist/assets/EntityDetailRoutes-CFPPv2Q-.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-ja43rssL.js → ExpenseAutomationRoutes-B0EQq9x4.js} +1 -1
- package/dist/assets/FeaturePreviewScreen-Dgm-EaRp.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-C9y2gd0x.js → HubSpotOAuthCallbackScreen-DiHy3hck.js} +1 -1
- package/dist/assets/MagicLinkRoutes-CPrGkntv.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-BHI5Ju3h.js +12 -0
- package/dist/assets/MobileAppDrawer-ChAhLGZE.js +1 -0
- package/dist/assets/NotFoundScreen-By2F-w6l.js +1 -0
- package/dist/assets/{NotificationRoutes-zN961sSS.js → NotificationRoutes-0mjOYLwF.js} +1 -1
- package/dist/assets/OAuthConsentScreen-_yz0BOYy.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CSm9JBFf.js +1 -0
- package/dist/assets/PeopleRoutes-DF4Scn5d.js +22 -0
- package/dist/assets/PerformanceRoutes-C0h70RAc.js +1 -0
- package/dist/assets/{Preview-ISngChjL.js → Preview-D29JeEmY.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-qYa7d8c5.js → QBOConnectionScreen-CwZNkZEW.js} +1 -1
- package/dist/assets/ReferralListScreen-C3Yy7aIK.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-DYomUyE_.js → ReimbursementApprovalRoutes-DAVTSD8z.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CYfGAlTN.js → ReimbursementApprovalRuleDetailScreen-CtUn349v.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Bq2oGVuB.js → ReimbursementRoutes-BYbEE0sN.js} +6 -6
- package/dist/assets/{ReportsRoutes-EvgLxoWK.js → ReportsRoutes-Cb8uSh4z.js} +1 -1
- package/dist/assets/RewardsRoutes-BqWi3Rha.js +1 -0
- package/dist/assets/ScreenRoutes-CFWhfVwu.js +2 -0
- package/dist/assets/{SettingsRoutes-Ex6tMm4V.js → SettingsRoutes-Dqo8Gg1_.js} +8 -8
- package/dist/assets/{SetupPagesScreen-arp-xD8G.js → SetupPagesScreen-Drdx2Cz2.js} +5 -5
- package/dist/assets/{SignInScreen-Cnen6_pH.js → SignInScreen-HaZFyYNm.js} +1 -1
- package/dist/assets/SignOutScreen-DGQ597Ur.js +9 -0
- package/dist/assets/{TaskListScreen-Dhy8ix5-.js → TaskListScreen-B2sNWFUZ.js} +2 -2
- package/dist/assets/TaskRoutes-DqlemW4d.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-DKxOtjev.js → TransactionDetailRoutes-BBXGE-Zw.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-_im9Z8Wp.js → TransactionDetailScreen-D7m7OZhn.js} +2 -2
- package/dist/assets/{TransactionListRoutes-B1LNvKrw.js → TransactionListRoutes-C8nLf9Ob.js} +1 -1
- package/dist/assets/{TreasuryRoutes-KyOcUpTl.js → TreasuryRoutes-CAqMFzPt.js} +6 -6
- package/dist/assets/{VendorsRoutes-DXrOiAFt.js → VendorsRoutes-kgQCFQez.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-Dj8vTbGW.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-B0cjJSze.js → ZeniAccountRoutes-B85icQ0n.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-CPK7RprH.js +9 -0
- package/dist/assets/{accountMappingHelper-D2RcsfN-.js → accountMappingHelper-B3v4RMhl.js} +1 -1
- package/dist/assets/{analytics-tFci0ZBb.js → analytics-7PXXxPIN.js} +1 -1
- package/dist/assets/{analyticsHelper-ChmdJD3i.js → analyticsHelper-Ce6ZNBVM.js} +1 -1
- package/dist/assets/{core-DeUqRkPV.js → core-BDPZcSG4.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CyCKv9fm.js → decodeURIComponentSafe-BR3AOxh5.js} +1 -1
- package/dist/assets/{dnd-D4M435ki.js → dnd-fU8QmJ8U.js} +1 -1
- package/dist/assets/{empty-BH80piSN.js → empty-CM59KsLF.js} +1 -1
- package/dist/assets/{empty-CATUDLyl.js → empty-DridEUN5.js} +1 -1
- package/dist/assets/{emptyVideoElement-D3zWnZNH.js → emptyVideoElement--ZfOaFPu.js} +1 -1
- package/dist/assets/epic-D7C6_Y7q.js +2 -0
- package/dist/assets/getLocaleForTenant-5gC9KZpR.js +1 -0
- package/dist/assets/{index-Cg4JV2tz.js → index-B1tuor_E.js} +15819 -15778
- package/dist/assets/{index-CdJHhYvK.js → index-BAkEFBVP.js} +1 -1
- package/dist/assets/{index-Cui_f-re.js → index-BEZZznbS.js} +2 -2
- package/dist/assets/{index-DQY0qMVc.js → index-BZG4Ai-c.js} +1 -1
- package/dist/assets/{index-Ba2LM3_a.js → index-CAEfbAkM.js} +1 -1
- package/dist/assets/{index-BzKh0w9C.js → index-DA1h5kq3.js} +1 -1
- package/dist/assets/{index-DMEUlT9B.js → index-DNm9oOTV.js} +1 -1
- package/dist/assets/{index-BXpflzP0.js → index-TPK5ayqQ.js} +1 -1
- package/dist/assets/{lexical-Crk5An9T.js → lexical-_D-pPLdL.js} +1 -1
- package/dist/assets/{liveblocks-BPCHZ54B.js → liveblocks-B2nLBm11.js} +1 -1
- package/dist/assets/{lottie-DQW6ZBGJ.js → lottie--jYlW6ya.js} +1 -1
- package/dist/assets/{mui-DAoDgA6_.js → mui-HaM5aBuG.js} +1 -1
- package/dist/assets/{pathToGoBack-DmHMCg55.js → pathToGoBack-Bp5QCbKd.js} +1 -1
- package/dist/assets/{pdf-BmUuf0hA.js → pdf-CbrAe2yy.js} +3 -3
- package/dist/assets/{pdf-lib-CMNFUiif.js → pdf-lib-CHfVanCJ.js} +1 -1
- package/dist/assets/{plaid-DZBIDYbN.js → plaid-DuKDxXr2.js} +1 -1
- package/dist/assets/{pusher-DD0rfcGn.js → pusher-p1571_5u.js} +1 -1
- package/dist/assets/{react-1LeuQGyO.js → react-BvU2rtwe.js} +1 -1
- package/dist/assets/{react-CtScDveW.js → react-BzGU_BeP.js} +1 -1
- package/dist/assets/{react-CnUKx70_.js → react-CXLD6oJa.js} +1 -1
- package/dist/assets/{react-RNiFReiF.js → react-D7-m9gXP.js} +1 -1
- package/dist/assets/{react-DaxHAkja.js → react-DZP7sDw7.js} +1 -1
- package/dist/assets/{react-BGma4OjX.js → react-Di2JdnAu.js} +1 -1
- package/dist/assets/{recharts-Cfsnd24w.js → recharts-srrgu-jp.js} +1 -1
- package/dist/assets/{routePaths-ZBpdAu85.js → routePaths-DbVBNvPC.js} +1 -1
- package/dist/assets/{sentry-BRxO83Sz.js → sentry-CLlo3TXi.js} +1 -1
- package/dist/assets/{url-Ddgc_6Ci.js → url-DqIeqdCZ.js} +1 -1
- package/dist/assets/{url-BNgn1u9R.js → url-ky0ROLAQ.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CBYHTRds.js → useAiCfoDashboardSuggestedQuestionsChips-Dpypv2iO.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CtdOXC4O.js +1 -0
- package/dist/assets/useCashManagementBanner-DTfbqox_.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-V_hkDTjD.js → useChargeCardPusherEvents-BSAOVtAf.js} +1 -1
- package/dist/assets/{useDeviceId-CqK68Bon.js → useDeviceId-CQ3pf2OT.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-7EeCPqR2.js +1 -0
- package/dist/assets/{useInitialThreadRequest-ezroE2PL.js → useInitialThreadRequest-DaoYHqyn.js} +1 -1
- package/dist/assets/{utils-CliqhjB9.js → utils-BPOASmy-.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C46PLUnx.js → withTransactionSidePanel-DKz4VB48.js} +3 -3
- package/dist/assets/{zeni-epic-state-RQhLkJm1.js → zeni-epic-state-pQFlpfOQ.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-Ccf9Jzub.js +0 -1
- package/dist/assets/AddressScreen-LMssN7FX.js +0 -9
- package/dist/assets/CustomerOnboardingAuthScreen-ncY-NEh-.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-B7lDaTsh.js +0 -30
- package/dist/assets/DomesticWireDetailScreen-Cv3NmzhE.js +0 -18
- package/dist/assets/DrawerScreen-BhiWQ24H.js +0 -1
- package/dist/assets/EntityDetailRoutes-ByTo3npP.js +0 -1
- package/dist/assets/FeaturePreviewScreen-C06JMkep.js +0 -1
- package/dist/assets/MagicLinkRoutes-J_peQ2Kr.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BrcIm0S_.js +0 -12
- package/dist/assets/MobileAppDrawer-Dq7Q8eux.js +0 -1
- package/dist/assets/NotFoundScreen-Pc5_gWES.js +0 -1
- package/dist/assets/OAuthConsentScreen-BcIsICN8.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CH-3rMiZ.js +0 -1
- package/dist/assets/PeopleRoutes-DoKx4_Vx.js +0 -22
- package/dist/assets/PerformanceRoutes-CY0ggQd1.js +0 -1
- package/dist/assets/ReferralListScreen-Ag_OjFfe.js +0 -5
- package/dist/assets/RewardsRoutes-ChURoNZ3.js +0 -1
- package/dist/assets/ScreenRoutes-5hQmRTrc.js +0 -2
- package/dist/assets/SignOutScreen-DL3hdB8P.js +0 -9
- package/dist/assets/TaskRoutes-Be5K8H0B.js +0 -9
- package/dist/assets/WiseConfirmationScreen-KzsdBPe6.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-z_z-XrxU.js +0 -9
- package/dist/assets/epic-PiSl2fGp.js +0 -2
- package/dist/assets/getLocaleForTenant-D1Wuxi1h.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Be_j-VoW.js +0 -1
- package/dist/assets/useCashManagementBanner-Cn0LqRpJ.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-4EEjP-eP.js +0 -1
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-
|
|
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-B1tuor_E.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-CLlo3TXi.js"><link rel="modulepreload" crossorigin href="/assets/core-BDPZcSG4.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-pQFlpfOQ.js"><link rel="modulepreload" crossorigin href="/assets/mui-HaM5aBuG.js"><link rel="modulepreload" crossorigin href="/assets/analytics-7PXXxPIN.js"><link rel="modulepreload" crossorigin href="/assets/utils-BPOASmy-.js"><link rel="stylesheet" crossorigin href="/assets/index-BUmr5maU.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.1.
|
|
3
|
+
"version": "5.1.85-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.
|
|
31
|
-
"@zeniai/client-epic-state": "5.1.
|
|
32
|
-
"@zeniai/web-components": "4.2.
|
|
30
|
+
"@zeniai/client-analytics": "2.0.28",
|
|
31
|
+
"@zeniai/client-epic-state": "5.1.21",
|
|
32
|
+
"@zeniai/web-components": "4.2.4",
|
|
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-BPCHZ54B.js";import{A as d}from"./AddressScreen-LMssN7FX.js";import i from"./NotFoundScreen-Pc5_gWES.js";import"./sentry-BRxO83Sz.js";import{o as s,p as r}from"./core-DeUqRkPV.js";import"./zeni-epic-state-RQhLkJm1.js";import"./recharts-Cfsnd24w.js";import"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.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]="cd0ff2b4-1e27-4329-addf-f475e5a9db34",t._sentryDebugIdIdentifier="sentry-dbid-cd0ff2b4-1e27-4329-addf-f475e5a9db34")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BPCHZ54B.js";import{a as h}from"./sentry-BRxO83Sz.js";import{h as P,u as _,g as M,i as j,j as E,n as B}from"./core-DeUqRkPV.js";import{Z as $,m as D,z as K,I as L,y as U,J as z,f as C,h as S,r as F,n as b,s as N}from"./index-Cg4JV2tz.js";import{MI as I,hU as R,eX as G,MJ as J,c6 as O,MK as V,ld as q}from"./zeni-epic-state-RQhLkJm1.js";import{n as H}from"./mui-DAoDgA6_.js";import X from"./NotFoundScreen-Pc5_gWES.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]="86c2c267-0feb-4e0a-ba6f-9ee2d5ede229",e._sentryDebugIdIdentifier="sentry-dbid-86c2c267-0feb-4e0a-ba6f-9ee2d5ede229")}catch{}})();const Z=H.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Q=B(function(e,t){const{addressId:o,isSubPage:i,addressType:c}=t,l=G(e),a=t.roleMap!=null&&J(t.roleMap),d=i||c==="user_address"||O(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??w();const u=d?.queryParams;if(u){const f=new URLSearchParams(u).toString();f&&(s=`${s}?${f}`)}o(s,{state:{pathnameStackToGoBack:n.newStack}})}};return{onSubmitHandler:a=>{const d=W(a);e(q({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(S.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(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=M(),{addressId:s,addressType:u}=j(),f=$(),k=D(),v=K.getSignedInUser(),[g,x]=h.useState(s==null),p=E(m=>s!=null?I(m,s).fetchState:"Not-Started"),A=L();if(v==null)throw Error("Can't access address page without signing in...");const T=m=>m.trackPageLoaded(s!=null?S.Event.editAddress:S.Event.addAddress),y=l??u;return h.useEffect(()=>{g||s==null||(x(!0),d(R(s,!1)))},[g,s,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address)$/g)?!g&&p==="Not-Started"||g&&p==="In-Progress"?r.jsx(U,{fetchState:p,style:{backgroundColor:k.colors.grey5}}):s!=null&&p==="Error"?(a(`${w(1)}/new`,{replace:!0}),r.jsx(r.Fragment,{})):r.jsxs(r.Fragment,{children:[r.jsx(z,{analytics:C,onLoad:T}),r.jsx(Z,{windowSize:f,children:r.jsx(Q,{location:n,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:t,addressId:s,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:A?.loggedInUserRoleMap})})]}):r.jsx(X,{})}const w=(e=2)=>{let t="../";for(let o=0;o<e;o++)t=`${t}../`;return t},W=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,W as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-BPCHZ54B.js";import{z as n}from"./index-Cg4JV2tz.js";import{g as d}from"./QBOConnectionScreen-qYa7d8c5.js";import"./sentry-BRxO83Sz.js";import{g as p,N as s}from"./core-DeUqRkPV.js";import"./zeni-epic-state-RQhLkJm1.js";import"./recharts-Cfsnd24w.js";import"./mui-DAoDgA6_.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.js";import"./empty-BH80piSN.js";import"./pdf-lib-CMNFUiif.js";import"./index-Ba2LM3_a.js";import"./url-Ddgc_6Ci.js";import"./index-DMEUlT9B.js";import"./decodeURIComponentSafe-CyCKv9fm.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]="817363c8-7f1d-4590-b58b-cef70b99ca15",t._sentryDebugIdIdentifier="sentry-dbid-817363c8-7f1d-4590-b58b-cef70b99ca15")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=d(t.search),m=n.getSignedInUser()?.userId??"";if(f(o,r,e,m)===!0){const a=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:a})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BPCHZ54B.js";import{t as yt,A as Ve}from"./AddressScreen-LMssN7FX.js";import ht from"./NotFoundScreen-Pc5_gWES.js";import{a as c}from"./sentry-BRxO83Sz.js";import{h as be,g as Ie,u as ne,i as ke,j as _,N as U,l as St,n as et,o as Ct,p as q}from"./core-DeUqRkPV.js";import{z as R,Q as _e,e as H,d as bt,v as Q,J as ae,f as N,h as de,ap as It,Z as kt,A as tt,I as nt,aq as Le,n as Se,ar as _t,o as Re,as as Ne,at as vt,au as Me,av as Ot,aw as Tt}from"./index-Cg4JV2tz.js";import{eX as J,fE as ve,fC as Oe,bs as Et,fS as xt,bS as wt,o7 as At,tm as Pt,tp as Dt,MS as jt,MT as Bt,k9 as Ce,kc as at,Mn as Ft,bY as Ut,c6 as le,tQ as Te,tB as Vt,MU as ue,tR as ot,Kg as Lt,ld as st,MV as Rt,MW as Nt,rj as Mt,hq as $t,Mf as ge,hn as Gt,Mg as zt,x_ as Qt,rn as Kt,hf as qt,hi as $e,MX as it,MY as Ht,E1 as Zt,MZ as Yt,E5 as Jt,ts as Wt,M_ as Xt,M$ as en,k7 as tn,ka as nn,u1 as an,tD as rt,tP as on,bE as Ge,cy as sn,u0 as ze,rC as rn,rq as cn,l5 as dn,gh as un,gg as ln,gf as pn,N0 as mn,tv as gn,u2 as fn,u5 as yn,u8 as hn,ue as Sn,cY as Cn}from"./zeni-epic-state-RQhLkJm1.js";import{n as Ee}from"./mui-DAoDgA6_.js";import{g as bn,h as In,q as oe}from"./QBOConnectionScreen-qYa7d8c5.js";import{u as kn,a as _n}from"./useEmailConnectResultRefresh-4EEjP-eP.js";import{u as vn}from"./useChargeCardPusherEvents-V_hkDTjD.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.js";import"./empty-BH80piSN.js";import"./pdf-lib-CMNFUiif.js";import"./index-Ba2LM3_a.js";import"./url-Ddgc_6Ci.js";import"./index-DMEUlT9B.js";import"./decodeURIComponentSafe-CyCKv9fm.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="134b7e44-105e-4416-9b25-0cf572031d76",t._sentryDebugIdIdentifier="sentry-dbid-134b7e44-105e-4416-9b25-0cf572031d76")}catch{}})();const On=()=>{const t=be(),u=Ie(),s=ne(),[o,l]=c.useState(!1),[r,f]=c.useState(!1),{tenantEmailDomain:C}=ke(),e=R.getSignedInUser(),{useFeatureGate:n}=_e(),{isFeatureEnabled:d}=n(H.isApAgingFeatureEnabled),{isFeatureEnabled:b}=n(H.isArAgingFeatureEnabled),{isFeatureEnabled:S}=n(H.isReferralFeatureEnabled),{isFeatureEnabled:v}=n(H.isExpenseAutomationEnabledV2),{isFeatureEnabled:i}=n(H.isDebitCardFeatureEnabled),k=bt(),y=_(h=>J(h)),m=_(h=>h.onboardingCustomerViewState.fetchState),E=y.excludedResources,x=y.companyId??R.getSignedInUserTenant(C)?.companyId;if(e==null)throw Error("Can't access onboarding flow without signing in...");const O=ve(i,y),P=Oe(y),p=[],M=E?.resources?.find(h=>h.resource==="/reports/top_expenses")==null,j=E?.resources?.find(h=>h.resource==="/reports/task_card")==null,$=y?.userRole!=null&&Et(y?.userRole),G=E?.resources?.find(h=>h.resource==="/bills")==null&&!$,w=E?.resources?.find(h=>h.resource==="/reimbursements")==null;M===!1&&p.push("top_expenses"),j===!1&&p.push("task_card"),G===!1&&p.push("bill_pay_card","bill_pay_promo_card"),w===!1&&p.push("reimbursement_card","reimbursement_promo_card"),p.push("zeni_accounts_promo_card","treasury_promo_card"),S===!1&&p.push("rewards_card");const B=_(h=>{const D=[];d===!1&&D.push("accounts_payable_aging"),b===!1&&D.push("accounts_receivable_aging"),D.push("zeni_accounts_promo_card","treasury_promo_card"),S===!1&&D.push("rewards_card"),k===!1&&D.push("expense_automation_card");const Z=xt(h,D,e,v,k);return wt(Z.reportsInOrder.map(A=>({fetchState:A.fetchState,error:A.error}))).fetchState});c.useEffect(()=>{m!=="Completed"||o||O||P||(l(!0),s(At(e.userId,x,y.tenantId,!0,!1,p)))},[o,m,O,P,e,y.tenantId,s]);const K=c.useRef(!1),z=c.useCallback(()=>{const h={pathnameStackToGoBack:Q(u.state?.pathnameStackToGoBack,u.pathname),message:"activation"};t(O?"../../checking":P?"../../cards":"../../dashboard",{state:h})},[t,u,O,P]),V=c.useCallback(()=>{K.current||(K.current=!0,z())},[z]);return c.useEffect(()=>{const h=setTimeout(()=>f(!0),3e3);return()=>clearTimeout(h)},[]),c.useEffect(()=>{const h=setTimeout(V,6e3);return()=>clearTimeout(h)},[V]),c.useEffect(()=>{O||P||!r||B!=="Completed"&&B!=="Error"||V()},[r,B,O,P,V]),m!=="Completed"?a.jsx(U,{to:"../"}):a.jsxs(a.Fragment,{children:[a.jsx(ae,{analytics:N,onLoad:h=>h.trackPageLoaded(de.Event.onboardingDashboardActivation)}),a.jsx(It,{show:!0,onComplete:V})]})},fe=["reading_books","finance_graph","reconciliation","cfo_foundation"],ye=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],Qe=(t,u)=>{const s=new Map(t.map(o=>[o.key,o]));return u.map(o=>{return l=s.get(o)?.status,l==="starting"||l==="building"?l:"idle";var l})},Ke=(t,u)=>{if(t.length===0)return!1;const s=new Map(t.map(o=>[o.key,o]));return u.every(o=>s.get(o)?.status==="ready")},qe=Ee.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
5
|
-
`,He=Ee.div`
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
align-items: center;
|
|
9
|
-
flex: 1;
|
|
10
|
-
min-width: 0;
|
|
11
|
-
|
|
12
|
-
${t=>t.skipLegacyDrawerOffset?`
|
|
13
|
-
width: 100%;
|
|
14
|
-
padding-left: ${Re.sp0};
|
|
15
|
-
`:`
|
|
16
|
-
min-width: calc(100% - ${Ne}px);
|
|
17
|
-
padding-left: ${Ne}px;
|
|
18
|
-
`}
|
|
19
|
-
|
|
20
|
-
${t=>t.theme.breakpoints.down("md")} {
|
|
21
|
-
width: 100%;
|
|
22
|
-
padding-left: ${Re.sp0};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
${t=>t.windowSize!=="small"?"overflow: auto;":""}
|
|
26
|
-
`,Ze=et(function(t,u){const{companyId:s,isAdmin:o,currentTenant:l,isOnAddressPage:r}=u,f=R.getSignedInUser(),C=l.tenantId,e={userId:f?.userId??"",sessionId:f?.zeniSessionId??"",tenantId:C??""},n=J(t),d=Te(t,s),b=it(t),S=le(l?.userRole??[])&&d.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",v=Ht(t.userRoleConfigState);return{onboardingCustomerView:d,analytics:N,isRefreshingViewInBackground:!1,isDisabled:S,companyTitles:v.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:vt.fileMicroServiceBaseUrl,authParams:e},signedInUser:R.getSignedInUser(),currentTenant:n,isAdmin:o,isOnAddressPage:r,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",cardPaymentView:b,isCardPaymentPopupOpen:!1,stripeKey:Se.stripeKey}},function(t,u){const{companyId:s,currentTenant:o,themeState:l,navigate:r,location:f}=u,{tenantEmailDomain:C}=o;return{onFetchLinkTokenClick:(e,n)=>{t(Sn(e,n))},onEstablishConnectionClick:(e,n)=>{t(hn(e,n))},onUpdatePaymentAccountStatus:(e,n,d)=>{t(yn(e,n,d))},onUpdatePaymentAccountLoginStatus:(e,n)=>{t(fn(!1,e,n))},onEstablishConnectionSuccess:()=>{t(gn(s,!0,!1))},handleOnConnectClick:()=>{N.trackOnboardingConnectQBO(),oe.handleClick()},updateQBOPopupState:e=>{t(ue({isQBOPopupOpen:e}))},onCompanyOfficerUpdated:e=>{const n=e.map(d=>{const{officerType:b,userId:S,name:v,email:i,ssn:k,nationalityCountryCode:y,dob:m,phone:E,syncToken:x,selectDocument:O,role:P,ownership:p,isSelectedForVerification:M,userVerificationStatus:j,fileIds:$,isPhoneVerified:G}=d;let w;return O.selectDocumentType==="driverLicense"?w="driving_license":O.selectDocumentType==="passport"?w="passport":O.selectDocumentType==="stateId"?w="id_document":O.selectDocumentType==="ssnCard"&&(w="social_security_card"),{officerType:b,userId:S,firstName:v.firstName,lastName:v.lastName,email:i,ssn:k,nationalityCountryCode:y?.selectedOption!=null?Me(y.selectedOption):void 0,phone:E,birthday:m!=null?Ge(m?.toString()):m,syncToken:x,titleAtCompany:P.selectedOption,ownershipInCompany:p,documentTypeSelectedForVerification:w,isSelectedForVerification:M,userVerificationStatus:j,fileIds:$,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:G}});t(ze({officers:n}))},onGetOtp:(e,n)=>{t(pn(e,"CustomerOnboarding")),n!=null&&t(mn({officerType:n,phone:e}))},onResendOtp:e=>{t(ln(e,"CustomerOnboarding"))},onVerifyOtp:(e,n)=>{t(un(e,n,"CustomerOnboarding"))},updateFilesEntity:e=>{t(dn({files:e}))},onDeleteFile:e=>{t(cn(e))},onEditFileName:(e,n)=>{t(rn(e,n.split(".")[0]))},onCompanyDetailsChanged:e=>{const{companyDescription:n,companyIndustry:d,companyIndustryType:b,companyLegalName:S,companyTaxId:v,companyWebsite:i,companyPhone:k,primaryContactEmail:y,primaryContactName:m,primaryContactUserId:E,primaryContactSyncToken:x,syncToken:O,fileIds:P,typeOfIncorporation:p,stateOfIncorporation:M,incDate:j,companySourceOfFunds:$,companySourceOfFundsDescription:G,companySubIndustry:w,countriesOfOperations:B,purposeOfAccount:K,purposeOfAccountDescription:z,regulatedStatus:V,regulatedStatusDescription:h,transactionVolume:D,transactionVolumeDescription:Z,usNexus:A,usNexusTypes:se}=e,F={companyId:s,companyDescription:n,companyIndustry:d.selectedOption,companyIndustryType:b?.selectedOption??"",companyLegalName:S,taxIdOrEIN:v,website:i!=""&&i!=null?sn(i):void 0,phone:k,syncToken:O,fileIds:P,incDate:j!=null?Ge(j?.toString()):j,typeOfIncorporation:p?.selectedOption??"",stateOfIncorporation:M?.selectedOption??"",companySourceOfFunds:$?.selectedOption??"",companySourceOfFundsDescription:G,companySubIndustry:w?.selectedOption??"",countriesOfOperations:B?.selectedOptions.map(W=>W.length===2?W:Me(W))??[],purposeOfAccount:K?.selectedOption??"",purposeOfAccountDescription:z,regulatedStatus:V??"",regulatedStatusDescription:h,transactionVolume:D?.selectedOption??"",transactionVolumeDescription:Z,usNexus:A,usNexusTypes:se?.selectedOptions??[]},pe={userId:E,firstName:m.firstName,lastName:m.lastName,email:y,syncToken:x};t(ze({companyDetails:F,primaryContactDetails:pe}))},onAddressClick:(e,n)=>{const d=Je(C,e,n),b=Q(f.state?.pathnameStackToGoBack,f.pathname);r(d,{state:{pathnameStackToGoBack:b}})},onRegisteredAddressClick:(e,n)=>{const d=Je(C,e,n),b=Q(f.state?.pathnameStackToGoBack,f.pathname);r(d,{state:{pathnameStackToGoBack:b}})},onUpdateCustomerView:(e,n,d)=>{t(on(s,!1,n,d,e))},onAddressEditHandler:e=>{if(e!=null){const n=yt(e);t(st({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const e=Q(f.state?.pathnameStackToGoBack,f.pathname);t(rt(s,!1,!1)),r("./activation",{state:{pathnameStackToGoBack:e}})},onUpdateStep:e=>{t(ot({step:e}))},onUpdateSubStep:e=>{t(an({subStep:e}))},onZeniLogoClick:()=>{l.toggle()},handleLogOutClick:()=>{const e=Q(f.state?.pathnameStackToGoBack,f.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleReferralsClick:()=>{r(`/${C}/rewards`)},handleCreateCardSetupIntent:e=>{t(at(e))},handleConfirmCardSetupIntent:e=>{t(nn(e))},updateCardPaymentModalState:e=>{t(ue({isCardPaymentPopupOpen:e}))},handleAddCardPaymentSource:(e,n,d)=>{t(tn(e,n,d))},handleFetchPaymentSources:()=>{t(Ce())},resetCardPaymentViewState:()=>{t(en())},handleResetCardPaymentErrorStatuses:()=>{t(Xt())},redirectToProductSuitePage:()=>{const e=Q(f.state?.pathnameStackToGoBack,f.pathname);r(`/${C}/onboarding/thankyou`,{state:{pathnameStackToGoBack:e,message:"OnboardingThankyou"},replace:!0})},onAcknowledgeAiFinanceTeam:()=>{s!=null&&t(Wt(s))},onIdentityDocumentUploadedForAutofill:e=>{if(s==null)return;const n=Yt(e.documentType);n!=null&&t(Jt({target:"onboarding",companyId:s,officerType:e.officerType,fileId:e.fileId,documentType:n}))},onCompanyDocumentUploadedForAutofill:e=>{s!=null&&t(Zt({target:"onboarding",companyId:s,fileId:e.fileId,documentType:e.documentType}))}}})(_t),ce=({taxCFOCustomer:t=!1,isOnAddressPage:u=!1,appContent:s})=>{const o=be(),l=Ie(),r=ne(),f=kt(),C=tt(),[e,n]=c.useState(!1),[d,b]=c.useState(!1),[S,v]=c.useState(!1),{tenantEmailDomain:i}=ke(),k=nt(),{useFeatureGate:y}=_e(),{isFeatureEnabled:m}=y(H.isDebitCardFeatureEnabled),E=St("/:tenantEmailDomain/onboarding")!==null&&l.search?.includes("code"),x=_(g=>g.onboardingCustomerViewState.fetchState),O=_(g=>g.onboardingCustomerViewState.currentStep),P=_(g=>g.onboardingCustomerViewState.uiState),p=_(g=>J(g)),M=_(g=>g.userRoleConfigState.fetchState),j=_(g=>g.cardPaymentViewState),$=Le(j.addCardPaymentSourceStatus.fetchState),G=j.addCardPaymentSourceStatus.fetchState,{code:w,realmId:B,state:K}=bn(l.search),z=p.externalConnections?.accounting[0],V=z?.connectionType,h=z?.connectionName,D=z?.connectionId??"",Z=R.getSignedInUser()?.userId??"";c.useEffect(()=>{d||(b(!0),r(Ce()))},[d,r]),c.useEffect(()=>{S||(at(["card"]),v(!0))},[S]),c.useEffect(()=>{$==="In-Progress"&&G==="Completed"&&r(Ce())},[$,G]),c.useEffect(()=>{In(w,B,K,D,Z)===!0&&p.externalConnections?.saveConnectionState!=="In-Progress"&&x==="Completed"&&(r(Ft(p.tenantId,{connection_type:V??"accounting",connection_name:h??"quickbooks_online",authorization_code:w,realm_id:B,connection_id:D,user_id:Z},Ut(window.location.origin+"/onboarding/auth"))),N.trackOnboardingSaveQBOConnection(B,D),o(l.pathname))},[w,B,K,l.pathname,x]),c.useEffect(()=>{oe.isInitiated===!1&&x==="Completed"&&oe.init("/onboarding/auth",p.tenantEmailDomain)},[x]);const A=p.companyId??R.getSignedInUserTenant(i)?.companyId,se=le(p?.userRole??[]),F=_(g=>Te(g,A));c.useEffect(()=>{e||x!=="Not-Started"||A==null||(n(!0),r(Vt(A,!0,!E)))},[e,x,A]),c.useEffect(()=>{p.externalConnections?.saveConnectionState!=="Completed"&&p.externalConnections?.saveConnectionState!=="Error"||!P.isQBOPopupOpen||O!=="connect_ledger"||r(ue({isQBOPopupOpen:!1}))},[p.externalConnections?.saveConnectionState]),c.useEffect(()=>{x==="Completed"&&E&&(r(ot({step:"connect_ledger"})),r(ue({isQBOPopupOpen:!0})))},[E,x]),c.useEffect(()=>{M==="Not-Started"&&r(Lt(!0))},[M,r]);const pe=Le(F.companyDetailsLocalData?.addressStatus);c.useEffect(()=>{F.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&F.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&pe==null&&r(st({addressType:"company_registered_address",addressToCreate:F.companyDetailsLocalData?.addressStatus?.addressToCreate}))},[F.companyDetailsLocalData?.addressStatus?.addressToCreate,F.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const W=F.isInterimEmailSent,xe=R.getSignedInUser();if(xe==null)throw Error("Can't access onboarding flow without signing in...");const ct=ve(m,p),dt=Oe(p),we=p.company?.companyOnboardingInfo.isOnboardingCompleted,Ae=g=>g.trackPageLoaded(de.Event.onboardingPage),Pe=p.productSettings.isOtherProductsEnabled,ut=p.productSettings.isTreasuryEnabled,De=Tn({tenantEmailDomain:i??"",signedInUserEmail:xe.userEmail??"",companyId:A}),je=(({companyId:g})=>{const L=ne(),ie=_(T=>T.onboardingCustomerViewState?.aiAgentsActivation),X=_(T=>J(T).company?.companyOnboardingInfo?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1),me=c.useCallback(()=>{L(Pt())},[L]);c.useEffect(()=>{me()},[me]);const Be=c.useCallback(()=>{g==null||g===""||X||L(Dt(g))},[g,X,L]),lt=c.useMemo(()=>{if(g==null||g==="")return[];const T=`private-encrypted-${g}`;return[`${T}.ledger-ingestion.counts-updated`,`${T}.ai-agents-activation.phase-changed`]},[g]),pt=c.useCallback((T,ee)=>{if(ee==null||typeof ee!="object")return;const I=ee;if(T!=="ledger-ingestion.counts-updated"){if(T==="ai-agents-activation.phase-changed"){const re=typeof I.phase_key=="string"?I.phase_key:typeof I.key=="string"?I.key:"",Y=typeof I.status=="string"?I.status:"idle";if(re==="")return;L(Bt({key:re,status:Y==="starting"||Y==="building"||Y==="ready"?Y:"idle",startedAt:typeof I.started_at=="string"?I.started_at:void 0,completedAt:typeof I.completed_at=="string"?I.completed_at:void 0}))}}else L(jt({customerCount:typeof I.customer_count=="number"?I.customer_count:void 0,glAccountCount:typeof I.gl_account_count=="number"?I.gl_account_count:void 0,targetTransactionCount:typeof I.target_transaction_count=="number"?I.target_transaction_count:void 0,transactionCount:typeof I.transaction_count=="number"?I.transaction_count:void 0,vendorCount:typeof I.vendor_count=="number"?I.vendor_count:void 0}))},[L]);return vn({events:lt,onEvent:pt,onSubscribed:me}),c.useMemo(()=>{const T=ie?.phases??[],ee=Qe(T,fe),I=Qe(T,ye),re=Ke(T,fe),Y=Ke(T,ye),Fe=T.some(ft=>ft.status!=="idle"),te=!X&&!Fe,Ue=X&&!Fe,mt=Ue?fe.map(()=>"building"):ee,gt=Ue?ye.map(()=>"building"):I;return{ledgerRowStatuses:te?void 0:mt,backgroundRowStatuses:te?void 0:gt,showLedgerReadyInLabel:te?void 0:re,showBackgroundReadyInLabel:te?void 0:Y,forceContinueEnabled:!te||void 0,counts:ie?.counts,onContinueClicked:Be}},[ie?.phases,ie?.counts,X,Be])})({companyId:A});if(we===!0){if(!Pe)return ut?a.jsx(U,{to:"../../treasury"}):ct?a.jsx(U,{to:"../../checking"}):dt?a.jsx(U,{to:"../../cards"}):a.jsx(U,{to:"../../dashboard"});const g=F.updateStatus.fetchState==="In-Progress";if(Pe&&!g)return t?a.jsxs(qe,{children:[a.jsx(ae,{analytics:N,onLoad:L=>Ae(L)}),a.jsx(Ze,{navigate:o,location:l,companyId:A,currentTenant:p,isAdmin:se,isOnAddressPage:u,themeState:C,googleAPIKey:Se.googleMapsAPIKey,integrationsSectionProps:De,aiAgentsActivationProps:je}),s!=null?a.jsx(He,{windowSize:f,skipLegacyDrawerOffset:u&&p.productSettings.isOtherProductsEnabled!==!0,children:s}):null]}):a.jsx(U,{to:"../../onboarding/thankyou"})}else if(we===!1&&k?.loggedInUserRoleMap!=null)return W===!0?a.jsx(U,{to:"../../onboarding/thankyou"}):a.jsxs(qe,{children:[a.jsx(ae,{analytics:N,onLoad:g=>Ae(g)}),a.jsx(Ze,{navigate:o,location:l,companyId:A,currentTenant:p,isAdmin:se,isOnAddressPage:u,themeState:C,googleAPIKey:Se.googleMapsAPIKey,integrationsSectionProps:De,aiAgentsActivationProps:je}),s!=null?a.jsx(He,{windowSize:f,skipLegacyDrawerOffset:u&&p.productSettings.isOtherProductsEnabled!==!0,children:s}):null]});return null},he="external_integrations",Tn=({tenantEmailDomain:t,signedInUserEmail:u,companyId:s})=>{const o=ne();kn();const{plaidAccounts:l,onAddPlaidAccount:r}=_n({companyId:s}),f=_(i=>i.plaidAccountViewState.external_account.plaidConnectionDetails),C=_(i=>J(i)),e=_(i=>i.tenantState.fetchState),n=_(i=>Rt(i,s)),d=_(i=>Nt(i,he)),b=c.useMemo(()=>new Set(d.map(i=>i.additionalInfo).filter(i=>i!=null)),[d]),S=C.tenantId,v=le(C.userRole??[]);return c.useEffect(()=>{o(Mt(he))},[o]),c.useMemo(()=>({isAdmin:v,integrationsView:n,isLoading:e==="In-Progress",notifyMeRegisteredSlugs:b,saveChargeBeeState:n.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:n.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:n.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:n.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:n.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(n.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([i,k])=>[i,k?.message])),deleteConnectionState:n.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:n.externalConnections?.deleteConnectionError?.message,onConnectGmail:()=>{o($e(S,"gmail",Ye()))},onConnectOutlook:()=>{o($e(S,"outlook",Ye()))},onConnectHubSpot:(i,k)=>{const y=n.externalConnections?.revenue?.find(E=>E.connectionName==="hubspot")?.connectionId;if(y==null)return;const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:i,client_secret:k,connection_id:y,redirect_uri:m,tenant_id:S})),window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(i)}&scope=${encodeURIComponent("oauth crm.objects.deals.read crm.objects.owners.read")}&redirect_uri=${encodeURIComponent(m)}`},onDisconnect:(i,k)=>{o(qt(S,i,ge(k)))},onNotifyMe:i=>{N.trackIntegrationsNotifyMeClicked("Onboarding",i),o(Kt(he,i,u))},onReconnectQBO:()=>{oe.init("/onboarding/auth",t),oe.handleClick()},onRefreshClick:()=>{n.integrations.refreshQBO.fetchState!=="In-Progress"&&o(Qt())},onSaveChargeBeeCredentials:(i,k)=>{const y=n.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;y!=null&&o(Gt(S,y,ge("revenue"),zt("chargebee"),{api_key:i,site:k}))},onSaveConnectorCredentials:i=>{o($t(S,ge("payments"),i))},plaidAccounts:l,onAddPlaidAccount:r,plaidConnectionDetails:f}),[v,n,e,b,S,u,t,o,l,r,f])};function Ye(){const t=new URL(window.location.href);return t.searchParams.set("onboarding_step","connect_data_source"),t.toString()}function Je(t,u,s){let o=`/${t}/onboarding/address`;return o=s!=null?o.concat(`/edit/${u}/${encodeURIComponent(s)}`):o.concat(`/new/${u}`),o}const We=Ee.div`
|
|
27
|
-
display: flex;
|
|
28
|
-
height: 100vh;
|
|
29
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
30
|
-
`,Xe=et(function(t,u){const{companyId:s,currentTenant:o}=u,l=Te(t,s),r=it(t);return{hasVerifiedBankAccount:(l.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(r.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:le(o?.userRole??[])&&l.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:R.getSignedInUser(),currentTenant:o,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(t,u){const{currentTenant:s,themeState:o,navigate:l,location:r}=u,{tenantEmailDomain:f}=s;return{onZeniLogoClick:()=>{o.toggle()},handleLogOutClick:()=>{const C=Q(r.state?.pathnameStackToGoBack,r.pathname);l("/signout",{replace:!0,state:{pathnameStackToGoBack:C,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleReferralsClick:()=>{l(`/${f}/rewards`)},handleUpdatePaymentAddressDetailClick:()=>{const C=Q(r.state?.pathnameStackToGoBack,r.pathname);l(`/${f}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:C,message:"UpdatePaymentAddressDetail"}})}}})(Tt),En=()=>{const t=be(),u=ne(),s=Ie(),o=tt(),{useFeatureGate:l}=_e(),{isFeatureEnabled:r}=l(H.isDebitCardFeatureEnabled),{tenantEmailDomain:f}=ke(),C=nt(),[e,n]=c.useState(!1);c.useEffect(()=>{e===!1&&s.state?.message==="OnboardingThankyou"&&n(!0)},[s.state]);const d=_(m=>J(m)),b=d.productSettings.isOtherProductsEnabled;c.useEffect(()=>{u(rt(S,!1,!b))},[]);const S=d.companyId??R.getSignedInUserTenant(f)?.companyId;if(C.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const v=ve(r,d),i=Oe(d),k=_(m=>m.onboardingCustomerViewState.updateStatus.fetchState),y=d.company?.companyOnboardingInfo.isOnboardingCompleted;if(y!==!0||b)return k==="Completed"&&y===!0&&b&&C?.loggedInUserRoleMap!=null?a.jsxs(We,{children:[a.jsx(ae,{analytics:N,onLoad:m=>{m.trackPageLoaded(de.Event.onboardingLandingPage,"Onboarding",Cn(d.productSettings))}}),a.jsx(Xe,{navigate:t,showUpdatePaymentDetailButton:b,location:s,companyId:S,currentTenant:d,themeState:o,isVisitingFirstTime:e})]}):k==="Completed"&&y===!1&&C?.loggedInUserRoleMap!=null?a.jsxs(We,{children:[a.jsx(ae,{analytics:N,onLoad:m=>{m.trackPageLoaded(de.Event.onboardingInterimPage)}}),a.jsx(Xe,{navigate:t,showUpdatePaymentDetailButton:b,location:s,companyId:S,currentTenant:d,themeState:o,isVisitingFirstTime:e})]}):a.jsx(Ot,{});{const m={pathnameStackToGoBack:s.state?.pathnameStackToGoBack,message:"activation"};return v?a.jsx(U,{to:"../../checking",state:m,replace:!0}):i?a.jsx(U,{to:"../../cards",state:m,replace:!0}):a.jsx(U,{to:"../../dashboard",state:m,replace:!0})}};function ea(){return a.jsxs(Ct,{children:[a.jsx(q,{path:"/",element:a.jsx(ce,{})}),a.jsx(q,{path:"/billing/edit",element:a.jsx(ce,{taxCFOCustomer:!0})}),a.jsx(q,{path:"/thankyou",element:a.jsx(En,{})}),a.jsx(q,{path:"/activation",element:a.jsx(On,{})}),a.jsx(q,{path:"/address/edit/:addressType/:addressId",element:a.jsx(ce,{isOnAddressPage:!0,appContent:a.jsx(Ve,{})})}),a.jsx(q,{path:"/address/new/:addressType",element:a.jsx(ce,{isOnAddressPage:!0,appContent:a.jsx(Ve,{})})}),a.jsx(q,{path:"*",element:a.jsx(ht,{})})]})}export{ea as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-BPCHZ54B.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-DeUqRkPV.js";import{Q1 as k,Q8 as _,gh as q,gg as W,gf as X,ju as J,N8 as K,rt as L,eX as V,Pz as D,js as T,Q2 as v,Qb as j,jq as F,jN as G}from"./zeni-epic-state-RQhLkJm1.js";import{bA as M,Z as N,Q as R,z as U,m as Q,s as p,e as S,y as Z,bB as Y,o as z,bC as ee,v as te}from"./index-Cg4JV2tz.js";import{n as O}from"./mui-DAoDgA6_.js";import"./sentry-BRxO83Sz.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]="d4f83f3e-27b8-41d7-8680-f04d2fa01cdf",e._sentryDebugIdIdentifier="sentry-dbid-d4f83f3e-27b8-41d7-8680-f04d2fa01cdf")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(X(n,"BillPayVendor"))},onResendOtp:n=>{e(W(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??E();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(j({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??E(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),c=e??s,{useFeatureGate:d}=R(),i=U.getSignedInUser(),b=h(u=>V(u)),g=Q(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(S.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},P=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return P(e,"ach",t,n)}function Se(e,t,n){return P(e,"domestic",t,n)}function ge(e,t,n){return P(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},de=O.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
box-shadow: ${e=>`0px 2px ${z.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,re=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:c}=r;return{onFetchBankName:d=>{e(G(d))},onSaveHandler:d=>{e(F(t.bankAccountContext,d,"us-domestic",s))},onWireDetailsUpdated:d=>{const{bankAccountSection:i}=d;e(j({data:i}))},onCancel:()=>{(()=>{const d=p(o.state?.pathnameStackToGoBack),i=d.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:d.newStack}})})(),e(v())},onAddressClick:d=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(c,d,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const d=p(t.location.state?.pathnameStackToGoBack),i=d.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:d.newStack}})}e(v())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),c=e??s,d=U.getSignedInUser(),{useFeatureGate:i}=R(),b=Q(),g=h(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=i(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(S.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(de,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-BPCHZ54B.js";import{Z as l,D as c,m as f}from"./index-Cg4JV2tz.js";import{D as b}from"./mui-DAoDgA6_.js";import"./sentry-BRxO83Sz.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]="54bd5477-c54f-45bb-8837-15885c458818",e._sentryDebugIdIdentifier="sentry-dbid-54bd5477-c54f-45bb-8837-15885c458818")}catch{}})();const p={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)??p.drawerLeftMargin.valuePx(n),d=f();return i.jsx(b,{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-BPCHZ54B.js";import{a as c}from"./sentry-BRxO83Sz.js";import{h as A,u as B,g as G,i as O,j as d,N as q,n as F,o as K,p as W}from"./core-DeUqRkPV.js";import{Og as _,eX as M,NE as R,lx as Y,K9 as I,Ol as $,N7 as z,kx as J,Ka as S,NJ as V,NK as X,N9 as H,N8 as L}from"./zeni-epic-state-RQhLkJm1.js";import{aW as Q,f as U,s as Z,v as tt}from"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import{d as k}from"./decodeURIComponentSafe-CyCKv9fm.js";import{w as et}from"./withTransactionSidePanel-C46PLUnx.js";import{f as at,c as nt}from"./routePaths-ZBpdAu85.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.js";import"./useAskAiCfoHostNavButtonProps-Be_j-VoW.js";import"./TransactionDetailScreen-_im9Z8Wp.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]="c8730ec2-7c47-4774-9cd7-2ee250c45456",a._sentryDebugIdIdentifier="sentry-dbid-c8730ec2-7c47-4774-9cd7-2ee250c45456")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:J(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=G(),[m,T]=c.useState(!1),[h,g]=c.useState(!1),{tenantEmailDomain:b,entityIdEncoded:x,entityNameEncoded:v}=O(),r=k(x??""),p=k(v??""),u=rt(r,p),w=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=d(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),N=d(n=>M(n).company?.companyInfo.firstMonthOfFY??1),f=d(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));c.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))},[m,u,i]);const E=d(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??D,j=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,D);return c.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:N,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:j,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:C(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(K,{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-BPCHZ54B.js";import{a as r}from"./sentry-BRxO83Sz.js";import{a4 as c,a5 as i,a6 as l,s as p}from"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import m from"./NotFoundScreen-Pc5_gWES.js";import{h as u,g as b}from"./core-DeUqRkPV.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="a2964cad-ffb6-4879-bf68-1ae32dc5af2c",a._sentryDebugIdIdentifier="sentry-dbid-a2964cad-ffb6-4879-bf68-1ae32dc5af2c")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=p(e.state?.pathnameStackToGoBack),d=n.poppedPathname??k();a(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(e.pathname);return o!=null?s.jsx(i,{menuItem:l(o),onDemoClick:t,onGoBack:f}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-BPCHZ54B.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-DeUqRkPV.js";import{M8 as k,M9 as v,Ma as M,Bc as B,A_ as T,Mb as A,Mc as oe,Md as se,B2 as ie,fA as $,B9 as le,B6 as re}from"./zeni-epic-state-RQhLkJm1.js";import{Z as g,o as r,B as de,f as j,n as G,r as ce,s as me,E as pe,v as V,Q as ue,e as he,w as xe,A as ge,m as fe,x as be,y as we,J as Se,F as ye,S as ke,C as ve,D as je,R as $e}from"./index-Cg4JV2tz.js";import{n as m}from"./mui-DAoDgA6_.js";import f from"./NotFoundScreen-Pc5_gWES.js";import{a as I}from"./sentry-BRxO83Sz.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.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]="37069f2e-7577-470b-960b-8629e720eb91",e._sentryDebugIdIdentifier="sentry-dbid-37069f2e-7577-470b-960b-8629e720eb91")}catch{}})();const Ie=m.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(M({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=m.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
height: 100vh;
|
|
13
|
-
width: 100%;
|
|
14
|
-
flex: 1 1 auto;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,Ae=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:A(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(Ae,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
width: 100%;
|
|
23
|
-
flex: 1 1 auto;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
align-items: center;
|
|
26
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,Ne=x(function(e){const a=k(e),n=v(e),o=A(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(M({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
height: 100%;
|
|
31
|
-
width: 100%;
|
|
32
|
-
flex: 1 1 auto;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Me=x(function(e){const a=k(e),n=v(e),o=A(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Te(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Me,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},Ve=m(ke)`
|
|
38
|
-
width: ${r.sp4};
|
|
39
|
-
height: ${r.sp4};
|
|
40
|
-
margin-bottom: ${r.sp3};
|
|
41
|
-
margin-top: ${r.sp3};
|
|
42
|
-
margin-left: ${r.sp8};
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
position: absolute;
|
|
45
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
-
`,_e=m.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
height: 100vh;
|
|
49
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
-
width: 100vw;
|
|
51
|
-
overflow-y: scroll;
|
|
52
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
-
`,He=m.div`
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
|
|
58
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
-
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
-
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
-
`,Ke=m.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
-
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
-
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
-
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
-
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
-
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,We=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),_=n.pathname.includes("address"),b=g(),H=ge(),D=fe(),w=be(),K=()=>{H.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:J,fetchState:c,billAttachment:Q,billFetchState:P,companyName:R,currencySymbol:q,amount:O}=W,{tenantId:z,userId:L,sessionId:N}=J,{fetchState:Z,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[w,c,s,o,d,a]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,z),l!=null&&a(re(l)))},[c,w,L,N,z,l,a]),c==="Error"?t.jsx(f,{}):Z==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",Ue(n.pathname),q,O))(u)}),t.jsxs(_e,{windowSize:b,children:[b!=="small"?t.jsx(Ve,{onClick:K}):null,t.jsx(Ke,{windowSize:b,isAddressPage:_,children:P==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(We,{file:Q,type:"bill"})}),t.jsx(He,{windowSize:b,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Je(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Je,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-BPCHZ54B.js";import{a as g}from"./sentry-BRxO83Sz.js";import{u as M,g as O,h as _,t as w,j as l,N as T}from"./core-DeUqRkPV.js";import{z as r,m as V,a as A,g as P,f as N,h as W,p as $,F as R,k as X}from"./index-Cg4JV2tz.js";import{eX as Y,LV as q,M3 as B,LW as G,fA as H,g0 as J,L$ as K,go as Q,cY as Z,M4 as ee,M5 as te}from"./zeni-epic-state-RQhLkJm1.js";import{n as ne}from"./mui-DAoDgA6_.js";import{u as se}from"./useDeviceId-CqK68Bon.js";import{f as ae}from"./analyticsHelper-ChmdJD3i.js";import{t as ie}from"./getLocaleForTenant-D1Wuxi1h.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.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]="81aa625f-4dc4-4638-8463-83566c216cf8",t._sentryDebugIdIdentifier="sentry-dbid-81aa625f-4dc4-4638-8463-83566c216cf8")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=M(),a=O(),m=_(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>Y(e)),k=l(e=>q(e)),E=r.getSignedInUser(),v=V().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(k.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Q().then(()=>{const e=X();e!=null&&P(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,k,v,a.state,t]);const F=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),j=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx($,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:F});if(h==="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(!x(n,p)||f==null||I==="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??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{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{xe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as N}from"./liveblocks-BPCHZ54B.js";import{a as l}from"./sentry-BRxO83Sz.js";import{u as fe,j as n,i as Ye,g as Qe,h as We,l as M}from"./core-DeUqRkPV.js";import{eX as me,fF as Xe,fG as be,fr as qe,bn as Ke,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cN as ca,fX as la,cT as ua,fq as fa,g0 as ma,g1 as ba,f$ as pa}from"./zeni-epic-state-RQhLkJm1.js";import{a8 as ha,a9 as Sa,A as ga,Q as Ea,z as k,x as ka,u as Ca,e as r,i as ya,d as Ia,aa as Ta,I as Aa,c as _a,ab as wa,a4 as Fa,ac as Da,ad as va,ae as ce,af as le,L as $a,ag as xa,ah as ue,f as P,a0 as Ga,v as A,ai as R,aj as Ma}from"./index-Cg4JV2tz.js";import{D as Pa}from"./mui-DAoDgA6_.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]="8c2e65c2-bde0-4fee-8b34-9688a3961cdb",f._sentryDebugIdIdentifier="sentry-dbid-8c2e65c2-bde0-4fee-8b34-9688a3961cdb")}catch{}})();const Ra=ha(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=Qe(),C=ga(),o=We(),V=qe(),m=fe(),{useFeatureGate:i}=Ea(),B=k.getSignedInUser(),U=Ke(B),s=n(e=>me(e)),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>Je(e)),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[_,L]=l.useState(void 0),w=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ea(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>aa(e));l.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))},[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.fetchState==="Completed"?na(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Ae}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:we}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,xe=n(e=>g(e).totalUnreadCount),Ge=n(e=>g(e).reducedFetchCountState),Q=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),W=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Me=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:q,isFetchingMore:K,hasFetchedAll:J,fetchMore:Pe}=Ta();l.useEffect(()=>{const e=setTimeout(()=>Pe?.(),0);return()=>clearTimeout(e)}),l.useEffect(()=>{if(q===!1&&K===!1&&J===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[q,K,J]),l.useEffect(()=>{y&&!I&&Me.fetchState==="Not-Started"&&V.tenantId!=null&&m(sa("task_manager","dashboard"))},[y,V.tenantId]),l.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),l.useEffect(()=>{_!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:_},"comments")))},[_,$.fetchState]);const Re={fetchStatus:Ge,count:xe},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n(e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),Y===!1&&S.push("expense_automation_card");const Ne=Aa(),te=n(e=>ia(e,S,h,Ae,Te).fetchState),ne=n(e=>ra(e).fetchState),Ve=w&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!w&&!z?void 0:"disabled",Be=l.useMemo(()=>da(s.userRole),[s.userRole]),Ue=ca(Be),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&la(H.notificationSettings,h.userEmail,Z,s),se=_a(),Le=se&&wa(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=l.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[ze,re]=l.useState(x);l.useEffect(()=>{re(x())},[x]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Da(Ze);return N.jsx(Pa,{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:N.jsx(va,{signedInUser:B,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:le(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:Y,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=Q===0&&W>0?"notifications/comments":"notifications/tasks";le(a)&&(e=Q===0&&W>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!pe)return void Ga({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),c=e.type,b=R(c)&&c!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&P.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 G=Ma(e.type);ue(e.type)?(j!=null&&m(pa()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${G}`,{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=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,c=ce(a);let b=`/${encodeURIComponent(u)}/`;const G=R(c);c==="home"?b+="dashboard":c==="users_and_roles"?b+="people":xa(c)?b+="settings/my_profile":ue(c)?b+=`ai-cfo/${c}`:b+=c==="task_checklist"?"tasks":G?"month_end_close_checks/review":encodeURIComponent(c),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;P.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:w,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:we,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),La=f=>{const d=fe(),t=n(C=>me(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Xe(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Ra,{...f,...a})};export{La as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BPCHZ54B.js";import{h as n,n as i}from"./core-DeUqRkPV.js";import{O as e}from"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import"./sentry-BRxO83Sz.js";import"./zeni-epic-state-RQhLkJm1.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.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]="d7666c0b-2a75-4baf-97d7-b828025403bf",o._sentryDebugIdIdentifier="sentry-dbid-d7666c0b-2a75-4baf-97d7-b828025403bf")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-BPCHZ54B.js";import{a as r}from"./sentry-BRxO83Sz.js";import{u as T,g as j,j as o,N as A}from"./core-DeUqRkPV.js";import{Mi as C,eX as P,fN as x,Mj as z,Mk as D,Ml as L,Mm as N,o9 as R,Lf as k}from"./zeni-epic-state-RQhLkJm1.js";import{z as h,T as I}from"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="f1d4ac2c-cd37-4dcf-8b6a-bb8ec120baa9",n._sentryDebugIdIdentifier="sentry-dbid-f1d4ac2c-cd37-4dcf-8b6a-bb8ec120baa9")}catch{}})();function ee(){const n=T(),a=j(),{params:t,error:i}=r.useMemo(()=>C(a.search),[a.search]),b=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),w=o(z),y=o(D),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(N())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(s.userId,s.zeniSessionId??void 0))))},[f,s,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const M=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(k(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(A,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-BPCHZ54B.js";import{h as z,u as Q,g as H,i as J,j as d,n as K,o as X,p as I}from"./core-DeUqRkPV.js";import{eX as v,sc as M,rM as Z,MP as O,rH as S,bs as ee,bn as ae,bY as te,rI as se,MQ as oe,MC as C,dK as re,vR as ne,MR as ce,wc as ie,fE as le,fC as de}from"./zeni-epic-state-RQhLkJm1.js";import{z as fe,Y as me,$ as pe,I as ue,Q as U,e as $,J as he,f as w,ao as ge,v as Fe}from"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import be from"./NotFoundScreen-Pc5_gWES.js";import{F as Ie}from"./FeaturePreviewScreen-C06JMkep.js";import{a as g}from"./sentry-BRxO83Sz.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-Be_j-VoW.js";import{u as Se}from"./useInitialThreadRequest-ezroE2PL.js";import{t as Te}from"./routePaths-ZBpdAu85.js";import{M as ye}from"./MobileAppDrawer-Dq7Q8eux.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="9f9a9a9a-2b67-4fad-96e1-14c7f06dc6e1",s._sentryDebugIdIdentifier="sentry-dbid-9f9a9a9a-2b67-4fad-96e1-14c7f06dc6e1")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=K(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function P(){const s=z(),e=Q(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=g.useState(!1),[f,u]=g.useState(!1),h=fe.getSignedInUser(),y=d(t=>v(t)),B=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>M(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(Z());else if(l&&!f){u(!0);const t=((m,L,R)=>L!=null?m.forecasts.findIndex(b=>b.id===L):R!=null?m.forecasts.findIndex(b=>b.id===R):m.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(S(i.forecasts[t].id))}},[c,p,e,l,i,f,u,M,S,F]);const D=ue(),Y=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=U(),{isFeatureEnabled:E}=_($.isReportsCommentingEnabled),q=Se(E?y?.companyId:void 0,{clearParams:l&&f}),[G,V]=g.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:B,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:Y,isAiCfoAccessEnabled:N,onAskAiCfoClick:W,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:q,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(c=>v(c)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(X,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BPCHZ54B.js";import{ML as te,eX as X,kx as _,fE as J,fC as ne,Kd as Q,Mp as oe,uO as Ie,MM as N,uD as ke,uY as Ee,uS as ie,uH as re,uW as Pe,uT as je,MN as le,wD as Le,fo as ve,ge as Te,MO as $,uL as ce,uK as de,u$ as Ae,c6 as Oe}from"./zeni-epic-state-RQhLkJm1.js";import{Z as pe,Q as q,e as M,z,i as ue,H as me,ak as ge,al as Fe,D as fe,o as O,K as he,a as Ce,am as Re,Y as Ve,$ as Ze,J as Be,f as be,h as Ue,v as $e,an as Me,I as Ke}from"./index-Cg4JV2tz.js";import{D as ye,n as G,S as Se}from"./mui-DAoDgA6_.js";import ae from"./NotFoundScreen-Pc5_gWES.js";import{a as r}from"./sentry-BRxO83Sz.js";import{u as ee,i as He,j as m,h as _e,g as ze,n as Ge,o as se,p as U}from"./core-DeUqRkPV.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-Be_j-VoW.js";import{M as Ye}from"./MobileAppDrawer-Dq7Q8eux.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.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]="dc47bd2d-b72f-407a-8b0a-a1afa132e430",a._sentryDebugIdIdentifier="sentry-dbid-dc47bd2d-b72f-407a-8b0a-a1afa132e430")}catch{}})();const Ne={overlayWidth:new fe(100,100,48)},K=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:b})=>{const f=pe(),u=ee(),[F,R]=r.useState(!1),[I,y]=r.useState(!1),{userId:S}=He(),c=m(e=>te(e)),d=m(e=>X(e)),k=m(e=>_(e)),{useFeatureGate:D}=q(),{isFeatureEnabled:x}=D(M.isDebitCardFeatureEnabled),E=J(x,d),L=ne(d),v=Q(d),V=oe(d),Z=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!E&&k&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{u(N()),b()},T=()=>{F===!0?y(!0):h()},B=l.companyView?.controllers?.map(e=>e.user),p=!!d.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(M.isChargeCardFeatureEnabled),j=ue(d,P,x),A=d.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",C={peopleDetails:c,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:k,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:p===!1,isChargeCardDisabled:j===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:h,onDeleteUser:e=>{u(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{u(ie({peopleLocalData:e})),R(!0)},onSaveClick:()=>{u(g==="zeni_only"?ke(a):Ee(v))},onCloseClick:T,isLoading:w||c.person==null},i={onOkClick:()=>{y(!1),h()},onCancelClick:()=>{y(!1)}};return r.useEffect(()=>{w===!1&&S!=null&&u(Ie(S))},[w,S]),r.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&h()},[c.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:T,children:s.jsxs(Je,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:K.discardTitle}),descriptionComponent:s.jsx(De,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:i,isEditPopup:!0}):null,s.jsx(Fe,{...C})]})})},Je=G(Se)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,we=G(he.H6Regular)`
|
|
6
|
-
margin-top: ${O.sp7};
|
|
7
|
-
padding-left: ${O.sp8};
|
|
8
|
-
padding-right: ${O.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=G(he.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${O.sp8};
|
|
14
|
-
padding-right: ${O.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${O.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Qe={overlayWidth:new fe(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:b})=>{const f=pe(),u=ee(),[F,R]=r.useState(!1),[I,y]=r.useState(!1),S=m(i=>te(i)),c=m(i=>X(i)),d=m(i=>_(i)),{useFeatureGate:k}=q(),{isFeatureEnabled:D}=k(M.isDebitCardFeatureEnabled),x=J(D,c),E=ne(c),L=Q(c),v=oe(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!x&&d&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),u(N())},h=()=>{F===!0?y(!0):w()},T={onOkClick:()=>{y(!1),w()},onCancelClick:()=>{y(!1)}},B=l.companyView?.controllers.map(i=>i.user),p=!!c.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=k(M.isChargeCardFeatureEnabled),j=ue(c,P,D),A=c.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",C={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{u(ie({peopleLocalData:i})),R(!0)},onResetClick:w,onSaveClick:()=>{u(g==="zeni_only"?Pe(a):je())},onCloseClick:h,peopleDetails:S,isAccountingClassesEnabled:d,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:p===!1,isChargeCardDisabled:j===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:x,isCardsOnlyTenant:E,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(b(),u(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:h,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:H.discardTitle}),descriptionComponent:s.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:T}):null,s.jsx(Re,{...C})]})})},ea=G(Se)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=Ge(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:_(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,b)=>{a(re(o,b))},onResendInvite:o=>{a(Ae(o))},onReloadPeople:()=>{a(ce()),a(de(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})(Me);function Y({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=_e(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),b=z.getSignedInUser(),f=m(e=>X(e)),{useFeatureGate:u}=q(),{isFeatureEnabled:F}=u(M.isDebitCardFeatureEnabled),R=m(e=>_(e)),I=!J(F,f)&&R,y=Q(f),S=f?.tenantId,{tenantEmailDomain:c}=f,[d,k]=r.useState(!1),[D,x]=r.useState(!1),[E,L]=r.useState(!1),[v,V]=r.useState("off"),[Z,w]=r.useState(!1),h=e=>{w(e)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=We({mobileExploreReferrer:"People"}),p=m(e=>le(e));Ze({isDataReady:p.fetchState==="Completed"});const P=m(e=>Le(e.classState,e.classListState)),j=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),C=f?.companyId;r.useEffect(()=>{d&&v===p.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),k(!0),n(ce()))},[d,b,S,n,p.uiState.mode,o]),r.useEffect(()=>{C!=null&&o&&n(de(C,I))},[C,I,o]),r.useEffect(()=>{x(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{x(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ue.Event.members)}):null,D===!0?s.jsx(qe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:A,classListView:P,companyId:C,mode:p.uiState.mode}):null,E===!0?s.jsx(Xe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:E,managersListView:j,companyPassportView:A,classListView:P,companyId:C,mode:p.uiState.mode}):null,s.jsx(Ye,{isAppContentDrawerOpen:Z,handleDrawerToggle:h}),s.jsx(aa,{navigate:l,signedInUser:b,isZeni:f.isZeni,isZeniTenant:y,peopleUIState:p.uiState,companyId:C,shouldFetchClasses:I,classList:P,managersView:j,peopleView:p,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n($({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${c}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B})]})}function Sa(){const a=Ke();return Oe(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(U,{path:"/",element:s.jsx(Y,{})}),s.jsx(U,{path:"new",element:s.jsx(Y,{isInvitePeopleDrawerOpen:!0})}),s.jsx(U,{path:":userId/edit",element:s.jsx(Y,{isEditPeopleDrawerOpen:!0})}),s.jsx(U,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(U,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BPCHZ54B.js";import E from"./NotFoundScreen-Pc5_gWES.js";import{a as r}from"./sentry-BRxO83Sz.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as O,p as h}from"./core-DeUqRkPV.js";import{eX as B,S_ as b,bq as F,bn as N,ie as V,fz as $}from"./zeni-epic-state-RQhLkJm1.js";import{A as q,z as I,$ as X,cY as Y}from"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-Be_j-VoW.js";import{M as H}from"./MobileAppDrawer-Dq7Q8eux.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.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]="01e4e40f-7195-4f38-91e5-2955e39f2310",e._sentryDebugIdIdentifier="sentry-dbid-01e4e40f-7195-4f38-91e5-2955e39f2310")}catch{}})();const J=P(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(Y),K=()=>{const e=_(),t=v(),c=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=M(),u=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BPCHZ54B.js";import{a as o}from"./sentry-BRxO83Sz.js";import{j as f,h as L,u as V,g as F,n as N}from"./core-DeUqRkPV.js";import{m as W,Z as _,z as P,bf as $,D as M,Y as U,$ as z,J,f as l,h as K,a8 as X,bg as Y}from"./index-Cg4JV2tz.js";import{fI as Z,eX as q,Pm as R,Pn as G,vH as Q,vx as g,fK as ee,bS as re,vC as ae,Po as ne}from"./zeni-epic-state-RQhLkJm1.js";import{D as te,e as se,n as oe,S as ie}from"./mui-DAoDgA6_.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-Be_j-VoW.js";import{M as de}from"./MobileAppDrawer-Dq7Q8eux.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]="57d4a02d-5327-476c-bbcb-27f712c0834d",e._sentryDebugIdIdentifier="sentry-dbid-57d4a02d-5327-476c-bbcb-27f712c0834d")}catch{}})();const ce={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=W(),n=_();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>Z(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx($,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=N(function(e){const r=R(e),a=e.referralViewState.rewardsPlanFetchState,n=re([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(X(Y));function ye({isReferralDrawerOpen:e}){const r=L(),a=V(),n=F(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,C]=o.useState(!1),w=P.getSignedInUser(),h=f(t=>q(t)),m=f(t=>R(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),v=G([m,p]),{areTenantIdsInSync:c}=U();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(a(Q()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),a(g(!0)))},[b,a,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(x(!0),a(ee(!0)))},[p,a,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),y=t=>{A(t)},{isAiCfoAccessEnabled:B,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:v===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(J,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(K.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:y}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{C(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:r,currentTenant:h,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:O,...T})]})}export{ye as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BPCHZ54B.js";import{Q as j,z as w,aR as y,J as I,f as p,h as F,d7 as P,e as T}from"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import m from"./NotFoundScreen-Pc5_gWES.js";import{a as d}from"./sentry-BRxO83Sz.js";import{u as L,j as b,h as R,g as V,n as A,o as U,p as u}from"./core-DeUqRkPV.js";import{eX as z,TC as C,PX as X,TD as v,vH as Y,fK as G,TE as H,vF as J}from"./zeni-epic-state-RQhLkJm1.js";import{R as x}from"./ReferralListScreen-Ag_OjFfe.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.js";import"./useAskAiCfoHostNavButtonProps-Be_j-VoW.js";import"./MobileAppDrawer-Dq7Q8eux.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]="7b851583-aeed-4c8f-8e58-d6e6aa0ce2ba",e._sentryDebugIdIdentifier="sentry-dbid-7b851583-aeed-4c8f-8e58-d6e6aa0ce2ba")}catch{}})();const K=A(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(J())},onUpdateInviteFormLocalData:s=>{e(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),O=()=>{const e=L(),[t,n]=d.useState(!1),[i,s]=d.useState(!1),r=b(o=>z(o)),c=R(),D=V(),{useDynamicConfig:g}=j(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),_=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),N=X(k);d.useEffect(()=>{e(v()),r?.rewardsLastViewedTime==null&&i===!1&&(e(Y()),s(!0))},[]),d.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[l.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(K,{navigate:c,location:D,currentTenant:r,companyName:S,userName:_,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(T.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(m,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(m,{})}),a.jsx(u,{path:"*",element:a.jsx(m,{})})]})}export{ue as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-CMiZYJvT.js","assets/sentry-BRxO83Sz.js","assets/core-DeUqRkPV.js","assets/zeni-epic-state-RQhLkJm1.js","assets/index-Cg4JV2tz.js","assets/mui-DAoDgA6_.js","assets/analytics-tFci0ZBb.js","assets/utils-CliqhjB9.js","assets/withTransactionSidePanel-C46PLUnx.js","assets/useAskAiCfoHostNavButtonProps-Be_j-VoW.js","assets/TransactionDetailScreen-_im9Z8Wp.js","assets/decodeURIComponentSafe-CyCKv9fm.js","assets/routePaths-ZBpdAu85.js","assets/NotFoundScreen-Pc5_gWES.js","assets/useInitialThreadRequest-ezroE2PL.js","assets/analyticsHelper-ChmdJD3i.js","assets/CompanyPassportScreen-DOwRqzCZ.js","assets/MobileAppDrawer-Dq7Q8eux.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CBYHTRds.js","assets/FeaturePreviewScreen-C06JMkep.js","assets/ReferralListScreen-Ag_OjFfe.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-BBunGCd_.js","assets/AddressScreen-LMssN7FX.js","assets/DomesticWireDetailScreen-Cv3NmzhE.js","assets/DrawerScreen-BhiWQ24H.js","assets/SetupPagesScreen-arp-xD8G.js","assets/BusinessVerificationPageScreen-BemUa4lP.js","assets/BillPayApprovalRoutes-FbpvVFpO.js","assets/ReimbursementApprovalRuleDetailScreen-CYfGAlTN.js","assets/getLocaleForTenant-D1Wuxi1h.js","assets/ReimbursementRoutes-Bq2oGVuB.js","assets/ReimbursementApprovalRoutes-DYomUyE_.js","assets/TransactionListRoutes-B1LNvKrw.js","assets/ZeniAccountStatementScreen-z_z-XrxU.js","assets/SettingsRoutes-Ex6tMm4V.js","assets/accountMappingHelper-D2RcsfN-.js","assets/useEmailConnectResultRefresh-4EEjP-eP.js","assets/QBOConnectionScreen-qYa7d8c5.js","assets/empty-BH80piSN.js","assets/index-Ba2LM3_a.js","assets/url-Ddgc_6Ci.js","assets/index-DMEUlT9B.js","assets/ReportsRoutes-EvgLxoWK.js","assets/ChargeCardRoutes-CDBIrLG_.js","assets/useChargeCardPusherEvents-V_hkDTjD.js","assets/PeopleRoutes-DoKx4_Vx.js","assets/ExpenseAutomationRoutes-ja43rssL.js","assets/TreasuryRoutes-KyOcUpTl.js","assets/useCashManagementBanner-Cn0LqRpJ.js","assets/VendorsRoutes-DXrOiAFt.js","assets/pathToGoBack-DmHMCg55.js","assets/ZeniAccountRoutes-B0cjJSze.js","assets/AddressRoutes-Ccf9Jzub.js","assets/PandLWithForecastRoutes-CH-3rMiZ.js","assets/CustomerOnboardingRoutes-B7lDaTsh.js","assets/TransactionDetailRoutes-DKxOtjev.js","assets/EntityDetailRoutes-ByTo3npP.js","assets/NotificationRoutes-zN961sSS.js","assets/PerformanceRoutes-CY0ggQd1.js","assets/RewardsRoutes-ChURoNZ3.js","assets/TaskRoutes-Be5K8H0B.js","assets/TaskListScreen-Dhy8ix5-.js","assets/AiCfoScreen-vm8TgXHz.js","assets/CardsAiCfoScreen-DnFZCESR.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as t,bn as rs,eX as is,fE as ls,fC as us,gk as ds,fr as cs,cU as pe,cA as ms,fU as _s,cs as hs,bE as Es,bo as ps,fY as Rs,v as xs,LW as gs,bs as Is,LX as js,bK as Ts,bJ as As,bt as fs,co as Ds,LY as ys,LZ as bs,cQ as Cs,cT as vs,cS as Us,cz as ws,cG as Os,o9 as Re,fA as xe,gu as Ps,g0 as ge,gr as Ie,gs as je,g1 as Ls}from"./zeni-epic-state-RQhLkJm1.js";import{j as e}from"./liveblocks-BPCHZ54B.js";import{a as O}from"./sentry-BRxO83Sz.js";import{u as Fs,h as ks,i as Hs,g as Bs,j as z,l as Te,N as u,o as Vs,p as a}from"./core-DeUqRkPV.js";import{m as Ss,u as Ns,z as D,Q as Zs,c as Ms,d as zs,e as G,i as Gs,I as $s,L,a as Ae,t as _,P as Ys,f as K,l}from"./index-Cg4JV2tz.js";import"./mui-DAoDgA6_.js";import{f as fe}from"./analyticsHelper-ChmdJD3i.js";import{t as Ws}from"./getLocaleForTenant-D1Wuxi1h.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.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]="f4f94d71-10fb-4496-a29a-911641a8eb7e",o._sentryDebugIdIdentifier="sentry-dbid-f4f94d71-10fb-4496-a29a-911641a8eb7e")}catch{}})();const qs={dashboard:()=>t(()=>import("./DashboardRoutes-CMiZYJvT.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>t(()=>import("./BillPayRoutes-BBunGCd_.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>t(()=>import("./ReimbursementRoutes-Bq2oGVuB.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>t(()=>import("./TransactionListRoutes-B1LNvKrw.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>t(()=>import("./SettingsRoutes-Ex6tMm4V.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21])),reports:()=>t(()=>import("./ReportsRoutes-EvgLxoWK.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>t(()=>import("./ChargeCardRoutes-CDBIrLG_.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21])),people:()=>t(()=>import("./PeopleRoutes-DoKx4_Vx.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>t(()=>import("./ExpenseAutomationRoutes-ja43rssL.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>t(()=>import("./TreasuryRoutes-KyOcUpTl.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21])),vendors:()=>t(()=>import("./VendorsRoutes-DXrOiAFt.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21])),zeniAccounts:()=>t(()=>import("./ZeniAccountRoutes-B0cjJSze.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},Xs=l(()=>t(()=>import("./ReportsRoutes-EvgLxoWK.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Js=l(()=>t(()=>import("./AddressRoutes-Ccf9Jzub.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,21]))),Ks=l(()=>t(()=>import("./PeopleRoutes-DoKx4_Vx.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21]))),et=l(()=>t(()=>import("./PandLWithForecastRoutes-CH-3rMiZ.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),st=l(()=>t(()=>import("./CustomerOnboardingRoutes-B7lDaTsh.js"),__vite__mapDeps([55,1,2,3,23,4,5,6,7,13,38,39,40,41,42,11,37,45,21]))),tt=l(()=>t(()=>import("./VendorsRoutes-DXrOiAFt.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21]))),nt=l(()=>t(()=>import("./TransactionDetailRoutes-DKxOtjev.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,10,9,11,12,21]))),De=l(()=>t(()=>import("./EntityDetailRoutes-ByTo3npP.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,11,8,9,10,12,21]))),at=l(()=>t(()=>import("./DashboardRoutes-CMiZYJvT.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),ye=l(()=>t(()=>import("./BillPayRoutes-BBunGCd_.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),ot=l(()=>t(()=>import("./SettingsRoutes-Ex6tMm4V.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21]))),be=l(()=>t(()=>import("./ReimbursementRoutes-Bq2oGVuB.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),rt=l(()=>t(()=>import("./ZeniAccountRoutes-B0cjJSze.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))),it=l(()=>t(()=>import("./TreasuryRoutes-KyOcUpTl.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21]))),lt=l(()=>t(()=>import("./TransactionListRoutes-B1LNvKrw.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ut=l(()=>t(()=>import("./ChargeCardRoutes-CDBIrLG_.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21]))),dt=l(()=>t(()=>import("./NotificationRoutes-zN961sSS.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,21]))),ct=l(()=>t(()=>import("./PerformanceRoutes-CY0ggQd1.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,9,17,21]))),mt=l(()=>t(()=>import("./ExpenseAutomationRoutes-ja43rssL.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_t=l(()=>t(()=>import("./RewardsRoutes-ChURoNZ3.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,13,20,9,17,21]))),ht=l(()=>t(()=>import("./TaskRoutes-Be5K8H0B.js"),__vite__mapDeps([61,1,2,3,13,4,5,6,7,14,17,62,9,21]))),Et=l(()=>t(()=>import("./AiCfoScreen-vm8TgXHz.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,18,51,21]))),Ce=l(()=>t(()=>import("./CardsAiCfoScreen-DnFZCESR.js"),__vite__mapDeps([64,1,2,3,4,5,6,7,21]))),b=l(()=>t(()=>import("./NotFoundScreen-Pc5_gWES.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),pt=l(()=>t(()=>import("./TaskListScreen-Dhy8ix5-.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,9,17,21])));function Ht({setTenantEmailDomain:o}){const T=Fs(),B=ks(),{tenantEmailDomain:r}=Hs(),F=Ss().mode,{setLoading:U,clearAllLoading:C,clearLoading:k}=Ns(),v=D.getSignedInUserTenant(r)?.tenantId,I=D.getSignedInUser(),se=rs(I),$=Bs(),[V,Pe]=O.useState(!1),i=z(n=>is(n)),{useFeatureGate:N}=Zs(),Z=Ms(),te=zs(),Le=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Fe=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=N(G.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(G.isDebitCardFeatureEnabled),A=z(n=>n.tenantState.fetchState),j=z(n=>n.tenantState.activeTenantFetchState.fetchState),h=j==="Completed"||A==="Completed"?ls(ne,i):void 0,Q=j==="Completed"||A==="Completed"?us(i):void 0,He=Gs(i,ke,ne),{isFeatureEnabled:Be}=N(G.isSettingsFeatureEnabled),{isFeatureEnabled:X}=N(G.isAiCfoFileUploadEnabled),Y=z(n=>ds(n));if(r!=null){const n=D.getSignedInUserTenant(r);I!=null&&n!=null&&fe(I,i,F)}const M={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=cs(),E=$s(),Ve=i.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Se=ms(E?.loggedInUserRoleMap),oe=O.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,J=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ne=z(n=>M.tenantId!=null?_s(n,M.tenantId):void 0);O.useEffect(()=>{U(L.TENANT_FETCHING),o(r)},[r]),O.useEffect(()=>{if(J!=null&&v!=null){const n=J.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const d=hs(Number(f[0])),s=Number(f[1]),c=Es(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=ps();c.isAfter(S,"month")===!1?T(Rs(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}},[J,v]),O.useEffect(()=>{V||(Pe(!0),U(L.TENANT_FETCHING)),oe.current?oe.current=!1:!xs(ae,M)&&D.isSignedIn()&&(U(L.TENANT_FETCHING),function(n,f,d,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),d(Ps(!0)),d(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=D.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ws(s)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?K.identify(n.userId,{tenant_id:n.tenantId}):K.resetUserIdentity()}(M,I,T,Ne))},[M,ae,I,T,D]),O.useEffect(()=>{D.isSignedIn()&&(U(L.TENANT_FETCHING),function(n,f,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&c?.zeniSessionId!=null,ns=d==null||d.tenantId!==s,as=d!=null&&d.excludedResources==null,os=d!=null&&d.externalConnections==null;if(W&&ns){H(ge(s));const q=D.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(je(c.userId,s)))}else W&&as&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),W&&os&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(je(c.userId,s)));if(W){K.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(L.TENANT_FETCHING),H(Ls(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(Re(c.userId,c.zeniSessionId)))}}(A,j,i,v,I,U,T))},[v,j]),O.useEffect(()=>{D.isSignedIn()&&A==="Completed"&&Y.tenantsBaseInOrder.length>0&&(k(L.TENANT_FETCHING),D.saveSignedInUserTenants(gs(Y.tenantsBaseInOrder)),I!=null&&fe(I,i,F,void 0,Y.tenantsBaseInOrder))},[Y,A,i,I]),O.useEffect(()=>{j==="In-Progress"&&U(L.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):j==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),k(L.TENANT_FETCHING),k(L.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())},[j,A,v,V]);const ie=O.useRef(!1);O.useEffect(()=>{!ie.current&&j==="Completed"&&V&&(ie.current=!0,function(n=Qs,f=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=qs[c];S!=null?S().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},f)}())},[j,V]);const w=i?.userRole!=null&&Is(i?.userRole),{isFeatureEnabled:Ze}=N(G.isReferralFeatureEnabled),Me=i?.userRole!=null&&i.userRole.includes("charge_card_user"),ze=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),P=i?.userRole!=null&&pe(i.userRole),le=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=He&&!w,Ge=js(E?.loggedInUserRoleMap),$e=i.externalConnections?.accounting[0]?.isValid,de=i.company?.companyOnboardingInfo.isOnboardingCompleted,ce=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=ce&&Ts(E?.loggedInUserRoleMap),_e=Le&&!w,Ye=Fe&&!w,We=le&&As(E?.loggedInUserRoleMap),qe=ue&&fs(E?.loggedInUserRoleMap),Qe=_e&&Ds(E?.loggedInUserRoleMap),Xe=ys(E?.loggedInUserRoleMap),Je=bs(E?.loggedInUserRoleMap),Ke=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),p=ws(E?.loggedInUserRoleMap),R=Os(E?.loggedInUserRoleMap),he=le&&p,Ee=ce&&R,x=_e&&Ke,g=Ye&&es,m=ue&&ss,ts=i.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Se===!0||Ge===!0||Xe===!0||Je===!0;return D.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&T(Re(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&$e===!1&&h===!1&&Q===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&i?.userRole&&h!=null&&Q!=null&&r!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Vs,{children:e.jsxs(a,{element:e.jsx(Ys,{}),children:[e.jsx(a,{path:"/",element:e.jsx(Rt,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(at,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(Xs,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"people/*",element:ts||P?e.jsx(Ks,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(et,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(st,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||Me||ze?e.jsx(nt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(lt,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(De,{entityType:"customer"}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(De,{entityType:"vendor"}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"tasks",element:e.jsx(pt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(ht,{})}),e.jsx(a,{path:"address/*",element:We||me||Qe||qe?e.jsx(Js,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(it,{}):e.jsx(b,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ct,{}):e.jsx(Oe,{tenantEmailDomain:r})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(mt,{}):e.jsx(Oe,{tenantEmailDomain:r})}),e.jsx(a,{path:"notifications/*",element:e.jsx(dt,{})}),e.jsx(a,{path:"vendors/*",element:Ve?e.jsx(tt,{}):e.jsx(b,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"reimbursement/*",element:Ee?e.jsx(be,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"reimbursements/*",element:Ee?e.jsx(be,{}):e.jsx(y,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"settings/*",element:Be?e.jsx(ot,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(ut,{}):e.jsx(b,{})}),e.jsx(a,{path:"rewards/*",element:Ze?e.jsx(_t,{}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Et,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(a,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Rt=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:r,showTreasuryRoute:F,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(F)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):F?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},y=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:B,showTreasuryRoute:r,isTenantBankingOnly:F,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(F===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(r)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):r?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):T?e.jsx(gt,{tenantEmailDomain:C}):B?e.jsx(xt,{tenantEmailDomain:C}):e.jsx(b,{})},xt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),gt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{y as FallBackRoute,Ht as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BPCHZ54B.js";import{a as i}from"./sentry-BRxO83Sz.js";import{u as c,g as d,N as u}from"./core-DeUqRkPV.js";import{z as n,f as a,h as m,y as p}from"./index-Cg4JV2tz.js";import{gt as g,Mh as y}from"./zeni-epic-state-RQhLkJm1.js";import{n as h}from"./mui-DAoDgA6_.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.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]="11b62216-e300-4917-887c-184f698a213e",e._sentryDebugIdIdentifier="sentry-dbid-11b62216-e300-4917-887c-184f698a213e")}catch{}})();function N(){const e=c(),t=d(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect(()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}},[o,e]),o?s.jsx(b,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const b=h.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{N as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-BPCHZ54B.js";import se from"./NotFoundScreen-Pc5_gWES.js";import{a as l}from"./sentry-BRxO83Sz.js";import{h as H,u as O,j as g,g as ne,i as oe,N as ie,n as re,o as le,p as f}from"./core-DeUqRkPV.js";import{I5 as Z,I8 as ce,I2 as de,eX as M,TF as X,Im as J,H$ as pe,IS as ue,IL as ke,TG as Q,TH as q,HX as me,HU as fe,rC as ge,rq as he,l5 as Ie,Ig as Se,TI as Te,Ix as be,Iu as Ee,Ib as Ce,Ir as Ge,Iq as De}from"./zeni-epic-state-RQhLkJm1.js";import{z as G,d8 as xe,A as ye,Q as je,e as b,s as W,v as w,J as ve,f as z,h as we,d9 as Re,n as V,at as Fe}from"./index-Cg4JV2tz.js";import{n as Ue}from"./mui-DAoDgA6_.js";import{u as Be}from"./useInitialThreadRequest-ezroE2PL.js";import{M as Le}from"./MobileAppDrawer-Dq7Q8eux.js";import Pe from"./TaskListScreen-Dhy8ix5-.js";import"./recharts-Cfsnd24w.js";import"./analytics-tFci0ZBb.js";import"./plaid-DZBIDYbN.js";import"./dnd-D4M435ki.js";import"./stripe-DMRn4zHo.js";import"./lottie-DQW6ZBGJ.js";import"./lexical-Crk5An9T.js";import"./pdf-BmUuf0hA.js";import"./utils-CliqhjB9.js";import"./useAskAiCfoHostNavButtonProps-Be_j-VoW.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]="8f68a164-3dda-492a-a7f2-d4e2067a5258",e._sentryDebugIdIdentifier="sentry-dbid-8f68a164-3dda-492a-a7f2-d4e2067a5258")}catch{}})();function $e(){const e=H(),t=O(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),c=l.useCallback(()=>{t(Z())},[t]),k=l.useCallback((o,h,I)=>{t(ce({name:o,content:h,cannedResponseId:I}))},[t]),a=l.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:c,onSave:k})}let A,_=[];const Ne=re(function(e,t){const{location:s,taskGroupId:u}=t,r=Q(e,t.taskId),d=M(e),c=r.taskGroupId??u,k=c!=null?q(e.taskGroupState,c):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=X(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${V.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=S,_=Object.values(S)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:c!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>q(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:c}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??c))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function v(){const e=H(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),c=g(i=>M(i)),k=Be(c?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=l.useState(!1),[p,Y]=l.useState(!1),[F,K]=l.useState(!1),[U,ee]=l.useState(!1),[B,y]=l.useState(!1),T=l.useRef(!1),C=g(i=>i.taskListState.updateTasksFetchState.fetchState),L=g(i=>X(i)),P=g(i=>i.taskGroupViewState.fetchState);l.useEffect(()=>{p||(Y(!0),t(J(!1,r)))},[p,t]),l.useEffect(()=>{F||L.fetchState==="Completed"||(K(!0),t(pe()))},[F,t,L.fetchState]),l.useEffect(()=>{U||P==="Completed"||(ee(!0),t(ue()))},[U,t,P]);const ae=l.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);l.useEffect(()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return y(!1),void(T.current=!1);if(C==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=c;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,C,c,s,e]);const $=g(i=>Q(i,r)),j=$.fetchState,N=G.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=c,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(qe,{children:[n.jsx(Le,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(Ne,{analytics:z,currentTenant:c,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const qe=Ue.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,R=e=>`/${e}/tasks`;function ia(){return n.jsxs(le,{children:[n.jsx(f,{path:"/new",element:n.jsx(v,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(v,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Pe,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(v,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
|