2023-08-02 04:42:25 +07:00
|
|
|
|
import{S as t,i as e,a as s,b as o,k as n,s as a,e as i,c as u,t as l,n as r,d as c,f as d,l as m,g as p,r as h,m as f,o as g,j as b}from"./index-6a7bc1e2.js";import*as w from"../../../../../../../../../js/libraries/authTools.js";function y(t){let e,s,n,a,f,g,b,w,y,I,k,v,E,$,j,C,L,T,P,B,G,H,M,N,R,z;return{c(){e=i("div"),s=i("h2"),s.textContent="LOG IN",n=u(),a=i("label"),a.textContent="Email ",f=i("span"),g=u(),b=i("input"),w=u(),y=i("div"),I=i("label"),I.textContent="Password ",k=i("span"),v=u(),E=i("input"),$=u(),j=i("button"),j.innerHTML='<object type="image/svg+xml" data="/img/auth/eye_icon.svg" title="eye icon"></object>',C=u(),L=i("div"),T=i("input"),P=i("label"),P.textContent="remember me",B=u(),G=i("button"),G.textContent="Log in",H=u(),M=i("a"),N=l("Forgot password?"),this.c=r,c(s,"class","auth-title"),c(a,"class","auth-label"),c(a,"for","emailInput"),c(f,"id","email-msg"),c(b,"id","emailInput"),c(b,"class","authEmailInput"),c(b,"type","email"),c(I,"class","auth-label"),c(I,"for","passwordInput"),c(k,"id","password-msg"),c(E,"id","passwordInput"),c(E,"class","authPasswordInput"),c(E,"type","password"),c(j,"class","eye-icon"),c(y,"class","password-field"),c(T,"type","checkbox"),c(T,"id","remember-me-checkbox"),c(P,"id","remember-me-label"),c(P,"for","passwordInput"),c(L,"id","remember-me"),c(G,"class","auth-button"),c(M,"id","forgot-password"),c(M,"href","/"+x+"/reset-password"),c(e,"id","login-group"),c(e,"class","pane auth-pane")},m(i,u){o(i,e,u),d(e,s),d(e,n),d(e,a),d(e,f),t[9](f),d(e,g),d(e,b),t[10](b),d(e,w),d(e,y),d(y,I),d(y,k),t[11](k),d(y,v),d(y,E),t[12](E),d(y,$),d(y,j),t[13](j),d(e,C),d(e,L),d(L,T),t[15](T),d(L,P),d(e,B),d(e,G),d(e,H),d(e,M),d(M,N),R||(z=[m(j,"click",t[14]),m(G,"click",t[16])],R=!0)},p:r,i:r,o:r,d(s){s&&p(e),t[9](null),t[10](null),t[11](null),t[12](null),t[13](null),t[15](null),R=!1,h(z)}}}let x="en";function I(t,e,s){let o,n,a,i,u,l,r,c,d,{focused:m=!1}=e,p=f("auth");function h(){if(p.googleInit){google.accounts.id.renderButton(d,{theme:"outline",size:"large"});let t=d.getElementsByTagName("iframe")[0];t.style.height="5rem",t.style.width="5rem"}else setTimeout(h,100)}g((()=>{s(7,c.checked=!0,c),s(2,a={email:o,password:n,remember:c}),s(6,r={email:u,password:l}),p.msgs=r,p.remember=c,p.loginGoogle=d,document.addEventListener("keypress",(function(t){"Enter"==t.code&&m&&w.login(r,a)})),h()}));return t.$$set=t=>{"focused"in t&&s(8,m=t.focused)},[o,n,a,i,u,l,r,c,m,function(t){b[t?"unshift":"push"]((()=>{u=t,s(4,u)}))},function(t){b[t?"unshift":"push"]((()=>{o=t,s(0,o)}))},function(t){b[t?"unshift":"push"]((()=>{l=t,s(5,l)}))},function(t){b[t?"unshift":"push"]((()=>{n=t,s(1,n)}))},function(t){b[t?"unshift":"push"]((()=>{i=t,s(3,i)}))},()=>w.changePasswordVisibility(i),function(t){b[t?"unshift":"push"]((()=>{c=t,s(7,c)}))},()=>w.login(r,a)]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';@import '/css/auth.css';</style>",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},I,y,a,{focused:8},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["focused"]}get focused(){return this.$$.ctx[8]}set focused(t){this.$$set({focused:t}),n()}}customElements.define("login-component",k);export{k as default};
|