@zeniai/web-app-ui 5.0.77-dev → 5.0.78-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/dist/assets/AddressRoutes-BhkbfnzS.js +1 -0
  2. package/dist/assets/AddressScreen-BmR-OoZ_.js +9 -0
  3. package/dist/assets/{AiCfoScreen-DbYSFoNw.js → AiCfoScreen-C8ZpEKvV.js} +5 -5
  4. package/dist/assets/BillPayApprovalRoutes-CzEk_nhg.js +1 -0
  5. package/dist/assets/{BillPayRoutes-CFin72Sd.js → BillPayRoutes-BYOQqAtg.js} +28 -28
  6. package/dist/assets/BusinessVerificationPageScreen-DsFRoHnS.js +9 -0
  7. package/dist/assets/{ChargeCardRoutes-BqilxZnu.js → ChargeCardRoutes-UrbQPmqH.js} +8 -8
  8. package/dist/assets/{CompanyPassportScreen-Btm8q2XT.js → CompanyPassportScreen-DfcahYi3.js} +1 -1
  9. package/dist/assets/ConnectionAuthScreen-KRY6Oem5.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-CtDlGb6t.js +1 -0
  11. package/dist/assets/CustomerOnboardingRoutes-ClmI94EA.js +23 -0
  12. package/dist/assets/{DashboardRoutes-Dr7E3H8N.js → DashboardRoutes-D6LkoAS1.js} +4 -4
  13. package/dist/assets/{DefaultTenantHome-BmA8DcRx.js → DefaultTenantHome-C_HBx_e-.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-loJ8GquO.js +18 -0
  15. package/dist/assets/{DrawerScreen-AH0ysY6V.js → DrawerScreen-sfY6PIZF.js} +1 -1
  16. package/dist/assets/EntityDetailRoutes-DzARLOVe.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-BhbZS8a1.js → ExpenseAutomationRoutes-mHXp4ejt.js} +5 -5
  18. package/dist/assets/FeaturePreviewScreen-BbijPpnJ.js +1 -0
  19. package/dist/assets/HubSpotOAuthCallbackScreen-Cqm6jDxt.js +1 -0
  20. package/dist/assets/{MagicLinkRoutes-jZeMo5Ui.js → MagicLinkRoutes-DOskkrWK.js} +7 -7
  21. package/dist/assets/MagicLinkSignInScreen-CRHf1Pq5.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-CNxBiA0K.js → MobileAppDrawer-DrdSJdo1.js} +1 -1
  23. package/dist/assets/NotFoundScreen-C5GqrkuK.js +1 -0
  24. package/dist/assets/NotificationRoutes-2PbblZyO.js +1 -0
  25. package/dist/assets/OAuthConsentScreen-BJ1rRrOX.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-C-wtMSOq.js +1 -0
  27. package/dist/assets/PeopleRoutes-DW6v38OQ.js +22 -0
  28. package/dist/assets/PerformanceRoutes-SuLEsbMN.js +1 -0
  29. package/dist/assets/{Preview-B7yw63qf.js → Preview-TxzQXr3i.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-BRrDd8wr.js → QBOConnectionScreen-BCkDW1I6.js} +1 -1
  31. package/dist/assets/ReferralListScreen-DYfKAeQl.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-B6agiTbB.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CtZbBICM.js → ReimbursementApprovalRuleDetailScreen-O71vUBoF.js} +1 -1
  34. package/dist/assets/ReimbursementRoutes-D5zdl8gM.js +68 -0
  35. package/dist/assets/ReportsRoutes-BDvJqZZF.js +1 -0
  36. package/dist/assets/RewardsRoutes-CrQQoiRC.js +1 -0
  37. package/dist/assets/ScreenRoutes-DCX1O3Md.js +2 -0
  38. package/dist/assets/{SettingsRoutes-Dr2cLQZf.js → SettingsRoutes-88kae7-O.js} +7 -7
  39. package/dist/assets/{SetupPagesScreen-BMUAJOjI.js → SetupPagesScreen-Ccazxtke.js} +5 -5
  40. package/dist/assets/SignInScreen-mIfi177N.js +1 -0
  41. package/dist/assets/SignOutScreen-DIeOz12t.js +9 -0
  42. package/dist/assets/{TaskListScreen-DdoFZv0I.js → TaskListScreen-BfyHzekg.js} +2 -2
  43. package/dist/assets/TaskRoutes-Bmq0PDng.js +9 -0
  44. package/dist/assets/TransactionDetailRoutes-CALv3lzc.js +1 -0
  45. package/dist/assets/{TransactionDetailScreen--PMkud8g.js → TransactionDetailScreen-DVUrpN27.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-quiJ_wNs.js → TransactionListRoutes-ZGPTqV4b.js} +1 -1
  47. package/dist/assets/TreasuryRoutes-mN-Tiy6z.js +37 -0
  48. package/dist/assets/{VendorsRoutes-DJYa05bm.js → VendorsRoutes-Cx_ts7OM.js} +28 -28
  49. package/dist/assets/WiseConfirmationScreen-BVKaZUB7.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-CpYvVE1u.js → ZeniAccountRoutes-DLsDt2CE.js} +12 -12
  51. package/dist/assets/ZeniAccountStatementScreen-z63ZBClm.js +9 -0
  52. package/dist/assets/{accountMappingHelper-D6x0RpVY.js → accountMappingHelper-DpGnVAea.js} +1 -1
  53. package/dist/assets/{analytics-CgRNtlDm.js → analytics-Dwe2jubl.js} +1 -1
  54. package/dist/assets/{analyticsHelper-DhD4YoYg.js → analyticsHelper-VfNEEHsS.js} +1 -1
  55. package/dist/assets/{core-uYqCzel8.js → core-XIdi9yav.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-DCnYf30M.js → decodeURIComponentSafe-CqshbMyv.js} +1 -1
  57. package/dist/assets/{dnd-BSWou54V.js → dnd-C8_bqxJQ.js} +1 -1
  58. package/dist/assets/{empty-CKinwWZY.js → empty-CP3zMx39.js} +1 -1
  59. package/dist/assets/{empty-BFCAZWzA.js → empty-CwZgS-VN.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-E29-Nor3.js → emptyVideoElement-BnCGoR33.js} +1 -1
  61. package/dist/assets/epic-Bd7YYQOZ.js +2 -0
  62. package/dist/assets/getLocaleForTenant-CJ_gALMc.js +1 -0
  63. package/dist/assets/{index-CeZ7L-BQ.js → index-BFHwjIZ6.js} +12640 -12668
  64. package/dist/assets/{index-8d_FSGLw.js → index-BGt9CQn-.js} +1 -1
  65. package/dist/assets/{index-BsLHs9Ab.js → index-BuT_Em2K.js} +1 -1
  66. package/dist/assets/{index-DWPRup5s.js → index-BwOJsH8g.js} +1 -1
  67. package/dist/assets/{index-Dl7Wgss6.js → index-C5MHMUJX.js} +1 -1
  68. package/dist/assets/{index-F3uqdkEv.js → index-CT8IgTpZ.js} +2 -2
  69. package/dist/assets/{index-DeBaxB_L.js → index-DZp35-bi.js} +1 -1
  70. package/dist/assets/{index-CxWCBC6O.js → index-hYoHMc0Z.js} +1 -1
  71. package/dist/assets/{lexical-DbCoEckm.js → lexical-L3dbahzM.js} +1 -1
  72. package/dist/assets/{liveblocks-CfCKAQeM.js → liveblocks-BTKJAzKw.js} +1 -1
  73. package/dist/assets/{lottie-Dc_IH0fS.js → lottie-B4nk2ufU.js} +1 -1
  74. package/dist/assets/{mui-CTbUXhla.js → mui-D-cfPqvW.js} +1 -1
  75. package/dist/assets/{pathToGoBack-Y7yporNq.js → pathToGoBack-CEbHtWH4.js} +1 -1
  76. package/dist/assets/{pdf-lib-CNgiyR2K.js → pdf-lib-DNtyO1c9.js} +1 -1
  77. package/dist/assets/{pdf-O9N1jd2N.js → pdf-vaniLLX-.js} +3 -3
  78. package/dist/assets/{plaid-Bio3MiLm.js → plaid-_FJLoBl-.js} +1 -1
  79. package/dist/assets/{pusher--jGYOMJ8.js → pusher-DxLcqjAa.js} +1 -1
  80. package/dist/assets/{react-BYbqG6ZW.js → react-AWyiT1J_.js} +1 -1
  81. package/dist/assets/{react-D9RjhqSo.js → react-B6KkVX_w.js} +1 -1
  82. package/dist/assets/{react-BaqpebX1.js → react-BDdVRErx.js} +1 -1
  83. package/dist/assets/{react-KPWjcD7D.js → react-CZ7HzwCB.js} +1 -1
  84. package/dist/assets/{react-kWXzqyUF.js → react-DW2dmFYn.js} +1 -1
  85. package/dist/assets/{react-DqfAPb7w.js → react-PsEdw6eg.js} +1 -1
  86. package/dist/assets/{recharts-BUFoogHS.js → recharts-Db9qTggV.js} +1 -1
  87. package/dist/assets/{routePaths-vUmlDccC.js → routePaths-DYhINZNz.js} +1 -1
  88. package/dist/assets/{sentry-131ydzJg.js → sentry-BidZRtdZ.js} +1 -1
  89. package/dist/assets/{url-BRm_J7V6.js → url-B1tfhvRN.js} +1 -1
  90. package/dist/assets/{url-DlWfObPw.js → url-CX5VwIV_.js} +1 -1
  91. package/dist/assets/useAskAiCfoHostNavButtonProps-DvEC_Rfy.js +1 -0
  92. package/dist/assets/{useDeviceId-CBU-vDdN.js → useDeviceId-rJ9quQG0.js} +1 -1
  93. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js → useFetchSuggestedQuestionsWhenReady-BXeQAqTk.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-cRvS9PIT.js → useInitialThreadRequest-1r6joKrr.js} +1 -1
  95. package/dist/assets/{utils-BkkIzijx.js → utils-DDxx6oUt.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-BS7S2wn5.js → withTransactionSidePanel-_oROnP2L.js} +3 -3
  97. package/dist/assets/{zeni-epic-state-BmAPZlsC.js → zeni-epic-state-znLEvSss.js} +6 -6
  98. package/dist/index.html +1 -1
  99. package/package.json +4 -4
  100. package/dist/assets/AddressRoutes-Clm_yxMo.js +0 -1
  101. package/dist/assets/AddressScreen-ByYpZmgQ.js +0 -9
  102. package/dist/assets/BillPayApprovalRoutes-CX2-tB9Z.js +0 -1
  103. package/dist/assets/BusinessVerificationPageScreen-C-d6e6xJ.js +0 -9
  104. package/dist/assets/ConnectionAuthScreen-B3NEPge1.js +0 -11
  105. package/dist/assets/CustomerOnboardingAuthScreen-BP98cwHW.js +0 -1
  106. package/dist/assets/CustomerOnboardingRoutes-Cx10OoO6.js +0 -23
  107. package/dist/assets/DomesticWireDetailScreen-CzSUYZwn.js +0 -18
  108. package/dist/assets/EntityDetailRoutes-DVGIBaLz.js +0 -1
  109. package/dist/assets/FeaturePreviewScreen-DPxCLrsp.js +0 -1
  110. package/dist/assets/HubSpotOAuthCallbackScreen-BvqLZI0N.js +0 -1
  111. package/dist/assets/MagicLinkSignInScreen-PJSTdmbN.js +0 -12
  112. package/dist/assets/NotFoundScreen-CsEhUGfR.js +0 -1
  113. package/dist/assets/NotificationRoutes-9IJgVYJ1.js +0 -1
  114. package/dist/assets/OAuthConsentScreen-1ZY7Ls_k.js +0 -1
  115. package/dist/assets/PandLWithForecastRoutes-8SC0GJZW.js +0 -1
  116. package/dist/assets/PeopleRoutes-DQ3Y767r.js +0 -22
  117. package/dist/assets/PerformanceRoutes-BZb18QS3.js +0 -1
  118. package/dist/assets/ReferralListScreen-DWAGGjua.js +0 -5
  119. package/dist/assets/ReimbursementApprovalRoutes-DSgEFO1H.js +0 -1
  120. package/dist/assets/ReimbursementRoutes-Iavqnxfs.js +0 -68
  121. package/dist/assets/ReportsRoutes-CjoIF9EB.js +0 -1
  122. package/dist/assets/RewardsRoutes-CTiffYxG.js +0 -1
  123. package/dist/assets/ScreenRoutes-zUtLUY3P.js +0 -2
  124. package/dist/assets/SignInScreen-BO8V1s1B.js +0 -1
  125. package/dist/assets/SignOutScreen-B1QfOGXO.js +0 -9
  126. package/dist/assets/TaskRoutes-DR1BBqXQ.js +0 -9
  127. package/dist/assets/TransactionDetailRoutes-DLkTkOiV.js +0 -1
  128. package/dist/assets/TreasuryRoutes-BVcC0j-i.js +0 -37
  129. package/dist/assets/WiseConfirmationScreen-CTaGbwbB.js +0 -12
  130. package/dist/assets/ZeniAccountStatementScreen-C8feQjoH.js +0 -9
  131. package/dist/assets/epic-dPIWYPli.js +0 -2
  132. package/dist/assets/getLocaleForTenant-CFQN8jbL.js +0 -1
  133. package/dist/assets/useAskAiCfoHostNavButtonProps-D4_eEE1f.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-CfCKAQeM.js";import{j as Q,u as Y,h as X,l as G,g as w,N as j,k as W,q as Ye}from"./core-uYqCzel8.js";import{bF as Xe,cl as Ie,N6 as ye,eQ as F,cx as en,xR as Z,xG as nn,Ni as tn,Nl as an,q9 as ee,pZ as ne,ka as te,sf as z,Nn as Ae,fC as $e,fB as Ge,fA as We,No as sn,x_ as on,BR as ke,BI as _e,BF as ve,Bw as K,BL as Pe,BO as we,BU as Ee,sJ as De,fR as cn,cs as rn,eW as un,eU as dn,eV as ln,bs as pn,Np as mn,Ay as le,Ba as yn,Nq as fn,bG as gn,D5 as pe,C9 as Sn,Nr as bn,Ns as hn,D9 as Cn,Dd as In,s8 as An,Hx as kn,DK as Ce,ED as me,Nt as _n,Nu as vn,Nv as Pn,Nw as qe,Nx as wn,K0 as En,Mv as Dn,Kc as Tn,Ny as He,Nz as xe,DY as Ke,ki as Un,q0 as Je,sh as On,bE as Ne,st as je,cv as Bn,NA as Qe,fe as xn,Ds as Fn,Dw as Vn,NB as Nn,DN as Re,NC as jn,ND as Rn,NE as zn,NF as Ln,fK as Mn,z9 as Zn,NG as $n,ze as Gn,zd as Wn}from"./zeni-epic-state-BmAPZlsC.js";import{c as ae,y as ie,S as de,m as Te,aK as J,z as D,A as se,d as E,x as Ue,f as $,bq as qn,aq as oe,br as V,bs as Hn,bt as Kn,ac as Ve,bu as Jn,q as ze,ar as Le,Z as Qn,G as Yn,bv as Xn,bw as et,bx as nt,a3 as tt}from"./index-CeZ7L-BQ.js";import{a as C}from"./sentry-131ydzJg.js";import{n as Fe,D as at,S as it}from"./mui-CTbUXhla.js";import{M as fe}from"./MobileAppDrawer-CNxBiA0K.js";import R from"./NotFoundScreen-CsEhUGfR.js";import{a as Me}from"./analyticsHelper-DhD4YoYg.js";import{c as Ze}from"./routePaths-vUmlDccC.js";import{B as Be}from"./BusinessVerificationPageScreen-C-d6e6xJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="2979ee65-4fb2-4e35-a0d7-79a14185295b",e._sentryDebugIdIdentifier="sentry-dbid-2979ee65-4fb2-4e35-a0d7-79a14185295b")}catch{}})();const st=Fe.div`
1
+ import{j as u}from"./liveblocks-BTKJAzKw.js";import{j as X,u as Q,h as Y,l as W,g as E,N as j,k as G,q as Qe}from"./core-XIdi9yav.js";import{bE as Ye,ck as Ie,ML as ye,eO as x,cw as en,xu as Z,xj as nn,MX as tn,M_ as an,pO as ee,pC as ne,k8 as te,rU as z,N0 as Ae,fA as $e,fz as We,fy as Ge,N1 as sn,xD as on,Bu as ke,Bl as _e,Bi as ve,B9 as K,Bo as Pe,Br as Ee,Bx as we,sm as Te,fP as cn,cr as rn,eU as un,eS as dn,eT as ln,bs as pn,N2 as mn,Ab as le,AP as yn,N3 as fn,bF as gn,CK as pe,BO as Sn,N4 as bn,N5 as hn,CO as Cn,CS as In,rN as An,Ha as kn,Dn as Ce,Eg as me,N6 as _n,N7 as vn,N8 as Pn,N9 as He,Na as En,JF as wn,M8 as Tn,JR as Dn,Nb as qe,Nc as Fe,DB as Ke,kg as Un,pF as Je,rW as On,bD as Ne,s6 as je,cu as Bn,Nd as Xe,fc as Fn,D5 as xn,D9 as Vn,Ne as Nn,Dq as Re,Nf as jn,Ng as Rn,Nh as zn,Ni as Ln,fI as Mn,yO as Zn,Nj as $n,yT as Wn,yS as Gn}from"./zeni-epic-state-znLEvSss.js";import{k as ae,y as ie,S as de,m as De,aK as J,z as T,A as se,c as w,B as Ue,e as $,bq as Hn,aq as oe,br as V,bs as qn,bt as Kn,ac as Ve,bu as Jn,r as ze,ar as Le,Z as Xn,G as Qn,bv as Yn,bw as et,bx as nt,a3 as tt}from"./index-BFHwjIZ6.js";import{a as C}from"./sentry-BidZRtdZ.js";import{n as xe,D as at,S as it}from"./mui-D-cfPqvW.js";import{M as fe}from"./MobileAppDrawer-DrdSJdo1.js";import R from"./NotFoundScreen-C5GqrkuK.js";import{a as Me}from"./analyticsHelper-VfNEEHsS.js";import{c as Ze}from"./routePaths-DYhINZNz.js";import{B as Be}from"./BusinessVerificationPageScreen-DsFRoHnS.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="be71a3c4-cfb5-4f64-a782-e413733118b2",e._sentryDebugIdIdentifier="sentry-dbid-be71a3c4-cfb5-4f64-a782-e413733118b2")}catch{}})();const st=xe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as u}from"./liveblocks-CfCKAQeM.js";import{j as Q,u as Y,h as X,l as G,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,ot=W(function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=F(e),n=tn(e),i=D.getSignedInUser(),l=c.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=an(e,a),p=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:E,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Z(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(De("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(Ee(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(we(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e(Z(a,!0))},onEnableBillPayClick:()=>{e(K(a,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"bill_pay","bill_pay_setup"):ve("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(on(a))},onAcceptUpdatedTOSSuccess:()=>{e(Z(a,!0))},onGetOtp:(n,i)=>{e(We(n,"SpendManagementSetup")),i!=null&&e(sn({officerType:i,phone:n}))},onResendOtp:n=>{e(Ge(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(z(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(qn),ct=()=>{const e=Q(),o=Y(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),n=Xe(c?.loggedInUserRoleMap),i=Ie(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:s}=ie(),{isFeatureEnabled:r}=l(de.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(de.isBillPayLocalCurrencyFeatureEnabled),y=Te(),{configValue:I}=s(J.zeniAccountsConfig),d=ye(I),[m,S]=C.useState(!1),v=C.useRef(!1),[g,f]=C.useState(!1),P=w(B=>B.billPaySetupViewState.fetchState),A=w(B=>F(B)),_=w(B=>B.billPaySetupApproverViewState.fetchState),b=A.companyId??D.getSignedInUserTenant(a)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const k=!!A.companyBillPayInfo?.info?.isBillPayTOSAccepted,h=en(c?.loggedInUserRoleMap);C.useEffect(()=>{v.current||P!=="Not-Started"||b==null?v.current||P!=="Completed"||b==null||A.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(v.current=!0,t(Z(b,!1,!0))):(v.current=!0,t(Z(b,!0)))},[P,b,t]),C.useEffect(()=>{g||_!=="Not-Started"||(f(!0),t(nn(!0)))},[g,_,t]);const T=B=>{S(B)};if(k===!1||h&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(k===!0&&c?.loggedInUserRoleMap!=null){const B=U=>U.trackPageLoaded($.Event.billPaySetup);return u.jsxs(st,{children:[u.jsx(se,{analytics:E,onLoad:U=>B(U)}),u.jsx(fe,{isAppContentDrawerOpen:m,handleDrawerToggle:T}),u.jsx(ot,{navigate:e,location:o,companyId:b,currentTenant:A,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{T(!0)},hasZeniAccountsAdminAccess:i,accountsPromoConfig:d,isLocalCurrencyEnabled:p})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},Rt=(e,o)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:o,zt=e=>`/${e}/cards`,Lt=e=>`/${e}/cards/setup`,Mt=e=>`/${e}/cards/onboard`,Zt=(e,o,t,a,c=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return a==null||a.status.code!=="inactive"||a.cardHolderUserId!==t.userId||a.type.code!=="business_physical_credit_card"&&a.type.code!=="business_physical_debit_card"?a!=null&&a.status.code==="active"&&a.cardHolderUserId===t.userId&&a.type.code==="business_physical_credit_card"&&c===!0?n+="/addToWallet":a==null||a.type.code!=="business_physical_debit_card"&&a.type.code!=="business_virtual_debit_card"||a.status.code!=="active"||a.cardHolderUserId!==t.userId||a.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},$t=(e,o)=>e.find(t=>t.id===o),Gt=(e,o,t)=>!e||!o||t.fetchState==="Completed",rt=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Wt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:V(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:V(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:V(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,qt=(e,o,t,a,c)=>e&&o&&t?{creditAccountId:a.id,creditAccountLimit:V(a.limit.amount),creditAccountAvailableAmount:V(a.available.amount),creditAccountSpentAmount:V(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:V(c.remainingAmountDue.amount)}:void 0,Ht=(e,o,t,a,c)=>e&&o&&t?{debitAccountId:a.depositAccounts.map(n=>n.id),debitAccountName:a.depositAccounts.map(n=>n.accountName),debitAccountBalance:a.depositAccounts.map(n=>V(n.accountBalance.available.amount)),debitCardsSpend:V(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map(n=>n.accountStatus)}:void 0,Kt=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:V(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:V(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,Jt=80,Qt=80,ut=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,dt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),Yt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,Xt=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),lt=W(function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,i=F(e),l=D.getSignedInUser(),s=i.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!i.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:E,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:y,businessVerificationStatus:I}=o;return{onBusinessVerificationSectionClick:()=>{E.trackCardsVerifyIdentityCompanyDetailsClick(y,p,I?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},onFetchLinkTokenClick:(d,m)=>{e(De("charge_card_setup",d,m))},onEstablishConnectionClick:d=>{e(Ee(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,m,S)=>{e(we(d,m,"charge_cards","charge_card_setup",S))},onUpdatePaymentAccountLoginStatus:(d,m)=>{e(Pe(!1,d,"charge_cards","charge_card_setup",m))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{E.trackCardsEnableCardsClick(y,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&r===!1?e(K(a,"charge_cards__debit_cards")):l===!0&&s===!1?e(K(a,"charge_cards")):i===!0&&r===!1&&e(K(a,"debit_cards"))},onUpdateChargeCardClick:(d,m,S)=>{const v=n.allBankAccounts.find(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId),g=n.allBankAccounts.find(f=>f.accountId===d);E.trackCardsZeniCashAccountChangeClick(y,p,{oldZeniCashAccount:v?.accountName??"",newZeniCashAccount:g?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId)+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex(f=>f.accountId===d)+1,numberOfCashAccounts:n.allBankAccounts.length}),e(S==="paymentAccount"?_e(d,m,"charge_cards","charge_card_setup"):ve("charge_card_setup",d,m))},onUpdatePrimaryFundingAccount:(d,m)=>{const S=n.allFundingAccounts.find(f=>f.id===d),v=n.allFundingAccounts.findIndex(f=>f.id===n.primaryFundingAccount?.id)+1,g=n.allFundingAccounts.findIndex(f=>f.id===d)+1;E.trackCardsPaymentAccountChangeClick(y,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:V(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:S?.label??"",newPaymentAccountBalance:V(S?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:S?.accType==="depositAccount",oldPaymentAccountPosition:v,newPaymentAccountPosition:g,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(ke(a,"charge_card_setup",d,m))},onEnableChargeCardSuccess:()=>{e(fn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,m)=>{e(Ae({officerType:d,fileIds:m}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(z(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(z(a,d,"charge_cards",!0,!0,!0)):i===!0&&e(z(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(te({files:d}))},onDeleteFile:d=>{e(ne(d))},onEditFileName:(d,m)=>{e(ee(d,m.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(yn(a,d))}}})(Hn),pt=()=>{const e=Q(),o=Y(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),n=w(L=>F(L)),{useDynamicConfig:i,useFeatureGate:l}=ie(),s=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=i(J.zeniAccountsConfig),{configValue:p}=i(J.zeniCardsConfig),y=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:I}=l(de.isDebitCardFeatureEnabled),{isFeatureEnabled:d}=l(de.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=l(de.isEarlyPayFeatureEnabled),S=w(L=>cn(L,n.companyId)),v=rn(S.controllers),g=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,f=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,P=un(I,n),A=ut({isDebitCardFeatureEnabled:I,isBankingOnlyTenant:P}),_=dn(n),b=ln(n),k=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,h=dt({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:d,isBookKeepingTenant:b,isDebitCardProductVisible:A,chargeCardsCreditAccountLimit:k}),T=A&&h===!1,B=A===!1&&h,U=ye(r),x=pn(c?.loggedInUserRoleMap),ce=Ie(c?.loggedInUserRoleMap),[q,ge]=C.useState(!1),[H,re]=C.useState(!1),M=w(L=>L.chargeCardSetupViewState.fetchState),N=D.getSignedInUserTenant(a)?.companyId??n.companyId,O=D.getSignedInUser(),Oe=L=>{ge(L)},Se=w(L=>mn(L,N));if(O==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect(()=>{H||M!=="Not-Started"||N==null?H||M!=="Completed"||N==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(N,!1,!0)):(re(!0),t(le(N,!0)))},[H,M,N,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,he=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=rt(h,A,f,g);return be||he?be||he?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:E,onLoad:()=>{E.trackPageLoaded($.Event.cardsSetupVisited),E.trackCardsCardSetupView(v,ue,s==null?"Cards Setup":s.includes("cards/promo")?"Promo":s.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:q,handleDrawerToggle:Oe}),u.jsx(lt,{autoPayThreshold:y,navigate:e,location:o,companyId:N,currentTenant:n,isEarlyPayEnabled:m,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:he,isUserChargeCardAdmin:x,isDebitCardOnlyEnabled:T,isCreditCardOnlyEnabled:B,chargeCardSetUpView:Se,isCreditCardProductVisible:h,isDebitCardFeatureEnabled:A,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:f,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:v,productInformation:ue,onClickMenuIcon:()=>{Oe(!0)},hasZeniAccountsAdminAccess:ce,accountsPromoConfig:U})]}):u.jsx(Ue,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},mt=Fe.div`
9
+ `,ot=G(function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=x(e),n=tn(e),i=T.getSignedInUser(),l=c.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=an(e,a),p=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:w,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Z(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e(Z(a,!0))},onEnableBillPayClick:()=>{e(K(a,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"bill_pay","bill_pay_setup"):ve("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(on(a))},onAcceptUpdatedTOSSuccess:()=>{e(Z(a,!0))},onGetOtp:(n,i)=>{e(Ge(n,"SpendManagementSetup")),i!=null&&e(sn({officerType:i,phone:n}))},onResendOtp:n=>{e(We(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(z(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Hn),ct=()=>{const e=X(),o=Q(),t=Y(),{tenantEmailDomain:a}=W(),c=ae(),n=Ye(c?.loggedInUserRoleMap),i=Ie(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:s}=ie(),{isFeatureEnabled:r}=l(de.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(de.isBillPayLocalCurrencyFeatureEnabled),y=De(),{configValue:I}=s(J.zeniAccountsConfig),d=ye(I),[m,S]=C.useState(!1),v=C.useRef(!1),[g,f]=C.useState(!1),P=E(B=>B.billPaySetupViewState.fetchState),A=E(B=>x(B)),_=E(B=>B.billPaySetupApproverViewState.fetchState),b=A.companyId??T.getSignedInUserTenant(a)?.companyId;if(T.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const k=!!A.companyBillPayInfo?.info?.isBillPayTOSAccepted,h=en(c?.loggedInUserRoleMap);C.useEffect(()=>{v.current||P!=="Not-Started"||b==null?v.current||P!=="Completed"||b==null||A.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(v.current=!0,t(Z(b,!1,!0))):(v.current=!0,t(Z(b,!0)))},[P,b,t]),C.useEffect(()=>{g||_!=="Not-Started"||(f(!0),t(nn(!0)))},[g,_,t]);const D=B=>{S(B)};if(k===!1||h&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(j,{to:"../promo"});if(k===!0&&c?.loggedInUserRoleMap!=null){const B=U=>U.trackPageLoaded($.Event.billPaySetup);return u.jsxs(st,{children:[u.jsx(se,{analytics:w,onLoad:U=>B(U)}),u.jsx(fe,{isAppContentDrawerOpen:m,handleDrawerToggle:D}),u.jsx(ot,{navigate:e,location:o,companyId:b,currentTenant:A,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{D(!0)},hasZeniAccountsAdminAccess:i,accountsPromoConfig:d,isLocalCurrencyEnabled:p})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},Rt=(e,o)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:o,zt=e=>`/${e}/cards`,Lt=e=>`/${e}/cards/setup`,Mt=e=>`/${e}/cards/onboard`,Zt=(e,o,t,a,c=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return a==null||a.status.code!=="inactive"||a.cardHolderUserId!==t.userId||a.type.code!=="business_physical_credit_card"&&a.type.code!=="business_physical_debit_card"?a!=null&&a.status.code==="active"&&a.cardHolderUserId===t.userId&&a.type.code==="business_physical_credit_card"&&c===!0?n+="/addToWallet":a==null||a.type.code!=="business_physical_debit_card"&&a.type.code!=="business_virtual_debit_card"||a.status.code!=="active"||a.cardHolderUserId!==t.userId||a.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},$t=(e,o)=>e.find(t=>t.id===o),Wt=(e,o,t)=>!e||!o||t.fetchState==="Completed",rt=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Gt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:V(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:V(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:V(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Ht=(e,o,t,a,c)=>e&&o&&t?{creditAccountId:a.id,creditAccountLimit:V(a.limit.amount),creditAccountAvailableAmount:V(a.available.amount),creditAccountSpentAmount:V(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:V(c.remainingAmountDue.amount)}:void 0,qt=(e,o,t,a,c)=>e&&o&&t?{debitAccountId:a.depositAccounts.map(n=>n.id),debitAccountName:a.depositAccounts.map(n=>n.accountName),debitAccountBalance:a.depositAccounts.map(n=>V(n.accountBalance.available.amount)),debitCardsSpend:V(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map(n=>n.accountStatus)}:void 0,Kt=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:V(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:V(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,Jt=80,Xt=80,ut=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,dt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),Qt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,Yt=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),lt=G(function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,i=x(e),l=T.getSignedInUser(),s=i.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!i.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:w,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:y,businessVerificationStatus:I}=o;return{onBusinessVerificationSectionClick:()=>{w.trackCardsVerifyIdentityCompanyDetailsClick(y,p,I?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},onFetchLinkTokenClick:(d,m)=>{e(Te("charge_card_setup",d,m))},onEstablishConnectionClick:d=>{e(we(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,m,S)=>{e(Ee(d,m,"charge_cards","charge_card_setup",S))},onUpdatePaymentAccountLoginStatus:(d,m)=>{e(Pe(!1,d,"charge_cards","charge_card_setup",m))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{w.trackCardsEnableCardsClick(y,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&r===!1?e(K(a,"charge_cards__debit_cards")):l===!0&&s===!1?e(K(a,"charge_cards")):i===!0&&r===!1&&e(K(a,"debit_cards"))},onUpdateChargeCardClick:(d,m,S)=>{const v=n.allBankAccounts.find(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId),g=n.allBankAccounts.find(f=>f.accountId===d);w.trackCardsZeniCashAccountChangeClick(y,p,{oldZeniCashAccount:v?.accountName??"",newZeniCashAccount:g?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId)+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex(f=>f.accountId===d)+1,numberOfCashAccounts:n.allBankAccounts.length}),e(S==="paymentAccount"?_e(d,m,"charge_cards","charge_card_setup"):ve("charge_card_setup",d,m))},onUpdatePrimaryFundingAccount:(d,m)=>{const S=n.allFundingAccounts.find(f=>f.id===d),v=n.allFundingAccounts.findIndex(f=>f.id===n.primaryFundingAccount?.id)+1,g=n.allFundingAccounts.findIndex(f=>f.id===d)+1;w.trackCardsPaymentAccountChangeClick(y,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:V(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:S?.label??"",newPaymentAccountBalance:V(S?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:S?.accType==="depositAccount",oldPaymentAccountPosition:v,newPaymentAccountPosition:g,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(ke(a,"charge_card_setup",d,m))},onEnableChargeCardSuccess:()=>{e(fn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,m)=>{e(Ae({officerType:d,fileIds:m}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(z(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(z(a,d,"charge_cards",!0,!0,!0)):i===!0&&e(z(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(te({files:d}))},onDeleteFile:d=>{e(ne(d))},onEditFileName:(d,m)=>{e(ee(d,m.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(yn(a,d))}}})(qn),pt=()=>{const e=X(),o=Q(),t=Y(),{tenantEmailDomain:a}=W(),c=ae(),n=E(L=>x(L)),{useDynamicConfig:i,useFeatureGate:l}=ie(),s=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=i(J.zeniAccountsConfig),{configValue:p}=i(J.zeniCardsConfig),y=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:I}=l(de.isDebitCardFeatureEnabled),{isFeatureEnabled:d}=l(de.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=l(de.isEarlyPayFeatureEnabled),S=E(L=>cn(L,n.companyId)),v=rn(S.controllers),g=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,f=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,P=un(I,n),A=ut({isDebitCardFeatureEnabled:I,isBankingOnlyTenant:P}),_=dn(n),b=ln(n),k=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,h=dt({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:d,isBookKeepingTenant:b,isDebitCardProductVisible:A,chargeCardsCreditAccountLimit:k}),D=A&&h===!1,B=A===!1&&h,U=ye(r),F=pn(c?.loggedInUserRoleMap),ce=Ie(c?.loggedInUserRoleMap),[H,ge]=C.useState(!1),[q,re]=C.useState(!1),M=E(L=>L.chargeCardSetupViewState.fetchState),N=T.getSignedInUserTenant(a)?.companyId??n.companyId,O=T.getSignedInUser(),Oe=L=>{ge(L)},Se=E(L=>mn(L,N));if(O==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect(()=>{q||M!=="Not-Started"||N==null?q||M!=="Completed"||N==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(N,!1,!0)):(re(!0),t(le(N,!0)))},[q,M,N,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,he=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=rt(h,A,f,g);return be||he?be||he?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:w,onLoad:()=>{w.trackPageLoaded($.Event.cardsSetupVisited),w.trackCardsCardSetupView(v,ue,s==null?"Cards Setup":s.includes("cards/promo")?"Promo":s.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:H,handleDrawerToggle:Oe}),u.jsx(lt,{autoPayThreshold:y,navigate:e,location:o,companyId:N,currentTenant:n,isEarlyPayEnabled:m,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:he,isUserChargeCardAdmin:F,isDebitCardOnlyEnabled:D,isCreditCardOnlyEnabled:B,chargeCardSetUpView:Se,isCreditCardProductVisible:h,isDebitCardFeatureEnabled:A,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:f,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:v,productInformation:ue,onClickMenuIcon:()=>{Oe(!0)},hasZeniAccountsAdminAccess:ce,accountsPromoConfig:U})]}):u.jsx(Ue,{fetchState:"Not-Started"}):u.jsx(j,{to:"../promo"})},mt=xe.div`
10
10
  display: flex;
11
11
  height: 100%;
12
12
  width: 100%;
@@ -14,11 +14,11 @@ import{j as u}from"./liveblocks-CfCKAQeM.js";import{j as Q,u as Y,h as X,l as G,
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- `,yt=W(function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=F(e),n=bn(e),i=hn(e,a),l=D.getSignedInUser(),s=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:i,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:E,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:r,denomination:p,denominationSymbol:y,mileageAmountInDenomination:I,description:d}=n;e(In({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:r},denomination:p,denominationSymbol:y,mileageAmountInDenomination:I,mileageCurrencyCode:s,mileageCurrencySymbol:r,mileageUnit:l,description:d}}))},onSaveMileageClick:n=>{e(Cn(a)),E.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(De("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(Ee(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(we(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(K(a,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"reimbursement","reimbursement_setup"):ve("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"reimbursement_setup",n,i))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Kn),ft=()=>{const e=Q(),o=Y(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),{useDynamicConfig:n}=ie(),i=Te(),{configValue:l}=n(J.zeniAccountsConfig),s=ye(l),r=gn(c?.loggedInUserRoleMap),p=Ie(c?.loggedInUserRoleMap),[y,I]=C.useState(!1),d=C.useRef(!1),[m,S]=C.useState(!1),v=w(b=>b.remiSetupViewState.fetchState),g=w(b=>F(b)),f=w(b=>b.remiSetupApproverViewState.fetchState),P=D.getSignedInUserTenant(a)?.companyId??g.companyId,A=D.getSignedInUser(),_=b=>{I(b)};if(A==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect(()=>{d.current||v!=="Not-Started"||P==null?d.current||v!=="Completed"||P==null||g.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(d.current=!0,t(pe(P,!1,!0))):(d.current=!0,t(pe(P,!0)))},[v,P,t]),C.useEffect(()=>{m||f!=="Not-Started"||(S(!0),t(Sn(!0)))},[m,f,t]),g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const b=k=>k.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(mt,{children:[u.jsx(se,{analytics:E,onLoad:k=>b(k)}),u.jsx(fe,{isAppContentDrawerOpen:y,handleDrawerToggle:_}),u.jsx(yt,{navigate:e,location:o,companyId:P,currentTenant:g,isUserRemiAdmin:r,onClickMenuIcon:()=>{_(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:s})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},gt=W(function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=F(e),n=D.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=En(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Dn(e.companyConfigState),p=Tn(e.userRoleConfigState),y=a==="zeni_treasury"?He(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:y}},function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:i}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:s=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:y,companyLegalName:I,companyTaxId:d,companyWebsite:m,companyPhone:S,primaryContactEmail:v,primaryContactName:g,primaryContactUserId:f,primaryContactSyncToken:P,syncToken:A,fileIds:_,incDate:b,typeOfIncorporation:k,stateOfIncorporation:h,sourceOfFunds:T,companySubIndustry:B,countriesOfOperations:U,companySourceOfFunds:x,companySourceOfFundsDescription:ce,transactionVolume:q,transactionVolumeDescription:ge,purposeOfAccount:H,purposeOfAccountDescription:re,regulatedStatus:M,regulatedStatusDescription:N,usNexus:O,usNexusTypes:Oe}=s,Se=y?.selectedOption,be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:Se==null||Se===""?void 0:Se,companyLegalName:I,taxIdOrEIN:d,website:m!=""&&m!=null?Bn(m):void 0,phone:S,syncToken:A,fileIds:_,incDate:b!=null?Ne(b?.toString()):b,typeOfIncorporation:k?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",sourceOfFunds:T?.selectedOption??"",companySubIndustry:B?.selectedOption??"",countriesOfOperations:U?.selectedOptions.map(ue=>ue.length===2?ue:Le(ue))??[],companySourceOfFunds:x?.selectedOption??"",companySourceOfFundsDescription:ce,transactionVolume:q?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:H?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:M??"",regulatedStatusDescription:N,usNexus:O,usNexusTypes:Oe?.selectedOptions??[]},he={userId:f,firstName:g.firstName,lastName:g.lastName,email:v,syncToken:P};e(je({companyDetails:be,primaryContactDetails:he}))},onCompanyOfficerUpdated:s=>{const r=s.map(p=>{const{officerType:y,userId:I,name:d,email:m,nationalityCountryCode:S,ssn:v,dob:g,phone:f,syncToken:P,selectDocument:A,role:_,ownership:b,isSelectedForVerification:k,userVerificationStatus:h,treasuryUserVerificationStatus:T,fileIds:B}=p;let U;return A.selectDocumentType==="driverLicense"?U="driving_license":A.selectDocumentType==="passport"?U="passport":A.selectDocumentType==="stateId"?U="id_document":A.selectDocumentType==="ssnCard"&&(U="social_security_card"),{officerType:y,userId:I,firstName:d.firstName,lastName:d.lastName,email:m,ssn:v,nationalityCountryCode:S?.selectedOption!=null?Le(S.selectedOption):void 0,phone:f,birthday:g!=null?Ne(g?.toString()):g,syncToken:P,titleAtCompany:_.selectedOption,ownershipInCompany:b,documentTypeSelectedForVerification:U,isSelectedForVerification:k,userVerificationStatus:h,treasuryUserVerificationStatus:T,fileIds:B,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(je({officers:r}))},onSaveDetailsClick:s=>{e(z(t,s,a))},onSendForVerificationClick:s=>{e(z(t,s,a,!0))},onAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),y=new URLSearchParams(i.search),I={};y.forEach((d,m)=>{I[m]=d}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(I).length>0?I:void 0}})},onRegisteredAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),y=new URLSearchParams(i.search),I=Object.fromEntries(y.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(I).length>0?I:void 0}})},onBackClick:()=>{e(On({companyId:t})),n("../setup")},updateFilesEntity:s=>{e(te({files:s}))},onDeleteFile:s=>{e(ne(s))},onDeleteFileList:s=>{e(Je(s))},onEditFileName:(s,r)=>{e(ee(s,r.split(".")[0]))},onGetOtp:s=>{e(We(s,"SpendManagementSetup"))},onResendOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onVerifyOtp:(s,r)=>{e($e(s,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,r)=>{e(Un({addressType:s,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(Ke())},onOverlayClose:()=>{e(xe())}}})(Jn),St=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=Q(),c=Y(),n=X(),[i]=Ye(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:y}=G(),I=ae(),{useDynamicConfig:d}=ie(),m=Te(),{configValue:S}=d(J.zeniAccountsConfig),v=ye(S),g=w(h=>{switch(e){case"zeni_accounts":return h.zeniAccountSetupViewState.fetchState;case"reimbursement":return h.remiSetupViewState.fetchState;case"charge_cards":return h.chargeCardSetupViewState.fetchState;case"zeni_treasury":return h.treasurySetupViewState.fetchState;default:return h.billPaySetupViewState.fetchState}}),f=w(h=>h.companyConfigState.fetchState),P=w(h=>h.userRoleConfigState.fetchState),A=w(h=>F(h)),_=A.companyId??D.getSignedInUserTenant(y)?.companyId;if(C.useEffect(()=>{f==="Not-Started"&&n(An()),P==="Not-Started"&&n(kn(!0))},[f,P,n]),C.useEffect(()=>{if(!r&&g==="Not-Started"&&_!=null)switch(p(!0),e){case"zeni_accounts":n(me(_,!0));break;case"zeni_treasury":n(Ce(_,!0));break;case"reimbursement":n(pe(_,!0));break;case"charge_cards":n(le(_,!0));break;default:n(Z(_,!0))}},[r,g,_,n]),D.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let b;switch(e){case"zeni_accounts":b=A.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":b=A.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":b=A.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||A.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":b=A.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:b=A.companyBillPayInfo?.info?.isBillPayTOSAccepted}const k=w(h=>{let T;switch(e){case"zeni_accounts":T=wn(h,_);break;case"zeni_treasury":T=qe(h,_);break;case"charge_cards":T=Pn(h,_);break;case"reimbursement":T=vn(h,_);break;default:T=_n(h,_)}return T});return b===!1?null:k.fetchState==="Completed"&&b===!0&&I?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:E,onLoad:h=>(T=>{switch(e){case"zeni_accounts":return T.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return T.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return T.trackPageLoaded($.Event.billPayBusinessVerification,Ve(c)?"Settings":void 0)}})(h)}),u.jsx(gt,{businessVerificationDetails:k,navigate:a,location:c,companyId:_,analytics:E,currentTenant:A,productType:e,roleMap:I.loggedInUserRoleMap,isSettings:Ve(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:v.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})},bt={overlayWidth:new Yn(100,100,59)},ht=W(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=F(e),i=D.getSignedInUser(),l=n.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=Qe(e,a),p=qe(e,a),y=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",I=Nn(e),d=I.transactions,m=He(e),S=I.accountSummary?.totalBalance?.amount,v=d.length===0||S===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:d,transferDetails:m,isFirstTransfer:v,isDisabled:y,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:E,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(zn(s))},onBusinessVerificationSectionClick:(s,r)=>{let p="../verification";s&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(s,r)=>{e(De("treasury_setup",s,r))},onEstablishConnectionClick:s=>{e(Ee(s,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,r,p)=>{e(we(s,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,r)=>{e(Pe(!1,s,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(K(a,"zeni_treasury"))},onUpdateTreasuryClick:(s,r,p)=>{e(p==="paymentAccount"?_e(s,r,"zeni_treasury","treasury_setup"):ve("treasury_setup",s,r))},onUpdatePrimaryFundingAccount:(s,r)=>{e(ke(a,"treasury_setup",s,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,r)=>{e(Ae({officerType:s,fileIds:r}))},onSendForVerificationClick:(s,r)=>{if(e(z(a,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Me(p)),e(Re(!1))}r===!0&&e(Ke())},updateFilesEntity:s=>{e(te({files:s}))},onDeleteFile:s=>{e(ne(s))},onEditFileName:(s,r)=>{e(ee(s,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:r}=s;e(Rn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Me(s)),e(jn(s))},onConfirmFundAllocation:()=>{e(Re(n))},onSignUpClick:()=>{o.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(xe())}}})(Xn),Ct=()=>{const e=Q(),o=Y(),t=X(),a=Te(),c=Qn(),{tenantEmailDomain:n}=G(),{useDynamicConfig:i}=ie(),l=ae(),[s,r]=C.useState(!1),p=Ie(l?.loggedInUserRoleMap),{configValue:y}=i(J.zeniAccountsConfig),I=ye(y),[d,m]=C.useState(!1),[S,v]=C.useState(!1),[g,f]=C.useState(!1),[P,A]=C.useState(!1),[_,b]=C.useState(!1),k=w(O=>O.treasurySetupViewState.fetchState),h=w(O=>O.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),T=w(O=>O.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),B=w(O=>O.treasuryDetailState.transactionsState?.fetchState),U=w(O=>F(O)),x=D.getSignedInUserTenant(n)?.companyId??U.companyId,ce=w(O=>Qe(O,x)),q=ce.isAtomicAccountExists,ge=!!U.companyZeniAccountInfo?.info?.isZeniAccountEnabled,H=D.getSignedInUser(),re=O=>{m(O)};if(H==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect(()=>{S||k!=="Not-Started"||x==null||(v(!0),t(Ce(x,!0,!1)))},[S,k,x,t]),C.useEffect(()=>{g||h!=="Not-Started"||x==null||(f(!0),t(xn()))},[g,h,x,t]),C.useEffect(()=>{P||T!=="Not-Started"||x==null||(A(!0),t(Fn()))},[P,T,x,t]),C.useEffect(()=>{_||B!=="Not-Started"||x==null||(b(!0),t(Vn(!0)))},[_,B,x,t]);const M=U.companyTreasuryInfo?.info?.businessVerificationStatus?.code,N=M==="pending_review"||M==="verified";return C.useEffect(()=>{s||k!=="Completed"||q||N||!o.pathname.includes("setup")||r(!0)},[k,q,N]),U.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:E,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:d,handleDrawerToggle:re}),u.jsx(at,{onClose:()=>{t(xe()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:s?0:250,PaperProps:{style:{width:bt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(It,{onClick:O=>O.stopPropagation(),children:u.jsx(St,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(xe()),e("../setup")}})})}),u.jsx(ht,{navigate:e,location:o,companyId:x,currentTenant:U,isUserZeniAccountsAdmin:p,accountsPromoConfig:I,isAccountsEnabled:ge,isAllocationDone:q,analytics:E,treasurySetupView:ce,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:s,setShowTreasurySetupOverlay:r})]})},It=Fe(it)`
17
+ `,yt=G(function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=x(e),n=bn(e),i=hn(e,a),l=T.getSignedInUser(),s=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:i,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:w,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:r,denomination:p,denominationSymbol:y,mileageAmountInDenomination:I,description:d}=n;e(In({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:r},denomination:p,denominationSymbol:y,mileageAmountInDenomination:I,mileageCurrencyCode:s,mileageCurrencySymbol:r,mileageUnit:l,description:d}}))},onSaveMileageClick:n=>{e(Cn(a)),w.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(K(a,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"reimbursement","reimbursement_setup"):ve("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"reimbursement_setup",n,i))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Kn),ft=()=>{const e=X(),o=Q(),t=Y(),{tenantEmailDomain:a}=W(),c=ae(),{useDynamicConfig:n}=ie(),i=De(),{configValue:l}=n(J.zeniAccountsConfig),s=ye(l),r=gn(c?.loggedInUserRoleMap),p=Ie(c?.loggedInUserRoleMap),[y,I]=C.useState(!1),d=C.useRef(!1),[m,S]=C.useState(!1),v=E(b=>b.remiSetupViewState.fetchState),g=E(b=>x(b)),f=E(b=>b.remiSetupApproverViewState.fetchState),P=T.getSignedInUserTenant(a)?.companyId??g.companyId,A=T.getSignedInUser(),_=b=>{I(b)};if(A==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect(()=>{d.current||v!=="Not-Started"||P==null?d.current||v!=="Completed"||P==null||g.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(d.current=!0,t(pe(P,!1,!0))):(d.current=!0,t(pe(P,!0)))},[v,P,t]),C.useEffect(()=>{m||f!=="Not-Started"||(S(!0),t(Sn(!0)))},[m,f,t]),g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(j,{to:"../promo"});if(g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const b=k=>k.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(mt,{children:[u.jsx(se,{analytics:w,onLoad:k=>b(k)}),u.jsx(fe,{isAppContentDrawerOpen:y,handleDrawerToggle:_}),u.jsx(yt,{navigate:e,location:o,companyId:P,currentTenant:g,isUserRemiAdmin:r,onClickMenuIcon:()=>{_(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:s})]})}return u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},gt=G(function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=x(e),n=T.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=wn(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Tn(e.companyConfigState),p=Dn(e.userRoleConfigState),y=a==="zeni_treasury"?qe(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:y}},function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:i}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:s=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:y,companyLegalName:I,companyTaxId:d,companyWebsite:m,companyPhone:S,primaryContactEmail:v,primaryContactName:g,primaryContactUserId:f,primaryContactSyncToken:P,syncToken:A,fileIds:_,incDate:b,typeOfIncorporation:k,stateOfIncorporation:h,sourceOfFunds:D,companySubIndustry:B,countriesOfOperations:U,companySourceOfFunds:F,companySourceOfFundsDescription:ce,transactionVolume:H,transactionVolumeDescription:ge,purposeOfAccount:q,purposeOfAccountDescription:re,regulatedStatus:M,regulatedStatusDescription:N,usNexus:O,usNexusTypes:Oe}=s,Se=y?.selectedOption,be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:Se==null||Se===""?void 0:Se,companyLegalName:I,taxIdOrEIN:d,website:m!=""&&m!=null?Bn(m):void 0,phone:S,syncToken:A,fileIds:_,incDate:b!=null?Ne(b?.toString()):b,typeOfIncorporation:k?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",sourceOfFunds:D?.selectedOption??"",companySubIndustry:B?.selectedOption??"",countriesOfOperations:U?.selectedOptions.map(ue=>ue.length===2?ue:Le(ue))??[],companySourceOfFunds:F?.selectedOption??"",companySourceOfFundsDescription:ce,transactionVolume:H?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:q?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:M??"",regulatedStatusDescription:N,usNexus:O,usNexusTypes:Oe?.selectedOptions??[]},he={userId:f,firstName:g.firstName,lastName:g.lastName,email:v,syncToken:P};e(je({companyDetails:be,primaryContactDetails:he}))},onCompanyOfficerUpdated:s=>{const r=s.map(p=>{const{officerType:y,userId:I,name:d,email:m,nationalityCountryCode:S,ssn:v,dob:g,phone:f,syncToken:P,selectDocument:A,role:_,ownership:b,isSelectedForVerification:k,userVerificationStatus:h,treasuryUserVerificationStatus:D,fileIds:B}=p;let U;return A.selectDocumentType==="driverLicense"?U="driving_license":A.selectDocumentType==="passport"?U="passport":A.selectDocumentType==="stateId"?U="id_document":A.selectDocumentType==="ssnCard"&&(U="social_security_card"),{officerType:y,userId:I,firstName:d.firstName,lastName:d.lastName,email:m,ssn:v,nationalityCountryCode:S?.selectedOption!=null?Le(S.selectedOption):void 0,phone:f,birthday:g!=null?Ne(g?.toString()):g,syncToken:P,titleAtCompany:_.selectedOption,ownershipInCompany:b,documentTypeSelectedForVerification:U,isSelectedForVerification:k,userVerificationStatus:h,treasuryUserVerificationStatus:D,fileIds:B,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(je({officers:r}))},onSaveDetailsClick:s=>{e(z(t,s,a))},onSendForVerificationClick:s=>{e(z(t,s,a,!0))},onAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),y=new URLSearchParams(i.search),I={};y.forEach((d,m)=>{I[m]=d}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(I).length>0?I:void 0}})},onRegisteredAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),y=new URLSearchParams(i.search),I=Object.fromEntries(y.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(I).length>0?I:void 0}})},onBackClick:()=>{e(On({companyId:t})),n("../setup")},updateFilesEntity:s=>{e(te({files:s}))},onDeleteFile:s=>{e(ne(s))},onDeleteFileList:s=>{e(Je(s))},onEditFileName:(s,r)=>{e(ee(s,r.split(".")[0]))},onGetOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onResendOtp:s=>{e(We(s,"SpendManagementSetup"))},onVerifyOtp:(s,r)=>{e($e(s,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,r)=>{e(Un({addressType:s,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(Ke())},onOverlayClose:()=>{e(Fe())}}})(Jn),St=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=X(),c=Q(),n=Y(),[i]=Qe(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:y}=W(),I=ae(),{useDynamicConfig:d}=ie(),m=De(),{configValue:S}=d(J.zeniAccountsConfig),v=ye(S),g=E(h=>{switch(e){case"zeni_accounts":return h.zeniAccountSetupViewState.fetchState;case"reimbursement":return h.remiSetupViewState.fetchState;case"charge_cards":return h.chargeCardSetupViewState.fetchState;case"zeni_treasury":return h.treasurySetupViewState.fetchState;default:return h.billPaySetupViewState.fetchState}}),f=E(h=>h.companyConfigState.fetchState),P=E(h=>h.userRoleConfigState.fetchState),A=E(h=>x(h)),_=A.companyId??T.getSignedInUserTenant(y)?.companyId;if(C.useEffect(()=>{f==="Not-Started"&&n(An()),P==="Not-Started"&&n(kn(!0))},[f,P,n]),C.useEffect(()=>{if(!r&&g==="Not-Started"&&_!=null)switch(p(!0),e){case"zeni_accounts":n(me(_,!0));break;case"zeni_treasury":n(Ce(_,!0));break;case"reimbursement":n(pe(_,!0));break;case"charge_cards":n(le(_,!0));break;default:n(Z(_,!0))}},[r,g,_,n]),T.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let b;switch(e){case"zeni_accounts":b=A.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":b=A.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":b=A.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||A.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":b=A.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:b=A.companyBillPayInfo?.info?.isBillPayTOSAccepted}const k=E(h=>{let D;switch(e){case"zeni_accounts":D=En(h,_);break;case"zeni_treasury":D=He(h,_);break;case"charge_cards":D=Pn(h,_);break;case"reimbursement":D=vn(h,_);break;default:D=_n(h,_)}return D});return b===!1?null:k.fetchState==="Completed"&&b===!0&&I?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:w,onLoad:h=>(D=>{switch(e){case"zeni_accounts":return D.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return D.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return D.trackPageLoaded($.Event.billPayBusinessVerification,Ve(c)?"Settings":void 0)}})(h)}),u.jsx(gt,{businessVerificationDetails:k,navigate:a,location:c,companyId:_,analytics:w,currentTenant:A,productType:e,roleMap:I.loggedInUserRoleMap,isSettings:Ve(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:v.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})},bt={overlayWidth:new Qn(100,100,59)},ht=G(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=x(e),i=T.getSignedInUser(),l=n.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=Xe(e,a),p=He(e,a),y=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",I=Nn(e),d=I.transactions,m=qe(e),S=I.accountSummary?.totalBalance?.amount,v=d.length===0||S===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:d,transferDetails:m,isFirstTransfer:v,isDisabled:y,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:w,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(zn(s))},onBusinessVerificationSectionClick:(s,r)=>{let p="../verification";s&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(s,r)=>{e(Te("treasury_setup",s,r))},onEstablishConnectionClick:s=>{e(we(s,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,r,p)=>{e(Ee(s,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,r)=>{e(Pe(!1,s,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(K(a,"zeni_treasury"))},onUpdateTreasuryClick:(s,r,p)=>{e(p==="paymentAccount"?_e(s,r,"zeni_treasury","treasury_setup"):ve("treasury_setup",s,r))},onUpdatePrimaryFundingAccount:(s,r)=>{e(ke(a,"treasury_setup",s,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,r)=>{e(Ae({officerType:s,fileIds:r}))},onSendForVerificationClick:(s,r)=>{if(e(z(a,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Me(p)),e(Re(!1))}r===!0&&e(Ke())},updateFilesEntity:s=>{e(te({files:s}))},onDeleteFile:s=>{e(ne(s))},onEditFileName:(s,r)=>{e(ee(s,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:r}=s;e(Rn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Me(s)),e(jn(s))},onConfirmFundAllocation:()=>{e(Re(n))},onSignUpClick:()=>{o.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Fe())}}})(Yn),Ct=()=>{const e=X(),o=Q(),t=Y(),a=De(),c=Xn(),{tenantEmailDomain:n}=W(),{useDynamicConfig:i}=ie(),l=ae(),[s,r]=C.useState(!1),p=Ie(l?.loggedInUserRoleMap),{configValue:y}=i(J.zeniAccountsConfig),I=ye(y),[d,m]=C.useState(!1),[S,v]=C.useState(!1),[g,f]=C.useState(!1),[P,A]=C.useState(!1),[_,b]=C.useState(!1),k=E(O=>O.treasurySetupViewState.fetchState),h=E(O=>O.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),D=E(O=>O.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),B=E(O=>O.treasuryDetailState.transactionsState?.fetchState),U=E(O=>x(O)),F=T.getSignedInUserTenant(n)?.companyId??U.companyId,ce=E(O=>Xe(O,F)),H=ce.isAtomicAccountExists,ge=!!U.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=T.getSignedInUser(),re=O=>{m(O)};if(q==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect(()=>{S||k!=="Not-Started"||F==null||(v(!0),t(Ce(F,!0,!1)))},[S,k,F,t]),C.useEffect(()=>{g||h!=="Not-Started"||F==null||(f(!0),t(Fn()))},[g,h,F,t]),C.useEffect(()=>{P||D!=="Not-Started"||F==null||(A(!0),t(xn()))},[P,D,F,t]),C.useEffect(()=>{_||B!=="Not-Started"||F==null||(b(!0),t(Vn(!0)))},[_,B,F,t]);const M=U.companyTreasuryInfo?.info?.businessVerificationStatus?.code,N=M==="pending_review"||M==="verified";return C.useEffect(()=>{s||k!=="Completed"||H||N||!o.pathname.includes("setup")||r(!0)},[k,H,N]),U.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(j,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:w,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:d,handleDrawerToggle:re}),u.jsx(at,{onClose:()=>{t(Fe()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:s?0:250,PaperProps:{style:{width:bt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(It,{onClick:O=>O.stopPropagation(),children:u.jsx(St,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Fe()),e("../setup")}})})}),u.jsx(ht,{navigate:e,location:o,companyId:F,currentTenant:U,isUserZeniAccountsAdmin:p,accountsPromoConfig:I,isAccountsEnabled:ge,isAllocationDone:H,analytics:w,treasurySetupView:ce,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:s,setShowTreasurySetupOverlay:r})]})},It=xe(it)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
21
- `,At=W(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=F(e),n=D.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Ln(e,a),r=t&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:E,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(De("account_setup",n,i))},onEstablishConnectionClick:n=>{e(Ee(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(we(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(K(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"zeni_accounts","account_setup"):ve("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))}}})(et),kt=()=>{const e=Q(),o=Y(),t=X(),{tenantEmailDomain:a}=G(),{useDynamicConfig:c}=ie(),n=ae(),i=Ie(n?.loggedInUserRoleMap),{configValue:l}=c(J.zeniAccountsConfig),s=ye(l),[r,p]=C.useState(!1),[y,I]=C.useState(!1),d=w(f=>f.zeniAccountSetupViewState.fetchState),m=w(f=>F(f)),S=D.getSignedInUserTenant(a)?.companyId??m.companyId,v=D.getSignedInUser(),g=f=>{p(f)};if(v==null)throw Error("Can't access zeni bank account setup page without signing in...");if(C.useEffect(()=>{y||d!=="Not-Started"||S==null?y||d!=="Completed"||S==null||m.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(S,!1,!0)):(I(!0),t(me(S,!0)))},[y,d,S,t]),m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(j,{to:"../promo"});{const f=P=>P.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:E,onLoad:P=>f(P)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:g}),u.jsx(At,{navigate:e,location:o,companyId:S,currentTenant:m,isUserZeniAccountsAdmin:i,accountsPromoConfig:s,onClickMenuIcon:()=>{g(!0)}})]})}},_t=Fe.div`
21
+ `,At=G(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=x(e),n=T.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Ln(e,a),r=t&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:w,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(Te("account_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(K(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"zeni_accounts","account_setup"):ve("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))}}})(et),kt=()=>{const e=X(),o=Q(),t=Y(),{tenantEmailDomain:a}=W(),{useDynamicConfig:c}=ie(),n=ae(),i=Ie(n?.loggedInUserRoleMap),{configValue:l}=c(J.zeniAccountsConfig),s=ye(l),[r,p]=C.useState(!1),[y,I]=C.useState(!1),d=E(f=>f.zeniAccountSetupViewState.fetchState),m=E(f=>x(f)),S=T.getSignedInUserTenant(a)?.companyId??m.companyId,v=T.getSignedInUser(),g=f=>{p(f)};if(v==null)throw Error("Can't access zeni bank account setup page without signing in...");if(C.useEffect(()=>{y||d!=="Not-Started"||S==null?y||d!=="Completed"||S==null||m.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(S,!1,!0)):(I(!0),t(me(S,!0)))},[y,d,S,t]),m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(j,{to:"../promo"});{const f=P=>P.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:w,onLoad:P=>f(P)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:g}),u.jsx(At,{navigate:e,location:o,companyId:S,currentTenant:m,isUserZeniAccountsAdmin:i,accountsPromoConfig:s,onClickMenuIcon:()=>{g(!0)}})]})}},_t=xe.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,4 +26,4 @@ import{j as u}from"./liveblocks-CfCKAQeM.js";import{j as Q,u as Y,h as X,l as G,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,vt=W(function(e,o){const t=F(e),a=D.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:$n(e),isReadonly:o.isFormReadonly,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:n,analytics:E}},function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Wn(a))},onSubmitClick:()=>{e(Gn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(te({files:a}))},onDeleteFile:a=>{e(ne(a))},onDeleteFileList:a=>{e(Je(a))},onEditFileName:(a,c)=>{e(ee(a,c.split(".")[0]))}}})(nt),Pt=()=>{const e=Q(),o=Y(),t=X(),[a,c]=C.useState(!1),[n,i]=C.useState(!1),[l,s]=C.useState(!1),{tenantEmailDomain:r}=G(),p=ae(),{useFeatureGate:y}=ie(),{isFeatureEnabled:I}=y(de.isBillPayLocalCurrencyFeatureEnabled),d=w(k=>k.internationalWireVerificationState.verificationFormFetchState.fetchState),m=w(k=>k.billPaySetupViewState.fetchState),S=w(k=>F(k)),v=Te(),g=S.companyId??D.getSignedInUserTenant(r)?.companyId,f=w(k=>Mn(k.companyState,S.companyId)),P=f?.company.companyBillPayInfo.internationalWireOnboardingStatus,A=P?.code==="onboarding_status_not_started"?void 0:"readonly";if(C.useEffect(()=>{a||d!=="Not-Started"||g==null||(c(!0),t(Zn(g)))},[a,d,g,t]),C.useEffect(()=>{n||m!=="Not-Started"||g==null||(i(!0),t(Z(g,!0)))},[m,n,g,t]),D.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const _=S.companyBillPayInfo?.info?.isBillPayTOSAccepted,b=k=>{s(k)};return _===!1?u.jsx(j,{to:"../promo"}):_===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(_t,{children:[u.jsx(se,{analytics:E,onLoad:k=>(h=>h.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(k)}),Ve(o)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:b}):null,u.jsx(vt,{navigate:e,location:o,companyId:g,analytics:E,currentTenant:S,roleMap:p.loggedInUserRoleMap,isFormReadonly:A,isLocalCurrencyEnabled:I})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:v.colors.grey5}})},wt=W(function(){return{}},function(e,o){const{companyId:t,productType:a}=o;return{onEventReceived:c=>{switch(c){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(a){case"reimbursement":e(pe(t,!0,!0));break;case"zeni_accounts":e(me(t,!0,!0));break;case"charge_cards":e(le(t,!0,!0));break;case"zeni_treasury":e(Ce(t,!0,!0));break;default:e(Z(t,!0,!0))}}}}})(tt(e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:i,isUserHasOnlyCardAccess:l,productType:s,type:r}=e;switch(s){case"bill_pay":switch(r){case"verification":return o?u.jsx(Be,{productType:s}):t?u.jsx(j,{to:"../"}):u.jsx(R,{});case"international-wire":return o?u.jsx(Pt,{}):t?u.jsx(j,{to:"../"}):u.jsx(R,{});default:return o?u.jsx(ct,{}):t?u.jsx(j,{to:"../"}):u.jsx(R,{})}case"reimbursement":return r==="verification"?a?u.jsx(Be,{productType:s}):u.jsx(R,{}):a?u.jsx(ft,{}):u.jsx(R,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Be,{productType:"zeni_accounts"}):u.jsx(R,{}):c?u.jsx(kt,{}):u.jsx(R,{});case"zeni_treasury":return n===!0?u.jsx(Ct,{}):u.jsx(R,{});case"charge_cards":return r==="verification"?i?u.jsx(Be,{productType:"charge_cards"}):l?u.jsx(j,{to:"../"}):u.jsx(R,{}):i?u.jsx(pt,{}):l?u.jsx(j,{to:"../"}):u.jsx(R,{})}}));function ea(e){const{tenantEmailDomain:o}=G(),t=w(c=>F(c)).companyId??D.getSignedInUserTenant(o)?.companyId,a={events:t!=null?[`private-encrypted-${t}.bill-pay-set-up-verification-update`,`private-encrypted-${t}.bill-pay-wise-setup`]:[],eventCallback:(c,n,i)=>{i.onEventReceived(c)}};if(D.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(wt,{...e,companyId:t,...a})}export{Jt as A,Qt as P,ea as S,qt as a,Kt as b,ut as c,dt as d,rt as e,zt as f,Zt as g,Wt as h,Ht as i,Yt as j,Gt as k,$t as l,Lt as m,Mt as n,Rt as p,Xt as s};
29
+ `,vt=G(function(e,o){const t=x(e),a=T.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:$n(e),isReadonly:o.isFormReadonly,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:n,analytics:w}},function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Gn(a))},onSubmitClick:()=>{e(Wn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(te({files:a}))},onDeleteFile:a=>{e(ne(a))},onDeleteFileList:a=>{e(Je(a))},onEditFileName:(a,c)=>{e(ee(a,c.split(".")[0]))}}})(nt),Pt=()=>{const e=X(),o=Q(),t=Y(),[a,c]=C.useState(!1),[n,i]=C.useState(!1),[l,s]=C.useState(!1),{tenantEmailDomain:r}=W(),p=ae(),{useFeatureGate:y}=ie(),{isFeatureEnabled:I}=y(de.isBillPayLocalCurrencyFeatureEnabled),d=E(k=>k.internationalWireVerificationState.verificationFormFetchState.fetchState),m=E(k=>k.billPaySetupViewState.fetchState),S=E(k=>x(k)),v=De(),g=S.companyId??T.getSignedInUserTenant(r)?.companyId,f=E(k=>Mn(k.companyState,S.companyId)),P=f?.company.companyBillPayInfo.internationalWireOnboardingStatus,A=P?.code==="onboarding_status_not_started"?void 0:"readonly";if(C.useEffect(()=>{a||d!=="Not-Started"||g==null||(c(!0),t(Zn(g)))},[a,d,g,t]),C.useEffect(()=>{n||m!=="Not-Started"||g==null||(i(!0),t(Z(g,!0)))},[m,n,g,t]),T.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const _=S.companyBillPayInfo?.info?.isBillPayTOSAccepted,b=k=>{s(k)};return _===!1?u.jsx(j,{to:"../promo"}):_===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(_t,{children:[u.jsx(se,{analytics:w,onLoad:k=>(h=>h.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(k)}),Ve(o)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:b}):null,u.jsx(vt,{navigate:e,location:o,companyId:g,analytics:w,currentTenant:S,roleMap:p.loggedInUserRoleMap,isFormReadonly:A,isLocalCurrencyEnabled:I})]}):u.jsx(Ue,{fetchState:"In-Progress",style:{backgroundColor:v.colors.grey5}})},Et=G(function(){return{}},function(e,o){const{companyId:t,productType:a}=o;return{onEventReceived:c=>{switch(c){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(a){case"reimbursement":e(pe(t,!0,!0));break;case"zeni_accounts":e(me(t,!0,!0));break;case"charge_cards":e(le(t,!0,!0));break;case"zeni_treasury":e(Ce(t,!0,!0));break;default:e(Z(t,!0,!0))}}}}})(tt(e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:i,isUserHasOnlyCardAccess:l,productType:s,type:r}=e;switch(s){case"bill_pay":switch(r){case"verification":return o?u.jsx(Be,{productType:s}):t?u.jsx(j,{to:"../"}):u.jsx(R,{});case"international-wire":return o?u.jsx(Pt,{}):t?u.jsx(j,{to:"../"}):u.jsx(R,{});default:return o?u.jsx(ct,{}):t?u.jsx(j,{to:"../"}):u.jsx(R,{})}case"reimbursement":return r==="verification"?a?u.jsx(Be,{productType:s}):u.jsx(R,{}):a?u.jsx(ft,{}):u.jsx(R,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Be,{productType:"zeni_accounts"}):u.jsx(R,{}):c?u.jsx(kt,{}):u.jsx(R,{});case"zeni_treasury":return n===!0?u.jsx(Ct,{}):u.jsx(R,{});case"charge_cards":return r==="verification"?i?u.jsx(Be,{productType:"charge_cards"}):l?u.jsx(j,{to:"../"}):u.jsx(R,{}):i?u.jsx(pt,{}):l?u.jsx(j,{to:"../"}):u.jsx(R,{})}}));function ea(e){const{tenantEmailDomain:o}=W(),t=E(c=>x(c)).companyId??T.getSignedInUserTenant(o)?.companyId,a={events:t!=null?[`private-encrypted-${t}.bill-pay-set-up-verification-update`,`private-encrypted-${t}.bill-pay-wise-setup`]:[],eventCallback:(c,n,i)=>{i.onEventReceived(c)}};if(T.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Et,{...e,companyId:t,...a})}export{Jt as A,Xt as P,ea as S,Ht as a,Kt as b,ut as c,dt as d,rt as e,zt as f,Zt as g,Gt as h,qt as i,Qt as j,Wt as k,$t as l,Lt as m,Mt as n,Rt as p,Yt as s};
@@ -0,0 +1 @@
1
+ import{j as f}from"./liveblocks-BTKJAzKw.js";import{a as u,b as T,q as A}from"./sentry-BidZRtdZ.js";import{h as D,j as z,g as c,u as M,N as O,k as P}from"./core-XIdi9yav.js";import{u as j,z as s,m as F,c as E,D as B,d as _,e as N,v as V,g as W,s as $,f as v}from"./index-BFHwjIZ6.js";import{eO as q,IQ as H,IR as J,eP as Q,fi as R,IW as X,fH as Y,cT as Z,IX as b,IY as G,IZ as K,bS as y}from"./zeni-epic-state-znLEvSss.js";import"./mui-D-cfPqvW.js";import{u as ee}from"./useDeviceId-rJ9quQG0.js";import{f as te}from"./analyticsHelper-VfNEEHsS.js";import{t as ne}from"./getLocaleForTenant-CJ_gALMc.js";import"./recharts-Db9qTggV.js";import"./analytics-Dwe2jubl.js";import"./plaid-_FJLoBl-.js";import"./dnd-C8_bqxJQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-B4nk2ufU.js";import"./lexical-L3dbahzM.js";import"./pdf-vaniLLX-.js";import"./utils-DDxx6oUt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="b5d98948-9206-465c-af91-af3db5706c6a",t._sentryDebugIdIdentifier="sentry-dbid-b5d98948-9206-465c-af91-af3db5706c6a")}catch{}})();const ie=P(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(K({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(G(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>q(e)),S=c(e=>H(e)),m=M(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(S.tenantsInOrder),o.zeniSessionId),Q(o.userId,o.zeniSessionId,r.tenantId),i(R(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(X("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Z(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(V,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -0,0 +1,9 @@
1
+ import{j as s}from"./liveblocks-BTKJAzKw.js";import{a as n}from"./sentry-BidZRtdZ.js";import{h as u,u as m,j as p,N as g}from"./core-XIdi9yav.js";import{z as f,B as y,t as h,c as d,e as b}from"./index-BFHwjIZ6.js";import{fM as x,fN as I,Jc as j}from"./zeni-epic-state-znLEvSss.js";import{n as w}from"./mui-D-cfPqvW.js";import"./recharts-Db9qTggV.js";import"./analytics-Dwe2jubl.js";import"./plaid-_FJLoBl-.js";import"./dnd-C8_bqxJQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-B4nk2ufU.js";import"./lexical-L3dbahzM.js";import"./pdf-vaniLLX-.js";import"./utils-DDxx6oUt.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]="d1de2f4c-23a1-424a-adfc-b26950971633",e._sentryDebugIdIdentifier="sentry-dbid-d1de2f4c-23a1-424a-adfc-b26950971633")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),h.reset(),d.trackLogout(b.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;export{U as default};
@@ -1,4 +1,4 @@
1
- import{j as p}from"./liveblocks-CfCKAQeM.js";import{a as g}from"./sentry-131ydzJg.js";import{j as K,h as _,u as z,g as b,l as q,k as O}from"./core-uYqCzel8.js";import{z as Q,y as M,S as d,A as V,d as W,f as Z,cI as H,q as f,p as J}from"./index-CeZ7L-BQ.js";import{eQ as X,Qo as R,G9 as y,Qp as x,Qk as Y,FB as E,Qq as aa,FF as I,F8 as ea,Ga as B,Qr as w,gO as ta,G0 as sa,G5 as oa,FU as na,FS as F,G6 as ia,FP as la,Qs as ra,Qt as ca,Qu as ka,Qv as ua,Qw as m,ec as pa,Qx as da,Qy as ma}from"./zeni-epic-state-BmAPZlsC.js";import{n as Ta}from"./mui-CTbUXhla.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{M as Ga}from"./MobileAppDrawer-CNxBiA0K.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./utils-BkkIzijx.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]="b458cc17-57ec-4a82-a2ee-1b6c40dcf302",e._sentryDebugIdIdentifier="sentry-dbid-b458cc17-57ec-4a82-a2ee-1b6c40dcf302")}catch{}})();const ha=Ta.div`
1
+ import{j as p}from"./liveblocks-BTKJAzKw.js";import{a as g}from"./sentry-BidZRtdZ.js";import{j as U,h as _,u as z,g as b,l as O,k as M}from"./core-XIdi9yav.js";import{z as R,y as Z,S as d,A as q,c as V,e as W,cI as H,r as f,q as J}from"./index-BFHwjIZ6.js";import{eO as X,Q1 as x,FO as y,Q2 as A,PZ as Y,Fe as S,Q3 as aa,Fi as I,EN as ea,FP as F,Q4 as B,gM as ta,FF as sa,FK as oa,Fx as na,Fv as w,FL as ia,Fs as la,Q5 as ra,Q6 as ca,Q7 as ka,Q8 as ua,Q9 as m,ea as pa,Qa as da,Qb as ma}from"./zeni-epic-state-znLEvSss.js";import{n as Ta}from"./mui-D-cfPqvW.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-DvEC_Rfy.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-BXeQAqTk.js";import{M as ha}from"./MobileAppDrawer-DrdSJdo1.js";import"./recharts-Db9qTggV.js";import"./analytics-Dwe2jubl.js";import"./plaid-_FJLoBl-.js";import"./dnd-C8_bqxJQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-B4nk2ufU.js";import"./lexical-L3dbahzM.js";import"./pdf-vaniLLX-.js";import"./utils-DDxx6oUt.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]="c4a73224-82a9-4e2d-9bcc-1f34a5e64463",e._sentryDebugIdIdentifier="sentry-dbid-c4a73224-82a9-4e2d-9bcc-1f34a5e64463")}catch{}})();const Da=Ta.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,4 +6,4 @@ import{j as p}from"./liveblocks-CfCKAQeM.js";import{a as g}from"./sentry-131ydzJ
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,Da=O(function(e,t){const o=R(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,i=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,u=Y(e),n=Q.isZeniUser();return{taskListView:i,tagListView:u,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:c,location:i,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:n}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(n,a),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(ua(a))},onParentTaskClick:a=>{const s=L(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(F(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(w({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ka({filters:a}))},onSearchTextChanged:a=>{e(ca({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=J(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ra({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(la(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(F(t.localData.selectedTaskIds,a,ia(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(na(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ba(l,a);e(E({taskDetailLocalData:s}));const k=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),G=f(i.state?.pathnameStackToGoBack,i.pathname);o(k,{state:{pathnameStackToGoBack:G,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(oa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(sa(a,s))},onTimeSpentUpdate:(a,s)=>{e(B({task:a,updates:s}))},onShowToast:a=>{e(ta(a))},onGroupByFilterChange:a=>{e(w({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(B({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ea(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(E({taskDetailLocalData:{...aa,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(H);function va(){const e=K(),t=_(),o=z(),c=Q.getSignedInUser(),i=b(r=>X(r)),{taskGroupId:u}=q(),{useFeatureGate:n}=M(),{isFeatureEnabled:l}=n(d.isTaskTemplatesEnabled),{isFeatureEnabled:a}=n(d.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=n(d.isTaskCategorizationEnabled),{isFeatureEnabled:k}=n(d.isTaskBulkResolutionEnabled),{isFeatureEnabled:G}=n(d.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=n(d.isTaskRecurringParentEnabled),[S,P]=g.useState(!1),[$,j]=g.useState(!1),h=b(r=>R(r,l)),D=b(r=>r.taskGroupState),T=h.fetchState,{isAiCfoAccessEnabled:N,onAskAiCfoClick:U}=ga({mobileExploreReferrer:"Task Checklist"});if(fa({isDataReady:T==="Completed"}),g.useEffect(()=>{S||(P(!0),t(y(!1,l)))},[S,t]),g.useEffect(()=>{T==="Completed"&&t(x({taskGroupById:D.taskGroupById}))},[T,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return p.jsxs(p.Fragment,{children:[T==="Completed"?p.jsx(V,{analytics:W,onLoad:r=>(v=>v.trackPageLoaded(Z.Event.taskListPage))(r)}):null,p.jsxs(ha,{children:[p.jsx(Ga,{isAppContentDrawerOpen:$,handleDrawerToggle:r=>{j(r)}}),p.jsx(Da,{location:o,navigate:e,currentTenant:i,taskGroupId:u,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:G,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:N,onAskAiCfoClick:U})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,ba=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=pa(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=da(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=ma(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{va as default};
9
+ `,Ga=M(function(e,t){const o=x(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,i=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o,u=Y(e),n=R.isZeniUser();return{taskListView:i,tagListView:u,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:c,location:i,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:n}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(n,a),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(ua(a))},onParentTaskClick:a=>{const s=L(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ka({filters:a}))},onSearchTextChanged:a=>{e(ca({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=J(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ra({localData:a}))},resetLocalData:()=>{e(A({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(la(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,ia(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(na(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ba(l,a);e(S({taskDetailLocalData:s}));const k=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),h=f(i.state?.pathnameStackToGoBack,i.pathname);o(k,{state:{pathnameStackToGoBack:h,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(oa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(sa(a,s))},onTimeSpentUpdate:(a,s)=>{e(F({task:a,updates:s}))},onShowToast:a=>{e(ta(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(F({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ea(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(S({taskDetailLocalData:{...aa,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),k=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(H);function Ka(){const e=U(),t=_(),o=z(),c=R.getSignedInUser(),i=b(r=>X(r)),{taskGroupId:u}=O(),{useFeatureGate:n}=Z(),{isFeatureEnabled:l}=n(d.isTaskTemplatesEnabled),{isFeatureEnabled:a}=n(d.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=n(d.isTaskCategorizationEnabled),{isFeatureEnabled:k}=n(d.isTaskBulkResolutionEnabled),{isFeatureEnabled:h}=n(d.isTaskGroupAssigneesEnabled),{isFeatureEnabled:Q}=n(d.isTaskRecurringParentEnabled),[E,P]=g.useState(!1),[N,$]=g.useState(!1),D=b(r=>x(r,l)),G=b(r=>r.taskGroupState),T=D.fetchState,{isAiCfoAccessEnabled:j,onAskAiCfoClick:v}=ga({mobileExploreReferrer:"Task Checklist"});if(fa({isDataReady:T==="Completed"}),g.useEffect(()=>{E||(P(!0),t(y(!1,l)))},[E,t]),g.useEffect(()=>{T==="Completed"&&t(A({taskGroupById:G.taskGroupById}))},[T,G.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return p.jsxs(p.Fragment,{children:[T==="Completed"?p.jsx(q,{analytics:V,onLoad:r=>(K=>K.trackPageLoaded(W.Event.taskListPage))(r)}):null,p.jsxs(Da,{children:[p.jsx(ha,{isAppContentDrawerOpen:N,handleDrawerToggle:r=>{$(r)}}),p.jsx(Ga,{location:o,navigate:e,currentTenant:i,taskGroupId:u,taskGroupState:G,localData:D.localData,uiState:D.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:h,isTaskRecurringParentEnabled:Q,isAiCfoAccessEnabled:j,onAskAiCfoClick:v})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,ba=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=pa(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=da(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=ma(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{Ka as default};
@@ -0,0 +1,9 @@
1
+ import{j as n}from"./liveblocks-BTKJAzKw.js";import se from"./NotFoundScreen-C5GqrkuK.js";import{a as c}from"./sentry-BidZRtdZ.js";import{j as O,h as Z,g as f,u as ne,l as oe,N as ie,k as re,n as ce,o as g}from"./core-XIdi9yav.js";import{FS as M,FV as le,FY as de,eO as Q,PZ as H,Fa as J,EU as pe,FC as ue,Fv as ke,P_ as K,P$ as V,EQ as me,EN as ge,pO as fe,pC as he,k8 as Se,F0 as Ie,Q0 as Te,F5 as Ee,F2 as be,EX as Ce,Ff as Ge,Fe as De}from"./zeni-epic-state-znLEvSss.js";import{z as G,cG as Fe,w as xe,y as ye,S as E,q as W,r as j,A as je,c as z,e as we,cH as ve,f as A,aq as Re}from"./index-BFHwjIZ6.js";import{n as Pe}from"./mui-D-cfPqvW.js";import{u as Be}from"./useInitialThreadRequest-1r6joKrr.js";import{M as Ue}from"./MobileAppDrawer-DrdSJdo1.js";import Le from"./TaskListScreen-BfyHzekg.js";import"./recharts-Db9qTggV.js";import"./analytics-Dwe2jubl.js";import"./plaid-_FJLoBl-.js";import"./dnd-C8_bqxJQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-B4nk2ufU.js";import"./lexical-L3dbahzM.js";import"./pdf-vaniLLX-.js";import"./utils-DDxx6oUt.js";import"./useAskAiCfoHostNavButtonProps-DvEC_Rfy.js";import"./useFetchSuggestedQuestionsWhenReady-BXeQAqTk.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]="14196173-aa19-4ed6-a193-020eb4ac7423",e._sentryDebugIdIdentifier="sentry-dbid-14196173-aa19-4ed6-a193-020eb4ac7423")}catch{}})();function $e(){const e=O(),t=Z(),s=G.getSignedInUser(),{cannedResponses:d,fetchState:r,saveFetchState:p}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(Fe,{cannedResponses:d,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:p==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let _,q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:d}=t,r=K(e,t.taskId),p=Q(e),l=d!=null?V(e.taskGroupState,d):void 0,k=G.getSignedInUser(),a=p.tenantId,o={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:a??""},h=H(e),{tenantEmailDomain:S}=p,b=r.recurringSourceTaskId,D=b!=null?`${A.appUrl}/${S}/tasks/${encodeURIComponent(b)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:o,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=I,q=Object.values(I)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:h,taskGroupName:d!=null&&l!=null&&l.isDefault===!1?l.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(u=>V(e.taskGroupState,u)).filter(u=>u!=null&&!u.isDeleted).map(u=>({id:u.id,name:u.name,isDefault:u.isDefault}))}},function(e,t){const{taskId:s,navigate:d,currentTenant:r,location:p,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Ee(a))},onDismissClick:()=>{if(p.state?.message==="triggerBackClick"){const a=W(p.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";d(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=j(p.state?.pathnameStackToGoBack,p.pathname);d(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{d(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function y(){const e=O(),t=Z(),s=ne(),d=xe(),{taskId:r,taskGroupId:p}=oe(),l=f(i=>Q(i)),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(E.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(E.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(E.isTaskCannedResponsesEnabled),{isFeatureEnabled:b}=a(E.isTaskRecurringParentEnabled),{isFeatureEnabled:D}=a(E.isTaskGroupAssigneesEnabled),[I,u]=c.useState(!1),[v,X]=c.useState(!1),[R,Y]=c.useState(!1),[P,ee]=c.useState(!1),[B,F]=c.useState(!1),T=c.useRef(!1),C=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>H(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{v||(X(!0),t(J(!1,r)))},[v,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{P||L==="Completed"||(ee(!0),t(ue()))},[P,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),F(!0))},[t,r]);c.useEffect(()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return F(!1),void(T.current=!1);if(C==="Completed"){F(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:j(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,C,l,s,e]);const $=f(i=>K(i,r)),x=$.fetchState,N=G.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(x==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=j(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[x==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:I,handleDrawerToggle:i=>{u(i)}}),n.jsx(Ne,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{d.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:p,taskId:r,taskDetailFetchState:x,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:b,isTaskGroupAssigneesEnabled:D})]})]})}const Ve=Pe.div`
2
+ display: flex;
3
+ min-height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `,w=e=>`/${e}/tasks`;function ra(){return n.jsxs(ce,{children:[n.jsx(g,{path:"/new",element:n.jsx(y,{})}),n.jsx(g,{path:"/new/:taskGroupId",element:n.jsx(y,{})}),n.jsx(g,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(g,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(g,{path:"/:taskId",element:n.jsx(y,{})}),n.jsx(g,{path:"*",element:n.jsx(se,{})})]})}export{ra as default};
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-BTKJAzKw.js";import i from"./NotFoundScreen-C5GqrkuK.js";import{T as r}from"./TransactionDetailScreen-DVUrpN27.js";import"./sentry-BidZRtdZ.js";import{n as a,o}from"./core-XIdi9yav.js";import"./zeni-epic-state-znLEvSss.js";import"./recharts-Db9qTggV.js";import"./index-BFHwjIZ6.js";import"./mui-D-cfPqvW.js";import"./analytics-Dwe2jubl.js";import"./plaid-_FJLoBl-.js";import"./dnd-C8_bqxJQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-B4nk2ufU.js";import"./lexical-L3dbahzM.js";import"./pdf-vaniLLX-.js";import"./utils-DDxx6oUt.js";import"./useAskAiCfoHostNavButtonProps-DvEC_Rfy.js";import"./useFetchSuggestedQuestionsWhenReady-BXeQAqTk.js";import"./decodeURIComponentSafe-CqshbMyv.js";import"./routePaths-DYhINZNz.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="eb8d9915-3f2e-47a0-a713-5db167080b95",e._sentryDebugIdIdentifier="sentry-dbid-eb8d9915-3f2e-47a0-a713-5db167080b95")}catch{}})();function q(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
@@ -1,5 +1,5 @@
1
- import{j as I}from"./liveblocks-CfCKAQeM.js";import{a as d}from"./sentry-131ydzJg.js";import{h as j,g as S,u as re,j as le,l as de,N as Oe,k as Re}from"./core-uYqCzel8.js";import{bn as je,eQ as K,cQ as ue,bv as me,pQ as Q,Kq as w,Lr as pe,Ls as Y,KQ as he,jN as fe,Lt as ge,KV as Z,KW as J,kC as Se,Hp as X,Kk as x,jH as ye,jF as Te,jR as Me,Lu as $e,Lv as qe,tM as R,jM as ve,GM as Ee,cV as He,cW as We,Lw as Ke,Kj as Qe,Lx as Ye,tQ as Ze,Ly as Je,Lz as Xe,LA as ea,LB as aa,LC as ta,jQ as na,LD as oa,LE as sa,Kl as ia,LF as ca,LG as ra,LH as la,GG as da,Gu as ua,GY as ma,jS as pa,Hq as ie,GD as ha}from"./zeni-epic-state-BmAPZlsC.js";import{z as De,y as ee,S as _,aK as Ce,m as fa,Z as ga,aL as Sa,G as ya,p as H,c as Ta,aM as va,q as W,d as be,aN as Ea,aq as Da,Y as q}from"./index-CeZ7L-BQ.js";import{n as Ca,S as ba,D as Ia}from"./mui-CTbUXhla.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import{d as Ie}from"./decodeURIComponentSafe-DCnYf30M.js";import{h as ke,g as Aa,d as Ua,b as xa}from"./routePaths-vUmlDccC.js";import{t as _a}from"./utils-BkkIzijx.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]="238171c0-37da-4c92-9241-a3f155b0f25e",a._sentryDebugIdIdentifier="sentry-dbid-238171c0-37da-4c92-9241-a3f155b0f25e")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ya(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Q(e)}),[a,e]),m=S(u=>w(u,T)),C=S(u=>{const N=w(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>Y(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),M=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,B]=d.useState(!1),[F,v]=d.useState(!1),[c,z]=d.useState(!1);d.useEffect(()=>{B(!1),v(!1),z(!1)},[a,e]);const D=d.useCallback(()=>{B(!1),v(!1)},[]),[A,U]=d.useState(!1),G=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),z(!0)),p!=null&&(!i||l&&g===!1)&&(P?F||E==null||(v(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:G??E}))):(s(Z()),s(J()),B(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,F,E,G]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?U(!0):U(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:M,uncategorizedAccounts:$,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:A,setIsCreateVendorDrawerOpen:U}}const Va={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>Y(h)),y=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(wa,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...b})})})},wa=Ca(ba)`
1
+ import{j as I}from"./liveblocks-BTKJAzKw.js";import{a as d}from"./sentry-BidZRtdZ.js";import{h as j,g as S,u as re,j as le,l as de,N as Re,k as Ge}from"./core-XIdi9yav.js";import{bn as je,eO as K,cP as ue,bv as me,pt as Y,K3 as B,L4 as pe,L5 as J,Kt as he,jL as fe,L6 as ge,Ky as Z,Kz as Q,kA as Se,H2 as X,JZ as x,jF as ye,jD as Te,jP as $e,L7 as Me,L8 as qe,tp as G,jK as ve,Gp as Ee,cU as He,cV as We,L9 as Ke,JY as Ye,La as Je,tt as Ze,Lb as Qe,Lc as Xe,Ld as ea,Le as aa,Lf as ta,jO as na,Lg as oa,Lh as sa,J_ as ia,Li as ca,Lj as ra,Lk as la,Gj as da,G7 as ua,GB as ma,jQ as pa,H3 as ie,Gg as ha}from"./zeni-epic-state-znLEvSss.js";import{z as De,y as ee,S as _,aK as be,m as fa,Z as ga,aL as Sa,G as ya,q as H,k as Ta,aM as va,r as W,c as Ce,aN as Ea,aq as Da,Y as q}from"./index-BFHwjIZ6.js";import{n as ba,S as Ca,D as Ia}from"./mui-D-cfPqvW.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-DvEC_Rfy.js";import{c as La}from"./useFetchSuggestedQuestionsWhenReady-BXeQAqTk.js";import{d as Ie}from"./decodeURIComponentSafe-CqshbMyv.js";import{h as ke,g as Ua,d as Aa,b as xa}from"./routePaths-DYhINZNz.js";import{t as _a}from"./utils-DDxx6oUt.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]="258773a8-1b6f-44d1-b6ae-0b54aa072ca3",a._sentryDebugIdIdentifier="sentry-dbid-258773a8-1b6f-44d1-b6ae-0b54aa072ca3")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ja(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:y}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(_.isExpenseAutomationEnabled),{configValue:h}=n(be.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),T=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,T)),b=S(u=>{const N=B(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),L=S(u=>J(u)),V=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),$=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>fe(u.accountState,u.accountListState,"accountList")),[w,P]=d.useState(!1),[F,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{P(!1),v(!1),O(!1)},[a,e]);const D=d.useCallback(()=>{P(!1),v(!1)},[]),[U,A]=d.useState(!1),z=V?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(w?F||E==null||(v(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:z??E}))):(s(Z()),s(Q()),P(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,w,F,E,z]),d.useEffect(()=>{L.newVendorState?.vendorDetailLocalData?.vendorName!=null?A(!0):A(!1)},[L.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:y,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:T,transactionDetail:m,vendorSaveStatus:b,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:L,uiState:V,firstMonthOfFY:$,uncategorizedAccounts:M,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:A}}const Va={overlayWidth:new ya(100,100,58)},Pa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>J(h)),y=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(Te()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:h=>{l(ye({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:I.jsx(Ba,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...C})})})},Ba=ba(Ca)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
- `,Pa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=j(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),y=e??g,b=s??Ie(l??"");let h;ke(y,b)&&(h={id:y,type:Q(b)});const f=h!=null?S(T=>w(T,h)):void 0,k=()=>{const T=H(t.state?.pathnameStackToGoBack),m=T.poppedPathname??((C=2)=>{let p="../";for(let E=0;E<C;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:T.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const T=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},C={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(R(m,f?.transaction?.amount.amount,C,!1,!1,i))}k()},onCancel:()=>{h!=null&&o($e({transactionId:h})),o(Te()),o(qe()),a(!0),k()}}},Fa=Re(function(a,e){const s=w(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ke(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Qe(a,"common"),y=K(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${q}/transaction_attachment`,transactionAttachmentsEndpointToFetch:y.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${q}/transaction_attachments_accounting_provider`:`${q}/transaction_attachments`,attachmentUploadEndpoint:`${Da.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=H(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ha({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(Z()),a(J());const n=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(xa(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(X(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):pa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(x("common"))},onUploadAttachmentAttachment:t=>{a(ma(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ua(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(da({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(la(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(ra(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ca({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=H(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=_a(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Aa(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ia({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(R(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(sa(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(oa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(na({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(R(o,i,l,!1,!1,s)),a(ye({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,y=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:y}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(ta({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(R(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(aa({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(Xe(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Je({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Ye(t,n,o))}}})(Ea);function Za(){const a=le(),e=j(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ta(),i=S(r=>K(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),y=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(_.isExpenseAutomationEnabled),{configValue:f}=n(Ce.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:m,transactionId:C}=de(),[p,E]=d.useState(!1),L=Ie(m??""),V=ke(C,L),M=S(r=>r.transactionVendorViewState),$=ae(),{isFeatureEnabled:P}=t(_.isTransactionCommentingEnabled),B=o?.currentTenant?.companyId,F=o?.currentTenant?.companyName;let v;V&&(v={id:C,type:Q(L)});const c=v!=null?S(r=>w(r,v)):void 0,z=c?.transactionDetailLocalData.vendorUpdates?.id!=null?M.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,A=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),U=S(r=>Y(r)),G=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,N=S(r=>fe(r.accountState,r.accountListState,"accountList")),[Ue,te]=d.useState(!1),[xe,ne]=d.useState(!1),[_e,Ve]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Be=va();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=W(s.state?.pathnameStackToGoBack,s.pathname),O={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Be&&(O.message="expenseAutomation",O.origin="transaction_categorization",O.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:O})}},[v]),d.useEffect(()=>{_e||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&y===!1)&&(Ue?xe||A==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:G?.selectedPeriod?.timePeriod??A}))):(e(Z()),e(J()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,A,l]),d.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("common"))},[]);const we=[m,C].filter(r=>r!=null),{transactionId:se,onSaveVendor:Pe,onSaveSuccess:Fe,onCancel:ze}=Pa({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:Ge,onAskAiCfoClick:Ne}=ka({mobileExploreReferrer:"Transaction Details"});return La({isDataReady:c?.fetchState==="Completed"}),V?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(Ba,{isOpen:p,transactionId:se,onSaveVendor:Pe,onSaveSuccess:Fe,onCancel:ze}),I.jsx(Fa,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:T,location:s,navigate:a,selectedTransaction:v,entity:D,isCOTEnabled:$,defaultTrendTransactionTimePeriod:A,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:z,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:Ge,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:P,companyId:B,companyName:F})]}):I.jsx(Oe,{to:Ae(we.length)})}const Ae=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=za(a),t=Ga(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},za=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Ga=a=>He(a)===!0?a.customer?.name??"":We(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Ba as C,Za as T,Pa as a,Fa as b,ae as c,Ya as u};
5
+ `,wa=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=j(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),y=e??g,C=s??Ie(l??"");let h;ke(y,C)&&(h={id:y,type:Y(C)});const f=h!=null?S(T=>B(T,h)):void 0,k=()=>{const T=H(t.state?.pathnameStackToGoBack),m=T.poppedPathname??((b=2)=>{let p="../";for(let E=0;E<b;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:T.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const T=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},b={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,f?.transaction?.amount.amount,b,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Me({transactionId:h})),o(Te()),o(qe()),a(!0),k()}}},Fa=Ge(function(a,e){const s=B(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=De.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ke(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Ye(a,"common"),y=K(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${q}/transaction_attachment`,transactionAttachmentsEndpointToFetch:y.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${q}/transaction_attachments_accounting_provider`:`${q}/transaction_attachments`,attachmentUploadEndpoint:`${Da.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:Ce,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(x("common")),e.onBackClick!=null)return void e.onBackClick();const t=H(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ha({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(Z()),a(Q());const n=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(xa(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(X(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):pa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(x("common"))},onUploadAttachmentAttachment:t=>{a(ma(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(ua(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(da({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(la(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(ra(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(ca({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=H(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=_a(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Ua(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${Aa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ia({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(x("common"))},onCancelAutoComplete:()=>{a(x("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(sa(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(oa(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(na({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s)),a(ye({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,y=W(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:y}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(ta({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(aa({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ea(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(Xe(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(Qe({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Je(t,n,o))}}})(Ea);function Za(){const a=le(),e=j(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ta(),i=S(r=>K(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),y=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:C}=t(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(_.isExpenseAutomationEnabled),{configValue:f}=n(be.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:m,transactionId:b}=de(),[p,E]=d.useState(!1),L=Ie(m??""),V=ke(b,L),$=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:w}=t(_.isTransactionCommentingEnabled),P=o?.currentTenant?.companyId,F=o?.currentTenant?.companyName;let v;V&&(v={id:b,type:Y(L)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?$.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=c?.fetchState==="Completed"?Le(c?.transaction):void 0,U=S(r=>D!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,D,"month"):void 0),A=S(r=>J(r)),z=S(r=>D!=null?he(r.trendWithTransactionsState,D,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,N=S(r=>fe(r.accountState,r.accountListState,"accountList")),[Ae,te]=d.useState(!1),[xe,ne]=d.useState(!1),[_e,Ve]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Pe=va();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=W(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Pe&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[v]),d.useEffect(()=>{_e||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),Ve(!0)),D==null&&c?.fetchState==="Completed"&&ce(c?.transaction),D!=null&&(!l||g&&y===!1)&&(Ae?xe||U==null||(ne(!0),e(X(D,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(Z()),e(Q()),ce(c?.transaction),te(!0),e(Se(D))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(x("common"))},[]);const Be=[m,b].filter(r=>r!=null),{transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Oe}=wa({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ne}=ka({mobileExploreReferrer:"Transaction Details"});return La({isDataReady:c?.fetchState==="Completed"}),V?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(Pa,{isOpen:p,transactionId:se,onSaveVendor:we,onSaveSuccess:Fe,onCancel:Oe}),I.jsx(Fa,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:T,location:s,navigate:a,selectedTransaction:v,entity:D,isCOTEnabled:M,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:C,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:ze,onAskAiCfoClick:Ne,isTransactionCommentingEnabled:w,companyId:P,companyName:F})]}):I.jsx(Re,{to:Ue(Be.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=Oa(a),t=za(a);Ce.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},Oa=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},za=a=>He(a)===!0?a.customer?.name??"":We(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{Pa as C,Za as T,wa as a,Fa as b,ae as c,Ja as u};
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-CfCKAQeM.js";import{j as q,u as R,h as J,l as H,g as j,N as z,k as Q,n as Ae,o as b}from"./core-uYqCzel8.js";import{eQ as $,i$ as T,OP as Z,Hg as ue,bq as ie,OQ as Se,jC as K,KS as W,OR as se,OS as he,bE as x,Hd as me,OT as ke,OU as re,OV as Ie,OW as pe,OX as be,OY as ve,OZ as de,It as Ye,bn as xe}from"./zeni-epic-state-BmAPZlsC.js";import{D as X,d as M,c6 as ee,q as w,p as te,y as fe,S as N,U as Ee,z as Pe}from"./index-CeZ7L-BQ.js";import"./mui-CTbUXhla.js";import{a as y}from"./sentry-131ydzJg.js";import{w as ae}from"./withTransactionSidePanel-BS7S2wn5.js";import{p as ne,b as ce}from"./routePaths-vUmlDccC.js";import{u as Oe}from"./utils-BkkIzijx.js";import{d as O}from"./decodeURIComponentSafe-DCnYf30M.js";import{Z as je}from"./ZeniAccountStatementScreen-C8feQjoH.js";import"./recharts-BUFoogHS.js";import"./analytics-CgRNtlDm.js";import"./plaid-Bio3MiLm.js";import"./dnd-BSWou54V.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dc_IH0fS.js";import"./lexical-DbCoEckm.js";import"./pdf-O9N1jd2N.js";import"./useAskAiCfoHostNavButtonProps-D4_eEE1f.js";import"./useFetchSuggestedQuestionsWhenReady-b8cA6qxS.js";import"./TransactionDetailScreen--PMkud8g.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]="bb10428a-83e2-420c-8c1c-d73f43c029a0",a._sentryDebugIdIdentifier="sentry-dbid-bb10428a-83e2-420c-8c1c-d73f43c029a0")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],G=a=>Oe(a),ze=Q(function(a,e){const t=Se(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=G(e.selectedAccount.tranListType),r=Be(t,n,c,s,e.bookCloseDate);M.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:G(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),_=ae(function({...a}){const e=q(),t=R(),n=J(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=H(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:S}=Me(o),h="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Ce(o,D,k.bookCloseDate),[E,C]=y.useState(!1),[Y,B]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:Z(p),title:A,subTitle:S,timeframe:h,period:d}},[o,h,p,g]);y.useEffect(()=>{if(!E&&l!=null){C(!0),M.trackTransactionList(void 0,void 0,void 0,l.title);const d=G(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(z,{to:"../"}):i.jsx(ze,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>B(d),...a})}),Me=a=>{let e="",t="";const n=X.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:""}},Ce=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Fe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),_e=ae(function({referrerType:a,...e}){const t=q(),n=R(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:S,endDate:h,titleEncoded:k}=H(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),C=j(f=>he(f.transactionListState,g,D,v)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=Ge(D,g,v,A,S,h,E);if(m){const f={startDate:x(S,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},U=we(C?.dateRange,f);u={accountId:g,accountType:Z(D),classId:v,title:E,timeframe:A,period:U}}y.useEffect(()=>{Y||u==null||(B(!0),M.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,S,h,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(z,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Ue(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=q(),n=R(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:S,titleEncoded:h,excludeSubAccounts:k}=H(),D=O(s??""),g=O(r??""),v=O(h??""),E=!(k!=null&&k==="exclude_subaccounts"),C=j(I=>Ie(I.transactionListState,g,D)),[Y,B]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,S,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},ye=Ve(C?.dateRange,I);m={accountId:g,accountType:Z(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:U}=f(N.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(B(!0),M.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,S,h].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:U,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Ue=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(N.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(N.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(_,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(_,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(_e,{referrerType:a})})]})}export{pt as default};
1
+ import{j as i}from"./liveblocks-BTKJAzKw.js";import{j as N,u as R,h as U,l as Z,g as j,N as C,k as H,n as Ae,o as b}from"./core-XIdi9yav.js";import{eO as $,iZ as T,Os as K,GV as ue,bq as ie,Ot as he,jA as Q,Kv as W,Ou as se,Ov as Se,bD as x,GS as me,Ow as ke,Ox as re,Oy as Ie,Oz as pe,OA as be,OB as ve,OC as de,I6 as Ye,bn as xe}from"./zeni-epic-state-znLEvSss.js";import{D as X,c as z,c6 as ee,r as w,q as te,y as fe,S as J,V as Ee,z as Pe}from"./index-BFHwjIZ6.js";import"./mui-D-cfPqvW.js";import{a as y}from"./sentry-BidZRtdZ.js";import{w as ae}from"./withTransactionSidePanel-_oROnP2L.js";import{p as ne,b as ce}from"./routePaths-DYhINZNz.js";import{u as Oe}from"./utils-DDxx6oUt.js";import{d as O}from"./decodeURIComponentSafe-CqshbMyv.js";import{Z as je}from"./ZeniAccountStatementScreen-z63ZBClm.js";import"./recharts-Db9qTggV.js";import"./analytics-Dwe2jubl.js";import"./plaid-_FJLoBl-.js";import"./dnd-C8_bqxJQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-B4nk2ufU.js";import"./lexical-L3dbahzM.js";import"./pdf-vaniLLX-.js";import"./useAskAiCfoHostNavButtonProps-DvEC_Rfy.js";import"./useFetchSuggestedQuestionsWhenReady-BXeQAqTk.js";import"./TransactionDetailScreen-DVUrpN27.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]="2b92ecf5-ae50-496d-95fc-093f9272c83f",a._sentryDebugIdIdentifier="sentry-dbid-2b92ecf5-ae50-496d-95fc-093f9272c83f")}catch{}})();const Le=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Oe(a),Ce=H(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Q(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=_(e.selectedAccount.tranListType),r=Me(t,n,c,s,e.bookCloseDate);z.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:_(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(ee),G=ae(function({...a}){const e=N(),t=R(),n=U(),c=t.pathname.split("/").find(d=>Le.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=Z(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:h}=ze(o),S="month",k=j(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Be(o,D,k.bookCloseDate),[E,B]=y.useState(!1),[Y,M]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:K(p),title:A,subTitle:h,timeframe:S,period:d}},[o,S,p,g]);y.useEffect(()=>{if(!E&&l!=null){B(!0),z.trackTransactionList(void 0,void 0,void 0,l.title);const d=_(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&Y!=null&&(P={...l,period:Y}),c==null||P==null?i.jsx(C,{to:"../"}):i.jsx(Ce,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>M(d),...a})}),ze=a=>{let e="",t="";const n=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Be=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Me=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Fe=H(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Q(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Ge=ae(function({referrerType:a,...e}){const t=N(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:h,endDate:S,titleEncoded:k}=Z(),D=O(s??""),g=O(r??""),v=O(p??""),E=O(k??""),B=j(f=>Se(f.transactionListState,g,D,v)),[Y,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=_e(D,g,v,A,h,S,E);if(m){const f={startDate:x(h,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},q=we(B?.dateRange,f);u={accountId:g,accountType:K(D),classId:v,title:E,timeframe:A,period:q}}y.useEffect(()=>{Y||u==null||(M(!0),z.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let L=u;u!=null&&l!=null&&(L={...u,period:l});const F=[s,r,p,A,h,S,k].filter(f=>f!=null);return m&&L!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(C,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},_e=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=H(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:Q(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=qe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=N(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:h,titleEncoded:S,excludeSubAccounts:k}=Z(),D=O(s??""),g=O(r??""),v=O(S??""),E=!(k!=null&&k==="exclude_subaccounts"),B=j(I=>Ie(I.transactionListState,g,D)),[Y,M]=y.useState(!1),[l,P]=y.useState(void 0),d=j(I=>$(I)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const L=$e(D,g,p,A,h,v);if(L){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},ye=Ve(B?.dateRange,I);m={accountId:g,accountType:K(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:q}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!Y&&m!=null&&oe&&(M(!0),z.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[Y,m,c,oe]);const ge=[s,r,p,A,h,S].filter(I=>I!=null);return L&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:q,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>P(I),...e}):i.jsx(C,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),qe=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(J.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Ge,{referrerType:a})})]})}export{pt as default};