1import{u as S}from"./ekSX7_HF.js";import{b as M,a as u,w,o as I,l as s,h as a,A as r,s as f,q as t,B as _,i as h,p as z}from"./BI8qgwQJ.js";import{_ as U}from"./app-BAclpbpz.js";import"./BTqQ_sdn.js";const B={key:0,class:"label"},P={class:"time"},D=["textContent"],L=["textContent"],N={key:1,class:"label"},v="unixClock",W=M({__name:"WidgetUnixClock",props:{widget:{}},emits:["updateProps"],setup(C,{expose:b,emit:g}){const k={transparent:{type:"boolean",default:!1},fontSize:{type:"number",default:1.5,step:.1},showMs:{type:"boolean",default:!0},showLabel:{type:"boolean",default:!0}},c=C,x=g,{widgetProps:e,configure:y}=S(v,k,c,x);let n;const l=u(""),d=u(""),i=u(!1);let p=null;w(i,o=>{o&&window.setTimeout(()=>{i.value=!1},30)});const m=()=>{const o=Date.now();l.value=Math.floor(o/1e3).toString(),d.value=Math.floor(o%1e3/10).toString().padStart(2,"0"),l.value!==p&&(i.value=!0),p=l.value};return m(),w(()=>e.showMs,()=>{n&&window.clearInterval(n),n=window.setInterval(m,e.showMs?10:1e3)},{immediate:!0}),I(()=>{window.clearInterval(n)}),b({name:v,configure:y,id:c.widget?c.widget.id:null}),(o,E)=>(a(),s("div",{class:h(["mkw-unixClock _monospace",{_panel:!t(e).transparent}]),style:z({fontSize:`${t(e).fontSize}em`})},[t(e).showLabel?(a(),s("div",B,"UNIX Epoch")):r("",!0),f("div",P,[f("span",{textContent:_(l.value)},null,8,D),t(e).showMs?(a(),s("span",{key:0,class:h(["colon",{showColon:i.value}])},":",2)):r("",!0),t(e).showMs?(a(),s("span",{key:1,textContent:_(d.value)},null,8,L)):r("",!0)]),t(e).showLabel?(a(),s("div",N,"UTC")):r("",!0)],6))}}),X=U(W,[["__scopeId","data-v-bb7f047b"]]);export{X 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.