1import{_ as $}from"./3EBg3iUg.js";import{_ as j}from"./DL45NWz-.js";import{_ as z}from"./CTcA32qb.js";import{_ as G}from"./BCNY_h_o.js";import{f as O,u as W,c as H,s as J,t as B,y as p,C as t,D as o,v as e,z as b,E as _,B as r,G as T,P as q,I as x,H as v,M as c,J as h,i as F,b as K,x as n,T as Q}from"./D5MLA-hU.js";import{I as X}from"./Dv4Z5I8w.js";import{I as Y}from"./Dwacv551.js";import{I as Z}from"./DxIERjcP.js";import{I as ee}from"./smtibKhs.js";import{u as te}from"./CbqWd3-v.js";import"./B1_oImu8.js";import"./GhFrNfLP.js";import"./Dvq-jn9A.js";import"./D_rngVSp.js";import"./DA7qIMyu.js";import"./DeIXQDC2.js";import"./DnT6CYIS.js";import"./BsSRCWlq.js";(function(){try{var u=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new u.Error().stack;s&&(u._sentryDebugIds=u._sentryDebugIds||{},u._sentryDebugIds[s]="4f9ef83a-6596-487f-8da4-99e3829b7fb6",u._sentryDebugIdIdentifier="sentry-dbid-4f9ef83a-6596-487f-8da4-99e3829b7fb6")}catch{}})();const se={class:"display text-3xl text-ink-900 sm:text-4xl"},ae={class:"mt-2 text-base text-slate-500"},oe={key:0,class:"mt-6 rounded-xl border border-red-100 bg-red-50 px-4 py-3 text-sm text-red-700"},le={key:1,class:"mt-8 rounded-2xl border border-green-100 bg-green-50 px-5 py-6 text-center"},ne={class:"text-base font-semibold text-green-800"},re={class:"mt-2 text-sm text-green-700"},ie={key:2,class:"mt-8"},de={class:"my-5 flex items-center gap-3 text-xs font-medium uppercase tracking-wide text-slate-400"},ue={class:"hidden","aria-hidden":"true"},me={class:"text-sm font-semibold text-ink-900"},pe={class:"relative mt-2"},ce=["placeholder"],fe={class:"text-sm font-semibold text-ink-900"},be={class:"relative mt-2"},_e={class:"text-sm font-semibold text-ink-900"},xe={class:"relative mt-2"},ve=["placeholder"],he={class:"text-sm font-semibold text-ink-900"},ge={class:"relative mt-2"},ye=["disabled"],we={key:4,class:"mt-8 text-center text-sm text-slate-500"},D="w-full rounded-xl border border-slate-200 bg-white py-3 pl-11 pr-4 text-sm text-ink-900 placeholder:text-slate-400 transition-all focus:border-brand-400 focus:outline-none focus:ring-2 focus:ring-brand-100",ze=O({__name:"daftar",setup(u){const{t:s}=W(),L=Q();te({title:s("daftar.seoTitle"),description:s("daftar.seoDescription")});const{register:E}=H(),N=F(()=>!!K().public.googleClientId),g=n(""),f=n(""),y=n(""),w=n(""),k=n(""),I=n(""),U=n(),V=n(!1),i=n(""),m=n(!1),M=C=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(C);async function P(){if(i.value="",!M(f.value)){i.value=s("daftar.invalidEmail");return}V.value=!0;try{await E({name:g.value,email:f.value,password:w.value,mobile:y.value||void 0},{turnstile:I.value,honeypot:k.value}),m.value=!0,L("CompleteRegistration",{method:"email"})}catch(C){const a=C,d=a.data?.errors;d?.email&&Object.keys(d).length===1?m.value=!0:(i.value=d?Object.values(d)[0]?.[0]??"":"",i.value||=a.data?.message||s("daftar.failed")),U.value?.reset()}finally{V.value=!1}}return(C,a)=>{const d=$,S=j,A=z,R=G;return p(),J(R,null,{default:B(()=>[t("h1",se,o(e(s)("daftar.title")),1),t("p",ae,o(e(s)("daftar.subtitle")),1),e(i)?(p(),b("p",oe,o(e(i)),1)):_("",!0),e(m)?(p(),b("div",le,[t("p",ne,o(e(s)("daftar.activateTitle")),1),t("p",re,o(e(s)("daftar.activateBody")),1),r(d,{to:"/masuk",class:"mt-5 inline-block rounded-full bg-brand-500 px-6 py-3 text-sm font-semibold text-white transition-colors hover:bg-brand-600"},{default:B(()=>[T(o(e(s)("daftar.activateLogin")),1)]),_:1})])):_("",!0),e(N)&&!e(m)?(p(),b("div",ie,[r(S,{onError:a[0]||(a[0]=l=>i.value=l)}),t("div",de,[a[7]||(a[7]=t("span",{class:"h-px flex-1 bg-slate-100"},null,-1)),T(" "+o(e(s)("masuk.orDivider"))+" ",1),a[8]||(a[8]=t("span",{class:"h-px flex-1 bg-slate-100"},null,-1))])])):_("",!0),e(m)?_("",!0):(p(),b("form",{key:3,class:x(["space-y-4",!e(N)&&"mt-8"]),onSubmit:q(P,["prevent"])},[t("div",ue,[v(t("input",{"onUpdate:modelValue":a[1]||(a[1]=l=>c(k)?k.value=l:null),type:"text",tabindex:"-1",autocomplete:"off","data-lpignore":"true","data-1p-ignore":"true","data-form-type":"other"},null,512),[[h,e(k)]])]),t("div",null,[t("label",me,o(e(s)("daftar.fullNameLabel")),1),t("div",pe,[r(e(ee),{class:"pointer-events-none absolute left-3.5 to
1p-1/2 h-4.5 w-4.5 -translate-y-1/2 text-slate-400"}),v(t("input",{"onUpdate:modelValue":a[2]||(a[2]=l=>c(g)?g.value=l:null),type:"text",autocomplete:"name",placeholder:e(s)("daftar.fullNamePlaceholder"),class:x(D)},null,8,ce),[[h,e(g)]])])]),t("div",null,[t("label",fe,o(e(s)("daftar.emailLabel")),1),t("div",be,[r(e(Z),{class:"pointer-events-none absolute left-3.5 top-1/2 h-4.5 w-4.5 -translate-y-1/2 text-slate-400"}),v(t("input",{"onUpdate:modelValue":a[3]||(a[3]=l=>c(f)?f.value=l:null),type:"email",autocomplete:"email",placeholder:"[email protected]",class:x(D)},null,512),[[h,e(f)]])])]),t("div",null,[t("label",_e,o(e(s)("daftar.whatsappLabel")),1),t("div",xe,[r(e(X),{class:"pointer-events-none absolute left-3.5 top-1/2 h-4.5 w-4.5 -translate-y-1/2 text-slate-400"}),v(t("input",{"onUpdate:modelValue":a[4]||(a[4]=l=>c(y)?y.value=l:null),type:"tel",inputmode:"tel",autocomplete:"tel",placeholder:e(s)("common.phonePlaceholder"),class:x(D)},null,8,ve),[[h,e(y)]])])]),t("div",null,[t("label",he,o(e(s)("daftar.passwordLabel")),1),t("div",ge,[r(e(Y),{class:"pointer-events-none absolute left-3.5 top-1/2 h-4.5 w-4.5 -translate-y-1/2 text-slate-400"}),v(t("input",{"onUpdate:modelValue":a[5]||(a[5]=l=>c(w)?w.value=l:null),type:"password",autocomplete:"new-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",class:x(D)},null,512),[[h,e(w)]])])]),r(A,{ref_key:"turnstile",ref:U,modelValue:e(I),"onUpdate:modelValue":a[6]||(a[6]=l=>c(I)?I.value=l:null)},null,8,["modelValue"]),t("button",{type:"submit",disabled:e(V),class:"w-full rounded-full bg-brand-500 px-6 py-3.5 text-base font-semibold text-white shadow-lg shadow-brand-500/25 transition-all duration-300 hover:bg-brand-600 hover:shadow-brand-600/30 disabled:opacity-60 disabled:shadow-none"},o(e(V)?e(s)("auth.processing"):e(s)("daftar.submit")),9,ye)],34)),e(m)?_("",!0):(p(),b("p",we,[T(o(e(s)("daftar.haveAccount"))+" ",1),r(d,{to:"/masuk",class:"font-semibold text-brand-600 hover:underline"},{default:B(()=>[T(o(e(s)("daftar.login")),1)]),_:1})]))]),_:1})}}});
1export{ze 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.