PageSourceSearch

https://www.article.com/assets/LoginPage.74339e7f.js

js article.com collected 2026-09-24 08:48:44 UTC 8,931 bytes, 2 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="a7c4b68c-47e8-421f-89a4-aab8150a2082",e._sentryDebugIdIdentifier="sentry-dbid-a7c4b68c-47e8-421f-89a4-aab8150a2082")}catch(re){}import{S as e,n as r}from"./AuthNavigation.5ab99bae.js";import{F as s}from"./FormError.7d759d9d.js";import{c7 as a,c9 as t,ca as o,cs as i,cx as l,dt as n,fV as c,dH as d,cZ as u,cf as m,cG as g,ct as h,d0 as p,d1 as f,ce as y,cc as b,c5 as w,dn as v,gS as C,cS as k,c3 as E,gh as _,c4 as S,gQ as L,cN as I,cb as P}from"./index.061e774e.js";import{B as x,S as T,F as A}from"./FlexWrapper.d3f10fc3.js";import{C as V}from"./Card.5fbe726e.js";import{u as $}from"./useDiscount.8c6e057a.js";import"./google.b8e9fdb0.js";const D={class:"field"},N={class:"controls"},O={class:"field"};const R={class:"field"},q={class:"login-form-email"},G={class:"field"},W={class:"login-forgot-password control-label"},U={class:"controls"},j={class:"field"},Y={key:0,class:"recaptcha-branding"};const B="We are unable to log you in at this time. Please try again later.",F="We are unable to log you in at this time. Please try again later.",H={class:"login-register-page background-grey"},M={key:0,class:"light"},K={key:1,class:"light"},J={key:2},Q={class:"item"},Z={key:0,class:"logintype"},z={key:0,class:"logintype"},X={class:"item"};var ee=a({components:{Card:V,LoginEmail:a({components:{"form-error":s},props:["email","submit","errors","loading"],data(){return{result:{email:this.email}}},watch:{email:{handler(e){this.result.email=e}}},mounted(){this.$refs.email.focus()}},[["render",function(e,r,s,a,f,y){const b=t("form-error");return o(),i("form",{class:"login-form",method:"post",_u_id_name_:"email",onSubmit:r[2]||(r[2]=u((e=>s.submit(f.result)),["prevent"]))},[l("div",D,[r[3]||(r[3]=l("label",{class:"control-label"},"Email Address",-1)),l("div",N,[n(l("input",{ref:"email","onUpdate:modelValue":r[0]||(r[0]=e=>f.result.email=e),type:"email",name:"email",autocomplete:"off",class:"form-control control-medium padded",autofocus:"",onKeydown:r[1]||(r[1]=d(u((()=>{}),["prevent"]),["space"]))},null,544),[[c,f.result.email,void 0,{trim:!0}]])])]),m(b,{errors:s.errors,field:"account.email"},null,8,["errors"]),l("div",O,[l("button",{type:"submit",class:g(["button uppercase",{disabled:s.loading}]),"aria-label":"Continue login"}
1,[s.loading?(o(),i(h,{key:0},[p("Loading...")],64)):(o(),i(h,{key:1},[p("Continue")],64))],2)])],32)}]]),LoginPassword:a({components:{"form-error":s},props:["email","submit","clear","errors","loading","isCaptchaValidationEnabled"],data(){return{result:{email:this.email,password:null,verificationCode:this.$route.query.code||null}}},watch:{email:{handler(e){this.result.email=e}}},mounted(){this.$refs.password.focus()}},[["render",function(e,r,s,a,d,w){const v=t("router-link"),C=t("form-error");return o(),i("form",{class:"login-form",method:"post",onSubmit:r[2]||(r[2]=u((e=>s.submit(d.result)),["prevent"]))},[l("div",R,[l("div",q,[p(f(s.email)+" ",1),l("label",null,[l("a",{onClick:r[0]||(r[0]=u(((...e)=>s.clear&&s.clear(...e)),["prevent"]))},"Change")])])]),l("div",G,[r[4]||(r[4]=l("label",{class:"control-label"},"Password",-1)),l("label",W,[m(v,{to:{name:"forgot"}},{default:y((()=>r[3]||(r[3]=[p("Forgot password?",-1)]))),_:1,__:[3]})]),l("div",U,[n(l("input",{ref:"password","onUpdate:modelValue":r[1]||(r[1]=e=>d.result.password=e),type:"password",name:"password",class:"form-control control-medium padded",autofocus:""},null,512),[[c,d.result.password]])])]),m(C,{errors:s.errors,field:"account.password"},null,8,["errors"]),l("div",j,[l("button",{type:"submit",class:g(["button uppercase",{disabled:s.loading}]),"aria-label":"Log in to Article account"}
1,[s.loading?(o(),i(h,{key:0},[p("Logging in...")],64)):(o(),i(h,{key:1},[p("Log In")],64))],2)]),s.isCaptchaValidationEnabled?(o(),i("p",Y,r[5]||(r[5]=[p(" This site is protected by reCAPTCHA and the Google ",-1),l("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener"},"Privacy Policy",-1),p(" and ",-1),l("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noopener"},"Terms of Service",-1),p(" apply. ",-1)]))):b("",!0)],32)}]]),BannerError:x,SocialLogin:T,FlexWrapper:A},setup(){w({title:"Account Login",meta:[{name:"description",content:"Sign-in to your Article account to review your current and past orders, store credits, product reviews, and any active support requests. Log-in now."}]});const{setUser:e,setCustomerToken:r}=v(),{saveCustomerDiscount:s}=$(),{getBVEventRedirectUrl:a}=C();return{setUser:e,saveCustomerDiscount:s,setCustomerToken:r,getBVEventRedirectUrl:a}},data(){return{from:this.$route.query.from||null,email:this.$route.query.email||null,showSocial:!!this.$route.query.showSocial,errors:{},loading:!1,isCaptchaValidationEnabled:!1,loginMessages:{reset:"Your password has been successfully updated. You can log in now.",register:"Your account has been created. You can log in now.",verify:"Your email has been verified. You can log in now.",track:"Please log in to check your order status.",security:"Please log in to proceed with the security check.",giftcard:"Please log in to activate your gift card."}}},computed:{loginMessage(){return this.loginMessages[this.from]||null},next(){return k.isUrlNextValid(this.$route.query.next)?this.$route.query.next:""}},async mounted(){if(this.$route.query.error)try{const e=JSON.parse(this.$route.query.error.replace(/</g,"\\u003c"));this.errors=e,this.$router.replace({path:this.$route.path,query:{next:this.next}})}catch(e){E.sentryCaptureError(e)}if(this.isCaptchaValidationEnabled=await _("storefront.perm.login.captcha.enabled",!1),this.isCaptchaValidationEnabled){const e=S.VITE_RECAPTCHA_LOGIN_SITE_KEY;await L(`https://www.google.com/recaptcha/enterprise.js?render=${e}`,{async:!0,defer:!0})}},methods:{async handleLoginResult(s){if(s&&s.success){if(s.step===e.LOGGED_IN||s.step===e.SIGN_UP_SOCIAL){this.errors={},this.setUser(s.userInfo),s.customerToken&&this.setCustomerToken(s.customerToken);let e="/";I.isTrade()&&(e=this.$router.resolve({name:"landing",params:{slug:"trade-favorites"},query:{stock:"true"}}).href);const r=await this.getBVEventRedirectUrl()||"";window.location=this.next||r||e}else s.step!==e.PASSWORD_LOGIN&&(this.errors={},r(this.$router,{from:e.PASSWORD_LOGIN,to:s.step,email:s.email}));this.saveCustomerDiscount()}else this.loading=!1,this.errors=s&&s.errors?s.errors:{server:[F]}},async submitEmail(s){if(!this.loading){this.loading=!0,s.email=s.email||"";try{const a=await I.validate(s);a&&a.success?a.step===e.PASSWORD_LOGIN?(this.errors={},this.email=a.email):(this.errors={},r(this.$router,{from:e.LOGIN,to:a.step,email:a.email})):(this.errors=a&&a.errors?a.errors:{server:[B]},this.email=null),this.loading=!1}catch(re){throw this.loading=!1,this.errors={server:[B]},re}}},async submitPassword(e){if(this.loading)return;this.loading=!0;let r=null;if(this.isCaptchaValidationEnabled)try{const e=S.VITE_RECAPTCHA_LOGIN_SITE_KEY;r=await grecaptcha.enterprise.execute(e,{action:"user_login"})}catch(s){return this.loading=!1,this.errors={server:["reCAPTCHA token generation failed. Please try again later."]},void E.sentryCaptureError(s,{extra:{message:null==s?void 0:s.message}})}try{const s=await I.login(e,{captchaToken:r});this.handleLoginResult(s)}catch(re){throw this.loading=!1,this.errors={server:[F]},re}},clearEmail(){this.from=null,this.email=null,this.errors={}}}}
1,[["render",function(e,r,s,a,n,c){const d=t("BannerError"),u=t("LoginEmail"),g=t("LoginPassword"),p=t("SocialLogin"),w=t("FlexWrapper"),v=t("Card");return o(),i("div",H,[m(v,{giant:!n.email||n.showSocial},{default:y((()=>[n.email?(o(),i("h1",K,"Welcome Back")):(o(),i("h1",M,"Log In or Register")),m(d,{errors:n.errors,fields:["oauth","server","security","captcha"]},null,8,["errors"]),c.loginMessage&&!n.email?(o(),i("p",J,f(c.loginMessage),1)):b("",!0),m(w,null,{default:y((()=>[l("div",Q,[n.email?b("",!0):(o(),i("h2",Z,"With your email:")),n.email?(o(),i(h,{key:2},[n.showSocial?(o(),i("h2",z,"With your password:")):b("",!0),m(g,{email:n.email,submit:c.submitPassword,loading:n.loading,clear:c.clearEmail,errors:n.errors,"is-captcha-validation-enabled":n.isCaptchaValidationEnabled},null,8,["email","submit","loading","clear","errors","is-captcha-validation-enabled"])],64)):(o(),P(u,{key:1,submit:c.submitEmail,loading:n.loading,errors:n.errors},null,8,["submit","loading","errors"]))]),!n.email||n.showSocial?(o(),i(h,{key:0},[r[0]||(r[0]=l("div",{class:"divider"},null,-1)),l("div",X,[m(p,{"on-complete":c.handleLoginResult,disabled:n.loading,"track-page":"login",extra:{next:c.next}},null,8,["on-complete","disabled","extra"])])],64)):b("",!0)])),_:1})])),_:1},8,["giant"])])}]]);export{ee as default};
2//# sourceMappingURL=LoginPage.74339e7f.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.