https://tickets.empiretheatre.com.au/web/_next/static/chunks/pages/auth/redirect-79f292aec7e820a9.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3225],{43015:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>s,default:()=>a});var n=r(99982),s=!0;let a=n.default},43848:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(55024),s=r(13005);class a extends s.Ay{static async fetchOrganizationInfo(e){let t=n.J.BASE_URL()+"/api/organizations/"+e+"/info";return await this.fetchApi(s.U0.get,t)}}},77810:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/redirect",function(){return r(43015)}])},99982:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>y,default:()=>A,getRedirectProps:()=>p});var n=r(50979),s=r(84614),a=r(49181),i=r(25963),l=r(57404),o=r(55024),c=r(13005);class d extends c.Ay{static async getAccessToken(e){return this.fetchApi(c.U0.post,o.J.BASE_URL()+"/api/auth/token",{exchangeToken:e})}}var u=r(58411),h=r(62097),g=function(e){return e.loading="loading",e.error="error",e.success="success",e}(g||{});let f=e=>{let{seller:t,organization:r}=e,{t:o}=(0,s.Bd)(["common","auth","transactions"]),c=(0,a.useRouter)(),[g,f]=(0,i.useState)("loading");return(0,i.useLayoutEffect)(()=>{u.v.applyCheckoutStyling({theme:"white",sellerInfo:t})},[]),(0,i.useEffect)(()=>{if("error"===g){let e=setTimeout(()=>{t&&(window.location.href="/seller/".concat(t.url||t._id))},2500);return()=>clearTimeout(e)}},[g]),(0,i.useEffect)(()=>{let e=t?"/seller/".concat(t.url||t._id):null,{exchangeToken:r,redirect_uri:n=e}=c.query;if(!r||!n)return void f("error");let s=new URL(decodeURIComponent(n)).toString();if(!s.startsWith("https")&&!s.startsWith("http")&&s!==e)return void f("error");(async()=>{try{let e=await d.getAccessToken(String(r));f("success"),l.A.get().setToken(e.token),window.location.href=s}catch(e){l.A.get().isLoggedIn()&&(f("success"),window.location.href=s),f("error")}})()},[c.query.exchangeToken,c.query.redirect_uri]),(0,n.jsx)(h.v,{hideAccountPill:!0,children:(0,n.jsx)("div",{className:"fallback-holder",children:(0,n.jsx)("div",{className:"fallback-box",children:(0,n.jsxs)("div",{className:"fallback-box-content",children:[(0,n.jsx)("h2",{children:o("common:login")}),(0,n.jsx)("div",{className:"mt-24",children:(0,n.jsxs)("div",{className:"text info",children:["loading"===g&&(0,n.jsx)(n.Fragment,{children:o("auth:ssoRedirectPage.waitYouWillBeLoggedIn")}),"success"===g&&(0,n.jsx)(n.Fragment,{children:o("auth:ssoRedirectPage.successfullyLoggedIn")}),"error"===g&&(0,n.jsx)(n.Fragment,{children:o("auth:ssoRedirectPage.somethingWentWrongTryAgain")})]})})]})})})})};var _=r(81438),m=r(33792),w=r(92458),x=r(43848),v=r(92200),y=!0;let p=async(e,t,r)=>{try{let n=await v.A.fetchSellerInfo(r,e.detectedLocale),s=await (0,w.Wq)(t.domainCtx,n._id,n.orgId),a=null;return(null==n?void 0:n.orgId)&&(a=await x.A.fetchOrganizationInfo(n.orgId)),t.domainCtx=await s,{seller:n,organization:a}}catch(e){}return{seller:null,organization:null}},A=e=>{var t;let{t:r}=(0,s.Bd)("seller");return e.seller?(0,n.jsx)(m.O3,{seller:e.seller,organization:null!=(t=e.organization)?t:void 0,children:(0,n.jsx)(f,{seller:e.seller,organization:e.organization})}):(0,n.jsx)(_.M,{code:404,message:r("seller:sellerCouldNotBeFound")})}}},e=>{e.O(0,[7310,95,589,885,6878,8367,3407,7681,6707,6099,575,2194,636,6593,8792],()=>e(e.s=77810)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.