@zeniai/web-app-ui 5.0.83-qa → 5.0.84-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 (134) hide show
  1. package/dist/assets/AddressRoutes-CxSksp5X.js +1 -0
  2. package/dist/assets/AddressScreen-BsDFx8f9.js +9 -0
  3. package/dist/assets/{AiCfoScreen-DEUFQGrJ.js → AiCfoScreen-BdUmXEVc.js} +1 -1
  4. package/dist/assets/BillPayApprovalRoutes-CPj12fD4.js +1 -0
  5. package/dist/assets/{BillPayRoutes-CM8hJk1L.js → BillPayRoutes-UokUnIth.js} +9 -9
  6. package/dist/assets/BusinessVerificationPageScreen-Cu1EqrOf.js +9 -0
  7. package/dist/assets/{ChargeCardRoutes-bFbVJcJ3.js → ChargeCardRoutes-CE4ZeDWt.js} +9 -9
  8. package/dist/assets/{CompanyPassportScreen-2BatYHL7.js → CompanyPassportScreen-BV4MyG7l.js} +1 -1
  9. package/dist/assets/ConnectionAuthScreen-D6zD7C1V.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-5zFaGEyC.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-Qc9BWmGL.js → CustomerOnboardingRoutes-Dfz2-llu.js} +3 -3
  12. package/dist/assets/DashboardRoutes-DBbyVSZr.js +20 -0
  13. package/dist/assets/{DefaultTenantHome-Z9AqTWY6.js → DefaultTenantHome-DiDfypo1.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-xVrYNbII.js +18 -0
  15. package/dist/assets/DrawerScreen-CfGPVQAS.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-D0FZ4okq.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-CSoEa0_v.js → ExpenseAutomationRoutes-S1bDDjBF.js} +4 -4
  18. package/dist/assets/FeaturePreviewScreen-BYl4gC2d.js +1 -0
  19. package/dist/assets/HubSpotOAuthCallbackScreen-B0ptLePN.js +1 -0
  20. package/dist/assets/{MagicLinkRoutes-Iy5unnpW.js → MagicLinkRoutes-Ugw3OIOt.js} +6 -6
  21. package/dist/assets/MagicLinkSignInScreen-BmdcomX5.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-e8XeuLFm.js → MobileAppDrawer-DzR1e2uV.js} +1 -1
  23. package/dist/assets/NotFoundScreen-D7jhyBo6.js +1 -0
  24. package/dist/assets/NotificationRoutes-BikmJeNE.js +1 -0
  25. package/dist/assets/OAuthConsentScreen-CFFXqy5F.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-C_UyuQ8R.js +1 -0
  27. package/dist/assets/PeopleRoutes-BD51rx7L.js +22 -0
  28. package/dist/assets/PerformanceRoutes-EuINTPbb.js +1 -0
  29. package/dist/assets/{Preview-Dk35mkO2.js → Preview-CBdON77x.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-CZ1MGgEp.js → QBOConnectionScreen-Ber2Vu7P.js} +1 -1
  31. package/dist/assets/ReferralListScreen-DFe3F7FC.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-C8yCelDJ.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Dd8W-jsp.js → ReimbursementApprovalRuleDetailScreen-Bb0yhRm2.js} +1 -1
  34. package/dist/assets/ReimbursementRoutes-BlSI1eiT.js +68 -0
  35. package/dist/assets/{ReportsRoutes-C8V-XsK0.js → ReportsRoutes-C00QeT_D.js} +1 -1
  36. package/dist/assets/RewardsRoutes-xj_hxIfA.js +1 -0
  37. package/dist/assets/ScreenRoutes-B0sYFsPR.js +2 -0
  38. package/dist/assets/{SettingsRoutes-e_2YajK9.js → SettingsRoutes-uFQNDOCC.js} +7 -7
  39. package/dist/assets/{SetupPagesScreen-DqRLJPMB.js → SetupPagesScreen-NG-BX2Cs.js} +5 -5
  40. package/dist/assets/SignInScreen-CDOuiR5t.js +1 -0
  41. package/dist/assets/SignOutScreen-CS7iDZe7.js +9 -0
  42. package/dist/assets/{TaskListScreen-A3idk1NZ.js → TaskListScreen-NdCfUdJV.js} +2 -2
  43. package/dist/assets/TaskRoutes-ixLMdnQk.js +9 -0
  44. package/dist/assets/TransactionDetailRoutes-D6GBGhEO.js +1 -0
  45. package/dist/assets/{TransactionDetailScreen-DIB74eML.js → TransactionDetailScreen-BRjuwlbo.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-FL8BD3WO.js → TransactionListRoutes-7pDKaOvg.js} +1 -1
  47. package/dist/assets/TreasuryRoutes-DsmWumi7.js +37 -0
  48. package/dist/assets/{VendorsRoutes-BpeSS5jb.js → VendorsRoutes-D_LeCbvb.js} +21 -21
  49. package/dist/assets/WiseConfirmationScreen-BUHV4iEA.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-D5ItrMUC.js → ZeniAccountRoutes-Dt-bE3mA.js} +12 -12
  51. package/dist/assets/ZeniAccountStatementScreen-CzgqPJRt.js +9 -0
  52. package/dist/assets/{accountMappingHelper-DN2NK9FA.js → accountMappingHelper-DZfGqaZH.js} +1 -1
  53. package/dist/assets/{analytics-B134UjSL.js → analytics-B2BEDPCs.js} +1 -1
  54. package/dist/assets/{analyticsHelper-lTEhuqth.js → analyticsHelper-DtNneJAN.js} +1 -1
  55. package/dist/assets/{core-B1Jz41nC.js → core-DoFWsAh3.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-HQbzOYEL.js → decodeURIComponentSafe-DeajK0Ay.js} +1 -1
  57. package/dist/assets/{dnd-DumzdahX.js → dnd-BcveyY8t.js} +1 -1
  58. package/dist/assets/{empty-ByyVwI2e.js → empty-CTDyybn0.js} +1 -1
  59. package/dist/assets/{empty-oTLwTSll.js → empty-QfTzS1iQ.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-C6Cu7fXI.js → emptyVideoElement-QuH_897V.js} +1 -1
  61. package/dist/assets/epic-B7M-yw7I.js +2 -0
  62. package/dist/assets/getLocaleForTenant-B77lQ07b.js +1 -0
  63. package/dist/assets/{index-DegTeG1R.js → index-4Xo98QFU.js} +1 -1
  64. package/dist/assets/{index-C8wkuIN5.js → index-BMRrhTMt.js} +1 -1
  65. package/dist/assets/{index-B90Cr8bv.js → index-BPKEmbll.js} +1 -1
  66. package/dist/assets/{index-BA1kjk_c.js → index-B_zQQVmD.js} +14091 -14116
  67. package/dist/assets/{index-jkshGKhR.js → index-CGS6EY1J.js} +2 -2
  68. package/dist/assets/{index-Ve4RRM-O.js → index-CSPFKsWD.js} +1 -1
  69. package/dist/assets/{index-C6t5Pm8y.js → index-CyF1r7km.js} +1 -1
  70. package/dist/assets/{index-DbMluP3a.js → index-D4aHobjN.js} +1 -1
  71. package/dist/assets/{lexical-DsIUchFW.js → lexical-Bn41B4hZ.js} +1 -1
  72. package/dist/assets/{liveblocks-Cjqg1XsV.js → liveblocks-C0YDUK6I.js} +1 -1
  73. package/dist/assets/{lottie-B-v1nIzb.js → lottie-GT0I8BXz.js} +1 -1
  74. package/dist/assets/{mui-DSSmRxLI.js → mui-D7NGykaU.js} +1 -1
  75. package/dist/assets/{pathToGoBack-DUiwH7Zn.js → pathToGoBack-BDnP7cAC.js} +1 -1
  76. package/dist/assets/{pdf-SAu_SEbF.js → pdf-BkkC7i8o.js} +4 -4
  77. package/dist/assets/{pdf-lib-DFDlNXnV.js → pdf-lib-zi68Ap-S.js} +1 -1
  78. package/dist/assets/{plaid-H6p_O3yl.js → plaid-BJpo1TK4.js} +1 -1
  79. package/dist/assets/{pusher-fPmkj0tk.js → pusher-ChH_QGyh.js} +1 -1
  80. package/dist/assets/{react-OAg8acZB.js → react-CVXPHUlL.js} +1 -1
  81. package/dist/assets/{react-Db4JNA42.js → react-CYcHY21q.js} +1 -1
  82. package/dist/assets/{react-CykgLUvo.js → react-DC9LUNFA.js} +1 -1
  83. package/dist/assets/{react-BNA9zwlm.js → react-DYNQ_QYS.js} +1 -1
  84. package/dist/assets/{react-CmgKrC8_.js → react-DbIi67kQ.js} +1 -1
  85. package/dist/assets/{react-B5_vH0ZV.js → react-hkCEeb4O.js} +1 -1
  86. package/dist/assets/{recharts-DW5j2-RD.js → recharts-Cuk30a9F.js} +1 -1
  87. package/dist/assets/{routePaths-CRbFlZJW.js → routePaths-jEiEovGM.js} +1 -1
  88. package/dist/assets/{sentry-DTwqiEdO.js → sentry-D_iKj4jN.js} +1 -1
  89. package/dist/assets/{url-CFX7crLz.js → url-CCqaghyE.js} +1 -1
  90. package/dist/assets/{url-CQOi-x1h.js → url-CmxamPcT.js} +1 -1
  91. package/dist/assets/useAskAiCfoHostNavButtonProps-CrrCW8TF.js +1 -0
  92. package/dist/assets/{useDeviceId-DOSS9iCb.js → useDeviceId-lfYb9gi-.js} +1 -1
  93. package/dist/assets/useFetchSuggestedQuestionsWhenReady-RpPSJmI8.js +1 -0
  94. package/dist/assets/{useInitialThreadRequest-D05iPKhd.js → useInitialThreadRequest-B2YcCNaV.js} +1 -1
  95. package/dist/assets/{utils-CCEyXo02.js → utils-C2wS7D4E.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-C4l2rQhD.js → withTransactionSidePanel-D2Y7jJCS.js} +3 -3
  97. package/dist/assets/{zeni-epic-state-CFJ-5drS.js → zeni-epic-state-DxMSPxpM.js} +6 -6
  98. package/dist/index.html +1 -1
  99. package/package.json +4 -4
  100. package/dist/assets/AddressRoutes-CWhsyRK1.js +0 -1
  101. package/dist/assets/AddressScreen-VrcMQjiD.js +0 -9
  102. package/dist/assets/BillPayApprovalRoutes-Bto_8DlZ.js +0 -1
  103. package/dist/assets/BusinessVerificationPageScreen-aX8WAJEu.js +0 -9
  104. package/dist/assets/ConnectionAuthScreen-B2ntqz66.js +0 -11
  105. package/dist/assets/CustomerOnboardingAuthScreen-AYY31Mbm.js +0 -1
  106. package/dist/assets/DashboardRoutes-B2MHI9aq.js +0 -20
  107. package/dist/assets/DomesticWireDetailScreen-wgKBNuTX.js +0 -18
  108. package/dist/assets/DrawerScreen-CD89PYIf.js +0 -1
  109. package/dist/assets/EntityDetailRoutes-DY6s5vdx.js +0 -1
  110. package/dist/assets/FeaturePreviewScreen-ClFmJj0F.js +0 -1
  111. package/dist/assets/HubSpotOAuthCallbackScreen-Bv0Dplnr.js +0 -1
  112. package/dist/assets/MagicLinkSignInScreen-BT8J4zZB.js +0 -12
  113. package/dist/assets/NotFoundScreen-Bky0x63m.js +0 -1
  114. package/dist/assets/NotificationRoutes-BebVEMiU.js +0 -1
  115. package/dist/assets/OAuthConsentScreen-D5F3V9z0.js +0 -1
  116. package/dist/assets/PandLWithForecastRoutes-B8DWi2uL.js +0 -1
  117. package/dist/assets/PeopleRoutes-C_Z9cC8z.js +0 -22
  118. package/dist/assets/PerformanceRoutes-loPr71_u.js +0 -1
  119. package/dist/assets/ReferralListScreen-CT69aUhD.js +0 -5
  120. package/dist/assets/ReimbursementApprovalRoutes-cun-DBmT.js +0 -1
  121. package/dist/assets/ReimbursementRoutes-BlJI16jt.js +0 -68
  122. package/dist/assets/RewardsRoutes-BHmDW7as.js +0 -1
  123. package/dist/assets/ScreenRoutes-zKgwm72u.js +0 -2
  124. package/dist/assets/SignInScreen-Cog1Vtto.js +0 -1
  125. package/dist/assets/SignOutScreen-ZO39xI3M.js +0 -9
  126. package/dist/assets/TaskRoutes-NoT_X70G.js +0 -9
  127. package/dist/assets/TransactionDetailRoutes-CVrjMcax.js +0 -1
  128. package/dist/assets/TreasuryRoutes-CTNKrHTc.js +0 -37
  129. package/dist/assets/WiseConfirmationScreen-CXqsKsLQ.js +0 -12
  130. package/dist/assets/ZeniAccountStatementScreen-CFbM7j61.js +0 -9
  131. package/dist/assets/epic-BnAvJDb_.js +0 -2
  132. package/dist/assets/getLocaleForTenant-BgJ-_j4h.js +0 -1
  133. package/dist/assets/useAskAiCfoHostNavButtonProps-BtmGLJlN.js +0 -1
  134. package/dist/assets/useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js +0 -1
@@ -1,68 +0,0 @@
1
- import{j as s}from"./liveblocks-Cjqg1XsV.js";import{j as K,h as re,u as Z,l as Q,g as E,N as M,k as q,i as mt,n as ct,o as k}from"./core-B1Jz41nC.js";import{eQ as V,NY as le,c2 as me,C4 as Be,jN as dt,Ch as ne,Cg as ae,NZ as ut,bn as ce,fK as Te,N_ as pt,Kj as bt,jC as De,Kk as Se,Kl as gt,ix as ht,Nd as ft,iM as St,BU as It,sJ as yt,iE as Rt,CE as je,N$ as Fe,O0 as Ct,O1 as At,O2 as vt,O3 as kt,O4 as Et,Co as Ie,iS as wt,Nm as xt,Ci as Bt,C2 as Tt,O5 as Dt,C1 as jt,O6 as Ft,Ca as ye,Cs as Ut,Cr as Lt,Cn as Ot,O7 as Ue,Ht as Pt,bo as $t,Cd as Mt,CW as Nt,O8 as _t,O9 as zt,CA as Gt,Cx as Re,MI as Ht,B$ as Zt,Oa as Le,Dj as Ce,Dr as Vt,Ob as Wt,Oc as G,Od as Kt,Oe,Of as qt,Og as Pe,Oh as $e,CM as se,bt as Jt,bG as de,cC as ue,eW as Me,eU as Ne,Oi as Xt,gO as Qt,MV as Yt,Oj as en,Ok as _e,MZ as tn,NH as nn,Ol as an,NX as sn,Do as Ae,Dn as on,Om as rn,On as ln,Oo as mn,Op as cn,Oq as dn,Ns as un,De as pn,Di as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,Jd as yn,cN as Rn,cP as Cn,cO as An,cw as vn}from"./zeni-epic-state-CFJ-5drS.js";import{r as ze,Z as Ge,y as Y,S as A,z as P,bK as He,x as ee,d as v,aE as ve,o as j,aq as X,H as kn,D as Ze,bL as En,q as H,bM as wn,c as te,bN as xn,T as Bn,G as Tn,v as pe,f as Ve,a3 as Dn,bb as jn,X as Fn,m as We,bO as Un,a6 as Ln}from"./index-BA1kjk_c.js";import{n as N,S as On}from"./mui-DSSmRxLI.js";import ie from"./NotFoundScreen-Bky0x63m.js";import{S as ke}from"./SetupPagesScreen-DqRLJPMB.js";import{F as Ke}from"./FeaturePreviewScreen-ClFmJj0F.js";import{a as f}from"./sentry-DTwqiEdO.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import{u as qe}from"./useInitialThreadRequest-D05iPKhd.js";import{c as Je}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import{D as Pn}from"./DrawerScreen-CD89PYIf.js";import{M as Xe}from"./MobileAppDrawer-e8XeuLFm.js";import{R as $n}from"./ReimbursementApprovalRoutes-cun-DBmT.js";import{FallBackRoute as Mn}from"./ScreenRoutes-zKgwm72u.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./analyticsHelper-lTEhuqth.js";import"./routePaths-CRbFlZJW.js";import"./BusinessVerificationPageScreen-aX8WAJEu.js";import"./ReimbursementApprovalRuleDetailScreen-Dd8W-jsp.js";import"./getLocaleForTenant-BgJ-_j4h.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]="ecbf7660-c59d-4632-9730-570deec4f9c2",e._sentryDebugIdIdentifier="sentry-dbid-ecbf7660-c59d-4632-9730-570deec4f9c2")}catch{}})();const Qe=e=>`/${e}/reimbursements`,Nn=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}}}=Ze.getLocalizedStrings(),_n=q(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(Ot(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(At({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(Ct());const i=Qe(o),l=H(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=K(),t=re(),n=Z(),{reimbursementId:r}=Q(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{isFeatureEnabled:b}=l(A.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(A.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(A.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,D=w.includes("edit"),C=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),O=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(C&&!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(He,{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(Hn,{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(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),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(_n,{initialOpenThreadRequest:O??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=N.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=N.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
- `,Hn=N.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
- `,Zn=N.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=N.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=N.div`
52
- display: flex;
53
- flex-direction: column;
54
- width: 100%;
55
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
56
- `,Kn=q(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=_t(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=H(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Ht({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=H(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 qn(){const e=K(),t=re(),n=Z(),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=qe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=be({mobileExploreReferrer:"Reimbursement Details"});Je({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=Y(),{isFeatureEnabled:T}=h(A.isLimitedCategoryForReimbursement),[u,w]=f.useState(!1),[D,C]=f.useState(!1),[F,x]=f.useState(!1),{isFeatureEnabled:B}=h(A.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(A.isShowDeletedReimbursementsFeatureEnabled),g=E(y=>le(y,c??"")),O=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"&&O===!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,O,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"||(C(!0),t(Be(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!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(He,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:y=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(y)}),s.jsx(Kn,{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 Jn=q(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(Ce("approved",r??""));break;case"reject":e(Ce("rejected",r??""))}}}})(xn);function Xn(){const e=K(),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(Jn,{navigate:e,analytics:v,isAdmin:d})}const z=tn(),Ye="bulk-operation-update",oe="reimbursement-approval-rule-update",{spendManagement:Qn,common:we}=Ze.getLocalizedStrings(),xe=Qn.reimbursement.bulkActions,Yn=N.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=q(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(Oe(o))},onSubtabChange:o=>{e(G()),e(Pe(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=H(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=H(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=H(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(Ae("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ae("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=K(),t=re(),n=Z(),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=Kt(r.tab.toString());S!=null?t(Oe(S)):console.log("Warning:Not a valid remiListTab");const _=qt(r.subTab.toString());_!=null?t(Pe(_)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=Y(),{isFeatureEnabled:i}=a(A.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(A.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(A.isBillPayCommentingEnabled),{isFeatureEnabled:R}=a(A.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(A.isReimbursementBulkActionEnabled),T=P.getSignedInUser(),u=E(S=>V(S)),[w,D]=f.useState(!1),[C,F]=f.useState(!1),x=te(),B=x?.loggedInUserRole?.includes("admin")===!0,I=E(S=>$e(S,z,h)),{areTenantIdsInSync:g}=Bn(),O=I.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:$}=be({mobileExploreReferrer:"Reimbursement List"});if(Je({isDataReady:O==="Completed"}),f.useEffect(()=>{!C&&g&&(F(!0),t(se(z,!0,l,!1,!0)))},[C,z,t,g]),T==null)throw Error("Can't access address page without signing in...");const y=!!u?.userRole&&Jt(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(A.isDebitCardFeatureEnabled),ot=Me(it,u),rt=Ne(u),{remisProcessed:J,remisProcessing:he}=E(S=>Xt(S));f.useEffect(()=>{J===he&&c!=null&&(t(Qt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:J>1?xe.reports:xe.report},{variableName:"_has_",variableValue:J>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))},[J,he]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${Ye}`,`private-encrypted-${u.companyId}.${oe}`]:[],eventCallback:(S,_,fe)=>{S.endsWith(oe)?fe.onReimbursementApprovalRulesEventReceived?.(S):_.entity_type==="reimbursement"&&(m(_.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(Ke,{}):tt&&(!y||p)||W&&et?s.jsxs(s.Fragment,{children:[O==="Completed"?s.jsx(ee,{analytics:v,onLoad:S=>(_=>_.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&&_e(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=N(On)`
65
- display: flex;
66
- min-height: 100%;
67
- flex-direction: column;
68
- `,ia=q(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=K(),t=Z(),{tenantEmailDomain:n}=Q(),r=We(),[d,c]=f.useState(!1),m=E(C=>V(C)),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=C=>{c(C)};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:C=>(F=>F.trackPageLoaded(Ve.Event.reimbursementPromoPage))(C)}),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(A.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(A.isDebitCardFeatureEnabled),i=Me(a,e),l=Ne(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(A.isDepositAccountsFeatureEnabled),C=D&&!b&&Sn(t?.loggedInUserRoleMap),F=Ln(e,o,a)&&!b&&In(t?.loggedInUserRoleMap),x=yn(t?.loggedInUserRoleMap),B=Rn(t?.loggedInUserRoleMap),I=Cn(t?.loggedInUserRoleMap),g=An(t?.loggedInUserRoleMap),O=vn(t?.loggedInUserRoleMap),U=ue(t?.loggedInUserRoleMap),{tenantEmailDomain:$}=Q(),y=Z(),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:C,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:x,productType:"reimbursement",type:"verification"})}),s.jsx(k,{path:"setup",element:s.jsx(ke,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:C,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:O,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(Ke,{})}),t!=null&&_e(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(qn,{})}),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 e}from"./liveblocks-Cjqg1XsV.js";import{y as w,z as b,aK as y,x as I,d as p,f as F,cF as L,S as P}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import l from"./NotFoundScreen-Bky0x63m.js";import{a as f}from"./sentry-DTwqiEdO.js";import{h as T,g as x,j as V,u as A,k as Q,n as R,o as u}from"./core-B1Jz41nC.js";import{eQ as U,Qh as C,N6 as z,Qi as k,u3 as Y,f0 as G,Qj as K,u1 as O}from"./zeni-epic-state-CFJ-5drS.js";import{R as j}from"./ReferralListScreen-CT69aUhD.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import"./MobileAppDrawer-e8XeuLFm.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="1a5f5df6-43a1-4137-9ca6-6ccf2a2f51c9",a._sentryDebugIdIdentifier="sentry-dbid-1a5f5df6-43a1-4137-9ca6-6ccf2a2f51c9")}catch{}})();const q=Q(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,o=b.getSignedInUser();return{onDismissClick:()=>{a(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(O())},onUpdateInviteFormLocalData:s=>{a(K({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const a=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=x(i=>U(i)),c=V(),v=A(),{useDynamicConfig:g}=w(),d=b.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=x(i=>C(i)),D=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:S}=g(y.zeniAccountsConfig),_=z(S);f.useEffect(()=>{a(k()),r?.rewardsLastViewedTime==null&&o===!1&&(a(Y()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),a(G(!0)))},[m.fetchState,a]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[m.fetchState==="Completed"?e.jsx(I,{analytics:p,onLoad:i=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,e.jsx(q,{navigate:c,location:v,currentTenant:r,companyName:N,userName:D,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:_.maxAnnualPercentageYield})]})};function da(){const{useFeatureGate:a}=w(),{isFeatureEnabled:t}=a(P.isReferralFeatureEnabled);return e.jsxs(R,{children:[e.jsx(u,{path:"/",element:t?e.jsx(j,{}):e.jsx(l,{})}),e.jsx(u,{path:"how-it-works",element:t?e.jsx(j,{isReferralDrawerOpen:!0}):e.jsx(l,{})}),e.jsx(u,{path:"refer/*",element:t?e.jsx(B,{}):e.jsx(l,{})}),e.jsx(u,{path:"*",element:e.jsx(l,{})})]})}export{da as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-B2MHI9aq.js","assets/sentry-DTwqiEdO.js","assets/core-B1Jz41nC.js","assets/zeni-epic-state-CFJ-5drS.js","assets/index-BA1kjk_c.js","assets/mui-DSSmRxLI.js","assets/analytics-B134UjSL.js","assets/utils-CCEyXo02.js","assets/withTransactionSidePanel-C4l2rQhD.js","assets/useAskAiCfoHostNavButtonProps-BtmGLJlN.js","assets/useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js","assets/TransactionDetailScreen-DIB74eML.js","assets/decodeURIComponentSafe-HQbzOYEL.js","assets/routePaths-CRbFlZJW.js","assets/NotFoundScreen-Bky0x63m.js","assets/useInitialThreadRequest-D05iPKhd.js","assets/analyticsHelper-lTEhuqth.js","assets/CompanyPassportScreen-2BatYHL7.js","assets/MobileAppDrawer-e8XeuLFm.js","assets/FeaturePreviewScreen-ClFmJj0F.js","assets/ReferralListScreen-CT69aUhD.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-CM8hJk1L.js","assets/AddressScreen-VrcMQjiD.js","assets/DomesticWireDetailScreen-wgKBNuTX.js","assets/DrawerScreen-CD89PYIf.js","assets/SetupPagesScreen-DqRLJPMB.js","assets/BusinessVerificationPageScreen-aX8WAJEu.js","assets/BillPayApprovalRoutes-Bto_8DlZ.js","assets/ReimbursementApprovalRuleDetailScreen-Dd8W-jsp.js","assets/getLocaleForTenant-BgJ-_j4h.js","assets/ReimbursementRoutes-BlJI16jt.js","assets/ReimbursementApprovalRoutes-cun-DBmT.js","assets/TransactionListRoutes-FL8BD3WO.js","assets/ZeniAccountStatementScreen-CFbM7j61.js","assets/SettingsRoutes-e_2YajK9.js","assets/accountMappingHelper-DN2NK9FA.js","assets/QBOConnectionScreen-CZ1MGgEp.js","assets/empty-oTLwTSll.js","assets/index-C6t5Pm8y.js","assets/url-CFX7crLz.js","assets/index-B90Cr8bv.js","assets/ReportsRoutes-C8V-XsK0.js","assets/ChargeCardRoutes-bFbVJcJ3.js","assets/PeopleRoutes-C_Z9cC8z.js","assets/ExpenseAutomationRoutes-CSoEa0_v.js","assets/TreasuryRoutes-CTNKrHTc.js","assets/VendorsRoutes-BpeSS5jb.js","assets/pathToGoBack-DUiwH7Zn.js","assets/ZeniAccountRoutes-D5ItrMUC.js","assets/AddressRoutes-CWhsyRK1.js","assets/PandLWithForecastRoutes-B8DWi2uL.js","assets/CustomerOnboardingRoutes-Qc9BWmGL.js","assets/TransactionDetailRoutes-CVrjMcax.js","assets/EntityDetailRoutes-DY6s5vdx.js","assets/NotificationRoutes-BebVEMiU.js","assets/PerformanceRoutes-loPr71_u.js","assets/RewardsRoutes-BHmDW7as.js","assets/TaskRoutes-NoT_X70G.js","assets/TaskListScreen-A3idk1NZ.js","assets/AiCfoScreen-DEUFQGrJ.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 gs,bq as xs,fg as Is,v as Ts,Jc as hs,bv as js,Jd as Us,bG as bs,fd as Hs,bF as Rs,bs as Ds,cl as ys,Je as fs,Jf as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mS as Ae,eR as pe,fP as Bs,fk as ge,fM as xe,fN as Ie,fl as ks}from"./zeni-epic-state-CFJ-5drS.js";import{j as e}from"./liveblocks-Cjqg1XsV.js";import{a as v}from"./sentry-DTwqiEdO.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-B1Jz41nC.js";import{m as ws,u as Gs,z as H,y as zs,a as $s,V as Js,S as L,c as Ws,L as B,D as he,t as _,P as Ys,d as X,l}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import{f as je}from"./analyticsHelper-lTEhuqth.js";import{t as qs}from"./getLocaleForTenant-BgJ-_j4h.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="5f116b53-0a69-4156-9d59-37354b16af35",i._sentryDebugIdIdentifier="sentry-dbid-5f116b53-0a69-4156-9d59-37354b16af35")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-B2MHI9aq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-CM8hJk1L.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-BlJI16jt.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-FL8BD3WO.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21])),settings:()=>n(()=>import("./SettingsRoutes-e_2YajK9.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-C8V-XsK0.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-bFbVJcJ3.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21])),people:()=>n(()=>import("./PeopleRoutes-C_Z9cC8z.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CSoEa0_v.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-CTNKrHTc.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-BpeSS5jb.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-D5ItrMUC.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-C8V-XsK0.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21]))),en=l(()=>n(()=>import("./AddressRoutes-CWhsyRK1.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,14,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-C_Z9cC8z.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-B8DWi2uL.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,19,9,10,15,13,18,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-Qc9BWmGL.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,14,37,38,39,40,41,12,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-BpeSS5jb.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-CVrjMcax.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-DY6s5vdx.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,21]))),on=l(()=>n(()=>import("./DashboardRoutes-B2MHI9aq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),be=l(()=>n(()=>import("./BillPayRoutes-CM8hJk1L.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-e_2YajK9.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21]))),He=l(()=>n(()=>import("./ReimbursementRoutes-BlJI16jt.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-D5ItrMUC.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-CTNKrHTc.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-FL8BD3WO.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-bFbVJcJ3.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-BebVEMiU.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-loPr71_u.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,18,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-CSoEa0_v.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-BHmDW7as.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,20,9,10,18,21]))),gn=l(()=>n(()=>import("./TaskRoutes-NoT_X70G.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,15,18,59,9,10,21]))),xn=l(()=>n(()=>import("./AiCfoScreen-DEUFQGrJ.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-Bky0x63m.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-A3idk1NZ.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,18,21])));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(),Q=$s(),ye=Js(),{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),J=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=Ws(),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=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(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(ge(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 W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(ge(s));const Y=H.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const Y=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))),Y&&(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"&&J.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(J.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,J.tenantsBaseInOrder))},[J,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=Qs[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,Je=r.company!=null&&Hs(r.company),We=Pe&&Je===!0&&!C,Ye=re&&Rs(E?.loggedInUserRoleMap),qe=oe&&Ds(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=We&&g,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(Ys,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,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:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,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:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Ye||de||Qe||qe?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,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:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,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:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?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-Cjqg1XsV.js";import{a as u,b as T,q as A}from"./sentry-DTwqiEdO.js";import{h as D,j as z,g as l,u as J,N as j,k as M}from"./core-B1Jz41nC.js";import{u as P,z as s,m as F,d as E,D as O,e as _,f as B,n as N,g as V,F as $,h as v}from"./index-BA1kjk_c.js";import{eQ as q,Jb as Q,Jc as R,eR as W,fk as H,Jh as G,fJ as K,cU as X,Ji as b,Jj as Y,Jk as Z,bT as y}from"./zeni-epic-state-CFJ-5drS.js";import"./mui-DSSmRxLI.js";import{u as ee}from"./useDeviceId-DOSS9iCb.js";import{f as te}from"./analyticsHelper-lTEhuqth.js";import{t as ne}from"./getLocaleForTenant-BgJ-_j4h.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="891fb1e1-5266-47a4-a9ac-38dd3deaf86b",t._sentryDebugIdIdentifier="sentry-dbid-891fb1e1-5266-47a4-a9ac-38dd3deaf86b")}catch{}})();const ie=M(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(Z({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(Y(n,a)))},clearSignInError:()=>{t(b())}}})($),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:k,accountLocked:U,accountUnlockTime:h}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>q(e)),I=l(e=>Q(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{k.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[k.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),O.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(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&&h!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-Cjqg1XsV.js";import{a as n}from"./sentry-DTwqiEdO.js";import{h as u,u as m,j as p,N as g}from"./core-B1Jz41nC.js";import{z as c,v as y,t as h,d as f,f as b}from"./index-BA1kjk_c.js";import{fO as x,fP as I,Jz as j}from"./zeni-epic-state-CFJ-5drS.js";import{n as v}from"./mui-DSSmRxLI.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="0a7bfdca-8031-4f77-9c02-c507a77c9c4a",e._sentryDebugIdIdentifier="sentry-dbid-0a7bfdca-8031-4f77-9c02-c507a77c9c4a")}catch{}})();function $(){const e=u(),t=m(),a=p(),i=n.useRef(!1),d=c.isSignedIn(),r=t.state?.message==="logout",o=r||d;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),j(),h.reset(),f.trackLogout(b.Event.logoutSuccess),f.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(w,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const w=v.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 n}from"./liveblocks-Cjqg1XsV.js";import se from"./NotFoundScreen-Bky0x63m.js";import{a as c}from"./sentry-DTwqiEdO.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-B1Jz41nC.js";import{Gd as M,Gg as le,Gj as de,eQ as O,Qk as H,Fx as W,Ff as pe,FZ as ue,FS as ke,Ql as X,Qm as N,Fb as me,F8 as fe,q9 as ge,pZ as he,ka as Se,Fn as Ie,Qn as Te,Fs as be,Fp as Ge,Fi as Ee,FC as Ce,FB as Fe}from"./zeni-epic-state-CFJ-5drS.js";import{z as C,cG as De,r as xe,y as ye,S as b,p as Y,q as w,x as je,d as z,f as we,cH as ve,h as V,aq as Re}from"./index-BA1kjk_c.js";import{n as Be}from"./mui-DSSmRxLI.js";import{u as Pe}from"./useInitialThreadRequest-D05iPKhd.js";import{M as Ue}from"./MobileAppDrawer-e8XeuLFm.js";import Le from"./TaskListScreen-A3idk1NZ.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.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]="7a5d74c3-c947-4acf-b38d-f6ff942fe3b2",e._sentryDebugIdIdentifier="sentry-dbid-7a5d74c3-c947-4acf-b38d-f6ff942fe3b2")}catch{}})();function $e(){const e=Z(),t=_(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[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(De,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,Q=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=X(e,t.taskId),d=O(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=H(e),{tenantEmailDomain:F}=d,G=r.recurringSourceTaskId,D=G!=null?`${V.appUrl}/${F}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=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:D,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(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(Fe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Y(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(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(M())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=Z(),t=_(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>O(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:F}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,J]=c.useState(!1),[R,K]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),T=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>H(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(W(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(K(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(T.current){if(E==="Error")return x(!1),void(T.current=!1);if(E==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,E,l,s,e]);const $=g(i=>X(i,r)),y=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=v(i),te=w(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:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:F,isTaskGroupAssigneesEnabled:G})]})]})}const Ne=Be.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
- `,v=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-Cjqg1XsV.js";import i from"./NotFoundScreen-Bky0x63m.js";import{T as r}from"./TransactionDetailScreen-DIB74eML.js";import"./sentry-DTwqiEdO.js";import{n as a,o}from"./core-B1Jz41nC.js";import"./zeni-epic-state-CFJ-5drS.js";import"./recharts-DW5j2-RD.js";import"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import"./decodeURIComponentSafe-HQbzOYEL.js";import"./routePaths-CRbFlZJW.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,37 +0,0 @@
1
- import{j as e}from"./liveblocks-Cjqg1XsV.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 Te,o as k}from"./core-B1Jz41nC.js";import{cm as V,eQ as D,NA as R,DK as ae,fe as H,Ds as ne,NC as we,DN as Ie,Ny as Ce,Nz as se,NR as ke,BU as je,sJ as be,NE as Ae,DY as Ee,NB as re,cP as W,wP as oe,eU as ve,eW as De,OM as Fe,ON as Ue,Dt as Be,OO as Le,Du as Pe,DD as Re,bv as Ne,bF as Oe,cx as Me,bG as Ve,cl as ze,fd as _e,bs as Ge,Jd as $e,ck as qe}from"./zeni-epic-state-CFJ-5drS.js";import{c as z,an as He,z as A,x as _,d as j,b$ as We,c0 as Ze,c1 as q,Z,m as Ke,T as Je,y as ie,S as v,G as Qe,v as Ye,c2 as Xe,aq as K,q as et,c3 as tt,p as J,c4 as at,B as Y,c5 as nt,a6 as st}from"./index-BA1kjk_c.js";import{D as rt,n as N,S as ot}from"./mui-DSSmRxLI.js";import it from"./NotFoundScreen-Bky0x63m.js";import{S as X}from"./SetupPagesScreen-DqRLJPMB.js";import{a as d}from"./sentry-DTwqiEdO.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import{u as ut}from"./useInitialThreadRequest-D05iPKhd.js";import{M as ce}from"./MobileAppDrawer-e8XeuLFm.js";import{F as dt}from"./FeaturePreviewScreen-ClFmJj0F.js";import{a as ee}from"./analyticsHelper-lTEhuqth.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./routePaths-CRbFlZJW.js";import"./BusinessVerificationPageScreen-aX8WAJEu.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]="c79479de-cac3-4687-8847-b765637e72a7",t._sentryDebugIdIdentifier="sentry-dbid-c79479de-cac3-4687-8847-b765637e72a7")}catch{}})();const pt=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(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(We);function mt(){const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),p=z(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=V(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),w=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=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:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),w=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(I(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=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
- `,ht={overlayWidth:new Qe(100,100,48)},St=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${K.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:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=Tt(s):l==="taxLetter"?i=wt(s):l==="settings"&&(i=It(s));const g=et(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(Xe);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=L(),o=B(),p=P(),r=Z(),m=Ke(),s=f(b=>D(b)),{tenantEmailDomain:l}=O(),i=s.companyId??A.getSignedInUserTenant(l)?.companyId,[g,I]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=z(),w=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=W(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Je();d.useEffect(()=>{c==="Not-Started"&&!g&&E&&(I(!0),p(oe(!0)))},[g,p,c,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 C=()=>{o("..")},[le,ue]=d.useState(!1),Q=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ct({mobileExploreReferrer:"Treasury"});lt({isDataReady:c==="Completed"});const{useFeatureGate:G}=ie(),{isFeatureEnabled:me}=G(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=G(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=G(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(T){const b=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(_,{analytics:j,onLoad:()=>{}}):null,e.jsx(rt,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(U,{to:"../setup"}):s.companyTreasuryInfo?.info&&!w&&F?e.jsx(U,{to:"../promo",state:n.state}):e.jsx(Ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=N(ot)`
10
- display: flex;
11
- min-height: 100%;
12
- flex-direction: column;
13
- `,kt=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 jt(){const t=B(),a=P(),n=Z(),o=L(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Ue(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Be(!1)))},[r,s.fetchState,a]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(tt,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const c=J(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=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 At(){const t=B(),a=Z(),n=L(),o=P(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const l=A.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(at,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=J(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const Et=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(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(nt),vt=()=>{const t=B(),a=L(),n=P(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(H()))},[i,n]);const g=A.getSignedInUserTenant(o)?.companyId??m.companyId,I=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const h=z(),y=V(h?.loggedInUserRoleMap),T=W(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(U,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){if(a.state?.message==="activation"){const S=J(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(Y,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(_,{analytics:j,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(Et,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Y,{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 ta(){const t=L(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=z(),m=W(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Ne(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Oe(r?.loggedInUserRoleMap),i=Me(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&ze(r?.loggedInUserRoleMap),c=a.company!=null&&_e(a.company),h=o&&c===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=st(a,y,T)&&!s&&Ge(r?.loggedInUserRoleMap),w=$e(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(X,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(X,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(it,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(U,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-Cjqg1XsV.js";import{a as f}from"./sentry-DTwqiEdO.js";import{q as u,h,g as y,N as I}from"./core-B1Jz41nC.js";import{Jw as b,eR as w,zA as x}from"./zeni-epic-state-CFJ-5drS.js";import{z as l,v as j,H as S,I as v}from"./index-BA1kjk_c.js";import{n as g}from"./mui-DSSmRxLI.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="b56603a3-9052-46d1-b3fa-284d64471162",e._sentryDebugIdIdentifier="sentry-dbid-b56603a3-9052-46d1-b3fa-284d64471162")}catch{}})();const W=()=>{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(D,{children:o.jsx(E,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=g.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,E=g(v.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{W as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-Cjqg1XsV.js";import{a as f}from"./sentry-DTwqiEdO.js";import{j as x,h as j,u as v,l as $,g as p}from"./core-B1Jz41nC.js";import{It as s,Is as B,OK as C,eQ as L,OL as T}from"./zeni-epic-state-CFJ-5drS.js";import{Z as z,aq as g,m as D,z as E,v as P,b_ as _,p as N}from"./index-BA1kjk_c.js";import{n as U}from"./mui-DSSmRxLI.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]="c03cbbd2-d95e-4e01-81a2-474ec0a73adf",e._sentryDebugIdIdentifier="sentry-dbid-c03cbbd2-d95e-4e01-81a2-474ec0a73adf")}catch{}})();const G=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 Q(){const e=x(),n=j(),d=z(),l=v();let{accountId:a}=$(),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=D();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}})},c=E.getSignedInUser(),r=p(t=>L(t)),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(_,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:m})})}export{Q as Z};