1import{_ as _e}from"./BVZM_4WK.js";import{_ as pe,a as me}from"./mi09c6CK.js";import{n as de,u as M,k as ge,a as L,K as fe,_ as he,b as ve,c as Se,m as Ae,d as ye,e as Ie,g as Ne}from"./mtX6w7ie.js";import{_ as Ee}from"./Cl-cXsm9.js";import{_ as Te}from"./CcaMAg_i.js";import{d as q,Y as _,C as xe,z as P,E as Oe,Q as Ge,bz as be,az as we,r as Ce,o as g,c as x,a,aW as e,w as d,b as T,n as A,l as U,t as y,F as Ue,f as ke,bp as Re,e as $e,L as f,al as He}from"./BN2lIDwG.js";import{i as De}from"./B_wBOz4q.js";import{d as Be}from"./Ov4MRVVJ.js";import{a as Le}from"./Be39RFf1.js";import{m as Me}from"./BsHBnA8m.js";import{u as qe}from"./CyAvM7mC.js";import"./C6zReTQj.js";import"./1hjcxvSP.js";import"./Bp0lSL9X.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"[email protected]"};var r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="3988831a-591a-492f-9479-5f86e30925b9",s._sentryDebugIdIdentifier="sentry-dbid-3988831a-591a-492f-9479-5f86e30925b9")}catch{}})();const Pe={class:"auth-sign-on flex"},Ve={class:"flex-grow flex items-center"},We={key:1,class:"auth-mail"},ze={class:"social-auth-provider"},Fe={class:"separator"},Ye={class:"form"},Ke={class:"guest-hint"},Xe=q({__name:"index",props:{page:{type:String,required:!0,validator(s){return["sign-up","sign-in"].includes(s)}},preEmail:{type:String,default:void 0},socialAuthCode:{type:String,default:void 0},socialAuthError:{type:Object,default:void 0}},async setup(s){let r,p;const{push:O}=de(),m=s,G=_(["google","apple"]),h=_(""),l=_(m.preEmail??""),c=_(""),v=_("mail"),i=_(void 0),S=_(!1),k=_(!1),R=_({}),{trackSale:V}=Le(),{$viewport:W,$routerI18n:z}=xe(),I=P(),{t:n}=M(),$=ge(),H=L(),F=Oe(),N=f(()=>I.name&&I.name.startsWith("auth-sign-in")?"sign-in":"sign-up"),Y=f(()=>{const t=N.value==="sign-in"?"auth-sign-up":"auth-sign-in";return m.preEmail?{name:t,query:{email:m.preEmail}}:t}),K=f(()=>i.value?n(`AUTH_SIGN_ON_ERROR_${i.value==="failed"||i.value==="registration_not_complete"?`${N.value.replace("-","_").toUpperCase()}_`:""}${i.value.toUpperCase()}`):""),X=f(()=>k.value&&W.isLessThan("large")?"top":"left");Ge(async()=>{const t=I.query.orderID;if(t&&fe($.i18n.locale,"NewSubscription",{subscriptionID:t},O),V(),Z(),k.value=!0,m.socialAuthCode){S.value=!0;try{await H.socialSignOnCode(m.socialAuthCode),w()}catch{i.value="social"}S.value=!1}else m.socialAuthError&&(i.value="social")});const j=$.language,{url:Q,config:J}=Be({locale:j}),{data:b}=([r,p]=be(()=>Me(Q,{method:"GET",headers:J.headers},"$IFySO5wzkB")),r=await r,p(),r),Z=async()=>{we(b,()=>{if(b.value){const t=b.value,o=ee(t.length);R.value=t[o]}},{immediate:!0})},ee=t=>Math.floor(Math.random()*t),D=async()=>{if(l.value=l.value.trim(),c.value=c.value.trim(),!De(l.value)){i.value="malformed";return}S.value=!0,h.value=l.value;try{const o=await L().signIn({mail:h.value,password:c.value});o.token?(w(),i.value=void 0):i.value=o.error??"failed"}catch(t){i.value=t?.type==="maintenance"?"maintenance":"failed"}finally{S.value=!1}},te=async t=>{try{S.value=!0;const o=await H.socialSignOnStart({provider:t});o&&(window.location.href=o)}catch(o){console.error("Fehler bei Social Authentication:",o),o.value="social"}finally{S.value=!1}},oe=f(()=>{const t=I.query.redirect;if(typeof t=="string"&&!(!t.startsWith("/")||t.startsWith("//")))return t}),w=()=>{v.value="confirm";const t=oe.value??z.localePath({name:"video"});setTimeout(()=>F.push(t),3e3)};return(t,o)=>{const ne=pe,ae=ve,C=he,se=Ee,re=me,ie=Se,le=Ae,ce=Te,B=ye,E=Ie,ue=Ce("i18n-t");return g(),x("div",Pe,[a(se,{alignment:e(X),class:"flex-grow-0 flex-shrink-0"},{default:d(()=>[e(v)==="confirm"?(g(),T(ne,{key:0,"trainer-detail":e(R)},null,8,["trainer-detail"])):(g(),T(C,{key:1,to:"/",class:"logo"},{default:d(()=>[a(ae)]),_:1}))]),_:1},8,["alignment"]),A("div",Ve,[e(v)==="code"?(g(),T(re,{key:0,mail:e(h),class:"auth-code",onCancel:o[0]||(o[0]=u=>v.value="mail"),onComplete:w},null,8,["mail"])):e(v)==="mail"?(g(),x("div",We,[a(ie,{overline:e(n)("AUTH_SIGN_ON_OVERLINE"),look:"3",centered:""}
1,{headline:d(()=>[U(y(e(n)(`AUTH_SIGN_ON_SIGN_${e(N)==="sign-in"?"IN":"UP"}_HEADLINE`)),1)]),_:1},8,["overline"]),A("div",ze,[(g(!0),x(Ue,null,ke(e(G),u=>(g(),T(ce,{key:u,onClick:Je=>te(u)},{default:d(()=>[a(le,{name:`auth-${u}`,size:32,title:e(n)(`AUTH_SIGN_ON_${u.toUpperCase()}`)},null,8,["name","title"])]),_:2},1032,["onClick"]))),128))]),A("div",Fe,[A("div",null,y(e(n)("OR")),1)]),A("div",Ye,[a(B,{id:"mail",class:"mb-4",value:e(l),"label-text":e(n)("AUTH_SIGN_ON_MAIL_LABEL"),onInput:o[1]||(o[1]=u=>l.value=u.target.value)},null,8,["value","label-text"]),a(B,{id:"password","password-type":!0,value:e(c),"label-text":e(n)("AUTH_SIGN_ON_PASSWORD_LABEL"),"error-message":e(K),onInput:o[2]||(o[2]=u=>c.value=u.target.value),onKeyup:Re(D,["enter"])},null,8,["value","label-text","error-message"]),a(E,{text:e(n)("AUTH_SIGN_ON_MAIL_BUTTON"),size:"large","color-theme":"light",icon:"arrow-right","icon-position":"right",loading:e(S),onClick:D},null,8,["text","loading"]),a(E,{look:"plain",text:e(N)==="sign-in"?e(n)("AUTH_SIGN_ON_ALREADY_REGISTERED_SIGN_UP"):e(n)("AUTH_SIGN_ON_ALREADY_REGISTERED_SIGN_IN"),to:e(Y)},null,8,["text","to"]),a(E,{look:"plain",text:e(n)("AUTH_SIGN_ON_FORGOT_PASSWORD_BUTTON"),to:"auth-password-reset"},null,8,["text"]),a(E,{look:"plain",text:e(n)("AUTH_SIGN_ON_CONTINUE_AS_GUEST"),to:{name:"video"}},null,8,["text"]),A("p",Ke,y(e(n)("AUTH_SIGN_ON_GUEST_MESSAGE")),1),a(ue,{scope:"global",keypath:"AUTH_SIGN_ON_TEXT",tag:"div",class:"terms"},{terms:d(()=>[a(C,{to:"video-terms-conditions"},{default:d(()=>[U(y(e(n)("AUTH_SIGN_ON_TEXT_TERMS")),1)]),_:1})]),privacy:d(()=>[a(C,{to:"video-privacy-policy"},{default:d(()=>[U(y(e(n)("AUTH_SIGN_ON_TEXT_PRIVACY")),1)]),_:1})]),_:1})])])):$e("",!0)])])}}}),je=Object.assign(Ne(Xe,[["__scopeId","data-v-50f87721"]]),{__name:"AuthSignOn"}),Qe={class:"page"},mt=q({__name:"auth-sign-in",setup(s){qe();const r=P(),{t:p}=M(),O=f(()=>r.query.email),m=f(()=>r.query.socialAuthCode),G=f(()=>{const{socialAuthError:h,socialAuthErrorReason:l,socialAuthErrorDescription:c}=r.query;if(h)return{error:h,reason:l,description:c}});return He({title:p("auth-sign-in.meta.title"),meta:[{property:"og:title",content:p("auth-sign-in.meta.title")},{name:"description",content:p("auth-sign-in.meta.description")},{property:"og:description",content:p("auth-sign-in.meta.description")}]}),(h,l)=>{const c=_e,v=je;return g(),x("div",Qe,[a(c),a(v,{page:"sign-in","pre-email":e(O),"social-auth-code":e(m),"social-auth-error":e(G)},null,8,["pre-email","social-auth-code","social-auth-error"])])}}});export{mt 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.