1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1915,6448],{6192:(e,t,r)=>{r.d(t,{A:()=>u});var a=r(75038),s=r(46982),i=r(10317),n=r(99755),l=r(31053),o=r(74735),d=r(99409),c=r(76430);let u=({disabledMode:e,privacyInvalid:t,termsInvalid:r,setTermsAndConditionsId:u})=>{let m=(0,o.Ym)(),p=(0,d.c)(),[h,g]=(0,c.useState)(null),[f,x]=(0,c.useState)(null),[b,v]=(0,c.useState)("termsAndConditions"),[y,_]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{(async()=>{try{let e=(0,l.W)(),{data:t,status:r}=await e.get(`/${n.$n.Consent}/${n.aM.TermsAndConditions}`,{params:{language:m}});if(200!==r||!t?.data)throw Error();u(t.data.id),x(t.data.contents?.replace(/<(?:STYLE|style).*>[\s\S]+?<\/(?:STYLE|style)>/gm,""));let{data:a,status:s}=await e.get(`/${n.$n.Consent}/${n.aM.PrivacyPolicy}`,{params:{language:m}});if(200!==s||!a?.data)throw Error();g(a.data.contents?.replace(/<(?:STYLE|style).*>[\s\S]+?<\/(?:STYLE|style)>/gm,""))}catch(e){console.error(e)}})()},[m,u]),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)(s.A,{id:"acceptedTermsAndAgreements",invalid:r,disabled:e,children:[p("register_checkbox_i_agree")," ",(0,a.jsx)("button",{className:"lowercase underline hover:text-secondary-500",onClick:e=>{e.preventDefault(),v("termsAndConditions"),_(!0)},children:p("register_terms_conditions")})," ","*"]}),(0,a.jsxs)(s.A,{id:"acceptedPrivacyPolicy",invalid:t,disabled:e,children:[p("register_checkbox_i_agree")," ",(0,a.jsx)("button",{className:"lowercase underline hover:text-secondary-500",onClick:e=>{e.preventDefault(),v("privacyPolicy"),_(!0)},children:p("register_privacy_policy")})," ","*"]})]}),(0,a.jsx)(i.A,{isOpen:y,onClose:()=>_(!1),backdropClose:!0,middle:!0,showClose:!0,size:"1200",title:p("termsAndConditions"===b?"register_terms_conditions":"register_privacy_policy"),children:(0,a.jsxs)("div",{className:"border-grey-300 my-6 max-h-[500px] overflow-y-scroll border-[1rem] p-4 lg:max-h-[650px]",children:[(0,a.jsx)("div",{className:`${"termsAndConditions"===b?"block":"hidden"}`,dangerouslySetInnerHTML:{__html:f??""}}),(0,a.jsx)("div",{className:`${"privacyPolicy"===b?"block":"hidden"}`,dangerouslySetInnerHTML:{__html:h??""}})]})})]})}},12695:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(75038),s=r(77542),i=r.n(s),n=r(76430);let l=({action:e,setToken:t,refreshTrigger:r=0})=>{let s="6LdO8CwqAAAAAHKeQNQ2Ck7rsrIBGpi-eUl9F80T",l=(0,n.useCallback)(()=>{window.grecaptcha&&window.grecaptcha.ready(()=>{window.grecaptcha.execute(s,{action:e}).then(e=>{t(e)}).catch(e=>{console.error(e)})})},[e,s,t]);return(0,n.useEffect)(()=>
1{l()},[r,l]),(0,a.jsx)(i(),{src:`https://www.google.com/recaptcha/api.js?render=${s}`,defer:!0,onLoad:l})}},22921:(e,t,r)=>{r.d(t,{A:()=>u});var a=r(75038),s=r(46001),i=r.n(s),n=r(72298),l=r(57621),o=r(76430),d=r(72589),c=r(90097);let u=({id:e,invalid:t,placeholder:r,required:s,showButton:u,buttonLabel:m,disableButton:p,loadingButton:h,disabled:g,readonly:f,onFocus:x,onClickButton:b})=>{let[v,y]=(0,o.useState)(!1),_=`${r}${s?" *":""}`;return(0,a.jsxs)("div",{className:i()("relative",{"pointer-events-none opacity-40":g}),children:[(0,a.jsx)(n.D0,{name:e,children:({field:{value:r},form:{setFieldTouched:s,setFieldValue:n}})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.default,{containerClassName:i()("intl-tel-input custom-phone-input w-full",{"pointer-events-none opacity-40":f}),inputClassName:i()("text-neutral-black h-12 w-full text-neutral-black rounded-[5px] border outline-none bg-white !pr-4 placeholder:text-sm",t?"border-negative-500 placeholder:text-negative-500":"border-grey-500 placeholder:text-grey-800"),preferredCountries:["be","nl"],defaultCountry:"be",format:!0,defaultValue:r,fieldId:e,placeholder:v||r?"":_,disabled:f,fieldName:e,onPhoneNumberFocus:()=>{x?.(),y(!0)},onPhoneNumberBlur:(t,r,a)=>{s(e,!0),n(e,(0,l.A)(r,a.dialCode??"")),y(!1)},onPhoneNumberChange:(t,r,a)=>{n(e,(0,l.A)(r,a.dialCode??""))}}),(0,a.jsx)("label",{htmlFor:e,className:i()("absolute -top-[10px] left-0 z-10 mx-3 px-1 text-sm transition-all duration-300","before:absolute before:bottom-1/2 before:left-0 before:-z-10 before:h-[2px] before:w-full before:translate-y-1/2 before:bg-white before:content-['']",f?"opacity-40":"",t?"text-negative-500":"text-grey-800",v||r?"animate-show":"animate-hide opacity-0"),children:_})]})}),u?(0,a.jsx)(d.A,{type:"text",className:"absolute right-4 bg-transparent",onClick:b,disabled:p,label:m,loading:h}):null,(0,a.jsx)(n.Kw,{name:e,component:"div",className:"invalid-feedback"})]})}},31743:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(75038),s=r(46001),i=r.n(s),n=r(72298);let l=({id:e,invalid:t,placeholder:r,readOnly:s,required:l,type:o,onFocus:d})=>{let c=`${r}${l?" *":""}`;return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("label",{htmlFor:e,className:i()(" text-sm transition-all duration-300","before:absolute before:bottom-1/2 before:left-0 before:-z-10 before:h-[2px] before:w-full before:translate-y-1/2 before:content-['']",s?"text-gray-500 text-opacity-30 before:bg-gray-50":"before:bg-white",t?"text-negative-500":"text-grey-800"),children:c}),(0,a.jsx)(n.D0,{name:e,id:e,"aria-label":e,className:i()("text-neutral-black peer h-12 w-full rounded-[5px] border px-4 outline-none placeholder:text-transparent",t?"border-negative-500":"border-grey-500",s?"cursor-not-allowed border-opacity-70 bg-gray-100 text-gray-400":"bg-white"),placeholder:c,readOnly:s,type:o,onFocus:d}),(0,a.jsx)(n.Kw,{name:e,component:"div",className:"invalid-feedback"})]})}},34984:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(75038),s=r(46001),i=r.n(s);r(76430);let n=({left:e,right:t,contentCenter:r})=>(0,a.jsx)("div",{className:"lg:container-v2 lg:my-10",children:(0,a.jsxs)("div",{className:"lg:grid lg:grid-cols-2 lg:rounded-12 lg:border lg:border-neutral-300",children:[(0,a.jsx)("div",{className:i()("bg-neutral-500 lg:rounded-l-12 lg:bg-neutral-200",{"flex flex-col justify-center":r}),children:(0,a.jsx)("div",{className:"container-v2 py-8 lg:p-12",children:e})}),(0,a.jsx)("div",{className:"lg:bg-neutral-white bg-white lg:rounded-r-12",children:(0,a.jsx)("div",{className:"container-v2 flex flex-col gap-8 py-8 lg:p-12",children:t})})]})})},41240:(e,t,r)=>{r.d(t,{A:()=>m});var a=r(75038),s=r(46001),i=r.n(s),n=r(89961),l=r(99409),o=r(76430),d=r(72589),c=r(68745),u=r(40839);let m=({title:e,disabledMode:t,codeTimer:r,error:s,loading:m,onResendCode:p,onVerifyCode:h})=>{let g=(0,l.c)(),[f,x]=(0,n.A)(""),[b,v]=(0,o.useState)(!1),[y,_]=(0,o.useState)(!1),[N,j]=(0,o.useState)(!1),w=[(0,o.useRef)(null),(0,o.useRef)(null),(0,o.useRef)(null),(0,o.useRef)(null),(0,o.useRef)(null)];(0,o.useEffect)(()=>{(async()=>{if(f.length===w.length){v(!0),w[w.length-1]?.current?.blur();let e=await h(f);v(!1),_(!e),j(e)}})()},[f]);let A=e=>{let t=Number(e.target.id),r=f.length;r>=t?e.target.select():w[r].current?.focus()},C=e=>{let t=e.clipboardData.getData("text");
1t.length===w.length&&(x(t),w.forEach((e,r)=>{e.current&&(e.current.value=t.charAt(r))}))};return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("h2",{className:"m-0",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2 sm:gap-[10px]",children:[[...Array.from(Array(w.length)).keys()].map(e=>(0,a.jsx)("input",{autoComplete:"one-time-code",className:i()("border-grey-500 aspect-square w-1/5 max-w-14 rounded-4 border bg-neutral-200 text-center text-2xl font-bold outline-primary-600","disabled:border-[#171C1E] disabled:opacity-10","[-moz-appearance:_textfield] [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:m-0 [&::-webkit-outer-spin-button]:appearance-none"),id:e.toString(),type:"text",maxLength:1,onChange:t=>((e,t)=>{let r=e.target,a=w[t-1],s=w[t+1],i=[...f];if(/^[a-z]+$/.test(r.value)){let e=r.value.toUpperCase();i[t]=e,w[t].current.value=e}else i[t]=r.value;x(i.join(""),()=>{r.select(),""===r.value?a&&a?.current?.focus():s&&s?.current?.select()})})(t,e),ref:w[e],autoFocus:0===e,onFocus:A,onKeyDown:t=>{let r,a;return r=t.target,a=w[e-1],void(("Backspace"===t.key||"Delete"===t.key)&&""===r.value&&(t.preventDefault(),x(t=>t.slice(0,e)+t.slice(e+1)),a&&a?.current?.focus()))},onPaste:C,disabled:t},e)),b?(0,a.jsx)(c.gc,{icon:u.jyc,className:"animate-spin-slow text-secondary-500"}):N?(0,a.jsx)(c.gc,{icon:u.QRE,className:"text-positive-600"}):null]}),s||y?(0,a.jsx)("div",{className:"w-fit rounded-4 border border-negative-500 bg-red-200 px-4 py-2 text-sm text-negative-500",children:y?g("register_phone_verification_code_wrong"):s}):null,(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("p",{className:"m-0",children:g("register_phone_verification_did_not_receive")}),(0,a.jsx)(d.A,{type:"text",className:"bg-transparent",disabled:t||r>0||b,loading:m,label:`${g("register_phone_verification_resend")} ${r>0?`(${r})`:""}`,onClick:()=>{w.forEach(e=>{e?.current&&(e.current.value="")}
1),w[0]?.current?.focus(),x(""),j(!1),_(!1),p()}})]})]})}},46982:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(75038),s=r(46001),i=r.n(s),n=r(72298);let l=({id:e,invalid:t,disabled:r,children:s})=>(0,a.jsxs)("div",{className:i()("custom-control custom-checkbox custom-checkbox-v2",{"pointer-events-none opacity-40":r}),children:[(0,a.jsx)(n.D0,{"aria-label":e,type:"checkbox",name:e,id:e,className:`custom-control-input 2 ${t?"is-invalid":""}`}),(0,a.jsx)("label",{htmlFor:e,className:"custom-control-label-v2 custom-control-label text-sm lg:text-base",children:s}),(0,a.jsx)(n.Kw,{name:e,component:"div",className:"invalid-feedback !block"})]})},56448:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k});var a=r(75038),s=r(99409),i=r(74735),n=r(76430),l=r(19118),o=r(57807),d=r(72298),c=r(31743),u=r(22921),m=r(34984),p=r(41240),h=r(6192),g=r(4858),f=r(61915),x=r(96182),b=r(73959),v=r(19823),y=r(65435),_=r(77779),N=r(55861),j=r(12695),w=r(31053),A=r(99755),C=r(72589);let k=()=>{let e=(0,s.c)(),t=(0,i.Ym)(),r=(0,b.useRouter)(),k=(0,b.usePathname)(),$=(0,N.jE)(),{state:R,dispatch:S}=(0,n.useContext)(y.Rv),{userStatus:P,isLoading:F}=(0,g.n)(),[q,E]=(0,n.useState)(""),[T,V]=(0,n.useState)(!1),[Y,B]=(0,n.useState)(!1),{timer:D,setTimer:L}=(0,v.A)(),[W,z]=(0,n.useState)(!1),[I,K]=(0,n.useState)(!1),[M,O]=(0,n.useState)(!1),[Q,J]=(0,n.use
2State)(!1),[U,H]=(0,n.useState)(),[X,G]=(0,n.useState)(0),Z=(0,n.useRef)(null),ee=l.Ikc({firstName:(0,x.J5)(P?.userRegisterFields?.firstNameRequired,e("forms_errors_required_first-name")),lastName:(0,x.J5)(P?.userRegisterFields?.lastNameRequired,e("forms_errors_required_last-name")),email:(0,x.mg)(P?.userRegisterFields?.emailRequired,e("forms_errors_invalid_email"),e("forms_errors_required_email")),phone:(0,x.Qv)(P?.userRegisterFields?.phoneNumberRequired,e("forms_errors_invalid_phone"),e("forms_errors_required_phone")),phoneVerificationCode:(0,x.J5)(!0,e("register_phone_verification_code_required")),acceptedTermsAndAgreements:l.euz(!0,{error:e("forms_errors_required_terms-and-agreements")}),acceptedPrivacyPolicy:l.euz(!0,{error:e("forms_errors_required_privacy")})}),et={firstName:P?.userRegisterFields?.firstName??R.user.firstName??"",lastName:P?.userRegisterFields?.lastName??R.user.lastName??"",email:P?.userRegisterFields?.email??R.user.email??"",phone:P?.userRegisterFields?.phoneNumber??R.user.phone??"",phoneVerificationCode:"",acceptedPrivacyPolicy:!1,acceptedTermsAndAgreements:!1},er=async(e,r,a)=>{try{J(!0),r("phoneVerificationCode","");let s=(0,w.W)(),{status:i}=await s.post(`/${A.$n.Phone}/${A.EC.VerificationStart}`,{phoneNumber:e,token:a??U},{params:{language:t}});200===i||204===i?(L(60),B(!0)):L(0)}catch(e){V(!0)}finally{J(!1),O(!1)}},ea=async(e,t)=>{if(Y||W){B(!1),z(!1),L(0);return}try{O(!0);let r=(0,w.W)(),{data:a}=await r.post(`/${A.$n.Phone}/${A.EC.Exists}`,{phoneNumber:e});a?.data&&(z(a?.data?.exists),a?.data?.exists||await er(e,t))}catch(e){V(!0)}finally{O(!1)}},es=async(e,t,r)=>{try{L(0);let a=(0,w.W)(),{data:s}=await a.post(`/${A.$n.Phone}/${A.EC.VerificationCheck}`,{phoneNumber:t,verificationCode:e});if(s?.data?.success)return r("phoneVerificationCode",e),!0;return!1}catch(e){return V(!0),!1}},ei=async({firstName:a,email:s,lastName:i,phone:n,phoneVerificationCode:l})=>{try{V(!1);let o=(0,w.W)(),{data:d,status:c}=await o.post(`/${A.$n.User}/${A.zd.Register}`,{user:{firstName:a,email:s,lastName:i,phoneNumber:n,phoneNumberVerificationCode:l,emailVerificationCode:""},consents:{termsConditionsId:q}});200===c&&d?.data?(K(!0),await $.invalidateQueries({queryKey:["get-user-status"],refetchType:"all"}),r.push(`/${t}${e("slugs_profile")}`)):V(!0)}catch(e){V(!0)}};return(0,n.useEffect)(()=>{U&&Z.current&&(Z.current(U),Z.current=null)},[U]),F?(0,a.jsx)("div",{className:"container-v2",children:(0,a.jsx)(f.default,{})}):(0,a.jsx)("div",{children:(0,a.jsx)(d.l1,{validationSchema:(0,o.toFormikValidationSchema)(ee),initialValues:et,onSubmit:e=>ei(e),children:({handleSubmit:s,errors:i,touched:n,isSubmitting:l,values:o,setFieldValue:d})=>(0,a.jsxs)("form",{noValidate:!0,onSubmit:s,children:[(0,a.jsx)(m.A,{left:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"m-0",children:e("register_personal_data_title")}),(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-4",children:[(0,a.jsx)(c.A,{id:"firstName",type:"text",invalid:!!(i.firstName&&n.firstName),placeholder:e("forms_first-name"),required:P.userRegisterFields?.firstNameRequired??!1,readOnly:!P.userRegisterFields?.firstNameRequired||I||l}),(0,a.jsx)(c.A,{id:"lastName",type:"text",invalid:!!(i.lastName&&n.lastName),placeholder:e("forms_last-name"),required:P.userRegisterFields?.lastNameRequired??!1,readOnly:!P.userRegisterFields?.lastNameRequired||I||l}),(0,a.jsx)(c.A,{id:"email",type:"email",invalid:!!(i.email&&n.email),placeholder:e("forms_email"),required:P.userRegisterFields?.emailRequired??!1,readOnly:!P.userRegisterFields?.emailRequired||I||l}),(0,a.jsx)(u.A,{id:"phone",invalid:!!(i.phone&&n.phone),placeholder:e("forms_phone"),showButton:!0,disableButton:!o.phone||!n.phone||!!i.phone||M,loadingButton:M,readonly:Y||W,required:P.userRegisterFields?.phoneNumberRequired??!1,buttonLabel:Y||W?e("btn_modify"):e("btn_send_code"),onClickButton:()=>{ea(o.phone,d)},disabled:I||l}
2),W?(0,a.jsxs)("div",{className:"flex flex-col gap-4 rounded-12 border border-warning-500 bg-warning-100 p-4",children:[(0,a.jsx)("h3",{className:"m-0 text-neutral-950",children:e("register_personal_data_existing_phone_title")}),(0,a.jsx)("p",{className:"m-0 text-sm",children:e("register_personal_data_existing_phone_description")}),(0,a.jsx)(C.A,{type:"outlined",className:"w-fit self-end bg-transparent",label:e("register_personal_data_existing_phone_link"),onClick:()=>{S({type:y.jx.SET_USER,user:{email:o.email,firstName:o.firstName,lastName:o.lastName,phone:o.phone}}),r.push(`/${t}${k}?step=register-link-phone`)},disabled:I||l})]}):null]})]}),right:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{disabledMode:!Y||!!o.phoneVerificationCode||l||I||Q,loading:Q&&!M,title:e("register_phone_verification_title"),codeTimer:D,onResendCode:()=>{Z.current=e=>er(o.phone,d,e),H(null),G(e=>e+1)},error:n.phoneVerificationCode?i.phoneVerificationCode:void 0,onVerifyCode:e=>es(e,o.phone,d)},`${o.phone}-${Y}`),(0,a.jsx)(h.A,{privacyInvalid:!!(n.acceptedPrivacyPolicy&&i.acceptedPrivacyPolicy),termsInvalid:!!(n.acceptedTermsAndAgreements&&i.acceptedTermsAndAgreements),setTermsAndConditionsId:E,disabledMode:I||l}),(0,a.jsx)(C.A,{submit:!0,type:"filled",className:"w-fit",loading:l,label:e("register_btn_finish"),disabled:l||I}),T?(0,a.jsx)(_.A,{}):null]})}),(0,a.jsx)(j.A,{action:"phonenumber_update",setToken:H,refreshTrigger:X})]})})})}},57621:(e,t,r)=>{r.d(t,{A:()=>a});let a=(e,t)=>e?e.startsWith(t)||e.startsWith(`+${t}`)?e:(e.startsWith("0")&&(e=e.replace(/^0+/,"")),`+${t} ${e}`):""},61915:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l});var a=r(75038),s=r(99409);r(76430);var i=r(68745),n=r(40839);let l=({labelId:e="loading",center:t=!1,vCenter:r=!1})=>{let l=(0,s.c)();return(0,a.jsxs)("div",{className:`h5 text-accentWineBerry m-0 flex items-center px-0 py-4 font-light ${t?"justify-center":""} ${r?"h-screen":""}`,children:[(0,a.jsx)(i.gc,{icon:n.jyc,className:"text-accentWineBerry mr-4 animate-spin-slow text-4xl"}),l(e)]})}},77779:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(75038),s=r(99409);r(76430);let i=()=>{let e=(0,s.c)();return(0,a.jsx)("div",{className:"w-fit rounded-4 border border-negative-500 bg-negative-200 px-4 py-2 text-sm text-neutral-950",children:e("errors_failed-account-config")})}},96182:(e,t,r)=>{r.d(t,{J5:()=>n,Qv:()=>o,mg:()=>l});var a=r(19118),s=r(79138),i=r(53862);let n=(e=!1,t)=>e?a.YjP().min(1,t):a.YjP().optional(),l=(e=!1,t,r)=>e?a.YjP().min(1,r).regex(i.Xw,t):a.YjP().regex(i.Xw,t).optional(),o=(e=!1,t,r)=>e?a.YjP().min(1,r).refine(e=>(0,s.g)(e,"BE"),{message:t}):a.YjP().refine(e=>!e||(0,s.g)(e,"BE"),{message:t}).optional()}}]);
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.