/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
var l="system",d="unknown",f=Intl.DateTimeFormat().resolvedOptions().timeZone,a={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function c(e,s,t){return e===0?0:e*a[s]/a[t]}function r(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function g(e,s,t="hours"){let n=new Date(e.getTime()),i=c(s,t,"milliseconds");return n.setTime(n.getTime()+i),n}function u(e,s){let t=c(s,"hours","milliseconds"),n=new Date(e.getTime()+t),i=n.toISOString().slice(0,10),o=n.getUTCHours()*60+n.getUTCMinutes();return{localDate:i,minutesSinceMidnight:o}}function T(e,s){let t=e?.environment?.lighting;if(m(t)){let n=t.displayUTCOffset??s??0,i=t.date;if(r(i)){let{localDate:o}=u(i,n);return o}}}function m(e){return e?.type==="sun"}export{l as a,d as b,f as c,c as d,r as e,g as f,u as g,T as h,m as i};
