PageSourceSearch

https://my.vaultiqo.app/assets/AdminAuditLogPage-U0Jrt3MH.js

js vaultiqo.app collected 2026-10-02 01:15:41 UTC 21,680 bytes, 1 lines download raw bytes

1import{a as me,u as pe,r as A,y as U,j as e,h as fe,o as _e,k as q,f as L,B as W,ab as ge,ac as xe,a0 as he,ad as be}from"./index-CKraAXLv.js";import{N as B}from"./navAccents-BZjfB26e.js";import{C as $,g as je}from"./groups-PDA5OM1A.js";import{u as ye}from"./users-BvqM_HPY.js";import{u as ve,A as J,g as Q,h as X,S as Ne,a as we,b as ke,c as Se,d as Te}from"./useDateFormatter-BGQneRLF.js";import{u as Ce}from"./useDebounced-DFSYpFYf.js";import{s as Z,k as Ae,T as ee,h as te,i as se}from"./datetime-Pe4RNctQ.js";import{S as Fe,a as De}from"./StickyToolbar-ChuHWzQi.js";import{E as Ee}from"./EmptyState-BvWSOwTR.js";import{P as Ie}from"./PageGlow-lqE2Wv9y.js";import{S as Me,a as Oe,b as qe,c as Le,d as ae}from"./select-BRYILH_h.js";import{F as re}from"./file-clock-C2SB_XHm.js";import{F as Pe}from"./funnel-MRaBiLOT.js";import{C as Ue}from"./chevron-left-DDugJ9LV.js";import{S as $e}from"./shield-BMqmE6Hu.js";import{T as Re}from"./tag-C-amhdjg.js";import"./index-BMYTV1Nm.js";function Ge(t){if(!t)return"";const r=new URLSearchParams;t.limit!=null&&r.set("limit",String(t.limit)),t.offset!=null&&r.set("offset",String(t.offset)),t.user_id&&r.set("user_id",t.user_id),t.action&&r.set("action",t.action),t.object_type&&r.set("object_type",t.object_type),t.group_id!=null&&r.set("group_id",String(t.group_id)),t.actor_email&&r.set("actor_email",t.actor_email),t.exclude_action&&r.set("exclude_action",t.exclude_action);const s=r.toString();return s?`?${s}`:""}const Ke={list:t=>{const r=Ge(t);return me.get(`/audit-logs${r}`)}},i=t=>typeof t=="string"&&t?t:null,b=t=>typeof t=="number"?t:null,k=t=>typeof t=="boolean"?t:null,R=(t,r)=>{const s=i(t);if(s==="owner"||s==="manager"||s==="member")return s;const n=k(r);return n===null?null:n?"manager":"member"},ne={name:"form_modal.name_label",username:"form_modal.username_label",uri:"view_modal.uri",type:"form_modal.type_label",expiration_date:"form_modal.expiration_label",note:"form_modal.note_label",password:"form_modal.password_label",tags:"form_modal.tags_label",details:"form_modal.details_label"};function He(t,r){const s=t.changes;if(!s||typeof s!="object")return null;const n=Object.keys(s);return n.length?n.map(o=>Object.prototype.hasOwnProperty.call(ne,o)?r(ne[o]):o).join(", "):null}const G=(t,r)=>t===null?null:r(t?"admin.audit_log.ctx.can_edit":"admin.audit_log.ctx.read_only"),D=(t,r)=>i(t.user_name)||i(t.user_email)||r.userName(i(t.user_id))||null;function ie(t,r){const s={...t.details||{}},{t:n}=r,o=[],f=a=>a&&o.push({text:a,emphasis:!0}),g=a=>a&&o.push({text:a,emphasis:!0,entity:"user"}),m=a=>a&&o.push({text:a}),p=(a,d)=>a&&o.push({text:a,entity:"group",prefix:d}),_=(a,d)=>a&&o.push({text:a,entity:"user",prefix:d}),x=r.groupName(t.group_id),c=a=>`admin.audit_log.ctx.${a}`;s.redacted==="personal"&&(s.name=n(c("personal_item")));const y=n(c("prep_in")),S=n(c("prep_to")),M=n(c("prep_from")),I=n(c("prep_with_group")),E=n(c("prep_with_user"));switch(t.action){case"login":return{segments:o};case"vault.exported":{const a=b(s.entry_count);a!==null&&m(n(c("entry_count"),{count:a}));const d=i(s.format);return d&&m(n(c("in_format"),{format:d.toUpperCase()})),{segments:o}}case"group.created":case"group.updated":return f(i(s.name)),{segments:o};case"group.deleted":{f(i(s.name));const a=b(s.shares_revoked);return a&&m(n(c("shares_revoked"),{count:a})),{segments:o}}case"tag.created":case"tag.updated":case"tag.deleted":return f(i(s.name)),{subjectTagColor:i(s.color)??void 0,segments:o};case"group.member_added":{g(D(s,r)),p(x,S);const a=R(s.role,s.is_leader);return a&&m(n(c(`as_${a}`))),{segments:o}}case"group.member_updated":{g(D(s,r)),p(x,y);const a=R(s.role,s.is_leader);return a&&m(n(c(`now_${a}`))),{segments:o}}case"group.member_removed":{g(D(s,r)),p(x,y);const a=R(s.was_role,s.was_leader);return a&&a!=="member"&&m(n(c(`was_${a}`))),{segments:o}}case"group.member_expired":return g(D(s,r)),p(r.groupName(b(s.group_id))??x,M),m(n(c("access_expired"))),{segments:o};case"share.expired":{f(i(s.name));const a=i(s.target_user_id),d=b(s.target_group_id);return a?_(r.userName(a)??i(s.target_user_email)??a,E):d!==null&&p(i(s.target_group_name)??r.groupName(d),I),m(n(c("share_expired"))),{segments:o}}case"group.access_requested":return g(D(s,r)),p(i(s.group_name)??x,S),m(n(c("requested_access"))),{segments:o};case"group.access_approved":{g(D(s,r)),p(i(s.group_name)??x,S);const a=i(s.expires_at),d=b(s.expires_days);return m(a?n(c("granted_until"),{date:r.formatDate(a)}):d?n(c("granted_for_days"),{count:d}):n(c("granted_access"))),{segments:o}}
1case"group.access_denied":return g(D(s,r)),p(i(s.group_name)??x,S),m(n(c("denied_access"))),{segments:o};case"item.created":case"item.deleted":return f(i(s.name)),p(x,y),{subjectType:i(s.type)??void 0,segments:o};case"attachment.added":case"attachment.removed":return f(i(s.name)),p(x,y),{subjectType:void 0,segments:o};case"item.updated":return f(i(s.name)),m(He(s,n)),p(x,y),{subjectType:i(s.type)??void 0,segments:o};case"vault.security_checked":{const a=b(s.secrets_read);return a!==null&&m(n(c("secrets_read"),{count:a})),{segments:o}}case"item.breach_detected":{f(i(s.name));const a=b(s.occurrences);return m(n(c("breach_found"),{count:a??0})),p(x,y),{subjectType:i(s.type)??void 0,segments:o}}case"item.secret_revealed":case"item.secret_autofilled":return f(i(s.name)),p(x,y),{subjectType:i(s.type)??void 0,segments:o};case"item.moved":return f(i(s.name)),p(i(s.from_group_name)??"?",M),p(i(s.to_group_name)??"?",S),{subjectType:i(s.type)??void 0,segments:o};case"item.share_user_created":case"item.share_group_created":case"item.share_deleted":{f(i(s.name));const a=i(s.target_user_id),d=b(s.target_group_id);if(a?_(r.userName(a)??a,E):d!==null&&p(r.groupName(d),I),t.action!=="item.share_deleted"){const N=G(k(s.can_edit),n);N&&m(N);const T=i(s.expires_at);T&&m(n(c("granted_until"),{date:r.formatDate(T)}))}return{subjectType:i(s.type)??void 0,segments:o}}case"item.share_updated":{f(i(s.name));const a=i(s.target_user_id),d=b(s.target_group_id);a?_(r.userName(a)??a,E):d!==null&&p(r.groupName(d),I);const N=G(k(s.old_can_edit),n),T=G(k(s.new_can_edit),n);return N&&T&&m(`${N} → ${T}`),{subjectType:i(s.type)??void 0,segments:o}}case"share.public_link_created":{f(i(s.name));const a=b(s.expiration_hours);a&&m(n(c("expires_hours"),{count:a}));const d=b(s.view_limit);return d&&m(n(c("view_limit"),{count:d})),{subjectType:i(s.type)??void 0,segments:o}}case"share.public_link_viewed":{f(i(s.name));const a=b(s.view_count);a!==null&&m(n(c("view_count"),{count:a}));const d=b(s.remaining);return d!==null&&d>=0&&m(n(c("views_remaining"),{count:d})),{subjectType:i(s.type)??void 0,segments:o}}case"user.created":return g(i(s.email)),s.pre_provisioned===!0&&m(n(c("pre_provisioned"))),{segments:o};case"user.updated":{const a=s.previous??{},d=s.current??{};return g(i(d.full_name)||i(a.full_name)||r.userName(t.object_id)||null),k(a.is_admin)!==k(d.is_admin)&&k(d.is_admin)!==null&&m(n(d.is_admin?c("became_admin"):c("lost_admin"))),k(a.is_active)!==k(d.is_active)&&k(d.is_active)!==null&&m(n(d.is_active?c("activated"):c("deactivated"))),i(a.full_name)!==i(d.full_name)&&i(d.full_name)&&m(n(c("renamed"),{name:i(d.full_name)})),{segments:o}}case"user.offboarded":{g(i(s.full_name)||i(s.email)||r.userName(t.object_id)||null),m(n(c("offboarded")));const a=b(s.items_transferred);a&&m(n(c("items_transferred"),{count:a}));const d=b(s.shares_revoked);return d&&m(n(c("shares_revoked"),{count:d})),{segments:o}}case"user.sessions_revoked":return g(i(s.user_email)||r.userName(t.object_id)||null),m(n(c("sessions_revoked"))),{segments:o};case"user.disabled_by_provider":return g(i(s.user_email)||r.userName(t.object_id)||null),m(n(c("disabled_by_provider"))),{segments:o};case"user.provider_account_enabled":return g(i(s.user_email)||r.userName(t.object_id)||null),m(n(c("provider_account_enabled"))),{segments:o};default:return f(i(s.name)),p(x,y),{segments:o}}}function Ve(t){const r=/"(\\u[\da-fA-F]{4}|\\[^u]|[^\\"])*"(\s*:)?|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,s=[];let n=0,o=0;return t.replace(r,(f,g,m,p)=>
1{if(n<p){const c=t.slice(n,p);s.push(e.jsx("span",{children:c},o++))}let _="";return typeof m<"u"?_="text-blue-600":/^"/.test(f)?_="text-green-600":/true|false/.test(f)?_="text-violet-600":/null/.test(f)?_="text-slate-600":_="text-amber-600",s.push(e.jsx("span",{className:_,children:f},o++)),n=p+f.length,f}),n<t.length&&s.push(e.jsx("span",{children:t.slice(n)},o++)),e.jsx(e.Fragment,{children:s})}function ze(t,r){if(!t||Object.keys(t).length===0)return e.jsx("span",{className:"text-muted-foreground",children:r("admin.audit_log.no_details")});const s=JSON.stringify(t,null,2);return Ve(s)}const Ye=["login","group.created","group.updated","group.deleted","group.member_added","group.member_updated","group.member_removed","group.member_expired","group.access_requested","group.access_approved","group.access_denied","tag.created","tag.updated","tag.deleted","item.created","item.updated","item.deleted","item.secret_revealed","item.secret_autofilled","item.breach_detected","item.trashed","item.restored","item.purged","item.version_restored","attachment.added","attachment.removed","item.moved","item.share_user_created","item.share_group_created","item.share_deleted","item.share_updated","trash.emptied","vault.exported","vault.security_checked","user.created","user.updated","user.offboarded","user.sessions_revoked","user.disabled_by_provider","user.provider_account_enabled","share.expired","share.public_link_created","share.public_link_viewed"],K="h-3.5 w-3.5 shrink-0";function oe({event:t}){return t.subjectType?e.jsx(ge,{type:t.subjectType,className:K}):t.subjectTagColor?e.jsx(Re,{className:K,style:{color:t.subjectTagColor}}):null}const We={group:{Icon:he,accent:B.groups.icon},user:{Icon:xe,accent:B.users.icon}};function le({segment:t}){const r=t.entity?We[t.entity]:null;return e.jsxs("span",{className:L("inline-flex min-w-0 items-center gap-1.5",t.emphasis?"font-semibold text-foreground":"text-muted-foreground"),children:[t.prefix&&e.jsx("span",{className:"text-muted-foreground",children:t.prefix}),r&&e.jsx(r.Icon,{className:L(K,r.accent)}),e.jsx("span",{className:"truncate",children:t.text})]})}const Be="inline-flex shrink-0 items-center whitespace-nowrap rounded-full px-2.5 py-1 text-[11px] font-bold uppercase tracking-wide";function de(t){return/deleted|removed|trashed|purged/.test(t)?"bg-destructive-soft text-destructive-ink":/restored/.test(t)?"bg-success-soft text-success-ink":/share|public_link/.test(t)?"bg-violet-100 text-violet-700 dark:bg-violet-600/15 dark:text-violet-400":/created|added|generated/.test(t)?"bg-success-soft text-success-ink":/updated|moved/.test(t)?"bg-info-soft text-info-ink":"bg-brand-soft text-primary-emphasis dark:text-primary"}function pt(){const{t,i18n:r}=pe(),{formatDateTime:s,formatDate:n}=ve(),[o,f]=A.useState("all"),[g,m]=A.useState(""),p=Ce(g,300),[_,x]=A.useState(null),[c,y]=A.useState(0),S=50,M=l=>{f(l),y(0)},I="item.secret_autofilled",E=o==="all",{data:a,isLoading:d,error:N}=U({queryKey:["auditLogs",o,p,c],queryFn:()=>{const l=o!=="all"?o:void 0,u=p.trim()||void 0;return Ke.list({action:l,actor_email:u,exclude_action:E?I:void 0,limit:S,offset:c*S})},placeholderData:be}),{data:T}=U({queryKey:["allGroupsForAudit"],queryFn:()=>je.list()}),{data:P}=U({queryKey:["allUsersForAudit"],queryFn:()=>ye.list()}),H=A.useMemo(()=>{const l=new Map;return T&&T.forEach(u=>l.set(u.id,u.name)),l},[T]),O=A.useMemo(()=>{const l=new Map;return P&&P.forEach(u=>l.set(u.id,u)),l},[P]),ce=A.useMemo(()=>{if(!a)return[];const l=[],u=new Date().toDateString(),h=new Date(Date.now()-864e5).toDateString();for(const j of a){const w=Z(j.created_at),v=w.toDateString();let C=l.find(F=>F.key===v);if(!C){const F=v===u?t("admin.audit_log.today"):v===h?t("admin.audit_log.yesterday"):w.toLocaleDateString(r.language,{day:"numeric",month:"long",year:"numeric"});C={key:v,label:F,logs:[]},l.push(C)}C.logs.push(j)}return l},[a,t,r.language]),V=A.useMemo(()=>({t,language:r.language,groupName:l=>l!=null?H.get(l)??null:null,userName:l=>{if(!l)return null;const u=O.get(l);return u?.full_name||u?.email||null},formatDate:n}),[t,r.language,H,O,n]),z=l=>{const u=(Z(l).getTime()-Date.now())/1e3,h=Math.abs(u),j=new Intl.RelativeTimeFormat(r.language,{numeric:"auto"});return h<60?j.format(Math.round(u),"second"):h<3600?j.format(Math.round(u/60),"minute"):h<86400?j.format(Math.round(u/3600),"hour"):j.format(Math.round(u/86400),"day")},Y=(l,u)=>l?l.split(" ").map(h=>h[0]).join("").toUpperCase().slice(0,2):u?.slice(0,2).toUpperCase()||"??";return e.jsx(Ae,{children:e.jsxs("div",{className:"flex-1 p-3 md:p-5 space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(Ie,{}),e.jsx("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-6 relative z-10",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-2.5 bg-rose-600/15 rounded-xl group/icon transition-all duration-300",children:e.jsx(re,{className:"w-8 h-8 text-rose-600 dar
1k:text-rose-400 group-hover/icon:scale-110 transition-transform duration-300"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-3xl font-bold tracking-tight text-foreground",children:t("admin.audit_log.title")}),e.jsx("p",{className:"text-muted-foreground",children:t("admin.audit_log.subtitle")})]})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs(Fe,{children:[e.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[e.jsx(De,{value:g,onChange:l=>{m(l),y(0)},placeholder:t("admin.audit_log.filter_email"),containerClassName:"flex-1"}),e.jsx("div",{className:"hidden shrink-0 md:block md:w-60",children:e.jsxs(Me,{value:o,onValueChange:M,children:[e.jsx(Oe,{className:"h-11 px-3.5 font-medium",children:e.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[e.jsx(Pe,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),e.jsx(qe,{placeholder:t("admin.audit_log.filter_action")})]})}),e.jsxs(Le,{children:[e.jsx(ae,{value:"all",children:e.jsx("span",{className:"text-muted-foreground",children:t("admin.audit_log.all_actions","All Actions")})}),Ye.map(l=>e.jsx(ae,{value:l,children:t(`admin.audit_log.actions.${l}`,{defaultValue:l})},l))]})]})})]}),E&&e.jsxs("p",{className:"pt-2 text-xs text-muted-foreground",children:[t("admin.audit_log.autofill_hidden")," ",e.jsx("span",{className:"hidden md:inline",children:t("admin.audit_log.autofill_hidden_filter")})]})]}),e.jsxs(fe,{className:_e,children:[d&&e.jsx("div",{className:"divide-y divide-border/50",children:[1,2,3,4,5].map(l=>e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[e.jsx(q,{className:"h-9 w-9 rounded-full shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsx(q,{className:"h-4 w-56 max-w-full"}),e.jsx(q,{className:"h-3 w-72 max-w-full"})]}),e.jsx(q,{className:"h-3 w-16 shrink-0"})]},l))}),N&&!d&&e.jsx("div",{className:"px-4 py-10 text-center text-sm text-destructive",children:t("admin.audit_log.failed_load",{error:N.message})}),!d&&!N&&a&&a.length===0&&e.jsx(Ee,{className:"py-16",icon:re,title:t("admin.audit_log.empty_title"),description:o!=="all"||g.trim()?t("admin.audit_log.empty_filtered_desc"):t("admin.audit_log.empty_desc")}),!d&&!N&&ce.map(l=>e.jsxs("div",{children:[e.jsx("div",{className:"px-4 pt-4 pb-1.5 text-[11px] font-bold uppercase tracking-[0.08em] text-muted-foreground",children:l.label}),e.jsx("div",{className:"divide-y divide-border/50",children:l.logs.map(u=>{const h=u.actor_id?O.get(u.actor_id):null,j=h?.full_name||u.actor_email||"System",w=h?.email||u.actor_email,v=h?.picture,C=ie(u,V);return e.jsxs("button",{type:"button","aria-label":t("admin.audit_log.view_details"),onClick:()=>x(u),className:"group flex w-full items-start md:items-center gap-3 px-4 py-3 text-left hover:bg-muted transition-colors",children:[e.jsxs(J,{className:"h-9 w-9 shrink-0",children:[v?e.jsx("img",{src:Q(v),alt:j,className:"aspect-square h-full w-full rounded-full object-cover",onError:F=>{F.target.style.display="none"}}):null,e.jsx(X,{className:"bg-avatar-fallback text-primary-emphasis dark:text-primary text-xs font-semibold",children:Y(j,w)})]}),e.jsxs("div",{className:"min-w-0 flex-1 flex flex-col gap-1.5 md:flex-row md:items-center md:gap-x-3",children:[e.jsxs("div",{className:"flex min-h-9 items-center gap-2 md:block md:min-h-0 md:w-52 md:shrink-0",children:[e.jsx("p",{className:"min-w-0 flex-1 text-sm font-semibold text-foreground truncate",children:j}),e.jsxs(ee,{children:[e.jsx(te,{asChild:!0,children:e.jsx("span",{className:"shrink-0 text-xs text-muted-foreground whitespace-nowrap md:hidden",children:z(u.created_at)})}),e.jsx(se,{children:s(u.created_at)})]}),w&&e.jsx("p",{className:"hidden md:block text-xs text-muted-foreground truncate",children:w})]}),e.jsxs("div",{className:"min-w-0 md:flex-1 flex flex-col gap-1.5 md:flex-row md:flex-wrap md:items-center md:gap-x-1.5 md:gap-y-1",children:[e.jsx("span",{className:L(Be,de(u.action),"self-start md:self-auto"),children:t(`admin.audit_log.actions.${u.action}`,{defaultValue:u.action})}),e.jsxs("span",{className:"flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1 md:contents",children:[e.jsx(oe,{event:C}),C.segments.map((F,ue)=>e.jsx(le,{segment:F},ue))]})]})]}),e.jsxs("div",{className:"hidden shrink-0 items-center gap-2 md:flex",children:[e.jsxs(ee,{children:[e.jsx(te,{asChild:!0,children:e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:z(u.created_at)})}),e.jsx(se,{side:"left",children:s(u.created_at)})]}
1),e.jsx($,{className:"h-4 w-4 text-muted-foreground/40 opacity-0 group-hover:opacity-100 transition-opacity"})]})]},u.id)})})]},l.key))]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 p-1",children:[e.jsx(W,{variant:"outline",size:"sm",onClick:()=>y(l=>Math.max(0,l-1)),disabled:c===0||d,className:"h-9 w-9 p-0 rounded-lg",children:e.jsx(Ue,{className:"h-4 w-4"})}),e.jsx("div",{className:"text-sm font-medium px-2 text-center whitespace-nowrap",children:t("common.pagination.page",{page:c+1})}),e.jsx(W,{variant:"outline",size:"sm",onClick:()=>y(l=>l+1),disabled:!a||a.length<S||d,className:"h-9 w-9 p-0 rounded-lg",children:e.jsx($,{className:"h-4 w-4"})})]})]}),e.jsx(Ne,{open:!!_,onOpenChange:l=>!l&&x(null),children:e.jsxs(we,{side:"right",className:"w-full sm:w-[600px] flex flex-col p-0",onOpenAutoFocus:l=>l.preventDefault(),children:[e.jsxs(ke,{className:"flex-row items-center gap-4 space-y-0",children:[e.jsx("div",{className:"h-10 w-10 rounded-lg bg-rose-600/10 flex items-center justify-center shrink-0 group-hover/header:scale-110 transition-transform duration-300",children:e.jsx($e,{className:"h-5 w-5 text-rose-600 dar
1k:text-rose-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx(Se,{className:"text-lg font-bold truncate leading-tight",children:t("admin.audit_log.details_title")}),e.jsx(Te,{className:"sr-only",children:t("admin.audit_log.details_description")})]})]}),e.jsxs("div",{className:"relative flex-1 min-h-0",children:[e.jsx("div",{className:"absolute inset-0 overflow-y-auto px-6 py-6",children:_&&(()=>{const l=_.actor_id?O.get(_.actor_id):null,u=l?.full_name||_.actor_email||"System",h=l?.email||_.actor_email,j=l?.picture,w=ie(_,V);return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-border/50 bg-card p-3",children:[e.jsxs(J,{className:"h-10 w-10 shrink-0",children:[j?e.jsx("img",{src:Q(j),alt:u,className:"aspect-square h-full w-full rounded-full object-cover",onError:v=>{v.target.style.display="none"}}):null,e.jsx(X,{className:"bg-avatar-fallback text-primary-emphasis dark:text-primary text-xs font-semibold",children:Y(u,h)})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground truncate",children:u}),h&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h})]}),e.jsx("span",{className:L("ml-auto inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide",de(_.action)),children:t(`admin.audit_log.actions.${_.action}`,{defaultValue:_.action})})]}),e.jsxs("div",{className:"divide-y divide-border/50 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 py-2.5",children:[e.jsx("span",{className:"text-muted-foreground",children:t("admin.audit_log.timestamp")}),e.jsx("span",{className:"font-medium text-right",children:s(_.created_at)})]}),w.segments.length>0&&e.jsxs("div",{className:"flex items-start justify-between gap-4 py-2.5",children:[e.jsx("span",{className:"shrink-0 text-muted-foreground",children:t("admin.audit_log.summary_label")}),e.jsxs("span",{className:"flex flex-wrap items-center justify-end gap-x-1.5 gap-y-1 text-right",children:[e.jsx(oe,{event:w}),w.segments.map((v,C)=>e.jsx(le,{segment:v},C))]})]})]}),e.jsxs("details",{className:"group rounded-xl border border-border/50",children:[e.jsxs("summary",{className:"cursor-pointer select-none px-4 py-3 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden flex items-center justify-between",children:[t("admin.audit_log.full_details"),e.jsx($,{className:"h-4 w-4 transition-transform group-open:rotate-90"})]}),e.jsx("div",{className:"border-t border-border/50 bg-muted/40 p-4 rounded-b-xl text-xs overflow-auto font-mono max-h-[360px] whitespace-pre-wrap",children:ze(_.details,t)})]})]})})()}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-background to-transparent pointer-events-none z-10"})]})]})})]})})}export{pt as AdminAuditLogPage};

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.