PageSourceSearch

https://pblfg.com/assets/UsersTab-COsonv0h.js

js pblfg.com collected 2026-10-02 01:41:05 UTC 20,463 bytes, 2 lines download raw bytes

1import{j as e,r as o}from"./react-vendor-Q2BSRknM.js";import{a as fe,u as D,b as Ne}from"./query-BLOP9k_M.js";import{c as be,ab as we,D as Se,j as Ce,k as _e,m as ke,h as Q,B as A,V as De,A as re,x as ie,y as ne,z as R,E as P,F as V,G as K,H as G,R as W,I as le,s as u,J as ce,K as de,L as oe,N as me,O as w,C as Ae,Q as xe}from"./index-BgCZMvjj.js";import{A as Te}from"./Admin-DT4yhGlz.js";import{S as M}from"./StatCard-Dtpq7xIi.js";import{a4 as X,aj as k,i as Y,n as ee,u as qe,aw as se,L as $,bD as Ee,a6 as Fe,aW as he,T as z,aE as ue,bu as B,w as Ue,aR as Oe}from"./lucide-Ckh7y__x.js";import"./scroll-area-Dq0_GnWM.js";import"./capacitor-DSpR9wll.js";import"./ui-radix-DzQ_orwq.js";import"./supabase-DoZmW4Yf.js";import"./date-utils-DaNoSKVa.js";function Le({icon:b,title:_,description:r,action:f,className:j}){return e.jsxs("div",{className:be("flex flex-col items-center justify-center py-12 text-center",j),children:[b&&e.jsx("div",{className:"p-3 rounded-full bg-muted mb-4",children:e.jsx(b,{className:"h-6 w-6 text-muted-foreground"})}),e.jsx("h3",{className:"text-lg font-medium mb-1",children:_}),r&&e.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mb-4",children:r}),f]})}function Re({open:b,onClose:_,userId:r,userEmail:f}){const[j,I]=o.useState(!1),[S,U]=o.useState(1),[m,O]=o.useState(""),[C,T]=o.useState(!1),[v,J]=o.useState(1),[y,q]=o.useState(""),{toast:c}=we(),d=fe(),{data:x,isLoading:L}=D({queryKey:["user-profile",r],queryFn:async()=>{const{data:t,error:n}=await u.from("profiles").select("*").eq("id",r).maybeSingle();if(n)throw n;return t},enabled:b&&!!r}),{data:g,isLoading:H}=D({queryKey:["user-admin-status",r],queryFn:async()=>{const{data:t,error:n}=await u.from("user_roles").select("role").eq("user_id",r).eq("role","admin").maybeSingle();if(n)throw n;return!!t},enabled:b&&!!r}),{data:s=[]}=D({queryKey:["verified-users-setting"],queryFn:async()=>{const{data:t}=await u.from("app_settings").select("value").eq("key","verified_users").maybeSingle();try{return t!=null&&t.value?JSON.parse(t.value):[]}catch{return[]}},enabled:b}),a=s.includes(r),[i,l]=o.useState(!1),p=async()=>{l(!0);try{const t=a?s.filter(N=>N!==r):[...s,r],{error:n}=await u.from("app_settings").upsert({key:"verified_users",value:JSON.stringify(t)},{onConflict:"key"});if(n)throw n;await d.invalidateQueries({queryKey:["verified-users-setting"]}),await d.invalidateQueries({queryKey:["verified-users"]}),c({title:a?"Verification removed":"User verified",description:f})}catch(t){c({title:"Failed to update verification",description:t==null?void 0:t.message,variant:"destructive"})}finally{l(!1)}},{data:h=[]}=D({queryKey:["pickem-hidden-users-setting"],queryFn:async()=>{const{data:t}=await u.from("app_settings").select("value").eq("key","pickem_hidden_users").maybeSingle();try{return t!=null&&t.value?JSON.parse(t.value):[]}catch{return[]}},enabled:b}),Z=h.includes(r),[pe,te]=o.useState(!1),ge=async()=>{te(!0);try{const t=Z?h.filter(N=>N!==r):[...h,r],{error:n}=await u.from("app_settings").upsert({key:"pickem_hidden_users",value:JSON.stringify(t)},{onConflict:"key"});if(n)throw n;await d.invalidateQueries({queryKey:["pickem-hidden-users-setting"]}),await d.invalidateQueries({queryKey:["pickem-hidden-users"]}),c({title:Z?"User now visible in Pick'em":"User hidden from Pick'em",description:f})}catch(t){c({title:"Failed to update",description:t==null?void 0:t.message,variant:"destructive"})}finally{te(!1)}},je=async()=>{if(y==="CONFIRM"){T(!0);try{if(g){const{error:t}=await u.from("user_roles").delete().eq("user_id",r).eq("role","admin");if(t)throw t;c({title:"Admin removed",description:`${f} is no longer an admin`})}else{const{error:t}=await u.from("user_roles").insert({user_id:r,role:"admin"});if(t)throw t;c({title:"Admin granted",description:`${f} is now an admin`})}d.invalidateQueries({queryKey:["user-admin-status",r]}),d.invalidateQueries({queryKey:["admin-users"]}),E()}catch(t){const n=t instanceof Error?t.message:"Failed to update role";c({title:"Error",description:n,variant:"destructive"})}finally{T(!1)}}},E=()=>{J(1),q("")},ve=async()=>{var t;if(m==="DELETE"){I(!0);try{const{data:n}=await u.auth.getSession(),{data:N,error:ae}=await u.functions.invoke("delete-user",{body:{userId:r},headers:{Authorization:`Bearer ${(t=n.session)==null?void 0:t.access_token}`}});if(ae)throw ae;if(N!=null&&N.error)throw new Error(N.error);c({title:"User deleted",description:`${f} has been removed`}),d.invalidateQueries({queryKey:["admin-users"]}),F(),_()}catch(n){const N=n instanceof Error?n.message:"Failed to delete user";c({title:"Error",description:N,variant:"destructive"})}finally{I(!1)}}},F=()=>{U(1),O("")},ye=t=>new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return e.jsx(Se,{open:b,onOpenChange:t=>{t||(F(),E(),_())},children:e.jsxs(Ce,{className:"max-w-xs sm:max-w-sm p-4",children:[e.jsx(_e,{className:"pb-2",children:e.jsxs(ke,{className:"flex items-center gap-2 text-sm font-medium",children:[e.jsx(X,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"truncate",children:f}),g&&e.jsxs(Q,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-5 border-amber-500/50 text-amber-500",children:[e.jsx(k,{className:"h-2.5 w-2.5 mr-0.5"}),"Admin"]})]})}),L||H?e.jsx("div",{className:"flex items-center justify-center py-8",children:e.jsx("div",{className:"h-5 w-5 border-2 border-primary border-t-transparent roun
1ded-full animate-spin"})}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(Y,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Joined"})]}),e.jsx("span",{className:"text-xs font-medium",children:x!=null&&x.created_at?ye(x.created_at):"Unknown"})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Notifications"})]}),x!=null&&x.notifications_enabled?e.jsx(Q,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-5 border-green-500/50 text-green-500",children:"On"}):e.jsx(Q,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-5",children:"Off"})]}),(x==null?void 0:x.quiet_hours_enabled)&&e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(qe,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Quiet Hours"})]}),e.jsxs("span",{className:"text-xs font-medium",children:[x.quiet_hours_start," – ",x.quiet_hours_end]})]})]}),e.jsx("div",{className:"pt-2",children:e.jsxs("div",{className:"rounded-md border border-blue-500/30 bg-blue-500/5 p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-blue-500 mb-2",children:[e.jsx(se,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs font-medium",children:"Verified User"})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground mb-3 leading-relaxed",children:a?"This user is verified and shows the blue checkmark across the app.":"Mark this user as verified to display the blue checkmark next to their name."}),e.jsxs(A,{variant:a?"outline":"default",size:"sm",className:`w-full h-8 text-xs ${a?"":"bg-blue-500 hover:bg-blue-600 text-white"}`,onClick:p,disabled:i,children:[i?e.jsx($,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):a?e.jsx(Ee,{className:"h-3.5 w-3.5 mr-1.5"}):e.jsx(se,{className:"h-3.5 w-3.5 mr-1.5"}),a?"Remove Verification":"Verify User"]})]})}),e.jsx("div",{className:"pt-2",children:e.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[e.jsx(Fe,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs font-medium",children:"Hide from public Pick'em"})]}),e.jsx(De,{checked:Z,onCheckedChange:ge,disabled:pe})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground mt-2 leading-relaxed",children:"Removes this user from leaderboards, comparison tools, friend feeds, and public profile views. They can still pick and vote — only other users won't see their activity. Pro players linked to a player profile are auto-hidden."})]})}),e.jsx("div",{className:"pt-2",children:e.jsxs("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/5 p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-amber-500 mb-2",children:[e.jsx(k,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs font-medium",children:"Admin Privileges"})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground mb-3 leading-relaxed",children:g?"This user has admin access to the console.":"Grant admin access to this user."}),e.jsxs(re,{onOpenChange:t=>!t&&E(),children:[e.jsx(ie,{asChild:!0,children:e.jsx(A,{variant:g?"outline":"default",size:"sm",className:`w-full h-8 text-xs ${g?"":"bg-amber-500 hover:bg-amber-600 text-white"}`,disabled:C,children:g?e.jsxs(e.Fragment,{children:[e.jsx(k,{className:"h-3.5 w-3.5 mr-1.5"}),"Remove Admin"]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"h-3.5 w-3.5 mr-1.5"}),"Grant Admin"]})})}),e.jsx(ne,{className:"max-w-xs sm:max-w-sm p-4",children:v===1?e.jsxs(e.Fragment,{children:[e.jsxs(R,{className:"space-y-2",children:[e.jsxs(P,{className:"flex items-center gap-2 text-sm text-amber-500",children:[e.jsx(k,{className:"h-4 w-4"}),g?"Remove Admin Access":"Grant Admin Access"]}),e.jsxs(V,{className:"text-xs space-y-2",children:[e.jsx("p",{children:g?e.jsxs(e.Fragment,{children:["Remove admin privileges from ",e.jsx("strong",{className:"text-foreground",children:f}),"?"]}):e.jsxs(e.Fragment,{children:["Grant admin privileges to ",e.jsx("strong",{className:"text-foreground",children:f}),"?"]})}),e.jsx("p",{className:"text-muted-foreground",children:g?"They will lose access to the admin console.":"They will have full access to the admin console."})]})]}),e.jsxs(K,{className:"gap-2 sm:gap-0",children:[e.jsx(G,{className:"h-8 text-xs",onClick:E,children:"Cancel"}),e.jsx(A,{variant:"default",size:"sm",className:"h-8 text-xs bg-amber-500 hover:bg-amber-600 text-white",onClick:()=>J(2),children:"Continue"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(R,{className:"space-y-2",children:[e.jsxs(P,{className:"flex items-center gap-2 text-sm text-amber-500",children:[e.jsx(k,{className:"h-4 w-4"}),"Final Confirmation"]}),e.jsxs(V,{className:"text-xs space-y-3",children:[e.jsxs("p",{children:["Type ",e.jsx("strong",{className:"text-foreground font-mono",children:"CONFIRM"})," to proceed:"]}),e.jsx(W,{value:y,onChange:t=>q(t.target.value.toUpperCase()),placeholder:"CONFIRM",className:"h-8 text-xs font-mono",autoComplete:"off"})]})]}),e.jsxs(K,{className:"gap-2 sm:gap-0",children:[e.jsx(G,{className:"h-8 text-xs",onClick:E,children:"Cancel"}),e.jsxs(le,{onClick:je,disabled:y!=="CONFIRM"||C,className:"h-8 text-xs bg-amber-500 hover:bg-amber-600 text-white",children:[C?e.jsx($,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):e.jsx(he,{className:"h-3.5 w-3.5 mr-1.5"}),g?"Remove Admin":"Grant Admin"]})]})]})})]})]})}),e.jsx("div",{className:"pt-2",children:e.jsxs("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-destructive mb-2",children:[e.jsx(z,{className:"h-3.5 w-3.5"}),e.jsx("span",{className:"text-xs font-medium",children:"Danger Zone"})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground mb-3 leading-relaxed",children:"Permanently delete this account and all data."}),e.jsxs(re,{onOpenChange:t=>!t&&F(),children:[e.jsx(ie,{asChild:!0,children:e.jsxs(A,{variant:"destructive",size:"sm",className:"w-full h-8 text-xs",disabled:j,children:[e.jsx(ue,{className:"h-3.5 w-3.5 mr-1.5"}),"Delete User"]})}),e.jsx(ne,{className:"max-w-xs sm:max-w-sm p-4",children:S===1?e.jsxs(e.Fragment,{children:[e.jsxs(R,{className:"space-y-2",children:[e.jsxs(P,{className:"flex items-center gap-2 text-sm text-destructive",children:[e.jsx(z,{className:"h-4 w-4"}),"Confirm Deletion"]}),e.jsxs(V,{className:"text-xs space-y-2",children:[e.jsxs("p",{children:["Delete ",e.jsx("strong",{className:"text-foreground",children:f}),"?"]}),e.jsx("p",{className:"text-muted-foreground",children:"This removes their account, preferences, tokens, and history."})]})]}),e.jsxs(K,{className:"gap-2 sm:gap-0",children:[e.jsx(G,{className:"h-8 text-xs",onClick:F,children:"Cancel"}),e.jsx(A,{variant:"destructive",size:"sm",className:"h-8 text-xs",onClick:()=>U(2),children:"Continue"})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(R,{className:"space-y-2",children:[e.jsxs(P,{className:"flex items-center gap-2 text-sm text-destructive",children:[e.jsx(z,{className:"h-4 w-4"}),"Final Confirmation"]}),e.jsxs(V,{className:"text-xs space-y-3",children:[e.jsxs("p",{children:["Type ",e.jsx("strong",{className:"text-foreground font-mono",children:"DELETE"})," to confirm:"]}),e.jsx(W,{value:m,onChange:t=>O(t.target.value.toUpperCase()),placeholder:"DELETE",className:"h-8 text-xs font-mono",autoComplete:"off"})]})]}),e.jsxs(K,{className:"gap-2 sm:gap-0",children:[e.jsx(G,{className:"h-8 text-xs",onClick:F,children:"Cancel"}),e.jsxs(le,{onClick:ve,disabled:m!=="DELETE"||j,className:"h-8 text-xs bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[j?e.jsx($,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):e.jsx(ue,{className:"h-3.5 w-3.5 mr-1.5"}),"Delete Forever"]})]})]})})]})]})})]})]})})}const ze=o.memo(function(){const _=fe(),[r,f]=o.useState(""),[j,I]=o.use
1State("all"),[S,U]=o.useState("all"),[m,O]=o.useState("all"),[C,T]=o.useState(null),{data:v=[],isLoading:J}=D({queryKey:["admin-users"],queryFn:async()=>{const a=[];let i=0;for(;;){const{data:l,error:p}=await u.from("profiles").select("id, email, display_name, notifications_enabled, created_at, updated_at").order("created_at",{ascending:!1}).range(i,i+1e3-1);if(p)throw p;if(!l||l.length===0||(a.push(...l),l.length<1e3))break;i+=1e3}return a},staleTime:3e4}),{data:y=new Set}=D({queryKey:["admin-push-registered-ids"],queryFn:async()=>{const a=new Set;let i=0;for(;;){const{data:l,error:p}=await u.from("device_tokens").select("user_id").order("id",{ascending:!0}).range(i,i+1e3-1);if(p)throw p;if(!l||l.length===0)break;for(const h of l)h.user_id&&a.add(h.user_id);if(l.length<1e3)break;i+=1e3}return a},staleTime:3e4}),{data:q=[]}=D({queryKey:["verified-users-admin"],queryFn:async()=>{const{data:s}=await u.from("app_settings").select("value").eq("key","verified_users").maybeSingle();if(!(s!=null&&s.value))return[];try{return JSON.parse(s.value)}catch{return[]}},staleTime:3e4}),c=o.useMemo(()=>new Set(q),[q]);Ne({mutationFn:async s=>{const{error:a}=await u.from("app_settings").update({value:JSON.stringify(s),updated_at:new Date().toISOString()}).eq("key","verified_users");if(a)throw a},onSuccess:()=>{_.invalidateQueries({queryKey:["verified-users-admin"]}),_.invalidateQueries({queryKey:["verified-users"]})}});const d=o.useMemo(()=>{let s=v;if(r){const a=r.toLowerCase();s=s.filter(i=>i.email.toLowerCase().includes(a)||(i.display_name||"").toLowerCase().includes(a))}if(j==="enabled"?s=s.filter(a=>y.has(a.id)):j==="disabled"&&(s=s.filter(a=>!y.has(a.id))),S==="verified"?s=s.filter(a=>c.has(a.id)):S==="unverified"&&(s=s.filter(a=>!c.has(a.id))),m==="7d"||m==="30d"||m==="90d"){const a=Date.now(),l={"7d":7*24*60*60*1e3,"30d":30*24*60*60*1e3,"90d":90*24*60*60*1e3}[m];s=s.filter(p=>a-new Date(p.created_at).getTime()<l)}else m==="newest"?s=[...s].sort((a,i)=>new Date(i.created_at).getTime()-new Date(a.created_at).getTime()):m==="oldest"&&(s=[...s].sort((a,i)=>new Date(a.created_at).getTime()-new Date(i.created_at).getTime()));return s},[v,r,j,S,m,y,c]),x=async s=>{if(!s||s.length===0){xe.error("No user data to export");return}const a=[["Email","Display Name","Push Registered","Verified","Created At"],...s.map(h=>[h.email,h.display_name||"",String(y.has(h.id)),String(c.has(h.id)),new Date(h.created_at).toISOString()])].map(h=>h.join(",")).join(`
2`),i=new Blob([a],{type:"text/csv"}),l=window.URL.createObjectURL(i),p=document.createElement("a");p.href=l,p.download=`users-export-${new Date().toISOString().split("T")[0]}.csv`,p.click(),window.URL.revokeObjectURL(l),xe.success(`Exported ${s.length} users`)},L=v.filter(s=>y.has(s.id)).length;v.length-L;const g=v.filter(s=>Date.now()-new Date(s.created_at).getTime()<7*24*60*60*1e3).length,H=v.filter(s=>c.has(s.id)).length;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs(Te,{title:"User Management",icon:B,headerAction:e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:e.jsxs(A,{onClick:()=>x(d),variant:"outline",size:"sm",children:[e.jsx(Oe,{className:"w-4 h-4 mr-1"}),"Export ",d.length!==v.length?`(${d.length})`:"All"]})}),children:[e.jsxs("div",{className:"grid gap-3 grid-cols-2 md:grid-cols-4 mb-6",children:[e.jsx(M,{label:"Total Users",value:v.length,icon:X,variant:"blue"}),e.jsx(M,{label:"Push Registered",value:L,icon:ee,variant:"green"}),e.jsx(M,{label:"Verified",value:H,icon:k,variant:"purple"}),e.jsx(M,{label:"New (7 days)",value:g,icon:Y,variant:"purple"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4 pb-4 border-b",children:[e.jsx("div",{className:"flex-1 min-w-[200px] max-w-md",children:e.jsxs("div",{className:"relative",children:[e.jsx(Ue,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(W,{value:r,onChange:s=>f(s.target.value),placeholder:"Search by email or display name...",className:"pl-9"})]})}),e.jsxs(ce,{value:S,onValueChange:s=>U(s),children:[e.jsxs(de,{className:"w-[160px]",children:[e.jsx(k,{className:"h-4 w-4 mr-2"}),e.jsx(oe,{placeholder:"Verified"})]}),e.jsxs(me,{children:[e.jsx(w,{value:"all",children:"All Users"}),e.jsx(w,{value:"verified",children:"Verified Only"}),e.jsx(w,{value:"unverified",children:"Unverified Only"})]})]}),e.jsxs(ce,{value:m,onValueChange:s=>O(s),children:[e.jsxs(de,{className:"w-[140px]",children:[e.jsx(Y,{className:"h-4 w-4 mr-2"}),e.jsx(oe,{placeholder:"Join Date"})]}),e.jsxs(me,{children:[e.jsx(w,{value:"all",children:"All Time"}),e.jsx(w,{value:"newest",children:"Newest First"}),e.jsx(w,{value:"oldest",children:"Oldest First"}),e.jsx(w,{value:"7d",children:"Last 7 Days"}),e.jsx(w,{value:"30d",children:"Last 30 Days"}),e.jsx(w,{value:"90d",children:"Last 90 Days"})]})]})]}),d.length>0?e.jsxs("div",{children:[e.jsxs("h3",{className:"font-semibold mb-3 text-lg flex items-center gap-2",children:[e.jsx(B,{className:"h-5 w-5"}),"Users (",d.length,")"]}),e.jsxs("div",{className:"space-y-2 max-h-[500px] overflow-y-auto",children:[d.slice(0,100).map(s=>{const a=c.has(s.id),i=y.has(s.id);return e.jsx(Ae,{className:"px-3 py-2 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>T({id:s.id,email:s.email}),children:e.jsxs("div",{className:"flex justify-between items-center gap-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"text-xs font-medium flex items-center gap-1 flex-wrap leading-tight",children:[e.jsx(X,{className:"h-3 w-3 text-muted-foreground shrink-0"}),e.jsx("span",{className:"truncate",children:s.email}),a&&e.jsx(se,{className:"h-3 w-3 text-blue-500 shrink-0","aria-label":"Verified"})]}),e.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5 leading-tight",children:[s.display_name&&e.jsx("span",{className:"mr-2",children:s.display_name}),"Joined: ",new Date(s.created_at).toLocaleDateString()]})]}),i&&e.jsxs(Q,{variant:"outline",className:"text-green-600 border-green-600/50 text-[10px] px-1.5 py-0 shrink-0",children:[e.jsx(ee,{className:"h-2.5 w-2.5 mr-0.5"}),"Push"]})]})},s.id)}),d.length>100&&e.jsxs("p",{className:"text-sm text-muted-foreground text-center py-2",children:["Showing 100 of ",d.length," users. Use search to narrow results."]})]})]}):e.jsx(Le,{icon:B,title:r||j!=="all"||S!=="all"||m!=="all"?"No users match filters":"No users yet",description:r||j!=="all"||S!=="all"||m!=="all"?"Try adjusting your search or filters":"Users will appear here once they sign up."})]}),C&&e.jsx(Re,{open:!!C,onClose:()=>T(null),userId:C.id,userEmail:C.email})]})});export{ze as UsersTab};

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.