@zeniai/web-app-ui 5.1.54-qa → 5.1.55-qa

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 (121) hide show
  1. package/dist/assets/AddressRoutes-ENVkkepY.js +1 -0
  2. package/dist/assets/AddressScreen-CvPxhYFs.js +9 -0
  3. package/dist/assets/{AiCfoScreen-CuCVJ-9z.js → AiCfoScreen-DTTgGSqT.js} +1 -1
  4. package/dist/assets/BillPayApprovalRoutes-2y_Smb3L.js +1 -0
  5. package/dist/assets/{BillPayRoutes-C-57jjzC.js → BillPayRoutes-D1KmPs-P.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-CoxJBcce.js → BusinessVerificationPageScreen-D2N5zUvV.js} +1 -1
  7. package/dist/assets/{CardsAiCfoScreen-BXut6M7h.js → CardsAiCfoScreen-bhVF9e_F.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-DAakvdza.js → ChargeCardRoutes-YoDH7ylN.js} +1 -1
  9. package/dist/assets/CompanyPassportScreen-CfrYFFuL.js +1 -0
  10. package/dist/assets/{ConnectionAuthScreen-BOHdbzkN.js → ConnectionAuthScreen-B6tGghLx.js} +1 -1
  11. package/dist/assets/CustomerOnboardingAuthScreen-CpXzEPeL.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-Dh6ZowLh.js → CustomerOnboardingRoutes-BAxjCtaH.js} +3 -3
  13. package/dist/assets/{DashboardRoutes-Cox4nEtE.js → DashboardRoutes-Cnv2Os-7.js} +1 -1
  14. package/dist/assets/{DefaultTenantHome-DsGlDo8q.js → DefaultTenantHome-D1mjvDxR.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-Dwlu904z.js → DomesticWireDetailScreen-DEZpmV1y.js} +1 -1
  16. package/dist/assets/DrawerScreen-CfPgZFbu.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-ByNAOdBV.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-CKsYpo_A.js → ExpenseAutomationRoutes-UMX9R2ZB.js} +1 -1
  19. package/dist/assets/FeaturePreviewScreen-Bbo-4gXG.js +1 -0
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-074s_I3B.js → HubSpotOAuthCallbackScreen-Cngdo8vI.js} +1 -1
  21. package/dist/assets/{MagicLinkRoutes-Cu1l5Hae.js → MagicLinkRoutes-CP3FxH4t.js} +6 -6
  22. package/dist/assets/MagicLinkSignInScreen-DfMGZywc.js +12 -0
  23. package/dist/assets/{MobileAppDrawer-BPYh3fz7.js → MobileAppDrawer-CWBhYKqW.js} +1 -1
  24. package/dist/assets/NotFoundScreen-Bnx2UPHv.js +1 -0
  25. package/dist/assets/{NotificationRoutes-CM26Uc2-.js → NotificationRoutes-Qy8HYHkb.js} +1 -1
  26. package/dist/assets/{OAuthConsentScreen-OutOQhzE.js → OAuthConsentScreen-DffRqRWT.js} +1 -1
  27. package/dist/assets/{PandLWithForecastRoutes-B0qogd0A.js → PandLWithForecastRoutes-DzMNbzsJ.js} +1 -1
  28. package/dist/assets/{PeopleRoutes-CUTyVwx1.js → PeopleRoutes-DwtjCeU9.js} +2 -2
  29. package/dist/assets/{PerformanceRoutes-12eFPdp_.js → PerformanceRoutes-DJjg_nmN.js} +1 -1
  30. package/dist/assets/{Preview-DIHwHgF2.js → Preview-JiizEL_C.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-D87ZntTL.js → QBOConnectionScreen-BD3gRv9C.js} +1 -1
  32. package/dist/assets/ReferralListScreen-DPPvxoTI.js +5 -0
  33. package/dist/assets/ReimbursementApprovalRoutes-BwiPly2p.js +1 -0
  34. package/dist/assets/ReimbursementApprovalRuleDetailScreen-CcTmDK2L.js +1 -0
  35. package/dist/assets/{ReimbursementRoutes-DSyBtaLh.js → ReimbursementRoutes-DHjMtvfB.js} +5 -5
  36. package/dist/assets/{ReportsRoutes-CrvdJeby.js → ReportsRoutes-B4rkl99K.js} +1 -1
  37. package/dist/assets/{RewardsRoutes-DYWFgTvw.js → RewardsRoutes-CmWH02Nb.js} +1 -1
  38. package/dist/assets/ScreenRoutes-BVhH5D33.js +2 -0
  39. package/dist/assets/{SettingsRoutes-D-CGv9n3.js → SettingsRoutes-Bvbg8LVY.js} +1 -1
  40. package/dist/assets/{SetupPagesScreen-Bfb-yG5Q.js → SetupPagesScreen-N7NZbMog.js} +1 -1
  41. package/dist/assets/SignInScreen-DqCXO7t5.js +1 -0
  42. package/dist/assets/SignOutScreen-PgaK8hUe.js +9 -0
  43. package/dist/assets/{TaskListScreen-SFzbbBq2.js → TaskListScreen-DNjQxRsg.js} +2 -2
  44. package/dist/assets/{TaskRoutes-CgfIdOfE.js → TaskRoutes-DddYQsp2.js} +1 -1
  45. package/dist/assets/{TransactionDetailRoutes-BX1iNIyW.js → TransactionDetailRoutes-9wsPGvQA.js} +1 -1
  46. package/dist/assets/{TransactionDetailScreen-bJ4okRq5.js → TransactionDetailScreen-DdyjxpNe.js} +1 -1
  47. package/dist/assets/{TransactionListRoutes-C7_m6Yqx.js → TransactionListRoutes-Y3HUjCX4.js} +1 -1
  48. package/dist/assets/{TreasuryRoutes-CueVe1jr.js → TreasuryRoutes-Po66nW-G.js} +6 -6
  49. package/dist/assets/{VendorsRoutes-DrErfdsR.js → VendorsRoutes-Bhe46MLu.js} +1 -1
  50. package/dist/assets/WiseConfirmationScreen-gcw35kRr.js +12 -0
  51. package/dist/assets/{ZeniAccountRoutes-_K25ghKx.js → ZeniAccountRoutes-BVrcLxAX.js} +9 -9
  52. package/dist/assets/ZeniAccountStatementScreen-NjdxQEux.js +9 -0
  53. package/dist/assets/{accountMappingHelper-BSLlTYQH.js → accountMappingHelper-BfrLGhoG.js} +1 -1
  54. package/dist/assets/{analytics-BHHyMpuV.js → analytics-CQmVOD4d.js} +1 -1
  55. package/dist/assets/{analyticsHelper-BsjRdUZX.js → analyticsHelper-Bvqx3iRr.js} +1 -1
  56. package/dist/assets/{core-CLKYLs-8.js → core-CbpoBsNm.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-Bm32N7cj.js → decodeURIComponentSafe-9Mzf3G8U.js} +1 -1
  58. package/dist/assets/{dnd-BgEYAbRi.js → dnd-CX5suNP6.js} +1 -1
  59. package/dist/assets/{empty-CwSgGrxu.js → empty-BijKctOw.js} +1 -1
  60. package/dist/assets/{empty-DdtYEopm.js → empty-DhAifQ6-.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-D6kbFw8A.js → emptyVideoElement-D-mIIbkx.js} +1 -1
  62. package/dist/assets/epic-D_RLnD_Y.js +2 -0
  63. package/dist/assets/{getLocaleForTenant-C_VQis3o.js → getLocaleForTenant-9euvow3p.js} +1 -1
  64. package/dist/assets/{index-DR5HeC7u.js → index-B781xFYL.js} +2 -2
  65. package/dist/assets/{index-UrW8im9e.js → index-Bg6fgf4p.js} +1 -1
  66. package/dist/assets/{index-Dr5dodMd.js → index-CR_Xz42r.js} +1 -1
  67. package/dist/assets/{index-CTH1zZXf.js → index-CTRa-Eva.js} +1 -1
  68. package/dist/assets/{index-CtRgwYlG.js → index-D-GsKzyX.js} +1 -1
  69. package/dist/assets/{index-DxSdRLh_.js → index-Mdt1gUpR.js} +1 -1
  70. package/dist/assets/{index-D_hiFYsE.js → index-aZImxzjX.js} +11456 -11456
  71. package/dist/assets/{index-BzKXgra3.js → index-cXBO33fb.js} +1 -1
  72. package/dist/assets/{lexical-DN4b_Twn.js → lexical-BS7d_1CV.js} +1 -1
  73. package/dist/assets/{liveblocks-B6jAIe9x.js → liveblocks-BLlSTcoD.js} +1 -1
  74. package/dist/assets/{lottie-C38Bn-X6.js → lottie-BY8e0Ufw.js} +1 -1
  75. package/dist/assets/{mui-AZmtqUsi.js → mui-DcNGd9L2.js} +1 -1
  76. package/dist/assets/{pathToGoBack-ogdURlZM.js → pathToGoBack-C2QnAeVh.js} +1 -1
  77. package/dist/assets/{pdf-BzNDzZ8_.js → pdf-BslZhgI8.js} +4 -4
  78. package/dist/assets/{pdf-lib-0dW_LSbG.js → pdf-lib-BxiXr152.js} +1 -1
  79. package/dist/assets/{plaid-2Q72y6JT.js → plaid-B62punae.js} +1 -1
  80. package/dist/assets/{pusher-DsUo-9K1.js → pusher-yI34WBaU.js} +1 -1
  81. package/dist/assets/{react-DsxTC2P5.js → react-BhNVTcBK.js} +1 -1
  82. package/dist/assets/{react-C_zFJEm7.js → react-Bxt57-xI.js} +1 -1
  83. package/dist/assets/{react-DoYlyteP.js → react-CcJOgdcP.js} +1 -1
  84. package/dist/assets/{react-Ckos0IeG.js → react-D4d29E8H.js} +1 -1
  85. package/dist/assets/{react-BvYGWaT4.js → react-DP_wuGKo.js} +1 -1
  86. package/dist/assets/{react-BpYPYN78.js → react-bALoVfnT.js} +1 -1
  87. package/dist/assets/{recharts-CyaYjFwn.js → recharts-C0aThBg3.js} +1 -1
  88. package/dist/assets/{routePaths-XSngD1ow.js → routePaths-DyIc-n3M.js} +1 -1
  89. package/dist/assets/{sentry-95bdnR3R.js → sentry-D_xp3E3Q.js} +1 -1
  90. package/dist/assets/{url-Br2V-Pa5.js → url-Cn_1-HsX.js} +1 -1
  91. package/dist/assets/{url-C5803Pxi.js → url-DZdoYQOC.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CmgL0oiB.js → useAiCfoDashboardSuggestedQuestionsChips-ClwyrxTK.js} +1 -1
  93. package/dist/assets/useAskAiCfoHostNavButtonProps-BZImc5qT.js +1 -0
  94. package/dist/assets/{useCashManagementBanner-Dy5XCSd3.js → useCashManagementBanner-BWjfwjGa.js} +1 -1
  95. package/dist/assets/{useDeviceId-B5LKCqFY.js → useDeviceId-BX67JldO.js} +1 -1
  96. package/dist/assets/{useInitialThreadRequest-D1F5GLCG.js → useInitialThreadRequest-DVxzaQcg.js} +1 -1
  97. package/dist/assets/{utils-CDpOkGne.js → utils-BQO84dIV.js} +1 -1
  98. package/dist/assets/{withTransactionSidePanel-kr0tYyxP.js → withTransactionSidePanel-MinVWpma.js} +1 -1
  99. package/dist/assets/{zeni-epic-state-CjQblqOQ.js → zeni-epic-state-CkeDRiud.js} +3 -3
  100. package/dist/index.html +1 -1
  101. package/package.json +3 -3
  102. package/dist/assets/AddressRoutes-B9BoI8Fv.js +0 -1
  103. package/dist/assets/AddressScreen-BRdhnUB3.js +0 -9
  104. package/dist/assets/BillPayApprovalRoutes-BrRYqqLJ.js +0 -1
  105. package/dist/assets/CompanyPassportScreen-DUlm9sdh.js +0 -1
  106. package/dist/assets/CustomerOnboardingAuthScreen-BQyQByde.js +0 -1
  107. package/dist/assets/DrawerScreen-KqrF4Sq7.js +0 -1
  108. package/dist/assets/EntityDetailRoutes-COXR1SAJ.js +0 -1
  109. package/dist/assets/FeaturePreviewScreen-CNGfajWs.js +0 -1
  110. package/dist/assets/MagicLinkSignInScreen-iqOI3pqv.js +0 -12
  111. package/dist/assets/NotFoundScreen-ChEBjJeL.js +0 -1
  112. package/dist/assets/ReferralListScreen-BsBo666O.js +0 -5
  113. package/dist/assets/ReimbursementApprovalRoutes-ClbZ-O2b.js +0 -1
  114. package/dist/assets/ReimbursementApprovalRuleDetailScreen-D_Tk1V_u.js +0 -1
  115. package/dist/assets/ScreenRoutes-BE5zmBx7.js +0 -2
  116. package/dist/assets/SignInScreen-DKI-p16g.js +0 -1
  117. package/dist/assets/SignOutScreen-C2_s3moc.js +0 -9
  118. package/dist/assets/WiseConfirmationScreen-DrQXGVBy.js +0 -12
  119. package/dist/assets/ZeniAccountStatementScreen-Be29Xc0Q.js +0 -9
  120. package/dist/assets/epic-DZb8kqBH.js +0 -2
  121. package/dist/assets/useAskAiCfoHostNavButtonProps-FETbJUjN.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as _}from"./liveblocks-B6jAIe9x.js";import{a as i}from"./sentry-95bdnR3R.js";import{u as W,k as Qe,j as S,s as fe,g as ge,h as Te,i as be,N as Ze,n as Xe}from"./core-CLKYLs-8.js";import{nI as he,eW as Z,gn as Ke,NM as et,mV as tt,mD as at,bn as nt,cU as Ee,bt as Ie,r5 as q,ML as H,NN as ve,NO as oe,N9 as De,kC as Ce,NP as ke,Ne as se,Nf as ce,lr as Ae,JO as ie,MF as $,kw as Ne,ku as Ue,kG as ot,nv as st,NQ as ct,NR as it,v9 as Q,kB as _e,J7 as xe,cZ as rt,c_ as lt,NS as dt,ME as ut,NT as mt,v5 as pt,NU as ft,NV as ht,NW as yt,NX as St,NY as gt,kF as Tt,NZ as bt,N_ as Et,MG as It,N$ as vt,O0 as Dt,O1 as Ct,J1 as kt,IT as At,Jg as Nt,kH as Ut,JP as ye,nA as _t}from"./zeni-epic-state-CjQblqOQ.js";import{F as J,x,z as Pe,aN as we,m as xt,K as Pt,aO as wt,E as Ft,n as ae,j as Vt,aP as Ot,r as ne,_ as Bt,aQ as Rt,c as Fe,aR as Lt,at as zt,a2 as te}from"./index-D_hiFYsE.js";import{n as Gt,S as Mt,D as jt}from"./mui-AZmtqUsi.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{d as Ve}from"./decodeURIComponentSafe-Bm32N7cj.js";import{h as Oe,c as Be,g as Wt,e as qt}from"./routePaths-XSngD1ow.js";import{u as Ht}from"./utils-CDpOkGne.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="dddfccb6-5032-41b5-803f-eb73d6ca5458",t._sentryDebugIdIdentifier="sentry-dbid-dddfccb6-5032-41b5-803f-eb73d6ca5458")}catch{}})();function Jt(t=!0){const e=W(),s=Qe(),{useFeatureGate:a}=J(),{isFeatureEnabled:n}=a(x.isCreateTransferEntryFromExpenseEnabled);i.useEffect(()=>{if(!t||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))},[t,n,e,s])}function Yt(t,e){const s=function(){const r=W(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,N]=i.useState(null),{useDynamicConfig:T}=J(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),v=!C&&f?.capitalization_enabled===!0,k=S(h=>Z(h)),b=k.companyId,U=S(h=>Ke(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:P,capitalizableAccountOverrides:O,dismissedAccounts:z}=S(h=>{const E=h.tenantState.currentTenantId,u=E!=null?h.tenantState.tenantsById[E]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}},fe),G=i.useRef(P);G.current=P;const B=i.useRef(O);B.current=O;const w=i.useRef(z);w.current=z;const R=S(h=>et(h.accountState),fe),I=i.useMemo(()=>{const h={};for(const E of R)E.accountId!=null&&E.accountName!=null&&(h[E.accountId]=E.accountName);return h},[R]),l=m!=null?I[m]??null:null,M=i.useCallback(h=>{if(!v)return;const E=G.current;if(E==null)return;const u=E.accounts??[],j=new Set(h),X=B.current??{},Y=w.current;for(const L of u)if(j.has(L.accountId)&&X[L.accountId]==null&&Y?.[L.accountId]==null)return y(L.classificationType),N(L.accountId),void g(!0)},[v]),D=i.useCallback((h,E)=>{r(tt(b,h,E,!0)),g(!1),y(null),N(null)},[r,b]),F=i.useCallback(()=>{m!=null&&(r(at(b,m)),g(!1),y(null),N(null))},[r,b,m]);return{showPopup:p&&v,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:U,checkAndShowPopup:M,handleSubmit:D,handleDismiss:F}}(),a=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect(()=>{t==="In-Progress"&&(n.current=c.current()),t==="Completed"&&a.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),a.current=t},[t]),s}const re=()=>{const t=Pe.getSignedInUser(),{useFeatureGate:e}=J(),{isFeatureEnabled:s}=e(x.isChainOfThoughtEnabled);return i.useMemo(()=>nt(t)&&s,[t,s])};function Re(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ha(t,e){const s=W(),{useFeatureGate:a,useDynamicConfig:n}=J(),o=S(u=>Z(u)),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&Ee(o.userRole),p=o.userRole!=null&&Ie(o.userRole),{isFeatureEnabled:g}=a(x.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=a(x.isExpenseAutomationEnabled),{configValue:y}=n(we.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,N=re(),T=i.useMemo(()=>({id:t,type:q(e)}),[t,e]),f=S(u=>H(u,T)),C=f?.transactionDetailUpdateStatus?.fetchState,v=f?.transactionDetailLocalData?.lineItemById,k=S(u=>{const j=H(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return j==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[j]?.saveStatus.fetchState??"Not-Started"}),b=i.useMemo(()=>f?.fetchState==="Completed"?Re(f?.transaction):void 0,[f?.fetchState,f?.transaction]),U=S(u=>{if(b!=null)return ve(u.customerIncomeState,u.vendorExpenseState,u.trendState,b,"month")}),P=S(u=>oe(u)),O=S(u=>{if(b!=null)return De(u.trendWithTransactionsState,b,"TransactionDetail")}),z=o.company?.companyInfo.firstMonthOfFY??1,G=S(u=>Ce(u.accountState,u.accountListState,"accountList")),[B,w]=i.useState(!1),[R,I]=i.useState(!1),[l,M]=i.useState(!1);i.useEffect(()=>{w(!1),I(!1),M(!1)},[t,e]);const D=i.useCallback(()=>{w(!1),I(!1)},[]),[F,h]=i.useState(!1),E=O?.selectedPeriod?.timePeriod;return i.useEffect(()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),M(!0)),b!=null&&(!c||r&&p===!1)&&(B?R||U==null||(I(!0),s(ie(b,"TransactionDetail",{timeframe:"month",timePeriod:E??U}))):(s(se()),s(ce()),w(!0),s(Ae(b))))},[s,l,f?.fetchState,f?.transaction,b,c,r,p,B,R,U,E]),i.useEffect(()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)},[P.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect(()=>()=>{s($("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:N,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:v,vendorSaveStatus:k,tranEntity:b,defaultTrendTransactionTimePeriod:U,vendorViewDetails:P,uiState:O,firstMonthOfFY:z,uncategorizedAccounts:G,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Qt={overlayWidth:new Ft(100,100,58)},Zt=({isOpen:t,onSaveVendor:e,onSaveSuccess:s,onCancel:a,vendorViewDetails:n})=>{const o=xt(),c=Pt(),r=W(),p=S(y=>oe(y)),g=()=>{a()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(Ue()),r(ot("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Ne({vendorId:void 0,localData:y}))}};return _.jsx(jt,{anchor:"right",open:t,PaperProps:{style:{width:Qt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:_.jsx(Xt,{onClick:y=>y.stopPropagation(),children:_.jsx(wt,{...A})})})},Xt=Gt(Mt)`
1
+ import{j as _}from"./liveblocks-BLlSTcoD.js";import{a as i}from"./sentry-D_xp3E3Q.js";import{u as W,k as Qe,j as S,s as fe,g as ge,h as Te,i as be,N as Ze,n as Xe}from"./core-CbpoBsNm.js";import{nI as he,eW as Z,gn as Ke,NM as et,mV as tt,mD as at,bn as nt,cU as Ee,bt as Ie,r5 as q,ML as H,NN as ve,NO as oe,N9 as De,kC as Ce,NP as ke,Ne as se,Nf as ce,lr as Ae,JO as ie,MF as $,kw as Ne,ku as Ue,kG as ot,nv as st,NQ as ct,NR as it,v9 as Q,kB as _e,J7 as xe,cZ as rt,c_ as lt,NS as dt,ME as ut,NT as mt,v5 as pt,NU as ft,NV as ht,NW as yt,NX as St,NY as gt,kF as Tt,NZ as bt,N_ as Et,MG as It,N$ as vt,O0 as Dt,O1 as Ct,J1 as kt,IT as At,Jg as Nt,kH as Ut,JP as ye,nA as _t}from"./zeni-epic-state-CkeDRiud.js";import{F as J,x,z as Pe,aN as we,m as xt,K as Pt,aO as wt,G as Ft,p as ae,j as Vt,aP as Ot,s as ne,_ as Bt,aQ as Rt,d as Fe,aR as Lt,at as zt,a2 as te}from"./index-aZImxzjX.js";import{n as Gt,S as Mt,D as jt}from"./mui-DcNGd9L2.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import{d as Ve}from"./decodeURIComponentSafe-9Mzf3G8U.js";import{h as Oe,c as Be,g as Wt,e as qt}from"./routePaths-DyIc-n3M.js";import{u as Ht}from"./utils-BQO84dIV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a6dc5bbb-7eee-43b1-899f-3fba2072eb76",t._sentryDebugIdIdentifier="sentry-dbid-a6dc5bbb-7eee-43b1-899f-3fba2072eb76")}catch{}})();function Jt(t=!0){const e=W(),s=Qe(),{useFeatureGate:a}=J(),{isFeatureEnabled:n}=a(x.isCreateTransferEntryFromExpenseEnabled);i.useEffect(()=>{if(!t||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))},[t,n,e,s])}function Yt(t,e){const s=function(){const r=W(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,N]=i.useState(null),{useDynamicConfig:T}=J(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),v=!C&&f?.capitalization_enabled===!0,k=S(h=>Z(h)),b=k.companyId,U=S(h=>Ke(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:P,capitalizableAccountOverrides:O,dismissedAccounts:z}=S(h=>{const E=h.tenantState.currentTenantId,u=E!=null?h.tenantState.tenantsById[E]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}},fe),G=i.useRef(P);G.current=P;const B=i.useRef(O);B.current=O;const w=i.useRef(z);w.current=z;const R=S(h=>et(h.accountState),fe),I=i.useMemo(()=>{const h={};for(const E of R)E.accountId!=null&&E.accountName!=null&&(h[E.accountId]=E.accountName);return h},[R]),l=m!=null?I[m]??null:null,M=i.useCallback(h=>{if(!v)return;const E=G.current;if(E==null)return;const u=E.accounts??[],j=new Set(h),X=B.current??{},Y=w.current;for(const L of u)if(j.has(L.accountId)&&X[L.accountId]==null&&Y?.[L.accountId]==null)return y(L.classificationType),N(L.accountId),void g(!0)},[v]),D=i.useCallback((h,E)=>{r(tt(b,h,E,!0)),g(!1),y(null),N(null)},[r,b]),F=i.useCallback(()=>{m!=null&&(r(at(b,m)),g(!1),y(null),N(null))},[r,b,m]);return{showPopup:p&&v,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:U,checkAndShowPopup:M,handleSubmit:D,handleDismiss:F}}(),a=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect(()=>{t==="In-Progress"&&(n.current=c.current()),t==="Completed"&&a.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),a.current=t},[t]),s}const re=()=>{const t=Pe.getSignedInUser(),{useFeatureGate:e}=J(),{isFeatureEnabled:s}=e(x.isChainOfThoughtEnabled);return i.useMemo(()=>nt(t)&&s,[t,s])};function Re(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ha(t,e){const s=W(),{useFeatureGate:a,useDynamicConfig:n}=J(),o=S(u=>Z(u)),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&Ee(o.userRole),p=o.userRole!=null&&Ie(o.userRole),{isFeatureEnabled:g}=a(x.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=a(x.isExpenseAutomationEnabled),{configValue:y}=n(we.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,N=re(),T=i.useMemo(()=>({id:t,type:q(e)}),[t,e]),f=S(u=>H(u,T)),C=f?.transactionDetailUpdateStatus?.fetchState,v=f?.transactionDetailLocalData?.lineItemById,k=S(u=>{const j=H(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return j==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[j]?.saveStatus.fetchState??"Not-Started"}),b=i.useMemo(()=>f?.fetchState==="Completed"?Re(f?.transaction):void 0,[f?.fetchState,f?.transaction]),U=S(u=>{if(b!=null)return ve(u.customerIncomeState,u.vendorExpenseState,u.trendState,b,"month")}),P=S(u=>oe(u)),O=S(u=>{if(b!=null)return De(u.trendWithTransactionsState,b,"TransactionDetail")}),z=o.company?.companyInfo.firstMonthOfFY??1,G=S(u=>Ce(u.accountState,u.accountListState,"accountList")),[B,w]=i.useState(!1),[R,I]=i.useState(!1),[l,M]=i.useState(!1);i.useEffect(()=>{w(!1),I(!1),M(!1)},[t,e]);const D=i.useCallback(()=>{w(!1),I(!1)},[]),[F,h]=i.useState(!1),E=O?.selectedPeriod?.timePeriod;return i.useEffect(()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),M(!0)),b!=null&&(!c||r&&p===!1)&&(B?R||U==null||(I(!0),s(ie(b,"TransactionDetail",{timeframe:"month",timePeriod:E??U}))):(s(se()),s(ce()),w(!0),s(Ae(b))))},[s,l,f?.fetchState,f?.transaction,b,c,r,p,B,R,U,E]),i.useEffect(()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)},[P.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect(()=>()=>{s($("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:N,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:v,vendorSaveStatus:k,tranEntity:b,defaultTrendTransactionTimePeriod:U,vendorViewDetails:P,uiState:O,firstMonthOfFY:z,uncategorizedAccounts:G,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Qt={overlayWidth:new Ft(100,100,58)},Zt=({isOpen:t,onSaveVendor:e,onSaveSuccess:s,onCancel:a,vendorViewDetails:n})=>{const o=xt(),c=Pt(),r=W(),p=S(y=>oe(y)),g=()=>{a()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(Ue()),r(ot("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Ne({vendorId:void 0,localData:y}))}};return _.jsx(jt,{anchor:"right",open:t,PaperProps:{style:{width:Qt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:_.jsx(Xt,{onClick:y=>y.stopPropagation(),children:_.jsx(wt,{...A})})})},Xt=Gt(Mt)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-B6jAIe9x.js";import{h as Z,g as U,u as H,i as K,j as h,N as w,n as X,o as be,p as j}from"./core-CLKYLs-8.js";import{eW as Q,qM as ee,jQ as p,Rc as te,JF as De,bq as le,Rd as Ee,kr as ae,Nb as ne,Re as ue,Rf as ve,bE as Y,JB as ye,Rg as Pe,Rh as me,Ri as je,JE as Ae,Rj as xe,Rk as pe,Rl as Me,Rm as ge,Rn as Fe,Ro as Le,Rp as fe,KR as Be,bn as Ce}from"./zeni-epic-state-CjQblqOQ.js";import{D as de,F as W,x as G,c as z,cl as ce,r as N,n as oe,X as Re,z as Oe}from"./index-D_hiFYsE.js";import"./mui-AZmtqUsi.js";import{a as S}from"./sentry-95bdnR3R.js";import{w as se}from"./withTransactionSidePanel-kr0tYyxP.js";import{p as ie,c as re}from"./routePaths-XSngD1ow.js";import{v as ze}from"./utils-CDpOkGne.js";import{d as E}from"./decodeURIComponentSafe-Bm32N7cj.js";import{Z as we}from"./ZeniAccountStatementScreen-Be29Xc0Q.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import"./TransactionDetailScreen-bJ4okRq5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="c2319fb7-8582-4a0b-83bb-0a9796160d8a",a._sentryDebugIdIdentifier="sentry-dbid-c2319fb7-8582-4a0b-83bb-0a9796160d8a")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],q=a=>ze(a),_e=X(function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,q(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=q(e.selectedAccount.tranListType),u=Ve(t,n,c,l,e.bookCloseDate);z.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:q(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:q(e.selectedAccount.tranListType)}))}}})(ce),V=se(function({...a}){const e=Z(),t=U(),n=H(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=K(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=$e(o),A="month",I=h(r=>Q(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=W(),{isFeatureEnabled:k}=g(G.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:L,initialTimeframeTick:v}=Je(o,f,I.bookCloseDate),[B,P]=S.useState(!1),[C,R]=S.useState(void 0),T=S.useMemo(()=>{const r=p(v);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,L]);S.useEffect(()=>{if(!B&&T!=null){P(!0),z.trackTransactionList(void 0,void 0,void 0,T.title);const r=q(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,T,n]);let M=T;return T!=null&&C!=null&&(M={...T,period:C}),c==null||M==null?s.jsx(w,{to:"../"}):s.jsx(_e,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:L,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>R(r),...a})}),$e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Je=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ve=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},qe=X(function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),Ne=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=K(),f=E(l??""),g=E(u??""),k=E(m??""),x=E(I??""),L=h(d=>ve(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(d=>Q(d)),T=R.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=W(),{isFeatureEnabled:r}=M(G.isProjectsTransactionsEnabled),_=h(d=>ee(d))&&r;let i;const O=Ue(f,g,k,D,y,A,x);if(O){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Qe(L?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),z.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let F=i;i!=null&&P!=null&&(F={...i,period:P});const J=[l,u,m,D,y,A,I].filter(d=>d!=null);return O&&F!=null?s.jsx(qe,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(w,{to:Se(J.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),We=X(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ze=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=K(),f=E(l??""),g=E(u??""),k=E(m??""),x=E(I??""),L=h(d=>je(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(d=>Q(d)),T=R.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=W(),{isFeatureEnabled:r}=M(G.isProjectsTransactionsEnabled),_=h(d=>ee(d))&&r;let i;const O=He(f,g,k,D,y,A,x);if(O){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Ke(L?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),z.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let F=i;i!=null&&P!=null&&(F={...i,period:P});const J=[l,u,m,D,y,A,I].filter(d=>d!=null);return O&&F!=null?s.jsx(We,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(w,{to:he(J.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ke=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=X(function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Le(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=K(),f=E(l??""),g=E(u??""),k=E(A??""),x=!(I!=null&&I==="exclude_subaccounts"),L=h(b=>Me(b.transactionListState,g,f)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(b=>Q(b)),T=R.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=R.company?.companyInfo.firstMonthOfFY??1;let r;const _=et(f,g,m,D,y,k);if(_){const b={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},Ye=tt(L?.dateRange,b);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Ye}}let i=r;r!=null&&P!=null&&(i={...r,period:P});const{useFeatureGate:O}=W(),{isFeatureEnabled:F}=O(G.isTransactionCommentingEnabled),{isFeatureEnabled:J}=O(G.isProjectsTransactionsEnabled),d=h(b=>ee(b))&&J,{areTenantIdsInSync:$}=Re();S.useEffect(()=>{!v&&r!=null&&$&&(B(!0),z.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,$]);const ke=[l,u,m,D,y,A].filter(b=>b!=null);return _&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:F,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:b=>C(b),...e}):s.jsx(w,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Be}/statements`;function Yt(){const a=U().state?.referrer,e=Oe.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=W(),{isFeatureEnabled:c}=n(G.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>Q(m)).tenantId],{isFeatureEnabled:l}=n(G.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(be,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ne,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ze,{referrerType:a})})]})}export{Yt as default};
1
+ import{j as s}from"./liveblocks-BLlSTcoD.js";import{h as Z,g as U,u as H,i as K,j as h,N as w,n as X,o as be,p as j}from"./core-CbpoBsNm.js";import{eW as Q,qM as ee,jQ as p,Rc as te,JF as De,bq as le,Rd as Ee,kr as ae,Nb as ne,Re as ue,Rf as ve,bE as Y,JB as ye,Rg as Pe,Rh as me,Ri as je,JE as Ae,Rj as xe,Rk as pe,Rl as Me,Rm as ge,Rn as Fe,Ro as Le,Rp as fe,KR as Be,bn as Ce}from"./zeni-epic-state-CkeDRiud.js";import{D as de,F as W,x as G,d as z,cl as ce,s as N,p as oe,X as Re,z as Oe}from"./index-aZImxzjX.js";import"./mui-DcNGd9L2.js";import{a as S}from"./sentry-D_xp3E3Q.js";import{w as se}from"./withTransactionSidePanel-MinVWpma.js";import{p as ie,c as re}from"./routePaths-DyIc-n3M.js";import{v as ze}from"./utils-BQO84dIV.js";import{d as E}from"./decodeURIComponentSafe-9Mzf3G8U.js";import{Z as we}from"./ZeniAccountStatementScreen-NjdxQEux.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import"./TransactionDetailScreen-DdyjxpNe.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="7939b3a2-b90f-4099-9542-5e59a4600bd5",a._sentryDebugIdIdentifier="sentry-dbid-7939b3a2-b90f-4099-9542-5e59a4600bd5")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],q=a=>ze(a),_e=X(function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,q(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=q(e.selectedAccount.tranListType),u=Ve(t,n,c,l,e.bookCloseDate);z.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:q(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:q(e.selectedAccount.tranListType)}))}}})(ce),V=se(function({...a}){const e=Z(),t=U(),n=H(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=K(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=$e(o),A="month",I=h(r=>Q(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=W(),{isFeatureEnabled:k}=g(G.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:L,initialTimeframeTick:v}=Je(o,f,I.bookCloseDate),[B,P]=S.useState(!1),[C,R]=S.useState(void 0),T=S.useMemo(()=>{const r=p(v);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,L]);S.useEffect(()=>{if(!B&&T!=null){P(!0),z.trackTransactionList(void 0,void 0,void 0,T.title);const r=q(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,T,n]);let M=T;return T!=null&&C!=null&&(M={...T,period:C}),c==null||M==null?s.jsx(w,{to:"../"}):s.jsx(_e,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:L,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>R(r),...a})}),$e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Je=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ve=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},qe=X(function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),Ne=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=K(),f=E(l??""),g=E(u??""),k=E(m??""),x=E(I??""),L=h(d=>ve(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(d=>Q(d)),T=R.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=W(),{isFeatureEnabled:r}=M(G.isProjectsTransactionsEnabled),_=h(d=>ee(d))&&r;let i;const O=Ue(f,g,k,D,y,A,x);if(O){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Qe(L?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),z.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let F=i;i!=null&&P!=null&&(F={...i,period:P});const J=[l,u,m,D,y,A,I].filter(d=>d!=null);return O&&F!=null?s.jsx(qe,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(w,{to:Se(J.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),We=X(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ze=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=K(),f=E(l??""),g=E(u??""),k=E(m??""),x=E(I??""),L=h(d=>je(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(d=>Q(d)),T=R.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=W(),{isFeatureEnabled:r}=M(G.isProjectsTransactionsEnabled),_=h(d=>ee(d))&&r;let i;const O=He(f,g,k,D,y,A,x);if(O){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Ke(L?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),z.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let F=i;i!=null&&P!=null&&(F={...i,period:P});const J=[l,u,m,D,y,A,I].filter(d=>d!=null);return O&&F!=null?s.jsx(We,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(w,{to:he(J.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ke=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=X(function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Le(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=N(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=K(),f=E(l??""),g=E(u??""),k=E(A??""),x=!(I!=null&&I==="exclude_subaccounts"),L=h(b=>Me(b.transactionListState,g,f)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(b=>Q(b)),T=R.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=R.company?.companyInfo.firstMonthOfFY??1;let r;const _=et(f,g,m,D,y,k);if(_){const b={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},Ye=tt(L?.dateRange,b);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Ye}}let i=r;r!=null&&P!=null&&(i={...r,period:P});const{useFeatureGate:O}=W(),{isFeatureEnabled:F}=O(G.isTransactionCommentingEnabled),{isFeatureEnabled:J}=O(G.isProjectsTransactionsEnabled),d=h(b=>ee(b))&&J,{areTenantIdsInSync:$}=Re();S.useEffect(()=>{!v&&r!=null&&$&&(B(!0),z.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,$]);const ke=[l,u,m,D,y,A].filter(b=>b!=null);return _&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:F,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:b=>C(b),...e}):s.jsx(w,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Be}/statements`;function Yt(){const a=U().state?.referrer,e=Oe.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=W(),{isFeatureEnabled:c}=n(G.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>Q(m)).tenantId],{isFeatureEnabled:l}=n(G.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(be,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ne,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ze,{referrerType:a})})]})}export{Yt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-B6jAIe9x.js";import{h as L,g as B,u as U,i as O,j as y,N as P,n as N,o as we,p as k}from"./core-CLKYLs-8.js";import{cq as _,eW as F,PV as R,G0 as ae,fU as q,FK as ne,PX as Ie,G3 as ke,PT as be,PU as se,Qa as je,E7 as Ee,tZ as Ae,PZ as ve,Gm as Fe,PW as re,cT as H,yc as oe,fz as De,fB as Pe,R9 as Le,Ra as Be,FL as Ue,Rb as Re,FM as Me,FV as Ve,bt as Oe,bJ as Ne,cB as _e,bK as ze,cp as Ge,fT as $e,bs as Ze,LA as qe,co as He}from"./zeni-epic-state-CjQblqOQ.js";import{j as z,aq as We,z as E,A as G,c as b,ce as Ke,cf as Je,cg as Z,K as W,m as Xe,X as Qe,_ as Ye,F as ie,x as A,E as et,B as tt,ch as at,at as K,r as nt,ci as st,n as J,cj as rt,M as Q,ck as ot,a9 as it}from"./index-D_hiFYsE.js";import{D as ct,n as M,S as lt}from"./mui-AZmtqUsi.js";import ut from"./NotFoundScreen-ChEBjJeL.js";import{S as Y}from"./SetupPagesScreen-Bfb-yG5Q.js";import{a as p}from"./sentry-95bdnR3R.js";import{u as dt}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{u as pt}from"./useInitialThreadRequest-D1F5GLCG.js";import{u as mt}from"./useCashManagementBanner-Dy5XCSd3.js";import{M as ce}from"./MobileAppDrawer-BPYh3fz7.js";import{F as ft}from"./FeaturePreviewScreen-CNGfajWs.js";import{a as ee}from"./analyticsHelper-BsjRdUZX.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";import"./routePaths-XSngD1ow.js";import"./BusinessVerificationPageScreen-CoxJBcce.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]="ef4725b0-9f28-42a5-9fa0-4821373f2eef",t._sentryDebugIdIdentifier="sentry-dbid-ef4725b0-9f28-42a5-9fa0-4821373f2eef")}catch{}})();const yt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{o.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}})(Ke);function gt(){const t=L(),a=B(),n=U(),{tenantEmailDomain:o}=O(),m=z(),s=y(I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),f=We(s),r=_(m?.loggedInUserRoleMap),[l,i]=p.useState(!1),[u,C]=p.useState(!1),[d,c]=p.useState(!1),h=y(I=>F(I)),g=E.getSignedInUserTenant(o)?.companyId??h.companyId,T=E.getSignedInUser(),S=y(I=>R(I,g)),w=y(I=>I.treasurySetupViewState.fetchState),x=y(I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),D=y(I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect(()=>{l||w!=="Not-Started"||g==null||(i(!0),n(ae(g,!0,!1)))},[l,w,g,n]),p.useEffect(()=>{d||D!=="Not-Started"||g==null||(c(!0),n(q()))},[d,D,g,n]),p.useEffect(()=>{u||x!=="Not-Started"||g==null||(C(!0),n(ne()))},[u,x,g,n]),p.useEffect(()=>{f==="In-Progress"&&s==="Completed"&&t("../")},[f,s,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(P,{to:"../promo"});const v=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!v&&e.jsx(G,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{navigate:t,location:a,companyId:g,isEditMode:!0,isLoading:v,isReadOnly:!r,treasurySetupView:S,analytics:b})]})}const ht=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:m}=a,s=o.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",s,f,"Transfer"),t(Fe())},onSaveChangesToLocalStore:r=>{t(ve(r))},onFetchLinkTokenClick:r=>{t(Ae("treasury_setup",r))},onEstablishConnectionClick:r=>{t(Ee(r,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),St=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=U(),[m,s]=p.useState(!1),[f,r]=p.useState(!1),[l,i]=p.useState(!1),[u,C]=p.useState(!1),d=y(x=>x.treasurySetupViewState.fetchState),c=y(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=y(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),g=y(x=>F(x)),T=E.getSignedInUserTenant(n)?.companyId??g.companyId,S=y(x=>be(x)),w=y(x=>R(x,T));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect(()=>{f||d!=="Not-Started"||T==null||(r(!0),o(ae(T,!0,!1)))},[f,d,T,o]),p.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(q()))},[l,c,T,o]),p.useEffect(()=>{u||h!=="Not-Started"||T==null||(C(!0),o(ne()))},[u,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(G,{analytics:b,onLoad:()=>{}}),e.jsx(ht,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{s(!1),o(se())},currentTenant:g,treasurySetupView:w,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Z(b,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},xt=M.div`
1
+ import{j as e}from"./liveblocks-BLlSTcoD.js";import{h as L,g as B,u as U,i as O,j as y,N as P,n as N,o as we,p as k}from"./core-CbpoBsNm.js";import{cq as _,eW as F,PV as R,G0 as ae,fU as q,FK as ne,PX as Ie,G3 as ke,PT as be,PU as se,Qa as je,E7 as Ae,tZ as Ee,PZ as ve,Gm as Fe,PW as re,cT as H,yc as oe,fz as De,fB as Pe,R9 as Le,Ra as Be,FL as Ue,Rb as Re,FM as Me,FV as Ve,bt as Oe,bJ as Ne,cB as _e,bK as Ge,cp as ze,fT as $e,bs as Ze,LA as qe,co as He}from"./zeni-epic-state-CkeDRiud.js";import{j as G,aq as We,z as A,A as z,d as b,ce as Ke,cf as Je,cg as Z,K as W,m as Xe,X as Qe,_ as Ye,F as ie,x as E,G as et,B as tt,ch as at,at as K,s as nt,ci as st,p as J,cj as rt,M as Q,ck as ot,a9 as it}from"./index-aZImxzjX.js";import{D as ct,n as M,S as lt}from"./mui-DcNGd9L2.js";import ut from"./NotFoundScreen-Bnx2UPHv.js";import{S as Y}from"./SetupPagesScreen-N7NZbMog.js";import{a as p}from"./sentry-D_xp3E3Q.js";import{u as dt}from"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import{u as pt}from"./useInitialThreadRequest-DVxzaQcg.js";import{u as mt}from"./useCashManagementBanner-BWjfwjGa.js";import{M as ce}from"./MobileAppDrawer-CWBhYKqW.js";import{F as ft}from"./FeaturePreviewScreen-Bbo-4gXG.js";import{a as ee}from"./analyticsHelper-Bvqx3iRr.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./routePaths-DyIc-n3M.js";import"./BusinessVerificationPageScreen-D2N5zUvV.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]="3f12c0d4-2f66-4c34-ab72-d24c9fa9064a",t._sentryDebugIdIdentifier="sentry-dbid-3f12c0d4-2f66-4c34-ab72-d24c9fa9064a")}catch{}})();const yt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{o.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}})(Ke);function gt(){const t=L(),a=B(),n=U(),{tenantEmailDomain:o}=O(),m=G(),s=y(I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),f=We(s),r=_(m?.loggedInUserRoleMap),[l,i]=p.useState(!1),[u,C]=p.useState(!1),[d,c]=p.useState(!1),h=y(I=>F(I)),g=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=y(I=>R(I,g)),w=y(I=>I.treasurySetupViewState.fetchState),x=y(I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),D=y(I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect(()=>{l||w!=="Not-Started"||g==null||(i(!0),n(ae(g,!0,!1)))},[l,w,g,n]),p.useEffect(()=>{d||D!=="Not-Started"||g==null||(c(!0),n(q()))},[d,D,g,n]),p.useEffect(()=>{u||x!=="Not-Started"||g==null||(C(!0),n(ne()))},[u,x,g,n]),p.useEffect(()=>{f==="In-Progress"&&s==="Completed"&&t("../")},[f,s,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(P,{to:"../promo"});const v=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!v&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{navigate:t,location:a,companyId:g,isEditMode:!0,isLoading:v,isReadOnly:!r,treasurySetupView:S,analytics:b})]})}const ht=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:m}=a,s=o.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",s,f,"Transfer"),t(Fe())},onSaveChangesToLocalStore:r=>{t(ve(r))},onFetchLinkTokenClick:r=>{t(Ee("treasury_setup",r))},onEstablishConnectionClick:r=>{t(Ae(r,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),St=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=U(),[m,s]=p.useState(!1),[f,r]=p.useState(!1),[l,i]=p.useState(!1),[u,C]=p.useState(!1),d=y(x=>x.treasurySetupViewState.fetchState),c=y(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=y(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),g=y(x=>F(x)),T=A.getSignedInUserTenant(n)?.companyId??g.companyId,S=y(x=>be(x)),w=y(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect(()=>{f||d!=="Not-Started"||T==null||(r(!0),o(ae(T,!0,!1)))},[f,d,T,o]),p.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(q()))},[l,c,T,o]),p.useEffect(()=>{u||h!=="Not-Started"||T==null||(C(!0),o(ne()))},[u,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ht,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{s(!1),o(se())},currentTenant:g,treasurySetupView:w,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Z(b,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},xt=M.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{h as L,g as B,u as U,i as O,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,Tt={overlayWidth:new et(100,100,48)},Ct=N(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:m,handleDrawerToggle:s,analytics:f,isCashManagementFeatureEnabled:r}=a,{tenantEmailDomain:l}=o;return{onSettingsClick:()=>{f.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:i=>{let u="page-not-found";i==="editPortfolio"?u=wt(l):i==="statements"?u=It(l):i==="taxLetter"?u=kt(l):i==="settings"&&(u=bt(l));const C=nt(m.state?.pathnameStackToGoBack,m.pathname);n(u,{state:{pathnameStackToGoBack:C}})},onColumnSortConfigChanged:(i,u)=>{t(Le({uiState:{sortKey:i,sortOrder:u}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{s(!0)},onAutoTransferClick:()=>{n(r?"../../checking/cash_management/auto-transfer":"../../checking/auto-transfer")},onCashManagementClick:()=>{n(`/${l}/checking/cash_management`)}}})(at);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),o=L(),m=U(),s=W(),f=Xe(),r=y(j=>F(j)),{tenantEmailDomain:l}=O(),i=r.companyId??E.getSignedInUserTenant(l)?.companyId,[u,C]=p.useState(!1),d=y(j=>re(j)),c=d.fetchState,h=d.accountSummary?.totalBalance?.amount,g=y(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=z(),w=!!r.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=_(S?.loggedInUserRoleMap),D=H(S?.loggedInUserRoleMap),{areTenantIdsInSync:v}=Qe();p.useEffect(()=>{c==="Not-Started"&&!u&&v&&(C(!0),m(oe(!0)))},[u,m,c,v]),p.useEffect(()=>{d.transactionsFetchState.fetchState==="Completed"&&d.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[d.transactionsFetchState.fetchState,d.transactions.length]);const I=()=>{o("..")},[le,ue]=p.useState(!1),X=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=dt({mobileExploreReferrer:"Treasury"});Ye({isDataReady:c==="Completed"});const me=mt(),{useFeatureGate:V}=ie(),{isFeatureEnabled:fe}=V(A.isDebitCardFeatureEnabled),{isFeatureEnabled:ye}=V(A.isAutoTransferRuleEnabled),{isFeatureEnabled:ge}=V(A.isTreasuryCommentingEnabled),{isFeatureEnabled:he}=V(A.isCashManagementFeatureEnabled),Se=pt(i,{clearParams:c==="Completed"&&g?.fetchState==="Completed"}),xe=De(r),Te=Pe(fe,r);if(xe===!0&&Te!==!0)return e.jsx(ft,{});if(T){const j=g?.fetchState!=="Completed"||d.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[d.accountSummaryFetchState.fetchState==="Completed"&&g?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(G,{analytics:b,onLoad:()=>{}}):null,e.jsx(ct,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:Tt.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:f.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(jt,{onClick:Ce=>Ce.stopPropagation(),children:[t===!0?e.jsx(St,{isFirstTransfer:d.transactions.length===0||h===0}):null,a===!0?e.jsx(gt,{}):null]})}),e.jsxs(xt,{windowSize:s,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:X}),e.jsx(Ct,{treasuryDetailsView:d,isAutoTransferRuleEnabled:ye,navigate:o,currentTenant:r,location:n,companyId:i,analytics:b,cashManagementBannerProps:me,isCashManagementFeatureEnabled:he,isTreasuryCommentingEnabled:ge,handleDrawerToggle:X,initialOpenThreadRequest:Se,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(P,{to:"../setup"}):r.companyTreasuryInfo?.info&&!w&&D?e.jsx(P,{to:"../promo",state:n.state}):e.jsx(tt,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const wt=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,kt=t=>`/${t}/treasury/tax-letter`,bt=t=>`/${t}/treasury/setup`,jt=M(lt)`
9
+ `,Tt={overlayWidth:new et(100,100,48)},Ct=N(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:m,handleDrawerToggle:s,analytics:f,isCashManagementFeatureEnabled:r}=a,{tenantEmailDomain:l}=o;return{onSettingsClick:()=>{f.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:i=>{let u="page-not-found";i==="editPortfolio"?u=wt(l):i==="statements"?u=It(l):i==="taxLetter"?u=kt(l):i==="settings"&&(u=bt(l));const C=nt(m.state?.pathnameStackToGoBack,m.pathname);n(u,{state:{pathnameStackToGoBack:C}})},onColumnSortConfigChanged:(i,u)=>{t(Le({uiState:{sortKey:i,sortOrder:u}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{s(!0)},onAutoTransferClick:()=>{n(r?"../../checking/cash_management/auto-transfer":"../../checking/auto-transfer")},onCashManagementClick:()=>{n(`/${l}/checking/cash_management`)}}})(at);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),o=L(),m=U(),s=W(),f=Xe(),r=y(j=>F(j)),{tenantEmailDomain:l}=O(),i=r.companyId??A.getSignedInUserTenant(l)?.companyId,[u,C]=p.useState(!1),d=y(j=>re(j)),c=d.fetchState,h=d.accountSummary?.totalBalance?.amount,g=y(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=G(),w=!!r.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=_(S?.loggedInUserRoleMap),D=H(S?.loggedInUserRoleMap),{areTenantIdsInSync:v}=Qe();p.useEffect(()=>{c==="Not-Started"&&!u&&v&&(C(!0),m(oe(!0)))},[u,m,c,v]),p.useEffect(()=>{d.transactionsFetchState.fetchState==="Completed"&&d.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[d.transactionsFetchState.fetchState,d.transactions.length]);const I=()=>{o("..")},[le,ue]=p.useState(!1),X=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=dt({mobileExploreReferrer:"Treasury"});Ye({isDataReady:c==="Completed"});const me=mt(),{useFeatureGate:V}=ie(),{isFeatureEnabled:fe}=V(E.isDebitCardFeatureEnabled),{isFeatureEnabled:ye}=V(E.isAutoTransferRuleEnabled),{isFeatureEnabled:ge}=V(E.isTreasuryCommentingEnabled),{isFeatureEnabled:he}=V(E.isCashManagementFeatureEnabled),Se=pt(i,{clearParams:c==="Completed"&&g?.fetchState==="Completed"}),xe=De(r),Te=Pe(fe,r);if(xe===!0&&Te!==!0)return e.jsx(ft,{});if(T){const j=g?.fetchState!=="Completed"||d.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[d.accountSummaryFetchState.fetchState==="Completed"&&g?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(ct,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:Tt.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:f.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(jt,{onClick:Ce=>Ce.stopPropagation(),children:[t===!0?e.jsx(St,{isFirstTransfer:d.transactions.length===0||h===0}):null,a===!0?e.jsx(gt,{}):null]})}),e.jsxs(xt,{windowSize:s,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:X}),e.jsx(Ct,{treasuryDetailsView:d,isAutoTransferRuleEnabled:ye,navigate:o,currentTenant:r,location:n,companyId:i,analytics:b,cashManagementBannerProps:me,isCashManagementFeatureEnabled:he,isTreasuryCommentingEnabled:ge,handleDrawerToggle:X,initialOpenThreadRequest:Se,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(P,{to:"../setup"}):r.companyTreasuryInfo?.info&&!w&&D?e.jsx(P,{to:"../promo",state:n.state}):e.jsx(tt,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const wt=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,kt=t=>`/${t}/treasury/tax-letter`,bt=t=>`/${t}/treasury/setup`,jt=M(lt)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,Et=M.div`
13
+ `,At=M.div`
14
14
  display: flex;
15
15
  height: 100vh;
16
16
  width: 100%;
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{h as L,g as B,u as U,i as O,
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${t=>t.theme.colors.grey4};
21
- `;function At(){const t=L(),a=U(),n=W(),o=B(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),r=y(c=>Be(c));p.useEffect(()=>{s||r.fetchState!=="Not-Started"||(f(!0),a(Ue(!1)))},[s,r.fetchState,a]);const l=E.getSignedInUser(),i=y(c=>F(c)),u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const d=r.fetchState!=="Completed";return e.jsx(Et,{windowSize:n,children:e.jsx(st,{currentTenantCompanyName:C,statementListView:r,isLoading:d,onBackClick:()=>{const c=J(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:u,downloadEndPoint:m})})}const vt=M.div`
21
+ `;function Et(){const t=L(),a=U(),n=W(),o=B(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),r=y(c=>Be(c));p.useEffect(()=>{s||r.fetchState!=="Not-Started"||(f(!0),a(Ue(!1)))},[s,r.fetchState,a]);const l=A.getSignedInUser(),i=y(c=>F(c)),u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const d=r.fetchState!=="Completed";return e.jsx(At,{windowSize:n,children:e.jsx(st,{currentTenantCompanyName:C,statementListView:r,isLoading:d,onBackClick:()=>{const c=J(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:u,downloadEndPoint:m})})}const vt=M.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{h as L,g as B,u as U,i as O,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${t=>t.theme.colors.grey4};
29
- `;function Ft(){const t=L(),a=W(),n=B(),o=U(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),r=y(c=>Re(c));p.useEffect(()=>{s||r.fetchState!=="Not-Started"||(f(!0),o(Me(!1)))},[s,r.fetchState,o]);const l=E.getSignedInUser(),i=y(c=>F(c)),u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const d=r.fetchState!=="Completed";return e.jsx(vt,{windowSize:a,children:e.jsx(rt,{currentTenantCompanyName:C,taxLetterListView:r,isLoading:d,onBackClick:()=>{const c=J(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:u,downloadEndPoint:m})})}const Dt=N(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(Ve(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:m=>{n(m?"..":"../setup",{relative:"path"})}}})(ot),Pt=()=>{const t=L(),a=B(),n=U(),{tenantEmailDomain:o}=O(),[m,s]=p.useState(!1),f=y(S=>F(S)),[r,l]=p.useState(!1),i=y(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);p.useEffect(()=>{r||i?.fetchState!=="Not-Started"||u==null||(l(!0),n(q()))},[i,n]);const u=E.getSignedInUserTenant(o)?.companyId??f.companyId,C=E.getSignedInUser(),d=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{s(S)};if(C==null)throw Error("Can't access treasury promo page without signing in...");const h=z(),g=_(h?.loggedInUserRoleMap),T=H(h?.loggedInUserRoleMap);if(d&&g)return e.jsx(P,{to:"../../treasury/setup"});if(f.company?.companyTreasuryInfo&&(!d&&g||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(Q,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(G,{analytics:b,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:m,handleDrawerToggle:c}),e.jsx(Dt,{analytics:b,navigate:t,companyId:u,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})})},te=M.div`
29
+ `;function Ft(){const t=L(),a=W(),n=B(),o=U(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),r=y(c=>Re(c));p.useEffect(()=>{s||r.fetchState!=="Not-Started"||(f(!0),o(Me(!1)))},[s,r.fetchState,o]);const l=A.getSignedInUser(),i=y(c=>F(c)),u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const d=r.fetchState!=="Completed";return e.jsx(vt,{windowSize:a,children:e.jsx(rt,{currentTenantCompanyName:C,taxLetterListView:r,isLoading:d,onBackClick:()=>{const c=J(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:u,downloadEndPoint:m})})}const Dt=N(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(Ve(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:m=>{n(m?"..":"../setup",{relative:"path"})}}})(ot),Pt=()=>{const t=L(),a=B(),n=U(),{tenantEmailDomain:o}=O(),[m,s]=p.useState(!1),f=y(S=>F(S)),[r,l]=p.useState(!1),i=y(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);p.useEffect(()=>{r||i?.fetchState!=="Not-Started"||u==null||(l(!0),n(q()))},[i,n]);const u=A.getSignedInUserTenant(o)?.companyId??f.companyId,C=A.getSignedInUser(),d=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{s(S)};if(C==null)throw Error("Can't access treasury promo page without signing in...");const h=G(),g=_(h?.loggedInUserRoleMap),T=H(h?.loggedInUserRoleMap);if(d&&g)return e.jsx(P,{to:"../../treasury/setup"});if(f.company?.companyTreasuryInfo&&(!d&&g||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(Q,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:m,handleDrawerToggle:c}),e.jsx(Dt,{analytics:b,navigate:t,companyId:u,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})})},te=M.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{h as L,g as B,u as U,i as O,
34
34
  justify-content: center;
35
35
  align-items: center;
36
36
  background-color: ${t=>t.theme.colors.grey5};
37
- `;function sa(){const t=B(),a=y(v=>F(v)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(A.isTreasuryEnabled),m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=z(),f=H(s?.loggedInUserRoleMap),r=a?.userRole!=null&&Oe(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!r)&&Ne(s?.loggedInUserRoleMap),i=_e(s?.loggedInUserRoleMap),u=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!r)&&ze(s?.loggedInUserRoleMap),{isFeatureEnabled:C}=n(A.isDepositAccountsFeatureEnabled),d=C&&!r&&Ge(s?.loggedInUserRoleMap),c=a.company!=null&&$e(a.company),h=o&&c===!0&&!r&&_(s?.loggedInUserRoleMap),{isFeatureEnabled:g}=n(A.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(A.isDebitCardFeatureEnabled),S=it(a,g,T)&&!r&&Ze(s?.loggedInUserRoleMap),w=qe(s?.loggedInUserRoleMap),x=He(s?.loggedInUserRoleMap),D=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(we,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:u,isZeniAccountAdminLevelAccess:d,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:u,isZeniAccountAdminLevelAccess:d,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Pt,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Ft,{})}),D?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(ut,{})})]}):m&&h?e.jsx(k,{path:"*",element:e.jsx(P,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&f?e.jsx(k,{path:"*",element:e.jsx(P,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{sa as default};
37
+ `;function sa(){const t=B(),a=y(v=>F(v)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(E.isTreasuryEnabled),m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=G(),f=H(s?.loggedInUserRoleMap),r=a?.userRole!=null&&Oe(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!r)&&Ne(s?.loggedInUserRoleMap),i=_e(s?.loggedInUserRoleMap),u=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!r)&&Ge(s?.loggedInUserRoleMap),{isFeatureEnabled:C}=n(E.isDepositAccountsFeatureEnabled),d=C&&!r&&ze(s?.loggedInUserRoleMap),c=a.company!=null&&$e(a.company),h=o&&c===!0&&!r&&_(s?.loggedInUserRoleMap),{isFeatureEnabled:g}=n(E.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(E.isDebitCardFeatureEnabled),S=it(a,g,T)&&!r&&Ze(s?.loggedInUserRoleMap),w=qe(s?.loggedInUserRoleMap),x=He(s?.loggedInUserRoleMap),D=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(we,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:u,isZeniAccountAdminLevelAccess:d,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:u,isZeniAccountAdminLevelAccess:d,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Pt,{})}),e.jsx(k,{path:"statements",element:e.jsx(Et,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Ft,{})}),D?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(ut,{})})]}):m&&h?e.jsx(k,{path:"*",element:e.jsx(P,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&f?e.jsx(k,{path:"*",element:e.jsx(P,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{sa as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-B6jAIe9x.js";import{a as g}from"./sentry-95bdnR3R.js";import{h as J,g as Y,i as O,j as S,n as G,u as K,o as at,p as N,N as $}from"./core-CLKYLs-8.js";import{eW as L,MB as Ee,MC as Me,gu as X,cw as we,cx as Ie,wN as St,MD as nt,wR as Kt,KI as ee,kr as te,wL as Yt,wF as qt,ME as Re,wx as Ht,ww as Wt,wq as Qt,wC as Zt,wS as Xt,MF as he,MG as Ue,wy as ea,MH as pe,fG as ft,x5 as gt,w_ as vt,MI as xt,pC as Tt,wV as yt,wT as Dt,MJ as Ct,xc as Et,x9 as wt,wW as It,xb as Je,J7 as bt,MK as ta,ML as aa,cz as na,MM as sa,MN as oa,MO as me,MP as ie,MQ as be,KJ as Ge,xr as ye,KH as De,xe as kt,wO as $e,MR as la,KK as H,MS as ze,wI as ia,MT as ca,MU as da,MV as Ke,MW as Ye,MX as qe,MY as He,xl as ke,MZ as At,x2 as Ft,M_ as ra,M$ as ua,N0 as ha,N1 as pa,N2 as ma,N3 as Sa,N4 as fa,N5 as ga,u9 as va,ua as xa,JP as Fe,N6 as Ta,N7 as ya,jQ as je,bq as Da,N8 as Ca,N9 as Ea,lp as wa,ly as Ia,JO as Pe,bE as st,Na as jt,Jp as Pt,Nb as ba,Nc as ka,Nd as Aa,lA as Fa,Ne as ot,Nf as lt,Ng as it,Nh as ct,Ni as ja,lw as Pa,Nj as _a,lz as Va,Nk as La,Nl as _t,K8 as Vt,kP as Na,Nm as Ba,Nn as _e,No as Lt,K6 as Nt,zJ as Oa,Np as Ma,Nq as Ra,l7 as Bt,Nr as Ua,Ns as Ja,Kk as Ga,rS as $a,Nt as Ot,Nu as dt,Kh as Ve,Nv as rt,Nw as za,Km as Ka,Nx as Ya,Ny as qa,Nz as Ha,NA as Wa,NB as Qa,rV as Za,NC as Xa,KL as en,ND as tn,J$ as Le,hB as an,NE as nn,NF as sn,hz as on,NG as ln,NH as cn,zN as dn,NI as rn,NJ as un,NK as hn,NL as pn,kT as mn,bn as Sn,fB as fn,fz as gn}from"./zeni-epic-state-CjQblqOQ.js";import{z as M,aq as Ne,B as Mt,A as Q,c as F,a2 as Z,aw as vn,r as U,D as Ce,w as ce,ax as We,ay as xn,az as Tn,n as Qe,aA as yn,m as Dn,K as de,E as Ze,F as ae,x as z,aB as Cn,h as Xe,_ as Se,aC as En,aD as Rt,X as wn,aE as In,j as bn,aF as kn,at as Ut,aG as An,o as W,S as Fn,I as Jt,N as jn,aH as Pn,aI as _n,e as et,aJ as Vn,aK as Ln,k as Nn,aL as Bn,aM as On}from"./index-D_hiFYsE.js";import{n as R,D as Mn,S as Gt}from"./mui-AZmtqUsi.js";import{t as Rn,A as Un}from"./AddressScreen-BRdhnUB3.js";import le from"./NotFoundScreen-ChEBjJeL.js";import{F as Jn}from"./FeaturePreviewScreen-CNGfajWs.js";import{c as q,v as tt,d as Gn}from"./routePaths-XSngD1ow.js";import{p as $t}from"./pathToGoBack-ogdURlZM.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{M as ge}from"./MobileAppDrawer-BPYh3fz7.js";import{D as $n}from"./DrawerScreen-KqrF4Sq7.js";import{g as zn,m as Kn}from"./accountMappingHelper-BSLlTYQH.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="3ce18193-881c-46a1-88bd-28ac6ed3e33f",e._sentryDebugIdIdentifier="sentry-dbid-3ce18193-881c-46a1-88bd-28ac6ed3e33f")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Me(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Kt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=U(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=O(),{scheduleType:o}=O();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>L(f)),r=Ee(o)??"accrued_expenses",h=M.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Me(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Ne(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Mt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:F,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:F,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=we(s.controllers),i=Ie(s.controllerUserIds);t!=null&&F.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=R.div`
1
+ import{j as l}from"./liveblocks-BLlSTcoD.js";import{a as g}from"./sentry-D_xp3E3Q.js";import{h as J,g as Y,i as O,j as S,n as G,u as K,o as at,p as N,N as $}from"./core-CbpoBsNm.js";import{eW as L,MB as Ee,MC as Me,gu as X,cw as we,cx as Ie,wN as St,MD as nt,wR as Kt,KI as ee,kr as te,wL as Yt,wF as qt,ME as Re,wx as Ht,ww as Wt,wq as Qt,wC as Zt,wS as Xt,MF as he,MG as Ue,wy as ea,MH as pe,fG as ft,x5 as gt,w_ as vt,MI as xt,pC as Tt,wV as yt,wT as Dt,MJ as Ct,xc as Et,x9 as wt,wW as It,xb as Je,J7 as bt,MK as ta,ML as aa,cz as na,MM as sa,MN as oa,MO as me,MP as ie,MQ as be,KJ as Ge,xr as ye,KH as De,xe as kt,wO as $e,MR as la,KK as H,MS as ze,wI as ia,MT as ca,MU as da,MV as Ke,MW as Ye,MX as qe,MY as He,xl as ke,MZ as At,x2 as Ft,M_ as ra,M$ as ua,N0 as ha,N1 as pa,N2 as ma,N3 as Sa,N4 as fa,N5 as ga,u9 as va,ua as xa,JP as Fe,N6 as Ta,N7 as ya,jQ as je,bq as Da,N8 as Ca,N9 as Ea,lp as wa,ly as Ia,JO as Pe,bE as st,Na as jt,Jp as Pt,Nb as ba,Nc as ka,Nd as Aa,lA as Fa,Ne as ot,Nf as lt,Ng as it,Nh as ct,Ni as ja,lw as Pa,Nj as _a,lz as Va,Nk as La,Nl as _t,K8 as Vt,kP as Na,Nm as Ba,Nn as _e,No as Lt,K6 as Nt,zJ as Oa,Np as Ma,Nq as Ra,l7 as Bt,Nr as Ua,Ns as Ja,Kk as Ga,rS as $a,Nt as Ot,Nu as dt,Kh as Ve,Nv as rt,Nw as za,Km as Ka,Nx as Ya,Ny as qa,Nz as Ha,NA as Wa,NB as Qa,rV as Za,NC as Xa,KL as en,ND as tn,J$ as Le,hB as an,NE as nn,NF as sn,hz as on,NG as ln,NH as cn,zN as dn,NI as rn,NJ as un,NK as hn,NL as pn,kT as mn,bn as Sn,fB as fn,fz as gn}from"./zeni-epic-state-CkeDRiud.js";import{z as M,aq as Ne,B as Mt,A as Q,d as F,a2 as Z,aw as vn,s as U,D as Ce,w as ce,ax as We,ay as xn,az as Tn,p as Qe,aA as yn,m as Dn,K as de,G as Ze,F as ae,x as z,aB as Cn,h as Xe,_ as Se,aC as En,aD as Rt,X as wn,aE as In,j as bn,aF as kn,at as Ut,aG as An,o as W,S as Fn,I as Jt,J as jn,aH as Pn,aI as _n,f as et,aJ as Vn,aK as Ln,n as Nn,aL as Bn,aM as On}from"./index-aZImxzjX.js";import{n as R,D as Mn,S as Gt}from"./mui-DcNGd9L2.js";import{t as Rn,A as Un}from"./AddressScreen-CvPxhYFs.js";import le from"./NotFoundScreen-Bnx2UPHv.js";import{F as Jn}from"./FeaturePreviewScreen-Bbo-4gXG.js";import{c as q,v as tt,d as Gn}from"./routePaths-DyIc-n3M.js";import{p as $t}from"./pathToGoBack-C2QnAeVh.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import{M as ge}from"./MobileAppDrawer-CWBhYKqW.js";import{D as $n}from"./DrawerScreen-CfPgZFbu.js";import{g as zn,m as Kn}from"./accountMappingHelper-BfrLGhoG.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c39365f0-3299-4bd5-a964-0116a66fc234",e._sentryDebugIdIdentifier="sentry-dbid-c39365f0-3299-4bd5-a964-0116a66fc234")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Me(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Kt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=U(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=O(),{scheduleType:o}=O();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>L(f)),r=Ee(o)??"accrued_expenses",h=M.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Me(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Ne(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Mt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:F,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:F,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=we(s.controllers),i=Ie(s.controllerUserIds);t!=null&&F.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-BLlSTcoD.js";import{a as f}from"./sentry-D_xp3E3Q.js";import{t as u,u as h,j as y,N as I}from"./core-CbpoBsNm.js";import{LT as w,fx as b,B2 as x}from"./zeni-epic-state-CkeDRiud.js";import{z as l,B as j,I as S,J as D}from"./index-aZImxzjX.js";import{n as p}from"./mui-DcNGd9L2.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.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]="4e395758-e829-45a7-98d9-3829e5efa811",e._sentryDebugIdIdentifier="sentry-dbid-4e395758-e829-45a7-98d9-3829e5efa811")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=y(c=>w(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 b(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(m(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=p.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
+ `,T=p(D.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{A as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-B6jAIe9x.js";import{u as L,h as N,i as Q,j as D,N as Y,n as W,g as X,o as Ve,p as h}from"./core-CLKYLs-8.js";import{QM as Ge,QN as Un,B7 as Mn,QO as zn,QP as $n,bH as Vn,QQ as Ze,Db as He,QR as Ne,eW as M,ya as Qe,fT as we,cp as se,cq as We,y4 as Gn,QS as Zn,QT as Hn,y7 as Nn,ye,y1 as Qn,x_ as Wn,QU as qe,Bd as qn,Py as ue,QV as Yn,GI as Kn,ME as Xn,GK as Jn,l8 as Fe,QW as ea,rx as Ye,rl as Ke,k$ as Xe,l2 as Re,MF as Oe,MG as na,QX as aa,l1 as ta,lo as sa,kS as oa,jp as ra,jo as ia,QY as ca,QZ as xe,Gp as la,Q_ as da,Q$ as ua,Pr as Ae,R0 as _e,R1 as pa,GV as ma,Qa as ha,E7 as Je,tZ as en,R2 as fa,GS as ga,R3 as nn,cR as De,Be as an,fU as ya,fz as tn,fB as ke,GX as xa,E1 as Ca,GP as wa,R4 as sn,R5 as on,Gr as rn,GB as Le,R6 as Aa,P_ as Da,GZ as ka,bt as Sa,bJ as Ia,cB as ba,bK as ja,bs as Ea,LA as va}from"./zeni-epic-state-CjQblqOQ.js";import{K as z,c1 as Pa,j as oe,F as H,x as P,z as I,a2 as Se,c2 as Ta,m as $,B as pe,c3 as Ba,E as J,n as cn,aq as Fa,af as Ue,c as _,c4 as Ra,at as Ie,c5 as Oa,A as me,c6 as _a,e as be,aN as K,c7 as La,X as Ua,_ as ln,ac as Ma,c8 as Me,c9 as za,r as de,ca as $a,cb as Va,cc as Ga,a9 as Za,o as Ha}from"./index-D_hiFYsE.js";import{n as F,D as ee,S as ne}from"./mui-AZmtqUsi.js";import{a as p}from"./sentry-95bdnR3R.js";import{u as dn}from"./useCashManagementBanner-Dy5XCSd3.js";import Z from"./NotFoundScreen-ChEBjJeL.js";import{S as ze}from"./SetupPagesScreen-Bfb-yG5Q.js";import{F as un}from"./FeaturePreviewScreen-CNGfajWs.js";import{M as he}from"./MobileAppDrawer-BPYh3fz7.js";import{A as Na,D as Qa,V as Wa}from"./DomesticWireDetailScreen-Dwlu904z.js";import{A as qa}from"./AddressScreen-BRdhnUB3.js";import{u as pn}from"./useAskAiCfoHostNavButtonProps-FETbJUjN.js";import{Z as Ya}from"./ZeniAccountStatementScreen-Be29Xc0Q.js";import"./recharts-CyaYjFwn.js";import"./analytics-BHHyMpuV.js";import"./plaid-2Q72y6JT.js";import"./dnd-BgEYAbRi.js";import"./stripe-DMRn4zHo.js";import"./lottie-C38Bn-X6.js";import"./lexical-DN4b_Twn.js";import"./pdf-BzNDzZ8_.js";import"./utils-CDpOkGne.js";import"./analyticsHelper-BsjRdUZX.js";import"./routePaths-XSngD1ow.js";import"./BusinessVerificationPageScreen-CoxJBcce.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="3b9a4352-9722-429e-9960-098308e59000",n._sentryDebugIdIdentifier="sentry-dbid-3b9a4352-9722-429e-9960-098308e59000")}catch{}})();const Ka=F.div`
1
+ import{j as e}from"./liveblocks-BLlSTcoD.js";import{u as L,h as N,i as Q,j as D,N as Y,n as W,g as X,o as Ve,p as f}from"./core-CbpoBsNm.js";import{QM as Ge,QN as Un,B7 as Mn,QO as zn,QP as $n,bH as Vn,QQ as Ze,Db as He,QR as Ne,eW as M,ya as Qe,fT as we,cp as se,cq as We,y4 as Gn,QS as Zn,QT as Hn,y7 as Nn,ye,y1 as Qn,x_ as Wn,QU as qe,Bd as qn,Py as ue,QV as Yn,GI as Kn,ME as Xn,GK as Jn,l8 as Fe,QW as ea,rx as Ye,rl as Ke,k$ as Xe,l2 as Re,MF as Oe,MG as na,QX as aa,l1 as ta,lo as sa,kS as oa,jp as ra,jo as ia,QY as ca,QZ as xe,Gp as la,Q_ as da,Q$ as ua,Pr as Ae,R0 as _e,R1 as pa,GV as ma,Qa as fa,E7 as Je,tZ as en,R2 as ha,GS as ga,R3 as nn,cR as De,Be as an,fU as ya,fz as tn,fB as ke,GX as xa,E1 as Ca,GP as wa,R4 as sn,R5 as on,Gr as rn,GB as Le,R6 as Aa,P_ as Da,GZ as ka,bt as Sa,bJ as Ia,cB as ba,bK as ja,bs as Ea,LA as va}from"./zeni-epic-state-CkeDRiud.js";import{K as z,c1 as Pa,j as oe,F as H,x as P,z as I,a2 as Se,c2 as Ta,m as $,B as pe,c3 as Ba,G as J,p as cn,aq as Fa,af as Ue,d as _,c4 as Ra,at as Ie,c5 as Oa,A as me,c6 as _a,f as be,aN as K,c7 as La,X as Ua,_ as ln,ac as Ma,c8 as Me,c9 as za,s as de,ca as $a,cb as Va,cc as Ga,a9 as Za,o as Ha}from"./index-aZImxzjX.js";import{n as F,D as ee,S as ne}from"./mui-DcNGd9L2.js";import{a as p}from"./sentry-D_xp3E3Q.js";import{u as dn}from"./useCashManagementBanner-BWjfwjGa.js";import Z from"./NotFoundScreen-Bnx2UPHv.js";import{S as ze}from"./SetupPagesScreen-N7NZbMog.js";import{F as un}from"./FeaturePreviewScreen-Bbo-4gXG.js";import{M as fe}from"./MobileAppDrawer-CWBhYKqW.js";import{A as Na,D as Qa,V as Wa}from"./DomesticWireDetailScreen-DEZpmV1y.js";import{A as qa}from"./AddressScreen-CvPxhYFs.js";import{u as pn}from"./useAskAiCfoHostNavButtonProps-BZImc5qT.js";import{Z as Ya}from"./ZeniAccountStatementScreen-NjdxQEux.js";import"./recharts-C0aThBg3.js";import"./analytics-CQmVOD4d.js";import"./plaid-B62punae.js";import"./dnd-CX5suNP6.js";import"./stripe-DMRn4zHo.js";import"./lottie-BY8e0Ufw.js";import"./lexical-BS7d_1CV.js";import"./pdf-BslZhgI8.js";import"./utils-BQO84dIV.js";import"./analyticsHelper-Bvqx3iRr.js";import"./routePaths-DyIc-n3M.js";import"./BusinessVerificationPageScreen-D2N5zUvV.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="2e65c04e-d029-4337-a19d-ad846f551f7d",n._sentryDebugIdIdentifier="sentry-dbid-2e65c04e-d029-4337-a19d-ad846f551f7d")}catch{}})();const Ka=F.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{u as L,h as N,i as Q,j as D,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${n=>n.theme.colors.grey4};
9
- `,Xa=W(function(n){const a=Ge(n);return{sweepAmount:a.sweepAmount,primaryAccount:a.primaryFundingAccount,treasurySummary:a.treasurySummary,initialRisk:a.formData.risk,initialFrequency:a.formData.frequency,initialMemo:a.formData.memo,isSaving:a.saveStatus.fetchState==="In-Progress"}},function(n,a){const{navigate:o}=a,t=s=>({amount:Vn[s],currencyCode:"USD",currencySymbol:"$"});return{onExit:()=>o(-1),onRiskChange:s=>{n($n({bufferAmount:t(s)}))},onSaveDraft:({risk:s,frequency:r,memo:c})=>{n(zn({bufferAmount:t(s),frequency:r,memo:c}))},onConfirm:()=>{n(Mn())}}})(Pa);function Ja(){const n=L(),a=N(),o=z(),{tenantEmailDomain:t}=Q(),s=D(c=>Ge(c)),r=s.saveStatus.fetchState;return p.useEffect(()=>{r==="Completed"&&(n(Un()),a(`/${t}/checking/cash_management`))},[n,a,r,t]),s.primaryFundingAccount==null?e.jsx(Y,{to:`/${t}/checking/cash_management`,replace:!0}):e.jsx(Ka,{windowSize:o,children:e.jsx(Xa,{navigate:a})})}function mn({isEditDrawerOpen:n=!1}={}){const a=L(),o=N(),t=X(),{ruleId:s,tenantEmailDomain:r}=Q(),c=oe(),{useFeatureGate:d}=H(),u=D(x=>Ze(x)),f=D(x=>He(x.depositAccountState,x.depositAccountListState)),w=D(x=>Ne(x)),i=D(x=>M(x)),{isFeatureEnabled:l}=d(P.isTreasuryEnabled),m=u?.fetchState??"Not-Started",y=i?.companyId??(r==null?void 0:I.getSignedInUserTenant(r)?.companyId);p.useEffect(()=>{m==="Not-Started"&&y!=null&&a(Qe(!0))},[a,m,y]);const A=u?.fetchState!=="Completed";if(A)return{autoTransferRulePageProps:void 0,isLoading:A};const b=i?.company!=null&&we(i.company),C=!!(l&&b),k=se(c?.loggedInUserRoleMap)||We(c?.loggedInUserRoleMap),g=I.getSignedInUser(),j={userId:g?.userId??"",sessionId:g?.zeniSessionId??"",tenantId:i?.tenantId??""},T=!!t.state?.scrollToAddRule;return{isLoading:A,autoTransferRulePageProps:{autoTransferRuleView:u,companyName:i?.companyName??"",hasAdminLevelAccess:k,includeTreasuryOption:C,transferLimit:5e5,authParams:j,currentTenant:i,depositAccountListView:f,downloadAccountDetailEndPoint:`${Se}/account_details`,editingRuleId:s,isEditDrawerOpen:n,scrollToAddRule:T,zeniAccountsConfigDetail:w,onBackClick:()=>o(".."),onCreateRule:()=>{a(Wn())},onUpdateRule:x=>{a(ye(x))},onDeleteClick:x=>{a(Qn(x))},onPauseClick:x=>{a(ye(x,!0,!1))},onResumeClick:x=>{a(ye(x,!1,!0))},onActivityClick:(x,B)=>{a(Nn(x,B))},onUpdateRuleLocalData:x=>{a(Hn(x))},clearRuleLocalData:()=>{a(Zn())},onEditClick:x=>{o(`./${x}/edit`)},onEditDrawerClose:()=>{o("../../",{relative:"path"})},onReviewClick:()=>{a(Gn())}}}}const et=F.div`
9
+ `,Xa=W(function(n){const a=Ge(n);return{sweepAmount:a.sweepAmount,primaryAccount:a.primaryFundingAccount,treasurySummary:a.treasurySummary,initialRisk:a.formData.risk,initialFrequency:a.formData.frequency,initialMemo:a.formData.memo,isSaving:a.saveStatus.fetchState==="In-Progress"}},function(n,a){const{navigate:o}=a,t=s=>({amount:Vn[s],currencyCode:"USD",currencySymbol:"$"});return{onExit:()=>o(-1),onRiskChange:s=>{n($n({bufferAmount:t(s)}))},onSaveDraft:({risk:s,frequency:r,memo:c})=>{n(zn({bufferAmount:t(s),frequency:r,memo:c}))},onConfirm:()=>{n(Mn())}}})(Pa);function Ja(){const n=L(),a=N(),o=z(),{tenantEmailDomain:t}=Q(),s=D(c=>Ge(c)),r=s.saveStatus.fetchState;return p.useEffect(()=>{r==="Completed"&&(n(Un()),a(`/${t}/checking/cash_management`))},[n,a,r,t]),s.primaryFundingAccount==null?e.jsx(Y,{to:`/${t}/checking/cash_management`,replace:!0}):e.jsx(Ka,{windowSize:o,children:e.jsx(Xa,{navigate:a})})}function mn({isEditDrawerOpen:n=!1}={}){const a=L(),o=N(),t=X(),{ruleId:s,tenantEmailDomain:r}=Q(),c=oe(),{useFeatureGate:d}=H(),u=D(x=>Ze(x)),h=D(x=>He(x.depositAccountState,x.depositAccountListState)),w=D(x=>Ne(x)),i=D(x=>M(x)),{isFeatureEnabled:l}=d(P.isTreasuryEnabled),m=u?.fetchState??"Not-Started",y=i?.companyId??(r==null?void 0:I.getSignedInUserTenant(r)?.companyId);p.useEffect(()=>{m==="Not-Started"&&y!=null&&a(Qe(!0))},[a,m,y]);const A=u?.fetchState!=="Completed";if(A)return{autoTransferRulePageProps:void 0,isLoading:A};const b=i?.company!=null&&we(i.company),C=!!(l&&b),k=se(c?.loggedInUserRoleMap)||We(c?.loggedInUserRoleMap),g=I.getSignedInUser(),j={userId:g?.userId??"",sessionId:g?.zeniSessionId??"",tenantId:i?.tenantId??""},T=!!t.state?.scrollToAddRule;return{isLoading:A,autoTransferRulePageProps:{autoTransferRuleView:u,companyName:i?.companyName??"",hasAdminLevelAccess:k,includeTreasuryOption:C,transferLimit:5e5,authParams:j,currentTenant:i,depositAccountListView:h,downloadAccountDetailEndPoint:`${Se}/account_details`,editingRuleId:s,isEditDrawerOpen:n,scrollToAddRule:T,zeniAccountsConfigDetail:w,onBackClick:()=>o(".."),onCreateRule:()=>{a(Wn())},onUpdateRule:x=>{a(ye(x))},onDeleteClick:x=>{a(Qn(x))},onPauseClick:x=>{a(ye(x,!0,!1))},onResumeClick:x=>{a(ye(x,!1,!0))},onActivityClick:(x,B)=>{a(Nn(x,B))},onUpdateRuleLocalData:x=>{a(Hn(x))},clearRuleLocalData:()=>{a(Zn())},onEditClick:x=>{o(`./${x}/edit`)},onEditDrawerClose:()=>{o("../../",{relative:"path"})},onReviewClick:()=>{a(Gn())}}}}const et=F.div`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  width: 100%;
@@ -14,7 +14,7 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{u as L,h as N,i as Q,j as D,
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${n=>n.theme.colors.grey4};
17
- `,nt=W(function(n){const a=qe(n);return{bufferAmount:{amount:1e4,currencyCode:"USD",currencySymbol:"$"},cashBalance:a.cashBalance,cashFlowTotal:a.cashflow,inflows:a.totalInFlow,isOutflowsLoading:a.banner.fetchState!=="Completed",outflowItems:a.outflowEvents,outflows:a.totalOutFlow,projectionData:a.projectionData,totalCash:a.totalCash,treasuryBalance:a.treasuryBalance}},function(n,a){const{navigate:o}=a;return{onBackClick:()=>{o(-1)}}})(Ta);function ie({isAutoTransferRulesTabActive:n=!1,isEditDrawerOpen:a=!1}){const o=L(),t=N(),s=z(),r=D(w=>qe(w)).banner.fetchState;p.useEffect(()=>{r==="Not-Started"&&o(qn(!1))},[o,r]);const{autoTransferRulePageProps:c,isLoading:d}=mn({isEditDrawerOpen:a}),u=dn(),f=n?"autoTransferRules":"overview";return e.jsx(et,{windowSize:s,children:e.jsx(nt,{initialTab:f,autoTransferRulePageProps:c,cashManagementBannerProps:u,isAutoTransferRulesLoading:d,navigate:t})})}const at=F.div`
17
+ `,nt=W(function(n){const a=qe(n);return{bufferAmount:{amount:1e4,currencyCode:"USD",currencySymbol:"$"},cashBalance:a.cashBalance,cashFlowTotal:a.cashflow,inflows:a.totalInFlow,isOutflowsLoading:a.banner.fetchState!=="Completed",outflowItems:a.outflowEvents,outflows:a.totalOutFlow,projectionData:a.projectionData,totalCash:a.totalCash,treasuryBalance:a.treasuryBalance}},function(n,a){const{navigate:o}=a;return{onBackClick:()=>{o(-1)}}})(Ta);function ie({isAutoTransferRulesTabActive:n=!1,isEditDrawerOpen:a=!1}){const o=L(),t=N(),s=z(),r=D(w=>qe(w)).banner.fetchState;p.useEffect(()=>{r==="Not-Started"&&o(qn(!1))},[o,r]);const{autoTransferRulePageProps:c,isLoading:d}=mn({isEditDrawerOpen:a}),u=dn(),h=n?"autoTransferRules":"overview";return e.jsx(et,{windowSize:s,children:e.jsx(nt,{initialTab:h,autoTransferRulePageProps:c,cashManagementBannerProps:u,isAutoTransferRulesLoading:d,navigate:t})})}const at=F.div`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  width: 100%;
@@ -22,7 +22,7 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{u as L,h as N,i as Q,j as D,
22
22
  flex-direction: column;
23
23
  align-items: center;
24
24
  background-color: ${n=>n.theme.colors.grey4};
25
- `;function $e({isEditDrawerOpen:n}){const a=$(),[o,t]=p.useState(!1),{autoTransferRulePageProps:s,isLoading:r}=mn({isEditDrawerOpen:n});return r||s==null?e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(at,{children:[e.jsx(he,{isAppContentDrawerOpen:o,handleDrawerToggle:c=>{t(c)}}),e.jsx(Ba,{...s})]})}const tt={overlayWidth:new J(100,100,58)},st=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:o})=>{const t=L(),s=$(),r=z();if(I.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(ee,{onClose:()=>{o(!0),t(ue())},anchor:"right",open:a,PaperProps:{style:{width:tt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ot,{onClick:c=>c.stopPropagation(),children:e.jsx(Na,{vendorIdParam:n,accountContext:"express-pay"})})})},ot=F(ne)`
25
+ `;function $e({isEditDrawerOpen:n}){const a=$(),[o,t]=p.useState(!1),{autoTransferRulePageProps:s,isLoading:r}=mn({isEditDrawerOpen:n});return r||s==null?e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(at,{children:[e.jsx(fe,{isAppContentDrawerOpen:o,handleDrawerToggle:c=>{t(c)}}),e.jsx(Ba,{...s})]})}const tt={overlayWidth:new J(100,100,58)},st=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:o})=>{const t=L(),s=$(),r=z();if(I.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(ee,{onClose:()=>{o(!0),t(ue())},anchor:"right",open:a,PaperProps:{style:{width:tt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ot,{onClick:c=>c.stopPropagation(),children:e.jsx(Na,{vendorIdParam:n,accountContext:"express-pay"})})})},ot=F(ne)`
26
26
  display: flex;
27
27
  min-height: 100%;
28
28
  flex-direction: column;
@@ -42,15 +42,15 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{u as L,h as N,i as Q,j as D,
42
42
  flex-direction: column;
43
43
  align-items: center;
44
44
  background-color: ${n=>n.theme.colors.grey4};
45
- `,mt=W(function(n,a){const o=M(n),t=I.getSignedInUser(),s=o.tenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:s??""},c=a.expressPayDetails,d=n.entityAutoCompleteState.autoCompleteText.common,u=Xn(n,"common");return{expressPayDetails:c,fileProps:{authParams:r,filesEndPoint:`${Ie.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:d,entityAutoCompleteView:u},analytics:a.analytics}},function(n,a){const{navigate:o}=a;return{onSaveVendor:t=>{n(ia(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,s)=>{n(Re({vendorId:s,localData:t}))},saveExpressPayLocalData:t=>{n(ra({localData:t}))},onVendorSelected:t=>{t!=null&&n(oa(t,!1))},updateSelectedVendorForCreate:t=>{n(sa(t))},initializeVendorAddress:()=>{n(ta())},resetVendorSaveStatus:t=>{n(aa({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,s)=>{t.trim().length>=2?n(na({searchString:t,entityType:s,searchOrigin:"common"})):t.trim().length===0&&n(Oe("common"))},onCancelAutoComplete:()=>{n(Oe("common"))}},chooseNewVendor:t=>{n(Re({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?o("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&o("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Xe({files:t}))},onDeleteFile:t=>{n(Ke(t))},onEditFileName:(t,s)=>{n(Ye(t,s.split(".")[0]))},onBackClick:t=>{t!=null&&n(Fe(t)),n(Fe()),n(ea()),n(ue()),o("../",{relative:"path"})},onSchedulePayment:()=>{n(Jn())}}})(Ra);function ce({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:o}){const t=N(),s=X(),r=L(),[c,d]=p.useState(!1),{tenantEmailDomain:u}=Q(),f=oe(),w=D(E=>E.expressPayState.fetchState),i=D(E=>M(E)),l=D(E=>Yn(E)),m=l.expressPayLocalData?.vendorId,y=i.companyId??I.getSignedInUserTenant(u)?.companyId,[A,b]=p.useState(!1),[C,k]=p.useState(!1),[g,j]=p.useState(!1),T=cn(s.state?.pathnameStackToGoBack),{poppedPathname:x}=T,B=x?.split("/"),V=B?.[B.length-1];p.useEffect(()=>{n===!0?b(!0):(b(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{a===!0?k(!0):(k(!1),document.body.style.overflow="auto")},[a]),p.useEffect(()=>{o===!0?j(!0):(j(!1),document.body.style.overflow="auto")},[o]),p.useEffect(()=>{w==="Not-Started"&&r(Kn(!0,!0))},[w,r]);const R=Fa(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(p.useEffect(()=>{R==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&v()},[R,l.vendorViewDetails.bankAccountCreationState?.fetchState]),I.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const U=E=>{d(E)},v=()=>{b(!1),k(!1),t("../",{relative:"path"})};return e.jsxs(pt,{children:[Ue(s)?e.jsx(he,{isAppContentDrawerOpen:c,handleDrawerToggle:U}):null,A===!0?e.jsx(st,{vendorId:m,closeDrawerHandler:v,isDrawerOpen:A}):null,C===!0?e.jsx(dt,{vendorId:m,closeDrawerHandler:v,isDrawerOpen:C}):null,g===!0?e.jsx(it,{closeDrawerHandler:v,isDrawerOpen:g}):null,e.jsx(Wa,{vendorId:m,isExpressPayPage:!0}),e.jsx(mt,{navigate:t,location:s,companyId:y,accountId:V,analytics:_,currentTenant:i,vendorId:m,roleMap:f?.loggedInUserRoleMap,isSettings:Ue(s),expressPayDetails:l,onClickMenuIcon:()=>{U(!0)}})]})}const ht={overlayWidth:new J(100,100,58)},ft=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:o,zeniBankAccountDetail:t,closeDrawerHandler:s})=>{const r=$(),c=z(),d=D(i=>Ne(i)),u=D(i=>M(i));if(I.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const f=()=>{s(!0)},w={depositAccount:t,onDismissClick:f,zeniAccountsConfigDetail:d,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:u};return e.jsx(ee,{anchor:"right",open:o,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>f(),children:e.jsx(gt,{onClick:i=>i.stopPropagation(),children:e.jsx(Oa,{...w})})})},gt=F(ne)`
45
+ `,mt=W(function(n,a){const o=M(n),t=I.getSignedInUser(),s=o.tenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:s??""},c=a.expressPayDetails,d=n.entityAutoCompleteState.autoCompleteText.common,u=Xn(n,"common");return{expressPayDetails:c,fileProps:{authParams:r,filesEndPoint:`${Ie.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:d,entityAutoCompleteView:u},analytics:a.analytics}},function(n,a){const{navigate:o}=a;return{onSaveVendor:t=>{n(ia(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,s)=>{n(Re({vendorId:s,localData:t}))},saveExpressPayLocalData:t=>{n(ra({localData:t}))},onVendorSelected:t=>{t!=null&&n(oa(t,!1))},updateSelectedVendorForCreate:t=>{n(sa(t))},initializeVendorAddress:()=>{n(ta())},resetVendorSaveStatus:t=>{n(aa({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,s)=>{t.trim().length>=2?n(na({searchString:t,entityType:s,searchOrigin:"common"})):t.trim().length===0&&n(Oe("common"))},onCancelAutoComplete:()=>{n(Oe("common"))}},chooseNewVendor:t=>{n(Re({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?o("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&o("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Xe({files:t}))},onDeleteFile:t=>{n(Ke(t))},onEditFileName:(t,s)=>{n(Ye(t,s.split(".")[0]))},onBackClick:t=>{t!=null&&n(Fe(t)),n(Fe()),n(ea()),n(ue()),o("../",{relative:"path"})},onSchedulePayment:()=>{n(Jn())}}})(Ra);function ce({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:o}){const t=N(),s=X(),r=L(),[c,d]=p.useState(!1),{tenantEmailDomain:u}=Q(),h=oe(),w=D(E=>E.expressPayState.fetchState),i=D(E=>M(E)),l=D(E=>Yn(E)),m=l.expressPayLocalData?.vendorId,y=i.companyId??I.getSignedInUserTenant(u)?.companyId,[A,b]=p.useState(!1),[C,k]=p.useState(!1),[g,j]=p.useState(!1),T=cn(s.state?.pathnameStackToGoBack),{poppedPathname:x}=T,B=x?.split("/"),V=B?.[B.length-1];p.useEffect(()=>{n===!0?b(!0):(b(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{a===!0?k(!0):(k(!1),document.body.style.overflow="auto")},[a]),p.useEffect(()=>{o===!0?j(!0):(j(!1),document.body.style.overflow="auto")},[o]),p.useEffect(()=>{w==="Not-Started"&&r(Kn(!0,!0))},[w,r]);const R=Fa(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(p.useEffect(()=>{R==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&v()},[R,l.vendorViewDetails.bankAccountCreationState?.fetchState]),I.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const U=E=>{d(E)},v=()=>{b(!1),k(!1),t("../",{relative:"path"})};return e.jsxs(pt,{children:[Ue(s)?e.jsx(fe,{isAppContentDrawerOpen:c,handleDrawerToggle:U}):null,A===!0?e.jsx(st,{vendorId:m,closeDrawerHandler:v,isDrawerOpen:A}):null,C===!0?e.jsx(dt,{vendorId:m,closeDrawerHandler:v,isDrawerOpen:C}):null,g===!0?e.jsx(it,{closeDrawerHandler:v,isDrawerOpen:g}):null,e.jsx(Wa,{vendorId:m,isExpressPayPage:!0}),e.jsx(mt,{navigate:t,location:s,companyId:y,accountId:V,analytics:_,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:Ue(s),expressPayDetails:l,onClickMenuIcon:()=>{U(!0)}})]})}const ft={overlayWidth:new J(100,100,58)},ht=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:o,zeniBankAccountDetail:t,closeDrawerHandler:s})=>{const r=$(),c=z(),d=D(i=>Ne(i)),u=D(i=>M(i));if(I.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{s(!0)},w={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:d,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:u};return e.jsx(ee,{anchor:"right",open:o,PaperProps:{style:{width:ft.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(gt,{onClick:i=>i.stopPropagation(),children:e.jsx(Oa,{...w})})})},gt=F(ne)`
46
46
  display: flex;
47
47
  min-height: 100%;
48
48
  flex-direction: column;
49
- `,yt={overlayWidth:new J(100,100,58)},hn=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const o=$(),t=z(),s=L(),r=D(i=>M(i)),c=I.getSignedInUser(),d=r.tenantId,u={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:d??""};if(c==null)throw Error("Can't access check deposit page without signing in...");const f=D(i=>ca(i)),w={analytics:_,checkDeposit:f,filesEndPoint:`${Ie.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:i=>{s(da(i))},updateFilesEntity:i=>{s(Xe({files:i}))},onAnotherTransferClick:()=>{s(xe())},onDeleteFile:i=>{s(Ke(i))},onEditFileName:(i,l)=>{s(Ye(i,l.split(".")[0]))},onCheckDpositClick:()=>{s(la())},onDismissClick:()=>{a(!0),s(xe())}};return e.jsxs(e.Fragment,{children:[e.jsx(me,{analytics:_,onLoad:i=>(l=>l.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),e.jsx(ee,{anchor:"right",open:n,PaperProps:{style:{width:yt.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void s(xe())),children:e.jsx(xt,{onClick:i=>i.stopPropagation(),children:e.jsx(_a,{...w})})})]})},xt=F(ne)`
49
+ `,yt={overlayWidth:new J(100,100,58)},fn=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const o=$(),t=z(),s=L(),r=D(i=>M(i)),c=I.getSignedInUser(),d=r.tenantId,u={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:d??""};if(c==null)throw Error("Can't access check deposit page without signing in...");const h=D(i=>ca(i)),w={analytics:_,checkDeposit:h,filesEndPoint:`${Ie.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:i=>{s(da(i))},updateFilesEntity:i=>{s(Xe({files:i}))},onAnotherTransferClick:()=>{s(xe())},onDeleteFile:i=>{s(Ke(i))},onEditFileName:(i,l)=>{s(Ye(i,l.split(".")[0]))},onCheckDpositClick:()=>{s(la())},onDismissClick:()=>{a(!0),s(xe())}};return e.jsxs(e.Fragment,{children:[e.jsx(me,{analytics:_,onLoad:i=>(l=>l.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),e.jsx(ee,{anchor:"right",open:n,PaperProps:{style:{width:yt.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void s(xe())),children:e.jsx(xt,{onClick:i=>i.stopPropagation(),children:e.jsx(_a,{...w})})})]})},xt=F(ne)`
50
50
  display: flex;
51
51
  min-height: 100%;
52
52
  flex-direction: column;
53
- `,Ct={overlayWidth:new J(100,100,58)},wt=W(function(n,a){const o=a.currentTenant?.companyId;return{plaidConnectionDetails:ha(n,o,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:He(n.depositAccountState,n.depositAccountListState)}},function(n,a){return{onReviewClick:()=>n(ga()),clearReviewTransferDetail:()=>n(fa()),onFetchLinkTokenClick:o=>{n(en("external_account",o))},onEstablishConnectionClick:o=>{n(Je(o,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(La),fn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:o,closeDrawerHandler:t,zeniAccountsConfig:s})=>{const r=D(g=>ua(g)),c=D(g=>M(g)),d=$(),u=z(),f=L(),{accountId:w}=Q(),[i,l]=p.useState("achTransfer"),[m,y]=p.useState(!1);if(I.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:A}=H(),{configValue:b}=A(K.zeniAccountsConfig),C=Ae(b),k=()=>{t(!0),f(_e())};return p.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&y(!0)},[y,r.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(me,{analytics:_,onLoad:g=>(j=>j.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(g)}),e.jsx(ee,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&k()},anchor:"right",open:n,PaperProps:{style:{width:Ct.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(At,{onClick:g=>g.stopPropagation(),children:e.jsx(wt,{analytics:_,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:o,onTransferClick:()=>{_.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&s.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>s.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),f(ma(w))},onDismissClick:k,onSaveChangesToLocalStore:g=>{f(pa(g))},onAnotherTransferClick:()=>{y(!1),f(_e())},currentTenant:c,zeniAccountsConfigDetail:s,currentDrawerContent:i,setCurrentDrawerContent:l,showReviewContent:m,setShowReviewContent:y,onBackClick:()=>{},maxInsuredAmount:C.maxInsuredAmount})})})]})},At=F(ne)`
53
+ `,Ct={overlayWidth:new J(100,100,58)},wt=W(function(n,a){const o=a.currentTenant?.companyId;return{plaidConnectionDetails:fa(n,o,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:He(n.depositAccountState,n.depositAccountListState)}},function(n,a){return{onReviewClick:()=>n(ga()),clearReviewTransferDetail:()=>n(ha()),onFetchLinkTokenClick:o=>{n(en("external_account",o))},onEstablishConnectionClick:o=>{n(Je(o,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(La),hn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:o,closeDrawerHandler:t,zeniAccountsConfig:s})=>{const r=D(g=>ua(g)),c=D(g=>M(g)),d=$(),u=z(),h=L(),{accountId:w}=Q(),[i,l]=p.useState("achTransfer"),[m,y]=p.useState(!1);if(I.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:A}=H(),{configValue:b}=A(K.zeniAccountsConfig),C=Ae(b),k=()=>{t(!0),h(_e())};return p.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&y(!0)},[y,r.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(me,{analytics:_,onLoad:g=>(j=>j.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(g)}),e.jsx(ee,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&k()},anchor:"right",open:n,PaperProps:{style:{width:Ct.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(At,{onClick:g=>g.stopPropagation(),children:e.jsx(wt,{analytics:_,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:o,onTransferClick:()=>{_.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&s.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>s.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ma(w))},onDismissClick:k,onSaveChangesToLocalStore:g=>{h(pa(g))},onAnotherTransferClick:()=>{y(!1),h(_e())},currentTenant:c,zeniAccountsConfigDetail:s,currentDrawerContent:i,setCurrentDrawerContent:l,showReviewContent:m,setShowReviewContent:y,onBackClick:()=>{},maxInsuredAmount:C.maxInsuredAmount})})})]})},At=F(ne)`
54
54
  display: flex;
55
55
  min-height: 100%;
56
56
  flex-direction: column;
@@ -62,7 +62,7 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{u as L,h as N,i as Q,j as D,
62
62
  flex-direction: column;
63
63
  align-items: center;
64
64
  background-color: ${n=>n.theme.colors.grey4};
65
- `,kt=W(function(n,a){return{zeniAccountListView:nn(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(n,a){const{navigate:o,currentTenant:t,location:s,companyId:r,handleDrawerToggle:c,analytics:d,isBillPayEnabled:u,isCashManagementFeatureEnabled:f,isDebitCardFeatureEnabled:w}=a,{tenantEmailDomain:i}=t;return{onZeniAccountClick:(l,m)=>{d.trackAccountsListPageClicked("Accounts Row Item Click",m,"active");const y=St(i,l),A=de(s.state?.pathnameStackToGoBack,s.pathname);o(y,{state:{pathnameStackToGoBack:A}})},onSettingsClick:()=>{d.trackAccountsListPageClicked("Settings Icon"),o("setup")},onReloadTransactions:()=>{n(an(!1))},handleMoveMoneyOptionSelection:(l,m)=>{let y="page-not-found";l==="sendMoney"&&(y=Cn(i)),l==="payBill"?y=gn(t,u,w):l==="transfer"?(y=yn(i),m!=null&&n(sn(m))):l==="checkDeposit"&&(y=xn(i));const A=de(s.state?.pathnameStackToGoBack,s.pathname);o(y,{state:{pathnameStackToGoBack:A}})},unlinkPaymentAccount:(l,m)=>{d.trackAccountsListPageClicked("Unlink Account",m),n(wa(l))},onFetchLinkTokenClick:(l,m)=>{n(en("external_account",l,m))},onUpdatePaymentAccountStatus:(l,m,y)=>{n(Ca(l,m,"zeni_accounts","external_account",y))},onEstablishConnectionClick:l=>{n(Je(l,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:l=>{n(xa(l))},onClickMenuIcon:()=>{c(!0)},onTreasuryGetStartedClick:()=>{o("../../treasury/promo")},onAutoTransferClick:l=>{const m=f?"./cash_management/auto-transfer":"./auto-transfer";l?o(m,{state:{...s.state,scrollToAddRule:!0}}):o(m)},onCashManagementClick:()=>{o(It(i))}}})(za);function Ce({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const o=X(),t=N(),s=L(),r=z(),{tenantEmailDomain:c}=Q(),{useDynamicConfig:d,useFeatureGate:u}=H(),f=$(),{configValue:w}=d(K.zeniAccountsConfig),{isFeatureEnabled:i}=u(P.isTreasuryEnabled),{isFeatureEnabled:l}=u(P.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(P.isAutoTransferRuleEnabled),{isFeatureEnabled:y}=u(P.isCheckingCommentingEnabled),{isFeatureEnabled:A}=u(P.isCashManagementFeatureEnabled),b=Ae(w),C=D(O=>M(O)),k=C.companyId??I.getSignedInUserTenant(c)?.companyId,{configValue:g}=d(K.expressPayConfig),j=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(C.tenantId),[T,x]=p.useState(!1),[B,V]=p.useState(!1),[R,U]=p.useState(!1),[v,E]=p.useState(!1),S=D(O=>nn(O)),G=S.fetchState,ae=D(O=>Ze(O)),re=ae?.fetchState??"Not-Started",te=!!C.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=oe(),je=!!C.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,wn=!!C.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,An=se(q?.loggedInUserRoleMap),Dn=De(q?.loggedInUserRoleMap),kn=!!C.companyBillPayInfo?.info?.isBillPayEnabled,Ee=I.getSignedInUser(),Sn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:C.tenantId??""},In=`${Se}/account_details`,{areTenantIdsInSync:ve}=Ua();p.useEffect(()=>{!T&&ve&&(x(!0),s(an(!1)))},[T,s,G,ve]),p.useEffect(()=>{!B&&re==="Not-Started"&&k&&(V(!0),s(Qe(!0)))},[B,re,k,s]),p.useEffect(()=>{n!=null&&n===!0?U(!0):(U(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{E(a!=null&&a===!0)},[a]);const Pe=()=>{U(!1),t("..")},[bn,jn]=p.useState(!1),Te=O=>{jn(O)},{isAiCfoAccessEnabled:En,onAskAiCfoClick:vn}=pn({mobileExploreReferrer:"Checking Accounts"});ln({isDataReady:G==="Completed"});const Pn=dn(),Tn=C.company!=null&&we(C.company),fe=(i&&Tn)===!0&&!wn,[Bn,Fn]=p.useState(!1),ge=D(O=>O.treasurySetupViewState.treasuryFundsDetails),Rn=ge.fundsDetails,On=Ma(Rn);p.useEffect(()=>{fe!==!0||Bn||ge?.fetchStatus.fetchState!=="Not-Started"||(Fn(!0),s(ya()))},[ge.fetchStatus,s]);const _n=tn(C),Ln=ke(l,C);return _n===!0&&Ln!==!0?e.jsx(un,{}):te?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&R===!1&&v===!1?e.jsx(me,{analytics:_,onLoad:O=>(Be=>{Be.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Me(S.summary?.totalBalance.available.amount??0),Me(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),fe&&Be.trackTreasuryPromoView("Checking Promo Banner")})(O)}):null,R===!0?e.jsx(fn,{closeDrawerHandler:Pe,isTransferDrawerOpen:R,zeniAccountsConfig:S.zeniAccountsConfig,authParams:Sn,downloadAccountDetailEndPoint:In}):null,v===!0?e.jsx(hn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:v}):null,e.jsxs(Dt,{windowSize:r,children:[e.jsx(he,{isAppContentDrawerOpen:bn,handleDrawerToggle:Te}),e.jsx(kt,{zeniBankListView:S,navigate:t,currentTenant:C,location:o,companyId:k,analytics:_,cashManagementBannerProps:Pn,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:j,isBillPayEnabled:kn,isCashManagementFeatureEnabled:A,isCheckingCommentingEnabled:y,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:m,handleDrawerToggle:Te,showTreasuryPromo:fe,treasuryYieldPercentage:On,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:En,onAskAiCfoClick:vn})]})]}):je&&An?e.jsx(Y,{to:"../setup"}):C.companyZeniAccountInfo?.info&&!je&&Dn?e.jsx(Y,{to:"../promo",state:o.state}):e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const gn=(n,a,o)=>{const t=ke(o,n),{tenantEmailDomain:s}=n;return t===!0||a===!1?`/${s}/bills`:`/${s}/bill/new`},St=(n,a)=>`/${n}/checking/${a}`,yn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,xn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,Cn=n=>`/${n}/checking/express-pay`,It=n=>`/${n}/checking/cash_management`,bt=F.div`
65
+ `,kt=W(function(n,a){return{zeniAccountListView:nn(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(n,a){const{navigate:o,currentTenant:t,location:s,companyId:r,handleDrawerToggle:c,analytics:d,isBillPayEnabled:u,isCashManagementFeatureEnabled:h,isDebitCardFeatureEnabled:w}=a,{tenantEmailDomain:i}=t;return{onZeniAccountClick:(l,m)=>{d.trackAccountsListPageClicked("Accounts Row Item Click",m,"active");const y=St(i,l),A=de(s.state?.pathnameStackToGoBack,s.pathname);o(y,{state:{pathnameStackToGoBack:A}})},onSettingsClick:()=>{d.trackAccountsListPageClicked("Settings Icon"),o("setup")},onReloadTransactions:()=>{n(an(!1))},handleMoveMoneyOptionSelection:(l,m)=>{let y="page-not-found";l==="sendMoney"&&(y=Cn(i)),l==="payBill"?y=gn(t,u,w):l==="transfer"?(y=yn(i),m!=null&&n(sn(m))):l==="checkDeposit"&&(y=xn(i));const A=de(s.state?.pathnameStackToGoBack,s.pathname);o(y,{state:{pathnameStackToGoBack:A}})},unlinkPaymentAccount:(l,m)=>{d.trackAccountsListPageClicked("Unlink Account",m),n(wa(l))},onFetchLinkTokenClick:(l,m)=>{n(en("external_account",l,m))},onUpdatePaymentAccountStatus:(l,m,y)=>{n(Ca(l,m,"zeni_accounts","external_account",y))},onEstablishConnectionClick:l=>{n(Je(l,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:l=>{n(xa(l))},onClickMenuIcon:()=>{c(!0)},onTreasuryGetStartedClick:()=>{o("../../treasury/promo")},onAutoTransferClick:l=>{const m=h?"./cash_management/auto-transfer":"./auto-transfer";l?o(m,{state:{...s.state,scrollToAddRule:!0}}):o(m)},onCashManagementClick:()=>{o(It(i))}}})(za);function Ce({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const o=X(),t=N(),s=L(),r=z(),{tenantEmailDomain:c}=Q(),{useDynamicConfig:d,useFeatureGate:u}=H(),h=$(),{configValue:w}=d(K.zeniAccountsConfig),{isFeatureEnabled:i}=u(P.isTreasuryEnabled),{isFeatureEnabled:l}=u(P.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(P.isAutoTransferRuleEnabled),{isFeatureEnabled:y}=u(P.isCheckingCommentingEnabled),{isFeatureEnabled:A}=u(P.isCashManagementFeatureEnabled),b=Ae(w),C=D(O=>M(O)),k=C.companyId??I.getSignedInUserTenant(c)?.companyId,{configValue:g}=d(K.expressPayConfig),j=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(C.tenantId),[T,x]=p.useState(!1),[B,V]=p.useState(!1),[R,U]=p.useState(!1),[v,E]=p.useState(!1),S=D(O=>nn(O)),G=S.fetchState,ae=D(O=>Ze(O)),re=ae?.fetchState??"Not-Started",te=!!C.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=oe(),je=!!C.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,wn=!!C.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,An=se(q?.loggedInUserRoleMap),Dn=De(q?.loggedInUserRoleMap),kn=!!C.companyBillPayInfo?.info?.isBillPayEnabled,Ee=I.getSignedInUser(),Sn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:C.tenantId??""},In=`${Se}/account_details`,{areTenantIdsInSync:ve}=Ua();p.useEffect(()=>{!T&&ve&&(x(!0),s(an(!1)))},[T,s,G,ve]),p.useEffect(()=>{!B&&re==="Not-Started"&&k&&(V(!0),s(Qe(!0)))},[B,re,k,s]),p.useEffect(()=>{n!=null&&n===!0?U(!0):(U(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{E(a!=null&&a===!0)},[a]);const Pe=()=>{U(!1),t("..")},[bn,jn]=p.useState(!1),Te=O=>{jn(O)},{isAiCfoAccessEnabled:En,onAskAiCfoClick:vn}=pn({mobileExploreReferrer:"Checking Accounts"});ln({isDataReady:G==="Completed"});const Pn=dn(),Tn=C.company!=null&&we(C.company),he=(i&&Tn)===!0&&!wn,[Bn,Fn]=p.useState(!1),ge=D(O=>O.treasurySetupViewState.treasuryFundsDetails),Rn=ge.fundsDetails,On=Ma(Rn);p.useEffect(()=>{he!==!0||Bn||ge?.fetchStatus.fetchState!=="Not-Started"||(Fn(!0),s(ya()))},[ge.fetchStatus,s]);const _n=tn(C),Ln=ke(l,C);return _n===!0&&Ln!==!0?e.jsx(un,{}):te?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&R===!1&&v===!1?e.jsx(me,{analytics:_,onLoad:O=>(Be=>{Be.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Me(S.summary?.totalBalance.available.amount??0),Me(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Be.trackTreasuryPromoView("Checking Promo Banner")})(O)}):null,R===!0?e.jsx(hn,{closeDrawerHandler:Pe,isTransferDrawerOpen:R,zeniAccountsConfig:S.zeniAccountsConfig,authParams:Sn,downloadAccountDetailEndPoint:In}):null,v===!0?e.jsx(fn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:v}):null,e.jsxs(Dt,{windowSize:r,children:[e.jsx(fe,{isAppContentDrawerOpen:bn,handleDrawerToggle:Te}),e.jsx(kt,{zeniBankListView:S,navigate:t,currentTenant:C,location:o,companyId:k,analytics:_,cashManagementBannerProps:Pn,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:j,isBillPayEnabled:kn,isCashManagementFeatureEnabled:A,isCheckingCommentingEnabled:y,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:m,handleDrawerToggle:Te,showTreasuryPromo:he,treasuryYieldPercentage:On,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:En,onAskAiCfoClick:vn})]})]}):je&&An?e.jsx(Y,{to:"../setup"}):C.companyZeniAccountInfo?.info&&!je&&Dn?e.jsx(Y,{to:"../promo",state:o.state}):e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const gn=(n,a,o)=>{const t=ke(o,n),{tenantEmailDomain:s}=n;return t===!0||a===!1?`/${s}/bills`:`/${s}/bill/new`},St=(n,a)=>`/${n}/checking/${a}`,yn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,xn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,Cn=n=>`/${n}/checking/express-pay`,It=n=>`/${n}/checking/cash_management`,bt=F.div`
66
66
  display: flex;
67
67
  width: 100%;
68
68
  flex: 1 1 auto;
@@ -70,4 +70,4 @@ import{j as e}from"./liveblocks-B6jAIe9x.js";import{u as L,h as N,i as Q,j as D,
70
70
  align-items: center;
71
71
  min-height: 100vh;
72
72
  background-color: ${n=>n.theme.colors.grey4};
73
- `,jt=W(function(n,a){const{currentTenant:o}=a,t=on(n,a.accountId),s=I.getSignedInUser(),r=n.tenantState.currentTenantId,c={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r??""},d=t.accountDetail?.id??"";return{currentTenantCompanyName:o.companyName??"",authParams:c,downloadEndPoint:`${Ie.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${d}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}},function(n,a){const{navigate:o,currentTenant:t,location:s,accountId:r}=a,{tenantEmailDomain:c}=t;return{handleMoveMoneyOptionSelection:(d,u)=>{let f="page-not-found";d==="sendMoney"?f=Cn(c):d==="payBill"?f=gn(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):d==="transfer"?(f=yn(c,r),u!=null&&n(sn(u))):d==="checkDeposit"?(f=xn(c,r),u!=null&&n(Aa(u))):d==="accountStatement"&&(f=vt(c,r));const w=de(s.state?.pathnameStackToGoBack,s.pathname);o(f,{state:{pathnameStackToGoBack:w}})},onAccountDetailClick:()=>{const d=Et(c,r),u=de(s.state?.pathnameStackToGoBack,s.pathname);o(d,{state:{pathnameStackToGoBack:u}})},onEditNameClick:d=>{n(Le(r,"editName",d))},onReloadZeniAccountDetailPage:()=>{n(rn(r,!1))},onCloseAccountClick:()=>{n(Le(r,"closeAccount",""))},onBackClick:()=>{o("../",{relative:"path"})}}})($a);function le({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:o}){const t=X(),s=N(),r=L(),c=z(),{tenantEmailDomain:d,accountId:u}=Q(),{useDynamicConfig:f}=H(),{useFeatureGate:w}=H(),{isFeatureEnabled:i}=w(P.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=w(P.isCheckingCommentingEnabled),m=D(q=>M(q)),{configValue:y}=f(K.expressPayConfig),A=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(m.tenantId),b=!!m.companyBillPayInfo?.info?.isBillPayEnabled,C=I.getSignedInUser(),k=m.companyId??I.getSignedInUserTenant(d)?.companyId,g={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:m.tenantId??""},j=`${Se}/account_details`,[T,x]=p.useState(!1),[B,V]=p.useState(!1),[R,U]=p.useState(!1),[v,E]=p.useState(!1),S=D(q=>on(q,u??"")),G=S.fetchState,{isAiCfoAccessEnabled:ae,onAskAiCfoClick:re}=pn({mobileExploreReferrer:"Checking Account Detail"});ln({isDataReady:G==="Completed"}),p.useEffect(()=>{T||(r(rn(u??"",!1)),x(!0))},[T,r,G]),p.useEffect(()=>{E(o!=null&&o===!0)},[o]),p.useEffect(()=>{n!=null&&n===!0?V(!0):(V(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{U(a!=null&&a===!0)},[a]);const te=()=>{E(!1),s("..")};return e.jsxs(e.Fragment,{children:[v===!0&&S.accountDetail!=null?e.jsx(ft,{authParams:g,downloadAccountDetailEndPoint:j,closeDrawerHandler:te,isAccountInfoDrawerOpen:v,zeniBankAccountDetail:S.accountDetail}):null,B===!0?e.jsx(fn,{closeDrawerHandler:te,isTransferDrawerOpen:B,zeniAccountsConfig:S.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:j}):null,R===!0?e.jsx(hn,{closeDrawerHandler:te,isCheckDepositDrawerOpen:R}):null,e.jsx(bt,{windowSize:c,children:e.jsx(jt,{navigate:s,currentTenant:m,location:t,companyId:k,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:b,isCheckingCommentingEnabled:l,isExpressPayEnabled:A,isAiCfoAccessEnabled:ae,onAskAiCfoClick:re})})]})}const Et=(n,a)=>`/${n}/checking/${a}/account-info`,vt=(n,a)=>`/${n}/checking/${a}/statements`,Pt=W(function(n,a){const{companyId:o}=a;return{zeniAccountSetupView:Da(n,o),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(n,a){const{navigate:o,companyId:t}=a;return{onSetupButtonClick:()=>{_.trackAccountsPromoPageClicked("Setup Accounts"),n(ka(t))},onBackClick:()=>{o("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{o("../setup",{relative:"path"})}}})(Ga),Tt=()=>{const n=N(),a=X(),{tenantEmailDomain:o}=Q(),{useDynamicConfig:t}=H(),s=$(),[r,c]=p.useState(!1),[d,u]=p.useState(!1),f=D(g=>M(g)),{configValue:w}=t(K.zeniAccountsConfig),i=Ae(w);p.useEffect(()=>{d===!1&&a.state?.message==="activation"&&u(!0)},[a.state]);const l=I.getSignedInUserTenant(o)?.companyId??f.companyId,m=I.getSignedInUser(),y=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,A=g=>{c(g)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const b=oe(),C=se(b?.loggedInUserRoleMap),k=De(b?.loggedInUserRoleMap);if(y&&C)return e.jsx(Y,{to:"../../checking/setup"});if(f.company?.companyZeniAccountInfo&&(!y&&C||k)){if(a.state?.message==="activation"){const g=cn(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(Va,{showConfetti:d}),e.jsx(me,{analytics:_,onLoad:g=>(j=>j.trackPageLoaded(be.Event.accountsPromoPageViewed))(g)}),e.jsx(he,{isAppContentDrawerOpen:r,handleDrawerToggle:A}),e.jsx(Pt,{analytics:_,navigate:n,companyId:l,onClickMenuIcon:()=>{A(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5}})};function rs(){const n=X(),a=D(ae=>M(ae)),o=$(),{useFeatureGate:t,useDynamicConfig:s}=H(),r=oe(),c=se(r?.loggedInUserRoleMap),d=De(r?.loggedInUserRoleMap),u=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,f=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:w}=t(P.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=t(P.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=t(P.isTreasuryEnabled),m=tn(a),y=ke(i,a),A=a?.userRole!=null&&Sa(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!A)&&Ia(r?.loggedInUserRoleMap),C=ba(r?.loggedInUserRoleMap),k=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!A)&&ja(r?.loggedInUserRoleMap),{isFeatureEnabled:g}=t(P.isDepositAccountsFeatureEnabled),j=g&&!A,{configValue:T}=s(K.expressPayConfig),x=T.is_enable_all_tenants===!0||T.tenant_ids!=null&&T.tenant_ids.includes(a.tenantId),{isFeatureEnabled:B}=t(P.isAutoTransferRuleEnabled),V=a.company!=null&&we(a.company),R=l&&V===!0&&!A,{isFeatureEnabled:U}=t(P.isCashManagementFeatureEnabled),v=Za(a,w,i)&&!A&&Ea(r?.loggedInUserRoleMap),E=va(r?.loggedInUserRoleMap),S=j&&se(r?.loggedInUserRoleMap),G=S||We(r?.loggedInUserRoleMap);return e.jsxs(Ve,{children:[e.jsx(h,{path:"setup",element:e.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:C,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:S,isChargeCardAdminLevelAccess:v,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),e.jsx(h,{path:"verification",element:e.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:C,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:S,isChargeCardAdminLevelAccess:v,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),B?e.jsxs(e.Fragment,{children:[e.jsx(h,{path:"auto-transfer",element:e.jsx($e,{})}),G?e.jsx(h,{path:"auto-transfer/:ruleId/edit",element:e.jsx($e,{isEditDrawerOpen:!0})}):null]}):e.jsx(h,{path:"auto-transfer",element:e.jsx(Z,{})}),U&&u&&R?e.jsxs(e.Fragment,{children:[e.jsx(h,{path:"cash_management",element:e.jsx(ie,{})}),B?e.jsxs(e.Fragment,{children:[e.jsx(h,{path:"cash_management/auto-transfer",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0})}),G?e.jsxs(e.Fragment,{children:[e.jsx(h,{path:"cash_management/auto-transfer/:ruleId/edit",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})}),e.jsx(h,{path:"cash_management/:ruleId/edit",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})})]}):null]}):e.jsx(h,{path:"cash_management/auto-transfer",element:e.jsx(Z,{})}),e.jsx(h,{path:"cash_management/auto_sweep",element:e.jsx(Ja,{})})]}):e.jsxs(e.Fragment,{children:[e.jsx(h,{path:"cash_management",element:e.jsx(Z,{})}),e.jsx(h,{path:"cash_management/auto-transfer",element:e.jsx(Z,{})}),e.jsx(h,{path:"cash_management/auto_sweep",element:e.jsx(Z,{})})]}),x&&c?e.jsxs(e.Fragment,{children:[e.jsx(h,{path:"express-pay",element:e.jsx(ce,{})}),e.jsx(h,{path:"express-pay/add-ach",element:e.jsx(ce,{isAddACHDrawerOpen:!0})}),e.jsx(h,{path:"express-pay/add-wire/add-address",element:e.jsx(ce,{isAddAddressDrawerOpen:!0})}),e.jsx(h,{path:"express-pay/add-wire",element:e.jsx(ce,{isAddWireDrawerOpen:!0})})]}):e.jsx(h,{path:"express-pay",element:e.jsx(Z,{})}),e.jsx(h,{path:"promo",element:e.jsx(Tt,{})}),m&&!y?e.jsx(h,{path:"/*",element:e.jsx(un,{})}):u?e.jsxs(e.Fragment,{children:[e.jsx(h,{path:"/",element:e.jsx(Ce,{})}),e.jsx(h,{path:"transfer",element:e.jsx(Ce,{isTransferDrawerOpen:!0})}),e.jsx(h,{path:"check-deposit",element:e.jsx(Ce,{isCheckDepositDrawerOpen:!0})}),e.jsx(h,{path:":accountId/*",element:e.jsx(Bt,{})}),e.jsx(h,{path:"*",element:e.jsx(Z,{})})]}):f&&c?e.jsx(h,{path:"*",element:e.jsx(Y,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&d?e.jsx(h,{path:"*",element:e.jsx(Y,{to:"../promo",state:n.state})}):e.jsx(h,{path:"*",element:e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5,boxShadow:`0px 2px ${Ha.sp1} ${o.colors.dropShadowNormal}`}})})]})}function Bt(){return e.jsxs(Ve,{children:[e.jsx(h,{path:"/",element:e.jsx(le,{})}),e.jsx(h,{path:"account-info",element:e.jsx(le,{isAccountInfoDrawerOpen:!0})}),e.jsx(h,{path:"transfer",element:e.jsx(le,{isTransferDrawerOpen:!0})}),e.jsx(h,{path:"check-deposit",element:e.jsx(le,{isCheckDepositDrawerOpen:!0})}),e.jsx(h,{path:"statements",element:e.jsx(Ya,{})}),e.jsx(h,{path:"*",element:e.jsx(Z,{})})]})}export{rs as default};
73
+ `,jt=W(function(n,a){const{currentTenant:o}=a,t=on(n,a.accountId),s=I.getSignedInUser(),r=n.tenantState.currentTenantId,c={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r??""},d=t.accountDetail?.id??"";return{currentTenantCompanyName:o.companyName??"",authParams:c,downloadEndPoint:`${Ie.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${d}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}},function(n,a){const{navigate:o,currentTenant:t,location:s,accountId:r}=a,{tenantEmailDomain:c}=t;return{handleMoveMoneyOptionSelection:(d,u)=>{let h="page-not-found";d==="sendMoney"?h=Cn(c):d==="payBill"?h=gn(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):d==="transfer"?(h=yn(c,r),u!=null&&n(sn(u))):d==="checkDeposit"?(h=xn(c,r),u!=null&&n(Aa(u))):d==="accountStatement"&&(h=vt(c,r));const w=de(s.state?.pathnameStackToGoBack,s.pathname);o(h,{state:{pathnameStackToGoBack:w}})},onAccountDetailClick:()=>{const d=Et(c,r),u=de(s.state?.pathnameStackToGoBack,s.pathname);o(d,{state:{pathnameStackToGoBack:u}})},onEditNameClick:d=>{n(Le(r,"editName",d))},onReloadZeniAccountDetailPage:()=>{n(rn(r,!1))},onCloseAccountClick:()=>{n(Le(r,"closeAccount",""))},onBackClick:()=>{o("../",{relative:"path"})}}})($a);function le({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:o}){const t=X(),s=N(),r=L(),c=z(),{tenantEmailDomain:d,accountId:u}=Q(),{useDynamicConfig:h}=H(),{useFeatureGate:w}=H(),{isFeatureEnabled:i}=w(P.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=w(P.isCheckingCommentingEnabled),m=D(q=>M(q)),{configValue:y}=h(K.expressPayConfig),A=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(m.tenantId),b=!!m.companyBillPayInfo?.info?.isBillPayEnabled,C=I.getSignedInUser(),k=m.companyId??I.getSignedInUserTenant(d)?.companyId,g={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:m.tenantId??""},j=`${Se}/account_details`,[T,x]=p.useState(!1),[B,V]=p.useState(!1),[R,U]=p.useState(!1),[v,E]=p.useState(!1),S=D(q=>on(q,u??"")),G=S.fetchState,{isAiCfoAccessEnabled:ae,onAskAiCfoClick:re}=pn({mobileExploreReferrer:"Checking Account Detail"});ln({isDataReady:G==="Completed"}),p.useEffect(()=>{T||(r(rn(u??"",!1)),x(!0))},[T,r,G]),p.useEffect(()=>{E(o!=null&&o===!0)},[o]),p.useEffect(()=>{n!=null&&n===!0?V(!0):(V(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{U(a!=null&&a===!0)},[a]);const te=()=>{E(!1),s("..")};return e.jsxs(e.Fragment,{children:[v===!0&&S.accountDetail!=null?e.jsx(ht,{authParams:g,downloadAccountDetailEndPoint:j,closeDrawerHandler:te,isAccountInfoDrawerOpen:v,zeniBankAccountDetail:S.accountDetail}):null,B===!0?e.jsx(hn,{closeDrawerHandler:te,isTransferDrawerOpen:B,zeniAccountsConfig:S.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:j}):null,R===!0?e.jsx(fn,{closeDrawerHandler:te,isCheckDepositDrawerOpen:R}):null,e.jsx(bt,{windowSize:c,children:e.jsx(jt,{navigate:s,currentTenant:m,location:t,companyId:k,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:b,isCheckingCommentingEnabled:l,isExpressPayEnabled:A,isAiCfoAccessEnabled:ae,onAskAiCfoClick:re})})]})}const Et=(n,a)=>`/${n}/checking/${a}/account-info`,vt=(n,a)=>`/${n}/checking/${a}/statements`,Pt=W(function(n,a){const{companyId:o}=a;return{zeniAccountSetupView:Da(n,o),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(n,a){const{navigate:o,companyId:t}=a;return{onSetupButtonClick:()=>{_.trackAccountsPromoPageClicked("Setup Accounts"),n(ka(t))},onBackClick:()=>{o("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{o("../setup",{relative:"path"})}}})(Ga),Tt=()=>{const n=N(),a=X(),{tenantEmailDomain:o}=Q(),{useDynamicConfig:t}=H(),s=$(),[r,c]=p.useState(!1),[d,u]=p.useState(!1),h=D(g=>M(g)),{configValue:w}=t(K.zeniAccountsConfig),i=Ae(w);p.useEffect(()=>{d===!1&&a.state?.message==="activation"&&u(!0)},[a.state]);const l=I.getSignedInUserTenant(o)?.companyId??h.companyId,m=I.getSignedInUser(),y=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,A=g=>{c(g)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const b=oe(),C=se(b?.loggedInUserRoleMap),k=De(b?.loggedInUserRoleMap);if(y&&C)return e.jsx(Y,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!y&&C||k)){if(a.state?.message==="activation"){const g=cn(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(Va,{showConfetti:d}),e.jsx(me,{analytics:_,onLoad:g=>(j=>j.trackPageLoaded(be.Event.accountsPromoPageViewed))(g)}),e.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:A}),e.jsx(Pt,{analytics:_,navigate:n,companyId:l,onClickMenuIcon:()=>{A(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5}})};function rs(){const n=X(),a=D(ae=>M(ae)),o=$(),{useFeatureGate:t,useDynamicConfig:s}=H(),r=oe(),c=se(r?.loggedInUserRoleMap),d=De(r?.loggedInUserRoleMap),u=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:w}=t(P.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=t(P.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=t(P.isTreasuryEnabled),m=tn(a),y=ke(i,a),A=a?.userRole!=null&&Sa(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!A)&&Ia(r?.loggedInUserRoleMap),C=ba(r?.loggedInUserRoleMap),k=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!A)&&ja(r?.loggedInUserRoleMap),{isFeatureEnabled:g}=t(P.isDepositAccountsFeatureEnabled),j=g&&!A,{configValue:T}=s(K.expressPayConfig),x=T.is_enable_all_tenants===!0||T.tenant_ids!=null&&T.tenant_ids.includes(a.tenantId),{isFeatureEnabled:B}=t(P.isAutoTransferRuleEnabled),V=a.company!=null&&we(a.company),R=l&&V===!0&&!A,{isFeatureEnabled:U}=t(P.isCashManagementFeatureEnabled),v=Za(a,w,i)&&!A&&Ea(r?.loggedInUserRoleMap),E=va(r?.loggedInUserRoleMap),S=j&&se(r?.loggedInUserRoleMap),G=S||We(r?.loggedInUserRoleMap);return e.jsxs(Ve,{children:[e.jsx(f,{path:"setup",element:e.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:C,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:S,isChargeCardAdminLevelAccess:v,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),e.jsx(f,{path:"verification",element:e.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:C,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:S,isChargeCardAdminLevelAccess:v,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),B?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"auto-transfer",element:e.jsx($e,{})}),G?e.jsx(f,{path:"auto-transfer/:ruleId/edit",element:e.jsx($e,{isEditDrawerOpen:!0})}):null]}):e.jsx(f,{path:"auto-transfer",element:e.jsx(Z,{})}),U&&u&&R?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management",element:e.jsx(ie,{})}),B?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0})}),G?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management/auto-transfer/:ruleId/edit",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})}),e.jsx(f,{path:"cash_management/:ruleId/edit",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})})]}):null]}):e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(Z,{})}),e.jsx(f,{path:"cash_management/auto_sweep",element:e.jsx(Ja,{})})]}):e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management",element:e.jsx(Z,{})}),e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(Z,{})}),e.jsx(f,{path:"cash_management/auto_sweep",element:e.jsx(Z,{})})]}),x&&c?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"express-pay",element:e.jsx(ce,{})}),e.jsx(f,{path:"express-pay/add-ach",element:e.jsx(ce,{isAddACHDrawerOpen:!0})}),e.jsx(f,{path:"express-pay/add-wire/add-address",element:e.jsx(ce,{isAddAddressDrawerOpen:!0})}),e.jsx(f,{path:"express-pay/add-wire",element:e.jsx(ce,{isAddWireDrawerOpen:!0})})]}):e.jsx(f,{path:"express-pay",element:e.jsx(Z,{})}),e.jsx(f,{path:"promo",element:e.jsx(Tt,{})}),m&&!y?e.jsx(f,{path:"/*",element:e.jsx(un,{})}):u?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"/",element:e.jsx(Ce,{})}),e.jsx(f,{path:"transfer",element:e.jsx(Ce,{isTransferDrawerOpen:!0})}),e.jsx(f,{path:"check-deposit",element:e.jsx(Ce,{isCheckDepositDrawerOpen:!0})}),e.jsx(f,{path:":accountId/*",element:e.jsx(Bt,{})}),e.jsx(f,{path:"*",element:e.jsx(Z,{})})]}):h&&c?e.jsx(f,{path:"*",element:e.jsx(Y,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&d?e.jsx(f,{path:"*",element:e.jsx(Y,{to:"../promo",state:n.state})}):e.jsx(f,{path:"*",element:e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5,boxShadow:`0px 2px ${Ha.sp1} ${o.colors.dropShadowNormal}`}})})]})}function Bt(){return e.jsxs(Ve,{children:[e.jsx(f,{path:"/",element:e.jsx(le,{})}),e.jsx(f,{path:"account-info",element:e.jsx(le,{isAccountInfoDrawerOpen:!0})}),e.jsx(f,{path:"transfer",element:e.jsx(le,{isTransferDrawerOpen:!0})}),e.jsx(f,{path:"check-deposit",element:e.jsx(le,{isCheckDepositDrawerOpen:!0})}),e.jsx(f,{path:"statements",element:e.jsx(Ya,{})}),e.jsx(f,{path:"*",element:e.jsx(Z,{})})]})}export{rs as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-BLlSTcoD.js";import{a as f}from"./sentry-D_xp3E3Q.js";import{h as x,u as B,g as $,i as j,j as p}from"./core-CbpoBsNm.js";import{KR as s,KQ as v,R7 as C,eW as T,R8 as z}from"./zeni-epic-state-CkeDRiud.js";import{K as D,at as g,m as E,z as L,B as P,cd as N,p as R}from"./index-aZImxzjX.js";import{n as _}from"./mui-DcNGd9L2.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]="325650bc-5163-4ed2-8ed7-72f7202602e2",e._sentryDebugIdIdentifier="sentry-dbid-325650bc-5163-4ed2-8ed7-72f7202602e2")}catch{}})();const K=_.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 W(){const e=x(),n=B(),d=D(),l=$();let{accountId:a}=j(),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,h]=f.useState(!1),y=E();f.useEffect(()=>{u||(h(!0),n(v(a??"",!1)))},[u,n]);const o=p(t=>C(t,a??"")),I=()=>{const t=R(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),c=p(t=>T(t)),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=z(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(K,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:m})})}export{W as Z};
@@ -1 +1 @@
1
- import"./sentry-95bdnR3R.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};
1
+ import"./sentry-D_xp3E3Q.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};