1import{_ as u,H as g,c as o,b as a,t as i,d as m,F as _,r as x,o as l,s as p}from"./C36Ot3Ps.js";const r=[{name:"Maya Chen",action:"clicked",tone:"positive",detail:"Abandoned cart · Email 1"},{name:"Leo Martins",action:"opened",detail:"Welcome series · Email 2"},{name:"Priya Nair",action:"delivered",detail:"Autumn table edit"},{name:"Sam Okafor",action:"clicked",tone:"positive",detail:"Win-back · Email 1"},{name:"Hannah Weiss",action:"opened",detail:"Abandoned cart · Email 2"},{name:"Diego Alvarez",action:"sent",detail:"Review request"},{name:"Aiko Tanaka",action:"opened",detail:"Autumn table edit"},{name:"Noah Brooks",action:"clicked",tone:"positive",detail:"Welcome series · Email 1"}],v=[{name:"Maya Chen",action:"asked",detail:"Can I change my delivery date?"},{name:"Leo Martins",action:"answered",tone:"positive",detail:"Linen napkin sizes"},{name:"Priya Nair",action:"asked",detail:"Is the mug dishwasher safe?"},{name:"Sam Okafor",action:"answered",tone:"positive",detail:"Order #1042 tracking"},{name:"Hannah Weiss",action:"asked",detail:"Do you ship to Canada?"},{name:"Diego Alvarez",action:"answered",tone:"positive",detail:"Gift wrapping"}],h={email:r,support:v},f=3200,b={name:"PvLiveActivity",props:{label:{type:String,default:""},title:{type:String,default:"Live activity"},note:{type:String,default:"every 30s"},feed:{type:String,default:"email"},rows:{type:Number,default:5}},data(){const s=[14,52,96,170,260,390,540];return{list:(h[this.feed]||r).slice(0,this.rows).map((e,t)=>({...e,id:t,age:s[t]??600})),next:this.rows,freshId:null}},computed:{events(){return h[this.feed]||r}},mounted(){this.stop=g(this.$refs.root,this.tick,f)},beforeUnmount(){this.stop&&this.stop()},methods:{tick(){const s=this.events[this.next%this.events.length],e=this.next;this.next+=1,this.list=[{...s,id:e,age:2},...this.list.slice(0,this.rows-1).map(t=>({...t,age:t.age+f/1e3}))],this.freshId=e},ago(s){const e=Math.round(s);return e<60?`${e}s ago`:e<3600?`${Math.floor(e/60)}m ago`:`${Math.floor(e/3600)}h ago`},toneClass(s){return s==="positive"?"text-positive":s==="negative"?"text-negative":"text-muted-foreground"}}},k=["role","aria-label"],y={class:"flex items-center justify-between gap-3 px-4 pb-2 pt-3.5 sm:px-5 sm:pt-4"},E={class:"text-sm font-medium"},S={class:"pv-eyebrow flex items-center gap-1.5 normal-case tracking-normal"},w={class:"flex min-w-0 flex-1 flex-col"},A={class:"truncate text-[13px] sm:text-sm"},M={class:"flex min-w-0 gap-1.5 font-mono text-[11px] text-muted-foreground"},C={class:"truncate"},N={class:"shrink-0"};function I(s,e,t,L,c,d){return l(),o("section",{ref:"root",role:t.label?"img":null,"aria-label":t.label||null,class:"pv-panel flex select-none flex-col overflow-hidden text-left"},[a("div",y,[a("span",E,i(t.title),1),a("span",S,[e[0]||(e[0]=a("span",{class:"h-1.5 w-1.5 rounded-full bg-signal"},null,-1)),m(" "+i(t.note),1)])]),(l(!0),o(_,null,x(c.list,n=>(l(),o("div",{key:n.id,class:p(["flex items-center gap-3 border-t border-border/60 px-4 py-2 sm:px-5 sm:py-2.5",n.id===c.freshId?"pv-flash":""])},[a("span",w,[a("span",A,[m(i(n.name)+" ",1),a("span",{class:p(d.toneClass(n.tone))},i(n.action),3)]),a("span",M,[a("span",C,i(n.detail),1),a("span",N,"· "+i(d.ago(n.age)),1)])])],2))),128))],8,k)}const D=u(b,[["render",I]]);export{D as _};
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.