PageSourceSearch

https://www.thanopoulos.gr/_next/static/chunks/pages/otp-034cccffd645b826.js

js thanopoulos.gr collected 2026-10-02 15:30:59 UTC 9,852 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:wave-grocery-web":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b51e71ff-907a-4bf5-b94d-2a0da8cd87e2",e._sentryDebugIdIdentifier="sentry-dbid-b51e71ff-907a-4bf5-b94d-2a0da8cd87e2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8563],{16767:(e,t,n)=>{"use strict";n.d(t,{h:()=>l});var r,a=n(99429);let i="completeProfileId",o=null!=(r=sessionStorage.getItem(i))?r:"",s=new a.t(o),l={update:e=>{e?sessionStorage.setItem(i,e):sessionStorage.removeItem(i),s.next(e)},subscribe:e=>s.subscribe(e),getValue:()=>s.value}},32229:e=>{e.exports={defaultContainer:"LoginLayout_defaultContainer__I2LY8",withImageContainer:"LoginLayout_withImageContainer__T8VBc",rightContainer:"LoginLayout_rightContainer__PM0Fb",leftContainer:"LoginLayout_leftContainer__kQcB3",centerContainer:"LoginLayout_centerContainer__669jt",imageContainer:"LoginLayout_imageContainer__aA6SN",imageStyle:"LoginLayout_imageStyle__flTze"}},49214:(e,t,n)=>{"use strict";function r(e){let t=e.indexOf("@");if(-1!==t){let n=e.substring(0,t);return n.substring(0,1)+"*".repeat(n.length-1)+e.substring(t)}return e}function a(e){let t=e.slice(0,3),n=e.slice(-3);return t+e.slice(3,-3).replace(/[0-9]/g,"X")+n}function i(e){for(let t in e)if(""===e[t]||null===e[t]||void 0===e[t]&&"isMainAddress"!=t&&"addressType"!=t)return!0;return!1}n.d(t,{Jf:()=>a,vA:()=>r,vu:()=>i})},49443:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/otp",function(){return n(87725)}])},58047:(e,t,n)=>{"use strict";n.d(t,{_I:()=>o,jd:()=>s,rU:()=>l});var r=n(99429),a=n(11604);let i=new r.t(!1),o={subject:void 0,lazyInit(){if(o.subject)return o.subject;{let e=window.localStorage,t=a.Ay.get("questionnaireRedirectionLink",{storage:e})||!1;return o.subject=new r.t(t),o.subject}},update:e=>{let t=o.lazyInit(),n=window.localStorage;a.Ay.set("questionnaireRedirectionLink",e,{storage:n}),t.next(e)},getValue:()=>{let e=o.lazyInit();return null==e?void 0:e.value}},s={update:e=>{i.next(e)},subscribe:e=>i.subscribe(e),getValue:()=>i.value},l={subject:void 0,lazyInit(){if(l.subject)return l.subject;{let e=window.localStorage,t=a.Ay.get("isFromOrder",{storage:e})||!1;return l.subject=new r.t(t),l.subject}},update:e=>{let t=l.lazyInit(),n=window.localStorage;a.Ay.set("isFromOrder",e,{storage:n}),t.next(e)},getValue:()=>{let e=l.lazyInit();return null==e?void 0:e.value}}},60774:(e,t,n)=>{"use strict";n.d(t,{fU:()=>r});let r=e=>{let t=String(Math.floor(e/60)),n=String(e%60).padStart(2,"0");return"".concat(t,":").concat(n)}},68660:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(37876);n(14232);var a=n(77328),i=n.n(a),o=n(58103),s=n.n(o),l=n(32229),u=n.n(l);function d(e){let{children:t,type:n,image:a,responsiveLogo:o}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i(),{children:[(0,r.jsx)("title",{children:"Θανόπουλος"}),(0,r.jsx)("meta",{name:"description",content:"App for ".concat("Θανόπουλος"," by Wave Grocery")}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,r.jsx)("link",{rel:"icon",href:o})]}),(0,r.jsxs)("div",{className:s()({[u().defaultContainer]:0===n},{[u().withImageContainer]:1===n||2===n}),children:[a.length>0&&1===n&&(0,r.jsx)("div",{className:u().imageContainer,children:(0,r.jsx)("img",{className:u().imageStyle,src:a,alt:a})}),(0,r.jsx)("div",{className:s()({[u().centerContainer]:0===n},{[u().leftContainer]:1===n},{[u().rightContainer]:2===n}),children:t}),a.length>0&&2===n&&(0,r.jsx)("div",{className:u().imageContainer,children:(0,r.jsx)("img",{className:u().imageStyle,src:a,alt:a})})]})]})}},77328:(e,t,n)=>{e.exports=n(29269)},86678:(e,t,n)=>{"use strict";n.d(t,{b3:()=>s,iS:()=>o});var r=n(99429);let a=new r.t({requestId:"",email:""}),i=new r.t(!1),o={update:e=>{a.next(e)},subscribe:e=>a.subscribe(e),getValue:()=>a.value},s={update:e=>{i.next(e)},subscribe:e=>i.subscribe(e),getValue:()=>i.value}},87725:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSG:()=>C,default:()=>j});var r=n(37876),a=n(14232),i=n(89099),o=n(23261),s=n(628),l=n(73211),u=n(14722),d=n(86678),c=n(49214),g=n(50525),f=n(39938),m=n(16767),p=n(60774),_=n(61685),b=n(96457),h=n.n(b),v=n(89368),y=n(93167),I=n(58047);
1function w(e){let{config:t,pageFrom:n,logo:b,type:w}=e,[S,x]=(0,a.useState)(""),[C,j]=(0,a.useState)(!1),[P,T]=(0,a.useState)(""),[L,k]=(0,a.useState)(""),A=(0,i.useRouter)(),[q,N]=(0,a.useState)(!1),[O,E]=(0,a.useState)(""),[F,V]=(0,a.useState)(),[M,R]=(0,a.useState)(!1),[z,B]=(0,a.useState)(t.auth.verification.registration.otp.validForSeconds),[U,W]=(0,a.useState)(!1),[D,G]=(0,a.useState)(!1),[J,X]=(0,a.useState)(!1),K=(0,v.useTranslations)("otp"),Q=!t.auth.methods.some(e=>"EMAIL"===e.method&&e.active);(0,a.useEffect)(()=>{if(0===F){R(!1),N(!1);return}let e=setInterval(()=>{V(e=>e-1),E(K("retry_time",{timeLeft:(0,p.fU)(F)}))},1e3);return()=>clearInterval(e)},[F,K]),(0,a.useEffect)(()=>{if(0===z){g.A.reset(),f.A.reset(),A.push("/login");return}120===z&&(W(!0),X(K("timer_text",{totalTimeLeft:(0,p.fU)(z)})),G(!0));let e=setInterval(()=>{B(e=>e-1),z<120&&X(K("timer_text",{totalTimeLeft:(0,p.fU)(z)}))},1e3);return()=>clearInterval(e)},[z]);let Y=d.iS.getValue(),$=(null==Y?void 0:Y.email)!==""?(0,c.vA)(Y.email):(null==Y?void 0:Y.mobilePhone)?(0,c.Jf)(null==Y?void 0:Y.mobilePhone):"",H=async()=>{let{data:e,error:t}=await (0,s.vJ)({requestId:Y.requestId,otp:S},A.locale);if(t){if("OTP0003"===t.code)return void k(K("errors.timer"));if("OTP0002"===t.code)return void k(K("errors.invalid"));j(!0),T(K("errors.generic"))}else{if(d.iS.update({...Y,otp:S}),e){var r,a,i,o;g.A.update({completeProfileRequestId:null==e?void 0:e.completeProfileRequestId,loyaltyCards:e.user.loyaltyCards,email:e.user.email,stat:e.status,_id:e.user._id,firstName:null!=(i=null==(r=e.user)?void 0:r.firstName)?i:"",lastName:null!=(o=null==(a=e.user)?void 0:a.lastName)?o:""}),(null==e?void 0:e.completeProfileRequestId)&&m.h.update(e.completeProfileRequestId)}if("password-reset"===n)A.push("/create-new-password");else if("SUCCESS"===e.status)if("register"===n&&(0,l.Fg)(e.user,(0,u.hP)()),(0,_.o)(e.authToken.token),g.A.update({...e.user,authToken:e.authToken.token}),y.$.update(!0),I._I.getValue()&&I._I.getValue().length>0){let[e,t]=I._I.getValue().split("?"),n=new URLSearchParams(t).get("customerId");I._I.update(""),A.push({pathname:e,query:{customerId:n}})}else A.push({pathname:"/"});else A.push("/account-details")}},Z=async()=>{R(!0);let{data:e,error:n}=await (0,s.LK)({requestId:Y.requestId,verificationCase:"VERIFY"},A.locale);n?(j(!0),T(K("errors.generic"))):(d.iS.update({requestId:e.otpInfo.requestId,email:Y.email,mobilePhone:Y.mobilePhone}),V(t.auth.verification.forgotPassword.otp.resendAllowedInSeconds),E(K("retry_snackbar",{resendSeconds:(0,p.fU)(t.auth.verification.forgotPassword.otp.resendAllowedInSeconds)})),N(!0))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:0===w?h().maxWidthContainer:h().container,children:(0,r.jsx)(o.OTPVerification,{logo:b,logoRedirect:A.locale===A.defaultLocale?"/":"/".concat(A.locale,"/"),titleText:Q?K("title_mobile"):K("title"),description:Q?K("description_mobile"):K("description"),email:Y.requestId?$:"",errorText:L,continueText:K("continue"),resend:K("resend"),resendText:K("resend_description"),hasBottomError:C,bottomErrorText:P,hasBottomSuccess:!1,bottomSuccessText:K("title"),onChangeOTP:e=>{x(e),k(""),j(!1),T("")},otpInputsValues:S,onContinueClick:H,otpPattern:t.auth.verification.registration.otp.pattern,onClickResend:Z,isResendDisabled:M,hasAlert:D,alertText:J,classOption:1===w||2===w?h().paddingContainer:h().noPaddingContainer})}),(0,r.jsx)("div",{style:{width:q?"100%":"auto"},children:(0,r.jsx)(o.SnackBar,{open:q,setOpen:()=>N(!1),text:O,hasCloseOption:!0,className:h().snackBarContainer,position:"center"})}),U&&(0,r.jsx)(o.GenericModal,{icon:o.Timer,title:K("timer_modal.title"),description:K("timer_modal.description"),cancelWording:"",onPrimaryClick:()=>W(!1),primaryButtonWording:K("timer_modal.close")})]})}var S=n(3308),x=n(68660),C=!0;function j(e){var t,n;let{logo:o,loginLogo:s,loginConfig:l,loginImage:u,responsiveLogo:d}=e,[c,g]=(0,a.useState)(),f=(0,i.useRouter)();return(""===u&&(l=0),(0,a.useEffect)(()=>{!async function(){g(await (0,S.q)())}()},[]),(0,a.useEffect)(()=>{var e;if(!(null==f||null==(e=f.query)?void 0:e.pageFrom))return void f.replace("/")},[]),null==f||null==(t=f.query)?void 0:t.pageFrom)?(0,r.jsx)(r.Fragment,{children:c&&(0,r.jsx)(x.A,{type:l,image:u,responsiveLogo:d,children:(0,r.jsx)(w,{config:c,pageFrom:null==f||null==(n=f.query)?void 0:n.pageFrom,logo:s||o,type:l})})}):null}},93167:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(99429),a=n(11604);
1let i={subject:new r.t(!1),_lazyInit(){if(i.subject)return i.subject;let e=window.localStorage,t=a.Ay.get("IsFromLogin",{storage:e});return i.subject=new r.t(t),i.subject},update:e=>{i._lazyInit().next(e);let t=window.localStorage;a.Ay.set("IsFromLogin",e,{storage:t})},subscribe:e=>i._lazyInit().subscribe(e),getValue:()=>i._lazyInit().value}},96457:e=>{e.exports={container:"OTP_container__Lf1Ir",maxWidthContainer:"OTP_maxWidthContainer__qQ_Tq",snackBarContainer:"OTP_snackBarContainer__Fpj5M",paddingContainer:"OTP_paddingContainer__I4iLu",noPaddingContainer:"OTP_noPaddingContainer__VTSCF"}}},e=>{e.O(0,[1286,636,6593,8792],()=>e(e.s=49443)),_N_E=e.O()}]);
2//# sourceMappingURL=otp-034cccffd645b826.js.map

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.