@zeniai/web-app-ui 5.3.52-qa → 5.3.53-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/dist/assets/{AccountMappingScreen-BFD6zGSo.js → AccountMappingScreen-B05quPfB.js} +2 -2
  2. package/dist/assets/{ActualMatchingMatchDetailScreen--CUkwe-7.js → ActualMatchingMatchDetailScreen-D94Dqvel.js} +1 -1
  3. package/dist/assets/AddressRoutes-BBXKWkgP.js +1 -0
  4. package/dist/assets/AddressScreen-DkOVp1Il.js +9 -0
  5. package/dist/assets/AiCfoScreen-Dj6jKppq.js +22 -0
  6. package/dist/assets/{AppDrawer-BioYAA8q.js → AppDrawer-DB1lzCTO.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-CbgUcPPn.js → BillPayApprovalRoutes-vJIdZGym.js} +1 -1
  8. package/dist/assets/BillPayRoutes-Ie8KE_Pm.js +119 -0
  9. package/dist/assets/{BusinessVerificationPageScreen-_lNpLbtb.js → BusinessVerificationPageScreen-Bh9Wow-A.js} +2 -2
  10. package/dist/assets/CardsAiCfoScreen-Hsh2FpvU.js +14 -0
  11. package/dist/assets/{ChargeCardRoutes-Cm8gRyWo.js → ChargeCardRoutes-0m2CNq4x.js} +8 -8
  12. package/dist/assets/CompanyPassportScreen-Cvbu6LUT.js +1 -0
  13. package/dist/assets/{ConnectionAuthScreen-CvbL5gXS.js → ConnectionAuthScreen-CRvnQSlr.js} +2 -2
  14. package/dist/assets/CustomerOnboardingAuthScreen-SW-uc7QE.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-CFt1axWu.js → CustomerOnboardingRoutes-kZOJ1QhA.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-B_RKHDQw.js → DashboardRoutes-DTB-wwS1.js} +3 -3
  17. package/dist/assets/{DefaultTenantHome-CzERteR_.js → DefaultTenantHome-CTOQPic5.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-DdGRU08t.js → DomesticWireDetailScreen-DgaHcUL_.js} +3 -3
  19. package/dist/assets/{DrawerScreen-BkWdrsyD.js → DrawerScreen-BeSv1Aix.js} +1 -1
  20. package/dist/assets/EntityDetailRoutes-D5eIJPR7.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-90qVj0mK.js → ExpenseAutomationRoutes-DHppK74x.js} +7 -7
  22. package/dist/assets/FeaturePreviewScreen-vWprV4-Z.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-CThBYwg5.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-Bd8tLMl8.js → InboxNotificationsProvider-D6QvVVj8.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-CexYyC5q.js → InvoicingRoutes-DvFmEcE9.js} +2 -2
  26. package/dist/assets/MagicLinkRoutes-B1yYt0y7.js +72 -0
  27. package/dist/assets/MagicLinkSignInScreen-CZM8ZeV4.js +12 -0
  28. package/dist/assets/MobileAppDrawer-D3MVdjfj.js +1 -0
  29. package/dist/assets/NotFoundScreen-BG5HsGgf.js +1 -0
  30. package/dist/assets/{NotificationRoutes-bEJ4pL_q.js → NotificationRoutes-3MhigWw8.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-CH9GHZTu.js → OAuthConsentScreen-Br6J-Kjw.js} +1 -1
  32. package/dist/assets/PandLWithForecastRoutes-BT242PEu.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-Dgt4_0Sf.js → PaymentLinkScreen-D304LK9q.js} +4 -4
  34. package/dist/assets/{PeopleRoutes-B9g6bB_r.js → PeopleRoutes-Cs1oFIJn.js} +5 -5
  35. package/dist/assets/PerformanceRoutes-DevypuzE.js +1 -0
  36. package/dist/assets/{Preview-Bt5Z89U4.js → Preview-CDuSXomS.js} +1 -1
  37. package/dist/assets/QBOConnectionScreen-CXR9MUeu.js +100 -0
  38. package/dist/assets/ReimbursementApprovalRoutes-CADwX7m0.js +1 -0
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-uAvwHmVJ.js → ReimbursementApprovalRuleDetailScreen-C__AcyMO.js} +1 -1
  40. package/dist/assets/ReimbursementRoutes-DE9--ARn.js +68 -0
  41. package/dist/assets/{ReportsRoutes-ByrzWoSX.js → ReportsRoutes-B_EvlWob.js} +1 -1
  42. package/dist/assets/RewardsRoutes-fsFKnuDQ.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CcW917MW.js → ScheduleDetailsPrepaidExpensesScreen-270QQSkr.js} +5 -5
  44. package/dist/assets/ScreenRoutes-B0DNEVGO.js +2 -0
  45. package/dist/assets/{SettingsRoutes-DCgOWsFJ.js → SettingsRoutes-DjTGDDEp.js} +6 -6
  46. package/dist/assets/{SetupPagesScreen-CgVfrQ5w.js → SetupPagesScreen-mQ33CI-8.js} +5 -5
  47. package/dist/assets/SignInScreen-BVOxylXT.js +1 -0
  48. package/dist/assets/SignOutScreen-BXBPUD_K.js +9 -0
  49. package/dist/assets/TaskListScreen-_mHmu42Q.js +9 -0
  50. package/dist/assets/TaskRoutes-DRFV_DYt.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-BqJM9clh.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-DHysjIND.js → TransactionDetailScreen-Dmc1SB66.js} +2 -2
  53. package/dist/assets/TransactionListRoutes-2uPIfsci.js +1 -0
  54. package/dist/assets/{TreasuryRoutes-0_eMw0Wx.js → TreasuryRoutes-C62UHGaV.js} +3 -3
  55. package/dist/assets/{VendorsRoutes-B3eT8rLn.js → VendorsRoutes-Dp-COjet.js} +12 -12
  56. package/dist/assets/WiseConfirmationScreen-DEQwqZwF.js +12 -0
  57. package/dist/assets/{ZeniAccountRoutes-BNdYEOcI.js → ZeniAccountRoutes-DjudE9ka.js} +11 -11
  58. package/dist/assets/ZeniAccountStatementScreen-fuK8OSl5.js +9 -0
  59. package/dist/assets/{accountMappingHelper-DQktkWkn.js → accountMappingHelper-DNRaFM1C.js} +1 -1
  60. package/dist/assets/{analytics-GZ8dIY_c.js → analytics-Y9Rn1Gu7.js} +1 -1
  61. package/dist/assets/analyticsHelper-Czpx502m.js +1 -0
  62. package/dist/assets/{core-DOBELRta.js → core-Dh_SHcAD.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-DjVlhgki.js → decodeURIComponentSafe-B9wRnGXi.js} +1 -1
  64. package/dist/assets/{dnd-0MaFz9wL.js → dnd-CwwWYFuT.js} +1 -1
  65. package/dist/assets/{empty-DsXUnWhI.js → empty-BT_7GI6y.js} +1 -1
  66. package/dist/assets/{empty-C3pt8GU3.js → empty-XI8MiQF0.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-DObxt-h2.js → emptyVideoElement-JNmKZqZz.js} +1 -1
  68. package/dist/assets/epic-COW9EFJg.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-jy143DnO.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-U4ff53sp.js → getLocaleForTenant-BTnTjmTv.js} +1 -1
  71. package/dist/assets/{index-px1SxWJw.js → index-8Q8Cb_pA.js} +1 -1
  72. package/dist/assets/index-B23hmQHl.js +1 -0
  73. package/dist/assets/{index-BmFszw0H.js → index-C4rZANm7.js} +1 -1
  74. package/dist/assets/{index-D0or4oV9.js → index-CHaKE3QQ.js} +12169 -12162
  75. package/dist/assets/{index-rIJ81ix1.js → index-D3h8toFn.js} +1 -1
  76. package/dist/assets/{index-1mAhqt2L.js → index-DOYaY83A.js} +1 -1
  77. package/dist/assets/{index-JlXkO7-y.js → index-DTprL6g9.js} +1 -1
  78. package/dist/assets/{index-F4l7OCjI.js → index-D_bKIveY.js} +2 -2
  79. package/dist/assets/{lexical-CAgOy6Q-.js → lexical-CaftfZ9D.js} +1 -1
  80. package/dist/assets/{liveblocks-BPL36a6x.js → liveblocks-DR8KfETq.js} +1 -1
  81. package/dist/assets/{lottie-38LSfraF.js → lottie-ODKvpFjz.js} +1 -1
  82. package/dist/assets/{mui-wO6EIETx.js → mui-BYn_Ugho.js} +1 -1
  83. package/dist/assets/{pathToGoBack-BTiQNxwp.js → pathToGoBack-BiqpVJeS.js} +1 -1
  84. package/dist/assets/{pdf-B2N0erO1.js → pdf-DnQo5-Qw.js} +3 -3
  85. package/dist/assets/{pdf-lib-Ct6vdrHd.js → pdf-lib-DdZd3IiB.js} +1 -1
  86. package/dist/assets/{plaid-C-eBmVPr.js → plaid-Dw8l1kdg.js} +1 -1
  87. package/dist/assets/{pusher-Qt-2jBy4.js → pusher-CewboUYG.js} +1 -1
  88. package/dist/assets/{react-D0sfM7Iy.js → react-8By583h-.js} +1 -1
  89. package/dist/assets/{react-DSWUEYTa.js → react-B8IvMjeE.js} +1 -1
  90. package/dist/assets/{react-BogDsHCA.js → react-BgmP_PBP.js} +1 -1
  91. package/dist/assets/{react-ByoUrZyD.js → react-CWd2ZkNi.js} +1 -1
  92. package/dist/assets/{react-9dynYr-j.js → react-gSPYEWZo.js} +1 -1
  93. package/dist/assets/{react-ofgvrscL.js → react-ygIo2ccY.js} +1 -1
  94. package/dist/assets/{recharts-Sp9X2zHo.js → recharts-BTL88W4R.js} +1 -1
  95. package/dist/assets/{routePaths-DTZH71MW.js → routePaths-DXpM4tZj.js} +1 -1
  96. package/dist/assets/{sentry-_x3Yh1Jc.js → sentry-FwaDhTzy.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-bz-VGo3l.js → stripSplatSuffix-CvpfThkG.js} +1 -1
  98. package/dist/assets/{url-DBFa8kl5.js → url-DHu7Ejzz.js} +1 -1
  99. package/dist/assets/{url-DW2CK7rX.js → url-DybJ-sxa.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-uLKulkDS.js +1 -0
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BHQEdJfL.js → useAiCfoDashboardSuggestedQuestionsChips-CJfIwtxx.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-PLm72Ozi.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-CLlJNBdI.js → useChargeCardPusherEvents-LUqnb4UF.js} +1 -1
  104. package/dist/assets/{useDeviceId-EJu2KjP1.js → useDeviceId-CUJxM_KE.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-CKnBwo84.js +1 -0
  106. package/dist/assets/{useInitialThreadRequest-DYGeNL0J.js → useInitialThreadRequest-DLA6PIFe.js} +1 -1
  107. package/dist/assets/{useTaskManagerAccess-CxAfFVI5.js → useTaskManagerAccess-D4PJ1zkK.js} +1 -1
  108. package/dist/assets/useTaskManagerPusherEvents-DchZU-tO.js +1 -0
  109. package/dist/assets/utils-DEAaFgLU.js +36 -0
  110. package/dist/assets/{withTransactionSidePanel-CQ96RPah.js → withTransactionSidePanel-DLRTZIl6.js} +6 -6
  111. package/dist/assets/{zeni-epic-state-DXFYDM66.js → zeni-epic-state-DJh0-ZeR.js} +5 -5
  112. package/dist/index.html +1 -1
  113. package/package.json +3 -3
  114. package/dist/assets/AddressRoutes-IFU8jeyM.js +0 -1
  115. package/dist/assets/AddressScreen-C5gOC9K1.js +0 -9
  116. package/dist/assets/AiCfoScreen-Dk4NZsn4.js +0 -22
  117. package/dist/assets/BillPayRoutes-BLaPoSH3.js +0 -119
  118. package/dist/assets/CardsAiCfoScreen-_v8KOvIs.js +0 -14
  119. package/dist/assets/CompanyPassportScreen-LNhKVlPD.js +0 -1
  120. package/dist/assets/CustomerOnboardingAuthScreen-1_BAWSpj.js +0 -1
  121. package/dist/assets/EntityDetailRoutes-BJQ1CgrE.js +0 -1
  122. package/dist/assets/FeaturePreviewScreen-DmuM1Efe.js +0 -1
  123. package/dist/assets/HubSpotOAuthCallbackScreen-D5Csp1UO.js +0 -1
  124. package/dist/assets/MagicLinkRoutes-JEaRIrxB.js +0 -72
  125. package/dist/assets/MagicLinkSignInScreen-DwZW3Erw.js +0 -12
  126. package/dist/assets/MobileAppDrawer-C-ti4sM2.js +0 -1
  127. package/dist/assets/NotFoundScreen-3qucmnjW.js +0 -1
  128. package/dist/assets/PandLWithForecastRoutes-BuxQksyO.js +0 -1
  129. package/dist/assets/PerformanceRoutes-hC8UVG3D.js +0 -1
  130. package/dist/assets/QBOConnectionScreen-BT2gd9dq.js +0 -100
  131. package/dist/assets/ReimbursementApprovalRoutes-CoFA16rX.js +0 -1
  132. package/dist/assets/ReimbursementRoutes-BnvmE75X.js +0 -68
  133. package/dist/assets/RewardsRoutes-BrjKJijg.js +0 -1
  134. package/dist/assets/ScreenRoutes-BgjTH3MD.js +0 -2
  135. package/dist/assets/SignInScreen-QbBLEpYE.js +0 -1
  136. package/dist/assets/SignOutScreen-Cg98jLSX.js +0 -9
  137. package/dist/assets/TaskListScreen-BKRaew41.js +0 -9
  138. package/dist/assets/TaskRoutes-tj9-zwIR.js +0 -9
  139. package/dist/assets/TransactionDetailRoutes-BSNaBZbG.js +0 -1
  140. package/dist/assets/TransactionListRoutes-BcKO42ff.js +0 -1
  141. package/dist/assets/WiseConfirmationScreen-DJ2wN1Fx.js +0 -12
  142. package/dist/assets/ZeniAccountStatementScreen-Cua_2c_y.js +0 -9
  143. package/dist/assets/analyticsHelper-DnGDW6mo.js +0 -1
  144. package/dist/assets/epic-BqUfEKD1.js +0 -2
  145. package/dist/assets/expenseAutomationHelper-CRKfrxDD.js +0 -1
  146. package/dist/assets/index-C_zqEcVM.js +0 -1
  147. package/dist/assets/useActualMatchingMatchDetail-CtxH6NWw.js +0 -1
  148. package/dist/assets/useAskAiCfoHostNavButtonProps-eAE85_k_.js +0 -1
  149. package/dist/assets/useEmailConnectResultRefresh-DfrDVqu0.js +0 -1
  150. package/dist/assets/utils-BU0XThgM.js +0 -36
@@ -1 +0,0 @@
1
- import{j as o}from"./liveblocks-BPL36a6x.js";import Z from"./NotFoundScreen-3qucmnjW.js";import{a as p}from"./sentry-_x3Yh1Jc.js";import{h as C,g as D,u as N,j as u,N as V,l as k,n as z,o as b}from"./core-DOBELRta.js";import{fF as E,YZ as h,Ze as w,Nz as U,Nv as B,Ny as f,No as L,ZD as T,Ns as F,NB as K}from"./zeni-epic-state-DXFYDM66.js";import{z as $,w as O,ca as Y,o as W,bT as q,cb as G}from"./index-D0or4oV9.js";import"./mui-wO6EIETx.js";import{u as H,R as x}from"./ReimbursementApprovalRuleDetailScreen-uAvwHmVJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="603fc8c3-9a0c-412f-9dfe-2888a6173c86",e._sentryDebugIdIdentifier="sentry-dbid-603fc8c3-9a0c-412f-9dfe-2888a6173c86")}catch{}})();const A="reimbursement-approval-rule-update",J=k((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(Y)),M=({isLoading:e})=>{const s=C(),n=D(),a=N(),[t,l]=p.useState(!1),[v,y]=p.useState(!1),S=u((r=>r.remiSetupApproverViewState.fetchState)),c=u((r=>E(r))),d=u((r=>h(r))),g=u((r=>w(r).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{g?.updateStatus.fetchState==="Completed"&&a(U())}),[g]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!1)))}),[t,S,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(y(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${A}`]:[],eventCallback:(r,R,j)=>{r.endsWith(A)&&j.onApprovalRulesEventReceived(r)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(V,{to:"../../promo"}):o.jsx(J,{currentTenant:c,location:n,navigate:s,...m})},I="reimbursement-approval-rule-update",P=k((function(e){const s=h(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(T(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))(O(G)),Q=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=q(e?.tenantId);return s?o.jsx(X,{isLoading:n}):o.jsx(M,{isLoading:n})},X=({isLoading:e})=>{const s=C(),n=D(),a=N(),[t,l]=p.useState(!1),[v,y]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),g=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),r=u((i=>h(i)));H();const R=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{R?.updateStatus.fetchState==="Completed"&&a(U())}),[R]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||g!=="Not-Started"||e||(y(!0),a(F(!1,!0)))}),[v,g,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,r,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${I}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(I)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(V,{to:"../../promo"}):o.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return o.jsxs(z,{children:[o.jsx(b,{path:"/",element:o.jsx(Q,{})}),o.jsx(b,{path:"/new",element:o.jsx(x,{})}),o.jsx(b,{path:"/:approvalRuleId/edit",element:o.jsx(x,{})}),o.jsx(b,{path:"*",element:o.jsx(Z,{})})]})}export{le as R};
@@ -1,68 +0,0 @@
1
- import{j as s}from"./liveblocks-BPL36a6x.js";import{u as ae,j as v,h as X,g as K,i as ie,N as M,l as ee,q as ct,n as dt,o as w}from"./core-DOBELRta.js";import{fF as V,Nv as ut,_I as ge,c8 as he,MB as Le,ma as pt,MQ as ce,MP as de,_J as bt,bn as fe,gV as _e,_K as gt,WI as ht,l$ as $e,WJ as Ce,WK as ft,kN as St,YL as It,l0 as yt,Mp as Rt,C9 as vt,kU as At,Na as Me,_L as Pe,_M as Ee,_N as kt,_O as Ct,_P as Et,MW as we,l6 as wt,YU as xt,MO as Bt,Mz as Tt,_Q as Dt,My as jt,_R as Ft,MG as xe,M_ as Ut,MZ as Lt,MV as _t,_S as Ne,S8 as $t,bo as Mt,MJ as Pt,Ns as Nt,_T as Ot,_U as zt,N6 as Zt,N3 as Be,Yf as Gt,Mw as Vt,_V as Oe,NV as Te,O1 as Wt,_W as Ht,_X as J,_Y as Yt,_Z as ze,__ as Jt,_$ as Ze,$0 as Ge,Ni as ue,bu as qt,bK as Se,cM as Ie,d_ as Ve,dZ as We,$1 as Kt,gh as Qt,Ys as Xt,$2 as en,$3 as He,Yw as tn,Ze as nn,$4 as an,ZD as sn,N_ as De,NZ as on,$5 as rn,$6 as ln,$7 as mn,$8 as cn,$9 as dn,Y_ as un,NQ as pn,NU as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,U7 as yn,da as Rn,dd as vn,dc as An,cF as kn}from"./zeni-epic-state-DXFYDM66.js";import{bT as Cn,R as Ye,a2 as Je,c as oe,A as x,z as _,cS as qe,a9 as re,k as C,aT as je,I as F,af as se,ag as En,G as Ke,cT as wn,p as q,at as Qe,cU as xn,N as le,cV as Bn,ar as Tn,ac as Dn,a8 as ye,V as Xe,w as jn,bB as Fn,aw as Un,aj as Ln,E as et,cW as _n,h as $n}from"./index-D0or4oV9.js";import{n as P,S as Mn}from"./mui-wO6EIETx.js";import pe from"./NotFoundScreen-3qucmnjW.js";import{S as Fe}from"./SetupPagesScreen-CgVfrQ5w.js";import{F as tt}from"./FeaturePreviewScreen-DmuM1Efe.js";import{a as h}from"./sentry-_x3Yh1Jc.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-eAE85_k_.js";import{u as nt}from"./useInitialThreadRequest-DYGeNL0J.js";import{D as Pn}from"./DrawerScreen-BkWdrsyD.js";import{M as at}from"./MobileAppDrawer-C-ti4sM2.js";import{F as Nn}from"./ScreenRoutes-BgjTH3MD.js";import{R as On}from"./ReimbursementApprovalRoutes-CoFA16rX.js";import"./recharts-Sp9X2zHo.js";import"./analytics-GZ8dIY_c.js";import"./plaid-C-eBmVPr.js";import"./dnd-0MaFz9wL.js";import"./stripe-cKAAJElX.js";import"./lottie-38LSfraF.js";import"./lexical-CAgOy6Q-.js";import"./pdf-B2N0erO1.js";import"./utils-BU0XThgM.js";import"./BusinessVerificationPageScreen-_lNpLbtb.js";import"./routePaths-DTZH71MW.js";import"./analyticsHelper-DnGDW6mo.js";import"./InboxNotificationsProvider-Bd8tLMl8.js";import"./useTaskManagerAccess-CxAfFVI5.js";import"./getLocaleForTenant-U4ff53sp.js";import"./ReimbursementApprovalRuleDetailScreen-uAvwHmVJ.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]="38e3ae69-a604-4dfd-ad7d-1f9a2a9cc2da",e._sentryDebugIdIdentifier="sentry-dbid-38e3ae69-a604-4dfd-ad7d-1f9a2a9cc2da")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:Y,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Ke.getLocalizedStrings(),Zn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=q(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Me(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=X(),t=ae(),n=K(),{reimbursementId:r}=ie(),c=Ye(),d=Je(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=K().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>V(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((Q=>V(Q))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Cn(O),H=v((Q=>Q.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,W,z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const $=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(Gn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(Yn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:Y.upload,single:ne.dropReceipt.single,or:Y.texts.or,multiple:ne.dropReceipt.multiple,receipts:Y.texts.receipts2}})]}):null,s.jsx(Jn,{windowSize:d,children:s.jsx(Zn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Gn=P.div`
2
- display: flex;
3
- position: relative;
4
- height: 100vh;
5
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
6
- background-color: ${e=>e.theme.colors.grey4};
7
- `,Vn=P.div`
8
- position: fixed;
9
- top: 0;
10
- left: 0;
11
- right: 0;
12
- bottom: 0;
13
- background-color: ${En.overlayBackgroundBlack};
14
- z-index: 5;
15
- `,Wn=P.div`
16
- position: absolute;
17
- top: 0;
18
- left: 0;
19
- width: 42%;
20
- height: 100%;
21
- z-index: 6;
22
- display: flex;
23
- background-color: transparent;
24
- overflow: hidden;
25
- `,Hn=P.div`
26
- position: fixed;
27
- top: 0;
28
- left: 0;
29
- right: 0;
30
- bottom: 0;
31
- z-index: 11;
32
- display: flex;
33
- flex-direction: column;
34
- overflow-y: auto;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- `,Yn=P.button`
37
- align-self: flex-end;
38
- background: none;
39
- border: none;
40
- cursor: pointer;
41
- padding: ${F.sp2} ${F.sp3};
42
- line-height: 1;
43
- color: ${e=>e.theme.colors.hero};
44
- &:hover {
45
- color: ${e=>e.theme.colors.primary};
46
- }
47
- svg {
48
- width: ${F.sp4};
49
- height: ${F.sp4};
50
- }
51
- `,Jn=P.div`
52
- display: flex;
53
- flex-direction: column;
54
- width: 100%;
55
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
56
- `,qn=ee((function(e,t){const n=Ne(e,t.reimbursementId),r=_.getSignedInUser(),c=fe(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,zt(t.currentTenant),r));const i=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Pe());const a=st(o),i=q(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Vt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Gt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Be(n,a.type,"")):e(Be(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=q(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{C.trackReimbursementDeleteReimbursement(n),e(Me(n))},cancelAndDeleteReport:a=>{a===!0?C.trackReimbursementCancelAndDeleteReimbursement(n):C.trackReimbursementCancelReimbursement(n),e(Zt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}}))(xn);function Kn(){const e=X(),t=ae(),n=K(),r=n.hash.substring(1),c=Ye(),{reimbursementId:d}=ie(),m=_.getSignedInUser(),o=v((R=>V(R))),a=v((R=>Ne(R,d??""))),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=nt(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"});Qe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:f}=oe(),{isFeatureEnabled:B}=f(x.isLimitedCategoryForReimbursement),[u,T]=h.useState(!1),[D,j]=h.useState(!1),[A,k]=h.useState(!1),{isFeatureEnabled:E}=f(x.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=f(x.isShowDeletedReimbursementsFeatureEnabled),g=v((R=>ge(R,d??""))),U=$t(o),L=Mt(o.userRole),$=a.fetchState;if(h.useEffect((()=>{u||d==null?u==1&&$==="Error"&&e("page-not-found",{replace:!0}):(T(!0),t(Pt(d,!1,I)))}),[u,d,t,$]),h.useEffect((()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&U===!1?k(!1):k(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(L||a.allApprovers.find((R=>R.user.userId===m?.userId))!=null||a.remiDetails?.lastUpdatedBy===m?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,L,o.isZeni,U,m]),h.useEffect((()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(j(!0),t(Le(!1,B,I,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!1,!0,!0,a.lastUpdatedByUserId)))}),[D,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(M,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(qe,{}):s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:C,onLoad:R=>(p=>{d!=null&&p.trackReimbursementReimbursementDetails(d)})(R)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:E,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:A,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const Qn=ee((function(e,t){return{remisReviewView:Oe(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(J())},onCloseReviewItem:n=>{e(Ht(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Wt());break;case"approve":e(Te("approved",r??""));break;case"reject":e(Te("rejected",r??""))}}}}))(Bn);function Xn({tenantEmailDomain:e}){const t=X(),n=v((m=>m.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=v((m=>Oe(m))),c=le(),d=c?.loggedInUserRole?.includes("admin")===!0;return h.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Qn,{navigate:t,analytics:C,isAdmin:d,tenantEmailDomain:e})}const G=tn(),it="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:ea,common:me}=Ke.getLocalizedStrings(),ta=ea.reimbursement.bulkActions,na=P.div`
57
- display: flex;
58
- min-height: 100%;
59
- width: 100%;
60
- flex: 1 1 auto;
61
- flex-direction: column;
62
- align-items: center;
63
- background-color: ${e=>e.theme.colors.grey4};
64
- `,aa=ee((function(e,t){const n=Ge(e,G,t.isBulkActionEnabled);let r=n.allSubTabs;const c=_.getSignedInUser(),d=fe(c),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((f=>f!=="deleted")));const b=n.fetchState,y=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((f=>f.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:C,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:G,spendManagementEndPoint:`${Un}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(J()),e(ze(o))},onSubtabChange:o=>{e(J()),e(Ze(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=q(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=q(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;C?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=q(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every((a=>a.field!=null&&a.values?.length!==0))&&C.trackSpendManagmentFilterChange("reimbursement",o.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&C.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(ue(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(J())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(De("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(De("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(be)&&e(sn(!1))},onEventReceived:o=>{o===it&&e(an())}}}))(jn(Fn));function sa(){const e=X(),t=ae(),n=K(),r=n.state,c=Je(),[d,m]=h.useState(null),o=ct("/:tenantEmailDomain/reimbursements/bulk-review")!=null;h.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Yt(r.tab.toString());S!=null?t(ze(S)):console.log("Warning:Not a valid remiListTab");const Z=Jt(r.subTab.toString());Z!=null?t(Ze(Z)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(J())}}),[]);const{useFeatureGate:a}=oe(),{isFeatureEnabled:i}=a(x.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(x.isBillPayCommentingEnabled),{isFeatureEnabled:y}=a(x.isReimbursementCommentingEnabled),{isFeatureEnabled:f}=a(x.isReimbursementBulkActionEnabled),B=_.getSignedInUser(),u=v((S=>V(S))),[T,D]=h.useState(!1),[j,A]=h.useState(!1),k=le(),E=k?.loggedInUserRole?.includes("admin")===!0,I=v((S=>Ge(S,G,f))),{areTenantIdsInSync:g}=Tn(),U=I.fetchState,{isAiCfoAccessEnabled:L,onAskAiCfoClick:$}=Re({mobileExploreReferrer:"Reimbursement List"});if(Qe({isDataReady:U==="Completed"}),h.useEffect((()=>{!j&&g&&(A(!0),t(ue(G,!0,l,!1,!0)))}),[j,G,t,g]),B==null)throw Error("Can't access address page without signing in...");const R=!!u?.userRole&&qt(u),p=Se(k?.loggedInUserRoleMap),N=Ie(k?.loggedInUserRoleMap),O=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,z=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,W=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,H=v((S=>_e(S.companyState,u.companyId))),Q=H?.company.featuresActivationInfo.connectedAccountProvider,ve=S=>{D(S)},{isFeatureEnabled:ot}=a(x.isDebitCardFeatureEnabled),rt=Ve(ot,u),lt=We(u),{remisProcessed:te,remisProcessing:Ae}=v((S=>Kt(S)));h.useEffect((()=>{te===Ae&&d!=null&&(t(Qt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:te>1?me.texts.reports2:ta.report},{variableName:"_has_",variableValue:te>1?me.texts.have:me.texts.has},{variableName:"_action_",variableValue:Xt(d)}]})),t(en()),setTimeout((()=>{t(ue(G,!0,l,!1,!0,!0))}),3e3),m(null))}),[te,Ae]);const mt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${it}`,`private-encrypted-${u.companyId}.${be}`]:[],eventCallback:(S,Z,ke)=>{S.endsWith(be)?ke.onReimbursementApprovalRulesEventReceived?.(S):Z.entity_type==="reimbursement"&&(m(Z.operation_type),ke.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?rt===!0||lt===!0?s.jsx(tt,{}):z&&(!R||p)||N&&O?s.jsxs(s.Fragment,{children:[U==="Completed"?s.jsx(re,{analytics:C,onLoad:S=>(Z=>Z.trackPageLoaded(Xe.Event.reimbursementHome))(S)}):null,s.jsx(at,{isAppContentDrawerOpen:T,handleDrawerToggle:ve}),s.jsxs(na,{windowSize:c,children:[s.jsx(Pn,{isOpen:o,drawerLeftMargin:new Dn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(J())},children:s.jsx(ra,{onClick:S=>S.stopPropagation(),children:s.jsx(Xn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(aa,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:y,location:n,navigate:e,currentTenant:u,period:G,isAdmin:E,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{ve(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:Q,isBulkActionEnabled:f,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:L,onAskAiCfoClick:$,...mt})]})]}):W&&p?s.jsx(M,{to:"../setup"}):k!=null&&He(u,k.loggedInUserRoleMap)?s.jsx(M,{to:"../promo"}):s.jsx(ye,{fetchState:"In-Progress"}):s.jsx(pe,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=P(Mn)`
65
- display: flex;
66
- min-height: 100%;
67
- flex-direction: column;
68
- `,la=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:C,videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}}),(function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(_n),ma=()=>{const e=Ln(),t=X(),n=K(),{tenantEmailDomain:r}=ie(),c=et(),[d,m]=h.useState(!1),o=v((A=>V(A))),a=_.getSignedInUserTenant(r)?.companyId??o.companyId,i=_.getSignedInUser(),l=o.userRoleId,b=!!o.userRole?.includes("reimbursements_user"),y=le(),f=Se(y?.loggedInUserRoleMap),B=Ie(y?.loggedInUserRoleMap),u=!!o.userReimbursementInfo?.isReimbursementTOSAccepted,T=!!o.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,j=A=>{m(A)};if(i==null)throw Error("Can't access reimbursement promo page without signing in...");return T&&B&&u?s.jsx(M,{to:"../../../reimbursements"}):D&&f?s.jsx(M,{to:"../../reimbursements/setup"}):o.companyReimbursementInfo&&!D||o.userReimbursementInfo&&B&&u===!1?s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:C,onLoad:A=>(k=>k.trackPageLoaded(Xe.Event.reimbursementPromoPage))(A)}),s.jsx(at,{isAppContentDrawerOpen:d,handleDrawerToggle:j}),s.jsx(la,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:o.userReimbursementInfo,userRoleId:l,isEmployee:b,onClickMenuIcon:()=>{j(!0)}})]}):s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:c.colors.grey5}})};function Oa(){const e=v((H=>V(H))),t=le(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=et(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=oe(),{isFeatureEnabled:o}=m(x.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(x.isDebitCardFeatureEnabled),i=Ve(a,e),l=We(e),b=e?.userRole!=null&&gn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),f=fn(t?.loggedInUserRoleMap),B=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=Se(t?.loggedInUserRoleMap),T=B&&u,D=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!b,j=D&&Sn(t?.loggedInUserRoleMap),A=$n(e,o,a)&&!b,k=A&&In(t?.loggedInUserRoleMap),E=yn(t?.loggedInUserRoleMap),I=Rn(t?.loggedInUserRoleMap),g=vn(t?.loggedInUserRoleMap),U=D&&I,L=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!b&&g,$=An(t?.loggedInUserRoleMap),R=kn(t?.loggedInUserRoleMap),p=Ie(t?.loggedInUserRoleMap),N=A&&$,{tenantEmailDomain:O}=ie(),z=K(),W=n===!0&&(u||p&&d);return s.jsxs(dt,{children:[z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(w,{path:"verification",element:s.jsx(Fe,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:k,isUserHasOnlyCardAccess:E,productType:"reimbursement",type:"verification"})}),s.jsx(w,{path:"setup",element:s.jsx(Fe,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:k,isUserHasOnlyCardAccess:E,productType:"reimbursement",type:"setup"})}),s.jsx(w,{path:"promo",element:s.jsx(ma,{})}),s.jsx(w,{path:"approval-rules/*",element:T?s.jsx(On,{}):s.jsx(Nn,{showZeniAccountRoute:U,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:p,showTreasuryRoute:L,isTenantBankingOnly:i,showChargeCardRoute:N,tenantEmailDomain:O??""})}),W&&s.jsx(w,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(w,{path:"/*",element:s.jsx(tt,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(w,{path:"*",element:s.jsx(M,{to:"../promo"})}),c&&u&&s.jsx(w,{path:"*",element:s.jsx(M,{to:"../setup"})})]}):z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(w,{path:"new",element:s.jsx(Ue,{})}),s.jsx(w,{path:":reimbursementId",element:s.jsx(Kn,{})}),s.jsx(w,{path:":reimbursementId/edit",element:s.jsx(Ue,{})}),s.jsx(w,{path:"*",element:s.jsx(pe,{})})]}):s.jsx(w,{path:"*",element:s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${F.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(w,{path:"*",element:s.jsx(pe,{})})]})}export{Oa as default};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-BPL36a6x.js";import{z as w,a9 as b,k as u,V as k,e3 as D,c as E,A as I}from"./index-D0or4oV9.js";import"./mui-wO6EIETx.js";import g from"./NotFoundScreen-3qucmnjW.js";import{a as m}from"./sentry-_x3Yh1Jc.js";import{u as C,j as h,h as F,g as L,l as P,n as T,o as d,N as y}from"./core-DOBELRta.js";import{fF as U,a1O as j,a1P as p,DM as V,p$ as _,a1Q as z,DK as A}from"./zeni-epic-state-DXFYDM66.js";import"./recharts-Sp9X2zHo.js";import"./analytics-GZ8dIY_c.js";import"./plaid-C-eBmVPr.js";import"./dnd-0MaFz9wL.js";import"./stripe-cKAAJElX.js";import"./lottie-38LSfraF.js";import"./lexical-CAgOy6Q-.js";import"./pdf-B2N0erO1.js";import"./utils-BU0XThgM.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]="476c04dd-57fc-4859-9366-49e33e1dc6f7",e._sentryDebugIdIdentifier="sentry-dbid-476c04dd-57fc-4859-9366-49e33e1dc6f7")}catch{}})();const G=P((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(A())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(D),K=()=>{const e=C(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>U(o))),c=F(),x=L(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),v=f?.firstName!=null?f.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(V()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(_(!0)))}),[l.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(b,{analytics:u,onLoad:o=>(S=>S.trackPageLoaded(k.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:x,currentTenant:r,companyName:N,userName:v,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=E(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(K,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-3qucmnjW.js","assets/sentry-_x3Yh1Jc.js","assets/core-DOBELRta.js","assets/zeni-epic-state-DXFYDM66.js","assets/index-D0or4oV9.js","assets/mui-wO6EIETx.js","assets/analytics-GZ8dIY_c.js","assets/utils-BU0XThgM.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-B_RKHDQw.js","assets/withTransactionSidePanel-CQ96RPah.js","assets/useAskAiCfoHostNavButtonProps-eAE85_k_.js","assets/TransactionDetailScreen-DHysjIND.js","assets/decodeURIComponentSafe-DjVlhgki.js","assets/useInitialThreadRequest-DYGeNL0J.js","assets/routePaths-DTZH71MW.js","assets/expenseAutomationHelper-CRKfrxDD.js","assets/stripSplatSuffix-bz-VGo3l.js","assets/analyticsHelper-DnGDW6mo.js","assets/CompanyPassportScreen-LNhKVlPD.js","assets/MobileAppDrawer-C-ti4sM2.js","assets/InboxNotificationsProvider-Bd8tLMl8.js","assets/useTaskManagerAccess-CxAfFVI5.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BHQEdJfL.js","assets/FeaturePreviewScreen-DmuM1Efe.js","assets/BillPayRoutes-BLaPoSH3.js","assets/AddressScreen-C5gOC9K1.js","assets/DomesticWireDetailScreen-DdGRU08t.js","assets/BusinessVerificationPageScreen-_lNpLbtb.js","assets/DrawerScreen-BkWdrsyD.js","assets/SetupPagesScreen-CgVfrQ5w.js","assets/BillPayApprovalRoutes-CbgUcPPn.js","assets/ReimbursementApprovalRuleDetailScreen-uAvwHmVJ.js","assets/getLocaleForTenant-U4ff53sp.js","assets/ReimbursementRoutes-BnvmE75X.js","assets/ReimbursementApprovalRoutes-CoFA16rX.js","assets/TransactionListRoutes-BcKO42ff.js","assets/ZeniAccountStatementScreen-Cua_2c_y.js","assets/SettingsRoutes-DCgOWsFJ.js","assets/AccountMappingScreen-BFD6zGSo.js","assets/QBOConnectionScreen-BT2gd9dq.js","assets/empty-C3pt8GU3.js","assets/index-C_zqEcVM.js","assets/url-DBFa8kl5.js","assets/index-rIJ81ix1.js","assets/accountMappingHelper-DQktkWkn.js","assets/useEmailConnectResultRefresh-DfrDVqu0.js","assets/ReportsRoutes-ByrzWoSX.js","assets/ChargeCardRoutes-Cm8gRyWo.js","assets/useChargeCardPusherEvents-CLlJNBdI.js","assets/PeopleRoutes-B9g6bB_r.js","assets/ExpenseAutomationRoutes-90qVj0mK.js","assets/useActualMatchingMatchDetail-CtxH6NWw.js","assets/ScheduleDetailsPrepaidExpensesScreen-CcW917MW.js","assets/pathToGoBack-BTiQNxwp.js","assets/TreasuryRoutes-0_eMw0Wx.js","assets/VendorsRoutes-B3eT8rLn.js","assets/ZeniAccountRoutes-BNdYEOcI.js","assets/AddressRoutes-IFU8jeyM.js","assets/PandLWithForecastRoutes-BuxQksyO.js","assets/CustomerOnboardingRoutes-CFt1axWu.js","assets/TransactionDetailRoutes-BSNaBZbG.js","assets/EntityDetailRoutes-BJQ1CgrE.js","assets/InvoicingRoutes-CexYyC5q.js","assets/NotificationRoutes-bEJ4pL_q.js","assets/PerformanceRoutes-hC8UVG3D.js","assets/ActualMatchingMatchDetailScreen--CUkwe-7.js","assets/RewardsRoutes-BrjKJijg.js","assets/TaskRoutes-tj9-zwIR.js","assets/TaskListScreen-BKRaew41.js","assets/AiCfoScreen-Dk4NZsn4.js","assets/CardsAiCfoScreen-_v8KOvIs.js"])))=>i.map(i=>d[i]);
2
- import{_ as s,bn as hs,fF as ps,d_ as xs,dZ as gs,AZ as Rs,di as js,c8 as Is,gJ as Ts,g9 as As,df as pe,cG as fs,gn as bs,cy as Ds,bE as ys,br as Cs,U3 as vs,v as Us,U6 as Os,bq as Ps,U7 as ws,bK as Fs,bJ as Ls,bt as ks,cu as Vs,U8 as Hs,U9 as Ss,da as Bs,dd as Ns,dc as Ms,cF as Zs,cM as Gs,pS as xe,gi as ge,gY as $s,gk as Re,gL as je,gM as Ie,gl as zs}from"./zeni-epic-state-DXFYDM66.js";import{j as e}from"./liveblocks-BPL36a6x.js";import{a as P}from"./sentry-_x3Yh1Jc.js";import{N as u,u as Ys,h as qs,i as Js,g as Ws,j as G,q as Te,n as Ks,o as n}from"./core-DOBELRta.js";import{K as l,E as Qs,u as Xs,z as y,c as et,e as st,f as tt,A as B,h as nt,M as at,N as ot,L as F,G as Ae,t as _,P as rt,S as it,T as lt,k as ne}from"./index-D0or4oV9.js";import"./mui-wO6EIETx.js";import{f as fe}from"./analyticsHelper-DnGDW6mo.js";import{t as ut}from"./getLocaleForTenant-U4ff53sp.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new o.Error().stack;b&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[b]="60f376a5-22b0-42f7-9586-f8cad8d1db7a",o._sentryDebugIdIdentifier="sentry-dbid-60f376a5-22b0-42f7-9586-f8cad8d1db7a")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-3qucmnjW.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:b,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(k===!0){if(o)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(be,{tenantEmailDomain:v});if(U)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(be,{tenantEmailDomain:v}):U?e.jsx(ye,{tenantEmailDomain:v}):b?e.jsx(mt,{tenantEmailDomain:v}):N?e.jsx(ct,{tenantEmailDomain:v}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-B_RKHDQw.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-BLaPoSH3.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-BnvmE75X.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-BcKO42ff.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-DCgOWsFJ.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-ByrzWoSX.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Cm8gRyWo.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-B9g6bB_r.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-90qVj0mK.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-0_eMw0Wx.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-B3eT8rLn.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BNdYEOcI.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},Et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},ht=l((()=>s((()=>import("./ReportsRoutes-ByrzWoSX.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),pt=l((()=>s((()=>import("./AddressRoutes-IFU8jeyM.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-B9g6bB_r.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-BuxQksyO.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-CFt1axWu.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-B3eT8rLn.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),It=l((()=>s((()=>import("./TransactionDetailRoutes-BSNaBZbG.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-BJQ1CgrE.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),Tt=l((()=>s((()=>import("./DashboardRoutes-B_RKHDQw.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-BLaPoSH3.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),At=l((()=>s((()=>import("./SettingsRoutes-DCgOWsFJ.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),ft=l((()=>s((()=>import("./InvoicingRoutes-CexYyC5q.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Ue=l((()=>s((()=>import("./ReimbursementRoutes-BnvmE75X.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),bt=l((()=>s((()=>import("./ZeniAccountRoutes-BNdYEOcI.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),Dt=l((()=>s((()=>import("./TreasuryRoutes-0_eMw0Wx.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),yt=l((()=>s((()=>import("./TransactionListRoutes-BcKO42ff.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Ct=l((()=>s((()=>import("./ChargeCardRoutes-Cm8gRyWo.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),vt=l((()=>s((()=>import("./NotificationRoutes-bEJ4pL_q.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ut=l((()=>s((()=>import("./PerformanceRoutes-hC8UVG3D.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ot=l((()=>s((()=>import("./ExpenseAutomationRoutes-90qVj0mK.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Pt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen--CUkwe-7.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),wt=l((()=>s((()=>import("./RewardsRoutes-BrjKJijg.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Ft=l((()=>s((()=>import("./TaskRoutes-tj9-zwIR.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-Dk4NZsn4.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,23,54,15,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-_v8KOvIs.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-3qucmnjW.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),kt=l((()=>s((()=>import("./TaskListScreen-BKRaew41.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,8])))),Vt=({isDashboardAccess:o,showZeniAccountRoute:b,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(U===!0){if(b)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):b?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const b=Ys(),N=qs(),{tenantEmailDomain:i}=Js(),k=Qs().mode,{setLoading:U,clearAllLoading:v,clearLoading:V}=Xs(),D=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),W=hs(I),$=Ws(),[L,we]=P.useState(!1),r=G((a=>ps(a))),{useFeatureGate:H}=et(),M=st(),K=tt(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?xs(oe,r):void 0,Q=p==="Completed"||T==="Completed"?gs(r):void 0,re=p==="Completed"||T==="Completed"?Rs(r)&&!js(r):void 0,Ve=nt(r,ke,oe),{isCardsHidden:He}=at(r?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||lt==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),z=G((a=>Ts(a)));if(i!=null){const a=y.getSignedInUserTenant(i);I!=null&&a!=null&&fe(I,r,k)}const Z={tenantId:D,userId:I?.userId,sessionId:I?.zeniSessionId},ie=As(),h=ot(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=fs(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,Ye=G((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=Cs();t.isAfter(d,"month")===!1?b(vs(D,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,D]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,ie,I,b,y]),P.useLayoutEffect((()=>{!Us(ie,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(ut(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,b,Ye))}),[D]),P.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t,d,Y,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const q=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,Es=c!=null&&c.externalConnections==null;if(q&&ms){S(Re(t));const J=y.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else q&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&Es&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),Y(F.TENANT_FETCHING),S(zs(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,r,D,I,U,b))}),[D,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&fe(I,r,k,void 0,z.tenantsBaseInOrder))}),[z,T,r,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(v(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,D,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=Et,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=_t[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const O=r?.userRole!=null&&Ps(r?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=rt(),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Qe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Xe=ws(h?.loggedInUserRoleMap),es=r.externalConnections?.accounting[0]?.isValid,ss=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&Fs(h?.loggedInUserRoleMap),_e=Fe&&!O,ts=Le&&!O,ns=ue&&Ls(h?.loggedInUserRoleMap),as=de&&ks(h?.loggedInUserRoleMap),os=_e&&Vs(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),ds=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),g=Gs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Xe===!0||rs===!0||is===!0;return y.isSignedIn()?D==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&b(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||W&&!ee)&&ss&&es!==!0&&E===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(it,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Vt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(Tt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||Ke||Qe?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(yt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(kt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ft,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(bt,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(Dt,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ut,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(Ot,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0&&We===!0?e.jsx(Pt,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(vt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(jt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(At,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Ct,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(wt,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:X}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,zt as S};
@@ -1 +0,0 @@
1
- import{j as u}from"./liveblocks-BPL36a6x.js";import{a as f,R as T,q as A}from"./sentry-_x3Yh1Jc.js";import{u as D,h as z,j as c,g as j,N as F,l as M}from"./core-DOBELRta.js";import{u as O,z as s,E as P,k as w,G as N,U as _,V as B,W as V,X as $,Y as W,Z as v}from"./index-D0or4oV9.js";import{fF as q,TO as J,U6 as R,gi as X,gk as Y,Ub as G,gU as H,dj as Z,Uc as y,Ud as K,Ue as Q,b$ as U}from"./zeni-epic-state-DXFYDM66.js";import"./mui-wO6EIETx.js";import{u as ee}from"./useDeviceId-EJu2KjP1.js";import{f as te}from"./analyticsHelper-DnGDW6mo.js";import{t as ne}from"./getLocaleForTenant-U4ff53sp.js";import"./recharts-Sp9X2zHo.js";import"./analytics-GZ8dIY_c.js";import"./plaid-C-eBmVPr.js";import"./dnd-0MaFz9wL.js";import"./stripe-cKAAJElX.js";import"./lottie-38LSfraF.js";import"./lexical-CAgOy6Q-.js";import"./pdf-B2N0erO1.js";import"./utils-BU0XThgM.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]="bd8d2347-9c34-4d77-a52c-c32674048b73",t._sentryDebugIdIdentifier="sentry-dbid-bd8d2347-9c34-4d77-a52c-c32674048b73")}catch{}})();const ie=M((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(Q({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(l),sourceUri:U(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(K(n,a)))},clearSignInError:()=>{t(y())}}}))(W),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=O(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=c((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:b,accountUnlockTime:L}=c((e=>e.tenantState)),p=c((e=>e.tenantState.fetchState)),h=c((e=>e.tenantState.activeTenantFetchState.fetchState)),S=c((e=>e.tenantState.signInState)),o=c((e=>e.tenantState.loggedInUser)),r=c((e=>q(e))),I=c((e=>J(e))),m=j(),E=P().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{k.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[k.fetchState,l]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(I.tenantsInOrder),o.zeniSessionId),X(o.userId,o.zeniSessionId,r.tenantId),i(Y(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),H().then((()=>{const e=$();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(B.Event.loginSuccess,o.authProvider??"google",Z(r.productSettings))}),2e3))}),[S,p,h,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(F,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&L!=null?u.jsx(V,{onClose:()=>i(y()),unlockDate:L}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-BPL36a6x.js";import{a as i}from"./sentry-_x3Yh1Jc.js";import{u as l,g as d,N as u}from"./core-DOBELRta.js";import{z as n,k as a,V as m,a8 as p}from"./index-D0or4oV9.js";import{gX as g,Us as b}from"./zeni-epic-state-DXFYDM66.js";import{n as y}from"./mui-wO6EIETx.js";import"./recharts-Sp9X2zHo.js";import"./analytics-GZ8dIY_c.js";import"./plaid-C-eBmVPr.js";import"./dnd-0MaFz9wL.js";import"./stripe-cKAAJElX.js";import"./lottie-38LSfraF.js";import"./lexical-CAgOy6Q-.js";import"./pdf-B2N0erO1.js";import"./utils-BU0XThgM.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]="92cd4939-2f5b-4cc5-b624-e0e825cfa62b",e._sentryDebugIdIdentifier="sentry-dbid-92cd4939-2f5b-4cc5-b624-e0e825cfa62b")}catch{}})();function N(){const e=l(),t=d(),r=i.useRef(!1),c=n.isSignedIn(),o=t.state?.message==="logout"||c;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;export{N as default};
@@ -1,9 +0,0 @@
1
- import{j as G}from"./liveblocks-BPL36a6x.js";import{a as f}from"./sentry-_x3Yh1Jc.js";import{h as pa,u as Ta,g as fa,k as ga,j as F,i as _a,l as ma}from"./core-DOBELRta.js";import{aL as Da,aM as ba,z as Q,c as Sa,A as C,at as ha,a9 as Ea,k as ya,V as Aa,e6 as Ga,p as R,a5 as Ca}from"./index-D0or4oV9.js";import{fF as Ia,a1W as Y,QZ as B,a1X as J,a1S as Ba,Ql as M,a1Y as La,Qt as V,Q3 as va,PH as Ka,Q_ as W,a1Z as q,gh as wa,QQ as Ra,QV as Ua,QI as Pa,QG as H,QW as Fa,QD as ja,a1_ as Qa,a1$ as xa,a20 as $a,a21 as Oa,a22 as I,dx as Na,dw as Za,a23 as za,Q0 as Ma}from"./zeni-epic-state-DXFYDM66.js";import{n as Va}from"./mui-wO6EIETx.js";import{u as Wa}from"./useAskAiCfoHostNavButtonProps-eAE85_k_.js";import{M as qa}from"./MobileAppDrawer-C-ti4sM2.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="41692c2b-2621-4700-8177-1904afa8ca33",e._sentryDebugIdIdentifier="sentry-dbid-41692c2b-2621-4700-8177-1904afa8ca33")}catch{}})();const d={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Xa=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),U=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Ya=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),U(a.assignees)&&(o.assignees=a.assignees),U(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),U(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ja=e=>{if(e==null||typeof e!="object")return null;const a=e;return U(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=Da(),g=f.useRef(n),l=f.useRef(o),_=f.useRef(0);f.useEffect((()=>{g.current=n}),[n]),f.useEffect((()=>{l.current=o}),[o]);const t=f.useMemo((()=>[...a].sort().join("|")),[a]);f.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[D,b]=ba(m);if(b==="")return;const E=i.channel(D),y=T=>{g.current(b,T)};let k;if(E?.subscribed===!0){if(k=E,k.bind(b,y),!p.has(D)){p.add(D),S();const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{E.unbind(b,y)}))}else{if(k=E??i.subscribe(D),k.bind(b,y),!p.has(D)){p.add(D);const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{k.unbind(b,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Va.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
- `,te=ma((function(e,a){const n=Y(e,a.isTaskTemplatesEnabled),{taskGroupId:o}=a,i=o!=null&&o!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((t=>({...t,tasks:t.tasks.filter((s=>s.taskGroupIds.includes(o)))}))).filter((t=>t.tasks.length>0))}:n,g=Ba(e),l=Q.isZeniUser(),_=e.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:i,tagListView:g,localData:i.localData,isTaskTemplatesEnabled:a.isTaskTemplatesEnabled,isZeniUser:l,subTaskCreateStatus:_}}),(function(e,a){const{navigate:n,currentTenant:o,location:i,isTaskTemplatesEnabled:g}=a,{tenantEmailDomain:l}=o,{groupByKey:_}=a.uiState;return{onTaskManagementRowClick:t=>{const s=X(l,t),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{e(B(!0,g))},onTabChange:t=>{e(Oa(t))},onParentTaskClick:t=>{const s=X(l,t);window.open(s,"_blank","noopener")},bulkUpdateTasks:(t,s)=>{e(H(t,null,s))},onNewTaskClick:()=>{if(a.localData.defaultTaskGroupId!=null){const t=j(l,a.localData.defaultTaskGroupId),s=R(i.state?.pathnameStackToGoBack,i.pathname);n(t,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(t,s)=>{e(q({uiState:{sortKey:t,sortOrder:s}}))},onFiltersChange:t=>{e($a({filters:t}))},onSearchTextChanged:t=>{e(xa({searchText:t}))},onReloadCards:()=>{e(B(!0,g))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const t=Ca(i.state?.pathnameStackToGoBack),s=t.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:t.newStack}})}else n("../")},updateLocalData:t=>{e(Qa({localData:t}))},resetLocalData:()=>{e(J({taskGroupById:a.taskGroupState.taskGroupById}))},handleCreateGroup:t=>{e(ja(a.localData.newTaskGroupName,t))},assignGroupToTasks:t=>{e(H(a.localData.selectedTaskIds,t,Fa(a.uiState.groupByKey,t)))},onDeleteTaskGroup:t=>{e(Pa(t))},onAddNewTaskToTaskGroup:t=>{if(a.localData.defaultTaskGroupId!=null){const s=ne(_,t);e(M({taskDetailLocalData:s}));const p=j(l,a.uiState.groupByKey==="groupName"?t:a.localData.defaultTaskGroupId),S=R(i.state?.pathnameStackToGoBack,i.pathname);n(p,{state:{pathnameStackToGoBack:S,message:"comingFromTaskListPage"}})}},onDragNDrop:(t,s)=>{e(Ua(a.localData.selectedTaskIds.length>0?a.localData.selectedTaskIds:[t],s))},onTaskGroupRename:(t,s)=>{e(Ra(t,s))},onTimeSpentUpdate:(t,s)=>{e(W({task:t,updates:s}))},onShowToast:t=>{e(wa(t))},onGroupByFilterChange:t=>{e(q({uiState:{groupByKey:t}}))},updateTask:(t,s)=>{e(W({task:t,updates:s}))},onCreateTagClick:(t,s)=>{e(Ka(t,s))},onSubtaskCreation:(t,s)=>{e(va({...s,parentTaskId:t}))},handleGroupTemplateClick:t=>{e(V(t,[]))},handleGroupTemplateTaskClick:(t,s)=>{e(V(t,[s]))},handleNewTaskInitialization:t=>{if(e(M({taskDetailLocalData:{...La,name:t}})),a.localData.defaultTaskGroupId!=null){const s=j(l,a.localData.defaultTaskGroupId),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:t=>{n(`/${l}/tasks/group/${t}`)},onQuickResponsesClick:()=>{n(`/${l}/tasks/quick-responses`)}}}))(Ga);function se(){const e=pa(),a=Ta(),n=fa(),o=Q.getSignedInUser(),i=Q.isZeniUser(),g=ga(),l=F((u=>Ia(u))),{taskGroupId:_}=_a(),{useFeatureGate:t}=Sa(),{isFeatureEnabled:s}=t(C.isTaskTemplatesEnabled),{isFeatureEnabled:p}=t(C.isTaskCannedResponsesEnabled),{isFeatureEnabled:S}=t(C.isTaskCategorizationEnabled),{isFeatureEnabled:m}=t(C.isTaskBulkResolutionEnabled),{isFeatureEnabled:D}=t(C.isTaskGroupAssigneesEnabled),{isFeatureEnabled:b}=t(C.isTaskRecurringParentEnabled),[E,y]=f.useState(!1),k=F((u=>Y(u,s))),T=F((u=>u.taskGroupState)),L=k.fetchState,{isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea}=Wa({mobileExploreReferrer:"Task Checklist"});ha({isDataReady:L==="Completed"}),f.useEffect((()=>{a(B(!1,s))}),[l?.tenantId,a,s]);const ta=f.useMemo((()=>{const u=[d.TASK_CREATED,d.TASK_UPDATED,d.TASKS_BULK_UPDATED,d.TASKS_BULK_DELETED],A=[d.TASK_CREATED,d.TASK_UPDATED,d.TASK_SNOOZE_RESURFACED,d.TASKS_BULK_UPDATED];return[...Ha(l?.companyId,u),...Xa(o?.userId,A)]}),[l?.companyId,o?.userId]);if(ae({events:ta,onEvent:(u,A)=>{switch(u){case d.TASK_CREATED:case d.TASK_UPDATED:{const r=Ya(A);if(r!=null){const w=g.getState(),x=r.task_id,h=x!=null?w.taskState.taskByID?.[x]:void 0,P=h!=null;if(!i)if(r.is_private===!0){if(!P)return}else{const v=o?.userId,K=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&K.add(r.created_by),!(v!=null&&K.has(v))&&!P)return}if(u===d.TASK_UPDATED&&P&&h!=null&&Array.isArray(r.task_group_ids)){const v=new Set(Object.values(w.taskGroupState.taskGroupById??{}).filter((c=>c!=null&&!c.isDeleted)).map((c=>c.id))),K=(h.taskGroupIds??[]).filter((c=>v.has(c))),$=(r.task_group_ids??[]).filter((c=>v.has(c))),sa=K.length===$.length&&K.every((c=>$.includes(c))),O=h.taskGroupIds??[],N=r.task_group_ids??[],na=O.length!==N.length||!O.every((c=>N.includes(c))),oa=(c,ca)=>{const Z=c??[],z=ca??[];if(Z.length!==z.length)return!1;const da=new Set(z);return Z.every((ka=>da.has(ka)))},ra=r.name==null||r.name===h.name,ia=r.is_private==null||r.is_private===h.isPrivate,la=r.assignees==null||oa(r.assignees,h.assignees),ua=r.direct_assignees==null;if(sa&&na&&ra&&ia&&la&&ua)return}}return void a(B(!0,s))}case d.TASKS_BULK_DELETED:{const r=Ja(A);return r==null?void 0:void r.task_ids.forEach((w=>a(Ma(w))))}case d.TASKS_BULK_UPDATED:case d.TASK_SNOOZE_RESURFACED:return void a(B(!0,s))}},onSubscribed:()=>{a(B(!0,s))}}),f.useEffect((()=>{L==="Completed"&&a(J({taskGroupById:T.taskGroupById}))}),[L,T.taskGroupById]),o==null)throw Error("Can't access task list page without signing in...");return G.jsxs(G.Fragment,{children:[L==="Completed"?G.jsx(Ea,{analytics:ya,onLoad:u=>(A=>A.trackPageLoaded(Aa.Event.taskListPage))(u)}):null,G.jsxs(ee,{children:[G.jsx(qa,{isAppContentDrawerOpen:E,handleDrawerToggle:u=>{y(u)}}),G.jsx(te,{location:n,navigate:e,currentTenant:l,taskGroupId:_,taskGroupState:T,localData:k.localData,uiState:k.uiState,isTaskTemplatesEnabled:s,taskListFetchState:L,isTaskCategorizationEnabled:S,isTaskCannedResponsesEnabled:p,isTaskBulkResolutionEnabled:m,isTaskGroupAssigneesEnabled:D,isTaskRecurringParentEnabled:b,isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea})]})]})}const X=(e,a)=>`/${e}/tasks/${encodeURIComponent(a)}`,j=(e,a)=>`/${e}/tasks/new/${a}`,ne=(e,a)=>{if(e==="assignee"){const n=a.split(",");return{...I.taskDetailLocalData,assignee:n}}if(e==="priority"){const n=Na(a);return{...I.taskDetailLocalData,priority:n}}if(e==="status"){const n=Za(a);return{...I.taskDetailLocalData,status:n}}if(e==="tag"){const n=a.split(",");return{...I.taskDetailLocalData,tagIds:n}}if(e==="dueDate"){const n=za(a);return{...I.taskDetailLocalData,dueDate:n}}return{...I.taskDetailLocalData}},Te=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"}));export{d as T,Xa as a,Ha as b,Ja as c,Ya as d,se as e,Te as f,pe as t,ae as u};
@@ -1,9 +0,0 @@
1
- import{j as r}from"./liveblocks-BPL36a6x.js";import ue from"./NotFoundScreen-3qucmnjW.js";import{a as k}from"./sentry-_x3Yh1Jc.js";import{h as Y,u as ee,j as E,g as de,i as ke,N as pe,l as me,n as fe,o as b}from"./core-DOBELRta.js";import{PU as ae,PX as Se,PR as Te,a1R as ge,fF as te,a1S as se,Qh as g,Q9 as T,PO as he,QN as be,QG as Ee,a1T as ne,gh as oe,a1U as Z,PK as Ie,PH as De,uT as Ce,uH as Ge,mz as _e,Q7 as Re,a1V as Ue,Q_ as ye,Q3 as Pe,Qs as xe,Qp as Be,P_ as we,Qm as Ae,Ql as ve}from"./zeni-epic-state-DXFYDM66.js";import{z as R,e4 as je,R as Fe,c as Le,A as G,a5 as ie,p as _,a9 as Ke,k as q,V as $e,e5 as Qe,Z as M,af as Ne}from"./index-D0or4oV9.js";import{n as Oe}from"./mui-wO6EIETx.js";import{u as Ve}from"./useInitialThreadRequest-DYGeNL0J.js";import{M as ze}from"./MobileAppDrawer-C-ti4sM2.js";import{b as Ze,a as qe,u as Me,T as S,t as He,c as H,d as X,e as Xe}from"./TaskListScreen-BKRaew41.js";import"./recharts-Sp9X2zHo.js";import"./analytics-GZ8dIY_c.js";import"./plaid-C-eBmVPr.js";import"./dnd-0MaFz9wL.js";import"./stripe-cKAAJElX.js";import"./lottie-38LSfraF.js";import"./lexical-CAgOy6Q-.js";import"./pdf-B2N0erO1.js";import"./utils-BU0XThgM.js";import"./InboxNotificationsProvider-Bd8tLMl8.js";import"./useTaskManagerAccess-CxAfFVI5.js";import"./useAskAiCfoHostNavButtonProps-eAE85_k_.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="f93bf68b-6ffc-476f-b38c-5880f329e82f",e._sentryDebugIdIdentifier="sentry-dbid-f93bf68b-6ffc-476f-b38c-5880f329e82f")}catch{}})();function Je(){const e=Y(),a=ee(),n=R.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=E((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(Se({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(je,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const L=e=>e?.taskState?.taskByID,j=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},We=ge([j,(e,a)=>{const n=j(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=j(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let J,W=[];const Ye=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=We(e,a.taskId),m=s.taskGroupId??c,t=m!=null?Z(e.taskGroupState,m):void 0,o=R.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},x=se(e),{tenantEmailDomain:B}=u,U=s.recurringSourceTaskId,w=U!=null?`${M.appUrl}/${B}/tasks/${encodeURIComponent(U)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:R.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==J&&(J=h,W=Object.values(h)),W),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${M.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:w,tagListView:x,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((f=>Z(e.taskGroupState,f))).filter((f=>f!=null&&!f.isDeleted)).map((f=>({id:f.id,name:f.name,isDefault:f.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(ve({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(Ae(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(we(a.taskId))},onSnoozeTask:(t,o)=>{e(Be(t,o))},onUnsnoozeTask:t=>{e(xe(t))},onCreateSubtask:(t,o)=>{e(Pe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(ye({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=P(m),o=_(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(Ue({taskId:n}))},onDeleteTaskClick:()=>{e(Re(n))},updateFilesEntity:t=>{e(_e({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Qe);function F(){const e=Y(),a=ee(),n=de(),c=Fe(),{taskId:s,taskGroupId:u}=ke(),d=E((i=>te(i))),m=Ve(d?.companyId),{useFeatureGate:t}=Le(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:x}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:B}=t(G.isTaskGroupAssigneesEnabled),[U,w]=k.useState(!1),[h,f]=k.useState(!1),[K,re]=k.useState(!1),[$,A]=k.useState(!1),C=k.useRef(!1),y=E((i=>i.taskListState.updateTasksFetchState.fetchState)),Q=E((i=>se(i))),N=E((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const O=R.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[S.TASK_CREATED,S.TASK_UPDATED,S.TASKS_BULK_UPDATED,S.TASKS_BULK_DELETED],l=[...i,S.TASK_SNOOZE_RESURFACED];return[...Ze(d?.companyId,i),...qe(O,l)]}),[d?.companyId,O]);Me({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case S.TASK_CREATED:{X(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case S.TASK_UPDATED:{const p=X(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case S.TASKS_BULK_UPDATED:{const p=H(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case S.TASKS_BULK_DELETED:{const p=H(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(P(d.tenantEmailDomain));break}a(T(s));break}case S.TASK_SNOOZE_RESURFACED:{He(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||Q.fetchState==="Completed"||(f(!0),a(he()))}),[h,a,Q.fetchState]),k.useEffect((()=>{K||N==="Completed"||(re(!0),a(be()))}),[K,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(Ee([s],null,{isArchived:!1})),A(!0))}),[a,s]);k.useEffect((()=>{if($)if(y!=="In-Progress"){if(C.current){if(y==="Error")return A(!1),void(C.current=!1);if(y==="Completed"){A(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=P(i);e(l,{state:{pathnameStackToGoBack:_(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,y,d,n,e]);const V=E((i=>ne(i,s))),v=V.fetchState,z=R.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(v==="Error"&&V.error?.code===400){const{tenantEmailDomain:i}=d,l=P(i),p=_(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[v==="Completed"?r.jsx(Ke,{analytics:q,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(ze,{isAppContentDrawerOpen:U,handleDrawerToggle:i=>{w(i)}}),r.jsx(Ye,{analytics:q,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:z,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:v,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:x,isTaskGroupAssigneesEnabled:B})]})]})}const ea=Oe.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
- `,P=e=>`/${e}/tasks`;function Da(){return r.jsxs(fe,{children:[r.jsx(b,{path:"/new",element:r.jsx(F,{})}),r.jsx(b,{path:"/new/:taskGroupId",element:r.jsx(F,{})}),r.jsx(b,{path:"/group/:taskGroupId",element:r.jsx(Xe,{})}),r.jsx(b,{path:"/quick-responses",element:r.jsx(Je,{})}),r.jsx(b,{path:"/:taskId",element:r.jsx(F,{})}),r.jsx(b,{path:"*",element:r.jsx(ue,{})})]})}export{Da as default};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-BPL36a6x.js";import i from"./NotFoundScreen-3qucmnjW.js";import{T as r}from"./TransactionDetailScreen-DHysjIND.js";import"./sentry-_x3Yh1Jc.js";import{n as a,o as e}from"./core-DOBELRta.js";import"./zeni-epic-state-DXFYDM66.js";import"./recharts-Sp9X2zHo.js";import"./index-D0or4oV9.js";import"./mui-wO6EIETx.js";import"./analytics-GZ8dIY_c.js";import"./plaid-C-eBmVPr.js";import"./dnd-0MaFz9wL.js";import"./stripe-cKAAJElX.js";import"./lottie-38LSfraF.js";import"./lexical-CAgOy6Q-.js";import"./pdf-B2N0erO1.js";import"./utils-BU0XThgM.js";import"./useAskAiCfoHostNavButtonProps-eAE85_k_.js";import"./decodeURIComponentSafe-DjVlhgki.js";import"./useInitialThreadRequest-DYGeNL0J.js";import"./routePaths-DTZH71MW.js";import"./expenseAutomationHelper-CRKfrxDD.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="bfd19369-9f5a-4875-9ff9-f0a50fe2624d",o._sentryDebugIdIdentifier="sentry-dbid-bfd19369-9f5a-4875-9ff9-f0a50fe2624d")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-BPL36a6x.js";import{h as W,g as U,u as X,i as Q,j as g,N,l as Z,n as Me,o as C}from"./core-DOBELRta.js";import{fF as H,u6 as ee,lf as p,eE as te,RX as Se,br as pe,$y as Be,l$ as ae,W5 as ne,$z as fe,$A as Fe,bE as k,RT as he,$B as Le,$C as Te,$D as Ge,RW as ge,$E as Oe,$F as De,$G as $e,$H as Ie,$I as ze,$J as we,$K as ye,T7 as Re}from"./zeni-epic-state-DXFYDM66.js";import{c as ce,A as q,k as L,G as ke,dd as oe,p as w,a5 as se,ar as _e,f as Ve}from"./index-D0or4oV9.js";import"./mui-wO6EIETx.js";import{a as y}from"./sentry-_x3Yh1Jc.js";import{w as ie}from"./withTransactionSidePanel-CQ96RPah.js";import{p as re,c as de}from"./routePaths-DTZH71MW.js";import{w as Je}from"./utils-BU0XThgM.js";import{d as j}from"./decodeURIComponentSafe-DjVlhgki.js";import{Z as qe}from"./ZeniAccountStatementScreen-Cua_2c_y.js";import"./recharts-Sp9X2zHo.js";import"./analytics-GZ8dIY_c.js";import"./plaid-C-eBmVPr.js";import"./dnd-0MaFz9wL.js";import"./stripe-cKAAJElX.js";import"./lottie-38LSfraF.js";import"./lexical-CAgOy6Q-.js";import"./pdf-B2N0erO1.js";import"./useAskAiCfoHostNavButtonProps-eAE85_k_.js";import"./TransactionDetailScreen-DHysjIND.js";import"./useInitialThreadRequest-DYGeNL0J.js";import"./expenseAutomationHelper-CRKfrxDD.js";import"./stripSplatSuffix-bz-VGo3l.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]="909b6f69-554a-40e5-9034-3d60b401eb64",a._sentryDebugIdIdentifier="sentry-dbid-909b6f69-554a-40e5-9034-3d60b401eb64")}catch{}})();const Ue=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Je(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},Ne=Z((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=J(e.selectedAccount.tranListType),d=We(t,n,c,o,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:J(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=W(),t=U(),n=X(),c=t.pathname.split("/").find((l=>Ue.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=Q(),{accountType:Y,title:b,subTitle:A}=He(o),f="month",T=g((l=>H(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(q.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:G}=Ke(o,v,T.bookCloseDate),[E,O]=y.useState(!1),[P,$]=y.useState(void 0),u=y.useMemo((()=>{const l=p(G);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!E&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const l=J(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[E,u,n]);let M=u;return u!=null&&P!=null&&(M={...u,period:P}),c==null||M==null?s.jsx(N,{to:"../"}):s.jsx(Ne,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>$(l),...a})})),He=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;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.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Ke=(a,e,t)=>{const n=pe();let c=pe().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:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},We=(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},Xe=Z((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();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)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Qe=ie((function({referrerType:a,...e}){const t=W(),n=U(),c=X(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),G=g((r=>Fe(r.transactionListState,h,S,I))),[E,O]=y.useState(!1),[P,$]=y.useState(void 0),u=g((r=>H(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(q.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const F=Ze(S,h,I,A,f,T,x);if(F){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(G?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{E||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[E,i,c]);let B=i;i!=null&&P!=null&&(B={...i,period:P});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return F&&B!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(N,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ze=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=Z((function(a,e){const t=Oe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();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)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(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,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=W(),n=U(),c=X(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=Q(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),G=g((r=>Ge(r.transactionListState,h,S,I))),[E,O]=y.useState(!1),[P,$]=y.useState(void 0),u=g((r=>H(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(q.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const F=nt(S,h,I,A,f,T,x);if(F){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(G?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{E||i==null||(O(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[E,i,c]);let B=i;i!=null&&P!=null&&(B={...i,period:P});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return F&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(N,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=Z((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ee();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)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=W(),n=U(),c=X(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=Q(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),G=g((D=>$e(D.transactionListState,h,S))),[E,O]=y.useState(!1),[P,$]=y.useState(void 0),u=g((D=>H(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,h,b,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(G?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&P!=null&&(i={...m,period:P});const{useFeatureGate:F}=ce(),{isFeatureEnabled:B}=F(q.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),K=new URLSearchParams(xe??"");K.set("view","full"),K.set("thread_id",le),K.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${K.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=F(q.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!E&&m!=null&&ue&&(O(!0),L.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[E,m,c,ue]);const Pe=[d,Y,b,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>$(D),...e}):s.jsx(N,{to:Ee(Pe.length)})})),Ee=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Bt(){const a=U().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>H(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(qe,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(N,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Bt as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-BPL36a6x.js";import{a as f}from"./sentry-_x3Yh1Jc.js";import{t as u,u as h,j as y,N as I}from"./core-DOBELRta.js";import{Up as b,gi as w,Js as j}from"./zeni-epic-state-DXFYDM66.js";import{z as l,a8 as x,ag as S,ah as D}from"./index-D0or4oV9.js";import{n as c}from"./mui-wO6EIETx.js";import"./recharts-Sp9X2zHo.js";import"./analytics-GZ8dIY_c.js";import"./plaid-C-eBmVPr.js";import"./dnd-0MaFz9wL.js";import"./stripe-cKAAJElX.js";import"./lottie-38LSfraF.js";import"./lexical-CAgOy6Q-.js";import"./pdf-B2N0erO1.js";import"./utils-BU0XThgM.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]="4900042f-338d-41e7-a8ea-b1c892251cc8",e._sentryDebugIdIdentifier="sentry-dbid-4900042f-338d-41e7-a8ea-b1c892251cc8")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y((m=>b(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,_=c(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{B as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-BPL36a6x.js";import{a as m}from"./sentry-_x3Yh1Jc.js";import{h as $,u as x,g as T,i as j,j as p}from"./core-DOBELRta.js";import{T7 as s,T6 as v,$t as B,fF as C,$u as E}from"./zeni-epic-state-DXFYDM66.js";import{a2 as z,af as g,E as D,z as L,a8 as P,d5 as N,a5 as U}from"./index-D0or4oV9.js";import{n as _}from"./mui-wO6EIETx.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]="c21d2318-76d9-4b8d-9119-52eba3fca032",e._sentryDebugIdIdentifier="sentry-dbid-c21d2318-76d9-4b8d-9119-52eba3fca032")}catch{}})();const G=_.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;function H(){const e=$(),n=x(),d=z(),l=T();let{accountId:a}=j(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,h]=m.useState(!1),y=D();m.useEffect((()=>{u||(h(!0),n(v(a??"",!1)))}),[u,n]);const o=p((t=>B(t,a??""))),b=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),c=p((t=>C(t))),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=E(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:f})})}export{H as Z};
@@ -1 +0,0 @@
1
- import{cT as m,cU as d,Ui as l,de as _}from"./zeni-epic-state-DXFYDM66.js";import{k as u}from"./index-D0or4oV9.js";import"./sentry-_x3Yh1Jc.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="83f4de0d-dba4-4c9b-9ea8-07bb85448391",e._sentryDebugIdIdentifier="sentry-dbid-83f4de0d-dba4-4c9b-9ea8-07bb85448391")}catch{}})();const f=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,c,s)=>{const r=[],i=[];let t=[];s?.forEach((n=>{r.push(n.companyId),i.push(n.companyName),t=t.concat(n.userRole)})),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:c,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?i:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":d(e,a)?"reimbursement":l(e,a)?"zeni_accounts":_(e,a)?"charge_cards":"bill_pay",w=e=>Object.values(e.allocation).map(String).join("-");export{w as a,h as f,g,f as t};