"use strict";(self.webpackChunkspayee_micro_frontend=self.webpackChunkspayee_micro_frontend||[]).push([[5099],{35099:function(e,t,n){n.r(t),n.d(t,{AppContext:function(){return y},DEFAULT_TIMEZONE:function(){return h},IS_TIMEZONE_INDIA:function(){return _},default:function(){return S}});var o=n(94559),a=n(38080),l=n(4451),r=n(41613),c=n(77129),i=n(86162),s=n(49414),u=n(84743),g=n.n(u),f=n(96540),d=n(56347),m=n(41999);const p=(0,n(17929).zR)();var E=n(89711);const h=g().tz.guess(),_=g().tz.guess().includes("Kolkata")||g().tz.guess().includes("Calcutta"),y=(0,f.createContext)(null);var S=function(){const[e]=(0,a.P)(),t=(0,m.A)((e=>e.setPublicCountryCode));return(0,f.useEffect)((()=>{e&&!e?.user?._id&&((0,i.zm)(),(new i.Ay).sendEvent({type:"logout-amplitude",properties:{},userProperties:{custom_domain:e.domainName?.[0],org_id:e._id,default_google_login_enabled:void 0!==e?.defaultGoogleLoginEnabled?Boolean(e?.defaultGoogleLoginEnabled):Boolean(e?.loginWithGoogle),facebook_login_enabled:e?.loginWithFb,personalized_google_login_enabled:!1!==e?.loginWithGoogle&&Boolean(!e?.defaultGoogleLoginEnabled),rev_share:!(!e.rev2ShareSubscriptionPlan&&!e.revShareSubscriptionPlan)}}))}),[e]),(0,f.useEffect)((()=>{e&&document.getElementsByTagName("head")[0]}),[e]),(0,f.useEffect)((()=>{(0,s.Gz)("firstTimeLogin",!1)}),[]),(0,f.useEffect)((()=>(0,s.n_)("showLoginMessage")),[]),(0,f.useEffect)((()=>{localStorage.getItem("country")&&localStorage.getItem("ipInfo")?t(localStorage.getItem("country")):fetch(String("https://ipinfo.io/json"),{method:"GET"},{headers:{Accept:"application/json"}}).then((e=>e.json())).then((e=>{var n="in";429===e.status?n=_?"in":"us":(n=e.country.toLowerCase(),localStorage.setItem("ipInfo",JSON.stringify(e))),localStorage.setItem("country",n),t(n)})).catch(((e,n)=>{var o=_?"in":"us";localStorage.setItem("country",o),t(o)}))}),[]),f.createElement(d.Ix,{history:p},f.createElement(d.dO,null,r.S7.map((e=>f.createElement(d.qh,{exact:!0,key:e.path,path:`/t/${e.path}`},f.createElement(f.Suspense,{fallback:f.createElement("div",null)},f.createElement(e.component,null))))),f.createElement(d.qh,{component:()=>f.createElement(o.A,{redirectLink:`/t/${c.fp.HOME}`,showArrow:!0,errorPageType:l.fA})})),f.createElement(E.A,null))}}}]);