@zeniai/web-app-ui 5.1.81-next → 5.1.82-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/assets/AddressRoutes-B-OHFUYz.js +1 -0
  2. package/dist/assets/AddressScreen-D9Ul8Dxb.js +9 -0
  3. package/dist/assets/{AiCfoScreen-CAf6ZEes.js → AiCfoScreen-DiLxiOHU.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-OOK37dzM.js → BillPayApprovalRoutes-6gAY0XHv.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-DrJrm73Q.js → BillPayRoutes-BlVykZyv.js} +17 -17
  6. package/dist/assets/{BusinessVerificationPageScreen-B-L9gdz1.js → BusinessVerificationPageScreen-DCETvhd8.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-DiqdjAjj.js → CardsAiCfoScreen-CfEdJvYF.js} +3 -3
  8. package/dist/assets/{ChargeCardRoutes-BJkVxY8Z.js → ChargeCardRoutes-COmpcwk4.js} +12 -12
  9. package/dist/assets/{CompanyPassportScreen-BUOnzTWw.js → CompanyPassportScreen-CFy9NTlf.js} +1 -1
  10. package/dist/assets/ConnectionAuthScreen-DmgL09EP.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-DqBjIeRb.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-BMCNuzuH.js → CustomerOnboardingRoutes-zzflyPH3.js} +3 -3
  13. package/dist/assets/{DashboardRoutes-0cSeXm67.js → DashboardRoutes-C4WsA2pG.js} +3 -3
  14. package/dist/assets/{DefaultTenantHome-CP8NoId0.js → DefaultTenantHome-BvJt_3dQ.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-C6o7L4nH.js → DomesticWireDetailScreen-CSRe_o0Z.js} +4 -4
  16. package/dist/assets/{DrawerScreen-BkNTuZZn.js → DrawerScreen-BCogPEDL.js} +1 -1
  17. package/dist/assets/EntityDetailRoutes-C2X5pcIQ.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-CVabqqUr.js → ExpenseAutomationRoutes-B0eoWnRV.js} +3 -3
  19. package/dist/assets/{FeaturePreviewScreen-dZphyDK8.js → FeaturePreviewScreen-BWOweMkx.js} +1 -1
  20. package/dist/assets/HubSpotOAuthCallbackScreen-Bekq0kIS.js +1 -0
  21. package/dist/assets/{MagicLinkRoutes-qhstyQJu.js → MagicLinkRoutes-CHR5JhD6.js} +2 -2
  22. package/dist/assets/MagicLinkSignInScreen-CZXZMVTB.js +12 -0
  23. package/dist/assets/MobileAppDrawer-DUQ59uIE.js +1 -0
  24. package/dist/assets/NotFoundScreen-DbINM0eT.js +1 -0
  25. package/dist/assets/{NotificationRoutes-BrjbH91S.js → NotificationRoutes-Ckjirnas.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-d5agSCvv.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-M-GIvzI6.js +1 -0
  28. package/dist/assets/PeopleRoutes-BtGHFWVD.js +22 -0
  29. package/dist/assets/PerformanceRoutes-WEtJa7Hk.js +1 -0
  30. package/dist/assets/{Preview-Bxn_o2ub.js → Preview-D4ZYcfkK.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-1f76Cjry.js → QBOConnectionScreen-DZ6a6Pn5.js} +1 -1
  32. package/dist/assets/ReferralListScreen-BufpufnF.js +5 -0
  33. package/dist/assets/{ReimbursementApprovalRoutes-DztBHkQc.js → ReimbursementApprovalRoutes-NPPwIK8Y.js} +1 -1
  34. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-_5mmwBdu.js → ReimbursementApprovalRuleDetailScreen-RmB2PavA.js} +1 -1
  35. package/dist/assets/ReimbursementRoutes-CvWaXZJE.js +68 -0
  36. package/dist/assets/{ReportsRoutes-Bty3VgNj.js → ReportsRoutes-BUSlFBpZ.js} +1 -1
  37. package/dist/assets/RewardsRoutes-DZpLem4H.js +1 -0
  38. package/dist/assets/ScreenRoutes-B_EWXDY7.js +2 -0
  39. package/dist/assets/SettingsRoutes-DGpH4sr4.js +57 -0
  40. package/dist/assets/{SetupPagesScreen-DEnNlIFZ.js → SetupPagesScreen-CUJ1-XM4.js} +5 -5
  41. package/dist/assets/SignInScreen-DvbeiFCj.js +1 -0
  42. package/dist/assets/SignOutScreen-C0Ut-fMD.js +9 -0
  43. package/dist/assets/{TaskListScreen-YLciClaW.js → TaskListScreen-BcoWt73W.js} +2 -2
  44. package/dist/assets/TaskRoutes-DuTw4YUa.js +9 -0
  45. package/dist/assets/{TransactionDetailRoutes-DeXE01z1.js → TransactionDetailRoutes-d47zOIxK.js} +1 -1
  46. package/dist/assets/{TransactionDetailScreen-DYaYb3Dh.js → TransactionDetailScreen-CbI5PBMk.js} +2 -2
  47. package/dist/assets/{TransactionListRoutes-DRRo4Xlk.js → TransactionListRoutes-B9szjsIc.js} +1 -1
  48. package/dist/assets/TreasuryRoutes-ChAmTXmv.js +37 -0
  49. package/dist/assets/{VendorsRoutes-CAoEQXHS.js → VendorsRoutes-Bm8I2UHR.js} +1 -1
  50. package/dist/assets/WiseConfirmationScreen--kbx96hY.js +12 -0
  51. package/dist/assets/ZeniAccountRoutes-D6g_ntbO.js +73 -0
  52. package/dist/assets/{ZeniAccountStatementScreen-wVpVNvAj.js → ZeniAccountStatementScreen-CdJ60HCv.js} +2 -2
  53. package/dist/assets/{accountMappingHelper-D5Bw0mp6.js → accountMappingHelper-CaLAZUmW.js} +1 -1
  54. package/dist/assets/{analytics-CpUJgE1w.js → analytics-DyLuuBT1.js} +1 -1
  55. package/dist/assets/{analyticsHelper-CLhyHcZM.js → analyticsHelper-D2oAlw4a.js} +1 -1
  56. package/dist/assets/{core-CDuxXgNT.js → core-BHqQV1j-.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-B8X6jXbR.js → decodeURIComponentSafe-B1lT7PtO.js} +1 -1
  58. package/dist/assets/{dnd-VtUMJCWH.js → dnd-PncgQ6ah.js} +1 -1
  59. package/dist/assets/{empty-Dy_Rugh4.js → empty-CFTi16nV.js} +1 -1
  60. package/dist/assets/{empty-CI6jmlvd.js → empty-DfQxxgrF.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-CzSTlf8_.js → emptyVideoElement-BYWmdxPT.js} +1 -1
  62. package/dist/assets/epic-BHHt9jBJ.js +2 -0
  63. package/dist/assets/{getLocaleForTenant-xMQqjCWD.js → getLocaleForTenant-SgsbGJTJ.js} +1 -1
  64. package/dist/assets/{index-DzOogTqR.js → index-BCSsut58.js} +9952 -9952
  65. package/dist/assets/{index-D4fNRtH0.js → index-BU2Ez_ui.js} +1 -1
  66. package/dist/assets/{index-BQ1ZKP1g.js → index-BpHsaZV0.js} +1 -1
  67. package/dist/assets/{index-BSsnhNl3.js → index-Bq60ilX9.js} +1 -1
  68. package/dist/assets/{index-BqsTwZNl.js → index-CjkK4WZV.js} +1 -1
  69. package/dist/assets/{index-DUxBJrom.js → index-D180oD-b.js} +1 -1
  70. package/dist/assets/{index-D72vEAAO.js → index-DrfsE_ES.js} +2 -2
  71. package/dist/assets/{index-BUfNuy7H.js → index-T9jTnQ8m.js} +1 -1
  72. package/dist/assets/{lexical-CIqawAn4.js → lexical-Boz4mOyF.js} +1 -1
  73. package/dist/assets/{liveblocks-C5Zo4IsV.js → liveblocks-6JNkacrc.js} +1 -1
  74. package/dist/assets/{lottie-B-fnnIRm.js → lottie-C3VtgzwQ.js} +1 -1
  75. package/dist/assets/{mui-BWYOl-fu.js → mui-C5-OLXT3.js} +1 -1
  76. package/dist/assets/{pathToGoBack-YzaQ63IA.js → pathToGoBack-2M7LGiAo.js} +1 -1
  77. package/dist/assets/{pdf-WEHP-u0u.js → pdf-16GwGHdy.js} +3 -3
  78. package/dist/assets/{pdf-lib-eYFk39VK.js → pdf-lib-Ch5CfF-s.js} +1 -1
  79. package/dist/assets/{plaid-2PJJQmCk.js → plaid-BXai4jzs.js} +1 -1
  80. package/dist/assets/{pusher-DG4S91VG.js → pusher-ozRV7lbh.js} +1 -1
  81. package/dist/assets/{react-xbt6TvfU.js → react-BdQcIE7p.js} +1 -1
  82. package/dist/assets/{react-DxeNPC39.js → react-C2tOKb3X.js} +1 -1
  83. package/dist/assets/{react-L4KlSlqR.js → react-CJysfalo.js} +1 -1
  84. package/dist/assets/{react-BBaLVZIY.js → react-CZe6P2aE.js} +1 -1
  85. package/dist/assets/{react-DyOgz1S3.js → react-D1Q0rHoQ.js} +1 -1
  86. package/dist/assets/{react-BruMptWV.js → react-DwMTRWye.js} +1 -1
  87. package/dist/assets/{recharts-DOA55GXl.js → recharts-CZo2yeP8.js} +1 -1
  88. package/dist/assets/{routePaths-rmRxk_gU.js → routePaths-DkQjfNRq.js} +1 -1
  89. package/dist/assets/{sentry-pTjqe1GE.js → sentry-CHrxYia6.js} +1 -1
  90. package/dist/assets/{url-Bx8KkYZ2.js → url-C1h5iywr.js} +1 -1
  91. package/dist/assets/{url--qGqS-sp.js → url-jdVZyqWI.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Ch-s-OUg.js → useAiCfoDashboardSuggestedQuestionsChips-CDQLXIZi.js} +1 -1
  93. package/dist/assets/{useAskAiCfoHostNavButtonProps-DVKlzRut.js → useAskAiCfoHostNavButtonProps-45oJK0hu.js} +1 -1
  94. package/dist/assets/{useCashManagementBanner-BEqGoY3j.js → useCashManagementBanner-CoVbsrBM.js} +1 -1
  95. package/dist/assets/{useChargeCardPusherEvents-DikWnVw6.js → useChargeCardPusherEvents-cQlWV2uK.js} +1 -1
  96. package/dist/assets/{useDeviceId-DxgjldI-.js → useDeviceId-ayvBvlwj.js} +1 -1
  97. package/dist/assets/useEmailConnectResultRefresh-D0dx8xRq.js +1 -0
  98. package/dist/assets/{useInitialThreadRequest-C_oymrXt.js → useInitialThreadRequest-CqGMs5d-.js} +1 -1
  99. package/dist/assets/{utils-C-pFPw5l.js → utils-S8edMjGk.js} +1 -1
  100. package/dist/assets/{withTransactionSidePanel-BzAvEIvv.js → withTransactionSidePanel-DD5T3Sss.js} +2 -2
  101. package/dist/assets/{zeni-epic-state-aFTbMOAR.js → zeni-epic-state-CZM3a-K0.js} +6 -6
  102. package/dist/index.html +1 -1
  103. package/package.json +4 -4
  104. package/dist/assets/AddressRoutes-CZ001L0B.js +0 -1
  105. package/dist/assets/AddressScreen-Cy07AeqE.js +0 -9
  106. package/dist/assets/ConnectionAuthScreen-Bwq_fx00.js +0 -11
  107. package/dist/assets/CustomerOnboardingAuthScreen-CZ5xQsEB.js +0 -1
  108. package/dist/assets/EntityDetailRoutes-D9Vk0h73.js +0 -1
  109. package/dist/assets/HubSpotOAuthCallbackScreen-C2-Grd2S.js +0 -1
  110. package/dist/assets/MagicLinkSignInScreen-Dac_EZMw.js +0 -12
  111. package/dist/assets/MobileAppDrawer-BWG5ZoNF.js +0 -1
  112. package/dist/assets/NotFoundScreen-B_nzx2PP.js +0 -1
  113. package/dist/assets/OAuthConsentScreen-CvlBFjdq.js +0 -1
  114. package/dist/assets/PandLWithForecastRoutes-C_x9Tcg0.js +0 -1
  115. package/dist/assets/PeopleRoutes-DUzH3GNv.js +0 -22
  116. package/dist/assets/PerformanceRoutes-Dm8N0j9j.js +0 -1
  117. package/dist/assets/ReferralListScreen-zKATmg7m.js +0 -5
  118. package/dist/assets/ReimbursementRoutes-DiSfNuHZ.js +0 -68
  119. package/dist/assets/RewardsRoutes-BtSnOW_p.js +0 -1
  120. package/dist/assets/ScreenRoutes-Du9VLb80.js +0 -2
  121. package/dist/assets/SettingsRoutes-DYDw5CwH.js +0 -57
  122. package/dist/assets/SignInScreen-Bd-bOFs3.js +0 -1
  123. package/dist/assets/SignOutScreen-Dqwjcbl7.js +0 -9
  124. package/dist/assets/TaskRoutes-BEsI3ohS.js +0 -9
  125. package/dist/assets/TreasuryRoutes-BkY0fzik.js +0 -37
  126. package/dist/assets/WiseConfirmationScreen-b0LDNO5l.js +0 -12
  127. package/dist/assets/ZeniAccountRoutes-B68Pe7No.js +0 -73
  128. package/dist/assets/epic-DQIIhelC.js +0 -2
  129. package/dist/assets/useEmailConnectResultRefresh-BZf1BjuU.js +0 -1
@@ -1 +1 @@
1
- import{j as v}from"./liveblocks-C5Zo4IsV.js";import{a as u}from"./sentry-pTjqe1GE.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-CDuxXgNT.js";import{LU as U,eX as _,g2 as N,LV as k,oa as R,LW as z}from"./zeni-epic-state-aFTbMOAR.js";import{u as j,z as f,L as T,t as I,a as O,b as $}from"./index-DzOogTqR.js";import"./mui-BWYOl-fu.js";import{t as P}from"./getLocaleForTenant-xMQqjCWD.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="d8287f04-58d7-42de-8b3b-f108d052d52f",t._sentryDebugIdIdentifier="sentry-dbid-d8287f04-58d7-42de-8b3b-f108d052d52f")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(L,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>U(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(N(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!k(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const V=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of V)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-6JNkacrc.js";import{a as u}from"./sentry-CHrxYia6.js";import{u as y,j as b,n as w,g as A,N as L}from"./core-BHqQV1j-.js";import{LT as U,eX as _,g1 as N,LU as k,o9 as R,LV as z}from"./zeni-epic-state-CZM3a-K0.js";import{u as j,z as f,L as T,t as I,a as O,b as $}from"./index-BCSsut58.js";import"./mui-C5-OLXT3.js";import{t as P}from"./getLocaleForTenant-SgsbGJTJ.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="adf58f1e-84b8-41df-b628-37dd013deb4d",t._sentryDebugIdIdentifier="sentry-dbid-adf58f1e-84b8-41df-b628-37dd013deb4d")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(L,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>U(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(N(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!k(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const V=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of V)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-C5Zo4IsV.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-CDuxXgNT.js";import{Q1 as k,Q8 as _,gi as W,gh as X,gg as q,jv as J,N9 as K,ru as L,eX as V,Pz as D,jt as T,Q2 as v,Qb as j,jr as F,jO as G}from"./zeni-epic-state-aFTbMOAR.js";import{bA as M,Z as N,Q as R,z as U,m as O,s as p,e as S,y as Q,bB as Y,o as Z,bC as ee,v as te}from"./index-DzOogTqR.js";import{n as z}from"./mui-BWYOl-fu.js";import"./sentry-pTjqe1GE.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]="ff8172f9-0804-42ef-8548-d053807f7e41",e._sentryDebugIdIdentifier="sentry-dbid-ff8172f9-0804-42ef-8548-d053807f7e41")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(X(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(i=>k(i,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
1
+ import{j as l}from"./liveblocks-6JNkacrc.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-BHqQV1j-.js";import{Q1 as k,Q8 as _,gh as q,gg as W,gf as X,ju as J,N8 as K,rt as L,eX as V,Pz as D,js as T,Q2 as v,Qb as j,jq as F,jN as G}from"./zeni-epic-state-CZM3a-K0.js";import{bA as M,Z as N,Q as R,z as U,m as Q,s as p,e as S,y as Z,bB as Y,o as z,bC as ee,v as te}from"./index-BCSsut58.js";import{n as O}from"./mui-C5-OLXT3.js";import"./sentry-CHrxYia6.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]="d4f83f3e-27b8-41d7-8680-f04d2fa01cdf",e._sentryDebugIdIdentifier="sentry-dbid-d4f83f3e-27b8-41d7-8680-f04d2fa01cdf")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(J(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(X(n,"BillPayVendor"))},onResendOtp:n=>{e(W(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as l}from"./liveblocks-C5Zo4IsV.js";import{h as w,g as C,j as h,n as A,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),i=s.poppedPathname??E();n(i,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:i}=s;e(j({data:i}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),i=s.poppedPathname??E(0);t.navigate(i,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:i}=B(),c=e??s,{useFeatureGate:r}=R(),d=U.getSignedInUser(),b=h(u=>V(u)),g=O(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=r(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(S.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Q,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:i}),l.jsx(oe,{location:a,navigate:n,billId:i,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},P=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return P(e,"ach",t,n)}function Se(e,t,n){return P(e,"domestic",t,n)}function ge(e,t,n){return P(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=z.div`
9
+ `,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??E();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(j({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??E(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),c=e??s,{useFeatureGate:d}=R(),i=U.getSignedInUser(),b=h(u=>V(u)),g=Q(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(S.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:c,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},P=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function ve(e,t,n){return P(e,"ach",t,n)}function Se(e,t,n){return P(e,"domestic",t,n)}function ge(e,t,n){return P(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},de=O.div`
10
10
  display: flex;
11
11
  height: 100vh;
12
12
  width: 100%;
@@ -14,5 +14,5 @@ import{j as l}from"./liveblocks-C5Zo4IsV.js";import{h as w,g as C,j as h,n as A,
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,ie=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:i}=t,{tenantEmailDomain:c}=i;return{onFetchBankName:r=>{e(G(r))},onSaveHandler:r=>{e(F(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:d}=r;e(j({data:d}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),d=r.poppedPathname??$();a(d,{state:{pathnameStackToGoBack:r.newStack}})})(),e(v())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const d=se(c,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(d,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),d=r.poppedPathname??$(0);t.navigate(d,{state:{pathnameStackToGoBack:r.newStack}})}e(v())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:i}=B(),c=e??s,r=U.getSignedInUser(),{useFeatureGate:d}=R(),b=O(),g=h(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=d(S.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Q,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:i}),l.jsx(ie,{location:a,navigate:n,billId:i,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
17
+ box-shadow: ${e=>`0px 2px ${z.sp1} ${e.theme.colors.dropShadowNormal}`};
18
+ `,re=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:c}=r;return{onFetchBankName:d=>{e(G(d))},onSaveHandler:d=>{e(F(t.bankAccountContext,d,"us-domestic",s))},onWireDetailsUpdated:d=>{const{bankAccountSection:i}=d;e(j({data:i}))},onCancel:()=>{(()=>{const d=p(o.state?.pathnameStackToGoBack),i=d.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:d.newStack}})})(),e(v())},onAddressClick:d=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(c,d,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const d=p(t.location.state?.pathnameStackToGoBack),i=d.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:d.newStack}})}e(v())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:r}=B(),c=e??s,d=U.getSignedInUser(),{useFeatureGate:i}=R(),b=Q(),g=h(u=>V(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,c)),{isFeatureEnabled:I}=i(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(S.isDepositAccountsFeatureEnabled);if(d==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(de,{windowSize:o,children:[l.jsx(H,{vendorId:c,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:c,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-C5Zo4IsV.js";import{Z as l,D as c,m as f}from"./index-DzOogTqR.js";import{D as b}from"./mui-BWYOl-fu.js";import"./sentry-pTjqe1GE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="54bd5477-c54f-45bb-8837-15885c458818",e._sentryDebugIdIdentifier="sentry-dbid-54bd5477-c54f-45bb-8837-15885c458818")}catch{}})();const p={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=l(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
1
+ import{j as i}from"./liveblocks-6JNkacrc.js";import{Z as l,D as c,m as f}from"./index-BCSsut58.js";import{D as b}from"./mui-C5-OLXT3.js";import"./sentry-CHrxYia6.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="54bd5477-c54f-45bb-8837-15885c458818",e._sentryDebugIdIdentifier="sentry-dbid-54bd5477-c54f-45bb-8837-15885c458818")}catch{}})();const p={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=l(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-6JNkacrc.js";import{a as c}from"./sentry-CHrxYia6.js";import{h as A,u as B,g as G,i as O,j as d,N as q,n as F,o as K,p as W}from"./core-BHqQV1j-.js";import{Og as _,eX as M,NE as R,lx as Y,K9 as I,Ol as $,N7 as z,kx as J,Ka as S,NJ as V,NK as X,N9 as H,N8 as L}from"./zeni-epic-state-CZM3a-K0.js";import{aW as Q,f as U,s as Z,v as tt}from"./index-BCSsut58.js";import"./mui-C5-OLXT3.js";import{d as k}from"./decodeURIComponentSafe-B1lT7PtO.js";import{w as et}from"./withTransactionSidePanel-DD5T3Sss.js";import{f as at,c as nt}from"./routePaths-DkQjfNRq.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";import"./useAskAiCfoHostNavButtonProps-45oJK0hu.js";import"./TransactionDetailScreen-CbI5PBMk.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="c8730ec2-7c47-4774-9cd7-2ee250c45456",a._sentryDebugIdIdentifier="sentry-dbid-c8730ec2-7c47-4774-9cd7-2ee250c45456")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:J(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=G(),[m,T]=c.useState(!1),[h,g]=c.useState(!1),{tenantEmailDomain:b,entityIdEncoded:x,entityNameEncoded:v}=O(),r=k(x??""),p=k(v??""),u=rt(r,p),w=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=d(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),N=d(n=>M(n).company?.companyInfo.firstMonthOfFY??1),f=d(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));c.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))},[m,u,i]);const E=d(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??D,j=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,D);return c.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:N,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:j,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:C(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(K,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
@@ -1,11 +1,11 @@
1
- import{j as h}from"./liveblocks-C5Zo4IsV.js";import oa from"./NotFoundScreen-B_nzx2PP.js";import{a as o,b as Jt}from"./sentry-pTjqe1GE.js";import{n as Ue,S as sa}from"./mui-BWYOl-fu.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-CDuxXgNT.js";import{eX as Re,T0 as la,ok as ke,fZ as ra,s5 as da,oC as Kt,oX as Zt,T1 as Qt,p5 as ua,T2 as Ht,ov as ma,rD as pa,fJ as Ie,T3 as De,uc as Wt,Ev as Xt,T4 as en,T5 as ha,rb as Ze,Oi as Pt,Ok as ga,kB as Ca,Ol as Sa,kI as fa,c_ as Ia,vp as Qe,oI as tn,pa as Fe,oA as de,T6 as ka,Na as Rt,N9 as we,T7 as Dt,kZ as Ea,T8 as Ta,T9 as ya,Ta as ba,Tb as va,oP as Aa,pd as xe,Tc as wa,Td as xa,Te as Pa,pk as Ra,kM as Da,kD as Fa,Tf as Ua,kL as Ft,Os as Ba,Tg as Oa,Th as _a,r7 as Va,qL as za,pb as me,qK as Ne,Ti as Ma,Tj as La,Tk as ja,mg as $a,bo as qa,mb as Ut,lZ as Ga,Tl as Na,fz as Bt,gy as Ja,m8 as Ya,xi as Ka,Tm as Za,pL as Qa,pG as Ha,pK as Wa,pv as Xa,Tn as eo,fM as nn,o_ as to,oL as no,f_ as Ot,pf as ao,To as oo,Tp as so,pc as an,Tq as co,Tr as io,Ts as lo,Tt as ro,Tu as _t,rj as uo,qC as mo,N8 as po,Tv as ho,Tw as go,kK as Co,Tx as So,Jb as fo,kJ as Io,ky as ko,fL as Eo,q8 as on,qu as To,p9 as Vt,pe as yo,bE as bo,m5 as vo,m2 as Ao,Ty as wo,pu as zt,qq as Mt,qo as xo,Tz as Po,qd as Ro,pV as Do,qr as Fo,TA as Uo,TB as Bo,pZ as Oo,TC as _o,pQ as Vo,pY as zo,pW as Mo,qx as Lo}from"./zeni-epic-state-aFTbMOAR.js";import{Q as sn,e as X,f as q,v as ae,Y as cn,$ as ln,cZ as jo,z as Be,c_ as $o,at as Pe,c$ as qo,aY as Lt,y as rn,d0 as Go,aq as Je,a as No,a8 as Jo,d1 as Yo,a3 as Ko,d2 as Zo,X as Qo,d3 as Ho,d4 as Wo,A as Xo,I as es,aR as ts,d5 as ns,d6 as as,bd as os,D as ss,aU as cs}from"./index-DzOogTqR.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-DVKlzRut.js";import{f as jt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-DYaYb3Dh.js";import{w as us}from"./withTransactionSidePanel-BzAvEIvv.js";import{h as ms,v as ps}from"./routePaths-rmRxk_gU.js";import{g as Ye}from"./accountMappingHelper-D5Bw0mp6.js";import{D as hs}from"./DrawerScreen-BkNTuZZn.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";import"./decodeURIComponentSafe-B8X6jXbR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="08d8f7b5-95fc-40a0-8026-7755af60f2b7",t._sentryDebugIdIdentifier="sentry-dbid-08d8f7b5-95fc-40a0-8026-7755af60f2b7")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,G,ee=!1)=>{t(ke({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(g,f.tenantId,!0)},[E,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),k=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&E(g,f.tenantId)},[E,g,s.fetchState,f.tenantId,T]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(jo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:k,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
1
+ import{j as h}from"./liveblocks-6JNkacrc.js";import oa from"./NotFoundScreen-DbINM0eT.js";import{a as o,b as Nt}from"./sentry-CHrxYia6.js";import{n as Ue,S as sa}from"./mui-C5-OLXT3.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-BHqQV1j-.js";import{eX as Re,S$ as la,oj as ke,fY as ra,s4 as da,oB as Kt,oW as Zt,T0 as Ht,p4 as ua,T1 as Qt,ou as ma,rC as pa,fJ as Ie,T2 as De,ub as Wt,Eu as Xt,T3 as en,T4 as ha,ra as Ze,Oh as Pt,Oj as ga,kA as Ca,Ok as Sa,kH as fa,c_ as Ia,vo as He,oH as tn,p9 as Fe,oz as de,T5 as ka,N9 as Rt,N8 as we,T6 as Dt,kY as Ea,T7 as Ta,T8 as ya,T9 as ba,Ta as va,oO as Aa,pc as xe,Tb as wa,Tc as xa,Td as Pa,pj as Ra,kL as Da,kC as Fa,Te as Ua,kK as Ft,Or as Ba,Tf as Oa,Tg as Va,r6 as _a,qK as za,pa as me,qJ as Je,Th as Ma,Ti as ja,Tj as La,mf as $a,bo as qa,ma as Ut,lY as Ga,Tk as Ja,fz as Bt,gx as Na,m7 as Ya,xh as Ka,Tl as Za,pK as Ha,pF as Qa,pJ as Wa,pu as Xa,Tm as eo,fM as nn,oZ as to,oK as no,fZ as Ot,pe as ao,Tn as oo,To as so,pb as an,Tp as co,Tq as io,Tr as lo,Ts as ro,Tt as Vt,ri as uo,qB as mo,N7 as po,Tu as ho,Tv as go,kJ as Co,Tw as So,Ja as fo,kI as Io,kx as ko,fL as Eo,q7 as on,qt as To,p8 as _t,pd as yo,bE as bo,m4 as vo,m1 as Ao,Tx as wo,pt as zt,qp as Mt,qn as xo,Ty as Po,qc as Ro,pU as Do,qq as Fo,Tz as Uo,TA as Bo,pY as Oo,TB as Vo,pP as _o,pX as zo,pV as Mo,qw as jo}from"./zeni-epic-state-CZM3a-K0.js";import{Q as sn,e as X,f as q,v as ae,Y as cn,$ as ln,cZ as Lo,z as Be,c_ as $o,at as Pe,c$ as qo,aY as jt,y as rn,d0 as Go,aq as Ne,a as Jo,a8 as No,d1 as Yo,a3 as Ko,d2 as Zo,X as Ho,d3 as Qo,d4 as Wo,A as Xo,I as es,aR as ts,d5 as ns,d6 as as,bd as os,D as ss,aU as cs}from"./index-BCSsut58.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-45oJK0hu.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-CbI5PBMk.js";import{w as us}from"./withTransactionSidePanel-DD5T3Sss.js";import{h as ms,v as ps}from"./routePaths-DkQjfNRq.js";import{g as Ye}from"./accountMappingHelper-CaLAZUmW.js";import{D as hs}from"./DrawerScreen-BCogPEDL.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";import"./decodeURIComponentSafe-B1lT7PtO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="6cf552b2-699c-4d76-91e8-0fc8cff21146",t._sentryDebugIdIdentifier="sentry-dbid-6cf552b2-699c-4d76-91e8-0fc8cff21146")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,G,ee=!1)=>{t(ke({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(g,f.tenantId,!0)},[E,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),k=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&E(g,f.tenantId)},[E,g,s.fetchState,f.tenantId,T]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:k,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
5
5
  flex: 1 1 auto;
6
6
  flex-direction: column;
7
7
  background-color: ${t=>t.theme.colors.grey4};
8
- `,Ss=Jt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:b})=>{const S=pe(),r=Be.getSignedInUser(),I=x(e=>Re(e)),s=t.excludedAccountIDs,p=o.useMemo(()=>({userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:I?.tenantId??""}),[r?.userId,r?.zeniSessionId,I?.tenantId]),{accountReconciliationsByAccountID:u,monthYearPeriod:E,statementUploadChosen:v}=t,g=u[l],m=g?.accountReconEntity.statementMetaData?.statementUploadId,P=(e,n)=>{S(pa(e,n.split(".")[0]))},k=e=>{m!=null&&S(ma({accountId:l,selectedPeriod:E,fileId:e,statementUploadId:m}))},T=()=>{S(Qt({statementUploadChosen:!1}))},d=e=>{S(ua({accountId:l,selectedPeriod:E,payload:e}))},G=e=>{S(Ht({accountId:l,selectedPeriod:E,localData:{accountSource:e}}))},ee=o.useCallback(()=>{S(Kt({accountId:l}))},[S,l]),z=o.useCallback(()=>{S(Zt({accountId:l}))},[S,l]),_=s.includes(l)?t.excludedAccountReconciliationByAccountID[l]:void 0;return g!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx($o,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:g,monthYearPeriod:E,onDismissClick:B,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:b,onEditFileName:P,onDeleteFile:k,onSelectSourceType:G,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:p,openFilePicker:v,onStatementUploadSuccess:d,onUploadWindowOpenedOnce:T,onExcludeFromReconciliation:ee})})}):_!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx(qo,{excludedAccountReconciliation:_,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:z})})}):null}),$t=Ue.div`
8
+ `,Ss=Nt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:b})=>{const S=pe(),r=Be.getSignedInUser(),I=x(e=>Re(e)),s=t.excludedAccountIDs,p=o.useMemo(()=>({userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:I?.tenantId??""}),[r?.userId,r?.zeniSessionId,I?.tenantId]),{accountReconciliationsByAccountID:u,monthYearPeriod:E,statementUploadChosen:v}=t,g=u[l],m=g?.accountReconEntity.statementMetaData?.statementUploadId,P=(e,n)=>{S(pa(e,n.split(".")[0]))},k=e=>{m!=null&&S(ma({accountId:l,selectedPeriod:E,fileId:e,statementUploadId:m}))},T=()=>{S(Ht({statementUploadChosen:!1}))},d=e=>{S(ua({accountId:l,selectedPeriod:E,payload:e}))},G=e=>{S(Qt({accountId:l,selectedPeriod:E,localData:{accountSource:e}}))},ee=o.useCallback(()=>{S(Kt({accountId:l}))},[S,l]),z=o.useCallback(()=>{S(Zt({accountId:l}))},[S,l]),V=s.includes(l)?t.excludedAccountReconciliationByAccountID[l]:void 0;return g!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx($o,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:g,monthYearPeriod:E,onDismissClick:B,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:b,onEditFileName:P,onDeleteFile:k,onSelectSourceType:G,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:p,openFilePicker:v,onStatementUploadSuccess:d,onUploadWindowOpenedOnce:T,onExcludeFromReconciliation:ee})})}):V!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx(qo,{excludedAccountReconciliation:V,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:z})})}):null}),$t=Ue.div`
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  height: 100%;
@@ -18,7 +18,7 @@ import{j as h}from"./liveblocks-C5Zo4IsV.js";import oa from"./NotFoundScreen-B_n
18
18
  min-width: 0;
19
19
  overflow-x: hidden;
20
20
  overflow-y: auto;
21
- `;function fs({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:B,resetCustomerRequest:f}){const b=Be.getSignedInUser();if(b==null)throw Error("Can't access Customer Request page without signing in...");const S=x(r=>ha(r,t,b));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:S.fetchState==="In-Progress"||S.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Go,{onCloseClick:l,addCustomerRequest:B,snippets:S.companyMonthEndReportTemplatesData,bulletPoints:S.zeniRequestsData??[]})})}const Is=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:ks,comma:Gt,space:Es}},dateFormat:pn}=No.getLocalizedStrings(),Nt=Lo,Ts=ca(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:S,companyId:r,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:s}=l,p=Be.getSignedInUser(),u=t.tenantState.currentTenantId,E={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},v=Ie(t),{selectedTransactionCategorizationTab:g}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:I===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:E,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Ko}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:g,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:S,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:b,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:E,navigate:v,onClickCustomerRequest:g,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:k,currentSelectedView:T,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:G}=p.jeSchedules,ee=tn(k),z=Fe(ee.start),_=Fe(ee.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{q.trackMissingReceiptAttached(k.month,k.year),t(mo(e))},onUploadTransactionReceipt:(e,n,c,i,y,C)=>{t(_t(e,n,{fetchState:"In-Progress"}));const A=()=>t(_t(e,n,{fetchState:"Error"}));Zo(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,c,i,y).then(O=>{O!=null?t(uo(e,O)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(ro(e,n)),u!=null&&t(ke({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(lo(e,{fetchState:n,error:c})),c!=null&&t(Bt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?Es+ks+i+Gt:Gt}]}))},onUpdateJESchedulesUIState:e=>{t(io(e))},onUpdateMissingReceiptsUIState:e=>{t(co(e))},onFetchMissingReceiptsList:()=>{_!=null&&z!=null&&t(an({start:z,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(zo(e))},onBulkUploadSuccess:e=>{t(Vo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(_o(e))},onConfirmBulkUploadMatch:(e,n,c,i,y)=>{t(Oo(e,n,c,i,y))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Bo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Fo(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Mt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Do())},onSearchTransactionsForManualMatch:(e,n)=>{t(Nt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Nt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ro(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(Po())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(xo())},onResetBulkUploadSort:()=>{t(Mt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(so())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Ne({selectedTab:c,uiState:{searchString:e}})),_!=null&&z!=null&&t(me(c,{start:z,end:_},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(oo({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(ao(S))},onClose:()=>{T==="reconciliation"&&d!=null&&t(Ot({selectedAccountId:void 0})),v("../")},onBack:()=>{T==="reconciliation"&&d!=null&&t(Ot({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(no(e))},onSaveReconciliationReview:e=>{t(to(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=ae(I.state?.pathnameStackToGoBack,I.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:y}=n,C=Ye(G.prepaidExpensesAccountList,c.selectedOptions),A=Ye(G.fixedAssetsAccountList,i.selectedOptions),O=Ye(G.accruedExpensesAccountList,y.selectedOptions),R={selectedPrepaidExpensesAccountIds:C.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:O.map(D=>D.accountId)};t(eo({data:R}))},onSaveJeAccountSettingsClick:()=>{t(Xa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:y,scheduleExpenseCategory:C,vendor:A}=n,{allAccountList:O,allClassList:R,allDepreciationAccountList:D}=p.jeSchedules,L=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(J=>J.id===A?.selectedOption):void 0,oe={id:L?.zeniId??A?.selectedOption??"",name:L?.name??A?.defaultOptions.find(J=>J.value===A?.selectedOption)?.label??"",logo:L?.logo},se=C?.selectedOption!=null?O.find(J=>J.qboId===C.selectedOption):void 0,Oe=y?.selectedOption!=null?R.find(J=>J.classId===y.selectedOption):void 0,_e=i?.selectedOption!=null?D.find(J=>J.qboId===i.selectedOption):void 0;t(Wa({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:se?.accountId,updatedClassId:Oe?.classId,updatedAccumulatedDepreciationCategoryID:_e?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ha(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Rt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(Qa({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Za())},handleJeScheduleClick:(e,n,c)=>{t(Ka({selectedJEScheduleKey:n}));const i=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Ya(e,u.companyId,u.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ja())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Na(e))},onUpdateFileAttachment:e=>{t(Ga({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!1,c,i,u.tenantId))},onEditMonthEndInsightsClick:m,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:i}=p;u!=null&&i?.auditScorePercentage!=null&&(t($a(u.companyId,e,u.tenantId)),q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,qa().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,y,C,A,O,R,D,L,oe,se)=>{t(ja(e,n,c,i,E,y,C,A,O,R,D,L,oe,se))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),_!=null&&z!=null&&(t(me(e,{start:z,end:_},!1,!1)),t(La(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),_!=null&&z!=null&&(t(Ma(e)),t(me("autoCategorized",{start:z,end:_},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Ne({selectedTab:e,uiState:n})),_!=null&&z!=null&&t(me(e,{start:z,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Ne({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,y,C,A)=>{_!=null&&z!=null&&t(me(e,{start:z,end:_},!0,c,n,i,y,C,A))},resetTransactionCategorizationLocalData:(e,n,c,i,y,C,A,O)=>{t(za(e,n,c,i,O??null,y,C,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,y)=>{t(Ft({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:E,updatedVendor:y,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=I.state?.referrer;e==="autoCategorized"?q.trackTransactionsAutoCategorisedPage(k.month,k.year,p.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):q.trackTransactionsReviewPage(k.month,k.year,p.transactionView.totalCountByTab.review,n.length,!1,i??null),t(Va(e,n,c,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(_a({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,y,C,A)=>{const{transactionId:O,transaction:R,lineIds:D}=n;C!=null&&t(Ba({transactionId:O,customerUpdates:C})),t(Oa({selectedTab:i,transactionId:O.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:E,updatedCustomer:C,selectedEntity:y,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),y!=null&&t(Qe({entity:y,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,y,C,A)=>{const{transactionId:O,transaction:R,lineIds:D}=n;C!=null&&(t(Da({transactionId:O,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(Fa({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(Ft({selectedTab:i,transactionId:O.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:E,updatedVendor:C,selectedEntity:y,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),y!=null&&t(Qe({entity:y,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:A}))):t(Ua({selectedTab:i,transactionId:O.id,lineId:D[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(xe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(xe(k,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Ra(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(Pa(e))},updateOperatingExpensesIdsForReview:e=>{t(xa({operatingExpenseIds:e,selectedPeriod:k}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ps(e.id,e.qboId,l.tenantEmailDomain),c=ae(l.location.state?.pathnameStackToGoBack,l.location.pathname);l.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(wa({sectionId:e,selectedPeriod:k}))},onFetchReimbursementView:(e,n,c)=>{t(xe(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(de(k,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Wt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=u?.companyId;c!=null&&(t(Xt(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(en({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ht({accountId:e,selectedPeriod:k,localData:{accountSource:"bank_statement"}})),t(Qt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(de(k,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Aa({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(va({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(ba({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ya({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(Ea(i)),t(Ta({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ze("bill"));const n=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(Dt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Rt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(ka({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Kt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Zt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||T!=="reconciliation"||t(de(k,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...b}=B;return function(S,r,I){return{...S,...r,...I,onUploadTransactionReceipt:(s,p,u,E,v)=>{r.onUploadTransactionReceipt(s,p,u,E,v,S.authParams)}}}(t,l,b)})(Jo(Yo)),ys=us(function(t){const l=t.displayName??t.name??"Component",B=Jt.memo(t),f=b=>{const S=pe(),r=function(){const P=pe(),k=x(T=>Ie(T).reconciliation.selectedDrawerAccountId);return{isOpen:k!=null,selectedAccountId:k,openPanel:o.useCallback(T=>{P(De({selectedDrawerAccountId:T}))},[P]),closePanel:o.useCallback(()=>{P(De({selectedDrawerAccountId:void 0}))},[P])}}(),I=x(P=>Ie(P).reconciliation),s=x(P=>Re(P)),p=o.useCallback((P,k)=>{S(Wt("expense_automation_reconcile",P,k))},[S]),u=o.useCallback((P,k)=>{const T=s?.companyId;T!=null&&(S(Xt(P,T,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",k)),S(en({accountId:k,connectionInProgress:!0})))},[S,s?.companyId]),E=o.useMemo(()=>{if(r.isOpen&&r.selectedAccountId!=null)return h.jsx(Ss,{reconciliation:I,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:p,onEstablishConnectionClick:u})},[r.isOpen,r.selectedAccountId,r.closePanel,I,p,u]),v=o.useMemo(()=>({reconPanelContent:E,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel}),[E,r.isOpen,r.closePanel]),g=o.useContext(Lt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:g,[r.isOpen,r.closePanel,r.selectedAccountId,g]);return h.jsx(Lt.Provider,{value:m,children:h.jsx(B,{...b,...v})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:B,sidePanelIsFullView:f,sidePanelIsOpen:b,reconPanelContent:S,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Qo(),u=Ho(),{isOpen:E}=Wo(),v=Yt(),g=Ke(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:k}=dn({mobileExploreReferrer:"Transaction categorization"}),T=o.useCallback(()=>{b===!0&&f!==!0&&t?.()},[t,b,f]),{areTenantIdsInSync:d}=cn(),G=(()=>{const a=x(N=>Ie(N)),U=Ke(),{currentSelectedViewFetchState:j,currentSelectedView:$,selectedPeriod:w}=a,H=Je($),Y=Je(j.fetchState),Q=o.useCallback(N=>{const W=U.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?q.trackTransactionsReviewPage(w.month,w.year,a.transactionView.totalCountByTab.review,0,N,W??null):q.trackTransactionsAutoCategorisedPage(w.month,w.year,a.transactionView.totalCountByTab.autoCategorized,0,N,W??null)),$==="missing_receipts"&&q.trackMissingReceiptsPage(w.month,w.year,N,a.missingReceipts.transactions.length,W??null),$==="je_schedules"&&q.trackMonthCloseScheduleListPage(w.month,w.year,N,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,W??null),$==="flux_analysis"&&q.trackFluxAnalysisPage(w.month,w.year,N,Is(a.fluxAnalysis),W??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&q.trackInsightsEmailPage(w.month,w.year,N,"draft",a.auditSummary.auditScorePercentage,null,W??null)},[w,a]);return o.useEffect(()=>{Y===j.fetchState&&$===H||j.fetchState!=="Completed"||Q(!1)},[$,j.fetchState,H]),Q})(),ee=Xo(),[z,_]=o.useState(!1),e=x(a=>Pt(a)),n=x(a=>Re(a)),[c,i]=o.useState(!1),[y,C]=o.useState(!1),[A,O]=o.useState([]),[R,D]=o.useState(null),L=o.useCallback(()=>{D(null)},[]),oe=R?.contentType==="activity"?R.detail.transactionId:void 0,se=o.useCallback(a=>{a!=null?(s&&p(!1),u(),T(),D({contentType:"activity",detail:{transactionId:a}})):D(U=>U?.contentType==="activity"?null:U)},[T,s,u,p]),Oe=o.useCallback(a=>{s&&p(!1),u(),T(),D({contentType:"transfer",detail:a})},[T,s,u,p]),_e=o.useCallback(()=>{u(),L(),T(),k()},[T,L,k,u]),J=o.useRef(s);o.useEffect(()=>{s===!0&&J.current===!1&&(u(),L(),T()),J.current=s},[T,L,s,u]);const He=o.useRef(E);o.useEffect(()=>{E===!0&&He.current===!1&&(s&&p(!1),L(),b===!0&&f!==!0&&t?.()),He.current=E},[L,t,E,s,p,f,b]);const Ee=b===!0&&f!==!0,We=o.useRef(Ee);o.useEffect(()=>{Ee&&!We.current&&(s&&p(!1),u(),L()),We.current=Ee},[L,s,Ee,u,p]);const[Xe,hn]=o.useState(!1),et=o.useRef(!1),{selectedTab:tt}=xt(),{tenantEmailDomain:gn}=xt(),[Ve,nt]=o.useState(g.state?.message==="comingFromTransactionDetail"),at=g.state?.message==="comingFromOverview",Cn=es(),ze=Be.getSignedInUser(),{useDynamicConfig:Sn,useFeatureGate:ce}=sn(),{configValue:fn}=Sn(ts.enableUncategorizedExpenseCategory),te=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=ce(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=ce(X.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Me}=ce(X.isTransactionActivityEnabled),{isFeatureEnabled:st}=ce(X.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=ce(X.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:kn}=ce(X.isProjectsTransactionsEnabled),{isFeatureEnabled:En}=ce(X.isJEScheduleCOTEnabled),Tn=o.useCallback(a=>{const U=Ze(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,U)},[l]),yn=x(a=>po(a,"common")),M=x(a=>Ie(a)),{categoryOptions:bn,paymentAccountNames:vn}=x(a=>ho(a.accountState)),An=x(a=>go(a.classState)),{monthEndCloseChecksView:Z,currentSelectedView:F,selectedPeriod:V,selectedTransactionCategorizationTab:Le,currentSelectedViewBackgroundRefreshFetchState:wn,currentSelectedViewFetchState:ie,jeSchedules:je,reconciliation:xn}=M;is(F==="transaction_categorization");const Pn=M.transactionView.saveStatus.fetchState,ct=M.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=x(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=x(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const ne=ls(Pn,()=>{const a=[],U=ut.current,j=dt.current,$=j!=null&&U!=null?j[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const H of Object.values($.transactionReviewLocalDataById)){const Y=H?.transactionReviewLocalData?.lineItemById;if(Y!=null)for(const Q of Object.values(Y)){const N=Q?.account;N?.accountId!=null&&a.push(N.accountId)}}const w=it.current;for(const H of w)for(const Y of H.lines??[])"account"in Y&&Y.account?.accountId!=null&&a.push(Y.account.accountId);return a});o.useEffect(()=>{F==="transaction_categorization"&&b!==!0||se(void 0)},[F,se,b]);const Rn=M.transactionView.selectedTransactionCategorizationCompletedSubTab,Te=`${Le}|${Rn}`,ye=o.useRef(null);o.useEffect(()=>{ye.current!==null?ye.current!==Te&&(ye.current=Te,F==="transaction_categorization"&&L()):ye.current=Te},[L,F,Te]);const Dn=x(a=>oe==null?void 0:Co(a.transactionState,oe)),le=Dn?.qboId,mt=x(a=>le==null?void 0:So(a,le));o.useEffect(()=>{le!=null&&m(fo(le))},[m,le]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:gt}=M.transactionView,Ct=o.useCallback(a=>rs(m,a),[m]),St=o.useMemo(()=>F!=="transaction_categorization"||R==null?null:R.contentType==="activity"?Me===!0?h.jsx(ns,{activityLogView:mt,qboId:le,onClose:()=>D(null),selectedTransactionId:R.detail.transactionId,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null:R.contentType==="transfer"?h.jsx(as,{createTransferEntryStatus:pt,transaction:R.detail,transferAccounts:R.detail.transactionType==="credit_card_payment"?ht:gt,onClose:()=>D(null),onCreateTransfer:Ct,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null,[F,R,Me,mt,le,pt,ht,gt,Ct]),Fn=St!=null,{selectedAccountId:ge}=xn,ft=Je(je.accountSettingsView.saveState.fetchState),Un=x(a=>Io(a.accountState,a.accountListState,"accountList")),Bn=x(a=>ko(a)),Ce=tt!=null?Eo(tt):F,On=x(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:ie.fetchState==="Completed"}),ze==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(V),Se=Fe(It.start),fe=Fe(It.end);if(Se==null||fe==null)throw Error(`Invalid start - ${Se} and end - ${fe} period from given ${V}`);const _n=o.useCallback(()=>{i(!1)},[]),Vn=o.useCallback(()=>{C(!0)},[]),zn=o.useCallback(a=>{O(a),C(!1)},[]),Mn=o.useCallback(()=>{O([])},[]),be=M.missingReceipts.bulkUpload.phase,kt=M.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&F==="missing_receipts"&&be==="matching"&&kt!=null&&m(on({cacheOverride:!0}))},[he,F,be,kt,m]);const Et=ze?.userId,Ln=V.month,jn=V.year,Tt=n?.tenantId;o.useEffect(()=>{F==="missing_receipts"&&he!==!1&&be==="idle"&&Et!=null&&Tt!=null&&m(To())},[F,he,be,Et,Tt,Ln,jn,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?_(!0):_(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{Ce!=null&&F!==Ce&&m(nn(Ce))},[Ce]),o.useEffect(()=>{Xe!==!1||ie.fetchState!=="Completed"&&ie.fetchState!=="Error"||!d||(hn(!0),m(Vt(!1,!1,te)))},[Xe,ie,d,te]),o.useEffect(()=>{!at&&d&&(m(Vt(!1,!1,te)),m(de(V,ge,!1,!1)))},[V.month,V.year,d,te]);const yt=o.useCallback((a=!1,U=!1)=>{const j={start:Se,end:fe};switch(F){case"transaction_categorization":m(me(Le,j,a,!Ve,void 0,void 0,U,void 0,te)),nt(!1);break;case"flux_analysis":m(xe(V,a,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(V.year,V.month,0),w=bo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(vo(!0,n.companyId,n.tenantId,w)),m(Ao(n.companyId,n.tenantId))}break;case"je_schedules":m(yo(j,U));break;case"missing_receipts":m(an(j,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,U));break;default:m(de(V,ge,a,U))}},[F,Se,fe,n.companyId,n.tenantId,Le,V,ge,Ve,nt,te]);o.useEffect(()=>{F===Ce&&ie.fetchState==="Not-Started"&&d&&yt(!0)},[ie,Se,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||Ve||et.current||wn.fetchState==="In-Progress"||ie.fetchState!=="Completed"||(et.current=!0,yt(!0,!0))},[]),o.useEffect(()=>{Z.fetchState!=="In-Progress"&&Z.fetchState!=="Completed"&&m(ke({tenantId:n.tenantId,period:V,refreshViewInBackground:!1}))},[Z.fetchState,n.tenantId]),o.useEffect(()=>{M.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[M.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{M.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(ke({tenantId:n.tenantId,period:V,refreshViewInBackground:!0})),m(wo({companyId:n.companyId})),v("../"))},[M.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,V,n.companyId,d]),o.useEffect(()=>{const a=setInterval(()=>{Z.fetchState!=="In-Progress"&&Z.fetchState==="Completed"&&m(ke({tenantId:n.tenantId,period:V,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(a)},[Z.fetchState,n.tenantId,V,m]),o.useEffect(()=>{const a=setInterval(()=>{F==="reconciliation"&&ge==null&&M.reconciliation.fetchStatus.fetchState==="Completed"&&M.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(de(V,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[F,m,M.reconciliation.fetchStatus.fetchState,M.reconciliation.refreshStatus.fetchState,de,ge,V]);const $n=jt();o.useEffect(()=>{const a=(Z.monthEndCloseChecks?.monthEndCloseCheckList.find(U=>U.id==="month_end_insights")?.isDisabled??!1)&&!ot;F!=="month_end_insights"||!a&&Z.monthEndCloseChecks?.reportEmailSentDate==null||v("../")},[F,Z.monthEndCloseChecks]);const qn=r===!0?S:B,Gn=r===!0||b===!0,Nn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&je.accountSettingsView.saveState.fetchState==="Completed"&&m(zt())},[ft,je.accountSettingsView.saveState.fetchState,zt]);const{transactionId:bt,onSaveVendor:Jn,onSaveSuccess:Yn,onCancel:Kn,vendorViewDetails:Zn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:U,currentSelectedView:j,isUncategorizedExpenseCategoryEnabled:$})=>{const w=pe();let H,Y,Q;const N=jt(),W=a.transactionView;let vt=()=>{};const{transactions:Hn,selectedTransactionId:ue,selectedTransactionLineId:ve,transactionLocalData:Wn}=W;if(j==="transaction_categorization"){const $e=Wn.find(re=>re.transactionId===ue),K=Hn.find(re=>re.id===ue),At=ve!=null?$e?.transactionReviewLocalData?.lineItemById[ve]:void 0,wt=At?.account;Y=At?.class?.classId,H=["Uncategorized Income","Uncategorized Expense"].includes(wt?.accountName??"")?void 0:wt?.accountId;const ea=ms(ue,K?.typeOfTransaction);K!=null&&ea&&(Q={id:ue,type:Ze(K.typeOfTransaction)}),vt=()=>{if(ue!=null&&ve!=null&&K!=null){const re=W.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(re!=null&&K.lines!=null&&K.lines.length>0){const Ae=re.lineItemById[ve];let qe=re.selectedEntity;if(Ia(K)||(qe=Ae.selectedEntityLine),qe!=null){const ta=qe,na={transactionId:{id:K.id,type:K.type},transaction:K,lineIds:K.lines.map(aa=>aa.id)??[]};w(Qe({entity:ta,amount:Ae.amount.amount,transactionDetails:na,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:N,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Xn=x($e=>Pt($e,void 0,H,Y));return{transactionId:Q,onSaveVendor:()=>{w(fa(Q,void 0,!1,!0))},onSaveSuccess:vt,onCancel:()=>{Q!=null&&w(ga({transactionId:Q})),w(Ca()),w(Sa()),U()},vendorViewDetails:Xn}})({expenseAutomationViewSelector:M,closeDrawerHandler:()=>{_(!1)},currentSelectedView:F,isUncategorizedExpenseCategoryEnabled:te}),Qn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,U,j)=>{j.onReconciliationPusherEventReceived(a)}};return Cn?.loggedInUserRoleMap==null?Z.fetchState==="Error"?h.jsx(os,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(hs,{isOpen:y,drawerLeftMargin:new ss(0,0,300,650),onClose:()=>{C(!1)},children:h.jsx(bs,{onClick:a=>a.stopPropagation(),children:h.jsx(fs,{companyId:n.companyId,closeCustomerRequestDrawer:()=>C(!1),addCustomerRequest:zn,resetCustomerRequest:Mn})})}),bt!=null&&z&&h.jsx(ds,{isOpen:z,transactionId:bt,onSaveVendor:Jn,onSaveSuccess:Yn,onCancel:Kn,vendorViewDetails:Zn}),h.jsx(Ts,{...Qn,navigate:v,location:g,themeState:ee,categoryOptions:bn,classesForFilters:An,accountsForFilters:vn,vendorSearchAutoCompleteData:{autoCompleteText:On,entityAutoCompleteView:yn},expenseAutomationViewSelector:M,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:te,isAccountingClassesEnabled:Bn,isProjectsTransactionsEnabled:kn,isCOTEnabled:$n,isJEScheduleCOTEnabled:En,currentTenant:n,companyId:n.companyId,signedInUser:ze,isTransactionActivityEnabled:Me,isRightPanelOpen:Fn,rightSidePanel:St,onOpenTransferRightPanel:st===!0?Oe:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:Vn,handleEditClick:_n,tenantEmailDomain:gn,trackExpenseAutomationTabAnalytics:G,setActivityLogTransactionId:se,closeSidePanel:Nn,openTransactionPanel:l,sidePanelIsOpen:Gn,sidePanelIsFullView:r!==!0&&f,panelContent:qn,isAiCfoAccessEnabled:P,onAskAiCfoClick:_e,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:Tn,sidePanelListPercent:r===!0?66:void 0}),ne.showPopup&&ne.popupType!=null&&h.jsx(cs,{popupType:ne.popupType,currencySymbol:ne.currencySymbol,accountId:ne.popupAccountId??"",accountName:ne.popupAccountName??"",onSubmit:ne.handleSubmit,onDismiss:ne.handleDismiss})]})})),bs=Ue(sa)`
21
+ `;function fs({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:B,resetCustomerRequest:f}){const b=Be.getSignedInUser();if(b==null)throw Error("Can't access Customer Request page without signing in...");const S=x(r=>ha(r,t,b));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:S.fetchState==="In-Progress"||S.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Go,{onCloseClick:l,addCustomerRequest:B,snippets:S.companyMonthEndReportTemplatesData,bulletPoints:S.zeniRequestsData??[]})})}const Is=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:ks,comma:Gt,space:Es}},dateFormat:pn}=Jo.getLocalizedStrings(),Jt=jo,Ts=ca(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:S,companyId:r,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:s}=l,p=Be.getSignedInUser(),u=t.tenantState.currentTenantId,E={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},v=Ie(t),{selectedTransactionCategorizationTab:g}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:I===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:E,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Ko}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:g,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:S,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:b,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:E,navigate:v,onClickCustomerRequest:g,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:k,currentSelectedView:T,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:G}=p.jeSchedules,ee=tn(k),z=Fe(ee.start),V=Fe(ee.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{q.trackMissingReceiptAttached(k.month,k.year),t(mo(e))},onUploadTransactionReceipt:(e,n,c,i,y,C)=>{t(Vt(e,n,{fetchState:"In-Progress"}));const A=()=>t(Vt(e,n,{fetchState:"Error"}));Zo(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,c,i,y).then(O=>{O!=null?t(uo(e,O)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(ro(e,n)),u!=null&&t(ke({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(lo(e,{fetchState:n,error:c})),c!=null&&t(Bt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?Es+ks+i+Gt:Gt}]}))},onUpdateJESchedulesUIState:e=>{t(io(e))},onUpdateMissingReceiptsUIState:e=>{t(co(e))},onFetchMissingReceiptsList:()=>{V!=null&&z!=null&&t(an({start:z,end:V},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(zo(e))},onBulkUploadSuccess:e=>{t(_o({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Vo(e))},onConfirmBulkUploadMatch:(e,n,c,i,y)=>{t(Oo(e,n,c,i,y))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Bo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Fo(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Mt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Do())},onSearchTransactionsForManualMatch:(e,n)=>{t(Jt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Jt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ro(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(Po())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(xo())},onResetBulkUploadSort:()=>{t(Mt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(so())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Je({selectedTab:c,uiState:{searchString:e}})),V!=null&&z!=null&&t(me(c,{start:z,end:V},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(oo({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(ao(S))},onClose:()=>{T==="reconciliation"&&d!=null&&t(Ot({selectedAccountId:void 0})),v("../")},onBack:()=>{T==="reconciliation"&&d!=null&&t(Ot({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(no(e))},onSaveReconciliationReview:e=>{t(to(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=ae(I.state?.pathnameStackToGoBack,I.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:y}=n,C=Ye(G.prepaidExpensesAccountList,c.selectedOptions),A=Ye(G.fixedAssetsAccountList,i.selectedOptions),O=Ye(G.accruedExpensesAccountList,y.selectedOptions),R={selectedPrepaidExpensesAccountIds:C.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:O.map(D=>D.accountId)};t(eo({data:R}))},onSaveJeAccountSettingsClick:()=>{t(Xa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:y,scheduleExpenseCategory:C,vendor:A}=n,{allAccountList:O,allClassList:R,allDepreciationAccountList:D}=p.jeSchedules,j=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(N=>N.id===A?.selectedOption):void 0,oe={id:j?.zeniId??A?.selectedOption??"",name:j?.name??A?.defaultOptions.find(N=>N.value===A?.selectedOption)?.label??"",logo:j?.logo},se=C?.selectedOption!=null?O.find(N=>N.qboId===C.selectedOption):void 0,Oe=y?.selectedOption!=null?R.find(N=>N.classId===y.selectedOption):void 0,Ve=i?.selectedOption!=null?D.find(N=>N.qboId===i.selectedOption):void 0;t(Wa({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:se?.accountId,updatedClassId:Oe?.classId,updatedAccumulatedDepreciationCategoryID:Ve?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Qa(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Rt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(Ha({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Za())},handleJeScheduleClick:(e,n,c)=>{t(Ka({selectedJEScheduleKey:n}));const i=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Ya(e,u.companyId,u.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Na())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ja(e))},onUpdateFileAttachment:e=>{t(Ga({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!1,c,i,u.tenantId))},onEditMonthEndInsightsClick:m,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:i}=p;u!=null&&i?.auditScorePercentage!=null&&(t($a(u.companyId,e,u.tenantId)),q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,qa().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,y,C,A,O,R,D,j,oe,se)=>{t(La(e,n,c,i,E,y,C,A,O,R,D,j,oe,se))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),V!=null&&z!=null&&(t(me(e,{start:z,end:V},!1,!1)),t(ja(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),V!=null&&z!=null&&(t(Ma(e)),t(me("autoCategorized",{start:z,end:V},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Je({selectedTab:e,uiState:n})),V!=null&&z!=null&&t(me(e,{start:z,end:V},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Je({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,y,C,A)=>{V!=null&&z!=null&&t(me(e,{start:z,end:V},!0,c,n,i,y,C,A))},resetTransactionCategorizationLocalData:(e,n,c,i,y,C,A,O)=>{t(za(e,n,c,i,O??null,y,C,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,y)=>{t(Ft({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:E,updatedVendor:y,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=I.state?.referrer;e==="autoCategorized"?q.trackTransactionsAutoCategorisedPage(k.month,k.year,p.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):q.trackTransactionsReviewPage(k.month,k.year,p.transactionView.totalCountByTab.review,n.length,!1,i??null),t(_a(e,n,c,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Va({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,y,C,A)=>{const{transactionId:O,transaction:R,lineIds:D}=n;C!=null&&t(Ba({transactionId:O,customerUpdates:C})),t(Oa({selectedTab:i,transactionId:O.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:E,updatedCustomer:C,selectedEntity:y,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),y!=null&&t(He({entity:y,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,y,C,A)=>{const{transactionId:O,transaction:R,lineIds:D}=n;C!=null&&(t(Da({transactionId:O,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(Fa({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(Ft({selectedTab:i,transactionId:O.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:E,updatedVendor:C,selectedEntity:y,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),y!=null&&t(He({entity:y,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:A}))):t(Ua({selectedTab:i,transactionId:O.id,lineId:D[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(xe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(xe(k,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Ra(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(Pa(e))},updateOperatingExpensesIdsForReview:e=>{t(xa({operatingExpenseIds:e,selectedPeriod:k}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ps(e.id,e.qboId,l.tenantEmailDomain),c=ae(l.location.state?.pathnameStackToGoBack,l.location.pathname);l.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(wa({sectionId:e,selectedPeriod:k}))},onFetchReimbursementView:(e,n,c)=>{t(xe(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(de(k,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Wt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=u?.companyId;c!=null&&(t(Xt(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(en({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Qt({accountId:e,selectedPeriod:k,localData:{accountSource:"bank_statement"}})),t(Ht({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(de(k,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Aa({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(va({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(ba({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ya({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(Ea(i)),t(Ta({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ze("bill"));const n=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(Dt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Rt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(ka({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Kt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Zt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||T!=="reconciliation"||t(de(k,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...b}=B;return function(S,r,I){return{...S,...r,...I,onUploadTransactionReceipt:(s,p,u,E,v)=>{r.onUploadTransactionReceipt(s,p,u,E,v,S.authParams)}}}(t,l,b)})(No(Yo)),ys=us(function(t){const l=t.displayName??t.name??"Component",B=Nt.memo(t),f=b=>{const S=pe(),r=function(){const P=pe(),k=x(T=>Ie(T).reconciliation.selectedDrawerAccountId);return{isOpen:k!=null,selectedAccountId:k,openPanel:o.useCallback(T=>{P(De({selectedDrawerAccountId:T}))},[P]),closePanel:o.useCallback(()=>{P(De({selectedDrawerAccountId:void 0}))},[P])}}(),I=x(P=>Ie(P).reconciliation),s=x(P=>Re(P)),p=o.useCallback((P,k)=>{S(Wt("expense_automation_reconcile",P,k))},[S]),u=o.useCallback((P,k)=>{const T=s?.companyId;T!=null&&(S(Xt(P,T,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",k)),S(en({accountId:k,connectionInProgress:!0})))},[S,s?.companyId]),E=o.useMemo(()=>{if(r.isOpen&&r.selectedAccountId!=null)return h.jsx(Ss,{reconciliation:I,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:p,onEstablishConnectionClick:u})},[r.isOpen,r.selectedAccountId,r.closePanel,I,p,u]),v=o.useMemo(()=>({reconPanelContent:E,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel}),[E,r.isOpen,r.closePanel]),g=o.useContext(jt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:g,[r.isOpen,r.closePanel,r.selectedAccountId,g]);return h.jsx(jt.Provider,{value:m,children:h.jsx(B,{...b,...v})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:B,sidePanelIsFullView:f,sidePanelIsOpen:b,reconPanelContent:S,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Ho(),u=Qo(),{isOpen:E}=Wo(),v=Yt(),g=Ke(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:k}=dn({mobileExploreReferrer:"Transaction categorization"}),T=o.useCallback(()=>{b===!0&&f!==!0&&t?.()},[t,b,f]),{areTenantIdsInSync:d}=cn(),G=(()=>{const a=x(J=>Ie(J)),U=Ke(),{currentSelectedViewFetchState:L,currentSelectedView:$,selectedPeriod:w}=a,Q=Ne($),Y=Ne(L.fetchState),H=o.useCallback(J=>{const W=U.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?q.trackTransactionsReviewPage(w.month,w.year,a.transactionView.totalCountByTab.review,0,J,W??null):q.trackTransactionsAutoCategorisedPage(w.month,w.year,a.transactionView.totalCountByTab.autoCategorized,0,J,W??null)),$==="missing_receipts"&&q.trackMissingReceiptsPage(w.month,w.year,J,a.missingReceipts.transactions.length,W??null),$==="je_schedules"&&q.trackMonthCloseScheduleListPage(w.month,w.year,J,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,W??null),$==="flux_analysis"&&q.trackFluxAnalysisPage(w.month,w.year,J,Is(a.fluxAnalysis),W??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&q.trackInsightsEmailPage(w.month,w.year,J,"draft",a.auditSummary.auditScorePercentage,null,W??null)},[w,a]);return o.useEffect(()=>{Y===L.fetchState&&$===Q||L.fetchState!=="Completed"||H(!1)},[$,L.fetchState,Q]),H})(),ee=Xo(),[z,V]=o.useState(!1),e=x(a=>Pt(a)),n=x(a=>Re(a)),[c,i]=o.useState(!1),[y,C]=o.useState(!1),[A,O]=o.useState([]),[R,D]=o.useState(null),j=o.useCallback(()=>{D(null)},[]),oe=R?.contentType==="activity"?R.detail.transactionId:void 0,se=o.useCallback(a=>{a!=null?(s&&p(!1),u(),T(),D({contentType:"activity",detail:{transactionId:a}})):D(U=>U?.contentType==="activity"?null:U)},[T,s,u,p]),Oe=o.useCallback(a=>{s&&p(!1),u(),T(),D({contentType:"transfer",detail:a})},[T,s,u,p]),Ve=o.useCallback(()=>{u(),j(),T(),k()},[T,j,k,u]),N=o.useRef(s);o.useEffect(()=>{s===!0&&N.current===!1&&(u(),j(),T()),N.current=s},[T,j,s,u]);const Qe=o.useRef(E);o.useEffect(()=>{E===!0&&Qe.current===!1&&(s&&p(!1),j(),b===!0&&f!==!0&&t?.()),Qe.current=E},[j,t,E,s,p,f,b]);const Ee=b===!0&&f!==!0,We=o.useRef(Ee);o.useEffect(()=>{Ee&&!We.current&&(s&&p(!1),u(),j()),We.current=Ee},[j,s,Ee,u,p]);const[Xe,hn]=o.useState(!1),et=o.useRef(!1),{selectedTab:tt}=xt(),{tenantEmailDomain:gn}=xt(),[_e,nt]=o.useState(g.state?.message==="comingFromTransactionDetail"),at=g.state?.message==="comingFromOverview",Cn=es(),ze=Be.getSignedInUser(),{useDynamicConfig:Sn,useFeatureGate:ce}=sn(),{configValue:fn}=Sn(ts.enableUncategorizedExpenseCategory),te=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=ce(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=ce(X.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Me}=ce(X.isTransactionActivityEnabled),{isFeatureEnabled:st}=ce(X.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=ce(X.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:kn}=ce(X.isProjectsTransactionsEnabled),{isFeatureEnabled:En}=ce(X.isJEScheduleCOTEnabled),Tn=o.useCallback(a=>{const U=Ze(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,U)},[l]),yn=x(a=>po(a,"common")),M=x(a=>Ie(a)),{categoryOptions:bn,paymentAccountNames:vn}=x(a=>ho(a.accountState)),An=x(a=>go(a.classState)),{monthEndCloseChecksView:Z,currentSelectedView:F,selectedPeriod:_,selectedTransactionCategorizationTab:je,currentSelectedViewBackgroundRefreshFetchState:wn,currentSelectedViewFetchState:ie,jeSchedules:Le,reconciliation:xn}=M;is(F==="transaction_categorization");const Pn=M.transactionView.saveStatus.fetchState,ct=M.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=x(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=x(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const ne=ls(Pn,()=>{const a=[],U=ut.current,L=dt.current,$=L!=null&&U!=null?L[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const Q of Object.values($.transactionReviewLocalDataById)){const Y=Q?.transactionReviewLocalData?.lineItemById;if(Y!=null)for(const H of Object.values(Y)){const J=H?.account;J?.accountId!=null&&a.push(J.accountId)}}const w=it.current;for(const Q of w)for(const Y of Q.lines??[])"account"in Y&&Y.account?.accountId!=null&&a.push(Y.account.accountId);return a});o.useEffect(()=>{F==="transaction_categorization"&&b!==!0||se(void 0)},[F,se,b]);const Rn=M.transactionView.selectedTransactionCategorizationCompletedSubTab,Te=`${je}|${Rn}`,ye=o.useRef(null);o.useEffect(()=>{ye.current!==null?ye.current!==Te&&(ye.current=Te,F==="transaction_categorization"&&j()):ye.current=Te},[j,F,Te]);const Dn=x(a=>oe==null?void 0:Co(a.transactionState,oe)),le=Dn?.qboId,mt=x(a=>le==null?void 0:So(a,le));o.useEffect(()=>{le!=null&&m(fo(le))},[m,le]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:gt}=M.transactionView,Ct=o.useCallback(a=>rs(m,a),[m]),St=o.useMemo(()=>F!=="transaction_categorization"||R==null?null:R.contentType==="activity"?Me===!0?h.jsx(ns,{activityLogView:mt,qboId:le,onClose:()=>D(null),selectedTransactionId:R.detail.transactionId,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null:R.contentType==="transfer"?h.jsx(as,{createTransferEntryStatus:pt,transaction:R.detail,transferAccounts:R.detail.transactionType==="credit_card_payment"?ht:gt,onClose:()=>D(null),onCreateTransfer:Ct,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null,[F,R,Me,mt,le,pt,ht,gt,Ct]),Fn=St!=null,{selectedAccountId:ge}=xn,ft=Ne(Le.accountSettingsView.saveState.fetchState),Un=x(a=>Io(a.accountState,a.accountListState,"accountList")),Bn=x(a=>ko(a)),Ce=tt!=null?Eo(tt):F,On=x(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:ie.fetchState==="Completed"}),ze==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(_),Se=Fe(It.start),fe=Fe(It.end);if(Se==null||fe==null)throw Error(`Invalid start - ${Se} and end - ${fe} period from given ${_}`);const Vn=o.useCallback(()=>{i(!1)},[]),_n=o.useCallback(()=>{C(!0)},[]),zn=o.useCallback(a=>{O(a),C(!1)},[]),Mn=o.useCallback(()=>{O([])},[]),be=M.missingReceipts.bulkUpload.phase,kt=M.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&F==="missing_receipts"&&be==="matching"&&kt!=null&&m(on({cacheOverride:!0}))},[he,F,be,kt,m]);const Et=ze?.userId,jn=_.month,Ln=_.year,Tt=n?.tenantId;o.useEffect(()=>{F==="missing_receipts"&&he!==!1&&be==="idle"&&Et!=null&&Tt!=null&&m(To())},[F,he,be,Et,Tt,jn,Ln,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?V(!0):V(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{Ce!=null&&F!==Ce&&m(nn(Ce))},[Ce]),o.useEffect(()=>{Xe!==!1||ie.fetchState!=="Completed"&&ie.fetchState!=="Error"||!d||(hn(!0),m(_t(!1,!1,te)))},[Xe,ie,d,te]),o.useEffect(()=>{!at&&d&&(m(_t(!1,!1,te)),m(de(_,ge,!1,!1)))},[_.month,_.year,d,te]);const yt=o.useCallback((a=!1,U=!1)=>{const L={start:Se,end:fe};switch(F){case"transaction_categorization":m(me(je,L,a,!_e,void 0,void 0,U,void 0,te)),nt(!1);break;case"flux_analysis":m(xe(_,a,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(_.year,_.month,0),w=bo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(vo(!0,n.companyId,n.tenantId,w)),m(Ao(n.companyId,n.tenantId))}break;case"je_schedules":m(yo(L,U));break;case"missing_receipts":m(an(L,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,U));break;default:m(de(_,ge,a,U))}},[F,Se,fe,n.companyId,n.tenantId,je,_,ge,_e,nt,te]);o.useEffect(()=>{F===Ce&&ie.fetchState==="Not-Started"&&d&&yt(!0)},[ie,Se,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||_e||et.current||wn.fetchState==="In-Progress"||ie.fetchState!=="Completed"||(et.current=!0,yt(!0,!0))},[]),o.useEffect(()=>{Z.fetchState!=="In-Progress"&&Z.fetchState!=="Completed"&&m(ke({tenantId:n.tenantId,period:_,refreshViewInBackground:!1}))},[Z.fetchState,n.tenantId]),o.useEffect(()=>{M.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[M.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{M.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(ke({tenantId:n.tenantId,period:_,refreshViewInBackground:!0})),m(wo({companyId:n.companyId})),v("../"))},[M.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,_,n.companyId,d]),o.useEffect(()=>{const a=setInterval(()=>{Z.fetchState!=="In-Progress"&&Z.fetchState==="Completed"&&m(ke({tenantId:n.tenantId,period:_,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(a)},[Z.fetchState,n.tenantId,_,m]),o.useEffect(()=>{const a=setInterval(()=>{F==="reconciliation"&&ge==null&&M.reconciliation.fetchStatus.fetchState==="Completed"&&M.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(de(_,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[F,m,M.reconciliation.fetchStatus.fetchState,M.reconciliation.refreshStatus.fetchState,de,ge,_]);const $n=Lt();o.useEffect(()=>{const a=(Z.monthEndCloseChecks?.monthEndCloseCheckList.find(U=>U.id==="month_end_insights")?.isDisabled??!1)&&!ot;F!=="month_end_insights"||!a&&Z.monthEndCloseChecks?.reportEmailSentDate==null||v("../")},[F,Z.monthEndCloseChecks]);const qn=r===!0?S:B,Gn=r===!0||b===!0,Jn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&Le.accountSettingsView.saveState.fetchState==="Completed"&&m(zt())},[ft,Le.accountSettingsView.saveState.fetchState,zt]);const{transactionId:bt,onSaveVendor:Nn,onSaveSuccess:Yn,onCancel:Kn,vendorViewDetails:Zn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:U,currentSelectedView:L,isUncategorizedExpenseCategoryEnabled:$})=>{const w=pe();let Q,Y,H;const J=Lt(),W=a.transactionView;let vt=()=>{};const{transactions:Qn,selectedTransactionId:ue,selectedTransactionLineId:ve,transactionLocalData:Wn}=W;if(L==="transaction_categorization"){const $e=Wn.find(re=>re.transactionId===ue),K=Qn.find(re=>re.id===ue),At=ve!=null?$e?.transactionReviewLocalData?.lineItemById[ve]:void 0,wt=At?.account;Y=At?.class?.classId,Q=["Uncategorized Income","Uncategorized Expense"].includes(wt?.accountName??"")?void 0:wt?.accountId;const ea=ms(ue,K?.typeOfTransaction);K!=null&&ea&&(H={id:ue,type:Ze(K.typeOfTransaction)}),vt=()=>{if(ue!=null&&ve!=null&&K!=null){const re=W.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(re!=null&&K.lines!=null&&K.lines.length>0){const Ae=re.lineItemById[ve];let qe=re.selectedEntity;if(Ia(K)||(qe=Ae.selectedEntityLine),qe!=null){const ta=qe,na={transactionId:{id:K.id,type:K.type},transaction:K,lineIds:K.lines.map(aa=>aa.id)??[]};w(He({entity:ta,amount:Ae.amount.amount,transactionDetails:na,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:J,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Xn=x($e=>Pt($e,void 0,Q,Y));return{transactionId:H,onSaveVendor:()=>{w(fa(H,void 0,!1,!0))},onSaveSuccess:vt,onCancel:()=>{H!=null&&w(ga({transactionId:H})),w(Ca()),w(Sa()),U()},vendorViewDetails:Xn}})({expenseAutomationViewSelector:M,closeDrawerHandler:()=>{V(!1)},currentSelectedView:F,isUncategorizedExpenseCategoryEnabled:te}),Hn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,U,L)=>{L.onReconciliationPusherEventReceived(a)}};return Cn?.loggedInUserRoleMap==null?Z.fetchState==="Error"?h.jsx(os,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(hs,{isOpen:y,drawerLeftMargin:new ss(0,0,300,650),onClose:()=>{C(!1)},children:h.jsx(bs,{onClick:a=>a.stopPropagation(),children:h.jsx(fs,{companyId:n.companyId,closeCustomerRequestDrawer:()=>C(!1),addCustomerRequest:zn,resetCustomerRequest:Mn})})}),bt!=null&&z&&h.jsx(ds,{isOpen:z,transactionId:bt,onSaveVendor:Nn,onSaveSuccess:Yn,onCancel:Kn,vendorViewDetails:Zn}),h.jsx(Ts,{...Hn,navigate:v,location:g,themeState:ee,categoryOptions:bn,classesForFilters:An,accountsForFilters:vn,vendorSearchAutoCompleteData:{autoCompleteText:On,entityAutoCompleteView:yn},expenseAutomationViewSelector:M,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:te,isAccountingClassesEnabled:Bn,isProjectsTransactionsEnabled:kn,isCOTEnabled:$n,isJEScheduleCOTEnabled:En,currentTenant:n,companyId:n.companyId,signedInUser:ze,isTransactionActivityEnabled:Me,isRightPanelOpen:Fn,rightSidePanel:St,onOpenTransferRightPanel:st===!0?Oe:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:_n,handleEditClick:Vn,tenantEmailDomain:gn,trackExpenseAutomationTabAnalytics:G,setActivityLogTransactionId:se,closeSidePanel:Jn,openTransactionPanel:l,sidePanelIsOpen:Gn,sidePanelIsFullView:r!==!0&&f,panelContent:qn,isAiCfoAccessEnabled:P,onAskAiCfoClick:Ve,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:Tn,sidePanelListPercent:r===!0?66:void 0}),ne.showPopup&&ne.popupType!=null&&h.jsx(cs,{popupType:ne.popupType,currencySymbol:ne.currencySymbol,accountId:ne.popupAccountId??"",accountName:ne.popupAccountName??"",onSubmit:ne.handleSubmit,onDismiss:ne.handleDismiss})]})})),bs=Ue(sa)`
22
22
  display: flex;
23
23
  min-height: 100%;
24
24
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-C5Zo4IsV.js";import{a as r}from"./sentry-pTjqe1GE.js";import{a4 as c,a5 as i,a6 as l,s as p}from"./index-DzOogTqR.js";import"./mui-BWYOl-fu.js";import m from"./NotFoundScreen-B_nzx2PP.js";import{h as u,g as b}from"./core-CDuxXgNT.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]="a2964cad-ffb6-4879-bf68-1ae32dc5af2c",a._sentryDebugIdIdentifier="sentry-dbid-a2964cad-ffb6-4879-bf68-1ae32dc5af2c")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=p(e.state?.pathnameStackToGoBack),d=n.poppedPathname??k();a(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(e.pathname);return o!=null?s.jsx(i,{menuItem:l(o),onDemoClick:t,onGoBack:f}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
1
+ import{j as s}from"./liveblocks-6JNkacrc.js";import{a as r}from"./sentry-CHrxYia6.js";import{a4 as c,a5 as i,a6 as l,s as p}from"./index-BCSsut58.js";import"./mui-C5-OLXT3.js";import m from"./NotFoundScreen-DbINM0eT.js";import{h as u,g as b}from"./core-BHqQV1j-.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]="a2964cad-ffb6-4879-bf68-1ae32dc5af2c",a._sentryDebugIdIdentifier="sentry-dbid-a2964cad-ffb6-4879-bf68-1ae32dc5af2c")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=p(e.state?.pathnameStackToGoBack),d=n.poppedPathname??k();a(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(e.pathname);return o!=null?s.jsx(i,{menuItem:l(o),onDemoClick:t,onGoBack:f}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
@@ -0,0 +1 @@
1
+ import{a as r}from"./sentry-CHrxYia6.js";import{u as l,h as m,g as p}from"./core-BHqQV1j-.js";import{ht as f,Mf as g,Mg as _}from"./zeni-epic-state-CZM3a-K0.js";import{u as b,L as h,z as y}from"./index-BCSsut58.js";import"./liveblocks-6JNkacrc.js";import"./recharts-CZo2yeP8.js";import"./mui-C5-OLXT3.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.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]="ca071d2d-875c-46d5-a900-da06571bb95a",e._sentryDebugIdIdentifier="sentry-dbid-ca071d2d-875c-46d5-a900-da06571bb95a")}catch{}})();function R(){const e=l(),n=m(),o=p(),{setLoading:i,clearAllLoading:u}=b(),a=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
@@ -1,4 +1,4 @@
1
- import{j as t}from"./liveblocks-C5Zo4IsV.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-CDuxXgNT.js";import{M9 as k,Ma as v,Mb as M,Bd as B,A$ as T,Mc as A,Md as oe,Me as se,B3 as ie,fA as $,Ba as le,B7 as re}from"./zeni-epic-state-aFTbMOAR.js";import{Z as g,o as r,B as de,f as j,n as G,r as ce,s as me,E as pe,v as V,Q as ue,e as he,w as xe,A as ge,m as fe,x as we,y as be,J as Se,F as ye,S as ke,C as ve,D as je,R as $e}from"./index-DzOogTqR.js";import{n as m}from"./mui-BWYOl-fu.js";import f from"./NotFoundScreen-B_nzx2PP.js";import{a as I}from"./sentry-pTjqe1GE.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.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]="13bc7c4d-c33c-4b99-9988-82a028dc1664",e._sentryDebugIdIdentifier="sentry-dbid-13bc7c4d-c33c-4b99-9988-82a028dc1664")}catch{}})();const Ie=m.div`
1
+ import{j as t}from"./liveblocks-6JNkacrc.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-BHqQV1j-.js";import{M8 as k,M9 as v,Ma as M,Bc as B,A_ as T,Mb as A,Mc as oe,Md as se,B2 as ie,fA as $,B9 as le,B6 as re}from"./zeni-epic-state-CZM3a-K0.js";import{Z as g,o as r,B as de,f as j,n as G,r as ce,s as me,E as pe,v as V,Q as ue,e as he,w as xe,A as ge,m as fe,x as be,y as we,J as Se,F as ye,S as ke,C as ve,D as je,R as $e}from"./index-BCSsut58.js";import{n as m}from"./mui-C5-OLXT3.js";import f from"./NotFoundScreen-DbINM0eT.js";import{a as I}from"./sentry-CHrxYia6.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.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]="37069f2e-7577-470b-960b-8629e720eb91",e._sentryDebugIdIdentifier="sentry-dbid-37069f2e-7577-470b-960b-8629e720eb91")}catch{}})();const Ie=m.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -69,4 +69,4 @@ import{j as t}from"./liveblocks-C5Zo4IsV.js";import{i as S,n as x,h as C,g as y,
69
69
  width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
70
  background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
71
  margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,We=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),_=n.pathname.includes("address"),w=g(),H=ge(),D=fe(),b=we(),K=()=>{H.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:J,fetchState:c,billAttachment:R,billFetchState:P,companyName:q,currencySymbol:O,amount:Q}=W,{tenantId:z,userId:L,sessionId:N}=J,{fetchState:Z,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[b,c,s,o,d,a]),I.useEffect(()=>{b&&c==="Completed"&&($(L,N,z),l!=null&&a(re(l)))},[c,b,L,N,z,l,a]),c==="Error"?t.jsx(f,{}):Z==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",q,l??"",Ue(n.pathname),O,Q))(u)}),t.jsxs(_e,{windowSize:w,children:[w!=="small"?t.jsx(Ve,{onClick:K}):null,t.jsx(Ke,{windowSize:w,isAddressPage:_,children:P==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(We,{file:R,type:"bill"})}),t.jsx(He,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Je(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Je,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
72
+ `,We=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),_=n.pathname.includes("address"),b=g(),H=ge(),D=fe(),w=be(),K=()=>{H.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:J,fetchState:c,billAttachment:Q,billFetchState:P,companyName:R,currencySymbol:q,amount:O}=W,{tenantId:z,userId:L,sessionId:N}=J,{fetchState:Z,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[w,c,s,o,d,a]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,z),l!=null&&a(re(l)))},[c,w,L,N,z,l,a]),c==="Error"?t.jsx(f,{}):Z==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",Ue(n.pathname),q,O))(u)}),t.jsxs(_e,{windowSize:b,children:[b!=="small"?t.jsx(Ve,{onClick:K}):null,t.jsx(Ke,{windowSize:b,isAddressPage:_,children:P==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(We,{file:Q,type:"bill"})}),t.jsx(He,{windowSize:b,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Je(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Je,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-6JNkacrc.js";import{a as g}from"./sentry-CHrxYia6.js";import{u as M,g as O,h as _,t as w,j as l,N as T}from"./core-BHqQV1j-.js";import{z as r,m as V,a as A,g as P,f as N,h as W,p as $,F as R,k as X}from"./index-BCSsut58.js";import{eX as Y,LV as q,M3 as B,LW as G,fA as H,g0 as J,L$ as K,go as Q,cY as Z,M4 as ee,M5 as te}from"./zeni-epic-state-CZM3a-K0.js";import{n as ne}from"./mui-C5-OLXT3.js";import{u as se}from"./useDeviceId-ayvBvlwj.js";import{f as ae}from"./analyticsHelper-D2oAlw4a.js";import{t as ie}from"./getLocaleForTenant-SgsbGJTJ.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="81aa625f-4dc4-4638-8463-83566c216cf8",t._sentryDebugIdIdentifier="sentry-dbid-81aa625f-4dc4-4638-8463-83566c216cf8")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=M(),a=O(),m=_(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>Y(e)),k=l(e=>q(e)),E=r.getSignedInUser(),v=V().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(k.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Q().then(()=>{const e=X();e!=null&&P(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,k,v,a.state,t]);const F=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),j=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx($,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:F});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 9999;
11
+ background-color: ${t=>t.theme.colors.background};
12
+ `;export{xe as default};
@@ -0,0 +1 @@
1
+ import{j as N}from"./liveblocks-6JNkacrc.js";import{a as l}from"./sentry-CHrxYia6.js";import{u as fe,j as n,i as Ye,g as Qe,h as We,l as M}from"./core-BHqQV1j-.js";import{eX as me,fF as Xe,fG as be,fr as qe,bn as Ke,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cN as ca,fX as la,cT as ua,fq as fa,g0 as ma,g1 as ba,f$ as pa}from"./zeni-epic-state-CZM3a-K0.js";import{a8 as ha,a9 as Sa,A as ga,Q as Ea,z as k,x as ka,u as Ca,e as r,i as ya,d as Ia,aa as Ta,I as Aa,c as _a,ab as wa,a4 as Fa,ac as Da,ad as va,ae as ce,af as le,L as $a,ag as xa,ah as ue,f as P,a0 as Ga,v as A,ai as R,aj as Ma}from"./index-BCSsut58.js";import{D as Pa}from"./mui-C5-OLXT3.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="8c2e65c2-bde0-4fee-8b34-9688a3961cdb",f._sentryDebugIdIdentifier="sentry-dbid-8c2e65c2-bde0-4fee-8b34-9688a3961cdb")}catch{}})();const Ra=ha(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=Qe(),C=ga(),o=We(),V=qe(),m=fe(),{useFeatureGate:i}=Ea(),B=k.getSignedInUser(),U=Ke(B),s=n(e=>me(e)),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>Je(e)),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[_,L]=l.useState(void 0),w=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ea(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>aa(e));l.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))},[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.fetchState==="Completed"?na(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Ae}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:we}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,xe=n(e=>g(e).totalUnreadCount),Ge=n(e=>g(e).reducedFetchCountState),Q=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),W=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Me=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:q,isFetchingMore:K,hasFetchedAll:J,fetchMore:Pe}=Ta();l.useEffect(()=>{const e=setTimeout(()=>Pe?.(),0);return()=>clearTimeout(e)}),l.useEffect(()=>{if(q===!1&&K===!1&&J===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[q,K,J]),l.useEffect(()=>{y&&!I&&Me.fetchState==="Not-Started"&&V.tenantId!=null&&m(sa("task_manager","dashboard"))},[y,V.tenantId]),l.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),l.useEffect(()=>{_!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:_},"comments")))},[_,$.fetchState]);const Re={fetchStatus:Ge,count:xe},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n(e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),Y===!1&&S.push("expense_automation_card");const Ne=Aa(),te=n(e=>ia(e,S,h,Ae,Te).fetchState),ne=n(e=>ra(e).fetchState),Ve=w&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!w&&!z?void 0:"disabled",Be=l.useMemo(()=>da(s.userRole),[s.userRole]),Ue=ca(Be),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&la(H.notificationSettings,h.userEmail,Z,s),se=_a(),Le=se&&wa(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=l.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[ze,re]=l.useState(x);l.useEffect(()=>{re(x())},[x]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Da(Ze);return N.jsx(Pa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(va,{signedInUser:B,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:le(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:Y,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=Q===0&&W>0?"notifications/comments":"notifications/tasks";le(a)&&(e=Q===0&&W>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!pe)return void Ga({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),c=e.type,b=R(c)&&c!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&P.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const G=Ma(e.type);ue(e.type)?(j!=null&&m(pa()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${G}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,c=ce(a);let b=`/${encodeURIComponent(u)}/`;const G=R(c);c==="home"?b+="dashboard":c==="users_and_roles"?b+="people":xa(c)?b+="settings/my_profile":ue(c)?b+=`ai-cfo/${c}`:b+=c==="task_checklist"?"tasks":G?"month_end_close_checks/review":encodeURIComponent(c),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;P.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:w,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:we,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),La=f=>{const d=fe(),t=n(C=>me(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Xe(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Ra,{...f,...a})};export{La as M};
@@ -0,0 +1 @@
1
+ import{j as r}from"./liveblocks-6JNkacrc.js";import{h as n,n as i}from"./core-BHqQV1j-.js";import{O as e}from"./index-BCSsut58.js";import"./mui-C5-OLXT3.js";import"./sentry-CHrxYia6.js";import"./zeni-epic-state-CZM3a-K0.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="d7666c0b-2a75-4baf-97d7-b828025403bf",o._sentryDebugIdIdentifier="sentry-dbid-d7666c0b-2a75-4baf-97d7-b828025403bf")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +1 @@
1
- import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-C5Zo4IsV.js";import lt from"./NotFoundScreen-B_nzx2PP.js";import{a as k}from"./sentry-pTjqe1GE.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as O}from"./core-CDuxXgNT.js";import{cu as St,fH as q,eX as H,fV as bt,fO as b,SX as Z,fR as d,fG as y,sp as M,xV as It,SY as Ct,fF as Tt,fY as yt,su as _t,SZ as F,bo as $,fz as w,sy as Q,S_ as At,cG as Et,cz as Nt}from"./zeni-epic-state-aFTbMOAR.js";import{Y as xt,z as Bt,Q as wt,e as Rt,$ as Gt,cW as vt,v as N,a8 as Dt,cX as Ut,a9 as Pt,s as Ft}from"./index-DzOogTqR.js";import"./mui-BWYOl-fu.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-DVKlzRut.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="3b632b7c-d6e5-493a-935c-42db67a0b7e8",t._sentryDebugIdIdentifier="sentry-dbid-3b632b7c-d6e5-493a-935c-42db67a0b7e8")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Z(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(Q("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>q(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const J=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),G=S(e=>b(e).currentSubTab),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:z,isLoading:W,fetchMore:Y,isFetchingMore:L,hasFetchedAll:X}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Z(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&B!=null&&z!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=z.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||X===!0||Y==null||Y(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,X,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];G==="all"?A.push("read","unread"):G!=="mentions"&&A.push(G),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:J,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(O,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(O,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
1
+ import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-6JNkacrc.js";import lt from"./NotFoundScreen-DbINM0eT.js";import{a as k}from"./sentry-CHrxYia6.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as L}from"./core-BHqQV1j-.js";import{cu as St,fH as Q,eX as q,fV as bt,fO as b,SW as Z,fR as m,fG as y,so as M,xU as It,SX as Ct,fF as Tt,fX as yt,st as _t,SY as F,bo as $,fz as w,sx as O,SZ as At,cG as Et,cz as Nt}from"./zeni-epic-state-CZM3a-K0.js";import{Y as xt,z as Bt,Q as wt,e as Rt,$ as Gt,cW as Ut,v as N,a8 as vt,cX as Dt,a9 as Pt,s as Ft}from"./index-BCSsut58.js";import"./mui-C5-OLXT3.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-45oJK0hu.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="cbd1beba-9657-4d06-afd8-0eef1bd22d92",t._sentryDebugIdIdentifier="sentry-dbid-cbd1beba-9657-4d06-afd8-0eef1bd22d92")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=Q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=q(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,d,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}d==="unread"&&t(O("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,d)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){d==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(m(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Z(a,o));const d=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(d,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const d=[];o==="all"?d.push("read","unread"):o!=="mentions"&&d.push(o),t(M("task_manager","dashboard",d))}else R?.()},onUpdateNotificationStatus:(a,o,d,c)=>{a==="tasks"?t(O("task_manager",d,c)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{d==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(m({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(vt(Dt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Q(e)),o=S(e=>q(e)),{useFeatureGate:d}=wt(),{isFeatureEnabled:c}=d(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const J=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),G=S(e=>b(e).currentSubTab),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:v,fetchMore:ot}=ct(),{threads:W,isLoading:z,fetchMore:X,isFetchingMore:Y,hasFetchedAll:H}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Z(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const D=_||v===!0||C!==!0||_||v===!0||C!==!0;k.useEffect(()=>{D&&U!=="In-Progress"?s(m({fetchState:"In-Progress",error:void 0},"comments")):D||U!=="In-Progress"||s(m({fetchState:"Completed",error:void 0},"comments"))},[D,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=W.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(Y||H===!0||X==null||X(),null)}).filter(f=>f!=null);s(m({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,v,Y,C,H,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];G==="all"?A.push("read","unread"):G!=="mentions"&&A.push(G),s(M("task_manager",T,A,!0))}}}},nt=mt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:J,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(L,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(L,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
@@ -0,0 +1 @@
1
+ import{j as m}from"./liveblocks-6JNkacrc.js";import{a as r}from"./sentry-CHrxYia6.js";import{u as T,g as j,j as o,N as A}from"./core-BHqQV1j-.js";import{Mi as C,eX as P,fN as x,Mj as z,Mk as D,Ml as L,Mm as N,o9 as R,Lf as k}from"./zeni-epic-state-CZM3a-K0.js";import{z as h,T as I}from"./index-BCSsut58.js";import"./mui-C5-OLXT3.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="f1d4ac2c-cd37-4dcf-8b6a-bb8ec120baa9",n._sentryDebugIdIdentifier="sentry-dbid-f1d4ac2c-cd37-4dcf-8b6a-bb8ec120baa9")}catch{}})();function ee(){const n=T(),a=j(),{params:t,error:i}=r.useMemo(()=>C(a.search),[a.search]),b=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),w=o(z),y=o(D),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(N())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(s.userId,s.zeniSessionId??void 0))))},[f,s,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const M=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(k(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(A,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -0,0 +1 @@
1
+ import{j as n}from"./liveblocks-6JNkacrc.js";import{h as z,u as Q,g as H,i as J,j as d,n as K,o as X,p as I}from"./core-BHqQV1j-.js";import{eX as v,sc as M,rM as Z,MP as O,rH as S,bs as ee,bn as ae,bY as te,rI as se,MQ as oe,MC as C,dK as re,vR as ne,MR as ce,wc as ie,fE as le,fC as de}from"./zeni-epic-state-CZM3a-K0.js";import{z as fe,Y as me,$ as pe,I as ue,Q as U,e as $,J as he,f as w,ao as ge,v as Fe}from"./index-BCSsut58.js";import"./mui-C5-OLXT3.js";import be from"./NotFoundScreen-DbINM0eT.js";import{F as Ie}from"./FeaturePreviewScreen-BWOweMkx.js";import{a as g}from"./sentry-CHrxYia6.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-45oJK0hu.js";import{u as Se}from"./useInitialThreadRequest-CqGMs5d-.js";import{t as Te}from"./routePaths-DkQjfNRq.js";import{M as ye}from"./MobileAppDrawer-DUQ59uIE.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="9f9a9a9a-2b67-4fad-96e1-14c7f06dc6e1",s._sentryDebugIdIdentifier="sentry-dbid-9f9a9a9a-2b67-4fad-96e1-14c7f06dc6e1")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=K(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function P(){const s=z(),e=Q(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=g.useState(!1),[f,u]=g.useState(!1),h=fe.getSignedInUser(),y=d(t=>v(t)),B=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>M(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(Z());else if(l&&!f){u(!0);const t=((m,L,R)=>L!=null?m.forecasts.findIndex(b=>b.id===L):R!=null?m.forecasts.findIndex(b=>b.id===R):m.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(S(i.forecasts[t].id))}},[c,p,e,l,i,f,u,M,S,F]);const D=ue(),Y=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=U(),{isFeatureEnabled:E}=_($.isReportsCommentingEnabled),q=Se(E?y?.companyId:void 0,{clearParams:l&&f}),[G,V]=g.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:B,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:Y,isAiCfoAccessEnabled:N,onAskAiCfoClick:W,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:q,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(c=>v(c)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(X,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
@@ -0,0 +1,22 @@
1
+ import{j as s}from"./liveblocks-6JNkacrc.js";import{ML as te,eX as X,kx as _,fE as J,fC as ne,Kd as Q,Mp as oe,uO as Ie,MM as N,uD as ke,uY as Ee,uS as ie,uH as re,uW as Pe,uT as je,MN as le,wD as Le,fo as ve,ge as Te,MO as $,uL as ce,uK as de,u$ as Ae,c6 as Oe}from"./zeni-epic-state-CZM3a-K0.js";import{Z as pe,Q as q,e as M,z,i as ue,H as me,ak as ge,al as Fe,D as fe,o as O,K as he,a as Ce,am as Re,Y as Ve,$ as Ze,J as Be,f as be,h as Ue,v as $e,an as Me,I as Ke}from"./index-BCSsut58.js";import{D as ye,n as G,S as Se}from"./mui-C5-OLXT3.js";import ae from"./NotFoundScreen-DbINM0eT.js";import{a as r}from"./sentry-CHrxYia6.js";import{u as ee,i as He,j as m,h as _e,g as ze,n as Ge,o as se,p as U}from"./core-BHqQV1j-.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-45oJK0hu.js";import{M as Ye}from"./MobileAppDrawer-DUQ59uIE.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="dc47bd2d-b72f-407a-8b0a-a1afa132e430",a._sentryDebugIdIdentifier="sentry-dbid-dc47bd2d-b72f-407a-8b0a-a1afa132e430")}catch{}})();const Ne={overlayWidth:new fe(100,100,48)},K=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:b})=>{const f=pe(),u=ee(),[F,R]=r.useState(!1),[I,y]=r.useState(!1),{userId:S}=He(),c=m(e=>te(e)),d=m(e=>X(e)),k=m(e=>_(e)),{useFeatureGate:D}=q(),{isFeatureEnabled:x}=D(M.isDebitCardFeatureEnabled),E=J(x,d),L=ne(d),v=Q(d),V=oe(d),Z=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!E&&k&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{u(N()),b()},T=()=>{F===!0?y(!0):h()},B=l.companyView?.controllers?.map(e=>e.user),p=!!d.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(M.isChargeCardFeatureEnabled),j=ue(d,P,x),A=d.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",C={peopleDetails:c,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:k,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:p===!1,isChargeCardDisabled:j===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:h,onDeleteUser:e=>{u(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{u(ie({peopleLocalData:e})),R(!0)},onSaveClick:()=>{u(g==="zeni_only"?ke(a):Ee(v))},onCloseClick:T,isLoading:w||c.person==null},i={onOkClick:()=>{y(!1),h()},onCancelClick:()=>{y(!1)}};return r.useEffect(()=>{w===!1&&S!=null&&u(Ie(S))},[w,S]),r.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&h()},[c.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:T,children:s.jsxs(Je,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:K.discardTitle}),descriptionComponent:s.jsx(De,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:i,isEditPopup:!0}):null,s.jsx(Fe,{...C})]})})},Je=G(Se)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,we=G(he.H6Regular)`
6
+ margin-top: ${O.sp7};
7
+ padding-left: ${O.sp8};
8
+ padding-right: ${O.sp8};
9
+ color: ${a=>a.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,De=G(he.LargeRegularSp)`
12
+ color: ${a=>a.theme.colors.hero};
13
+ padding-left: ${O.sp8};
14
+ padding-right: ${O.sp8};
15
+ margin-bottom: 30px;
16
+ margin-top: ${O.sp4};
17
+ white-space: pre-line;
18
+ `,Qe={overlayWidth:new fe(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:b})=>{const f=pe(),u=ee(),[F,R]=r.useState(!1),[I,y]=r.useState(!1),S=m(i=>te(i)),c=m(i=>X(i)),d=m(i=>_(i)),{useFeatureGate:k}=q(),{isFeatureEnabled:D}=k(M.isDebitCardFeatureEnabled),x=J(D,c),E=ne(c),L=Q(c),v=oe(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!x&&d&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),u(N())},h=()=>{F===!0?y(!0):w()},T={onOkClick:()=>{y(!1),w()},onCancelClick:()=>{y(!1)}},B=l.companyView?.controllers.map(i=>i.user),p=!!c.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=k(M.isChargeCardFeatureEnabled),j=ue(c,P,D),A=c.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",C={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{u(ie({peopleLocalData:i})),R(!0)},onResetClick:w,onSaveClick:()=>{u(g==="zeni_only"?Pe(a):je())},onCloseClick:h,peopleDetails:S,isAccountingClassesEnabled:d,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:p===!1,isChargeCardDisabled:j===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:x,isCardsOnlyTenant:E,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(b(),u(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:h,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:H.discardTitle}),descriptionComponent:s.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:T}):null,s.jsx(Re,{...C})]})})},ea=G(Se)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,aa=Ge(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:_(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,b)=>{a(re(o,b))},onResendInvite:o=>{a(Ae(o))},onReloadPeople:()=>{a(ce()),a(de(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})(Me);function Y({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=_e(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),b=z.getSignedInUser(),f=m(e=>X(e)),{useFeatureGate:u}=q(),{isFeatureEnabled:F}=u(M.isDebitCardFeatureEnabled),R=m(e=>_(e)),I=!J(F,f)&&R,y=Q(f),S=f?.tenantId,{tenantEmailDomain:c}=f,[d,k]=r.useState(!1),[D,x]=r.useState(!1),[E,L]=r.useState(!1),[v,V]=r.useState("off"),[Z,w]=r.useState(!1),h=e=>{w(e)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=We({mobileExploreReferrer:"People"}),p=m(e=>le(e));Ze({isDataReady:p.fetchState==="Completed"});const P=m(e=>Le(e.classState,e.classListState)),j=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),C=f?.companyId;r.useEffect(()=>{d&&v===p.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),k(!0),n(ce()))},[d,b,S,n,p.uiState.mode,o]),r.useEffect(()=>{C!=null&&o&&n(de(C,I))},[C,I,o]),r.useEffect(()=>{x(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{x(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ue.Event.members)}):null,D===!0?s.jsx(qe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:A,classListView:P,companyId:C,mode:p.uiState.mode}):null,E===!0?s.jsx(Xe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:E,managersListView:j,companyPassportView:A,classListView:P,companyId:C,mode:p.uiState.mode}):null,s.jsx(Ye,{isAppContentDrawerOpen:Z,handleDrawerToggle:h}),s.jsx(aa,{navigate:l,signedInUser:b,isZeni:f.isZeni,isZeniTenant:y,peopleUIState:p.uiState,companyId:C,shouldFetchClasses:I,classList:P,managersView:j,peopleView:p,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n($({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${c}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B})]})}function Sa(){const a=Ke();return Oe(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(U,{path:"/",element:s.jsx(Y,{})}),s.jsx(U,{path:"new",element:s.jsx(Y,{isInvitePeopleDrawerOpen:!0})}),s.jsx(U,{path:":userId/edit",element:s.jsx(Y,{isEditPeopleDrawerOpen:!0})}),s.jsx(U,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(U,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-6JNkacrc.js";import E from"./NotFoundScreen-DbINM0eT.js";import{a as r}from"./sentry-CHrxYia6.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as O,p as h}from"./core-BHqQV1j-.js";import{eX as B,S_ as b,bq as F,bn as N,ie as V,fz as $}from"./zeni-epic-state-CZM3a-K0.js";import{A as q,z as I,$ as X,cY as Y}from"./index-BCSsut58.js";import"./mui-C5-OLXT3.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-45oJK0hu.js";import{M as H}from"./MobileAppDrawer-DUQ59uIE.js";import"./recharts-CZo2yeP8.js";import"./analytics-DyLuuBT1.js";import"./plaid-BXai4jzs.js";import"./dnd-PncgQ6ah.js";import"./stripe-DMRn4zHo.js";import"./lottie-C3VtgzwQ.js";import"./lexical-Boz4mOyF.js";import"./pdf-16GwGHdy.js";import"./utils-S8edMjGk.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]="01e4e40f-7195-4f38-91e5-2955e39f2310",e._sentryDebugIdIdentifier="sentry-dbid-01e4e40f-7195-4f38-91e5-2955e39f2310")}catch{}})();const J=P(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(Y),K=()=>{const e=_(),t=v(),c=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=M(),u=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};