Files
boc/backups/2026-07-12-1023/landvex-prod/assets/VerifyIdentity-Ro09dKVe.js
T

7 lines
30 KiB
JavaScript
Raw Normal View History

import{o as pe,a as he,r as d,j as e,x as N,y as b,v as m,X as ge,w as P,u as ke,aP as je,aQ as ye,q as Ne}from"./index-oAPVDf-r.js";import{S as W}from"./shield-BWGzcrms.js";import{F as be}from"./file-text-CyDVAB5w.js";import{C as ve}from"./clock-DRtqJZUo.js";import{S as $}from"./SecureCamera-mAkOb0O2.js";import{C as _e}from"./credit-card-CfUVKCDe.js";import{A as Y}from"./arrow-left-m6EiMbb-.js";import{A as Se}from"./index-B-MEeiYV.js";import{C as Q}from"./circle-check-D3hjqUcb.js";import{R as we}from"./refresh-cw-DEBvxUr1.js";import{C as Ie}from"./circle-alert-C1Hs9zwh.js";import"./check-CG8zylH4.js";/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ce=pe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),De="1.0.0",ee="qz_anon_session_id";function Te(){let u=localStorage.getItem(ee);return u||(u=crypto.randomUUID(),localStorage.setItem(ee,u)),u}function Re({onConsent:u,onDecline:S}){const{t:k}=he(),[l,z]=d.useState(!1),[i,w]=d.useState(!1),[h,q]=d.useState(!1),[g,r]=d.useState(!1),U=async()=>{if(!g){P.error("Du måste bekräfta att du är minst 18 år");return}if(!h){P.error("Du måste godkänna villkoren för att fortsätta");return}w(!0);try{const f=localStorage.getItem("qz_token"),D={"Content-Type":"application/json"};f&&(D.Authorization=`Bearer ${f}`);const H={consent_type:"biometric_collection",text_version:De,retention_days:30};f||(H.anon_session_id=Te());const M=await fetch("https://api.quixzoom.com/api/qz/identity/consent",{method:"POST",headers:D,body:JSON.stringify(H)});if(!M.ok){const v=await M.json().catch(()=>({}));throw new Error(v.error??"Kunde inte spara samtycke")}const{consentRef:K}=await M.json();u(K)}catch(f){P.error(f.message)}finally{w(!1)}};return e.jsx("div",{className:"p-4 space-y-4",children:e.jsx(N,{className:"border-primary/30",children:e.jsxs(b,{className:"pt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(W,{className:"w-6 h-6 text-primary"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-semibold text-lg",children:"Samtycke till biometrisk insamling"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Krävs innan verifiering kan påbörjas"})]})]}),e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(be,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsxs("p",{children:[e.jsx("strong",{children:"Vad samlas in:"})," Foto på ID-handling (framsida) samt selfie för ansiktsmatchning."]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ve,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsxs("p",{children:[e.jsx("strong",{children:"Lagringstid:"})," Bilderna raderas automatiskt efter 30 dagar. Endast verifieringsresultatet (godkänd/nekad) sparas längre."]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(W,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsxs("p",{children:[e.jsx("strong",{children:"Rättslig grund:"})," Ditt uttryckliga samtycke (GDPR Art. 9.2.a). Du kan återkalla samtycket när som helst via dina kontoinställningar."]})]})]}),e.jsx("div",{className:"text-center",children:e.jsx("a",{href:"/identity-disclaimer",target:"_blank",className:"text-xs text-primary underline underline-offset-2",children:"Läs fullständiga villkor →"})}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:g,onChange:f=>r(f.target.checked),className:"mt-1 w-4 h-4"}),e.jsxs("span",{className:"text-sm font-medium",children:["Jag bekräftar att jag är minst ",e.jsx("strong",{children:"18 år"})," och har legal handlingsförmåga att ingå detta avtal."]})]}),e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:h,onChange:f=>q(f.target.checked),className:"mt-1 w-4 h-4"}),e.jsx("span",{className:"text-sm",children:"Jag förstår och samtycker till insamling och bearbetning av biometrisk data för identitetsverifiering enligt villkoren ovan."})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(m,{variant:"outline",onClick:S,className:"flex-1",disabled:i,children:[e.jsx(ge,{className:"w-4 h-4 mr-2"}),"Avböj"]}),e.jsx(m,{onClick:U,className:"flex-1",disabled:!g||!h||i,children:i?"Sparar...":"Godkänn och fortsätt →"})]})]})})})}const Ae="Svenska körkort: fotografera BAKSIDAN (streckkoden sitter där). Utländska körkort med MRZ: fotografera framsidan.",se=[{id:"pas