@fntio/infra-client
Version:
Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.
3 lines (2 loc) • 22.6 kB
JavaScript
import{a as Ge,b as H,c as Je,d as Ze,e as G,f as J,g as Xe,h as et,i as tt,j as it,k as nt,l as ot,m as at,n as rt,o as Z,p as st,q as lt,r as X,s as ee,t as ct,u as dt,v as mt,w as pt,x as R,y as ut,z as gt}from"./chunk-SFL4IAVC.js";import{f as He}from"./chunk-Y6FHN4DA.js";import{a as L}from"./chunk-HUXCPIDO.js";import{a as Le}from"./chunk-XPF5YBGU.js";import"./chunk-J7PZFXOE.js";import{a as We}from"./chunk-YGAHR42T.js";import{a as Ye}from"./chunk-3PQNISIL.js";import{a as ze}from"./chunk-SH2F2DCQ.js";import{a as Be}from"./chunk-Q736XS6E.js";import{a as Re,b as Ve}from"./chunk-TVCLJWZS.js";import{a as je}from"./chunk-WM5A6BAU.js";import{a as Qe,d as Ue,e as Ke}from"./chunk-JNANYFF2.js";import{a as Me}from"./chunk-YMC4QOLO.js";import{a as qe}from"./chunk-6HVGPPAG.js";import"./chunk-XOFD5DNL.js";import"./chunk-PU4UT4HF.js";import"./chunk-2SO4BVIT.js";import{b as ke,e as Fe,i as Pe,j as De,k as Ie,o as Oe,p as Y}from"./chunk-T5HLFYHP.js";import{c as Te}from"./chunk-KCJ5HNXP.js";import{a as $e}from"./chunk-B67EMZ2H.js";import{b as Ee}from"./chunk-MID2IYAR.js";import"./chunk-6GDWMGWO.js";import{a as Ne}from"./chunk-7A4HO4AV.js";import{Aa as c,Ba as l,Ca as M,Eb as we,I as E,Ia as q,Ja as N,K as C,L as b,La as S,Na as u,Pb as Se,R as y,Rb as Ae,Ta as j,Va as Q,Wa as U,Xa as p,Ya as x,Za as A,_ as r,_a as he,bb as ye,cb as xe,db as Ce,ga as _e,jb as K,ka as D,nb as be,pb as W,qb as h,rb as z,sa as k,ta as f,ua as _,va as ve,xa as I,ya as O,za as g}from"./chunk-FYA6QUPZ.js";import{a as F,b as P}from"./chunk-WFIHWVQO.js";function St(i){return`"${(/^[=+\-@]/.test(i)?`'${i}`:i).replace(/"/g,'""')}"`}function ft(i,t){return"\uFEFF"+[i,...t].map(e=>e.map(St).join(",")).join(`\r
`)}function _t(i,t){let e=URL.createObjectURL(i),n=document.createElement("a");n.href=e,n.download=t,n.click(),URL.revokeObjectURL(e)}var xt=i=>({$implicit:i}),Ct=(i,t)=>t.e.eventId;function At(i,t){if(i&1){let e=N();c(0,"input",15),S("change",function(o){C(e);let a=u();return b(a.setCustom("from",o.target.value))}),l(),c(1,"span",16),p(2,"\u2192"),l(),c(3,"input",17),S("change",function(o){C(e);let a=u();return b(a.setCustom("to",o.target.value))}),l()}if(i&2){let e=u();g("value",e.customFrom())("max",e.customTo()||null),r(3),g("value",e.customTo())("min",e.customFrom()||null)}}function Tt(i,t){if(i&1&&(c(0,"span",21),p(1),l()),i&2){let e=u(2).$implicit;r(),x(e.detail)}}function Et(i,t){if(i&1&&(c(0,"app-chip",18)(1,"span",20),p(2),l(),f(3,Tt,2,1,"span",21),l()),i&2){let e=u().$implicit;g("title",e.title),r(2),x(e.text),r(),_(e.detail?3:-1)}}function Mt(i,t){if(i&1&&(c(0,"span",19),p(1),l()),i&2){let e=u().$implicit;r(),x(e.text)}}function Nt(i,t){if(i&1&&(c(0,"span"),p(1),l()),i&2){let e=u().$implicit;r(),x(e.text)}}function kt(i,t){if(i&1&&f(0,Et,4,3,"app-chip",18)(1,Mt,2,1,"span",19)(2,Nt,2,1,"span"),i&2){let e,n=t.$implicit;_((e=n.kind)==="chip"?0:e==="name"?1:2)}}function Ft(i,t){if(i&1&&I(0,kt,3,1,null,null,ve),i&2){let e=t.$implicit;O(e)}}function Pt(i,t){if(i&1&&(c(0,"app-banner",11),p(1),l()),i&2){let e=u();r(),x(e.error())}}function Dt(i,t){i&1&&(c(0,"div",12),M(1,"app-skeleton",22)(2,"app-skeleton",22)(3,"app-skeleton",22),l())}function It(i,t){i&1&&p(0," Clear the filters or widen the window. ")}function Ot(i,t){if(i&1&&(c(0,"app-empty-state",13),p(1),f(2,It,1,0),l()),i&2){let e=u();r(),A(" Nothing was logged ",e.windowText(),". "),r(),_(e.applied().length?2:-1)}}function Lt(i,t){if(i&1&&p(0),i&2){let e=u(2);A(' Nothing matches "',e.query(),'". Try a different name, role, account, or note. ')}}function Rt(i,t){if(i&1&&p(0),i&2){let e=u(2);A(" No events match the current filters ",e.windowText(),". ")}}function Vt(i,t){if(i&1&&(c(0,"app-empty-state",14),f(1,Lt,1,1)(2,Rt,1,1),l()),i&2){let e=u();r(),_(e.query()?1:2)}}function Bt(i,t){if(i&1&&(c(0,"span",37),p(1),l()),i&2){let e=u().$implicit;r(),x(e.claims)}}function $t(i,t){i&1&&(c(0,"app-badge",38),p(1,"service"),l())}function qt(i,t){if(i&1&&(c(0,"div",39),p(1),l()),i&2){let e=u().$implicit;r(),x(e.whoSub)}}function jt(i,t){i&1&&q(0)}function Qt(i,t){if(i&1&&(c(0,"span",46),p(1),l()),i&2){let e=u(2).$implicit;g("title",e.sub),r(),x(e.sub)}}function Ut(i,t){i&1&&(c(0,"span"),p(1,"\xB7"),l())}function Kt(i,t){if(i&1){let e=N();c(0,"button",49),S("click",function(){C(e);let o=u(2).$implicit,a=u(2);return b(a.toggle(o))}),M(1,"app-icon",50),p(2),l()}if(i&2){let e=u(2).$implicit,n=u(2);g("title",n.isOpen(e)?"Hide who":"Show who"),k("aria-expanded",n.isOpen(e)),r(),Q("rotate-90",n.isOpen(e)),g("strokeWidth",2.2),r(),A(" ",e.summary," ")}}function Wt(i,t){if(i&1&&(c(0,"span",48),p(1),l()),i&2){let e=u(2).$implicit;r(),x(e.summary)}}function zt(i,t){if(i&1&&(c(0,"div",43),f(1,Qt,2,2,"span",46),f(2,Ut,2,0,"span"),f(3,Kt,3,6,"button",47)(4,Wt,2,1,"span",48),l()),i&2){let e=u().$implicit;r(),_(e.sub?1:-1),r(),_(e.sub&&e.summary?2:-1),r(),_(e.effects.length||e.unchanged?3:e.summary?4:-1)}}function Yt(i,t){i&1&&q(0)}function Ht(i,t){if(i&1&&(c(0,"div",58),p(1),l()),i&2){let e=u().$implicit;g("title",e.sub),r(),x(e.sub)}}function Gt(i,t){if(i&1&&(c(0,"div",51),M(1,"div",53),c(2,"div",54)(3,"div",55)(4,"span",56),p(5,"\u21B3"),l(),c(6,"span",36),p(7),l()()(),c(8,"div",57)(9,"div",41),D(10,Yt,1,0,"ng-container",42),l(),f(11,Ht,2,2,"div",58),l(),c(12,"div",59)(13,"app-badge",45),p(14),l()()()),i&2){let e=t.$implicit;u(4);let n=j(20);r(2),g("title",e.whoTitle||null),r(5),x(e.who),r(3),g("ngTemplateOutlet",n)("ngTemplateOutletContext",K(7,xt,e.what)),r(),_(e.sub?11:-1),r(2),g("tone",e.badge.tone),r(),x(e.badge.label)}}function Jt(i,t){if(i&1&&(c(0,"div",52),M(1,"div",53),c(2,"div",60)(3,"div",61)(4,"span",56),p(5,"\u21B3"),l(),p(6),l()()()),i&2){let e=t;r(3),g("title",e.all.join(", ")),r(3),he("",e.label,": ",e.text," ")}}function Zt(i,t){if(i&1&&(I(0,Gt,15,9,"div",51,Ct),f(2,Jt,7,3,"div",52)),i&2){let e,n=u().$implicit;O(n.effects),r(2),_((e=n.unchanged)?2:-1,e)}}function Xt(i,t){if(i&1&&(c(0,"div",32)(1,"div",33),p(2),l(),c(3,"div",34)(4,"div",35)(5,"span",36),p(6),l(),f(7,Bt,2,1,"span",37),f(8,$t,2,0,"app-badge",38),l(),f(9,qt,2,1,"div",39),l(),c(10,"div",40)(11,"div",41),D(12,jt,1,0,"ng-container",42),l(),f(13,zt,5,3,"div",43),l(),c(14,"div",44)(15,"app-badge",45),p(16),l()()(),f(17,Zt,3,1)),i&2){let e=t.$implicit,n=u(2),o=j(20);k("data-derived",e.e.derived||null),r(),g("title",e.exact),r(),A(" ",e.when," "),r(),g("title",e.whoTitle||null),r(2),U(e.e.derived?"text-muted-foreground":"text-surface-foreground"),r(),A(" ",e.who," "),r(),_(e.claims?7:-1),r(),_(e.service?8:-1),r(),_(e.whoSub?9:-1),r(2),U(e.e.derived?"text-muted-foreground":"text-surface-foreground"),r(),g("ngTemplateOutlet",o)("ngTemplateOutletContext",K(19,xt,e.what)),r(),_(e.sub||e.summary?13:-1),r(2),g("tone",e.badge.tone),k("title",e.e.reason||null),r(),x(e.badge.label),r(),_((e.effects.length||e.unchanged)&&n.isOpen(e)?17:-1)}}function ei(i,t){if(i&1){let e=N();c(0,"app-load-more",62),S("reached",function(){C(e);let o=u(2);return b(o.window.loadMore())}),l()}}function ti(i,t){if(i&1){let e=N();c(0,"app-button",63),S("click",function(){C(e);let o=u(2);return b(o.loadOlder())}),p(1," Load older "),l()}if(i&2){let e=u(2);g("loading",e.loadingOlder())}}function ii(i,t){if(i&1&&(c(0,"div",23)(1,"div",24)(2,"div",25),p(3,"When"),l(),c(4,"div",25),p(5,"Who"),l(),c(6,"div",25),p(7,"What"),l(),c(8,"div",25),p(9,"Outcome"),l()(),c(10,"div",26)(11,"div",27),I(12,Xt,18,21,null,null,Ct),f(14,ei,1,0,"app-load-more",28),l()()(),c(15,"div",29)(16,"app-result-count",30),p(17),l(),f(18,ti,2,1,"app-button",31),l()),i&2){let e=u();Q("opacity-60",e.loading()),k("aria-busy",e.loading()||null),r(12),O(e.window.items()),r(2),_(e.window.hasMore()?14:-1),r(2),g("shown",e.window.shown())("total",e.filtered().length),r(),A(" ",e.windowText()," "),r(),_(e.nextBefore()?18:-1)}}var te=[{param:"type",key:"type"},{param:"outcome",key:"outcome"},{param:"account",key:"account",query:"account"},{param:"actor",key:"who",query:"actor"},{param:"user",key:"person",query:"user"},{param:"group",key:"group",query:"group"}],ie=["role","resource","site","plugin","share","serviceuser"],ni=1440*60*1e3,vt={type:H,outcome:Je};var ht=class i{federation=E(He);api=E(Ge);toast=E(Te);route=E(Se);router=E(Ae);names=E(Le);events=y(null);baseline=y(null);loading=y(!1);loadingOlder=y(!1);error=y(null);range=y(null);nextBefore=y(null);preset=y(7);customFrom=y("");customTo=y("");applied=y([]);query=y("");open=y(new Map);seq=0;baseSeq=0;lastQuery=null;lastShared=!1;baselineFor=null;constructor(){this.names.ensure(),this.readUrl(),z(()=>{let t=this.baseQuery(),e=this.serverQuery(),n=this.applied().length>0;W(()=>{t&&e&&this.load(t,e,n)})}),z(()=>{let t=this.urlParams();W(()=>this.writeUrl(t))})}setPreset(t){if(t==="custom"&&!this.customFrom()&&!this.customTo()){let e=this.range(),n=e?new Date(e.to):new Date,o=e?new Date(e.from):new Date(n.getTime()-7*ni);this.customFrom.set(V(o)),this.customTo.set(V(n))}this.preset.set(t)}setCustom(t,e){(t==="from"?this.customFrom:this.customTo).set(e)}customRange=h(()=>{let t=new Date(this.customFrom()),e=new Date(this.customTo());return Number.isNaN(t.getTime())||Number.isNaN(e.getTime())||t>=e?null:{from:t.toISOString(),to:e.toISOString()}});windowText=h(()=>{let t=this.preset();if(t!=="custom")return`in the last ${t} days`;let e=this.range()??this.customRange();return e?`between ${L(e.from)} and ${L(e.to)}`:"in the chosen range"});appliedByKey=h(()=>{let t=new Map;for(let e of this.applied()){let n=t.get(e.key);n||t.set(e.key,n=new Set),n.add(e.id)}return t});baseQuery=h(()=>{let t=this.preset();return t!=="custom"?{days:t}:this.customRange()});serverQuery=h(()=>{let t=this.baseQuery();if(!t)return null;let e=this.appliedByKey(),n=a=>[...e.get(a)??[]],o=P(F({},t),{category:n("type"),outcome:n("outcome"),target:ie.flatMap(n)});for(let{key:a,query:s}of te)s&&(o[s]=n(a));return o.actor?.includes(ee)&&(o.actor=[...o.actor.filter(a=>a!==ee),...ct]),o});load(t,e,n){let o=++this.seq;this.lastQuery=e,this.lastShared=!n,this.loading.set(!0),this.error.set(null);let a=JSON.stringify(t),s=null;(!n||this.baselineFor!==a)&&(s=++this.baseSeq,this.baselineFor=a,n&&this.loadBaseline(t,s)),this.api.listEvents(e).subscribe({next:d=>{if(o!==this.seq)return;this.rowCache.clear();let m=R(d.events);this.events.set(m),!n&&s===this.baseSeq&&this.baseline.set(m),this.range.set({from:d.from,to:d.to}),this.nextBefore.set(d.nextBefore??null),this.loading.set(!1)},error:d=>{o===this.seq&&(n||(this.baselineFor=null),this.loading.set(!1),this.error.set(Y(d,"Could not load activity.")))}})}loadBaseline(t,e){this.api.listEvents(t).subscribe({next:n=>{e===this.baseSeq&&this.baseline.set(R(n.events))},error:()=>{e===this.baseSeq&&(this.baselineFor=null)}})}loadOlder(){let t=this.nextBefore(),e=this.lastQuery;if(!t||!e||this.loadingOlder())return;let n=this.seq;this.loadingOlder.set(!0);let o=ut(this.events()??[],t);this.api.listEvents(P(F({},e),{before:t,skip:o})).subscribe({next:a=>{if(this.loadingOlder.set(!1),n!==this.seq)return;let s=d=>R([...d??[],...a.events]);this.events.update(s),this.lastShared&&this.baseline.update(s),this.nextBefore.set(a.nextBefore??null)},error:a=>{this.loadingOlder.set(!1),this.toast.error(Y(a,"Could not load older activity."))}})}groupNames=h(()=>gt([...this.events()??[],...this.baseline()??[]]),{equal:oi});ctx=h(()=>{let t=this.groupNames();return this.names.label(""),{accountLabel:e=>this.names.label(e),groupName:e=>t.get(e)}});nested=h(()=>Z(this.events()??[]));rowCache=new Map;rowCacheCtx=null;rows=h(()=>{let t=this.ctx();t!==this.rowCacheCtx&&(this.rowCache.clear(),this.rowCacheCtx=t);let{top:e,effects:n}=this.nested();return e.map(o=>{let a=n.get(o.eventId)??[],s=`${o.eventId}:${a.length}`,d=this.rowCache.get(s);return d||this.rowCache.set(s,d=this.toRow(o,t,a)),d})});toRow(t,e,n=[],o=!1){let a=nt(t),s=t.actor.kind==="system",d=G(t),m=s?lt(t.actor.id,t.actor.name):"",v=Xe(t),T=tt(t,e,{subjectShown:v!==null,byActor:!o}),ne=v?J(v):s?"System":d,oe=v?"":m,ae=v??t.actor,bt=o?v?.id??"":t.derived&&v?`effect of a change by ${s?`the ${m}`:d}`:ae.kind==="user"?ae.id:"",re=v?"":this.claimText(t.actor.claims),se=v?v.kind==="serviceUser":t.actor.kind==="service",le=L(t.at),ce=new Date(t.at).toLocaleString(void 0,{timeZoneName:"short"}),de=st(t,e,o).join(" \xB7 "),me=X(t,e,n),pe=n.map(w=>{let $=this.rowCache.get(w.eventId);return $||this.rowCache.set(w.eventId,$=this.toRow(w,e,[],!0)),$}),B=n.map(rt).filter(w=>w!==null),ue=B.length?B:t.details?.affected??[],ge=ot(t,ue,B.length?void 0:t.details?.affectedCount)??"",fe=at(t,ue,e),wt=[le,ce,ne,oe,re,se?"service":"",it(T),de,ge,a.label,H[t.category]??t.category,t.action,t.accountNumber??"",...me.map(w=>w.label),...pe.map(w=>w.text),...fe?.all??[]].join(" ").toLowerCase();return{e:t,when:le,exact:ce,who:ne,whoSub:oe,whoTitle:bt,claims:re,service:se,what:T,sub:de,badge:a,facets:me,text:wt,effects:pe,summary:ge,unchanged:fe}}claimText(t){return t?this.federation.claimRows(t).map(e=>`${e.label} ${e.value}`).join(" \xB7 "):""}isOpen(t){let e=this.open().get(yt(t));if(e!==void 0)return e;let n=this.appliedByKey().get("person");return!!n&&t.effects.some(o=>o.e.subject!==void 0&&n.has(o.e.subject.id))}toggle(t){let e=!this.isOpen(t);this.open.update(n=>new Map(n).set(yt(t),e))}baselineFacets=h(()=>{let t=this.baseline();if(!t)return this.rows().map(a=>a.facets);let e=this.ctx(),{top:n,effects:o}=Z(t);return n.map(a=>X(a,e,o.get(a.eventId)))});index=h(()=>{let t=new Map,e=new Map,n=(o,a,s)=>{let d=t.get(o);d||t.set(o,d=new Map),d.has(a)||d.set(a,s);let m=e.get(o);m||e.set(o,m=new Map),m.has(s)||m.set(s,a)};for(let[o,a]of Object.entries(vt))for(let[s,d]of Object.entries(a??{}))n(o,s,d);for(let o of this.baselineFacets())for(let a of o)n(a.key,a.id,a.label);for(let o of this.rows())for(let a of o.facets)n(a.key,a.id,a.label);for(let o of this.applied())t.get(o.key)?.has(o.id)||n(o.key,o.id,pt(o.key,o.id,this.ctx()));return{idToLabel:t,labelToId:e}});filterLabels=h(()=>{let{idToLabel:t}=this.index();return this.applied().map(e=>({key:e.key,value:t.get(e.key)?.get(e.id)??e.id}))});sections=h(()=>{let t=this.appliedByKey(),{idToLabel:e}=this.index(),n=new Map;for(let o of this.baselineFacets())for(let a of o){let s=n.get(a.key);s||n.set(a.key,s=new Set),s.add(a.label)}return mt.map(o=>{let a=new Set(n.get(o)??[]);for(let m of t.get(o)??[])a.add(e.get(o)?.get(m)??m);let s=Object.values(vt[o]??{}),d=s.map(m=>({value:m}));for(let m of[...a].sort((v,T)=>v.localeCompare(T)))s.includes(m)||d.push({value:m});return{key:o,label:dt[o],options:d}}).filter(o=>o.options.length>0)});onFiltersChange(t){let{labelToId:e}=this.index(),n=this.applied();this.applied.set(t.map(o=>({key:o.key,id:e.get(o.key)?.get(o.value)??n.find(a=>a.key===o.key&&a.id===o.value)?.id??o.value})))}filtered=h(()=>{let t=this.appliedByKey(),e=this.query().trim().toLowerCase();return this.rows().filter(n=>{for(let[o,a]of t)if(!n.facets.some(s=>s.key===o&&a.has(s.id)))return!1;return!e||n.text.includes(e)})});window=Ye(this.filtered,40);readUrl=()=>{let t=this.route.snapshot.queryParamMap,e=s=>(t.get(s)??"").split(",").map(d=>d.trim()).filter(Boolean),n=[];for(let{param:s,key:d}of te)for(let m of e(s))n.push({key:d,id:m});for(let s of t.getAll("target")){let d=Ze(s);d.kind==="group"?n.push({key:"group",id:d.id}):ie.includes(d.kind)&&n.push({key:d.kind,id:s})}this.applied.set(n);let o=new Date(t.get("from")??""),a=new Date(t.get("to")??"");!Number.isNaN(o.getTime())&&!Number.isNaN(a.getTime())&&o<a&&(this.customFrom.set(V(o)),this.customTo.set(V(a)),this.preset.set("custom"))};urlParams=h(()=>{let t=this.appliedByKey(),e=s=>{let d=t.get(s);return d&&d.size?[...d].join(","):null},n=ie.flatMap(s=>[...t.get(s)??[]]),o=this.preset()==="custom"?this.customRange():null,a={};for(let{param:s,key:d}of te)a[s]=e(d);return P(F({},a),{target:n.length?n:null,from:o?.from??null,to:o?.to??null})});writeUrl(t){let e=this.route.snapshot.queryParamMap;Object.entries(t).every(([o,a])=>Array.isArray(a)?ai(e.getAll(o),a):(e.get(o)??null)===a)||this.router.navigate([],{relativeTo:this.route,queryParams:t,replaceUrl:!0})}exportCsv(){let t=this.filtered();if(t.length===0)return;let e=["Timestamp","Actor","Actor kind","Action","Outcome","Subject","Target","Target name","Account","Expires","Via","Note","Reason","Request id","Batch id","Derived"],n=(m,v)=>[m.at,G(m),m.actor.kind,v,m.outcome,m.subject?J(m.subject):"",m.target??"",et(m,this.ctx()),m.accountNumber??"",m.details?.expiresAt??"",m.details?.via??"",m.details?.note??"",m.reason??m.details?.deniedReason??"",m.details?.requestId??"",m.details?.batchId??"",m.derived?"yes":""],o=t.flatMap(({e:m,effects:v})=>[n(m,m.action),...v.map(T=>n(T.e,`\u21B3 ${T.e.action}`))]),a=new Blob([ft(e,o)],{type:"text/csv;charset=utf-8;"}),s=this.range(),d=this.preset()==="custom"&&s?`activity-${s.from.slice(0,10)}-to-${s.to.slice(0,10)}.csv`:`activity-last-${this.preset()}-days.csv`;_t(a,d)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=_e({type:i,selectors:[["app-activity-page"]],hostAttrs:[1,"flex","min-h-0","flex-1","flex-col"],decls:26,vars:13,consts:[["segments",""],[3,"fill"],["pageHeader","","title","Activity","subtitle","Who did what, to whom or what, and how it came out.","subtitleInfo","Grants, requests, vends, network, catalog and user changes \u2014 including denied and failed attempts.",3,"showHeaderSearch"],["headerActions",""],["size","lg","variant","outline",3,"click","disabled"],["name","download",1,"h-4","w-4"],[1,"mb-3","flex","shrink-0","flex-wrap","items-center","gap-2"],["aria-label","Time window",1,"ui-input","h-7","w-auto","!py-0","pr-7","text-sm",3,"ngModelChange","ngModel"],[3,"ngValue"],[1,"min-w-0",3,"filtersChange","sections","filters"],["compact","","placeholder","Search names, roles, notes\u2026",1,"ml-auto","w-[260px]","shrink-0",3,"valueChange","value"],["tone","danger"],[1,"space-y-2"],["title","No activity"],["title","No matches"],["type","datetime-local","aria-label","From",1,"ui-input","h-7","w-auto","!py-0","text-sm",3,"change","value","max"],[1,"text-xs","text-muted-foreground"],["type","datetime-local","aria-label","To",1,"ui-input","h-7","w-auto","!py-0","text-sm",3,"change","value","min"],[3,"title"],[1,"font-medium"],[1,"min-w-0","truncate"],[1,"ml-1","min-w-0","shrink-[60]","truncate"],["sizeClass","h-12 w-full"],[1,"flex","min-h-0","flex-1","flex-col","overflow-x-auto"],[1,"grid","grid-cols-[minmax(0,12fr)_minmax(0,20fr)_minmax(0,52fr)_minmax(0,16fr)]","min-w-[760px]","shrink-0"],[1,"px-4","py-2.5","text-left","ui-microlabel","text-text-secondary"],[1,"flex","min-h-0","min-w-[760px]","flex-1","flex-col","overflow-hidden","rounded-lg","border","border-border","bg-card-bg"],[1,"min-h-0","flex-1","overflow-y-auto"],["appInfiniteScroll",""],[1,"flex","flex-wrap","items-center","justify-between","gap-3"],["noun","event",3,"shown","total"],["size","sm","variant","outline",1,"mt-3",3,"loading"],["data-testid","row",1,"grid","grid-cols-[minmax(0,12fr)_minmax(0,20fr)_minmax(0,52fr)_minmax(0,16fr)]","items-start","border-t","border-border","text-sm","first:border-t-0"],[1,"truncate","whitespace-nowrap","px-4","py-3","text-muted-foreground",3,"title"],[1,"min-w-0","px-4","py-3",3,"title"],[1,"truncate"],[1,"font-medium","tracking-[0.015em]"],[1,"ml-1.5","text-xs","text-muted-foreground"],["tone","gray",1,"ml-1.5","align-middle"],[1,"truncate","text-xs","text-muted-foreground"],[1,"min-w-0","px-4","py-3"],[1,"flex","flex-wrap","items-center","gap-x-1","gap-y-0.5"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mt-0.5","flex","min-w-0","items-center","gap-1","text-xs","text-muted-foreground"],[1,"whitespace-nowrap","px-4","py-3"],[3,"tone"],[1,"min-w-0","truncate",3,"title"],["type","button",1,"inline-flex","shrink-0","items-center","gap-0.5","rounded","hover:text-surface-foreground",3,"title"],[1,"shrink-0"],["type","button",1,"inline-flex","shrink-0","items-center","gap-0.5","rounded","hover:text-surface-foreground",3,"click","title"],["name","chevron-right",1,"h-3","w-3","transition-transform",3,"strokeWidth"],["data-testid","effect",1,"grid","grid-cols-[minmax(0,12fr)_minmax(0,20fr)_minmax(0,52fr)_minmax(0,16fr)]","items-start","border-t","border-border","bg-muted","text-sm","text-muted-foreground"],["data-testid","unchanged",1,"grid","grid-cols-[minmax(0,12fr)_minmax(0,20fr)_minmax(0,52fr)_minmax(0,16fr)]","items-start","border-t","border-border","bg-muted","text-sm","text-muted-foreground"],[1,"px-4","py-2"],[1,"min-w-0","px-4","py-2",3,"title"],[1,"truncate","pl-4"],[1,"mr-1"],[1,"min-w-0","px-4","py-2"],[1,"mt-0.5","truncate","text-xs",3,"title"],[1,"whitespace-nowrap","px-4","py-2"],[1,"col-span-3","min-w-0","px-4","py-2"],[1,"truncate","pl-4",3,"title"],["appInfiniteScroll","",3,"reached"],["size","sm","variant","outline",1,"mt-3",3,"click","loading"]],template:function(e,n){if(e&1){let o=N();c(0,"app-page",1)(1,"app-page-header",2)(2,"div",3)(3,"app-button",4),S("click",function(){return C(o),b(n.exportCsv())}),M(4,"app-icon",5),p(5," Export CSV "),l()()(),c(6,"div",6)(7,"select",7),S("ngModelChange",function(s){return C(o),b(n.setPreset(s))}),c(8,"option",8),p(9,"Last 7 days"),l(),c(10,"option",8),p(11,"Last 30 days"),l(),c(12,"option",8),p(13,"Last 90 days"),l(),c(14,"option",8),p(15,"Custom range\u2026"),l()(),f(16,At,4,4),c(17,"app-filter-popup",9),S("filtersChange",function(s){return C(o),b(n.onFiltersChange(s))}),l(),c(18,"app-search-input",10),Ce("valueChange",function(s){return C(o),xe(n.query,s)||(n.query=s),b(s)}),l()(),D(19,Ft,2,0,"ng-template",null,0,be),f(21,Pt,2,1,"app-banner",11)(22,Dt,4,0,"div",12)(23,Ot,3,2,"app-empty-state",13)(24,Vt,3,1,"app-empty-state",14)(25,ii,19,8),l()}e&2&&(g("fill",!0),r(),g("showHeaderSearch",!1),r(2),g("disabled",n.filtered().length===0),r(4),g("ngModel",n.preset()),r(),g("ngValue",7),r(2),g("ngValue",30),r(2),g("ngValue",90),r(2),g("ngValue","custom"),r(2),_(n.preset()==="custom"?16:-1),r(),g("sections",n.sections())("filters",n.filterLabels()),r(),ye("value",n.query),r(3),_(n.error()?21:n.events()===null?22:n.events().length===0?23:n.filtered().length===0?24:25))},dependencies:[Oe,De,Ie,Pe,ke,Fe,we,Me,$e,Ne,Ke,qe,Be,Ee,Re,ze,je,Ve,Qe,Ue,We],encapsulation:2})};function yt(i){return i.e.details?.batchId??i.e.eventId}function oi(i,t){if(i.size!==t.size)return!1;for(let[e,n]of i)if(t.get(e)!==n)return!1;return!0}function ai(i,t){return i.length===t.length&&i.every((e,n)=>e===t[n])}function V(i){let t=e=>String(e).padStart(2,"0");return`${i.getFullYear()}-${t(i.getMonth()+1)}-${t(i.getDate())}T${t(i.getHours())}:${t(i.getMinutes())}`}export{ht as ActivityPageComponent};