import{k as l,r,j as m,F as A}from"./vendor.e6eaca24.js";import{f as u}from"./index.6ed2c2c6.js";import{f as D,b as E}from"./index.c6944236.js";function g(e,s){return e>=s?new Date(+e-Math.min(+e-+s+1,60*1e3)):e}let n=e=>{const[a,f]=r.exports.useState(new Date),o=()=>+a-+e.time<=2592e6,[t,c]=r.exports.useState(o());r.exports.useEffect(()=>{if(t){const T=setInterval(()=>f(new Date),3e4);return()=>clearInterval(T)}},[t]),r.exports.useEffect(()=>{o()!==t&&c(!t)},[a,e.time]);const i=D(e.time,e.dateOnly)[1];return m(A,{children:t?m("span",{title:i,children:u(g(e.time,a),E.locale,{relativeDate:a})}):i})};n=l(n);var M=n;export{M as T};
