PageSourceSearch

https://ui.contactsplus.com/assets/ReferralLandingView-DwnLcMEQ.js

js contactsplus.com collected 2026-10-02 10:16:19 UTC 10,205 bytes, 1 lines download raw bytes

1import{_ as me,n as fe,u as ve,N as ge,C as R,o as we,M as he,L as j,a as ye,c as l,b as e,d as m,F as P,f as c,t as f,e as a,g as v,y as J,h as W,w as be,v as _e,q as ke,k as Se,j as Ce,r as i,l as g,m as n,I as Y,a6 as Fe,s as Re}from"./index-CZs8E7p5.js";import{u as Pe}from"./session-easDWVEc.js";import{u as Te,R as K}from"./RegisterPopover-BtdLdb5W.js";import{_ as Ve,A as xe}from"./auth.scss_vue_type_style_index_0_src_true_lang-CR1Cs24Q.js";import{_ as H}from"./PasswordToggle-CiBX6hsP.js";import{_ as Ae}from"./PasswordValidator-eB_iS2EX.js";const Ne={key:0,style:{display:"flex","align-items":"center","justify-content":"center","min-height":"100dvh"}},Ee={key:1,class:"auth-shell"},De={class:"login-wrapper"},Be={class:"right-panel"},Le={class:"auth-screen"},Me={class:"form-area form-area--top"},Ue={class:"form-inner"},Ie={key:0,class:"referrer-photo"},qe=["src"],ze={class:"screen-intro"},Ge={class:"screen-title"},$e={class:"screen-subtitle"},Oe={class:"sso-section"},je={key:0,class:"form-error form-error--top"},Je={class:"register-button-wrap"},We={class:"sso-icon"},Ye={class:"form-group"},Ke=["disabled"],He={key:0,class:"form-error form-error--top"},Qe={class:"form-group"},Xe={class:"strength","aria-hidden":"true"},Ze=["data-level"],et=["data-level"],tt={class:"form-group"},st=["data-state"],ot={class:"register-button-wrap"},rt=["disabled"],at={class:"site-foot"},nt={class:"foot-left"},lt={__name:"ReferralLandingView",setup(it){const Q=ke(),X=Se(),E=fe(),o=ve(),D=ge(),T=Pe(),V=i(""),x=i(""),B=i(!0),k=i(1),S=i(!1),y=i(null),C=i(null),d=i(null),p=i(null),u=i(!1),Z=g(()=>D.isDev),w=g(()=>!Z.value),ee=new Date().getFullYear(),L=g(()=>Fe(o.registerForm.email)),te=g(()=>{const s=o.registerForm;return!s.password||s.password.length<8||s.password!==s.passwordConfirm?!1:o.canRegister});R(()=>o.registerForm.passwordConfirm,()=>{S.value=!1}),R(()=>o.registerForm.password,()=>{S.value=!1});const se=g({get:()=>o.registerForm.password,set:s=>{o.registerForm.password=s}}),{score:M,label:oe}=Te(se),re=g(()=>{const s=o.registerForm.password||"";if(!s.length)return!1;const{rules:t}=Re(s);return t.some(r=>!r.met)}),F=g(()=>{const s=o.registerForm;return s.passwordConfirm?s.password===s.passwordConfirm?"match":"mismatch":null});function ae(){L.value&&(k.value=2)}function ne(){k.value=1}function A(){if(window.grecaptcha){N();return}window.googleRecaptchaLoaded=()=>N();const s=document.createElement("script");s.src="https://www.google.com/recaptcha/api.js?onload=googleRecaptchaLoaded&render=explicit",s.async=!0,s.defer=!0,document.head.appendChild(s)}function N(){if(!C.value||!window.grecaptcha)return;const s=D.configOpt("googleRecaptchaSitekey");s&&(d.value=window.grecaptcha.render(C.value,{sitekey:s,size:"invisible",callback:t=>{y.value=t,u.value=!0},"expired-callback":()=>{y.value=null}}))}function le(){y.value=null,window.grecaptcha&&d.value!==null&&window.grecaptcha.reset(d.value)}function U(s){var q,z,G,$,O;if(!Ce(s.origin))return;let t;
1try{t=typeof s.data=="string"?JSON.parse(s.data):s.data}catch{return}if(!t||t.type!=="google-oauth")return;const{message:r,error:h}=t,b=(q=r==null?void 0:r.data)==null?void 0:q.oauthTokens,_=h||((z=r==null?void 0:r.data)==null?void 0:z.error);if(!_&&b)o.ssoSuccess({oauthTokens:b,ssoProvider:(G=r==null?void 0:r.data)==null?void 0:G.provider,accountCreated:($=r==null?void 0:r.data)==null?void 0:$.accountCreated,flowType:(O=r==null?void 0:r.state)==null?void 0:O.type});else{const pe=(_==null?void 0:_.message)||_;o.ssoFail(pe||"Google authentication failed")}}we(async()=>{var t;const s=Q.params.refCode;if(s&&localStorage.setItem("referral-code",s),E.token&&E.token!=="loading"){X.replace("/");return}if(o.setRegisterSegment("individual"),o.sso.error=null,window.addEventListener("message",U),s)try{const{status:r,body:h}=await he({resource:"apps/v1/myCard.getPublic",method:"post",noToken:!0,params:{referralKey:s}});if(r===200&&h){V.value=((t=h.name)==null?void 0:t.givenName)||h.givenName||"";const b=(h.photos||[])[0];b&&(x.value=b.value||"")}}catch{}B.value=!1,w.value&&j(()=>A())}),ye(()=>{window.removeEventListener("message",U)}),R(w,s=>{s&&j(()=>A())}),R(C,s=>{if(!s){d.value=null,y.value=null;return}!w.value||d.value!==null||(window.grecaptcha?N():A())});function ie(s){s.preventDefault(),s.stopPropagation();const t=o.registerForm;if(S.value=!1,t.password!==t.passwordConfirm){S.value=!0;return}p.value="register-email-button",w.value&&window.grecaptcha&&d.value!==null?window.grecaptcha.execute(d.value):u.value=!0}function ue(s){s.preventDefault(),s.stopPropagation(),p.value="register-google-button",u.value=!0}function ce(){T.modifyChecklist("acceptTosAndPolicy",!0),u.value=!1,p.value=null,o.returnToRoute="/referral/complete",o.register({recaptchaToken:y.value}).then(()=>{w.value&&le()})}function de(){T.modifyChecklist("acceptTosAndPolicy",!0),u.value=!1,p.value=null,o.returnToRoute="/referral/complete";const s=o.registerSegment||"individual",t=JSON.stringify(T.residenceFormData);window.open(`/api/oauth/google?type=register&ws=${s}&state=${encodeURIComponent(t)}`)}function I(){u.value=!1,p.value=null}return(s,t)=>B.value?(n(),l("div",Ne,[...t[3]||(t[3]=[e("div",{class:"spinner"},null,-1)])])):(n(),l("div",Ee,[e("div",De,[t[15]||(t[15]=e("div",{class:"announce-bar"},"New Desktop App — fully supports all device sizes down to mobile",-1)),m(Ve,{"show-announcement":!1,"show-wordmark":!0}),e("div",Be,[e("div",Le,[e("div",Me,[e("div",Ue,[k.value===1?(n(),l(P,{key:0},[x.value?(n(),l("div",Ie,[e("img",{src:x.value,alt:""},null,8,qe)])):c("",!0),e("div",ze,[e("h2",Ge,f(V.value||"Someone")+" has referred you!",1),e("p",$e,f(V.value||"Someone")+" thinks you'll love our app and we do too! Contacts+ is the most intelligent contact management app available — organize, clean up, and sync contacts across all your accounts and devices. ",1)]),t[6]||(t[6]=e("div",{class:"signup-steps",role:"group","aria-label":"Sign up progress"},[e("div",{class:"signup-step active","aria-current":"step"}),e("div",{class:"signup-step"})],-1)),e("div",Oe,[a(o).sso.error?(n(),l("div",je,f(a(o).sso.error),1)):c("",!0),e("div",Je,[e("button",{type:"button",class:"sso-btn",onClick:ue},[e("span",We,[m(Y,{name:"google",size:22})]),t[4]||(t[4]=v(" Sign up with Google ",-1))]),p.value==="register-google-button"&&u.value?(n(),J(K,{key:0,onAccept:de,onCancel:I})):c("",!0)])]),t[7]||(t[7]=e("div",{class:"divider"},[e("div",{class:"divider-line"}),e("span",{class:"divider-text"},"or"),e("div",{class:"divider-line"})],-1)),e("form",{onSubmit:W(ae,["prevent"])},[e("div",Ye,[t[5]||(t[5]=e("label",{class:"form-label",for:"ref-email"},"Email",-1)),be(e("input",{id:"ref-email","onUpdate:modelValue":t[0]||(t[0]=r=>a(o).registerForm.email=r),type:"email",class:"form-input",placeholder:"[email protected]",autocomplete:"email",autofocus:"",required:""},null,512),[[_e,a(o).registerForm.email]])]),e("button",{type:"submit",class:"btn-primary",disabled:!L.value}," Continue ",8,Ke)],32)],64)):k.value===2?(n(),l(P,{key:1},[t[12]||(t[12]=e("div",{class:"screen-intro"},[e("h2",{class:"screen-title"},"Set your password"),e("p",{class:"screen-subtitle"},"Choose a strong password for your account. We'll show strength feedback as you type.")],-1)),t[13]||(t[13]=e("div",{class:"signup-steps",role:"group","aria-label":"Sign up progress"},[e("div",{class:"signup-step done"}),e("div",{class:"signup-step active","aria-current":"step"})],-1)),e("form",{onSubmit:W(ie,["prevent"])},[a(o).registerForm.error?(n(),l("div",He,f(a(o).registerForm.error),1)):c("",!0),e("div",Qe,[t[9]||(t[9]=e("label",{class:"form-label",for:"ref-password"},"Password",-1)),m(H,{id:"ref-password",modelValue:a(o).registerForm.password,"onUpdate:modelValue":t[1]||(t[1]=r=>a(o).registerForm.password=r),placeholder:"Create a password",autocomplete:"new-password",minlength:8,required:""},null,8,["modelValue"]),e("div",Xe,[e("div",{class:"strength-bars","data-level":a(M)||null},[...t[8]||(t[8]=[e("span",null,null,-1),e("span",null,null,-1),e("span",null,null,-1),e("span",null,null,-1)])],8,Ze),e("span",{class:"strength-label","data-level":a(M)||null},f(a(oe)||"Enter a password"),9,et)]),m(Ae,{password:a(o).registerForm.password,show:re.value},null,8,["password","show"])]),e("div",tt,[t[10]||(t[10]=e("label",{class:"form-label",for:"ref-confirm"},"Confirm password",-1)),m(H,{id:"ref-confirm",modelValue:a(o).registerForm.passwordConfirm,"onUpdate:modelValue":t[2]||(t[2]=r=>a(o).registerForm.passwordConfirm=r),placeholder:"Re-enter your password",autocomplete:"new-password",error:F.value==="mismatch",required:""},null,8,["modelValue","error"]),e("p",{class:"match-hint","data-state":F.value||null,"aria-live":"polite"},[F.value==="match"?(n(),l(P,{key:0},[v("✓ Passwords match")],64)):F.value==="mismatch"?(n(),l(P,{key:1},[v("Passwords don't match yet")],64)):c("",!0)],8,st)]),w.value?(n(),l("div",{key:1,ref_key:"recaptchaEl",ref:C,class:"recaptcha-slot"},null,512)):c("",!0),e("div",ot,[e("button",{type:"submit",class:"btn-primary",disabled:!te.value||a(o).registerForm.submitting},f(a(o).registerForm.submitting?"Creating account...":"Sign up"),9,rt),p.value==="register-email-button"&&u.value?(n(),J(K,{key:0,onAccept:ce,onCancel:I})):c("",!0)]),e("button",{type:"button",class:"back-link",onClick:ne},[m(Y,{name:"arrow-left",size:18}),t[11]||(t[11]=v(" Back ",-1))])],32)],64)):c("",!0),t[14]||(t[14]=e("p",{class:"legal"},[v(" By continuing you agree to our "),e("a",{href:"https://www.contactsplus.com/terms/",target:"_blank",rel:"noopener"},"Terms of Use"),v(" and "),e("a",{href:"https://www.contactsplus.com/privacy/#privacy-policy",target:"_blank",rel:"noopener"},"Privacy Policy"),v(". ")],-1))])])])])]),e("footer",at,[e("div",nt,[e("span",null,"© "+f(a(ee))+" Contacts+",1),t[16
1]||(t[16]=e("a",{href:"https://www.contactsplus.com/terms/",target:"_blank",rel:"noopener"},"Terms of Use",-1)),t[17]||(t[17]=e("a",{href:"https://www.contactsplus.com/privacy/#privacy-policy",target:"_blank",rel:"noopener"},"Privacy Policy",-1)),t[18]||(t[18]=e("a",{href:"https://www.contactsplus.com/status/",target:"_blank",rel:"noopener"},"Status",-1))]),m(xe)])]))}},vt=me(lt,[["__scopeId","data-v-0cb64fbf"]]);export{vt 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.