PageSourceSearch

https://foundervillage.xyz/assets/kyc-Co-sHq5D.js

js foundervillage.xyz collected 2026-10-05 08:52:58 UTC 6,532 bytes, 1 lines download raw bytes

1import{e as y,a as j,u as N,r as n,j as e,L as S,A as f}from"./index-PlZrRKaG.js";import{l as C}from"./logo-AprPGqdc.js";import{f as p}from"./access-landing-DXDqPkvJ.js";import{L as E}from"./log-out-Bhu4phrC.js";import{S as q}from"./shield-check-D1B-sRQo.js";import{C as M}from"./circle-check-D07pbR88.js";import{L as V}from"./loader-circle-DZtnW1Ow.js";import{A as L}from"./arrow-right-DMxNxj6W.js";const F=[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]],D=y("id-card",F);const I=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 9h.01",key:"x1ddxp"}]],T=y("scan-face",I);async function g(i,o){const t=await fetch("/api/founder-village/kyc",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","x-fv-csrf":o},body:JSON.stringify({operation:i})}),a=await t.json().catch(()=>({}));if(!t.ok)throw new Error(String(a.error||"Identity verification unavailable."));return a}function P(){const i=j(),{user:o,session:t,loading:a,signOut:v}=N(),[c,d]=n.useState(null),[b,w]=n.useState(t?.access.kyc.status||"required"),[h,l]=n.useState("");async function m(){if(t){d("status"),l("");try{const r=await f();if(!r)throw new Error("Your Klaus session expired. Sign in again.");const s=await g("status",r.csrfToken);if(w(s.status||"required"),s.status==="verified"||s.required===!1){const u=await f();u&&await i({to:p(u),replace:!0})}}catch(r){l(r instanceof Error?r.message:"Could not check verification status.")}finally{d(null)}}}n.useEffect(()=>{!a&&(!o||!t)?i({to:"/login",replace:!0}):!a&&t&&(!t.access.kyc.required||t.access.kyc.status==="verified")&&i({to:p(t),replace:!0})},[a,i,t,o]),n.useEffect(()=>{new URLSearchParams(window.location.search).get("returned")==="1"&&m()},[t?.id]);async function k(){if(t){d("start"),l("");try{const r=await f();if(!r)throw new Error("Your Klaus session expired. Sign in again.");const s=await g("start",r.csrfToken);if(s.status==="verified"||s.required===!1){await m();return}if(!s.url)throw new Error("Didit did not return a verification link.");window.location.assign(s.url)}catch(r){l(r instanceof Error?r.message:"Could not start identity verification."),d(null)}}}if(a||!t||!o)return e.jsx("main",{className:"flex min-h-screen items-center justify-center bg-background text-muted-foreground",children:"Checking your account…"});const x=b==="in_review";return e.jsx("main",{className:"min-h-screen bg-background px-5 py-6 text-foreground sm:px-8",children:e.jsxs("div",{className:"mx-auto flex min-h-[calc(100vh-3rem)] max-w-4xl flex-col",children:[e.jsxs("header",{className:"flex items-center justify-between gap-4",children:[e.jsx(S,{to:"/","aria-label":"Founder Village home",children:e.jsx("img",{src:C,alt:"Founder Village",className:"h-8 w-auto sm:h-9"})}),e.jsxs("button",{type:"button",onClick:()=>{v().then(()=>i({to:"/login"}))},className:"inline-flex items-center gap-2 rounded-full border border-border px-4 py-2 text-sm text-muted-foreground hover:border-primary/50 hover:text-foreground",children:[e.jsx(E,{className:"h-4 w-4"})," Sign out"]})]}),e.jsxs("section",{className:"my-auto grid overflow-hidden rounded-[2rem] border border-border bg-card shadow-2xl shadow-black/10 lg:grid-cols-[1.05fr_.95fr]",children:[e.jsxs("div",{className:"bg-primary/10 p-7 sm:p-10 lg:p-12",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 text-xs font-semibold uppercase tracking-[0.18em] text-primary",children:[e.jsx(q,{className:"h-4 w-4"})," One-time identity check"]}),e.jsxs("h1",{className:"mt-5 font-heading text-5xl uppercase leading-none sm:text-7xl",children:["Verify once.",e.jsx("br",{}),"Enter the village."]}),e.jsx("p",{className:"mt-6 max-w-xl text-base leading-7 text-muted-foreground",children:"Founder Village requires identity verification for every new account. The secure check is completed with Didit and normally takes only a few minutes."})]}),e.jsxs("div",{className:"flex flex-col justify-center p-7 sm:p-10 lg:p-12",children:[e.jsx("div",{className:"space-y-4",children:[{icon:D,title:"Government ID",copy:"Photograph a supp
1orted identity document."},{icon:T,title:"Quick face check",copy:"Confirm liveness and match your ID photo."},{icon:M,title:"Return automatically",copy:"Come back here to unlock your approved access."}].map(({icon:r,title:s,copy:u})=>e.jsxs("div",{className:"flex gap-4 rounded-2xl border border-border bg-background/45 p-4",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/12 text-primary",children:e.jsx(r,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold",children:s}),e.jsx("p",{className:"mt-1 text-sm leading-5 text-muted-foreground",children:u})]})]},s))}),h&&e.jsx("p",{role:"alert",className:"mt-5 rounded-xl border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:h}),x&&e.jsx("p",{className:"mt-5 rounded-xl border border-primary/30 bg-primary/10 px-4 py-3 text-sm text-foreground",children:"Your verification is being reviewed. This page will unlock after Didit approves it."}),e.jsx("button",{type:"button",disabled:!!c,onClick:()=>{k()},className:"mt-6 inline-flex h-12 w-full items-center justify-center gap-2 rounded-full bg-gradient-orange px-6 font-semibold text-primary-foreground shadow-glow disabled:opacity-50",children:c==="start"?e.jsx(V,{className:"h-4 w-4 animate-spin"}):e.jsxs(e.Fragment,{children:[x?"Continue verification":"Start secure verification",e.jsx(L,{className:"h-4 w-4"})]})}),e.jsx("button",{type:"button",disabled:!!c,onClick:()=>{m()},className:"mt-3 h-11 w-full rounded-full border border-border text-sm font-medium text-muted-foreground hover:border-primary/50 hover:text-foreground disabled:opacity-50",children:c==="status"?"Checking…":"I already finished — check status"}),e.jsx("p",{className:"mt-4 text-center text-xs leading-5 text-muted-foreground",children:"Your identity document and biometric images stay with Didit. Founder Village stores only the verification status and provider session reference."})]})]})]})})}export{P as component};

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.