import{S as t,i as e,a as s,b as n,k as i,s as r,e as o,c as a,n as l,d as u,f as c,l as d,g as p,r as m,m as f,o as h,j as g}from"./index-db20528a.js";import*as b from"../../../../../../../../../js/libraries/authTools.js";function w(t){let e,s,i,r,f,h,g,b,w,x,v,y,k,E,I,C,j,P,$,L,T,S,z,H,M,B,R,N,A,G,U,V,W,X,_,q,D,F,J,K,O,Q;return{c(){e=o("div"),s=o("h2"),s.textContent="SIGN UP",i=a(),r=o("label"),r.textContent="Email ",f=o("span"),h=a(),g=o("input"),b=a(),w=o("div"),x=o("label"),x.textContent="Password ",v=o("span"),y=a(),k=o("input"),E=a(),I=o("button"),I.innerHTML='',C=a(),j=o("div"),P=o("input"),$=o("label"),$.textContent="remember me",L=a(),T=o("button"),T.textContent="Sign up",S=a(),z=o("p"),H=a(),M=o("div"),B=o("button"),R=a(),N=o("div"),A=o("h2"),A.textContent="Registration is closed",G=a(),U=o("p"),U.textContent="We are still in the process of opening.",V=a(),W=o("p"),W.textContent="Sign up for updates to know when it becomes available:",X=a(),_=o("div"),q=o("input"),D=a(),F=o("button"),F.textContent="sign up",J=a(),K=o("button"),K.textContent="No thanks",this.c=l,u(s,"class","auth-title"),u(r,"class","auth-label"),u(r,"for","emailInput"),u(f,"id","email-msg"),u(g,"id","emailInput"),u(g,"class","authEmailInput"),u(g,"type","email"),u(x,"class","auth-label"),u(x,"for","emailInput"),u(v,"id","password-msg"),u(k,"id","passwordInput"),u(k,"class","authPasswordInput"),u(k,"type","password"),u(I,"class","eye-icon"),u(w,"class","password-field"),u(P,"type","checkbox"),u(P,"id","remember-me-checkbox"),u($,"id","remember-me-label"),u($,"for","passwordInput"),u(j,"id","remember-me"),u(T,"class","auth-button"),u(z,"id","forgot-password"),u(e,"id","signup-group"),u(e,"class","pane auth-pane"),u(B,"id","shadow"),u(q,"id","newsletterEmailInput"),u(q,"type","text"),u(F,"id","newsletterEmailButton"),u(_,"id","newsletter-container"),u(K,"id","no-button"),u(N,"id","wrapper"),u(N,"class","pane"),u(M,"id","dialog")},m(o,a){n(o,e,a),c(e,s),c(e,i),c(e,r),c(e,f),t[15](f),c(e,h),c(e,g),t[17](g),c(e,b),c(e,w),c(w,x),c(w,v),t[18](v),c(w,y),c(w,k),t[19](k),c(w,E),c(w,I),t[21](I),c(e,C),c(e,j),c(j,P),t[23](P),c(j,$),c(e,L),c(e,T),c(e,S),c(e,z),t[24](e),n(o,H,a),n(o,M,a),c(M,B),c(M,R),c(M,N),c(N,A),c(N,G),c(N,U),c(N,V),c(N,W),c(N,X),c(N,_),c(_,q),t[25](q),c(_,D),c(_,F),t[26](F),c(N,J),c(N,K),t[27](M),O||(Q=[d(f,"change",t[16]),d(k,"change",t[20]),d(I,"click",t[22]),d(T,"click",t[10]),d(B,"click",t[11]),d(q,"click",t[13]),d(F,"click",t[12]),d(K,"click",t[11])],O=!0)},p:l,i:l,o:l,d(s){s&&p(e),t[15](null),t[17](null),t[18](null),t[19](null),t[21](null),t[23](null),t[24](null),s&&p(H),s&&p(M),t[25](null),t[26](null),t[27](null),O=!1,m(Q)}}}function x(t){""!=t.innerHTML&&(t.innerHTML="")}function v(t,e,s){let n,i,r,o,a,l,u,c,d,p,m,w,{focused:v=!1}=e;f("auth"),h((()=>{s(6,d.checked=!0,d),a={email:i,password:r},c={email:l,password:u},document.addEventListener("keypress",(function(t){"Enter"==t.code&&v&&b.signup(c,a,toLandingPage)}))}));return t.$$set=t=>{"focused"in t&&s(14,v=t.focused)},[n,i,r,o,l,u,d,p,m,w,function(){s(7,p.style.display="block",p)},function(){null!=p&&s(7,p.style.display="none",p)},function(){let t=w.value;t.includes("@")?(sendText("/get-email",t),s(9,w.value="",w),s(9,w.placeholder="Subscribed!",w),w.style.setProperty("--c","hsl(147, 33%, 60%)")):(s(9,w.value="",w),s(9,w.placeholder="must contain '@'",w),w.style.setProperty("--c","hsl(0, 100%, 60%)"))},function(){s(9,w.placeholder="",w)},v,function(t){g[t?"unshift":"push"]((()=>{l=t,s(4,l)}))},()=>x(l),function(t){g[t?"unshift":"push"]((()=>{i=t,s(1,i)}))},function(t){g[t?"unshift":"push"]((()=>{u=t,s(5,u)}))},function(t){g[t?"unshift":"push"]((()=>{r=t,s(2,r)}))},()=>x(u),function(t){g[t?"unshift":"push"]((()=>{o=t,s(3,o)}))},()=>b.changePasswordVisibility(o),function(t){g[t?"unshift":"push"]((()=>{d=t,s(6,d)}))},function(t){g[t?"unshift":"push"]((()=>{n=t,s(0,n)}))},function(t){g[t?"unshift":"push"]((()=>{w=t,s(9,w)}))},function(t){g[t?"unshift":"push"]((()=>{m=t,s(8,m)}))},function(t){g[t?"unshift":"push"]((()=>{p=t,s(7,p)}))}]}class y extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},v,w,r,{focused:14},null,[-1,-1]),t&&(t.target&&n(t.target,this,t.anchor),t.props&&(this.$set(t.props),i()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[14]}set focused(t){this.$$set({focused:t}),i()}}customElements.define("signup-component",y);export{y as default};