@zeniai/web-app-ui 5.3.59-dev → 5.3.59-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/assets/{AccountMappingScreen-DTTeREwj.js → AccountMappingScreen-DaQYZOFD.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen--9Q2zWrD.js → ActualMatchingMatchDetailScreen-DAi-RiCs.js} +1 -1
  3. package/dist/assets/{AddressRoutes-CpjgVbMa.js → AddressRoutes-B3JhbViB.js} +1 -1
  4. package/dist/assets/{AddressScreen-I8Rs-MIn.js → AddressScreen--TV3FMLi.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-xXGezaaX.js → AiCfoScreen-Xe-_6mPk.js} +1 -1
  6. package/dist/assets/{AppDrawer-B74W93Dx.js → AppDrawer-CaiYjgTN.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-DCL_JI3v.js → BillPayApprovalRoutes-DNMev8o2.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-4uVHGBny.js → BillPayRoutes-kdT5Cn4b.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-Cp54FFZH.js → BusinessVerificationPageScreen-DU8rGT08.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-6wFZ3h7n.js → CardsAiCfoScreen-BnUNa2Qn.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-kaYLfF_G.js → ChargeCardRoutes-Bo273vK9.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-CpTbm6Sc.js → CompanyPassportScreen-CZDZ5SDr.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-BPhkvgwP.js → ConnectionAuthScreen-1vey70Km.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-vcuV_rLb.js → CustomerOnboardingAuthScreen-DCxL1Y4h.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-C2BUPvve.js → CustomerOnboardingRoutes-BQu2Jzb9.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-i732ENnt.js → DashboardRoutes-Bc7UlAWL.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-Fr9STTcy.js → DefaultTenantHome-CcoNZwQ7.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-DldCKkMe.js → DomesticWireDetailScreen-CV6fUqR1.js} +1 -1
  19. package/dist/assets/{DrawerScreen-DKrIxc45.js → DrawerScreen-688ye3_R.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-Ci3OHQmT.js → EntityDetailRoutes-CGPGSLH1.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-D2Y0HhSl.js → ExpenseAutomationRoutes-B3VGUs7-.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-SWdUfPQt.js → FeaturePreviewScreen-BV4SnLlN.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-DDiR98eZ.js → HubSpotOAuthCallbackScreen-CtxuRevQ.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-BIKlKPOH.js → InvoicingRoutes-T_ZywOZp.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-BjSYWVoE.js → MagicLinkRoutes-D75cBhk9.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-CVVN5hX7.js → MagicLinkSignInScreen-D9VpvUxv.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-7ZhbRmu1.js → MobileAppDrawer-cK9tTach.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-DcVbM1H7.js → NotFoundScreen-BiqhqvbB.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-CjrMrdzi.js → NotificationRoutes-BFXkcmy_.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-DhHm1x32.js → OAuthConsentScreen-B2ZbQ917.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-fBT0Sc9A.js → PandLWithForecastRoutes-ChtZBnCy.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-CgUBBSzR.js → PaymentLinkScreen-DIPqFdB7.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-CwPbD29F.js → PeopleRoutes-ypRyY2oE.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-DJaLpKq7.js → PerformanceRoutes-x233BqpC.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-B-S6pmPF.js → QBOConnectionScreen-BJNaKsO6.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-NW-WKLny.js → ReimbursementApprovalRoutes-DVS3dtzE.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-D61HNZbO.js → ReimbursementApprovalRuleDetailScreen-sXm8RDVF.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-Df6Tud5L.js → ReimbursementRoutes-BgXyxH8Q.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-CuktTqMX.js → ReportsRoutes-JmgQbDSK.js} +1 -1
  40. package/dist/assets/{RewardsRoutes-5Gqy0mIy.js → RewardsRoutes-B3Xjuuul.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DazVitQy.js → ScheduleDetailsPrepaidExpensesScreen-CG6SIMxD.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-BuhEV3h0.js → ScreenRoutes-Bz4iw9iQ.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-CEmnHqG6.js → SettingsRoutes-pld_ex1Q.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-DdTVcR2_.js → SetupPagesScreen-Bj2t3L8G.js} +1 -1
  45. package/dist/assets/{SignInScreen-BITRkzSC.js → SignInScreen-De1rAi8_.js} +1 -1
  46. package/dist/assets/{SignOutScreen-C5iuWq-z.js → SignOutScreen-CO-wEmHX.js} +1 -1
  47. package/dist/assets/{TaskListScreen-CwUzHwaA.js → TaskListScreen-BJ4wl6gB.js} +1 -1
  48. package/dist/assets/{TaskRoutes-CFl1X2SM.js → TaskRoutes-CZQBWZN2.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-DK4lWWF0.js → TransactionDetailRoutes-D8h6k2sa.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-iW49SNvH.js → TransactionDetailScreen-DzseYAKs.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-BsHwubWD.js → TransactionListRoutes-amUycDqF.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-CN9ZH5Gy.js → TreasuryRoutes-nh_DZxdI.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-B3QNi1in.js → VendorsRoutes-AolcIGsM.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-adPXoaAz.js → WiseConfirmationScreen-D6O9q_ND.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-CFTwFem2.js → ZeniAccountRoutes-BH7TLuTQ.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-D7D_AloB.js → ZeniAccountStatementScreen-BjYoYBeQ.js} +1 -1
  57. package/dist/assets/{analyticsHelper-DRQlG4Yk.js → analyticsHelper-BEwTCwYZ.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-pGR9Sol9.js → getLocaleForTenant-DXe6B-RD.js} +1 -1
  59. package/dist/assets/{index-BSR6syxs.js → index-B_FmRu0j.js} +5 -5
  60. package/dist/assets/{routePaths-DY-fUoNb.js → routePaths-Dq0aokYp.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-BS7hRXcn.js → useActualMatchingMatchDetail-BQDGlwEy.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DS5PLjzx.js → useAiCfoDashboardSuggestedQuestionsChips-BGnzpS5o.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-BmrnfhUQ.js → useAskAiCfoHostNavButtonProps-B27GllhX.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-BgJc6X4f.js → useChargeCardPusherEvents-jc1RrcqI.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-BiJOFAYU.js → useEmailConnectResultRefresh-Bj_P5W7e.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-B6RfidGO.js → useInitialThreadRequest-LG1UCRer.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-CSigDKkg.js → useTaskManagerAccess-CyFeM69F.js} +1 -1
  68. package/dist/assets/{useTaskManagerPusherEvents-7vpYlql3.js → useTaskManagerPusherEvents-VczepB3y.js} +1 -1
  69. package/dist/assets/{withTransactionSidePanel-C37C2_tY.js → withTransactionSidePanel-DZrbeyBJ.js} +1 -1
  70. package/dist/index.html +1 -1
  71. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{j as r}from"./liveblocks-Bnd7TfEn.js";import ue from"./NotFoundScreen-DcVbM1H7.js";import{a as k}from"./sentry-C4tTgPRE.js";import{h as H,u as ee,j as b,g as de,i as ke,N as pe,l as me,n as Se,o as E}from"./core-DuhHfvEc.js";import{Q3 as ae,Q6 as fe,Q0 as Te,a22 as ge,fF as te,a23 as se,Qs as g,Qk as T,PZ as he,QY as Ee,QR as be,a24 as ne,gh as oe,a25 as Z,PV as Ie,PS as De,uX as Ce,uL as Ge,mz as _e,Qi as Re,a26 as ye,R9 as Ue,Qe as xe,QD as we,QA as Be,Q9 as Ae,Qx as ve,Qw as je}from"./zeni-epic-state-B5FlPsWC.js";import{z as R,e4 as Pe,O as Fe,o as Le,S as G,a5 as ie,p as _,a9 as Ke,k as q,V as Qe,e5 as $e,_ as M,af as Ne}from"./index-BSR6syxs.js";import{n as Oe}from"./mui-CAtYecwm.js";import{u as Ve}from"./useInitialThreadRequest-B6RfidGO.js";import{M as ze}from"./MobileAppDrawer-7ZhbRmu1.js";import{b as Ze,a as qe,T as f,t as Me,c as X,d as Y,e as Xe}from"./TaskListScreen-CwUzHwaA.js";import{u as Ye}from"./useTaskManagerPusherEvents-7vpYlql3.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./InboxNotificationsProvider-Cqk-hq7Y.js";import"./useTaskManagerAccess-CSigDKkg.js";import"./useAskAiCfoHostNavButtonProps-BmrnfhUQ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="211a075a-5166-4163-9b44-c153de699186",e._sentryDebugIdIdentifier="sentry-dbid-211a075a-5166-4163-9b44-c153de699186")}catch{}})();function Je(){const e=H(),a=ee(),n=R.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=b((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Pe,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const L=e=>e?.taskState?.taskByID,P=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},We=ge([P,(e,a)=>{const n=P(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=P(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let J,W=[];const He=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=We(e,a.taskId),m=s.taskGroupId??c,t=m!=null?Z(e.taskGroupState,m):void 0,o=R.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},w=se(e),{tenantEmailDomain:B}=u,y=s.recurringSourceTaskId,A=y!=null?`${M.appUrl}/${B}/tasks/${encodeURIComponent(y)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:R.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==J&&(J=h,W=Object.values(h)),W),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${M.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:A,tagListView:w,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>Z(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(je({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(ve(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Ae(a.taskId))},onSnoozeTask:(t,o)=>{e(Be(t,o))},onUnsnoozeTask:t=>{e(we(t))},onCreateSubtask:(t,o)=>{e(xe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Ue({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=x(m),o=_(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(ye({taskId:n}))},onDeleteTaskClick:()=>{e(Re(n))},updateFilesEntity:t=>{e(_e({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))($e);function F(){const e=H(),a=ee(),n=de(),c=Fe(),{taskId:s,taskGroupId:u}=ke(),d=b((i=>te(i))),m=Ve(d?.companyId),{useFeatureGate:t}=Le(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:w}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:B}=t(G.isTaskGroupAssigneesEnabled),[y,A]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[Q,v]=k.useState(!1),C=k.useRef(!1),U=b((i=>i.taskListState.updateTasksFetchState.fetchState)),$=b((i=>se(i))),N=b((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const O=R.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...Ze(d?.companyId,i),...qe(O,l)]}),[d?.companyId,O]);Ye({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{Y(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=Y(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=X(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=X(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(x(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Me(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||$.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,$.fetchState]),k.useEffect((()=>{K||N==="Completed"||(re(!0),a(Ee()))}),[K,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(be([s],null,{isArchived:!1})),v(!0))}),[a,s]);k.useEffect((()=>{if(Q)if(U!=="In-Progress"){if(C.current){if(U==="Error")return v(!1),void(C.current=!1);if(U==="Completed"){v(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=x(i);e(l,{state:{pathnameStackToGoBack:_(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[Q,U,d,n,e]);const V=b((i=>ne(i,s))),j=V.fetchState,z=R.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&V.error?.code===400){const{tenantEmailDomain:i}=d,l=x(i),p=_(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(Ke,{analytics:q,onLoad:i=>(l=>l.trackPageLoaded(Qe.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(ze,{isAppContentDrawerOpen:y,handleDrawerToggle:i=>{A(i)}}),r.jsx(He,{analytics:q,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:z,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:j,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:w,isTaskGroupAssigneesEnabled:B})]})]})}const ea=Oe.div`
1
+ import{j as r}from"./liveblocks-Bnd7TfEn.js";import ue from"./NotFoundScreen-BiqhqvbB.js";import{a as k}from"./sentry-C4tTgPRE.js";import{h as H,u as ee,j as b,g as de,i as ke,N as pe,l as me,n as Se,o as E}from"./core-DuhHfvEc.js";import{Q3 as ae,Q6 as fe,Q0 as Te,a22 as ge,fF as te,a23 as se,Qs as g,Qk as T,PZ as he,QY as Ee,QR as be,a24 as ne,gh as oe,a25 as Z,PV as Ie,PS as De,uX as Ce,uL as Ge,mz as _e,Qi as Re,a26 as ye,R9 as Ue,Qe as xe,QD as we,QA as Be,Q9 as Ae,Qx as ve,Qw as je}from"./zeni-epic-state-B5FlPsWC.js";import{z as R,e4 as Pe,O as Fe,o as Le,S as G,a5 as ie,p as _,a9 as Ke,k as q,V as Qe,e5 as $e,_ as M,af as Ne}from"./index-B_FmRu0j.js";import{n as Oe}from"./mui-CAtYecwm.js";import{u as Ve}from"./useInitialThreadRequest-LG1UCRer.js";import{M as ze}from"./MobileAppDrawer-cK9tTach.js";import{b as Ze,a as qe,T as f,t as Me,c as X,d as Y,e as Xe}from"./TaskListScreen-BJ4wl6gB.js";import{u as Ye}from"./useTaskManagerPusherEvents-VczepB3y.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./InboxNotificationsProvider-Cqk-hq7Y.js";import"./useTaskManagerAccess-CyFeM69F.js";import"./useAskAiCfoHostNavButtonProps-B27GllhX.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="211a075a-5166-4163-9b44-c153de699186",e._sentryDebugIdIdentifier="sentry-dbid-211a075a-5166-4163-9b44-c153de699186")}catch{}})();function Je(){const e=H(),a=ee(),n=R.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=b((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,I,D)=>{a(fe({name:o,content:I,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Pe,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const L=e=>e?.taskState?.taskByID,P=(e,a)=>{const n=L(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},We=ge([P,(e,a)=>{const n=P(e,a),c=L(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=P(e,a),c=L(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let J,W=[];const He=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=We(e,a.taskId),m=s.taskGroupId??c,t=m!=null?Z(e.taskGroupState,m):void 0,o=R.getSignedInUser(),I=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:I??""},w=se(e),{tenantEmailDomain:B}=u,y=s.recurringSourceTaskId,A=y!=null?`${M.appUrl}/${B}/tasks/${encodeURIComponent(y)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:R.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==J&&(J=h,W=Object.values(h)),W),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Ne.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${M.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:A,tagListView:w,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>Z(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(je({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(ve(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Ae(a.taskId))},onSnoozeTask:(t,o)=>{e(Be(t,o))},onUnsnoozeTask:t=>{e(we(t))},onCreateSubtask:(t,o)=>{e(xe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(Ue({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:_(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=x(m),o=_(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(ye({taskId:n}))},onDeleteTaskClick:()=>{e(Re(n))},updateFilesEntity:t=>{e(_e({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ie(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))($e);function F(){const e=H(),a=ee(),n=de(),c=Fe(),{taskId:s,taskGroupId:u}=ke(),d=b((i=>te(i))),m=Ve(d?.companyId),{useFeatureGate:t}=Le(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:I}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:w}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:B}=t(G.isTaskGroupAssigneesEnabled),[y,A]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[Q,v]=k.useState(!1),C=k.useRef(!1),U=b((i=>i.taskListState.updateTasksFetchState.fetchState)),$=b((i=>se(i))),N=b((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const O=R.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...Ze(d?.companyId,i),...qe(O,l)]}),[d?.companyId,O]);Ye({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{Y(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=Y(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=X(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=X(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(x(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{Me(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||$.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,$.fetchState]),k.useEffect((()=>{K||N==="Completed"||(re(!0),a(Ee()))}),[K,a,N]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(be([s],null,{isArchived:!1})),v(!0))}),[a,s]);k.useEffect((()=>{if(Q)if(U!=="In-Progress"){if(C.current){if(U==="Error")return v(!1),void(C.current=!1);if(U==="Completed"){v(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=x(i);e(l,{state:{pathnameStackToGoBack:_(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[Q,U,d,n,e]);const V=b((i=>ne(i,s))),j=V.fetchState,z=R.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&V.error?.code===400){const{tenantEmailDomain:i}=d,l=x(i),p=_(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[j==="Completed"?r.jsx(Ke,{analytics:q,onLoad:i=>(l=>l.trackPageLoaded(Qe.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(ze,{isAppContentDrawerOpen:y,handleDrawerToggle:i=>{A(i)}}),r.jsx(He,{analytics:q,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:z,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:j,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:I,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:w,isTaskGroupAssigneesEnabled:B})]})]})}const ea=Oe.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-Bnd7TfEn.js";import i from"./NotFoundScreen-DcVbM1H7.js";import{T as r}from"./TransactionDetailScreen-iW49SNvH.js";import"./sentry-C4tTgPRE.js";import{n as a,o as e}from"./core-DuhHfvEc.js";import"./zeni-epic-state-B5FlPsWC.js";import"./recharts-Ax0XVvbk.js";import"./index-BSR6syxs.js";import"./mui-CAtYecwm.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./useAskAiCfoHostNavButtonProps-BmrnfhUQ.js";import"./decodeURIComponentSafe-BuuGDiIq.js";import"./useInitialThreadRequest-B6RfidGO.js";import"./routePaths-DY-fUoNb.js";import"./expenseAutomationHelper-B5_HDAxt.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="bfd19369-9f5a-4875-9ff9-f0a50fe2624d",o._sentryDebugIdIdentifier="sentry-dbid-bfd19369-9f5a-4875-9ff9-f0a50fe2624d")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
1
+ import{j as t}from"./liveblocks-Bnd7TfEn.js";import i from"./NotFoundScreen-BiqhqvbB.js";import{T as r}from"./TransactionDetailScreen-DzseYAKs.js";import"./sentry-C4tTgPRE.js";import{n as a,o as e}from"./core-DuhHfvEc.js";import"./zeni-epic-state-B5FlPsWC.js";import"./recharts-Ax0XVvbk.js";import"./index-B_FmRu0j.js";import"./mui-CAtYecwm.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./useAskAiCfoHostNavButtonProps-B27GllhX.js";import"./decodeURIComponentSafe-BuuGDiIq.js";import"./useInitialThreadRequest-LG1UCRer.js";import"./routePaths-Dq0aokYp.js";import"./expenseAutomationHelper-B5_HDAxt.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="bfd19369-9f5a-4875-9ff9-f0a50fe2624d",o._sentryDebugIdIdentifier="sentry-dbid-bfd19369-9f5a-4875-9ff9-f0a50fe2624d")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
@@ -1,4 +1,4 @@
1
- import{j as R}from"./liveblocks-Bnd7TfEn.js";import{a as i}from"./sentry-C4tTgPRE.js";import{u as j,k as st,j as g,s as ge,g as De,h as Ce,i as Ae,N as ct,l as it}from"./core-DuhHfvEc.js";import{pv as Ie,fF as ee,gV as rt,UK as lt,oB as dt,ob as ut,DF as se,WY as mt,gh as pt,bn as ft,df as Re,bq as _e,sS as H,VQ as Y,WZ as we,W_ as le,We as Pe,ma as Fe,W$ as Ue,Wj as de,Wk as ue,m$ as xe,Sf as me,WU as $,m4 as Ve,m2 as Le,me as ht,pi as St,X0 as yt,X1 as Tt,Dw as Q,m9 as Be,RA as Oe,cm as bt,dl as gt,X2 as It,WT as vt,X3 as Et,X4 as kt,X5 as Dt,X6 as Ct,Ds as At,X7 as Rt,X8 as _t,X9 as wt,Xa as Pt,Xb as Ft,md as Ut,Xc as xt,Xd as Vt,WV as Lt,Xe as Bt,Xf as Ot,Xg as Nt,Ru as zt,Rk as jt,RJ as Mt,mf as Wt,Sg as ve,pn as Xt}from"./zeni-epic-state-B5FlPsWC.js";import{o as K,S as _,k as G,b3 as $t,z as Ne,E as Gt,a2 as qt,b4 as Ht,ac as Yt,a5 as ce,K as Kt,b5 as Jt,p as ie,at as Qt,b6 as Zt,b7 as en,b8 as tn,af as nn,aw as oe}from"./index-BSR6syxs.js";import{n as an,S as on,D as sn}from"./mui-CAtYecwm.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-BmrnfhUQ.js";import{d as ze}from"./decodeURIComponentSafe-BuuGDiIq.js";import{u as rn}from"./useInitialThreadRequest-B6RfidGO.js";import{h as je,c as Me,g as ln,e as dn}from"./routePaths-DY-fUoNb.js";import{u as un}from"./expenseAutomationHelper-B5_HDAxt.js";import{A as mn}from"./utils-BtDnAqMA.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="56a01da2-3440-4838-983f-9b53b0426146",t._sentryDebugIdIdentifier="sentry-dbid-56a01da2-3440-4838-983f-9b53b0426146")}catch{}})();function pn(t=!0){const e=j(),o=st(),{useFeatureGate:n}=K(),{isFeatureEnabled:a}=n(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||a!==!0)return;const s=c=>{const d=o.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return d!=="In-Progress"&&d!=="Completed"};s("transferEntryEligible")&&e(Ie({kind:"transferEntryEligible"})),s("creditCardOnlyEligible")&&e(Ie({kind:"creditCardOnlyEligible"}))}),[t,a,e,o])}function fn(t,e){const o=(function(){const d=j(),[T,S]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=K(),{configValue:I,isDynamicConfigLoading:h}=y("transaction_categorization_config"),b=!h&&I?.capitalization_enabled===!0,k=g((r=>ee(r))),C=k.companyId,w=g((r=>rt(r.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:P,dismissedAccounts:F}=g((r=>{const v=r.tenantState.currentTenantId,E=v!=null?r.tenantState.tenantsById[v]:void 0;return{capitalizableAccounts:E?.capitalizableAccounts??null,capitalizableAccountOverrides:E?.capitalizableAccountOverrides??null,dismissedAccounts:E?.capitalizationOnboardingDismissedAccounts??null}}),ge),V=i.useRef(A);V.current=A;const U=i.useRef(P);U.current=P;const L=i.useRef(F);L.current=F;const B=g((r=>lt(r.accountState)),ge),q=i.useMemo((()=>{const r={};for(const v of B)v.accountId!=null&&v.accountName!=null&&(r[v.accountId]=v.accountName);return r}),[B]),M=l!=null?q[l]??null:null,O=i.useCallback((r=>{if(!b)return;const v=V.current;if(v==null)return;const E=v.accounts??[],X=new Set(r),J=U.current??{},te=L.current;for(const N of E)if(X.has(N.accountId)&&J[N.accountId]==null&&te?.[N.accountId]==null)return p(N.classificationType),u(N.accountId),void S(!0)}),[b]),W=i.useCallback(((r,v)=>{d(dt(C,r,v,!0)),S(!1),p(null),u(null)}),[d,C]),f=i.useCallback((()=>{l!=null&&(d(ut(C,l)),S(!1),p(null),u(null))}),[d,C,l]);return{showPopup:T&&b,popupType:D,popupAccountId:l,popupAccountName:M,currencySymbol:w,checkAndShowPopup:O,handleSubmit:W,handleDismiss:f}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const z=new Map,Ee=(t,e,o)=>`${t}|${e??""}|${o}`,Z=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),We=(t,e,o)=>{G.trackRecommendationFeedbackRetracted(Z(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));z.forEach(((n,a)=>{o.has(n.transactionId)&&(z.delete(a),We(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));z.forEach(((o,n)=>{e.has(o.transactionId)&&z.delete(n)}))};function hn(t){const e=j(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=g(mt),{isEnabled:d,fallbackTransactionId:T}=t,S=i.useCallback((u=>u.transactionId??T??""),[T]),D=i.useCallback((u=>{if(!d)return;const y=S(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((h,b,k,C)=>{const w=Ee(b,k,C),A=z.get(w);return A!=null&&(z.delete(w),We(h,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((h,b)=>{G.trackRecommendationAccepted(Z(h,b))})(u,y),e(se(re(u,y,{}))))}),[d,S,e]),p=i.useCallback((u=>{if(o==null)return;const y=S(o);((I,h,b)=>{G.trackRecommendationFeedbackSubmitted({...Z(I,h),feedbackReason:b})})(o,y,u),e(se(re(o,y,{reasonText:u,skipped:!1}))),((I,h)=>{z.set(Ee(h,I.lineId,I.dimension),{feedback:I,transactionId:h})})(o,y),s(!0)}),[o,S,e]),l=i.useCallback((()=>{var u,y;o!=null&&(u=o,y=S(o),G.trackRecommendationFeedbackSkipped(Z(u,y)),s(!1),n(null))}),[o,S]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(pt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:D,popup:o!=null?R.jsx($t,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=K(),{isFeatureEnabled:o}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function Xe(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Nn(t,e){const o=j(),{useFeatureGate:n}=K(),a=g((f=>ee(f))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&Re(a.userRole),d=a.userRole!=null&&_e(a.userRole),{isFeatureEnabled:T}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:S}=n(_.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),l=g((f=>Y(f,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,I=g((f=>{const r=Y(f,p)?.transactionDetailLocalData.vendorUpdates?.id;return r==null?"Not-Started":f.transactionVendorViewState.editVendorStateById[r]?.saveStatus.fetchState??"Not-Started"})),h=i.useMemo((()=>l?.fetchState==="Completed"?Xe(l?.transaction):void 0),[l?.fetchState,l?.transaction]),b=g((f=>{if(h!=null)return we(f.customerIncomeState,f.vendorExpenseState,f.trendState,h,"month")})),k=g((f=>le(f))),C=g((f=>{if(h!=null)return Pe(f.trendWithTransactionsState,h,"TransactionDetail")})),w=a.company?.companyInfo.firstMonthOfFY??1,A=g((f=>Fe(f.accountState,f.accountListState,"accountList"))),[P,F]=i.useState(!1),[V,U]=i.useState(!1),[L,B]=i.useState(!1);i.useEffect((()=>{F(!1),U(!1),B(!1)}),[t,e]);const q=i.useCallback((()=>{F(!1),U(!1)}),[]),[M,O]=i.useState(!1),W=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{L||l==null||l.transaction==null||(o(Ue({id:l.transaction.id,type:l.transaction.type})),B(!0)),h!=null&&(!s||c&&d===!1)&&(P?V||b==null||(U(!0),o(me(h,"TransactionDetail",{timeframe:"month",timePeriod:W??b}))):(o(de()),o(ue()),F(!0),o(xe(h))))}),[o,L,l?.fetchState,l?.transaction,h,s,c,d,P,V,b,W]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o($("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:S,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:I,tranEntity:h,defaultTrendTransactionTimePeriod:b,vendorViewDetails:k,uiState:C,firstMonthOfFY:w,uncategorizedAccounts:A,resetTrendIsFetchedStates:q,isCreateVendorDrawerOpen:M,setIsCreateVendorDrawerOpen:O}}const Sn={overlayWidth:new Yt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=Gt(),c=qt(),d=j(),T=g((p=>le(p))),S=()=>{n()},D={vendorDetailView:a??T,onSaveSuccess:()=>{d(Le()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:S,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return R.jsx(sn,{anchor:"right",open:t,PaperProps:{style:{width:Sn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:S,children:R.jsx(Tn,{onClick:p=>p.stopPropagation(),children:R.jsx(Ht,{...D})})})},Tn=an(on)`
1
+ import{j as R}from"./liveblocks-Bnd7TfEn.js";import{a as i}from"./sentry-C4tTgPRE.js";import{u as j,k as st,j as g,s as ge,g as De,h as Ce,i as Ae,N as ct,l as it}from"./core-DuhHfvEc.js";import{pv as Ie,fF as ee,gV as rt,UK as lt,oB as dt,ob as ut,DF as se,WY as mt,gh as pt,bn as ft,df as Re,bq as _e,sS as H,VQ as Y,WZ as we,W_ as le,We as Pe,ma as Fe,W$ as Ue,Wj as de,Wk as ue,m$ as xe,Sf as me,WU as $,m4 as Ve,m2 as Le,me as ht,pi as St,X0 as yt,X1 as Tt,Dw as Q,m9 as Be,RA as Oe,cm as bt,dl as gt,X2 as It,WT as vt,X3 as Et,X4 as kt,X5 as Dt,X6 as Ct,Ds as At,X7 as Rt,X8 as _t,X9 as wt,Xa as Pt,Xb as Ft,md as Ut,Xc as xt,Xd as Vt,WV as Lt,Xe as Bt,Xf as Ot,Xg as Nt,Ru as zt,Rk as jt,RJ as Mt,mf as Wt,Sg as ve,pn as Xt}from"./zeni-epic-state-B5FlPsWC.js";import{o as K,S as _,k as G,b3 as $t,z as Ne,E as Gt,a2 as qt,b4 as Ht,ac as Yt,a5 as ce,K as Kt,b5 as Jt,p as ie,at as Qt,b6 as Zt,b7 as en,b8 as tn,af as nn,aw as oe}from"./index-B_FmRu0j.js";import{n as an,S as on,D as sn}from"./mui-CAtYecwm.js";import{u as cn}from"./useAskAiCfoHostNavButtonProps-B27GllhX.js";import{d as ze}from"./decodeURIComponentSafe-BuuGDiIq.js";import{u as rn}from"./useInitialThreadRequest-LG1UCRer.js";import{h as je,c as Me,g as ln,e as dn}from"./routePaths-Dq0aokYp.js";import{u as un}from"./expenseAutomationHelper-B5_HDAxt.js";import{A as mn}from"./utils-BtDnAqMA.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="56a01da2-3440-4838-983f-9b53b0426146",t._sentryDebugIdIdentifier="sentry-dbid-56a01da2-3440-4838-983f-9b53b0426146")}catch{}})();function pn(t=!0){const e=j(),o=st(),{useFeatureGate:n}=K(),{isFeatureEnabled:a}=n(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||a!==!0)return;const s=c=>{const d=o.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return d!=="In-Progress"&&d!=="Completed"};s("transferEntryEligible")&&e(Ie({kind:"transferEntryEligible"})),s("creditCardOnlyEligible")&&e(Ie({kind:"creditCardOnlyEligible"}))}),[t,a,e,o])}function fn(t,e){const o=(function(){const d=j(),[T,S]=i.useState(!1),[D,p]=i.useState(null),[l,u]=i.useState(null),{useDynamicConfig:y}=K(),{configValue:I,isDynamicConfigLoading:h}=y("transaction_categorization_config"),b=!h&&I?.capitalization_enabled===!0,k=g((r=>ee(r))),C=k.companyId,w=g((r=>rt(r.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:A,capitalizableAccountOverrides:P,dismissedAccounts:F}=g((r=>{const v=r.tenantState.currentTenantId,E=v!=null?r.tenantState.tenantsById[v]:void 0;return{capitalizableAccounts:E?.capitalizableAccounts??null,capitalizableAccountOverrides:E?.capitalizableAccountOverrides??null,dismissedAccounts:E?.capitalizationOnboardingDismissedAccounts??null}}),ge),V=i.useRef(A);V.current=A;const U=i.useRef(P);U.current=P;const L=i.useRef(F);L.current=F;const B=g((r=>lt(r.accountState)),ge),q=i.useMemo((()=>{const r={};for(const v of B)v.accountId!=null&&v.accountName!=null&&(r[v.accountId]=v.accountName);return r}),[B]),M=l!=null?q[l]??null:null,O=i.useCallback((r=>{if(!b)return;const v=V.current;if(v==null)return;const E=v.accounts??[],X=new Set(r),J=U.current??{},te=L.current;for(const N of E)if(X.has(N.accountId)&&J[N.accountId]==null&&te?.[N.accountId]==null)return p(N.classificationType),u(N.accountId),void S(!0)}),[b]),W=i.useCallback(((r,v)=>{d(dt(C,r,v,!0)),S(!1),p(null),u(null)}),[d,C]),f=i.useCallback((()=>{l!=null&&(d(ut(C,l)),S(!1),p(null),u(null))}),[d,C,l]);return{showPopup:T&&b,popupType:D,popupAccountId:l,popupAccountName:M,currencySymbol:w,checkAndShowPopup:O,handleSubmit:W,handleDismiss:f}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const z=new Map,Ee=(t,e,o)=>`${t}|${e??""}|${o}`,Z=(t,e)=>{const[o,n]=t.shownRecommendations;return{recommendationFor:t.dimension,recommendation:o?.name??"",recommendationSource:o?.engine??null,recommendationConfidencePercentage:o?.confidencePercentage??null,alternativeRecommendation:n?.name??null,alternativeRecommendationSource:n?.engine??null,alternativeRecommendationConfidencePercentage:n?.confidencePercentage??null,selectedValue:t.selected.name,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}},re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),We=(t,e,o)=>{G.trackRecommendationFeedbackRetracted(Z(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Bn=(t,e)=>{const o=new Set(e.map(String));z.forEach(((n,a)=>{o.has(n.transactionId)&&(z.delete(a),We(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));z.forEach(((o,n)=>{e.has(o.transactionId)&&z.delete(n)}))};function hn(t){const e=j(),[o,n]=i.useState(null),[a,s]=i.useState(!1),{fetchState:c}=g(mt),{isEnabled:d,fallbackTransactionId:T}=t,S=i.useCallback((u=>u.transactionId??T??""),[T]),D=i.useCallback((u=>{if(!d)return;const y=S(u);if(y==="")return;if(u.outcome!=="accepted")return void n(u);((h,b,k,C)=>{const w=Ee(b,k,C),A=z.get(w);return A!=null&&(z.delete(w),We(h,A.feedback,A.transactionId),!0)})(e,y,u.lineId,u.dimension)||(((h,b)=>{G.trackRecommendationAccepted(Z(h,b))})(u,y),e(se(re(u,y,{}))))}),[d,S,e]),p=i.useCallback((u=>{if(o==null)return;const y=S(o);((I,h,b)=>{G.trackRecommendationFeedbackSubmitted({...Z(I,h),feedbackReason:b})})(o,y,u),e(se(re(o,y,{reasonText:u,skipped:!1}))),((I,h)=>{z.set(Ee(h,I.lineId,I.dimension),{feedback:I,transactionId:h})})(o,y),s(!0)}),[o,S,e]),l=i.useCallback((()=>{var u,y;o!=null&&(u=o,y=S(o),G.trackRecommendationFeedbackSkipped(Z(u,y)),s(!1),n(null))}),[o,S]);return i.useEffect((()=>{if(!a||c!=="Completed"&&c!=="Error")return;s(!1),n(null);const u=c==="Completed";e(pt({messageSection:"recommendation_feedback",messageText:u?"success":"failed",type:u?"success":"error",showStatusIcon:!0}))}),[a,c,e]),{onRecommendationSelection:D,popup:o!=null?R.jsx($t,{feedback:o,submitState:a?c:"Not-Started",onSubmit:p,onSkip:l}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=K(),{isFeatureEnabled:o}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>ft(t)&&o),[t,o])};function Xe(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Nn(t,e){const o=j(),{useFeatureGate:n}=K(),a=g((f=>ee(f))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&Re(a.userRole),d=a.userRole!=null&&_e(a.userRole),{isFeatureEnabled:T}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:S}=n(_.isExpenseAutomationEnabled),D=pe(),p=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),l=g((f=>Y(f,p))),u=l?.transactionDetailUpdateStatus?.fetchState,y=l?.transactionDetailLocalData?.lineItemById,I=g((f=>{const r=Y(f,p)?.transactionDetailLocalData.vendorUpdates?.id;return r==null?"Not-Started":f.transactionVendorViewState.editVendorStateById[r]?.saveStatus.fetchState??"Not-Started"})),h=i.useMemo((()=>l?.fetchState==="Completed"?Xe(l?.transaction):void 0),[l?.fetchState,l?.transaction]),b=g((f=>{if(h!=null)return we(f.customerIncomeState,f.vendorExpenseState,f.trendState,h,"month")})),k=g((f=>le(f))),C=g((f=>{if(h!=null)return Pe(f.trendWithTransactionsState,h,"TransactionDetail")})),w=a.company?.companyInfo.firstMonthOfFY??1,A=g((f=>Fe(f.accountState,f.accountListState,"accountList"))),[P,F]=i.useState(!1),[V,U]=i.useState(!1),[L,B]=i.useState(!1);i.useEffect((()=>{F(!1),U(!1),B(!1)}),[t,e]);const q=i.useCallback((()=>{F(!1),U(!1)}),[]),[M,O]=i.useState(!1),W=C?.selectedPeriod?.timePeriod;return i.useEffect((()=>{L||l==null||l.transaction==null||(o(Ue({id:l.transaction.id,type:l.transaction.type})),B(!0)),h!=null&&(!s||c&&d===!1)&&(P?V||b==null||(U(!0),o(me(h,"TransactionDetail",{timeframe:"month",timePeriod:W??b}))):(o(de()),o(ue()),F(!0),o(xe(h))))}),[o,L,l?.fetchState,l?.transaction,h,s,c,d,P,V,b,W]),i.useEffect((()=>{k.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)}),[k.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o($("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:d,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:S,isChainOfThoughtEnabled:D,selectedTransaction:p,transactionDetail:l,rawDetailSaveStatus:u,rawDetailLineItemById:y,vendorSaveStatus:I,tranEntity:h,defaultTrendTransactionTimePeriod:b,vendorViewDetails:k,uiState:C,firstMonthOfFY:w,uncategorizedAccounts:A,resetTrendIsFetchedStates:q,isCreateVendorDrawerOpen:M,setIsCreateVendorDrawerOpen:O}}const Sn={overlayWidth:new Yt(100,100,58)},yn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=Gt(),c=qt(),d=j(),T=g((p=>le(p))),S=()=>{n()},D={vendorDetailView:a??T,onSaveSuccess:()=>{d(Le()),d(ht("Not-Started")),o()},onSaveVendor:e,onCancelClick:S,saveVendorDetailLocalData:p=>{d(Ve({vendorId:void 0,localData:p}))}};return R.jsx(sn,{anchor:"right",open:t,PaperProps:{style:{width:Sn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:S,children:R.jsx(Tn,{onClick:p=>p.stopPropagation(),children:R.jsx(Ht,{...D})})})},Tn=an(on)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-Bnd7TfEn.js";import{h as K,g as U,u as Z,i as X,j as g,N as q,l as H,n as Me,o as C}from"./core-DuhHfvEc.js";import{fF as Q,ua as ee,lf as p,eE as te,S6 as Se,br as pe,$K as Be,l$ as ae,Wg as ne,$L as fe,$M as Le,bE as k,S2 as he,$N as Fe,$O as Te,$P as Oe,S5 as ge,$Q as $e,$R as De,$S as Ge,$T as Ie,$U as ze,$V as we,$W as ye,Ti as Re}from"./zeni-epic-state-B5FlPsWC.js";import{o as ce,S as J,k as F,G as ke,de as oe,p as w,a5 as se,ar as _e,Q as Ve}from"./index-BSR6syxs.js";import"./mui-CAtYecwm.js";import{a as y}from"./sentry-C4tTgPRE.js";import{w as ie}from"./withTransactionSidePanel-C37C2_tY.js";import{p as re,c as de}from"./routePaths-DY-fUoNb.js";import{B as Ne}from"./utils-BtDnAqMA.js";import{d as j}from"./decodeURIComponentSafe-BuuGDiIq.js";import{Z as Je}from"./ZeniAccountStatementScreen-D7D_AloB.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./useAskAiCfoHostNavButtonProps-BmrnfhUQ.js";import"./TransactionDetailScreen-iW49SNvH.js";import"./useInitialThreadRequest-B6RfidGO.js";import"./expenseAutomationHelper-B5_HDAxt.js";import"./stripSplatSuffix-C2h79EC3.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="aabf1800-f1ed-4031-a64a-787a2a7bd7dc",a._sentryDebugIdIdentifier="sentry-dbid-aabf1800-f1ed-4031-a64a-787a2a7bd7dc")}catch{}})();const Ue=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Ne(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},qe=H((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=N(e.selectedAccount.tranListType),d=Ke(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:N(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=K(),t=U(),n=Z(),c=t.pathname.split("/").find((l=>Ue.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=X(),{accountType:Y,title:b,subTitle:A}=Qe(o),f="month",T=g((l=>Q(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(J.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=We(o,v,T.bookCloseDate),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){$(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=N(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(q,{to:"../"}):s.jsx(qe,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),Qe=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ke=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ze=H((function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Xe=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=$e(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=X(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),O=g((D=>Ge(D.transactionListState,h,S))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((D=>Q(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,h,b,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(J.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),W=new URLSearchParams(xe??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(J.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!P&&m!=null&&ue&&($(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,b,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(q,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Bt(){const a=U().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>Q(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(q,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Bt as default};
1
+ import{j as s}from"./liveblocks-Bnd7TfEn.js";import{h as K,g as U,u as Z,i as X,j as g,N as q,l as H,n as Me,o as C}from"./core-DuhHfvEc.js";import{fF as Q,ua as ee,lf as p,eE as te,S6 as Se,br as pe,$K as Be,l$ as ae,Wg as ne,$L as fe,$M as Le,bE as k,S2 as he,$N as Fe,$O as Te,$P as Oe,S5 as ge,$Q as $e,$R as De,$S as Ge,$T as Ie,$U as ze,$V as we,$W as ye,Ti as Re}from"./zeni-epic-state-B5FlPsWC.js";import{o as ce,S as J,k as F,G as ke,de as oe,p as w,a5 as se,ar as _e,Q as Ve}from"./index-B_FmRu0j.js";import"./mui-CAtYecwm.js";import{a as y}from"./sentry-C4tTgPRE.js";import{w as ie}from"./withTransactionSidePanel-DZrbeyBJ.js";import{p as re,c as de}from"./routePaths-Dq0aokYp.js";import{B as Ne}from"./utils-BtDnAqMA.js";import{d as j}from"./decodeURIComponentSafe-BuuGDiIq.js";import{Z as Je}from"./ZeniAccountStatementScreen-BjYoYBeQ.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./useAskAiCfoHostNavButtonProps-B27GllhX.js";import"./TransactionDetailScreen-DzseYAKs.js";import"./useInitialThreadRequest-LG1UCRer.js";import"./expenseAutomationHelper-B5_HDAxt.js";import"./stripSplatSuffix-C2h79EC3.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="aabf1800-f1ed-4031-a64a-787a2a7bd7dc",a._sentryDebugIdIdentifier="sentry-dbid-aabf1800-f1ed-4031-a64a-787a2a7bd7dc")}catch{}})();const Ue=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Ne(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},qe=H((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=N(e.selectedAccount.tranListType),d=Ke(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:N(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=K(),t=U(),n=Z(),c=t.pathname.split("/").find((l=>Ue.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=X(),{accountType:Y,title:b,subTitle:A}=Qe(o),f="month",T=g((l=>Q(l))),v=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(J.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=We(o,v,T.bookCloseDate),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:b,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){$(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=N(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(q,{to:"../"}):s.jsx(qe,{firstMonthOfFY:v,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>G(l),...a})})),Qe=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},We=(a,e,t)=>{const n=pe();let c=pe().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ke=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Ze=H((function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),Xe=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=$e(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:b,timeframe:A,startDate:f,endDate:T,titleEncoded:v}=X(),S=j(d??""),h=j(Y??""),I=j(b??""),x=j(v??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((r=>Q(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),z=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||($(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,b,A,f,T,v].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:z,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>G(r),...e}):s.jsx(q,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=ze(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&we(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Z(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:b,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:v}=X(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(v!=null&&v==="exclude_subaccounts"),O=g((D=>Ge(D.transactionListState,h,S))),[P,$]=y.useState(!1),[E,G]=y.useState(void 0),u=g((D=>Q(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const z=st(S,h,b,A,f,I);if(z){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:b,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(J.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),W=new URLSearchParams(xe??"");W.set("view","full"),W.set("thread_id",le),W.set("entity_type",D.entityType);const Ce=w(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${W.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(J.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!P&&m!=null&&ue&&($(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,b,A,f,T].filter((D=>D!=null));return z&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>G(D),...e}):s.jsx(q,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Bt(){const a=U().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>Q(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(q,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Xe,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Bt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-Bnd7TfEn.js";import{h as L,g as F,u as U,i as M,j as y,N as D,l as V,n as Te,o as k}from"./core-DuhHfvEc.js";import{cv as N,fF as v,Zj as P,Ow as ae,Od as H,Oe as ne,Zl as Ie,Oz as we,Zh as Ce,Zi as se,Zx as ke,MA as je,Cd as Ae,Zn as be,OG as Ee,Zk as re,dd as q,GK as oe,dZ as ve,d_ as De,$H as Le,$I as Fe,Of as Ue,$J as Pe,Og as Be,Op as Oe,bq as Re,bJ as Me,cG as Ve,bK as Ne,cu as _e,bt as Ze,Ui as ze,ct as Ge}from"./zeni-epic-state-B5FlPsWC.js";import{K as _,j as $e,z as E,a9 as Z,k as A,d7 as He,d8 as qe,d9 as $,a2 as K,E as Ke,ar as Je,at as We,o as ie,S as O,ac as Qe,a8 as Xe,da as Ye,af as J,p as et,db as tt,a5 as W,dc as at,aj as nt,a0 as X,dd as st,f as rt}from"./index-BSR6syxs.js";import{D as ot,n as R,S as it}from"./mui-CAtYecwm.js";import ct from"./NotFoundScreen-DcVbM1H7.js";import{S as Y}from"./SetupPagesScreen-DdTVcR2_.js";import{a as p}from"./sentry-C4tTgPRE.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-BmrnfhUQ.js";import{u as ut}from"./useInitialThreadRequest-B6RfidGO.js";import{M as ce}from"./MobileAppDrawer-7ZhbRmu1.js";import{F as dt}from"./FeaturePreviewScreen-SWdUfPQt.js";import{a as ee}from"./analyticsHelper-DRQlG4Yk.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./BusinessVerificationPageScreen-Cp54FFZH.js";import"./routePaths-DY-fUoNb.js";import"./InboxNotificationsProvider-Cqk-hq7Y.js";import"./useTaskManagerAccess-CSigDKkg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="0907433a-ce25-49b6-a9cd-12e49cdaa456",t._sentryDebugIdIdentifier="sentry-dbid-0907433a-ce25-49b6-a9cd-12e49cdaa456")}catch{}})();const pt=V((function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}}))(He);function mt(){const t=L(),a=F(),n=U(),{tenantEmailDomain:o}=M(),i=_(),r=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=$e(r),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,T]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>v(w))),f=E.getSignedInUserTenant(o)?.companyId??x.companyId,C=E.getSignedInUser(),h=y((w=>P(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),I=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||I!=="Not-Started"||f==null||(u(!0),n(H()))}),[l,I,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(T(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const B=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!B&&e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:B,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const ft=V((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{$(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{$(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(qe),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:o}=M(),i=U(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[T,l]=p.useState(!1),u=y((I=>I.treasurySetupViewState.fetchState)),x=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((I=>v(I))),h=E.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((I=>Ce(I))),j=y((I=>P(I,h)));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(H()))}),[c,x,h,i]),p.useEffect((()=>{T||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[T,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(ft,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{$(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=R.div`
1
+ import{j as e}from"./liveblocks-Bnd7TfEn.js";import{h as L,g as F,u as U,i as M,j as y,N as D,l as V,n as Te,o as k}from"./core-DuhHfvEc.js";import{cv as N,fF as v,Zj as P,Ow as ae,Od as H,Oe as ne,Zl as Ie,Oz as we,Zh as Ce,Zi as se,Zx as ke,MA as je,Cd as Ae,Zn as be,OG as Ee,Zk as re,dd as q,GK as oe,dZ as ve,d_ as De,$H as Le,$I as Fe,Of as Ue,$J as Pe,Og as Be,Op as Oe,bq as Re,bJ as Me,cG as Ve,bK as Ne,cu as _e,bt as Ze,Ui as ze,ct as Ge}from"./zeni-epic-state-B5FlPsWC.js";import{K as _,j as $e,z as E,a9 as Z,k as A,d7 as He,d8 as qe,d9 as $,a2 as K,E as Ke,ar as Je,at as We,o as ie,S as O,ac as Qe,a8 as Xe,da as Ye,af as J,p as et,db as tt,a5 as W,dc as at,aj as nt,a0 as X,dd as st,f as rt}from"./index-B_FmRu0j.js";import{D as ot,n as R,S as it}from"./mui-CAtYecwm.js";import ct from"./NotFoundScreen-BiqhqvbB.js";import{S as Y}from"./SetupPagesScreen-Bj2t3L8G.js";import{a as p}from"./sentry-C4tTgPRE.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-B27GllhX.js";import{u as ut}from"./useInitialThreadRequest-LG1UCRer.js";import{M as ce}from"./MobileAppDrawer-cK9tTach.js";import{F as dt}from"./FeaturePreviewScreen-BV4SnLlN.js";import{a as ee}from"./analyticsHelper-BEwTCwYZ.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./BusinessVerificationPageScreen-DU8rGT08.js";import"./routePaths-Dq0aokYp.js";import"./InboxNotificationsProvider-Cqk-hq7Y.js";import"./useTaskManagerAccess-CyFeM69F.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="0907433a-ce25-49b6-a9cd-12e49cdaa456",t._sentryDebugIdIdentifier="sentry-dbid-0907433a-ce25-49b6-a9cd-12e49cdaa456")}catch{}})();const pt=V((function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:A}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}}))(He);function mt(){const t=L(),a=F(),n=U(),{tenantEmailDomain:o}=M(),i=_(),r=y((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=$e(r),s=N(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,T]=p.useState(!1),[l,u]=p.useState(!1),x=y((w=>v(w))),f=E.getSignedInUserTenant(o)?.companyId??x.companyId,C=E.getSignedInUser(),h=y((w=>P(w,f))),g=y((w=>w.treasurySetupViewState.fetchState)),j=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),I=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||I!=="Not-Started"||f==null||(u(!0),n(H()))}),[l,I,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(T(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const B=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!B&&e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:B,isReadOnly:!s,treasurySetupView:h,analytics:A})]})}const ft=V((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{$(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{$(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(qe),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:o}=M(),i=U(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[T,l]=p.useState(!1),u=y((I=>I.treasurySetupViewState.fetchState)),x=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((I=>v(I))),h=E.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((I=>Ce(I))),j=y((I=>P(I,h)));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(H()))}),[c,x,h,i]),p.useEffect((()=>{T||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[T,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(Z,{analytics:A,onLoad:()=>{}}),e.jsx(ft,{analytics:A,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{$(A,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-Bnd7TfEn.js";import{a as u}from"./sentry-C4tTgPRE.js";import{h as M,u as G,i as z,j as f,l as N,g as q,n as We,o as P,N as L}from"./core-DuhHfvEc.js";import{VN as gt,VO as Ze,RA as et,VP as vt,fF as U,g_ as ge,VQ as Tt,cE as xt,VR as bt,FH as yt,VS as wt,VT as oe,VU as te,VV as ve,T9 as ue,Ta as ke,FX as pe,T8 as he,FK as tt,Fh as Pe,VW as It,Tb as Y,l$ as me,VX as je,Fb as Ct,VY as Dt,VZ as Et,V_ as Ve,V$ as _e,W0 as Ae,W1 as Re,FR as Te,W2 as nt,Fy as at,W3 as Ft,W4 as kt,W5 as Pt,W6 as jt,W7 as Vt,W8 as _t,W9 as At,Wa as Rt,Cp as Ut,Cx as Lt,Cq as Bt,Sg as we,Wb as Ot,Wc as Wt,lf as Ie,br as Mt,Wd as Nt,We as Gt,mZ as $t,n6 as zt,Sf as Ce,bE as Me,Wf as ot,RS as st,Wg as Yt,Wh as Jt,Wi as Kt,n8 as qt,Wj as Ne,Wk as Ge,Wl as $e,Wm as ze,Wn as Ht,n4 as Qt,Wo as Xt,n7 as Zt,Wp as en,Wq as it,SB as rt,mn as tn,Wr as nn,Ws as De,Wt as dt,Sz as lt,Ip as an,Wu as on,Wv as sn,mH as ct,Ww as rn,Wx as dn,SN as ln,vg as cn,Wy as ut,Wz as Ye,SK as Ee,WA as Je,WB as un,SP as pn,WC as hn,WD as mn,WE as fn,WF as Sn,WG as gn,vj as vn,WH as Tn,Tc as xn,UM as bn,Ss as Fe,ia as yn,UO as wn,UN as In,i8 as Cn,WI as Dn,WJ as En,Iu as Fn,WK as kn,WL as Pn,WM as jn,WN as Vn,mr as _n,bn as An,d_ as Rn,dZ as Un}from"./zeni-epic-state-B5FlPsWC.js";import{E as Ln,a2 as ne,ac as Ue,o as H,S as W,z as R,a8 as Bn,aN as On,k as j,_ as Le,O as xe,aw as ee,at as se,aO as Wn,aP as pt,ar as Mn,a9 as Se,aQ as Nn,p as K,K as Gn,G as ht,aR as $n,af as mt,a5 as zn,j as Ke,aS as Yn,H as J,aa as Jn,ag as ft,ah as Kn,aT as qn,aU as Hn,V as Be,aV as Qn,aW as Xn,a4 as Zn,aX as ea,aY as ta}from"./index-BSR6syxs.js";import{D as na,n as B,S as St}from"./mui-CAtYecwm.js";import{t as aa,A as oa}from"./AddressScreen-I8Rs-MIn.js";import fe from"./NotFoundScreen-DcVbM1H7.js";import{F as sa}from"./FeaturePreviewScreen-SWdUfPQt.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-DazVitQy.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-BmrnfhUQ.js";import{M as re}from"./MobileAppDrawer-7ZhbRmu1.js";import{v as Oe,c as ua,d as pa}from"./routePaths-DY-fUoNb.js";import{D as ha}from"./DrawerScreen-DKrIxc45.js";import{a as ma,m as fa}from"./accountMappingHelper-DPpfSFuE.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./pathToGoBack-DaQqgjO2.js";import"./InboxNotificationsProvider-Cqk-hq7Y.js";import"./useTaskManagerAccess-CSigDKkg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="be60093b-0fde-42b6-8882-41a946c55fb8",e._sentryDebugIdIdentifier="sentry-dbid-be60093b-0fde-42b6-8882-41a946c55fb8")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=N((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Le.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(On),va=()=>{const e=Ln(),a=M(),s=G(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=H(),{isFeatureEnabled:h}=p(W.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Bn,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
1
+ import{j as o}from"./liveblocks-Bnd7TfEn.js";import{a as u}from"./sentry-C4tTgPRE.js";import{h as M,u as G,i as z,j as f,l as N,g as q,n as We,o as P,N as L}from"./core-DuhHfvEc.js";import{VN as gt,VO as Ze,RA as et,VP as vt,fF as U,g_ as ge,VQ as Tt,cE as xt,VR as bt,FH as yt,VS as wt,VT as oe,VU as te,VV as ve,T9 as ue,Ta as ke,FX as pe,T8 as he,FK as tt,Fh as Pe,VW as It,Tb as Y,l$ as me,VX as je,Fb as Ct,VY as Dt,VZ as Et,V_ as Ve,V$ as _e,W0 as Ae,W1 as Re,FR as Te,W2 as nt,Fy as at,W3 as Ft,W4 as kt,W5 as Pt,W6 as jt,W7 as Vt,W8 as _t,W9 as At,Wa as Rt,Cp as Ut,Cx as Lt,Cq as Bt,Sg as we,Wb as Ot,Wc as Wt,lf as Ie,br as Mt,Wd as Nt,We as Gt,mZ as $t,n6 as zt,Sf as Ce,bE as Me,Wf as ot,RS as st,Wg as Yt,Wh as Jt,Wi as Kt,n8 as qt,Wj as Ne,Wk as Ge,Wl as $e,Wm as ze,Wn as Ht,n4 as Qt,Wo as Xt,n7 as Zt,Wp as en,Wq as it,SB as rt,mn as tn,Wr as nn,Ws as De,Wt as dt,Sz as lt,Ip as an,Wu as on,Wv as sn,mH as ct,Ww as rn,Wx as dn,SN as ln,vg as cn,Wy as ut,Wz as Ye,SK as Ee,WA as Je,WB as un,SP as pn,WC as hn,WD as mn,WE as fn,WF as Sn,WG as gn,vj as vn,WH as Tn,Tc as xn,UM as bn,Ss as Fe,ia as yn,UO as wn,UN as In,i8 as Cn,WI as Dn,WJ as En,Iu as Fn,WK as kn,WL as Pn,WM as jn,WN as Vn,mr as _n,bn as An,d_ as Rn,dZ as Un}from"./zeni-epic-state-B5FlPsWC.js";import{E as Ln,a2 as ne,ac as Ue,o as H,S as W,z as R,a8 as Bn,aN as On,k as j,_ as Le,O as xe,aw as ee,at as se,aO as Wn,aP as pt,ar as Mn,a9 as Se,aQ as Nn,p as K,K as Gn,G as ht,aR as $n,af as mt,a5 as zn,j as Ke,aS as Yn,H as J,aa as Jn,ag as ft,ah as Kn,aT as qn,aU as Hn,V as Be,aV as Qn,aW as Xn,a4 as Zn,aX as ea,aY as ta}from"./index-B_FmRu0j.js";import{D as na,n as B,S as St}from"./mui-CAtYecwm.js";import{t as aa,A as oa}from"./AddressScreen--TV3FMLi.js";import fe from"./NotFoundScreen-BiqhqvbB.js";import{F as sa}from"./FeaturePreviewScreen-BV4SnLlN.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-CG6SIMxD.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-B27GllhX.js";import{M as re}from"./MobileAppDrawer-cK9tTach.js";import{v as Oe,c as ua,d as pa}from"./routePaths-Dq0aokYp.js";import{D as ha}from"./DrawerScreen-688ye3_R.js";import{a as ma,m as fa}from"./accountMappingHelper-DPpfSFuE.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./pathToGoBack-DaQqgjO2.js";import"./InboxNotificationsProvider-Cqk-hq7Y.js";import"./useTaskManagerAccess-CyFeM69F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="be60093b-0fde-42b6-8882-41a946c55fb8",e._sentryDebugIdIdentifier="sentry-dbid-be60093b-0fde-42b6-8882-41a946c55fb8")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=N((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Le.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(On),va=()=>{const e=Ln(),a=M(),s=G(),{scheduleDetailId:t}=z(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=z(),{useFeatureGate:p}=H(),{isFeatureEnabled:h}=p(W.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Bn,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-Bnd7TfEn.js";import{a as l}from"./sentry-C4tTgPRE.js";import{t as u,u as h,j as y,N as I}from"./core-DuhHfvEc.js";import{UA as b,gi as w,JD as j}from"./zeni-epic-state-B5FlPsWC.js";import{z as f,a8 as x,ag as S,ah as D}from"./index-BSR6syxs.js";import{n as g}from"./mui-CAtYecwm.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.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]="d20c9811-4153-46da-8628-ea8c5647eb5e",e._sentryDebugIdIdentifier="sentry-dbid-d20c9811-4153-46da-8628-ea8c5647eb5e")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),s=y((m=>b(m))),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),l.useEffect((()=>{n||(p(!0),a(j(t,c,i)))}),[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.div`
1
+ import{j as o}from"./liveblocks-Bnd7TfEn.js";import{a as l}from"./sentry-C4tTgPRE.js";import{t as u,u as h,j as y,N as I}from"./core-DuhHfvEc.js";import{UA as b,gi as w,JD as j}from"./zeni-epic-state-B5FlPsWC.js";import{z as f,a8 as x,ag as S,ah as D}from"./index-B_FmRu0j.js";import{n as g}from"./mui-CAtYecwm.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.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]="d20c9811-4153-46da-8628-ea8c5647eb5e",e._sentryDebugIdIdentifier="sentry-dbid-d20c9811-4153-46da-8628-ea8c5647eb5e")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),s=y((m=>b(m))),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),l.useEffect((()=>{n||(p(!0),a(j(t,c,i)))}),[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=g.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-Bnd7TfEn.js";import{u as _,h as ae,g as W,i as N,j as D,l as te,N as ee,n as Fe,o as C}from"./core-DuhHfvEc.js";import{$m as $e,Lv as Ue,$n as ze,fF as R,GI as _e,$o as An,cu as ne,cv as Me,GC as kn,$p as Dn,$q as In,GF as Sn,GM as ge,Gz as Pn,Gw as bn,YX as le,$r as vn,P0 as jn,WT as En,P2 as Tn,mI as be,$s as Bn,uX as Ve,uL as Ze,mz as Ge,mC as ve,WU as je,WV as On,$t as Ln,mB as Rn,mY as Fn,mq as $n,kQ as Un,kP as zn,$u as _n,$v as he,OJ as Mn,$w as Vn,$x as Zn,Zb as ye,$y as Ee,$z as Gn,Pd as Hn,Zx as Wn,MA as He,Cd as We,$A as Nn,Pa as Yn,$B as Ne,da as xe,Ph as Ye,dZ as qe,d_ as Ce,Pf as qn,Mu as Kn,P7 as Jn,$C as Ke,$D as Je,OL as Xe,OV as Te,$E as Xn,Zo as Qn,Pi as ea,bq as na,bJ as aa,cG as ta,bK as oa,bt as sa,Ui as ia}from"./zeni-epic-state-B5FlPsWC.js";import{K as oe,o as Z,S as z,z as P,aw as we,E as F,a8 as de,cY as ra,a2 as V,ac as Y,a5 as Qe,j as ca,q as Be,k as B,cZ as la,af as Ae,c_ as da,a9 as ue,c$ as ua,V as ke,bj as H,d0 as pa,ar as ma,at as en,d1 as Oe,d2 as ga,p as ce,d3 as ha,aj as fa,d4 as ya,d5 as xa,f as Ca,H as wa}from"./index-BSR6syxs.js";import{n as $,D as q,S as K}from"./mui-CAtYecwm.js";import Q from"./NotFoundScreen-DcVbM1H7.js";import{S as Le}from"./SetupPagesScreen-DdTVcR2_.js";import{F as nn}from"./FeaturePreviewScreen-SWdUfPQt.js";import{a as m}from"./sentry-C4tTgPRE.js";import{M as pe}from"./MobileAppDrawer-7ZhbRmu1.js";import{A as Aa,D as ka,V as Da}from"./DomesticWireDetailScreen-DldCKkMe.js";import{A as Ia}from"./AddressScreen-I8Rs-MIn.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-BmrnfhUQ.js";import{Z as Sa}from"./ZeniAccountStatementScreen-D7D_AloB.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./BusinessVerificationPageScreen-Cp54FFZH.js";import"./routePaths-DY-fUoNb.js";import"./analyticsHelper-DRQlG4Yk.js";import"./InboxNotificationsProvider-Cqk-hq7Y.js";import"./useTaskManagerAccess-CSigDKkg.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="a36b5e9a-93d6-4c44-a12f-c7628a0cdef5",n._sentryDebugIdIdentifier="sentry-dbid-a36b5e9a-93d6-4c44-a12f-c7628a0cdef5")}catch{}})();const Pa=$.div`
1
+ import{j as e}from"./liveblocks-Bnd7TfEn.js";import{u as _,h as ae,g as W,i as N,j as D,l as te,N as ee,n as Fe,o as C}from"./core-DuhHfvEc.js";import{$m as $e,Lv as Ue,$n as ze,fF as R,GI as _e,$o as An,cu as ne,cv as Me,GC as kn,$p as Dn,$q as In,GF as Sn,GM as ge,Gz as Pn,Gw as bn,YX as le,$r as vn,P0 as jn,WT as En,P2 as Tn,mI as be,$s as Bn,uX as Ve,uL as Ze,mz as Ge,mC as ve,WU as je,WV as On,$t as Ln,mB as Rn,mY as Fn,mq as $n,kQ as Un,kP as zn,$u as _n,$v as he,OJ as Mn,$w as Vn,$x as Zn,Zb as ye,$y as Ee,$z as Gn,Pd as Hn,Zx as Wn,MA as He,Cd as We,$A as Nn,Pa as Yn,$B as Ne,da as xe,Ph as Ye,dZ as qe,d_ as Ce,Pf as qn,Mu as Kn,P7 as Jn,$C as Ke,$D as Je,OL as Xe,OV as Te,$E as Xn,Zo as Qn,Pi as ea,bq as na,bJ as aa,cG as ta,bK as oa,bt as sa,Ui as ia}from"./zeni-epic-state-B5FlPsWC.js";import{K as oe,o as Z,S as z,z as P,aw as we,E as F,a8 as de,cY as ra,a2 as V,ac as Y,a5 as Qe,j as ca,q as Be,k as B,cZ as la,af as Ae,c_ as da,a9 as ue,c$ as ua,V as ke,bj as H,d0 as pa,ar as ma,at as en,d1 as Oe,d2 as ga,p as ce,d3 as ha,aj as fa,d4 as ya,d5 as xa,f as Ca,H as wa}from"./index-B_FmRu0j.js";import{n as $,D as q,S as K}from"./mui-CAtYecwm.js";import Q from"./NotFoundScreen-BiqhqvbB.js";import{S as Le}from"./SetupPagesScreen-Bj2t3L8G.js";import{F as nn}from"./FeaturePreviewScreen-BV4SnLlN.js";import{a as m}from"./sentry-C4tTgPRE.js";import{M as pe}from"./MobileAppDrawer-cK9tTach.js";import{A as Aa,D as ka,V as Da}from"./DomesticWireDetailScreen-CV6fUqR1.js";import{A as Ia}from"./AddressScreen--TV3FMLi.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-B27GllhX.js";import{Z as Sa}from"./ZeniAccountStatementScreen-BjYoYBeQ.js";import"./recharts-Ax0XVvbk.js";import"./analytics-VM2TTd1t.js";import"./plaid-DQqtphHb.js";import"./dnd-pjIs22E1.js";import"./stripe-cKAAJElX.js";import"./lottie-DnzLxz4m.js";import"./lexical-Db4_RNT4.js";import"./pdf-C4y-9f6g.js";import"./utils-BtDnAqMA.js";import"./BusinessVerificationPageScreen-DU8rGT08.js";import"./routePaths-Dq0aokYp.js";import"./analyticsHelper-BEwTCwYZ.js";import"./InboxNotificationsProvider-Cqk-hq7Y.js";import"./useTaskManagerAccess-CyFeM69F.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="a36b5e9a-93d6-4c44-a12f-c7628a0cdef5",n._sentryDebugIdIdentifier="sentry-dbid-a36b5e9a-93d6-4c44-a12f-c7628a0cdef5")}catch{}})();const Pa=$.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as c}from"./liveblocks-Bnd7TfEn.js";import{a as f}from"./sentry-C4tTgPRE.js";import{h as $,u as x,g as T,i as j,j as p}from"./core-DuhHfvEc.js";import{Ti as s,Th as v,$F as B,fF as C,$G as E}from"./zeni-epic-state-B5FlPsWC.js";import{a2 as z,af as g,E as D,z as L,a8 as P,d6 as G,a5 as N}from"./index-BSR6syxs.js";import{n as _}from"./mui-CAtYecwm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8d52779a-e613-4e05-b383-0464d0998de2",e._sentryDebugIdIdentifier="sentry-dbid-8d52779a-e613-4e05-b383-0464d0998de2")}catch{}})();const U=_.div`
1
+ import{j as c}from"./liveblocks-Bnd7TfEn.js";import{a as f}from"./sentry-C4tTgPRE.js";import{h as $,u as x,g as T,i as j,j as p}from"./core-DuhHfvEc.js";import{Ti as s,Th as v,$F as B,fF as C,$G as E}from"./zeni-epic-state-B5FlPsWC.js";import{a2 as z,af as g,E as D,z as L,a8 as P,d6 as G,a5 as N}from"./index-B_FmRu0j.js";import{n as _}from"./mui-CAtYecwm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8d52779a-e613-4e05-b383-0464d0998de2",e._sentryDebugIdIdentifier="sentry-dbid-8d52779a-e613-4e05-b383-0464d0998de2")}catch{}})();const U=_.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{cT as m,cU as l,Ut as _,de as d}from"./zeni-epic-state-B5FlPsWC.js";import{k as u}from"./index-BSR6syxs.js";import"./sentry-C4tTgPRE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c8df873c-aec7-45c8-aeb7-fcf3c5d89205",e._sentryDebugIdIdentifier="sentry-dbid-c8df873c-aec7-45c8-aeb7-fcf3c5d89205")}catch{}})();const h=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},b=(e,a,o,i,s)=>{const c=[],r=[];let t=[];s?.forEach((n=>{c.push(n.companyId),r.push(n.companyName),t=t.concat(n.userRole)})),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?c:void 0,company_names:s!=null?r:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",w=e=>Object.values(e.allocation).map(String).join("-");export{w as a,b as f,g,h as t};
1
+ import{cT as m,cU as l,Ut as _,de as d}from"./zeni-epic-state-B5FlPsWC.js";import{k as u}from"./index-B_FmRu0j.js";import"./sentry-C4tTgPRE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c8df873c-aec7-45c8-aeb7-fcf3c5d89205",e._sentryDebugIdIdentifier="sentry-dbid-c8df873c-aec7-45c8-aeb7-fcf3c5d89205")}catch{}})();const h=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},b=(e,a,o,i,s)=>{const c=[],r=[];let t=[];s?.forEach((n=>{c.push(n.companyId),r.push(n.companyName),t=t.concat(n.userRole)})),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?c:void 0,company_names:s!=null?r:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",w=e=>Object.values(e.allocation).map(String).join("-");export{w as a,b as f,g,h as t};
@@ -1 +1 @@
1
- import{a1 as n}from"./index-BSR6syxs.js";import"./mui-CAtYecwm.js";import"./sentry-C4tTgPRE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="227db5e8-bf87-42bb-b403-87b09e52f245",e._sentryDebugIdIdentifier="sentry-dbid-227db5e8-bf87-42bb-b403-87b09e52f245")}catch{}})();function l(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{l as t};
1
+ import{a1 as n}from"./index-B_FmRu0j.js";import"./mui-CAtYecwm.js";import"./sentry-C4tTgPRE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="227db5e8-bf87-42bb-b403-87b09e52f245",e._sentryDebugIdIdentifier="sentry-dbid-227db5e8-bf87-42bb-b403-87b09e52f245")}catch{}})();function l(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{l as t};