1import{d as z,h as H,Z as W,$ as G,z as K,y as O,m as X,am as Y,i as c,A as Z,B as b,C as e,e as m,w as h,f as r,D as n,F as S,an as J,K as g,T as D,U as L,V as M,a8 as T,ao as Q,ah as C,c as ee,H as y,L as te,X as oe,l as re,b as u,S as ne,al as se}from"./IINH0Rcf.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"adcbdce939003266b75eeac8db586be912e3768c"};var l=new a.Error().stack;l&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[l]="72346ddb-d153-4d99-94bb-9a2a73f220cd",a._sentryDebugIdIdentifier="sentry-dbid-72346ddb-d153-4d99-94bb-9a2a73f220cd")}catch{}})();function A(a,l){const s=Array.isArray(a)?a[0]:a;return typeof s!="string"||s===""||/[\u0000-\u001F\u007F]/.test(s)||!s.startsWith("/")||s.startsWith("//")||s.includes("\\")||s==="/login"||s.startsWith("/login?")?l:s}const ae={class:"grid grid-cols-2 min-h-screen min-h-dvh max-[900px]:grid-cols-1 max-[900px]:grid-rows-[35vh_1fr] max-[480px]:grid-rows-[28vh_1fr]"},le={class:"relative overflow-hidden flex items-center justify-center max-[900px]:min-h-[35vh]"},ie={class:"relative z-[1] text-center p-8"},de={class:"block font-display text-[0.85rem] tracking-[0.15em] text-[#e8e5df]"},ue={class:"flex items-center justify-center bg-[#f9f8f6] py-16 px-8 max-[900px]:py-12 max-[900px]:px-6 max-[480px]:py-10 max-[480px]:px-5"},ce={class:"w-full max-w-[400px]"},be={class:"font-heading font-normal text-[2.5rem] text-[#222222] mb-3 leading-[1.15] max-[900px]:text-[2rem] max-[480px]:text-[1.75rem]"},me={class:"font-body font-normal text-[0.95rem] text-[#6b6965] leading-[1.7] mb-10"},pe={key:0,role:"status",class:"font-body text-[0.85rem] text-[#3b6e3f] bg-[#3b6e3f]/[0.06] py-[0.85rem] px-4 mb-8 border-l-2 border-[#3b6e3f] leading-[1.5]"},fe={class:"flex flex-col"},ge={for:"username",class:"font-mono text-[0.7rem] tracking-[0.1em] uppercase text-[#6b6965] mb-[0.6rem]"},xe=["placeholder"],he={class:"flex flex-col"},ye={for:"password",class:"font-mono text-[0.7rem] tracking-[0.1em] uppercase text-[#6b6965] mb-[0.6rem]"},ve={class:"relative"},_e=["type"],we=["aria-label"],ke={key:0,role:"alert",class:"font-body text-[0.85rem] text-[#9f3b3b] bg-[#9f3b3b]/[0.06] py-[0.85rem] px-4 border-l-2 border-[#9f3b3b] leading-[1.5]"},$e=["disabled"],Ee={class:"mt-8 text-center"},Pe={class:"font-heading font-normal text-[2.5rem] text-[#222222] mb-3 leading-[1.15] max-[900px]:text-[2rem] max-[480px]:text-[1.75rem]"},Le={class:"font-body font-normal text-[0.95rem] text-[#6b6965] leading-[1.7] mb-10"},Te={class:"flex flex-col"},Ce={for:"reset-email",class:"font-mono text-[0.7rem] tracking-[0.1em] uppercase text-[#6b6965] mb-[0.6rem]"},Re=["placeholder"],Ie={key:0,role:"status",class:"font-body text-[0.85rem] text-[#3b6e3f] bg-[#3b6e3f]/[0.06] py-[0.85rem] px-4 border-l-2 border-[#3b6e3f] leading-[1.5]"},Se={key:0,role:"alert",class:"font-body text-[0.85rem] text-[#9f3b3b] bg-[#9f3b3b]/[0.06] py-[0.85rem] px-4 border-l-2 border-[#9f3b3b] leading-[1.5]"},De=["disabled"],Me={class:"mt-8 text-center"},Ae={class:"mt-12 pt-8 border-t border-[#e2e0dc] font-body text-[0.8rem] text-[#6b6965] text-center leading-[1.6]"},Ne=z({__name:"login",async setup(a){let l,s;const{loginUser:N,isPending:p,sendResetPasswordEmail:V}=H(),P=W(),q=G(),{t:f}=K(),v=O();X("tst_authed").value&&([l,s]=Y(()=>re(A(P.query.redirect,v("/products")),{replace:!0})),await l,s()),p.value=!1;const _=c(P.query.action==="forgotPassword"?"forgot":"login"),w=c(""),k=c(""),x=c(!1),i=c(""),$=c(""),E=c("");Z({title:()=>f("login.seoTitle")});function j(t){const o=(t||"").toLowerCase();return!o||o.includes("could not be logged in")||o.includes("incorrect")||o.includes("invalid")||o.includes("unknown")?f("login.errorDefault"):f("login.errorGeneric")}async function B(){i.value="";const{success:t,error:o}=await N({username:w.value,password:k.value});t?await q.push(A(P.query.redirect,v("/products"))):i.value=j(o)}async function U(){i.value="",E.value="";const{success:t,error:o}=await V({username:$.value});t?E.value=f("login.resetSuccess"):i.value=o||f("login.errorGeneric")}return(t,o)=>{const F=ne,R=te,I=oe;return u(),b("div",ae,[e("div",le,[m(F,{src:"/images/teaspice1.jpg",alt:"",class:"absolute inset-0 w-full h-full object-cover",format:"webp","aria-hidden":"true"}),o[7]||(o[7]=e("div",{class:"login-image-overlay"},null,-1)),e("div",ie,[m(R,{to:r(v)("/"),class:"block font-display font-normal text-[3rem] tracking-[0.12em] text-white no-underline mb-3 transition-opacity duration-300 hover:opacity-80 max-[900px]:text-[2rem] max-[480px]:text-[1.6rem] max-[480px]:tracking-[0.08em]",translate:"no"},{default:h(()=>[...o[6]||(o[6]=[y(" THE SPICE TREE ",-1)])]),_:1},8,["to"]),e("span",de,n(t.$t("login.tagline")),1)]),o[8]||(o[8]=e("div",{class:"absolute bottom-8 left-8 font-mono text-[0.7rem] tracking-[0.05em] uppercase text-white/60 z-[1] max-[900px]:hidden"},` 55° 40' 19" N, 13° 04' 02" E // LOMMA `,-1))]),e("div",ue,[e("div",ce,[r(_)==="login"?(u(),b(S,{key:0},[e("h1",be,n(t.$t("login.title")),1),e("p",me,n(t.$t("login.subtitle")),1),(t._.provides[J]||t.$route).query.passwordReset==="success"?(u(),b("p",pe,n(t.$t("login.passwordResetSuccess")),1)):g("",!0),e("form",{class:"flex flex-col gap-6",onSubmit:D(B,["prevent"])},[e("div",fe,[e("label",ge,n(t.$t("login.usernameLabel")),1),L(e("input",{id:"username","onUpdate:modelValue":o[0]||(o[0]=d=>T(w)?w.value=d:null),name:"username",type:"text",autocomplete:"username",required:"",placeholder:t.$t("login.usernamePlaceholder"),class:"w-full py-[0.85rem] px-3 font-body text-[0.95rem] text-[#222] bg-transparent border-b border-[#d4d2cf] outline-none transition-colors duration-300 focus:border-b-[#222] placeholder:text-[#5c5a55] placeholder:font-light"},null,8,xe),[[M,r(w)]])]),e("div",he,[e("label",ye,n(t.$t("login.passwordLabel")),1),e("div",ve,[L(e("input",{id:"password","onUpdate:modelValue":o[1]||(o[1]=d=>T(k)?k.value=d:null),name:"password",type:r(x)?"text":"password",autocomplete:"current-password",required:"",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",class:"w-full py-[0.85rem] px-3 pr-12 font-body text-[0.95rem] text-[#222] bg-transparent border-b border-[#d4d2cf] outline-none transition-colors duration-300 focus:border-b-[#222] placeholder:text-[#5c5a55] placeholder:font-light"},null,8,_e),[[Q,r(k)]]),e("button",{type:"button","aria-label":r(x)?t.$t("login.hidePassword"):t.$t("login.showPassword"),class:"absolute right-0 top-1/2 -translate-y-1/2 text-[#6b6965] transition-colors duration-200 bg-transparent border-none cursor-pointer p-2 hover:text-[#222]",onClick:o[2]||(o[2]=d=>x.value=!r(x))},[m(I,{name:r(x)?"ion:eye-off-outline":"ion:eye-outline",class:"w-5 h-5"},null,8,["name"])],8,we)])]),m(C,{name:"fade-msg"},{default:h(()=>[r(i)?(u(),b("p",ke,n(r(i)),1)):g("",!0)]),_:1}),e("button",{type:"submit",disabled:r(p),class:"mt-2 w-full py-4 px-8 bg-transparent border border-[#222] text-[#222] font-mono text-[0.8rem] uppercase tracking-[0.1em] cursor-pointer transition-all duration-300 inline-flex items-center justify-center gap-2 hover:enabled:bg-[#222] hover:enabled:text-white disabled:opacity-40 disabled:cursor-not-allowed"},[r(p)?(u(),ee(I,{key:0,name:"ion:reload-outline",class:"w-4 h-4 animate-spin"})):g("",!0),y(" "+n(r(p)?t.$t("login.loggingIn"):t.$t("login.loginButton")),1
1)],8,$e)],32),e("div",Ee,[e("button",{class:"font-body text-[0.85rem] text-[#6b6965] bg-transparent border-b border-transparent cursor-pointer pb-px transition-all duration-300 hover:text-[#222] hover:border-b-[#222]",onClick:o[3]||(o[3]=d=>_.value="forgot")},n(t.$t("login.forgotPassword")),1)])],64)):r(_)==="forgot"?(u(),b(S,{key:1},[e("h1",Pe,n(t.$t("login.resetTitle")),1),e("p",Le,n(t.$t("login.resetSubtitle")),1),e("form",{class:"flex flex-col gap-6",onSubmit:D(U,["prevent"])},[e("div",Te,[e("label",Ce,n(t.$t("login.emailLabel")),1),L(e("input",{id:"reset-email","onUpdate:modelValue":o[4]||(o[4]=d=>T($)?$.value=d:null),name:"email",type:"email",autocomplete:"email",required:"",placeholder:t.$t("login.usernamePlaceholder"),class:"w-full py-[0.85rem] px-3 font-body text-[0.95rem] text-[#222] bg-transparent border-b border-[#d4d2cf] outline-none transition-colors duration-300 focus:border-b-[#222] placeholder:text-[#5c5a55] placeholder:font-light"},null,8,Re),[[M,r($)]])]),m(C,{name:"fade-msg"},{default:h(()=>[r(E)?(u(),b("p",Ie,n(r(E)),1)):g("",!0)]),_:1}),m(C,{name:"fade-msg"},{default:h(()=>[r(i)?(u(),b("p",Se,n(r(i)),1)):g("",!0)]),_:1}),e("button",{type:"submit",disabled:r(p),class:"mt-2 w-full py-4 px-8 bg-transparent border border-[#222] text-[#222] font-mono text-[0.8rem] uppercase tracking-[0.1em] cursor-pointer transition-all duration-300 inline-flex items-center justify-center gap-2 hover:enabled:bg-[#222] hover:enabled:text-white disabled:opacity-40 disabled:cursor-not-allowed"},n(r(p)?t.$t("login.sending"):t.$t("login.sendResetLink")),9,De)],32),e("div",Me,[e("button",{class:"font-body text-[0.85rem] text-[#6b6965] bg-transparent border-b border-transparent cursor-pointer pb-px transition-all duration-300 hover:text-[#222] hover:border-b-[#222]",onClick:o[5]||(o[5]=d=>{_.value="login",i.value=""})}," â "+n(t.$t("login.backToLogin")),1)])],64)):g("",!0),e("p",Ae,[y(n(t.$t("login.notCustomer"))+" ",1),m(R,{to:r(v)("/contact"),class:"text-[#222] no-underline border-b border-[#222]/30 transition-colors duration-300 hover:border-b-[#222]"},{default:h(()=>[y(n(t.$t("login.contactUs")),1)]),_:1},8,["to"]),y(" "+n(t.$t("login.openAccount")),1)])])])])}}}),je=se(Ne,[["__scopeId","data-v-f13c471d"]]);export{je 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.