@zeniai/web-app-ui 5.0.2-qa → 5.0.3-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/assets/AddressRoutes-TpKhNc53.js +1 -0
  2. package/dist/assets/AddressScreen-BzNR9PgQ.js +9 -0
  3. package/dist/assets/{AiCfoScreen-C3DNvQlj.js → AiCfoScreen-CxaXxkIm.js} +2 -2
  4. package/dist/assets/{BillPayApprovalRoutes-BVBiJezP.js → BillPayApprovalRoutes-C3wS_qNP.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-C68APJ0s.js → BillPayRoutes-OPwDa_8R.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-uevt4KH_.js → BusinessVerificationPageScreen-BtM5fUcw.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-BDWNHmvV.js → ChargeCardRoutes-DqTI1vwk.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-BsQAk6DO.js → CompanyPassportScreen-DJKhJL7t.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-CH-I2hu3.js → ConnectionAuthScreen-CevZLjw3.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-CnEeEOGm.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-4bfKX61e.js → CustomerOnboardingRoutes-Ew5wjRzs.js} +4 -4
  12. package/dist/assets/{DashboardRoutes-KTtbdLF8.js → DashboardRoutes-B2CH7nsJ.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-DGySCaNj.js → DefaultTenantHome-Bzm-q9xk.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-BQCaRz-2.js +18 -0
  15. package/dist/assets/DrawerScreen-Dz54oQdA.js +1 -0
  16. package/dist/assets/{EntityDetailRoutes-B4XF7gyV.js → EntityDetailRoutes-BfBNic02.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-CKPTMKMk.js → ExpenseAutomationRoutes-Bzdvnk7t.js} +4 -4
  18. package/dist/assets/FeaturePreviewScreen-BsHiFyOu.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-DSHxCj-r.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-CYuNWDBT.js +12 -0
  21. package/dist/assets/MobileAppDrawer-BFl1Y_qR.js +1 -0
  22. package/dist/assets/NotFoundScreen-CnfhDP4M.js +1 -0
  23. package/dist/assets/{NotificationRoutes-CLWgbDXX.js → NotificationRoutes-x5lrQ7CC.js} +1 -1
  24. package/dist/assets/{PandLWithForecastRoutes-XoBK7btv.js → PandLWithForecastRoutes-CHItYpuL.js} +1 -1
  25. package/dist/assets/{PeopleRoutes-Cb2v_H4M.js → PeopleRoutes-DY9PD71E.js} +11 -11
  26. package/dist/assets/PerformanceRoutes-D1ErJI-A.js +1 -0
  27. package/dist/assets/{Preview-hp5oXBDl.js → Preview-B_pB49hk.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-DdYGgWWD.js → QBOConnectionScreen-D0vt2FBb.js} +1 -1
  29. package/dist/assets/ReferralListScreen-hfIN-UkI.js +5 -0
  30. package/dist/assets/{ReimbursementApprovalRoutes-D0b-XGea.js → ReimbursementApprovalRoutes-D7APr64t.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Cjc2t-Dv.js → ReimbursementApprovalRuleDetailScreen-DPJyNcSj.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-hOmxiTvW.js → ReimbursementRoutes-DjJ7QvEU.js} +1 -1
  33. package/dist/assets/{ReportsRoutes-BYHcHW75.js → ReportsRoutes-BgFOWkwY.js} +1 -1
  34. package/dist/assets/RewardsRoutes-DcjeiwbY.js +1 -0
  35. package/dist/assets/{ScreenRoutes-CzaM-ErL.js → ScreenRoutes-B4o9jljw.js} +2 -2
  36. package/dist/assets/{SettingsRoutes-CyoLt7JH.js → SettingsRoutes-BvG8gznS.js} +7 -7
  37. package/dist/assets/{SetupPagesScreen-BaHRYy46.js → SetupPagesScreen-Ccl8_CS0.js} +1 -1
  38. package/dist/assets/SignInScreen-C4br_Jkp.js +1 -0
  39. package/dist/assets/SignOutScreen-B4ZZrpdl.js +9 -0
  40. package/dist/assets/{TaskListScreen-DqV1jPp4.js → TaskListScreen-D9TnNNrE.js} +2 -2
  41. package/dist/assets/TaskRoutes-CGQDmZnH.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-DlKQYzWG.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-RnHkkAvY.js → TransactionDetailScreen-AiCOKNuK.js} +2 -2
  44. package/dist/assets/TransactionListRoutes-CUTtMwl4.js +1 -0
  45. package/dist/assets/{TreasuryRoutes-DxNNpbkP.js → TreasuryRoutes-Cw8axJIn.js} +6 -6
  46. package/dist/assets/{VendorsRoutes-CXNQHyD0.js → VendorsRoutes-j59CLOjh.js} +12 -12
  47. package/dist/assets/WiseConfirmationScreen-KpDDjTwp.js +12 -0
  48. package/dist/assets/{ZeniAccountRoutes-CLx-Q3l6.js → ZeniAccountRoutes-CVAgJr8b.js} +12 -12
  49. package/dist/assets/{ZeniAccountStatementScreen-QylI0M1l.js → ZeniAccountStatementScreen-ILlsQ6-n.js} +2 -2
  50. package/dist/assets/{accountMappingHelper-B_vdVXJd.js → accountMappingHelper-DVEV1WRI.js} +1 -1
  51. package/dist/assets/{analytics-B_kykzhy.js → analytics-BAQwJULS.js} +1 -1
  52. package/dist/assets/{analyticsHelper-Dp05MDBJ.js → analyticsHelper-CjA_jHsA.js} +1 -1
  53. package/dist/assets/{core-C7cnuUop.js → core-D85lL_9t.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-rDkCEJpn.js → decodeURIComponentSafe-ByB9WhLS.js} +1 -1
  55. package/dist/assets/{dnd-TzLeX35A.js → dnd-P1ekKsf6.js} +1 -1
  56. package/dist/assets/{empty-7vbmHAL6.js → empty-CYNEYtaG.js} +1 -1
  57. package/dist/assets/{empty-B375B_HA.js → empty-vrCkOfCr.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-BGxjtXTu.js → emptyVideoElement-dzCxtvYW.js} +1 -1
  59. package/dist/assets/{epic-DefpUSD4.js → epic-DD3uTQrs.js} +1 -1
  60. package/dist/assets/getLocaleForTenant-i0RHCLcV.js +1 -0
  61. package/dist/assets/{index-Qmma5Ck1.js → index-BEEelBYS.js} +1 -1
  62. package/dist/assets/{index-CcLDrNJO.js → index-BPbXNCzw.js} +1 -1
  63. package/dist/assets/{index-DrxEgkQ-.js → index-BUCtSz30.js} +1 -1
  64. package/dist/assets/{index-BAxpczYf.js → index-Cn65SF8r.js} +2 -2
  65. package/dist/assets/{index-_vh22_qX.js → index-Dmo9xgqA.js} +1 -1
  66. package/dist/assets/{index-B2lD3Jim.js → index-DzzIwd_P.js} +11444 -11452
  67. package/dist/assets/{index-m-Adf2ll.js → index-lPBYjZLr.js} +1 -1
  68. package/dist/assets/{lexical-Dp9Fvoo6.js → lexical-C7vBKQl2.js} +1 -1
  69. package/dist/assets/{liveblocks-jLbycGCP.js → liveblocks-dlvb-ucF.js} +1 -1
  70. package/dist/assets/{lottie-SbVYeXJk.js → lottie-DGXsyyYr.js} +1 -1
  71. package/dist/assets/{mui-BkznVaFh.js → mui-C9WBrZQt.js} +1 -1
  72. package/dist/assets/{pathToGoBack-DXgc_G9d.js → pathToGoBack-Bl_9p4QB.js} +1 -1
  73. package/dist/assets/{pdf-DQg4OfsP.js → pdf-DebxFbW1.js} +3 -3
  74. package/dist/assets/{pdf-lib-CDsnDRGG.js → pdf-lib-VVDJ8cIK.js} +1 -1
  75. package/dist/assets/{plaid-DfnoQTVm.js → plaid-BveLUCs7.js} +1 -1
  76. package/dist/assets/{pusher-CQHA__kt.js → pusher-DUCiEwkw.js} +1 -1
  77. package/dist/assets/{react-tE35hRos.js → react-1c4ID8s0.js} +1 -1
  78. package/dist/assets/{react-BfsHsZ2B.js → react-5tQG_cKG.js} +1 -1
  79. package/dist/assets/{react-CCO8orgk.js → react-BKO9NKrm.js} +1 -1
  80. package/dist/assets/{react-pHyk9OpQ.js → react-BdgNO3-u.js} +1 -1
  81. package/dist/assets/{react-CJwzWgLi.js → react-Cj6aZ7ln.js} +1 -1
  82. package/dist/assets/{react-DPNnFJXW.js → react-D5d1k6ry.js} +1 -1
  83. package/dist/assets/{recharts-Dt8COHEP.js → recharts-BYSqK3LX.js} +1 -1
  84. package/dist/assets/{routePaths-DBCGZwBw.js → routePaths-CfgcdnOO.js} +1 -1
  85. package/dist/assets/{sentry-CflaePyQ.js → sentry-DGJ961LO.js} +1 -1
  86. package/dist/assets/{url-CMgR7Whs.js → url-CLAf8TQN.js} +1 -1
  87. package/dist/assets/{url-DZF6CZ5y.js → url-DoymNVR-.js} +1 -1
  88. package/dist/assets/{useAskAiCfoHostNavButtonProps-BopsQ8w-.js → useAskAiCfoHostNavButtonProps-CO9-0Ull.js} +1 -1
  89. package/dist/assets/{useDeviceId-aTbWtPu7.js → useDeviceId-cXBRwcUd.js} +1 -1
  90. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-4mjujgB-.js → useFetchSuggestedQuestionsWhenReady-Yook-sE0.js} +1 -1
  91. package/dist/assets/{useInitialThreadRequest-C_8EtcOe.js → useInitialThreadRequest-j_3WBhMo.js} +1 -1
  92. package/dist/assets/{utils-t3ltqqZ0.js → utils-4E0JE-n2.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-m0PuYIs6.js → withTransactionSidePanel-dV1DlPXH.js} +2 -2
  94. package/dist/assets/{zeni-epic-state-DPGmsT0c.js → zeni-epic-state-De57_V18.js} +3 -3
  95. package/dist/index.html +1 -1
  96. package/package.json +2 -2
  97. package/dist/assets/AddressRoutes-cGHfwdAO.js +0 -1
  98. package/dist/assets/AddressScreen-BnTNp61r.js +0 -9
  99. package/dist/assets/CustomerOnboardingAuthScreen-Dm-6AV-k.js +0 -1
  100. package/dist/assets/DomesticWireDetailScreen-DcjlQFtk.js +0 -18
  101. package/dist/assets/DrawerScreen-3KqQh33-.js +0 -1
  102. package/dist/assets/FeaturePreviewScreen-CEV6r8QS.js +0 -1
  103. package/dist/assets/MagicLinkRoutes-D8VOzSDZ.js +0 -72
  104. package/dist/assets/MagicLinkSignInScreen-DGyXdYGH.js +0 -12
  105. package/dist/assets/MobileAppDrawer-YMrlHv7B.js +0 -1
  106. package/dist/assets/NotFoundScreen-CPtlb4xk.js +0 -1
  107. package/dist/assets/PerformanceRoutes-DWvTIqMy.js +0 -1
  108. package/dist/assets/ReferralListScreen-t3nG_-Jq.js +0 -5
  109. package/dist/assets/RewardsRoutes-BAINUSVd.js +0 -1
  110. package/dist/assets/SignInScreen-D7GXAtAP.js +0 -1
  111. package/dist/assets/SignOutScreen-Bhfa71yJ.js +0 -9
  112. package/dist/assets/TaskRoutes-b0082ks-.js +0 -9
  113. package/dist/assets/TransactionDetailRoutes-72pTxmoR.js +0 -1
  114. package/dist/assets/TransactionListRoutes-0LJWWSY0.js +0 -1
  115. package/dist/assets/WiseConfirmationScreen-Dz9Nm2cC.js +0 -12
  116. package/dist/assets/getLocaleForTenant-DHk9xDoK.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as Ol}from"./liveblocks-jLbycGCP.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CflaePyQ.js";import{B as dt,bQ as Tc,eM as Ac,I0 as Rc,IK as kl,b$ as Tl,fi as Al,fj as Rl}from"./zeni-epic-state-DPGmsT0c.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-t3ltqqZ0.js";import{r as un}from"./empty-B375B_HA.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CDsnDRGG.js";import{r as Gl}from"./index-DrxEgkQ-.js";import{r as zl}from"./index-CcLDrNJO.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-C7cnuUop.js";import{u as Kl,z as Pc,L as Wl,T as Jl,U as Xl,i as Ql,d as tf}from"./index-B2lD3Jim.js";import"./mui-BkznVaFh.js";import{d as Pe}from"./decodeURIComponentSafe-rDkCEJpn.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="5a9cdb6c-4d6d-4337-8299-dbafe677767a",t._sentryDebugIdIdentifier="sentry-dbid-5a9cdb6c-4d6d-4337-8299-dbafe677767a")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)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 f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(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=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,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}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,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)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(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 i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(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,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("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),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),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 ef(){if(xn)return jn;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 f(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){m(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 m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(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,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(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 o(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 i(k){var E=typeof Map=="function"?new Map:void 0;return i=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 u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=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},u.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)}xn=1;var h=lt().inspect,d=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="",c="",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(`
1
+ import{j as Ol}from"./liveblocks-dlvb-ucF.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DGJ961LO.js";import{B as dt,bQ as Tc,eM as Ac,I0 as Rc,IK as kl,b$ as Tl,fi as Al,fj as Rl}from"./zeni-epic-state-De57_V18.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-4E0JE-n2.js";import{r as un}from"./empty-vrCkOfCr.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-VVDJ8cIK.js";import{r as Gl}from"./index-BUCtSz30.js";import{r as zl}from"./index-BPbXNCzw.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-D85lL_9t.js";import{u as Kl,z as Pc,L as Wl,R as Jl,T as Xl,h as Ql,d as tf}from"./index-DzzIwd_P.js";import"./mui-C9WBrZQt.js";import{d as Pe}from"./decodeURIComponentSafe-ByB9WhLS.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="05da8a96-2d4e-4aa6-8d6e-bfb6d429096f",t._sentryDebugIdIdentifier="sentry-dbid-05da8a96-2d4e-4aa6-8d6e-bfb6d429096f")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)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 f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(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=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,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}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,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)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(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 i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(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,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("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),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),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 ef(){if(xn)return jn;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 f(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){m(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 m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(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,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(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 o(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 i(k){var E=typeof Map=="function"?new Map:void 0;return i=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 u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=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},u.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)}xn=1;var h=lt().inspect,d=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="",c="",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
 
@@ -0,0 +1,5 @@
1
+ import{j as s}from"./liveblocks-dlvb-ucF.js";import{a as o}from"./sentry-DGJ961LO.js";import{g as f,j as V,h as M,u as N,k as W}from"./core-D85lL_9t.js";import{m as _,Z as $,z as R,a$ as U,x as Z,H as z,F as X,w as q,d as l,f as G,a1 as J,b0 as Q}from"./index-DzzIwd_P.js";import{eX as K,eM as Y,Lh as I,Li as ee,ta as ae,t0 as g,eZ as re,bL as ne,t5 as te,Lj as se}from"./zeni-epic-state-De57_V18.js";import{D as oe,e as ie,n as le,S as de}from"./mui-C9WBrZQt.js";import{u as ce}from"./useAskAiCfoHostNavButtonProps-CO9-0Ull.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-Yook-sE0.js";import{M as ue}from"./MobileAppDrawer-BFl1Y_qR.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]="ee3d777b-1bba-4083-95b8-d56989b8ad9a",e._sentryDebugIdIdentifier="sentry-dbid-ee3d777b-1bba-4083-95b8-d56989b8ad9a")}catch{}})();const pe={overlayWidth:new Z(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=_(),n=$();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>K(d));return s.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(ie,{in:e,direction:"left",children:s.jsx(ge,{onClick:d=>d.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(de)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,P="refer-and-earn-status-update",ke=W(function(e){const a=I(e),r=e.referralViewState.rewardsPlanFetchState,n=ne([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(se({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(te(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(J(Q));function Pe({isReferralDrawerOpen:e}){const a=V(),r=M(),n=N(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,A]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),b=f(t=>Y(t)),h=f(t=>I(t)),m=h.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),v=ee([h,w]),{areTenantIdsInSync:c}=z();o.useEffect(()=>{b?.rewardsLastViewedTime==null&&D===!1&&(r(ae()),A(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&c&&(u(!0),r(g(!0)))},[m,r,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),r(re(!0)))},[w,r,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[E,j]=o.useState(!1),y=t=>{j(t)},{isAiCfoOpen:L,setIsAiCfoOpen:O}=X(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=ce({isAiCfoOpen:L,setIsAiCfoOpen:O,mobileExploreReferrer:"Rewards"});fe({isDataReady:v===!0});const F={events:p?.userId!=null?[`private-${p.userId}.${P}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[v===!0?s.jsx(q,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(G.Event.rewardsPageViewed)})(t)}):null,s.jsx(ue,{isAppContentDrawerOpen:E,handleDrawerToggle:y}),k===!0?s.jsx(we,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(ke,{location:n,navigate:a,currentTenant:b,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...F})]})}export{Pe as R};
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-jLbycGCP.js";import x from"./NotFoundScreen-CPtlb4xk.js";import{a as p}from"./sentry-CflaePyQ.js";import{j as I,u as C,h as A,g as c,N as E,k,n as D,o as u}from"./core-C7cnuUop.js";import{eM as T,Mb as v,Mr as S,C7 as V,Bg as B,C6 as m,BZ as M,MG as U}from"./zeni-epic-state-DPGmsT0c.js";import{m as _,z as $,B as N,a1 as O,bF as W,aa as z}from"./index-B2lD3Jim.js";import"./mui-BkznVaFh.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-Cjc2t-Dv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7511c9dc-84b4-4f3b-bf7c-7fc615663406",e._sentryDebugIdIdentifier="sentry-dbid-7511c9dc-84b4-4f3b-bf7c-7fc615663406")}catch{}})();const f="reimbursement-approval-rule-update",F=k(function(e){return{approvalView:v(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(f)&&e(U(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(M(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),G=()=>{const e=I(),r=C(),a=A(),[l,n]=p.useState(!1),[d,y]=p.useState(!1),b=c(s=>s.remiSetupApproverViewState.fetchState),o=c(s=>T(s)),w=_(),i=c(s=>v(s)),g=c(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&a(V())},[g]),p.useEffect(()=>{l||b!=="Not-Started"||(n(!0),a(B(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(m())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${f}`]:[],eventCallback:(s,P,R)=>{s.endsWith(f)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Y(){return t.jsxs(D,{children:[t.jsx(u,{path:"/",element:t.jsx(G,{})}),t.jsx(u,{path:"/new",element:t.jsx(h,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(u,{path:"*",element:t.jsx(x,{})})]})}export{Y as R};
1
+ import{j as t}from"./liveblocks-dlvb-ucF.js";import x from"./NotFoundScreen-CnfhDP4M.js";import{a as p}from"./sentry-DGJ961LO.js";import{j as I,u as C,h as A,g as c,N as E,k,n as D,o as u}from"./core-D85lL_9t.js";import{eM as T,Mb as v,Mr as S,C7 as V,Bg as B,C6 as m,BZ as M,MG as U}from"./zeni-epic-state-De57_V18.js";import{m as _,z as $,B as N,a1 as O,bF as W,aa as z}from"./index-DzzIwd_P.js";import"./mui-C9WBrZQt.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-DPJyNcSj.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="7511c9dc-84b4-4f3b-bf7c-7fc615663406",e._sentryDebugIdIdentifier="sentry-dbid-7511c9dc-84b4-4f3b-bf7c-7fc615663406")}catch{}})();const f="reimbursement-approval-rule-update",F=k(function(e){return{approvalView:v(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(f)&&e(U(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(M(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),G=()=>{const e=I(),r=C(),a=A(),[l,n]=p.useState(!1),[d,y]=p.useState(!1),b=c(s=>s.remiSetupApproverViewState.fetchState),o=c(s=>T(s)),w=_(),i=c(s=>v(s)),g=c(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&a(V())},[g]),p.useEffect(()=>{l||b!=="Not-Started"||(n(!0),a(B(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(m())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${f}`]:[],eventCallback:(s,P,R)=>{s.endsWith(f)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Y(){return t.jsxs(D,{children:[t.jsx(u,{path:"/",element:t.jsx(G,{})}),t.jsx(u,{path:"/new",element:t.jsx(h,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(u,{path:"*",element:t.jsx(x,{})})]})}export{Y as R};
@@ -1 +1 @@
1
- import{j as g}from"./liveblocks-jLbycGCP.js";import{a as y}from"./sentry-CflaePyQ.js";import{j as w,h as A,u as C,l as T,g as S,k as U}from"./core-C7cnuUop.js";import{Mr as R,Mb as E,C0 as x,C9 as _,C7 as b,C8 as h,Ms as B}from"./zeni-epic-state-DPGmsT0c.js";import{z as k,m as V,B as j,bw as F,aa as O}from"./index-B2lD3Jim.js";import"./mui-BkznVaFh.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]="2f19e4e1-5cac-474c-acd4-270500ad6384",e._sentryDebugIdIdentifier="sentry-dbid-2f19e4e1-5cac-474c-acd4-270500ad6384")}catch{}})();function $(e){return B(e)==null}const M=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const c=p=>{const v=[];return p.forEach(u=>{const D=u.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=D.concat(I);v.push({action:u.stepType.selectedOption,actors:m,operator:m.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(b()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(b()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function H(){const e=w(),a=A(),t=C(),{approvalRuleId:s}=T(),n=k.getSignedInUser(),l=V(),r=S(p=>R(p)),i=S(p=>E(p)),[o,c]=y.useState(!1);if(y.useEffect(()=>{o||(c(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(j,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
1
+ import{j as g}from"./liveblocks-dlvb-ucF.js";import{a as y}from"./sentry-DGJ961LO.js";import{j as w,h as A,u as C,l as T,g as S,k as U}from"./core-D85lL_9t.js";import{Mr as R,Mb as E,C0 as x,C9 as _,C7 as b,C8 as h,Ms as B}from"./zeni-epic-state-De57_V18.js";import{z as k,m as V,B as j,bw as F,aa as O}from"./index-DzzIwd_P.js";import"./mui-C9WBrZQt.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]="2f19e4e1-5cac-474c-acd4-270500ad6384",e._sentryDebugIdIdentifier="sentry-dbid-2f19e4e1-5cac-474c-acd4-270500ad6384")}catch{}})();function $(e){return B(e)==null}const M=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const c=p=>{const v=[];return p.forEach(u=>{const D=u.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=D.concat(I);v.push({action:u.stepType.selectedOption,actors:m,operator:m.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(b()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(b()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function H(){const e=w(),a=A(),t=C(),{approvalRuleId:s}=T(),n=k.getSignedInUser(),l=V(),r=S(p=>R(p)),i=S(p=>E(p)),[o,c]=y.useState(!1);if(y.useEffect(()=>{o||(c(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(j,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-jLbycGCP.js";import{j as W,h as le,u as V,l as Y,g as w,N,k as K,i as ut,n as pt,o as B}from"./core-C7cnuUop.js";import{eM as J,MH as me,b$ as ce,Bb as xe,jj as bt,Bo as ae,Bn as se,MI as gt,bm as de,fG as Te,MJ as ht,J3 as ft,j8 as je,J4 as Se,J5 as St,i1 as It,LZ as yt,ih as Rt,A$ as At,rQ as vt,i8 as Ct,BL as De,MK as Fe,ML as kt,MM as Et,MN as Bt,MO as wt,MP as xt,Bv as Ie,io as Tt,M6 as jt,Bp as Dt,B9 as Ft,MQ as Ut,B8 as Lt,MR as Mt,Bh as ye,Bz as Pt,By as $t,Bu as Nt,MS as Ue,Gm as _t,bn as Ot,Bk as Gt,C1 as zt,MT as Ht,MU as Zt,BH as Vt,BE as Re,Ls as Jt,B6 as Wt,MV as Le,Cq as Ae,Cy as Kt,MW as qt,MX as H,MY as Qt,MZ as Me,M_ as Xt,M$ as Pe,N0 as $e,BT as ie,bs as Yt,bD as ue,cy as pe,eT as Ne,eR as _e,N1 as en,gy as tn,LF as nn,N2 as an,N3 as Oe,LJ as sn,Mr as on,N4 as rn,MG as ln,Cv as ve,Cu as mn,N5 as cn,N6 as dn,N7 as un,N8 as pn,N9 as bn,Mc as gn,Cl as hn,Cp as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,I2 as vn,cJ as Cn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-DPGmsT0c.js";import{y as Ge,Z as ze,a as ee,r as v,z as P,bG as He,R as te,d as C,aC as Ce,o as U,ao as X,G as wn,D as Ze,bH as xn,w as Z,K as Ve,bI as Tn,j as ne,bJ as jn,M as Dn,C as Fn,B as be,g as Je,a1 as Un,b7 as Ln,Q as Mn,m as We,bK as Pn,a4 as $n}from"./index-B2lD3Jim.js";import{n as _,S as Nn}from"./mui-BkznVaFh.js";import oe from"./NotFoundScreen-CPtlb4xk.js";import{S as ke}from"./SetupPagesScreen-BaHRYy46.js";import{F as Ke}from"./FeaturePreviewScreen-CEV6r8QS.js";import{a as g}from"./sentry-CflaePyQ.js";import{u as qe}from"./useInitialThreadRequest-C_8EtcOe.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-BopsQ8w-.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-4mjujgB-.js";import{D as _n}from"./DrawerScreen-3KqQh33-.js";import{M as Ye}from"./MobileAppDrawer-YMrlHv7B.js";import{R as On}from"./ReimbursementApprovalRoutes-D0b-XGea.js";import{FallBackRoute as Gn}from"./ScreenRoutes-CzaM-ErL.js";import"./recharts-Dt8COHEP.js";import"./lottie-SbVYeXJk.js";import"./analytics-B_kykzhy.js";import"./plaid-DfnoQTVm.js";import"./dnd-TzLeX35A.js";import"./stripe-DMRn4zHo.js";import"./lexical-Dp9Fvoo6.js";import"./pdf-DQg4OfsP.js";import"./utils-t3ltqqZ0.js";import"./analyticsHelper-Dp05MDBJ.js";import"./routePaths-DBCGZwBw.js";import"./BusinessVerificationPageScreen-uevt4KH_.js";import"./ReimbursementApprovalRuleDetailScreen-Cjc2t-Dv.js";import"./getLocaleForTenant-DHk9xDoK.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]="456a4f00-b154-449d-aefe-9db7d23ab1d7",e._sentryDebugIdIdentifier="sentry-dbid-456a4f00-b154-449d-aefe-9db7d23ab1d7")}catch{}})();const et=e=>`/${e}/reimbursements`,zn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Pt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Mt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Ut({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Ct(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=W(),t=le(),n=V(),{reimbursementId:r}=Y(),c=Ge(),d=ze(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),j=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=P.getSignedInUser(),T=w(u=>J(u)),f=w(u=>me(u,r)),D=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),$=ce(T?.userRole??[]);g.useEffect(()=>{(j&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||$&&f.billStatus==="rejected"||$===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx(N,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:C,onLoad:u=>(M=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Jn,{children:s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:U.sp3,paddingBottom:"15px",paddingLeft:U.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(Kn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:U.sp5,paddingRight:U.sp3,paddingBottom:U.sp5,paddingLeft:U.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:D??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
1
+ import{j as s}from"./liveblocks-dlvb-ucF.js";import{j as W,h as le,u as V,l as Y,g as w,N,k as K,i as ut,n as pt,o as B}from"./core-D85lL_9t.js";import{eM as J,MH as me,b$ as ce,Bb as xe,jj as bt,Bo as ae,Bn as se,MI as gt,bm as de,fG as Te,MJ as ht,J3 as ft,j8 as je,J4 as Se,J5 as St,i1 as It,LZ as yt,ih as Rt,A$ as At,rQ as vt,i8 as Ct,BL as De,MK as Fe,ML as kt,MM as Et,MN as Bt,MO as wt,MP as xt,Bv as Ie,io as Tt,M6 as jt,Bp as Dt,B9 as Ft,MQ as Ut,B8 as Lt,MR as Mt,Bh as ye,Bz as Pt,By as $t,Bu as Nt,MS as Ue,Gm as _t,bn as Ot,Bk as Gt,C1 as zt,MT as Ht,MU as Zt,BH as Vt,BE as Re,Ls as Jt,B6 as Wt,MV as Le,Cq as Ae,Cy as Kt,MW as qt,MX as H,MY as Qt,MZ as Me,M_ as Xt,M$ as Pe,N0 as $e,BT as ie,bs as Yt,bD as ue,cy as pe,eT as Ne,eR as _e,N1 as en,gy as tn,LF as nn,N2 as an,N3 as Oe,LJ as sn,Mr as on,N4 as rn,MG as ln,Cv as ve,Cu as mn,N5 as cn,N6 as dn,N7 as un,N8 as pn,N9 as bn,Mc as gn,Cl as hn,Cp as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,I2 as vn,cJ as Cn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-De57_V18.js";import{v as Ge,Z as ze,a as ee,i as v,z as P,bG as He,w as te,d as C,aC as Ce,o as U,ao as X,A as wn,D as Ze,bH as xn,r as Z,F as Ve,bI as Tn,j as ne,bJ as jn,H as Dn,x as Fn,B as be,f as Je,a1 as Un,b7 as Ln,Q as Mn,m as We,bK as Pn,a4 as $n}from"./index-DzzIwd_P.js";import{n as _,S as Nn}from"./mui-C9WBrZQt.js";import oe from"./NotFoundScreen-CnfhDP4M.js";import{S as ke}from"./SetupPagesScreen-Ccl8_CS0.js";import{F as Ke}from"./FeaturePreviewScreen-BsHiFyOu.js";import{a as g}from"./sentry-DGJ961LO.js";import{u as qe}from"./useInitialThreadRequest-j_3WBhMo.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-CO9-0Ull.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-Yook-sE0.js";import{D as _n}from"./DrawerScreen-Dz54oQdA.js";import{M as Ye}from"./MobileAppDrawer-BFl1Y_qR.js";import{R as On}from"./ReimbursementApprovalRoutes-D7APr64t.js";import{FallBackRoute as Gn}from"./ScreenRoutes-B4o9jljw.js";import"./recharts-BYSqK3LX.js";import"./lottie-DGXsyyYr.js";import"./analytics-BAQwJULS.js";import"./plaid-BveLUCs7.js";import"./dnd-P1ekKsf6.js";import"./stripe-DMRn4zHo.js";import"./lexical-C7vBKQl2.js";import"./pdf-DebxFbW1.js";import"./utils-4E0JE-n2.js";import"./analyticsHelper-CjA_jHsA.js";import"./routePaths-CfgcdnOO.js";import"./BusinessVerificationPageScreen-BtM5fUcw.js";import"./ReimbursementApprovalRuleDetailScreen-DPJyNcSj.js";import"./getLocaleForTenant-i0RHCLcV.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]="e31d179b-44e0-4e12-94b2-fc192c3e2ec7",e._sentryDebugIdIdentifier="sentry-dbid-e31d179b-44e0-4e12-94b2-fc192c3e2ec7")}catch{}})();const et=e=>`/${e}/reimbursements`,zn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Pt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Mt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Ut({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Ct(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=W(),t=le(),n=V(),{reimbursementId:r}=Y(),c=Ge(),d=ze(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),j=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=P.getSignedInUser(),T=w(u=>J(u)),f=w(u=>me(u,r)),D=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),$=ce(T?.userRole??[]);g.useEffect(()=>{(j&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||$&&f.billStatus==="rejected"||$===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx(N,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:C,onLoad:u=>(M=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Jn,{children:s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:U.sp3,paddingBottom:"15px",paddingLeft:U.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(Kn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:U.sp5,paddingRight:U.sp3,paddingBottom:U.sp5,paddingLeft:U.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:D??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=_.div`
2
2
  display: flex;
3
3
  position: relative;
4
4
  height: 100vh;
@@ -1 +1 @@
1
- import{j as d}from"./liveblocks-jLbycGCP.js";import{u as V,j as me,h as ue,l as _e,g as m,k as he,n as be,o as z}from"./core-C7cnuUop.js";import{eM as M,f8 as g,Ip as Ie,pr as F,iY as ye,h_ as Ce,sN as ge,pw as we,bu as Se,Iq as Re,Ir as Te,j8 as Fe,bm as Oe,tP as ke,Is as Ae,It as De,sI as je,sM as Ee,Iu as G,Iv as Me,Iw as Pe,Ix as Le,Iy as Be,Iz as w,IA as O,IB as k,IC as H,ID as A,IE as D,dF as ve,tv as Ue,tj as Y,tk as N,tB as xe,to as q,tH as Ve,IF as ze,IG as Ge,IH as He,II as Ye,IJ as Ne,eT as qe,eR as $e}from"./zeni-epic-state-DPGmsT0c.js";import{I as Qe,K as Ze,Z as Je,a as Z,r as j,z as J,M as Ke,j as We,c as Xe,R as ea,d as E,g as aa,w as K,N as sa,O as ta,Q as oa}from"./index-B2lD3Jim.js";import"./mui-BkznVaFh.js";import na from"./NotFoundScreen-CPtlb4xk.js";import{F as ra}from"./FeaturePreviewScreen-CEV6r8QS.js";import{a as h}from"./sentry-CflaePyQ.js";import{u as ia,a as la,b as ca,c as da}from"./useFetchSuggestedQuestionsWhenReady-4mjujgB-.js";import{u as pa}from"./useInitialThreadRequest-C_8EtcOe.js";import{t as $,a as Q}from"./routePaths-DBCGZwBw.js";import{M as fa}from"./MobileAppDrawer-YMrlHv7B.js";import"./recharts-Dt8COHEP.js";import"./lottie-SbVYeXJk.js";import"./analytics-B_kykzhy.js";import"./plaid-DfnoQTVm.js";import"./dnd-TzLeX35A.js";import"./stripe-DMRn4zHo.js";import"./lexical-Dp9Fvoo6.js";import"./pdf-DQg4OfsP.js";import"./utils-t3ltqqZ0.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]="3a6a5143-149b-47d9-9554-a3143ffd582e",e._sentryDebugIdIdentifier="sentry-dbid-3a6a5143-149b-47d9-9554-a3143ffd582e")}catch{}})();const ma=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(D({resetLeftScroll:!0})),e(A({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},ua=e=>{e(Ge()),e(He()),e(Ye()),e(Ne())},_a=he(function(e){const o=J.getSignedInUser(),p=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Re(u);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,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:E,isZeniUser:Oe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Fe(e),isAccountingProjectsEnabled:Te(e),currentTenantCompanyName:a,statementEndPoint:`${oa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ve(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:f,balancesRange:l}=c;let i=[...f];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(Y(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),f.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(q({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(Y(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(N(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return $(o.tenantEmailDomain,a.accountId,a.accountType,f,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,c):a.accountType!=null?$(o.tenantEmailDomain,a.accountId,a.accountType,f,r,c):void 0})();if(l!=null){const i=K(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(D({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(A({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({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(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(Le({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Pe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(je()),e(Ee())},onUpdateDisplayOrder:a=>{e(De(a))},onUpdateReportFormat:a=>{ua(e),e(Ae(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(ke("profit_and_loss_by_classes"))}}})(sa);function ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ze(),p=Je(),u=ta(p),a=me(),s=ue(),t=V(),{tenantEmailDomain:r}=_e(),{useFeatureGate:c}=Z(),{isFeatureEnabled:f}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=J.getSignedInUser(),[i,y]=h.useState(!1),[P,W]=h.useState(!1),{isFeatureEnabled:L}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const B=m(n=>M(n)),X=B.company?.companyInfo.firstMonthOfFY??1,ee=pa(L?B?.companyId:void 0),C=m(n=>g(n).fetchState),ae=m(n=>Ie(n)),{areTenantIdsInSync:b}=Ke(),R=m(n=>n.financeStatementState.selectedReportId),se=m(n=>g(n).isCompareModeOn),_=m(n=>g(n).filter),T=m(n=>g(n).selectedReportAndTimeframeFetchState),te=m(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(y(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!P&&C==="Completed"&&b&&(s(F(l.userId,!1,!0,!1)),W(!0))},[i,P,C,b]),h.useEffect(()=>{if(i&&T.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(we(_.timeframe));break;case"profit_and_loss_by_projects":s(ge(_.timeframe));break;case"balance_sheet":s(Ce(_.timeframe));break;case"cash_flow":s(ye(_.timeframe))}},[i,R,T,b]);const v=We(),oe=v?.loggedInUserRole!=null&&Se(v?.loggedInUserRole)!==!0,[ne,re]=h.useState(!1),U=n=>{re(n)},ie=Xe(),le=ca();return function(n){const{isDataReady:ce}=n,{pathname:de}=V(),x=Qe(de??"")==="reports",pe=ia(ce),fe=h.useMemo(()=>x?ma:void 0,[x]);la({canFetchSuggestedQuestions:pe,pageContexts:fe})}({isDataReady:C==="Completed"}),da({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(ea,{analytics:E,onLoad:n=>n.trackPageLoaded(aa.Event.reports)}):null,d.jsx(fa,{isAppContentDrawerOpen:ne,handleDrawerToggle:U}),d.jsx(_a,{firstMonthOfFY:X,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:te,selectedReportID:R,analytics:E,filter:_,isCompareModeOn:se,hasTransactionAccess:oe,signedInUser:l,selectedReportAndTimeframeFetchState:T,handleDrawerToggle:U,reportsResyncFetchState:ae.reportsResyncFetchState,isAiCfoAccessEnabled:le&&ie&&!e,onAskAiCfoClick:()=>{if(u){const n=K(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:L,initialOpenThreadRequest:ee})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Ua(){const e=m(s=>M(s)),{useFeatureGate:o}=Z(),{isFeatureEnabled:p}=o(j.isDebitCardFeatureEnabled),u=qe(p,e),a=$e(e);return u===!0||a===!0?d.jsx(ra,{}):d.jsxs(be,{children:[d.jsx(z,{path:"/",element:d.jsx(ha,{})}),d.jsx(z,{path:"*",element:d.jsx(na,{})})]})}export{Ua as default};
1
+ import{j as d}from"./liveblocks-dlvb-ucF.js";import{u as V,j as me,h as ue,l as _e,g as m,k as he,n as be,o as z}from"./core-D85lL_9t.js";import{eM as P,f8 as g,Ip as Ie,pr as F,iY as ye,h_ as Ce,sN as ge,pw as we,bu as Se,Iq as Re,Ir as Te,j8 as Fe,bm as Oe,tP as ke,Is as Ae,It as De,sI as je,sM as Ee,Iu as H,Iv as Pe,Iw as Me,Ix as Le,Iy as Be,Iz as w,IA as O,IB as k,IC as G,ID as A,IE as D,dF as ve,tv as Ue,tj as Y,tk as N,tB as xe,to as q,tH as Ve,IF as ze,IG as He,IH as Ge,II as Ye,IJ as Ne,eT as qe,eR as $e}from"./zeni-epic-state-De57_V18.js";import{E as Qe,F as Ze,Z as Je,a as Z,i as j,z as J,H as Ke,j as We,c as Xe,w as ea,d as E,f as aa,r as K,N as sa,O as ta,Q as oa}from"./index-DzzIwd_P.js";import"./mui-C9WBrZQt.js";import na from"./NotFoundScreen-CnfhDP4M.js";import{F as ra}from"./FeaturePreviewScreen-BsHiFyOu.js";import{a as h}from"./sentry-DGJ961LO.js";import{u as ia,a as la,b as ca,c as da}from"./useFetchSuggestedQuestionsWhenReady-Yook-sE0.js";import{u as pa}from"./useInitialThreadRequest-j_3WBhMo.js";import{t as $,a as Q}from"./routePaths-CfgcdnOO.js";import{M as fa}from"./MobileAppDrawer-BFl1Y_qR.js";import"./recharts-BYSqK3LX.js";import"./lottie-DGXsyyYr.js";import"./analytics-BAQwJULS.js";import"./plaid-BveLUCs7.js";import"./dnd-P1ekKsf6.js";import"./stripe-DMRn4zHo.js";import"./lexical-C7vBKQl2.js";import"./pdf-DebxFbW1.js";import"./utils-4E0JE-n2.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]="65f66b35-6f62-45d4-9bc1-82fcb49088f8",e._sentryDebugIdIdentifier="sentry-dbid-65f66b35-6f62-45d4-9bc1-82fcb49088f8")}catch{}})();const ma=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(D({resetLeftScroll:!0})),e(A({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},ua=e=>{e(He()),e(Ge()),e(Ye()),e(Ne())},_a=he(function(e){const o=J.getSignedInUser(),p=e.tenantState.currentTenantId,u=P(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Re(u);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,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:E,isZeniUser:Oe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Fe(e),isAccountingProjectsEnabled:Te(e),currentTenantCompanyName:a,statementEndPoint:`${oa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ve(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:f,balancesRange:l}=c;let i=[...f];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(Y(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),f.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(q({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(Y(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(N(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return $(o.tenantEmailDomain,a.accountId,a.accountType,f,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,c):a.accountType!=null?$(o.tenantEmailDomain,a.accountId,a.accountType,f,r,c):void 0})();if(l!=null){const i=K(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(D({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(A({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({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(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(Le({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Pe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(je()),e(Ee())},onUpdateDisplayOrder:a=>{e(De(a))},onUpdateReportFormat:a=>{ua(e),e(Ae(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(ke("profit_and_loss_by_classes"))}}})(sa);function ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ze(),p=Je(),u=ta(p),a=me(),s=ue(),t=V(),{tenantEmailDomain:r}=_e(),{useFeatureGate:c}=Z(),{isFeatureEnabled:f}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=J.getSignedInUser(),[i,y]=h.useState(!1),[M,W]=h.useState(!1),{isFeatureEnabled:L}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const B=m(n=>P(n)),X=B.company?.companyInfo.firstMonthOfFY??1,ee=pa(L?B?.companyId:void 0),C=m(n=>g(n).fetchState),ae=m(n=>Ie(n)),{areTenantIdsInSync:b}=Ke(),R=m(n=>n.financeStatementState.selectedReportId),se=m(n=>g(n).isCompareModeOn),_=m(n=>g(n).filter),T=m(n=>g(n).selectedReportAndTimeframeFetchState),te=m(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(y(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!M&&C==="Completed"&&b&&(s(F(l.userId,!1,!0,!1)),W(!0))},[i,M,C,b]),h.useEffect(()=>{if(i&&T.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(we(_.timeframe));break;case"profit_and_loss_by_projects":s(ge(_.timeframe));break;case"balance_sheet":s(Ce(_.timeframe));break;case"cash_flow":s(ye(_.timeframe))}},[i,R,T,b]);const v=We(),oe=v?.loggedInUserRole!=null&&Se(v?.loggedInUserRole)!==!0,[ne,re]=h.useState(!1),U=n=>{re(n)},ie=Xe(),le=ca();return function(n){const{isDataReady:ce}=n,{pathname:de}=V(),x=Qe(de??"")==="reports",pe=ia(ce),fe=h.useMemo(()=>x?ma:void 0,[x]);la({canFetchSuggestedQuestions:pe,pageContexts:fe})}({isDataReady:C==="Completed"}),da({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(ea,{analytics:E,onLoad:n=>n.trackPageLoaded(aa.Event.reports)}):null,d.jsx(fa,{isAppContentDrawerOpen:ne,handleDrawerToggle:U}),d.jsx(_a,{firstMonthOfFY:X,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:te,selectedReportID:R,analytics:E,filter:_,isCompareModeOn:se,hasTransactionAccess:oe,signedInUser:l,selectedReportAndTimeframeFetchState:T,handleDrawerToggle:U,reportsResyncFetchState:ae.reportsResyncFetchState,isAiCfoAccessEnabled:le&&ie&&!e,onAskAiCfoClick:()=>{if(u){const n=K(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:L,initialOpenThreadRequest:ee})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Ua(){const e=m(s=>P(s)),{useFeatureGate:o}=Z(),{isFeatureEnabled:p}=o(j.isDebitCardFeatureEnabled),u=qe(p,e),a=$e(e);return u===!0||a===!0?d.jsx(ra,{}):d.jsxs(be,{children:[d.jsx(z,{path:"/",element:d.jsx(ha,{})}),d.jsx(z,{path:"*",element:d.jsx(na,{})})]})}export{Ua as default};
@@ -0,0 +1 @@
1
+ import{j as a}from"./liveblocks-dlvb-ucF.js";import{a as x,z as j,aI as y,w as E,d as p,f as F,cy as P,i as L}from"./index-DzzIwd_P.js";import"./mui-C9WBrZQt.js";import l from"./NotFoundScreen-CnfhDP4M.js";import{a as d}from"./sentry-DGJ961LO.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as f}from"./core-D85lL_9t.js";import{eM as z,P0 as C,LS as Y,P1 as k,ta as G,eZ as M,P2 as O,t8 as Z}from"./zeni-epic-state-De57_V18.js";import{R as w}from"./ReferralListScreen-hfIN-UkI.js";import"./recharts-BYSqK3LX.js";import"./lottie-DGXsyyYr.js";import"./analytics-BAQwJULS.js";import"./plaid-BveLUCs7.js";import"./dnd-P1ekKsf6.js";import"./stripe-DMRn4zHo.js";import"./lexical-C7vBKQl2.js";import"./pdf-DebxFbW1.js";import"./utils-4E0JE-n2.js";import"./useAskAiCfoHostNavButtonProps-CO9-0Ull.js";import"./useFetchSuggestedQuestionsWhenReady-Yook-sE0.js";import"./MobileAppDrawer-BFl1Y_qR.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]="51f4d947-3813-4bf5-9736-beed0ec52518",e._sentryDebugIdIdentifier="sentry-dbid-51f4d947-3813-4bf5-9736-beed0ec52518")}catch{}})();const q=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=j.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(Z())},onUpdateInviteFormLocalData:s=>{e(O({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const e=T(),[t,n]=d.useState(!1),[o,s]=d.useState(!1),r=b(i=>z(i)),c=V(),S=A(),{useDynamicConfig:g}=x(),u=j.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),_=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:v}=g(y.zeniAccountsConfig),D=Y(v);d.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(G()),s(!0))},[]),d.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(M(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(q,{navigate:c,location:S,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(w,{}):a.jsx(l,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(w,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(f,{path:"*",element:a.jsx(l,{})})]})}export{ue as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-KTtbdLF8.js","assets/sentry-CflaePyQ.js","assets/core-C7cnuUop.js","assets/zeni-epic-state-DPGmsT0c.js","assets/index-B2lD3Jim.js","assets/mui-BkznVaFh.js","assets/analytics-B_kykzhy.js","assets/utils-t3ltqqZ0.js","assets/withTransactionSidePanel-m0PuYIs6.js","assets/useAskAiCfoHostNavButtonProps-BopsQ8w-.js","assets/useFetchSuggestedQuestionsWhenReady-4mjujgB-.js","assets/TransactionDetailScreen-RnHkkAvY.js","assets/decodeURIComponentSafe-rDkCEJpn.js","assets/routePaths-DBCGZwBw.js","assets/NotFoundScreen-CPtlb4xk.js","assets/analyticsHelper-Dp05MDBJ.js","assets/CompanyPassportScreen-BsQAk6DO.js","assets/MobileAppDrawer-YMrlHv7B.js","assets/FeaturePreviewScreen-CEV6r8QS.js","assets/ReferralListScreen-t3nG_-Jq.js","assets/index-D-vub4_t.css","assets/BillPayRoutes-C68APJ0s.js","assets/AddressScreen-BnTNp61r.js","assets/DomesticWireDetailScreen-DcjlQFtk.js","assets/useInitialThreadRequest-C_8EtcOe.js","assets/DrawerScreen-3KqQh33-.js","assets/SetupPagesScreen-BaHRYy46.js","assets/BusinessVerificationPageScreen-uevt4KH_.js","assets/BillPayApprovalRoutes-BVBiJezP.js","assets/ReimbursementApprovalRuleDetailScreen-Cjc2t-Dv.js","assets/getLocaleForTenant-DHk9xDoK.js","assets/ReimbursementRoutes-hOmxiTvW.js","assets/ReimbursementApprovalRoutes-D0b-XGea.js","assets/TransactionListRoutes-0LJWWSY0.js","assets/ZeniAccountStatementScreen-QylI0M1l.js","assets/SettingsRoutes-CyoLt7JH.js","assets/accountMappingHelper-B_vdVXJd.js","assets/QBOConnectionScreen-DdYGgWWD.js","assets/empty-B375B_HA.js","assets/index-DrxEgkQ-.js","assets/url-DZF6CZ5y.js","assets/index-CcLDrNJO.js","assets/ReportsRoutes-BYHcHW75.js","assets/ChargeCardRoutes-BDWNHmvV.js","assets/PeopleRoutes-Cb2v_H4M.js","assets/ExpenseAutomationRoutes-CKPTMKMk.js","assets/TreasuryRoutes-DxNNpbkP.js","assets/VendorsRoutes-CXNQHyD0.js","assets/pathToGoBack-DXgc_G9d.js","assets/ZeniAccountRoutes-CLx-Q3l6.js","assets/AddressRoutes-cGHfwdAO.js","assets/PandLWithForecastRoutes-XoBK7btv.js","assets/CustomerOnboardingRoutes-4bfKX61e.js","assets/TransactionDetailRoutes-72pTxmoR.js","assets/EntityDetailRoutes-B4XF7gyV.js","assets/NotificationRoutes-CLWgbDXX.js","assets/PerformanceRoutes-DWvTIqMy.js","assets/RewardsRoutes-BAINUSVd.js","assets/TaskRoutes-b0082ks-.js","assets/TaskListScreen-DqV1jPp4.js","assets/AiCfoScreen-C3DNvQlj.js"])))=>i.map(i=>d[i]);
2
- import{_ as a,bm as os,eM as ls,eT as cs,eR as ds,eS as ms,fD as us,eO as _s,cM as Ae,ct as As,f9 as Es,cl as ps,bB as Is,bp as gs,fe as xs,v as Ts,I1 as hs,bu as js,I2 as Us,bD as bs,fb as Ds,bC as Hs,br as Rs,cN as ys,I3 as fs,I4 as Cs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,m3 as Ee,eN as pe,I5 as Bs,fi as Ie,fI as ge,fJ as xe,fj as ks}from"./zeni-epic-state-DPGmsT0c.js";import{j as e}from"./liveblocks-jLbycGCP.js";import{a as v}from"./sentry-CflaePyQ.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-C7cnuUop.js";import{m as ws,u as zs,z as D,a as Gs,c as $s,e as Ys,r as L,j as Ws,L as B,D as he,t as _,P as qs,d as X,l}from"./index-B2lD3Jim.js";import"./mui-BkznVaFh.js";import{f as je}from"./analyticsHelper-Dp05MDBJ.js";import{t as Js}from"./getLocaleForTenant-DHk9xDoK.js";import"./recharts-Dt8COHEP.js";import"./lottie-SbVYeXJk.js";import"./analytics-B_kykzhy.js";import"./plaid-DfnoQTVm.js";import"./dnd-TzLeX35A.js";import"./stripe-DMRn4zHo.js";import"./lexical-Dp9Fvoo6.js";import"./pdf-DQg4OfsP.js";import"./utils-t3ltqqZ0.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="637bafb8-0ceb-41dd-853e-b9badefc9e16",i._sentryDebugIdIdentifier="sentry-dbid-637bafb8-0ceb-41dd-853e-b9badefc9e16")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-KTtbdLF8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-C68APJ0s.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-hOmxiTvW.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-0LJWWSY0.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-CyoLt7JH.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-BYHcHW75.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-BDWNHmvV.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-Cb2v_H4M.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-CKPTMKMk.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-DxNNpbkP.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-CXNQHyD0.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-CLx-Q3l6.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-BYHcHW75.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-cGHfwdAO.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-Cb2v_H4M.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-XoBK7btv.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-4bfKX61e.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-CXNQHyD0.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-72pTxmoR.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-B4XF7gyV.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-KTtbdLF8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),be=l(()=>a(()=>import("./BillPayRoutes-C68APJ0s.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-CyoLt7JH.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),De=l(()=>a(()=>import("./ReimbursementRoutes-hOmxiTvW.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-CLx-Q3l6.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-DxNNpbkP.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-0LJWWSY0.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-BDWNHmvV.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-CLWgbDXX.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-DWvTIqMy.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-CKPTMKMk.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-BAINUSVd.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-b0082ks-.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-C3DNvQlj.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>a(()=>import("./NotFoundScreen-CPtlb4xk.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-DqV1jPp4.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),R=D.getSignedInUserTenant(o)?.tenantId,h=D.getSignedInUser(),J=os(h),G=Ms(),[N,Re]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(n=>us(n));if(o!=null){const n=D.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:R,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&R!=null){const n=Q.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(R,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,R]),v.useEffect(()=>{N||(Re(!0),f(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&D.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s){if(pe(b?.userId,b?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=D.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,D]),v.useEffect(()=>{D.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(Ie(s));const q=D.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,R,h,f,U))},[R,E]),v.useEffect(()=>{D.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),D.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&R!=null?(O(),_.markActiveTenantFetchCompleted(R)):E==="Error"&&R!=null&&(_.markActiveTenantFetchFailed(R),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,R,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Ds(r.company),We=Pe&&Ye===!0&&!C,qe=re&&Hs(A?.loggedInUserRoleMap),Je=oe&&Rs(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=We&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return D.isSignedIn()?R==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(ia,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(da,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(_a,{}):e.jsx(He,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(Aa,{}):e.jsx(He,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(De,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(De,{}):e.jsx(H,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),H=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(ba,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(y,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),He=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{H as FallBackRoute,Za as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-B2CH7nsJ.js","assets/sentry-DGJ961LO.js","assets/core-D85lL_9t.js","assets/zeni-epic-state-De57_V18.js","assets/index-DzzIwd_P.js","assets/mui-C9WBrZQt.js","assets/analytics-BAQwJULS.js","assets/utils-4E0JE-n2.js","assets/withTransactionSidePanel-dV1DlPXH.js","assets/useAskAiCfoHostNavButtonProps-CO9-0Ull.js","assets/useFetchSuggestedQuestionsWhenReady-Yook-sE0.js","assets/TransactionDetailScreen-AiCOKNuK.js","assets/decodeURIComponentSafe-ByB9WhLS.js","assets/routePaths-CfgcdnOO.js","assets/NotFoundScreen-CnfhDP4M.js","assets/analyticsHelper-CjA_jHsA.js","assets/CompanyPassportScreen-DJKhJL7t.js","assets/MobileAppDrawer-BFl1Y_qR.js","assets/FeaturePreviewScreen-BsHiFyOu.js","assets/ReferralListScreen-hfIN-UkI.js","assets/index-D-vub4_t.css","assets/BillPayRoutes-OPwDa_8R.js","assets/AddressScreen-BzNR9PgQ.js","assets/DomesticWireDetailScreen-BQCaRz-2.js","assets/useInitialThreadRequest-j_3WBhMo.js","assets/DrawerScreen-Dz54oQdA.js","assets/SetupPagesScreen-Ccl8_CS0.js","assets/BusinessVerificationPageScreen-BtM5fUcw.js","assets/BillPayApprovalRoutes-C3wS_qNP.js","assets/ReimbursementApprovalRuleDetailScreen-DPJyNcSj.js","assets/getLocaleForTenant-i0RHCLcV.js","assets/ReimbursementRoutes-DjJ7QvEU.js","assets/ReimbursementApprovalRoutes-D7APr64t.js","assets/TransactionListRoutes-CUTtMwl4.js","assets/ZeniAccountStatementScreen-ILlsQ6-n.js","assets/SettingsRoutes-BvG8gznS.js","assets/accountMappingHelper-DVEV1WRI.js","assets/QBOConnectionScreen-D0vt2FBb.js","assets/empty-vrCkOfCr.js","assets/index-BUCtSz30.js","assets/url-DoymNVR-.js","assets/index-BPbXNCzw.js","assets/ReportsRoutes-BgFOWkwY.js","assets/ChargeCardRoutes-DqTI1vwk.js","assets/PeopleRoutes-DY9PD71E.js","assets/ExpenseAutomationRoutes-Bzdvnk7t.js","assets/TreasuryRoutes-Cw8axJIn.js","assets/VendorsRoutes-j59CLOjh.js","assets/pathToGoBack-Bl_9p4QB.js","assets/ZeniAccountRoutes-CVAgJr8b.js","assets/AddressRoutes-TpKhNc53.js","assets/PandLWithForecastRoutes-CHItYpuL.js","assets/CustomerOnboardingRoutes-Ew5wjRzs.js","assets/TransactionDetailRoutes-DlKQYzWG.js","assets/EntityDetailRoutes-BfBNic02.js","assets/NotificationRoutes-x5lrQ7CC.js","assets/PerformanceRoutes-D1ErJI-A.js","assets/RewardsRoutes-DcjeiwbY.js","assets/TaskRoutes-CGQDmZnH.js","assets/TaskListScreen-D9TnNNrE.js","assets/AiCfoScreen-CxaXxkIm.js"])))=>i.map(i=>d[i]);
2
+ import{_ as a,bm as os,eM as ls,eT as cs,eR as ds,eS as ms,fD as us,eO as _s,cM as Ae,ct as As,f9 as Es,cl as ps,bB as Is,bp as gs,fe as xs,v as Ts,I1 as hs,bu as js,I2 as Us,bD as Ds,fb as Hs,bC as Rs,br as bs,cN as ys,I3 as fs,I4 as Cs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,m3 as Ee,eN as pe,I5 as Bs,fi as Ie,fI as ge,fJ as xe,fj as ks}from"./zeni-epic-state-De57_V18.js";import{j as e}from"./liveblocks-dlvb-ucF.js";import{a as v}from"./sentry-DGJ961LO.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-D85lL_9t.js";import{m as ws,u as zs,z as H,a as Gs,c as $s,K as Ys,i as L,j as Ws,L as B,D as he,t as _,P as qs,d as X,l}from"./index-DzzIwd_P.js";import"./mui-C9WBrZQt.js";import{f as je}from"./analyticsHelper-CjA_jHsA.js";import{t as Js}from"./getLocaleForTenant-i0RHCLcV.js";import"./recharts-BYSqK3LX.js";import"./lottie-DGXsyyYr.js";import"./analytics-BAQwJULS.js";import"./plaid-BveLUCs7.js";import"./dnd-P1ekKsf6.js";import"./stripe-DMRn4zHo.js";import"./lexical-C7vBKQl2.js";import"./pdf-DebxFbW1.js";import"./utils-4E0JE-n2.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="822f1e66-7c88-446a-9545-c4157d6f1e61",i._sentryDebugIdIdentifier="sentry-dbid-822f1e66-7c88-446a-9545-c4157d6f1e61")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-B2CH7nsJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-OPwDa_8R.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-DjJ7QvEU.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-CUTtMwl4.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-BvG8gznS.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-BgFOWkwY.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-DqTI1vwk.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-DY9PD71E.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-Bzdvnk7t.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-Cw8axJIn.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-j59CLOjh.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-CVAgJr8b.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-BgFOWkwY.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-TpKhNc53.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-DY9PD71E.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-CHItYpuL.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-Ew5wjRzs.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-j59CLOjh.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-DlKQYzWG.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-BfBNic02.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-B2CH7nsJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),De=l(()=>a(()=>import("./BillPayRoutes-OPwDa_8R.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-BvG8gznS.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),He=l(()=>a(()=>import("./ReimbursementRoutes-DjJ7QvEU.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-CVAgJr8b.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-Cw8axJIn.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-CUTtMwl4.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-DqTI1vwk.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-x5lrQ7CC.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-D1ErJI-A.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-Bzdvnk7t.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-DcjeiwbY.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-CGQDmZnH.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-CxaXxkIm.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>a(()=>import("./NotFoundScreen-CnfhDP4M.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-D9TnNNrE.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),b=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(n=>us(n));if(o!=null){const n=H.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const n=Q.params.selectedPeriod;if(n!=null){const D=n.split("-");if(D.length===2){const d=ps(Number(D[0])),s=Number(D[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,D,d,s){if(pe(D?.userId,D?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,D,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(Ie(s));const q=H.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(D==="Completed"||D==="Error");n==="Completed"||D!=="Not-Started"&&D!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,f,U))},[b,E]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,D=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},D)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Ds(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Hs(r.company),We=Pe&&Ye===!0&&!C,qe=re&&Rs(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=We&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return H.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(ia,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(da,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(_a,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(Aa,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(Da,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(y,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Da=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,Za as default};
@@ -1,4 +1,4 @@
1
- import{j as t}from"./liveblocks-jLbycGCP.js";import{a as u}from"./sentry-CflaePyQ.js";import{j as T,u as R,h as k,g as m,k as _,l as B,n as Y,o as C}from"./core-C7cnuUop.js";import{bm as Ie,eM as j,gr as ce,K2 as Ce,Ir as xe,j8 as le,lr as Ae,gt as Ee,K4 as we,K3 as je,Mt as Pe,wN as ke,Bg as Me,M2 as ve,Mb as De,b$ as re,cD as Ue,cE as Te,Ie as Fe,Mu as Re,If as _e,vd as Be,Mv as Ve,Dw as Le,AY as Oe,AP as de,AM as Ne,vh as ue,AS as pe,AV as ge,A$ as J,rQ as X,vg as $e,iM as H,iP as me,Mw as ze,jQ as Ke,vw as Ge,IZ as Ze,I_ as Qe,iK as qe,Mx as We,iN as Ye,My as He,vt as Je,Mz as Xe,MA as en,Bd as nn,eR as fe,eT as he,MB as tn,fw as an,Iq as sn,vs as te,fB as ae,fA as on,vr as cn,fz as ln,fy as rn,MC as dn,eW as be,MD as un,ME as pn,vz as gn,vq as se,MF as mn,fd as fn,vn as hn,bS as bn,b_ as Sn,bZ as yn,bT as In,bX as Cn,bW as xn,bV as An,bY as En,bU as wn}from"./zeni-epic-state-DPGmsT0c.js";import{a as ee,r as D,z as x,aa as Se,bx as jn,d as z,g as Pn,j as V,B as ne,by as kn,bz as Mn,al as vn,i as ye,bA as Dn,bB as Un,bC as Tn,a4 as Fn,M as Rn,bD as _n,w as Bn,bE as Vn}from"./index-B2lD3Jim.js";import{n as U}from"./mui-BkznVaFh.js";import{M}from"./MobileAppDrawer-YMrlHv7B.js";import{a as N,g as $,m as Ln}from"./accountMappingHelper-B_vdVXJd.js";import{t as On,A as Nn}from"./AddressScreen-BnTNp61r.js";import F from"./NotFoundScreen-CPtlb4xk.js";import{g as $n}from"./analyticsHelper-Dp05MDBJ.js";import{B as zn}from"./BusinessVerificationPageScreen-uevt4KH_.js";import{C as Kn}from"./CompanyPassportScreen-BsQAk6DO.js";import{q as oe}from"./QBOConnectionScreen-DdYGgWWD.js";import{B as Gn}from"./BillPayApprovalRoutes-BVBiJezP.js";import{R as Zn}from"./ReimbursementApprovalRoutes-D0b-XGea.js";import"./recharts-Dt8COHEP.js";import"./lottie-SbVYeXJk.js";import"./analytics-B_kykzhy.js";import"./plaid-DfnoQTVm.js";import"./dnd-TzLeX35A.js";import"./stripe-DMRn4zHo.js";import"./lexical-Dp9Fvoo6.js";import"./pdf-DQg4OfsP.js";import"./utils-t3ltqqZ0.js";import"./routePaths-DBCGZwBw.js";import"./empty-B375B_HA.js";import"./pdf-lib-CDsnDRGG.js";import"./index-DrxEgkQ-.js";import"./url-DZF6CZ5y.js";import"./index-CcLDrNJO.js";import"./decodeURIComponentSafe-rDkCEJpn.js";import"./ReimbursementApprovalRuleDetailScreen-Cjc2t-Dv.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]="58549dd8-b0c7-48c5-a2c4-0ef139e32e28",e._sentryDebugIdIdentifier="sentry-dbid-58549dd8-b0c7-48c5-a2c4-0ef139e32e28")}catch{}})();const Qn=U.div`
1
+ import{j as t}from"./liveblocks-dlvb-ucF.js";import{a as u}from"./sentry-DGJ961LO.js";import{j as T,u as R,h as k,g as m,k as _,l as B,n as W,o as C}from"./core-D85lL_9t.js";import{bm as Ie,eM as j,gr as ce,K2 as Ce,Ir as xe,j8 as le,lr as Ae,gt as Ee,K4 as we,K3 as je,Mt as Pe,wN as ke,Bg as ve,M2 as Me,Mb as De,b$ as re,cD as Ue,cE as Te,Ie as Fe,Mu as Re,If as _e,vd as Be,Mv as Ve,Dw as Le,AY as Oe,AP as de,AM as Ne,vh as ue,AS as pe,AV as ge,A$ as J,rQ as X,vg as $e,iM as Y,iP as me,Mw as ze,jQ as Ke,vw as Ge,IZ as Ze,I_ as Qe,iK as qe,Mx as He,iN as We,My as Ye,vt as Je,Mz as Xe,MA as en,Bd as nn,eR as fe,eT as he,MB as tn,fw as an,Iq as sn,vs as te,fB as ae,fA as on,vr as cn,fz as ln,fy as rn,MC as dn,eW as be,MD as un,ME as pn,vz as gn,vq as se,MF as mn,fd as fn,vn as hn,bS as bn,b_ as Sn,bZ as yn,bT as In,bX as Cn,bW as xn,bV as An,bY as En,bU as wn}from"./zeni-epic-state-De57_V18.js";import{a as ee,i as D,z as x,aa as Se,bx as jn,d as z,f as Pn,j as V,B as ne,by as kn,bz as vn,al as Mn,h as ye,bA as Dn,bB as Un,bC as Tn,a4 as Fn,H as Rn,bD as _n,r as Bn,bE as Vn}from"./index-DzzIwd_P.js";import{n as U}from"./mui-C9WBrZQt.js";import{M as v}from"./MobileAppDrawer-BFl1Y_qR.js";import{a as N,g as $,m as Ln}from"./accountMappingHelper-DVEV1WRI.js";import{t as On,A as Nn}from"./AddressScreen-BzNR9PgQ.js";import F from"./NotFoundScreen-CnfhDP4M.js";import{g as $n}from"./analyticsHelper-CjA_jHsA.js";import{B as zn}from"./BusinessVerificationPageScreen-BtM5fUcw.js";import{C as Kn}from"./CompanyPassportScreen-DJKhJL7t.js";import{q as oe}from"./QBOConnectionScreen-D0vt2FBb.js";import{B as Gn}from"./BillPayApprovalRoutes-C3wS_qNP.js";import{R as Zn}from"./ReimbursementApprovalRoutes-D7APr64t.js";import"./recharts-BYSqK3LX.js";import"./lottie-DGXsyyYr.js";import"./analytics-BAQwJULS.js";import"./plaid-BveLUCs7.js";import"./dnd-P1ekKsf6.js";import"./stripe-DMRn4zHo.js";import"./lexical-C7vBKQl2.js";import"./pdf-DebxFbW1.js";import"./utils-4E0JE-n2.js";import"./routePaths-CfgcdnOO.js";import"./empty-vrCkOfCr.js";import"./pdf-lib-VVDJ8cIK.js";import"./index-BUCtSz30.js";import"./url-DoymNVR-.js";import"./index-BPbXNCzw.js";import"./decodeURIComponentSafe-ByB9WhLS.js";import"./ReimbursementApprovalRuleDetailScreen-DPJyNcSj.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]="6384ca42-5e73-4f7d-bad7-169bac58bb3c",e._sentryDebugIdIdentifier="sentry-dbid-6384ca42-5e73-4f7d-bad7-169bac58bb3c")}catch{}})();const Qn=U.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as t}from"./liveblocks-jLbycGCP.js";import{a as u}from"./sentry-CflaePy
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,qn=_(function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:le(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:xe(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,location:c,isFiling1099FeatureEnabled:o}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:s,billsAccountSection:r,reimbursementsAccountSection:p,vendorsAccountSection:d,filing1099Section:f}=n,{incomeAccount:b,expenseAccount:g}=s,{billPayAccount:l}=r,{reimbursementsAccount:A}=p,{prepaidExpensesAccount:y,fixedAssetsAccount:w,accruedExpensesAccount:S}=d,{bankAccount:I,expenseCategory1099:L}=f,E=N(a.accountMappingView.incomeAccountList,b.selectedOption),K=N(a.accountMappingView.expenseAccountList,g.selectedOption),G=N(a.accountMappingView.billPayAccountList,l.selectedOption),Z=N(a.accountMappingView.reimbursementsAccountList,A.selectedOption),O=$(a.accountMappingView.prepaidExpensesAccountList,y.selectedOptions),h=$(a.accountMappingView.fixedAssetsAccountList,w.selectedOptions),v=$(a.accountMappingView.accruedExpensesAccountList,S.selectedOptions),Q=$(a.accountMappingView.bankAccounts1099FilingAccountList,I.selectedOptions),q=Ln(a.accountMappingView.expenseAccounts1099FilingAccountList,L),W={selectedIncomeAccountId:E?.accountId,selectedExpenseAccountId:K?.accountId,selectedBillPayAccountId:G?.accountId,selectedReimbursementsAccountId:Z?.accountId,selectedPrepaidExpensesAccountIds:O.map(P=>P.accountId),selectedFixedAssetsAccountIds:h.map(P=>P.accountId),selectedAccruedExpensesAccountIds:v.map(P=>P.accountId),selectedBankAccounts1099FilingAccountIds:Q.map(P=>P.accountId),selectedExpenseAccounts1099FilingAccountIds:q};e(je({data:W}))},onBackClick:()=>{Se(c)===!1?(i("../../dashboard"),e(we())):e(ce())},onSaveClick:()=>{e(Ee()),o&&z.track(Pn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Ae(a.currentTenant.companyId,n))}}})(jn),Wn=()=>{const e=T(),a=R(),i=k(),{useFeatureGate:c}=ee(),{isFeatureEnabled:o}=c(D.isFiling1099FeatureEnabled),{isFeatureEnabled:n}=c(D.isScheduledJEAccruedExpensesFeatureEnabled),s=x.getSignedInUser(),r=Ie(s),p=m(y=>j(y)),[d,f]=u.useState(!1),[b,g]=u.useState(!1);u.useEffect(()=>{d===!1&&(i(ce()),f(!0))},[d]);const l=m(y=>Ce(y)),A=y=>{g(y)};return t.jsxs(Qn,{children:[t.jsx(M,{isAppContentDrawerOpen:b,handleDrawerToggle:A}),t.jsx(qn,{currentTenant:p,navigate:e,accountMappingView:l,isFiling1099FeatureEnabled:o&&r,isAccruedExpensesFeatureEnabled:n,location:a,isSettings:Se(a),onClickMenuIcon:()=>A(!0)})]})},Yn=U.div`
9
+ `,qn=_(function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:le(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:xe(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,location:c,isFiling1099FeatureEnabled:o}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:s,billsAccountSection:r,reimbursementsAccountSection:p,vendorsAccountSection:d,filing1099Section:f}=n,{incomeAccount:b,expenseAccount:g}=s,{billPayAccount:l}=r,{reimbursementsAccount:A}=p,{prepaidExpensesAccount:y,fixedAssetsAccount:w,accruedExpensesAccount:S}=d,{bankAccount:I,expenseCategory1099:L}=f,E=N(a.accountMappingView.incomeAccountList,b.selectedOption),K=N(a.accountMappingView.expenseAccountList,g.selectedOption),G=N(a.accountMappingView.billPayAccountList,l.selectedOption),Z=N(a.accountMappingView.reimbursementsAccountList,A.selectedOption),O=$(a.accountMappingView.prepaidExpensesAccountList,y.selectedOptions),h=$(a.accountMappingView.fixedAssetsAccountList,w.selectedOptions),M=$(a.accountMappingView.accruedExpensesAccountList,S.selectedOptions),Q=$(a.accountMappingView.bankAccounts1099FilingAccountList,I.selectedOptions),q=Ln(a.accountMappingView.expenseAccounts1099FilingAccountList,L),H={selectedIncomeAccountId:E?.accountId,selectedExpenseAccountId:K?.accountId,selectedBillPayAccountId:G?.accountId,selectedReimbursementsAccountId:Z?.accountId,selectedPrepaidExpensesAccountIds:O.map(P=>P.accountId),selectedFixedAssetsAccountIds:h.map(P=>P.accountId),selectedAccruedExpensesAccountIds:M.map(P=>P.accountId),selectedBankAccounts1099FilingAccountIds:Q.map(P=>P.accountId),selectedExpenseAccounts1099FilingAccountIds:q};e(je({data:H}))},onBackClick:()=>{Se(c)===!1?(i("../../dashboard"),e(we())):e(ce())},onSaveClick:()=>{e(Ee()),o&&z.track(Pn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Ae(a.currentTenant.companyId,n))}}})(jn),Hn=()=>{const e=T(),a=R(),i=k(),{useFeatureGate:c}=ee(),{isFeatureEnabled:o}=c(D.isFiling1099FeatureEnabled),{isFeatureEnabled:n}=c(D.isScheduledJEAccruedExpensesFeatureEnabled),s=x.getSignedInUser(),r=Ie(s),p=m(y=>j(y)),[d,f]=u.useState(!1),[b,g]=u.useState(!1);u.useEffect(()=>{d===!1&&(i(ce()),f(!0))},[d]);const l=m(y=>Ce(y)),A=y=>{g(y)};return t.jsxs(Qn,{children:[t.jsx(v,{isAppContentDrawerOpen:b,handleDrawerToggle:A}),t.jsx(qn,{currentTenant:p,navigate:e,accountMappingView:l,isFiling1099FeatureEnabled:o&&r,isAccruedExpensesFeatureEnabled:n,location:a,isSettings:Se(a),onClickMenuIcon:()=>A(!0)})]})},Wn=U.div`
10
10
  display: flex;
11
11
  height: 100%;
12
12
  width: 100%;
@@ -14,7 +14,7 @@ import{j as t}from"./liveblocks-jLbycGCP.js";import{a as u}from"./sentry-CflaePy
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- `,Hn=_(function(e,a){const i=j(e),c=ve(e),o=De(e),n=a.roleMap.bill_pay_admin;return{isDisabled:(re(i?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:o,analytics:z}},function(e,a){const{navigate:i,currentTenant:c}=a;return{onSetupApprovalRulesBillPaySectionClick:()=>{i("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{i("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")}}})(kn),Jn=()=>{const e=T(),a=R(),i=k(),{tenantEmailDomain:c}=B(),[o,n]=u.useState(!1),[s,r]=u.useState(!1),[p,d]=u.useState(!1),f=m(S=>j(S)),b=m(S=>S.billPaySetupApproverViewState.fetchState),g=m(S=>S.remiSetupApproverViewState.fetchState),l=m(S=>Pe(S)),A=f.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const y=V();u.useEffect(()=>{p||b!=="Not-Started"||(d(!0),i(ke(!0)))},[p,b,i]),u.useEffect(()=>{s||g!=="Not-Started"||(r(!0),i(Me(!0)))},[s,g,i]);const w=S=>{n(S)};return y?.loggedInUserRoleMap!=null?t.jsxs(Yn,{children:[t.jsx(M,{isAppContentDrawerOpen:o,handleDrawerToggle:w}),t.jsx(Hn,{navigate:e,location:a,companyId:A,currentTenant:f,roleMap:y.loggedInUserRoleMap,onClickMenuIcon:()=>{w(!0)}})]}):t.jsx(ne,{fetchState:l.fetchState})},Xn=U.div`
17
+ `,Yn=_(function(e,a){const i=j(e),c=Me(e),o=De(e),n=a.roleMap.bill_pay_admin;return{isDisabled:(re(i?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:o,analytics:z}},function(e,a){const{navigate:i,currentTenant:c}=a;return{onSetupApprovalRulesBillPaySectionClick:()=>{i("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{i("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")}}})(kn),Jn=()=>{const e=T(),a=R(),i=k(),{tenantEmailDomain:c}=B(),[o,n]=u.useState(!1),[s,r]=u.useState(!1),[p,d]=u.useState(!1),f=m(S=>j(S)),b=m(S=>S.billPaySetupApproverViewState.fetchState),g=m(S=>S.remiSetupApproverViewState.fetchState),l=m(S=>Pe(S)),A=f.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const y=V();u.useEffect(()=>{p||b!=="Not-Started"||(d(!0),i(ke(!0)))},[p,b,i]),u.useEffect(()=>{s||g!=="Not-Started"||(r(!0),i(ve(!0)))},[s,g,i]);const w=S=>{n(S)};return y?.loggedInUserRoleMap!=null?t.jsxs(Wn,{children:[t.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:w}),t.jsx(Yn,{navigate:e,location:a,companyId:A,currentTenant:f,roleMap:y.loggedInUserRoleMap,onClickMenuIcon:()=>{w(!0)}})]}):t.jsx(ne,{fetchState:l.fetchState})},Xn=U.div`
18
18
  display: flex;
19
19
  height: 100%;
20
20
  width: 100%;
@@ -22,7 +22,7 @@ import{j as t}from"./liveblocks-jLbycGCP.js";import{a as u}from"./sentry-CflaePy
22
22
  flex-direction: column;
23
23
  align-items: center;
24
24
  background-color: ${e=>e.theme.colors.grey4};
25
- `,et=_(function(e,a){const{companyId:i,isZeniAccountEnabled:c,isChargeCardEnabled:o,isBillPayEnabled:n,isRemiEnabled:s,isTreasuryEnabled:r}=a,p=j(e);return{bankSetupView:Ve(e,i,n,s,c,o,r),connectedAccountProvider:p.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:z}},function(e,a){const{navigate:i,currentTenant:c,companyId:o}=a;return{onFetchLinkTokenClick:(n,s,r)=>{e(X(s,n,r))},onEstablishConnectionClick:(n,s,r)=>{e(J(n,o,s,r))},onUpdatePaymentAccountStatus:(n,s,r,p,d)=>{e(ge(n,s,d,p,r))},onUpdatePaymentAccountLoginStatus:(n,s,r,p)=>{e(pe(!1,n,p,r,s))},onEstablishConnectionSuccess:(n,s)=>{e(ue(s,n))},onUpdateAccountClick:(n,s,r,p,d)=>{e(d==="paymentAccount"?de(n,s,r,p):Ne(p,n,s))},onUpdatePrimaryFundingAccount:(n,s,r)=>{e(Oe(o,s,n,r))},onRemoveConnection:n=>{e(Le(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")}}})(Mn),nt=()=>{const e=T(),a=R(),i=k(),{tenantEmailDomain:c}=B(),o=V(),[n,s]=u.useState(!1),[r,p]=u.useState(!1),d=m(I=>j(I)),f=m(I=>I.settingsViewState.bankConnection.fetchState),b=Ue(d,o?.loggedInUserRoleMap),g=Te(d,o?.loggedInUserRoleMap),l=Fe(d,o?.loggedInUserRoleMap),A=Re(d,o?.loggedInUserRoleMap),y=_e(d,o?.loggedInUserRoleMap),w=d.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");u.useEffect(()=>{r||f==="Completed"||(p(!0),i(Be(!1)))},[r,i,f]);const S=I=>{s(I)};return b||l||g||y?t.jsxs(Xn,{children:[t.jsx(M,{isAppContentDrawerOpen:n,handleDrawerToggle:S}),t.jsx(et,{navigate:e,location:a,companyId:w,currentTenant:d,roleMap:o.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:g,isZeniAccountEnabled:l,isChargeCardEnabled:y,isTreasuryEnabled:A,onClickMenuIcon:()=>{S(!0)}})]}):t.jsx(F,{})},tt=U.div`
25
+ `,et=_(function(e,a){const{companyId:i,isZeniAccountEnabled:c,isChargeCardEnabled:o,isBillPayEnabled:n,isRemiEnabled:s,isTreasuryEnabled:r}=a,p=j(e);return{bankSetupView:Ve(e,i,n,s,c,o,r),connectedAccountProvider:p.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:z}},function(e,a){const{navigate:i,currentTenant:c,companyId:o}=a;return{onFetchLinkTokenClick:(n,s,r)=>{e(X(s,n,r))},onEstablishConnectionClick:(n,s,r)=>{e(J(n,o,s,r))},onUpdatePaymentAccountStatus:(n,s,r,p,d)=>{e(ge(n,s,d,p,r))},onUpdatePaymentAccountLoginStatus:(n,s,r,p)=>{e(pe(!1,n,p,r,s))},onEstablishConnectionSuccess:(n,s)=>{e(ue(s,n))},onUpdateAccountClick:(n,s,r,p,d)=>{e(d==="paymentAccount"?de(n,s,r,p):Ne(p,n,s))},onUpdatePrimaryFundingAccount:(n,s,r)=>{e(Oe(o,s,n,r))},onRemoveConnection:n=>{e(Le(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")}}})(vn),nt=()=>{const e=T(),a=R(),i=k(),{tenantEmailDomain:c}=B(),o=V(),[n,s]=u.useState(!1),[r,p]=u.useState(!1),d=m(I=>j(I)),f=m(I=>I.settingsViewState.bankConnection.fetchState),b=Ue(d,o?.loggedInUserRoleMap),g=Te(d,o?.loggedInUserRoleMap),l=Fe(d,o?.loggedInUserRoleMap),A=Re(d,o?.loggedInUserRoleMap),y=_e(d,o?.loggedInUserRoleMap),w=d.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");u.useEffect(()=>{r||f==="Completed"||(p(!0),i(Be(!1)))},[r,i,f]);const S=I=>{s(I)};return b||l||g||y?t.jsxs(Xn,{children:[t.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:S}),t.jsx(et,{navigate:e,location:a,companyId:w,currentTenant:d,roleMap:o.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:g,isZeniAccountEnabled:l,isChargeCardEnabled:y,isTreasuryEnabled:A,onClickMenuIcon:()=>{S(!0)}})]}):t.jsx(F,{})},tt=U.div`
26
26
  display: flex;
27
27
  height: 100%;
28
28
  width: 100%;
@@ -30,7 +30,7 @@ import{j as t}from"./liveblocks-jLbycGCP.js";import{a as u}from"./sentry-CflaePy
30
30
  flex-direction: column;
31
31
  align-items: center;
32
32
  background-color: ${e=>e.theme.colors.grey4};
33
- `,at=_(function(e,a){const{companyId:i}=a,c=j(e),o=a.roleMap.bill_pay_admin,n=ze(e,i),{uiState:s}=n,r=(re(c?.userRole??[])||o)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:s,stripeKey:ye.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:z}},function(e,a){const{navigate:i,currentTenant:c,companyId:o}=a;return{onFetchLinkTokenClick:(n,s)=>{e(X("billing_setup",n,s))},onEstablishConnectionClick:n=>{e(J(n,o,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,s,r)=>{e(ge(n,s,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(pe(!1,n,"billing","billing_setup",s))},onUpdateAccountClick:(n,s)=>{e(de(n,s,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(Ye(n))},updateCardPaymentModalState:n=>{e(We({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,s,r)=>{e(qe(n,s,r))},handleFetchPaymentSources:()=>{e(H())},resetCardPaymentViewState:()=>{e(Qe())},handleResetCardPaymentErrorStatuses:()=>{e(Ze())},onBillingAddressSave:n=>{e(Ge(n))},onAddressEditHandler:n=>{if(n!=null){const s=On(n);e(Ke({addressType:"subscription_billing_address",addressToCreate:s}))}}}})(Dn),st=()=>{const e=T(),a=R(),i=k(),{tenantEmailDomain:c}=B(),[o,n]=u.useState(!1),[s,r]=u.useState(!1),[p,d]=u.useState(!1),f=m(I=>j(I)),b=m(I=>I.cardPaymentViewState),g=m(I=>I.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=vn(b.addCardPaymentSourceStatus.fetchState),A=b.addCardPaymentSourceStatus.fetchState,y=f.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const w=V();u.useEffect(()=>{y!=null&&i($e(y,!1))},[y,i]),u.useEffect(()=>{s||(r(!0),i(H()))},[s,i]),u.useEffect(()=>{p||(me(["card"]),d(!0))},[p]),u.useEffect(()=>{l==="In-Progress"&&A==="Completed"&&i(H())},[l,A]);const S=I=>{n(I)};return w?.loggedInUserRoleMap!=null?t.jsxs(tt,{children:[t.jsx(M,{isAppContentDrawerOpen:o,handleDrawerToggle:S}),t.jsx(at,{navigate:e,location:a,companyId:y,currentTenant:f,roleMap:w.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)},googleAPIKey:ye.googleMapsAPIKey})]}):t.jsx(ne,{fetchState:g})},ot=_(function(){return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,integrationsView:c,tenantEmailDomain:o}=a;return{onBackClick:()=>{i("../")},onNavigateToDashboard:()=>{i("../dashboard")},onReconnectQBO:()=>{oe.init("/connection/auth",o),oe.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(Je())}}})(Un),it=()=>{const e=T(),{tenantEmailDomain:a}=B(),[i,c]=u.useState(!1),o=m(g=>g.tenantState.fetchState),n=m(g=>j(g)),s=n.companyId??x.getSignedInUserTenant(a)?.companyId,r=x.getSignedInUser(),p=V(),d=p?.loggedInUserRole.includes("admin")===!0;if(r==null)throw Error("Can't access Integrations page without signing in...");const f=g=>{c(g)},b=m(g=>He(g,s));return p?.loggedInUserRoleMap!=null?t.jsxs(ct,{children:[t.jsx(M,{isAppContentDrawerOpen:i,handleDrawerToggle:f}),t.jsx(ot,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:d,integrationsView:b,isLoading:o==="In-Progress",tenantEmailDomain:n.tenantEmailDomain})]}):t.jsx(ne,{fetchState:o})},ct=U.div`
33
+ `,at=_(function(e,a){const{companyId:i}=a,c=j(e),o=a.roleMap.bill_pay_admin,n=ze(e,i),{uiState:s}=n,r=(re(c?.userRole??[])||o)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:s,stripeKey:ye.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:z}},function(e,a){const{navigate:i,currentTenant:c,companyId:o}=a;return{onFetchLinkTokenClick:(n,s)=>{e(X("billing_setup",n,s))},onEstablishConnectionClick:n=>{e(J(n,o,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,s,r)=>{e(ge(n,s,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(pe(!1,n,"billing","billing_setup",s))},onUpdateAccountClick:(n,s)=>{e(de(n,s,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?i("../.."):i("../")},onNavigateToDashboard:()=>{i("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(We(n))},updateCardPaymentModalState:n=>{e(He({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,s,r)=>{e(qe(n,s,r))},handleFetchPaymentSources:()=>{e(Y())},resetCardPaymentViewState:()=>{e(Qe())},handleResetCardPaymentErrorStatuses:()=>{e(Ze())},onBillingAddressSave:n=>{e(Ge(n))},onAddressEditHandler:n=>{if(n!=null){const s=On(n);e(Ke({addressType:"subscription_billing_address",addressToCreate:s}))}}}})(Dn),st=()=>{const e=T(),a=R(),i=k(),{tenantEmailDomain:c}=B(),[o,n]=u.useState(!1),[s,r]=u.useState(!1),[p,d]=u.useState(!1),f=m(I=>j(I)),b=m(I=>I.cardPaymentViewState),g=m(I=>I.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),l=Mn(b.addCardPaymentSourceStatus.fetchState),A=b.addCardPaymentSourceStatus.fetchState,y=f.companyId??x.getSignedInUserTenant(c)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const w=V();u.useEffect(()=>{y!=null&&i($e(y,!1))},[y,i]),u.useEffect(()=>{s||(r(!0),i(Y()))},[s,i]),u.useEffect(()=>{p||(me(["card"]),d(!0))},[p]),u.useEffect(()=>{l==="In-Progress"&&A==="Completed"&&i(Y())},[l,A]);const S=I=>{n(I)};return w?.loggedInUserRoleMap!=null?t.jsxs(tt,{children:[t.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:S}),t.jsx(at,{navigate:e,location:a,companyId:y,currentTenant:f,roleMap:w.loggedInUserRoleMap,onClickMenuIcon:()=>{S(!0)},googleAPIKey:ye.googleMapsAPIKey})]}):t.jsx(ne,{fetchState:g})},ot=_(function(){return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(e,a){const{navigate:i,integrationsView:c,tenantEmailDomain:o}=a;return{onBackClick:()=>{i("../")},onNavigateToDashboard:()=>{i("../dashboard")},onReconnectQBO:()=>{oe.init("/connection/auth",o),oe.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(Je())}}})(Un),it=()=>{const e=T(),{tenantEmailDomain:a}=B(),[i,c]=u.useState(!1),o=m(g=>g.tenantState.fetchState),n=m(g=>j(g)),s=n.companyId??x.getSignedInUserTenant(a)?.companyId,r=x.getSignedInUser(),p=V(),d=p?.loggedInUserRole.includes("admin")===!0;if(r==null)throw Error("Can't access Integrations page without signing in...");const f=g=>{c(g)},b=m(g=>Ye(g,s));return p?.loggedInUserRoleMap!=null?t.jsxs(ct,{children:[t.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:f}),t.jsx(ot,{navigate:e,onClickMenuIcon:()=>{f(!0)},isAdmin:d,integrationsView:b,isLoading:o==="In-Progress",tenantEmailDomain:n.tenantEmailDomain})]}):t.jsx(ne,{fetchState:o})},ct=U.div`
34
34
  display: flex;
35
35
  height: 100%;
36
36
  width: 100%;
@@ -46,7 +46,7 @@ import{j as t}from"./liveblocks-jLbycGCP.js";import{a as u}from"./sentry-CflaePy
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,rt=()=>{const e=k(),{tenantEmailDomain:a}=B(),[i,c]=u.useState(!1),o=m(l=>j(l)).companyId??x.getSignedInUserTenant(a)?.companyId,n=x.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const s=m(l=>Xe(l,n.userId)),r=m(l=>en(l,o,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:p}=r,d=l=>{c(l)},f=u.useCallback(l=>{e(X("user_reimbursement_account",l))},[]),b=u.useCallback(l=>{e(J(l,o,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);u.useEffect(()=>{s.fetchState!=="Completed"&&s.fetchState!=="In-Progress"&&e(nn(n.userId))},[n.userId,s.fetchState]);const g=s.fetchState==="Not-Started"||s.fetchState==="In-Progress";return t.jsxs(lt,{children:[t.jsx(M,{isAppContentDrawerOpen:i,handleDrawerToggle:d}),t.jsx(Tn,{plaidConnectionDetails:p,isLoading:g,myBankConnectionsView:s,onFetchLinkTokenClick:f,onEstablishConnectionClick:b,onClickMenuIcon:()=>{d(!0)}})]})},dt=U.div`
49
+ `,rt=()=>{const e=k(),{tenantEmailDomain:a}=B(),[i,c]=u.useState(!1),o=m(l=>j(l)).companyId??x.getSignedInUserTenant(a)?.companyId,n=x.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const s=m(l=>Xe(l,n.userId)),r=m(l=>en(l,o,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:p}=r,d=l=>{c(l)},f=u.useCallback(l=>{e(X("user_reimbursement_account",l))},[]),b=u.useCallback(l=>{e(J(l,o,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);u.useEffect(()=>{s.fetchState!=="Completed"&&s.fetchState!=="In-Progress"&&e(nn(n.userId))},[n.userId,s.fetchState]);const g=s.fetchState==="Not-Started"||s.fetchState==="In-Progress";return t.jsxs(lt,{children:[t.jsx(v,{isAppContentDrawerOpen:i,handleDrawerToggle:d}),t.jsx(Tn,{plaidConnectionDetails:p,isLoading:g,myBankConnectionsView:s,onFetchLinkTokenClick:f,onEstablishConnectionClick:b,onClickMenuIcon:()=>{d(!0)}})]})},dt=U.div`
50
50
  display: flex;
51
51
  height: 100%;
52
52
  width: 100%;
@@ -54,4 +54,4 @@ import{j as t}from"./liveblocks-jLbycGCP.js";import{a as u}from"./sentry-CflaePy
54
54
  flex-direction: column;
55
55
  align-items: center;
56
56
  background-color: ${e=>e.theme.colors.grey4};
57
- `,ie=({appContent:e})=>{const a=k(),i=T(),c=R(),[o,n]=u.useState(!1),s=m(h=>j(h)),{tenantEmailDomain:r}=s,p=s.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ee(),{isFeatureEnabled:f}=d(D.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(D.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(D.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(D.isTreasuryEnabled),A=m(h=>le(h)),y=fe(s),w=he(g,s),S=!w&&A,I=Fn(s,b,g),{areTenantIdsInSync:L}=Rn();u.useEffect(()=>{L&&a(tn(p,S))},[p,a,S,L]);const E=m(h=>an(h,S)),K=E.fetchState==="Not-Started"||E.fetchState==="In-Progress"||p==null,G=sn(s),Z=!!s.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,O=h=>{n(h)};return t.jsxs(dt,{children:[t.jsx(M,{isAppContentDrawerOpen:o,handleDrawerToggle:O}),e!=null?t.jsx(t.Fragment,{children:e}):t.jsx(_n,{myProfileView:E,isAccountingClassesEnabled:A,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:f===!1,isChargeCardDisabled:I===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:G===!1,onClickMenuIcon:()=>{O(!0)},isLoading:K,isBankingOnlyTenant:w,isCardsOnlyTenant:y,onAddressClick:h=>{const v=function(q,W){let P=`/${q}/settings/my_profile`;return P=P.concat(`/new/${W}`),P}(r,h),Q=Bn(c.state?.pathnameStackToGoBack,c.pathname);i(v,{state:{pathnameStackToGoBack:Q}})},onGetOtp:h=>{const v={...E.myProfileLocalData,phone:h};a(te({localData:v})),a(rn(h,"MyProfile"))},onResendOtp:h=>{a(ln(h,"MyProfile"))},onCancelClick:()=>{a(cn())},onSaveClick:()=>{a(ae("MyProfile",E.myProfileLocalData.phone,E.myProfileLocalData.otpChallenge,E.myProfileLocalData.dateOfBirth,E.addressData?.addressToCreate))},onVerifyOtp:(h,v)=>{a(on(h,v,"MyProfile"))},onVerifyOtpSuccess:h=>{h!=null&&x.saveZeniOtpToken(h),a(ae("MyProfile",E.myProfileLocalData.phone,E.myProfileLocalData.otpChallenge,E.myProfileLocalData.dateOfBirth,E.addressData?.addressToCreate))},updateMyProfileLocalData:h=>{a(te({localData:h}))}})]})};function ut(){const e=k(),a=m(l=>j(l)).companyId,i=m(l=>dn(l)),c=m(l=>be(l)),o=x.getSignedInUser(),[n,s]=u.useState(!1),r=u.useCallback(l=>{s(l)},[]),p=u.useCallback(l=>{e(un(l))},[]),d=u.useCallback(()=>{o?.userEmail!=null&&e(pn({loggedInUserEmail:o.userEmail}))},[o?.userEmail]),f=u.useCallback(()=>{e(gn())},[]);if(o==null)throw Error("Can't access Notification Settings page without signing in...");const b=u.useCallback(()=>{const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(se(l,a))},[a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=u.useCallback(()=>{e(mn())},[]);return u.useEffect(()=>{if(c.fetchState==="Completed"&&i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"){const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(se(l,a))}},[i.fetchState,a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),t.jsxs(t.Fragment,{children:[t.jsx(M,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),t.jsx(Vn,{notificationSettingsView:i,onFormDataChange:p,onCancel:d,onSave:f,onClickMenuIcon:()=>{r(!0)},signedInUser:o,onRefresh:b,resetUpdateStatus:g})]})}function Zt(e){const[a,i]=u.useState(!1),c=m(l=>be(l)),o=m(l=>j(l)),n=V(),s=x.getSignedInUser(),r=k(),{useFeatureGate:p}=ee(),{isFeatureEnabled:d}=p(D.isDebitCardFeatureEnabled),f=s?.userEmail==null||c.fetchState!=="Completed"||fn(c.notificationSettings,s.userEmail,d,o);u.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&a===!1&&(i(!0),r(hn()))},[c.fetchState,a]);const b=he(d,o),g=fe(o);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||f!==!0?bn(o)?t.jsxs(Y,{children:[Sn(n?.loggedInUserRole??[],d,o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"accounting/*",element:t.jsx(Wn,{})}),yn(n?.loggedInUserRole??[],d,o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"approval_rules/*",element:t.jsx(pt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),In(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"my_bank_connections",element:t.jsx(rt,{})}),Cn(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"bank_connections",element:t.jsx(nt,{})}),xn(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"business_verification",element:t.jsx(zn,{productType:b?"zeni_accounts":g?"charge_cards":$n(o,n?.loggedInUserRoleMap)})}),An(n?.loggedInUserRole??[],o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"company_details",element:t.jsx(Kn,{})}),En(n?.loggedInUserRole??[],o)&&t.jsx(C,{path:"billing",element:t.jsx(st,{})}),wn(n?.loggedInUserRole??[],d,o)&&t.jsx(C,{path:"integrations",element:t.jsx(it,{})}),t.jsx(C,{path:"my_profile/new/:addressType",element:t.jsx(ie,{appContent:t.jsx(Nn,{isSubPage:!1})})}),t.jsx(C,{path:"my_profile",element:t.jsx(ie,{})}),f&&t.jsx(C,{path:"notifications",element:t.jsx(ut,{})}),t.jsx(C,{path:"*",element:t.jsx(F,{})})]}):t.jsx(Y,{children:t.jsx(C,{path:"*",element:t.jsx(F,{})})}):null}function pt(e){return t.jsxs(Y,{children:[t.jsx(C,{path:"/",element:t.jsx(Jn,{})}),t.jsx(C,{path:"bills/approval-rules/*",element:t.jsx(Gn,{})}),t.jsx(C,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?t.jsx(Zn,{}):t.jsx(F,{})}),t.jsx(C,{path:"*",element:t.jsx(F,{})})]})}export{Zt as default};
57
+ `,ie=({appContent:e})=>{const a=k(),i=T(),c=R(),[o,n]=u.useState(!1),s=m(h=>j(h)),{tenantEmailDomain:r}=s,p=s.companyId??x.getSignedInUserTenant(r)?.companyId;if(x.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:d}=ee(),{isFeatureEnabled:f}=d(D.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(D.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=d(D.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=d(D.isTreasuryEnabled),A=m(h=>le(h)),y=fe(s),w=he(g,s),S=!w&&A,I=Fn(s,b,g),{areTenantIdsInSync:L}=Rn();u.useEffect(()=>{L&&a(tn(p,S))},[p,a,S,L]);const E=m(h=>an(h,S)),K=E.fetchState==="Not-Started"||E.fetchState==="In-Progress"||p==null,G=sn(s),Z=!!s.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,O=h=>{n(h)};return t.jsxs(dt,{children:[t.jsx(v,{isAppContentDrawerOpen:o,handleDrawerToggle:O}),e!=null?t.jsx(t.Fragment,{children:e}):t.jsx(_n,{myProfileView:E,isAccountingClassesEnabled:A,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:f===!1,isChargeCardDisabled:I===!1,isTreasuryDisabled:l===!1,isLiteRoleDisabled:G===!1,onClickMenuIcon:()=>{O(!0)},isLoading:K,isBankingOnlyTenant:w,isCardsOnlyTenant:y,onAddressClick:h=>{const M=function(q,H){let P=`/${q}/settings/my_profile`;return P=P.concat(`/new/${H}`),P}(r,h),Q=Bn(c.state?.pathnameStackToGoBack,c.pathname);i(M,{state:{pathnameStackToGoBack:Q}})},onGetOtp:h=>{const M={...E.myProfileLocalData,phone:h};a(te({localData:M})),a(rn(h,"MyProfile"))},onResendOtp:h=>{a(ln(h,"MyProfile"))},onCancelClick:()=>{a(cn())},onSaveClick:()=>{a(ae("MyProfile",E.myProfileLocalData.phone,E.myProfileLocalData.otpChallenge,E.myProfileLocalData.dateOfBirth,E.addressData?.addressToCreate))},onVerifyOtp:(h,M)=>{a(on(h,M,"MyProfile"))},onVerifyOtpSuccess:h=>{h!=null&&x.saveZeniOtpToken(h),a(ae("MyProfile",E.myProfileLocalData.phone,E.myProfileLocalData.otpChallenge,E.myProfileLocalData.dateOfBirth,E.addressData?.addressToCreate))},updateMyProfileLocalData:h=>{a(te({localData:h}))}})]})};function ut(){const e=k(),a=m(l=>j(l)).companyId,i=m(l=>dn(l)),c=m(l=>be(l)),o=x.getSignedInUser(),[n,s]=u.useState(!1),r=u.useCallback(l=>{s(l)},[]),p=u.useCallback(l=>{e(un(l))},[]),d=u.useCallback(()=>{o?.userEmail!=null&&e(pn({loggedInUserEmail:o.userEmail}))},[o?.userEmail]),f=u.useCallback(()=>{e(gn())},[]);if(o==null)throw Error("Can't access Notification Settings page without signing in...");const b=u.useCallback(()=>{const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(se(l,a))},[a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=u.useCallback(()=>{e(mn())},[]);return u.useEffect(()=>{if(c.fetchState==="Completed"&&i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"){const l=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(se(l,a))}},[i.fetchState,a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),t.jsxs(t.Fragment,{children:[t.jsx(v,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),t.jsx(Vn,{notificationSettingsView:i,onFormDataChange:p,onCancel:d,onSave:f,onClickMenuIcon:()=>{r(!0)},signedInUser:o,onRefresh:b,resetUpdateStatus:g})]})}function Zt(e){const[a,i]=u.useState(!1),c=m(l=>be(l)),o=m(l=>j(l)),n=V(),s=x.getSignedInUser(),r=k(),{useFeatureGate:p}=ee(),{isFeatureEnabled:d}=p(D.isDebitCardFeatureEnabled),f=s?.userEmail==null||c.fetchState!=="Completed"||fn(c.notificationSettings,s.userEmail,d,o);u.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&a===!1&&(i(!0),r(hn()))},[c.fetchState,a]);const b=he(d,o),g=fe(o);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||f!==!0?bn(o)?t.jsxs(W,{children:[Sn(n?.loggedInUserRole??[],d,o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"accounting/*",element:t.jsx(Hn,{})}),yn(n?.loggedInUserRole??[],d,o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"approval_rules/*",element:t.jsx(pt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),In(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"my_bank_connections",element:t.jsx(rt,{})}),Cn(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"bank_connections",element:t.jsx(nt,{})}),xn(o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"business_verification",element:t.jsx(zn,{productType:b?"zeni_accounts":g?"charge_cards":$n(o,n?.loggedInUserRoleMap)})}),An(n?.loggedInUserRole??[],o,n?.loggedInUserRoleMap)&&t.jsx(C,{path:"company_details",element:t.jsx(Kn,{})}),En(n?.loggedInUserRole??[],o)&&t.jsx(C,{path:"billing",element:t.jsx(st,{})}),wn(n?.loggedInUserRole??[],d,o)&&t.jsx(C,{path:"integrations",element:t.jsx(it,{})}),t.jsx(C,{path:"my_profile/new/:addressType",element:t.jsx(ie,{appContent:t.jsx(Nn,{isSubPage:!1})})}),t.jsx(C,{path:"my_profile",element:t.jsx(ie,{})}),f&&t.jsx(C,{path:"notifications",element:t.jsx(ut,{})}),t.jsx(C,{path:"*",element:t.jsx(F,{})})]}):t.jsx(W,{children:t.jsx(C,{path:"*",element:t.jsx(F,{})})}):null}function pt(e){return t.jsxs(W,{children:[t.jsx(C,{path:"/",element:t.jsx(Jn,{})}),t.jsx(C,{path:"bills/approval-rules/*",element:t.jsx(Gn,{})}),t.jsx(C,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?t.jsx(Zn,{}):t.jsx(F,{})}),t.jsx(C,{path:"*",element:t.jsx(F,{})})]})}export{Zt as default};
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-jLbycGCP.js";import{j as Q,u as J,h as X,l as W,g as w,N as M,k as G,q as Je}from"./core-C7cnuUop.js";import{bC as Xe,cN as Ie,LS as ye,eM as B,ct as en,wY as Z,wN as nn,M2 as tn,M5 as an,pn as ee,pb as ne,jI as te,rm as N,M7 as Ae,fA as $e,fz as We,fy as Ge,M8 as sn,x5 as on,AY as ke,AP as _e,AM as ve,AD as K,AS as Pe,AV as we,A$ as Ee,rQ as Te,fK as cn,co as rn,eT as un,eR as dn,eS as ln,br as pn,M9 as mn,zF as le,Ah as yn,Ma as fn,bD as gn,Cc as pe,Bg as Sn,Mb as bn,Mc as hn,Cg as Cn,Ck as In,rf as An,Gq as kn,CR as Ce,DK as me,Md as _n,Me as vn,Mf as Pn,Mg as He,Mh as wn,IM as En,Lf as Tn,IY as Dn,Mi as qe,Mj as Ve,D3 as Ke,jQ as Un,pe as Ye,ro as On,bB as je,rA as Me,cr as Fn,Mk as Qe,fc as Vn,Cz as Bn,CD as xn,Ml as jn,CU as Re,Mm as Mn,Mn as Rn,Mo as Nn,Mp as zn,fG as Ln,yg as Zn,Mq as $n,yl as Wn,yk as Gn}from"./zeni-epic-state-DPGmsT0c.js";import{j as ae,a as ie,r as de,m as De,aI as Y,z as T,R as se,d as E,B as Ue,g as $,bm as Hn,ao as oe,bn as x,bo as qn,bp as Kn,aa as xe,bq as Yn,w as Ne,ap as ze,Z as Qn,C as Jn,br as Xn,bs as et,bt as nt,a1 as tt}from"./index-B2lD3Jim.js";import{a as C}from"./sentry-CflaePyQ.js";import{n as Be,D as at,S as it}from"./mui-BkznVaFh.js";import{M as fe}from"./MobileAppDrawer-YMrlHv7B.js";import R from"./NotFoundScreen-CPtlb4xk.js";import{a as Le}from"./analyticsHelper-Dp05MDBJ.js";import{c as Ze}from"./routePaths-DBCGZwBw.js";import{B as Fe}from"./BusinessVerificationPageScreen-uevt4KH_.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]="e62f4ec6-8266-49ed-928b-30ba250f7ff2",e._sentryDebugIdIdentifier="sentry-dbid-e62f4ec6-8266-49ed-928b-30ba250f7ff2")}catch{}})();const st=Be.div`
1
+ import{j as u}from"./liveblocks-dlvb-ucF.js";import{j as Q,u as J,h as X,l as W,g as w,N as M,k as G,q as Je}from"./core-D85lL_9t.js";import{bC as Xe,cN as Ie,LS as ye,eM as B,ct as en,wY as Z,wN as nn,M2 as tn,M5 as an,pn as ee,pb as ne,jI as te,rm as N,M7 as Ae,fA as $e,fz as We,fy as Ge,M8 as sn,x5 as on,AY as ke,AP as _e,AM as ve,AD as K,AS as Pe,AV as we,A$ as Ee,rQ as Te,fK as cn,co as rn,eT as un,eR as dn,eS as ln,br as pn,M9 as mn,zF as le,Ah as yn,Ma as fn,bD as gn,Cc as pe,Bg as Sn,Mb as bn,Mc as hn,Cg as Cn,Ck as In,rf as An,Gq as kn,CR as Ce,DK as me,Md as _n,Me as vn,Mf as Pn,Mg as He,Mh as wn,IM as En,Lf as Tn,IY as Dn,Mi as qe,Mj as Ve,D3 as Ke,jQ as Un,pe as Ye,ro as On,bB as je,rA as Me,cr as Fn,Mk as Qe,fc as Vn,Cz as Bn,CD as xn,Ml as jn,CU as Re,Mm as Mn,Mn as Rn,Mo as Nn,Mp as zn,fG as Ln,yg as Zn,Mq as $n,yl as Wn,yk as Gn}from"./zeni-epic-state-De57_V18.js";import{j as ae,a as ie,i as de,m as De,aI as Y,z as T,w as se,d as E,B as Ue,f as $,bm as Hn,ao as oe,bn as x,bo as qn,bp as Kn,aa as xe,bq as Yn,r as Ne,ap as ze,Z as Qn,x as Jn,br as Xn,bs as et,bt as nt,a1 as tt}from"./index-DzzIwd_P.js";import{a as C}from"./sentry-DGJ961LO.js";import{n as Be,D as at,S as it}from"./mui-C9WBrZQt.js";import{M as fe}from"./MobileAppDrawer-BFl1Y_qR.js";import R from"./NotFoundScreen-CnfhDP4M.js";import{a as Le}from"./analyticsHelper-CjA_jHsA.js";import{c as Ze}from"./routePaths-CfgcdnOO.js";import{B as Fe}from"./BusinessVerificationPageScreen-BtM5fUcw.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]="309b6bfa-fe10-4d9e-aecc-ed38c10c31f4",e._sentryDebugIdIdentifier="sentry-dbid-309b6bfa-fe10-4d9e-aecc-ed38c10c31f4")}catch{}})();const st=Be.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as f}from"./liveblocks-dlvb-ucF.js";import{a as u,b as T,q as A}from"./sentry-DGJ961LO.js";import{h as D,j as M,g as l,u as z,N as O,k as j}from"./core-D85lL_9t.js";import{u as F,z as s,m as P,d as E,D as N,e as _,f as B,J,g as V,M as $,h as v}from"./index-DzzIwd_P.js";import{eM as q,I0 as Q,I1 as R,eN as W,fi as H,I7 as G,fF as K,cR as X,I8 as y,I9 as Y,Ia as Z,bQ as b}from"./zeni-epic-state-De57_V18.js";import"./mui-C9WBrZQt.js";import{u as ee}from"./useDeviceId-cXBRwcUd.js";import{f as te}from"./analyticsHelper-CjA_jHsA.js";import{t as ne}from"./getLocaleForTenant-i0RHCLcV.js";import"./recharts-BYSqK3LX.js";import"./lottie-DGXsyyYr.js";import"./analytics-BAQwJULS.js";import"./plaid-BveLUCs7.js";import"./dnd-P1ekKsf6.js";import"./stripe-DMRn4zHo.js";import"./lexical-C7vBKQl2.js";import"./pdf-DebxFbW1.js";import"./utils-4E0JE-n2.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]="08b90269-f6aa-4cb1-8ed3-eebdff0a6800",t._sentryDebugIdIdentifier="sentry-dbid-08b90269-f6aa-4cb1-8ed3-eebdff0a6800")}catch{}})();const ie=j(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:b(c),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(y())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=M(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>q(e)),S=l(e=>Q(e)),m=z(),w=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(S.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),K().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(J,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
@@ -0,0 +1,9 @@
1
+ import{j as s}from"./liveblocks-dlvb-ucF.js";import{a}from"./sentry-DGJ961LO.js";import{h as u,u as m,j as p,N as g}from"./core-D85lL_9t.js";import{z as d,B as b,t as y,d as f,f as h}from"./index-DzzIwd_P.js";import{In as I,I5 as x,Io as j}from"./zeni-epic-state-De57_V18.js";import{n as w}from"./mui-C9WBrZQt.js";import"./recharts-BYSqK3LX.js";import"./lottie-DGXsyyYr.js";import"./analytics-BAQwJULS.js";import"./plaid-BveLUCs7.js";import"./dnd-P1ekKsf6.js";import"./stripe-DMRn4zHo.js";import"./lexical-C7vBKQl2.js";import"./pdf-DebxFbW1.js";import"./utils-4E0JE-n2.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]="d5ec8f45-2615-4d3b-99b5-91c73370eb6b",e._sentryDebugIdIdentifier="sentry-dbid-d5ec8f45-2615-4d3b-99b5-91c73370eb6b")}catch{}})();function q(){const e=u(),t=m(),i=p(),n=a.useRef(!1),c=d.isSignedIn(),r=t.state?.message==="logout",o=r||c;return a.useEffect(()=>{o&&!n.current&&(n.current=!0,setTimeout(()=>{try{d.clearAll(),e(I()),e(x(!1)),j(),y.reset(),f.trackLogout(h.Event.logoutSuccess),f.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;export{q as default};