1import{W as N}from"./WFReportService-DpRAi_XW.js";import{d as T,r,i as B,j as F,D as w,a,e as t,b as d,t as m,g as U,F as _,l as x,v as V,o as n,_ as H}from"./index-DbpIxVVg.js";import{_ as R}from"./ErrorView.vue_vue_type_script_setup_true_lang-rTuR_K5N.js";import"./Stop-8NKSpgr4.js";import"./ErrorContent.vue_vue_type_script_setup_true_lang--XFDxIpt.js";import"./RoundedBadge-zDfp8xRL.js";import"./ArrowTopRightOnSquareIcon-Bwi8lzNJ.js";import"./ChevronRightIcon-CKGSa4-R.js";import"./disclosure-DbKVSJYz.js";import"./keyboard-C910qfwt.js";const Z={class:"vw-100 vh-100"},E={class:"bg-secondary shadow py-4 text-white"},L={class:"container-fluid px-lg-4 px-xl-5"},W={class:"row"},$={class:"col-auto text-right d-none d-md-block"},j={class:"d-inline-block text-white ml-3",style:{"min-width":"4.5em"}},K={key:0,class:"container-fluid"},M={key:1,class:"container-fluid p-5 text-center"},q={key:2,class:"container-fluid px-lg-4 px-xl-5 my-4 text-lg-large"},A={class:"row"},J={class:"col-md-6 mb-1 mb-lg-0"},O={class:"row"},P={class:"col-6"},Q={key:0,class:"col-3"},X={key:0,class:"row"},Y={class:"col-md-12"},z={key:0,class:"row"},G={class:"col-6"},tt={class:"text-muted small ml-2"},et={key:0},st=T({__name:"InterventionCaptureDashboard",setup(at){const l=r(null),p=r(!1),u=r(),f=r(""),k=r("never"),i=r([]),C=new N;let h,y;B(async()=>{g(),b(),await v()}),F(()=>{D()});async function v(){try{p.value=!0,u.value=null,l.value=await C.getInterventionCaptureCurrentState(),I()}catch(s){u.value=s}finally{p.value=!1}}function I(){i.value=[];for(const s of l.value.currentState){let e=i.value.find(o=>o.name===s.parentZone);e||(e={open:!0,name:s.parentZone,zones:[]},i.value.push(e)),e.zones.push(s)}i.value.forEach(s=>{s.open=!s.zones.some(e=>e.status==="Closed")})}function b(){h=setInterval(()=>g(),1e3),y=setInterval(()=>v(),1e4)}function D(){clearInterval(y),clearInterval(h)}function g(){var s;f.value=w.local().toFormat("HH:mm:ss"),k.value=(s=l.value)!=null&&s.timestamp&&Date.now()/1e3-l.value.timestamp>15?w.fromSeconds(l.value.timestamp).toRelative():null}function S(s){return s.replace("minutes","min").replace("a few seconds ago","now").replace("a minute ago","1 min ago")}return(s,e)=>(n(),a("div",Z,[t("div",E,[t("div",L,[t("div",W,[e[2]||(e[2]=t("div",{class:"col"},[t("h1",null,"Intervention capture status")],-1)),t("div",$,[t("h1",null,[e[1]||(e[1]=t("span",{class:"text-white-50"},"Current time",-1)),t("span",j,m(f.value),1)])])])])]),u.value?(n(),a("div",K,[U(R,{class:"my-4",error:u.value,thing:"occupancy data",onRetry:e[0]||(e[0]=o=>v())},null,8,["error"])])):d("",!0),p.value&&!l.value?(n(),a("div",M,e[3]||(e[3]=[t("div",{class:"spinner-grow text-muted",role:"status"},[t("span",{class:"sr-only"},"Loading...")],-1)]))):(n(),a("div",q,[(n(!0),a(_,null,x(i.value,o=>(n(),a("div",{key:o.name},[t("div",A,[t("div",J,[t("div",O,[t("div",P,[t("strong",null,m(o.name),1)]),o.open?(n(),a("div",Q,e[4]||(e[4]=[t("i",{class:"fa fa-check text-success"},null,-1)]))):d("",!0)])])]),(n(!0),a(_,null,x(o.zones,c=>(n(),a(_,{key:c.zoneKey},[o.open?d("",!0):(n(),a("div",X,[t("div",Y,[c.status==="Closed"?(n(),a("div",z,[t("div",G,[e[5]||(e[5]=t("span",{class:"fa fa-times-circle text-warning ml-1"},null,-1)),t("span",tt,[V(m(c.zoneShortName),1),c.timestamp?(n(),a("span",et," - closed "+m(S(c.timestamp.diffNow().toHuman())),1)):d("",!0)])])])):d("",!0)])]))],64))),128)),e[6]||(e[6]=t("hr",null,null,-1))]))),128))]))]))}}),vt=H(st,[["__scopeId","data-v-c537d785"]]);export{vt 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.