PageSourceSearch

https://seifertsystems.com/assets/DataPrivacy-jMkuKmZ3.js

js seifertsystems.com collected 2026-10-05 11:28:44 UTC 6,589 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-query-D6w8_4YY.js";import{r as g}from"./vendor-react-CQIO8BZL.js";import{a as S,b as k,f as T,u as E,n as O,g as i,h as c,i as l,j as m,k as d,B as h,s as o}from"./index-DyC8pbVh.js";import{A as R,a as _,b as L,c as q,d as I,e as U,f as B,g as H,h as F}from"./alert-dialog-BP6dZLhy.js";import{u as J}from"./vendor-router-CVEBbtK0.js";import{S as $}from"./shield-Dw7ae4C7.js";import{D as P}from"./download-D-poKGoh.js";import{T as z}from"./triangle-alert-D7prN-u3.js";import{T as G}from"./trash-2-DJoHFsU3.js";import"./vendor-supabase-BhlwQIoi.js";import"./vendor-ui-tooltip-Bpm2cZhw.js";import"./vendor-ui-dialog-dFuLu-uG.js";import"./vendor-ui-dropdown-D8-Koaje.js";import"./vendor-charts-DZw3pgZj.js";const ce=()=>{const{user:s}=S(),{toast:n}=k(),p=J(),{openSettings:N}=T(),{t:a}=E(),[u,j]=g.useState(!1),[v,y]=g.useState(!1),D=async()=>{if(s){j(!0);try{const{data:t}=await o.from("profiles").select("*").eq("id",s.id).single(),{data:x}=await o.from("user_roles").select("*").eq("user_id",s.id),{data:w}=await o.from("user_products").select("*").eq("user_id",s.id),C={user:{id:s.id,email:s.email,created_at:s.created_at},profile:t,roles:x,products:w,exported_at:new Date().toISOString()},A=new Blob([JSON.stringify(C,null,2)],{type:"application/json"}),f=URL.createObjectURL(A),r=document.createElement("a");r.href=f,r.download=`seifert-data-export-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(f),n({title:a("dataPrivacy.export.success"),description:a("dataPrivacy.export.successDesc")})}catch(t){console.error("Export error:",t),n({title:a("dataPrivacy.export.error"),description:a("dataPrivacy.export.errorDesc"),variant:"destructive"})}finally{j(!1)}}},b=async()=>{if(s){y(!0);try{const{data:t,error:x}=await o.functions.invoke("delete-user-account");if(x)throw x;await o.auth.signOut(),n({title:a("dataPrivacy.delete.success"),description:a("dataPrivacy.delete.successDesc")}),p("/")}catch(t){console.error("Delete error:",t),n({title:a("dataPrivacy.delete.error"),description:a("dataPrivacy.delete.errorDesc"),variant:"destructive"})}finally{y(!1)}}};return s?e.jsx("div",{className:"container mx-auto px-4 py-8",children:e.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-4xl font-bold mb-2",children:a("dataPrivacy.title")}),e.jsx("p",{className:"text-muted-foreground",children:a("dataPrivacy.description")})]}),e.jsxs(i,{children:[e.jsxs(c,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{className:"h-5 w-5"}),e.jsx(l,{children:a("dataPrivacy.cookies.title")})]}),e.jsx(m,{children:a("dataPrivacy.cookies.description")})]}),e.jsx(d,{children:e.jsx(h,{onClick:N,variant:"outline",children:a("dataPrivacy.cookies.open")})})]}),e.jsxs(i,{children:[e.jsxs(c,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{className:"h-5 w-5"}),e.jsx(l,{children:a("dataPrivacy.export.title")})]}),e.jsx(m,{children:a("dataPrivacy.export.description")})]}),e.jsxs(d,{className:"space-y-4",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.jsx("p",{className:"mb-2",children:a("dataPrivacy.export.includes")}),e.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[e.jsx("li",{children:a("dataPrivacy.export.profile")}),e.jsx("li",{children:a("dataPrivacy.export.account")}),e.jsx("li",{children:a("dataPrivacy.export.preferences")}),e.jsx("li",{children:a("dataPrivacy.export.roles")})]})]}),e.jsxs(h,{onClick:D,disabled:u,className:"w-full sm:w-auto",children:[e.jsx(P,{className:"h-4 w-4 mr-2"}),a(u?"dataPrivacy.export.exporting":"dataPrivacy.export.button")]})]})]}),e.jsxs(i,{className:"border-destructive",children:[e.jsxs(c,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"h-5 w-5 text-destructive"}),e.jsx(l,{children:a("dataPrivacy.delete.title")})]}),e.jsx(m,{children:a("dataPrivacy.delete.description")})]}),e.jsxs(d,{className:"space-y-4",children:[e.jsxs("div",{className:"bg-destructive/10 p-4 rounded-lg text-sm",children:[e.jsx("p",{className:"font-semibold text-destructive mb-2",children:a("dataPrivacy.delete.warning")}),e.jsx("p",{className:"text-muted-foreground",children:a("dataPrivacy.delete.willDelete")}),e.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1 text-muted-foreground",children:[e.jsx("li",{children:a("dataPrivacy.delete.account")}
1),e.jsx("li",{children:a("dataPrivacy.delete.profileData")}),e.jsx("li",{children:a("dataPrivacy.delete.savedPrefs")}),e.jsx("li",{children:a("dataPrivacy.delete.productAssoc")})]})]}),e.jsxs(R,{children:[e.jsx(_,{asChild:!0,children:e.jsxs(h,{variant:"destructive",className:"w-full sm:w-auto",children:[e.jsx(G,{className:"h-4 w-4 mr-2"}),a("dataPrivacy.delete.button")]})}),e.jsxs(L,{children:[e.jsxs(q,{children:[e.jsx(I,{children:a("dataPrivacy.delete.confirm.title")}),e.jsx(U,{children:a("dataPrivacy.delete.confirm.description")})]}),e.jsxs(B,{children:[e.jsx(H,{children:a("dataPrivacy.delete.confirm.cancel")}),e.jsx(F,{onClick:b,disabled:v,className:"bg-destructive hover:bg-destructive/90",children:a(v?"dataPrivacy.delete.deleting":"dataPrivacy.delete.confirm.yes")})]})]})]})]})]}),e.jsxs(i,{children:[e.jsx(c,{children:e.jsx(l,{children:a("dataPrivacy.rights.title")})}),e.jsxs(d,{className:"space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:a("dataPrivacy.rights.intro")}),e.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-4",children:[e.jsx("li",{children:a("dataPrivacy.rights.access")}),e.jsx("li",{children:a("dataPrivacy.rights.rectification")}),e.jsx("li",{children:a("dataPrivacy.rights.erasure")}),e.jsx("li",{children:a("dataPrivacy.rights.portability")}),e.jsx("li",{children:a("dataPrivacy.rights.object")})]}),e.jsxs("p",{className:"mt-4",children:[a("dataPrivacy.rights.contact"),e.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline ml-1",children:"[email protected]"})]})]})]})]})}):e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsx(O,{title:"Data Privacy | Seifert Systems",description:"Detailed data privacy information for visitors and customers of Seifert Systems.",path:"/data-privacy"}),e.jsxs(i,{children:[e.jsxs(c,{children:[e.jsx(l,{children:a("dataPrivacy.loginRequired")}),e.jsx(m,{children:a("dataPrivacy.loginRequiredDesc")})]}),e.jsx(d,{children:e.jsx(h,{onClick:()=>p("/auth"),children:a("dataPrivacy.goToLogin")})})]})]})};export{ce 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.