1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1705],{93789:function(e,t,n){"use strict";var r=n(92809),i=n(910),o=n(67294),u=n(72138),a=n(94142),c=n(1941),l=n(81144),s=n(67239),f=n(34109),p=n(17131),d=n(78392),h=n(11163),g=n(53325),v=n(11056),m=n(57766),b=n(85893);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=(0,i.Z)(f.Z,{target:"ee55xov0"})((function(e){var t=e.theme;return(0,r.Z)({width:"352px"},t.breakpoints.down("md"),{width:"100%"})}),"");t.Z=function(e){var t=e.openModal,n=e.setOpenModal,r=e.modalStatus,i=e.otp,f=e.setOtp,y=(0,h.useRouter)(),S=(0,o.useState)(!1),O=S[0],P=S[1],Z=(0,o.useState)(""),w=Z[0],k=Z[1],E=y.query.profileId,I=(0,d.Z)((function(e){return e.multiProfileState})),D=(0,d.Z)((function(e){return e.setMultiProfileState})),C=(0,m.SG)(y.asPath);return(0,b.jsx)(u.Z,{radius:"1.5rem",open:t,customWidth:"448px",onClose:function(){n(!1),k(""),D(j(j({},I),{},{profilePin:w}))},children:(0,b.jsxs)(c.Z,{justify:"center",align:"center",fullHeight:!0,direction:"column",children:[(0,b.jsx)(l.ZP,{variant:"body1",as:"div",align:"center",mt:"1rem",children:(0,p.I8)("multi.profile.pin.title")}),(0,b.jsx)(l.ZP,{variant:"body3",as:"div",align:"center",color:"weaker",mt:"1rem",mb:"2rem",children:(0,p.I8)("multi.profile.pin.desc")}),(0,b.jsx)(a.ZP,{pinType:"setPin",submitPin:function(e){k(e)}}),(0,b.jsxs)(x,{disabled:O||!(4===w.length),onClick:function(e){if(e.preventDefault(),P(!0),"edit"===r)D(j(j({},I),{},{profilePin:w,profileLockToggle:!0}));else if("reset"===r){var t={otp:String(i),pin:String(w)};E&&(0,g.il)(String(E),t).then((function(e){200===e.status&&y.push(C&&"/profile"!==C&&"/choose"!==C?"/profile/pin?profileId=".concat(E,"&redirect=").concat((0,v.b$)(C)):"/profile/pin?profileId=".concat(E))})).catch((function(){f&&f("")}))}n(!1),P(!1),k("")},variant:"success",mt:"2rem",children:[O?(0,b.jsx)(s.ZP,{}):null,(0,p.I8)("multi.profile.pin.save")]})]})})}},13654:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(92809),i=n(910),o=n(67294),u=n(46386),a=n(75539),c=n(43171),l=n(81144),s=n(34109),f=n(17131),p=n(86036),d=n(8708),h=n(53325),g=n(11163),v=n(72138),m=n(85893);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=(0,i.Z)("div",{target:"e1lheq1i2"})((function(e){return{marginTop:e.theme.spacing(1)}}),"");function x(e){var t=e.children,n=(0,p.Un)().profile,r=(0,g.useRouter)(),i=(0,p.I0)(),u=(0,o.useState)(!1),c=u[0],b=u[1],y=(0,p.aF)(),x=y.authorized,P=y.loaded,Z=y.user;(0,o.useEffect)((function(){P&&!x&&r.asPath.includes("profile")&&r.push("/login")}),[P,x]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(S,{id:"main-menu",children:[(0,m.jsx)(a.ZP,{hasProfile:!!n}),!(null!==Z&&void 0!==Z&&Z.is_sso_login)&&"/profile"===r.pathname&&(0,m.jsxs)(O,{onClick:function(e){e.preventDefault(),b(!0)},children:[(0,m.jsx)("span",{className:"first-title",children:(0,f.I8)("auth.logout")}),(0,m.jsx)("span",{className:"last-title",children:(0,f.I8)("auth.signout")})]})]}),(0,m.jsx)(j,{id:"main-container",children:t}),(0,m.jsxs)(v.Z,{open:c,onClose:function(){return b(!1)},children:[(0,m.jsx)(l.ZP,{variant:"body1",align:"center",mb:6,children:(0,f.I8)("auth.logout.confirm")}),(0,m.jsx)(s.Z,{onClick:function(){var e=r.query.redirect,t=e||r.asPath,n=function(){return i((0,d.ji)())};(0,h.kS)().then(n,n).then((function(){return r.push("/login?redirect=".concat(t))}))},fullWidth:!0,variant:"primaryA",children:(0,f.I8)("auth.logout")})]})]})}var S=(0,i.Z)("div",{target:"e1lheq1i1"})((function(e){var t=e.theme;return y(y({display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",width:"100%",height:u.J9,padding:t.spacing(2,0)},t.mixins.create(c.Nt,(function(e){return{padding:"0 ".concat(t.spacing(e))}}))),{},{"& .hamburger":{marginLeft:t.spacing(1)}})}),""),O=(0,i.Z)("div",{target:"e1lheq1i0"})((function(e){var t;return t={cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:e.theme.palette.background[300][0],height:"36px",padding:"0 1.5rem",borderRadius:"0.6rem",color:"white",fontSize:"0.875rem","& .first-title, & .last-title":{display:"none"}},(0,r.Z)(t,"@media (min-width: 400px)",{"& .first-title":{display:"block"}}),(0,r.Z)(t,"@media (max-width: 400px)",{"& .last-title":{display:"block"}}),t}),"")},78392:function(e,t,n){"use strict";var r=(0,n(38823).ZP)((function(e){return{multiProfileState:{profileId:void 0,profileRangeType:void 0,profileRangeAge:{age:void 0,index:void 0},profileName:"",profileGender:void 0,profileBirthday:{day:"",month:"",year:""},profileAvatar:void 0,profileLockToggle:!1,profilePin:void 0},setMultiProfileState:function(t){e((function(){return{multiProfileState:{profileId:t.profileId,profileRangeType:t.profileRangeType,profileRangeAge:t.profileRangeAge,profileName:t.profileName,profileGender:t.profileGender,profileBirthday:t.profileBirthday,profileAvatar:t.profileAvatar,profileLockToggle:t.profileLockToggle,profilePin:t.profilePin}}}))}}}));t.Z=r},14681:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return O}});var r=n(30266),i=n(910),o=n(809),u=n.n(o),a=n(13654),c=n(1941),l=n(81144),s=n(34109),f=n(17131),p=n(11163),d=n(58549),h=n(56858),g=n(23303),v=n(30960),m=n(67294),b=n(14350),y=n(93789),j=n(53325),x=n(86036),S=n(85893);function O(){var e=(0,p.useRouter)(),t=(0,m.useState)(!1),n=t[0],i=t[1],o=(0,m.useState)(!1),O
1=o[0],Z=o[1],w=(0,m.useState)(""),k=w[0],E=w[1],I=(0,m.useState)(0),D=I[0],C=I[1],N=(0,x.aF)().user,_=e.query.profileId;(0,m.useEffect)((function(){T()}),[]);var T=function(){i(!0),_&&(0,j.DO)(String(_)).then((function(e){200===e.status&&(C(R(e.data.ttl)),E(""),i(!1))})).catch((function(){i(!1)}))},R=function(e){if(e){var t=e.split(":");return 60*+t[0]*60+60*+t[1]+ +t[2]}return 60},W=function(){var e=(0,r.Z)(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,j.bS)(String(_),{otp:t}).then((function(e){200===e.status&&Z(!0)}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){C(0)};return(0,S.jsxs)(a.Z,{children:[(0,S.jsxs)(c.Z,{justify:"center",align:"center",fullHeight:!0,direction:"column",mt:"5rem",px:{xs:"0.25rem"},children:[(0,S.jsx)(l.ZP,{variant:"h2",as:"div",align:"center",color:"default",mb:"1.5rem",children:(0,f.I8)("multi.profile.pin.reset")}),(0,S.jsxs)(d.PP,{children:[(0,S.jsx)(d.Sh,{onClick:function(){return e.back()}}),(0,S.jsxs)(c.Z,{as:"form",justify:"center",align:"center",fullWidth:!0,direction:"column",children:[(0,S.jsx)(l.ZP,{variant:"body1",align:"center",mt:"1.5rem",children:(0,f.I8)("form.otp.helperText")}),(0,S.jsx)(l.ZP,{variant:"body2",as:"div",align:"center",color:"weaker",mt:"1rem",mb:"1.5rem",children:null===N||void 0===N?void 0:N.msisdn}),(0,S.jsx)(h.Z,{mask:"99999",align:"center",letterSpacing:"large",autoFocus:!0,fullWidth:!0,name:"otp",type:"tel",value:k,onChange:function(e){var t=e.target.value;if(!(t.length>5)){var n=(0,b.U0)(t);isNaN(Number(n))||E(n)}},mb:"3rem",autoComplete:"off"}),(0,S.jsx)(s.Z,{type:"submit",variant:"success",disabled:n||!k,fullWidth:!0,onClick:function(e){e.preventDefault(),k.length>=4&&W(k)},children:(0,f.I8)("common.submit")}),(0,S.jsxs)(c.Z,{justify:"space-between",mt:4,mb:1,fullWidth:!0,children:[(0,S.jsx)("div",{children:!!D&&(0,S.jsx)(g.Z,{time:D,onFinish:A})}),(0,S.jsx)(P,{onClick:function(e){e.preventDefault(),T(),A()},disabled:!!D,children:(0,f.I8)("common.resend")})]}),(0,S.jsx)(v.Z,{duration:D})]})]})]}),(0,S.jsx)(y.Z,{openModal:O,setOpenModal:function(e){return Z(e)},modalStatus:"reset",otp:k,setOtp:function(e){return E(e)}})]})}var P=(0,i.Z)(s.Z,{target:"e49oy860"})((function(e){var t=e.theme;return{color:t.palette.text[800][0],backgroundColor:"transparent !important",padding:0,"&:hover":{opacity:.7},"&:disabled":{color:t.palette.foreground[100][0],opacity:1}}}),"")},32133:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/reset-pin",function(){return n(14681)}])},53250:function(e,t,n){"use strict";var r=n(67294);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=r.useState,u=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var s="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return a((function(){i.value=n,i.getSnapshot=t,l(i)&&s({inst:i})}),[e,n,t]),u((function(){return l(i)&&s({inst:i}),e((function(){l(i)&&s({inst:i})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:s},50139:function(e,t,n){"use strict";var r=n(67294),i=n(61688);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},u=i.useSyncExternalStore,a=r.useRef,c=r.useEffect,l=r.useMemo,s=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var f=a(null);if(null===f.current){var p={hasValue:!1,value:null};f.current=p}else p=f.current;f=l((function(){function e(e){if(!c){if(c=!0,u=e,e=r(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return a=t}return a=e}if(t=a,o(u,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(u=e,a=n)}var u,a,c=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,n,r,i]);var d=u(e,f[0],f[1]);return c((function(){p.hasValue=!0,p.value=d}),[d]),s(d),d}},61688:function(e,t,n){"use strict";e.exports=n(53250)},52798:function(e,t,n){"use strict";e.exports=n(50139)},38823:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a}});const r=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"===typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({}
1,t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,o),o};var i=n(67294),o=n(52798);const u=e=>{const t="function"===typeof e?(e=>e?r(e):r)(e):e,n=(e,n)=>function(e,t=e.getState,n){const r=(0,o.useSyncExternalStoreWithSelector)(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return(0,i.useDebugValue)(r),r}(t,e,n);return Object.assign(n,t),n};var a=e=>e?u(e):u}},function(e){e.O(0,[4922,8021,3090,1056,8549,4142,9774,2888,179],(function(){return t=32133,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=reset-pin-f7ec768d1657d082f59d.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.