@zeniai/web-app-ui 5.3.27-qa → 5.3.28-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-BQfmEpLX.js → AccountMappingScreen-B122veFS.js} +2 -2
- package/dist/assets/AddressRoutes-DD3PWqRR.js +1 -0
- package/dist/assets/AddressScreen-Bjy224hY.js +9 -0
- package/dist/assets/{AiCfoScreen-DqiQxXnW.js → AiCfoScreen-DRhzkgQ4.js} +1 -1
- package/dist/assets/AppDrawer-CmZR9V3S.js +10 -0
- package/dist/assets/{BillPayApprovalRoutes-DNrNWIlc.js → BillPayApprovalRoutes-DcPRvzvX.js} +1 -1
- package/dist/assets/{BillPayRoutes-DnJ45sAp.js → BillPayRoutes-7IbYVZQj.js} +6 -6
- package/dist/assets/{BusinessVerificationPageScreen-BE7jNtnW.js → BusinessVerificationPageScreen-Dj4DFEDZ.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-6Ka5bg_s.js → CardsAiCfoScreen-DcOc6NVJ.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DCXweRlN.js → ChargeCardRoutes-CEoxoY5I.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-9PIPrJD8.js → CompanyPassportScreen-DpK4Dun5.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-D7Id8Qyv.js → ConnectionAuthScreen-zGx9NWEX.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-DMVsLagi.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-D0fsx_NF.js → CustomerOnboardingRoutes-Bm7Gq1zB.js} +3 -3
- package/dist/assets/{DashboardRoutes-FqOIwMdn.js → DashboardRoutes-CvmjpCdE.js} +3 -3
- package/dist/assets/{DefaultTenantHome-BCa4fCFu.js → DefaultTenantHome-HJBBRJ83.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DYRE--Tw.js → DomesticWireDetailScreen-zmit7fsp.js} +3 -3
- package/dist/assets/{DrawerScreen-Ch4vO2_l.js → DrawerScreen-DWt_1PTu.js} +1 -1
- package/dist/assets/EntityDetailRoutes-DU5uZwSh.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-nmpRmWJY.js +38 -0
- package/dist/assets/FeaturePreviewScreen-CYw-FEeS.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-BJdTOO-n.js → HubSpotOAuthCallbackScreen-C0UKEWfL.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-CzhxlkVm.js → InboxNotificationsProvider-B9BL9-5c.js} +1 -1
- package/dist/assets/{InvoicingRoutes-B3AeTlOl.js → InvoicingRoutes-DF1VvJ9T.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BAk-aNDD.js → MagicLinkRoutes-CaarfkKE.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-BZGkiZxP.js +12 -0
- package/dist/assets/{MobileAppDrawer-BWD9smko.js → MobileAppDrawer-IycZNEmR.js} +1 -1
- package/dist/assets/NotFoundScreen-zO8OLJhJ.js +1 -0
- package/dist/assets/{NotificationRoutes-D0AL5w0Z.js → NotificationRoutes-6oHSrMqR.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-DeyebXNT.js → OAuthConsentScreen-B7jDznQY.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DzBBzW7r.js → PandLWithForecastRoutes-Mhif0KAo.js} +1 -1
- package/dist/assets/PaymentLinkScreen-4qP49dgi.js +21 -0
- package/dist/assets/{PeopleRoutes-DvGZoebQ.js → PeopleRoutes-C4d4i6UU.js} +3 -3
- package/dist/assets/PerformanceRoutes-C3v9eigu.js +1 -0
- package/dist/assets/{Preview-D-cOupgE.js → Preview-slW2Ixf-.js} +1 -1
- package/dist/assets/QBOConnectionScreen-CRdlPDmH.js +100 -0
- package/dist/assets/{ReimbursementApprovalRoutes-GiFApWFb.js → ReimbursementApprovalRoutes-MeE-8_Az.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-0HTyN3lV.js → ReimbursementApprovalRuleDetailScreen-BJC5yP6d.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DflRsfsu.js → ReimbursementRoutes-C9JSCnSD.js} +6 -6
- package/dist/assets/{ReportsRoutes-B-F2r3lp.js → ReportsRoutes-BDuInaYy.js} +1 -1
- package/dist/assets/RewardsRoutes-rtTs69I9.js +1 -0
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-Dp_gteYu.js +25 -0
- package/dist/assets/ScreenRoutes-Du_IBiRt.js +2 -0
- package/dist/assets/{SettingsRoutes-DBQFuX0Q.js → SettingsRoutes-CH7SZ849.js} +6 -6
- package/dist/assets/{SetupPagesScreen-BsaJHNfF.js → SetupPagesScreen-BnC2-rFL.js} +5 -5
- package/dist/assets/SignInScreen-YOWRmGPP.js +1 -0
- package/dist/assets/SignOutScreen-CMuTW5-H.js +9 -0
- package/dist/assets/TaskListScreen-BoU6HI4a.js +9 -0
- package/dist/assets/{TaskRoutes-wZ3nPlAw.js → TaskRoutes-Do0XX3yi.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-TY7uI7YZ.js +1 -0
- package/dist/assets/{TransactionDetailScreen-BsrX2MVn.js → TransactionDetailScreen-DGG9zgNP.js} +2 -2
- package/dist/assets/{TransactionListRoutes-Coxf-yFa.js → TransactionListRoutes-qMXcP5Ma.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DkhMbXQx.js → TreasuryRoutes-Dc4_3bRC.js} +4 -4
- package/dist/assets/VendorsRoutes-BHfDZjVd.js +88 -0
- package/dist/assets/{WiseConfirmationScreen-IQZ_ZF6P.js → WiseConfirmationScreen-DW4J8Odf.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CW0lRnK0.js → ZeniAccountRoutes-B1Ed62sk.js} +10 -10
- package/dist/assets/{ZeniAccountStatementScreen-BQTVbJHb.js → ZeniAccountStatementScreen-DUryI7rz.js} +1 -1
- package/dist/assets/{accountMappingHelper-CabpVb3J.js → accountMappingHelper-BgNXnMXC.js} +1 -1
- package/dist/assets/{analytics-CsVp7bfq.js → analytics-Cuu7a7XR.js} +1 -1
- package/dist/assets/{analyticsHelper-DA7cdp8W.js → analyticsHelper-BQQjHYVq.js} +1 -1
- package/dist/assets/{core-DFhvjgE1.js → core-D5xlmXJj.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Bq1r0pP9.js → decodeURIComponentSafe-N0xRs_hS.js} +1 -1
- package/dist/assets/{dnd-CR945ANw.js → dnd-DN-HQej8.js} +1 -1
- package/dist/assets/{empty-BUo7eNC4.js → empty-C81l0a_D.js} +1 -1
- package/dist/assets/{empty-DtCztbrx.js → empty-O3WXjhlr.js} +1 -1
- package/dist/assets/{emptyVideoElement-BHUR8Iif.js → emptyVideoElement-DNB4w3eI.js} +1 -1
- package/dist/assets/{epic-CXAAQW1t.js → epic-BSdQyFUw.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-BDz030nC.js → expenseAutomationHelper-BchoKsfU.js} +1 -1
- package/dist/assets/{getLocaleForTenant-mARGfLdD.js → getLocaleForTenant-DF3_Oq5l.js} +1 -1
- package/dist/assets/{index-BaZwiGCV.js → index-B2tEu4AE.js} +1 -1
- package/dist/assets/{index-DiQe_6d7.js → index-B4N0qOBD.js} +2 -2
- package/dist/assets/{index-CFhckac5.js → index-BZhSlJBy.js} +1 -1
- package/dist/assets/{index-Cp-pyxoH.js → index-BzXVp9e6.js} +14281 -14222
- package/dist/assets/{index-BjpjXshH.js → index-CcXiIb6r.js} +1 -1
- package/dist/assets/{index-BvtiyGfj.js → index-ChKsFe22.js} +1 -1
- package/dist/assets/{index-BuEv25D3.js → index-CojIsciJ.js} +1 -1
- package/dist/assets/{index-BBYtI_9U.js → index-L6DNygfO.js} +1 -1
- package/dist/assets/{lexical-CCIwPSwQ.js → lexical-DDQ51-Oa.js} +1 -1
- package/dist/assets/{liveblocks-BY1qt3Nf.js → liveblocks-DOBkg1D1.js} +1 -1
- package/dist/assets/{lottie-DgdF8254.js → lottie-o0tP_TXQ.js} +1 -1
- package/dist/assets/{mui-DesXezzU.js → mui-DpenkF9f.js} +1 -1
- package/dist/assets/{pathToGoBack-9ah_vxgB.js → pathToGoBack-Cjq5n9wd.js} +1 -1
- package/dist/assets/{pdf-BVKoD2Fp.js → pdf-DIMTd5ya.js} +3 -3
- package/dist/assets/{pdf-lib-B25n7och.js → pdf-lib-DU5YZRdD.js} +1 -1
- package/dist/assets/{plaid---yWAm21.js → plaid-D5L6VoNT.js} +1 -1
- package/dist/assets/{pusher-D7k49qkv.js → pusher-oX4CN6zb.js} +1 -1
- package/dist/assets/{react-Cwl8BPa_.js → react-966-QmHM.js} +1 -1
- package/dist/assets/{react-DyW_yLGE.js → react-C-oQLK1P.js} +1 -1
- package/dist/assets/{react-Dmj3hcZb.js → react-Cj8ClW-m.js} +1 -1
- package/dist/assets/{react-B5sZlhmO.js → react-Dq7Fy1Mm.js} +1 -1
- package/dist/assets/{react-KT_bO9_E.js → react-a6JNjSit.js} +1 -1
- package/dist/assets/{react-CNwSpjM6.js → react-nXpxox7I.js} +1 -1
- package/dist/assets/{recharts-Co89o1ZO.js → recharts-CcOTx_Jj.js} +1 -1
- package/dist/assets/routePaths-EETNAIMJ.js +1 -0
- package/dist/assets/{sentry-xWYlrqHr.js → sentry-B0nIwgR6.js} +1 -1
- package/dist/assets/{url-B6D8gSqv.js → url-VkrE7aAr.js} +1 -1
- package/dist/assets/url-kBT6SwtU.js +6 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Q3fykDPb.js → useAiCfoDashboardSuggestedQuestionsChips-By0VhC82.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-4GEN23bC.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-D6tT2l3B.js → useChargeCardPusherEvents-B4sZutCZ.js} +1 -1
- package/dist/assets/{useDeviceId-BklKiHEX.js → useDeviceId-ChTv1tr4.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BZTHF4dB.js → useEmailConnectResultRefresh-C8LQEaOo.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-C8H1eKN2.js → useInitialThreadRequest-DEkHgfRq.js} +1 -1
- package/dist/assets/useTaskManagerAccess-BagH02hb.js +1 -0
- package/dist/assets/utils-DQ0YEP-f.js +36 -0
- package/dist/assets/withTransactionSidePanel-D2qM2kUe.js +25 -0
- package/dist/assets/{zeni-epic-state-DxmmAR38.js → zeni-epic-state-DVQQo6UD.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-CdpLMjIu.js +0 -1
- package/dist/assets/AddressScreen-CT-cfyaM.js +0 -9
- package/dist/assets/AppDrawer-MNEp__cO.js +0 -10
- package/dist/assets/CustomerOnboardingAuthScreen-BKppasz4.js +0 -1
- package/dist/assets/EntityDetailRoutes-D1iT3MPR.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-OE_lY51d.js +0 -25
- package/dist/assets/FeaturePreviewScreen-qqDSfjtg.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CzSGTOjZ.js +0 -12
- package/dist/assets/NotFoundScreen-VUm8cLbz.js +0 -1
- package/dist/assets/PaymentLinkScreen-Cwn7LxRK.js +0 -21
- package/dist/assets/PerformanceRoutes-9A-lBxuM.js +0 -1
- package/dist/assets/QBOConnectionScreen-C9YRg79s.js +0 -100
- package/dist/assets/RewardsRoutes-CSaZHc7K.js +0 -1
- package/dist/assets/ScreenRoutes-C1JhTMiC.js +0 -2
- package/dist/assets/SignInScreen-BmuYyGgl.js +0 -1
- package/dist/assets/SignOutScreen-2DfdubEs.js +0 -9
- package/dist/assets/TaskListScreen-CmZ7R7x9.js +0 -9
- package/dist/assets/TransactionDetailRoutes-DvkfSP-r.js +0 -1
- package/dist/assets/VendorsRoutes-C6LVkVPB.js +0 -112
- package/dist/assets/routePaths-CdJe6JYT.js +0 -1
- package/dist/assets/url-BQb6aJ6P.js +0 -6
- package/dist/assets/useAskAiCfoHostNavButtonProps-DqIFV4k1.js +0 -1
- package/dist/assets/useTaskManagerAccess-D4rOKbOu.js +0 -1
- package/dist/assets/utils-18zApAFM.js +0 -36
- package/dist/assets/withTransactionSidePanel-B0GHQzqo.js +0 -25
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BY1qt3Nf.js";import{z as b,a8 as N,k as d,U as S,e0 as k,c as E,y as I}from"./index-Cp-pyxoH.js";import"./mui-DesXezzU.js";import g from"./NotFoundScreen-VUm8cLbz.js";import{a as m}from"./sentry-xWYlrqHr.js";import{u as C,j as y,h as F,g as L,l as U,n as T,o as f,N as h}from"./core-DFhvjgE1.js";import{fB as _,a17 as w,a18 as p,D6 as P,pX as V,a19 as z,D4 as B}from"./zeni-epic-state-DxmmAR38.js";import"./recharts-Co89o1ZO.js";import"./analytics-CsVp7bfq.js";import"./plaid---yWAm21.js";import"./dnd-CR945ANw.js";import"./stripe-cKAAJElX.js";import"./lottie-DgdF8254.js";import"./lexical-CCIwPSwQ.js";import"./pdf-BVKoD2Fp.js";import"./utils-18zApAFM.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]="fcf441b6-6c04-4cad-841f-07336400bbbf",e._sentryDebugIdIdentifier="sentry-dbid-fcf441b6-6c04-4cad-841f-07336400bbbf")}catch{}})();const G=U((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),d.trackInviteEmailClicked("send",s,r,s.length)}e(B())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&d.trackInviteEmailClicked("cancel")}}}))(k),R=()=>{const e=C(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=y((o=>_(o))),c=F(),j=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=y((o=>w(o))),x=u?.firstName!=null?u.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(N,{analytics:d,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:j,currentTenant:r,companyName:D,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=E(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(f,{path:"/",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-VUm8cLbz.js","assets/sentry-xWYlrqHr.js","assets/core-DFhvjgE1.js","assets/zeni-epic-state-DxmmAR38.js","assets/index-Cp-pyxoH.js","assets/mui-DesXezzU.js","assets/analytics-CsVp7bfq.js","assets/utils-18zApAFM.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-FqOIwMdn.js","assets/withTransactionSidePanel-B0GHQzqo.js","assets/useAskAiCfoHostNavButtonProps-DqIFV4k1.js","assets/TransactionDetailScreen-BsrX2MVn.js","assets/decodeURIComponentSafe-Bq1r0pP9.js","assets/useInitialThreadRequest-C8H1eKN2.js","assets/routePaths-CdJe6JYT.js","assets/expenseAutomationHelper-BDz030nC.js","assets/analyticsHelper-DA7cdp8W.js","assets/CompanyPassportScreen-9PIPrJD8.js","assets/MobileAppDrawer-BWD9smko.js","assets/InboxNotificationsProvider-CzhxlkVm.js","assets/useTaskManagerAccess-D4rOKbOu.js","assets/useAiCfoDashboardSuggestedQuestionsChips-Q3fykDPb.js","assets/FeaturePreviewScreen-qqDSfjtg.js","assets/BillPayRoutes-DnJ45sAp.js","assets/AddressScreen-CT-cfyaM.js","assets/DomesticWireDetailScreen-DYRE--Tw.js","assets/BusinessVerificationPageScreen-BE7jNtnW.js","assets/DrawerScreen-Ch4vO2_l.js","assets/SetupPagesScreen-BsaJHNfF.js","assets/BillPayApprovalRoutes-DNrNWIlc.js","assets/ReimbursementApprovalRuleDetailScreen-0HTyN3lV.js","assets/getLocaleForTenant-mARGfLdD.js","assets/ReimbursementRoutes-DflRsfsu.js","assets/ReimbursementApprovalRoutes-GiFApWFb.js","assets/TransactionListRoutes-Coxf-yFa.js","assets/ZeniAccountStatementScreen-BQTVbJHb.js","assets/SettingsRoutes-DBQFuX0Q.js","assets/AccountMappingScreen-BQfmEpLX.js","assets/QBOConnectionScreen-C9YRg79s.js","assets/empty-BUo7eNC4.js","assets/index-BjpjXshH.js","assets/url-BQb6aJ6P.js","assets/index-BaZwiGCV.js","assets/accountMappingHelper-CabpVb3J.js","assets/useEmailConnectResultRefresh-BZTHF4dB.js","assets/ReportsRoutes-B-F2r3lp.js","assets/ChargeCardRoutes-DCXweRlN.js","assets/useChargeCardPusherEvents-D6tT2l3B.js","assets/PeopleRoutes-DvGZoebQ.js","assets/ExpenseAutomationRoutes-OE_lY51d.js","assets/TreasuryRoutes-DkhMbXQx.js","assets/VendorsRoutes-C6LVkVPB.js","assets/pathToGoBack-9ah_vxgB.js","assets/ZeniAccountRoutes-CW0lRnK0.js","assets/AddressRoutes-CdpLMjIu.js","assets/PandLWithForecastRoutes-DzBBzW7r.js","assets/CustomerOnboardingRoutes-D0fsx_NF.js","assets/TransactionDetailRoutes-DvkfSP-r.js","assets/EntityDetailRoutes-D1iT3MPR.js","assets/InvoicingRoutes-B3AeTlOl.js","assets/NotificationRoutes-D0AL5w0Z.js","assets/PerformanceRoutes-9A-lBxuM.js","assets/RewardsRoutes-CSaZHc7K.js","assets/TaskRoutes-wZ3nPlAw.js","assets/TaskListScreen-CmZ7R7x9.js","assets/AiCfoScreen-DqiQxXnW.js","assets/CardsAiCfoScreen-6Ka5bg_s.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as ms,fB as _s,dV as Es,dU as hs,Aj as ps,de as gs,c7 as xs,gG as Rs,g5 as js,db as pe,cF as Is,gj as Ts,cx as As,bE as fs,br as bs,Ts as ys,v as Ds,Tv as Cs,bq as vs,Tw as Os,bK as Ps,bJ as Us,bt as ws,ct as Fs,Tx as Ls,Ty as Vs,d6 as ks,d9 as Hs,d8 as Ss,cE as Bs,cL as Ns,pO as ge,ge as xe,gV as Ms,gg as Re,gI as je,gJ as Ie,gh as Zs}from"./zeni-epic-state-DxmmAR38.js";import{j as e}from"./liveblocks-BY1qt3Nf.js";import{a as U}from"./sentry-xWYlrqHr.js";import{N as u,u as Gs,h as $s,i as zs,g as qs,j as $,q as Te,n as Ys,o as t}from"./core-DFhvjgE1.js";import{P as l,E as Js,u as Ws,z as y,c as Qs,e as Ks,D as Xs,y as M,g as en,Q as sn,V as nn,L as F,G as Ae,t as _,R as tn,S as an,k as ne}from"./index-Cp-pyxoH.js";import"./mui-DesXezzU.js";import{f as fe}from"./analyticsHelper-DA7cdp8W.js";import{t as on}from"./getLocaleForTenant-mARGfLdD.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="e5cefcbc-fe42-430a-823d-1c9331b8d2f6",a._sentryDebugIdIdentifier="sentry-dbid-e5cefcbc-fe42-430a-823d-1c9331b8d2f6")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-VUm8cLbz.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),be=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),D=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:S,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(be,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(be,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):S?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-FqOIwMdn.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-DnJ45sAp.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DflRsfsu.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Coxf-yFa.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-DBQFuX0Q.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-B-F2r3lp.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-DCXweRlN.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-DvGZoebQ.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-OE_lY51d.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DkhMbXQx.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-C6LVkVPB.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CW0lRnK0.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-B-F2r3lp.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-CdpLMjIu.js")),__vite__mapDeps([55,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-DvGZoebQ.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-DzBBzW7r.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-D0fsx_NF.js")),__vite__mapDeps([57,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-C6LVkVPB.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-DvkfSP-r.js")),__vite__mapDeps([58,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-D1iT3MPR.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-FqOIwMdn.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-DnJ45sAp.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),jn=l((()=>s((()=>import("./SettingsRoutes-DBQFuX0Q.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),In=l((()=>s((()=>import("./InvoicingRoutes-B3AeTlOl.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DflRsfsu.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-CW0lRnK0.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-DkhMbXQx.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),fn=l((()=>s((()=>import("./TransactionListRoutes-Coxf-yFa.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),bn=l((()=>s((()=>import("./ChargeCardRoutes-DCXweRlN.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),yn=l((()=>s((()=>import("./NotificationRoutes-D0AL5w0Z.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,11,21,8])))),Dn=l((()=>s((()=>import("./PerformanceRoutes-9A-lBxuM.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-OE_lY51d.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-CSaZHc7K.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-wZ3nPlAw.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,14,19,20,21,65,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-DqiQxXnW.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,22,53,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-6Ka5bg_s.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-VUm8cLbz.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Un=l((()=>s((()=>import("./TaskListScreen-CmZ7R7x9.js").then((a=>a.f))),__vite__mapDeps([65,1,2,3,4,5,6,7,11,19,20,21,8])))),wn=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):S?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Gs(),S=$s(),{tenantEmailDomain:i}=zs(),V=Js().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Ws(),f=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),W=ms(I),z=qs(),[L,we]=U.useState(!1),r=$((o=>_s(o))),{useFeatureGate:B}=Qs(),Z=Ks(),ae=Xs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=B(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=B(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?Es(oe,r):void 0,Q=p==="Completed"||T==="Completed"?hs(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!gs(r):void 0,ke=en(r,Ve,oe),{isCardsHidden:He}=sn(r?.tenantId),Se=!ke||!!He,{isFeatureEnabled:Be}=B(M.isSettingsFeatureEnabled),{isFeatureEnabled:K}=B(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=B(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&xs(r.userRole),q=$((o=>Rs(o)));if(i!=null){const o=y.getSignedInUserTenant(i);I!=null&&o!=null&&fe(I,r,V)}const G={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},ie=js(),h=nn(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=Is(h?.loggedInUserRoleMap),X=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=$((o=>G.tenantId!=null?Ts(o,G.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),U.useEffect((()=>{if(ee!=null&&f!=null){const o=ee.params.selectedPeriod;if(o!=null){const b=o.split("-");if(b.length===2){const d=As(Number(b[0])),n=Number(b[1]),c=fs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=bs();c.isAfter(N,"month")===!1?A(ys(f,{month:d,year:n})):S(`/${i}/month_end_close_checks/review`)}}}}),[ee,f]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,I,A,y]),U.useLayoutEffect((()=>{!Ds(ie,G)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,b,d,n){if(xe(b?.userId,b?.zeniSessionId,o.tenantId),d(Ms(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=y.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,I,A,ze))}),[f]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,b,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const Y=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(Y&&us){H(Re(n));const J=y.getSignedInUserTenantWithId(n);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(je(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Ie(c.userId,n)))}else Y&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(je(c.userId,n))),Y&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Ie(c.userId,n)));if(Y){ne.identify(c.userId,{tenant_id:n});const J=n==null||n!=null&&(b==="Completed"||b==="Error");o==="Completed"||b!=="Not-Started"&&b!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),J&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,f,I,O,A))}),[f,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Cs(q.tenantsBaseInOrder)),I!=null&&fe(I,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,I]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,b=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),b)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:qe}=B(M.isReferralFeatureEnabled),Ye=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Se&&!P,We=Os(h?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,Ke=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Ps(h?.loggedInUserRoleMap),_e=Fe&&!P,Xe=Le&&!P,es=ue&&Us(h?.loggedInUserRoleMap),ss=de&&ws(h?.loggedInUserRoleMap),ns=_e&&Fs(h?.loggedInUserRoleMap),ts=Ls(h?.loggedInUserRoleMap),as=Vs(h?.loggedInUserRoleMap),os=ks(h?.loggedInUserRoleMap),rs=Hs(h?.loggedInUserRoleMap),is=Ss(h?.loggedInUserRoleMap),g=Bs(h?.loggedInUserRoleMap),x=Ns(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&os,j=Xe&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||$e===!0||We===!0||ts===!0||as===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&A(ge(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||W&&!X)&&Ke&&Qe!==!0&&E===!1&&Q===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||X||W?!L||se!==!1||X||W?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ys,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(wn,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:w?e.jsx(Rn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:w?e.jsx(mn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||w?e.jsx(En,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:w?e.jsx(hn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:w&&P===!1||Ye||Je?e.jsx(xn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:w&&P===!1?e.jsx(fn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(Un,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:j?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(Dn,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(Cn,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(yn,{})}),e.jsx(t,{path:"vendors/*",element:Ge?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(jn,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(In,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(bn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:qe?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Pn,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(t,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{D as F,Mn as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-BY1qt3Nf.js";import{a as u,R as x,q as A}from"./sentry-xWYlrqHr.js";import{u as D,h as z,j as c,g as M,N as O,l as j}from"./core-DFhvjgE1.js";import{u as B,z as s,E as P,k as w,G as _,T as F,U as N,W as R,X as V,Y as W,Z as v}from"./index-Cp-pyxoH.js";import{fB as $,Tb as q,Tv as J,ge as X,gg as G,TA as H,gR as Y,df as Z,TB as y,TC as K,TD as Q,b_ as b}from"./zeni-epic-state-DxmmAR38.js";import"./mui-DesXezzU.js";import{u as ee}from"./useDeviceId-BklKiHEX.js";import{f as te}from"./analyticsHelper-DA7cdp8W.js";import{t as ne}from"./getLocaleForTenant-mARGfLdD.js";import"./recharts-Co89o1ZO.js";import"./analytics-CsVp7bfq.js";import"./plaid---yWAm21.js";import"./dnd-CR945ANw.js";import"./stripe-cKAAJElX.js";import"./lottie-DgdF8254.js";import"./lexical-CCIwPSwQ.js";import"./pdf-BVKoD2Fp.js";import"./utils-18zApAFM.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="45f6b459-4edf-487b-bb81-0782a2b6c2cc",t._sentryDebugIdIdentifier="sentry-dbid-45f6b459-4edf-487b-bb81-0782a2b6c2cc")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Q({authCode:n,oauthProvider:a,appType:"web",redirectUri:b(l),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(K(n,a)))},clearSignInError:()=>{t(y())}}}))(W),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=B(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=c((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:T,accountUnlockTime:E}=c((e=>e.tenantState)),p=c((e=>e.tenantState.fetchState)),L=c((e=>e.tenantState.activeTenantFetchState.fetchState)),S=c((e=>e.tenantState.signInState)),o=c((e=>e.tenantState.loggedInUser)),r=c((e=>$(e))),I=c((e=>q(e))),m=M(),h=P().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{k.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[k.fetchState,l]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),X(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,h,void 0,I.tenantsInOrder),Y().then((()=>{const e=V();e!=null&&F(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Z(r.productSettings))}),2e3))}),[S,p,L,o,r,I,h,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),T===!0&&E!=null?f.jsx(R,{onClose:()=>i(y()),unlockDate:E}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BY1qt3Nf.js";import{a as i}from"./sentry-xWYlrqHr.js";import{u as l,g as d,N as u}from"./core-DFhvjgE1.js";import{z as n,k as a,U as m,a7 as p}from"./index-Cp-pyxoH.js";import{gU as g,TR as b}from"./zeni-epic-state-DxmmAR38.js";import{n as y}from"./mui-DesXezzU.js";import"./recharts-Co89o1ZO.js";import"./analytics-CsVp7bfq.js";import"./plaid---yWAm21.js";import"./dnd-CR945ANw.js";import"./stripe-cKAAJElX.js";import"./lottie-DgdF8254.js";import"./lexical-CCIwPSwQ.js";import"./pdf-BVKoD2Fp.js";import"./utils-18zApAFM.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]="b0338428-e161-4fcc-9fb0-9c004b750b3f",e._sentryDebugIdIdentifier="sentry-dbid-b0338428-e161-4fcc-9fb0-9c004b750b3f")}catch{}})();function L(){const e=l(),t=d(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(c){console.error("Error during sign out:",c)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{L as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-BY1qt3Nf.js";import{a as f}from"./sentry-xWYlrqHr.js";import{h as pa,u as Ta,g as fa,k as ga,j as F,i as _a,l as ma}from"./core-DFhvjgE1.js";import{aK as Da,aL as Sa,z as x,c as ba,y as G,as as ha,a8 as Ea,k as ya,U as Aa,e3 as Ca,p as R,a4 as Ga}from"./index-Cp-pyxoH.js";import{fB as Ia,a1e as X,Qm as B,a1f as Y,a1a as Ba,PK as M,a1g as Ka,PS as V,Ps as La,P4 as va,Qn as W,a1h as q,gd as wa,Qd as Ra,Qi as Ua,Q5 as Pa,Q3 as H,Qj as Fa,Q0 as ja,a1i as xa,a1j as $a,a1k as Na,a1l as Oa,a1m as I,dt as Qa,ds as za,a1n as Za,Pp as Ma}from"./zeni-epic-state-DxmmAR38.js";import{n as Va}from"./mui-DesXezzU.js";import{u as Wa}from"./useAskAiCfoHostNavButtonProps-DqIFV4k1.js";import{M as qa}from"./MobileAppDrawer-BWD9smko.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]="32d86920-c6f5-48a3-95ed-e1e36467d7da",e._sentryDebugIdIdentifier="sentry-dbid-32d86920-c6f5-48a3-95ed-e1e36467d7da")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),U=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Xa=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),U(a.assignees)&&(o.assignees=a.assignees),U(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),U(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ya=e=>{if(e==null||typeof e!="object")return null;const a=e;return U(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=Da(),g=f.useRef(n),l=f.useRef(o),_=f.useRef(0);f.useEffect((()=>{g.current=n}),[n]),f.useEffect((()=>{l.current=o}),[o]);const t=f.useMemo((()=>[...a].sort().join("|")),[a]);f.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,b=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[D,S]=Sa(m);if(S==="")return;const E=i.channel(D),y=T=>{g.current(S,T)};let k;if(E?.subscribed===!0){if(k=E,k.bind(S,y),!p.has(D)){p.add(D),b();const T=()=>{b()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{E.unbind(S,y)}))}else{if(k=E??i.subscribe(D),k.bind(S,y),!p.has(D)){p.add(D);const T=()=>{b()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{k.unbind(S,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Va.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,te=ma((function(e,a){const n=X(e,a.isTaskTemplatesEnabled),{taskGroupId:o}=a,i=o!=null&&o!==""?{...n,taskGroupsWithTasksList:n.taskGroupsWithTasksList.map((t=>({...t,tasks:t.tasks.filter((s=>s.taskGroupIds.includes(o)))}))).filter((t=>t.tasks.length>0))}:n,g=Ba(e),l=x.isZeniUser(),_=e.taskDetailState?.subTaskCreateStatus?.fetchState;return{taskListView:i,tagListView:g,localData:i.localData,isTaskTemplatesEnabled:a.isTaskTemplatesEnabled,isZeniUser:l,subTaskCreateStatus:_}}),(function(e,a){const{navigate:n,currentTenant:o,location:i,isTaskTemplatesEnabled:g}=a,{tenantEmailDomain:l}=o,{groupByKey:_}=a.uiState;return{onTaskManagementRowClick:t=>{const s=J(l,t),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{e(B(!0,g))},onTabChange:t=>{e(Oa(t))},onParentTaskClick:t=>{const s=J(l,t);window.open(s,"_blank","noopener")},bulkUpdateTasks:(t,s)=>{e(H(t,null,s))},onNewTaskClick:()=>{if(a.localData.defaultTaskGroupId!=null){const t=j(l,a.localData.defaultTaskGroupId),s=R(i.state?.pathnameStackToGoBack,i.pathname);n(t,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(t,s)=>{e(q({uiState:{sortKey:t,sortOrder:s}}))},onFiltersChange:t=>{e(Na({filters:t}))},onSearchTextChanged:t=>{e($a({searchText:t}))},onReloadCards:()=>{e(B(!0,g))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const t=Ga(i.state?.pathnameStackToGoBack),s=t.poppedPathname??"../";n(s,{state:{pathnameStackToGoBack:t.newStack}})}else n("../")},updateLocalData:t=>{e(xa({localData:t}))},resetLocalData:()=>{e(Y({taskGroupById:a.taskGroupState.taskGroupById}))},handleCreateGroup:t=>{e(ja(a.localData.newTaskGroupName,t))},assignGroupToTasks:t=>{e(H(a.localData.selectedTaskIds,t,Fa(a.uiState.groupByKey,t)))},onDeleteTaskGroup:t=>{e(Pa(t))},onAddNewTaskToTaskGroup:t=>{if(a.localData.defaultTaskGroupId!=null){const s=ne(_,t);e(M({taskDetailLocalData:s}));const p=j(l,a.uiState.groupByKey==="groupName"?t:a.localData.defaultTaskGroupId),b=R(i.state?.pathnameStackToGoBack,i.pathname);n(p,{state:{pathnameStackToGoBack:b,message:"comingFromTaskListPage"}})}},onDragNDrop:(t,s)=>{e(Ua(a.localData.selectedTaskIds.length>0?a.localData.selectedTaskIds:[t],s))},onTaskGroupRename:(t,s)=>{e(Ra(t,s))},onTimeSpentUpdate:(t,s)=>{e(W({task:t,updates:s}))},onShowToast:t=>{e(wa(t))},onGroupByFilterChange:t=>{e(q({uiState:{groupByKey:t}}))},updateTask:(t,s)=>{e(W({task:t,updates:s}))},onCreateTagClick:(t,s)=>{e(va(t,s))},onSubtaskCreation:(t,s)=>{e(La({...s,parentTaskId:t}))},handleGroupTemplateClick:t=>{e(V(t,[]))},handleGroupTemplateTaskClick:(t,s)=>{e(V(t,[s]))},handleNewTaskInitialization:t=>{if(e(M({taskDetailLocalData:{...Ka,name:t}})),a.localData.defaultTaskGroupId!=null){const s=j(l,a.localData.defaultTaskGroupId),p=R(i.state?.pathnameStackToGoBack,i.pathname);n(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:t=>{n(`/${l}/tasks/group/${t}`)},onQuickResponsesClick:()=>{n(`/${l}/tasks/quick-responses`)}}}))(Ca);function se(){const e=pa(),a=Ta(),n=fa(),o=x.getSignedInUser(),i=x.isZeniUser(),g=ga(),l=F((u=>Ia(u))),{taskGroupId:_}=_a(),{useFeatureGate:t}=ba(),{isFeatureEnabled:s}=t(G.isTaskTemplatesEnabled),{isFeatureEnabled:p}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:b}=t(G.isTaskCategorizationEnabled),{isFeatureEnabled:m}=t(G.isTaskBulkResolutionEnabled),{isFeatureEnabled:D}=t(G.isTaskGroupAssigneesEnabled),{isFeatureEnabled:S}=t(G.isTaskRecurringParentEnabled),[E,y]=f.useState(!1),k=F((u=>X(u,s))),T=F((u=>u.taskGroupState)),K=k.fetchState,{isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea}=Wa({mobileExploreReferrer:"Task Checklist"});ha({isDataReady:K==="Completed"}),f.useEffect((()=>{a(B(!1,s))}),[l?.tenantId,a,s]);const ta=f.useMemo((()=>{const u=[c.TASK_CREATED,c.TASK_UPDATED,c.TASKS_BULK_UPDATED,c.TASKS_BULK_DELETED],A=[c.TASK_CREATED,c.TASK_UPDATED,c.TASK_SNOOZE_RESURFACED,c.TASKS_BULK_UPDATED];return[...Ha(l?.companyId,u),...Ja(o?.userId,A)]}),[l?.companyId,o?.userId]);if(ae({events:ta,onEvent:(u,A)=>{switch(u){case c.TASK_CREATED:case c.TASK_UPDATED:{const r=Xa(A);if(r!=null){const w=g.getState(),$=r.task_id,h=$!=null?w.taskState.taskByID?.[$]:void 0,P=h!=null;if(!i)if(r.is_private===!0){if(!P)return}else{const L=o?.userId,v=new Set([...r.assignees??[],...r.direct_assignees??[]]);if(r.created_by!=null&&r.created_by!==""&&v.add(r.created_by),!(L!=null&&v.has(L))&&!P)return}if(u===c.TASK_UPDATED&&P&&h!=null&&Array.isArray(r.task_group_ids)){const L=new Set(Object.values(w.taskGroupState.taskGroupById??{}).filter((d=>d!=null&&!d.isDeleted)).map((d=>d.id))),v=(h.taskGroupIds??[]).filter((d=>L.has(d))),N=(r.task_group_ids??[]).filter((d=>L.has(d))),sa=v.length===N.length&&v.every((d=>N.includes(d))),O=h.taskGroupIds??[],Q=r.task_group_ids??[],na=O.length!==Q.length||!O.every((d=>Q.includes(d))),oa=(d,da)=>{const z=d??[],Z=da??[];if(z.length!==Z.length)return!1;const ca=new Set(Z);return z.every((ka=>ca.has(ka)))},ra=r.name==null||r.name===h.name,ia=r.is_private==null||r.is_private===h.isPrivate,la=r.assignees==null||oa(r.assignees,h.assignees),ua=r.direct_assignees==null;if(sa&&na&&ra&&ia&&la&&ua)return}}return void a(B(!0,s))}case c.TASKS_BULK_DELETED:{const r=Ya(A);return r==null?void 0:void r.task_ids.forEach((w=>a(Ma(w))))}case c.TASKS_BULK_UPDATED:case c.TASK_SNOOZE_RESURFACED:return void a(B(!0,s))}},onSubscribed:()=>{a(B(!0,s))}}),f.useEffect((()=>{K==="Completed"&&a(Y({taskGroupById:T.taskGroupById}))}),[K,T.taskGroupById]),o==null)throw Error("Can't access task list page without signing in...");return C.jsxs(C.Fragment,{children:[K==="Completed"?C.jsx(Ea,{analytics:ya,onLoad:u=>(A=>A.trackPageLoaded(Aa.Event.taskListPage))(u)}):null,C.jsxs(ee,{children:[C.jsx(qa,{isAppContentDrawerOpen:E,handleDrawerToggle:u=>{y(u)}}),C.jsx(te,{location:n,navigate:e,currentTenant:l,taskGroupId:_,taskGroupState:T,localData:k.localData,uiState:k.uiState,isTaskTemplatesEnabled:s,taskListFetchState:K,isTaskCategorizationEnabled:b,isTaskCannedResponsesEnabled:p,isTaskBulkResolutionEnabled:m,isTaskGroupAssigneesEnabled:D,isTaskRecurringParentEnabled:S,isAiCfoAccessEnabled:aa,onAskAiCfoClick:ea})]})]})}const J=(e,a)=>`/${e}/tasks/${encodeURIComponent(a)}`,j=(e,a)=>`/${e}/tasks/new/${a}`,ne=(e,a)=>{if(e==="assignee"){const n=a.split(",");return{...I.taskDetailLocalData,assignee:n}}if(e==="priority"){const n=Qa(a);return{...I.taskDetailLocalData,priority:n}}if(e==="status"){const n=za(a);return{...I.taskDetailLocalData,status:n}}if(e==="tag"){const n=a.split(",");return{...I.taskDetailLocalData,tagIds:n}}if(e==="dueDate"){const n=Za(a);return{...I.taskDetailLocalData,dueDate:n}}return{...I.taskDetailLocalData}},Te=Object.freeze(Object.defineProperty({__proto__:null,default:se},Symbol.toStringTag,{value:"Module"}));export{c as T,Ja as a,Ha as b,Ya as c,Xa as d,se as e,Te as f,pe as t,ae as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-BY1qt3Nf.js";import i from"./NotFoundScreen-VUm8cLbz.js";import{T as r}from"./TransactionDetailScreen-BsrX2MVn.js";import"./sentry-xWYlrqHr.js";import{n as a,o}from"./core-DFhvjgE1.js";import"./zeni-epic-state-DxmmAR38.js";import"./recharts-Co89o1ZO.js";import"./index-Cp-pyxoH.js";import"./mui-DesXezzU.js";import"./analytics-CsVp7bfq.js";import"./plaid---yWAm21.js";import"./dnd-CR945ANw.js";import"./stripe-cKAAJElX.js";import"./lottie-DgdF8254.js";import"./lexical-CCIwPSwQ.js";import"./pdf-BVKoD2Fp.js";import"./utils-18zApAFM.js";import"./useAskAiCfoHostNavButtonProps-DqIFV4k1.js";import"./decodeURIComponentSafe-Bq1r0pP9.js";import"./useInitialThreadRequest-C8H1eKN2.js";import"./routePaths-CdJe6JYT.js";import"./expenseAutomationHelper-BDz030nC.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]="9520d72a-46e5-44e2-9697-a97671635162",e._sentryDebugIdIdentifier="sentry-dbid-9520d72a-46e5-44e2-9697-a97671635162")}catch{}})();function z(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{z as default};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-BY1qt3Nf.js";import{a as f}from"./sentry-xWYlrqHr.js";import{i as R,u as Y,h as G,g as K,j as m,l as J,n as at,o as B,N as $}from"./core-DFhvjgE1.js";import{U_ as Yt,U$ as zt,lX as Q,rP as Kt,r$ as qt,sh as Wt,sf as Ht,si as Qt,sl as Zt,V0 as Xt,fB as L,V1 as Ee,V2 as Me,gX as te,cA as be,cB as Ie,Ew as St,V3 as nt,EA as ea,Sn as ae,Eu as ta,Eo as aa,V4 as Ge,Eg as na,Ef as sa,Ea as oa,El as la,EB as ia,V5 as ue,V6 as Je,Eh as ca,V7 as he,gL as ft,ER as gt,EK as vt,V8 as xt,rV as Tt,EE as yt,EC as Ct,V9 as Dt,EY as Et,EV as bt,EF as It,EX as $e,QO as kt,Va as da,Vb as ra,cD as ua,Vc as ha,Vd as pa,Ve as pe,Vf as ie,Vg as ke,So as Ye,Fb as Te,Sm as ye,E_ as wt,Ex as ze,Vh as ma,Sp as W,Vi as Ke,Er as Sa,Vj as fa,Vk as ga,Vl as qe,Vm as We,Vn as He,Vo as Qe,F5 as we,Vp as At,EO as Vt,Vq as va,Vr as xa,Vs as Ta,Vt as ya,Vu as Ca,Vv as Da,Vw as Ea,Vx as ba,BH as Ia,BP as ka,BI as wa,Ru as Fe,Vy as Aa,Vz as Va,lb as Pe,br as ja,VA as Fa,VB as Pa,mV as _a,n2 as La,Rt as _e,bE as st,VC as jt,R4 as Ft,VD as Ba,VE as Oa,VF as Ra,n4 as Ua,VG as ot,VH as lt,VI as it,VJ as ct,VK as Na,n0 as Ma,VL as Ga,n3 as Ja,VM as $a,VN as Pt,RP as _t,mj as Ya,VO as za,VP as Le,VQ as Lt,RN as Bt,Hw as Ka,VR as qa,VS as Wa,mD as Ot,VT as Ha,VU as Qa,R$ as Za,uD as Xa,VV as Rt,VW as dt,RY as Be,VX as rt,VY as en,S1 as tn,VZ as an,V_ as nn,V$ as sn,W0 as on,W1 as ln,uG as cn,W2 as dn,Sq as rn,TZ as un,RG as Oe,i7 as hn,T$ as pn,T_ as mn,i5 as Sn,W3 as fn,W4 as gn,HB as vn,W5 as xn,W6 as Tn,W7 as yn,W8 as Cn,mn as Dn,bn as En,dV as bn,dU as In}from"./zeni-epic-state-DxmmAR38.js";import{a4 as Ce,aM as Ae,aN as kn,z as U,j as Re,a7 as Ut,a8 as X,k as V,av as ee,aO as wn,p as M,G as De,M as ce,aP as An,aQ as Vn,aR as jn,E as Fn,a1 as de,ab as Ze,c as ne,y as z,aS as Pn,Z as Xe,as as me,aT as _n,aU as Nt,aq as Ln,aV as Bn,V as On,aW as Rn,ae as Mt,aX as Un,N as Z,a9 as Nn,af as Gt,ag as Mn,aY as Gn,aZ as Jn,U as et,a_ as $n,a$ as Yn,a3 as zn,b0 as Kn,b1 as qn}from"./index-Cp-pyxoH.js";import{n as N,D as Wn,S as Jt}from"./mui-DesXezzU.js";import{t as Hn,A as Qn}from"./AddressScreen-CT-cfyaM.js";import H from"./NotFoundScreen-VUm8cLbz.js";import{F as Zn}from"./FeaturePreviewScreen-qqDSfjtg.js";import{p as Xn}from"./pathToGoBack-9ah_vxgB.js";import{c as q,v as tt,d as es}from"./routePaths-CdJe6JYT.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DqIFV4k1.js";import{M as fe}from"./MobileAppDrawer-BWD9smko.js";import{D as ts}from"./DrawerScreen-Ch4vO2_l.js";import{a as as,m as ns}from"./accountMappingHelper-CabpVb3J.js";import"./recharts-Co89o1ZO.js";import"./analytics-CsVp7bfq.js";import"./plaid---yWAm21.js";import"./dnd-CR945ANw.js";import"./stripe-cKAAJElX.js";import"./lottie-DgdF8254.js";import"./lexical-CCIwPSwQ.js";import"./pdf-BVKoD2Fp.js";import"./utils-18zApAFM.js";import"./InboxNotificationsProvider-CzhxlkVm.js";import"./useTaskManagerAccess-D4rOKbOu.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]="d26b4b22-caa5-4e3e-9441-00cfe0786269",e._sentryDebugIdIdentifier="sentry-dbid-d26b4b22-caa5-4e3e-9441-00cfe0786269")}catch{}})();function ss(){const{accrualId:e}=R(),a=Y(),s=G(),t=K(),{accrual:n,actionFetchState:o,detailFetchState:d,localData:i}=m((c=>Yt(c,e??""))),u=m((c=>zt(c))),h=m((c=>Q(c))),S=f.useCallback((()=>{const c=Ce(t.state?.pathnameStackToGoBack);s(c.poppedPathname??Xn(4),{state:{pathnameStackToGoBack:c.newStack}})}),[t.state,s]),r=f.useRef(!1);return f.useEffect((()=>{o.fetchState!=="In-Progress"&&r.current&&o.fetchState==="Completed"&&(r.current=!1,S())}),[o.fetchState,S]),f.useEffect((()=>{e!=null&&n==null&&d.fetchState==="Not-Started"&&a(Kt(e))}),[e,n,d.fetchState]),f.useEffect((()=>{a(qt({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[a]),e==null?l.jsx(H,{}):n==null?d.fetchState==="Not-Started"||d.fetchState==="In-Progress"?l.jsx(Ae,{}):l.jsx(H,{}):l.jsx(kn,{accrual:n,actionFetchState:o.fetchState,isAccountingClassesEnabled:h,localData:i,newAccrualAccountsView:u,onAccrualFormChange:(c,p)=>{a(Xt({accrualId:c,localData:p}))},onAccrualFormClear:c=>{a(Zt({accrualId:c}))},onApproveAndPost:c=>{a(Qt(e,c))},onNavigateBack:S,onRevert:(c,p)=>{r.current=!0,a(Ht(e,c,p))},onSkip:(c,p)=>{a(Wt(e,c,p))}})}const os=De.getLocalizedStrings(),ls=J((function(e,a){const s=Me(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}}),(function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(ea()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,d=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:d}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(wn),is=({setShouldNavigateBack:e})=>{const a=G(),s=K(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const d=m((g=>L(g))),i=Ee(o)??"accrued_expenses",u=U.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const h=m((g=>Me(g,i))),S=h.selectedJELinkRowIndex,r=m((g=>te(g,d.companyId))),c=Re(h.updateStatus.fetchState);f.useEffect((()=>{c==="In-Progress"&&h.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})}),[c,h.updateStatus.fetchState]),f.useEffect((()=>{h.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]),f.useEffect((()=>{h.selectedJEAccruedSchedule!=null&&h.selectedJELinkRowIndex!=null||a("..",{relative:"path"})}),[h.selectedJEAccruedSchedule,h.selectedJELinkRowIndex]);const p=h.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:h.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:h.linkBillExpenseView.fetchState}):h.selectedJEAccruedSchedule!=null&&S!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(X,{analytics:V,onLoad:()=>{cs(h,i,r)}}):null,l.jsx(ls,{signedInUser:u,attachmentEndPoint:`${ee}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:h.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:h,saveFetchState:h.updateStatus.fetchState,scheduleTab:i,navigate:a,analytics:V,controllerUserDetails:r,saveStatus:h.updateStatus.fetchState,jeAccruedSchedule:h.selectedJEAccruedSchedule,localData:h.scheduleAccruedDetailsLocalData.jeScheduleDetails[S]})]}):null})},$t=e=>{const a=os.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},cs=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:d}=e.linkBillExpenseView,i=d.some((S=>S.isRecommendedTransaction===!0)),u=be(s.controllers),h=Ie(s.controllerUserIds);t!=null&&V.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:i,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:h})},ds=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 0 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,rs=J((function(e){const a=L(e),s=e.entityAutoCompleteState.autoCompleteText.common,t=Ge(e,"common");return{tenantName:a.companyName,vendorSearchAutoCompleteData:{autoCompleteText:s,entityAutoCompleteView:t}}}),(function(e,a){const{navigate:s,location:t}=a,n="accrued_expenses";return{onNavigateBack:()=>{const o=Ce(t.state?.pathnameStackToGoBack);o.poppedPathname==null?s("../schedules/accrued_expenses"):s(o.poppedPathname,{state:{pathnameStackToGoBack:o.newStack}})},onZeniLogoClick:()=>{a.themeState.toggle()},onSave:o=>{a.setShouldNavigateBack(!0),e(St(n,o))},onDelete:o=>{e(ca(n,o))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,d)=>{o.trim().length>=2?e(Je({searchString:o,entityType:d,searchOrigin:"common"})):o.trim().length===0&&e(ue("common"))},onCancelAutoComplete:()=>{e(ue("common"))}},onEditAmount:(o,d)=>{e(ia(n,o,d))},onJELinkClick:o=>{e(la({selectedJELinkRowIndex:o})),s("./edit_link")},onCancelAccrual:(o,d,i)=>{e(oa(o,d,i))},onTransactionClick:o=>{const d=`${q(o,a.tenantEmailDomain)}`,i=M(t.state?.pathnameStackToGoBack,t.pathname);s(d,{state:{pathnameStackToGoBack:i}})},onViewPostedJE:o=>{const d=`${q(o,a.tenantEmailDomain)}`,i=M(t.state?.pathnameStackToGoBack,t.pathname);s(d,{state:{pathnameStackToGoBack:i}})},onViewRecordedJE:o=>{const d=`${q(o,a.tenantEmailDomain)}`,i=M(t.state?.pathnameStackToGoBack,t.pathname);s(d,{state:{pathnameStackToGoBack:i}})},onViewBillExpense:o=>{const d=`${q(o,a.tenantEmailDomain)}`,i=M(t.state?.pathnameStackToGoBack,t.pathname);s(d,{state:{pathnameStackToGoBack:i}})},onDetailPageChange:(o,d,i)=>{const{scheduleDetailsAccruedExpensesSection:u}=o,{amount:h,memo:S,months:r,scheduleAccruedExpenseCategory:c,scheduleClass:p,scheduleExpenseCategory:g,startDate:y,vendor:x}=u,b=p.selectedOption!=null?a.classList.find((I=>I.classId===p.selectedOption)):void 0,D=g.selectedOption!=null?a.accountList.find((I=>I.qboId===g.selectedOption)):void 0,E=c.selectedOption!=null?a.accruedAccountList.find((I=>I.qboId===c.selectedOption)):void 0,w=r?.selectedOption;e(na({scheduleType:n,localData:d,selectedJeScheduleDetailId:a.scheduleDetailId})),i!==!1||a.scheduleDetailId!=null||D?.accountId==null||a.isAccountingClassesEnabled!==!1&&b?.classId==null||E==null||x.selectedOption==null||S==null||h==null&&h==0||y==null||w==null||e(sa({scheduleType:n}))}}}))(An),us=({shouldNavigateBack:e,setShouldNavigateBack:a})=>{const s=G(),t=K(),n=Y(),o=ce(),{tenantEmailDomain:d}=R(),[i,u]=f.useState(!1);if(d==null)throw new Error("Can't access this page without a tenantEmailDomain");const{scheduleDetailId:h}=R();let S;h!=="new"&&(S=h);const r=hs(h),c=m((C=>C.scheduleAccruedDetailState.selectedJEAccruedScheduleKey)),p="accrued_expenses",g=m((C=>Me(C,"accrued_expenses"))),y=m((C=>ae(C))),x=m((C=>C.classListState.fetchState)),b=m((C=>Q(C))),D=y!=="Completed"||x!=="Completed";f.useEffect((()=>{i===!1&&D?(n(ta(p,S)),u(!0)):D===!1&&i===!1&&h!=="new"&&(n(aa(p,h)),u(!0))}),[i]);const E=m((C=>L(C))),w=m((C=>te(C,E.companyId))),I=g.fetchState,k=g.allAccountList,F=g.allClassList,j=g.allAccruedAccountList,_=g.scheduleAccruedDetailsLocalData;if(r!==!0||g.fetchState==="Error")return l.jsx(H,{});const A=I==="Completed"&&i===!0;return I!=="Completed"&&I!=="Not-Started"?l.jsx(Ae,{}):l.jsxs(ds,{children:[A===!0?l.jsx(X,{analytics:V,onLoad:()=>{ps(g,p,w)}}):null,l.jsx(rs,{setShouldNavigateBack:a,scheduleAccruedDetailsView:g,location:t,navigate:s,classList:F,accountList:k,shouldNavigateBack:e,accruedAccountList:j,scheduleLocalData:_,selectedJEScheduleKey:c,scheduleDetailId:S,selectedScheduledJournalEntries:g.selectedJEAccruedSchedule?.scheduledJournalEntry??[],themeState:o,tenantEmailDomain:d,analytics:V,controllerUserDetails:w,isAccountingClassesEnabled:b,status:g.selectedJEAccruedSchedule?.status.code})]})},hs=e=>e!=null,ps=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=be(s.controllers),o=Ie(s.controllerUserIds);t!=null&&V.trackScheduleAccruedDetailsLoaded({scheduleType:a,scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},schedule:{...$t(t)},vendorName:t.vendor.name??null,controllerEmails:n,controllerUserIds:o})},ms=N.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 0 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,Ue=De.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Ss=J((function(e){const a=L(e),s=he(e,"fixed_assets");return{tenantName:a.companyName,scheduleDetailsView:s}}),(function(e,a){const{navigate:s,location:t,vendorSearchAutoCompleteData:n,selectedScheduledJournalEntries:o}=a,d="fixed_assets",i=o.flatMap((u=>u.error)).filter((u=>!!u))??[];return{onNavigateBack:()=>{const u=Ce(a.location.state?.pathnameStackToGoBack);u.poppedPathname==null?s("../schedules/fixed_assets"):a.navigate(u.poppedPathname,{state:{pathnameStackToGoBack:u.newStack}})},onZeniLogoClick:()=>{a.themeState.toggle()},onSave:u=>{e($e(d,u,i.length>0))},onDelete:u=>{e(It(d,u))},onMarkAsComplete:()=>{a.selectedJEScheduleKey!=null&&e(bt(d,a.selectedJEScheduleKey))},onEditAmount:(u,h)=>{e(Et(d,u,h))},onJELinkClick:u=>{e(Dt({selectedJELinkRowIndex:u})),s("./edit_link")},onTransactionClick:u=>{const h=`${q(u,a.tenantEmailDomain)}`,S=M(t.state?.pathnameStackToGoBack,t.pathname);s(h,{state:{pathnameStackToGoBack:S,message:"comingFromScheduleDetailsFixedAssets"}})},onViewLinkedJE:u=>{const h=`${q(u,a.tenantEmailDomain)}`,S=M(t.state?.pathnameStackToGoBack,t.pathname);s(h,{state:{pathnameStackToGoBack:S}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(u,h)=>{u.trim().length>=2?e(Je({searchString:u,entityType:h,searchOrigin:"common"})):u.trim().length===0&&e(ue("common"))},onCancelAutoComplete:()=>{e(ue("common"))}},onDetailPageChange:(u,h)=>{const{scheduleDetailsFixedAssetsSection:S,scheduleDetailsListSection:r}=u,{scheduleClass:c,scheduleExpenseCategory:p,accumulatedDepreciationCategory:g,assetId:y,months:x,startDate:b,postingDate:D,vendor:E}=S,w=n.entityAutoCompleteView.vendor.length>0?n.entityAutoCompleteView.vendor.find((v=>v.id===E?.selectedOption)):void 0,I={id:w?.zeniId??E?.selectedOption??"",name:w?.name??E?.defaultOptions.find((v=>v.value===E?.selectedOption))?.label??"",logo:w?.logo},k=c.selectedOption!=null?a.classList.find((v=>v.classId===c.selectedOption)):void 0,F=p.selectedOption!=null?a.accountList.find((v=>v.qboId===p.selectedOption)):void 0,j=g.selectedOption!=null?a.depAccountList.find((v=>v.qboId===g.selectedOption)):void 0,_=x?.selectedOption,A=r.map(((v,T)=>({...a.scheduleLocalData.jeScheduleDetails[T],amount:{...a.scheduleLocalData.jeScheduleDetails[T].amount,amount:v.amount}}))),C=D.type==="day"?D.dayOfMonth?D.dayOfMonth:1:void 0,P=D.type==="lastDayOfMonth"||void 0;e(yt({scheduleType:d,localData:{selectedAccount:F?.accountId,selectedClass:k?.classId,selectedAccumulatedDepreciationCategory:j?.accountId,selectedDate:b,selectedMonths:_,assetId:y,jeScheduleDetails:A,lastDayOfMonth:P,selectedDayOfMonth:C,selectedVendor:I},selectedJeScheduleDetailId:a.scheduleDetailId})),h!==!1||j?.accountId==null||a.scheduleDetailId!=null&&a.status!=="draft"&&a.status!=="marked_as_completed"||F?.accountId==null||a.isAccountingClassesEnabled!==!1&&k?.classId==null||b==null||_==null||P!==!0&&C==null||e(Ct({scheduleType:d}))}}}))(Vn),fs=()=>{const e=G(),a=K(),s=Y(),t=ce(),{tenantEmailDomain:n}=R(),[o,d]=f.useState(!1),{scheduleDetailId:i}=R(),u=a.state?.message==="expenseAutomation",h=gs(i),S=m((v=>v.scheduleDetailState.selectedJEScheduleKey));f.useEffect((()=>{S!=null&&S.length!==0||i!=="new"||e("../schedules/fixed_assets")}),[S,i]);const r="fixed_assets",c=m((v=>he(v,r))),p=m((v=>v.entityAutoCompleteState.autoCompleteText.common)),g=m((v=>Ge(v,"common"))),y=m((v=>ae(v))),x=m((v=>v.classListState.fetchState)),b=m((v=>Q(v))),D=m((v=>ft(v).selectedPeriod)),E=y!=="Completed"||x!=="Completed";f.useEffect((()=>{o===!1&&E?(s(gt(r,C,!0)),d(!0)):E===!1&&o===!1&&(s(vt(r,i==="new"?void 0:i,!0)),d(!0))}),[o]),f.useEffect((()=>{if(c.markAsCompleteStatus.fetchState==="Completed")if(s(xt()),u===!0){const{month:v,year:T}=D;e(`../../month_end_close_checks/review/je_schedules/${v}-${T}`)}else e("../schedules/fixed_assets")}),[c.markAsCompleteStatus.fetchState]);const w=m((v=>L(v))),I=m((v=>te(v,w.companyId))),k=c.fetchState,F=c.allAccountList,j=c.allClassList,_=c.allDepreciationAccountList,A=c.scheduleDetailsLocalData.fixed_assets;let C;if(i!=="new"&&(C=i),h!==!0||c.fetchState==="Error")return l.jsx(H,{});const P=k==="Completed"&&o===!0;return k!=="Completed"?l.jsx(Ae,{}):l.jsxs(ms,{children:[P===!0?l.jsx(X,{analytics:V,onLoad:()=>{xs(c,r,I)}}):null,l.jsx(Ss,{location:a,navigate:e,classList:j,vendorSearchEntityAutoCompleteView:g,vendorSearchAutoCompleteData:{autoCompleteText:p,entityAutoCompleteView:g},expenseAutomationSelectedPeriod:D,usedInExpenseAutomation:u,removeJeScheduleTransactionKey:(v,T)=>{s(Tt(v,T))},accountList:F,depAccountList:_,scheduleLocalData:A,selectedJEScheduleKey:S,scheduleDetailId:C,selectedScheduledJournalEntries:c.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:t,tenantEmailDomain:n,analytics:V,controllerUserDetails:I,isAccountingClassesEnabled:b,status:c.selectedJEScheduleTransaction?.status.code})]})},gs=e=>e!=null,vs=e=>({transactionDate:e.date.format(Ue),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),xs=(e,a,s)=>{const t=e.selectedJEScheduleTransaction?.baseTransaction,n=e.selectedJEScheduleTransaction,o=be(s.controllers),d=Ie(s.controllerUserIds);var i;t!=null&&n!=null&&V.trackScheduleDetailsLoaded({scheduleType:a,transaction:{...vs(t)},scheduleExpenseCategoryAndClass:{expenseCategory:n.jeDebit.account?.accountName??null,expenseClass:n.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(i=n,{currentBalance:i.balanceAsOfToday??null,currentStatus:i.status.label,period:i.period??null,startMonth:i.startDate?.format(Ue)??null,endMonth:i.endDate?.format(Ue)??null})},vendorName:n.vendor.name??null,fixedAssetsDetails:{accumulatedDepreciationCategory:n.jeCredit.account?.accountName??null,assetId:n.otherAttributes.assetId??null},controllerEmails:o,controllerUserIds:d})},Ts=N.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 0 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Ne=De.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,ys=J((function(e,a){const s=L(e),t=he(e,a.scheduleTab);return{tenantName:s.companyName,scheduleDetailsView:t}}),(function(e,a){const{navigate:s,location:t,vendorSearchAutoCompleteData:n,selectedScheduledJournalEntries:o}=a,d=o.flatMap((i=>i.error)).filter((i=>!!i))??[];return{onNavigateBack:()=>{const i=Ce(a.location.state?.pathnameStackToGoBack);i.poppedPathname==null?s("../schedules/prepaid_expenses"):a.navigate(i.poppedPathname,{state:{pathnameStackToGoBack:i.newStack}})},onZeniLogoClick:()=>{a.themeState.toggle()},onSave:i=>{e($e(a.scheduleTab,i,d.length>0))},onDelete:i=>{e(It(a.scheduleTab,i))},onMarkAsComplete:()=>{a.selectedJEScheduleKey!=null&&e(bt(a.scheduleTab,a.selectedJEScheduleKey))},onEditAmount:(i,u)=>{e(Et(a.scheduleTab,i,u))},onJELinkClick:i=>{e(Dt({selectedJELinkRowIndex:i})),s("./edit_link")},onTransactionClick:i=>{const u=`${q(i,a.tenantEmailDomain)}`,h=M(t.state?.pathnameStackToGoBack,t.pathname);s(u,{state:{pathnameStackToGoBack:h,message:"comingFromScheduleDetails"}})},onViewLinkedJE:i=>{const u=`${q(i,a.tenantEmailDomain)}`,h=M(t.state?.pathnameStackToGoBack,t.pathname);s(u,{state:{pathnameStackToGoBack:h}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,u)=>{i.trim().length>=2?e(Je({searchString:i,entityType:u,searchOrigin:"common"})):i.trim().length===0&&e(ue("common"))},onCancelAutoComplete:()=>{e(ue("common"))}},onDetailPageChange:(i,u)=>{const{scheduleDetailsSection:h,scheduleDetailsListSection:S}=i,{scheduleClass:r,scheduleExpenseCategory:c,months:p,startDate:g,postingDate:y,vendor:x}=h,b=n.entityAutoCompleteView.vendor.length>0?n.entityAutoCompleteView.vendor.find((A=>A.id===x?.selectedOption)):void 0,D={id:b?.zeniId??x?.selectedOption??"",name:b?.name??x?.defaultOptions.find((A=>A.value===x?.selectedOption))?.label??"",logo:b?.logo},E=r.selectedOption!=null?a.classList.find((A=>A.classId===r.selectedOption)):void 0,w=c.selectedOption!=null?a.accountList.find((A=>A.qboId===c.selectedOption)):void 0,I=p?.selectedOption,k=S.map(((A,C)=>({...a.scheduleLocalData.jeScheduleDetails[C],amount:{...a.scheduleLocalData.jeScheduleDetails[C].amount,amount:A.amount}}))),F=y.type==="day"?y.dayOfMonth?y.dayOfMonth:1:void 0,j=y.type==="lastDayOfMonth"||void 0,_={selectedAccount:w?.accountId,selectedClass:E?.classId,selectedDate:g,selectedMonths:I,jeScheduleDetails:k,lastDayOfMonth:j,selectedVendor:D,selectedDayOfMonth:F};e(yt({scheduleType:a.scheduleTab,localData:_,selectedJeScheduleDetailId:a.scheduleDetailId})),u!==!1||a.scheduleDetailId!=null&&a.status!=="draft"&&a.status!=="marked_as_completed"||w?.accountId==null||a.isAccountingClassesEnabled!==!1&&E?.classId==null||g==null||I==null||j!==!0&&F==null||e(Ct({scheduleType:a.scheduleTab}))}}}))(jn),Cs=()=>{const e=G(),a=K(),s=Y(),t=ce(),{tenantEmailDomain:n}=R(),[o,d]=f.useState(!1),i=a.state?.message==="expenseAutomation",{scheduleType:u,scheduleDetailId:h}=R(),S=Ds(u,h),r=m((v=>v.scheduleDetailState.selectedJEScheduleKey));f.useEffect((()=>{r!=null&&r.length!==0||h!=="new"||e("../schedules/prepaid_expenses")}),[r,h]);const c=Ee(u)??"prepaid_expenses",p=m((v=>he(v,c))),g=m((v=>v.entityAutoCompleteState.autoCompleteText.common)),y=m((v=>Ge(v,"common"))),x=m((v=>ae(v))),b=m((v=>v.classListState.fetchState)),D=m((v=>Q(v))),E=m((v=>ft(v).selectedPeriod)),w=x!=="Completed"||b!=="Completed";f.useEffect((()=>{o===!1&&w?(s(gt(c,C,!0)),d(!0)):w===!1&&o===!1&&(s(vt(c,h==="new"?void 0:h,!0)),d(!0))}),[o]),f.useEffect((()=>{if(p.markAsCompleteStatus.fetchState==="Completed")if(s(xt()),i===!0){const{month:v,year:T}=E;e(`../../month_end_close_checks/review/je_schedules/${v}-${T}`)}else e("../schedules/prepaid_expenses")}),[p.markAsCompleteStatus.fetchState]);const I=m((v=>L(v))),k=m((v=>te(v,I.companyId))),F=p.fetchState,j=p.allAccountList,_=p.allClassList,A=p.scheduleDetailsLocalData;let C;if(h!=="new"&&(C=h),S!==!0||p.fetchState==="Error")return l.jsx(H,{});const P=F==="Completed"&&o===!0;return F!=="Completed"?l.jsx(Ae,{}):l.jsxs(Ts,{children:[P===!0?l.jsx(X,{analytics:V,onLoad:()=>{bs(p,c,k)}}):null,l.jsx(ys,{location:a,vendorSearchEntityAutoCompleteView:y,vendorSearchAutoCompleteData:{autoCompleteText:g,entityAutoCompleteView:y},usedInExpenseAutomation:i,removeJeScheduleTransactionKey:(v,T)=>{s(Tt(v,T))},expenseAutomationSelectedPeriod:E,navigate:e,classList:_,accountList:j,scheduleLocalData:A[c],selectedJEScheduleKey:r,scheduleDetailId:C,selectedScheduledJournalEntries:p.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:t,tenantEmailDomain:n,scheduleTab:c,analytics:V,controllerUserDetails:k,isAccountingClassesEnabled:D,status:p.selectedJEScheduleTransaction?.status.code})]})},Ds=(e,a)=>Ee(e)!=null&&a!=null,Es=e=>({transactionDate:e.date.format(Ne),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),bs=(e,a,s)=>{const t=e.selectedJEScheduleTransaction?.baseTransaction,n=e.selectedJEScheduleTransaction,o=be(s.controllers),d=Ie(s.controllerUserIds);var i;t!=null&&n!=null&&V.trackScheduleDetailsLoaded({scheduleType:a,transaction:{...Es(t)},scheduleExpenseCategoryAndClass:{expenseCategory:n.jeDebit.account?.accountName??null,expenseClass:n.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(i=n,{currentBalance:i.balanceAsOfToday??null,currentStatus:i.status.label,period:i.period??null,startMonth:i.startDate?.format(Ne)??null,endMonth:i.endDate?.format(Ne)??null})},vendorName:n.vendor.name??null,controllerEmails:o,controllerUserIds:d})},Is={drawerLeftMargin:new Ze(0,0,100,200)},ks=J((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:o}=a,{scheduleDetailsLocalData:d,updateStatus:i}=he(e,a.scheduleType),u=L(e),h=d[n].jeScheduleDetails[t].jeLink,S=h.type==="recommended"?h.recommendedTransactionID:h.transactionDetailID,r=S!=null?ra(e,S):void 0,c=U.getSignedInUser(),p=e.tenantState.currentTenantId,g={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u.tenantId??p},y=u?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:d[n].jeScheduleDetails[t],saveStatus:i.fetchState,authParams:g,isVendorBulkUpdateOnTransactionEnabled:o,firstMonthOfFY:y,isDisabled:i.fetchState==="In-Progress"?"readonly":void 0,analytics:V,qboAppUrl:ua(Xe.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:o=>{const d=o.linkJETransaction.qboURL;d!=null&&e(pa({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:d}))},onFetchTransactionClick:o=>{e(kt(o))},onSaveClick:()=>{e($e(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const o=a.jeScheduledTransaction.scheduledJournalEntry[s];e(ha({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:o})),n("..",{relative:"path"})}}}))(Pn),ws=()=>{const e=Fn(),a=G(),s=Y(),{scheduleDetailId:t}=R(),n=de(),o=Is.drawerLeftMargin.valuePx(n),{scheduleType:d}=R(),{useFeatureGate:i}=ne(),{isFeatureEnabled:u}=i(z.isVendorBulkUpdateOnTransactionEnabled),h=Ee(d)??"prepaid_expenses",[S,r]=f.useState(!1);if(U.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const c=m((D=>he(D,h)));f.useEffect((()=>{c.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const p=c.selectedJELinkRowIndex,g=p!=null?c.scheduleDetailsLocalData[h].jeScheduleDetails[p]?.jeLink:null,y=g?.type==="recommended"?g.recommendedTransactionID:g?.transactionDetailID;f.useEffect((()=>{y!=null&&s(kt(y))}),[]),f.useEffect((()=>{g?.type==="recommended"&&S===!1&&p!=null&&(r(!0),s(da({scheduleType:h,jeScheduleDetailId:t,rowId:p})))}));const x=m((D=>L(D))),b=m((D=>te(D,x.companyId)));return l.jsx(Wn,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${o})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:l.jsx(As,{onClick:D=>D.stopPropagation(),children:c.fetchState!=="Completed"||c.selectedJEScheduleTransaction==null||p==null?l.jsx(Ut,{fetchState:c.fetchState}):l.jsx(ks,{scheduleType:h,jeScheduleDetailId:t,selectedJERow:p,jeScheduledTransaction:c.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:h,controllerUserDetails:b,isVendorBulkUpdateOnTransactionEnabled:u})})})},As=N(Jt)`
|
|
26
|
-
display: flex;
|
|
27
|
-
min-height: 100%;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
`,ge=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},ve=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},xe=()=>{const e=K(),a=Y(),s=m((t=>pe(t)));return f.useEffect((()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(o=>{switch(o){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(ie(n))}}),[e.pathname,s.currentTab,a]),s},se="accrued_expenses",Vs=J((function(e,a){const s=L(e),t=pe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:Q(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=ge(t);s(n),e(ie(ve(t)))},onSortOrderChanged:(t,n)=>{e(Qe({scheduleType:se,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(He({scheduleType:se,subTab:t}))},onSearchTextChanged:t=>{e(We({scheduleType:se,searchText:t}))},onReloadReport:()=>{e(wt(se))},onScroll:t=>{e(qe({scheduleType:se,scrollYOffset:t}))},onClickNewButton:()=>{e(fa()),e(ga()),V.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(Sa({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find((o=>o.jeAccruedScheduleKey===t));s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Ke({scheduleType:se,fetchState:t}))}}}))(_n),js=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=f.useState(!1),[o,d]=f.useState(!1),i=G(),u=Y(),{useFeatureGate:h}=ne(),S=ce();xe();const{isFeatureEnabled:r,isFeatureGateLoading:c}=h(z.isOpexByVendorFeatureEnabled),p=U.getSignedInUser(),g=m((T=>L(T))),y={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:g.tenantId},x=f.useMemo((()=>({authParams:y,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ke(),companyName:g.companyName})),[]),[b,D]=f.useState(!1),E=m((T=>ae(T))),w=m((T=>Ye(T,"accrued_expenses"))),I=e.includes("prepaid_expenses"),k=e.includes("fixed_assets"),F=e.includes("accrued_expenses");f.useEffect((()=>{(I||k||F)&&b===!1&&E!=="Completed"&&(u(Te()),D(!0))}),[b]),f.useEffect((()=>{c===!1&&(u(ye({shouldFetchAccruedExpenses:F,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:I,shouldFetchOpexByVendor:r,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[E,k,c,r]),f.useEffect((()=>{t===!1&&w==="Completed"&&u(wt("accrued_expenses",{selectedTimeframe:ze("accrued_expenses"),selectedCategoryId:"all"},!0))}),[t,w]);const j=m((T=>ma(T,se))),{isAiCfoAccessEnabled:_,onAskAiCfoClick:A}=Se({mobileExploreReferrer:"Vendors — Accrued Expenses"});me({isDataReady:j.fetchState==="Completed"});const C=m((T=>W(T).isReportGenerated));m((T=>W(T).fetchState))!=="Completed"||C!==!0||r!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),F||i("../opex");const P=m((T=>te(T,g.companyId))),v=T=>{d(T)};return l.jsxs(l.Fragment,{children:[l.jsx(fe,{isAppContentDrawerOpen:o,handleDrawerToggle:v}),l.jsx(Vs,{navigate:i,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:j,downloadParams:x,themeState:S,vendorTabsToShow:e,analytics:V,controllerUserDetails:P,isAiCfoAccessEnabled:_,onAskAiCfoClick:A,onClickMenuIcon:()=>v(!0)})]})},oe="fixed_assets",Fs=J((function(e,a){const s=L(e),t=pe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:Q(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=ge(t);s(n),e(ie(ve(t)))},onSortOrderChanged:(t,n)=>{e(Qe({scheduleType:oe,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(He({scheduleType:oe,subTab:t}))},onSearchTextChanged:t=>{e(We({scheduleType:oe,searchText:t}))},onReloadReport:()=>{e(we(oe))},onScroll:t=>{e(qe({scheduleType:oe,scrollYOffset:t}))},onClickSchedule:t=>{e(Vt({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((o=>o.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Ke({scheduleType:oe,fetchState:t}))}}}))(Nt),Ps=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=f.useState(!1),o=G(),d=Y();xe();const{useFeatureGate:i}=ne(),u=ce(),{isFeatureEnabled:h,isFeatureGateLoading:S}=i(z.isOpexByVendorFeatureEnabled),r=U.getSignedInUser(),c=m((T=>L(T))),p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId},g=f.useMemo((()=>({authParams:p,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ke(),companyName:c.companyName})),[]),[y,x]=f.useState(!1),b=m((T=>ae(T))),D=m((T=>Ye(T,"fixed_assets"))),E=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),I=e.includes("accrued_expenses");f.useEffect((()=>{(E||w||I)&&y===!1&&b!=="Completed"&&(d(Te()),x(!0))}),[y]),f.useEffect((()=>{S===!1&&(d(ye({shouldFetchAccruedExpenses:I,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:E,shouldFetchOpexByVendor:h,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[b,w,S,h]),f.useEffect((()=>{t===!1&&D==="Completed"&&d(we("fixed_assets",{selectedTimeframe:ze("fixed_assets"),selectedCategoryId:"all"},!0))}),[t,D]);const k=m((T=>At(T,oe))),{isAiCfoAccessEnabled:F,onAskAiCfoClick:j}=Se({mobileExploreReferrer:"Vendors — Fixed Assets"});me({isDataReady:k.fetchState==="Completed"});const _=m((T=>W(T).isReportGenerated));m((T=>W(T).fetchState))!=="Completed"||_!==!0||h!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),w||o("../opex");const A=m((T=>te(T,c.companyId))),[C,P]=f.useState(!1),v=T=>{P(T)};return l.jsxs(l.Fragment,{children:[l.jsx(fe,{isAppContentDrawerOpen:C,handleDrawerToggle:v}),l.jsx(Fs,{navigate:o,scheduleListReport:k,downloadParams:g,previousTabPosition:a,setPreviousTabPosition:s,themeState:u,vendorTabsToShow:e,analytics:V,controllerUserDetails:A,isAiCfoAccessEnabled:F,onAskAiCfoClick:j,onClickMenuIcon:()=>{v(!0)}})]})},_s=N.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
min-height: 100%;
|
|
32
|
-
width: 100%;
|
|
33
|
-
flex: 1 1 auto;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
37
|
-
`,Ls=J((function(e,a){const s=U.getSignedInUser(),t=e.tenantState.currentTenantId,n=L(e),o=n?.companyName??"",d={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=W(e),u=va(e);return{report:i,uiState:u,isAccountingClassesEnabled:Q(e),analytics:V,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:u.downloadState,currentTenantCompanyName:o,statementEndPoint:`${ee}/opexByVendor`,authParams:d,timezone:ke()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,o)=>{e(wa(t,n,o))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const o=tt(t.id,t.qboId,a.tenantEmailDomain,n),d=M(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:d,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(ka())},onReloadReport:()=>{e(Ia(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(ba(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(Ea({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,o)=>{e(Da({sortkey:n,sortOrder:t,timeframe:o}))},onVendorTabSelectionChanged:t=>{const n=ge(t);s(n),e(ie(ve(t)))},onSortOrSearchStarted:t=>{e(Ca(t))},onPageFetchStarted:()=>{e(ya(!0))},updateDownloadStateHandler:t=>{e(Ta(t))},onClearSearch:t=>{e(xa({timeframe:t}))}}}))(Bn);function Bs({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=Y(),o=K(),{tenantEmailDomain:d}=R(),i=de(),u=U.getSignedInUser(),{useFeatureGate:h}=ne(),{isFeatureEnabled:S,isFeatureGateLoading:r}=h(z.isOpexByVendorFeatureEnabled),c=m((A=>W(A)));if(u==null)throw Error("Can't access opex by vendor page without signing in...");xe();const[p,g]=f.useState(!1),y=m((A=>ae(A))),x=e.includes("prepaid_expenses"),b=e.includes("fixed_assets"),D=e.includes("accrued_expenses"),E=m((A=>pe(A))),{isAiCfoAccessEnabled:w,onAskAiCfoClick:I}=Se({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});me({isDataReady:c.fetchState==="Completed"&&c.isReportGenerated===!0});const{areTenantIdsInSync:k}=Ln();f.useEffect((()=>{(x||b||D)&&p===!1&&y!=="Completed"&&k&&(n(Te()),g(!0))}),[p,k]),f.useEffect((()=>{k&&n(ye({shouldFetchAccruedExpenses:D,shouldFetchFixedAssets:b,shouldFetchPrepaidExpenses:x,shouldFetchOpexByVendor:S===!0&&r===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))}),[y,b,r,S,k]),c.fetchState!=="Completed"||c.isReportGenerated!==!0||S!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),f.useEffect((()=>{k&&(c.isReportGenerated===!1&&c.fetchState==="Completed"||S===!1&&r===!1)&&t("../summary")}),[k,c.isReportGenerated,c.fetchState,S,r,t]);const[F,j]=f.useState(!1),_=A=>{j(A)};return l.jsxs(_s,{windowSize:i,children:[c.fetchState==="Completed"?l.jsx(X,{analytics:V,onLoad:A=>{E.previousTab==null?A.trackVendorOperatingExpensesPageLoaded("Side Panel"):A.trackVendorOperatingExpenses(E.currentTab,E.previousTab??null)}}):null,l.jsx(fe,{isAppContentDrawerOpen:F,handleDrawerToggle:_}),l.jsx(Ls,{location:o,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:d,vendorTabsToShow:e,isAiCfoAccessEnabled:w,onAskAiCfoClick:I,onClickMenuIcon:()=>{_(!0)}})]})}const le="prepaid_expenses",Os=J((function(e,a){const s=L(e),t=pe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:Q(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=ge(t);s(n),e(ie(ve(t)))},onSortOrderChanged:(t,n)=>{e(Qe({scheduleType:le,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(He({scheduleType:le,subTab:t}))},onSearchTextChanged:t=>{e(We({scheduleType:le,searchText:t}))},onReloadReport:()=>{e(we(le))},onScroll:t=>{e(qe({scheduleType:le,scrollYOffset:t}))},onClickSchedule:t=>{e(Vt({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((o=>o.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Ke({scheduleType:le,fetchState:t}))}}}))(Nt),Rs=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=f.useState(!1),o=G(),d=Y(),{useFeatureGate:i}=ne(),u=ce();xe();const h=U.getSignedInUser(),{isFeatureEnabled:S,isFeatureGateLoading:r}=i(z.isOpexByVendorFeatureEnabled),c=m((T=>L(T))),p=m((T=>Ye(T,"prepaid_expenses"))),g={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:c.tenantId},y=f.useMemo((()=>({authParams:g,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ke(),companyName:c.companyName})),[]),[x,b]=f.useState(!1),D=m((T=>ae(T))),E=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),I=e.includes("accrued_expenses");f.useEffect((()=>{(E||w||I)&&x===!1&&D!=="Completed"&&(d(Te()),b(!0))}),[x]),f.useEffect((()=>{t===!1&&p==="Completed"&&d(we("prepaid_expenses",{selectedTimeframe:ze("prepaid_expenses"),selectedCategoryId:"all"},!0))}),[t,p]),f.useEffect((()=>{r===!1&&(d(ye({shouldFetchAccruedExpenses:I,shouldFetchFixedAssets:w,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:S,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[D,w,r,S]);const k=m((T=>At(T,le))),{isAiCfoAccessEnabled:F,onAskAiCfoClick:j}=Se({mobileExploreReferrer:"Vendors — Prepaid Expenses"});me({isDataReady:k.fetchState==="Completed"});const _=m((T=>W(T).isReportGenerated));m((T=>W(T).fetchState))!=="Completed"||_!==!0||S!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),E||o("../opex");const A=m((T=>te(T,c.companyId))),[C,P]=f.useState(!1),v=T=>{P(T)};return l.jsxs(l.Fragment,{children:[l.jsx(fe,{isAppContentDrawerOpen:C,handleDrawerToggle:v}),l.jsx(Os,{navigate:o,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:k,downloadParams:y,themeState:u,vendorTabsToShow:e,analytics:V,controllerUserDetails:A,isAiCfoAccessEnabled:F,onAskAiCfoClick:j,onClickMenuIcon:()=>{v(!0)}})]})},Us=N.div`
|
|
38
|
-
display: flex;
|
|
39
|
-
min-height: 100%;
|
|
40
|
-
width: 100%;
|
|
41
|
-
flex: 1 1 auto;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
align-items: center;
|
|
44
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
45
|
-
`,Ns=J((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:o,currentTenant:d,currentUserRoleMap:i}=a,u=U.getSignedInUser(),h={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:d.tenantId??""};return{firstMonthOfFY:o,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:Ba(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:i?.bookkeeping_user===!0,filesEndPoint:Mt.fileMicroServiceBaseUrl,authParams:h,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:o,vendorEntity:d,tenantEmailDomain:i,location:u,firstMonthOfFY:h}=a,S=()=>{const r=Ce(u.state?.pathnameStackToGoBack),c=r.poppedPathname??((p=2)=>{let g=p;a.isTrendPeriodSelected===!0&&(g=5);let y="../";for(let x=0;x<g;x++)y=`${y}../`;return y})(1);s(c,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,c)=>{const{vendorId:p,vendorName:g,existingCategory:y,existingClass:x,existingOwner:b,selectedCategory:D,selectedClass:E,selectedOwner:w,isRecommendedCategorySelected:I,isRecommendedClassSelected:k,categoryRecommendationTypeSelected:F,classRecommendationTypeSelected:j}=$a(r,c);p!=null&&V.trackVendorDetailsSave(p,g??"",y,x,b,D,E,w,I,k,F,j)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Ja(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Ga(r))},saveVendorDetailLocalData:r=>{n!=null&&e(Ma({vendorId:n,localData:r}))},saveContactsInVendorTabDetailLocalData:(r,c)=>{e(Na({vendorId:r,localData:{contacts:c}}))},onCancelClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&V.trackVendorDetailsCancel(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email),e(ot()),e(lt()),e(it()),e(ct()),S()},handleSpendTrendPercentChangeClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView?.vendorBasic,r.id!=null&&V.trackVendorDetailsSpendTrendHotlinkClicked(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email))},onSaveSuccess:()=>{n!=null&&e(Ua("Not-Started",n)),e(ot()),e(lt()),e(it()),e(ct()),S()},onTrendSelectedPeriodChange:r=>{if(r==null)o!=null&&e(Fe(d,"EntityDetail",{timeframe:"quarter",timePeriod:o}));else{const c=r.currentTimePeriod==null?r.addTimePeriod:{startDate:r.addTimePeriod.startDate,endDate:r.currentTimePeriod.endDate};e(_e(d,"EntityDetail",{timeframe:r.timeframe,timePeriod:r.addTimePeriod},h)),e(Fe(d,"EntityDetail",{timeframe:r.timeframe,timePeriod:c}))}},onVendorTabSelectionChanged:r=>{e(Ra(r))},onAddressClick:(r,c)=>{if(i==null)return;const p=es(i,r,c),g=M(u.state?.pathnameStackToGoBack,u.pathname);s(p,{state:{pathnameStackToGoBack:g}})},onVendorDetailUIChange:r=>{e(Oa({collapsableStatus:r}))},onTransactionItemClick:r=>{const c=`${q(r,i)}`,p=M(u.state?.pathnameStackToGoBack,u.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onLoadPreviousTransactionsClick:(r,c)=>{e(jt({timePeriod:Pe(r),numberOfQuartersFetched:c})),e(Ft(d,Pe(r),!0,!0))}}}))(Rn);function ut({referrerType:e,isFiling1099FeatureEnabled:a}){const s=Y(),t=K(),n=G(),o=On(),[d,i]=f.useState(!1),[u,h]=f.useState(!1),[S,r]=f.useState(!1),c=R(),p=c.vendorId,g=c.qboId,{tenantEmailDomain:y,timeframe:x,startDate:b,endDate:D}=c,E={id:g??"",name:"",type:"vendor",zeniId:p??"",qboId:g??""};f.useEffect((()=>{x!=null&&b!=null&&D!=null?i(!0):(i(!1),S===!1&&(r(!0),s(Fe(E,"EntityDetail"))))}),[x,b,D]);const w=de(),I=m((O=>L(O))),k=m((O=>p!=null?Aa(O,p,E):void 0)),F=m((O=>O.vendorState.vendorByID[p??""])),j=m((O=>L(O).company?.companyInfo.firstMonthOfFY??1)),_=m((()=>Va(j,2))),A=Pe({startDate:_.startDate,endDate:ja()}),C=Fa(j),P=m((O=>Pa(O.trendWithTransactionsState,E,"EntityDetail"))),[v,T]=f.useState(!1),Ve=d===!1&&S===!1?void 0:P?.selectedPeriod?.timePeriod??C;return f.useEffect((()=>(e==null&&k?.fetchState!=="Not-Started"||p==null||s(_a(p,E)),()=>{e!=null&&p!=null&&s(La(p))})),[p,t.state,s]),f.useEffect((()=>{k?.fetchState==="Completed"&&k?.vendorViewDetails.vendorView?.vendorBasic!=null&&((O,re,je)=>{O.id!=null&&V.trackVendorDetails(O.id,O.name,je,O.account?.accountName,O.class?.className,O.owner?.email,re.percentChange,re.last30DaysSpend,re.last90DaysSpend,re.yearToDateSpend)})(k?.vendorViewDetails.vendorView?.vendorBasic,k?.vendorSpend,e),T(!1)}),[k?.fetchState]),f.useEffect((()=>{if(k?.fetchState==="Completed"&&v===!1){Ve!=null&&d===!1&&(s(_e(E,"EntityDetail",{timeframe:P?.selectedPeriod?.timeframe??"quarter",timePeriod:Ve},j)),T(!0));const O=De.getLocalizedStrings().dateFormat.analytics;if(d===!0&&x!=null&&b!=null&&D!=null){T(!0);const re=x,je={startDate:st(b,O.YYYYDashMMDashDDFormat),endDate:st(D,O.YYYYDashMMDashDDFormat)};s(_e(E,"EntityDetail",{timeframe:re,timePeriod:je}))}}}),[k?.fetchState,Ve,P?.selectedPeriod?.timeframe,d,j]),f.useEffect((()=>{k?.fetchState==="Completed"&&u===!1&&(s(jt({timePeriod:A,numberOfQuartersFetched:3})),s(Ft(E,k.allTransactionsTabData?.timePeriod??A,!1,!0)),h(!0))}),[k?.fetchState,u]),p==null?l.jsx(H,{}):l.jsx(Us,{windowSize:w,children:l.jsx(Ns,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:k,vendorId:p,currentTenant:I,selectedVendor:F,firstMonthOfFY:j,isTrendPeriodSelected:d,selectedPeriodTimePeriod:P?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:C,vendorEntity:E,currentUserRoleMap:o?.loggedInUserRoleMap,tenantEmailDomain:y})})}const Ms=De.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,Gs={containerWidth:new Ze(100,58)},Js=N(Nn)`
|
|
46
|
-
width: ${Z.sp4};
|
|
47
|
-
height: ${Z.sp4};
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
50
|
-
`,$s=N.div`
|
|
51
|
-
display: flex;
|
|
52
|
-
height: 100vh;
|
|
53
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
54
|
-
width: 100%;
|
|
55
|
-
overflow-y: scroll;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,Ys=N.div`
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: column;
|
|
60
|
-
width: ${e=>`${Gs.containerWidth.value(e.windowSize)}%`};
|
|
61
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
62
|
-
`,zs=J((function(e,a){const s=U.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},o=e.vendorFiling1099UploadDetailsState,d=e.vendorFiling1099UploadDetailsState;let i={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(i=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${Mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:o,vendorFiling1099UploadDetailsViewState:d,uploadStaus:d.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:V,entityId:a.billId,fetchVendorFetchStatus:i,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(qa({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(Wa({ocrData:t.w9_form[0],vendorId:s}));const n=(o=>({street:[o.street.join(" ")],city:o.city,state:o.state,postalCode:o.postal_code,countryCode:o.country_code??void 0,country:o.country??""}))(t.w9_form[0].address);e(Ot({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(Le({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(Ka(t))},onVendorFiling1099UploadDetailsSave:t=>{e(Bt(t))},onDeleteClick:()=>{e(Le({fetchState:"Not-Started",error:void 0})),e(Lt({vendorId:s,w9Documents:[]}))}}}))(Gn);function ht({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=Y(),t=G(),{vendorId:n}=R(),o=de(),d=ce(),i=U.getSignedInUser(),[u,h]=f.useState(!1),{useFeatureGate:S}=ne(),{isFeatureEnabled:r}=S(z.isVendorRecommendationFeatureEnabled),c=m((C=>L(C))).companyName,p=new AbortController,g=p.signal;let y,x,b,D,E;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");y=m((C=>Pt(C,n))),x=m((C=>C.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus)),b=m((C=>C.vendorViewState.editVendorStateById[n]?.fetchStatus)),E=m((C=>C.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0])),D=m((C=>C.vendorFiling1099UploadDetailsState));const w=b?.fetchState==="In-Progress"||D?.w9FormUploadStatus?.fetchState==="In-Progress",I=()=>{d.toggle()};f.useEffect((()=>()=>{p.abort(),s(_t(n))}),[]),f.useEffect((()=>{u||n!=null&&(h(!0),s(Ya(!1,n,g)))}),[n]);const k=Re(b?.fetchState),F=Re(x?.fetchState),j=y.vendor?.contactIds,_=j?.[j.length-1],A=m((C=>C.contactState.contactById[_]));if(f.useEffect((()=>{n!=null&&k==="In-Progress"&&b?.fetchState==="Completed"&&y?.vendor!=null&&(s(za(n,y.vendor,A)),y?.vendor.filing1099W9Files?.[0]!=null&&s(Le({fetchState:"Completed",error:void 0})))}),[n,y?.vendor]),f.useEffect((()=>{F==="In-Progress"&&x?.fetchState==="Completed"&&t("../../vendors/filing_1099")}),[x?.fetchState]),a===!0&&b?.fetchState!=="Completed"&&b?.fetchState!=="Error")return l.jsx(Qs,{children:l.jsx(Un,{})});if(i==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return l.jsxs($s,{windowSize:o,children:[o!=="small"?l.jsxs(qs,{children:[l.jsx(Js,{onClick:I}),l.jsxs(Ks,{showContent:i.userEmailDomain==="zeni.ai",children:[l.jsx(Ws,{showAutofill:!1}),l.jsx(Hs,{showAutofill:!1,children:c})]})]}):null,l.jsx(zs,{vendorId:n,file:E,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:r,pdfTitle:E?Ms.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:y?.vendor?.legalName,isLoading:w}),l.jsx(Ys,{windowSize:o,children:e})]})}const Ks=N.div`
|
|
63
|
-
display: ${e=>e.showContent?"flex":"none"};
|
|
64
|
-
align-items: center;
|
|
65
|
-
`,qs=N.div`
|
|
66
|
-
margin-bottom: ${Z.sp3};
|
|
67
|
-
margin-top: ${Z.sp3};
|
|
68
|
-
margin-left: ${Z.sp8};
|
|
69
|
-
position: absolute;
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
`,Ws=N.div`
|
|
73
|
-
width: 1px;
|
|
74
|
-
height: ${Z.sp3};
|
|
75
|
-
margin: ${Z.sp0} ${Z.sp3};
|
|
76
|
-
background-color: ${e=>e.showAutofill?Gt.neutralGrey1Light:e.theme.colors.hero};
|
|
77
|
-
`,Hs=N(Mn.StandardMedium)`
|
|
78
|
-
color: ${e=>e.showAutofill?Gt.neutralGrey5Light:e.theme.colors.primary};
|
|
79
|
-
`,Qs=N.div`
|
|
80
|
-
width: 100%;
|
|
81
|
-
height: 100vh;
|
|
82
|
-
overflow: hidden;
|
|
83
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
84
|
-
`,Zs=J((function(e){const a=Ha(e);return{vendorDetailView:Qa(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(Rt({vendorDetails:t}))},fetchRecommendation:t=>{e(Xa("tenant",t))},onSaveClick:()=>{e(Za())},onBackClick:()=>{s("../review")}}}))(Jn);function Xs(){const e=G();return l.jsx(Zs,{navigate:e})}const eo=N.div`
|
|
85
|
-
display: flex;
|
|
86
|
-
min-height: 100%;
|
|
87
|
-
width: 100%;
|
|
88
|
-
flex: 1 1 auto;
|
|
89
|
-
flex-direction: column;
|
|
90
|
-
align-items: center;
|
|
91
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
92
|
-
`,to=J((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=U.getSignedInUser(),o=e.tenantState.currentTenantId,d={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""},i=L(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:V,authParams:d,attachmentEndpoint:i.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,o)=>{e(Be(t,n,o))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(cn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(rt())},onUpdateLocalData:(t,n,o,d)=>{if(n!=null){const i=ao(n);e(ln({vendorId:t,currentSelection:i,selectedGlobalMerchantId:o,vendorRenamedText:d}))}},onResetVendorLocalData:t=>{e(on({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const o=tt(t,n,a.tenantEmailDomain),d=M(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:d}})}},onUpdatePageToken:t=>{e(sn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(nn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(an({scrollYOffset:t}))},onClickSave:(t,n,o)=>{e(tn(t,n,o))},onClickCancelPopup:()=>{e(en())},onClearGlobalMerchantAutoCompleteResults:()=>{e(rt())},onClickRedirectToQBO:()=>{window.open(`${Xe.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(Rt({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Be(null))}}}))($n);function pt(){const e=G(),a=Y(),s=K(),{tenantEmailDomain:t}=R(),n=de(),o=U.getSignedInUser(),{vendorId:d}=R(),i=m((c=>dt(c))),[u,h]=f.useState(!1),S=m((c=>dt(c).fetchState));if(f.useEffect((()=>{S==="Not-Started"&&u===!1&&(a(Be(null)),h(!0))}),[]),o==null)throw Error("Can't access first review page without signing in...");const r=c=>c.trackPageLoaded(et.Event.vendorTenantReviewListPage);return l.jsxs(l.Fragment,{children:[S==="Completed"?l.jsx(X,{analytics:V,onLoad:r}):null,l.jsx(X,{analytics:V,onLoad:r}),l.jsx(ts,{isOpen:d!=null,drawerLeftMargin:new Ze(0,0,300,600),onClose:()=>{e("../review")},children:l.jsx(no,{onClick:c=>c.stopPropagation(),children:l.jsx(Xs,{})})}),l.jsx(eo,{windowSize:n,children:l.jsx(to,{location:s,navigate:e,vendorFirstReviewDetails:i,tenantEmailDomain:t})})]})}const ao=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,no=N(Jt)`
|
|
93
|
-
display: flex;
|
|
94
|
-
min-height: 100%;
|
|
95
|
-
flex-direction: column;
|
|
96
|
-
`,so=J((function(e,a){const s=U.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,o={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let d={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(d=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:V,vendorFiling1099UploadDetailsViewState:n,authParams:o,googleAPIKey:Xe.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:d,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:o,vendorFiling1099UploadDetails:d}=a,{tenantEmailDomain:i}=s;return{onVendorFiling1099UploadDetailsSave:u=>{e(Bt(u)),V.trackVendor1099DetailSave(d.vendor.legalName??"")},onSaveChangesToLocalStore:u=>{e(Lt(u))},onResetVendorFiling1099FormStatus:()=>{e(dn())},onAddressEditHandler:u=>{const h=Hn((S=>({street:S.vendor1099FilingSectionId.street,suite:S.vendor1099FilingSectionId.suite,city:S.vendor1099FilingSectionId.city,state:S.vendor1099FilingSectionId.state,country:S.vendor1099FilingSectionId.country,countryCode:S.vendor1099FilingSectionId.countryCode,postalCode:S.vendor1099FilingSectionId.postalCode,secondaryInfo:S.vendor1099FilingSectionId.secondaryInfo}))(u));e(Ot({addressType:"vendor_address",addressToCreate:h}))},goBackToListPage:()=>{e(_t(o));const u=`/${i}/vendors/filing_1099/`,h=M(n.state?.pathnameStackToGoBack,n.pathname);t(u,{state:{pathnameStackToGoBack:h}})},onAddressClick:u=>{const h=(function(r,c,p){let g=`/${r}/vendors/filing_1099/upload/${p}/edit`;return g=g.concat(`/new/${c}`),g})(i,u,o),S=M(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:S}})},AddressFormPage:zn}}))(Yn);function oo(){const e=G(),a=K(),{vendorId:s}=R(),t=m((i=>L(i)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=m((i=>Pt(i,s)));const{tenantEmailDomain:o}=t,d=t.companyId??U.getSignedInUserTenant(o)?.companyId;if(d==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return l.jsx(so,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:d})}const lo=N.div`
|
|
97
|
-
display: flex;
|
|
98
|
-
min-height: 100%;
|
|
99
|
-
width: 100%;
|
|
100
|
-
flex: 1 1 auto;
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
align-items: center;
|
|
103
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
104
|
-
`,io=J((function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}}),(function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,o)=>{e(gn({sortOrder:n,sortKey:o}))},onUpdateSearchUiState:n=>{e(fn({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const o=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,d=M(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:d}})}},onReloadVendors:()=>{e(Oe(!0))},onBackClick:()=>{e(mn()),e(Sn())},onVendorTabSelectionChanged:n=>{const o=ge(n);s(o),e(ie(ve(n)))},onAccountMappingChange:n=>{const{filing1099:o}=n,{bankAccount:d,expenseCategory1099:i}=o,u=as(a.accountMappingView.bankAccounts1099FilingAccountList,d.selectedOptions),h=ns(a.accountMappingView.expenseAccounts1099FilingAccountList,i),S={selectedBankAccounts1099FilingAccountIds:u.map((r=>r.accountId)),selectedExpenseAccounts1099FilingAccountIds:h};e(pn({data:S}))},onSaveClick:()=>{e(hn()),t.track(et.Event.vendor1099TabSettingsSave)}}}))(Kn);function mt({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=Y(),o=K(),{tenantEmailDomain:d}=R(),i=de(),u=U.getSignedInUser(),[h,S]=f.useState(!1),[r,c]=f.useState(!1);if(u==null)throw Error("Can't access vendor filing 1099 page without signing in...");xe();const p=m((I=>rn(I))),g=m((I=>un(I))),{isAiCfoAccessEnabled:y,onAskAiCfoClick:x}=Se({mobileExploreReferrer:"Vendors — 1099"});me({isDataReady:p.fetchState==="Completed"}),f.useEffect((()=>{r||(c(!0),n(Oe(!1)))}),[r,c]),f.useEffect((()=>{g.saveState.fetchState==="Completed"&&n(Oe(!1))}),[g.saveState.fetchState]);const b=I=>{S(I)},D=m((I=>L(I))),E={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:D.tenantId},w=f.useMemo((()=>({authParams:E,tenantName:D.companyName,filing1099ReportEndPoint:`${ee}/filing1099Reports`})),[]);return l.jsxs(l.Fragment,{children:[p.fetchState==="Completed"?l.jsx(l.Fragment,{children:l.jsx(X,{analytics:V,onLoad:()=>V.trackPageLoaded(et.Event.vendor1099ListPage)})}):null,l.jsxs(lo,{windowSize:i,children:[l.jsx(fe,{isAppContentDrawerOpen:h,handleDrawerToggle:b}),l.jsx(io,{location:o,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:V,vendorsFiling1099ListDetails:p,vendorTypeList:p.vendorTypeList,accountMappingView:g,downloadParams:w,tenantEmailDomain:d,vendorTabsToShow:e,isAiCfoAccessEnabled:y,onAskAiCfoClick:x,onClickMenuIcon:()=>{b(!0)}})]})]})}const co=N.div`
|
|
105
|
-
display: flex;
|
|
106
|
-
min-height: 100%;
|
|
107
|
-
width: 100%;
|
|
108
|
-
flex: 1 1 auto;
|
|
109
|
-
flex-direction: column;
|
|
110
|
-
align-items: center;
|
|
111
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
112
|
-
`,ro=J((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:Q(e),analytics:V}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,o)=>{e(Dn({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:o}))},onUpdatePageToken:t=>{e(Cn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(yn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(Tn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const o=tt(t,n,a.tenantEmailDomain),d=M(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:d,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(xn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=ge(t);s(n),e(ie(ve(t)))}}}))(qn);function uo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=Y(),o=K(),{tenantEmailDomain:d}=R(),i=de(),u=U.getSignedInUser(),{useFeatureGate:h}=ne(),{isFeatureEnabled:S,isFeatureGateLoading:r}=h(z.isOpexByVendorFeatureEnabled);xe();const c=e.includes("prepaid_expenses"),p=e.includes("fixed_assets"),g=e.includes("accrued_expenses"),y=m((P=>pe(P)));let x={};x=m((P=>vn(P,"vendorsTab")));const[b,D]=f.useState(!1),{isAiCfoAccessEnabled:E,onAskAiCfoClick:w}=Se({mobileExploreReferrer:"Vendors Summary"});me({isDataReady:x.fetchState==="Completed"});const I=m((P=>ae(P))),k=m((P=>W(P).isReportGenerated));m((P=>W(P).fetchState))==="Completed"&&k&&S&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[F,j]=f.useState(!1);if(f.useEffect((()=>{(c||p)&&F===!1&&I!=="Completed"&&(n(Te()),j(!0))}),[F]),f.useEffect((()=>{n(ye({shouldFetchAccruedExpenses:g,shouldFetchFixedAssets:p,shouldFetchPrepaidExpenses:c,shouldFetchOpexByVendor:S&&r===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))}),[I,p,r,S]),f.useEffect((()=>{b||x.fetchState!=="Completed"||(D(!0),V.trackVendorList(y.currentTab,y.previousTab??null,x.totalVendorCount,x.uiState.sortKey,x.uiState.ytdSpendSelection))}),[x.fetchState]),u==null)throw Error("Can't access address page without signing in...");const[_,A]=f.useState(!1),C=P=>{A(P)};return l.jsxs(co,{windowSize:i,children:[l.jsx(fe,{isAppContentDrawerOpen:_,handleDrawerToggle:C}),l.jsx(ro,{location:o,navigate:t,vendorsListDetails:x,tenantEmailDomain:d,vendorTabsToShow:e,onClickMenuIcon:()=>{C(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:E,onAskAiCfoClick:w})]})}function Ro(){const{useFeatureGate:e}=ne(),a=K().state?.referrer,[s,t]=f.useState(!1),[n,o]=f.useState(0),d=U.getSignedInUser(),i=En(d),{isFeatureEnabled:u}=e(z.isOpexByVendorFeatureEnabled),{isFeatureEnabled:h}=e(z.isVendorReviewFeatureEnabled),{isFeatureEnabled:S}=e(z.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:r}=e(z.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:c}=e(z.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:p}=e(z.isFiling1099FeatureEnabled),g=m((w=>L(w))),y=g?.externalConnections?.accounting[0]?.connectionName,x=["vendors_tab"];y!=="netsuite"&&S===!0&&x.push("prepaid_expenses"),y!=="netsuite"&&r===!0&&x.push("fixed_assets"),y!=="netsuite"&&c===!0&&x.push("accrued_expenses"),y!=="netsuite"&&p&&i&&(x.push("filing_1099"),u&&x.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:b}=e(z.isDebitCardFeatureEnabled),D=bn(b,g),E=In(g);return D===!0||E===!0?l.jsx(at,{children:l.jsx(B,{path:"/*",element:l.jsx(Zn,{})})}):l.jsxs(at,{children:[l.jsx(B,{path:"/opex",element:u===!0?l.jsx(Bs,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../summary"})}),l.jsx(B,{path:"/summary",element:l.jsx(uo,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x})}),l.jsx(B,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:r===!0?l.jsx(fs,{}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:r===!0?l.jsx(us,{shouldNavigateBack:s,setShouldNavigateBack:t}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/one_time_accrual/details/:accrualId",element:c===!0?l.jsx(ss,{}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:S===!0?l.jsx(Cs,{}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:S===!0||r===!0?l.jsx(ws,{}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:c===!0?l.jsx(is,{setShouldNavigateBack:t}):l.jsx($,{to:"../../vendors/opex"})}),l.jsx(B,{path:"schedules/prepaid_expenses",element:S===!0?l.jsx(Rs,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"schedules/fixed_assets",element:r===!0?l.jsx(Ps,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"schedules/accrued_expenses",element:c===!0?l.jsx(js,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/filing_1099",element:p&&i?l.jsx(mt,{previousTabPosition:n,setPreviousTabPosition:o,vendorTabsToShow:x}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/filing_1099/:vendorId",element:p&&i?l.jsx(mt,{vendorTabsToShow:x,previousTabPosition:n,setPreviousTabPosition:o}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/filing_1099/upload/:vendorId/edit",element:p&&i?l.jsx(ht,{appContent:l.jsx(oo,{}),showFullScreenSkeletonWhileLoading:!0}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:p&&i?l.jsx(ht,{appContent:l.jsx(Qn,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):l.jsx($,{to:"../opex"})}),l.jsx(B,{path:"/summary/:vendorId/:qboId",element:l.jsx(ut,{referrerType:a,isFiling1099FeatureEnabled:p&&i})}),l.jsx(B,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:l.jsx(ut,{referrerType:a,isFiling1099FeatureEnabled:p&&i})}),l.jsx(B,{path:"/review",element:h===!0?l.jsx(pt,{}):l.jsx(H,{})}),l.jsx(B,{path:"/review/vendor/:vendorId",element:h?l.jsx(pt,{}):l.jsx(H,{})}),l.jsx(B,{path:"/",element:l.jsx($,{to:"summary"})}),l.jsx(B,{path:"*",element:l.jsx(H,{})})]})}export{Ro as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{br as $,dl as i}from"./zeni-epic-state-DxmmAR38.js";import{G as u}from"./index-Cp-pyxoH.js";import"./mui-DesXezzU.js";import"./sentry-xWYlrqHr.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]="b73244ad-805e-45db-85b8-13bc8f2f4444",e._sentryDebugIdIdentifier="sentry-dbid-b73244ad-805e-45db-85b8-13bc8f2f4444")}catch{}})();const{dateFormat:{analytics:{YYYYDashMMDashDDFormat:s}}}=u.getLocalizedStrings();function I(e,n){return`/${n}/transaction/${encodeURIComponent(e.type)}/${e.id}`}const C=(e,n)=>e!=null&&e.length>0&&n!=null&&n.length>0;function D(e,n,o,t,a,d,r=!0){let c=`/${e}/transactions/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${a}/${d.startDate.format(s)}/${d.endDate.format(s)}/${encodeURIComponent(t)}`;return c=r===!1?`${c}/exclude_subaccounts`:`${c}/include_subaccounts`,c}const y=(e,n)=>({startDate:i($(),n,Math.abs(e),"year"),endDate:$()});function R(e,n,o,t,a,d,r){return`/${e}/transactions/by-class/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}/${d}/${r.startDate.format(s)}/${r.endDate.format(s)}/${encodeURIComponent(a)}`}function U(e,n,o,t,a,d,r){return`/${e}/transactions/by-project/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}/${d}/${r.startDate.format(s)}/${r.endDate.format(s)}/${encodeURIComponent(a)}`}function g(e,n){return`/${n}/${e.type}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`}const h=(e,n,o,t)=>{let a=`/${o}/vendors/summary/${encodeURIComponent(e)}/vendor_${encodeURIComponent(n)}`;return t!=null&&(a+=`/${t.balanceTimeFrame}/${t.startDate.format(s)}/${t.endDate.format(s)}`),a};function _(e,n,o){let t=`/${e}/address`;return t=o!=null?t.concat(`/edit/${n}/${encodeURIComponent(o)}`):t.concat(`/new/${n}`),t}function w(e){return`/${e}/vendors/schedules/prepaid_expenses`}function v(e){return`/${e}/vendors/schedules/fixed_assets`}const m=["explore","new_chat","routines","skills"];function x(e){return m.some((n=>n===e))}export{R as a,U as b,I as c,_ as d,v as e,g as f,w as g,C as h,x as i,y as p,D as t,h as v};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{d as Le,c as ft}from"./sentry-xWYlrqHr.js";import{t as Ie,u as lt,v as st}from"./utils-18zApAFM.js";(function(){try{var N=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},I=new N.Error().stack;I&&(N._sentryDebugIds=N._sentryDebugIds||{},N._sentryDebugIds[I]="f36be0d5-88b6-4bac-af9c-b3cda8367ead",N._sentryDebugIdIdentifier="sentry-dbid-f36be0d5-88b6-4bac-af9c-b3cda8367ead")}catch{}})();var Fe,Pe={exports:{}},De={exports:{}},pt=De.exports;function ht(){return Fe||(Fe=1,N=De,I=De.exports,(function(q){var b=I&&!I.nodeType&&I,Q=N&&!N.nodeType&&N,R=typeof Le=="object"&&Le;R.global!==R&&R.window!==R&&R.self!==R||(q=R);var S,j,m=2147483647,O=36,E=/^xn--/,B=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,i={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,u=String.fromCharCode;function n(f){throw new RangeError(i[f])}function l(f,h){for(var a=f.length,M=[];a--;)M[a]=h(f[a]);return M}function _(f,h){var a=f.split("@"),M="";return a.length>1&&(M=a[0]+"@",f=a[1]),M+l((f=f.replace(c,".")).split("."),h).join(".")}function d(f){for(var h,a,M=[],K=0,V=f.length;K<V;)(h=f.charCodeAt(K++))>=55296&&h<=56319&&K<V?(64512&(a=f.charCodeAt(K++)))==56320?M.push(((1023&h)<<10)+(1023&a)+65536):(M.push(h),K--):M.push(h);return M}function T(f){return l(f,(function(h){var a="";return h>65535&&(a+=u((h-=65536)>>>10&1023|55296),h=56320|1023&h),a+=u(h)})).join("")}function v(f,h){return f+22+75*(f<26)-((h!=0)<<5)}function x(f,h,a){var M=0;for(f=a?s(f/700):f>>1,f+=s(f/h);f>455;M+=O)f=s(f/35);return s(M+36*f/(f+38))}function p(f){var h,a,M,K,V,$,Z,L,oe,le,X,ae=[],ce=f.length,G=0,se=128,te=72;for((a=f.lastIndexOf("-"))<0&&(a=0),M=0;M<a;++M)f.charCodeAt(M)>=128&&n("not-basic"),ae.push(f.charCodeAt(M));for(K=a>0?a+1:0;K<ce;){for(V=G,$=1,Z=O;K>=ce&&n("invalid-input"),((L=(X=f.charCodeAt(K++))-48<10?X-22:X-65<26?X-65:X-97<26?X-97:O)>=O||L>s((m-G)/$))&&n("overflow"),G+=L*$,!(L<(oe=Z<=te?1:Z>=te+26?26:Z-te));Z+=O)$>s(m/(le=O-oe))&&n("overflow"),$*=le;te=x(G-V,h=ae.length+1,V==0),s(G/h)>m-se&&n("overflow"),se+=s(G/h),G%=h,ae.splice(G++,0,se)}return T(ae)}function D(f){var h,a,M,K,V,$,Z,L,oe,le,X,ae,ce,G,se,te=[];for(ae=(f=d(f)).length,h=128,a=0,V=72,$=0;$<ae;++$)(X=f[$])<128&&te.push(u(X));for(M=K=te.length,K&&te.push("-");M<ae;){for(Z=m,$=0;$<ae;++$)(X=f[$])>=h&&X<Z&&(Z=X);for(Z-h>s((m-a)/(ce=M+1))&&n("overflow"),a+=(Z-h)*ce,h=Z,$=0;$<ae;++$)if((X=f[$])<h&&++a>m&&n("overflow"),X==h){for(L=a,oe=O;!(L<(le=oe<=V?1:oe>=V+26?26:oe-V));oe+=O)se=L-le,G=O-le,te.push(u(v(le+se%G,0))),L=s(se/G);te.push(u(v(L,0))),V=x(a,ce,M==K),a=0,++M}++a,++h}return te.join("")}if(S={version:"1.4.1",ucs2:{decode:d,encode:T},decode:p,encode:D,toASCII:function(f){return _(f,(function(h){return B.test(h)?"xn--"+D(h):h}))},toUnicode:function(f){return _(f,(function(h){return E.test(h)?p(h.slice(4).toLowerCase()):h}))}},b&&Q)if(N.exports==b)Q.exports=S;else for(j in S)S.hasOwnProperty(j)&&(b[j]=S[j]);else q.punycode=S})(pt)),De.exports;var N,I}const yt=ft(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Me,He,Ke,$e,ze,Be,Qe,Ve,Ze,Ge,Je,Ye,Ae,Xe,Ne,et,tt,rt,nt,ot,it;function Re(){if(He)return Me;He=1;var N=typeof Map=="function"&&Map.prototype,I=Object.getOwnPropertyDescriptor&&N?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,q=N&&I&&typeof I.get=="function"?I.get:null,b=N&&Map.prototype.forEach,Q=typeof Set=="function"&&Set.prototype,R=Object.getOwnPropertyDescriptor&&Q?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,S=Q&&R&&typeof R.get=="function"?R.get:null,j=Q&&Set.prototype.forEach,m=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,O=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,E=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,B=Boolean.prototype.valueOf,c=Object.prototype.toString,i=Function.prototype.toString,s=String.prototype.match,u=String.prototype.slice,n=String.prototype.replace,l=String.prototype.toUpperCase,_=String.prototype.toLowerCase,d=RegExp.prototype.test,T=Array.prototype.concat,v=Array.prototype.join,x=Array.prototype.slice,p=Math.floor,D=typeof BigInt=="function"?BigInt.prototype.valueOf:null,f=Object.getOwnPropertySymbols,h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,a=typeof Symbol=="function"&&typeof Symbol.iterator=="object",M=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===a||!0)?Symbol.toStringTag:null,K=Object.prototype.propertyIsEnumerable,V=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(o){return o.__proto__}:null);function $(o,r){if(o===1/0||o===-1/0||o!=o||o&&o>-1e3&&o<1e3||d.call(/e/,r))return r;var A=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof o=="number"){var W=o<0?-p(-o):p(o);if(W!==o){var U=String(W),C=u.call(r,U.length+1);return n.call(U,A,"$&_")+"."+n.call(n.call(C,/([0-9]{3})/g,"$&_"),/_$/,"")}}return n.call(r,A,"$&_")}var Z=yt,L=Z.custom,oe=ge(L)?L:null,le={__proto__:null,double:'"',single:"'"},X={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function ae(o,r,A){var W=A.quoteStyle||r,U=le[W];return U+o+U}function ce(o){return n.call(String(o),/"/g,""")}function G(o){return!M||!(typeof o=="object"&&(M in o||o[M]!==void 0))}function se(o){return pe(o)==="[object Array]"&&G(o)}function te(o){return pe(o)==="[object RegExp]"&&G(o)}function ge(o){if(a)return o&&typeof o=="object"&&o instanceof Symbol;if(typeof o=="symbol")return!0;if(!o||typeof o!="object"||!h)return!1;try{return h.call(o),!0}catch{}return!1}Me=function o(r,A,W,U){var C=A||{};if(re(C,"quoteStyle")&&!re(le,C.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(re(C,"maxStringLength")&&(typeof C.maxStringLength=="number"?C.maxStringLength<0&&C.maxStringLength!==1/0:C.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var z=!re(C,"customInspect")||C.customInspect;if(typeof z!="boolean"&&z!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(re(C,"indent")&&C.indent!==null&&C.indent!==" "&&!(parseInt(C.indent,10)===C.indent&&C.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(re(C,"numericSeparator")&&typeof C.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ue=C.numericSeparator;if(r===void 0)return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return k(r,C);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var ne=String(r);return ue?$(r,ne):ne}if(typeof r=="bigint"){var ee=String(r)+"n";return ue?$(r,ee):ee}var ve=C.depth===void 0?5:C.depth;if(W===void 0&&(W=0),W>=ve&&ve>0&&typeof r=="object")return se(r)?"[Array]":"[Object]";var P=(function(y,J){var Ee;if(y.indent===" ")Ee=" ";else{if(!(typeof y.indent=="number"&&y.indent>0))return null;Ee=v.call(Array(y.indent+1)," ")}return{base:Ee,prev:v.call(Array(J+1),Ee)}})(C,W);if(U===void 0)U=[];else if(t(U,r)>=0)return"[Circular]";function ie(y,J,Ee){if(J&&(U=x.call(U)).push(J),Ee){var We={depth:C.depth};return re(C,"quoteStyle")&&(We.quoteStyle=C.quoteStyle),o(y,We,W+1,U)}return o(y,C,W+1,U)}if(typeof r=="function"&&!te(r)){var ye=(function(y){if(y.name)return y.name;var J=s.call(i.call(y),/^function\s*([\w$]+)/);return J?J[1]:null})(r),Oe=H(r,ie);return"[Function"+(ye?": "+ye:" (anonymous)")+"]"+(Oe.length>0?" { "+v.call(Oe,", ")+" }":"")}if(ge(r)){var de=a?n.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):h.call(r);return typeof r!="object"||a?de:g(de)}if((function(y){return!y||typeof y!="object"?!1:typeof HTMLElement<"u"&&y instanceof HTMLElement?!0:typeof y.nodeName=="string"&&typeof y.getAttribute=="function"})(r)){for(var fe="<"+_.call(String(r.nodeName)),he=r.attributes||[],me=0;me<he.length;me++)fe+=" "+he[me].name+"="+ae(ce(he[me].value),"double",C);return fe+=">",r.childNodes&&r.childNodes.length&&(fe+="..."),fe+="</"+_.call(String(r.nodeName))+">"}if(se(r)){if(r.length===0)return"[]";var _e=H(r,ie);return P&&!(function(y){for(var J=0;J<y.length;J++)if(t(y[J],`
|
|
2
|
-
`)>=0)return!1;return!0})(_e)?"["+w(_e,P)+"]":"[ "+v.call(_e,", ")+" ]"}if((function(y){return pe(y)==="[object Error]"&&G(y)})(r)){var be=H(r,ie);return"cause"in Error.prototype||!("cause"in r)||K.call(r,"cause")?be.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+v.call(be,", ")+" }":"{ ["+String(r)+"] "+v.call(T.call("[cause]: "+ie(r.cause),be),", ")+" }"}if(typeof r=="object"&&z){if(oe&&typeof r[oe]=="function"&&Z)return Z(r,{depth:ve-W});if(z!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if((function(y){if(!q||!y||typeof y!="object")return!1;try{q.call(y);try{S.call(y)}catch{return!0}return y instanceof Map}catch{}return!1})(r)){var Se=[];return b&&b.call(r,(function(y,J){Se.push(ie(J,r,!0)+" => "+ie(y,r))})),Y("Map",q.call(r),Se,P)}if((function(y){if(!S||!y||typeof y!="object")return!1;try{S.call(y);try{q.call(y)}catch{return!0}return y instanceof Set}catch{}return!1})(r)){var xe=[];return j&&j.call(r,(function(y){xe.push(ie(y,r))})),Y("Set",S.call(r),xe,P)}if((function(y){if(!m||!y||typeof y!="object")return!1;try{m.call(y,m);try{O.call(y,O)}catch{return!0}return y instanceof WeakMap}catch{}return!1})(r))return F("WeakMap");if((function(y){if(!O||!y||typeof y!="object")return!1;try{O.call(y,O);try{m.call(y,m)}catch{return!0}return y instanceof WeakSet}catch{}return!1})(r))return F("WeakSet");if((function(y){if(!E||!y||typeof y!="object")return!1;try{return E.call(y),!0}catch{}return!1})(r))return F("WeakRef");if((function(y){return pe(y)==="[object Number]"&&G(y)})(r))return g(ie(Number(r)));if((function(y){if(!y||typeof y!="object"||!D)return!1;try{return D.call(y),!0}catch{}return!1})(r))return g(ie(D.call(r)));if((function(y){return pe(y)==="[object Boolean]"&&G(y)})(r))return g(B.call(r));if((function(y){return pe(y)==="[object String]"&&G(y)})(r))return g(ie(String(r)));if(typeof window<"u"&&r===window)return"{ [object Window] }";if(typeof globalThis<"u"&&r===globalThis||Le!==void 0&&r===Le)return"{ [object globalThis] }";if(!(function(y){return pe(y)==="[object Date]"&&G(y)})(r)&&!te(r)){var je=H(r,ie),Te=V?V(r)===Object.prototype:r instanceof Object||r.constructor===Object,ke=r instanceof Object?"":"null prototype",qe=!Te&&M&&Object(r)===r&&M in r?u.call(pe(r),8,-1):ke?"Object":"",Ce=(Te||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"")+(qe||ke?"["+v.call(T.call([],qe||[],ke||[]),": ")+"] ":"");return je.length===0?Ce+"{}":P?Ce+"{"+w(je,P)+"}":Ce+"{ "+v.call(je,", ")+" }"}return String(r)};var we=Object.prototype.hasOwnProperty||function(o){return o in this};function re(o,r){return we.call(o,r)}function pe(o){return c.call(o)}function t(o,r){if(o.indexOf)return o.indexOf(r);for(var A=0,W=o.length;A<W;A++)if(o[A]===r)return A;return-1}function k(o,r){if(o.length>r.maxStringLength){var A=o.length-r.maxStringLength,W="... "+A+" more character"+(A>1?"s":"");return k(u.call(o,0,r.maxStringLength),r)+W}var U=X[r.quoteStyle||"single"];return U.lastIndex=0,ae(n.call(n.call(o,U,"\\$1"),/[\x00-\x1f]/g,e),"single",r)}function e(o){var r=o.charCodeAt(0),A={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return A?"\\"+A:"\\x"+(r<16?"0":"")+l.call(r.toString(16))}function g(o){return"Object("+o+")"}function F(o){return o+" { ? }"}function Y(o,r,A,W){return o+" ("+r+") {"+(W?w(A,W):v.call(A,", "))+"}"}function w(o,r){if(o.length===0)return"";var A=`
|
|
3
|
-
`+r.prev+r.base;return A+v.call(o,","+A)+`
|
|
4
|
-
`+r.prev}function H(o,r){var A=se(o),W=[];if(A){W.length=o.length;for(var U=0;U<o.length;U++)W[U]=re(o,U)?r(o[U],o):""}var C,z=typeof f=="function"?f(o):[];if(a){C={};for(var ue=0;ue<z.length;ue++)C["$"+z[ue]]=z[ue]}for(var ne in o)re(o,ne)&&(A&&String(Number(ne))===ne&&ne<o.length||a&&C["$"+ne]instanceof Symbol||(d.call(/[^\w$]/,ne)?W.push(r(ne,o)+": "+r(o[ne],o)):W.push(ne+": "+r(o[ne],o))));if(typeof f=="function")for(var ee=0;ee<z.length;ee++)K.call(o,z[ee])&&W.push("["+r(z[ee])+"]: "+r(o[z[ee]],o));return W}return Me}function dt(){if($e)return Ke;$e=1;var N=Re(),I=Ie(),q=function(b,Q,R){for(var S,j=b;(S=j.next)!=null;j=S)if(S.key===Q)return j.next=S.next,R||(S.next=b.next,b.next=S),S};return Ke=function(){var b,Q={assert:function(R){if(!Q.has(R))throw new I("Side channel does not contain "+N(R))},delete:function(R){var S=b&&b.next,j=(function(m,O){if(m)return q(m,O,!0)})(b,R);return j&&S&&S===j&&(b=void 0),!!j},get:function(R){return(function(S,j){if(S){var m=q(S,j);return m&&m.value}})(b,R)},has:function(R){return(function(S,j){return!!S&&!!q(S,j)})(b,R)},set:function(R,S){b||(b={next:void 0}),(function(j,m,O){var E=q(j,m);E?E.value=O:j.next={key:m,next:j.next,value:O}})(b,R,S)}};return Q}}function at(){if(Be)return ze;Be=1;var N=lt(),I=st(),q=Re(),b=Ie(),Q=N("%Map%",!0),R=I("Map.prototype.get",!0),S=I("Map.prototype.set",!0),j=I("Map.prototype.has",!0),m=I("Map.prototype.delete",!0),O=I("Map.prototype.size",!0);return ze=!!Q&&function(){var E,B={assert:function(c){if(!B.has(c))throw new b("Side channel does not contain "+q(c))},delete:function(c){if(E){var i=m(E,c);return O(E)===0&&(E=void 0),i}return!1},get:function(c){if(E)return R(E,c)},has:function(c){return!!E&&j(E,c)},set:function(c,i){E||(E=new Q),S(E,c,i)}};return B}}function ct(){if(Ge)return Ze;Ge=1;var N=Ie(),I=Re(),q=dt(),b=at(),Q=(function(){if(Ve)return Qe;Ve=1;var S=lt(),j=st(),m=Re(),O=at(),E=Ie(),B=S("%WeakMap%",!0),c=j("WeakMap.prototype.get",!0),i=j("WeakMap.prototype.set",!0),s=j("WeakMap.prototype.has",!0),u=j("WeakMap.prototype.delete",!0);return Qe=B?function(){var n,l,_={assert:function(d){if(!_.has(d))throw new E("Side channel does not contain "+m(d))},delete:function(d){if(B&&d&&(typeof d=="object"||typeof d=="function")){if(n)return u(n,d)}else if(O&&l)return l.delete(d);return!1},get:function(d){return B&&d&&(typeof d=="object"||typeof d=="function")&&n?c(n,d):l&&l.get(d)},has:function(d){return B&&d&&(typeof d=="object"||typeof d=="function")&&n?s(n,d):!!l&&l.has(d)},set:function(d,T){B&&d&&(typeof d=="object"||typeof d=="function")?(n||(n=new B),i(n,d,T)):O&&(l||(l=O()),l.set(d,T))}};return _}:O})(),R=Q||b||q;return Ze=function(){var S,j={assert:function(m){if(!j.has(m))throw new N("Side channel does not contain "+I(m))},delete:function(m){return!!S&&S.delete(m)},get:function(m){return S&&S.get(m)},has:function(m){return!!S&&S.has(m)},set:function(m,O){S||(S=R()),S.set(m,O)}};return j}}function Ue(){if(Ye)return Je;Ye=1;var N=String.prototype.replace,I=/%20/g,q="RFC3986";return Je={default:q,formatters:{RFC1738:function(b){return N.call(b,I,"+")},RFC3986:function(b){return String(b)}},RFC1738:"RFC1738",RFC3986:q}}function ut(){if(Xe)return Ae;Xe=1;var N=Ue(),I=ct(),q=Object.prototype.hasOwnProperty,b=Array.isArray,Q=I(),R=function(c,i){return Q.set(c,i),c},S=function(c){return Q.has(c)},j=function(c){return Q.get(c)},m=function(c,i){Q.set(c,i)},O=(function(){for(var c=[],i=0;i<256;++i)c[c.length]="%"+((i<16?"0":"")+i.toString(16)).toUpperCase();return c})(),E=function(c,i){for(var s=i&&i.plainObjects?{__proto__:null}:{},u=0;u<c.length;++u)c[u]!==void 0&&(s[u]=c[u]);return s},B=1024;return Ae={arrayToObject:E,assign:function(c,i){return Object.keys(i).reduce((function(s,u){return s[u]=i[u],s}),c)},combine:function(c,i,s,u){if(S(c)){var n=j(c)+1;return c[n]=i,m(c,n),c}var l=[].concat(c,i);return l.length>s?R(E(l,{plainObjects:u}),l.length-1):l},compact:function(c){for(var i=[{obj:{o:c},prop:"o"}],s=[],u=0;u<i.length;++u)for(var n=i[u],l=n.obj[n.prop],_=Object.keys(l),d=0;d<_.length;++d){var T=_[d],v=l[T];typeof v=="object"&&v!==null&&s.indexOf(v)===-1&&(i[i.length]={obj:l,prop:T},s[s.length]=v)}return(function(x){for(;x.length>1;){var p=x.pop(),D=p.obj[p.prop];if(b(D)){for(var f=[],h=0;h<D.length;++h)D[h]!==void 0&&(f[f.length]=D[h]);p.obj[p.prop]=f}}})(i),c},decode:function(c,i,s){var u=c.replace(/\+/g," ");if(s==="iso-8859-1")return u.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(u)}catch{return u}},encode:function(c,i,s,u,n){if(c.length===0)return c;var l=c;if(typeof c=="symbol"?l=Symbol.prototype.toString.call(c):typeof c!="string"&&(l=String(c)),s==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,(function(D){return"%26%23"+parseInt(D.slice(2),16)+"%3B"}));for(var _="",d=0;d<l.length;d+=B){for(var T=l.length>=B?l.slice(d,d+B):l,v=[],x=0;x<T.length;++x){var p=T.charCodeAt(x);p===45||p===46||p===95||p===126||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||n===N.RFC1738&&(p===40||p===41)?v[v.length]=T.charAt(x):p<128?v[v.length]=O[p]:p<2048?v[v.length]=O[192|p>>6]+O[128|63&p]:p<55296||p>=57344?v[v.length]=O[224|p>>12]+O[128|p>>6&63]+O[128|63&p]:(x+=1,p=65536+((1023&p)<<10|1023&T.charCodeAt(x)),v[v.length]=O[240|p>>18]+O[128|p>>12&63]+O[128|p>>6&63]+O[128|63&p])}_+=v.join("")}return _},isBuffer:function(c){return!(!c||typeof c!="object")&&!!(c.constructor&&c.constructor.isBuffer&&c.constructor.isBuffer(c))},isOverflow:S,isRegExp:function(c){return Object.prototype.toString.call(c)==="[object RegExp]"},markOverflow:R,maybeMap:function(c,i){if(b(c)){for(var s=[],u=0;u<c.length;u+=1)s[s.length]=i(c[u]);return s}return i(c)},merge:function c(i,s,u){if(!s)return i;if(typeof s!="object"&&typeof s!="function"){if(b(i)){var n=i.length;if(u&&typeof u.arrayLimit=="number"&&n>u.arrayLimit)return R(E(i.concat(s),u),n);i[n]=s}else{if(!i||typeof i!="object")return[i,s];if(S(i)){var l=j(i)+1;i[l]=s,m(i,l)}else{if(u&&u.strictMerge)return[i,s];(u&&(u.plainObjects||u.allowPrototypes)||!q.call(Object.prototype,s))&&(i[s]=!0)}}return i}if(!i||typeof i!="object"){if(S(s)){for(var _=Object.keys(s),d=u&&u.plainObjects?{__proto__:null,0:i}:{0:i},T=0;T<_.length;T++)d[parseInt(_[T],10)+1]=s[_[T]];return R(d,j(s)+1)}var v=[i].concat(s);return u&&typeof u.arrayLimit=="number"&&v.length>u.arrayLimit?R(E(v,u),v.length-1):v}var x=i;return b(i)&&!b(s)&&(x=E(i,u)),b(i)&&b(s)?(s.forEach((function(p,D){if(q.call(i,D)){var f=i[D];f&&typeof f=="object"&&p&&typeof p=="object"?i[D]=c(f,p,u):i[i.length]=p}else i[D]=p})),i):Object.keys(s).reduce((function(p,D){var f=s[D];if(q.call(p,D)?p[D]=c(p[D],f,u):p[D]=f,S(s)&&!S(p)&&R(p,j(s)),S(p)){var h=parseInt(D,10);String(h)===D&&h>=0&&h>j(p)&&m(p,h)}return p}),x)}},Ae}function mt(){if(et)return Ne;et=1;var N=ct(),I=ut(),q=Ue(),b=Object.prototype.hasOwnProperty,Q={brackets:function(i){return i+"[]"},comma:"comma",indices:function(i,s){return i+"["+s+"]"},repeat:function(i){return i}},R=Array.isArray,S=Array.prototype.push,j=function(i,s){S.apply(i,R(s)?s:[s])},m=Date.prototype.toISOString,O=q.default,E={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:I.encode,encodeValuesOnly:!1,filter:void 0,format:O,formatter:q.formatters[O],indices:!1,serializeDate:function(i){return m.call(i)},skipNulls:!1,strictNullHandling:!1},B={},c=function i(s,u,n,l,_,d,T,v,x,p,D,f,h,a,M,K,V,$){for(var Z,L=s,oe=$,le=0,X=!1;(oe=oe.get(B))!==void 0&&!X;){var ae=oe.get(s);if(le+=1,ae!==void 0){if(ae===le)throw new RangeError("Cyclic object value");X=!0}oe.get(B)===void 0&&(le=0)}if(typeof p=="function"?L=p(u,L):L instanceof Date?L=h(L):n==="comma"&&R(L)&&(L=I.maybeMap(L,(function(g){return g instanceof Date?h(g):g}))),L===null){if(d)return M(x&&!K?x(u,E.encoder,V,"key",a):u);L=""}if(typeof(Z=L)=="string"||typeof Z=="number"||typeof Z=="boolean"||typeof Z=="symbol"||typeof Z=="bigint"||I.isBuffer(L))return x?[M(K?u:x(u,E.encoder,V,"key",a))+"="+M(x(L,E.encoder,V,"value",a))]:[M(u)+"="+M(String(L))];var ce,G=[];if(L===void 0)return G;if(n==="comma"&&R(L))K&&x&&(L=I.maybeMap(L,(function(g){return g==null?g:x(g)}))),ce=[{value:L.length>0?L.join(",")||null:void 0}];else if(R(p))ce=p;else{var se=Object.keys(L);ce=D?se.sort(D):se}var te=v?String(u).replace(/\./g,"%2E"):String(u),ge=l&&R(L)&&L.length===1?te+"[]":te;if(_&&R(L)&&L.length===0)return ge+"[]";for(var we=0;we<ce.length;++we){var re=ce[we],pe=typeof re=="object"&&re&&re.value!==void 0?re.value:L[re];if(!T||pe!==null){var t=f&&v?String(re).replace(/\./g,"%2E"):String(re),k=R(L)?typeof n=="function"?n(ge,t):ge:ge+(f?"."+t:"["+t+"]");$.set(s,le);var e=N();e.set(B,$),j(G,i(pe,k,n,l,_,d,T,v,n==="comma"&&K&&R(L)?null:x,p,D,f,h,a,M,K,V,e))}}return G};return Ne=function(i,s){var u,n=i,l=(function(a){if(!a)return E;if(a.allowEmptyArrays!==void 0&&typeof a.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(a.encodeDotInKeys!==void 0&&typeof a.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(a.encoder!==null&&a.encoder!==void 0&&typeof a.encoder!="function")throw new TypeError("Encoder has to be a function.");var M=a.charset||E.charset;if(a.charset!==void 0&&a.charset!=="utf-8"&&a.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var K=q.default;if(a.format!==void 0){if(!b.call(q.formatters,a.format))throw new TypeError("Unknown format option provided.");K=a.format}var V,$=q.formatters[K],Z=E.filter;if((typeof a.filter=="function"||R(a.filter))&&(Z=a.filter),V=a.arrayFormat in Q?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":E.arrayFormat,"commaRoundTrip"in a&&typeof a.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var L=a.allowDots===void 0?a.encodeDotInKeys===!0||E.allowDots:!!a.allowDots;return{addQueryPrefix:typeof a.addQueryPrefix=="boolean"?a.addQueryPrefix:E.addQueryPrefix,allowDots:L,allowEmptyArrays:typeof a.allowEmptyArrays=="boolean"?!!a.allowEmptyArrays:E.allowEmptyArrays,arrayFormat:V,charset:M,charsetSentinel:typeof a.charsetSentinel=="boolean"?a.charsetSentinel:E.charsetSentinel,commaRoundTrip:!!a.commaRoundTrip,delimiter:a.delimiter===void 0?E.delimiter:a.delimiter,encode:typeof a.encode=="boolean"?a.encode:E.encode,encodeDotInKeys:typeof a.encodeDotInKeys=="boolean"?a.encodeDotInKeys:E.encodeDotInKeys,encoder:typeof a.encoder=="function"?a.encoder:E.encoder,encodeValuesOnly:typeof a.encodeValuesOnly=="boolean"?a.encodeValuesOnly:E.encodeValuesOnly,filter:Z,format:K,formatter:$,serializeDate:typeof a.serializeDate=="function"?a.serializeDate:E.serializeDate,skipNulls:typeof a.skipNulls=="boolean"?a.skipNulls:E.skipNulls,sort:typeof a.sort=="function"?a.sort:null,strictNullHandling:typeof a.strictNullHandling=="boolean"?a.strictNullHandling:E.strictNullHandling}})(s);typeof l.filter=="function"?n=(0,l.filter)("",n):R(l.filter)&&(u=l.filter);var _=[];if(typeof n!="object"||n===null)return"";var d=Q[l.arrayFormat],T=d==="comma"&&l.commaRoundTrip;u||(u=Object.keys(n)),l.sort&&u.sort(l.sort);for(var v=N(),x=0;x<u.length;++x){var p=u[x];if(p!=null){var D=n[p];l.skipNulls&&D===null||j(_,c(D,p,d,T,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,v))}}var f=_.join(l.delimiter),h=l.addQueryPrefix===!0?"?":"";return l.charsetSentinel&&(l.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B"+l.delimiter:h+="utf8=%E2%9C%93"+l.delimiter),f.length>0?h+f:""},Ne}function gt(){if(rt)return tt;rt=1;var N=ut(),I=Object.prototype.hasOwnProperty,q=Array.isArray,b={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:N.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},Q=function(j){return j.replace(/&#(\d+);/g,(function(m,O){return String.fromCharCode(parseInt(O,10))}))},R=function(j,m,O){if(j&&typeof j=="string"&&m.comma&&j.indexOf(",")>-1)return j.split(",");if(m.throwOnLimitExceeded&&O>=m.arrayLimit)throw new RangeError("Array limit exceeded. Only "+m.arrayLimit+" element"+(m.arrayLimit===1?"":"s")+" allowed in an array.");return j},S=function(j,m,O,E){if(j){var B=(function(c,i){var s=i.allowDots?c.replace(/\.([^.[]+)/g,"[$1]"):c;if(i.depth<=0)return!i.plainObjects&&I.call(Object.prototype,s)&&!i.allowPrototypes?void 0:[s];var u=[],n=s.indexOf("["),l=n>=0?s.slice(0,n):s;if(l){if(!i.plainObjects&&I.call(Object.prototype,l)&&!i.allowPrototypes)return;u[u.length]=l}for(var _=s.length,d=n,T=0;d>=0&&T<i.depth;){for(var v=1,x=d+1,p=-1;x<_&&p<0;){var D=s.charCodeAt(x);D===91?v+=1:D===93&&(v-=1)==0&&(p=x),x+=1}if(p<0)return u[u.length]="["+s.slice(d)+"]",u;var f=s.slice(d,p+1),h=f.slice(1,-1);if(!i.plainObjects&&I.call(Object.prototype,h)&&!i.allowPrototypes)return;u[u.length]=f,T+=1,d=s.indexOf("[",p+1)}if(d>=0){if(i.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+i.depth+" and strictDepth is true");u[u.length]="["+s.slice(d)+"]"}return u})(j,O);if(B)return(function(c,i,s,u){var n=0;if(c.length>0&&c[c.length-1]==="[]"){var l=c.slice(0,-1).join("");n=Array.isArray(i)&&i[l]?i[l].length:0}for(var _=u?i:R(i,s,n),d=c.length-1;d>=0;--d){var T,v=c[d];if(v==="[]"&&s.parseArrays)T=N.isOverflow(_)?_:s.allowEmptyArrays&&(_===""||s.strictNullHandling&&_===null)?[]:N.combine([],_,s.arrayLimit,s.plainObjects);else{T=s.plainObjects?{__proto__:null}:{};var x=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,p=s.decodeDotInKeys?x.replace(/%2E/g,"."):x,D=parseInt(p,10),f=!isNaN(D)&&v!==p&&String(D)===p&&D>=0&&s.parseArrays;if(s.parseArrays||p!=="")if(f&&D<s.arrayLimit)(T=[])[D]=_;else{if(f&&s.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+s.arrayLimit+" element"+(s.arrayLimit===1?"":"s")+" allowed in an array.");f?(T[D]=_,N.markOverflow(T,D)):p!=="__proto__"&&(T[p]=_)}else T={0:_}}_=T}return _})(B,m,O,E)}};return tt=function(j,m){var O=(function(n){if(!n)return b;if(n.allowEmptyArrays!==void 0&&typeof n.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(n.decodeDotInKeys!==void 0&&typeof n.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(n.decoder!==null&&n.decoder!==void 0&&typeof n.decoder!="function")throw new TypeError("Decoder has to be a function.");if(n.charset!==void 0&&n.charset!=="utf-8"&&n.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(n.throwOnLimitExceeded!==void 0&&typeof n.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var l=n.charset===void 0?b.charset:n.charset,_=n.duplicates===void 0?b.duplicates:n.duplicates;if(_!=="combine"&&_!=="first"&&_!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:n.allowDots===void 0?n.decodeDotInKeys===!0||b.allowDots:!!n.allowDots,allowEmptyArrays:typeof n.allowEmptyArrays=="boolean"?!!n.allowEmptyArrays:b.allowEmptyArrays,allowPrototypes:typeof n.allowPrototypes=="boolean"?n.allowPrototypes:b.allowPrototypes,allowSparse:typeof n.allowSparse=="boolean"?n.allowSparse:b.allowSparse,arrayLimit:typeof n.arrayLimit=="number"?n.arrayLimit:b.arrayLimit,charset:l,charsetSentinel:typeof n.charsetSentinel=="boolean"?n.charsetSentinel:b.charsetSentinel,comma:typeof n.comma=="boolean"?n.comma:b.comma,decodeDotInKeys:typeof n.decodeDotInKeys=="boolean"?n.decodeDotInKeys:b.decodeDotInKeys,decoder:typeof n.decoder=="function"?n.decoder:b.decoder,delimiter:typeof n.delimiter=="string"||N.isRegExp(n.delimiter)?n.delimiter:b.delimiter,depth:typeof n.depth=="number"||n.depth===!1?+n.depth:b.depth,duplicates:_,ignoreQueryPrefix:n.ignoreQueryPrefix===!0,interpretNumericEntities:typeof n.interpretNumericEntities=="boolean"?n.interpretNumericEntities:b.interpretNumericEntities,parameterLimit:typeof n.parameterLimit=="number"?n.parameterLimit:b.parameterLimit,parseArrays:n.parseArrays!==!1,plainObjects:typeof n.plainObjects=="boolean"?n.plainObjects:b.plainObjects,strictDepth:typeof n.strictDepth=="boolean"?!!n.strictDepth:b.strictDepth,strictMerge:typeof n.strictMerge=="boolean"?!!n.strictMerge:b.strictMerge,strictNullHandling:typeof n.strictNullHandling=="boolean"?n.strictNullHandling:b.strictNullHandling,throwOnLimitExceeded:typeof n.throwOnLimitExceeded=="boolean"&&n.throwOnLimitExceeded}})(m);if(j===""||j==null)return O.plainObjects?{__proto__:null}:{};for(var E=typeof j=="string"?(function(n,l){var _={__proto__:null},d=l.ignoreQueryPrefix?n.replace(/^\?/,""):n;d=d.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var T=l.parameterLimit===1/0?void 0:l.parameterLimit,v=d.split(l.delimiter,l.throwOnLimitExceeded&&T!==void 0?T+1:T);if(l.throwOnLimitExceeded&&T!==void 0&&v.length>T)throw new RangeError("Parameter limit exceeded. Only "+T+" parameter"+(T===1?"":"s")+" allowed.");var x,p=-1,D=l.charset;if(l.charsetSentinel)for(x=0;x<v.length;++x)v[x].indexOf("utf8=")===0&&(v[x]==="utf8=%E2%9C%93"?D="utf-8":v[x]==="utf8=%26%2310003%3B"&&(D="iso-8859-1"),p=x,x=v.length);for(x=0;x<v.length;++x)if(x!==p){var f,h,a=v[x],M=a.indexOf("]="),K=M===-1?a.indexOf("="):M+1;if(K===-1?(f=l.decoder(a,b.decoder,D,"key"),h=l.strictNullHandling?null:""):(f=l.decoder(a.slice(0,K),b.decoder,D,"key"))!==null&&(h=N.maybeMap(R(a.slice(K+1),l,q(_[f])?_[f].length:0),(function($){return l.decoder($,b.decoder,D,"value")}))),h&&l.interpretNumericEntities&&D==="iso-8859-1"&&(h=Q(String(h))),a.indexOf("[]=")>-1&&(h=q(h)?[h]:h),l.comma&&q(h)&&h.length>l.arrayLimit){if(l.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+l.arrayLimit+" element"+(l.arrayLimit===1?"":"s")+" allowed in an array.");h=N.combine([],h,l.arrayLimit,l.plainObjects)}if(f!==null){var V=I.call(_,f);V&&(l.duplicates==="combine"||a.indexOf("[]=")>-1)?_[f]=N.combine(_[f],h,l.arrayLimit,l.plainObjects):V&&l.duplicates!=="last"||(_[f]=h)}}return _})(j,O):j,B=O.plainObjects?{__proto__:null}:{},c=Object.keys(E),i=0;i<c.length;++i){var s=c[i],u=S(s,E[s],O,typeof j=="string");B=N.merge(B,u,O)}return O.allowSparse===!0?B:N.compact(B)}}function vt(){if(ot)return nt;ot=1;var N=mt(),I=gt();return nt={formats:Ue(),parse:I,stringify:N}}function jt(){return it||(it=1,(function(N,I){Object.defineProperty(I,"__esModule",{value:!0});var q=ht(),b=vt();function Q(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var R=Q(q),S=Q(b),j=R.default;function m(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var O=/^([a-z0-9.+-]+:)/i,E=/:[0-9]*$/,B=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
5
|
-
`," "]),i=["'"].concat(c),s=["%","/","?",";","#"].concat(i),u=["/","?","#"],n=/^[+a-z0-9A-Z_-]{0,63}$/,l=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=S.default;function x(t,k,e){if(t&&typeof t=="object"&&t instanceof m)return t;var g=new m;return g.parse(t,k,e),g}m.prototype.parse=function(t,k,e){if(typeof t!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var g=t.indexOf("?"),F=g!==-1&&g<t.indexOf("#")?"?":"#",Y=t.split(F);Y[0]=Y[0].replace(/\\/g,"/");var w=t=Y.join(F);if(w=w.trim(),!e&&t.split("#").length===1){var H=B.exec(w);if(H)return this.path=w,this.href=w,this.pathname=H[1],H[2]?(this.search=H[2],this.query=k?v.parse(this.search.substr(1)):this.search.substr(1)):k&&(this.search="",this.query={}),this}var o=O.exec(w);if(o){var r=(o=o[0]).toLowerCase();this.protocol=r,w=w.substr(o.length)}if(e||o||w.match(/^\/\/[^@/]+@[^@/]+/)){var A=w.substr(0,2)==="//";!A||o&&d[o]||(w=w.substr(2),this.slashes=!0)}if(!d[o]&&(A||o&&!T[o])){for(var W,U,C=-1,z=0;z<u.length;z++)(ue=w.indexOf(u[z]))!==-1&&(C===-1||ue<C)&&(C=ue);for((U=C===-1?w.lastIndexOf("@"):w.lastIndexOf("@",C))!==-1&&(W=w.slice(0,U),w=w.slice(U+1),this.auth=decodeURIComponent(W)),C=-1,z=0;z<s.length;z++){var ue;(ue=w.indexOf(s[z]))!==-1&&(C===-1||ue<C)&&(C=ue)}C===-1&&(C=w.length),this.host=w.slice(0,C),w=w.slice(C),this.parseHost(),this.hostname=this.hostname||"";var ne=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ne)for(var ee=this.hostname.split(/\./),ve=(z=0,ee.length);z<ve;z++){var P=ee[z];if(P&&!P.match(n)){for(var ie="",ye=0,Oe=P.length;ye<Oe;ye++)P.charCodeAt(ye)>127?ie+="x":ie+=P[ye];if(!ie.match(n)){var de=ee.slice(0,z),fe=ee.slice(z+1),he=P.match(l);he&&(de.push(he[1]),fe.unshift(he[2])),fe.length&&(w="/"+fe.join(".")+w),this.hostname=de.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),ne||(this.hostname=j.toASCII(this.hostname));var me=this.port?":"+this.port:"",_e=this.hostname||"";this.host=_e+me,this.href+=this.host,ne&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),w[0]!=="/"&&(w="/"+w))}if(!_[r])for(z=0,ve=i.length;z<ve;z++){var be=i[z];if(w.indexOf(be)!==-1){var Se=encodeURIComponent(be);Se===be&&(Se=escape(be)),w=w.split(be).join(Se)}}var xe=w.indexOf("#");xe!==-1&&(this.hash=w.substr(xe),w=w.slice(0,xe));var je=w.indexOf("?");if(je!==-1?(this.search=w.substr(je),this.query=w.substr(je+1),k&&(this.query=v.parse(this.query)),w=w.slice(0,je)):k&&(this.search="",this.query={}),w&&(this.pathname=w),T[r]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){me=this.pathname||"";var Te=this.search||"";this.path=me+Te}return this.href=this.format(),this},m.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var k=this.protocol||"",e=this.pathname||"",g=this.hash||"",F=!1,Y="";this.host?F=t+this.host:this.hostname&&(F=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(F+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(Y=v.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var w=this.search||Y&&"?"+Y||"";return k&&k.substr(-1)!==":"&&(k+=":"),this.slashes||(!k||T[k])&&F!==!1?(F="//"+(F||""),e&&e.charAt(0)!=="/"&&(e="/"+e)):F||(F=""),g&&g.charAt(0)!=="#"&&(g="#"+g),w&&w.charAt(0)!=="?"&&(w="?"+w),k+F+(e=e.replace(/[?#]/g,(function(H){return encodeURIComponent(H)})))+(w=w.replace("#","%23"))+g},m.prototype.resolve=function(t){return this.resolveObject(x(t,!1,!0)).format()},m.prototype.resolveObject=function(t){if(typeof t=="string"){var k=new m;k.parse(t,!1,!0),t=k}for(var e=new m,g=Object.keys(this),F=0;F<g.length;F++){var Y=g[F];e[Y]=this[Y]}if(e.hash=t.hash,t.href==="")return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var w=Object.keys(t),H=0;H<w.length;H++){var o=w[H];o!=="protocol"&&(e[o]=t[o])}return T[e.protocol]&&e.hostname&&!e.pathname&&(e.pathname="/",e.path=e.pathname),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!T[t.protocol]){for(var r=Object.keys(t),A=0;A<r.length;A++){var W=r[A];e[W]=t[W]}return e.href=e.format(),e}if(e.protocol=t.protocol,t.host||d[t.protocol])e.pathname=t.pathname;else{for(var U=(t.pathname||"").split("/");U.length&&!(t.host=U.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),U[0]!==""&&U.unshift(""),U.length<2&&U.unshift(""),e.pathname=U.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var C=e.pathname||"",z=e.search||"";e.path=C+z}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var ue=e.pathname&&e.pathname.charAt(0)==="/",ne=t.host||t.pathname&&t.pathname.charAt(0)==="/",ee=ne||ue||e.host&&t.pathname,ve=ee,P=e.pathname&&e.pathname.split("/")||[],ie=(U=t.pathname&&t.pathname.split("/")||[],e.protocol&&!T[e.protocol]);if(ie&&(e.hostname="",e.port=null,e.host&&(P[0]===""?P[0]=e.host:P.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(U[0]===""?U[0]=t.host:U.unshift(t.host)),t.host=null),ee=ee&&(U[0]===""||P[0]==="")),ne)e.host=t.host||t.host===""?t.host:e.host,e.hostname=t.hostname||t.hostname===""?t.hostname:e.hostname,e.search=t.search,e.query=t.query,P=U;else if(U.length)P||(P=[]),P.pop(),P=P.concat(U),e.search=t.search,e.query=t.query;else if(t.search!=null)return ie&&(e.host=P.shift(),e.hostname=e.host,(he=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=he.shift(),e.hostname=he.shift(),e.host=e.hostname)),e.search=t.search,e.query=t.query,e.pathname===null&&e.search===null||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e;if(!P.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var ye=P.slice(-1)[0],Oe=(e.host||t.host||P.length>1)&&(ye==="."||ye==="..")||ye==="",de=0,fe=P.length;fe>=0;fe--)(ye=P[fe])==="."?P.splice(fe,1):ye===".."?(P.splice(fe,1),de++):de&&(P.splice(fe,1),de--);if(!ee&&!ve)for(;de--;de)P.unshift("..");!ee||P[0]===""||P[0]&&P[0].charAt(0)==="/"||P.unshift(""),Oe&&P.join("/").substr(-1)!=="/"&&P.push("");var he,me=P[0]===""||P[0]&&P[0].charAt(0)==="/";return ie&&(e.hostname=me?"":P.length?P.shift():"",e.host=e.hostname,(he=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=he.shift(),e.hostname=he.shift(),e.host=e.hostname)),(ee=ee||e.host&&P.length)&&!me&&P.unshift(""),P.length>0?e.pathname=P.join("/"):(e.pathname=null,e.path=null),e.pathname===null&&e.search===null||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},m.prototype.parseHost=function(){var t=this.host,k=E.exec(t);k&&((k=k[0])!==":"&&(this.port=k.substr(1)),t=t.substr(0,t.length-k.length)),t&&(this.hostname=t)};var p=x,D=function(t,k){return x(t,!1,!0).resolve(k)},f=function(t,k){return t?x(t,!1,!0).resolveObject(k):k},h=function(t){return typeof t=="string"&&(t=x(t)),t instanceof m?t.format():m.prototype.format.call(t)},a=m,M=(function(t){function k(){var e=this||self;return delete t.prototype.__magic__,e}return typeof globalThis=="object"?globalThis:this?k():(t.defineProperty(t.prototype,"__magic__",{configurable:!0,get:k}),__magic__)})(Object),K=h,V=p,$=D,Z=a,L=M.URL,oe=M.URLSearchParams,le=/%/g,X=/\\/g,ae=/\n/g,ce=/\r/g,G=/\t/g,se=function(t){if(t===void 0)throw new TypeError('The "domain" argument must be specified');return new L("http://"+t).hostname},te=function(t){if(t===void 0)throw new TypeError('The "domain" argument must be specified');return new L("http://"+t).hostname},ge=function(t){var k=new L("file://"),e=(function(){for(var g="",F=!1,Y=arguments.length-1;Y>=-1&&!F;Y--){var w=Y>=0?arguments[Y]:"/";if(typeof w!="string")throw new TypeError("Arguments to path.resolve must be strings");w&&(g=w+"/"+g,F=w.charAt(0)==="/")}return g=(function(H,o){for(var r=0,A=H.length-1;A>=0;A--){var W=H[A];W==="."?H.splice(A,1):W===".."?(H.splice(A,1),r++):r&&(H.splice(A,1),r--)}if(o)for(;r--;r)H.unshift("..");return H})((function(H,o){if(H.filter)return H.filter(o);for(var r=[],A=0;A<H.length;A++)o(H[A],A,H)&&r.push(H[A]);return r})(g.split("/"),(function(H){return!!H})),!F).join("/"),(F?"/":"")+g||"."})(t);return t.charCodeAt(t.length-1)===47&&e[e.length-1]!=="/"&&(e+="/"),k.pathname=(function(g){return g.includes("%")&&(g=g.replace(le,"%25")),g.includes("\\")&&(g=g.replace(X,"%5C")),g.includes(`
|
|
6
|
-
`)&&(g=g.replace(ae,"%0A")),g.includes("\r")&&(g=g.replace(ce,"%0D")),g.includes(" ")&&(g=g.replace(G,"%09")),g})(e),k},we=function(t){if(!(function(e){var g=e??null;return!!(g!==null&&g?.href&&g?.origin)})(t)&&typeof t!="string")throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof t+" ("+t+")");var k=new L(t);if(k.protocol!=="file:")throw new TypeError("The URL must be of scheme file");return(function(e){if(e.hostname!=="")throw new TypeError('File URL host must be "localhost" or empty on browser');for(var g=e.pathname,F=0;F<g.length;F++)if(g[F]==="%"){var Y=32|g.codePointAt(F+2);if(g[F+1]==="2"&&Y===102)throw new TypeError("File URL path must not include encoded / characters")}return decodeURIComponent(g)})(k)},re=function(t,k){var e,g,F;if(k===void 0&&(k={}),!(t instanceof L))return K(t);if(typeof k!="object"||k===null)throw new TypeError('The "options" argument must be of type object.');var Y=(e=k.auth)==null||e,w=(g=k.fragment)==null||g,H=(F=k.search)==null||F;k.unicode;var o=new L(t.toString());return Y||(o.username="",o.password=""),w||(o.hash=""),H||(o.search=""),o.toString()},pe={format:re,parse:V,resolve:$,resolveObject:f,Url:Z,URL:L,URLSearchParams:oe,domainToASCII:se,domainToUnicode:te,pathToFileURL:ge,fileURLToPath:we};I.URL=L,I.URLSearchParams=oe,I.Url=Z,I.default=pe,I.domainToASCII=se,I.domainToUnicode=te,I.fileURLToPath=we,I.format=re,I.parse=V,I.pathToFileURL=ge,I.resolve=$,I.resolveObject=f,I=N.exports=pe})(Pe,Pe.exports)),Pe.exports}export{jt as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./sentry-xWYlrqHr.js";import{h as u,g,i as h,j as S}from"./core-DFhvjgE1.js";import{fB as y}from"./zeni-epic-state-DxmmAR38.js";import{a as k,a1 as C,e as A,ar as T,x as I,p as w,au as x}from"./index-Cp-pyxoH.js";import"./mui-DesXezzU.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]="9b239dd1-2d95-4fbd-a832-08f020964ee2",e._sentryDebugIdIdentifier="sentry-dbid-9b239dd1-2d95-4fbd-a832-08f020964ee2")}catch{}})();function B(e){const{mobileExploreReferrer:t}=e,{isAiCfoOpen:r,setIsAiCfoOpen:i}=k(),n=u(),o=g(),{tenantEmailDomain:s}=h(),l=C(),f=x(l),c=A(),p=T(),m=S((a=>a.tenantState.fetchState==="Completed"||a.tenantState.activeTenantFetchState.fetchState==="Completed"?y(a):void 0)),d=m?.masterTOSInfo?.isMasterTOSAccepted??!1;return{isAiCfoAccessEnabled:p&&c&&!r,onAskAiCfoClick:b.useCallback((()=>{if(s!=null)if(d)if(f){const a=w(o.state?.pathnameStackToGoBack,o.pathname);n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:a,referrer:t}})}else i(!0);else I({location:o,navigate:n,mergeState:{referrer:t}})}),[d,f,o,t,n,i,s])}}export{B as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-xWYlrqHr.js";import{bn as i}from"./zeni-epic-state-DxmmAR38.js";import{c as d,y as t}from"./index-Cp-pyxoH.js";import"./mui-DesXezzU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="06352327-8602-47e1-92a0-2079438d89f5",e._sentryDebugIdIdentifier="sentry-dbid-06352327-8602-47e1-92a0-2079438d89f5")}catch{}})();const c=e=>{const{useFeatureGate:s}=d(),{isFeatureEnabled:n}=s(t.isTaskManagerCustomerUserAccessEnabled),{isFeatureEnabled:o}=s(t.isTaskManagerNotificationControlsEnabled),a=r.useMemo((()=>i(e)),[e]);return{isNotificationControlsEnabled:a||o,isTaskManagerAccessEnabled:a||n,isZeniUser:a}};export{c as u};
|