@zeniai/web-app-ui 5.3.40-qa → 5.3.41-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 (128) hide show
  1. package/dist/assets/{AccountMappingScreen-BBc4_4t5.js → AccountMappingScreen-BCgETeoP.js} +2 -2
  2. package/dist/assets/AddressRoutes-DC3JM7a7.js +1 -0
  3. package/dist/assets/{AddressScreen-ueBXhh2E.js → AddressScreen-zTtPIjPs.js} +2 -2
  4. package/dist/assets/{AiCfoScreen-CSA0NZQ_.js → AiCfoScreen-CEkPZFk2.js} +1 -1
  5. package/dist/assets/{AppDrawer-BtmKncXK.js → AppDrawer-De73GA72.js} +1 -1
  6. package/dist/assets/{BillPayApprovalRoutes-DIMv5HVt.js → BillPayApprovalRoutes-BTEGJSVP.js} +1 -1
  7. package/dist/assets/{BillPayRoutes-CWQjup6l.js → BillPayRoutes-D0Zcg2S5.js} +18 -18
  8. package/dist/assets/{BusinessVerificationPageScreen-gxvPC9Nc.js → BusinessVerificationPageScreen-DXdSHPE6.js} +2 -2
  9. package/dist/assets/{CardsAiCfoScreen-X_JzwNdn.js → CardsAiCfoScreen-DwHXFelb.js} +1 -1
  10. package/dist/assets/{ChargeCardRoutes-Bh1W2yGQ.js → ChargeCardRoutes-D7doeHf8.js} +1 -1
  11. package/dist/assets/CompanyPassportScreen-DEbgj-ZU.js +1 -0
  12. package/dist/assets/ConnectionAuthScreen-Bf4vqlR2.js +11 -0
  13. package/dist/assets/CustomerOnboardingAuthScreen-BxvU90OD.js +1 -0
  14. package/dist/assets/{CustomerOnboardingRoutes-DTHzcTqs.js → CustomerOnboardingRoutes-Coi-ieaU.js} +2 -2
  15. package/dist/assets/{DashboardRoutes-CxJPxihE.js → DashboardRoutes-kEzQGszS.js} +1 -1
  16. package/dist/assets/{DefaultTenantHome-DyfCOvBU.js → DefaultTenantHome-_85KjJUE.js} +1 -1
  17. package/dist/assets/DomesticWireDetailScreen-Ci1M06dc.js +18 -0
  18. package/dist/assets/{DrawerScreen-BT9F-F5I.js → DrawerScreen-DzidbbNY.js} +1 -1
  19. package/dist/assets/EntityDetailRoutes---pzooN0.js +1 -0
  20. package/dist/assets/ExpenseAutomationRoutes-Hq-aTHMY.js +38 -0
  21. package/dist/assets/FeaturePreviewScreen-BsptTDQw.js +1 -0
  22. package/dist/assets/{HubSpotOAuthCallbackScreen-C1emp8KW.js → HubSpotOAuthCallbackScreen-CxLQj57b.js} +1 -1
  23. package/dist/assets/{InboxNotificationsProvider-BU6hQETc.js → InboxNotificationsProvider-D007v5X6.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-BVupJlN7.js → InvoicingRoutes-4pD2cLam.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-ujyytXrV.js → MagicLinkRoutes-lsTO85h_.js} +7 -7
  26. package/dist/assets/MagicLinkSignInScreen-CELeUyfh.js +12 -0
  27. package/dist/assets/{MobileAppDrawer-DH0tVOfv.js → MobileAppDrawer-BPpLxyPF.js} +1 -1
  28. package/dist/assets/NotFoundScreen-Bii3lrih.js +1 -0
  29. package/dist/assets/{NotificationRoutes-CnZ8t_aV.js → NotificationRoutes-DIujlAht.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-CXv-sRc6.js → OAuthConsentScreen-BPXn-hZj.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-D_qmzE70.js → PandLWithForecastRoutes-Blj7LUYo.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-CRIOI45V.js → PaymentLinkScreen-BuvjTvnx.js} +8 -8
  33. package/dist/assets/PeopleRoutes-DP4ITyk4.js +22 -0
  34. package/dist/assets/PerformanceRoutes-DbTlyJ7g.js +1 -0
  35. package/dist/assets/{Preview-Cbn9H8uJ.js → Preview-DA8U2xpZ.js} +1 -1
  36. package/dist/assets/{QBOConnectionScreen-3h-qdoms.js → QBOConnectionScreen-DTJHrTBk.js} +23 -23
  37. package/dist/assets/{ReimbursementApprovalRoutes-Bt3jod66.js → ReimbursementApprovalRoutes-L2HInkgU.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Bc4MC7ZP.js → ReimbursementApprovalRuleDetailScreen-B_399PgL.js} +1 -1
  39. package/dist/assets/{ReimbursementRoutes-DGCHkbRG.js → ReimbursementRoutes-CxctCJTH.js} +6 -6
  40. package/dist/assets/{ReportsRoutes-C7NbqVqm.js → ReportsRoutes-t4V__ucH.js} +1 -1
  41. package/dist/assets/RewardsRoutes-2jmm5cDs.js +1 -0
  42. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-BJF3mh7B.js +33 -0
  43. package/dist/assets/ScreenRoutes-CLWbi-Mu.js +2 -0
  44. package/dist/assets/{SettingsRoutes-CapPSjQN.js → SettingsRoutes-B80l8XL-.js} +6 -6
  45. package/dist/assets/{SetupPagesScreen-D0wYkNmR.js → SetupPagesScreen-B69hot1T.js} +5 -5
  46. package/dist/assets/SignInScreen-D9tkVCb4.js +1 -0
  47. package/dist/assets/SignOutScreen-XsQVTTei.js +9 -0
  48. package/dist/assets/{TaskListScreen-CsxsJBj1.js → TaskListScreen-CqKYMM38.js} +2 -2
  49. package/dist/assets/{TaskRoutes-DjWmgiZP.js → TaskRoutes-ByH3im-3.js} +2 -2
  50. package/dist/assets/TransactionDetailRoutes-DAAv4zNm.js +1 -0
  51. package/dist/assets/{TransactionDetailScreen-p3o65tsz.js → TransactionDetailScreen-DL95NJxK.js} +2 -2
  52. package/dist/assets/{TransactionListRoutes-BNdbZ30T.js → TransactionListRoutes-CAMdM58-.js} +1 -1
  53. package/dist/assets/{TreasuryRoutes-DR87vhnp.js → TreasuryRoutes-BBcktIxt.js} +4 -4
  54. package/dist/assets/{VendorsRoutes-CropWmWa.js → VendorsRoutes-be9h9k3f.js} +10 -10
  55. package/dist/assets/{WiseConfirmationScreen-Of1qjtDz.js → WiseConfirmationScreen-B04nGYSU.js} +1 -1
  56. package/dist/assets/{ZeniAccountRoutes-BROaca6I.js → ZeniAccountRoutes-CdVwCUVp.js} +9 -9
  57. package/dist/assets/{ZeniAccountStatementScreen-CBSpTdBS.js → ZeniAccountStatementScreen-CF3L4na6.js} +1 -1
  58. package/dist/assets/{accountMappingHelper-DeDocU0d.js → accountMappingHelper-qlU24D2s.js} +1 -1
  59. package/dist/assets/{analytics-N153TuwK.js → analytics-BvodL4nJ.js} +1 -1
  60. package/dist/assets/{analyticsHelper-BSm7IqEZ.js → analyticsHelper-X6BcuRxb.js} +1 -1
  61. package/dist/assets/{core-1xnf2RtE.js → core-gUqdW_kq.js} +1 -1
  62. package/dist/assets/{decodeURIComponentSafe-DcD-XNVX.js → decodeURIComponentSafe-Cst3Y24b.js} +1 -1
  63. package/dist/assets/{dnd-DsH8jkrb.js → dnd-YSyN45zY.js} +1 -1
  64. package/dist/assets/{empty-Cvto7Qa_.js → empty-BAVoovBk.js} +1 -1
  65. package/dist/assets/{empty-GMcl-a5k.js → empty-CkcqWk4Z.js} +1 -1
  66. package/dist/assets/{emptyVideoElement-3SZu1zsn.js → emptyVideoElement-DMVtoCOe.js} +1 -1
  67. package/dist/assets/{epic-FXcGvl3F.js → epic-DHyjKhvW.js} +1 -1
  68. package/dist/assets/{expenseAutomationHelper-CNRtAWpH.js → expenseAutomationHelper-DDRCXr7k.js} +1 -1
  69. package/dist/assets/{getLocaleForTenant-Ct5cBG_c.js → getLocaleForTenant-DQPwSKjF.js} +1 -1
  70. package/dist/assets/{index-Bdznf1tI.js → index-1WLkQfLs.js} +1 -1
  71. package/dist/assets/{index-CAK36XTm.js → index-6dqseRo4.js} +1 -1
  72. package/dist/assets/{index-Ctq16f6K.js → index-70FTEc4H.js} +1 -1
  73. package/dist/assets/{index-B9A0BRu3.js → index-BhZ9H0Qw.js} +1 -1
  74. package/dist/assets/{index-DXVI9ztu.js → index-BhyEYQTn.js} +15908 -15944
  75. package/dist/assets/{index-BuVXkUYw.js → index-BzFSQsxk.js} +2 -2
  76. package/dist/assets/{index-C_EhkY0q.js → index-ChcsxO47.js} +1 -1
  77. package/dist/assets/{index-Dc3AC-iD.js → index-DhQKJDfi.js} +1 -1
  78. package/dist/assets/{lexical-d2so_3As.js → lexical-Euc6kCJG.js} +1 -1
  79. package/dist/assets/{liveblocks-C_WAhyd7.js → liveblocks-B3m51ZRo.js} +1 -1
  80. package/dist/assets/{lottie-NIzYzhlS.js → lottie-DLBd_qLT.js} +1 -1
  81. package/dist/assets/{mui-BAsIRnB1.js → mui-DCW4m3lZ.js} +1 -1
  82. package/dist/assets/{pathToGoBack-BmzgWhs1.js → pathToGoBack-Ds-XNEX3.js} +1 -1
  83. package/dist/assets/{pdf-BKNPlqtE.js → pdf-BDXl9G7N.js} +4 -4
  84. package/dist/assets/{pdf-lib-RqzDns79.js → pdf-lib-Bku26ZcE.js} +1 -1
  85. package/dist/assets/{plaid-dW1_MCaE.js → plaid-BrXe9xNf.js} +1 -1
  86. package/dist/assets/{pusher-BVnEdZ0V.js → pusher-BzxZmWnS.js} +1 -1
  87. package/dist/assets/{react-xy8FhgjK.js → react-C43HbBFY.js} +1 -1
  88. package/dist/assets/{react-BFlpt3K4.js → react-Cp8yT8Rr.js} +1 -1
  89. package/dist/assets/{react-Dq2pDn48.js → react-Db0eqcPH.js} +1 -1
  90. package/dist/assets/{react-gANl8FSl.js → react-DtuhKjd8.js} +1 -1
  91. package/dist/assets/{react-ClcLrViu.js → react-FxzlmTOI.js} +1 -1
  92. package/dist/assets/{react-hvFnEVKT.js → react-pusavzWL.js} +1 -1
  93. package/dist/assets/{recharts-C2rsrRI6.js → recharts-HpXoq1DR.js} +1 -1
  94. package/dist/assets/{routePaths-3iKgurJn.js → routePaths-DAdB7ufZ.js} +1 -1
  95. package/dist/assets/{sentry-lC29HHPj.js → sentry-DI7gLUjw.js} +1 -1
  96. package/dist/assets/{url-B8rnjauu.js → url-BVmez_R2.js} +1 -1
  97. package/dist/assets/{url-LYbpMOZt.js → url-qyBRakHR.js} +1 -1
  98. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DtwiUC9S.js → useAiCfoDashboardSuggestedQuestionsChips-FMXCfhJm.js} +1 -1
  99. package/dist/assets/useAskAiCfoHostNavButtonProps-BVUNtLFK.js +1 -0
  100. package/dist/assets/{useChargeCardPusherEvents-BQSY-ppK.js → useChargeCardPusherEvents-ldgEvsXz.js} +1 -1
  101. package/dist/assets/{useDeviceId-BX84j5B2.js → useDeviceId-kl-tdydV.js} +1 -1
  102. package/dist/assets/{useEmailConnectResultRefresh-BzSlD1q5.js → useEmailConnectResultRefresh-BDGN0_Dv.js} +1 -1
  103. package/dist/assets/{useInitialThreadRequest-BFDb_b7F.js → useInitialThreadRequest-DTQjUnhP.js} +1 -1
  104. package/dist/assets/{useTaskManagerAccess-B7YJLgDK.js → useTaskManagerAccess-U48bmWaI.js} +1 -1
  105. package/dist/assets/{utils-BBaMea9r.js → utils-8Dv5nUFZ.js} +1 -1
  106. package/dist/assets/{withTransactionSidePanel-CkEUNYr4.js → withTransactionSidePanel-0Fy2VPJ-.js} +2 -2
  107. package/dist/assets/{zeni-epic-state-BVNUxmav.js → zeni-epic-state-C-d25VTi.js} +3 -3
  108. package/dist/index.html +1 -1
  109. package/package.json +2 -2
  110. package/dist/assets/AddressRoutes-DUeinmsu.js +0 -1
  111. package/dist/assets/CompanyPassportScreen-XQqdGh6R.js +0 -1
  112. package/dist/assets/ConnectionAuthScreen-BKS6qkfS.js +0 -11
  113. package/dist/assets/CustomerOnboardingAuthScreen-_W8JsjC9.js +0 -1
  114. package/dist/assets/DomesticWireDetailScreen-Cpm9Bc_C.js +0 -18
  115. package/dist/assets/EntityDetailRoutes-GrYbpLDE.js +0 -1
  116. package/dist/assets/ExpenseAutomationRoutes-BAcJRoU4.js +0 -38
  117. package/dist/assets/FeaturePreviewScreen-CWY6I3fG.js +0 -1
  118. package/dist/assets/MagicLinkSignInScreen-yhSK6wYK.js +0 -12
  119. package/dist/assets/NotFoundScreen-BF2gJW91.js +0 -1
  120. package/dist/assets/PeopleRoutes-BBOCzTBv.js +0 -22
  121. package/dist/assets/PerformanceRoutes-C5sk5hTF.js +0 -1
  122. package/dist/assets/RewardsRoutes-CnXmBpce.js +0 -1
  123. package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CplHlAVo.js +0 -25
  124. package/dist/assets/ScreenRoutes-DW0KFZF8.js +0 -2
  125. package/dist/assets/SignInScreen-ByJdILpU.js +0 -1
  126. package/dist/assets/SignOutScreen-BAACKxOn.js +0 -9
  127. package/dist/assets/TransactionDetailRoutes-B97JNzan.js +0 -1
  128. package/dist/assets/useAskAiCfoHostNavButtonProps-C4hcJx1x.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-C_WAhyd7.js";import{i as S,l as g,h as C,g as y,u as ee,t as ae,j as E,N as te,n as ne,o as p}from"./core-1xnf2RtE.js";import{TI as k,TJ as I,TK as F,IM as D,Iy as M,TL as B,TM as oe,TN as ie,IC as se,gh as j,IJ as le,IG as re}from"./zeni-epic-state-BVNUxmav.js";import{a1 as x,I as r,a2 as de,h as v,W as G,a3 as ce,a4 as me,a5 as pe,p as K,M as ue,y as he,a6 as ge,X as xe,E as fe,f as be,a7 as we,a8 as Se,_ as ye,a9 as ke,aa as Ie,ab as ve,ac as je}from"./index-DXVI9ztu.js";import{n as m}from"./mui-BAsIRnB1.js";import f from"./NotFoundScreen-BF2gJW91.js";import{a as $}from"./sentry-lC29HHPj.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.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]="cd55e2b3-8bae-4754-9f0e-ab2af3a3535d",e._sentryDebugIdIdentifier="sentry-dbid-cd55e2b3-8bae-4754-9f0e-ab2af3a3535d")}catch{}})();const $e=m.div`
1
+ import{j as a}from"./liveblocks-B3m51ZRo.js";import{i as S,l as g,h as C,g as y,u as ee,t as ae,j as E,N as te,n as ne,o as p}from"./core-gUqdW_kq.js";import{TI as k,TJ as v,TK as F,IM as D,Iy as M,TL as B,TM as oe,TN as ie,IC as se,gh as j,IJ as le,IG as re}from"./zeni-epic-state-C-d25VTi.js";import{a1 as x,J as r,a2 as de,k as I,X as G,a3 as ce,a4 as me,a5 as pe,p as K,M as ue,y as he,a6 as ge,c as xe,E as fe,f as be,a7 as we,a8 as Se,$ as ye,a9 as ke,aa as ve,ab as Ie,ac as je}from"./index-BhyEYQTn.js";import{n as m}from"./mui-DCW4m3lZ.js";import f from"./NotFoundScreen-Bii3lrih.js";import{a as $}from"./sentry-DI7gLUjw.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.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]="71a1aeba-71b4-463a-9ae3-0765f130487c",e._sentryDebugIdIdentifier="sentry-dbid-71a1aeba-71b4-463a-9ae3-0765f130487c")}catch{}})();const $e=m.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -7,7 +7,7 @@ import{j as a}from"./liveblocks-C_WAhyd7.js";import{i as S,l as g,h as C,g as y,
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
9
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=g((function(e){const t=k(e),n=I(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(M(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(D(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(F({data:l}))}}}))(de);function T(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx($e,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const De=m.div`
10
+ `,Ce=g((function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(M(i))},onSaveHandler:i=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(D(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(F({data:l}))}}}))(de);function T(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx($e,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const De=m.div`
11
11
  display: flex;
12
12
  height: 100vh;
13
13
  width: 100%;
@@ -25,7 +25,7 @@ import{j as a}from"./liveblocks-C_WAhyd7.js";import{i as S,l as g,h as C,g as y,
25
25
  align-items: center;
26
26
  background-color: ${e=>e.theme.colors.grey4};
27
27
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=g((function(e){const t=k(e),n=I(e),o=B(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(M(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(F({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=K(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(pe);function Ee(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:i})})})}const Te=m.div`
28
+ `,Ne=g((function(e){const t=k(e),n=v(e),o=B(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(M(s))},onSaveHandler:s=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(F({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=K(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(pe);function Ee(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:i})})})}const Te=m.div`
29
29
  display: flex;
30
30
  height: 100%;
31
31
  width: 100%;
@@ -34,7 +34,7 @@ import{j as a}from"./liveblocks-C_WAhyd7.js";import{i as S,l as g,h as C,g as y,
34
34
  align-items: center;
35
35
  background-color: ${e=>e.theme.colors.grey4};
36
36
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Fe=g((function(e){const t=k(e),n=I(e),o=B(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=K(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(ge);function Me(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Te,{windowSize:n,children:a.jsx(Fe,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new ve(100,58)},Ke=m(ke)`
37
+ `,Fe=g((function(e){const t=k(e),n=v(e),o=B(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{I.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=K(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(ge);function Me(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Te,{windowSize:n,children:a.jsx(Fe,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new Ie(100,58)},Ke=m(ke)`
38
38
  width: ${r.sp4};
39
39
  height: ${r.sp4};
40
40
  margin-bottom: ${r.sp3};
@@ -50,7 +50,7 @@ import{j as a}from"./liveblocks-C_WAhyd7.js";import{i as S,l as g,h as C,g as y,
50
50
  width: 100vw;
51
51
  overflow-y: scroll;
52
52
  background-color: ${e=>e.theme.colors.grey4};
53
- `,We=m.div`
53
+ `,_e=m.div`
54
54
  display: flex;
55
55
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
56
  flex-direction: column;
@@ -58,7 +58,7 @@ import{j as a}from"./liveblocks-C_WAhyd7.js";import{i as S,l as g,h as C,g as y,
58
58
  ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
59
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
60
  padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
- `,_e=m.div`
61
+ `,He=m.div`
62
62
  display: flex;
63
63
  flex-direction: column;
64
64
  align-items: center;
@@ -69,4 +69,4 @@ import{j as a}from"./liveblocks-C_WAhyd7.js";import{i as S,l as g,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
- `,He=g((function(e,t){return{file:t.file,type:t.type}}))(Ie);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),d=s.get("token"),V=n.pathname.includes("address"),b=x(),W=xe(),A=fe(),w=be(),_=()=>{W.toggle()},H=E((u=>k(u))),J=E((u=>I(u))),{authParams:U,fetchState:c,billAttachment:X,billFetchState:P,companyName:q,currencySymbol:O,amount:Q}=H,{tenantId:z,userId:L,sessionId:N}=U,{fetchState:R,internationalBankAccountCreateStatus:Y}=J;return $.useEffect((()=>{j()}),[]),$.useEffect((()=>{w&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(le(i,o,d))}),[w,c,i,o,d,t]),$.useEffect((()=>{w&&c==="Completed"&&(j(L,N,z),l!=null&&t(re(l)))}),[c,w,L,N,z,l,t]),c==="Error"?a.jsx(f,{}):R==="Completed"||Y.fetchState==="Completed"?(j(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:v,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",q,l??"",Je(n.pathname),O,Q))(u)}),a.jsxs(Ve,{windowSize:b,children:[b!=="small"?a.jsx(Ke,{onClick:_}):null,a.jsx(_e,{windowSize:b,isAddressPage:V,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(He,{file:X,type:"bill"})}),a.jsx(We,{windowSize:b,children:e})]})]})}const Je=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return a.jsx(je,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Ue,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(T,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(T,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Me,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
72
+ `,Je=g((function(e,t){return{file:t.file,type:t.type}}))(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),d=s.get("token"),V=n.pathname.includes("address"),b=x(),_=xe(),A=fe(),w=be(),H=()=>{_.toggle()},J=E((u=>k(u))),W=E((u=>v(u))),{authParams:U,fetchState:c,billAttachment:q,billFetchState:P,companyName:O,currencySymbol:Q,amount:X}=J,{tenantId:z,userId:L,sessionId:N}=U,{fetchState:R,internationalBankAccountCreateStatus:Y}=W;return $.useEffect((()=>{j()}),[]),$.useEffect((()=>{w&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(le(i,o,d))}),[w,c,i,o,d,t]),$.useEffect((()=>{w&&c==="Completed"&&(j(L,N,z),l!=null&&t(re(l)))}),[c,w,L,N,z,l,t]),c==="Error"?a.jsx(f,{}):R==="Completed"||Y.fetchState==="Completed"?(j(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:I,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",O,l??"",We(n.pathname),Q,X))(u)}),a.jsxs(Ve,{windowSize:b,children:[b!=="small"?a.jsx(Ke,{onClick:H}):null,a.jsx(He,{windowSize:b,isAddressPage:V,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(Je,{file:q,type:"bill"})}),a.jsx(_e,{windowSize:b,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return a.jsx(je,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Ue,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(T,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(T,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Me,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-B3m51ZRo.js";import{a as g}from"./sentry-DI7gLUjw.js";import{u as O,g as _,h as w,t as A,j as l,N as L}from"./core-gUqdW_kq.js";import{z as r,E as M,G as P,T as V,k as N,U as G,_ as W,$,W as R}from"./index-BhyEYQTn.js";import{fE as q,Tb as B,TE as H,Tv as J,gh as K,gj as Q,TA as X,gT as Y,di as Z,TF as ee,TG as te}from"./zeni-epic-state-C-d25VTi.js";import{n as ne}from"./mui-DCW4m3lZ.js";import{u as ae}from"./useDeviceId-kl-tdydV.js";import{f as se}from"./analyticsHelper-X6BcuRxb.js";import{t as ie}from"./getLocaleForTenant-DQPwSKjF.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.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]="a93563e1-caef-44dd-9ba9-07363a91a2e2",t._sentryDebugIdIdentifier="sentry-dbid-a93563e1-caef-44dd-9ba9-07363a91a2e2")}catch{}})();const E=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function Ee(){const t=O(),s=_(),f=w(),[b]=A(),n=b.get("token"),p=b.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),a=l((e=>e.tenantState.loggedInUser)),o=l((e=>q(e))),k=l((e=>B(e))),D=r.getSignedInUser(),T=M().mode;g.useEffect((()=>{a?.zeniSessionId==null&&n!=null&&E(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,m)))}),[n,p,t,i,m,a?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(J(k.tenantsInOrder),a.zeniSessionId),K(a.userId,a.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),P.updateAppLocaleID(ie(o)),se(a,o,T,void 0,k.tenantsInOrder),Y().then((()=>{const e=R();e!=null&&V(e)})),setTimeout((()=>{N.trackLogin(G.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[h,S,y,a,o,k,T,s.state,t]);const j=g.useCallback((()=>{f("/signin/auth")}),[f]),F=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),U=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(W,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:U,onCancelVerifyDevice:j});if(h==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||D!=null){const e=s.state?.origin??"/";return u.jsx(L,{to:e,state:{...s.state,origin:""}})}if(!E(n,p)||m==null||I==="Error"){const e=s.state?.origin??"/",v=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(L,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:v,magicLinkExpired:!v&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx($,{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{Ee as default};
@@ -1 +1 @@
1
- import{j as B}from"./liveblocks-C_WAhyd7.js";import{a as m}from"./sentry-lC29HHPj.js";import{u as te,j as t,i as $e,g as Ge,h as Me,q as _}from"./core-1xnf2RtE.js";import{fE as ne,Tc as xe,Td as se,g8 as Ne,fD as Pe,Tm as Re,Tf as Ve,Tg as je,p_ as Le,gl as Oe,Tj as b,To as Ue,Tp as K,gm as Ze,Tq as ze,Dt as qe,h0 as He,cV as Ye,Tr as Je,g7 as We,gn as Xe}from"./zeni-epic-state-BVNUxmav.js";import{w as Ke,i as Qe,X as ea,M as aa,c as ta,f as na,u as sa,y as c,g as oa,e as ia,z as ra,d as da,j as ca,k as la,r as ua,n as ma,o as Q,L as fa,D as ha,F as ba,p as S,h as ee,v as pa,J as ae,A as ga,B as Sa}from"./index-DXVI9ztu.js";import{D as Ta}from"./mui-BAsIRnB1.js";import{u as ka}from"./InboxNotificationsProvider-BU6hQETc.js";import{u as Ea}from"./useTaskManagerAccess-B7YJLgDK.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="071968c8-78b6-4a9d-a069-f1c66b70593f",l._sentryDebugIdIdentifier="sentry-dbid-071968c8-78b6-4a9d-a069-f1c66b70593f")}catch{}})();const Ca=Ke((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),T=ea(),n=Me(),F=Ne(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ea(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Pe(e))),{status:ie}=t(Re),G=$.uiState.currentChatSessionId,E=na(),{setLoading:re}=sa(),[w,M]=m.useState(void 0),A=_("/:tenantEmailDomain/dashboard")!==null,x=_("/:tenantEmailDomain/reports")!==null,f=_("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:N}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,N),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),P=t((e=>Ve(e))),{isFeatureEnabled:C}=d(c.isReferralFeatureEnabled),v=t((e=>je(e)));m.useEffect((()=>{E&&C&&!f&&v.fetchState==="Not-Started"&&r(Le(!0))}),[E,C,v.fetchState,f]);const D=t((e=>e.tenantState)),me=t((e=>D.fetchState==="Completed"?Oe(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),R=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Te=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>b(e).totalUnreadCount)),Ee=t((e=>b(e).reducedFetchCountState)),V=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),j=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:O,isLoading:U,isFetchingMore:Z,hasFetchedAll:z,fetchMore:Ce}=ka();m.useEffect((()=>{const e=setTimeout((()=>Ce?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(U===!1&&Z===!1&&z===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;M(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else M(0)}),[U,Z,z]),m.useEffect((()=>{E&&k&&!f&&L.fetchState==="Not-Started"&&F.tenantId!=null&&r(Ue("task_manager","dashboard"))}),[E,k,f,L.fetchState,F.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(K({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(K({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ee,count:ke},q=s!=null?ra.getSignedInUserTenant(s):null,H=t((e=>q?.tenantId!=null?Ze(e,q.tenantId):void 0)),h=[];fe===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),C===!1&&h.push("rewards_card"),R===!1&&h.push("expense_automation_card");const Y=t((e=>ze(e,h).fetchState)),J=t((e=>qe(e).fetchState)),ye=A&&(Y==="Completed"||Y==="Error")||x&&(J==="Completed"||J==="Error")||!A&&!x?void 0:"disabled",we=m.useMemo((()=>He(o.userRole)),[o.userRole]),Ae=Ye(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&P.fetchState==="Completed"&&Je(P.notificationSettings,p.userEmail,N,o,k),W=da(),_e=W&&ca(a);return B.jsx(Ta,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?me:H!=null?[H]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:Q(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Te,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:C,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:W,onNotificationIconClick:()=>{i(!1);let e=V===0&&j>0?"notifications/comments":"notifications/tasks";Q(a)&&(e=V===0&&j>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),X=e.type,Be=ae(X)&&X!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),Be&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Fe=ga(e.type);Sa(e.type)?(G!=null&&r(Xe()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Fe}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{T.toggle()},isAiCfo:_e,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(We({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Fa=l=>{const i=te(),s=t((T=>ne(T))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(T,n)=>{Qe(n)&&xe(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return B.jsx(Ca,{...l,...a})};export{Fa as M};
1
+ import{j as B}from"./liveblocks-B3m51ZRo.js";import{a as m}from"./sentry-DI7gLUjw.js";import{u as te,j as t,i as $e,g as Ge,h as Me,q as _}from"./core-gUqdW_kq.js";import{fE as ne,Tc as Ne,Td as se,g8 as xe,fD as Pe,Tm as Re,Tf as Ve,Tg as je,p_ as Le,gl as Oe,Tj as b,To as Ue,Tp as Q,gm as Ze,Tq as qe,Dt as ze,h0 as He,cV as Ye,Tr as We,g7 as Je,gn as Ke}from"./zeni-epic-state-C-d25VTi.js";import{w as Qe,i as Xe,c as ea,M as aa,d as ta,f as na,u as sa,y as c,g as oa,s as ia,z as ra,e as da,l as ca,n as la,r as ua,o as ma,q as X,L as fa,F as ha,H as ba,p as S,k as ee,A as pa,N as ae,C as ga,D as Sa}from"./index-BhyEYQTn.js";import{D as Ta}from"./mui-DCW4m3lZ.js";import{u as ka}from"./InboxNotificationsProvider-D007v5X6.js";import{u as Ea}from"./useTaskManagerAccess-U48bmWaI.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="ea940dc2-25e8-4322-a2d6-b73f4881c445",l._sentryDebugIdIdentifier="sentry-dbid-ea940dc2-25e8-4322-a2d6-b73f4881c445")}catch{}})();const Ca=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),T=ea(),n=Me(),F=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ea(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Pe(e))),{status:ie}=t(Re),G=$.uiState.currentChatSessionId,E=na(),{setLoading:re}=sa(),[w,M]=m.useState(void 0),A=_("/:tenantEmailDomain/dashboard")!==null,N=_("/:tenantEmailDomain/reports")!==null,f=_("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),P=t((e=>Ve(e))),{isFeatureEnabled:C}=d(c.isReferralFeatureEnabled),v=t((e=>je(e)));m.useEffect((()=>{E&&C&&!f&&v.fetchState==="Not-Started"&&r(Le(!0))}),[E,C,v.fetchState,f]);const D=t((e=>e.tenantState)),me=t((e=>D.fetchState==="Completed"?Oe(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),R=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Te=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>b(e).totalUnreadCount)),Ee=t((e=>b(e).reducedFetchCountState)),V=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),j=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:O,isLoading:U,isFetchingMore:Z,hasFetchedAll:q,fetchMore:Ce}=ka();m.useEffect((()=>{const e=setTimeout((()=>Ce?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(U===!1&&Z===!1&&q===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;M(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else M(0)}),[U,Z,q]),m.useEffect((()=>{E&&k&&!f&&L.fetchState==="Not-Started"&&F.tenantId!=null&&r(Ue("task_manager","dashboard"))}),[E,k,f,L.fetchState,F.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ee,count:ke},z=s!=null?ra.getSignedInUserTenant(s):null,H=t((e=>z?.tenantId!=null?Ze(e,z.tenantId):void 0)),h=[];fe===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),C===!1&&h.push("rewards_card"),R===!1&&h.push("expense_automation_card");const Y=t((e=>qe(e,h).fetchState)),W=t((e=>ze(e).fetchState)),ye=A&&(Y==="Completed"||Y==="Error")||N&&(W==="Completed"||W==="Error")||!A&&!N?void 0:"disabled",we=m.useMemo((()=>He(o.userRole)),[o.userRole]),Ae=Ye(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&P.fetchState==="Completed"&&We(P.notificationSettings,p.userEmail,x,o,k),J=da(),_e=J&&ca(a);return B.jsx(Ta,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?me:H!=null?[H]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Te,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:C,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=V===0&&j>0?"notifications/comments":"notifications/tasks";X(a)&&(e=V===0&&j>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,Be=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),Be&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Fe=ga(e.type);Sa(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Fe}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{T.toggle()},isAiCfo:_e,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Fa=l=>{const i=te(),s=t((T=>ne(T))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(T,n)=>{Xe(n)&&Ne(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return B.jsx(Ca,{...l,...a})};export{Fa as M};
@@ -0,0 +1 @@
1
+ import{j as e}from"./liveblocks-B3m51ZRo.js";import{h as r,l as i}from"./core-gUqdW_kq.js";import{am as n}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import"./sentry-DI7gLUjw.js";import"./zeni-epic-state-C-d25VTi.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.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]="f2f6ef04-8019-4dfe-8bec-98d5efe59039",o._sentryDebugIdIdentifier="sentry-dbid-f2f6ef04-8019-4dfe-8bec-98d5efe59039")}catch{}})();const f=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(f,{navigate:o})}export{_ as default};
@@ -1 +1 @@
1
- import{m as mt,a as lt,n as ft,j as N}from"./liveblocks-C_WAhyd7.js";import ut from"./NotFoundScreen-BF2gJW91.js";import{a as k}from"./sentry-lC29HHPj.js";import{h as ht,g as pt,i as kt,u as gt,j as b,l as bt,n as St,o as O}from"./core-1xnf2RtE.js";import{cA as Tt,Tf as X,fE as Y,h0 as It,Tj as S,a0d as K,Tp as m,Td as A,zL as $,Fr as Ct,a0e as yt,Tc as At,Tr as Et,zQ as _t,a0f as F,br as j,gg as x,zU as Q,a0g as Nt,cM as Bt,cF as wt}from"./zeni-epic-state-BVNUxmav.js";import{aq as xt,c as vt,M as Dt,y as Mt,as as Rt,dM as Pt,p as B,dN as Ut,w as Gt,dO as Ft,i as jt,a4 as $t}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-C4hcJx1x.js";import{u as Lt}from"./useTaskManagerAccess-B7YJLgDK.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.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]="4718f262-37d1-40dc-ab63-e504e7febb2a",t._sentryDebugIdIdentifier="sentry-dbid-4718f262-37d1-40dc-ab63-e504e7febb2a")}catch{}})();const qt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),zt=bt((function(t,l){const n=X(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=S(t),f=Y(t),{currentTab:T}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[T].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:T,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,I=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,I=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}d==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(T(a),t(F([a],j())));let i=`/${h}/${r[1]}`;const I=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(A(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(K(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t($("task_manager","dashboard",d))}else D?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(Q("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(T(i),t(F([i],j())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({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")),qt(o,T).then((()=>{t(F(o,j())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Gt(Ft)),Wt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=Tt(h??""),o=gt(),f=vt(),[T,D]=k.useState(!1),a=b((e=>X(e))),s=b((e=>Y(e))),{useFeatureGate:d}=Dt(),{isFeatureEnabled:r}=d(Mt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:I}=Vt({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Z=It(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=b((e=>S(e).notificationDetailsByTab.tasks.fetchState)),L=b((e=>S(e).currentTab)),M=b((e=>S(e).currentSubTab)),tt=b((e=>S(e).notificationDetailsByTab.comments.fetchCountState)),R=b((e=>S(e).notificationDetailsByTab.comments.fetchState)),et=b((e=>S(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=b((e=>S(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Pt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:P,fetchMore:ot}=mt(),{threads:q,isLoading:z,fetchMore:W,isFetchingMore:H,hasFetchedAll:J}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(K(c)),c==null){const e=`../${L}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((y=>y.roomId===e&&y.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(A({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o($("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=E||P===!0||C!==!0||E||P===!0||C!==!0;k.useEffect((()=>{U&&R!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):U||R!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[U,R]),k.useEffect((()=>{o(A({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&T===!1&&(D(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&z===!1&&w!=null&&q!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Ut(u.kind))),y=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const G=q.find((dt=>{return dt.id===((v=u).kind==="thread"?v.threadId:"subjectId"in v?v.subjectId:void 0);var v}));return G!=null?{inboxNotification:{...u,threadId:G.id},thread:G}:(H||J===!0||W==null||W(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(A({totalCount:_.length,unreadCount:y.length},"comments")),o(yt(ct))}}),[E,P,H,C,J,z,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(jt(p)){const y=At(p.mode);if(y==="dashboard"&&o(A({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];M==="all"?_.push("read","unread"):M!=="mentions"&&_.push(M),o($("task_manager",y,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return N.jsx(zt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:I,...nt})};function me(){return N.jsxs(St,{children:[N.jsx(O,{path:"/:selectedTab",element:N.jsx(Wt,{})}),N.jsx(O,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
1
+ import{m as mt,a as lt,n as ft,j as N}from"./liveblocks-B3m51ZRo.js";import ut from"./NotFoundScreen-Bii3lrih.js";import{a as k}from"./sentry-DI7gLUjw.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as O}from"./core-gUqdW_kq.js";import{cA as Tt,Tf as X,fE as Y,h0 as It,Tj as b,a0d as K,Tp as m,Td as A,zL as $,Fr as Ct,a0e as yt,Tc as At,Tr as Et,zQ as _t,a0f as F,br as j,gg as x,zU as Q,a0g as Nt,cM as Bt,cF as wt}from"./zeni-epic-state-C-d25VTi.js";import{aq as xt,d as vt,M as Dt,y as Mt,as as Rt,dM as Pt,p as B,dN as Ut,w as Gt,dO as Ft,i as jt,a4 as $t}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-BVUNtLFK.js";import{u as Lt}from"./useTaskManagerAccess-U48bmWaI.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.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]="b59e4c46-dfe6-4896-a136-e15abfc53a78",t._sentryDebugIdIdentifier="sentry-dbid-b59e4c46-dfe6-4896-a136-e15abfc53a78")}catch{}})();const qt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),zt=St((function(t,l){const n=X(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=Y(t),{currentTab:T}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[T].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:T,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,I=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,I=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}d==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(T(a),t(F([a],j())));let i=`/${h}/${r[1]}`;const I=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(A(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(K(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t($("task_manager","dashboard",d))}else D?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(Q("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(T(i),t(F([i],j())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({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")),qt(o,T).then((()=>{t(F(o,j())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Gt(Ft)),Wt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=Tt(h??""),o=gt(),f=vt(),[T,D]=k.useState(!1),a=S((e=>X(e))),s=S((e=>Y(e))),{useFeatureGate:d}=Dt(),{isFeatureEnabled:r}=d(Mt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:I}=Vt({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Z=It(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),L=S((e=>b(e).currentTab)),M=S((e=>b(e).currentSubTab)),tt=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),R=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),et=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Pt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:P,fetchMore:ot}=mt(),{threads:q,isLoading:z,fetchMore:W,isFetchingMore:H,hasFetchedAll:J}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(K(c)),c==null){const e=`../${L}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((y=>y.roomId===e&&y.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(A({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o($("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=E||P===!0||C!==!0||E||P===!0||C!==!0;k.useEffect((()=>{U&&R!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):U||R!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[U,R]),k.useEffect((()=>{o(A({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&T===!1&&(D(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&z===!1&&w!=null&&q!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Ut(u.kind))),y=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const G=q.find((dt=>{return dt.id===((v=u).kind==="thread"?v.threadId:"subjectId"in v?v.subjectId:void 0);var v}));return G!=null?{inboxNotification:{...u,threadId:G.id},thread:G}:(H||J===!0||W==null||W(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(A({totalCount:_.length,unreadCount:y.length},"comments")),o(yt(ct))}}),[E,P,H,C,J,z,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(jt(p)){const y=At(p.mode);if(y==="dashboard"&&o(A({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];M==="all"?_.push("read","unread"):M!=="mentions"&&_.push(M),o($("task_manager",y,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return N.jsx(zt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:I,...nt})};function me(){return N.jsxs(bt,{children:[N.jsx(O,{path:"/:selectedTab",element:N.jsx(Wt,{})}),N.jsx(O,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-C_WAhyd7.js";import{a as r}from"./sentry-lC29HHPj.js";import{u as A,g as j,j as o,N as x}from"./core-1xnf2RtE.js";import{TS as C,fE as P,gl as R,TT as z,TU as D,TV as M,TW as L,pR as k,Sx as N}from"./zeni-epic-state-BVNUxmav.js";import{z as h,ah as I}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="4e1249b3-deeb-43bd-8854-70af7383960e",n._sentryDebugIdIdentifier="sentry-dbid-4e1249b3-deeb-43bd-8854-70af7383960e")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>C(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>P(e))),l=o((e=>R(e))),d=o((e=>e.tenantState.fetchState)),b=o(z),y=o(D),u=o(M),[S,v]=r.useState(null),[T,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const U=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((_=>_.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),c=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:v,approveError:T??y,isApproving:b==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(N(a.userId,a.zeniSessionId??void 0,c,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{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(x,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
1
+ import{j as m}from"./liveblocks-B3m51ZRo.js";import{a as r}from"./sentry-DI7gLUjw.js";import{u as A,g as j,j as o,N as x}from"./core-gUqdW_kq.js";import{TS as C,fE as P,gl as R,TT as z,TU as D,TV as M,TW as L,pR as k,Sx as N}from"./zeni-epic-state-C-d25VTi.js";import{z as h,ah as I}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="4e1249b3-deeb-43bd-8854-70af7383960e",n._sentryDebugIdIdentifier="sentry-dbid-4e1249b3-deeb-43bd-8854-70af7383960e")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>C(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>P(e))),l=o((e=>R(e))),d=o((e=>e.tenantState.fetchState)),b=o(z),y=o(D),u=o(M),[S,v]=r.useState(null),[T,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const U=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((_=>_.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),c=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:v,approveError:T??y,isApproving:b==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(N(a.userId,a.zeniSessionId??void 0,c,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{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(x,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +1 @@
1
- import{j as n}from"./liveblocks-C_WAhyd7.js";import{h as K,u as X,g as H,i as Q,j as d,l as Z,n as ee,o as C}from"./core-1xnf2RtE.js";import{fE as M,zw as O,uv as ae,UJ as w,uq as y,bq as te,b$ as se,ur as oe,UK as re,Ur as S,eb as ne,Di as ce,UL as ie,DG as le,dY as de,dX as me}from"./zeni-epic-state-BVNUxmav.js";import{ai as fe,z as pe,aq as ue,as as he,V as Fe,M as q,y as $,a8 as ge,h as _,aD as be,p as Ie}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import Ce from"./NotFoundScreen-BF2gJW91.js";import{F as Se}from"./FeaturePreviewScreen-CWY6I3fG.js";import{a as F}from"./sentry-lC29HHPj.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-C4hcJx1x.js";import{u as Te}from"./useInitialThreadRequest-BFDb_b7F.js";import{t as De}from"./routePaths-3iKgurJn.js";import{M as Ae}from"./MobileAppDrawer-DH0tVOfv.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./useTaskManagerAccess-B7YJLgDK.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]="8a28c74b-3f24-45a4-a38d-62d3d055f0d3",s._sentryDebugIdIdentifier="sentry-dbid-8a28c74b-3f24-45a4-a38d-62d3d055f0d3")}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})}},xe=Z((function(s){const e=re(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:_}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(y(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(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=ne(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 u=De(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=K(),a=X(),o=H(),{forecastId:r,tenantEmailDomain:c}=Q(),[p,u]=F.useState(!1),[m,D]=F.useState(!1),g=pe.getSignedInUser(),A=d((t=>M(t))),B=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),E=d((t=>t.reportUIOptionsState.selectedForecast)),L=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:N}=ye({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){D(!0);const t=((f,U,R)=>U!=null?f.forecasts.findIndex((I=>I.id===U)):R!=null?f.forecasts.findIndex((I=>I.id===R)):f.forecasts.length>0?0:-1)(i,r,E?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=E?.index?(a(w(i.forecasts[t].id,t)),T(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&T(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!L(i.forecasts[t].id)&&b&&a(y(i.forecasts[t].id))}}),[p,u,a,l,i,m,D,O,y,b]);const j=Fe(),V=j?.loggedInUserRole!=null&&te(j.loggedInUserRole),{useFeatureGate:W}=q(),{isFeatureEnabled:k}=W($.isReportsCommentingEnabled),Y=Te(k?A?.companyId:void 0,{clearParams:l&&m}),[z,J]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const P=t=>{J(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Ae,{isAppContentDrawerOpen:z,handleDrawerToggle:P}),n.jsx(xe,{firstMonthOfFY:B,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:L,meetingUrl:se(h.toString()),hasTransactionAccess:V,isAiCfoAccessEnabled:G,onAskAiCfoClick:N,isReportsCommentingEnabled:k,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{P(!0)}})]})}function Xe(){const s=d((c=>M(c))),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Xe as default};
1
+ import{j as n}from"./liveblocks-B3m51ZRo.js";import{h as K,u as Q,g as X,i as H,j as d,l as Z,n as ee,o as C}from"./core-gUqdW_kq.js";import{fE as M,zw as O,uv as ae,UJ as w,uq as y,bq as te,b$ as se,ur as oe,UK as re,Ur as S,eb as ne,Di as ce,UL as ie,DG as le,dY as de,dX as me}from"./zeni-epic-state-C-d25VTi.js";import{ai as fe,z as pe,aq as ue,as as he,Q as Fe,M as q,y as $,a8 as ge,k as _,aD as be,p as Ie}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import Ce from"./NotFoundScreen-Bii3lrih.js";import{F as Se}from"./FeaturePreviewScreen-BsptTDQw.js";import{a as F}from"./sentry-DI7gLUjw.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-BVUNtLFK.js";import{u as Te}from"./useInitialThreadRequest-DTQjUnhP.js";import{t as De}from"./routePaths-DAdB7ufZ.js";import{M as Ae}from"./MobileAppDrawer-BPpLxyPF.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.js";import"./InboxNotificationsProvider-D007v5X6.js";import"./useTaskManagerAccess-U48bmWaI.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]="08ffc8da-709f-4db2-aaae-f92882156b6c",s._sentryDebugIdIdentifier="sentry-dbid-08ffc8da-709f-4db2-aaae-f92882156b6c")}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})}},xe=Z((function(s){const e=re(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:_}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(y(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(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=ne(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 u=De(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=K(),a=Q(),o=X(),{forecastId:r,tenantEmailDomain:c}=H(),[p,u]=F.useState(!1),[m,D]=F.useState(!1),g=pe.getSignedInUser(),A=d((t=>M(t))),B=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),k=d((t=>t.reportUIOptionsState.selectedForecast)),E=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:N}=ye({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){D(!0);const t=((f,U,R)=>U!=null?f.forecasts.findIndex((I=>I.id===U)):R!=null?f.forecasts.findIndex((I=>I.id===R)):f.forecasts.length>0?0:-1)(i,r,k?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(a(w(i.forecasts[t].id,t)),T(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&T(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!E(i.forecasts[t].id)&&b&&a(y(i.forecasts[t].id))}}),[p,u,a,l,i,m,D,O,y,b]);const L=Fe(),V=L?.loggedInUserRole!=null&&te(L.loggedInUserRole),{useFeatureGate:W}=q(),{isFeatureEnabled:j}=W($.isReportsCommentingEnabled),Y=Te(j?A?.companyId:void 0,{clearParams:l&&m}),[z,J]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const P=t=>{J(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ge,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Ae,{isAppContentDrawerOpen:z,handleDrawerToggle:P}),n.jsx(xe,{firstMonthOfFY:B,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:E,meetingUrl:se(h.toString()),hasTransactionAccess:V,isAiCfoAccessEnabled:G,onAskAiCfoClick:N,isReportsCommentingEnabled:j,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{P(!0)}})]})}function Qe(){const s=d((c=>M(c))),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Qe as default};
@@ -1,15 +1,15 @@
1
- import{j as a}from"./liveblocks-C_WAhyd7.js";import{a as p}from"./sentry-lC29HHPj.js";import{H as c,I as r,a9 as m,ad as f,ae as h}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import{i as y}from"./core-1xnf2RtE.js";import"./zeni-epic-state-BVNUxmav.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.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]="a04db822-8766-4f56-9a88-ff18fc054a0c",e._sentryDebugIdIdentifier="sentry-dbid-a04db822-8766-4f56-9a88-ff18fc054a0c")}catch{}})();const g=c("div")`
1
+ import{j as r}from"./liveblocks-B3m51ZRo.js";import{a as p}from"./sentry-DI7gLUjw.js";import{I as c,J as a,a9 as m,ad as f,ae as h}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import{i as y}from"./core-gUqdW_kq.js";import"./zeni-epic-state-C-d25VTi.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.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]="4553bbf5-4e68-43e4-bfc4-1af1eba789d6",e._sentryDebugIdIdentifier="sentry-dbid-4553bbf5-4e68-43e4-bfc4-1af1eba789d6")}catch{}})();const b=c("div")`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
5
5
  min-height: 100vh;
6
6
  background-color: ${e=>e.theme.colors.grey4};
7
- `,k=c("header")`
7
+ `,g=c("header")`
8
8
  flex-shrink: 0;
9
- padding: ${r.sp3} ${r.sp4};
10
- `,b=c(m)`
11
- width: ${r.sp4};
12
- height: ${r.sp4};
9
+ padding: ${a.sp3} ${a.sp4};
10
+ `,k=c(m)`
11
+ width: ${a.sp4};
12
+ height: ${a.sp4};
13
13
  color: ${e=>e.theme.colors.brandColorJade};
14
14
  `,x=c("main")`
15
15
  display: flex;
@@ -17,5 +17,5 @@ import{j as a}from"./liveblocks-C_WAhyd7.js";import{a as p}from"./sentry-lC29HHP
17
17
  flex-direction: column;
18
18
  align-items: center;
19
19
  justify-content: center;
20
- padding: ${r.sp4};
21
- `;function j({children:e}){return a.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[a.jsx(k,{children:a.jsx(b,{"aria-label":"Zeni",role:"img"})}),a.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,u){const l=await fetch(`${o}${n}`,{body:JSON.stringify(u),headers:{"Content-Type":"application/json"},method:"POST"}),d=await l.json();if(!l.ok)throw new w(d.status?.message??`Request failed (${l.status}).`,l.status);return d.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return a.jsx(j,{children:a.jsx(f,{portal:o})})}export{B as default};
20
+ padding: ${a.sp4};
21
+ `;function j({children:e}){return r.jsxs(b,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(g,{children:r.jsx(k,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,u){const l=await fetch(`${o}${n}`,{body:JSON.stringify(u),headers:{"Content-Type":"application/json"},method:"POST"}),d=await l.json();if(!l.ok)throw new w(d.status?.message??`Request failed (${l.status}).`,l.status);return d.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{B as default};
@@ -0,0 +1,22 @@
1
+ import{j as a}from"./liveblocks-B3m51ZRo.js";import{UF as re,fE as Y,l_ as G,dY as N,dX as le,Rx as Q,U2 as ce,Cf as Pe,UG as J,C4 as je,Cp as Le,Cj as de,C8 as pe,Cn as ve,Ck as Te,UH as ue,rL as Ae,g5 as Re,gC as Fe,UI as H,Cc as me,Cb as ge,Cs as Oe,c8 as Ue}from"./zeni-epic-state-C-d25VTi.js";import{a1 as Ce,M as X,y as _,z as K,g as fe,P as he,af as be,az as ye,aA as Ve,ab as Se,J as O,ag as we,G as W,aB as Ze,aq as Be,as as $e,a8 as ze,k as xe,U as He,p as _e,aC as Ge,Q as Ke}from"./index-BhyEYQTn.js";import{D as De,n as M,S as Ie}from"./mui-DCW4m3lZ.js";import ae from"./NotFoundScreen-Bii3lrih.js";import{a as c}from"./sentry-DI7gLUjw.js";import{u as ee,i as We,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-gUqdW_kq.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BVUNtLFK.js";import{M as Ne}from"./MobileAppDrawer-BPpLxyPF.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.js";import"./InboxNotificationsProvider-D007v5X6.js";import"./useTaskManagerAccess-U48bmWaI.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]="729e29ea-ce06-45b9-bcd9-2ad2f8b43635",e._sentryDebugIdIdentifier="sentry-dbid-729e29ea-ce06-45b9-bcd9-2ad2f8b43635")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=W.getLocalizedStrings().peoplePage.invitePage,ne=W.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:C,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=Ce(),m=ee(),[U,V]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=We(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>G(l))),{useFeatureGate:D}=X(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),P=N(I,p),v=le(p),T=Q(p),Z=ce(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(J()),y()},A=()=>{U===!0?S(!0):h()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(_.isChargeCardFeatureEnabled),L=fe(p,j,I),{isCardsHidden:R}=he(p?.tenantId),b=!L||R,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:C,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),V(!0)},onSaveClick:()=>{m(C==="zeni_only"?je(e):Le(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{x===!1&&w!=null&&m(Pe(w))}),[x,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ve,{...s})]})})},ea=M(Ie)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,ke=M(we.H6Regular)`
6
+ margin-top: ${O.sp7};
7
+ padding-left: ${O.sp8};
8
+ padding-right: ${O.sp8};
9
+ color: ${e=>e.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,Ee=M(we.LargeRegularSp)`
12
+ color: ${e=>e.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
+ `,aa={overlayWidth:new Se(100,100,48)},oe=W.getLocalizedStrings().peoplePage.invitePage,ie=W.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:C,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=Ce(),m=ee(),[U,V]=c.useState(!1),[k,S]=c.useState(!1),w=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>G(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:D}=E(_.isDebitCardFeatureEnabled),I=N(D,r),P=le(r),v=Q(r),T=ce(r),Z=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),m(J())},h=()=>{U===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(_.isChargeCardFeatureEnabled),L=fe(r,j,D),{isCardsHidden:R}=he(r?.tenantId),b=!L||R,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:C,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),V(!0)},onResetClick:x,onSaveClick:()=>{m(C==="zeni_only"?ve(e):Te())},onCloseClick:h,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:Z===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:B};return c.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(y(),m(J()))}),[w.invitePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:be.overlayDark,cursor:"pointer"}}},onClose:h,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(ye,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:A}):null,a.jsx(Ze,{...s})]})})},ta=M(Ie)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,na=Je((function(e,t){const d=ue(e),n=K.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:xe}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:C}=t;return{personAction:{onPersonDelete:(i,y)=>{e(pe(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(me()),e(ge(n,C))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(Ge);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Me(),n=ee(),C=qe(),{areTenantIdsInSync:i}=Be(),y=K.getSignedInUser(),f=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:U}=m(_.isDebitCardFeatureEnabled),V=g((s=>G(s))),k=!N(U,f)&&V,S=Q(f),w=f?.tenantId,{tenantEmailDomain:r}=f,[p,E]=c.useState(!1),[D,I]=c.useState(!1),[P,v]=c.useState(!1),[T,Z]=c.useState("off"),[B,x]=c.useState(!1),h=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Ye({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Re(s.userState,s.userRoleState,s.userListViewState,"manager"))),R=g((s=>Fe(s))),b=f?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),Z(u.uiState.mode),E(!0),n(me()))}),[p,y,w,n,u.uiState.mode,i]),c.useEffect((()=>{b!=null&&i&&n(ge(b,k))}),[b,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),v(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:xe,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:D,managersListView:L,companyPassportView:R,classListView:j,companyId:b,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:R,classListView:j,companyId:b,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:B,handleDrawerToggle:h}),a.jsx(na,{navigate:d,signedInUser:y,isZeni:f.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:b,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=_e(C.state?.pathnameStackToGoBack,C.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=Ke();return Ue(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-B3m51ZRo.js";import T from"./NotFoundScreen-Bii3lrih.js";import{a as r}from"./sentry-DI7gLUjw.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as O,o as h}from"./core-gUqdW_kq.js";import{fE as B,a0h as b,bo as F,bn as N,iK as V,gg as K}from"./zeni-epic-state-C-d25VTi.js";import{c as $,z as I,as as q,dP as G}from"./index-BhyEYQTn.js";import"./mui-DCW4m3lZ.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-BVUNtLFK.js";import{M as J}from"./MobileAppDrawer-BPpLxyPF.js";import"./recharts-HpXoq1DR.js";import"./analytics-BvodL4nJ.js";import"./plaid-BrXe9xNf.js";import"./dnd-YSyN45zY.js";import"./stripe-cKAAJElX.js";import"./lottie-DLBd_qLT.js";import"./lexical-Euc6kCJG.js";import"./pdf-BDXl9G7N.js";import"./utils-8Dv5nUFZ.js";import"./InboxNotificationsProvider-D007v5X6.js";import"./useTaskManagerAccess-U48bmWaI.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]="3c97e24d-4ce0-4764-a394-10ea90c86462",e._sentryDebugIdIdentifier="sentry-dbid-3c97e24d-4ce0-4764-a394-10ea90c86462")}catch{}})();const L=z((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)}}}))(G),Q=()=>{const e=_(),t=v(),c=$(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:g}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,E)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:E}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(K({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),f=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:f}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:g,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${g}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{he as default};
@@ -1 +1 @@
1
- import{a as h,R as a}from"./sentry-lC29HHPj.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
1
+ import{a as h,R as a}from"./sentry-DI7gLUjw.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};