import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{fi as t,gt as n,ht as r,ot as i}from"./assetDetailsContext-DJ9YCJO5.js";var a=e(t()),o=e=>{let[t,n]=(0,a.useState)(!1),r=(0,a.useRef)(!0),[o,s]=i();return(0,a.useEffect)(()=>{e.forEach(({key:e,value:t,setter:n})=>{o.has(e)&&r.current?n(decodeURIComponent(o.get(e)||``)):o.set(e,t)}),s(o,{replace:!0}),r.current=!1,t||n(!0)},[o,JSON.stringify(e)]),t};n();var s=(e,t)=>{if(e===null&&t===null)return 0;if(e===null)return-1;if(t===null)return 1;var n=r(e,`DD/MM/YYYY HH:mm:ss`),i=r(t,`DD/MM/YYYY HH:mm:ss`);return!n.isValid()&&!i.isValid()?0:n.isValid()?i.isValid()?n.valueOf()-i.valueOf():1:-1},c=(e,t)=>{if(e===null&&t===null)return 0;if(e===null)return-1;if(t===null)return 1;var n=r(e,`DD/MM/YYYY`),i=r(t,`DD/MM/YYYY`);if(!n.isValid()&&!i.isValid())return 0;if(!n.isValid())return-1;if(!i.isValid())return 1;let a=n.format(`YYYYMMDD`),o=i.format(`YYYYMMDD`);return a===o?0:a<o?-1:1};export{c as n,o as r,s as t};
//# sourceMappingURL=dateComparator-BYHuM3pD.js.map