1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3451],{41556:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/otp",function(){return n(93638)}])},51863:function(e,t,n){"use strict";function r(e){if(!e)return null;let t=e.redirect,n=Array.isArray(t)?t[0]:t;return o(n)}function o(e){return"string"!=typeof e||0===e.length||!e.startsWith("/")||e.startsWith("//")?null:e}n.d(t,{HC:function(){return s},Rh:function(){return i},X_:function(){return r},fP:function(){return u}});let a="wh_post_login_redirect";function s(e){try{e?sessionStorage.setItem(a,e):sessionStorage.removeItem(a)}catch(t){}}function u(){try{let e=sessionStorage.getItem(a);return sessionStorage.removeItem(a),o(e)}catch(t){return null}}function i(e){return e.redirectPath?e.redirectPath:e.hasCartItems?"/basket":"/"}},93638:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return v}});var r=n(85893),o=n(80320),a=n(11163),s=n(67294),u=n(71470),i=n(35861),l=n(17690),c=n(64745),p=n(51863),f=n(9008),d=n.n(f),h=n(6841),y=n(23659);function v(){let{cartItems:e}=(0,s.useContext)(l.A9),{email:t,addUser:n}=(0,s.useContext)(i.S),[f,v]=(0,s.useState)(""),[m,g]=(0,s.useState)(!1),[b,I]=(0,s.use
1State)(240),S=(0,a.useRouter)(),{pass:x}=S.query,[O,j]=(0,s.useState)(""),w=(0,p.X_)(S.query);(0,s.useEffect)(()=>{t||S.push("/")},[]);let P=e=>{v(e)};(0,s.useEffect)(()=>{let e=window.setInterval(()=>{I(e=>e<=1?0:e-1)},1e3);return()=>window.clearInterval(e)},[]);let C=async e=>{if(e.preventDefault(),m||b)return;j("");let n={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:(0,y.R)(t)})};fetch("".concat(c.Mr,"/resent"),n).then(async e=>{let t=await e.json().catch(()=>({}));e.ok&&(null==t?void 0:t.message)?(I(240),j("")):(null==t?void 0:t.error)?j(t.error):j("Could not resend code. Please try again.")}).catch(()=>j("Could not resend code. Please try again."))},N=async r=>{if(r.preventDefault(),!m){g(!0),j("");try{let a={email:(0,y.R)(t),otp:f,forgotPassword:!!x},s={method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)},u=await fetch("".concat(c.Mr,"/otp"),s),i=await u.json().catch(()=>({}));if(i&&i.data&&i.data.user){var l,d;if(o.Z.localSet("ud",o.Z.crypt(null==i?void 0:null===(l=i.data)||void 0===l?void 0:l.user,!0)),localStorage.setItem("t",i.data.token),localStorage.setItem("b4",i.data.base64),n(null==i?void 0:null===(d=i.data)||void 0===d?void 0:d.user,i.data.token,i.data.base64),x)S.push("/resetpassword");else{(0,h.kp)("event","user_registeration",{email:t}),(0,h.lf)(t),(0,h.l$)();let v=w||(0,p.fP)();S.push((0,p.Rh)({redirectPath:v,hasCartItems:Boolean(null==e?void 0:e.length)}))}}else g(!1),j("string"==typeof(null==i?void 0:i.error)?i.error:"Unable to complete verification. Please try again.")}catch(b){g(!1),j("Unable to complete verification. Please try again.")}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d(),{children:(0,r.jsx)("title",{children:"Verify Your Mail"})}),(0,r.jsx)("div",{className:"container-fluid p-0",children:(0,r.jsxs)("div",{className:"banner-section",children:[(0,r.jsx)("div",{className:"banner-top"}),(0,r.jsx)("div",{className:"banner-bottom"}),(0,r.jsx)("div",{className:"container",children:(0,r.jsx)("div",{className:"row",children:(0,r.jsx)("div",{className:"col col-md-8 col-lg-6 col-xl-5 mx-auto",children:(0,r.jsxs)("div",{className:"register-form-wrap",children:[(0,r.jsx)("h1",{className:"form-title",children:"Please Verify Your Mail"}),(0,r.jsxs)("p",{className:"text-center",children:["one time password has been sent to"," "+t]}),(0,r.jsxs)("p",{className:"text-center",style:{paddingTop:"5px",color:"#141a42",fontSize:"14px"},children:["Check your ",(0,r.jsx)("strong",{children:"spam"})," folder if OTP is delayed. Resend OTP is enabled after ",(0,r.jsx)("strong",{children:"4 minutes"}),". For help, email"," ",(0,r.jsx)("a",{href:"mailto:[email protected]",style:{fontWeight:"600"},children:"[email protected]"})," ","or call us."]}),(0,r.jsx)("p",{className:"text-center",style:{color:"red"},children:O}),(0,r.jsx)("div",{className:"otp-input-wrap pt-3",children:(0,r.jsx)(u.Z,{value:f,numInputs:6,isInputNum:!0,className:"otp-error",inputStyle:{width:"54px",height:"54px",color:"#706F6F",fontWeight:"600",fontSize:"22px",caretColor:"#706F6F",border:"1px solid #DADADA",borderRadius:"8px"},separator:(0,r.jsx)("span",{children:""}),onChange:P})}),(0,r.jsx)("button",{className:"wh-primary-btn w-100 wh-cp mt-4 mb-2",onClick:e=>N(e),disabled:!t||m,children:m?"Progress...":"Submit"}),(0,r.jsx)("p",{className:"text-center pt-3",children:b?(0,r.jsxs)("p",{children:["Resend OTP in ",Math.floor(b/60),":",(b%60).toString().padStart(2,"0")," "]}):(0,r.jsxs)(r.Fragment,{children:["Didnât received the OTP?"," ",(0,r.jsx)("a",{href:"#",onClick:C,children:"Resend"})]})})]})})})})]})})]})}},71470:function(e,t,n){"use strict";t.Z=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==v(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=o?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(r,s,u):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}(n(67294)),o=["placeholder","separator","isLastChild","inputStyle","focus","isDisabled","hasErrored","errorStyle","focusStyle","disabledStyle","shouldAutoFocus","isInputNum","index","value","className","isInputSecure"];function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function c(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}
1function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r,o=h(e);if(t){var a=h(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return(n=r)&&("object"===v(n)||"function"==typeof n)?n:d(this)}}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var m=function(e){return"object"===v(e)},g=function(e){c(n,e);var t=f(n);function n(e){var o;return u(this,n),y(d(o=t.call(this,e)),"getClasses",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return!m(e)&&!1!==e}).join(" ")}),y(d(o),"getType",function(){var e=o.props,t=e.isInputSecure,n=e.isInputNum;return t?"password":n?"tel":"text"}),o.input=r.default.createRef(),o}return l(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.focus,n=e.shouldAutoFocus,r=this.input.current;r&&t&&n&&r.focus()}},{key:"componentDidUpdate",value:function(e){var t=this.props.focus,n=this.input.current;e.focus!==t&&n&&t&&(n.focus(),n.select())}},{key:"render",value:function(){var e=this.props,t=e.placeholder,n=e.separator,a=e.isLastChild,u=e.inputStyle,i=e.focus,l=e.isDisabled,c=e.hasErrored,p=e.errorStyle,f=e.focusStyle,d=e.disabledStyle,h=(e.shouldAutoFocus,e.isInputNum),y=e.index,v=e.value,g=e.className,b=(e.isInputSecure,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,o));return r.default.createElement("div",{className:g,style:{display:"flex",alignItems:"center"}},r.default.createElement("input",s({"aria-label":"".concat(0===y?"Please enter verification code. ":"").concat(h?"Digit":"Character"," ").concat(y+1),autoComplete:"off",style:Object.assign({width:"1em",textAlign:"center"},m(u)&&u,i&&m(f)&&f,l&&m(d)&&d,c&&m(p)&&p),placeholder:t,className:this.getClasses(u,i&&f,l&&d,c&&p),type:this.getType(),maxLength:"1",ref:this.input,disabled:l,value:v||""},b)),!a&&n)}}]),n}(r.PureComponent),b=function(e){c(n,e);var t=f(n);function n(){var e;u(this,n);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return y(d(e=t.call.apply(t,[this].concat(a))),"state",{activeInput:0}),y(d(e),"getOtpValue",function(){return e.props.value?e.props.value.toString().split(""):[]}),y(d(e),"getPlaceholderValue",function(){var t=e.props,n=t.placeholder,r=t.numInputs;if("string"==typeof n){if(n.length===r)return n;n.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}}),y(d(e),"handleOtpChange",function(t){(0,e.props.onChange)(t.join(""))}),y(d(e),"isInputValueValid",function(t){return(e.props.isInputNum?!isNaN(parseInt(t,10)):"string"==typeof t)&&1===t.trim().length}),y(d(e),"focusInput",function(t){var n=e.props.numInputs;e.setState({activeInput:Math.max(Math.min(n-1,t),0)})}),y(d(e),"focusNextInput",function(){var t=e.state.activeInput;e.focusInput(t+1)}),y(d(e),"focusPrevInput",function(){var t=e.state.activeInput;e.focusInput(t-1)}),y(d(e),"changeCodeAtFocus",function(t){var n=e.state.activeInput,r=e.getOtpValue();r[n]=t[0],e.handleOtpChange(r)}),y(d(e),"handleOnPaste",function(t){t.preventDefault();var n=e.state.activeInput,r=e.props,o=r.numInputs;if(!r.isDisabled){for(var a=e.getOtpValue(),s=n,u=t.clipboardData.getData("text/plain").slice(0,o-n).split(""),i=0;i<o;++i)i>=n&&u.length>0&&(a[i]=u.shift(),s++);e.setState({activeInput:s},function(){e.focusInput(s),e.handleOtpChange(a)})}}),y(d(e),"handleOnChange",function(t){var n=t.target.value;e.isInputValueValid(n)&&e.changeCodeAtFocus(n)}),y(d(e),"handleOnKeyDown",function(t){8===t.keyCode||"Backspace"===t.key?(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput()):46===t.keyCode||"Delete"===t.key?(t.preventDefault(),e.changeCodeAtFocus("")):37===t.keyCode||"ArrowLeft"===t.key?(t.preventDefault(),e.focusPrevInput()):39===t.keyCode||"ArrowRight"===t.key?(t.preventDefault(),e.focusNextInput()):(32===t.keyCode||" "===t.key||"Spacebar"===t.key||"Space"===t.key)&&t.preventDefault()}),y(d(e),"handleOnInput",function(t){if(e.isInputValueValid(t.target.value))e.focu
1sNextInput();else if(!e.props.isInputNum){var n=t.nativeEvent;null===n.data&&"deleteContentBackward"===n.inputType&&(t.preventDefault(),e.changeCodeAtFocus(""),e.focusPrevInput())}}),y(d(e),"renderInputs",function(){for(var t=e.state.activeInput,n=e.props,o=n.numInputs,a=n.inputStyle,s=n.focusStyle,u=n.separator,i=n.isDisabled,l=n.disabledStyle,c=n.hasErrored,p=n.errorStyle,f=n.shouldAutoFocus,d=n.isInputNum,h=n.isInputSecure,y=n.className,v=[],m=e.getOtpValue(),b=e.getPlaceholderValue(),I=e.props["data-cy"],S=e.props["data-testid"],x=function(n){v.push(r.default.createElement(g,{placeholder:b&&b[n],key:n,index:n,focus:t===n,value:m&&m[n],onChange:e.handleOnChange,onKeyDown:e.handleOnKeyDown,onInput:e.handleOnInput,onPaste:e.handleOnPaste,onFocus:function(t){e.setState({activeInput:n}),t.target.select()},onBlur:function(){return e.setState({activeInput:-1})},separator:u,inputStyle:a,focusStyle:s,isLastChild:n===o-1,isDisabled:i,disabledStyle:l,hasErrored:c,errorStyle:p,shouldAutoFocus:f,isInputNum:d,isInputSecure:h,className:y,"data-cy":I&&"".concat(I,"-").concat(n),"data-testid":S&&"".concat(S,"-").concat(n)}))},O=0;O<o;O++)x(O);return v}),e}return l(n,[{key:"render",value:function(){var e=this.props.containerStyle;return r.default.createElement("div",{style:Object.assign({display:"flex"},m(e)&&e),className:m(e)?"":e},this.renderInputs())}}]),n}(r.Component);y(b,"defaultProps",{numInputs:4,onChange:function(e){return console.log(e)},isDisabled:!1,shouldAutoFocus:!1,value:"",isInputSecure:!1}),t.Z=b}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=41556)}),_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.