import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{mt as t}from"./antd-NNbrPHoG.js";function n(e){return String(e).padStart(2,`0`)}function r(e){if(e==null)return null;if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=(e instanceof Date?e:new Date(e)).getTime();return Number.isNaN(t)?null:t}function i(e){let t=r(e);if(t==null)return`—`;let i=new Date(t);return[`${i.getFullYear()}-${n(i.getMonth()+1)}-${n(i.getDate())}`,`${n(i.getHours())}:${n(i.getMinutes())}:${n(i.getSeconds())}`].join(` `)}function a(e,t){return[...e].sort((e,n)=>{let i=r(t(e))??-1/0;return(r(t(n))??-1/0)-i})}var o=e(t(),1);function s(e){let t=(0,o.useRef)(!1),n=(0,o.useRef)(!1);return e&&(t.current=!0),(0,o.useEffect)(()=>{t.current&&!e&&(n.current=!0)},[e]),e&&!n.current}export{i as n,a as r,s as t};