1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d15a031d-b8a6-48a5-ab65-03ff79f076a4",e._sentryDebugIdIdentifier="sentry-dbid-d15a031d-b8a6-48a5-ab65-03ff79f076a4")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4410],{5045:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(14232);let l=function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],l=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},{disableAnimation:r=!1}=a,[o,s]=(0,i.useState)(!1),c=t.current;c&&(c.style.overflow="hidden",c.style.transition="max-height 0.2s ease-out");let d=(0,i.useCallback)(()=>{s(e=>!e),l&&l()},[]);return(0,i.useEffect)(()=>{let t=e.current;return t&&t.addEventListener("click",d,!1),()=>{t&&t.removeEventListener("click",d)}},[e,d]),(0,i.useEffect)(()=>{s(n)},[n]),c&&(o?c.style.maxHeight="0px":r?c.style.maxHeight="unset":c.style.maxHeight="".concat(c.scrollHeight,"px")),o}},14410:(e,t,n)=>{n.d(t,{Gr:()=>S,Ey:()=>ti,tV:()=>e7,QB:()=>N,ho:()=>e$,Ut:()=>eW,Vt:()=>ta,Ol:()=>tC,bE:()=>ez,tc:()=>tc,eN:()=>th});var i=n(37876),l=n(14232),a=n(89099),r=n(26948),o=n(82167),s=n(21651),c=n(48011),d=n(74222),m=n(13918),p=n(80326),u=n(5219);let h=(0,c.Ng)(e=>({responsiveUtility:e.responsiveUtility,errorCode:u.o_.getErrorCode(e),errorMessage:u.o_.getErrorMessage(e),fieldErrorObj:u.o_.getFieldErrorObj(e),privacyPolicyUrl:u.AU.getPrivacyPolicyUrl(e),termsAndConditionsUrl:u.AU.getTermsAndConditionsUrl(e)}),e=>({goBack:()=>e((0,d.OE)()),resetOtpState:()=>e((0,p.$V)()),signup:(t,n,i,l,a)=>e(m.I2.signup(t,n,i,l,a))}),(e,t,n)=>({...e,...t,...n}));var x=n(54440),b=n(64047),g=n(66941),_=n(40400),f=n(93004),j=n(65061),v=n(78092),y=n(7904),E=n(36269),C=n(21462),k=n(50402),A=n(44610),T=n(7971),w=n(88494),I=n(1562);let z=(0,o.Ay)(A.Sc).withConfig({componentId:"sc-eabadfec-0"})(["display:inline-block;"]),B=(0,o.Ay)(e=>(0,i.jsx)(A.A,{...e})).withConfig({componentId:"sc-eabadfec-1"})(["color:",";"," &:hover{color:",";}"],e=>(0,s.y)("colors.".concat(e.color))(e),e=>e.underline&&"text-decoration: underline;",e=>(0,s.y)("colors.".concat(e.color))(e)),S=h(function(e){let t=(0,a.useRouter)(),{strings:{errors:n,general:{signup_cta:o,manulife:{signup_page:s}},forms:{labels:{signup_form:{account_created_popup_text:c,deactivated_text:d,email_text:m,password_text:p}}}},geographyConstants:u,geography:h,localeCode:S}=(0,g.Ym)(),{visibilityFlags:{helpDesk:Y}}=(0,w.Q)(h),O=(e=>{let{strings:t}=e;return[{name:"email",default:"",type:"email",label:t.email_text,placeholder:"[email protected]"},{name:"password",default:"",type:"password",label:t.password_text,placeholder:"*******"},{name:"manuLifeConsent",default:!0,type:"checkbox",label:t.consent_label_text}]})({strings:{email_text:m,password_text:p,consent_label_text:s.consent_label_text}}),D=(e=>{let{errors:t}=e;return x.Ik().shape({email:x.Yj().email(t.valid_email_text).required(t.required_field),password:(0,b.nw)(t)})})({errors:n}),M=O.reduce((e,t)=>(e[t.name]=t.default,e),{}),[L,R]=(0,k.A)(!1),{fieldErrorObj:F,signup:P,errorCode:N,errorMessage:H,termsAndConditionsUrl:W,privacyPolicyUrl:U}=e,[q,V]=(0,l.useState)({...F}),G=l.useMemo(()=>({signupBtn:(0,E.WZ2)(),loginBtn:(0,E.lW9)(),privacyPolicyBtn:(0,C.eT)(),termsAndConditionsBtn:(0,C.QV)(),needHelpBtn:(0,C.uN)("need_help_click")()}),[]),$=(0,l.useCallback)((n,i)=>{P(i,{email:n.email,password:n.password,manuLifeConsent:n.manuLifeConsent},()=>{e.resetOtpState(),(0,v.Ay)((0,E.w59)("")());let n=f.sJi.SIGNUP_EMAIL_VERIFICATION;t.push(n)},console.error,{showConfirmationAlert:!0,confirmationMessage:"",confirmationHeading:c,confirmationTheme:"white",confirmationAlertTime:3e3})},[P]);(0,l.useEffect)(()=>{(0,v.Ay)({action:"page_load",category:"create_account_page"})},[]),(0,l.useEffect)(()=>{V({...F})},[F]);let Q=()=>{Object.keys(q).length&&V({})},J=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(A.pT,{alignItems:"baseline",justifyContent:"center",mb:{_:2,md:4},mt:{_:5,md:6},children:[(0,i.jsx)(A.EY,{color:"B.2",variant:"mlwide",children:s.account_exists_text}
1),(0,i.jsx)(A.$n,{fillType:"text",onClick:()=>t.push(f.sJi.LOGIN),px:2,size:"sm",textProps:{color:"BT.5",variant:"button1"},type:"primary",children:s.login_text})]}),Y&&(0,i.jsx)(A.pT,{cp:!0,justifyContent:"center",mb:{_:10},children:(0,i.jsx)(A.EY,{color:"B.7",variant:{_:"body3",md:"body2"},onClick:()=>{(0,v.Ay)(G.needHelpBtn),(0,y.An)(S)},children:s.help_text})})]});return(0,i.jsxs)(A.az,{children:[(0,i.jsxs)(A.az,{mb:3,children:[(0,i.jsx)(A.az,{mb:3,children:(0,i.jsx)(A.EY,{capitalize:!0,as:"h2",color:"B.1",mb:4,variant:"hLine2",children:(0,i.jsx)(g.In,{str:s.heading_text,components:{br:(0,i.jsx)("br",{}),Fancy:(0,i.jsx)(A.EY,{textTransform:"none",variant:{_:"price2Italic",md:"price1Italic"}})}})})}),(0,i.jsx)(A.EY,{color:"B.1",variant:"label6",children:s.form_heading_text})]}),(0,i.jsx)(r.l1,{validateOnMount:!0,initialValues:M,onSubmit:e=>$(e,"email"),validationSchema:D,children:e=>{let{values:t,errors:n,handleChange:l,isValid:a,handleSubmit:r,touched:c,handleBlur:d}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(T.A,{onChange:Q}),(0,i.jsx)(A.az,{mb:8,children:O.map((e,a)=>{if("checkbox"===e.type&&"manuLifeConsent"===e.name)return(0,i.jsxs)(A.az,{mb:4*(a!==O.length-1),children:[(0,i.jsx)(A.az,{display:{_:"block",md:"none"},children:J()}),(0,i.jsxs)(A.az,{mb:6,children:[(0,i.jsx)(A.az,{children:(0,i.jsx)(A.EY,{color:"B.1",variant:"subtitle3",children:s.consent_heading_text})}),(0,i.jsx)(A.EY,{color:"B.1",variant:"body3",children:s.consent_description_text})]}),(0,i.jsx)(z,{defaultChecked:e.default,name:e.name,onToggle:l,value:t[e.name],label:(0,i.jsx)(A.EY,{color:"B.1",variant:"body2",children:e.label})}),(0,i.jsx)(A.az,{mt:4,children:(0,i.jsx)(A.EY,{color:"B.3",variant:"caption1",children:(0,i.jsx)(g.In,{str:s.details_text,components:{Link:(0,i.jsx)(B,{color:"B.7",href:j.c$u[S],target:"_blank"})}})})})]},a);let r=q[e.name]?H:null,o=c[e.name]&&n[e.name],m=r||o,p="password"===e.name,u=p&&L?"text":e.type;return(0,i.jsxs)(A.az,{mb:4*(a!==O.length-1),children:[(0,i.jsx)(A.pd,{"data-sentry-ignore":p,error:p?!!r:!!m,errorText:p?r:m,id:e.name,label:e.label,name:e.name,onBlur:d,onChange:l,placeholder:e.placeholder,showHelper:!p,type:u,value:t[e.name],...p?{onIconClick:R,icon:(0,i.jsx)(A.az,{cp:!0,mr:2,children:(0,i.jsx)(A.C0,{height:"16px",name:L?"eye":"eyeCross",width:"16px"})})}:{}}),p&&(0,i.jsx)(A.az,{mb:4,mt:2,children:(0,i.jsx)(I.A,{password:t.password})})]},a)})}),(0,i.jsx)(A.$n,{analyticsInfo:G.signupBtn,disabled:!a,onClick:r,width:"100%",children:o})]})}}),N===_.Bd&&(0,i.jsx)(A.pT,{justifyContent:"center",mt:4,children:(0,i.jsxs)(A.EY,{color:"R.2",variant:"caption1",children:[d," ",(0,i.jsx)(A.EY,{as:B,color:"R.2",href:"mailto:"+u.links.SYFE_CONTACT_EMAIL,textDecoration:"underline",children:u.links.SYFE_CONTACT_EMAIL})]})}),(0,i.jsx)(A.az,{display:{_:"none",md:"block"},children:J()}),(0,i.jsx)(A.pT,{mt:{_:6,md:0},children:(0,i.jsx)(A.EY,{color:"B.3",textAlign:"center",variant:"caption1",children:(0,i.jsx)(g.In,{str:s.tnc_text,components:{TnC:(0,i.jsx)(B,{underline:!0,color:"B.3",href:W,target:"_blank"}),PrivacyPolicy:(0,i.jsx)(B,{underline:!0,color:"B.3",href:U,target:"_blank"})}})})})]})});var Y=n(95118);let O=e=>{let t=f.sJi.RESULT,n=(0,Y.V8)(e.search,"redirectUrl"),i=(0,Y.Og)(n);return i&&(t=i),t},D=(0,c.Ng)(e=>({errorMessage:u.o_.getErrorMessage(e),errorCode:u.o_.getErrorCode(e),fieldErrorObj:u.o_.getFieldErrorObj(e),nextRoute:O(e.router.location),privacyPolicyUrl:u.AU.getPrivacyPolicyUrl(e),termsAndConditionsUrl:u.AU.getTermsAndConditionsUrl(e)}),e=>({login:(t,n,i,l)=>e(m.I2.login(t,n,i,l,"user")),clearErrors:()=>e(m.I2.clearErrors())}),(e,t,n)=>({...e,...t,...n})),M=e=>x.Ik().shape({email:b.au(e),password:x.Yj().required(e.required_text)});var L=n(72010);let R=e=>{let{children:t}=e;return(0,i.jsx)(A.EY,{color:"R.2",variant:"caption1",children:t})},F=(0,o.Ay)(e=>(0,i.jsx)(A.A,{...e})).withConfig({componentId:"sc-43c72c24-0"})(["color:",";text-decoration:underline;&:hover{color:",";}"],e=>(0,s.y)("colors.".concat(e.color))(e),e=>(0,s.y)("colors.".concat(e.color))(e)),P={pageLoad:(0,L.M)(),newToSyfeClick:(0,L.eC)()},N=D(e=>{let{errorMessage:t,errorCode:n,login:o,nextRoute:s,clearErrors:c,privacyPolicyUrl:d,termsAndConditionsUrl:m}=e,p=(0,a.useRouter)(),{redirectUrl:u}=p.query,{strings:{errors:h,general:x,general:{signup_cta:b,manulife:{login_page:j}},auth_page:{login_page:E},forms:{labels:C}},geographyConstants:T,geography:I,localeCode:z}=(0,g.Ym)();l.useEffect(()=>{u&&((0,Y.Og)(u)||p.replace(p.pathname))},[p,u]);let B=[{name:"email",type:"email",label:C.login.email_text,placeholder:"[email protected]"},{name:"password",type:"password",label:C.login.password_text,placeholder:"*******"}],[S,O]=(0,k.A)(!1),{visibilityFlags:{helpDesk:D,forgetPassword:L}}=(0,w.Q)(I);return l.useEffect(()=>{(0,v.Ay)(P.pageLoad)},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A.az,{mb:10,children:(0,i.jsx)(A.EY,{capitalize:!0,color:"B.1",variant:"hLine2",children:j.heading_text})}),(0,i.jsx)(r.l1,{validateOnMount:!0,validationSchema:M(h),initialValues:{email:"",password:""},onSubmit:e=>{M(h).isValidSync(e)&&o("email",e.email,e.password,s)},children:e=>{let{touched:a,errors:r,handleBlur:o,handleChange:s,values:d,handleSubmit:m,isValid:u}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A.az,{mb:8,onKeyDown:e=>((e,t,n)=>{13===e.keyCode&&t.email&&t.password&&n()})(e,d,m),children:B.map((e,m)=>{let u=a[e.name]&&r[e.name],h="password"===e.name,x=h&&S?"text":e.type,b=h&&![_.iC,_.Bd].includes(n)?t:"";return(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(A.az,{mb:4*(m!==B.length-1),children:(0,i.jsx)(A.pd,{error:!!u||!!b,errorText:u||b,id:e.label,label:e.label,name:e.name,onBlur:o,placeholder:e.placeholder,type:x,value:d[e.name],onChange:e=>{s(e),c()},...h?{onIconClick:O,icon:(0,i.jsx)(A.az,{cp:!0,mr:2,children:(0,i.jsx)(A.C0,{height:"16px",width:"16px",name:S?"eye":"eyeCross"})})}:{}})}
1),h&&L&&(0,i.jsx)(A.$n,{fillType:"text",mt:5,onClick:()=>p.push(f.s_W),px:2,py:0,size:"sm",children:E.forgot_password_text})]},e.name+m)})}),n===_.Bd&&(0,i.jsxs)(R,{children:[E.account_deactivated_text," ",(0,i.jsx)(A.EY,{as:F,color:"R.2",href:"mailto:"+T.links.SYFE_CONTACT_EMAIL,textDecoration:"underline",children:T.links.SYFE_CONTACT_EMAIL})]}),(0,i.jsx)(A.$n,{disabled:!u,onClick:m,width:"100%",children:x.log_in_cta})]})}}),(0,i.jsxs)(A.pT,{alignItems:"baseline",justifyContent:"center",mb:4,mt:6,children:[(0,i.jsx)(A.EY,{color:"B.2",variant:"body1",children:E.new_to_syfe_text}),(0,i.jsx)(A.$n,{analyticsInfo:P.newToSyfeClick,fillType:"text",onClick:()=>p.push(f.sJi.SIGNUP),px:2,size:"sm",textProps:{color:"BT.5",variant:"button1"},type:"primary",children:b})]}),D&&(0,i.jsx)(A.pT,{cp:!0,justifyContent:"center",mb:6,children:(0,i.jsx)(A.EY,{color:"B.7",onClick:()=>(0,y.An)(z),variant:"body2",children:E.need_help_text})}),(0,i.jsx)(A.pT,{children:(0,i.jsx)(A.EY,{color:"B.3",variant:"caption1",children:(0,i.jsx)(g.In,{str:j.tnc_text,components:{TnC:(0,i.jsx)(F,{color:"B.3",href:m,target:"_blank"}),PrivacyPolicy:(0,i.jsx)(F,{color:"B.3",href:d,target:"_blank"})}})})})]})});var H=n(35682);let W=(0,c.Ng)(e=>({manulifeInfo:u.DT.getManulifeInfo(e),isManulifeInfoLoaded:u.DT.isManulifeInfoLoaded(e)}),e=>({getManulifeRecommenderResult:t=>e((0,H.getManulifeRecommenderResult)(t)),navigate:t=>e((0,d.VC)(t))}));var U=n(42917),q=n(50746);let V={src:"/_next/static/media/tooltipIcon.fb735f5c.svg",height:14,width:14,blurWidth:0,blurHeight:0},G=e=>{let{label:t,children:n,...l}=e;return(0,i.jsxs)(A.pT,{alignItems:"center",gap:2,children:["string"==typeof t?(0,i.jsx)(A.EY,{capitalize:!0,color:"W.1",variant:"label3",children:t}):t,(0,i.jsx)(A.lG,{iconSrc:V,...l,children:n})]})},$=e=>{let{composition:t,...n}=e;return(0,i.jsx)(A.pT,{borderRadius:"100px",height:1,overflow:"hidden",width:"100%",...n,children:t.map((e,t)=>(0,i.jsx)(A.az,{bg:e.color,height:"100%",width:"".concat(e.percentage,"%")},"".concat(e.percentage,"-").concat(t)))})};var Q=n(2965);let J={fundInfoClick:L.k4,fundPropectusClick:L.rv,kycFundPropectusClick:L.Gc},K=e=>
1{let{title:t,subText:n,percentage:a,color:r,isResultPage:o}=e,{strings:{general:{manulife:{recommender_result:{hero_section:{fund_info_text:s,fund_details_text:c,scheme_brochure:d}}}}},localeCode:m}=(0,g.Ym)(),[p,u]=(0,l.useState)(!1),h=()=>{p||(0,v.Ay)(J.fundInfoClick(t)),u(e=>!e)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(A.pT,{cp:!0,gap:3,justifyContent:"space-between",onClick:h,py:{_:"10px",md:4},children:[(0,i.jsxs)(A.pT,{gap:2,children:[(0,i.jsx)(A.az,{bg:r,borderRadius:"12px",height:"100%",width:"6.25px"}),(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{capitalize:!0,as:"p",color:"W.1",mb:"2px",variant:"label3",children:t}),(0,i.jsx)(A.EY,{as:"p",color:"B.8",variant:"caption2Reg",children:n})]})]}),(0,i.jsxs)(A.pT,{gap:1,children:[(0,i.jsx)(A.pT,{alignItems:"center",bg:"B.2",borderRadius:1,height:"28px",justifyContent:"center",p:1,children:(0,i.jsxs)(A.EY,{color:"W.2",px:1,variant:"body3",children:[a,"%"]})}),(0,i.jsx)(q.sd,{renderOn:"phone",parentElementProps:{as:A.pT,alignSelf:"center",color:"B.8"},children:(0,i.jsx)(A.C0,{height:"12px",name:"arrowRight",width:"16px"})})]})]}),p&&(0,i.jsxs)(A.aF,{onClose:h,styles:{minWidth:"360px",pb:{_:7,md:9}},children:[(0,i.jsxs)(A.az,{mb:6,pt:8,children:[(0,i.jsx)(A.EY,{capitalize:!0,as:"p",mb:1,variant:"label3",children:t}),(0,i.jsx)(A.EY,{variant:"price2Italic",children:s})]}),(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{capitalize:!0,cp:!0,as:"p",color:"B.7",mb:2,onClick:()=>{let e=t;if(m===Q.YZ.zhHK){let n=j.MmV[t];e=j.fo_[n]}let n=j.ssp[e];return m===Q.YZ.zhHK&&(n=n.replace("/en/","/zh-hk/")),window.open(n,"_blank")},variant:"label2",children:c}),(0,i.jsx)(A.EY,{capitalize:!0,cp:!0,as:"p",color:"B.7",onClick:()=>{o?(0,v.Ay)(J.kycFundPropectusClick(t)):(0,v.Ay)(J.fundPropectusClick(t)),window.open(j.$Am,"_blank")},variant:"label2",children:d})]})]})]})},X=(0,o.Ay)(A.pT).withConfig({componentId:"sc-842c5c83-0"})(["box-shadow:0px 2px 8px rgba(0,0,0,0.1);background:","f2;border-radius:8px 8px 0 0;@media (min-width:","){box-shadow:0px 4px 4px rgba(0,0,0,0.1);}"],(0,s.A)("colors.B.1"),(0,s.A)("breakpoints.md")),Z=e=>{let{onClickPrimaryAction:t,onClickSecondaryAction:n,primaryCTA:l,secondaryCTA:a,showDisclaimer:r=!1}=e,{strings:{general:{manulife:{recommender_result:{hero_section:{disclaimer_text:o}}}}}}=(0,g.Ym)();return(0,i.jsx)(q.sd,{renderOn:"phone",children:(0,i.jsx)(A.pT,{bottom:{_:0,md:10},justifyContent:"center",left:{_:0,md:"50%"},position:"fixed",right:{_:0,md:"50%"},width:{_:"100%",md:"auto"},zIndex:6e3,children:(0,i.jsxs)(X,{alignItems:"center",flexDirection:"column",pb:10,pt:6,px:6,width:{_:"100%",md:"auto"},children:[r&&(0,i.jsx)(A.EY,{color:"W.1",variant:"caption1",children:o}),(0,i.jsx)(A.$n,{mb:4,mt:3,onClick:t,width:"100%",children:l}),(0,i.jsx)(A.EY,{capitalize:!0,cp:!0,color:"G.1",onClick:n,variant:"label2",children:a})]})})})},ee={src:"/_next/static/media/manulife-result-bg-mweb.4e725122.webp",height:2579,width:540,blurDataURL:"data:image/webp;base64,UklGRjgAAABXRUJQVlA4ICwAAACwAQCdASoCAAgAAkA4JQBOgCHXYJAAAMtNzL6ZyJPgz/dz1D6s28RxuwAAAA==",blurWidth:2,blurHeight:8},et={manulifeResultBg:{src:"/_next/static/media/manulife-result-bg.da97da82.webp",height:1283,width:2160,blurDataURL:"data:image/webp;base64,UklGRlgAAABXRUJQVlA4WAoAAAAQAAAABwAABAAAQUxQSAwAAAABD9D/iAjMf0T/AwJWUDggJgAAAJABAJ0BKggABQACQDgljAJ0AQ6mQAD+7FtP/3QE2XbBgS0jYAAA",blurWidth:8,blurHeight:5},manulifeResultBgMweb:ee},en=(0,o.Ay)(A.az).withConfig({componentId:"sc-b68695ab-0"})(["background:linear-gradient(180deg,#2d375e 0%,rgba(0,0,0,0) 94.16%);@media (min-width:","){"," background-repeat:no-repeat;background-size:cover;background-position:",";background-color:",";}"],(0,s.A)("breakpoints.md"),e=>"background-image: url(".concat(e.bg.src,");"),e=>e.bgPosition,e=>e.bgColor),ei=(0,o.Ay)(e=>(0,i.jsx)(A.A,{...e})).withConfig({componentId:"sc-b68695ab-1"})(["color:",";&:hover{color:",";text-decoration:underline;}"],e=>(0,s.A)("colors.".concat(e.color)),e=>(0,s.A)("colors.".concat(e.color))),el={methodologyClick:(0,L.gc)(),riskLevelTipClick:(0,L.C1)(),mpfReturnClick:(0,L.$M)(),ackClick:(0,L.D8)(),redoClick:(0,L.ES)(),toSyfeClick:(0,L.cD)(),acceptClick:(0,L.xW)()},ea=e=>{var t;let{manulifeInfo:n,onClickPrimaryAction:r}=e,{strings:{general:{manulife:{onboarding:{new_risk_preference_section:{risk_preference_disclaimer:o,level1:s,level2:p,level3:u,level4:h,level5:x}},recommender_result:{complete_kyc_cta:b,hero_section:{hero_title:_,subt
1itle_text:y,disclaimer_text:E,re_do_assessment_cta:C,log_into_manulife_cta:k,know_more_about_syfe_cta:T,return_caption:w,return_meaning_text:I,risk_level_caption:z,annualised_return_text:B,mpf_average_return_text:S,mpf_average_return_meaning_text:Y,mpf_annualised_return_caption:O,total_text:D,total_value:M,view_our_methodology_text:L,risk_score_captions:R,result_acknowledge_text:F},composition_section:{mask_screen:{i_acknowledge_cta:P}}}}}}}=(0,g.Ym)(),[N,H]=(0,l.useState)(!1),W=(0,c.wA)(),{asPath:U}=(0,a.useRouter)(),V=!U.includes(f.HyN.MANULIFE_RECOMMENDATION_RESULT),Q=V?k:b,J=V?T:C,X=e=>(0,i.jsx)(A.EY,{color:"B.1",variant:"price2Italic",children:e}),ee=(e=>e&&e.length&&e.map(e=>({...e})))(null==n?void 0:n.allocations),{riskScore:ea,riskLevel:er}=((e,t)=>({ONE:{riskScore:1,riskLevel:t.low},TWO:{riskScore:2,riskLevel:t.moderately_low},THREE:{riskScore:3,riskLevel:t.moderate},FOUR:{riskScore:4,riskLevel:t.high},FIVE:{riskScore:5,riskLevel:t.very_high}})[e])(n.riskScore,R),eo=null==n||null==(t=n.data)?void 0:t.returns,es=()=>{V?((0,v.Ay)(el.toSyfeClick),W((0,d.VC)("/"))):((0,v.Ay)(el.redoClick),W((0,d.VC)(f.HyN.MANULIFE_IDENTITY_INFORMATION)))},ec=()=>{N||(0,v.Ay)(el.ackClick),H(e=>!e)},ed=()=>{V?n.manuLifeFinalRedirectionConsent?em():ec():r()},em=()=>{if(n.manuLifeFinalRedirectionConsent)W((0,d.VC)(j.wQ));else{let e=()=>{W((0,d.VC)(j.wQ))};(0,v.Ay)(el.acceptClick),W(m.Wx.updateManulifeAcknowledgeStatus({payload:{manuLifeFinalRedirectionConsent:!0},showLoader:!0,onSuccessCb:()=>{ec(),W(m.Wx.getManulifeRecommenderResult({showLoader:!0,onSuccessCb:e}))}}))}};return(0,i.jsxs)(en,{bg:et.manulifeResultBg,mwebBg:et.manulifeResultBgMweb,children:[(0,i.jsx)(A.mc,{children:(0,i.jsxs)(A.pT,{flexDirection:{_:"column",lg:"row"},gap:{_:0,md:15},pb:{_:4,md:24},pt:{_:15,md:24},children:[(0,i.jsxs)(A.pT,{flexBasis:"48%",flexDirection:"column",pt:{_:0,md:7},children:[(0,i.jsx)(A.EY,{color:"G.1",mb:{_:6,md:10},variant:{_:"price1Italic",md:"section1"},children:_}),(0,i.jsx)(A.EY,{color:"G.1",fontSize:{_:5,md:9},variant:{_:"mlWide",md:"label6"},children:y}),(0,i.jsx)(q.sd,{renderOn:["desktop","tablet"],children:(0,i.jsxs)(A.az,{mt:10,children:[!V&&(0,i.jsx)(A.EY,{color:"G.1",variant:"caption1",children:E}),(0,i.jsx)(A.$n,{mb:10,mt:3*!V,onClick:ed,children:Q}),(0,i.jsx)(A.EY,{capitalize:!0,cp:!0,color:"G.1",mt:10,onClick:es,px:V?12:9,py:4,variant:"label2",children:J})]})})]}),(0,i.jsxs)(A.pT,{flexDirection:{_:"column-reverse",md:"column"},children:[(0,i.jsxs)(A.pT,{bg:"B.1",flexDirection:"column",gap:{_:4,md:10},pl:{_:3,md:10},pr:{_:3,md:9},py:{_:4,md:10},children:[(0,i.jsxs)(A.pT,{gap:4,justifyContent:"space-between",children:[(0,i.jsxs)(A.pT,{flexDirection:"column",gap:2,children:[(0,i.jsx)(G,{label:w,title:X(w),children:(0,i.jsx)(A.EY,{color:"B.1",variant:"body2",children:(0,i.jsx)(g.In,{components:{breakElement:(0,i.jsx)("br",{})},str:I})})}),(0,i.jsx)(G,{modalMaxWidth:"600px",onInfoClick:()=>(0,v.Ay)(el.mpfReturnClick),title:X(O),label:(0,i.jsx)(A.EY,{color:"B.4",variant:{_:"caption3",md:"caption1"},children:(0,i.jsx)(g.In,{components:{br:(0,i.jsx)("br",{})},str:S})}),children:(0,i.jsx)(A.EY,{color:"B.1",variant:"body2",children:(0,i.jsx)(g.In,{str:Y,components:{brElement:(0,i.jsx)("br",{}),linkElement:(0,i.jsx)(ei,{color:"B.7",href:j.t$u,target:"_blank"})}})})}),(0,i.jsx)(A.EY,{color:"G.2",variant:"price1",children:(0,i.jsx)(g.In,{str:"{{value}}<shortText>%</shortText>",components:{shortText:(0,i.jsx)(A.EY,{variant:"price3"})},values:{value:eo}})}),(0,i.jsx)(A.EY,{color:"B.8",variant:"caption1",children:B})]}),(0,i.jsxs)(A.pT,{flexDirection:"column",gap:2,children:[(e=>(0,i.jsx)(G,{label:e,modalMaxWidth:"600px",onInfoClick:()=>(0,v.Ay)(el.riskLevelTipClick),title:(0,i.jsxs)(A.az,{mb:6,children:[(0,i.jsx)(A.EY,{color:"B.1",variant:"price4",children:e}),(0,i.jsx)(A.EY,{color:"B.1",variant:"body2",children:o})]}),children:[x,h,u,p,s].map(e=>{let{caption:t,description_text:n}=e;return(0,i.jsxs)(A.az,{mb:6,children:[(0,i.jsx)(A.EY,{color:"B.1",variant:"subtitle3",children:t}),(0,i.jsx)(A.EY,{as:"p",color:"B.1",mt:1,variant:"body2",children:n})]},t)})}))(z),(0,i.jsx)(A.az,{height:"18px"}),(0,i.jsx)(A.EY,{color:"G.2",variant:"price1",children:ea}),(0,i.jsx)(A.EY,{color:"B.8",variant:"caption1",children:er})]})]}),(0,i.jsxs)(A.pT,{flexDirection:"column",children:[(0,i.jsx)($,{composition:ee,mb:2}),ee&&ee.length&&ee.map(e=>
1(0,i.jsx)(K,{color:e.color,isResultPage:V,percentage:+e.percentage,subText:e.Subtext,title:e[["Fund Name"]]},"".concat(e["Fund Name"],"-"))),(0,i.jsxs)(A.pT,{borderTop:"0.25px solid #BCBED7",justifyContent:"space-between",mt:{_:4,md:6},pb:{_:0,md:4},pt:{_:3,md:4},children:[(0,i.jsx)(A.EY,{color:"B.4",variant:"body3",children:D}),(0,i.jsx)(A.EY,{color:"B.4",variant:"body3",children:(0,i.jsx)(g.In,{str:M,values:{value:100}})})]})]})]}),(0,i.jsxs)(A.pT,{cp:!0,alignItems:"center",alignSelf:{_:"start",md:"end"},color:{_:"B.8",md:"W.1"},gap:1,mb:{_:4,md:0},mt:{_:1,md:4},onClick:()=>{let e=f.HyN.MANULIFE_PROFILE;V&&(e="".concat(f.bE5,"/").concat(e)),(0,v.Ay)(el.methodologyClick),W((0,d.VC)(e))},children:[(0,i.jsx)(A.EY,{capitalize:!0,color:{_:"B.8",md:"W.1"},variant:"label3",children:L}),(0,i.jsx)(A.C0,{height:"12px",name:"arrowRight",width:"16px"})]})]})]})}),(0,i.jsx)(Z,{onClickPrimaryAction:ed,onClickSecondaryAction:es,primaryCTA:Q,secondaryCTA:J,showDisclaimer:!V}),N&&!n.manuLifeFinalRedirectionConsent&&(0,i.jsx)(A.aF,{onClose:ec,children:(0,i.jsxs)(A.pT,{alignItems:"center",flexDirection:"column",gap:12,mt:12,pb:2,children:[(0,i.jsx)(A.EY,{color:"B.1",lineHeight:1.5,variant:"body2",children:F}),(0,i.jsx)(A.$n,{onClick:em,children:P})]})})]})};var er=n(34007),eo=n(91589),es=n(33947),ec=n(88246),ed=n(67362);let em=(0,o.Ay)(A.az).withConfig({componentId:"sc-1b863d19-0"})(["&&& svg{overflow:inherit;}"]),ep=e=>{let{data:t=[],height:n,margin:l,theme:a,innerRadius:r,labelTextAnchor:o,tooltip:s}=e;return(0,i.jsx)(em,{as:er.u,height:n,children:(0,i.jsxs)(eo.r,{margin:l,children:[(0,i.jsx)(es.F,{cx:"50%",cy:"50%",data:t,dataKey:"allocation",innerRadius:r,isAnimationActive:!1,labelLine:!1,nameKey:"class",outerRadius:"end"===o?"80%":"100%",children:t.map((e,t)=>(0,i.jsx)(ec.f,{fill:e.color,stroke:null},"cell-".concat(t)))}),s&&(0,i.jsx)(ed.m,{content:s})]})})};ep.defaultProps={height:185,margin:{top:0,right:0,left:0,bottom:0},innerRadius:"60%",labelTextAnchor:"middle",showLabelInDecimal:!1,theme:"light"};let eu=e=>{let{children:t}=e;return(0,i.jsx)(A.az,{bg:"W.2",borderRadius:4,px:4,py:3,children:t})},eh=(0,o.Ay)(A.pT).withConfig({componentId:"sc-2b086c22-0"})(["box-shadow:0px 20px 50px 0px #26315926;"]),ex=e=>{let{manulifeData:t}=e,{strings:{general:{manulife:{recommender_result:{composition_section:{tabs:{asset_class_caption:n}}}}}}}=(0,g.Ym)(),l=t.assetClassData||[];l.sort((e,t)=>t.percentage-e.percentage);let a=l.map(e=>({allocation:e.percentage,class:e.name,color:e.color})),r=e=>{let{active:t,payload:n}=e,{payload:{fill:l="",payload:a}={}}=(null==n?void 0:n[0])||{};if(t)return(0,i.jsxs)(eh,{bg:"G.1",borderRadius:2,gap:2,p:3,children:[(0,i.jsx)(A.az,{bg:l,borderRadius:"50%",height:1,width:1}),(0,i.jsxs)(A.pT,{flexDirection:"column",children:[(0,i.jsx)(A.EY,{capitalize:!0,as:"p",color:"B.3",mb:1,variant:"label4",children:null==a?void 0:a.class}),(0,i.jsxs)(A.EY,{capitalize:!0,color:"B.3",variant:"caption1",children:[null==a?void 0:a.allocation,"%"]})]})]})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q.sd,{renderOn:["phone"],children:(0,i.jsx)(eu,{children:(0,i.jsxs)(A.pT,{justifyContent:"space-between",children:[(0,i.jsxs)(A.pT,{flexDirection:"column",gap:2,children:[(0,i.jsx)(A.EY,{as:"p",mb:2,variant:"label3",children:n}),a.map(e=>(0,i.jsx)(A.pT,{gap:2,children:(0,i.jsxs)(A.pT,{flexDirection:"column",children:[(0,i.jsxs)(A.pT,{alignItems:"baseline",gap:2,children:[(0,i.jsx)(A.az,{bg:e.color,borderRadius:"50%",height:1,width:1}),(0,i.jsx)(A.EY,{capitalize:!0,as:"p",color:"B.3",mb:1,variant:"label4",children:e.class})]}),(0,i.jsxs)(A.EY,{capitalize:!0,color:"B.1",variant:"subtitle3",children:[e.allocation,"%"]})]})},e.name))]}),(0,i.jsx)(A.pT,{width:"50%",children:(0,i.jsx)(ep,{data:a,height:"100%",tooltip:r,margin:{top:20,right:0,left:0,bottom:20}})})]})})}),(0,i.jsxs)(q.sd,{renderOn:["desktop","tablet"],parentElementProps:{as:A.az,p:2},children:[(0,i.jsx)(A.pT,{gap:4,pt:3,children:a.map(e=>(0,i.jsxs)(A.pT,{gap:2,children:[(0,i.jsx)(A.az,{bg:e.color,borderRadius:"50%",height:1,width:1}),(0,i.jsxs)(A.pT,{flexDirection:"column",children:[(0,i.jsx)(A.EY,{capitalize:!0,as:"p",color:"B.3",mb:1,variant:"label4",children:e.class}),(0,i.jsxs)(A.EY,{capitalize:!0,color:"B.3",variant:"caption1",children:[e.allocation,"%"]})]})]},e.name))}),(0,i.jsx)(A.az,{mt:5,children:(0,i.jsx)(ep,{data:a,height:400,tooltip:r,margin:{top:40,right:20,left
1:20,bottom:40}})})]})]})},eb=e=>{let{text:t,cellProps:n,textProps:l}=e;return(0,i.jsx)(A.az,{px:{_:0,md:6},py:{_:2,md:5},...n,children:"string"==typeof t?(0,i.jsx)(A.EY,{capitalize:!0,color:"W.1",variant:"label3",...l,children:t}):t})},eg=(0,o.Ay)(A.az).withConfig({componentId:"sc-e495ee1c-0"})(["align-items:center;",""],e=>e.borderBottomColor&&"border-bottom-color: #dedfee;"),e_=e=>{let{manulifeData:t}=e,{strings:{general:{manulife:{recommender_result:{composition_section:{country_text:n,tabs:{portfolio_allocation_caption:l}}}}}}}=(0,g.Ym)(),a=t.topFivePortfolioAllocationsData||[],r=e=>{let{name:t,allocation:n,isHeader:l}=e;return l?(0,i.jsxs)(eg,{bg:"B.1",display:"grid",gridTemplateColumns:"repeat(2, 1fr)",children:[(0,i.jsx)(eb,{text:t,cellProps:{bg:"B.1",border:"1px solid",borderColor:"B.2"}}),(0,i.jsx)(eb,{text:n,cellProps:{bg:"B.1",border:"1px solid",borderColor:"B.2"}})]}):(0,i.jsxs)(eg,{borderBottom:{_:0,md:"1px solid"},borderBottomColor:"B.5",display:"grid",gridTemplateColumns:"repeat(2, 1fr)",children:[(0,i.jsx)(eb,{text:t,textProps:{color:"B.1",variant:{_:"caption1",md:"caption2"}}}),(0,i.jsx)(eb,{text:n,textProps:{as:A.pT,justifyContent:{_:"end",md:"start"},color:"B.1",fontWeight:600,variant:{_:"subtitle3",md:"caption2"}}})]})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q.sd,{renderOn:["phone"],children:(0,i.jsx)(eu,{children:(0,i.jsxs)(A.pT,{flexDirection:"column",gap:3,children:[(0,i.jsx)(A.EY,{as:"p",variant:"label3",children:l}),(0,i.jsx)(eg,{display:"grid",gridTemplateColumns:"repeat(1, 1fr)",children:a.map(e=>(0,i.jsx)(r,{allocation:"".concat(e.percentage,"%"),name:e.name},e.name))})]})})}),(0,i.jsx)(q.sd,{renderOn:["desktop","tablet"],children:(0,i.jsx)(A.az,{px:10,children:(0,i.jsx)(A.az,{bg:"G.1",children:(0,i.jsxs)(eg,{display:"grid",gridTemplateColumns:"repeat(1, 1fr)",children:[(0,i.jsx)(r,{isHeader:!0,allocation:"%",name:n}),a.map(e=>(0,i.jsx)(r,{allocation:"".concat(e.percentage,"%"),name:e.name},e.name))]})})})})]})},ef=(0,o.Ay)(A.az).withConfig({componentId:"sc-f7b4becf-0"})(["align-items:center;",""],e=>e.borderBottomColor&&"border-bottom-color: #dedfee;"),ej=e=>{let{manulifeData:t}=e,{strings:{general:{manulife:{recommender_result:{composition_section:{sector_text:n,tabs:{top_five_caption:l}}}}}}}=(0,g.Ym)(),a=t.topFiveHoldingsData||[],r=e=>{let{name:t,allocation:n,isHeader:l}=e;return l?(0,i.jsxs)(ef,{bg:"B.1",display:"grid",gridTemplateColumns:"repeat(2, 1fr)",children:[(0,i.jsx)(eb,{text:t,cellProps:{bg:"B.1",border:"1px solid",borderColor:"B.2"}}),(0,i.jsx)(eb,{text:n,cellProps:{bg:"B.1",border:"1px solid",borderColor:"B.2"}})]}):(0,i.jsxs)(ef,{borderBottom:{_:0,md:"1px solid"},borderBottomColor:"B.5",display:"grid",gridTemplateColumns:"repeat(2, 1fr)",children:[(0,i.jsx)(eb,{text:t,textProps:{color:"B.1",variant:{_:"caption1",md:"caption2"}}}),(0,i.jsx)(eb,{text:n,textProps:{as:A.pT,justifyContent:{_:"end",md:"start"},color:"B.1",fontWeight:600,variant:{_:"subtitle3",md:"caption2"}}})]})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q.sd,{renderOn:["phone"],children:(0,i.jsx)(eu,{children:(0,i.jsxs)(A.pT,{flexDirection:"column",gap:3,children:[(0,i.jsx)(A.EY,{as:"p",variant:"label3",children:l}),(0,i.jsx)(ef,{display:"grid",gridTemplateColumns:"repeat(1, 1fr)",children:a.map(e=>(0,i.jsx)(r,{allocation:"".concat(e.percentage,"%"),name:e.name},e.name))})]})})}),(0,i.jsx)(q.sd,{renderOn:["desktop","tablet"],children:(0,i.jsx)(A.az,{px:10,children:(0,i.jsx)(A.az,{bg:"G.1",children:(0,i.jsxs)(ef,{display:"grid",gridTemplateColumns:"repeat(1, 1fr)",children:[(0,i.jsx)(r,{isHeader:!0,allocation:"%",name:n}),a.map((e,t)=>(0,i.jsx)(r,{allocation:"".concat(e.percentage,"%"),index:t,name:e.name},e.name))]})})})})]})},ev=(0,o.Ay)(A.az).withConfig({componentId:"sc-2a12c8a6-0"})(["position:absolute;height:100%;width:100%;top:0;background:","cc;z-index:1;"],(0,s.A)("colors.B.2")),ey={methodologyClick:(0,L.gc)(),ackClick:(0,L.D8)()},eE=(0,o.Ay)(A.mc).withConfig({componentId:"sc-2a12c8a6-1"})(["",""],e=>e.isBlurred&&"filter: blur(4px);\n -webkit-filter: blur(4px);"),eC=o.Ay.ul.withConfig({componentId:"sc-2a12c8a6-2"})(["color:",";list-style:disc;margin-left:15px;margin-top:12px;"],(0,s.A)("colors.W.1")),ek=e=>{let{manulifeInfo:t}=e,{strings:{general:{manulife:{recommender_result:{composition_section:{tabs:n,title_text:r,sub_text:o,mask_screen:{main_text:s,disclaimer_text:m,list_items:p,i_acknowledge_cta:h}}}}}}}=(0,g.Ym)(),x=(0,c.wA)(),b=(0,c.d4)(u.DT.getManulifeAcknowledgeStatus),_=null==t?void 0:t.data,j=(e=>[{key:"assetClass",title:e.asset_class_caption,component:ex},{key:"portfolioAllocation",title:e.portfolio_allocation_caption,component:e_},{key:"top5",title:e.top_five_caption,component:ej}])(n),{asPath:y}=(0,a.useRouter)(),E=!y.includes(f.HyN.MANULIFE_RECOMMENDATION_RESULT),[C,k]=l.useState(j[0].key);return(0,i.jsxs)(A.az,{bg:{_:"transparent",md:"W.2"},pb:{_:"220px",md:20},position:"relative",pt:{_:4,md:20},children:[!b&&(0,i.jsx)(ev,{children:(0,i.jsx)(A.pT,{alignItems:{_:"normal",md:"center"}
1,height:"100%",justifyContent:"center",px:6,py:6,children:(0,i.jsxs)(A.pT,{alignItems:"center",flexDirection:"column",maxWidth:"544px",children:[(0,i.jsx)(A.EY,{as:"h3",color:"W.1",mb:{_:5,md:8},variant:{_:"price4",md:"price2"},children:s}),(0,i.jsx)(A.EY,{color:"W.1",lineHeight:1.5,variant:"body3",children:(0,i.jsx)(g.In,{str:m,components:{linkComponent:(0,i.jsx)(A.EY,{cp:!0,color:"B.8",onClick:()=>{let e=f.HyN.MANULIFE_PROFILE;E&&(e="".concat(f.bE5,"/").concat(e)),(0,v.Ay)(ey.methodologyClick),x((0,d.VC)(e))}})}})}),(0,i.jsx)(eC,{children:p.map((e,t)=>(0,i.jsx)(A.EY,{as:"li",color:"W.1",lineHeight:1.5,variant:"body3",children:e},"acknowledge-".concat(t)))}),(0,i.jsx)(A.az,{mt:10,children:(0,i.jsx)(A.$n,{onClick:()=>{(0,v.Ay)(ey.ackClick),x((0,H.updateManulifeAcknowledgeStatus)({payload:{recommendationAcknowledgement:!0,recommendation:t.recommendation},showLoader:!0}))},children:h})})]})})}),(0,i.jsx)(eE,{isBlurred:!b,children:(0,i.jsxs)(A.pT,{flexDirection:{_:"column",md:"row"},gap:6,children:[(0,i.jsxs)(A.pT,{flexDirection:"column",justifyContent:"center",width:{_:"100%",md:"50%"},children:[(0,i.jsx)(A.EY,{capitalize:{_:!0,md:!1},color:{_:"W.1",md:"B.1"},mb:{_:2,md:10},variant:{_:"label3",md:"section1"},children:r}),(0,i.jsx)(A.EY,{color:{_:"W.1",md:"B.1"},variant:{_:"body3",md:"subtitle1"},children:o})]}),(0,i.jsxs)(q.sd,{renderOn:["desktop","tablet"],parentElementProps:{as:A.pT,gap:10,width:"50%",flexDirection:"column"},children:[(0,i.jsx)(A.zw,{fullWidth:!0,activeTab:C,bgColor:"BT.1",height:"44px",items:j,onTabChange:k,tabItemPadding:4,textContainerProps:{flexGrow:"auto",px:0,pr:8}}),(0,j.find(e=>e.key===C).component)({manulifeData:_})]}),(0,i.jsxs)(q.sd,{renderOn:"phone",parentElementProps:{as:A.pT,gap:3,width:"100%",flexDirection:"column"},children:[(0,i.jsx)(ex,{manulifeData:_}),(0,i.jsx)(e_,{manulifeData:_}),(0,i.jsx)(ej,{manulifeData:_})]})]})})]})};var eA=n(92118),eT=n(55494);let ew=(0,o.Ay)(A.az).withConfig({componentId:"sc-12282bd4-0"})(["@media (max-width:","){"," background-repeat:no-repeat;background-size:cover;background-position:",";background-color:",";}"],(0,s.A)("breakpoints.md"),e=>"background-image: url(".concat(e.bg.src,");"),e=>e.bgPosition,e=>e.bgColor),eI={pageLoad:(0,L.e)(),kycPageLoad:(0,L.FS)(),kycClick:(0,L.bA)(),toManuLifeClick:(0,L.U1)()},ez=W(e=>{let{getManulifeRecommenderResult:t,manulifeInfo:n,isManulifeInfoLoaded:r,currentStep:o,nextUrl:s}=e,{strings:{general:{manulife:{recommender_result:{complete_kyc_cta:d,preloader_section:{title_text:p,sub_text:u}}}}}}=(0,g.Ym)(),h=(0,c.wA)(),{asPath:x}=(0,a.useRouter)(),b=!x.includes(f.HyN.MANULIFE_RECOMMENDATION_RESULT),[_,j]=(0,l.useState)(!r&&!b),y=()=>{b?(0,v.Ay)(eI.toManuLifeClick):(0,v.Ay)(eI.kycClick),h(m.Xn.updateFinancialInformation({payload:{isManulifeFundRecommendationResultStepCrossed:!0,currentStep:o},nextUrl:s}))};(0,l.useEffect)(()=>{r||t({showLoader:b})},[r,t,b]),(0,l.useEffect)(()=>{let e=setTimeout(()=>{j(!1)},2e3);return()=>{clearInterval(e)}},[]),(0,l.useEffect)(()=>{b?(0,v.Ay)(eI.kycPageLoad):(0,v.Ay)(eI.pageLoad)},[]);let E=(0,i.jsxs)(ew,{bg:ee,children:[(0,i.jsx)(ea,{manulifeInfo:n,onClickPrimaryAction:y}),(0,i.jsx)(ek,{manulifeInfo:n})]});return _?(0,i.jsx)(eA.A,{loaderText:u,progressComplete:r,theme:"white",titleText:p}):r?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(q.sd,{renderOn:["desktop","tablet"],children:(0,i.jsx)(U.A,{headerProps:{theme:"dashboard",onBtnAction:!b&&y,btnCTA:d},children:E})}),(0,i.jsx)(q.sd,{renderOn:["phone"],children:E})]}):(0,i.jsx)(eT.k,{})});var eB=n(26503),eS=n(11512);let eY=e=>x.Ik().shape({country:x.Yj().required(e.required_caption),mobile:x.Yj().required(e.required_caption).matches(/^[0-9]*$/,e.only_digits_text).matches(/^[1-9]/,e.cannot_start_with_zero_text).min(3,e.too_short_text).max(11,e.too_long_text)}),eO=(0,c.Ng)(e=>({user:u.$u.getUser(e),kycDetails:u.$u.getMobileDetails(e),mobileAlreadyRegistered:u.$A.getMobileAlreadyRegistered(e),location:e.router.location}),e=>({updateKYCInformation:t=>{let{kycDetails:n,nextUrl:i,currentStep:l}=t;return e(m.Xn.updateKYCInformation({kycDetails:n,nextUrl:i,currentStep:l}))},refreshUserInfo:()=>e(m.zV.getUserInfo()),sendOTP:function(t,n,i,l,a){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"SMS";return e(m.pE.sendOTP(t,n,i,l,a,r))},validateOTP:function(t,n,i,l,a,r){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"SMS";return e(m.pE.validateOTP(t,n,i,l,a,r,o))},showToast:t=>e(m.v_.showToast(t)),navigate:t=>e((0,d.VC)(t)),replace:t=>e((0,d.HC)(t)),goBack:()=>e((0,d.OE)())}),(e,t,n)=>({...e,...t,...n}));var eD=n(52622),eM=n(26445),eL=n(27106),eR=n(49104),eF=n(33799);let eP=e=>{let{alreadyRegistered:t,onFormSubmit:n,handleMobileNumberChange:l,onCountryChange:a,formProps:r}=e,{strings:{onboarding:{mobile_verification_page:{verification_form_section:{get_code_cta:o,mobile_already_registered_text:s}}},general:{manulife:{onboarding:{mobile_verification_page:{sub_text:c}}}},forms:{labels:{mobile_verification_section:d}},errors:m}}=(0,g.Ym)(),{values:p}=r,u=(0,eM.Kb)(),{syfeCountryCodes:h={},syfeTopCountryCodes:x=[]}=u,b=u[Q.gh],_=u[Q.z$],f=(0,eL.Ss)(b,_),j=(e=>{let{country_region_text:t,mobile_text:n}=e;return{country:e=>({type:"select",options:Object.keys(e).map(t=>({value:e[t].code,label:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eS.A,{code:t,mr:2}),"".concat(e[t].localeData.countryName," (+").concat(e[t].code,")")]}),searchText:"".concat(e[t].localeData.countryName," (+").concat(e[t].code,")")})),label:t}),mobile:{type:"input",label:n,options:[]}}})(d),v=(0,eL.jQ)(j.country(f).options,x.map(e=>{var t;return null==(t=h[e])?void 0:t.code})),y=t&&p.mobile?s:r.errors.mobile;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A.az,{mb:8,children:(0,i.jsx)(A.EY,{color:"B.3",variant:"body2",children:c})}),(0,i.jsxs)(A.pT,{alignItems:"flexStart",mb:10,children:[v.length&&(0,i.jsx)(A.az,{flex:.4,position:"relative",children:(0,i.jsx)(eF.A,{...(0,eR.A)("country",j.country(f).label,{},r),fillType:"outlined",id:"country",onChange:a,options:v,renderValue:e=>"+".concat(e),theme:"light",value:p.country})}),(0,i.jsx)(A.az,{flex:.6,ml:2,children:(0,i.jsx)(A.pd,{...(0,eR.A)("mobile",j.mobile.label,{},r),error:!!y,errorText:y,fillType:"outlined",id:"mobile",onChange:e=>l(e.target.value),onKeyDown:e=>"e"===e.key&&e.preventDefault(),placeholder:j.mobile.label,theme:"light",type:"number"})})]}
1),(0,i.jsx)(A.$n,{analyticsInfo:(0,E.nMp)(),disabled:!eY(m).isValidSync(p),onClick:n,width:"100%",children:o})]})},eN=e=>{let{mobileCountryCode:t,mobileNumber:n,sendOTP:a,validateOTP:r,onSuccessfulVerification:o,onEditClick:s,navigate:c}=e,[d,m]=(0,l.useState)(""),[p,u]=(0,l.useState)(""),[h,x]=(0,l.useState)(!1),[b,_]=(0,l.useState)(0),[j,y]=(0,l.useState)(!1),{strings:{general:{otp_section:{receive_otp_phone_text:C,receive_otp_sms_text:k},manulife:{onboarding:{mobile_verification_page:{code_verified_text:T}}}},onboarding:{mobile_verification_page:{otp_section:{enter_otp_text:I,resend_otp_cta:z,get_voice_otp_cta:B}}},forms:{labels:{mobile_verification_section:{otp_code_text:S,placeholder_text:Y}}}},geography:O}=(0,g.Ym)(),{visibilityFlags:{enableVoiceOtp:D}}=(0,w.Q)(O),M=e=>{var t,n,i;e.response&&u(e.response.data.message);let l=(null==e||null==(i=e.response)||null==(n=i.data)||null==(t=n.details)?void 0:t.waitTime)||30;l&&(_(l),x(!1))},L=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];y(e),await a(t,n,null,M,{showConfirmationAlert:!0,confirmationIsNotification:!0,confirmationMessage:e?C:k,confirmationTheme:"light"},e?"CALL":"SMS"),x(!1)},R=e=>{let{value:i}=e.target;(m(i),4===i.length)&&(e.target.blur(),u(""),(0,v.Ay)((0,E.nMp)()),r(t,n,i,o,M,{showConfirmationAlert:!0,confirmationMessage:"",confirmationHeading:T,confirmationTheme:"white"},j?"CALL":"SMS"))},F=h?(0,i.jsx)(A.az,{children:(0,i.jsx)(A.EY,{color:"G.2",variant:"button1",children:"00:00"})}):(0,i.jsx)(A.M4,{onTimeUp:()=>{x(!0)},theme:"white",time:b||30,type:"linear"}),P=(0,i.jsx)(A.az,{color:"BT.5",cp:"pointer",pl:2,children:(0,i.jsx)(A.C0,{height:"16px",name:"pen",onClick:()=>{s(),(0,v.Ay)({action:"edit_button_click",category:"verify_mobile_otp"}),c("".concat(f.sJi.EDIT_MOBILE,"?step=form"))},width:"16px"})});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A.az,{mb:14,children:(0,i.jsx)(g.In,{str:I,components:{captionComponent:(0,i.jsx)(A.EY,{color:"B.1",textAlign:"center",variant:"body1"}),motpWrapperComponent:(0,i.jsx)(A.pT,{alignItems:"center",justifyContent:"center",mt:1}),mobileNumComponent:(0,i.jsx)(A.EY,{variant:"subtitle3"}),motpEditComponent:P},values:{mobileNum:"(+".concat(t,") ").concat(n)}})}),(0,i.jsx)(A.az,{width:"100%",children:(0,i.jsx)(A.pd,{autoFocus:!0,error:!!p,errorText:p,fillType:"outlined",label:S,name:"otp",onChange:e=>{let{value:t}=e.target;if(t){let n=t&&t[t.length-1].toString();n<="9"&&n>="0"&&t.length<5&&R(e)}else R(e)},placeholder:Y,theme:"light",type:"number",value:d})}),(0,i.jsxs)(A.pT,{alignItems:"center",justifyContent:"center",mt:{md:8,_:6},children:[(0,i.jsx)(A.$n,{analyticsInfo:(0,E.NEg)(),disabled:!h,fillType:"text",onClick:()=>{L()},px:4,size:"sm",variant:"primary",children:z}),D&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A.az,{border:"none",borderColor:"B.1",borderLeft:"1px solid",height:"20px",width:"1px"}),(0,i.jsx)(A.$n,{disabled:!h,fillType:"text",onClick:()=>{L(!0)},px:4,size:"sm",variant:"primary",children:B})]}),(0,i.jsx)(A.az,{border:"none",borderColor:"B.1",borderLeft:"1px solid",height:"20px",width:"1px"}),(0,i.jsx)(A.az,{mx:4,children:F})]})]})},eH={pageLoad:(0,L.oA)()},eW=eO(e=>{let{mobileAlreadyRegistered:t,showToast:n,sendOTP:o,validateOTP:s,updateKYCInformation:c,refreshUserInfo:d,kycDetails:m,nextUrl:p,navigate:u,title:h,subtitle:x,currentStep:b,location:_,replace:j,goBack:y}=e,{strings:{errors:E},geographyConstants:{defaultMobileCode:C}}=(0,g.Ym)(),[k,T]=(0,l.useState)(m.mobileCountryCode||C),[w,I]=(0,l.useState)(m.mobileNumber||""),[z,B]=(0,l.useState)(m.mobileVerified),[S,O]=(0,l.useState)(t),D=(0,Y.V8)(_.search,"step"),[M,L]=(0,l.useState)(D),R=(0,a.useRouter)(),F=(0,Y.Hm)(R);(0,l.useEffect)(()=>{(0,v.Ay)(eH.pageLoad),_.search&&_.search.includes("step=")||R.replace({pathname:F,query:{step:"form"}})},[]),(0,eB.A)(f.sJi.SIGNUP_EMAIL_VERIFICATION);let P=e=>{window.history.pushState({},null,"?step=otp-verification"),L("otp-verification")},N=e=>{e.response&&409===e.response.status?O(!0):n(e.response&&e.response.data&&e.response.data.message||"Something went wrong")},H=e=>{e.stopPropagation(),e.preventDefault(),O(t),_.pathname===f.g97&&(0,v.Ay)({action:"update_button_click",category:"update_mobile_clicks"}),o(k,w,P,N)},W=e=>{I(e),O(!1)},U=e=>{T(e)},q=()=>
1{B(!0),O(!1),d(),c({kycDetails:{mobileCountryCode:k,mobileNumber:w,mobileVerified:z},nextUrl:p,currentStep:b})},V=()=>{T(k||C),I(w||"")};return(w||"otp-verification"!==M||j((0,eD.h)()?f.sJi.ACCOUNT_SETUP:"".concat(f.Dct,"?step=form")),M)?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(r.l1,{enableReinitialize:!0,isInitialValid:e=>eY(E).isValidSync(e),validationSchema:eY(E),initialValues:{country:k,mobile:w},children:e=>(0,i.jsxs)(A.az,{maxWidth:{md:"360px"},mt:{_:7,md:20},mx:"auto",px:{_:6,md:0},children:[(!M||"form"===M)&&(0,i.jsx)(eP,{alreadyRegistered:S,formProps:e,handleMobileNumberChange:W,onCountryChange:U,onFormSubmit:H,subtitle:x,title:h}),"otp-verification"===M&&(0,i.jsx)(eN,{goBack:y,mobileCountryCode:k,mobileNumber:w,navigate:u,onEditClick:V,onSuccessfulVerification:q,sendOTP:o,validateOTP:s})]})})}):(0,i.jsx)(eT.k,{showLoader:!0})}),eU=(0,c.Ng)(e=>({errorMessage:u.HI.getErrorMessage(e),resendWaitTime:u.HI.getResendWaitTime(e),loginMethod:u.o_.selectLoginMethod(e),otpSuccess:u.HI.getOtpSuccess(e),responsiveUtility:e.responsiveUtility,phone:u.o_.getPhone(e),email:u.o_.getEmail(e),token:u.o_.getMfaToken(e),isAdvisor:u.o_.isAdvisor(e),showVoiceCallOption:u.o_.getShowVoiceCallOption(e),nextRoute:O(e.router.location)}),e=>({generateLoginOTP:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"SMS",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e(m.pE.generateLoginOTP(t,"MFA",n,i))},validateLoginOTP:(t,n,i,l)=>e(m.pE.validateLoginOTP(t,n,i,"MFA",void 0,{},l))})),eq=()=>(1e3*Math.random()).toString(),eV=(0,o.Ay)(A.EY).withConfig({componentId:"sc-d15b7124-0"})(["text-decoration:none;"]),eG={pageLoad:(0,L.ED)(),resendBtn:(0,L.lz)()},e$=eU(e=>{let{generateLoginOTP:t,validateLoginOTP:n,token:r,showVoiceCallOption:o,nextRoute:s}=e,c=(0,a.useRouter)(),{strings:{general:{otp_section:{receive_otp_phone_text:d,receive_otp_sms_text:m,receive_otp_email_text:p},manulife:{onboarding:{mobile_verification_page:{code_verified_text:u}}}},auth_page:{login_otp_page:h},onboarding:{mobile_verification_page:{otp_section:{resend_otp_cta:x,get_voice_otp_cta:b}}},forms:{labels:{mobile_verification_section:{otp_code_text:_,placeholder_text:j}}}}}=(0,g.Ym)(),[y,E]=l.useState(""),[C,k]=l.useState(!1),[T,w]=l.useState(!1),[I,z]=l.useState("SMS"),[B,S]=l.useState(eq);(0,l.useEffect)(()=>{r?t(r,I):c.push(f.S3J)},[r,I]),(0,l.useEffect)(()=>{r&&4===y.length&&n(r,y,s,T?"CALL":I)},[y,r]),(0,l.useEffect)(()=>{(0,v.Ay)(eG.pageLoad)},[]);let Y="SMS"===I,O=C?(0,i.jsx)(i.Fragment,{children:"MANUAL"===e.loginMethod?(0,i.jsx)(A.EY,{color:"B.3",variant:"caption1",children:(0,i.jsx)(g.In,{components:{CTA:(0,i.jsx)(eV,{cp:!0,color:"B.7",onClick:()=>{let e="SMS"===I?"EMAIL":"SMS";z(e),w(!1),(e=>{let n="CALL"===e,i="EMAIL"===e;(0,v.Ay)(eG.resendBtn),C&&r&&(t(r,e,{showConfirmationAlert:!0,confirmationIsNotification:!0,confirmationMessage:n?d:i?p:m,confirmationIcon:!1,confirmationTheme:"light"}),k(!1),w(n)),S(eq())})(e)}})},str:Y?h.use_sms_text:h.use_email_text})}):null}):(0,i.jsx)(A.M4,{onTimeUp:()=>k(!0),theme:"white",time:e.resendWaitTime,type:"linear"});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(A.az,{px:{_:6,md:0},py:{_:2,md:20},children:[(0,i.jsx)(A.EY,{color:"B.1",mb:2,textAlign:{_:"left",md:"center"},variant:"body1",children:h.enter_otp_text}),(0,i.jsx)(A.EY,{color:"B.3",mb:10,textAlign:{_:"left",md:"center"},variant:"body2",children:Y?(0,g.GW)(h.mobile_text,{phone:e.phone||""}):(0,g.GW)(h.email_text,{email:e.email||""})}),(0,i.jsx)(A.az,{mb:3,width:"100%",children:(0,i.jsx)(A.pd,{autoFocus:!0,error:!!e.errorMessage,errorText:e.errorMessage,label:_,placeholder:j,t
1ype:"number",value:y,onChange:e=>{E(e.target.value),4===e.target.value.length&&e.target.blur()}})}),(0,i.jsxs)(A.pT,{alignItems:"center",justifyContent:"center",mb:5,children:[(0,i.jsx)(A.$n,{disabled:!C,fillType:"text",size:"sm",children:x}),o&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A.az,{borderColor:"N.4",borderRight:"1px solid",height:"20px"}),(0,i.jsx)(A.$n,{disabled:!C,fillType:"text",size:"sm",children:b})]})]}),(0,i.jsx)(A.pT,{justifyContent:"center",children:O})]},B),e.otpSuccess&&(0,i.jsx)(A.uB,{children:(0,i.jsx)(A.az,{textAlign:"center",width:"100%",children:(0,i.jsx)(A.EY,{color:"B.1",variant:"subtitle1",children:u})})})]})});var eQ=n(46573),eJ=n(5389),eK=n(38143);let eX=(e,t)=>[{label:t.legal_name.label,placeholder:t.legal_name.placeholder,name:"name",type:"text",styles:{gridRow:"1",gridColumn:{_:"1",md:"1 / 2"}}},{label:t.gender.label,placeholder:t.gender.placeholder,name:"gender",type:"select",options:[{label:t.gender.values.male,value:"MALE"},{label:t.gender.values.female,value:"FEMALE"}],styles:{gridRow:"2",gridColumn:{_:"1",md:"1 / 2"}}},{label:t.dob.label,placeholder:t.dob.placeholder,name:"dob",type:"date",styles:{gridRow:{_:"3",md:"2"},gridColumn:{_:"1",md:"2 / 2"}}},{label:t.education_level.label,placeholder:t.education_level.placeholder,name:"manulifeEducationalLevel",type:"select",options:[{label:t.education_level.values.primary_school,value:"PRIMARY_OR_BELOW"},{label:t.education_level.values.secondary_school,value:"SECONDARY"},{label:t.education_level.values.university,value:"UNIVERSITY_OR_ABOVE"}],styles:{gridRow:{_:"4",md:"3"},gridColumn:{_:"1",md:"1 / 2"}}}];var eZ=n(29512);let e0=(e,t,n,l)=>(0,i.jsxs)(A.pT,{alignItems:"center",justifyContent:"space-between",pl:null!=n?n:3,children:[(0,i.jsx)(A.EY,{color:"#263159",variant:"label6",children:e}),t&&(0,i.jsx)(A.lG,{onInfoIconClick:l,size:"16px",children:(0,i.jsx)(A.EY,{color:"B.1",variant:"body2",children:t})})]}),e1=(e,t)=>{var n,l,a,o,s,c,d,m,p;switch(e.type){case"text":return(0,i.jsx)(A.az,{...e.styles,children:(0,i.jsx)(r.D0,{component:eZ.Ay,disabled:null==(n=t[e.name])?void 0:n.disabled,id:e.name,label:e.label,name:e.name,placeholder:e.placeholder})});case"date":return(0,i.jsx)(A.az,{...e.styles,children:(0,i.jsx)(r.D0,{calendarValueFormat:"dd/MM/yyyy",component:eZ.vM,disabled:null==(l=t[e.name])?void 0:l.disabled,icon:(null==(a=t[e.name])?void 0:a.disabled)?(0,i.jsx)(i.Fragment,{}):null,id:e.name,isManualAllowed:!0,label:e.label,maxDate:new Date,name:e.name,onBlur:t[e.name].onBlur,onChange:t[e.name].onChange,placeholder:e.placeholder,shouldAutoSlash:!0,theme:"white"})});case"select":if(t.hideField)return(0,i.jsx)(A.az,{...e.styles});return(0,i.jsxs)(A.az,{...e.styles,children:[e0(e.label,e.tooltip,void 0,null==(o=t[e.name])?void 0:o.onInfoClick),(0,i.jsx)(A.az,{...e.fieldStyles,children:(0,i.jsx)(r.D0,{component:eZ.l6,disabled:null==(s=t[e.name])?void 0:s.disabled,icon:(null==(c=t[e.name])?void 0:c.disabled)?(0,i.jsx)(i.Fragment,{}):null,id:e.name,name:e.name,options:e.options,placeholder:e.placeholder})})]});case"selectWithSearch":if(t.hideField)return(0,i.jsx)(A.az,{...e.styles});return(0,i.jsx)(A.az,{...e.styles,children:(0,i.jsx)(r.D0,{component:eZ.fd,disabled:null==(d=t[e.name])?void 0:d.disabled,dropDownWidth:"100%",icon:(null==(m=t[e.name])?void 0:m.disabled)?(0,i.jsx)(i.Fragment,{}):null,id:e.name,label:e.label,name:e.name,options:e.options,placeholder:e.placeholder,renderValue:t=>{var n;return(null==(n=e.options.find(e=>e.value===t))?void 0:n.label)||t}})});case"boolean":return(0,i.jsx)(A.az,{...e.styles,children:(0,i.jsx)(A.Kw,{disabled:null==(p=t[e.name])?void 0:p.disabled,onChange:t[e.name].onChange,options:e.options,question:e0(e.label,null,0),selected:t[e.name].value,theme:"white"})})}},e2=e=>null==e,e4=e=>""===e||e2(e),e3=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={};return Object.keys(t).forEach(l=>{if("object"==typeof t[l]&&null!==t[l]){var a;i[l]=e3(e,t[l],null!=(a=null==n?void 0:n[l])?a:void 0)}else e.includes(l)?e.includes(l)&&e4(n[l])&&(i[l]=t[l]):i[l]=t[l]}),Object.keys(i).length?i:null},e6=e=>{let{children:t,ctaText:n,onCtaClick:l,isCtaDisabled:a}=e,{strings:{general:{next_cta:r}}}=(0,g.Ym)();return(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.az,{bg:{_:"none",md:"W.2"},border:{_:"none",md:"1px solid"},borderColor:{_:"G.1",md:"B.5"},borderRadius:2,maxWidth:"800px",mb:10,mx:"auto",py:{_:6,md:10},px:{_:6,md:20},pb:{_:24,md:10},children:t}),(0,i.jsx)(A.az,{bg:{_:"W.2",md:"G.1"},bottom:0,boxShadow:{_:"0px -2px 8px 0px #00000012",md:"none"},mb:{_:0,md:10},position:{_:"fixed",md:"static"},py:{_:4,md:0}
1,width:"100%",children:(0,i.jsx)(A.$n,{disabled:a,maxWidth:"312px",onClick:l,mx:"auto",width:"100%",children:n||r})})]})},e5=(0,o.Ay)(e=>(0,i.jsx)(A.A,{...e})).withConfig({componentId:"sc-93817089-0"})(["color:",";&:hover{color:",";}"],(0,s.y)("colors.B.7"),(0,s.y)("colors.B.7")),e8=e=>{let{onClose:t}=e,{strings:{general:{manulife:{onboarding:{identity_information_page:n}}}}}=(0,g.Ym)();return(0,i.jsxs)(A.aF,{showCloseIcon:!0,onClose:t,title:n.school_knockout_modal.caption,children:[(0,i.jsx)(A.az,{mb:6,children:(0,i.jsx)(A.EY,{color:"B.1",variant:"body2",children:n.school_knockout_modal.body_text})}),(0,i.jsx)(A.EY,{color:"B.1",variant:"subtitle4",children:(0,i.jsx)(g.In,{str:n.school_knockout_modal.contact_text,values:{email:Q.rX},components:{Email:(0,i.jsx)(e5,{href:"mailto:".concat(Q.rX)})}})})]})},e9={pageLoad:(0,L.lv)(),nextBtn:(0,L.$f)()},e7=e=>{let{nextUrl:t,currentStep:n,subTitle:o}=e,s=(0,c.wA)(),{strings:{general:{manulife:{onboarding:{identity_information_page:d}}},errors:p}}=(0,g.Ym)(),h=(0,c.d4)(u.$u.getUserDetails),_=(0,c.d4)(u.$u.getManulifeBlockedFields),{query:f}=(0,a.useRouter)(),[j,y]=l.useState(!1),[E,C]=l.useState({name:"",dob:"",gender:"",manulifeEducationalLevel:""}),k=l.useMemo(()=>eX({},d.form),[]);return l.useEffect(()=>{if(h){let e={name:h.name,gender:h.gender,manulifeEducationalLevel:h.manulifeEducationalLevel},t=(0,eJ.SS)(h.date),n=(0,eJ.SS)(eQ.K.indexOf(h.month)+1);e.dob="".concat(t,"/").concat(n,"/").concat(h.year),C(e)}},[h]),l.useEffect(()=>{(0,v.Ay)(e9.pageLoad)},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.l1,{enableReinitialize:!0,validateOnMount:!0,initialValues:E,onSubmit:e=>{if("PRIMARY_OR_BELOW"===e.manulifeEducationalLevel)y(!0);else{let{dob:i}=e,[l,a,r]=i.split("/"),o={...e,date:l,month:eQ.K[a-1],year:r};delete o.dob;let c=_.includes("dob")?[..._,"date","month","year"]:_;s(m.Xn.updatePersonalInformation({userDetails:e3(c,o,h),nextUrl:t,currentStep:n})),(0,v.Ay)(e9.nextBtn)}},validationSchema:(e=>x.Ik().shape({name:x.Yj().trim().required(e.required_caption).min(4,e.too_short_text).max(50,e.too_long_text),dob:x.Yj().required(e.required_caption).matches(eK.B6,{excludeEmptyString:!0,message:e.dob.date_format_text}).test("dob-validation",e.dob.invalid_date_text,e=>{if(!e)return!0;let{valid:t,error:n}=b.bD(e);return!!t||"INVALID_DATE"!==n}).test("age-limit-validation",e.dob.age_limit_text,e=>{if(!e)return!0;let{valid:t,error:n}=b.bD(e);return!!t||"AGE_LIMIT"!==n}),gender:x.Yj().required(e.required_caption),manulifeEducationalLevel:x.Yj().required(e.required_caption)}))(p),children:e=>(0,i.jsxs)(e6,{isCtaDisabled:!e.isValid,onCtaClick:e.handleSubmit,children:[(0,i.jsx)(A.az,{mb:6,children:(0,i.jsx)(A.EY,{color:"B.1",textTransform:"uppercase",variant:"label2",children:o})}),(0,i.jsx)(A.az,{columnGap:{_:0,md:"48px"},display:"grid",gridTemplateColumns:{_:"1fr",md:"1fr 1fr"},rowGap:"24px",children:k.map(t=>e1(t,{dob:{disabled:_.includes("dob")&&(null==h?void 0:h.date),onChange:t=>((e,t)=>{t.setFieldValue("dob",e),""===t.values.dob&&eK.B6.test(e)&&setTimeout(()=>t.setFieldTouched("dob",!0))})(t,e),onBlur:()=>e.setFieldTouched("dob",!0)},name:{disabled:_.includes("name")&&(null==h?void 0:h.name)},gender:{disabled:_.includes("gender")&&(null==h?void 0:h.gender)}}))})]})}),j&&(0,i.jsx)(e8,{onClose:()=>y(!1)})]})},te="312px",tt=(e,t)=>[{label:t.annual_income.label,placeholder:t.annual_income.placeholder,name:"annualIncome",type:"select",options:[{label:t.annual_income.values.less_than_180k,value:"Less than 180,000"},{label:t.annual_income.values.from_180k_to_360k,value:"180,000 to 360,000"},{label:t.annual_income.values.from_360k_to_600k,value:"360,001 to 600,000"},{label:t.annual_income.values.from_600k_to_1200k,value:"600,001 to 1,200,000"},{label:t.annual_income.values.from_1200k_to_1500k,value:"1,200,001 to 1,500,000"},{label:t.annual_income.values.more_than_1500k,value:"More than 1,500,000"}],styles:{maxWidth:{_:"auto",md:"70%"}},fieldStyles:{maxWidth:{_:"auto",md:te}}},{label:t.saved_income.label,placeholder:t.saved_income.placeholder,name:"savedIncomePercentage",type:"select",options:[{value:"LESS_THAN_AND_EQUAL_FIFTEEN",label:(0,g.GW)(t.saved_income.values.less_than_or_equal_variable_text,{value:"15%"})},{value:"FIFTEEN_TO_THIRTY_FIVE",label:(0,g.GW)(t.saved_income.values.to_from_variable_text,{from:"15%",to:"35%"})},{value:"MORE_THAN_THIRTY_FIVE",label:(0,g.GW)(t.saved_income.values.more_than_variable_text,{value:"35%"})}],styles:{maxWidth:{_:"auto",md:"70%"}},fieldStyles:{maxWidth:{_:"auto",md:te}}},{label:t.net_liquid_assets.label,placeholder:t.net_liquid_assets.placeholder,name:"netLiquidAsset",type:"select",tooltip:t.net_liquid_assets.tooltip,options:[{label:t.net_liquid_assets.values.less_than_300k,value:"LESS_THAN_300000"},{label:t.net_liquid_assets.values.from_300k_to_600k,value:"IS_BETWEEN_300000_TO_600000"},{label:t.net_liquid_assets.values.from_600k_to_1500k,value:"IS_BETWEEN_600001_TO_1500000"},{label:t.net_liquid_assets.values.from_1500k_to_3000k,value:"IS_BETWEEN_1500001_TO_3000000"},{label:t.net_liquid_assets.values.from_3000K_to_6000k,value:"IS_BETWEEN_3000001_TO_6000000"},{label:t.net_liquid_assets.values.more_than_6000k,value:"GREATER_THAN_6000000"}],styles:{maxWidth:{_:"auto",md:te}},fieldStyles:{maxWidth:{_:"auto",md:te}}},{label:t.investment_horizon.label,placeholder:t.investment_horizon.placeholder,name:"investmentTimeHorizon",type:"select",options:[{label:t.investment_horizon.values.less_than_one_year_text,value:"LESS_THAN_ONE"},{label:t.investment_horizon.values.one_to_three_years_text,value:"ONE_TO_THREE"},{label:t.investment_horizon.values.three_to_five_years_text,value:"THREE_TO_FIVE"},{label:t.investment_horizon.values.five_to_ten_years_text,value:"FIVE_TO_TEN"},{label:t.investment_horizon.values.more_than_ten_years_text,value:"MORE_THAN_TEN"}],styles:{maxWidth:{_:"auto",md:"70%"}},fieldStyles:{maxWidth:{_:"auto",md:te}}},{name:"ifInvestedMoreThanHalfOfAssets",label:t.more_than_half_assets.label,type:"boolean",options:[{label:t.more_than_half_assets.values.yes_text,value:"yes"},{label:t.more_than_half_assets.values.no_text,value:"no"}],styles:{maxWidth:{_:"auto",md:"70%"},pl:3},fieldStyles:{maxWidth:{_:"auto",md:te}}}],tn={pageLoad:(0,L.Oq)(),toottip:(0,L.sQ)(),nextBtn:(0,L.Ge)()},ti=e=>{let{currentStep:t,nextUrl:n,subTitle:a}=e,o=(0,c.wA)(),{strings:{errors:s,general:{manulife:{onboarding:{financial_information_page:d}}}}}=(0,g.Ym)(),p=(0,c.d4)(u.$u.getUserDetails),h=(0,c.d4)(u.$u.getManulifeBlockedFields),b=(0,c.d4)(u.$u.getFinancialAssessmentData),[_,f]=l.useState({netLiquidAsset:"",savedIncomePercentage:"",annualIncome:"",investmentTimeHorizon:"",ifInvestedMoreThanHalfOfAssets:""});l.useEffect(()=>{if(p||b){var e,t;f({netLiquidAsset:(null==p?void 0:p.netLiquidAsset)||"",savedIncomePercentage:(null==b?void 0:b.savedIncomePercentage)||"",annualIncome:(null==p?void 0:p.annualIncome)||"",investmentTimeHorizon:(null==b?void 0:b.investmentTimeHorizon)||"",ifInvestedMoreThanHalfOfAssets:null!=(t=null==b||null==(e=b.investmentObjective)?void 0:e.ifInvestedMoreThanHalfOfAssets)?t:""})}},[p,b]),l.useEffect(()=>{(0,v.Ay)(tn.pageLoad)},[]);let j=l.useMemo(()=>tt({},d.form),[]);return(0,i.jsx)(r.l1,{enableReinitialize:!0,validateOnMount:!0,initialValues:_,onSubmit:e=>
1{let i={financialAssessment:{savedIncomePercentage:e.savedIncomePercentage,investmentTimeHorizon:e.investmentTimeHorizon,investmentObjective:{ifInvestedMoreThanHalfOfAssets:e.ifInvestedMoreThanHalfOfAssets,goal:"OTHER"}},userDetails:{netLiquidAsset:e.netLiquidAsset,annualIncome:e.annualIncome},currentStep:t};h.length&&(i.userDetails=e3(h,i.userDetails,p),i.financialAssessment=e3(h,i.financialAssessment,b),Object.values(i.financialAssessment).every(e2)&&delete i.financialAssessment),o(m.Xn.updateFinancialInformation({payload:i,nextUrl:n})),(0,v.Ay)(tn.nextBtn)},validationSchema:(e=>x.Ik().shape({annualIncome:x.Yj().required(e.required_caption),savedIncomePercentage:x.Yj().required(e.required_caption),netLiquidAsset:x.Yj().required(e.required_caption),investmentTimeHorizon:x.Yj().required(e.required_caption),ifInvestedMoreThanHalfOfAssets:x.zM().required(e.required_caption).oneOf([!0,!1])}))(s),children:e=>(0,i.jsxs)(e6,{isCtaDisabled:!e.isValid,onCtaClick:e.handleSubmit,children:[(0,i.jsx)(A.az,{mb:6,children:(0,i.jsx)(A.EY,{color:"B.1",textTransform:"uppercase",variant:"label2",children:a})}),(0,i.jsx)(A.az,{columnGap:{_:0,md:"48px"},display:"grid",gridTemplateColumns:"auto",rowGap:"24px",children:j.map(t=>{var n;return e1(t,{ifInvestedMoreThanHalfOfAssets:{value:(e=>"boolean"==typeof e?e?"yes":"no":e)(e.values[t.name]),onChange:t=>((e,t)=>{let{value:n}=e.target;t.setFieldValue("ifInvestedMoreThanHalfOfAssets","yes"===n)})(t,e),disabled:h.includes("ifInvestedMoreThanHalfOfAssets")&&!e4(null==b||null==(n=b.investmentObjective)?void 0:n.ifInvestedMoreThanHalfOfAssets)},annualIncome:{disabled:h.includes("annualIncome")&&(null==p?void 0:p.annualIncome)},netLiquidAsset:{onInfoClick:()=>(0,v.Ay)(tn.toottip)},investmentTimeHorizon:{disabled:h.includes("investmentTimeHorizon")&&(null==b?void 0:b.investmentTimeHorizon)},savedIncomePercentage:{disabled:h.includes("savedIncomePercentage")&&(null==b?void 0:b.savedIncomePercentage)}})})})]})})};var tl=n(87613);let ta=e=>{let{nextUrl:t}=e,n=(0,c.d4)(u.$u.getMobileDetails),l=(0,a.useRouter)(),{strings:{onboarding:{mobile_verification_page:{mobile_otp_success_section:{mobile_verified_successfully_text:r}}}}}=(0,g.Ym)();return(0,eB.o)(),(0,i.jsx)(e6,{onCtaClick:()=>l.push(t),children:(0,i.jsxs)(A.pT,{alignItems:"center",flexDirection:"column",justifyContent:"center",mt:20,children:[(0,i.jsx)(A._V,{alt:"success",height:"75px",lazyLoad:!1,src:tl.A,width:"84px"}),(0,i.jsx)(A.EY,{color:"B.1",textAlign:"center",variant:"body1",children:(0,i.jsx)(g.In,{str:r,components:{captionComponent:(0,i.jsx)(A.az,{mt:10}),mobileNumComponent:(0,i.jsx)(A.EY,{variant:"label1"}),brElement:(0,i.jsx)("br",{})},values:{mobileNum:"+".concat((null==n?void 0:n.mobileCountryCode)||""," (").concat((null==n?void 0:n.mobileNumber)||"",")")}})})]})})},tr=e=>[{label:e.very_high.label,description:e.very_high.description,value:"VERY_HIGH"},{label:e.high.label,description:e.high.description,value:"HIGH"},{label:e.moderate.label,description:e.moderate.description,value:"BALANCED"},{label:e.low.label,description:e.low.description,value:"LOW"}],to=(0,o.Ay)(e=>(0,i.jsx)(A.sx,{...e})).withConfig({componentId:"sc-2b5e99ad-0"})(["& .radio__option-container--column{padding-right:0;}"]),ts={pageLoad:(0,L.DS)(),nextBtn:(0,L.N8)()},tc=e=>{let{currentStep:t,nextUrl:n,subTitle:a}=e,r=(0,c.wA)(),{strings:{general:{manulife:{onboarding:{risk_tolerance_page:o}}}}}=(0,g.Ym)(),s=(0,c.d4)(u.$u.getFinancialAssessmentData),d=(0,c.d4)(u.$u.getManulifeBlockedFields),p=!!(d.includes("riskPreference")&&s.riskPreference),[h,x]=l.useState("");l.useEffect(()=>{(null==s?void 0:s.riskPreference)&&x(s.riskPreference)},[s]),l.useEffect(()=>{(0,v.Ay)(ts.pageLoad)},[]);let b=tr(o.options);return(0,i.jsxs)(e6,{isCtaDisabled:!h,onCtaClick:()=>{r(m.Wx.clearManulifeInfo());let e={financialAssessment:{riskPreference:h},currentStep:t};d.length&&(e.financialAssessment=e3(d,e.financialAssessment,s),(null===e.financialAssessment||Object.values(e.financialAssessment).every(e4))&&delete e.financialAssessment),(0,v.Ay)(ts.nextBtn),r(m.Xn.updateFinancialInformation({payload:e,nextUrl:n}))},children:[(0,i.jsxs)(A.az,{mb:6,children:[(0,i.jsx)(A.az,{mb:1,children:(0,i.jsx)(A.EY,{color:"B.1",textTransform:"uppercase",variant:"label2",children:a})}),(0,i.jsx)(A.EY,{color:"B.3",variant:"caption1",children:o.description_text})]}),(0,i.jsx)(i.Fragment,{children:b.map(e=>(0,i.jsx)(A.az,{cp:!0,borderBottom:"1px solid",borderColor:"N.4",onClick:()=>{var t;return t=e.value,void(!p&&x(t))},children:(0,i.jsx)(to,{column:!0,disabled:p,selected:h,theme:"white",options:[{label:(0,i.jsx)(A.az,{children:(0,i.jsx)(A.EY,{as:"span",color:p?"B.4":"B.1",variant:"mlWide",children:e.label})}),subtitle:(0,i.jsx)(A.EY,{as:"span",color:p?"B.4":"B.3",variant:"caption1",children:e.description}),value:e.value}]})},e.value))})]})};var td=n(7876);let tm={employed:"Employed",selfEmployed:"Self employed",notEmployed:"Not employed",retired:"Retired"};var tp=n(26654);let tu={pageLoad:(0,L.iB)(),nextClick:(0,L.P9)(),uploadClick:L.h,previewClick:L.w8},th=e=>{let{strings:{general:{manulife:{onboarding:{upload_doc_page:t}}},errors:n}}=(0,g.Ym)(),a=(0,eM.Kb)(),o=(0,c.wA)(),s=(0,c.d4)(u.$u.getUserDetails),d=(0,c.d4)(u.$u.getManulifeBlockedFields),[p,h]=l.useState({});l.useEffect(()=>{if(s){var e;h({employmentStatus:s.employmentStatus,employmentSector:null!=(e=s.employmentSector)?e:""})}},[s]),l.useEffect(()=>{(0,v.Ay)(tu.pageLoad)},[]);let[b,_]=(0,l.useState)({manulifeIdentity:e.documents&&e.documents.identity?e.documents.identity:[]}),j=l.useMemo(()=>((e,t)=>{var n;return[{label:t.employment_status_text,placeholder:t.employment_status_text,name:"employmentStatus",type:"select",options:[{value:tm.employed,label:t.employed_text},{value:tm.selfEmployed,label:t.self_employed_text},{value:tm.notEmployed,label:t.not_employed_text},{value:tm.retired,label:t.retired_text}],styles:{flex:1,marginBottom:{_:6,md:0},marginRight:{_:0,md:6}}},{label:t.employment_sector_text,placeholder:t.employment_sector_text,name:"employmentSector",type:"selectWithSearch",isSearch:!0,options:null==(n=e.employmentSectorOptions)?void 0:n.map(e=>({...e,searchText:e.label})),styles:{flex:1}}]})(a,t.form),[t.form,a]),y=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o((0,td.getS3SigningUrl)(...t,!0))},E=(e,t,n)=>{let l="FRONT",a=[],r="";return"identity_front"===e?(a=b.manulifeIdentity.filter(e=>"FRONT"===e.side),r="manulifeIdentity"):"identity_back"===e?(a=b.manulifeIdentity.filter(e=>"BACK"===e.side),r="manulifeIdentity",l="BACK"):(a=b[e],r=e),(0,i.jsx)(tp.A,{addDoc:((e,t,n)=>i=>{i.side=t,i.type=n,(0,v.Ay)(tu.uploadClick("FRONT"===t?"id_front":"id_back")),_({...b,[e]:[...b[e],i]})})(r,l,t),deleteDoc:(e=>t=>{_({...b,[e]:[...b[e].filter(e=>e.url!==t.url),{...t}]})})(r),docList:a.filter(e=>!e.deleted),getS3SignedUrl:y,header:n,maxFilesAllowed:1,theme:"white"})};return(0,i.jsx)(r.l1,{enableReinitialize:!0,initialValues:p,onSubmit:t=>{let{employmentStatus:n,employmentSector:i}=t,l={documents:b,userDetails:{employmentStatus:n},currentStep:e.currentStep,onSuccessCb:()=>
1o(m.zV.getUserInfo({nextUrl:f.sJi.RESULT}))};(n===tm.selfEmployed||n===tm.employed)&&(l.userDetails.employmentSector=i),d.length&&(l.userDetails=e3(d,l.userDetails,s),(null===l.userDetails||Object.values(l.userDetails).every(e4))&&delete l.userDetails),(0,v.Ay)(tu.nextClick),o(m.Xn.updateManulifeKyc(l))},validateOnMount:!0,validationSchema:(e=>x.Ik().shape({employmentStatus:x.Yj().required(e.required_caption),employmentSector:x.Yj().when("employmentStatus",(t,n)=>t===tm.employed||t===tm.selfEmployed?n.required(e.required_caption):n)}))(n),children:n=>{let{isValid:l,values:a,handleSubmit:r}=n,o=a.employmentStatus,c=o===tm.employed||o===tm.selfEmployed;return(0,i.jsx)(e6,{onCtaClick:r,isCtaDisabled:!l||!(b.manulifeIdentity.filter(e=>!e.deleted).length>1),children:(0,i.jsxs)(A.pT,{flexDirection:{_:"column"},children:[(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{capitalize:!0,variant:"label2",children:e.subTitle}),(0,i.jsxs)(A.pT,{flexDirection:{_:"column-reverse",md:"column"},mt:{_:6,md:0},children:[(0,i.jsxs)(A.pT,{alignItems:{md:"center"},flexDirection:"column",justifyContent:"center",mb:{_:0,md:8},mt:{_:4,md:6},children:[(0,i.jsx)(A.EY,{color:"B.3",variant:{_:"body3",md:"body1"},children:t.supported_files_text}),(0,i.jsx)(A.EY,{color:"B.3",variant:{_:"body3",md:"body1"},children:t.max_file_size_text})]}),(0,i.jsxs)(A.az,{columnGap:{_:0,md:28},display:"grid",gridTemplateColumns:{_:"1fr",md:"48% 48%"},rowGap:{_:16,md:0},children:[(0,i.jsx)(A.az,{children:E("identity_front","HKID",t.form.front_id_text)}),(0,i.jsx)(A.az,{children:E("identity_back","HKID",t.form.back_id_text)})]})]})]}),(0,i.jsxs)(A.az,{mt:{_:8,md:10},children:[(0,i.jsx)(A.EY,{capitalize:!0,variant:"label2",children:t.employment_text}),(0,i.jsx)(A.pT,{flexDirection:{_:"column",md:"row"},mt:{_:6},children:j.map(e=>{let t="employmentSector"===e.name&&!c;return e1(e,{hideField:t,employmentStatus:{disabled:d.includes("employmentStatus")&&(null==s?void 0:s.employmentStatus)},employmentSector:{disabled:d.includes("employmentSector")&&(null==s?void 0:s.employmentSector)}})})})]})]})})}})},tx=e=>{let{userDetails:t,strings:n}=e,{form:{legal_name:l,gender:a,dob:r,education_level:o}}=n,s=eX(null,n.form),c=(e,t)=>{let n=s.find(t=>t.name===e).options.find(e=>e.value===t);return null==n?void 0:n.label};return(0,i.jsxs)(A.az,{display:"grid",gridRowGap:{_:4,md:6},gridTemplateColumns:"1fr",mt:{_:4,md:6},children:[(0,i.jsx)(A.az,{display:"grid",gridTemplateColumns:"1fr",children:(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:l.label}),(0,i.jsx)(A.EY,{variant:"body2",children:t.name})]})}),(0,i.jsxs)(A.az,{display:"grid",gridTemplateColumns:"1fr 1fr",children:[(0,i.jsx)(A.az,{children:(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:a.label}),(0,i.jsx)(A.EY,{variant:"body2",children:c("gender",t.gender)})]})}),(0,i.jsx)(A.az,{children:(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:r.label}),(0,i.jsx)(A.EY,{variant:"body2",children:(e=>new Date("".concat(e.date," ").concat(e.month," ").concat(e.year)).toLocaleDateString())(t)})]})})]}),(0,i.jsx)(A.az,{display:"grid",gridTemplateColumns:"1fr",children:(0,i.jsx)(A.az,{children:(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:o.label}),(0,i.jsx)(A.EY,{variant:"body2",children:c("manulifeEducationalLevel",t.manulifeEducationalLevel)})]})})})]})},tb=e=>{let{financialAssessment:t,userDetails:n,strings:l}=e,{yes_text:a,no_text:r,form:{annual_income:o,net_liquid_assets:s,saved_income:c,investment_horizon:d,more_than_half_assets:m}}=l,p=tt(null,l.form),u=(e,t)=>{let n=p.find(t=>t.name===e).options.find(e=>e.value===t);return null==n?void 0:n.label};return(0,i.jsxs)(A.az,{display:"grid",gridRowGap:{_:4,md:6},gridTemplateColumns:"1fr",mt:{_:4,md:6},children:[(0,i.jsxs)(A.az,{display:"grid",gridTemplateColumns:"1fr 1fr",children:[(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:o.label}),(0,i.jsx)(A.EY,{variant:"body2",children:u("annualIncome",n.annualIncome)})]}),(0,i.jsx)(A.az,{children:(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:s.label}),(0,i.jsx)(A.EY,{variant:"body2",children:u("netLiquidAsset",n.net
1LiquidAsset)})]})})]}),(0,i.jsx)(A.az,{display:"grid",gridTemplateColumns:"1fr",children:(0,i.jsx)(A.az,{children:(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:c.label}),(0,i.jsx)(A.EY,{variant:"body2",children:u("savedIncomePercentage",t.savedIncomePercentage)})]})})}),(0,i.jsx)(A.az,{display:"grid",gridTemplateColumns:"1fr",children:(0,i.jsx)(A.az,{children:(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:d.label}),(0,i.jsx)(A.EY,{variant:"body2",children:u("investmentTimeHorizon",t.investmentTimeHorizon)})]})})}),(0,i.jsx)(A.az,{display:"grid",gridTemplateColumns:"1fr",children:(0,i.jsx)(A.az,{children:(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:m.label}),(0,i.jsx)(A.EY,{variant:"body2",children:u("ifInvestedMoreThanHalfOfAssets",t.investmentObjective.ifInvestedMoreThanHalfOfAssets?"yes":"no")})]})})})]})};var tg=n(5045);let t_={src:"/_next/static/media/minus.89ebd443.svg",height:2,width:14,blurWidth:0,blurHeight:0},tf=(0,o.Ay)(A.az).withConfig({componentId:"sc-b08b9647-0"})(["transition:height 1s ease;"]),tj=e=>{let{pos:t,details:n,containerProps:a}=e,r=(0,l.useRef)(null),o=(0,l.useRef)(null),s=(0,tg.A)(r,o,0!==t);return(0,i.jsxs)(A.az,{borderRadius:4,mb:4,px:4,py:{_:4,md:6},...a,children:[(0,i.jsxs)(A.pT,{cp:!0,alignItems:"center",id:n.id,justifyContent:"space-between",pr:1,ref:r,children:[(0,i.jsx)(A.EY,{capitalize:!0,as:"h3",className:"details-title",color:"B.1",mb:0,variant:{md:"label3",_:"label3"},children:n.title}),(0,i.jsx)(A.az,{color:"B.7",ml:4,children:s?(0,i.jsx)(A.C0,{height:"16px",name:"plus",strokeWidth:2,width:"16px"}):(0,i.jsx)(A._V,{alt:"Icon",src:t_})})]}),(0,i.jsx)(tf,{className:"details-answer",mt:s?0:{_:2,md:3},overflow:"hidden",ref:o,width:{_:"100%",md:"89%"},children:n.body})]},t)},tv=e=>{var t;let{financialAssessment:n,userDetails:l,userEmail:a,mobileDetails:r}=e,{strings:{general:{yes_text:o,no_text:s,manulife:{onboarding:{contact_details:c,identity_information_page:d,financial_information_page:m,risk_tolerance_page:p}}}}}=(0,g.Ym)(),u=tr(p.options),{label:h,description:x}=(t=n.riskPreference,u.find(e=>e.value===t));return(0,i.jsxs)(A.pT,{flexDirection:"column",gap:{_:3,md:5},mt:{_:3,md:5},children:[(0,i.jsxs)(A.az,{bg:"W.2",p:{_:4,md:6},children:[(0,i.jsx)(A.EY,{capitalize:!0,variant:"label3",children:c.caption}),(0,i.jsxs)(A.az,{mt:{_:4,md:6},children:[(0,i.jsxs)(A.az,{borderBottom:"1px solid #EFF0F8",pb:3,children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:c.email_caption}),(0,i.jsx)(A.EY,{variant:"body3",children:a})]}),(0,i.jsxs)(A.az,{pt:3,children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:c.mobile_number_caption}),(0,i.jsxs)(A.EY,{variant:"body3",children:["+",r.mobileCountryCode,"-",r.mobileNumber]})]})]})]}),(0,i.jsxs)(A.az,{bg:"W.2",px:{_:4,md:6},children:[(0,i.jsx)(tj,{pos:1,containerProps:{borderBottom:"1px solid #EFF0F8",px:0,mb:0},details:{id:1,title:d.caption,body:(0,i.jsx)(tx,{strings:d,userDetails:l})}}),(0,i.jsx)(tj,{pos:2,containerProps:{borderBottom:"1px solid #EFF0F8",px:0,mb:0},details:{id:1,title:m.caption,body:(0,i.jsx)(tb,{financialAssessment:n,strings:{yes_text:o,no_text:s,...m},userDetails:l})}}),(0,i.jsx)(tj,{pos:3,containerProps:{px:0,mb:0},details:{id:1,title:p.caption,body:(0,i.jsxs)(A.az,{mt:{_:4,md:6},children:[(0,i.jsx)(A.EY,{variant:"body2",children:h}),(0,i.jsx)(A.EY,{color:"B.3",variant:"caption1",children:x})]})}})]})]})},ty=e=>{var t;let{financialAssessment:n,userDetails:l,userEmail:a,mobileDetails:r}=e,{strings:{general:{yes_text:o,no_text:s,manulife:{onboarding:{contact_details:c,identity_information_page:d,financial_information_page:m,risk_tolerance_page:p}}}}}=(0,g.Ym)(),u=tr(p.options),{label:h,description:x}=(t=n.riskPreference,u.find(e=>e.value===t));return(0,i.jsx)(A.pT,{bg:"W.2",border:"1px solid",borderColor:"B.5",borderRadius:4,flexDirection:"column",gap:{_:3,md:5},mt:{_:3,md:5},px:20,py:10,children:(0,i.jsxs)(A.pT,{flexDirection:"column",gap:8,children:[(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{capitalize:!0,variant:"label3",children:c.caption}),(0,i.jsxs)(A.az,{display:"grid",gridTemplateColumns:"1fr 1fr",mt:{_:4,md:6},children:[(0,i.jsxs)(A.az,{pb:3,children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:c.email_caption}),(0,i.jsx)(A.EY,{variant:"body3",children:a})]}),(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{as:"p",color:"B.3",mb:1,variant:"caption1",children:c.mobile_number_caption}),(0,i.jsxs)(A.EY,{variant:"body3",children:["+",r.mobileCountryCode,"-",r.mobileNumber]})]})]})]}),(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{capitalize:!0,variant:"label3",children:d.caption}),(0,i.jsx)(tx,{strings:d,userDetails:l})]}),(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{capitalize:!0,variant:"label3",children:m.caption}),(0,i.jsx)(tb,{financialAssessment:n,strings:{yes_text:o,no_text:s,...m},userDetails:l})]}),(0,i.jsxs)(A.az,{children:[(0,i.jsx)(A.EY,{capitalize:!0,variant:"label3",children:p.caption}),(0,i.jsxs)(A.az,{mt:{_:4,md:6},children:[(0,i.jsx)(A.EY,{variant:"body2",children:h}),(0,i.jsx)(A.EY,{color:"B.3",variant:"caption1",children:x})]})]})]})})};var tE=n(97174);let tC=()=>{let e=(0,c.wA)(),t=(0,c.d4)(u.$u.getUserDetails),n=(0,c.d4)(u.$u.getEmail),a=(0,c.d4)(u.$u.getMobileDetails),r=(0,c.d4)(u.$u.getFinancialAssessmentData),o=(0,c.d4)(u.$u.isUserInfoLoaded),{strings:{general:{learn_more_cta:s,manulife:{profile_info_page:{disclaimer_caption:p,disclaimer_text:h,your_profile_caption:x}}}},localeCode:b}=(0,g.Ym)(),_=()=>{e((0,d.OE)())},f=()=>{window.open(j.NXl[b],"_blank")};(0,l.useEffect)(()=>{o||e(m.zV.getUserInfo())},[e,o]);let v=()=>(0,i.jsxs)(A.az,{children:[(0,i.jsxs)(A.az,{bg:"B.6",borderRadius:4,px:{_:4,md:14},py:6,children:[(0,i.jsx)(A.EY,{capitalize:!0,variant:"label3",children:p}),(0,i.jsx)(A.EY,{as:"p",my:2,variant:"body2",children:h}
1),(0,i.jsx)(A.$n,{fillType:"text",onClick:f,p:0,children:s})]}),(0,i.jsx)(q.sd,{renderOn:["phone","tablet"],children:(0,i.jsx)(tv,{financialAssessment:r,mobileDetails:a,userDetails:t,userEmail:n})}),(0,i.jsx)(q.sd,{renderOn:["desktop"],children:(0,i.jsx)(ty,{financialAssessment:r,mobileDetails:a,userDetails:t,userEmail:n})})]});if(o)return(0,i.jsxs)(A.az,{as:"main",bg:"G.1",flex:1,minHeight:"100vh",overflow:"hidden",children:[(0,i.jsxs)(q.sd,{renderOn:["desktop"],children:[(0,i.jsx)(tE.Y9,{}),(0,i.jsx)(A.az,{height:{_:"54px",md:"96px",xl:"auto"},children:(0,i.jsx)(A.az,{position:{_:"fixed",xl:"relative"},width:"100%",zIndex:11,children:(0,i.jsxs)(A.az,{maxWidth:{_:"100%",xl:"760px"},mb:{_:0,xl:2},mt:{_:0,xl:4},mx:"auto",children:[(0,i.jsx)(tE.iK,{onBackClick:_,title:x}),v()]})})})]}),(0,i.jsx)(q.sd,{renderOn:["phone","tablet"],children:(0,i.jsxs)(A.az,{p:4,children:[(0,i.jsxs)(A.az,{color:"B.1",mb:8,children:[(0,i.jsx)(A.az,{onClick:_,py:4,children:(0,i.jsx)(A.C0,{height:"12px",name:"arrowLeft",width:"16px"})}),(0,i.jsx)(A.EY,{fontFamily:"ProximaNovaWideBold",fontSize:9,fontWeight:"bold",lineHeight:"compact",children:x})]}),v()]})})]})}},34007:(e,t,n)=>{n.d(t,{u:()=>h});var i=n(34329),l=n(14232),a=n(80782),r=n.n(a),o=n(34820),s=n(30688),c=n(55391);function d(e){return(d="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)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){var i,l,a;i=e,l=t,a=n[t],(l=function(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=d(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}(l))in i?Object.defineProperty(i,l,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[l]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var h=(0,l.forwardRef)(function(e,t){var n,a=e.aspect,d=e.initialDimension,m=void 0===d?{width:-1,height:-1}:d,h=e.width,x=void 0===h?"100%":h,b=e.height,g=void 0===b?"100%":b,_=e.minWidth,f=void 0===_?0:_,j=e.minHeight,v=e.maxHeight,y=e.children,E=e.debounce,C=void 0===E?0:E,k=e.id,A=e.className,T=e.onResize,w=e.style,I=(0,l.useRef)(null),z=(0,l.useRef)();z.current=T,(0,l.useImperativeHandle)(t,function(){return Object.defineProperty(I.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),I.current},configurable:!0})});var B=function(e){if(Array.isArray(e))return e}(n=(0,l.useState)({containerWidth:m.width,containerHeight:m.height}))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,l,a,r,o=[],s=!0,c=!1;try{a=(n=n.call(e)).next,!1;for(;!(s=(i=a.call(n)).done)&&(o.push(i.value),o.length!==t);s=!0);}catch(e){c=!0,l=e}finally{try{if(!s&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw l}}return o}}(n,2)||function(e,t){if(e){if("string"==typeof e)return u(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),S=B[0],Y=B[1],O=(0,l.useCallback)(function(e,t){Y(function(n){var i=Math.round(e),l=Math.round(t);return n.containerWidth===i&&n.containerHeight===l?n:{containerWidth:i,containerHeight:l}})},[]);(0,l.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,i=n.width,l=n.height;O(i,l),null==(t=z.current)||t.call(z,i,l)};C>0&&(e=r()(e,C,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=I.current.getBoundingClientRect();return O(n.width,n.height),t.observe(I.current),function(){t.disconnect()}},[O,C]);var D=(0,l.useMemo)(function(){var e=S.containerWidth,t=S.containerHeight;if(e<0||t<0)return null;(0,s.R)((0,o._3)(x)||(0,o._3)(g),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",x,g),(0,s.R)(!a||a>0,"The aspect(%s) must be greater than zero.",a);var n=(0,o._3)(x)?e:x,i=(0,o._3)(g)?t:g;a&&a>0&&(n?i=n/a:i&&(n=i*a),v&&i>v&&(i=v)),(0,s.R)(n>0||i>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",n,i,x,g,f,j,a);var r=!Array.isArray(y)&&(0,c.Mn)(y.type).endsWith("Chart");return l.Children.map(y,function(e){return l.isValidElement(e)?(0,l.cloneElement)(e,p({width:n,height:i},r?{style:p({height:"100%",width:"100%",maxHeight:i,maxWidth:n},e.props.style)}:{})):e})},[a,y,g,v,j,f,S,x]);return l.createElement("div",{id:k?"".concat(k):void 0,className:(0,i.A)("recharts-responsive-container",A),style:p(p({},void 0===w?{}:w),{},{width:x,height:g,minWidth:f,minHeight:j,maxHeight:v}),ref:I},D)})},42917:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(37876);n(14232);var l=n(48011),a=n(44610),r=n(97174);let o=e=>{let{children:t,title:n,onBack:o,usePhoneHeader:s=!1,showLanguageSwitcher:c,headerProps:d}=e,m=(0,l.d4)(e=>e.responsiveUtility.isPhone);return(0,i.jsxs)(i.Fragment,{children:[m&&s?(0,i.jsx)(r.iK,{onBackClick:o,title:n}):(0,i.jsx)(r.Y9,{showLanguageSwitcher:c,theme:"white",...d}),(0,i.jsx)(a.az,{as:"main",bg:"G.1",children:t}),(0,i.jsx)(r.wi,{})]})};o.default={headerProps:{theme:"white"}};let s=o},72010:(e,t,n)=>{n.d(t,{$M:()=>w,$f:()=>g,C1:()=>T,D8:()=>B,DS:()=>y,ED:()=>m,ES:()=>Y,FS:()=>O,Fd:()=>a,Gc:()=>D,Ge:()=>v,M:()=>r,N8:()=>E,Oq:()=>_,P9:()=>H,U1:()=>L,bA:()=>S,cD:()=>M,e:()=>C,eC:()=>o,gc:()=>A,h:()=>N,iB:()=>F,k4:()=>I,lv:()=>b,lz:()=>u,oA:()=>h,r3:()=>l,rv:()=>z,sQ:()=>j,w:()=>s,w8:()=>W,xW:()=>R,y$:()=>d});var i=n(76597);let l=(0,i.BI)("intro_page"),a=(0,i.B9)("intro_page_clicks")("get_started_click"),r=(0,i.BI)("login_page"),o=(0,i.B9)("login_click")("new_to_syfe_click"),s=(0,i.BI)("disclaimer_page"),c=(0,i.B9)("disclaimer_page_clicks"),d=c("next_button_click");c("reject_consent_checkbox_click");let m=(0,i.BI)("verify_email"),p=(0,i.B9)("verify_email_clicks");p("edit_email_click"),p("update_email_click");let u=p("resend_otp_click");p("need_help_click"),p("verify_otp_click"),(0,i.Jz)("verify_email");let h=(0,i.BI)("verify_mobile"),x=(0,i.B9)("verify_mobile_clicks");(0,i.Jz)("verify_mobile"),x("send_otp_click"),x("edit_mobile_click"),x("resend_otp_click"),x("verify_otp_click"),x("complete_later_click");let b=(0,i.BI)("identity_input"),g=(0,i.B9)("identity_input_clicks")("identity_input_next_click");(0,i.Jz)("identity_input");let _=(0,i.BI)("financial_info"),f=(0,i.B9)("financial_info_clicks"),j=f("nla_tip_click"),v=f("financial_info_next_click"),y=(0,i.BI)("risk_preference");(0,i.B9)("risk_preference_clicks");let E=f("risk_preference_next_click"),C=(0,i.BI)("rec_results"),k=(0,i.B9)("results_clicks"),A=k("methodology_your_profile_click"),T=k("risk_level_tip_click"),w=k("mpf_returns_tip_click"),I=k("fund_info_click"),z=k("fund_prospectus_click"),B=k("acknowledge_rec_click");k("rec_exposures_click");let S=k("complete_kyc_click"),Y=k("redo_assessment_click"),O=(0,i.BI)("kyc_complete");(0,i.B9)("kyc_complete_clicks");let D=k("fund_prospectus_click"),M=k("to_syfe_click"),L=k("to_manulife_click"),R=k("accept_disclaimer_click"),F=(0,i.BI)("kyc"),P=(0,i.B9)("kyc_clicks"),N=P("upload_doc_click"),H=P("kyc_next_click"),W=P("preview_doc_click")}}]);
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.