@zeniai/web-app-ui 5.0.85-qa → 5.0.86-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/assets/AddressRoutes-CGo30rdJ.js +1 -0
  2. package/dist/assets/{AddressScreen-BtcayE54.js → AddressScreen-DqNplF9n.js} +2 -2
  3. package/dist/assets/AiCfoScreen-DY2bTh5X.js +22 -0
  4. package/dist/assets/BillPayApprovalRoutes-BcGyYnYz.js +1 -0
  5. package/dist/assets/{BillPayRoutes-DsFE6diU.js → BillPayRoutes-Dksq93Nt.js} +18 -18
  6. package/dist/assets/{BusinessVerificationPageScreen-DyDPvAa7.js → BusinessVerificationPageScreen-YDSaAbpW.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-CSRXXtJq.js → ChargeCardRoutes-o064oMRW.js} +9 -9
  8. package/dist/assets/CompanyPassportScreen-BLW99zDL.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-Bd0F-_VJ.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-Cb43qCFz.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-l2IJ6Hus.js → CustomerOnboardingRoutes-DJIij8xf.js} +4 -4
  12. package/dist/assets/DashboardRoutes-CS6nJI2P.js +20 -0
  13. package/dist/assets/{DefaultTenantHome-BhXvYXq9.js → DefaultTenantHome-Bl9eDQpG.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-CQO9Kbrv.js +18 -0
  15. package/dist/assets/DrawerScreen-E9PcStEO.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-zw7M1lwQ.js +1 -0
  17. package/dist/assets/ExpenseAutomationRoutes-BHuRnA1t.js +25 -0
  18. package/dist/assets/FeaturePreviewScreen-DtxT93sy.js +1 -0
  19. package/dist/assets/HubSpotOAuthCallbackScreen-DvdLNXNC.js +1 -0
  20. package/dist/assets/{MagicLinkRoutes-g2y4CG2P.js → MagicLinkRoutes-BszO-d0K.js} +21 -21
  21. package/dist/assets/MagicLinkSignInScreen-C_x0l97F.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-CQBNZVi-.js → MobileAppDrawer-D8M7VXe9.js} +1 -1
  23. package/dist/assets/NotFoundScreen-BHqd2QHQ.js +1 -0
  24. package/dist/assets/{NotificationRoutes-CvOb5_M_.js → NotificationRoutes-BF1vgjUU.js} +1 -1
  25. package/dist/assets/OAuthConsentScreen-BR0rJGBP.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-DY76dKM1.js +1 -0
  27. package/dist/assets/PeopleRoutes-BtQrBjKV.js +22 -0
  28. package/dist/assets/PerformanceRoutes-DMpi0fOi.js +1 -0
  29. package/dist/assets/{Preview-C8WOe1SB.js → Preview-C8bsUUOu.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-DaV5GdQG.js → QBOConnectionScreen-vJXVqwWm.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-Bls1S21T.js → ReferralListScreen-DMiRiZiL.js} +2 -2
  32. package/dist/assets/ReimbursementApprovalRoutes-CkwYBtEW.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DbnieOyX.js → ReimbursementApprovalRuleDetailScreen-CmXeAJ2V.js} +1 -1
  34. package/dist/assets/ReimbursementRoutes-C8zQyJK2.js +68 -0
  35. package/dist/assets/ReportsRoutes-BexYmhra.js +1 -0
  36. package/dist/assets/RewardsRoutes-DjXjgRiO.js +1 -0
  37. package/dist/assets/ScreenRoutes-BoNP2LIP.js +2 -0
  38. package/dist/assets/{SettingsRoutes-C6LVb3V1.js → SettingsRoutes-DNp9Aol7.js} +7 -7
  39. package/dist/assets/{SetupPagesScreen-BbYqHHxm.js → SetupPagesScreen-D1bk7eBP.js} +5 -5
  40. package/dist/assets/SignInScreen-Cgfdytgb.js +1 -0
  41. package/dist/assets/SignOutScreen-kKi84Hfg.js +9 -0
  42. package/dist/assets/TaskListScreen-BVNYZTXx.js +9 -0
  43. package/dist/assets/TaskRoutes-BrThx6o_.js +9 -0
  44. package/dist/assets/TransactionDetailRoutes-6MCXCmqq.js +1 -0
  45. package/dist/assets/TransactionDetailScreen-DWs7y2E7.js +5 -0
  46. package/dist/assets/TransactionListRoutes-Y2-dK5Nn.js +1 -0
  47. package/dist/assets/TreasuryRoutes-DlQvHZ4w.js +37 -0
  48. package/dist/assets/{VendorsRoutes-CiiYmal_.js → VendorsRoutes-HIQQTQSi.js} +28 -28
  49. package/dist/assets/WiseConfirmationScreen-C646Mco3.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-H-lyZt2Y.js → ZeniAccountRoutes-Kwn8sr_a.js} +12 -12
  51. package/dist/assets/ZeniAccountStatementScreen-BmEJTL09.js +9 -0
  52. package/dist/assets/{accountMappingHelper-CXzOuSqF.js → accountMappingHelper-5LvFlOj7.js} +1 -1
  53. package/dist/assets/{analytics-CRD_Mcgv.js → analytics-BE9oUBzD.js} +1 -1
  54. package/dist/assets/{analyticsHelper-BpXMyiZT.js → analyticsHelper-BEEOw1D6.js} +1 -1
  55. package/dist/assets/{core-BZAtj_dP.js → core-D1cXuJMi.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-K7ukqtFq.js → decodeURIComponentSafe-Did0aZyt.js} +1 -1
  57. package/dist/assets/{dnd-CYktLE_1.js → dnd-DbPPTppj.js} +1 -1
  58. package/dist/assets/{empty-DDhd2rI6.js → empty-BHW5kDnt.js} +1 -1
  59. package/dist/assets/{empty-BtWrOCqn.js → empty-CfqAKA3M.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-Bspjk9Ta.js → emptyVideoElement-BofOruLs.js} +1 -1
  61. package/dist/assets/epic-CUqueK5i.js +2 -0
  62. package/dist/assets/getLocaleForTenant-Dc-_DzRm.js +1 -0
  63. package/dist/assets/{index-DvtTYnxY.js → index-3aBFjHPN.js} +1 -1
  64. package/dist/assets/{index-3xpE1-f9.js → index-B4eiJr7Z.js} +1 -1
  65. package/dist/assets/{index-5Uhv29OT.js → index-BSfz3Hzd.js} +1 -1
  66. package/dist/assets/{index-BOpWIlV0.js → index-CRe2wmI_.js} +1 -1
  67. package/dist/assets/{index-DvJe2aYX.js → index-DF3os92T.js} +2 -2
  68. package/dist/assets/{index-fjLnhDUD.js → index-DjDfMTxy.js} +1 -1
  69. package/dist/assets/{index-l0jEAtpj.js → index-Dr8ZNfvJ.js} +15411 -15406
  70. package/dist/assets/{index-rFU-5LRD.js → index-n6IrYjfy.js} +1 -1
  71. package/dist/assets/{lexical-CtWr-ANo.js → lexical-Du70nM1B.js} +1 -1
  72. package/dist/assets/{liveblocks-B381bPI5.js → liveblocks-Hyy2O23M.js} +1 -1
  73. package/dist/assets/{lottie-M6FrlJUx.js → lottie-qu8VyEpw.js} +1 -1
  74. package/dist/assets/{mui-Ded5Lnjo.js → mui-B2prtfNk.js} +1 -1
  75. package/dist/assets/{pathToGoBack-itTyzDhS.js → pathToGoBack-C7gPpVBh.js} +1 -1
  76. package/dist/assets/{pdf-CXxzr_OL.js → pdf-Cvwxd6W6.js} +4 -4
  77. package/dist/assets/{pdf-lib-BOf1Mpdf.js → pdf-lib-D1w2Ub95.js} +1 -1
  78. package/dist/assets/{plaid-CigRTw2w.js → plaid-4w70Yh4I.js} +1 -1
  79. package/dist/assets/{pusher-DD87NXN7.js → pusher-Bvm9V4qD.js} +1 -1
  80. package/dist/assets/{react-CeRpBRgM.js → react-B4GuIedn.js} +1 -1
  81. package/dist/assets/{react-Ct2u64kQ.js → react-BCjBqrrm.js} +1 -1
  82. package/dist/assets/{react-5meyD7ty.js → react-BZq53fCf.js} +1 -1
  83. package/dist/assets/{react-0OYfftd4.js → react-BfNTrsTo.js} +1 -1
  84. package/dist/assets/{react-TqMAXqlI.js → react-CBBEPwWt.js} +1 -1
  85. package/dist/assets/{react-D4qnCHni.js → react-CUSCkthZ.js} +1 -1
  86. package/dist/assets/{recharts-CxMFTRT8.js → recharts-CrZf7bKF.js} +1 -1
  87. package/dist/assets/routePaths-Dx_nnKk7.js +1 -0
  88. package/dist/assets/{sentry-N_eviIZg.js → sentry-BTyPPF0t.js} +1 -1
  89. package/dist/assets/{url-giMXuS4f.js → url-CsQlFR2d.js} +1 -1
  90. package/dist/assets/{url-tPbFjbci.js → url-Dq7O3gKi.js} +1 -1
  91. package/dist/assets/useAskAiCfoHostNavButtonProps-BxShjiqA.js +1 -0
  92. package/dist/assets/{useDeviceId-DesiQfLG.js → useDeviceId-D81NtSvK.js} +1 -1
  93. package/dist/assets/useFetchSuggestedQuestionsWhenReady-DWTRn_Lu.js +1 -0
  94. package/dist/assets/{useInitialThreadRequest-rt9wsjsl.js → useInitialThreadRequest-WHG7gHcH.js} +1 -1
  95. package/dist/assets/{utils-DvZFRPln.js → utils-C_-saZ2j.js} +1 -1
  96. package/dist/assets/withTransactionSidePanel-DcRhIgzv.js +21 -0
  97. package/dist/assets/{zeni-epic-state-BYztznIU.js → zeni-epic-state-CbUjX_b3.js} +6 -6
  98. package/dist/index.html +1 -1
  99. package/package.json +4 -4
  100. package/dist/assets/AddressRoutes-ByNvllYO.js +0 -1
  101. package/dist/assets/AiCfoScreen-DGB9zDPa.js +0 -22
  102. package/dist/assets/BillPayApprovalRoutes-DNR93njT.js +0 -1
  103. package/dist/assets/CompanyPassportScreen-Bz4mLFh7.js +0 -1
  104. package/dist/assets/ConnectionAuthScreen-ByV6Tmro.js +0 -11
  105. package/dist/assets/CustomerOnboardingAuthScreen-DjBElWhF.js +0 -1
  106. package/dist/assets/DashboardRoutes-BQXZD2Lg.js +0 -20
  107. package/dist/assets/DomesticWireDetailScreen-S8pB6QMG.js +0 -18
  108. package/dist/assets/DrawerScreen-NjKnf1YY.js +0 -1
  109. package/dist/assets/EntityDetailRoutes-zm-3jflF.js +0 -1
  110. package/dist/assets/ExpenseAutomationRoutes-be35OPw4.js +0 -25
  111. package/dist/assets/FeaturePreviewScreen-Bt2H4Z6l.js +0 -1
  112. package/dist/assets/HubSpotOAuthCallbackScreen-C_xNoer0.js +0 -1
  113. package/dist/assets/MagicLinkSignInScreen-Hncas8bE.js +0 -12
  114. package/dist/assets/NotFoundScreen-B-5op0jc.js +0 -1
  115. package/dist/assets/OAuthConsentScreen-BOhp2ut-.js +0 -1
  116. package/dist/assets/PandLWithForecastRoutes-2AFcv1lQ.js +0 -1
  117. package/dist/assets/PeopleRoutes-CokVmeNh.js +0 -22
  118. package/dist/assets/PerformanceRoutes-DFdim8gz.js +0 -1
  119. package/dist/assets/ReimbursementApprovalRoutes-Uulp1bt3.js +0 -1
  120. package/dist/assets/ReimbursementRoutes-CfyEG0Oh.js +0 -68
  121. package/dist/assets/ReportsRoutes-DGF8a5_O.js +0 -1
  122. package/dist/assets/RewardsRoutes-CR3jZvlK.js +0 -1
  123. package/dist/assets/ScreenRoutes-BlUphh6q.js +0 -2
  124. package/dist/assets/SignInScreen-C5U7E7kj.js +0 -1
  125. package/dist/assets/SignOutScreen-f_wBxqm6.js +0 -9
  126. package/dist/assets/TaskListScreen-Jne3kBc1.js +0 -9
  127. package/dist/assets/TaskRoutes-FcXfZbsF.js +0 -9
  128. package/dist/assets/TransactionDetailRoutes-C3foecuN.js +0 -1
  129. package/dist/assets/TransactionDetailScreen-CmMgSwsr.js +0 -5
  130. package/dist/assets/TransactionListRoutes-YIOk2iJl.js +0 -1
  131. package/dist/assets/TreasuryRoutes-CMvaheZZ.js +0 -37
  132. package/dist/assets/WiseConfirmationScreen-B3VNahBo.js +0 -12
  133. package/dist/assets/ZeniAccountStatementScreen-dZ9YFFOZ.js +0 -9
  134. package/dist/assets/epic-CvldkuU3.js +0 -2
  135. package/dist/assets/getLocaleForTenant-B6DiABoj.js +0 -1
  136. package/dist/assets/routePaths-ChRahAmw.js +0 -1
  137. package/dist/assets/useAskAiCfoHostNavButtonProps-DCgVyLJS.js +0 -1
  138. package/dist/assets/useFetchSuggestedQuestionsWhenReady-DhDRKto8.js +0 -1
  139. package/dist/assets/withTransactionSidePanel-D9xxZEyy.js +0 -21
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-B381bPI5.js";import{JJ as te,eQ as X,jC as H,eW as Q,eU as ne,H8 as Y,Jn as oe,t0 as Ee,JK as N,sQ as ke,t9 as Ie,t3 as ie,sU as re,t7 as Pe,t4 as je,JL as le,uG as Le,JM as Te,fz as ve,JN as J,sZ as de,sX as ce,tc as Fe,c2 as Ae}from"./zeni-epic-state-BYztznIU.js";import{Z as pe,y as q,S as E,z as K,a6 as ue,I as me,ah as ge,ai as Re,F as he,o as R,O as fe,D as Ce,aj as Oe,U as Ve,A as Ue,e as be,g as Ze,r as Be,ak as $e,d as Je}from"./index-l0jEAtpj.js";import{D as ye,n as M,S as we}from"./mui-Ded5Lnjo.js";import se from"./NotFoundScreen-B-5op0jc.js";import{a as r}from"./sentry-N_eviIZg.js";import{h as ee,l as ze,g as m,j as Ge,u as He,k as Ke,n as ae,o as $}from"./core-BZAtj_dP.js";import{u as Me}from"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import{c as We}from"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import{M as _e}from"./MobileAppDrawer-CQBNZVi-.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="f206d67c-2207-4f50-8107-ff2542c96009",s._sentryDebugIdIdentifier="sentry-dbid-f206d67c-2207-4f50-8107-ff2542c96009")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>X(e)),D=m(e=>H(e)),{useFeatureGate:f}=q(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Q(k,u),T=ne(u),v=Y(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(s):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:a.jsxs(Qe,{onClick:e=>e.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(Se,{children:z.discardTitle}),descriptionComponent:a.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:i,isEditPopup:!0}):null,a.jsx(Re,{...b})]})})},Qe=M(we)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Se=M(fe.H6Regular)`
6
- margin-top: ${R.sp7};
7
- padding-left: ${R.sp8};
8
- padding-right: ${R.sp8};
9
- color: ${s=>s.theme.colors.primary};
10
- word-break: break-word;
11
- `,De=M(fe.LargeRegularSp)`
12
- color: ${s=>s.theme.colors.hero};
13
- padding-left: ${R.sp8};
14
- padding-right: ${R.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${R.sp4};
17
- white-space: pre-line;
18
- `,Ye={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>X(i)),u=m(i=>H(i)),{useFeatureGate:D}=q(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Q(f,d),P=ne(d),T=Y(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),L=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:T,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(s):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ye.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(es,{onClick:i=>i.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(Se,{children:G.discardTitle}),descriptionComponent:a.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,a.jsx(Oe,{...b})]})})},es=M(we)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,ss=Ke(function(s,t){const l=le(s),n=K.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(s),analytics:be}},function(s,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{s(re(o,y))},onResendInvite:o=>{s(Fe(o))},onReloadPeople:()=>{s(de()),s(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{s(J({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{s(J({searchText:o}))}}}})($e);function _({isInvitePeopleDrawerOpen:s,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=K.getSignedInUser(),h=m(e=>X(e)),{useFeatureGate:p}=q(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!Q(O,h)&&V,w=Y(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,T]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=Me({mobileExploreReferrer:"People"}),c=m(e=>le(e));We({isDataReady:c.fetchState==="Completed"});const j=m(e=>Le(e.classState,e.classListState)),L=m(e=>Te(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(J({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(s!=null&&s===!0),T(t!=null&&t===!0&&t)},[s,t]),r.useEffect(()=>{n(J({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),T(!1),l("../")};return a.jsxs(a.Fragment,{children:[c.fetchState==="Completed"?a.jsx(Ue,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?a.jsx(qe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,a.jsx(_e,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),a.jsx(ss,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:L,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(J({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Be(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function Ss(){const s=Je();return Ae(s?.loggedInUserRole??[])?a.jsxs(ae,{children:[a.jsx($,{path:"/",element:a.jsx(_,{})}),a.jsx($,{path:"new",element:a.jsx(_,{isInvitePeopleDrawerOpen:!0})}),a.jsx($,{path:":userId/edit",element:a.jsx(_,{isEditPeopleDrawerOpen:!0})}),a.jsx($,{path:"*",element:a.jsx(se,{})})]}):a.jsx(ae,{children:a.jsx($,{path:"*",element:a.jsx(se,{})})})}export{Ss as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-B381bPI5.js";import E from"./NotFoundScreen-B-5op0jc.js";import{a as r}from"./sentry-N_eviIZg.js";import{j as _,u as v,g as p,l as M,h as P,N as U,k as O,n as z,o as h}from"./core-BZAtj_dP.js";import{eQ as B,Pp as b,bo as F,bn as N,hi as V,gO as Q}from"./zeni-epic-state-BYztznIU.js";import{v as $,z as I,cv as q}from"./index-l0jEAtpj.js";import"./mui-Ded5Lnjo.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import{c as H}from"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import{M as J}from"./MobileAppDrawer-CQBNZVi-.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.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]="8dfe1d32-bea6-4a02-833c-d7cdf6899d57",e._sentryDebugIdIdentifier="sentry-dbid-8dfe1d32-bea6-4a02-833c-d7cdf6899d57")}catch{}})();const K=O(function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(q),L=()=>{const e=_(),t=v(),d=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,C]=r.useState(!1),S=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=S||k||x,c=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(Q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0},[n?.fetchState,c]),j=r.useCallback((a,i)=>{c(a,i,!1)},[c]),g=a=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return H({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:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function pe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-B381bPI5.js";import R from"./NotFoundScreen-B-5op0jc.js";import{a as p}from"./sentry-N_eviIZg.js";import{j as C,u as I,h as A,g as l,N as E,k,n as D,o as u}from"./core-BZAtj_dP.js";import{eQ as N,N6 as g,Nm as S,CH as T,BQ as V,CG as m,Cx as U,NC as _}from"./zeni-epic-state-BYztznIU.js";import{m as $,z as B,x as O,a3 as Q,bJ as W,ac as z}from"./index-l0jEAtpj.js";import"./mui-Ded5Lnjo.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-DbnieOyX.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]="5b634807-731f-4412-9c63-c94fca0d0cbc",e._sentryDebugIdIdentifier="sentry-dbid-5b634807-731f-4412-9c63-c94fca0d0cbc")}catch{}})();const d="reimbursement-approval-rule-update",G=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:c}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(c)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(Q(W)),H=()=>{const e=C(),r=I(),a=A(),[c,s]=p.useState(!1),[f,y]=p.useState(!1),b=l(n=>n.remiSetupApproverViewState.fetchState),o=l(n=>N(n)),w=$(),i=l(n=>g(n)),h=l(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{c||b!=="Not-Started"||(s(!0),a(V(!0)))},[c,b,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const x={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,J,j)=>{n.endsWith(d)&&j.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(O,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(G,{currentTenant:o,location:r,navigate:e,...x})};function Z(){return t.jsxs(D,{children:[t.jsx(u,{path:"/",element:t.jsx(H,{})}),t.jsx(u,{path:"/new",element:t.jsx(v,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(u,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
@@ -1,68 +0,0 @@
1
- import{j as s}from"./liveblocks-B381bPI5.js";import{j as J,h as re,u as H,l as Q,g as E,N as M,k as K,i as mt,n as ct,o as k}from"./core-BZAtj_dP.js";import{eQ as V,ND as le,c2 as me,BL as Be,jN as dt,BY as ne,BX as ae,NE as ut,bn as ce,fK as Te,NF as pt,J_ as bt,jC as De,J$ as Se,K0 as gt,ix as ht,MU as ft,iM as St,Bz as It,so as yt,iE as Rt,Cj as je,NG as Fe,NH as At,NI as Ct,NJ as vt,NK as kt,NL as Et,C3 as Ie,iS as wt,N1 as xt,BZ as Bt,BJ as Tt,NM as Dt,BI as jt,NN as Ft,BR as ye,C7 as Ut,C6 as Lt,C2 as Nt,NO as Ue,H8 as Pt,bo as $t,BU as Mt,CB as _t,NP as Ot,NQ as zt,Cf as Gt,Cc as Re,Mn as Zt,BG as Ht,NR as Le,C_ as Ae,D6 as Vt,NS as Wt,NT as G,NU as Jt,NV as Ne,NW as Kt,NX as Pe,NY as $e,Cr as se,bt as qt,bG as de,cC as ue,eW as Me,eU as _e,NZ as Xt,gO as Qt,MA as Yt,N_ as en,N$ as Oe,ME as tn,Nm as nn,O0 as an,NC as sn,D3 as Ce,D2 as on,O1 as rn,O2 as ln,O3 as mn,O4 as cn,O5 as dn,N7 as un,CV as pn,CZ as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,IU as yn,cN as Rn,cP as An,cO as Cn,cw as vn}from"./zeni-epic-state-BYztznIU.js";import{v as ze,Z as Ge,y as Y,S as C,z as P,bK as Ze,A as ee,e as v,aE as ve,o as j,aq as X,I as kn,D as He,bL as En,r as Z,bM as wn,d as te,bN as xn,U as Bn,F as Tn,x as pe,g as Ve,a3 as Dn,bb as jn,X as Fn,m as We,bO as Un,a6 as Ln}from"./index-l0jEAtpj.js";import{n as _,S as Nn}from"./mui-Ded5Lnjo.js";import ie from"./NotFoundScreen-B-5op0jc.js";import{S as ke}from"./SetupPagesScreen-BbYqHHxm.js";import{F as Je}from"./FeaturePreviewScreen-Bt2H4Z6l.js";import{a as f}from"./sentry-N_eviIZg.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import{u as Ke}from"./useInitialThreadRequest-rt9wsjsl.js";import{c as qe}from"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import{D as Pn}from"./DrawerScreen-NjKnf1YY.js";import{M as Xe}from"./MobileAppDrawer-CQBNZVi-.js";import{R as $n}from"./ReimbursementApprovalRoutes-Uulp1bt3.js";import{FallBackRoute as Mn}from"./ScreenRoutes-BlUphh6q.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.js";import"./analyticsHelper-BpXMyiZT.js";import"./routePaths-ChRahAmw.js";import"./BusinessVerificationPageScreen-DyDPvAa7.js";import"./ReimbursementApprovalRuleDetailScreen-DbnieOyX.js";import"./getLocaleForTenant-B6DiABoj.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]="b365c7cc-9473-4f79-8835-7bea9d6ec7c2",e._sentryDebugIdIdentifier="sentry-dbid-b365c7cc-9473-4f79-8835-7bea9d6ec7c2")}catch{}})();const Qe=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=He.getLocalizedStrings(),On=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Ct({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Qe(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=J(),t=re(),n=H(),{reimbursementId:r}=Q(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{isFeatureEnabled:b}=l(C.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(C.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,D=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),N=Ke(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||D&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const $=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ze,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:N??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=_.div`
2
- display: flex;
3
- position: relative;
4
- height: 100vh;
5
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
6
- background-color: ${e=>e.theme.colors.grey4};
7
- `,Gn=_.div`
8
- position: fixed;
9
- top: 0;
10
- left: 0;
11
- right: 0;
12
- bottom: 0;
13
- background-color: ${kn.overlayBackgroundBlack};
14
- z-index: 5;
15
- `,Zn=_.div`
16
- position: absolute;
17
- top: 0;
18
- left: 0;
19
- width: 42%;
20
- height: 100%;
21
- z-index: 6;
22
- display: flex;
23
- background-color: transparent;
24
- overflow: hidden;
25
- `,Hn=_.div`
26
- position: fixed;
27
- top: 0;
28
- left: 0;
29
- right: 0;
30
- bottom: 0;
31
- z-index: 11;
32
- display: flex;
33
- flex-direction: column;
34
- overflow-y: auto;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- `,Vn=_.button`
37
- align-self: flex-end;
38
- background: none;
39
- border: none;
40
- cursor: pointer;
41
- padding: ${j.sp2} ${j.sp3};
42
- line-height: 1;
43
- color: ${e=>e.theme.colors.hero};
44
- &:hover {
45
- color: ${e=>e.theme.colors.primary};
46
- }
47
- svg {
48
- width: ${j.sp4};
49
- height: ${j.sp4};
50
- }
51
- `,Wn=_.div`
52
- display: flex;
53
- flex-direction: column;
54
- width: 100%;
55
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
56
- `,Jn=K(function(e,t){const n=Ue(e,t.reimbursementId),r=P.getSignedInUser(),d=ce(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,zt(t.currentTenant),r));const i=me(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Fe());const a=Qe(o),i=Z(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Ht(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Re(n,a.type,"")):e(Re(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=Z(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(je(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function Kn(){const e=J(),t=re(),n=H(),r=n.hash.substring(1),d=ze(),{reimbursementId:c}=Q(),m=P.getSignedInUser(),o=E(y=>V(y)),a=E(y=>Ue(y,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Ke(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=be({mobileExploreReferrer:"Reimbursement Details"});qe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=Y(),{isFeatureEnabled:T}=h(C.isLimitedCategoryForReimbursement),[u,w]=f.useState(!1),[D,A]=f.useState(!1),[F,x]=f.useState(!1),{isFeatureEnabled:B}=h(C.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(C.isShowDeletedReimbursementsFeatureEnabled),g=E(y=>le(y,c??"")),N=Pt(o),U=$t(o.userRole),$=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&$==="Error"&&e("page-not-found",{replace:!0}):(w(!0),t(Mt(c,!1,I)))},[u,c,t,$]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&N===!1?x(!1):x(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(y=>y.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,N,m]),f.useEffect(()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(A(!0),t(Be(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(_t(!1,!0,!0,a.lastUpdatedByUserId)))},[D,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(M,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Ze,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:y=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(y)}),s.jsx(Jn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:B,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:F,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:R})]})}const qn=K(function(e,t){return{remisReviewView:Le(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(G())},onCloseReviewItem:n=>{e(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Vt());break;case"approve":e(Ae("approved",r??""));break;case"reject":e(Ae("rejected",r??""))}}}})(xn);function Xn(){const e=J(),t=E(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=E(c=>Le(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(qn,{navigate:e,analytics:v,isAdmin:d})}const z=tn(),Ye="bulk-operation-update",oe="reimbursement-approval-rule-update",{spendManagement:Qn,common:we}=He.getLocalizedStrings(),xe=Qn.reimbursement.bulkActions,Yn=_.div`
57
- display: flex;
58
- min-height: 100%;
59
- width: 100%;
60
- flex: 1 1 auto;
61
- flex-direction: column;
62
- align-items: center;
63
- background-color: ${e=>e.theme.colors.grey4};
64
- `,ea=K(function(e,t){const n=$e(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const d=P.getSignedInUser(),c=ce(d),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,R=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:R.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(G()),e(Ne(o))},onSubtabChange:o=>{e(G()),e(Pe(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=Z(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=Z(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=Z(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(se(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(G())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(Ce("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ce("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(oe)&&e(sn(!1))},onEventReceived:o=>{o===Ye&&e(an())}}})(Dn(jn));function ta(){const e=J(),t=re(),n=H(),r=n.state,d=Ge(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Jt(r.tab.toString());S!=null?t(Ne(S)):console.log("Warning:Not a valid remiListTab");const O=Kt(r.subTab.toString());O!=null?t(Pe(O)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=Y(),{isFeatureEnabled:i}=a(C.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(C.isBillPayCommentingEnabled),{isFeatureEnabled:R}=a(C.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(C.isReimbursementBulkActionEnabled),T=P.getSignedInUser(),u=E(S=>V(S)),[w,D]=f.useState(!1),[A,F]=f.useState(!1),x=te(),B=x?.loggedInUserRole?.includes("admin")===!0,I=E(S=>$e(S,z,h)),{areTenantIdsInSync:g}=Bn(),N=I.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:$}=be({mobileExploreReferrer:"Reimbursement List"});if(qe({isDataReady:N==="Completed"}),f.useEffect(()=>{!A&&g&&(F(!0),t(se(z,!0,l,!1,!0)))},[A,z,t,g]),T==null)throw Error("Can't access address page without signing in...");const y=!!u?.userRole&&qt(u),p=de(x?.loggedInUserRoleMap),W=ue(x?.loggedInUserRoleMap),et=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,tt=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=E(S=>Te(S.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,ge=S=>{D(S)},{isFeatureEnabled:it}=a(C.isDebitCardFeatureEnabled),ot=Me(it,u),rt=_e(u),{remisProcessed:q,remisProcessing:he}=E(S=>Xt(S));f.useEffect(()=>{q===he&&c!=null&&(t(Qt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:q>1?xe.reports:xe.report},{variableName:"_has_",variableValue:q>1?we.texts.have:we.texts.has},{variableName:"_action_",variableValue:Yt(c)}]})),t(en()),setTimeout(()=>{t(se(z,!0,l,!1,!0,!0))},3e3),m(null))},[q,he]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${Ye}`,`private-encrypted-${u.companyId}.${oe}`]:[],eventCallback:(S,O,fe)=>{S.endsWith(oe)?fe.onReimbursementApprovalRulesEventReceived?.(S):O.entity_type==="reimbursement"&&(m(O.operation_type),fe.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Je,{}):tt&&(!y||p)||W&&et?s.jsxs(s.Fragment,{children:[N==="Completed"?s.jsx(ee,{analytics:v,onLoad:S=>(O=>O.trackPageLoaded(Ve.Event.reimbursementHome))(S)}):null,s.jsx(Xe,{isAppContentDrawerOpen:w,handleDrawerToggle:ge}),s.jsxs(Yn,{windowSize:d,children:[s.jsx(Pn,{isOpen:o,drawerLeftMargin:new Tn(0,0,300,600),onClose:()=>{e("./"),t(G())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Xn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:R,location:n,navigate:e,currentTenant:u,period:z,isAdmin:B,isEmployee:y,entity:"reimbursement",onClickMenuIcon:()=>{ge(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:$,...lt})]})]}):nt&&p?s.jsx(M,{to:"../setup"}):x!=null&&Oe(u,x.loggedInUserRoleMap)?s.jsx(M,{to:"../promo"}):s.jsx(pe,{fetchState:"In-Progress"}):s.jsx(ie,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=_(Nn)`
65
- display: flex;
66
- min-height: 100%;
67
- flex-direction: column;
68
- `,ia=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=J(),t=H(),{tenantEmailDomain:n}=Q(),r=We(),[d,c]=f.useState(!1),m=E(A=>V(A)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=te(),R=de(b?.loggedInUserRoleMap),h=ue(b?.loggedInUserRoleMap),T=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,w=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,D=A=>{c(A)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&T?s.jsx(M,{to:"../../../reimbursements"}):w&&R?s.jsx(M,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!w||m.userReimbursementInfo&&h&&T===!1?s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:A=>(F=>F.trackPageLoaded(Ve.Event.reimbursementPromoPage))(A)}),s.jsx(Xe,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{D(!0)}})]}):s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Pa(){const e=E(W=>V(W)),t=te(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=We(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=Y(),{isFeatureEnabled:o}=m(C.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(C.isDebitCardFeatureEnabled),i=Me(a,e),l=_e(e),b=e?.userRole!=null&&gn(e?.userRole),R=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=fn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=de(t?.loggedInUserRoleMap),w=T&&u,{isFeatureEnabled:D}=m(C.isDepositAccountsFeatureEnabled),A=D&&!b&&Sn(t?.loggedInUserRoleMap),F=Ln(e,o,a)&&!b&&In(t?.loggedInUserRoleMap),x=yn(t?.loggedInUserRoleMap),B=Rn(t?.loggedInUserRoleMap),I=An(t?.loggedInUserRoleMap),g=Cn(t?.loggedInUserRoleMap),N=vn(t?.loggedInUserRoleMap),U=ue(t?.loggedInUserRoleMap),{tenantEmailDomain:$}=Q(),y=H(),p=n===!0&&(u||U&&c);return s.jsxs(ct,{children:[y.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(k,{path:"verification",element:s.jsx(ke,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"verification"})}),s.jsx(k,{path:"setup",element:s.jsx(ke,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"setup"})}),s.jsx(k,{path:"promo",element:s.jsx(oa,{})}),s.jsx(k,{path:"approval-rules/*",element:w?s.jsx($n,{}):s.jsx(Mn,{isUserHasZeniAccountsAccess:B,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:U,isUserHasTreasuryAccess:I,isTenantBankingOnly:i,tenantEmailDomain:$??""})}),p&&s.jsx(k,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(k,{path:"/*",element:s.jsx(Je,{})}),t!=null&&Oe(e,t?.loggedInUserRoleMap)&&s.jsx(k,{path:"*",element:s.jsx(M,{to:"../promo"})}),d&&u&&s.jsx(k,{path:"*",element:s.jsx(M,{to:"../setup"})})]}):y.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(k,{path:"new",element:s.jsx(Ee,{})}),s.jsx(k,{path:":reimbursementId",element:s.jsx(Kn,{})}),s.jsx(k,{path:":reimbursementId/edit",element:s.jsx(Ee,{})}),s.jsx(k,{path:"*",element:s.jsx(ie,{})})]}):s.jsx(k,{path:"*",element:s.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(k,{path:"*",element:s.jsx(ie,{})})]})}export{Pa as default};
@@ -1 +0,0 @@
1
- import{j as p}from"./liveblocks-B381bPI5.js";import{u as z,j as ye,h as ge,l as Ce,g as d,k as we,n as Se,o as G}from"./core-BZAtj_dP.js";import{eQ as L,fa as w,Jl as Ie,jC as W,Jm as X,pU as F,jq as Te,iu as Re,to as K,pZ as Ae,bv as Fe,Jn as Oe,bn as ke,un as De,Jo as Ee,Jp as je,tg as Pe,Jq as Y,Jr as Le,Js as Me,Jt as Be,Ju as Je,Jv as S,Jw as O,Jx as k,Jy as H,Jz as D,JA as E,dE as Ue,u3 as ve,tT as N,tU as q,u9 as Ve,tY as $,uf as xe,JB as ze,JC as Ge,JD as Ye,JE as He,JF as Ne,eW as qe,eU as $e}from"./zeni-epic-state-BYztznIU.js";import{R as Ze,T as Qe,Z as We,y as ee,S as j,z as ae,U as Xe,d as Ke,a as ea,A as aa,e as P,g as sa,r as se,V as ta,W as oa,X as na}from"./index-l0jEAtpj.js";import"./mui-Ded5Lnjo.js";import ra from"./NotFoundScreen-B-5op0jc.js";import{F as ia}from"./FeaturePreviewScreen-Bt2H4Z6l.js";import{a as _}from"./sentry-N_eviIZg.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import{u as fa}from"./useInitialThreadRequest-rt9wsjsl.js";import{t as Z,a as Q}from"./routePaths-ChRahAmw.js";import{M as ma}from"./MobileAppDrawer-CQBNZVi-.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="912c9068-2e7c-42f8-b32d-85d43f32810d",e._sentryDebugIdIdentifier="sentry-dbid-912c9068-2e7c-42f8-b32d-85d43f32810d")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(Ye()),e(He()),e(Ne())},ha=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Oe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e($({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:I(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Je({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",I(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",I(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",I(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{_a(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=oa(f),a=ye(),s=ge(),t=z(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,g]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const J=d(n=>L(n)),oe=J.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?J?.companyId:void 0),C=d(n=>w(n).fetchState),re=d(n=>Ie(n)),{areTenantIdsInSync:h}=Xe(),T=d(n=>n.financeStatementState.selectedReportId),U=d(n=>W(n)),R=d(n=>X(n)),ie=d(n=>w(n).isCompareModeOn),b=d(n=>w(n).filter),A=d(n=>w(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&C==="Completed"&&h&&(s(F(l.userId,!1,!0,!1)),te(!0))},[i,M,C,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(K());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,A,h,U,R]);const v=Ke(),ce=v?.loggedInUserRole!=null&&Fe(v?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Ze(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),pa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const I=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function va(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=qe(f,e),a=$e(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{va as default};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-B381bPI5.js";import{y as w,z as j,aK as y,A as E,e as p,g as F,cF as P,S as L}from"./index-l0jEAtpj.js";import"./mui-Ded5Lnjo.js";import l from"./NotFoundScreen-B-5op0jc.js";import{a as u}from"./sentry-N_eviIZg.js";import{h as A,g as b,j as T,u as V,k as R,n as U,o as d}from"./core-BZAtj_dP.js";import{eQ as z,PY as C,MN as Y,PZ as _,tK as K,f0 as G,P_ as M,tI as O}from"./zeni-epic-state-BYztznIU.js";import{R as x}from"./ReferralListScreen-Bls1S21T.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.js";import"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import"./MobileAppDrawer-CQBNZVi-.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]="cd130b35-c97e-4573-92ba-5ac437d5a45e",e._sentryDebugIdIdentifier="sentry-dbid-cd130b35-c97e-4573-92ba-5ac437d5a45e")}catch{}})();const Q=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{e(_()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(M({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),Z=()=>{const e=A(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>z(o)),c=T(),k=V(),{useDynamicConfig:g}=w(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),v=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),S=Y(D);u.useEffect(()=>{e(_()),r?.rewardsLastViewedTime==null&&i===!1&&(e(K()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(Q,{navigate:c,location:k,currentTenant:r,companyName:I,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:S.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=w(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(Z,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{fe as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BQXZD2Lg.js","assets/sentry-N_eviIZg.js","assets/core-BZAtj_dP.js","assets/zeni-epic-state-BYztznIU.js","assets/index-l0jEAtpj.js","assets/mui-Ded5Lnjo.js","assets/analytics-CRD_Mcgv.js","assets/utils-DvZFRPln.js","assets/withTransactionSidePanel-D9xxZEyy.js","assets/useAskAiCfoHostNavButtonProps-DCgVyLJS.js","assets/useFetchSuggestedQuestionsWhenReady-DhDRKto8.js","assets/TransactionDetailScreen-CmMgSwsr.js","assets/decodeURIComponentSafe-K7ukqtFq.js","assets/routePaths-ChRahAmw.js","assets/NotFoundScreen-B-5op0jc.js","assets/analyticsHelper-BpXMyiZT.js","assets/CompanyPassportScreen-Bz4mLFh7.js","assets/MobileAppDrawer-CQBNZVi-.js","assets/FeaturePreviewScreen-Bt2H4Z6l.js","assets/ReferralListScreen-Bls1S21T.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-DsFE6diU.js","assets/AddressScreen-BtcayE54.js","assets/DomesticWireDetailScreen-S8pB6QMG.js","assets/useInitialThreadRequest-rt9wsjsl.js","assets/DrawerScreen-NjKnf1YY.js","assets/SetupPagesScreen-BbYqHHxm.js","assets/BusinessVerificationPageScreen-DyDPvAa7.js","assets/BillPayApprovalRoutes-DNR93njT.js","assets/ReimbursementApprovalRuleDetailScreen-DbnieOyX.js","assets/getLocaleForTenant-B6DiABoj.js","assets/ReimbursementRoutes-CfyEG0Oh.js","assets/ReimbursementApprovalRoutes-Uulp1bt3.js","assets/TransactionListRoutes-YIOk2iJl.js","assets/ZeniAccountStatementScreen-dZ9YFFOZ.js","assets/SettingsRoutes-C6LVb3V1.js","assets/accountMappingHelper-CXzOuSqF.js","assets/QBOConnectionScreen-DaV5GdQG.js","assets/empty-BtWrOCqn.js","assets/index-rFU-5LRD.js","assets/url-giMXuS4f.js","assets/index-DvtTYnxY.js","assets/ReportsRoutes-DGF8a5_O.js","assets/ChargeCardRoutes-CSRXXtJq.js","assets/PeopleRoutes-CokVmeNh.js","assets/ExpenseAutomationRoutes-be35OPw4.js","assets/TreasuryRoutes-CMvaheZZ.js","assets/VendorsRoutes-CiiYmal_.js","assets/pathToGoBack-itTyzDhS.js","assets/ZeniAccountRoutes-H-lyZt2Y.js","assets/AddressRoutes-ByNvllYO.js","assets/PandLWithForecastRoutes-2AFcv1lQ.js","assets/CustomerOnboardingRoutes-l2IJ6Hus.js","assets/TransactionDetailRoutes-C3foecuN.js","assets/EntityDetailRoutes-zm-3jflF.js","assets/NotificationRoutes-CvOb5_M_.js","assets/PerformanceRoutes-DFdim8gz.js","assets/RewardsRoutes-CR3jZvlK.js","assets/TaskRoutes-FcXfZbsF.js","assets/TaskListScreen-Jne3kBc1.js","assets/AiCfoScreen-DGB9zDPa.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as os,eQ as ls,eW as cs,eU as ds,eV as ms,fF as us,eS as _s,cQ as Ee,cx as Es,fb as As,cp as ps,bE as Is,bq as xs,fg as gs,v as Ts,IT as hs,bv as js,IU as Us,bG as bs,fd as Hs,bF as Rs,bs as Ds,cl as ys,IV as fs,IW as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mx as Ae,eR as pe,fP as Bs,fk as Ie,fM as xe,fN as ge,fl as ks}from"./zeni-epic-state-BYztznIU.js";import{j as e}from"./liveblocks-B381bPI5.js";import{a as v}from"./sentry-N_eviIZg.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Te,N as c,n as Zs,o as t}from"./core-BZAtj_dP.js";import{m as ws,u as Gs,z as H,y as zs,a as $s,c as Ws,S as L,d as Ys,L as B,D as he,t as _,P as qs,e as X,l}from"./index-l0jEAtpj.js";import"./mui-Ded5Lnjo.js";import{f as je}from"./analyticsHelper-BpXMyiZT.js";import{t as Qs}from"./getLocaleForTenant-B6DiABoj.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="164a8179-d1f8-440b-9b0d-a8f4fd09d6d5",i._sentryDebugIdIdentifier="sentry-dbid-164a8179-d1f8-440b-9b0d-a8f4fd09d6d5")}catch{}})();const Js={dashboard:()=>n(()=>import("./DashboardRoutes-BQXZD2Lg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-DsFE6diU.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-CfyEG0Oh.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-YIOk2iJl.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-C6LVb3V1.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-DGF8a5_O.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-CSRXXtJq.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-CokVmeNh.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-be35OPw4.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-CMvaheZZ.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-CiiYmal_.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-H-lyZt2Y.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-DGF8a5_O.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-ByNvllYO.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-CokVmeNh.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-2AFcv1lQ.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-l2IJ6Hus.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-CiiYmal_.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-C3foecuN.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-zm-3jflF.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-BQXZD2Lg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),be=l(()=>n(()=>import("./BillPayRoutes-DsFE6diU.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-C6LVb3V1.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),He=l(()=>n(()=>import("./ReimbursementRoutes-CfyEG0Oh.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-H-lyZt2Y.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-CMvaheZZ.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-YIOk2iJl.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-CSRXXtJq.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-CvOb5_M_.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-DFdim8gz.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-be35OPw4.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-CR3jZvlK.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-FcXfZbsF.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),xn=l(()=>n(()=>import("./AiCfoScreen-DGB9zDPa.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-B-5op0jc.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),gn=l(()=>n(()=>import("./TaskListScreen-Jne3kBc1.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),Q=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),J=$s(),ye=Ws(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&Q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),W=G(a=>us(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ys(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,K=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&D!=null){const a=K.params.selectedPeriod;if(a!=null){const b=a.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(gs(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s){if(pe(b?.userId,b?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Qs(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(Y&&ts){k(Ie(s));const q=H.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),Y&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)));if(Y){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,W.tenantsBaseInOrder))},[W,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Ks,b=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Js[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(E?.loggedInUserRoleMap),me=Oe&&!C,We=r.company!=null&&Hs(r.company),Ye=Pe&&We===!0&&!C,qe=re&&Rs(E?.loggedInUserRoleMap),Qe=oe&&Ds(E?.loggedInUserRoleMap),Je=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),I=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&g,_e=ce&&T,es=me&&p,ss=Ye&&I,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Ke===!0||Xe===!0;return H.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||Q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||Q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(gn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:qe||de||Je||Qe?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:J?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:J?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:J?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(bn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Hn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wn as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-B381bPI5.js";import{a as u,b as T,q as A}from"./sentry-N_eviIZg.js";import{h as D,j as z,g as l,u as M,N as j,k as O}from"./core-BZAtj_dP.js";import{u as P,z as s,m as _,e as E,D as F,f as N,g as B,N as $,h as J,i as V,j as v}from"./index-l0jEAtpj.js";import{eQ as q,IS as Q,IT as R,eR as W,fk as H,IY as Y,fJ as Z,cU as G,IZ as b,I_ as K,I$ as X,bT as y}from"./zeni-epic-state-BYztznIU.js";import"./mui-Ded5Lnjo.js";import{u as ee}from"./useDeviceId-DesiQfLG.js";import{f as te}from"./analyticsHelper-BpXMyiZT.js";import{t as ne}from"./getLocaleForTenant-B6DiABoj.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.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]="89a64993-7eb2-408a-9de3-d8da2f21dcf3",t._sentryDebugIdIdentifier="sentry-dbid-89a64993-7eb2-408a-9de3-d8da2f21dcf3")}catch{}})();const ie=O(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:y(c),sourceUri:y(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(b())}}})(V),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>q(e)),S=l(e=>Q(e)),m=M(),w=_().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(S.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Y("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),Z().then(()=>{const e=J();e!=null&&N(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",G(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&k!=null?f.jsx($,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-B381bPI5.js";import{a}from"./sentry-N_eviIZg.js";import{h as u,u as m,j as p,N as g}from"./core-BZAtj_dP.js";import{z as f,x as y,t as b,e as d,g as h}from"./index-l0jEAtpj.js";import{fO as x,fP as I,Je as j}from"./zeni-epic-state-BYztznIU.js";import{n as w}from"./mui-Ded5Lnjo.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.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]="0fc95035-e226-4c45-9ddf-b58b1dadcfce",e._sentryDebugIdIdentifier="sentry-dbid-0fc95035-e226-4c45-9ddf-b58b1dadcfce")}catch{}})();function $(){const e=u(),t=m(),i=p(),n=a.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return a.useEffect(()=>{o&&!n.current&&(n.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.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{$ as default};
@@ -1,9 +0,0 @@
1
- import{j as d}from"./liveblocks-B381bPI5.js";import{a as g}from"./sentry-N_eviIZg.js";import{j as z,h as K,u as _,g as b,l as M,k as O}from"./core-BZAtj_dP.js";import{z as R,y as V,S as p,A as W,e as Z,g as q,cI as H,r as f,k as J}from"./index-l0jEAtpj.js";import{eQ as X,Q3 as Q,FQ as y,Q4 as x,P$ as Y,Fg as S,Q5 as aa,Fk as I,EP as ea,FR as B,Q6 as F,gO as ta,FH as sa,FM as oa,Fz as na,Fx as w,FN as ia,Fu as la,Q7 as ra,Q8 as ka,Q9 as ca,Qa as ua,Qb as m,ec as da,Qc as pa,Qd as ma}from"./zeni-epic-state-BYztznIU.js";import{n as Ta}from"./mui-Ded5Lnjo.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import{M as ha}from"./MobileAppDrawer-CQBNZVi-.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.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]="fd463dae-d90e-4983-a588-876b67038e26",e._sentryDebugIdIdentifier="sentry-dbid-fd463dae-d90e-4983-a588-876b67038e26")}catch{}})();const Da=Ta.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
- `,Ga=O(function(e,t){const o=Q(e,t.isTaskTemplatesEnabled),{taskGroupId:k}=t,i=k!=null&&k!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(k))})).filter(l=>l.tasks.length>0)}:o,u=Y(e),n=R.isZeniUser();return{taskListView:i,tagListView:u,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:k,location:i,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:n}=k,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(n,a),c=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:c}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(ua(a))},onParentTaskClick:a=>{const s=L(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(F({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ka({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=J(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ra({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(la(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,ia(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(na(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ba(l,a);e(S({taskDetailLocalData:s}));const c=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),h=f(i.state?.pathnameStackToGoBack,i.pathname);o(c,{state:{pathnameStackToGoBack:h,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(oa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(sa(a,s))},onTimeSpentUpdate:(a,s)=>{e(B({task:a,updates:s}))},onShowToast:a=>{e(ta(a))},onGroupByFilterChange:a=>{e(F({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(B({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ea(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(S({taskDetailLocalData:{...aa,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),c=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:c,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(H);function va(){const e=z(),t=K(),o=_(),k=R.getSignedInUser(),i=b(r=>X(r)),{taskGroupId:u}=M(),{useFeatureGate:n}=V(),{isFeatureEnabled:l}=n(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=n(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=n(p.isTaskCategorizationEnabled),{isFeatureEnabled:c}=n(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:h}=n(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=n(p.isTaskRecurringParentEnabled),[E,P]=g.useState(!1),[$,N]=g.useState(!1),D=b(r=>Q(r,l)),G=b(r=>r.taskGroupState),T=D.fetchState,{isAiCfoAccessEnabled:j,onAskAiCfoClick:U}=ga({mobileExploreReferrer:"Task Checklist"});if(fa({isDataReady:T==="Completed"}),g.useEffect(()=>{E||(P(!0),t(y(!1,l)))},[E,t]),g.useEffect(()=>{T==="Completed"&&t(x({taskGroupById:G.taskGroupById}))},[T,G.taskGroupById]),k==null)throw Error("Can't access task list page without signing in...");return d.jsxs(d.Fragment,{children:[T==="Completed"?d.jsx(W,{analytics:Z,onLoad:r=>(v=>v.trackPageLoaded(q.Event.taskListPage))(r)}):null,d.jsxs(Da,{children:[d.jsx(ha,{isAppContentDrawerOpen:$,handleDrawerToggle:r=>{N(r)}}),d.jsx(Ga,{location:o,navigate:e,currentTenant:i,taskGroupId:u,taskGroupState:G,localData:D.localData,uiState:D.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:c,isTaskGroupAssigneesEnabled:h,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:j,onAskAiCfoClick:U})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,ba=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=pa(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=ma(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{va as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-B381bPI5.js";import se from"./NotFoundScreen-B-5op0jc.js";import{a as c}from"./sentry-N_eviIZg.js";import{j as Z,h as _,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-BZAtj_dP.js";import{FU as O,FX as le,F_ as de,eQ as M,P$ as H,Fc as W,EW as pe,FE as ue,Fx as ke,Q0 as J,Q1 as z,ES as me,EP as fe,pQ as ge,pE as he,ka as Se,F2 as Ie,Q2 as Te,F7 as Ee,F4 as be,EZ as Ge,Fh as Ce,Fg as De}from"./zeni-epic-state-BYztznIU.js";import{z as C,cG as Fe,v as xe,y as ye,S as E,k as K,r as v,A as je,e as A,g as ve,cH as we,j as V,aq as Re}from"./index-l0jEAtpj.js";import{n as Pe}from"./mui-Ded5Lnjo.js";import{u as Be}from"./useInitialThreadRequest-rt9wsjsl.js";import{M as Ue}from"./MobileAppDrawer-CQBNZVi-.js";import Le from"./TaskListScreen-Jne3kBc1.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.js";import"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.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]="9908615f-781c-4e5f-a765-4eaedecf8d98",e._sentryDebugIdIdentifier="sentry-dbid-9908615f-781c-4e5f-a765-4eaedecf8d98")}catch{}})();function $e(){const e=Z(),t=_(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(O())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(Fe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let q,Q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:u}=t,r=J(e,t.taskId),d=M(e),l=r.taskGroupId??u,k=l!=null?z(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=H(e),{tenantEmailDomain:D}=d,b=r.recurringSourceTaskId,F=b!=null?`${V.appUrl}/${D}/tasks/${encodeURIComponent(b)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==q&&(q=I,Q=Object.values(I)),Q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:F,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>z(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ge(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Ee(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=K(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(we);function j(){const e=Z(),t=_(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>M(i)),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(E.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(E.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(E.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(E.isTaskRecurringParentEnabled),{isFeatureEnabled:b}=a(E.isTaskGroupAssigneesEnabled),[F,I]=c.useState(!1),[p,X]=c.useState(!1),[R,Y]=c.useState(!1),[P,ee]=c.useState(!1),[B,x]=c.useState(!1),T=c.useRef(!1),G=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>H(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(X(!0),t(W(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{P||L==="Completed"||(ee(!0),t(ue()))},[P,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(B)if(G!=="In-Progress"){if(T.current){if(G==="Error")return x(!1),void(T.current=!1);if(G==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=K(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,G,l,s,e]);const $=g(i=>J(i,r)),y=$.fetchState,N=C.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(je,{analytics:A,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Ue,{isAppContentDrawerOpen:F,handleDrawerToggle:i=>{I(i)}}),n.jsx(Ne,{analytics:A,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:b})]})]})}const ze=Pe.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
- `,w=e=>`/${e}/tasks`;function ra(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(j,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(j,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(j,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ra as default};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-B381bPI5.js";import i from"./NotFoundScreen-B-5op0jc.js";import{T as r}from"./TransactionDetailScreen-CmMgSwsr.js";import"./sentry-N_eviIZg.js";import{n as a,o}from"./core-BZAtj_dP.js";import"./zeni-epic-state-BYztznIU.js";import"./recharts-CxMFTRT8.js";import"./index-l0jEAtpj.js";import"./mui-Ded5Lnjo.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.js";import"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import"./decodeURIComponentSafe-K7ukqtFq.js";import"./routePaths-ChRahAmw.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]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
@@ -1,5 +0,0 @@
1
- import{j as I}from"./liveblocks-B381bPI5.js";import{a as d}from"./sentry-N_eviIZg.js";import{h as j,g as S,u as re,j as le,l as de,N as ze,k as Ge}from"./core-BZAtj_dP.js";import{bn as je,eQ as K,cQ as ue,bv as me,pv as Y,K5 as P,L6 as pe,L7 as Q,Kv as he,jN as fe,L8 as ge,KA as J,KB as X,kC as Se,H4 as Z,J$ as x,jH as ve,jF as ye,jR as $e,L9 as Me,La as He,tr as G,jM as Te,Gr as Ee,cV as We,cW as qe,Lb as Ke,J_ as Ye,Lc as Qe,tv as Je,Ld as Xe,Le as Ze,Lf as ea,Lg as aa,Lh as ta,jQ as na,Li as oa,Lj as sa,K0 as ia,Lk as ca,Ll as ra,Lm as la,Gl as da,G9 as ua,GD as ma,jS as pa,H5 as ie,Gi as ha}from"./zeni-epic-state-BYztznIU.js";import{z as De,y as ee,S as _,aK as Ce,m as fa,Z as ga,aL as Sa,F as va,k as W,d as ya,aM as Ta,r as q,e as be,aN as Ea,aq as Da,X as H}from"./index-l0jEAtpj.js";import{n as Ca,S as ba,D as Ia}from"./mui-Ded5Lnjo.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import{d as Ie}from"./decodeURIComponentSafe-K7ukqtFq.js";import{h as ke,g as Aa,d as Ua,b as xa}from"./routePaths-ChRahAmw.js";import{t as _a}from"./utils-DvZFRPln.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="6061acc5-43f5-4f8f-99c2-91cdc7e980b9",a._sentryDebugIdIdentifier="sentry-dbid-6061acc5-43f5-4f8f-99c2-91cdc7e980b9")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Qa(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:v}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>P(u,y)),C=S(u=>{const R=P(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return R==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[R]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>Q(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),$=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>fe(u.accountState,u.accountListState,"accountList")),[w,B]=d.useState(!1),[F,T]=d.useState(!1),[c,N]=d.useState(!1);d.useEffect(()=>{B(!1),T(!1),N(!1)},[a,e]);const D=d.useCallback(()=>{B(!1),T(!1)},[]),[A,U]=d.useState(!1),O=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),N(!0)),p!=null&&(!i||l&&g===!1)&&(w?F||E==null||(T(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:O??E}))):(s(J()),s(X()),B(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,w,F,E,O]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?U(!0):U(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:v,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:$,uncategorizedAccounts:M,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:A,setIsCreateVendorDrawerOpen:U}}const Va={overlayWidth:new va(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>Q(h)),v=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:v,saveVendorDetailLocalData:h=>{l(ve({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:v,children:I.jsx(Pa,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...b})})})},Pa=Ca(ba)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,wa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=j(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),v=e??g,b=s??Ie(l??"");let h;ke(v,b)&&(h={id:v,type:Y(b)});const f=h!=null?S(y=>P(y,h)):void 0,k=()=>{const y=W(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((C=2)=>{let p="../";for(let E=0;E<C;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(Te(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},C={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,f?.transaction?.amount.amount,C,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(ye()),o(He()),a(!0),k()}}},Fa=Ge(function(a,e){const s=P(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ke(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Ye(a,"common"),v=K(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${H}/transaction_attachment`,transactionAttachmentsEndpointToFetch:v.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${H}/transaction_attachments_accounting_provider`:`${H}/transaction_attachments`,attachmentUploadEndpoint:`${Da.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=W(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ha({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(J()),a(X());const n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(xa(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(Z(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?Te(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):pa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(x("common"))},onUploadAttachmentAttachment:t=>{a(ma(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ua(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(da({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(la(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(ra(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ca({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=W(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=_a(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Aa(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ia({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(sa(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(oa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(na({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s)),a(ve({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,v=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:v}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(ta({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(aa({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(Ze(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Xe({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Je(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Qe(t,n,o))}}})(Ea);function Ja(){const a=le(),e=j(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=ya(),i=S(r=>K(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),v=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(_.isExpenseAutomationEnabled),{configValue:f}=n(Ce.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:C}=de(),[p,E]=d.useState(!1),L=Ie(m??""),V=ke(C,L),$=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:w}=t(_.isTransactionCommentingEnabled),B=o?.currentTenant?.companyId,F=o?.currentTenant?.companyName;let T;V&&(T={id:C,type:Y(L)});const c=T!=null?S(r=>P(r,T)):void 0,N=c?.transactionDetailLocalData.vendorUpdates?.id!=null?$.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,A=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),U=S(r=>Q(r)),O=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,R=S(r=>fe(r.accountState,r.accountListState,"accountList")),[Ue,te]=d.useState(!1),[xe,ne]=d.useState(!1),[_e,Ve]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Be=Ta();d.useEffect(()=>{if(T!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(T)),oe();else if(T!=null&&c!=null&&c.fetchState==="Error"){const r=q(s.state?.pathnameStackToGoBack,s.pathname),z={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Be&&(z.message="expenseAutomation",z.origin="transaction_categorization",z.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:z})}},[T]),d.useEffect(()=>{_e||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&v===!1)&&(Ue?xe||A==null||(ne(!0),e(Z(D,"TransactionDetail",{timeframe:"month",timePeriod:O?.selectedPeriod?.timePeriod??A}))):(e(J()),e(X()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,A,l]),d.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("common"))},[]);const Pe=[m,C].filter(r=>r!=null),{transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Ne}=wa({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:Oe,onAskAiCfoClick:Re}=ka({mobileExploreReferrer:"Transaction Details"});return La({isDataReady:c?.fetchState==="Completed"}),V?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(Ba,{isOpen:p,transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Ne}),I.jsx(Fa,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:T,entity:D,isCOTEnabled:M,defaultTrendTransactionTimePeriod:A,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:R,vendorSaveStatus:N,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:Oe,onAskAiCfoClick:Re,isTransactionCommentingEnabled:w,companyId:B,companyName:F})]}):I.jsx(ze,{to:Ae(Pe.length)})}const Ae=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=Na(a),t=Oa(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},Na=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Oa=a=>We(a)===!0?a.customer?.name??"":qe(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Ba as C,Ja as T,wa as a,Fa as b,ae as c,Qa as u};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-B381bPI5.js";import{j as J,u as R,h as N,l as Q,g as j,N as z,k as Z,n as Ae,o as b}from"./core-BZAtj_dP.js";import{eQ as $,i$ as T,Ou as K,GX as ue,bq as ie,Ov as he,jC as X,Kx as H,Ow as se,Ox as Se,bE as Y,GU as me,Oy as ke,Oz as re,OA as Ie,OB as pe,OC as be,OD as ve,OE as de,I8 as xe,bn as Ye}from"./zeni-epic-state-BYztznIU.js";import{D as W,e as C,c6 as ee,r as w,k as te,y as fe,S as q,U as Ee,z as Pe}from"./index-l0jEAtpj.js";import"./mui-Ded5Lnjo.js";import{a as y}from"./sentry-N_eviIZg.js";import{w as ae}from"./withTransactionSidePanel-D9xxZEyy.js";import{p as ne,b as ce}from"./routePaths-ChRahAmw.js";import{u as Oe}from"./utils-DvZFRPln.js";import{d as O}from"./decodeURIComponentSafe-K7ukqtFq.js";import{Z as je}from"./ZeniAccountStatementScreen-dZ9YFFOZ.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import"./TransactionDetailScreen-CmMgSwsr.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="04bc8104-286c-44d6-a622-f3158abd63a1",a._sentryDebugIdIdentifier="sentry-dbid-04bc8104-286c-44d6-a622-f3158abd63a1")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Oe(a),ze=Z(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:H(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:X(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=W.getLocalizedStrings(),s=_(e.selectedAccount.tranListType),r=Me(t,n,c,s,e.bookCloseDate);C.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:_(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(ee),G=ae(function({...a}){const e=J(),t=R(),n=N(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=Q(),r=W.getLocalizedStrings(),{accountType:p,title:A,subTitle:h}=Ce(o),S="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Be(o,D,k.bookCloseDate),[E,B]=y.useState(!1),[x,M]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:K(p),title:A,subTitle:h,timeframe:S,period:d}},[o,S,p,g]);y.useEffect(()=>{if(!E&&l!=null){B(!0),C.trackTransactionList(void 0,void 0,void 0,l.title);const d=_(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&x!=null&&(P={...l,period:x}),c==null||P==null?i.jsx(z,{to:"../"}):i.jsx(ze,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>M(d),...a})}),Ce=a=>{let e="",t="";const n=W.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Be=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Me=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Fe=Z(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:H(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:X(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),C.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Ge=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=N(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:h,endDate:S,titleEncoded:k}=Q(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),B=j(f=>Se(f.transactionListState,g,D,v)),[x,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=_e(D,g,v,A,h,S,E);if(m){const f={startDate:Y(h,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},U=we(B?.dateRange,f);u={accountId:g,accountType:K(D),classId:v,title:E,timeframe:A,period:U}}y.useEffect(()=>{x||u==null||(M(!0),C.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[x,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,h,S,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(z,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},_e=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=Z(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:H(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:X(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),C.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Ue(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=N(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:h,titleEncoded:S,excludeSubAccounts:k}=Q(),D=O(s??""),g=O(r??""),v=O(S??""),E=!(k!=null&&k==="exclude_subaccounts"),B=j(I=>Ie(I.transactionListState,g,D)),[x,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,h,v);if(L){const I={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(h,"YYYY-MM-DD")},ye=Ve(B?.dateRange,I);m={accountId:g,accountType:K(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:U}=f(q.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!x&&m!=null&&oe&&(M(!0),C.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[x,m,c,oe]);const ge=[s,r,p,A,h,S].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:U,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Ue=a=>`/${a}/transactions/${xe}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=Ye(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(q.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(q.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Ge,{referrerType:a})})]})}export{pt as default};
@@ -1,37 +0,0 @@
1
- import{j as e}from"./liveblocks-B381bPI5.js";import{j as B,u as L,h as P,l as O,g as f,N as U,k as M,n as xe,o as C}from"./core-BZAtj_dP.js";import{cm as V,eQ as v,Nf as R,Dp as ae,fe as H,D7 as ne,Nh as we,Ds as Te,Nd as Ie,Ne as se,Nw as ke,Bz as Ce,so as je,Nj as be,DD as Ae,Ng as re,cP as Z,wu as oe,eU as Ee,eW as De,Or as ve,Os as Fe,D8 as Ue,Ot as Be,D9 as Le,Di as Pe,bv as Re,bF as Ne,cx as Oe,bG as Me,cl as Ve,fd as ze,bs as _e,IU as $e,ck as Ge}from"./zeni-epic-state-BYztznIU.js";import{d as z,an as We,z as A,A as _,e as j,b$ as He,c0 as Ze,c1 as W,Z as q,m as qe,U as Je,y as ie,S as D,F as Ke,x as Qe,c2 as Xe,aq as J,r as Ye,c3 as et,k as K,c4 as tt,B as X,c5 as at,a6 as nt}from"./index-l0jEAtpj.js";import{D as st,n as N,S as rt}from"./mui-Ded5Lnjo.js";import ot from"./NotFoundScreen-B-5op0jc.js";import{S as Y}from"./SetupPagesScreen-BbYqHHxm.js";import{a as d}from"./sentry-N_eviIZg.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-DCgVyLJS.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-DhDRKto8.js";import{M as ce}from"./MobileAppDrawer-CQBNZVi-.js";import{F as lt}from"./FeaturePreviewScreen-Bt2H4Z6l.js";import{a as ee}from"./analyticsHelper-BpXMyiZT.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.js";import"./routePaths-ChRahAmw.js";import"./BusinessVerificationPageScreen-DyDPvAa7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="05260296-60d5-40ba-ad19-1a4835f13f29",t._sentryDebugIdIdentifier="sentry-dbid-05260296-60d5-40ba-ad19-1a4835f13f29")}catch{}})();const ut=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(He);function dt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),p=z(),r=f(k=>k.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=We(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(k=>v(k)),h=A.getSignedInUserTenant(o)?.companyId??g.companyId,w=A.getSignedInUser(),S=f(k=>R(k,h)),T=f(k=>k.treasurySetupViewState.fetchState),x=f(k=>k.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(k=>k.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,T,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(H()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(I(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const pt=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{W(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{W(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ce(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),mt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>v(x)),w=A.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>Ie(x)),T=f(x=>R(x,w));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(H()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{W(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=N.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: ${t=>t.theme.colors.grey4};
9
- `,yt={overlayWidth:new Ke(100,100,48)},gt=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=ht(s):c==="statements"?i=St(s):c==="taxLetter"?i=xt(s):c==="settings"&&(i=wt(s));const y=Ye(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(ve({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(Xe);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=L(),o=B(),p=P(),r=q(),m=qe(),s=f(b=>v(b)),{tenantEmailDomain:c}=O(),i=s.companyId??A.getSignedInUserTenant(c)?.companyId,[y,I]=d.useState(!1),u=f(b=>re(b)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),w=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=z(),T=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Je();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(I(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const k=()=>{o("..")},[le,ue]=d.useState(!1),Q=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=it({mobileExploreReferrer:"Treasury"});ct({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(D.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(D.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(D.isTreasuryCommentingEnabled),ge=Ee(s),he=De(me,s);if(ge===!0&&he!==!0)return e.jsx(lt,{});if(w){const b=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(_,{analytics:j,onLoad:()=>{}}):null,e.jsx(st,{onClose:k,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:yt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Tt,{onClick:Se=>Se.stopPropagation(),children:[t===!0?e.jsx(mt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(dt,{}):null]})}),e.jsxs(ft,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(gt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return T&&x?e.jsx(U,{to:"../setup"}):s.companyTreasuryInfo?.info&&!T&&F?e.jsx(U,{to:"../promo",state:n.state}):e.jsx(Qe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const ht=t=>`/${t}/treasury/edit-portfolio`,St=t=>`/${t}/treasury/statements`,xt=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,Tt=N(rt)`
10
- display: flex;
11
- min-height: 100%;
12
- flex-direction: column;
13
- `,It=N.div`
14
- display: flex;
15
- height: 100vh;
16
- width: 100%;
17
- flex: 1 1 auto;
18
- flex-direction: column;
19
- align-items: center;
20
- background-color: ${t=>t.theme.colors.grey4};
21
- `;function kt(){const t=B(),a=P(),n=q(),o=L(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Fe(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))},[r,s.fetchState,a]);const c=A.getSignedInUser(),i=f(l=>v(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(It,{windowSize:n,children:e.jsx(et,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const l=K(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const Ct=N.div`
22
- display: flex;
23
- height: 100vh;
24
- width: 100%;
25
- flex: 1 1 auto;
26
- flex-direction: column;
27
- align-items: center;
28
- background-color: ${t=>t.theme.colors.grey4};
29
- `;function jt(){const t=B(),a=q(),n=L(),o=P(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Le(!1)))},[r,s.fetchState,o]);const c=A.getSignedInUser(),i=f(l=>v(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(Ct,{windowSize:a,children:e.jsx(tt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=K(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const bt=M(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Pe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(at),At=()=>{const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>v(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(H()))},[i,n]);const y=A.getSignedInUserTenant(o)?.companyId??m.companyId,I=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const g=z(),h=V(g?.loggedInUserRoleMap),w=Z(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(U,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||w)){if(a.state?.message==="activation"){const S=K(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:S=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(bt,{analytics:j,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=N.div`
30
- display: flex;
31
- width: 100%;
32
- height: 100%;
33
- flex-direction: row;
34
- justify-content: center;
35
- align-items: center;
36
- background-color: ${t=>t.theme.colors.grey5};
37
- `;function Xt(){const t=L(),a=f(E=>v(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(D.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=z(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Oe(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(D.isDepositAccountsFeatureEnabled),u=I&&!s&&Ve(r?.loggedInUserRoleMap),l=a.company!=null&&ze(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(D.isChargeCardFeatureEnabled),{isFeatureEnabled:w}=n(D.isDebitCardFeatureEnabled),S=nt(a,h,w)&&!s&&_e(r?.loggedInUserRoleMap),T=$e(r?.loggedInUserRoleMap),x=Ge(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(xe,{children:[x?null:e.jsx(C,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(C,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,productType:"zeni_treasury",type:"verification"})}),e.jsx(C,{path:"promo",element:e.jsx(At,{})}),e.jsx(C,{path:"statements",element:e.jsx(kt,{})}),e.jsx(C,{path:"tax-letter",element:e.jsx(jt,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(C,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(C,{path:"*",element:e.jsx(ot,{})})]}):p&&g?e.jsx(C,{path:"*",element:e.jsx(U,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(C,{path:"*",element:e.jsx(U,{to:"../promo",state:t.state})}):e.jsx(C,{path:"*",element:null})]})}export{Xt as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-B381bPI5.js";import{a as f}from"./sentry-N_eviIZg.js";import{q as u,h,g as y,N as I}from"./core-BZAtj_dP.js";import{Jb as b,eR as w,zf as x}from"./zeni-epic-state-BYztznIU.js";import{z as l,x as j,I as S,O as D}from"./index-l0jEAtpj.js";import{n as g}from"./mui-Ded5Lnjo.js";import"./recharts-CxMFTRT8.js";import"./analytics-CRD_Mcgv.js";import"./plaid-CigRTw2w.js";import"./dnd-CYktLE_1.js";import"./stripe-DMRn4zHo.js";import"./lottie-M6FrlJUx.js";import"./lexical-CtWr-ANo.js";import"./pdf-CXxzr_OL.js";import"./utils-DvZFRPln.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]="522e62f3-6073-4bd1-961d-52d3d50561a8",e._sentryDebugIdIdentifier="sentry-dbid-522e62f3-6073-4bd1-961d-52d3d50561a8")}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=y(c=>b(c)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{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(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=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
- `,_=g(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{A as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-B381bPI5.js";import{a as f}from"./sentry-N_eviIZg.js";import{j as x,h as j,u as $,l as v,g as p}from"./core-BZAtj_dP.js";import{I8 as s,I7 as B,Op as C,eQ as T,Oq as z}from"./zeni-epic-state-BYztznIU.js";import{Z as D,aq as g,m as E,z as L,x as P,b_ as _,k as N}from"./index-l0jEAtpj.js";import{n as U}from"./mui-Ded5Lnjo.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]="0e9229f6-aac8-49e6-851b-84a447de1b50",e._sentryDebugIdIdentifier="sentry-dbid-0e9229f6-aac8-49e6-851b-84a447de1b50")}catch{}})();const q=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: ${e=>e.theme.colors.grey4};
9
- `;function V(){const e=x(),n=j(),d=D(),l=$();let{accountId:a}=v(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=f.useState(!1),h=E();f.useEffect(()=>{u||(y(!0),n(B(a??"",!1)))},[u,n]);const o=p(t=>C(t,a??"")),b=()=>{const t=N(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),c=p(t=>T(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},k=z(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",w=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(q,{windowSize:d,children:i.jsx(_,{currentTenantCompanyName:w,statementListView:o,accountLast4:k,onBackClick:b,authParams:I,downloadEndPoint:m})})}export{V as Z};