/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.25/esri/copyright.txt for details. */ function e(e){return t(e)??n(e)}function n(e){const n=new Date(e).getTime();return Number.isNaN(n)?null:n}function t(e){const n=s.exec(e);if(!n?.groups)return null;const t=n.groups,u=+t.year,o=+t.month-1,r=+t.day,f=+(t.hours??"0"),i=+(t.minutes??"0"),d=+(t.seconds??"0");if(f>23)return null;if(i>59)return null;if(d>59)return null;const l=t.ms??"0",c=l?+l.padEnd(3,"0").substring(0,3):0;let a;if(t.isUTC)a=Date.UTC(u,o,r,f,i,d,c);else if(t.offsetSign){const e=+t.offsetHours,n=+t.offsetMinutes;a=6e4*("+"===t.offsetSign?-1:1)*(60*e+n)+Date.UTC(u,o,r,f,i,d,c)}else a=new Date(u,o,r,f,i,d,c).getTime();return Number.isNaN(a)?null:a}const s=/^(?:(?-?\d{4,})-(?\d{2})-(?\d{2}))(?:T(?\d{2}):(?\d{2}):(?\d{2})(?:\.(?\d+))?)?(?:(?Z)|(?:(?\+|-)(?\d{2}):(?\d{2})))?$/;export{e as parseDate,n as parseJSDate};