PageSourceSearch

https://www.newyaohan.com/_nuxt/create-my-profile.a1a2de41.js

js newyaohan.com collected 2026-10-07 02:06:53 UTC 15,908 bytes, 1 lines download raw bytes

1import{_ as Je}from"./breadcrumb.vue.741971f3.js";import{_ as Ye}from"./mobile.vue.6ceb49c5.js";import{_ as Ve}from"./button.vue.16a0e9de.js";import{K as Xe,r as _,z as ke,D as we,o as d,m as A,w as c,d as s,B as u,b as e,a as i,n as S,ak as Ze,g as xe,L as Ce,N as $e,U as Ie,Y as G,aK as Qe,aX as ue,aw as We,i as M,O as el,V as ll,F as oe,aY as ol,s as tl,E as al,u as nl,a3 as ce,k as sl,l as il,j as K,c as p,a4 as rl,a5 as dl,v as me,G as T,a6 as ul,at as cl,H as pe,aZ as ml,e as I,x as _e,t as fe,C as ee,p as pl,h as _l,I as fl,aj as le,J as vl}from"./entry.91bd73a3.js";import{_ as gl}from"./popup-bg.b4d6e9c7.js";import{u as bl}from"./rules.28bc6ac6.js";import{u as yl}from"./useMetaHead.07f4f62d.js";import{u as hl}from"./useAddress.e4ab367a.js";import{V as Vl}from"./VForm.41858832.js";import{a as f}from"./VTextField.d0de8eab.js";import{m as kl,V as ve}from"./VInput.1e32e630.js";import{m as wl,V as Se,b as xl,c as Cl}from"./VCheckboxBtn.9202d99e.js";import{V as ge,d as be}from"./VSelect.6f2c42fe.js";import{V as ye}from"./VCheckbox.af15d387.js";import"./form.d16f43fb.js";import"./forwardRefs.e2994a01.js";const $l={class:"min-2lg:text-h4-d text-p1-bold-r"},Il=["innerHTML"],Sl=Xe({__name:"term-condition",emits:["check-term-condition"],setup(r,{emit:w}){const x=_(),{locale:b,t:C}=ke(),y=we().global.tnc,v=()=>{w("check-term-condition",!0)};return(F,J)=>{const h=Ve,U=Ze;return d(),A(U,{type:"slide-up",class:"!max-w-none",key:`modal-sign-in-tnc-${e(b)}`},{header:c(()=>[s("h3",$l,u(e(C)("page.tnc.title")),1)]),body:c(()=>[s("div",{class:"modal-tnc",innerHTML:e(y)},null,8,Il)]),footer:c(()=>[s("div",{class:S([e(x)?"dropout-in":"dropout-out","dropout-button"])},[i(h,{onClick:v,label:"I have read and agree",class:S(["btn-primary",F.$useMedia.min("lg")?"btn-lg":"btn-sm"])},null,8,["class"])],2)]),_:1})}}});const Ul=xe(Sl,[["__scopeId","data-v-ee9f0c88"]]);const Rl=Ce({...wl({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),he=$e()({name:"VRadio",props:Rl(),setup(r,w){let{slots:x}=w;return Ie(()=>i(Se,G(r,{class:["v-radio",r.class],style:r.style,type:"radio"}),x)),{}}});const Pl=Ce({height:{type:[Number,String],default:"auto"},...kl(),...Qe(xl(),["multiple"]),trueIcon:{type:ue,default:"$radioOn"},falseIcon:{type:ue,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),Tl=$e()({name:"VRadioGroup",inheritAttrs:!1,props:Pl(),emits:{"update:modelValue":r=>!0},setup(r,w){let{attrs:x,slots:b}=w;const C=We(),$=M(()=>r.id||`radio-group-${C}`),y=el(r,"modelValue");return Ie(()=>{const[v,F]=ll(x),[J,h]=ve.filterProps(r),[U,te]=Se.filterProps(r),R=b.label?b.label({label:r.label,props:{for:$.value}}):r.label;return i(ve,G({class:["v-radio-group",r.class],style:r.style},v,J,{modelValue:y.value,"onUpdate:modelValue":n=>y.value=n,id:$.value}),{...b,default:n=>{let{id:L,messagesId:O,isDisabled:P,isReadonly:Y}=n;return i(oe,null,[R&&i(ol,{id:L.value},{default:()=>[R]}),i(Cl,G(U,{id:L.value,"aria-describedby":O.value,defaultsTarget:"VRadio",trueIcon:r.trueIcon,falseIcon:r.falseIcon,type:r.type,disabled:P.value,readonly:Y.value,"aria-labelledby":R?L.value:void 0,multiple:!1},F,{modelValue:y.value,"onUpdate:modelValue":X=>y.value=X}),b)])}})}),{}}}),Ue=r=>(pl("data-v-18ea05f3"),r=r(),_l(),r),Ml={class:"create-profile-page"},Ll={class:"media-xl"},Ol={class:"media-ms"},Al={class:"title-info"},Gl={class:"col-span-2"},Fl={class:"mb-2 text-grey-500 text-p3"},El={class:"col-span-2"},Nl={class:"relative"},Bl={key:0,class:"col-span-2 grid min-3xl:grid-cols-2 gap-5"},Dl={class:"relative"},ql={key:1,class:"col-span-2 flex flex-col gap-5"},Hl={class:"col-span-2"},jl={class:"col-span-2"},zl={class:"password-list"},Kl={key:0,class:"icon icon-check-fill"},Jl={key:1,class:"icon icon-clear"},Yl={key:0,class:"icon icon-check-fill"},Xl={key:1,class:"icon icon-clear"},Zl={class:"inline-flex items-center text-nyh-pink"},Ql=Ue(()=>s("p",{class:"font-bold mb-2.5"},"Country / Region of Residence",-1)),Wl={class:"w-full max-h-[calc(100dvh-7.25rem)] overflow-auto"},eo=["onClick"],lo=Ue(()=>s("p",{class:"font-bold mb-2.5"},"Country / Region of Residence",-1)),oo={class:"w-full max-h-[calc(100dvh-7.25rem)] overflow-auto"},to=["onClick"],ao={__name:"create-my-profile",setup(r){const{min:w,max:x}=tl();M(()=>w("lg"));const b=M(()=>x("2lg")),C=al(),$=nl(),{$encryptPassword:y}=fl(),{ruleRequired:v,ruleEmail:F,rulePassword:J}=bl(),h=we(),{setValue:U,fetchValue:te}=vl(),{locale:R,t:n}=ke(),L=n("global.sign-in"),O=n("sign-in-up.create-my-profile"),P=n("sign-in-up.optional"),Y=n("sign-in-up.first-name"),X=n("sign-in-up.last-name"),Re=n("sign-in-up.nickname")+P,Pe=n("sign-in-up.password"),Te=n("sign-in-up.confirm-password"),Me=n("sign-in-up.referral-code")+P,Le=_([{name:O,link:"/create-my-profile"}]),Oe=ul(),Ae=_({title:`${O} | ${L} | ${n("page.website_name")}`,description:"",image_url:`${Oe.public.baseURL}
1/placeholder/og-image-default-1200-630.jpg`});yl({...Ae.value});const E=_(!1),l=ce({first_name:"",last_name:"",nick_name:"",country_code:"",mobile_number:"",email:"",gender:"",region:null,other_region:null,province_city_region:null,other_province_city_region:null,address:null,password_default:{value:"",show:!1},password_confirm:{value:"",show:!1},referral_code:"",checked:{marketing:!1,terms:!1}}),g=ce({min_length:!1,number_symbol:!1}),Ge=a=>a===l.password_default.value||n("global.pwd_not_match"),Z=_({mobile_code:"+853",mobile_number:""}),ae=_(null),Fe=a=>{Z.value=a,l.country_code=a.mobile_code,l.mobile_number=a.mobile_number};sl(async()=>{await il();const a=JSON.parse(sessionStorage.getItem("mobile")),o=sessionStorage.getItem("secret");a&&(Z.value=a),l.country_code=a==null?void 0:a.mobile_code,l.mobile_number=a==null?void 0:a.mobile_number,o&&(ae.value=o)});const ne=_(),se=M(()=>l.region==="10005");M(()=>l.province_city_region==="10005001");const{areaList:ie,getSubArea:Ee}=hl(),re=M(()=>Ee(l.region||"10002")),N=_(!1),B=_(!1);function Ne(a){l.region=a,N.value=!1}function Be(a){l.province_city_region=a,B.value=!1}K(()=>l.region,(a,o)=>{const k=a==="10005";l.province_city_region=k?"10005001":null,l.other_region=null,l.other_province_city_region=null,o&&(l.address=null)});const D=_(h.modal.term_condition),q=a=>{D.value=a,cl({bodyAttrs:{class:{"opened-menu":a}}});const o={name:"term_condition",value:a};h[pe.SET_MODAL](o)},De=a=>{q(!1),l.checked.terms=a},qe=async()=>{le("redirect_cookies");const a={mobile_code:l.country_code,mobile_number:l.mobile_number,password:y(l.password_default.value)},{data:o,error:k}=await ee("sign/login",a);o.value&&(await U("token",o.value.data.token,7),h[pe.SET_TOKEN](o.value.data.token),je())},He=async()=>{const a=le("redirect_cookies"),o=await te("sso-token");a.value&&(window.location=`${a.value}?token=${o}`)},je=async()=>{const a=le("redirect_cookies"),{data:o,error:k}=await ee("sign/eshop-login");if(o.value&&await U("sso-token",o.value.data.crm_token,7),a.value){await He(),a.value=null;return}C.push($({path:"/",query:{popup:"member-survey"}}))},V=_(!1);async function ze(a){var k,H,j;const{valid:o}=await a;if(o&&g.min_length&&g.number_symbol){V.value=!0;try{const Q={first_name:l.first_name,last_name:l.last_name,nick_name:l.nick_name??"",gender:l.gender,region:l.region,other_region:l.other_region,province_city_region:l.province_city_region,other_province_city_region:l.other_province_city_region,address:l.address,country_code:l.country_code,mobile_number:l.mobile_number,email:l.email??"",password:y(l.password_default.value),referral_code:l.referral_code,marketing_news:l.checked.marketing?1:0,secret:ae.value},{data:W,error:z}=await ee("sign/register",Q);W.value?await qe():((j=(H=(k=z.value)==null?void 0:k.data)==null?void 0:H.error)==null?void 0:j.key)==="OTP_SECRET_INVALID"?await C.push($({path:"/sign-in/verify"})):await C.push($({path:"/404"}))}finally{V.value=!1}}}const de=_(0);return K(()=>h.global.tnc,a=>{de.value++}),K(()=>h.modal,()=>{D.value=h.modal.term_condition},{deep:!0}),K(()=>l.password_default.value,()=>{const a=/^(.{8,})/,o=/[0-9!@#$%^&*()_+{}\[\]:;<>,.?~\\-]/;g.min_length=a.test(l.password_default.value),g.number_symbol=o.test(l.password_default.value)},{deep:!0}),(a,o)=>{const k=Je,H=Ye,j=Ve,Q=ml,W=Ul,z=gl;return d(),p("main",Ml,[s("div",Ll,[i(k,{data:e(Le)},null,8,["data"]),s("div",Ol,[s("h1",null,u(e(O)),1),s("p",Al,u(e(n)("sign-in-up.fill-in-msg")),1),i(Vl,{onSubmit:rl(ze,["prevent"]),modelValue:e(E),"onUpdate:modelValue":o[21]||(o[21]=t=>dl(E)?E.value=t:null),"fast-fail":""},{default:c(()=>[i(f,{label:e(Y),modelValue:e(l).first_name,"onUpdate:modelValue":o[0]||(o[0]=t=>e(l).first_name=t),required:"",rules:[e(v)],clearable:"",variant:"outlined","hide-details":"auto"},null,8,["label","modelValue","rules"]),i(f,{label:e(X),modelValue:e(l).last_name,"onUpdate:modelValue":o[1]||(o[1]=t=>e(l).last_name=t),required:"",rules:[e(v)],clearable:"",variant:"outlined","hide-details":"auto"},null,8,["label","modelValue","rules"]),i(f,{label:Re,modelValue:e(l).nick_name,"onUpdate:modelValue":o[2]||(o[2]=t=>e(l).nick_name=t),clearable:"",variant:"outlined","hide-details":"auto",class:"col-span-2"},null,8,["modelValue"]),s("div",Gl,[s("div",Fl,u(e(n)("profileLanding.info.gender")),1),i(Tl,{modelValue:e(l).gender,"onUpdate:modelValue":o[3]||(o[3]=t=>e(l).gender=t),inline:"",required:"",rules:[e(v)],"hide-details":!0,class:"button-radio-toggle"},{default:c(()=>[i(he,{value:"F"},{label:c(()=>[I(u(e(n)("profileLanding.edit.female")),1)]),_:1}),i(he,{value:"M"},{label:c(()=>[I(u(e(n)("profileLanding.edit.male")),1)]),_:1})]),_:1},8,["modelValue","rules"])]),s("div",El,[s("div",Nl,[e(b)?(d(),p("button",{key:0,class:"absolute w-full h-full inset-0 z-10",type:"button",onClick:o[4]||(o[4]=t=>N.value=!0)})):T("",!0),i(ge,{modelValue:e(l).region,"onUpdate:modelValue":o[5]||(o[5]=t=>
1e(l).region=t),items:e(ie),"item-title":"name","item-value":"value","hide-details":"false",variant:"outlined",label:e(n)("address.select_region_placeholder")},{selection:c(({item:t,index:m})=>[I(u(t.title),1)]),item:c(({props:t,item:m})=>[i(be,G(t,{title:m.name,value:m.value}),{default:c(()=>[I(u(m.title),1)]),_:2},1040,["title","value"])]),_:1},8,["modelValue","items","label"])])]),!e(se)&&e(l).region?(d(),p("div",Bl,[s("div",Dl,[e(b)?(d(),p("button",{key:0,class:"absolute w-full h-full inset-0 z-10",type:"button",onClick:o[6]||(o[6]=t=>B.value=!0)})):T("",!0),i(ge,{modelValue:e(l).other_region,"onUpdate:modelValue":o[7]||(o[7]=t=>e(l).other_region=t),items:e(re),"item-title":"name","item-value":"value","hide-details":"false",variant:"outlined",label:e(n)("address.select_city_placeholder")},{selection:c(({item:t,index:m})=>[I(u(t.title),1)]),item:c(({props:t,item:m})=>[i(be,G(t,{title:m.name,value:m.value}),{default:c(()=>[I(u(m.title),1)]),_:2},1040,["title","value"])]),_:1},8,["modelValue","items","label"])]),i(f,{modelValue:e(l).address,"onUpdate:modelValue":o[8]||(o[8]=t=>e(l).address=t),"hide-details":"false",variant:"outlined",label:e(n)("address.input_placeholder")},null,8,["modelValue","label"])])):T("",!0),e(se)?(d(),p("div",ql,[i(f,{modelValue:e(l).other_region,"onUpdate:modelValue":o[9]||(o[9]=t=>e(l).other_region=t),"hide-details":"false",variant:"outlined",label:e(n)("address.input_region_placeholder")},null,8,["modelValue","label"]),i(f,{modelValue:e(l).other_province_city_region,"onUpdate:modelValue":o[10]||(o[10]=t=>e(l).other_province_city_region=t),"hide-details":"false",variant:"outlined",label:e(n)("address.input_city_placeholder")},null,8,["modelValue","label"]),i(f,{modelValue:e(l).address,"onUpdate:modelValue":o[11]||(o[11]=t=>e(l).address=t),"hide-details":"false",variant:"outlined",label:e(n)("address.input_placeholder"),class:"max-3xl:col-span-1 col-span-2"},null,8,["modelValue","label"])])):T("",!0),s("div",Hl,[i(H,{value:e(Z),onUpdateData:Fe,disabled:"",class:"col-span-2"},null,8,["value"])]),i(f,{label:`Email${e(P)}`,type:"email",modelValue:e(l).email,"onUpdate:modelValue":o[12]||(o[12]=t=>e(l).email=t),clearable:"",variant:"outlined","hide-details":"auto",class:"col-span-2"},null,8,["label","modelValue"]),s("div",jl,[i(f,{modelValue:e(l).password_default.value,"onUpdate:modelValue":o[13]||(o[13]=t=>e(l).password_default.value=t),type:e(l).password_default.show?"text":"password","append-inner-icon":e(l).password_default.show?"icon icon-eyeopened":"icon icon-eyeclosed",label:e(Pe),variant:"outlined",rules:[e(v)],clearable:"","hide-details":"auto","onClick:appendInner":o[14]||(o[14]=t=>e(l).password_default.show=!e(l).password_default.show)},null,8,["modelValue","type","append-inner-icon","label","rules"]),s("ul",zl,[s("li",{class:S({"text-nyh-green1":e(g).min_length})},[e(g).min_length?(d(),p("i",Kl)):(d(),p("i",Jl)),s("span",null,u(e(n)("global.pwd8char")),1)],2),s("li",{class:S({"text-nyh-green1":e(g).number_symbol})},[e(g).number_symbol?(d(),p("i",Yl)):(d(),p("i",Xl)),s("span",null,u(e(n)("global.pwdLimit")),1)],2)])]),i(f,{modelValue:e(l).password_confirm.value,"onUpdate:modelValue":o[15]||(o[15]=t=>e(l).password_confirm.value=t),type:e(l).password_confirm.show?"text":"password","append-inner-icon":e(l).password_confirm.show?"icon icon-eyeopened":"icon icon-eyeclosed",label:e(Te),variant:"outlined",rules:[e(v),Ge],clearable:"","hide-details":"auto",class:"col-span-2","onClick:appendInner":o[16]||(o[16]=t=>e(l).password_confirm.show=!e(l).password_confirm.show)},null,8,["modelValue","type","append-inner-icon","label","rules"]),i(f,{label:Me,modelValue:e(l).referral_code,"onUpdate:modelValue":o[17]||(o[17]=t=>e(l).referral_code=t),placeholder:`${e(n)("sign-in-up.referral-code-eg")}`,clearable:"",variant:"outlined","hide-details":"auto",class:"col-span-2"},null,8,["modelValue","placeholder"]),i(ye,{modelValue:e(l).checked.marketing,"onUpdate:modelValue":o[18]||(o[18]=t=>e(l).checked.marketing=t),"hide-details":"auto",class:"col-span-2"},{label:c(()=>[s("div",null,u(e(n)("sign-in-up.agree-marketing-materials"))+u(e(P)),1)]),_:1},8,["modelValue"]),i(ye,{modelValue:e(l).checked.terms,"onUpdate:modelValue":o[20]||(o[20]=t=>e(l).checked.terms=t),required:"",rules:[e(v)],"hide-details":"auto",class:"col-span-2"},{label:c(()=>[s("div",null,[I(u(e(n)("sign-in-up.agree-terms-conditions")),1),s("span",Zl,[s("button",{onClick:o[19]||(o[19]=t=>q(!0)),type:"button",class:"underline underline-offset-1"},u(e(n)("page.tnc.title")),1)]),me(s("span",null,".",512),[[_e,e(R)==="en"]])])]),_:1},8,["modelValue","rules"]),(d(),A(j,{label:e(V)?e(n)("global.loading"):e(n)("global.next"),icon:e(V)?"outline-loading-black":"","svg-icon":e(V),loading:e(V),value:"next",type:"submit",disabled:!(e(E)&&e(g).min_length&&e(g).number_symbol)||e(V),class:"btn-primary btn-lg mt-4 col-span-2",key:`sent-data-${e(V)}`},null,8,["label","icon","svg-icon","loading","disabled"]))]),_:1},8,["onSubmit","modelValue"])])]),i(Q,{show:e(D),onCloseBlack:o[22]||(o[22]=t=>q(!1)),class:"overlay-black"}
1,null,8,["show"]),me((d(),A(W,{class:S({"modal-opened":e(D)}),onCloseModal:o[23]||(o[23]=t=>q(!1)),onCheckTermCondition:De,key:`modal-sign-in-tnc-${e(R)}-${e(de)}`},null,8,["class"])),[[_e,!0]]),e(N)?(d(),A(z,{key:0,onCloseFunc:o[24]||(o[24]=t=>N.value=!1)},{default:c(()=>[Ql,s("div",Wl,[(d(!0),p(oe,null,fe(e(ie),(t,m)=>(d(),p("button",{class:"w-full py-3 flex items-center justify-between",key:`prof-prof-country-opt-${m}`,type:"button",onClick:Ke=>Ne(t.value)},[s("p",null,u(t.name),1),s("i",{class:S(["icon icon-check text-lg",{"opacity-0":t.value!==e(ne)}])},null,2)],8,eo))),128))])]),_:1})):T("",!0),e(B)?(d(),A(z,{key:1,onCloseFunc:o[25]||(o[25]=t=>B.value=!1)},{default:c(()=>[lo,s("div",oo,[(d(!0),p(oe,null,fe(e(re),(t,m)=>(d(),p("button",{class:"w-full py-3 flex items-center justify-between",key:`prof-prof-country-opt-${m}`,type:"button",onClick:Ke=>Be(t.value)},[s("p",null,u(t.name),1),s("i",{class:S(["icon icon-check text-lg",{"opacity-0":t.value!==e(ne)}])},null,2)],8,to))),128))])]),_:1})):T("",!0)])}}},xo=xe(ao,[["__scopeId","data-v-18ea05f3"]]);export{xo as default};

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.