1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[616],{9863:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(71492),i=r(28505),o=r(29034),a=r(43943),c=r(2634),l=r(99882);let u=[n.p.loading,n.p.refetch],d=e=>{let{authData:t}=(0,l.A)(),{data:r,networkStatus:n,refetch:d,called:s}=(0,i.I)(c.iw,{skip:!t,variables:{includeAccounts:!!(null==e?void 0:e.includeAccounts)}}),[p]=(0,o._)(c.iw,{fetchPolicy:"cache-and-network"}),g=u.includes(n),[h,{loading:f}]=(0,a.n)(c.Cy,{update(e,t){let{data:{cancelApplication:{applicationId:r}}}=t;e.modify({fields:{applications:(e,t)=>{let{readField:n}=t;return e.filter(e=>r!==n("id",e))}}})}});return{...r,getApplications:p,refetchApplications:d,isLoading:g,called:s,cancelApplication:h,isCancelingApplication:f}}},14350:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56455),i=r(27615);let o=e=>{let{heading:t,subheading:r}=e;return(0,n.Y)(i.A,{heading:t,subheading:r})}},15775:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/magictoken",function(){return r(69760)}])},45991:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(56455),i=r(61811),o=r(50435);let a=e=>{let{clientName:t}=e;return(0,n.Y)(i.A,{icon:"alert-circle-white",heading:"Unable To Confirm Information",subheading:"There has been an error with your information, please contact ".concat(t," or start an application as a new customer"),children:(0,n.Y)(o.A,{href:"/products",hrefInNew:!1,children:"Browse Products"})})}},69760:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});var n=r(56455),i=r(39102),o=r(63315),a=r(32412),c=r(62413),l=r(96536),u=r.n(l),d=r(34483),s=r(72909),p=r(57192),g=r(82410),h=r(14350),f=r(85183),w=r(59646),A=r(66662),m=r(79879),v=r(60557),k=r(24499),y=r(12964),E=r(37767),b=r(86739),L=r(38595),_=r(43943);function I(){let e=(0,b._)(["\n mutation InitiateMagicLinkTokenLogin {\n initiateMagicLinkTokenLogin {\n state\n magicFlowContext {\n organizationId\n applicationId\n customerCategory\n productId\n productType\n accountVariant\n ssoLandingPage\n }\n }\n }\n"]);return I=function(){return e},e}let N=(0,L.J1)(I());var T=r(1780),P=r(9863),Y=r(56460),M=r(72624),C=r(73456),R=r(2353),O=r(23348),S=r(32457),U=r(45991);let x={[c.zG.code]:()=>((()=>{let e=(0,d.useRouter)(),t=(()=>{let[e]=(0,_.n)(N);return e})(),r=(()=>{var e;let t=(0,d.useRouter)(),{setCurrentView:r}=(0,A.At)(),{triggerCustomerServiceError:n}=(0,Y.A)(),{handleLoginSuccess:o}=null!=(e=(0,y.J)())?e:{},a=(()=>{let e=(0,d.useRouter)(),{selectProduct:t}=(0,M.A)(),{config:r}=(0,E.UK)(),{products:n,productCards:o}=(0,C.sy)(),{goToAppsOrProductsFunc:a}=(()=>{let{getApplications:e,refetchApplications:t}=(0,P.A)(),r=(0,d.useRouter)();return{goToAppsOrProductsFunc:async n=>{let{customerCategory:i,productType:o}=n,a=!1;if(!(i||o)){var c;await t();let{data:r}=await e();a=!!(null==r||null==(c=r.applications)?void 0:c.some(e=>(null==e?void 0:e.executionStatus)==="pending"))}let l=a?"/applications":{pathname:"/products",query:{...i&&{customerCategory:i},...o&&{productType:o}}};return r.replace(l)}}})();return c=>{let{magicFlowContext:l}=c,{productId:u,accountVariant:d,customerCategory:s,productType:p,organizationId:g,applicationId:h,ssoLandingPage:w}=l;if(w===f.h6)return e.replace("/applications");if(h)return e.replace("/application/".concat(h));if(!u)return a({customerCategory:s,productType:p});{let{productCardProducts:e}=(0,C.Rb)({productIdOrCardId:u,productCards:o,products:n}),a=(e=>{let{config:t,productId:r}=e;return r?(0,R.Hh)({config:t,productId:r,onError:e=>{i.L.addError(Error("Navigation Error: No product was found for the given ID in the client configuration"),{errors:e,productId:r})}}):null})({config:r,productId:u});return t({product:null!=a?a:void 0,cardId:u,accounts:e,accountVariant:d,organizationId:g})}}})();return async e=>{let{data:i}=e,{state:c,magicFlowContext:l}=i.initiateMagicLinkTokenLogin,u=()=>a({magicFlowContext:l});"succeeded"===c?((0,T.P)(),await u()):"rejected"===c?t.replace("/login?tokenError=true","/login"):"coreSyncMemberEmailMissing"===c?n(v.ww):("expectingOtp"===c&&(null==o||o()),r({...(0,k.c)(c),data:{onSucceeded:u}}))}})();(0,m.o)(()=>{let n=!0;return(async()=>{try{let{errors:e,data:i}=await t();if(!n)return;if(e)throw e;(0,w.Z1)(i,"No data received from initiateMagicLinkTokenLogin"),await r({data:i})}catch(t){if(!n)return;
1i.L.addError(Error("Authentication Error: Login With Magic Link"),{errors:t}),await e.replace("/login?tokenError=true","/login")}})(),()=>{n=!1}})})(),(0,n.Y)(h.A,{})),[c.o9.code]:O.z,[c.c4.code]:S.r,[c.AR.code]:U.A,[c.dZ.code]:s.A,[c.TU.code]:p.A,[c.Mf.code]:g.A},z=()=>{let{query:{existingUserEmail:e,tokenError:t,authenticationError:r}}=(0,d.useRouter)();return(0,n.FD)(o.t,{onError:e=>{let{error:t,errorInfo:r}=e;return i.L.addError(t,{errorInfo:r})},children:[(0,n.Y)(u(),{children:(0,n.Y)("meta",{name:"robots",content:"noindex"})}),(0,n.Y)(a.A,{name:"login",views:x,initialView:c.zG,viewProps:{existingUserEmail:e,tokenError:t,authenticationError:r}})]})}},79879:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var n=r(53239);let i=e=>{(0,n.useEffect)(e,[])}},82410:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(56455),i=r(61811),o=r(50435),a=r(37767);let c=()=>{let{config:e}=(0,a.UK)(),t=e.clientDetails.customerServiceNumber;return(0,n.Y)(i.A,{icon:"illustration-booking-failed",heading:"Whoops, Weâre Sorry!",subheading:"Unfortunately the product youâre attempting to apply for is no longer available.".concat(t?" If you feel this is incorrect, or would like to speak to a member of our team, please give us a call at ".concat(t,"."):""),children:(0,n.Y)(o.A,{href:"/products",hrefInNew:!1,children:"View Available Products"})})}}},e=>{e.O(0,[328,658,115,730,679,237,593,636,792],()=>e(e.s=15775)),_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.