@zeniai/web-app-ui 5.3.89-dev → 5.3.90-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/{AccountMappingScreen-Dd-9mkbJ.js → AccountMappingScreen-BS2TEEML.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-CwU0IpO-.js → ActualMatchingMatchDetailScreen-BG0f_9dm.js} +1 -1
- package/dist/assets/AddressRoutes-DXLSGq6p.js +1 -0
- package/dist/assets/AddressScreen-CFFjqn9x.js +9 -0
- package/dist/assets/AiCfoScreen-Bb7BlHVl.js +22 -0
- package/dist/assets/{AppDrawer-t7pXwFsy.js → AppDrawer-CUWwfrcw.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-DOtDJlUD.js → BillPayApprovalRoutes-BnsNw_Wt.js} +1 -1
- package/dist/assets/{BillPayRoutes-b2SMWo4z.js → BillPayRoutes-D-m3lGSH.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-DGcNuKpp.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-lmBrsGeg.js → CardsAiCfoScreen-CdMzvkcF.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-C9jB_BU5.js → ChargeCardRoutes-CEdKIYwO.js} +7 -7
- package/dist/assets/{CompanyPassportScreen-BslihQWZ.js → CompanyPassportScreen-ouG3XJ0B.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-CzZXAv1W.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CwkUm4jt.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DmCDi77C.js → CustomerOnboardingRoutes-DKFmMkvz.js} +3 -3
- package/dist/assets/{DashboardRoutes-CQAZF0k8.js → DashboardRoutes-FwFiyAun.js} +3 -3
- package/dist/assets/{DefaultTenantHome-DSgsISV-.js → DefaultTenantHome-DpFF7UFt.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-B1jSUQp2.js → DomesticWireDetailScreen-mG0aAckn.js} +3 -3
- package/dist/assets/{DrawerScreen-CLNuMP4c.js → DrawerScreen-CESLwM_E.js} +1 -1
- package/dist/assets/EntityDetailRoutes-CPbgn6WL.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-DLqUzGyz.js → ExpenseAutomationRoutes-7eBLUF1p.js} +7 -7
- package/dist/assets/FeaturePreviewScreen-DNtB8Ogu.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-BzaBWYUg.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-CmAbaz3a.js → InboxNotificationsProvider-BDvEEMzw.js} +1 -1
- package/dist/assets/{InvoicingRoutes-DFf9_vlp.js → InvoicingRoutes-QrdL6jni.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-DPRx78HI.js → MagicLinkRoutes-fajlaDEP.js} +22 -22
- package/dist/assets/MagicLinkSignInScreen-DeVFtM-w.js +12 -0
- package/dist/assets/MobileAppDrawer-B8sARono.js +1 -0
- package/dist/assets/NotFoundScreen-XYwSCqRV.js +1 -0
- package/dist/assets/NotificationRoutes-BCLjcBx9.js +1 -0
- package/dist/assets/{OAuthConsentScreen-DMeszvcw.js → OAuthConsentScreen-eOi9FOn6.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-C0xsoIO3.js +1 -0
- package/dist/assets/{PaymentLinkScreen-DZH3o71q.js → PaymentLinkScreen-DrbI3lMH.js} +5 -5
- package/dist/assets/PeopleRoutes-mXGFHp3Z.js +22 -0
- package/dist/assets/PerformanceRoutes-DATOhE_v.js +1 -0
- package/dist/assets/{Preview-6s066EpN.js → Preview-B9tcJoWQ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-MUHRwejb.js → QBOConnectionScreen-RFxms0Wa.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-BFxtthm2.js → ReimbursementApprovalRoutes-C5fSRq-h.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BXCFB-xI.js → ReimbursementApprovalRuleDetailScreen-BRSlUWFS.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-AomTv5z8.js → ReimbursementRoutes-5zTCjNMx.js} +5 -5
- package/dist/assets/{ReportsRoutes-CUQDlOh2.js → ReportsRoutes-Bm7SmFOd.js} +1 -1
- package/dist/assets/RewardsRoutes-BftpYdCc.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-B2Zz8Q8W.js → ScheduleDetailsPrepaidExpensesScreen-Cs3QDcYO.js} +5 -5
- package/dist/assets/ScreenRoutes-Bgg7yoYV.js +2 -0
- package/dist/assets/{SettingsRoutes-CIKlS7WR.js → SettingsRoutes-BIatjdKn.js} +6 -6
- package/dist/assets/{SetupPagesScreen-Drwip476.js → SetupPagesScreen-5LQJzH9k.js} +5 -5
- package/dist/assets/SignInScreen-MYaF1oeQ.js +1 -0
- package/dist/assets/SignOutScreen-BQC-vnXw.js +9 -0
- package/dist/assets/{TaskListScreen-BwBbID9Z.js → TaskListScreen-DDtS1dW-.js} +2 -2
- package/dist/assets/TaskRoutes-DFZky3LW.js +9 -0
- package/dist/assets/TransactionDetailRoutes-BtOvElEM.js +1 -0
- package/dist/assets/{TransactionDetailScreen-R1s2Fj0b.js → TransactionDetailScreen-D-8He79E.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Cc6hdxdW.js → TransactionListRoutes-CA94kxFD.js} +1 -1
- package/dist/assets/{TreasuryRoutes-9B6vJLbh.js → TreasuryRoutes-CBqnYiwq.js} +5 -5
- package/dist/assets/{VendorsRoutes-m5oaZn9_.js → VendorsRoutes-XMGo57cf.js} +10 -10
- package/dist/assets/WiseConfirmationScreen-DL3t64Kq.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CbOETsfG.js → ZeniAccountRoutes-J5QpQxjm.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-AZVgMM5C.js +9 -0
- package/dist/assets/{accountMappingHelper-D7kdjZSp.js → accountMappingHelper-Dz3WGDfz.js} +1 -1
- package/dist/assets/{analytics-CHOlTFyu.js → analytics-C3JIdGJp.js} +1 -1
- package/dist/assets/{analyticsHelper-BCFnQWXb.js → analyticsHelper-isaFMiiy.js} +1 -1
- package/dist/assets/{core-DO2aQ9sC.js → core-CjSjXYyY.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BGunfdyb.js → decodeURIComponentSafe-CL2ts4bS.js} +1 -1
- package/dist/assets/{dnd-C6oCteDZ.js → dnd-DQdg3jZV.js} +1 -1
- package/dist/assets/{empty-BnXjgXTG.js → empty-CHbZ6EKy.js} +1 -1
- package/dist/assets/{empty-BEdZehso.js → empty-CbjHBZe9.js} +1 -1
- package/dist/assets/{emptyVideoElement-DyfqG-Dl.js → emptyVideoElement-DldZjfRN.js} +1 -1
- package/dist/assets/epic-wF-1Nkht.js +2 -0
- package/dist/assets/expenseAutomationHelper-CBURllgC.js +1 -0
- package/dist/assets/{getLocaleForTenant-Bn-3jfmk.js → getLocaleForTenant-CUMk734N.js} +1 -1
- package/dist/assets/{index-BX493DEc.js → index-B-AxVrtB.js} +1 -1
- package/dist/assets/{index-CJp0mZVW.js → index-B95Ul72p.js} +1 -1
- package/dist/assets/{index-D8IL39lv.js → index-BOFTe1v-.js} +1 -1
- package/dist/assets/{index-CqLY6f8A.js → index-BkzgLf7w.js} +1 -1
- package/dist/assets/{index-BpSPKksw.js → index-ByMk-VWt.js} +2 -2
- package/dist/assets/{index-CHVvaLYS.js → index-DT61Dzwo.js} +1 -1
- package/dist/assets/{index-BIf8ZdZy.js → index-DrKuh0N3.js} +1 -1
- package/dist/assets/{index-DtDfc4Ly.js → index-zhznqeY3.js} +14294 -14320
- package/dist/assets/{lexical-Dahvp5A4.js → lexical-DFfYCN7b.js} +1 -1
- package/dist/assets/{liveblocks-DCIY2V5W.js → liveblocks-fvHZHCch.js} +1 -1
- package/dist/assets/{lottie-BsiUbd07.js → lottie-Cmgc5pKa.js} +1 -1
- package/dist/assets/{mui-Beesmy34.js → mui-Cv0Yu4Hx.js} +1 -1
- package/dist/assets/{pathToGoBack-BF0QeMYg.js → pathToGoBack-DWp6jk4n.js} +1 -1
- package/dist/assets/{pdf-Bi1FWCM7.js → pdf-C21rIcNJ.js} +4 -4
- package/dist/assets/{pdf-lib-D-883htS.js → pdf-lib-CeyW0y7u.js} +1 -1
- package/dist/assets/{plaid-IFb-JOAW.js → plaid-B_ZF6XEj.js} +1 -1
- package/dist/assets/{pusher-CZ2f9qiw.js → pusher-YCZIG_Zw.js} +1 -1
- package/dist/assets/{react-BGT56QSM.js → react-BkYlXOI6.js} +1 -1
- package/dist/assets/{react-U8FVY9XX.js → react-CgBiLhFT.js} +1 -1
- package/dist/assets/{react-C009U_vG.js → react-Cmh_nuuS.js} +1 -1
- package/dist/assets/{react-B37EnoMa.js → react-D_MOfVxA.js} +1 -1
- package/dist/assets/{react-BBLrRlBQ.js → react-J2JzrsDb.js} +1 -1
- package/dist/assets/{react-B7Ae5uDO.js → react-LTvMDmLf.js} +1 -1
- package/dist/assets/{recharts-BFgvJAkx.js → recharts-iN3Tsoxx.js} +1 -1
- package/dist/assets/{routePaths-CWDMrD59.js → routePaths-o_RQZUW0.js} +1 -1
- package/dist/assets/{sentry--FQm-CEz.js → sentry-5M-_hQEn.js} +1 -1
- package/dist/assets/{stripSplatSuffix-BjVyO64h.js → stripSplatSuffix-ntc_sS44.js} +1 -1
- package/dist/assets/{url-CYqslED7.js → url-BvDoSxgp.js} +1 -1
- package/dist/assets/{url-aH6bFotI.js → url-CBVoutGU.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-0ydHXgNC.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DOb2Yrjn.js → useAiCfoDashboardSuggestedQuestionsChips-gs_gUo4b.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-ClUKa-x1.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-BzP1s6ty.js → useChargeCardPusherEvents-B_qQWepJ.js} +1 -1
- package/dist/assets/{useDeviceId-04DUxcYB.js → useDeviceId-DcODeIz7.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DETKjPI-.js +1 -0
- package/dist/assets/{useInitialThreadRequest-B_GduCEN.js → useInitialThreadRequest-DvEY1Wx_.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-DgmndGpu.js → useTaskManagerAccess-AyRfKL8F.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-BgO_yohE.js → useTaskManagerPusherEvents-nRX-pAls.js} +1 -1
- package/dist/assets/{utils-9X_P6qcc.js → utils-CSmUhNCi.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CRkrcV_c.js → withTransactionSidePanel-Cimx250C.js} +3 -3
- package/dist/assets/{zeni-epic-state-Cc-xO4DM.js → zeni-epic-state-DbSzv5hl.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-DkKEg9nJ.js +0 -1
- package/dist/assets/AddressScreen-NLlV-cSD.js +0 -9
- package/dist/assets/AiCfoScreen-DUNS2Dhv.js +0 -22
- package/dist/assets/BusinessVerificationPageScreen-BMbooZ9c.js +0 -9
- package/dist/assets/ConnectionAuthScreen-DS5u9yD-.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-C7dVHXwO.js +0 -1
- package/dist/assets/EntityDetailRoutes-Zk-9UMwO.js +0 -1
- package/dist/assets/FeaturePreviewScreen-D1TH0B4H.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-CvYzzQt6.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-Bsg6zj8U.js +0 -12
- package/dist/assets/MobileAppDrawer-C1CX08Nz.js +0 -1
- package/dist/assets/NotFoundScreen-DUP1I-Dh.js +0 -1
- package/dist/assets/NotificationRoutes-b-zZEsBw.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Dh0lrJ4b.js +0 -1
- package/dist/assets/PeopleRoutes-BXk_l6Ng.js +0 -22
- package/dist/assets/PerformanceRoutes-CuBRzzvZ.js +0 -1
- package/dist/assets/RewardsRoutes-D6jHcv01.js +0 -1
- package/dist/assets/ScreenRoutes-BBi6T6TG.js +0 -2
- package/dist/assets/SignInScreen-B2i0uaaw.js +0 -1
- package/dist/assets/SignOutScreen-yXoT_vjf.js +0 -9
- package/dist/assets/TaskRoutes-DkYij_G4.js +0 -9
- package/dist/assets/TransactionDetailRoutes-DmTwl-Oi.js +0 -1
- package/dist/assets/WiseConfirmationScreen-BEME5pnv.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CyFrpw1Y.js +0 -9
- package/dist/assets/epic-Cg7zjUcf.js +0 -2
- package/dist/assets/expenseAutomationHelper-Box0P8C-.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-B3AFBcfZ.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BH1yPMVh.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-6HOW2gqB.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-zhznqeY3.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-5M-_hQEn.js"><link rel="modulepreload" crossorigin href="/assets/core-CjSjXYyY.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-DbSzv5hl.js"><link rel="modulepreload" crossorigin href="/assets/mui-Cv0Yu4Hx.js"><link rel="modulepreload" crossorigin href="/assets/analytics-C3JIdGJp.js"><link rel="modulepreload" crossorigin href="/assets/utils-CSmUhNCi.js"><link rel="stylesheet" crossorigin href="/assets/index-BQ3cXEYt.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/web-app-ui",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.90-dev",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/**/*"
|
|
6
6
|
],
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@sentry/core": "^9.42.1",
|
|
29
29
|
"@sentry/react": "^9.42.1",
|
|
30
30
|
"@stripe/stripe-js": "^4.4.0",
|
|
31
|
-
"@zeniai/client-analytics": "2.1.
|
|
32
|
-
"@zeniai/client-epic-state": "5.2.
|
|
33
|
-
"@zeniai/web-components": "4.4.
|
|
31
|
+
"@zeniai/client-analytics": "2.1.5",
|
|
32
|
+
"@zeniai/client-epic-state": "5.2.85",
|
|
33
|
+
"@zeniai/web-components": "4.4.28",
|
|
34
34
|
"color": "3.1.3",
|
|
35
35
|
"crypto-js": "4.2.0",
|
|
36
36
|
"dnd-core": "^16.0.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DCIY2V5W.js";import{A as i}from"./AddressScreen-NLlV-cSD.js";import s from"./NotFoundScreen-DUP1I-Dh.js";import"./sentry--FQm-CEz.js";import{n as d,o as r}from"./core-DO2aQ9sC.js";import"./zeni-epic-state-Cc-xO4DM.js";import"./recharts-BFgvJAkx.js";import"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.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]="81cbb5c1-1b56-4d87-a240-ae6c03b91825",t._sentryDebugIdIdentifier="sentry-dbid-81cbb5c1-1b56-4d87-a240-ae6c03b91825")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-DCIY2V5W.js";import{a as S}from"./sentry--FQm-CEz.js";import{h as A,u as P,g as j,i as E,j as V,l as $}from"./core-DO2aQ9sC.js";import{$ as B,z as L,V as M,a5 as D,a6 as K,l as C,O as b,a1 as U,T as h,a2 as z}from"./index-DtDfc4Ly.js";import{VT as _,it as F,fI as O,VU as R,c9 as G,VV as N,mL as q}from"./zeni-epic-state-Cc-xO4DM.js";import{u as H,n as J}from"./mui-Beesmy34.js";import Q from"./NotFoundScreen-DUP1I-Dh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="899d4349-db75-4baf-986c-78bf6fe53b0c",e._sentryDebugIdIdentifier="sentry-dbid-899d4349-db75-4baf-986c-78bf6fe53b0c")}catch{}})();const W=J.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,X=$((function(e,s){const{addressId:o,isSubPage:i,addressType:c}=s,l=O(e),a=s.roleMap!=null&&R(s.roleMap),d=i||c==="user_address"||G(l?.userRole??[])||a?void 0:"readonly";if(o==null){const t=N(c,e);return{addressToEdit:t?.addressToCreate,loadingState:t?.status?.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d,isSubPage:i,dontShowSaveConfirmationPopup:s.dontShowSaveConfirmation}}const r=_(e,o);return{addressToEdit:r.address,loadingState:r.fetchState,googleAPIKey:h.googleMapsAPIKey,isDisabled:d}}),(function(e,s){const{navigate:o,location:i,addressType:c}=s,l=a=>{if(a==="express-pay")o("../express-pay/add-wire");else{const d=i.state,r=z(d?.pathnameStackToGoBack);let t=r.poppedPathname??v();const u=d?.queryParams;if(u){const g=new URLSearchParams(u).toString();g&&(t=`${t}?${g}`)}o(t,{state:{pathnameStackToGoBack:r.newStack}})}};return{onSubmitHandler:a=>{const d=Y(a);e(q({addressType:c,addressToCreate:d})),C?.trackSaveAddressClicked(b.Event.saveAddressClicked,{street:a.street.addressString,city:a.city,state:a.state,country:a.country.selectedOption??"",postalCode:a.postalCode,suite:a.suite,secondaryInfo:a.secondaryInfo}),l(s.bankAccountContext)},onCancel:()=>{l(s.bankAccountContext)}}}))(U);function ne({isSubPage:e,hideAddressSubTitle:s=!1,hideAddressBackButton:o=!1,dontShowSaveConfirmation:i,accountContext:c,addressTypeParam:l}){const a=A(),d=P(),r=j(),{addressId:t,addressType:u}=E(),g=B(),w=H(),I=L.getSignedInUser(),[f,T]=S.useState(t==null),p=V((m=>t!=null?_(m,t).fetchState:"Not-Started")),k=M();if(I==null)throw Error("Can't access address page without signing in...");const x=m=>m.trackPageLoaded(t!=null?b.Event.editAddress:b.Event.addAddress),y=l??u;return S.useEffect((()=>{f||t==null||(T(!0),d(F(t,!1)))}),[f,t,d]),y==null||y.match(/(user_address|company_address|company_registered_address|vendor_address|officer_([1-9]|10)_address|invoicing_customer_billing_address|invoicing_subscription_shipping_address|invoicing_business_address)$/g)?!f&&p==="Not-Started"||f&&p==="In-Progress"?n.jsx(D,{fetchState:p,style:{backgroundColor:w.colors.grey5}}):t!=null&&p==="Error"?(a(`${v(1)}/new`,{replace:!0}),n.jsx(n.Fragment,{})):n.jsxs(n.Fragment,{children:[n.jsx(K,{analytics:C,onLoad:x}),n.jsx(W,{windowSize:g,children:n.jsx(X,{location:r,navigate:a,isSubPage:e===!0,hideAddressBackButton:o,hideAddressSubTitle:s,addressId:t,addressType:y,dontShowSaveConfirmation:i,bankAccountContext:c,roleMap:k?.loggedInUserRoleMap})})]}):n.jsx(Q,{})}const v=(e=2)=>{let s="../";for(let o=0;o<e;o++)s=`${s}../`;return s},Y=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng});export{ne as A,Y as t};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as S}from"./liveblocks-DCIY2V5W.js";import{a as n}from"./sentry--FQm-CEz.js";import{u as Dt,h as Lt,i as Bt,g as Ft,j as v,l as Mt}from"./core-DO2aQ9sC.js";import{e4 as $t,a as Nt,j as Vt,e5 as Gt,z as Ht,$ as qt,e6 as zt,e7 as Wt,e8 as Yt,bn as Be,e9 as We,ea as Jt,bm as Ye,a2 as ge,a6 as ce,l as $,eb as me,ec as Zt,ed as Kt,as as Xt,O as es,w as ts,ee as ss,ef as ns,at as as,eg as os,eh as is,ei as rs,ej as ls,p as us,bi as Fe,ek as ds}from"./index-DtDfc4Ly.js";import{fH as M,gw as R,UB as cs,a2R as ms,a2S as Ss,jQ as hs,a2T as ps,jN as fs,a2U as Se,jt as J,jW as Z,jz as Ie,jg as he,je as gs,jY as Is,jI as Je,UK as Me,gy as N,gN as Cs,UJ as ks,Uu as $e,fI as bs,j7 as vs,a2V as Es,gb as Ps,jp as ws,jl as ys,fJ as pe,gi as xs,a2W as Rs,a2X as Ts,a2Y as js,gx as Os,gr as Ne,k8 as Ve,gt as Ge,gz as As,a2Z as He,jZ as Us,ji as _s,jC as Qs,jU as qe,jF as Ds,gA as Ls,gB as Bs,gC as Fs,gD as Ms}from"./zeni-epic-state-Cc-xO4DM.js";import{D as $s,n as V,S as Ns,v as Vs}from"./mui-Beesmy34.js";import{u as Gs}from"./useAiCfoDashboardSuggestedQuestionsChips-DOb2Yrjn.js";import{p as Hs}from"./pathToGoBack-BF0QeMYg.js";import{j as qs}from"./routePaths-CWDMrD59.js";import{u as zs}from"./useTaskManagerPusherEvents-BgO_yohE.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="92bb557a-4fd8-4e7c-93db-46438820c9b5",t._sentryDebugIdIdentifier="sentry-dbid-92bb557a-4fd8-4e7c-93db-46438820c9b5")}catch{}})();const Ws=["claimed","running","succeeded","failed","timeout"],fe=t=>typeof t=="string"&&t!=="",Ze="chat-response-generated";function Ys(t,r){if(r.kind!=="save")return;if(r.fetchState==="In-Progress")return{status:"saving"};if(r.fetchState==="Error")return{status:"failed"};if(r.fetchState!=="Completed")return;const h=R(t).skills.find((s=>s.macroId===r.savedMacroId));return h==null?void 0:{status:"saved",command:h.name}}const Js=Mt((function(t,r){const h=M(t),s=r.isSubmitting,d=h.uiState?.currentChatSessionId,l=d!=null?xs(t.aiCfoState,d):[],i=ns(t,{allUsers:r.allUsers,onCardPolicyVendorSearchTextChange:r.onCardPolicyVendorSearchTextChange}),g=Rs(t),p=Ts(t),f=js(t);return{showSampleQuestions:r.sessionFromUrl==="explore"&&h.uiState.currentChatSessionId==null,aiCfoView:h,isSubmitting:s,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${as}/tableDownload`,exportDownloadEndPoint:rs(),emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,routedInitialQuestionSource:r.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:r.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:r.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:r.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose,skills:R(t).skills,skillSaveState:Ys(t,f),skillsEnabled:R(t).skillsEnabled,skillsList:R(t).skills,skillsListError:R(t).fetchState==="Error",skillsListLoading:R(t).fetchState==="In-Progress",skillsCanPublish:R(t).canPublish,skillSaving:f.fetchState==="In-Progress",skillSaveError:f.fetchState==="Error",skillVersionHistory:g.macroId!=null?{macroId:g.macroId,versions:g.versions,error:g.fetchState==="Error",loading:g.fetchState==="In-Progress"}:void 0,skillRestoreBody:p.macroId!=null&&p.version!=null?{macroId:p.macroId,version:p.version,instructions:p.instructions,error:p.fetchState==="Error",loading:p.fetchState==="In-Progress"}:void 0,skillDetail:Z(t).detail,skillDetailError:Z(t).fetchState==="Error",skillDetailLoading:Z(t).fetchState==="In-Progress",syntheticAnswers:l,resolveSyntheticAnswerCardTile:is(t),resolveSyntheticAnswerPolicyTile:os(t),...i}}),(function(t,r){const{location:h,currentTenant:s,userId:d,navigate:l,currentChatSessionId:i,allSessionsWithOrderedQuestionAnswers:g,isAiCardCreationEnabled:p,isCardPolicyEnabled:f,setIsAiCfoOpen:L}=r,B=s.tenantEmailDomain;return{onEventReceived:(a,o)=>{if(a===Ze&&typeof o.text=="string"&&typeof o.metadata=="object"){const c=o,j=Ls(c.type),E=c.metadata.chat_session_id??null,{currentChatSession:O,currentQuestionAnswer:G,currentQuestionAnswerSummary:A}=Ye(g,E);j!=="answer"?$.trackAICFOChatResponseGenerated(j,G?.question.questionText??"",c.text,E,ds(A,O),c.metadata.message_id??null):$.trackAICFOChatAnswerGenerated(c.text,G?.question.questionText??"",(c.follow_up_questions?.length??0)>0,!!c.assumptions,!!c.insights,c.visualization!=null,Bs(c.visualization?.type??"")??null,E,c.summarized_title,c.metadata.message_id??null),t(Fs({chatSessionId:c.metadata.chat_session_id,responseType:j,fetchState:{fetchState:"Completed",error:void 0}})),t(Ms({chatSessionId:c.metadata.chat_session_id,answerPayload:c,userId:d}))}},onSubmit:(a,o,c,j,E)=>{a&&Fe(t,a,o,i,g,d,j,c,void 0,E)},onFetchSkills:()=>{t(Je())},onOpenSkill:a=>{t(Ie({macroId:a})),t(Ds({macroId:a}))},onSaveSkill:(a,o)=>{t(qe({draft:a,macroId:o}))},onSaveSkillDraft:a=>{const o=a.displayName?.trim()??"",c=a.name?.trim()??"";t(qe({draft:{name:o.length>0?o:c,description:a.description?.trim()??null,instructions:a.instructions,visibility:"private"}}))},onFetchSkillVersionBody:(a,o)=>{t(Qs({macroId:a,version:o}))},onDeleteSkill:a=>{t(_s({macroId:a}))},onSetSkillVisibility:(a,o)=>{t(Us({macroId:a,visibility:o}))},onCloseSkillDetail:()=>{t(He())},onRunSkill:(a,o)=>{t(N()),t(Ne()),Fe(t,o,"user_input",void 0,g,d,void 0,void 0,void 0,a),t(He())},updateCurrentInput:a=>{t(Ge(a))},onStopSubmit:()=>{},onUpdateScrollYOffset:a=>{t(As(a))},onSelectSampleQuestion:()=>{},onBackClick:()=>{l(-1)},onCloseClick:()=>{const a=ge(h.state?.pathnameStackToGoBack),o=a.poppedPathname??Hs(1);l(o,{state:{...h.state,pathnameStackToGoBack:a.newStack}}),t(Ge(""))},togglePageView:()=>{const a=ge(h.state?.pathnameStackToGoBack),o=a.poppedPathname??`/${s.tenantEmailDomain}/dashboard`;l(o,{state:{...We(h.state),pathnameStackToGoBack:a.newStack,message:"open_ai_cfo_drawer"}}),L(!0)},onCopy:()=>{},onThumbsUp:(a,o)=>{i!=null&&o?.messageId!=null&&t(Ve(i,o.messageId,"positive",o.questionText,o.answerText))},onThumbsDown:(a,o)=>{i!=null&&o?.messageId!=null&&t(Ve(i,o.messageId,"negative",o.questionText,o.answerText))},onTogglePageView:()=>{l(-1)},onNewChatClick:()=>{t(N()),i!=null&&t(Ne());const a=us(h.state?.pathnameStackToGoBack,h.pathname);l(`/${s.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:a.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(a,o)=>{t(Os({questionAnswerId:a,isCollapsed:o}))},onMenuClick:r.onMenuClick,...ls(t,{isAiCardCreationEnabled:p,isCardPolicyEnabled:f,currentChatSessionId:i,onAfterCardsCreationSubmit:()=>{L(!0),l(`/${B}/cards`,{state:{...h.state}})},onAfterCardPolicySubmit:()=>{L(!0),l(`/${B}/cards/policy`,{state:{...h.state}})}})}}))(ts(ss)),bn=({isFileUploadEnabled:t})=>{const r=$t(),{setIsAiCfoOpen:h}=Nt(),s=Dt(),d=Lt(),{session_id:l}=Bt(),i=Ft(),g=new URLSearchParams(i.search).get("routine")??void 0,[p,f]=n.useState(!1),L=v((e=>M(e).uiState.isSkillsBrowserOpen===!0)),B=v((e=>R(e).skillsEnabled)),a=v((e=>M(e).uiState.isRoutinesBrowserOpen===!0)),o=v((e=>cs(e))),c=v((e=>ms(e))),j=v((e=>Ss(e))),[E,O]=n.useState(void 0),[G,A]=n.useState(!1),[Ke,Ce]=n.useState(void 0),Xe=n.useCallback((()=>{Ce(void 0),O(void 0),A(!0)}),[]),et=n.useCallback((e=>{O(e),A(!0)}),[]),tt=n.useCallback((()=>{O(void 0),A(!1)}),[]),st=n.useCallback((e=>{s(hs({draft:e,...E!=null&&{scheduleId:E.scheduleId}})),O(void 0),A(!1)}),[s,E]),P=g,ke=o.routines.find((e=>e.scheduleId===P)),C=v((e=>ps(e))),nt=n.useCallback((e=>{s(fs({scheduleId:e.scheduleId}))}),[s]);n.useEffect((()=>{s(P!=null?J({scheduleId:P}):Se())}),[s,P]);const F=ke?.macroId,at=v((e=>Z(e))),be=F!=null&&F!==""&&at.fetchState==="Not-Started";n.useEffect((()=>{be&&F!=null&&s(Ie({macroId:F}))}),[s,be,F]);const ot=v((e=>M(e).uiState.currentChatSessionId))??l,k=o.routines.find((e=>e.scheduleId===g))??o.routines.find((e=>e.scheduleId===Vt(ot))),T=k?.scheduleId??null,[ve,it]=n.useState(!0);n.useEffect((()=>{T!=null&&s(J({scheduleId:T}))}),[s,T]);const Ee=C.runs.some((e=>e.status==="claimed"||e.status==="running"))===!0;n.useEffect((()=>{if(P==null||Ee!==!0)return;const e=window.setInterval((()=>{s(J({scheduleId:P})),s(he())}),5e3);return()=>window.clearInterval(e)}),[s,Ee,P]);const rt=n.useCallback((e=>{Ce(e),O(void 0),A(!0)}),[]),lt=n.useCallback((e=>{s(gs({scheduleId:e.scheduleId}))}),[s]),ut=n.useCallback(((e,m)=>{s(Is({enabled:m,scheduleId:e.scheduleId}))}),[s]);n.useEffect((()=>{a&&s(he())}),[s,a]);const Pe=v((e=>R(e).skills)),K=n.useMemo((()=>Pe.map((e=>({macroId:e.macroId,name:e.displayName??e.name})))),[Pe]),dt=n.useCallback((e=>{s(Ie({macroId:e}))}),[s]),X=n.useCallback((()=>{s(Je()),s(Me())}),[s]),ct=n.useCallback((()=>{s(N())}),[s]),{allUsers:mt,isAiCardCreationEnabled:St,isCardPolicyEnabled:ht,onCardPolicyVendorSearchTextChange:pt}=Gt();n.useEffect((()=>{s(Cs())}),[s]);const I=v((e=>M(e))),y=Ht.getSignedInUser();n.useEffect((()=>l==="routines"?(s(N()),void s(ks())):l==="skills"?(s(Se()),s($e()),void s(Me())):(T==null&&s(Se()),s($e()),void s(N()))),[s,T,g,l]);const ft=qt(),U=Xt(ft),b=v((e=>bs(e))),u=I.uiState.currentChatSessionId,w=b.tenantEmailDomain,D=w!=null&&w!=="",ee=n.useCallback((e=>{D&&d(`/${w}/ai-cfo/routines?routine=${encodeURIComponent(e.scheduleId)}`)}),[D,d,w]),te=n.useCallback((()=>{D&&d(`/${w}/ai-cfo/routines`)}),[D,d,w]),se=n.useCallback(((e,m)=>{const _=e.sessionId??C.sessionId;_!=null&&D&&d(`/${w}/ai-cfo/${_}?routine=${encodeURIComponent(m)}`)}),[D,d,C.sessionId,w]),gt=n.useMemo((()=>k==null?void 0:{error:C.fetchState==="Error",kind:"routineRuns",loading:C.fetchState==="In-Progress"||C.fetchState==="Not-Started",routineName:k.name,schedule:zt(k),skillName:k.isAdHoc===!0?void 0:K.find((e=>e.macroId===k.macroId))?.name,onOpenSkill:k.isAdHoc===!0?void 0:X,runs:C.runs,tzName:k.tzName,unreadCount:k.unreadRuns,open:ve,onToggle:()=>it((e=>!e)),onOpenRun:e=>se(e,k.scheduleId),onOpenRoutine:()=>ee(k),onOpenRoutines:te}),[X,te,ee,se,ve,k,C.fetchState,C.runs,K]),{handleUploadPromoClose:It,isUploadPromoVisible:Ct}=Wt({isFileUploadEnabled:t,tenantEmailDomain:w}),ne=Yt({currentTenant:b,currentChatSessionId:u,aiCfoView:I,skillsEnabled:B,onCloseSkills:ct,onOpenSkills:X}),{isSuggestedQuestionsLoading:kt,suggestedPromptQuestions:bt}=Gs(),H=i.state,q=H?.aiCfoInitialQuestion,we=!!H?.aiCfoShouldSubmit;n.useEffect((()=>{const e=i.state;if(e?.[Be]!==!0)return;f(!0);const m={...e};delete m[Be],d(i,{replace:!0,state:m})}),[i.pathname,i.search,i.state,d]);const[vt,ae]=n.useState(null),[Et,oe]=n.useState(!1),[Pt,ie]=n.useState(void 0),[wt,re]=n.useState(void 0),ye=n.useRef(!1);n.useEffect((()=>{if(!ye.current&&q!=null&&q!==""){const e=i.state;ae(q),oe(we),ie(e?.aiCfoInitialSubmissionSource!=null?e.aiCfoInitialSubmissionSource:void 0);const m=e?.aiCfoSuggestionIndex;re(typeof m=="number"?m:void 0),ye.current=!0}}),[q,we,i.state]);const yt=n.useCallback((()=>{ae(null),oe(!1),ie(void 0),re(void 0),d(i.pathname,{replace:!0,state:We(i.state)})}),[i.pathname,i.state,d]),xe=n.useMemo((()=>new URLSearchParams(i.search)),[i.search]),Re=xe.get("ref")??H?.aiCfoRef,le=xe.get("emailRefId")??H?.aiCfoEmailRefId,Te=n.useRef(!1);n.useEffect((()=>{Te.current||Re!=="month-end-email"||le==null||u!=null||y==null||(s(vs("controller",y.userId,le,"MONTH_END_EMAIL")),Te.current=!0)}),[Re,le,u,s,y]);const z=I.uiState.lastContextMessage;n.useEffect((()=>{z!=null&&z!==""&&u!=null&&(ae(z),oe(!0),ie(void 0),re(void 0),s(Es()))}),[z,u,s]);const xt=b.masterTOSInfo,x=xt?.isMasterTOSAccepted??!1,{visitedSessions:je}=Jt(u),W=I.fetchState,Y=I.uiState.chatSessionsNextPageToken.hasMore||!I.uiState.chatSessionsFirstPageFetched,Oe=u!=null?I.fetchChatSessionHistoryByChatSessionId?.[u]?.fetchState??"Not-Started":"Not-Started",Ae=u==null||(I.uiState.chatHistoryNextPageToken[u]?.hasMore??!0),Ue=I.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Rt}=Ye(Ue,u),Tt=Rt.length===0;n.useEffect((()=>{x||U||d("../dashboard",{state:{...i.state,message:"open_ai_cfo_drawer"}})}),[x,U,d,i.state]);const jt=n.useCallback((()=>{const e=ge(i.state?.pathnameStackToGoBack),m=b.tenantEmailDomain;d(e.poppedPathname??(m!=null?`/${m}/dashboard`:".."),{state:{...i.state,pathnameStackToGoBack:e.newStack}})}),[b.tenantEmailDomain,i.state,d]),_e=n.useRef(void 0),Qe=n.useRef(void 0);n.useEffect((()=>{const e=l!==_e.current,m=u!==Qe.current;_e.current=l,Qe.current=u,l!==u&&(!e||l==null||qs(l)?m&&u!=null&&d(`../ai-cfo/${u}`,{state:{...i.state}}):s(Ps({sessionId:l,agentId:"controller"})))}),[u,l]);const Ot=n.useMemo((()=>({events:je.map((e=>`private-encrypted-chat-${e}.${Ze}`)),eventCallback:(e,m,_)=>_.onEventReceived(e,m)})),[je]);n.useEffect((()=>{W!=="In-Progress"&&Y&&s(ws())}),[W,Y,s]),n.useEffect((()=>{u!=null&&Oe!=="In-Progress"&&Ae&&y!=null&&(l===u||W==="Completed"&&!Y)&&s(ys(u,y.userId))}),[Oe,W,Ae,Y,u,y,l,s]);const ue=y?.userId,At=n.useMemo((()=>{return ue==null?[]:[(e=ue,`private-encrypted-routines-${e}.routine-run-updated`)];var e}),[ue]),De=n.useCallback((e=>{const m=e!=null&&(e===P||e===T);(a||m)&&s(he()),m&&s(J({scheduleId:e}))}),[s,a,T,P]);zs({events:At,onSubscribed:()=>De(P??T),onEvent:(e,m)=>{const _=(de=>{if(de==null||typeof de!="object")return null;const Q=de;return fe(Q.schedule_id)&&fe(Q.run_id)?{scheduleId:Q.schedule_id,runId:Q.run_id,status:Ws.find((Qt=>Qt===Q.status))??null,finishedAt:fe(Q.finished_at)?Q.finished_at:null}:null})(m);_!=null&&De(_.scheduleId)}});const Le=e=>e.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(y==null||l==null)throw Error("Can't access AI Controller page without signing in...");const Ut=u!=null&&I.responseStateByChatSessionId?.[u]?.answer?.fetchState==="In-Progress";if(!x&&U)return S.jsxs(Ks,{children:[S.jsx(ce,{analytics:$,onLoad:Le}),ne.drawerElement,S.jsx(Xs,{children:S.jsx(ze,{children:S.jsx(me,{isTOSAccepted:!1,acceptMasterTOSState:I.masterTOSAcceptanceState,onCloseClick:jt,onCompleteClick:()=>{b.userRoleId!=null&&s(pe(b.userRoleId))}})})})]});const _t=S.jsxs(S.Fragment,{children:[p&&!x?S.jsx(ce,{analytics:$,onLoad:Le}):null,S.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:I.masterTOSAcceptanceState,showHeader:!1,togglePageView:x?()=>f(!1):void 0,onCloseClick:()=>f(!1),onCompleteClick:()=>{x||b.userRoleId==null||s(pe(b.userRoleId)),f(!1)}})]});return S.jsxs(S.Fragment,{children:[S.jsxs(Zs,{children:[S.jsx(ce,{analytics:$,onLoad:e=>e.trackPageLoaded(es.Event.aiCFOPage)}),U&&ne.drawerElement,S.jsx(Js,{answerExportEndPoint:r,...Ot,currentChatSessionId:u,allSessionsWithOrderedQuestionAnswers:Ue,allUsers:mt,isAiCardCreationEnabled:St,isCardPolicyEnabled:ht,openOnboardingPage:()=>f(!0),userId:y.userId,setIsAiCfoOpen:h,navigate:d,sessionFromUrl:l,location:i,isSubmitting:Ut,isEmptyChatWithSession:Tt,currentTenant:b,emailLinkQuestion:vt??void 0,autoSubmitEmailLinkQuestion:Et,onEmailLinkQuestionProcessed:yt,routedInitialQuestionSource:Pt,routedInitialQuestionSuggestionIndex:wt,onCardPolicyVendorSearchTextChange:pt,onMenuClick:U?ne.open:void 0,isFileUploadEnabled:t,isUploadPromoVisible:Ct,onUploadPromoClose:It,exploreSuggestedPromptQuestions:bt,exploreSuggestedPromptQuestionsLoading:kt,isSkillsOpen:L,isRoutinesOpen:a,routineCanCreate:j,routineEditing:E,routineEditorOpen:G,routineListError:o.fetchState==="Error",routineListLoading:o.fetchState==="In-Progress",routineMaxRoutines:o.maxRoutines,routineSaveError:c.fetchState==="Error",routineSaving:c.fetchState==="In-Progress",routineSchedulableSkills:K,routines:o.routines,onRoutineCreate:Xe,onRoutineDelete:lt,routineHistoryError:C.fetchState==="Error",routineHistoryLoading:C.fetchState==="In-Progress",chatSidePanel:gt,routineDetail:ke,routineRunningScheduleId:c.runningScheduleId,routineRuns:C.runs,onRoutineEdit:et,onRoutineOpenRun:(e,m)=>se(m,e.scheduleId),onRoutineRun:nt,onRoutineCloseDetail:te,onRoutineDraft:rt,routineDraftPrompt:Ke,onRoutineOpenDetail:ee,onRoutineEditorCancel:tt,onRoutineLoadSkillInstructions:dt,onRoutineSave:st,onRoutineSetEnabled:ut,isCreateSkillEnabled:B,promoDismissalScope:w}),p&&U?S.jsx($s,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:en,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:S.jsx(ze,{onClick:e=>e.stopPropagation(),children:S.jsx(me,{isTOSAccepted:x,acceptMasterTOSState:I.masterTOSAcceptanceState,onCloseClick:()=>f(!1),onCompleteClick:()=>{x||b.userRoleId==null||s(pe(b.userRoleId)),f(!1)}})})}):null]}),p&&!U?S.jsx(Zt,{open:p,onClose:()=>f(!1),children:S.jsx(Kt,{children:_t})}):null]})},ze=V(Ns)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Zs=V.div`
|
|
6
|
-
height: 100vh;
|
|
7
|
-
width: 100%;
|
|
8
|
-
`,Ks=V.div`
|
|
9
|
-
height: 100vh;
|
|
10
|
-
width: 100%;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
min-height: 0;
|
|
14
|
-
`,Xs=V.div`
|
|
15
|
-
flex: 1;
|
|
16
|
-
min-height: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
`,en=V(Vs)`
|
|
20
|
-
box-shadow: ${({theme:t})=>t.colors.elevation2};
|
|
21
|
-
color: ${({theme:t})=>t.colors.grey4};
|
|
22
|
-
`;export{bn as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./sentry--FQm-CEz.js";import{u as W,j as b,h as se,g as oe,i as ie,N as re,l as ce}from"./core-DO2aQ9sC.js";import{fI as L,I0 as ue,Ie as de,Lq as pe,Og as le,OW as me,PL as fe,ZF as ye,B$ as Se,SQ as ge,ZG as Ie,ZH as be,ZI as he,ZJ as Te,ZK as De,ZL as Oe,VU as Ce,YL as ke,W7 as Ve,MC as Ae,Mu as we,W8 as Fe,My as Ne,mL as ve,gJ as _e,gI as Ee,gH as xe,v2 as Be,uV as Le,uS as ze,mD as Re,C8 as Pe,C6 as z,bF as R,Ck as P,cF as Me}from"./zeni-epic-state-Cc-xO4DM.js";import{bR as Ue,V as Ze,W as je,bg as Ge,z as B,a6 as We,l as M,q as E,O as x,bT as qe,ac as Ke,p as U,aE as Z}from"./index-DtDfc4Ly.js";import{n as $e}from"./mui-Beesmy34.js";import{j as A}from"./liveblocks-DCIY2V5W.js";import{d as j}from"./routePaths-CWDMrD59.js";import{M as He}from"./MobileAppDrawer-C1CX08Nz.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]="e484b8fd-f80a-494d-8e18-53df85b864c8",e._sentryDebugIdIdentifier="sentry-dbid-e484b8fd-f80a-494d-8e18-53df85b864c8")}catch{}})();function it(){const e=W(),r=b((u=>L(u))),a=r?.tenantId,{isApprovalRulesV3Enabled:s,isLoading:p}=Ue(a),l=b((u=>u.billPaySetupApproverViewState.fetchState));C.useEffect((()=>{a==null||p||l==="Not-Started"&&e(ue(!0,!0,s))}),[a,p,s,l,e])}function G(e,r,a,s=!1){switch(r){case"zeni_accounts":e(fe(a,!0,s));break;case"zeni_treasury":e(me(a,!0,s));break;case"reimbursement":e(le(a,!0,s));break;case"charge_cards":e(pe(a,!0,s));break;default:e(de(a,!0,s))}}const Je=$e.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Qe=ce((function(e,r){const{businessVerificationDetails:a}=r,s=L(e),p=B.getSignedInUser(),l=s.tenantId,u={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:l??""},h=Ce(r.roleMap)&&a.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",t=ke(e.companyConfigState),o=Ve(e.userRoleConfigState);return{businessVerificationDetails:a,verficationDetailsFetchState:a.fetchState,isRefreshingViewInBackground:a.isRefreshingViewInBackground,allNationalityCountries:a.allNationalityCountries,filesEndPoint:`${Ke.fileMicroServiceBaseUrl}`,authParams:u,isDisabled:h,allIndustries:t.companyIndustries??[],companyTitles:o.companyTitles}}),(function(e,r){const{companyId:a,productType:s,currentTenant:p,navigate:l,location:u}=r,{tenantEmailDomain:h}=p;return{onCompanyDetailsChanged:t=>{const{companyDescription:o,companyIndustry:m,companyIndustryType:k,companyLegalName:V,companyTaxId:y,companyWebsite:f,companyPhone:S,primaryContactEmail:d,primaryContactName:i,primaryContactUserId:T,primaryContactSyncToken:D,syncToken:c,fileIds:O,incDate:n,typeOfIncorporation:g,stateOfIncorporation:w,sourceOfFunds:F,companySubIndustry:N,countriesOfOperations:I,companySourceOfFunds:q,companySourceOfFundsDescription:K,transactionVolume:$,transactionVolumeDescription:H,purposeOfAccount:J,purposeOfAccountDescription:Q,regulatedStatus:Y,regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te}=t,v=k?.selectedOption,ae={companyId:a,companyDescription:o,companyIndustry:m.selectedOption,companyIndustryType:v==null||v===""?void 0:v,companyLegalName:V,taxIdOrEIN:y,website:f!=""&&f!=null?Me(f):void 0,phone:S,syncToken:c,fileIds:O,incDate:n!=null?R(n?.toString()):n,typeOfIncorporation:g?.selectedOption??"",stateOfIncorporation:w?.selectedOption??"",sourceOfFunds:F?.selectedOption??"",companySubIndustry:N?.selectedOption??"",countriesOfOperations:I?.selectedOptions.map((_=>_.length===2?_:Z(_)))??[],companySourceOfFunds:q?.selectedOption??"",companySourceOfFundsDescription:K,transactionVolume:$?.selectedOption??"",transactionVolumeDescription:H,purposeOfAccount:J?.selectedOption??"",purposeOfAccountDescription:Q,regulatedStatus:Y??"",regulatedStatusDescription:X,usNexus:ee,usNexusTypes:te?.selectedOptions??[]},ne={userId:T,firstName:i.firstName,lastName:i.lastName,email:d,syncToken:D};e(P({companyDetails:ae,primaryContactDetails:ne}))},onCompanyOfficerUpdated:t=>{const o=t.map((m=>{const{officerType:k,userId:V,name:y,email:f,nationalityCountryCode:S,ssn:d,dob:i,phone:T,syncToken:D,selectDocument:c,role:O,ownership:n,isSelectedForVerification:g,userVerificationStatus:w,treasuryUserVerificationStatus:F,fileIds:N}=m;let I;return c.selectDocumentType==="driverLicense"?I="driving_license":c.selectDocumentType==="passport"?I="passport":c.selectDocumentType==="stateId"?I="id_document":c.selectDocumentType==="ssnCard"&&(I="social_security_card"),{officerType:k,userId:V,firstName:y.firstName,lastName:y.lastName,email:f,ssn:d,nationalityCountryCode:S?.selectedOption!=null?Z(S.selectedOption):void 0,phone:T,birthday:i!=null?R(i?.toString()):i,syncToken:D,titleAtCompany:O.selectedOption,ownershipInCompany:n,documentTypeSelectedForVerification:I,isSelectedForVerification:g,userVerificationStatus:w,treasuryUserVerificationStatus:F,fileIds:N,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(P({officers:o}))},onSaveDetailsClick:t=>{e(z(a,t,s))},onSendForVerificationClick:t=>{e(z(a,t,s,!0))},onAddressClick:t=>{const o=j(h,t),m=U(u.state?.pathnameStackToGoBack,u.pathname);l(o,{state:{pathnameStackToGoBack:m}})},onRegisteredAddressClick:t=>{const o=j(h,t),m=U(u.state?.pathnameStackToGoBack,u.pathname);l(o,{state:{pathnameStackToGoBack:m}})},onBackClick:()=>{e(Pe({companyId:a})),l("../setup")},updateFilesEntity:t=>{e(Re({files:t}))},onDeleteFile:t=>{e(ze(t))},onDeleteFileList:t=>{e(Le(t))},onEditFileName:(t,o)=>{e(Be(t,o.split(".")[0]))},onGetOtp:t=>{e(xe(t,"SpendManagementSetup"))},onResendOtp:t=>{e(Ee(t,"SpendManagementSetup"))},onVerifyOtp:(t,o)=>{e(_e(t,o,"SpendManagementSetup"))},saveNewAddressInLocalStore:(t,o)=>{e(ve({addressType:t,addressToCreate:o}))},onIdentityDocumentUploadedForAutofill:t=>{if(a==null)return;const o=Fe(t.documentType);o!=null&&e(Ne({target:"setup",companyId:a,officerType:t.officerType,fileId:t.fileId,documentType:o}))},onCompanyDocumentUploadedForAutofill:t=>{a!=null&&e(we({target:"setup",companyId:a,fileId:t.fileId,documentType:t.documentType}))},onResetKycKybClick:()=>{e(Ae())}}}))(qe),rt=({productType:e})=>{const r=se(),a=oe(),s=W(),[p,l]=C.useState(!1),[u,h]=C.useState(!1),{tenantEmailDomain:t}=ie(),o=Ze(),{useDynamicConfig:m}=je(),{configValue:k}=m(Ge.zeniAccountsConfig),V=ye(k),y=b((n=>{switch(e){case"zeni_accounts":return n.zeniAccountSetupViewState.fetchState;case"reimbursement":return n.remiSetupViewState.fetchState;case"charge_cards":return n.chargeCardSetupViewState.fetchState;case"zeni_treasury":return n.treasurySetupViewState.fetchState;default:return n.billPaySetupViewState.fetchState}})),f=b((n=>n.companyConfigState.fetchState)),S=b((n=>n.userRoleConfigState.fetchState)),d=b((n=>L(n))),i=d.companyId??B.getSignedInUserTenant(t)?.companyId;C.useEffect((()=>{f==="Not-Started"&&s(Se()),S==="Not-Started"&&s(ge(!0))}),[f,S,s]),C.useEffect((()=>{p||y!=="Not-Started"||i==null||(l(!0),G(s,e,i))}),[p,y,i,s]);const T=b((n=>{switch(e){case"zeni_accounts":return De(n,i);case"zeni_treasury":return Te(n,i);case"charge_cards":return he(n,i);case"reimbursement":return be(n,i);default:return Ie(n,i)}})),D=T.kycKybResetStatus.fetchState;if(C.useEffect((()=>{D==="Completed"&&i!=null&&(G(s,e,i,!0),s(Oe()))}),[D,i,e,s]),B.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let c;switch(e){case"zeni_accounts":c=d.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":c=d.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":c=d.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||d.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":c=d.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:c=d.companyBillPayInfo?.info?.isBillPayTOSAccepted}const O=n=>{h(n)};return c===!1?A.jsx(re,{to:"../promo"}):A.jsxs(Je,{children:[A.jsx(We,{analytics:M,onLoad:n=>(g=>{switch(e){case"zeni_accounts":return g.trackPageLoaded(x.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return g.trackPageLoaded(x.Event.reimbursementBusinessVerification);default:return g.trackPageLoaded(x.Event.billPayBusinessVerification,E(a)?"Settings":void 0)}})(n)}),E(a)?A.jsx(He,{isAppContentDrawerOpen:u,handleDrawerToggle:O}):null,A.jsx(Qe,{businessVerificationDetails:T,navigate:r,location:a,companyId:i,analytics:M,currentTenant:d,productType:e,isSettings:E(a),roleMap:o?.loggedInUserRoleMap??{},onClickMenuIcon:()=>{O(!0)},maxInsuredAmount:V.maxInsuredAmount})]})};export{rt as B,G as d,it as u};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-DCIY2V5W.js";import{a as o}from"./sentry--FQm-CEz.js";import{u as k,h as R,g as H,j as C,N as w}from"./core-DO2aQ9sC.js";import{Up as q,fI as z,go as G,pW as Q,gP as U,gn as V,gl as W,UP as B,gk as A}from"./zeni-epic-state-Cc-xO4DM.js";import{u as J,z as E,L as T,G as K,F as M}from"./index-DtDfc4Ly.js";import{n as X}from"./mui-Beesmy34.js";import{P as h,a as _}from"./AccountMappingScreen-Dd-9mkbJ.js";import{t as Y}from"./getLocaleForTenant-Bn-3jfmk.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-MUHRwejb.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";import"./MobileAppDrawer-C1CX08Nz.js";import"./InboxNotificationsProvider-CmAbaz3a.js";import"./useTaskManagerAccess-DgmndGpu.js";import"./accountMappingHelper-D7kdjZSp.js";import"./empty-BEdZehso.js";import"./pdf-lib-D-883htS.js";import"./index-BIf8ZdZy.js";import"./url-CYqslED7.js";import"./index-D8IL39lv.js";import"./decodeURIComponentSafe-BGunfdyb.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="73f89b75-9978-4388-9d3a-c0540330329a",t._sentryDebugIdIdentifier="sentry-dbid-73f89b75-9978-4388-9d3a-c0540330329a")}catch{}})();const te=X.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex: 1 1 auto;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100vh;
|
|
9
|
-
background-color: ${t=>t.theme.colors.background};
|
|
10
|
-
box-shadow: ${t=>`0px 2px ${M.sp1} ${t.theme.colors.dropShadowNormal}`};
|
|
11
|
-
`;function we(){const t=k(),i=R(),v=H(),{setLoading:c,clearAllLoading:m}=J(),S=o.useRef(!1),x=o.useRef(!1),N=o.useRef(!1),p=o.useRef(!1),{code:O,realmId:P,state:$}=Z(v.search),f=O!==""&&P!==""&&$!=="";f&&(N.current=!0);const j=sessionStorage.getItem(h),u=j===_.pending,F=j===_.ready,b=C((s=>q(s))),e=C((s=>z(s))),n=C((s=>s.tenantState.fetchState)),r=C((s=>s.tenantState.activeTenantFetchState.fetchState)),a=E.getSignedInUser(),g=E.getActiveTenantForUser()?.tenantId,l=e?.externalConnections?.fetchState,d=e?.externalConnections?.saveConnectionState,y=e.externalConnections?.accounting[0]?.isValid;o.useLayoutEffect((()=>{c(T.CONNECTION_AUTH)}),[c]),o.useEffect((()=>{S.current||a==null||g==null||(S.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(c(T.TENANT_FETCHING),t(G(a.userId,g))))}),[S,n,c]),o.useEffect((()=>{e.tenantId==null&&!x.current&&a!=null&&(x.current=!0,!(g==null||g!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(Q(a.userId)))}),[x,n,r]),o.useEffect((()=>{a==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||d!=="Error"||(c(T.CONNECTION_AUTH),t(U(a.userId,e.tenantId)))}),[d]),o.useEffect((()=>{n!=="Completed"&&r!=="Completed"||a==null||e?.tenantId==null||(t(V(e.tenantId)),E.saveActiveTenantDomainForUser(e.tenantEmailDomain),W(a?.userId,a?.zeniSessionId,e.tenantId),K.updateAppLocaleID(Y(B(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||l==="In-Progress"||a==null||e==null||t(U(a.userId,e.tenantId)))}),[n,r,l]),o.useEffect((()=>{b.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&E.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder)}),[b.tenantsCoreDetailsInOrder.length,n]);const D=e==null||n!=="Completed"&&r!=="Completed"||l!=="Completed";if(o.useEffect((()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||l!=="Completed"&&l!=="Error"||m()}),[n,r,l]),o.useEffect((()=>{u&&d==="In-Progress"&&(p.current=!0)}),[u,d]),o.useEffect((()=>{if(!u||D)return;const s=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return p.current&&d==="Completed"?(sessionStorage.setItem(h,_.ready),m(),void i(s,{replace:!0})):p.current&&d==="Error"?(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),void i(s,{replace:!0})):void(f||N.current||p.current||y!==!0||(sessionStorage.removeItem(h),t(A({messageSection:"accounting_projects_qbo_reconnect_failed",messageText:"failed",type:"error"})),m(),i(s,{replace:!0})))}),[u,D,d,f,y,e.tenantEmailDomain,m,t,i]),D)return null;if(f||y!==!0)return I.jsx(te,{children:I.jsx(ee,{})});if(u)return null;const L=e.tenantEmailDomain!=null?`/${e.tenantEmailDomain}/settings/accounting`:"/";return F?I.jsx(w,{to:L,replace:!0}):I.jsx(w,{to:"/",replace:!0})}export{we as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DCIY2V5W.js";import{z as m}from"./index-DtDfc4Ly.js";import{g as n}from"./QBOConnectionScreen-MUHRwejb.js";import"./sentry--FQm-CEz.js";import{g as p,N as a}from"./core-DO2aQ9sC.js";import"./zeni-epic-state-Cc-xO4DM.js";import"./recharts-BFgvJAkx.js";import"./mui-Beesmy34.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";import"./empty-BEdZehso.js";import"./pdf-lib-D-883htS.js";import"./index-BIf8ZdZy.js";import"./url-CYqslED7.js";import"./index-D8IL39lv.js";import"./decodeURIComponentSafe-BGunfdyb.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DCIY2V5W.js";import{a as d}from"./sentry--FQm-CEz.js";import{h as G,u as A,g as W,i as q,j as c,N as X,l as F,n as N,o as O}from"./core-DO2aQ9sC.js";import{Xr as _,fI as M,WI as R,n3 as Y,SI as b,Xw as $,Xl as z,m3 as J,SJ as S,WN as V,WO as H,Xn as K,Xm as L}from"./zeni-epic-state-Cc-xO4DM.js";import{b6 as Q,l as U,a2 as Z,p as tt}from"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import{d as I}from"./decodeURIComponentSafe-BGunfdyb.js";import{w as et}from"./withTransactionSidePanel-CRkrcV_c.js";import{f as at,c as nt}from"./routePaths-CWDMrD59.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";import"./useAskAiCfoHostNavButtonProps-BH1yPMVh.js";import"./TransactionDetailScreen-R1s2Fj0b.js";import"./useInitialThreadRequest-B_GduCEN.js";import"./expenseAutomationHelper-Box0P8C-.js";import"./stripSplatSuffix-BjVyO64h.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]="a5fb96ed-933c-496d-b43d-a6b34cc6f506",a._sentryDebugIdIdentifier="sentry-dbid-a5fb96ed-933c-496d-b43d-a6b34cc6f506")}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(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(H()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(b(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=G(),o=A(),l=W(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:w,entityNameEncoded:x}=q(),r=I(w??""),p=I(x??""),f=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=c((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=c((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const E=c((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(b(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(X,{to:k(j.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function vt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DCIY2V5W.js";import{a as r}from"./sentry--FQm-CEz.js";import{au as c,av as l,U as p,a2 as f}from"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import m from"./NotFoundScreen-DUP1I-Dh.js";import{h as u,g as b}from"./core-DO2aQ9sC.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]="8d108649-c7d2-4211-a262-4af89c17ed6b",e._sentryDebugIdIdentifier="sentry-dbid-8d108649-c7d2-4211-a262-4af89c17ed6b")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./sentry--FQm-CEz.js";import{u as l,h as f,g as m}from"./core-DO2aQ9sC.js";import{i0 as p,V3 as g,V4 as _}from"./zeni-epic-state-Cc-xO4DM.js";import{u as b,L as h,z as y}from"./index-DtDfc4Ly.js";import"./liveblocks-DCIY2V5W.js";import"./recharts-BFgvJAkx.js";import"./mui-Beesmy34.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="faaf3043-d8b0-43ec-9b60-2d0129a87317",e._sentryDebugIdIdentifier="sentry-dbid-faaf3043-d8b0-43ec-9b60-2d0129a87317")}catch{}})();function V(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:c}=b(),a=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-DCIY2V5W.js";import{a as g}from"./sentry--FQm-CEz.js";import{u as F,g as _,h as w,t as V,j as l,N as U}from"./core-DO2aQ9sC.js";import{z as r,G as M,N as P,l as A,O as N,X as R,Y as W,R as Y}from"./index-DtDfc4Ly.js";import{fI as G,Ur as Q,UU as X,UL as $,gl as q,gn as B,UQ as H,gY as J,dk as K,UV as Z,UW as ee}from"./zeni-epic-state-Cc-xO4DM.js";import{u as te,n as ne}from"./mui-Beesmy34.js";import{u as ae}from"./useDeviceId-04DUxcYB.js";import{f as se}from"./analyticsHelper-BCFnQWXb.js";import{t as ie}from"./getLocaleForTenant-Bn-3jfmk.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="0a1b61e8-cc59-4753-9aac-249a6bdc7846",t._sentryDebugIdIdentifier="sentry-dbid-0a1b61e8-cc59-4753-9aac-249a6bdc7846")}catch{}})();const T=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function Te(){const t=F(),s=_(),f=w(),[b]=V(),n=b.get("token"),p=b.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),a=l((e=>e.tenantState.loggedInUser)),o=l((e=>G(e))),k=l((e=>Q(e))),D=r.getSignedInUser(),v=te().mode;g.useEffect((()=>{a?.zeniSessionId==null&&n!=null&&T(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(X(n,i,m)))}),[n,p,t,i,m,a?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants($(k.tenantsInOrder),a.zeniSessionId),q(a.userId,a.zeniSessionId,o.tenantId),t(B(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(H("Completed")),M.updateAppLocaleID(ie(o)),se(a,o,v,void 0,k.tenantsInOrder),J().then((()=>{const e=Y();e!=null&&P(e)})),setTimeout((()=>{A.trackLogin(N.Event.loginSuccess,"email",K(o.productSettings))}),2e3))}),[I,S,y,a,o,k,v,s.state,t]);const E=g.useCallback((()=>{f("/signin/auth")}),[f]),O=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(Z(i,c,d))}),[i,d,t,c]),j=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(ee(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:O,onVerifyOtp:j,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||D!=null){const e=s.state?.origin??"/";return u.jsx(U,{to:e,state:{...s.state,origin:""}})}if(!T(n,p)||m==null||h==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(U,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{Te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as B}from"./liveblocks-DCIY2V5W.js";import{a as m}from"./sentry--FQm-CEz.js";import{u as te,j as t,i as Ge,g as $e,h as Ue,q as F}from"./core-DO2aQ9sC.js";import{fI as ne,Us as Me,Ut as se,gc as xe,fH as Ne,UC as Pe,Uv as Re,Uw as Ve,q3 as Le,gp as Oe,Uz as h,UE as je,UF as Q,gq as Ze,UG as qe,Ey as ze,h5 as He,cW as We,UH as Ye,gb as Je,gr as Ke}from"./zeni-epic-state-Cc-xO4DM.js";import{w as Qe,i as Xe,c as ea,W as aa,d as ta,g as na,u as sa,A as c,h as oa,f as ia,z as ra,e as da,n as ca,Z as la,r as ua,o as ma,q as X,L as fa,D as ba,E as ha,p as S,l as ee,x as pa,I as ae,B as ga,C as Sa}from"./index-DtDfc4Ly.js";import{D as Ea}from"./mui-Beesmy34.js";import{u as ka}from"./InboxNotificationsProvider-CmAbaz3a.js";import{u as Ca}from"./useTaskManagerAccess-DgmndGpu.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="3180b4d1-88ba-4b8d-b3b9-04f7cb2ae468",l._sentryDebugIdIdentifier="sentry-dbid-3180b4d1-88ba-4b8d-b3b9-04f7cb2ae468")}catch{}})();const Ta=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=Ge(),a=$e(),E=ea(),n=Ue(),D=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,G=t((e=>Ne(e))),{status:ie}=t(Pe),$=G.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=m.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,M=F("/:tenantEmailDomain/reports")!==null,f=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Re(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));m.useEffect((()=>{C&&T&&!f&&v.fetchState==="Not-Started"&&r(Le(!0))}),[C,T,v.fetchState,f]);const _=t((e=>e.tenantState)),me=t((e=>_.fetchState==="Completed"?Oe(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:be}=d(c.isArAgingFeatureEnabled),P=ia(),{isFeatureEnabled:he}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Ee=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>h(e).totalUnreadCount)),Ce=t((e=>h(e).reducedFetchCountState)),R=t((e=>h(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>h(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>h(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>h(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:O,isLoading:j,isFetchingMore:Z,hasFetchedAll:q,fetchMore:Te}=ka();m.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(j===!1&&Z===!1&&q===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;U(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[j,Z,q]),m.useEffect((()=>{C&&k&&!f&&L.fetchState==="Not-Started"&&D.tenantId!=null&&r(je("task_manager","dashboard"))}),[C,k,f,L.fetchState,D.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:ke},z=s!=null?ra.getSignedInUserTenant(s):null,H=t((e=>z?.tenantId!=null?Ze(e,z.tenantId):void 0)),b=[];fe===!1&&b.push("accounts_payable_aging"),be===!1&&b.push("accounts_receivable_aging"),b.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&b.push("rewards_card"),P===!1&&b.push("expense_automation_card");const W=t((e=>qe(e,b).fetchState)),Y=t((e=>ze(e).fetchState)),ye=A&&(W==="Completed"||W==="Error")||M&&(Y==="Completed"||Y==="Error")||!A&&!M?void 0:"disabled",we=m.useMemo((()=>He(o.userRole)),[o.userRole]),Ae=We(we),ve=o?.rewardsLastViewedTime==null,_e=p?.userEmail!=null&&N.fetchState==="Completed"&&Ye(N.notificationSettings,p.userEmail,x,o,k),J=da(),Fe=J&&ca(a);return B.jsx(Ea,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(la,{signedInUser:p,currentTenantId:_.currentTenantId??"",tenants:_.fetchState==="Completed"?me:H!=null?[H]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Ee,isNotificationsTabVisible:_e,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:P,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=R===0&&V>0?"notifications/comments":"notifications/tasks";X(a)&&(e=R===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",$??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,Be=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),Be&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const De=ga(e.type);Sa(e.type)?($!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${De}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ba({dispatch:r,navigate:n,pathToNavigate:ha(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{E.toggle()},isAiCfo:Fe,aiCfoView:G,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:he,isTaskManagerAccessEnabled:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Da=l=>{const i=te(),s=t((E=>ne(E))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(E,n)=>{Xe(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return B.jsx(Ta,{...l,...a})};export{Da as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DCIY2V5W.js";import{h as r,l as i}from"./core-DO2aQ9sC.js";import{ak as n}from"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import"./sentry--FQm-CEz.js";import"./zeni-epic-state-Cc-xO4DM.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-DCIY2V5W.js";import ut from"./NotFoundScreen-DUP1I-Dh.js";import{a as k}from"./sentry--FQm-CEz.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as J}from"./core-DO2aQ9sC.js";import{cB as It,Uv as Q,fI as X,h5 as Tt,Uz as b,a1v as Y,UF as m,Ut as y,AO as j,Gv as Ct,a1w as At,Us as yt,UH as Et,AT as _t,a1x as F,br as $,gk as x,AX as K,a1y as Nt,cN as Bt,cG as wt}from"./zeni-epic-state-Cc-xO4DM.js";import{ao as xt,d as Ut,W as vt,A as Gt,aq as Dt,dI as Rt,p as B,dJ as Pt,w as Mt,dK as Ft,i as $t,a2 as jt}from"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-BH1yPMVh.js";import{u as qt}from"./useTaskManagerAccess-DgmndGpu.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="2e1b5543-5069-4d02-902f-a65e4dafd92a",t._sentryDebugIdIdentifier="sentry-dbid-2e1b5543-5069-4d02-902f-a65e4dafd92a")}catch{}})();const Lt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Wt=St((function(t,l){const n=Q(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=X(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(e,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(K("task_manager","read",[e],!1))},onCommentNotificationClick:(e,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(e),t(F([e],$())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(e,s)=>{t(y(e,s))},onUpdateNotificationTabState:(e,s)=>{t(m(e,s))},onUpdateNotificationViewCurrentTabAndSubTab:(e,s)=>{t(Y(e,s));const d=`../${e}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:e=>{t(Nt(e))},onFetchMoreNotifications:(e,s)=>{if(e==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(e,s,d,r)=>{e==="tasks"?t(K("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t(F([i],$())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:e=>{e==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Lt(o,I).then((()=>{t(F(o,$())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const e=jt(n.state?.pathnameStackToGoBack),s=e.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:e.newStack}})},onSettingsClick:()=>{const e=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:e}})}}}))(Mt(Ft)),zt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),e=S((a=>Q(a))),s=S((a=>X(a))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Gt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const Z=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=S((a=>b(a).notificationDetailsByTab.tasks.fetchState)),q=S((a=>b(a).currentTab)),G=S((a=>b(a).currentSubTab)),tt=S((a=>b(a).notificationDetailsByTab.comments.fetchCountState)),D=S((a=>b(a).notificationDetailsByTab.comments.fetchState)),at=S((a=>b(a).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((a=>b(a).allExternalNotifications)).filter((a=>a.inboxNotification.readAt==null)).map((a=>a.inboxNotification.id)),st=Rt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:R,fetchMore:ot}=mt(),{threads:L,isLoading:W,fetchMore:z,isFetchingMore:O,hasFetchedAll:H}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(q!==c&&c!=null&&o(Y(c)),c==null){const a=`../${q}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(a,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&w!=null){const a=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===a&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(j("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const a=setTimeout((()=>ot?.()),0);return()=>clearTimeout(a)}));const P=E||R===!0||C!==!0||E||R===!0||C!==!0;k.useEffect((()=>{P&&D!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||D!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,D]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{e.fetchState!=="In-Progress"&&e.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[e.fetchState]),k.useEffect((()=>{if(E===!1&&W===!1&&w!=null&&L!=null){const a=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===a)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=L.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(O||H===!0||z==null||z(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,R,O,C,H,W,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(a,p)=>{if($t(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];G==="all"?_.push("read","unread"):G!=="mentions"&&_.push(G),o(j("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=qt(f);return N.jsx(Wt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function ma(){return N.jsxs(bt,{children:[N.jsx(J,{path:"/:selectedTab",element:N.jsx(zt,{})}),N.jsx(J,{path:"*",element:N.jsx(ut,{})})]})}export{ma as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-DCIY2V5W.js";import{h as G,u as Y,g as z,i as H,j as d,l as J,n as K,o as S}from"./core-DO2aQ9sC.js";import{fI as v,Az as R,vc as Q,V_ as M,v7 as T,bq as X,c0 as Z,v8 as ee,V$ as ae,VI as C,ek as te,En as se,W0 as oe,EL as re,e0 as ne,d$ as ce}from"./zeni-epic-state-Cc-xO4DM.js";import{ag as ie,z as le,ao as de,aq as fe,V as me,a6 as pe,l as w,aB as ue,p as he,W as ge,A as Fe}from"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import Ie from"./NotFoundScreen-DUP1I-Dh.js";import{F as be}from"./FeaturePreviewScreen-D1TH0B4H.js";import{a as g}from"./sentry--FQm-CEz.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-BH1yPMVh.js";import{u as Ce}from"./useInitialThreadRequest-B_GduCEN.js";import{t as Te}from"./routePaths-CWDMrD59.js";import{M as ye}from"./MobileAppDrawer-C1CX08Nz.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";import"./InboxNotificationsProvider-CmAbaz3a.js";import"./useTaskManagerAccess-DgmndGpu.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]="fd757e70-d1f6-43cc-987b-470f3490029d",s._sentryDebugIdIdentifier="sentry-dbid-fd757e70-d1f6-43cc-987b-470f3490029d")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=J((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),f=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:f,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=G(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=H(),[p,u]=g.useState(!1),[f,A]=g.useState(!1),F=le.getSignedInUser(),x=d((t=>v(t))),$=x.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),k=d((t=>t.reportUIOptionsState.selectedForecast)),L=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();fe({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:V}=Se({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&I)u(!0),l||a(Q());else if(l&&!f){A(!0);const t=((m,P,O)=>P!=null?m.forecasts.findIndex((b=>b.id===P)):O!=null?m.forecasts.findIndex((b=>b.id===O)):m.forecasts.length>0?0:-1)(i,r,k?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(a(M(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!L(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,f,A,R,T,I]);const j=me(),_=j?.loggedInUserRole!=null&&X(j.loggedInUserRole),B=Ce(x?.companyId,{clearParams:l&&f}),[N,W]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const E=t=>{W(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:N,handleDrawerToggle:E}),n.jsx(Ae,{firstMonthOfFY:$,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:L,meetingUrl:Z(h.toString()),hasTransactionAccess:_,isAiCfoAccessEnabled:q,onAskAiCfoClick:V,initialOpenThreadRequest:B,onClickMenuIcon:()=>{E(!0)}})]})}function He(){const s=d((c=>v(c))),{useFeatureGate:e}=ge(),{isFeatureEnabled:a}=e(Fe.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{He as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DCIY2V5W.js";import{VW as re,fI as Q,m3 as W,e0 as N,d$ as le,SM as Y,Vj as ce,Di as Pe,VX as X,D7 as je,Ds as Le,Dm as de,Db as pe,Dq as ve,Dn as Te,VY as ue,sx as Ve,g9 as Ae,gG as Fe,VZ as G,Df as me,De as ge,Dv as Oe,c9 as Re}from"./zeni-epic-state-Cc-xO4DM.js";import{$ as he,W as J,A as H,z as _,h as fe,K as Ce,ad as ye,ax as be,ay as Ze,a9 as Se,F as O,ae as De,G as K,az as Be,ao as Ue,aq as $e,a6 as ze,l as we,O as Ge,p as He,aA as We,V as _e}from"./index-DtDfc4Ly.js";import{D as xe,n as M,S as Ie}from"./mui-Beesmy34.js";import ae from"./NotFoundScreen-DUP1I-Dh.js";import{a as c}from"./sentry--FQm-CEz.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Xe,n as se,o as z}from"./core-DO2aQ9sC.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-BH1yPMVh.js";import{M as Ne}from"./MobileAppDrawer-C1CX08Nz.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";import"./InboxNotificationsProvider-CmAbaz3a.js";import"./useTaskManagerAccess-DgmndGpu.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]="bceaea73-4868-47a0-837e-8a7b91edec78",e._sentryDebugIdIdentifier="sentry-dbid-bceaea73-4868-47a0-837e-8a7b91edec78")}catch{}})();const Ye={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Je=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const f=he(),m=ee(),[R,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>Q(l))),E=g((l=>W(l))),{useFeatureGate:x}=J(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=N(I,p),v=le(p),T=Y(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(X()),b()},V=()=>{R===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=fe(p,j,I),{isCardsHidden:A}=Ce(p?.tenantId),y=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(h==="zeni_only"?je(e):Le(T))},onCloseClick:V,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Ye.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,ke=M(De.H6Regular)`
|
|
6
|
-
margin-top: ${O.sp7};
|
|
7
|
-
padding-left: ${O.sp8};
|
|
8
|
-
padding-right: ${O.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ee=M(De.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.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
|
-
`,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const f=he(),m=ee(),[R,Z]=c.useState(!1),[k,S]=c.useState(!1),D=g((o=>re(o))),r=g((o=>Q(o))),p=g((o=>W(o))),{useFeatureGate:E}=J(),{isFeatureEnabled:x}=E(H.isDebitCardFeatureEnabled),I=N(x,r),P=le(r),v=Y(r),T=ce(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),m(X())},C=()=>{R===!0?S(!0):w()},V={onOkClick:()=>{S(!1),w()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(H.isChargeCardFeatureEnabled),L=fe(r,j,x),{isCardsHidden:A}=Ce(r?.tenantId),y=!L||A,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),Z(!0)},onResetClick:w,onSaveClick:()=>{m(h==="zeni_only"?ve(e):Te())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return c.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(b(),m(X()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:V}):null,a.jsx(Be,{...s})]})})},ta=M(Ie)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,na=Xe((function(e,t){const d=ue(e),n=_.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:W(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:h}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(me()),e(ge(n,h))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(G({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(G({searchText:i}))}}}}))(We);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Me(),n=ee(),h=qe(),{areTenantIdsInSync:i}=Ue(),b=_.getSignedInUser(),f=g((s=>Q(s))),{useFeatureGate:m}=J(),{isFeatureEnabled:R}=m(H.isDebitCardFeatureEnabled),Z=g((s=>W(s))),k=!N(R,f)&&Z,S=Y(f),D=f?.tenantId,{tenantEmailDomain:r}=f,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,v]=c.useState(!1),[T,B]=c.useState("off"),[U,w]=c.useState(!1),C=s=>{w(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Qe({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ve(s.classState,s.classListState))),L=g((s=>Ae(s.userState,s.userRoleState,s.userListViewState,"manager"))),A=g((s=>Fe(s))),y=f?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),E(!0),n(me()))}),[p,b,D,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),v(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(Ge.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Je,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:b,isZeni:f.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(G({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=He(h.state?.pathnameStackToGoBack,h.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=_e();return Re(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DCIY2V5W.js";import E from"./NotFoundScreen-DUP1I-Dh.js";import{a as r}from"./sentry--FQm-CEz.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as O,o as h}from"./core-DO2aQ9sC.js";import{fI as B,a1z as b,bo as F,bn as N,iP as V,gk as q}from"./zeni-epic-state-Cc-xO4DM.js";import{c as L,z as I,aq as $,dL as G}from"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-BH1yPMVh.js";import{M as J}from"./MobileAppDrawer-C1CX08Nz.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";import"./InboxNotificationsProvider-CmAbaz3a.js";import"./useTaskManagerAccess-DgmndGpu.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]="49a79cf5-f3cd-4090-af35-faca29851335",e._sentryDebugIdIdentifier="sentry-dbid-49a79cf5-f3cd-4090-af35-faca29851335")}catch{}})();const K=z((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)}}}))(G),Q=()=>{const e=_(),t=v(),c=L(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(q({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"||d(a,i,!0),f.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DCIY2V5W.js";import{z as b,a6 as N,l as u,O as S,e0 as I,W as k,A as C}from"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import g from"./NotFoundScreen-DUP1I-Dh.js";import{a as m}from"./sentry--FQm-CEz.js";import{u as D,j as y,h as F,g as L,l as T,n as U,o as d,N as h}from"./core-DO2aQ9sC.js";import{fI as _,a2y as j,a2z as p,Ed as P,q3 as V,a2A as z,Eb as A}from"./zeni-epic-state-Cc-xO4DM.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.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]="91319ecb-21a6-4657-a53e-f47dca78e87c",e._sentryDebugIdIdentifier="sentry-dbid-91319ecb-21a6-4657-a53e-f47dca78e87c")}catch{}})();const q=T((function(e,t){const n=j(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=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(A())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(I),G=()=>{const e=D(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=y((o=>_(o))),l=F(),w=L(),f=b.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const c=y((o=>j(o))),x=f?.firstName!=null?f.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||c.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[c.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[c.fetchState==="Completed"?a.jsx(N,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(q,{navigate:l,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:c.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(G,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-DUP1I-Dh.js","assets/sentry--FQm-CEz.js","assets/core-DO2aQ9sC.js","assets/zeni-epic-state-Cc-xO4DM.js","assets/index-DtDfc4Ly.js","assets/mui-Beesmy34.js","assets/analytics-CHOlTFyu.js","assets/utils-9X_P6qcc.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-CQAZF0k8.js","assets/withTransactionSidePanel-CRkrcV_c.js","assets/useAskAiCfoHostNavButtonProps-BH1yPMVh.js","assets/TransactionDetailScreen-R1s2Fj0b.js","assets/decodeURIComponentSafe-BGunfdyb.js","assets/useInitialThreadRequest-B_GduCEN.js","assets/routePaths-CWDMrD59.js","assets/expenseAutomationHelper-Box0P8C-.js","assets/stripSplatSuffix-BjVyO64h.js","assets/analyticsHelper-BCFnQWXb.js","assets/CompanyPassportScreen-BslihQWZ.js","assets/MobileAppDrawer-C1CX08Nz.js","assets/InboxNotificationsProvider-CmAbaz3a.js","assets/useTaskManagerAccess-DgmndGpu.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DOb2Yrjn.js","assets/FeaturePreviewScreen-D1TH0B4H.js","assets/BillPayRoutes-b2SMWo4z.js","assets/AddressScreen-NLlV-cSD.js","assets/DomesticWireDetailScreen-B1jSUQp2.js","assets/BusinessVerificationPageScreen-BMbooZ9c.js","assets/DrawerScreen-CLNuMP4c.js","assets/SetupPagesScreen-Drwip476.js","assets/BillPayApprovalRoutes-DOtDJlUD.js","assets/ReimbursementApprovalRuleDetailScreen-BXCFB-xI.js","assets/getLocaleForTenant-Bn-3jfmk.js","assets/ReimbursementRoutes-AomTv5z8.js","assets/ReimbursementApprovalRoutes-BFxtthm2.js","assets/TransactionListRoutes-Cc6hdxdW.js","assets/ZeniAccountStatementScreen-CyFrpw1Y.js","assets/SettingsRoutes-CIKlS7WR.js","assets/AccountMappingScreen-Dd-9mkbJ.js","assets/QBOConnectionScreen-MUHRwejb.js","assets/empty-BEdZehso.js","assets/index-BIf8ZdZy.js","assets/url-CYqslED7.js","assets/index-D8IL39lv.js","assets/accountMappingHelper-D7kdjZSp.js","assets/useEmailConnectResultRefresh-6HOW2gqB.js","assets/ReportsRoutes-CUQDlOh2.js","assets/ChargeCardRoutes-C9jB_BU5.js","assets/useChargeCardPusherEvents-BzP1s6ty.js","assets/PeopleRoutes-BXk_l6Ng.js","assets/ExpenseAutomationRoutes-DLqUzGyz.js","assets/useActualMatchingMatchDetail-B3AFBcfZ.js","assets/ScheduleDetailsPrepaidExpensesScreen-B2Zz8Q8W.js","assets/pathToGoBack-BF0QeMYg.js","assets/TreasuryRoutes-9B6vJLbh.js","assets/VendorsRoutes-m5oaZn9_.js","assets/ZeniAccountRoutes-CbOETsfG.js","assets/AddressRoutes-DkKEg9nJ.js","assets/PandLWithForecastRoutes-Dh0lrJ4b.js","assets/CustomerOnboardingRoutes-DmCDi77C.js","assets/TransactionDetailRoutes-DmTwl-Oi.js","assets/EntityDetailRoutes-Zk-9UMwO.js","assets/InvoicingRoutes-DFf9_vlp.js","assets/NotificationRoutes-b-zZEsBw.js","assets/PerformanceRoutes-CuBRzzvZ.js","assets/ActualMatchingMatchDetailScreen-CwU0IpO-.js","assets/RewardsRoutes-D6jHcv01.js","assets/TaskRoutes-DkYij_G4.js","assets/TaskListScreen-BwBbID9Z.js","assets/useTaskManagerPusherEvents-BgO_yohE.js","assets/AiCfoScreen-DUNS2Dhv.js","assets/CardsAiCfoScreen-lmBrsGeg.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as hs,fI as Es,e0 as ps,d$ as xs,Bo as gs,dj as Rs,c9 as Is,gM as js,gc as Ts,dg as pe,cH as As,gq as bs,cz as fs,bF as Ds,br as ys,UI as vs,v as Cs,UL as Os,bq as Us,UM as Ps,bL as ws,bK as Fs,bu as Ls,cv as Vs,UN as Hs,UO as ks,db as Bs,de as Ss,dd as Ns,cG as Ms,cN as Zs,pW as xe,gl as ge,h0 as $s,gn as Re,gO as Ie,gP as je,go as zs}from"./zeni-epic-state-Cc-xO4DM.js";import{j as e}from"./liveblocks-DCIY2V5W.js";import{a as P}from"./sentry--FQm-CEz.js";import{N as u,u as Gs,h as qs,i as Ws,g as Ys,j as $,q as Te,n as Ks,o as n}from"./core-DO2aQ9sC.js";import{J as l,u as Js,z as y,W as Qs,e as Xs,f as et,A as S,h as st,K as tt,V as nt,L as F,G as Ae,t as _,P as at,M as ot,l as ne}from"./index-DtDfc4Ly.js";import{u as rt}from"./mui-Beesmy34.js";import{f as be}from"./analyticsHelper-BCFnQWXb.js";import{t as it}from"./getLocaleForTenant-Bn-3jfmk.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new o.Error().stack;f&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[f]="65b9e37f-fbb3-4e4e-bcd8-66402979d911",o._sentryDebugIdIdentifier="sentry-dbid-65b9e37f-fbb3-4e4e-bcd8-66402979d911")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-DUP1I-Dh.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:f,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(V===!0){if(o)return e.jsx(De,{tenantEmailDomain:C});if(i)return e.jsx(fe,{tenantEmailDomain:C});if(O)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(De,{tenantEmailDomain:C}):i?e.jsx(fe,{tenantEmailDomain:C}):O?e.jsx(ye,{tenantEmailDomain:C}):f?e.jsx(dt,{tenantEmailDomain:C}):N?e.jsx(ut,{tenantEmailDomain:C}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-CQAZF0k8.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-b2SMWo4z.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-AomTv5z8.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Cc6hdxdW.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-CIKlS7WR.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-CUQDlOh2.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-C9jB_BU5.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-BXk_l6Ng.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-DLqUzGyz.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-9B6vJLbh.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-m5oaZn9_.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CbOETsfG.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-CUQDlOh2.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),ht=l((()=>s((()=>import("./AddressRoutes-DkKEg9nJ.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),Et=l((()=>s((()=>import("./PeopleRoutes-BXk_l6Ng.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-Dh0lrJ4b.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-DmCDi77C.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-m5oaZn9_.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-DmTwl-Oi.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-Zk-9UMwO.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),It=l((()=>s((()=>import("./DashboardRoutes-CQAZF0k8.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-b2SMWo4z.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),jt=l((()=>s((()=>import("./SettingsRoutes-CIKlS7WR.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-DFf9_vlp.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-AomTv5z8.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-CbOETsfG.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),bt=l((()=>s((()=>import("./TreasuryRoutes-9B6vJLbh.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),ft=l((()=>s((()=>import("./TransactionListRoutes-Cc6hdxdW.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Dt=l((()=>s((()=>import("./ChargeCardRoutes-C9jB_BU5.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-b-zZEsBw.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),vt=l((()=>s((()=>import("./PerformanceRoutes-CuBRzzvZ.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ct=l((()=>s((()=>import("./ExpenseAutomationRoutes-DLqUzGyz.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-CwU0IpO-.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ut=l((()=>s((()=>import("./RewardsRoutes-D6jHcv01.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-DkYij_G4.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-DUNS2Dhv.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-lmBrsGeg.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-DUP1I-Dh.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-BwBbID9Z.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(O===!0){if(f)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):f?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),$t=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const f=Gs(),N=qs(),{tenantEmailDomain:i}=Ws(),V=rt().mode,{setLoading:O,clearAllLoading:C,clearLoading:H}=Js(),D=y.getSignedInUserTenant(i)?.tenantId,j=y.getSignedInUser(),K=hs(j),z=Ys(),[L,we]=P.useState(!1),r=$((a=>Es(a))),{useFeatureGate:k}=Qs(),M=Xs(),J=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=k(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=k(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||T==="Completed"?ps(oe,r):void 0,Q=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,He=st(r,Ve,oe),{isCardsHidden:ke}=tt(r?.tenantId),Be=!He||!!ke,{isFeatureEnabled:Se}=k(S.isSettingsFeatureEnabled),{isFeatureEnabled:X}=k(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=k(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),G=$((a=>js(a)));if(i!=null){const a=y.getSignedInUserTenant(i);j!=null&&a!=null&&be(j,r,V)}const Z={tenantId:D,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Ts(),E=nt(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),ze=As(E?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Ge?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=Ds(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?f(vs(D,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,D]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,j,f,y]),P.useLayoutEffect((()=>{!Cs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,j,f,qe))}),[D]),P.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(W&&cs){B(Re(t));const Y=y.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)))}else W&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),W&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)));if(W){ne.identify(d.userId,{tenant_id:t});const Y=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(zs(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,D,j,O,f))}),[D,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&G.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(G.tenantsBaseInOrder)),j!=null&&be(j,r,V,void 0,G.tenantsBaseInOrder))}),[G,T,r,j]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(C(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,D,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:We}=k(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=k(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,Qe=Ps(E?.loggedInUserRoleMap),Xe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(E?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ts=ue&&Fs(E?.loggedInUserRoleMap),ns=de&&Ls(E?.loggedInUserRoleMap),as=_e&&Vs(E?.loggedInUserRoleMap),os=Hs(E?.loggedInUserRoleMap),rs=ks(E?.loggedInUserRoleMap),is=Bs(E?.loggedInUserRoleMap),ls=Ss(E?.loggedInUserRoleMap),us=Ns(E?.loggedInUserRoleMap),x=Ms(E?.loggedInUserRoleMap),g=Zs(E?.loggedInUserRoleMap),he=ue&&x,Ee=ce&&g,R=_e&&is,I=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||ze===!0||Qe===!0||os===!0||rs===!0;return y.isSignedIn()?D==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&f(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||K&&!ee)&&es&&Xe!==!0&&h===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||K?!L||te!==!1||ee||K?L&&r?.userRole&&h!=null&&Q!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(It,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(Et,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&U===!1||Ke||Je?e.jsx(Rt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&U===!1?e.jsx(ft,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&U===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&U===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(ht,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:I?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:J===!0?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:J===!0&&U===!1?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:J===!0&&U===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:$e?e.jsx(gt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:he?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:he?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(jt,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Ut,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,$t as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-DCIY2V5W.js";import{a as u,R as x,t as A}from"./sentry--FQm-CEz.js";import{u as z,h as D,j as l,g as M,N as O,l as P}from"./core-DO2aQ9sC.js";import{u as j,z as s,l as E,G as F,N as _,O as N,Q as B,R,S as Q,T as v}from"./index-DtDfc4Ly.js";import{fI as V,Ur as $,UL as J,gl as W,gn as Y,UQ as G,gY as H,dk as q,UR as y,US as K,UT as X,c0 as U}from"./zeni-epic-state-Cc-xO4DM.js";import{u as Z}from"./mui-Beesmy34.js";import{u as ee}from"./useDeviceId-04DUxcYB.js";import{f as te}from"./analyticsHelper-BCFnQWXb.js";import{t as ne}from"./getLocaleForTenant-Bn-3jfmk.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="3f83bf89-5754-4af9-a925-7d16454c66c9",t._sentryDebugIdIdentifier="sentry-dbid-3f83bf89-5754-4af9-a925-7d16454c66c9")}catch{}})();const ie=P((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(X({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(c),sourceUri:U(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(K(n,a)))},clearSignInError:()=>{t(y())}}}))(Q),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:b,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),h=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>V(e))),I=l((e=>$(e))),m=M(),w=Z().mode,C=m.state?.magicLinkExpired,T=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{k.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[k.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),H().then((()=>{const e=R();e!=null&&_(e)})),setTimeout((()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",q(r.productSettings))}),2e3))}),[S,p,h,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!T,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&L!=null?f.jsx(B,{onClose:()=>i(y()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DCIY2V5W.js";import{a as i}from"./sentry--FQm-CEz.js";import{u as c,g as l,N as u}from"./core-DO2aQ9sC.js";import{z as n,l as a,O as m,a5 as p}from"./index-DtDfc4Ly.js";import{g$ as g,V5 as y}from"./zeni-epic-state-Cc-xO4DM.js";import{n as b}from"./mui-Beesmy34.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.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]="69b2bdd3-c247-4f58-8001-dffadc44ea64",e._sentryDebugIdIdentifier="sentry-dbid-69b2bdd3-c247-4f58-8001-dffadc44ea64")}catch{}})();function N(){const e=c(),t=l(),r=i.useRef(!1),d=n.isSignedIn(),o=t.state?.message==="logout"||d;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.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 r}from"./liveblocks-DCIY2V5W.js";import fe from"./NotFoundScreen-DUP1I-Dh.js";import{a as u}from"./sentry--FQm-CEz.js";import{h as ee,u as ae,j as g,g as ge,i as he,N as Ee,l as be,n as De,o as h}from"./core-DO2aQ9sC.js";import{Qt as se,Qw as Ie,Qq as Ce,a2B as _e,fI as te,a2C as ne,QX as b,QK as E,Qn as Ge,Rq as Re,Rj as ye,a2D as oe,gk as ie,a2E as J,a2F as Ae,Qj as Ue,Qg as ve,v2 as Be,uS as we,mD as xe,QI as je,a2G as Pe,RC as Fe,QE as Ke,R5 as Le,R2 as $e,Qz as Qe,Q$ as Ne,QU as Ze}from"./zeni-epic-state-Cc-xO4DM.js";import{z as D,e1 as ze,c as Oe,W as qe,A as G,a2 as re,p as R,a6 as Ve,l as W,O as Me,e2 as Xe,T as Y,ac as Je}from"./index-DtDfc4Ly.js";import{n as We}from"./mui-Beesmy34.js";import{u as Ye}from"./useInitialThreadRequest-B_GduCEN.js";import{M as He}from"./MobileAppDrawer-C1CX08Nz.js";import{T as m,t as ea,b as aa,a as sa,c as ta,d as H,e as na}from"./TaskListScreen-BwBbID9Z.js";import{u as oa}from"./useTaskManagerPusherEvents-BgO_yohE.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";import"./InboxNotificationsProvider-CmAbaz3a.js";import"./useTaskManagerAccess-DgmndGpu.js";import"./useAskAiCfoHostNavButtonProps-BH1yPMVh.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]="8452e1cc-d557-4788-9fc0-af04bba907de",e._sentryDebugIdIdentifier="sentry-dbid-8452e1cc-d557-4788-9fc0-af04bba907de")}catch{}})();function ia(){const e=ee(),a=ae(),n=D.getSignedInUser(),{cannedResponses:c,fetchState:t,saveFetchState:l}=g((i=>i.cannedResponsesState)),d=u.useCallback((()=>{a(se())}),[a]),S=u.useCallback(((i,I,C)=>{a(Ie({name:i,content:I,cannedResponseId:C}))}),[a]),s=u.useCallback((i=>{a(Ce({cannedResponseId:i}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(ze,{cannedResponses:c,isLoading:t==="In-Progress"||t==="Not-Started",isSaving:l==="In-Progress",onBackClick:()=>e(-1),onDelete:s,onFetch:d,onSave:S})}const L=e=>e?.taskState?.taskByID,F=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},ra=_e([F,(e,a)=>{const n=F(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=F(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}})),ca=be((function(e,a){const{location:n,taskGroupId:c}=a,t=oe(e,a.taskId),l=te(e),d=ra(e,a.taskId),S=t.taskGroupId??c,s=S!=null?J(e.taskGroupState,S):void 0,i=D.getSignedInUser(),I=l.tenantId,C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:I??""},v=ne(e),{tenantEmailDomain:B}=l,y=t.recurringSourceTaskId,w=y!=null?`${Y.appUrl}/${B}/tasks/${encodeURIComponent(y)}`:void 0;return{taskDetailSelectorView:t,authParams:C,isZeniUser:D.isZeniUser(),userGroupList:Ae(e),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Je.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${Y.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:w,tagListView:v,taskGroupName:S!=null&&s!=null&&s.isDefault===!1?s.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((T=>J(e.taskGroupState,T))).filter((T=>T!=null&&!T.isDeleted)).map((T=>({id:T.id,name:T.name,isDefault:T.isDefault}))),subtasks:t.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:t,location:l,taskGroupId:d}=a,{tenantEmailDomain:S}=t;return{onSaveChangesToLocalStore:s=>{e(Ze({taskDetailLocalData:s,taskId:n}))},onSaveDetailClick:s=>{e(Ne(n,s??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Qe(a.taskId))},onSnoozeTask:(s,i)=>{e($e(s,i))},onUnsnoozeTask:s=>{e(Le(s))},onCreateSubtask:(s,i)=>{e(Ke({...i,parentTaskId:s}))},onSubtaskUpdate:(s,i)=>{e(Fe({task:s,updates:i}))},onShowToast:s=>{e(ie(s))},onSubtaskRowClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:R(l.state?.pathnameStackToGoBack,l.pathname)}})},onParentBreadcrumbClick:s=>{c(`/${S}/tasks/${s}`,{state:{pathnameStackToGoBack:R(l.state?.pathnameStackToGoBack,l.pathname)}})},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const s=re(l.state?.pathnameStackToGoBack),i=s.poppedPathname??"../../dashboard";c(i,{state:{pathnameStackToGoBack:s.newStack}})}else{const s=U(S),i=R(l.state?.pathnameStackToGoBack,l.pathname);c(s,{state:{pathnameStackToGoBack:i}})}e(Pe({taskId:n}))},onDeleteTaskClick:()=>{e(je(n))},updateFilesEntity:s=>{e(xe({files:s}))},onDeleteFile:s=>{e(we(s))},onEditFileName:(s,i)=>{e(Be(s,i.split(".")[0]))},onReloadTaskDetailPage:()=>{e(b(!1,n))},onCreateTagClick:s=>{e(ve(s,n))},onDeleteTagClick:s=>{e(Ue(s,n))},onFetchCannedResponses:()=>{e(se())},onManageTemplatesClick:()=>{c(`/${t.tenantEmailDomain}/tasks/quick-responses`)}}}))(Xe);function K(){const e=ee(),a=ae(),n=ge(),c=Oe(),{taskId:t,taskGroupId:l}=he(),d=g((o=>te(o))),S=Ye(d?.companyId),{useFeatureGate:s}=qe(),{isFeatureEnabled:i}=s(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=s(G.isTaskVisibilityEnabled),{isFeatureEnabled:C}=s(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:v}=s(G.isTaskRecurringParentEnabled),{isFeatureEnabled:B}=s(G.isTaskGroupAssigneesEnabled),[y,w]=u.useState(!1),[T,ce]=u.useState(!1),[$,le]=u.useState(!1),[Q,x]=u.useState(!1),_=u.useRef(!1),A=g((o=>o.taskListState.updateTasksFetchState.fetchState)),N=g((o=>ne(o))),Z=g((o=>o.taskGroupViewState.fetchState));u.useEffect((()=>{a(b(!1,t)),t!=null&&a(E(t))}),[a,t]);const z=D.getSignedInUser()?.userId,de=D.isZeniUser(),ke=g((o=>t!=null?o.taskState.taskByID[t]?.syncToken:void 0)),O=()=>{d?.tenantEmailDomain!=null&&e(U(d.tenantEmailDomain))},q=()=>{a(ie({messageSection:"delete_task",messageText:"success",type:"success"})),O()},ue=u.useMemo((()=>{const o=[m.TASK_CREATED,m.TASK_UPDATED,m.TASKS_BULK_UPDATED,m.TASKS_BULK_DELETED],k=[...o,m.TASK_SNOOZE_RESURFACED];return[...aa(d?.companyId,o),...sa(z,k)]}),[d?.companyId,z]);oa({events:ue,onSubscribed:()=>{t!=null&&(a(b(!0,t)),a(E(t)))},onEvent:(o,k)=>{if(t!=null)switch(o){case m.TASK_CREATED:case m.TASK_UPDATED:{const p=((P,me,{isZeniUser:Se,storedSyncToken:Te,taskId:X})=>{if(P!==m.TASK_CREATED&&P!==m.TASK_UPDATED)return"none";const f=ea(me);return f==null?"none":f.parent_task_id===X?"refreshSubtasks":P!==m.TASK_UPDATED||f.task_id!==X?"none":f.is_deleted===!0?"leaveDeleted":f.is_private!==!0||Se?f.sync_token!=null&&f.sync_token===Te?"none":"refreshTask":"leaveNoAccess"})(o,k,{isZeniUser:de,storedSyncToken:ke,taskId:t});p==="refreshTask"?(a(b(!0,t)),a(E(t))):p==="refreshSubtasks"?a(E(t)):p==="leaveDeleted"?q():p==="leaveNoAccess"&&O();break}case m.TASKS_BULK_UPDATED:{const p=H(k);if(p==null)break;p.task_ids.includes(t)&&a(b(!0,t)),a(E(t));break}case m.TASKS_BULK_DELETED:{const p=H(k);if(p==null)break;if(p.task_ids.includes(t)){q();break}a(E(t));break}case m.TASK_SNOOZE_RESURFACED:{ta(k)?.task_id===t&&a(b(!0,t));break}}}}),u.useEffect((()=>{T||N.fetchState==="Completed"||(ce(!0),a(Ge()))}),[T,a,N.fetchState]),u.useEffect((()=>{$||Z==="Completed"||(le(!0),a(Re()))}),[$,a,Z]);const pe=u.useCallback((()=>{t!=null&&(_.current=!1,a(ye([t],null,{isArchived:!1})),x(!0))}),[a,t]);u.useEffect((()=>{if(Q)if(A!=="In-Progress"){if(_.current){if(A==="Error")return x(!1),void(_.current=!1);if(A==="Completed"){x(!1),_.current=!1;const{tenantEmailDomain:o}=d;if(n.state?.message==="triggerBackClick"){const k=re(n.state?.pathnameStackToGoBack);e(k.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:k.newStack}})}else{const k=U(o);e(k,{state:{pathnameStackToGoBack:R(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else _.current=!0}),[Q,A,d,n,e]);const V=g((o=>oe(o,t))),j=V.fetchState,M=D.getSignedInUser();if(M==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&V.error?.code===400){const{tenantEmailDomain:o}=d,k=U(o),p=R(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(Ee,{to:k,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(Ve,{analytics:W,onLoad:o=>(k=>k.trackPageLoaded(Me.Event.taskDetailPage))(o)}):null,r.jsxs(la,{children:[r.jsx(He,{isAppContentDrawerOpen:y,handleDrawerToggle:o=>{w(o)}}),r.jsx(ca,{analytics:W,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:S,location:n,loggedInUser:M,navigate:e,taskGroupId:l,taskId:t,taskDetailFetchState:j,onUnarchiveTaskClick:pe,isTaskSnoozeEnabled:i,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:C,isTaskRecurringParentEnabled:v,isTaskGroupAssigneesEnabled:B})]})]})}const la=We.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
|
-
`,U=e=>`/${e}/tasks`;function wa(){return r.jsxs(De,{children:[r.jsx(h,{path:"/new",element:r.jsx(K,{})}),r.jsx(h,{path:"/new/:taskGroupId",element:r.jsx(K,{})}),r.jsx(h,{path:"/group/:taskGroupId",element:r.jsx(na,{})}),r.jsx(h,{path:"/quick-responses",element:r.jsx(ia,{})}),r.jsx(h,{path:"/:taskId",element:r.jsx(K,{})}),r.jsx(h,{path:"*",element:r.jsx(fe,{})})]})}export{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-DCIY2V5W.js";import i from"./NotFoundScreen-DUP1I-Dh.js";import{T as r}from"./TransactionDetailScreen-R1s2Fj0b.js";import"./sentry--FQm-CEz.js";import{n as a,o as e}from"./core-DO2aQ9sC.js";import"./zeni-epic-state-Cc-xO4DM.js";import"./recharts-BFgvJAkx.js";import"./index-DtDfc4Ly.js";import"./mui-Beesmy34.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.js";import"./useAskAiCfoHostNavButtonProps-BH1yPMVh.js";import"./decodeURIComponentSafe-BGunfdyb.js";import"./useInitialThreadRequest-B_GduCEN.js";import"./routePaths-CWDMrD59.js";import"./expenseAutomationHelper-Box0P8C-.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="bfd19369-9f5a-4875-9ff9-f0a50fe2624d",o._sentryDebugIdIdentifier="sentry-dbid-bfd19369-9f5a-4875-9ff9-f0a50fe2624d")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-DCIY2V5W.js";import{a as f}from"./sentry--FQm-CEz.js";import{t as u,u as h,j as b,N as y}from"./core-DO2aQ9sC.js";import{V2 as I,gl as w,J_ as j}from"./zeni-epic-state-Cc-xO4DM.js";import{z as l,a5 as x,ad as S,ae as _}from"./index-DtDfc4Ly.js";import{n as g}from"./mui-Beesmy34.js";import"./recharts-BFgvJAkx.js";import"./analytics-CHOlTFyu.js";import"./plaid-IFb-JOAW.js";import"./dnd-C6oCteDZ.js";import"./stripe-cKAAJElX.js";import"./lottie-BsiUbd07.js";import"./lexical-Dahvp5A4.js";import"./pdf-Bi1FWCM7.js";import"./utils-9X_P6qcc.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]="5a81f8b1-6845-48b2-9be5-4819d0937ae7",e._sentryDebugIdIdentifier="sentry-dbid-5a81f8b1-6845-48b2-9be5-4819d0937ae7")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=b((c=>I(c))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(m(!0),a(j(t,p,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},D=g.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,E=g(_.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{A as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DCIY2V5W.js";import{a as m}from"./sentry--FQm-CEz.js";import{h as x,u as T,g as $,i as j,j as p}from"./core-DO2aQ9sC.js";import{TM as s,TL as v,a09 as B,fI as C,a0a as L}from"./zeni-epic-state-Cc-xO4DM.js";import{$ as z,ac as g,z as D,a5 as E,d3 as P,a2 as M}from"./index-DtDfc4Ly.js";import{u as N,n as _}from"./mui-Beesmy34.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="cc50f3ba-585c-468a-a4df-519cde04759f",a._sentryDebugIdIdentifier="sentry-dbid-cc50f3ba-585c-468a-a4df-519cde04759f")}catch{}})();const U=_.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: ${a=>a.theme.colors.grey4};
|
|
9
|
-
`;function H(){const a=x(),n=T(),d=z(),f=$();let{accountId:e}=j(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${e}`;e==null&&f.pathname.includes(`${s}/statements`)&&(e=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=m.useState(!1),h=N();m.useEffect((()=>{u||(y(!0),n(v(e??"",!1)))}),[u,n]);const o=p((t=>B(t,e??""))),I=()=>{const t=M(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";a(S,{state:{pathnameStackToGoBack:t.newStack}})},c=D.getSignedInUser(),r=p((t=>C(t))),b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=L(e??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(E,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(U,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:l})})}export{H as Z};
|