@zeniai/web-app-ui 5.3.28-dev → 5.3.28-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-B122veFS.js → AccountMappingScreen-B8Z5Jukp.js} +1 -1
- package/dist/assets/{AddressRoutes-DD3PWqRR.js → AddressRoutes-AB7f2rQK.js} +1 -1
- package/dist/assets/{AddressScreen-Bjy224hY.js → AddressScreen-pJKlDi3q.js} +1 -1
- package/dist/assets/{AiCfoScreen-DRhzkgQ4.js → AiCfoScreen-bXnwas9y.js} +1 -1
- package/dist/assets/{AppDrawer-CmZR9V3S.js → AppDrawer-Bc0CsVN9.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DcPRvzvX.js → BillPayApprovalRoutes-BLyF1vsz.js} +1 -1
- package/dist/assets/{BillPayRoutes-7IbYVZQj.js → BillPayRoutes-C-gdP6KL.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Dj4DFEDZ.js → BusinessVerificationPageScreen-Boe3kgD5.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-DcOc6NVJ.js → CardsAiCfoScreen-BBJBV1b_.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CEoxoY5I.js → ChargeCardRoutes-CYP3hEhW.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DpK4Dun5.js → CompanyPassportScreen-wR6Twi6v.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-zGx9NWEX.js → ConnectionAuthScreen-C8yz1QVT.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-DMVsLagi.js → CustomerOnboardingAuthScreen-Cp-54_Na.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-Bm7Gq1zB.js → CustomerOnboardingRoutes-CHW2qzKd.js} +1 -1
- package/dist/assets/{DashboardRoutes-CvmjpCdE.js → DashboardRoutes-CiwFfaic.js} +1 -1
- package/dist/assets/{DefaultTenantHome-HJBBRJ83.js → DefaultTenantHome-B0-M7I8X.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-zmit7fsp.js → DomesticWireDetailScreen-CI14rSQG.js} +1 -1
- package/dist/assets/{DrawerScreen-DWt_1PTu.js → DrawerScreen-D4sZ0x81.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DU5uZwSh.js → EntityDetailRoutes-iu3nvuUO.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-nmpRmWJY.js → ExpenseAutomationRoutes-BcV9yLxC.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-CYw-FEeS.js → FeaturePreviewScreen-BRYywZxe.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-C0UKEWfL.js → HubSpotOAuthCallbackScreen-fyIv5A_N.js} +1 -1
- package/dist/assets/{InvoicingRoutes-DF1VvJ9T.js → InvoicingRoutes-Dcjbiv_o.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CaarfkKE.js → MagicLinkRoutes-DDMQyFLn.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BZGkiZxP.js → MagicLinkSignInScreen-D0umlmyl.js} +1 -1
- package/dist/assets/{MobileAppDrawer-IycZNEmR.js → MobileAppDrawer-DCgsEnVh.js} +1 -1
- package/dist/assets/{NotFoundScreen-zO8OLJhJ.js → NotFoundScreen-BZ7M6wRY.js} +1 -1
- package/dist/assets/{NotificationRoutes-6oHSrMqR.js → NotificationRoutes-P9DoW6gN.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-B7jDznQY.js → OAuthConsentScreen-BKn6Nxeb.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-Mhif0KAo.js → PandLWithForecastRoutes-BsegyO1D.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-4qP49dgi.js → PaymentLinkScreen-eNhR9FUM.js} +1 -1
- package/dist/assets/{PeopleRoutes-C4d4i6UU.js → PeopleRoutes-D6QzTTon.js} +1 -1
- package/dist/assets/{PerformanceRoutes-C3v9eigu.js → PerformanceRoutes-JzQ8nQOx.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CRdlPDmH.js → QBOConnectionScreen-BYc3DqHZ.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-MeE-8_Az.js → ReimbursementApprovalRoutes-DNX741Rs.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BJC5yP6d.js → ReimbursementApprovalRuleDetailScreen-2ORMbxwr.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-C9JSCnSD.js → ReimbursementRoutes-BN8vNYWi.js} +1 -1
- package/dist/assets/{ReportsRoutes-BDuInaYy.js → ReportsRoutes-Cq8Nmx-s.js} +1 -1
- package/dist/assets/{RewardsRoutes-rtTs69I9.js → RewardsRoutes-D5AiHAwp.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-Dp_gteYu.js → ScheduleDetailsPrepaidExpensesScreen-BWl6soT-.js} +1 -1
- package/dist/assets/{ScreenRoutes-Du_IBiRt.js → ScreenRoutes-DcyDHL-V.js} +2 -2
- package/dist/assets/{SettingsRoutes-CH7SZ849.js → SettingsRoutes-Cl1VWOb0.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BnC2-rFL.js → SetupPagesScreen-DAbhBEAF.js} +1 -1
- package/dist/assets/{SignInScreen-YOWRmGPP.js → SignInScreen-7BmIPffr.js} +1 -1
- package/dist/assets/{SignOutScreen-CMuTW5-H.js → SignOutScreen-CkhaclxF.js} +1 -1
- package/dist/assets/{TaskListScreen-BoU6HI4a.js → TaskListScreen-DBk5pNZk.js} +1 -1
- package/dist/assets/{TaskRoutes-Do0XX3yi.js → TaskRoutes-BPceEuj1.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-TY7uI7YZ.js → TransactionDetailRoutes-BL6LPgyb.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DGG9zgNP.js → TransactionDetailScreen-CsnmL0BT.js} +1 -1
- package/dist/assets/{TransactionListRoutes-qMXcP5Ma.js → TransactionListRoutes-DwAAMpvf.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Dc4_3bRC.js → TreasuryRoutes-CW1AM8Em.js} +1 -1
- package/dist/assets/{VendorsRoutes-BHfDZjVd.js → VendorsRoutes-BkMbhAF5.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-DW4J8Odf.js → WiseConfirmationScreen-BWYKTltN.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-B1Ed62sk.js → ZeniAccountRoutes-361LPKCn.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DUryI7rz.js → ZeniAccountStatementScreen-DSVS1O6h.js} +1 -1
- package/dist/assets/{analyticsHelper-BQQjHYVq.js → analyticsHelper-CGHyb6cb.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DF3_Oq5l.js → getLocaleForTenant-CyZtaI04.js} +1 -1
- package/dist/assets/{index-BzXVp9e6.js → index-waurk8Yr.js} +5 -5
- package/dist/assets/{routePaths-EETNAIMJ.js → routePaths-D2W1iWQZ.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-By0VhC82.js → useAiCfoDashboardSuggestedQuestionsChips-BrGfKrOJ.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-4GEN23bC.js → useAskAiCfoHostNavButtonProps-buoAy4Wo.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-B4sZutCZ.js → useChargeCardPusherEvents-29AHMbXs.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-C8LQEaOo.js → useEmailConnectResultRefresh-a5BahjbB.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DEkHgfRq.js → useInitialThreadRequest-BmsCi-c4.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-BagH02hb.js → useTaskManagerAccess-Boniioo_.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-D2qM2kUe.js → withTransactionSidePanel-Bd8MYkO_.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DOBkg1D1.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-DOBkg1D1.js";import E from"./NotFoundScreen-BZ7M6wRY.js";import{a as r}from"./sentry-B0nIwgR6.js";import{h as _,g as v,j as p,i as M,u as U,N as P,l as z,n as B,o as b}from"./core-D5xlmXJj.js";import{fB as N,a0h as h,bo as O,bn as F,iI as V,gd as $}from"./zeni-epic-state-DVQQo6UD.js";import{_ as q,z as I,as as G,dN as H}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import{M as K}from"./MobileAppDrawer-DCgsEnVh.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./InboxNotificationsProvider-B9BL9-5c.js";import"./useTaskManagerAccess-Boniioo_.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]="d0de1eb6-781f-4519-a756-f770b01b9b3e",e._sentryDebugIdIdentifier="sentry-dbid-d0de1eb6-781f-4519-a756-f770b01b9b3e")}catch{}})();const L=z((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(H),Q=()=>{const e=_(),t=v(),d=q(),o=p((a=>N(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=O(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=F(l),y=C||k||x,c=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),j=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(B,{children:[s.jsx(b,{path:"*",element:s.jsx(Q,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-DOBkg1D1.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-B0nIwgR6.js";import{L as dt,b_ as Tc,fB as Ac,Tb as Rc,U0 as kl,c7 as Tl}from"./zeni-epic-state-DVQQo6UD.js";import{a as lt,b as Al,c as Rl,d as Il,e as un,f as Pl,g as Nl,h as Ll,i as Vt,j as Ic,k as oe,l as je,m as $l,o as Yt,p as ue,q as Ml}from"./utils-DQ0YEP-f.js";import{r as cn}from"./empty-C81l0a_D.js";import{r as Cl,a as Dl,b as Fl,c as Bl}from"./pdf-lib-DU5YZRdD.js";import{r as Ul}from"./index-CcXiIb6r.js";import{r as ql}from"./index-B2tEu4AE.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-D5xlmXJj.js";import{u as Vl,z as Pc,L as Yl,ak as Kl,al as Wl,Y as Jl,C as Xl}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-DOBkg1D1.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-B0nIwgR6.js";import{L as dt,b_ as Tc,fB as Ac,Tb as Rc,U0 as kl,c7 as Tl}from"./zeni-epic-state-DVQQo6UD.js";import{a as lt,b as Al,c as Rl,d as Il,e as un,f as Pl,g as Nl,h as Ll,i as Vt,j as Ic,k as oe,l as je,m as $l,o as Yt,p as ue,q as Ml}from"./utils-DQ0YEP-f.js";import{r as cn}from"./empty-C81l0a_D.js";import{r as Cl,a as Dl,b as Fl,c as Bl}from"./pdf-lib-DU5YZRdD.js";import{r as Ul}from"./index-CcXiIb6r.js";import{r as ql}from"./index-B2tEu4AE.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-D5xlmXJj.js";import{u as Vl,z as Pc,L as Yl,ak as Kl,al as Wl,Y as Jl,C as Xl}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import{d as Pe}from"./decodeURIComponentSafe-N0xRs_hS.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="c40b5e59-3c93-4de7-ba34-14927ca8c829",t._sentryDebugIdIdentifier="sentry-dbid-c40b5e59-3c93-4de7-ba34-14927ca8c829")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,In,Pn,Nn,Ne,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,zn,Le,Zn,Hn,Vn,Yn,Kn,Wn,Jn,$e,Xn,Qn,to,eo,ro,no,oo,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(jn)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function u(r,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},u(r,e)}function d(r){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var a,p=o(r);if(e){var h=o(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(m,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(m)})(this,a)}}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(r)}jn=1;var c,i,n={};function s(r,e,a){a||(a=Error);var p=(function(h){(function(l,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(y&&y.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),y&&u(l,y)})(g,h);var m,b=d(g);function g(l,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(l,y,v)),S.code=r,S}return m=g,Object.defineProperty(m,"prototype",{writable:!1}),m})(a);n[r]=p}function f(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,m;if(c===void 0&&(c=ie()),c(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,l,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-l.length,y)===l})(r," argument"))m="The ".concat(r," ").concat(p," ").concat(f(e,"type"));else{var b=(function(g,l,y){return typeof y!="number"&&(y=0),!(y+l.length>g.length)&&g.indexOf(l,y)!==-1})(r,".")?"property":"argument";m='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(f(e,"type"))}return m+=". Received type ".concat(t(a))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";i===void 0&&(i=lt());var p=i.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),s("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(m){return'"'.concat(m,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),De.codes=n,De}function Ql(){if(kn)return xn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function u(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){d(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function d(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function o(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,c(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function i(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function s(k){var E=typeof Map=="function"?new Map:void 0;return s=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return f(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},s(k)}function f(k,E,j){return f=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},f.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}kn=1;var h=lt().inspect,m=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",l="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-DOBkg1D1.js";import W from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-DOBkg1D1.js";import W from"./NotFoundScreen-BZ7M6wRY.js";import{a as p}from"./sentry-B0nIwgR6.js";import{h as C,g as D,u as V,j as u,N as k,l as U,n as Y,o as h}from"./core-D5xlmXJj.js";import{fB as E,Yl as b,YC as R,MY as N,MU as B,MX as f,MN as L,Y$ as $,MR as z,M_ as K}from"./zeni-epic-state-DVQQo6UD.js";import{z as M,w as T,c9 as X,n as _,bS as q,ca as F}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import{u as G,R as x}from"./ReimbursementApprovalRuleDetailScreen-2ORMbxwr.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]="925e3954-4ded-459c-97c9-d2502457f5e1",e._sentryDebugIdIdentifier="sentry-dbid-925e3954-4ded-459c-97c9-d2502457f5e1")}catch{}})();const A="reimbursement-approval-rule-update",H=U((function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e($(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(X)),J=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>b(o))),g=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{g?.updateStatus.fetchState==="Completed"&&a(N())}),[g]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!1)))}),[t,S,e,a]),M.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${A}`]:[],eventCallback:(o,y,j)=>{o.endsWith(A)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(H,{currentTenant:c,location:n,navigate:s,...m})},I="reimbursement-approval-rule-update",P=U((function(e){const s=b(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e($(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))(T(F)),Q=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=q(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(J,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),g=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>b(i)));G();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(N())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||g!=="Not-Started"||e||(w(!0),a(z(!1,!0)))}),[v,g,e,a]),M.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${I}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(I)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return r.jsxs(Y,{children:[r.jsx(h,{path:"/",element:r.jsx(Q,{})}),r.jsx(h,{path:"/new",element:r.jsx(x,{})}),r.jsx(h,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(h,{path:"*",element:r.jsx(W,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-DOBkg1D1.js";import{a as f}from"./sentry-B0nIwgR6.js";import{u as U,j as g,h as _,g as O,i as V,l as k}from"./core-D5xlmXJj.js";import{mn as q,YC as w,Yl as C,MQ as B,N1 as j,MY as A,MZ as E,YD as N,fB as L,MX as z}from"./zeni-epic-state-DVQQo6UD.js";import{z as F,E as P,a7 as M,c0 as K,n as Y,bS as Q,c1 as W}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-DOBkg1D1.js";import{a as f}from"./sentry-B0nIwgR6.js";import{u as U,j as g,h as _,g as O,i as V,l as k}from"./core-D5xlmXJj.js";import{mn as q,YC as w,Yl as C,MQ as B,N1 as j,MY as A,MZ as E,YD as N,fB as L,MX as z}from"./zeni-epic-state-DVQQo6UD.js";import{z as F,E as P,a7 as M,c0 as K,n as Y,bS as Q,c1 as W}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.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]="818a12df-cfd1-4370-a586-b21de5e559f8",e._sentryDebugIdIdentifier="sentry-dbid-818a12df-cfd1-4370-a586-b21de5e559f8")}catch{}})();function X(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(q({})))}),[p,t,e])}const Z=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=Y(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach((d=>{const R=d.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=d.actors.selectedNonUsers.map((m=>{const y=(I=m.value,N(I)==null);var I;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(b);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(K);function G(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>C(n))),[a,u]=f.useState(!1);if(f.useEffect((()=>{a||(u(!0),s(B(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(M,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Z,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return N(e)==null}const H=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=Y(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach((y=>{const I=y.actorKind?.selectedOption,$=y.selectedRole?.selectedNonUsers??[];let D=[];I==="role"?D=$.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):I==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const b=S?.selection.selectedOptions??[];if(b.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>L(t))),{isApprovalRulesV3Enabled:s}=Q(e?.tenantId);return s?h.jsx(J,{}):h.jsx(G,{})}function J(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>C(n))),[a,u]=f.useState(!1);if(X(),f.useEffect((()=>{a||(u(!0),s(B(!1)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(M,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,X as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DOBkg1D1.js";import{u as ae,j as v,h as Q,g as J,i as ie,N as $,l as ee,q as ct,n as dt,o as w}from"./core-D5xlmXJj.js";import{fB as Z,MU as ut,_6 as ge,c7 as he,L_ as Le,m6 as pt,Md as ce,Mc as de,_7 as bt,bn as fe,gS as _e,_8 as gt,W4 as ht,lX as Me,W5 as Ce,W6 as ft,kJ as St,Y7 as It,kY as yt,LO as Rt,Bv as vt,kQ as At,Mz as $e,_9 as Pe,_a as Ee,_b as kt,_c as Ct,_d as Et,Mj as we,l2 as wt,Yg as xt,Mb as Bt,LY as Tt,_e as Dt,LX as jt,_f as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_g as Ne,Rx as Mt,bo as $t,M6 as Pt,MR as Nt,_h as Ot,_i as zt,Mv as Gt,Ms as Be,XD as Vt,LV as Zt,_j as Oe,Ni as Te,Nq as Ht,_k as Wt,_l as Y,_m as qt,_n as ze,_o as Yt,_p as Ge,_q as Ve,MH as ue,bu as Xt,bK as Se,cL as Ie,dV as Ze,dU as He,_r as Jt,gd as Kt,XQ as Qt,_s as en,_t as We,XU as tn,YC as nn,_u as an,Y$ as sn,Nn as De,Nm as on,_v as rn,_w as ln,_x as mn,_y as cn,_z as dn,Ym as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cF as fn,ct as Sn,bt as In,Tw as yn,d6 as Rn,d9 as vn,d8 as An,cE as kn}from"./zeni-epic-state-DVQQo6UD.js";import{bS as Cn,_ as qe,a1 as Ye,O as oe,y as x,z as _,cR as Xe,a8 as re,j as C,aS as je,J as F,ae as se,af as En,G as Je,cS as wn,p as X,as as Ke,cT as xn,V as le,cU as Bn,aq as Tn,ab as Dn,a7 as ye,S as Qe,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cV as _n,f as Mn}from"./index-BzXVp9e6.js";import{n as P,S as $n}from"./mui-DpenkF9f.js";import pe from"./NotFoundScreen-zO8OLJhJ.js";import{S as Fe}from"./SetupPagesScreen-BnC2-rFL.js";import{F as tt}from"./FeaturePreviewScreen-CYw-FEeS.js";import{a as h}from"./sentry-B0nIwgR6.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-4GEN23bC.js";import{u as nt}from"./useInitialThreadRequest-DEkHgfRq.js";import{D as Pn}from"./DrawerScreen-DWt_1PTu.js";import{M as at}from"./MobileAppDrawer-IycZNEmR.js";import{F as Nn}from"./ScreenRoutes-Du_IBiRt.js";import{R as On}from"./ReimbursementApprovalRoutes-MeE-8_Az.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./BusinessVerificationPageScreen-Dj4DFEDZ.js";import"./routePaths-EETNAIMJ.js";import"./analyticsHelper-BQQjHYVq.js";import"./InboxNotificationsProvider-B9BL9-5c.js";import"./useTaskManagerAccess-BagH02hb.js";import"./getLocaleForTenant-DF3_Oq5l.js";import"./ReimbursementApprovalRuleDetailScreen-BJC5yP6d.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]="516cb869-95f9-4c91-9ac7-19756c599687",e._sentryDebugIdIdentifier="sentry-dbid-516cb869-95f9-4c91-9ac7-19756c599687")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Je.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=qe(),d=Ye(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=J().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>Z(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((K=>Z(K))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:H}=Cn(O),W=v((K=>K.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||H||W==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,H,z,W,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Vn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Hn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Vn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-DOBkg1D1.js";import{u as ae,j as v,h as Q,g as J,i as ie,N as $,l as ee,q as ct,n as dt,o as w}from"./core-D5xlmXJj.js";import{fB as Z,MU as ut,_6 as ge,c7 as he,L_ as Le,m6 as pt,Md as ce,Mc as de,_7 as bt,bn as fe,gS as _e,_8 as gt,W4 as ht,lX as Me,W5 as Ce,W6 as ft,kJ as St,Y7 as It,kY as yt,LO as Rt,Bv as vt,kQ as At,Mz as $e,_9 as Pe,_a as Ee,_b as kt,_c as Ct,_d as Et,Mj as we,l2 as wt,Yg as xt,Mb as Bt,LY as Tt,_e as Dt,LX as jt,_f as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_g as Ne,Rx as Mt,bo as $t,M6 as Pt,MR as Nt,_h as Ot,_i as zt,Mv as Gt,Ms as Be,XD as Vt,LV as Zt,_j as Oe,Ni as Te,Nq as Ht,_k as Wt,_l as Y,_m as qt,_n as ze,_o as Yt,_p as Ge,_q as Ve,MH as ue,bu as Xt,bK as Se,cL as Ie,dV as Ze,dU as He,_r as Jt,gd as Kt,XQ as Qt,_s as en,_t as We,XU as tn,YC as nn,_u as an,Y$ as sn,Nn as De,Nm as on,_v as rn,_w as ln,_x as mn,_y as cn,_z as dn,Ym as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cF as fn,ct as Sn,bt as In,Tw as yn,d6 as Rn,d9 as vn,d8 as An,cE as kn}from"./zeni-epic-state-DVQQo6UD.js";import{bS as Cn,_ as qe,a1 as Ye,O as oe,y as x,z as _,cR as Xe,a8 as re,j as C,aS as je,J as F,ae as se,af as En,G as Je,cS as wn,p as X,as as Ke,cT as xn,V as le,cU as Bn,aq as Tn,ab as Dn,a7 as ye,S as Qe,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cV as _n,f as Mn}from"./index-waurk8Yr.js";import{n as P,S as $n}from"./mui-DpenkF9f.js";import pe from"./NotFoundScreen-BZ7M6wRY.js";import{S as Fe}from"./SetupPagesScreen-DAbhBEAF.js";import{F as tt}from"./FeaturePreviewScreen-BRYywZxe.js";import{a as h}from"./sentry-B0nIwgR6.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import{u as nt}from"./useInitialThreadRequest-BmsCi-c4.js";import{D as Pn}from"./DrawerScreen-D4sZ0x81.js";import{M as at}from"./MobileAppDrawer-DCgsEnVh.js";import{F as Nn}from"./ScreenRoutes-DcyDHL-V.js";import{R as On}from"./ReimbursementApprovalRoutes-DNX741Rs.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./BusinessVerificationPageScreen-Boe3kgD5.js";import"./routePaths-D2W1iWQZ.js";import"./analyticsHelper-CGHyb6cb.js";import"./InboxNotificationsProvider-B9BL9-5c.js";import"./useTaskManagerAccess-Boniioo_.js";import"./getLocaleForTenant-CyZtaI04.js";import"./ReimbursementApprovalRuleDetailScreen-2ORMbxwr.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]="516cb869-95f9-4c91-9ac7-19756c599687",e._sentryDebugIdIdentifier="sentry-dbid-516cb869-95f9-4c91-9ac7-19756c599687")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Je.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ee({}));const i=st(o),l=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Ue(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=qe(),d=Ye(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=J().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>Z(p))),g=v((p=>ge(p,r))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((K=>Z(K))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:H}=Cn(O),W=v((K=>K.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||H||W==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,H,z,W,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Vn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Hn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Vn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-DOBkg1D1.js";import{g as W,h as De,u as Oe,i as Fe,j as d,l as Ae,n as Pe,o as ee}from"./core-D5xlmXJj.js";import{fB as $,Dr as R,U1 as Ee,lX as le,tx as ce,um as F,lC as Le,lL as A,lD as P,kG as E,kx as L,kw as Be,CB as ie,ur as Me,bq as ve,U2 as Ve,bn as xe,DO as ze,U3 as Ge,U4 as He,ch as S,Cu as Ye,U5 as ae,U6 as qe,U7 as Ne,U8 as $e,U9 as Ze,Ua as Qe,Ub as Xe,Uc as Je,Ud as Ke,Ue as We,Uf as ea,Ug as aa,Uh as sa,Ui as U,Uj as B,Uk as M,Ul as v,Um as V,Un as x,Uo as z,Up as G,Uq as H,Ur as Y,e8 as ta,Ds as oa,Df as se,Dg as te,Dy as na,Dk as oe,DE as ra,Us as la,Ut as ca,Uu as ia,Uv as da,Uw as pa,Ux as _a,Uy as fa,Uz as ma,UA as ua,UB as ba,dV as ha,dU as ya}from"./zeni-epic-state-DVQQo6UD.js";import{an as Ca,ao as wa,ap as ga,a as Sa,a1 as Ia,O as de,y as q,z as pe,aq as Ra,V as Ta,d as Ua,ar as ja,as as ka,a8 as Da,j as N,S as Oa,s as Fa,p as _e,at as Aa,au as Pa,av as Ea}from"./index-BzXVp9e6.js";import"./mui-DpenkF9f.js";import La from"./NotFoundScreen-zO8OLJhJ.js";import{F as Ba}from"./FeaturePreviewScreen-CYw-FEeS.js";import{a as u}from"./sentry-B0nIwgR6.js";import{u as Ma}from"./useInitialThreadRequest-DEkHgfRq.js";import{t as ne,a as re,b as va}from"./routePaths-EETNAIMJ.js";import{M as Va}from"./MobileAppDrawer-IycZNEmR.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./InboxNotificationsProvider-B9BL9-5c.js";import"./useTaskManagerAccess-BagH02hb.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="42c0c0bb-06ec-4fa9-874c-67739886d19a",e._sentryDebugIdIdentifier="sentry-dbid-42c0c0bb-06ec-4fa9-874c-67739886d19a")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(M({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua()),e(ba())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=$(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(U(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?va(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(V({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(M({scrollPosition:s}));break;case"cash_flow":e(B({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(Je({viewMode:a})),e(Ke({viewMode:a}))):r?(e(We({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(U(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(U(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(U(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Qe({classesToFilterOut:a})):e(Xe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e($e({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(He(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Oe(),t=W(),{tenantEmailDomain:r}=Fe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(q.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=u.useState(!1),[Z,fe]=u.useState(!1),{isFeatureEnabled:Q}=l(q.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const k=d((n=>$(n))),me=k.masterTOSInfo?.isMasterTOSAccepted??!1,ue=k.company?.companyInfo.firstMonthOfFY??1,be=Ma(Q?k?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ra(),D=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(C(!0),s(F(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Z&&w==="Completed"&&b&&(s(F(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(D){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Be(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,D,O,b,T,g]);const X=Ta(),we=X?.loggedInUserRole!=null&&ve(X?.loggedInUserRole)!==!0,[ge,Se]=u.useState(!1),J=n=>{Se(n)},Ie=Ua(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:Ue}=W(),K=Ca(Ue??"")==="reports",je=wa(Te),ke=u.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:w==="Completed"}),ka({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Da,{analytics:N,onLoad:n=>n.trackPageLoaded(Oa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:J}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:D,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:J,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Fa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Q,initialOpenThreadRequest:be})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>$(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(q.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Ba,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ha,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
1
|
+
import{j as p}from"./liveblocks-DOBkg1D1.js";import{g as W,h as De,u as Oe,i as Fe,j as d,l as Ae,n as Pe,o as ee}from"./core-D5xlmXJj.js";import{fB as $,Dr as R,U1 as Ee,lX as le,tx as ce,um as F,lC as Le,lL as A,lD as P,kG as E,kx as L,kw as Be,CB as ie,ur as Me,bq as ve,U2 as Ve,bn as xe,DO as ze,U3 as Ge,U4 as He,ch as S,Cu as Ye,U5 as ae,U6 as qe,U7 as Ne,U8 as $e,U9 as Ze,Ua as Qe,Ub as Xe,Uc as Je,Ud as Ke,Ue as We,Uf as ea,Ug as aa,Uh as sa,Ui as U,Uj as B,Uk as M,Ul as v,Um as V,Un as x,Uo as z,Up as G,Uq as H,Ur as Y,e8 as ta,Ds as oa,Df as se,Dg as te,Dy as na,Dk as oe,DE as ra,Us as la,Ut as ca,Uu as ia,Uv as da,Uw as pa,Ux as _a,Uy as fa,Uz as ma,UA as ua,UB as ba,dV as ha,dU as ya}from"./zeni-epic-state-DVQQo6UD.js";import{an as Ca,ao as wa,ap as ga,a as Sa,a1 as Ia,O as de,y as q,z as pe,aq as Ra,V as Ta,d as Ua,ar as ja,as as ka,a8 as Da,j as N,S as Oa,s as Fa,p as _e,at as Aa,au as Pa,av as Ea}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import La from"./NotFoundScreen-BZ7M6wRY.js";import{F as Ba}from"./FeaturePreviewScreen-BRYywZxe.js";import{a as u}from"./sentry-B0nIwgR6.js";import{u as Ma}from"./useInitialThreadRequest-BmsCi-c4.js";import{t as ne,a as re,b as va}from"./routePaths-D2W1iWQZ.js";import{M as Va}from"./MobileAppDrawer-DCgsEnVh.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./InboxNotificationsProvider-B9BL9-5c.js";import"./useTaskManagerAccess-Boniioo_.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="42c0c0bb-06ec-4fa9-874c-67739886d19a",e._sentryDebugIdIdentifier="sentry-dbid-42c0c0bb-06ec-4fa9-874c-67739886d19a")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(M({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua()),e(ba())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=$(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(U(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?va(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(V({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(M({scrollPosition:s}));break;case"cash_flow":e(B({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(Je({viewMode:a})),e(Ke({viewMode:a}))):r?(e(We({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(U(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(U(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(U(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Qe({classesToFilterOut:a})):e(Xe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e($e({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(He(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Oe(),t=W(),{tenantEmailDomain:r}=Fe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(q.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=u.useState(!1),[Z,fe]=u.useState(!1),{isFeatureEnabled:Q}=l(q.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const k=d((n=>$(n))),me=k.masterTOSInfo?.isMasterTOSAccepted??!1,ue=k.company?.companyInfo.firstMonthOfFY??1,be=Ma(Q?k?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=Ra(),D=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(C(!0),s(F(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Z&&w==="Completed"&&b&&(s(F(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(D){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Be(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,D,O,b,T,g]);const X=Ta(),we=X?.loggedInUserRole!=null&&ve(X?.loggedInUserRole)!==!0,[ge,Se]=u.useState(!1),J=n=>{Se(n)},Ie=Ua(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:Ue}=W(),K=Ca(Ue??"")==="reports",je=wa(Te),ke=u.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:w==="Completed"}),ka({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Da,{analytics:N,onLoad:n=>n.trackPageLoaded(Oa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:J}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:D,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:J,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Fa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Q,initialOpenThreadRequest:be})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>$(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(q.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Ba,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ha,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DOBkg1D1.js";import{z as j,a8 as N,j as f,S as b,e1 as E,O as k,y as I}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-DOBkg1D1.js";import{z as j,a8 as N,j as f,S as b,e1 as E,O as k,y as I}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import g from"./NotFoundScreen-BZ7M6wRY.js";import{a as c}from"./sentry-B0nIwgR6.js";import{u as C,j as y,h as F,g as L,l as T,n as U,o as d,N as h}from"./core-D5xlmXJj.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-DVQQo6UD.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.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]="3d8623ed-319a-41de-849e-d49d9293c21d",e._sentryDebugIdIdentifier="sentry-dbid-3d8623ed-319a-41de-849e-d49d9293c21d")}catch{}})();const G=T((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=j.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(B())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(E),O=()=>{const e=C(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=y((o=>_(o))),l=F(),x=L(),u=j.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=y((o=>w(o))),D=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:f,onLoad:o=>(v=>v.trackPageLoaded(b.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:l,location:x,currentTenant:r,companyName:S,userName:D,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as E}from"./liveblocks-DOBkg1D1.js";import{a as I}from"./sentry-B0nIwgR6.js";import{i as M,u as q,h as W,g as z,j as h,l as Z}from"./core-D5xlmXJj.js";import{V$ as be,W0 as we,lX as X,rP as Je,r$ as Ne,sh as je,sf as Oe,si as Pe,sl as _e,W1 as Ve,fB as F,U_ as oe,W2 as de,gX as H,cA as Q,cB as ee,Ew as fe,W3 as Se,EA as Me,Sn as ie,Eu as Ge,Eo as Re,W4 as ue,Eg as $e,Ef as Fe,Ea as Ue,El as Ye,EB as Ke,W5 as U,W6 as re,Eh as We,U$ as te,gL as ge,ER as Ee,EK as De,W7 as ke,rV as Ce,EE as ye,EC as ve,W8 as Ae,EY as Ie,EV as xe,EF as Te,EX as Be}from"./zeni-epic-state-DVQQo6UD.js";import{a4 as ae,aY as ne,aZ as ze,z as qe,h as Ze,a7 as Xe,a8 as le,j as O,av as He,a_ as Qe,p as _,G as he,_ as me,a$ as et,b0 as tt,b1 as at}from"./index-
|
|
1
|
+
import{j as E}from"./liveblocks-DOBkg1D1.js";import{a as I}from"./sentry-B0nIwgR6.js";import{i as M,u as q,h as W,g as z,j as h,l as Z}from"./core-D5xlmXJj.js";import{V$ as be,W0 as we,lX as X,rP as Je,r$ as Ne,sh as je,sf as Oe,si as Pe,sl as _e,W1 as Ve,fB as F,U_ as oe,W2 as de,gX as H,cA as Q,cB as ee,Ew as fe,W3 as Se,EA as Me,Sn as ie,Eu as Ge,Eo as Re,W4 as ue,Eg as $e,Ef as Fe,Ea as Ue,El as Ye,EB as Ke,W5 as U,W6 as re,Eh as We,U$ as te,gL as ge,ER as Ee,EK as De,W7 as ke,rV as Ce,EE as ye,EC as ve,W8 as Ae,EY as Ie,EV as xe,EF as Te,EX as Be}from"./zeni-epic-state-DVQQo6UD.js";import{a4 as ae,aY as ne,aZ as ze,z as qe,h as Ze,a7 as Xe,a8 as le,j as O,av as He,a_ as Qe,p as _,G as he,_ as me,a$ as et,b0 as tt,b1 as at}from"./index-waurk8Yr.js";import{n as pe}from"./mui-DpenkF9f.js";import{p as nt}from"./pathToGoBack-Cjq5n9wd.js";import K from"./NotFoundScreen-BZ7M6wRY.js";import{c as V}from"./routePaths-D2W1iWQZ.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]="1b47df82-e4af-4497-8bd3-d92357d2fbb9",e._sentryDebugIdIdentifier="sentry-dbid-1b47df82-e4af-4497-8bd3-d92357d2fbb9")}catch{}})();function bt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:d}={}){const{accrualId:l}=M(),s=t??l,n=q(),u=W(),a=z(),{accrual:c,actionFetchState:o,detailFetchState:g,localData:D}=h((i=>be(i,s??""))),C=h((i=>we(i))),x=h((i=>X(i))),r=I.useCallback((()=>{const i=ae(a.state?.pathnameStackToGoBack);u(i.poppedPathname??nt(4),{state:{pathnameStackToGoBack:i.newStack}})}),[a.state,u]),k=I.useRef(!1);return I.useEffect((()=>{o.fetchState!=="In-Progress"&&k.current&&o.fetchState==="Completed"&&(k.current=!1,r())}),[o.fetchState,r]),I.useEffect((()=>{s!=null&&c==null&&g.fetchState==="Not-Started"&&n(Je(s))}),[s,c,g.fetchState]),I.useEffect((()=>{n(Ne({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?E.jsx(K,{}):c==null?g.fetchState==="Not-Started"||g.fetchState==="In-Progress"?E.jsx(ne,{}):E.jsx(K,{}):E.jsx(ze,{isRenderedInPanel:e,accrual:c,actionFetchState:o.fetchState,isAccountingClassesEnabled:x,localData:D,newAccrualAccountsView:C,onAccrualFormChange:(i,m)=>{n(Ve({accrualId:i,localData:m}))},onAccrualFormClear:i=>{n(_e({accrualId:i}))},onApproveAndPost:i=>{n(Pe(s,i))},onNavigateBack:d??r,onRevert:(i,m)=>{k.current=!0,n(Oe(s,i,m))},onSkip:(i,m)=>{n(je(s,i,m))}})}const lt=he.getLocalizedStrings(),st=Z((function(e,t){const d=de(e,t.scheduleTab),l=e.tenantState.currentTenantId;return{authParams:{userId:t.signedInUser.userId??"",sessionId:t.signedInUser.zeniSessionId??"",tenantId:l??""},linkBillExpenseView:d.linkBillExpenseView,transactions:d.linkBillExpenseView.transactions}}),(function(e,t){const{navigate:d,location:l}=t;return{onTransactionSelect(s){e(Se({selectedTransaction:s}))},onBackClick:()=>{d("..",{relative:"path"})},onCancel(){e(Se({selectedTransaction:void 0})),e(Me()),d("..",{relative:"path"})},onTransactionClick:s=>{const n=`${V(s,t.tenantEmailDomain)}`,u=_(l.state?.pathnameStackToGoBack,l.pathname);d(n,{state:{pathnameStackToGoBack:u}})},onLinkSave(){t.setShouldNavigateBack(!1),e(fe(t.scheduleTab,t.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(Qe),wt=({setShouldNavigateBack:e})=>{const t=W(),d=z(),{scheduleDetailId:l,tenantEmailDomain:s}=M(),{scheduleType:n}=M();if(s==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const u=h((r=>F(r))),a=oe(n)??"accrued_expenses",c=qe.getSignedInUser();if(c==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(l==null)throw Error("Invalid Schedule Detail Id");const o=h((r=>de(r,a))),g=o.selectedJELinkRowIndex,D=h((r=>H(r,u.companyId))),C=Ze(o.updateStatus.fetchState);I.useEffect((()=>{C==="In-Progress"&&o.updateStatus.fetchState==="Completed"&&t("..",{relative:"path"})}),[C,o.updateStatus.fetchState]),I.useEffect((()=>{o.fetchState==="Not-Started"&&t("..",{relative:"path"})}),[]),I.useEffect((()=>{o.selectedJEAccruedSchedule!=null&&o.selectedJELinkRowIndex!=null||t("..",{relative:"path"})}),[o.selectedJEAccruedSchedule,o.selectedJELinkRowIndex]);const x=o.linkBillExpenseView.fetchState==="Completed";return E.jsx(E.Fragment,{children:o.linkBillExpenseView.fetchState==="In-Progress"?E.jsx(Xe,{fetchState:o.linkBillExpenseView.fetchState}):o.selectedJEAccruedSchedule!=null&&g!=null?E.jsxs(E.Fragment,{children:[x===!0?E.jsx(le,{analytics:O,onLoad:()=>{ct(o,a,D)}}):null,E.jsx(st,{signedInUser:c,attachmentEndPoint:`${He}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:o.selectedJEAccruedSchedule.vendor.id??"",location:d,tenantEmailDomain:s,scheduleAccruedDetailsView:o,saveFetchState:o.updateStatus.fetchState,scheduleTab:a,navigate:t,analytics:O,controllerUserDetails:D,saveStatus:o.updateStatus.fetchState,jeAccruedSchedule:o.selectedJEAccruedSchedule,localData:o.scheduleAccruedDetailsLocalData.jeScheduleDetails[g]})]}):null})},Le=e=>{const t=lt.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(t)??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(t)??null,endMonth:e.endDate?.format(t)??null}},ct=(e,t,d)=>{const l=e.selectedJEAccruedSchedule,s=e.selectedJELinkRowIndex;let n;s!=null&&l!=null&&(n=l.scheduledJournalEntry[s]);const{transactions:u}=e.linkBillExpenseView,a=u.some((g=>g.isRecommendedTransaction===!0)),c=Q(d.controllers),o=ee(d.controllerUserIds);l!=null&&O.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:t,schedule:{...Le(l)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:a,journalEntryPostingStatus:n?.status.label??""},vendorName:l.vendor.name??null,controllerEmails:c,controllerUserIds:o})},ot=pe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-
|
|
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 bs,br as fs,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 Bs,cE as Ss,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-DVQQo6UD.js";import{j as e}from"./liveblocks-DOBkg1D1.js";import{a as U}from"./sentry-B0nIwgR6.js";import{N as u,u as Gs,h as $s,i as zs,g as qs,j as $,q as Te,n as Ws,o as t}from"./core-D5xlmXJj.js";import{M as l,E as Ys,u as Js,z as y,O as Qs,d as Ks,W as Xs,y as M,f as en,N as sn,V as nn,L as F,G as Ae,t as _,P as tn,Q as an,j as ne}from"./index-BzXVp9e6.js";import"./mui-DpenkF9f.js";import{f as be}from"./analyticsHelper-BQQjHYVq.js";import{t as on}from"./getLocaleForTenant-DF3_Oq5l.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]="a7a7cbbf-f686-4db8-b85a-170dc2c078f0",a._sentryDebugIdIdentifier="sentry-dbid-a7a7cbbf-f686-4db8-b85a-170dc2c078f0")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-zO8OLJhJ.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`}),fe=({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:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):B?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-CvmjpCdE.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-7IbYVZQj.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-C9JSCnSD.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-qMXcP5Ma.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-CH7SZ849.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-BDuInaYy.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CEoxoY5I.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-C4d4i6UU.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-nmpRmWJY.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-Dc4_3bRC.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-BHfDZjVd.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-B1Ed62sk.js")),__vite__mapDeps([55,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-BDuInaYy.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-DD3PWqRR.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-C4d4i6UU.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-Mhif0KAo.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-Bm7Gq1zB.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-BHfDZjVd.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-TY7uI7YZ.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-DU5uZwSh.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-CvmjpCdE.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-7IbYVZQj.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-CH7SZ849.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-DF1VvJ9T.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-C9JSCnSD.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-B1Ed62sk.js")),__vite__mapDeps([55,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-Dc4_3bRC.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),bn=l((()=>s((()=>import("./TransactionListRoutes-qMXcP5Ma.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),fn=l((()=>s((()=>import("./ChargeCardRoutes-CEoxoY5I.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-6oHSrMqR.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),Dn=l((()=>s((()=>import("./PerformanceRoutes-C3v9eigu.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-nmpRmWJY.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-rtTs69I9.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-Do0XX3yi.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-DRhzkgQ4.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-DcOc6NVJ.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-zO8OLJhJ.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Un=l((()=>s((()=>import("./TaskListScreen-BoU6HI4a.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),wn=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,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"}):B?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(),B=$s(),{tenantEmailDomain:i}=zs(),V=Ys().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Js(),b=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),J=ms(I),z=qs(),[L,we]=U.useState(!1),r=$((o=>_s(o))),{useFeatureGate:S}=Qs(),Z=Ks(),ae=Xs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(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),Be=!ke||!!He,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:K}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(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&&be(I,r,V)}const G={tenantId:b,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&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=As(Number(f[0])),n=Number(f[1]),c=bs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=fs();c.isAfter(N,"month")===!1?A(ys(b,{month:d,year:n})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),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,f,d,n){if(xe(f?.userId,f?.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))}),[b]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const W=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(W&&us){H(Re(n));const Y=y.getSignedInUserTenantWithId(n);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.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 W&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(je(c.userId,n))),W&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Ie(c.userId,n)));if(W){ne.identify(c.userId,{tenant_id:n});const Y=n==null||n!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),Y&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,I,O,A))}),[b,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Cs(q.tenantsBaseInOrder)),I!=null&&be(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"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,f=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)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:qe}=S(M.isReferralFeatureEnabled),We=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ye=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=!Be&&!P,Je=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=Bs(h?.loggedInUserRoleMap),g=Ss(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||Je===!0||ts===!0||as===!0;return y.isSignedIn()?b==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||J&&!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||J?!L||se!==!1||X||J?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{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||We||Ye?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(bn,{}):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:Se?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(fn,{}):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
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BZ7M6wRY.js","assets/sentry-B0nIwgR6.js","assets/core-D5xlmXJj.js","assets/zeni-epic-state-DVQQo6UD.js","assets/index-waurk8Yr.js","assets/mui-DpenkF9f.js","assets/analytics-Cuu7a7XR.js","assets/utils-DQ0YEP-f.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-CiwFfaic.js","assets/withTransactionSidePanel-Bd8MYkO_.js","assets/useAskAiCfoHostNavButtonProps-buoAy4Wo.js","assets/TransactionDetailScreen-CsnmL0BT.js","assets/decodeURIComponentSafe-N0xRs_hS.js","assets/useInitialThreadRequest-BmsCi-c4.js","assets/routePaths-D2W1iWQZ.js","assets/expenseAutomationHelper-BchoKsfU.js","assets/analyticsHelper-CGHyb6cb.js","assets/CompanyPassportScreen-wR6Twi6v.js","assets/MobileAppDrawer-DCgsEnVh.js","assets/InboxNotificationsProvider-B9BL9-5c.js","assets/useTaskManagerAccess-Boniioo_.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BrGfKrOJ.js","assets/FeaturePreviewScreen-BRYywZxe.js","assets/BillPayRoutes-C-gdP6KL.js","assets/AddressScreen-pJKlDi3q.js","assets/DomesticWireDetailScreen-CI14rSQG.js","assets/BusinessVerificationPageScreen-Boe3kgD5.js","assets/DrawerScreen-D4sZ0x81.js","assets/SetupPagesScreen-DAbhBEAF.js","assets/BillPayApprovalRoutes-BLyF1vsz.js","assets/ReimbursementApprovalRuleDetailScreen-2ORMbxwr.js","assets/getLocaleForTenant-CyZtaI04.js","assets/ReimbursementRoutes-BN8vNYWi.js","assets/ReimbursementApprovalRoutes-DNX741Rs.js","assets/TransactionListRoutes-DwAAMpvf.js","assets/ZeniAccountStatementScreen-DSVS1O6h.js","assets/SettingsRoutes-Cl1VWOb0.js","assets/AccountMappingScreen-B8Z5Jukp.js","assets/QBOConnectionScreen-BYc3DqHZ.js","assets/empty-C81l0a_D.js","assets/index-CcXiIb6r.js","assets/url-kBT6SwtU.js","assets/index-B2tEu4AE.js","assets/accountMappingHelper-BgNXnMXC.js","assets/useEmailConnectResultRefresh-a5BahjbB.js","assets/ReportsRoutes-Cq8Nmx-s.js","assets/ChargeCardRoutes-CYP3hEhW.js","assets/useChargeCardPusherEvents-29AHMbXs.js","assets/PeopleRoutes-D6QzTTon.js","assets/ExpenseAutomationRoutes-BcV9yLxC.js","assets/ScheduleDetailsPrepaidExpensesScreen-BWl6soT-.js","assets/pathToGoBack-Cjq5n9wd.js","assets/TreasuryRoutes-CW1AM8Em.js","assets/VendorsRoutes-BkMbhAF5.js","assets/ZeniAccountRoutes-361LPKCn.js","assets/AddressRoutes-AB7f2rQK.js","assets/PandLWithForecastRoutes-BsegyO1D.js","assets/CustomerOnboardingRoutes-CHW2qzKd.js","assets/TransactionDetailRoutes-BL6LPgyb.js","assets/EntityDetailRoutes-iu3nvuUO.js","assets/InvoicingRoutes-Dcjbiv_o.js","assets/NotificationRoutes-P9DoW6gN.js","assets/PerformanceRoutes-JzQ8nQOx.js","assets/RewardsRoutes-D5AiHAwp.js","assets/TaskRoutes-BPceEuj1.js","assets/TaskListScreen-DBk5pNZk.js","assets/AiCfoScreen-bXnwas9y.js","assets/CardsAiCfoScreen-BBJBV1b_.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 bs,br as fs,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 Bs,cE as Ss,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-DVQQo6UD.js";import{j as e}from"./liveblocks-DOBkg1D1.js";import{a as U}from"./sentry-B0nIwgR6.js";import{N as u,u as Gs,h as $s,i as zs,g as qs,j as $,q as Te,n as Ws,o as t}from"./core-D5xlmXJj.js";import{M as l,E as Ys,u as Js,z as y,O as Qs,d as Ks,W as Xs,y as M,f as en,N as sn,V as nn,L as F,G as Ae,t as _,P as tn,Q as an,j as ne}from"./index-waurk8Yr.js";import"./mui-DpenkF9f.js";import{f as be}from"./analyticsHelper-CGHyb6cb.js";import{t as on}from"./getLocaleForTenant-CyZtaI04.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]="a7a7cbbf-f686-4db8-b85a-170dc2c078f0",a._sentryDebugIdIdentifier="sentry-dbid-a7a7cbbf-f686-4db8-b85a-170dc2c078f0")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-BZ7M6wRY.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`}),fe=({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:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):B?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-CiwFfaic.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-C-gdP6KL.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-BN8vNYWi.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-DwAAMpvf.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-Cl1VWOb0.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-Cq8Nmx-s.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CYP3hEhW.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-D6QzTTon.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BcV9yLxC.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-CW1AM8Em.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-BkMbhAF5.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-361LPKCn.js")),__vite__mapDeps([55,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-Cq8Nmx-s.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-AB7f2rQK.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-D6QzTTon.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-BsegyO1D.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-CHW2qzKd.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-BkMbhAF5.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-BL6LPgyb.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-iu3nvuUO.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-CiwFfaic.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-C-gdP6KL.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-Cl1VWOb0.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-Dcjbiv_o.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-BN8vNYWi.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-361LPKCn.js")),__vite__mapDeps([55,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-CW1AM8Em.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),bn=l((()=>s((()=>import("./TransactionListRoutes-DwAAMpvf.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),fn=l((()=>s((()=>import("./ChargeCardRoutes-CYP3hEhW.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-P9DoW6gN.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),Dn=l((()=>s((()=>import("./PerformanceRoutes-JzQ8nQOx.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-BcV9yLxC.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-D5AiHAwp.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-BPceEuj1.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-bXnwas9y.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-BBJBV1b_.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-BZ7M6wRY.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Un=l((()=>s((()=>import("./TaskListScreen-DBk5pNZk.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),wn=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,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"}):B?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(),B=$s(),{tenantEmailDomain:i}=zs(),V=Ys().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Js(),b=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),J=ms(I),z=qs(),[L,we]=U.useState(!1),r=$((o=>_s(o))),{useFeatureGate:S}=Qs(),Z=Ks(),ae=Xs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(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),Be=!ke||!!He,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:K}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(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&&be(I,r,V)}const G={tenantId:b,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&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=As(Number(f[0])),n=Number(f[1]),c=bs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=fs();c.isAfter(N,"month")===!1?A(ys(b,{month:d,year:n})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),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,f,d,n){if(xe(f?.userId,f?.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))}),[b]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const W=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(W&&us){H(Re(n));const Y=y.getSignedInUserTenantWithId(n);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.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 W&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(je(c.userId,n))),W&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(Ie(c.userId,n)));if(W){ne.identify(c.userId,{tenant_id:n});const Y=n==null||n!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),Y&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,I,O,A))}),[b,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Cs(q.tenantsBaseInOrder)),I!=null&&be(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"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,f=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)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:qe}=S(M.isReferralFeatureEnabled),We=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ye=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=!Be&&!P,Je=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=Bs(h?.loggedInUserRoleMap),g=Ss(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||Je===!0||ts===!0||as===!0;return y.isSignedIn()?b==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||J&&!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||J?!L||se!==!1||X||J?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{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||We||Ye?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(bn,{}):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:Se?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(fn,{}):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,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DOBkg1D1.js";import{a as d}from"./sentry-B0nIwgR6.js";import{h as N,g as G,u as T,i as V,j as C,l as H,n as z,o as k}from"./core-D5xlmXJj.js";import{fB as w,YE as je,MU as ve,Yc as we,Yl as Ae,c7 as X,cQ as De,cR as Ue,bq as Te,da as Re,Ff as _e,YF as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fj as ue,LF as pe,LI as ge,LO as W,Bv as ee,Fi as Oe,lq as Z,lt as me,YG as Ne,mD as Ve,FB as Ye,UU as $e,UV as Ze,lo as Ge,YH as He,lr as Ke,t$ as Qe,UP as qe,UQ as ze,u3 as Je,hS as Xe,TP as q,hK as ae,hH as We,hP as en,TQ as nn,Fy as tn,YI as an,YJ as on,M0 as sn,lX as rn,dU as fe,dV as he,YK as ln,gz as cn,U2 as dn,Fx as oe,gE as se,gD as un,Fw as pn,gC as gn,gB as mn,YL as fn,Tf as Ce,YM as hn,YN as Cn,YO as yn,YP as Sn,YQ as bn,YR as In,FE as xn,YS as En,Fv as ie,Fp as $,YT as kn,YU as Pn,YV as re,YW as jn,dN as vn,YX as wn,YY as An,YZ as Dn,Tr as Un,b$ as Tn,c6 as Rn,c5 as _n,c0 as Mn,Y_ as Bn,c3 as Fn,c2 as Ln,c4 as On,c1 as Nn}from"./zeni-epic-state-DVQQo6UD.js";import{bS as Vn,z as v,V as Y,a7 as ne,c2 as Yn,j as K,O as te,y as L,f as ye,N as Se,c3 as $n,h as Zn,Y as be,c4 as Gn,ai as Hn,c5 as Kn,c6 as Qn,aq as qn,c7 as zn,p as Jn,c as Ie,c8 as Xn}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-DOBkg1D1.js";import{a as d}from"./sentry-B0nIwgR6.js";import{h as N,g as G,u as T,i as V,j as C,l as H,n as z,o as k}from"./core-D5xlmXJj.js";import{fB as w,YE as je,MU as ve,Yc as we,Yl as Ae,c7 as X,cQ as De,cR as Ue,bq as Te,da as Re,Ff as _e,YF as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fj as ue,LF as pe,LI as ge,LO as W,Bv as ee,Fi as Oe,lq as Z,lt as me,YG as Ne,mD as Ve,FB as Ye,UU as $e,UV as Ze,lo as Ge,YH as He,lr as Ke,t$ as Qe,UP as qe,UQ as ze,u3 as Je,hS as Xe,TP as q,hK as ae,hH as We,hP as en,TQ as nn,Fy as tn,YI as an,YJ as on,M0 as sn,lX as rn,dU as fe,dV as he,YK as ln,gz as cn,U2 as dn,Fx as oe,gE as se,gD as un,Fw as pn,gC as gn,gB as mn,YL as fn,Tf as Ce,YM as hn,YN as Cn,YO as yn,YP as Sn,YQ as bn,YR as In,FE as xn,YS as En,Fv as ie,Fp as $,YT as kn,YU as Pn,YV as re,YW as jn,dN as vn,YX as wn,YY as An,YZ as Dn,Tr as Un,b$ as Tn,c6 as Rn,c5 as _n,c0 as Mn,Y_ as Bn,c3 as Fn,c2 as Ln,c4 as On,c1 as Nn}from"./zeni-epic-state-DVQQo6UD.js";import{bS as Vn,z as v,V as Y,a7 as ne,c2 as Yn,j as K,O as te,y as L,f as ye,N as Se,c3 as $n,h as Zn,Y as be,c4 as Gn,ai as Hn,c5 as Kn,c6 as Qn,aq as qn,c7 as zn,p as Jn,c as Ie,c8 as Xn}from"./index-waurk8Yr.js";import{n as B}from"./mui-DpenkF9f.js";import{u as xe}from"./useTaskManagerAccess-Boniioo_.js";import{U as Wn}from"./AccountMappingScreen-B8Z5Jukp.js";import{t as et,A as nt}from"./AddressScreen-pJKlDi3q.js";import O from"./NotFoundScreen-BZ7M6wRY.js";import{g as tt}from"./analyticsHelper-CGHyb6cb.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-Boe3kgD5.js";import{C as st}from"./CompanyPassportScreen-wR6Twi6v.js";import{M as _}from"./MobileAppDrawer-DCgsEnVh.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-a5BahjbB.js";import{q as le}from"./QBOConnectionScreen-BYc3DqHZ.js";import{B as lt}from"./BillPayApprovalRoutes-BLyF1vsz.js";import{R as ct}from"./ReimbursementApprovalRoutes-DNX741Rs.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";import"./accountMappingHelper-BgNXnMXC.js";import"./routePaths-D2W1iWQZ.js";import"./InboxNotificationsProvider-B9BL9-5c.js";import"./empty-C81l0a_D.js";import"./pdf-lib-DU5YZRdD.js";import"./index-CcXiIb6r.js";import"./url-kBT6SwtU.js";import"./index-B2tEu4AE.js";import"./decodeURIComponentSafe-N0xRs_hS.js";import"./ReimbursementApprovalRuleDetailScreen-2ORMbxwr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="7471cc12-9202-4ecd-8b1f-c77a5f81404f",e._sentryDebugIdIdentifier="sentry-dbid-7471cc12-9202-4ecd-8b1f-c77a5f81404f")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-DOBkg1D1.js";import{h as J,g as Q,u as ee,i as W,j as v,N as j,l as H,t as Qe}from"./core-D5xlmXJj.js";import{bJ as en,fB as F,cF as nn,H6 as Z,Yc as tn,Yf as an,ui as ne,u6 as te,mv as ae,B1 as L,Yh as Ce,gD as $e,gC as We,gB as He,Yi as sn,Hf as on,LL as he,LC as Ie,Lz as Ae,Lh as X,LF as _e,LI as ke,LO as ve,Bv as Pe,gX as cn,cA as rn,dV as un,dU as dn,de as ln,bt as pn,ct as Fe,Yj as mn,Kh as de,KV as yn,Yk as fn,bK as gn,N4 as le,MU as Sn,Yl as bn,Ym as Cn,N8 as hn,Nc as In,Yn as je,AW as An,RA as _n,NK as be,Oz as pe,Yo as kn,Yp as vn,Yq as Pn,Yr as Ge,Ys as Tn,UD as En,Xt as Dn,US as Un,Yt as Ke,Ll as wn,UT as On,Lp as Fn,Yu as Oe,NU as qe,mD as Vn,u9 as Xe,B3 as xn,bE as Ne,Bf as Le,cD as Bn,Yv as Je,Nr as jn,Ns as Nn,Nw as Ln,Yw as Rn,NN as Re,Yx as zn,Yy as Mn,Yz as Yn,YA as Zn,gS as $n,Iq as Wn,YB as Hn,Iv as Gn,Iu as Kn}from"./zeni-epic-state-DVQQo6UD.js";import{ai as Te,V as ie,O as me,y as q,E as Ee,z as E,a8 as se,j as D,a7 as De,S as $,bP as qn,ae as oe,bQ as V,bi as Ve,bR as Xn,bS as Jn,bT as Qn,n as Be,bU as et,p as ze,aG as Me,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-DOBkg1D1.js";import{h as J,g as Q,u as ee,i as W,j as v,N as j,l as H,t as Qe}from"./core-D5xlmXJj.js";import{bJ as en,fB as F,cF as nn,H6 as Z,Yc as tn,Yf as an,ui as ne,u6 as te,mv as ae,B1 as L,Yh as Ce,gD as $e,gC as We,gB as He,Yi as sn,Hf as on,LL as he,LC as Ie,Lz as Ae,Lh as X,LF as _e,LI as ke,LO as ve,Bv as Pe,gX as cn,cA as rn,dV as un,dU as dn,de as ln,bt as pn,ct as Fe,Yj as mn,Kh as de,KV as yn,Yk as fn,bK as gn,N4 as le,MU as Sn,Yl as bn,Ym as Cn,N8 as hn,Nc as In,Yn as je,AW as An,RA as _n,NK as be,Oz as pe,Yo as kn,Yp as vn,Yq as Pn,Yr as Ge,Ys as Tn,UD as En,Xt as Dn,US as Un,Yt as Ke,Ll as wn,UT as On,Lp as Fn,Yu as Oe,NU as qe,mD as Vn,u9 as Xe,B3 as xn,bE as Ne,Bf as Le,cD as Bn,Yv as Je,Nr as jn,Ns as Nn,Nw as Ln,Yw as Rn,NN as Re,Yx as zn,Yy as Mn,Yz as Yn,YA as Zn,gS as $n,Iq as Wn,YB as Hn,Iv as Gn,Iu as Kn}from"./zeni-epic-state-DVQQo6UD.js";import{ai as Te,V as ie,O as me,y as q,E as Ee,z as E,a8 as se,j as D,a7 as De,S as $,bP as qn,ae as oe,bQ as V,bi as Ve,bR as Xn,bS as Jn,bT as Qn,n as Be,bU as et,p as ze,aG as Me,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-waurk8Yr.js";import{a as h}from"./sentry-B0nIwgR6.js";import{n as xe,D as ct,S as rt}from"./mui-DpenkF9f.js";import{u as ut,B as we}from"./BusinessVerificationPageScreen-Boe3kgD5.js";import{M as ye}from"./MobileAppDrawer-DCgsEnVh.js";import N from"./NotFoundScreen-BZ7M6wRY.js";import{a as Ye}from"./analyticsHelper-CGHyb6cb.js";import{d as Ze}from"./routePaths-D2W1iWQZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="ce3635af-af40-43f2-a2c6-d26b106ebc23",e._sentryDebugIdIdentifier="sentry-dbid-ce3635af-af40-43f2-a2c6-d26b106ebc23")}catch{}})();const dt=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-DOBkg1D1.js";import{a as f,R as x,q as A}from"./sentry-B0nIwgR6.js";import{u as D,h as z,j as l,g as j,N as M,l as O}from"./core-D5xlmXJj.js";import{u as B,z as s,E as P,j as w,G as _,R as F,S as N,T as R,U as V,X as $,Y as v}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-DOBkg1D1.js";import{a as f,R as x,q as A}from"./sentry-B0nIwgR6.js";import{u as D,h as z,j as l,g as j,N as M,l as O}from"./core-D5xlmXJj.js";import{u as B,z as s,E as P,j as w,G as _,R as F,S as N,T as R,U as V,X as $,Y as v}from"./index-waurk8Yr.js";import{fB as q,Tb as J,Tv as W,ge as X,gg as G,TA as H,gR as Y,df as K,TB as T,TC as Q,TD as Z,b_ as y}from"./zeni-epic-state-DVQQo6UD.js";import"./mui-DpenkF9f.js";import{u as ee}from"./useDeviceId-ChTv1tr4.js";import{f as te}from"./analyticsHelper-CGHyb6cb.js";import{t as ne}from"./getLocaleForTenant-CyZtaI04.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.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]="2d63677a-46a5-4496-9c76-72fced76232d",t._sentryDebugIdIdentifier="sentry-dbid-2d63677a-46a5-4496-9c76-72fced76232d")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(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 c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(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(Q(n,a)))},clearSignInError:()=>{t(T())}}}))($),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=B(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:L,accountLocked:C,accountUnlockTime:h}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>q(e))),I=l((e=>J(e))),m=j(),E=P().mode,U=m.state?.magicLinkExpired,b=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{L.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[L.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(W(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,E,void 0,I.tenantsInOrder),Y().then((()=>{const e=V();e!=null&&F(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,k,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(M,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!b,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&h!=null?u.jsx(R,{onClose:()=>i(T()),unlockDate:h}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DOBkg1D1.js";import{a}from"./sentry-B0nIwgR6.js";import{u as f,g as d,N as u}from"./core-D5xlmXJj.js";import{z as i,j as n,S as m,a7 as p}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-DOBkg1D1.js";import{a}from"./sentry-B0nIwgR6.js";import{u as f,g as d,N as u}from"./core-D5xlmXJj.js";import{z as i,j as n,S as m,a7 as p}from"./index-waurk8Yr.js";import{gU as g,TR as b}from"./zeni-epic-state-DVQQo6UD.js";import{n as y}from"./mui-DpenkF9f.js";import"./recharts-CcOTx_Jj.js";import"./analytics-Cuu7a7XR.js";import"./plaid-D5L6VoNT.js";import"./dnd-DN-HQej8.js";import"./stripe-cKAAJElX.js";import"./lottie-o0tP_TXQ.js";import"./lexical-DDQ51-Oa.js";import"./pdf-DIMTd5ya.js";import"./utils-DQ0YEP-f.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="244957b5-16b5-4b11-a09b-5aaa1ab7c0b2",t._sentryDebugIdIdentifier="sentry-dbid-244957b5-16b5-4b11-a09b-5aaa1ab7c0b2")}catch{}})();function L(){const t=f(),e=d(),r=a.useRef(!1),l=i.isSignedIn(),o=e.state?.message==="logout"||l;return a.useEffect((()=>{if(o&&!r.current){r.current=!0;try{t(g()),b(),n.trackLogout(m.Event.logoutSuccess),n.resetUserIdentity(),i.clearAll()}catch(c){console.error("Error during sign out:",c)}finally{window.location.replace("/signin/auth")}}}),[o,t]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-DOBkg1D1.js";import{a as T}from"./sentry-B0nIwgR6.js";import{h as pa,u as fa,g as Ta,k as ga,j,i as _a,l as ma}from"./core-D5xlmXJj.js";import{aK as Da,aL as ba,z as x,O as Sa,y as G,as as ha,a8 as Ea,j as ya,S as Aa,e4 as Ca,p as R,a4 as Ga}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-DOBkg1D1.js";import{a as T}from"./sentry-B0nIwgR6.js";import{h as pa,u as fa,g as Ta,k as ga,j,i as _a,l as ma}from"./core-D5xlmXJj.js";import{aK as Da,aL as ba,z as x,O as Sa,y as G,as as ha,a8 as Ea,j as ya,S as Aa,e4 as Ca,p as R,a4 as Ga}from"./index-waurk8Yr.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 ja,Q0 as Fa,a1i as xa,a1j as Oa,a1k as $a,a1l as Na,a1m as I,dt as Qa,ds as za,a1n as Za,Pp as Ma}from"./zeni-epic-state-DVQQo6UD.js";import{n as Va}from"./mui-DpenkF9f.js";import{u as Wa}from"./useAskAiCfoHostNavButtonProps-buoAy4Wo.js";import{M as qa}from"./MobileAppDrawer-DCgsEnVh.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]="85f65614-2af0-4300-8b06-086daf3d24d7",e._sentryDebugIdIdentifier="sentry-dbid-85f65614-2af0-4300-8b06-086daf3d24d7")}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=T.useRef(n),l=T.useRef(o),_=T.useRef(0);T.useEffect((()=>{g.current=n}),[n]),T.useEffect((()=>{l.current=o}),[o]);const t=T.useMemo((()=>[...a].sort().join("|")),[a]);T.useEffect((()=>{if(i==null||a.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return a.forEach((m=>{const[D,b]=ba(m);if(b==="")return;const E=i.channel(D),y=f=>{g.current(b,f)};let k;if(E?.subscribed===!0){if(k=E,k.bind(b,y),!p.has(D)){p.add(D),S();const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{E.unbind(b,y)}))}else{if(k=E??i.subscribe(D),k.bind(b,y),!p.has(D)){p.add(D);const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{k.unbind(b,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Va.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|