PageSourceSearch

https://www.trouwassistent.nl/assets/GastRegistratie-L0gA_Knz.js

js trouwassistent.nl collected 2026-09-24 14:25:33 UTC 12,300 bytes, 7 lines download raw bytes

1import{j as e}from"./ui-CYi4GrVi.js";import{u as a,k as s,a as t,d as n}from"./react-vendor-CG7WfdSN.js";import{c as i,e as r,g as l,h as o,j as c,l as m,B as d,H as x}from"./index-iEuQkT4g.js";import{I as g}from"./input-D19wRQsy.js";import{L as u}from"./label-DtQ4NHPq.js";import{A as h,a as p}from"./alert-BsDNiuWy.js";import{L as j}from"./Layout-Cy3bm5xy.js";import{w as b,i as f}from"./webGuestAuth-CiOoioY_.js";import{w as v}from"./webIpTracking-BBhXeZR7.js";import{A as k}from"./AppRequiredScreen-rK81XKGz.js";import{L as N}from"./loader-circle-BgawIOK8.js";import{C as w}from"./circle-alert-Bo6uDOOo.js";import{U as y}from"./user-DneGLozL.js";import{A as S}from"./arrow-left-xdX7vsSz.js";import"./supabase-BrKiwD5U.js";import"./charts-ChniAfy4.js";import"./Navigation-BOJEG9yf.js";import"./x-DgJiIU8E.js";import"./users-BiShniZR.js";
2/**
3 * @license lucide-react v0.462.0 - ISC
4 *
5 * This source code is licensed under the ISC license.
6 * See the LICENSE file in the root directory of this source tree.
7 */const C=i("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),G=()=>{const n=a(),[i]=s(),[d,x]=t.useState(!1),[g,u]=t.useState("loading"),[y,S]=t.useState(null),[C,G]=t.useState(""),[T,D]=t.useState(""),[P,V]=t.useState(""),[W,A]=t.useState(null),[R,B]=t.useState(null),[F,M]=t.useState(null),[K,U]=t.useState(null),_=t.useRef("");t.useEffect(()=>{J()},[]);const J=t.useCallback(async()=>{if(b.getCurrentSession())return void n("/uitnodiging-overzicht",{replace:!0});const e=i.get("token");e?(G(e),u("email")):u("token")},[i,n]),q=e=>{if(e.blockedRole)return M(e.blockedRole),A({name:e.weddingName}),void u("app-required");S(e.error)},I=async()=>{const e=C.trim();if(!e)return void S("Vul je uitnodigingslink in");x(!0),S(null);const a=b.extractTokenFromUrl(e);if(!a)return S("Geen geldige token gevonden in de link"),v.trackError("invalid_token_format",{input_length:e.length}),void x(!1);const s=await b.validateToken(a);x(!1),f(s)?q(s):(G(a),A(s.wedding),u("email"))};t.useEffect(()=>{U(null);const e=T.trim().toLowerCase();if("email"!==g||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return;const a=setTimeout(async()=>{_.current=e;const a=await b.checkEmailDomainWarning(e);_.current===e&&U(a)},500);return()=>clearTimeout(a)},[T,g]);const $=async e=>{const a=e?.name||T.split("@")[0]||"Gast",s=await b.loginExisting(C,T.trim().toLowerCase(),a);if(f(s))return q(s),B(null),x(!1),void v.trackGuestLogin(T,!1);v.trackGuestLogin(T,!0,e?.id),n("/uitnodiging-overzicht",{replace:!0})},H=async()=>{const e=P.trim();if(!e||e.length<2)return void S(e?"Naam moet minimaal 2 karakters zijn":"Vul je naam in");x(!0),S(null);const a=await b.createSession(C,e,T.trim().toLowerCase());if(f(a))return q(a),v.trackGuestRegistration(C,T,!1),void x(!1);v.trackGuestRegistration(C,T,!0),n("/uitnodiging-overzicht",{replace:!0})},O=()=>{S(null),B(null),"email"===g?(u("token"),A(null)):"name"===g&&u("email")},Q=(e,a)=>{"Enter"!==e.key||d||a()};if("app-required"===g&&F)return e.jsx(k,{role:F,weddingName:W?.name});if("loading"===g)return e.jsx(j,{className:"flex items-center justify-center min-h-[calc(100vh-96px)]",children:e.jsx(N,{className:"h-12 w-12 text-[#a2c4c9] animate-spin"})});const X=function(e,a){const s={token:{subtitle:"GAST LOGIN",title:"Welkom bij TrouwAssistent",description:"Voer je persoonlijke uitnodigingscode in om in te loggen."},email:{subtitle:"Wat leuk dat je bent uitgenodigd!",title:a?.name?`Uitnodiging voor ${a.name}`:"Uitnodiging",description:"Voer je email in om verder te gaan"},name:{subtitle:a?.name||"Bijna klaar",title:"Nog één stap!",description:"Vul je naam in zodat het bruidspaar weet wie er komt"}};return s[e]||{subtitle:"",title:"Welkom",description:""}}(g,W);return e.jsx(j,{className:"flex items-center justify-center min-h-[calc(100vh-96px)]",children:e.jsxs("div",{className:"w-full max-w-2xl px-4 py-16",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("span",{className:"text-sm tracking-[0.3em] uppercase text-[#8b9290] font-light mb-4 block",children:X.subtitle}),e.jsx("h1",{className:"text-4xl md:text-5xl font-medium text-[#2c2c2c] mb-5 font-d
7ancing leading-tight",children:X.title}),e.jsx("p",{className:"text-lg text-[#5a5a5a] max-w-xl mx-auto font-light leading-relaxed",children:X.description})]}),e.jsx("div",{className:"max-w-xl mx-auto mb-12",children:e.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-[#d4d4d4] to-transparent"})}),e.jsxs(r,{className:"border-0 shadow-xl bg-white",children:[e.jsxs(l,{className:"text-center",children:[e.jsxs(o,{className:"text-2xl font-dancing",children:["token"===g&&"Uitnodiging invoeren","email"===g&&"Email bevestigen","name"===g&&"Je gegevens"]}),e.jsxs(c,{className:"text-base mt-2",children:["token"===g&&"Plak hier je uitnodigingslink","email"===g&&"We controleren of je al bekend bent","name"===g&&"Deze informatie is alleen voor de gastenlijst"]})]}),e.jsxs(m,{className:"space-y-6",children:[y&&e.jsxs(h,{variant:"destructive",children:[e.jsx(w,{className:"h-4 w-4"}),e.jsx(p,{children:y})]}),"token"===g&&e.jsx(L,{token:C,setToken:G,onSubmit:I,onKeyPress:e=>Q(e,I),loading:d}),"email"===g&&e.jsx(z,{email:T,setEmail:D,onSubmit:async()=>{const e=T.trim().toLowerCase();if(!e||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return void S(e?"Vul een geldig e-mailadres in":"Vul je e-mailadres in");x(!0),S(null);const a=await b.checkGuestExists(C,e);if(f(a))return q(a),void x(!1);A(a.wedding),a.existingGuest?(B(a.existingGuest),await $(a.existingGuest)):(u("name"),x(!1))},onBack:O,emailWarning:K,loading:d,weddingData:W,existingGuest:R}),"name"===g&&e.jsx(E,{name:P,setName:V,onSubmit:H,onBack:O,onKeyPress:e=>Q(e,H),loading:d,weddingData:W})]})]}),e.jsx("div",{className:"mt-8 max-w-2xl mx-auto",children:e.jsxs("div",{className:"bg-gray-50/50 rounded-lg px-6 py-4 text-center border border-gray-100 shadow-md",children:[e.jsx("p",{className:"text-sm text-[#8b9290] leading-relaxed font-light",children:"Wil je alles uit de bruiloft halen? Download de app voor de volledige beleving."}),e.jsxs("div",{className:"mt-4 flex flex-col sm:flex-row gap-2 justify-center",children:[e.jsxs("a",{href:"https://apps.apple.com/nl/app/trouwassistent/id6758988622",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-5 py-2 bg-black text-white text-sm rounded-lg hover:bg-gray-800 transition-colors",children:[e.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),"App Store"]}),e.jsxs("a",{href:"https://play.google.com/store/apps/details?id=nl.trouwassistent.app&hl=nl",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-5 py-2 bg-[#8bb1b6] text-white text-sm rounded-lg hover:bg-[#a2c4c9] transition-colors",children:[e.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M3.18 23.76c.3.17.64.22.98.15l12.08-6.98-2.54-2.54-10.52 9.37zM.54 1.03C.2 1.38 0 1.94 0 2.67v18.67c0 .73.2 1.29.54 1.63l.09.08 10.46-10.46v-.25L.63.95l-.09.08zM20.38 10.43l-2.9-1.68-2.85 2.85 2.85 2.85 2.92-1.68c.83-.48.83-1.27-.02-1.34zM3.18.24l12.08 6.98-2.54 2.54L2.2.39c.34-.07.68-.02.98-.15z"})}),"Google Play"]})]})]})})]})})};const L=({token:a,setToken:s,onSubmit:t,onKeyPress:n,loading:i})=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(u,{htmlFor:"token",children:"Uitnodigingslink"}),e.jsx(g,{id:"token",type:"text",placeholder:"https://trouwassistent.nl/invite/...",value:a,onChange:e=>s(e.target.value),onKeyPress:n,className:"border-gray-200 focus:border-[#a2c4c9] focus:ring-[#a2c4c9]",disabled:i,autoFocus:!0}),e.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Plak de link die je hebt ontvangen, haal de link uit de QR-code óf vraag het bruidspaar om een kopieerbare link."})]}),e.jsxs(d,{onClick:t,className:"w-full bg-[#a2c4c9] hover:bg-[#8bb1b6] text-white",disabled:!a.trim()||i,children:[i?e.jsx(N,{className:"h-4 w-4 animate-spin mr-2"}):e.jsx(C,{className:"h-4 w-4 mr-2"}),"Controleren"]})]}),z=({email:a,setEmail:s,onSubmit:t,onBack:i,emailWarning:r,loading:l,weddingData:o,existingGuest:c})=>{const[m,x]=n.useState(!1);return e.jsxs("div",{className:"space-y-4",children:[o&&e.jsxs("div",{className:"bg-[#a2c4c9]/10 p-3 rounded-lg text-center",children:[e.jsx("p",{className:"font-semibold text-[#a2c4c9]",children:"✓ Geldige uitnodiging"}),e.jsx("p",{className:"font-bold text-gray-900",children:o.name})]}),c?e.jsxs("div",{className:"bg-green-50 p-4 rounded-lg text-center",children:[e.jsx(y,{className:"h-8 w-8 text-green-600 mx-auto mb-2"}),e.jsxs("p",{className:"font-medium text-green-800",children:["Welkom terug, ",c.name,"!"]}),e.jsx("p",{className:"text-sm text-green-600",children:"Je wordt ingelogd..."}),e.jsx(N,{className:"h-5 w-5 animate-spin mx-auto mt-2 text-green-600"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx(u,{htmlFor:"email",children:"E-mailadres"}),e.jsx(g,{id:"email",type:"email",placeholder:"[email protected]",value:a,onChange:e=>s(e.target.value),onKeyPress:e=>{"Enter"===e.key&&!l&&a.trim()&&m&&t()},className:"border-gray-200 focus:border-[#a2c4c9] focus:ring-[#a2c4c9]",disabled:l,autoFocus:!0}),e.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"We controleren of je al eerder bent geregistreerd"}),r&&e.jsxs("p",{className:"text-sm text-amber-600 flex items-center gap-1 mt-2",children:[e.jsx(w,{className:"h-3 w-3"}),r]})]}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:m,onChange:e=>x(e.target.checked),disabled:l,className:"mt-0.5 h-4 w-4 accent-[#a2c4c9] cursor-pointer"}),e.jsxs("span",{className:"text-sm text-gray-600 leading-snug",children:["Ik ga akkoord met de"," ",e.jsx("a",{href:"/voorwaarden",target:"_blank",rel:"noopener noreferrer",className:"text-[#a2c4c9] underline hover:text-[#8bb1b6]",children:"algemene voorwaarden"})," ","en het"," ",e.jsx("a",{href:"/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-[#a2c4c9] underline hover:text-[#8bb1b6]",children:"privacybeleid"})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(d,{onClick:i,variant:"outline",className:"flex-1",disabled:l,children:[e.jsx(S,{className:"h-4 w-4 mr-2"}),"Terug"]}),e.jsxs(d,{onClick:t,className:"flex-1 bg-[#a2c4c9] hover:bg-[#8bb1b6] text-white",disabled:!a.trim()||!m||l,children:[l?e.jsx(N,{className:"h-4 w-4 animate-spin mr-2"}):e.jsx(C,{className:"h-4 w-4 mr-2"}),"Volgende"]})]})]})]})},E=({name:a,setName:s,onSubmit:t,onBack:n,onKeyPress:i,loading:r,weddingData:l})=>e.jsxs("div",{className:"space-y-4",children:[l&&e.jsxs("div",{className:"bg-[#a2c4c9]/10 p-4 rounded-lg text-center",children:[e.jsx(x,{className:"h-8 w-8 text-[#a2c4c9] mx-auto mb-2"}),e.jsx("p",{className:"font-semibold",children:l.name}),l.date&&e.jsx("p",{className:"text-sm text-gray-600",children:new Date(l.date).toLocaleDateString("nl-NL",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]}),e.jsxs("div",{children:[e.jsx(u,{htmlFor:"name",children:"Voor- en achternaam"}),e.jsx(g,{id:"name",type:"text",placeholder:"Jan Jansen",value:a,onChange:e=>s(e.target.value),onKeyPress:i,className:"border-gray-200 focus:border-[#a2c4c9] focus:ring-[#a2c4c9]",disabled:r,autoF
7ocus:!0}),e.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Deze naam verschijnt bij je RSVP"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(d,{onClick:n,variant:"outline",className:"flex-1",disabled:r,children:[e.jsx(S,{className:"h-4 w-4 mr-2"}),"Terug"]}),e.jsxs(d,{onClick:t,className:"flex-1 bg-[#a2c4c9] hover:bg-[#8bb1b6] text-white",disabled:!a.trim()||r,children:[r?e.jsx(N,{className:"h-4 w-4 animate-spin mr-2"}):e.jsx(x,{className:"h-4 w-4 mr-2"}),"Naar de bruiloft!"]})]})]});export{G 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.