//#region node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js
function e(e, t) {
	let i = s(t);
	return "formatToParts" in i ? n(i, e) : r(i, e);
}
var t = {
	year: 0,
	month: 1,
	day: 2,
	hour: 3,
	minute: 4,
	second: 5
};
function n(e, n) {
	try {
		let r = e.formatToParts(n), i = [];
		for (let e = 0; e < r.length; e++) {
			let n = t[r[e].type];
			n !== void 0 && (i[n] = parseInt(r[e].value, 10));
		}
		return i;
	} catch (e) {
		if (e instanceof RangeError) return [NaN];
		throw e;
	}
}
function r(e, t) {
	let n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
	return [
		parseInt(r[3], 10),
		parseInt(r[1], 10),
		parseInt(r[2], 10),
		parseInt(r[4], 10),
		parseInt(r[5], 10),
		parseInt(r[6], 10)
	];
}
var i = {}, a = new Intl.DateTimeFormat("en-US", {
	hourCycle: "h23",
	timeZone: "America/New_York",
	year: "numeric",
	month: "2-digit",
	day: "2-digit",
	hour: "2-digit",
	minute: "2-digit",
	second: "2-digit"
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), o = a === "06/25/2014, 00:00:00" || a === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
function s(e) {
	return i[e] || (i[e] = o ? new Intl.DateTimeFormat("en-US", {
		hourCycle: "h23",
		timeZone: e,
		year: "numeric",
		month: "numeric",
		day: "2-digit",
		hour: "2-digit",
		minute: "2-digit",
		second: "2-digit"
	}) : new Intl.DateTimeFormat("en-US", {
		hour12: !1,
		timeZone: e,
		year: "numeric",
		month: "numeric",
		day: "2-digit",
		hour: "2-digit",
		minute: "2-digit",
		second: "2-digit"
	})), i[e];
}
//#endregion
//#region node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js
function c(e, t, n, r, i, a, o) {
	let s = /* @__PURE__ */ new Date(0);
	return s.setUTCFullYear(e, t, n), s.setUTCHours(r, i, a, o), s;
}
//#endregion
//#region node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js
var l = 36e5, u = 6e4, d = {
	timezone: /([Z+-].*)$/,
	timezoneZ: /^(Z)$/,
	timezoneHH: /^([+-]\d{2})$/,
	timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
};
function f(e, t, n) {
	if (!e) return 0;
	let r = d.timezoneZ.exec(e);
	if (r) return 0;
	let i, a;
	if (r = d.timezoneHH.exec(e), r) return i = parseInt(r[1], 10), g(i) ? -(i * l) : NaN;
	if (r = d.timezoneHHMM.exec(e), r) {
		i = parseInt(r[2], 10);
		let e = parseInt(r[3], 10);
		return g(i, e) ? (a = Math.abs(i) * l + e * u, r[1] === "+" ? -a : a) : NaN;
	}
	if (v(e)) {
		t = new Date(t || Date.now());
		let r = m(n ? t : p(t), e);
		return -(n ? r : h(t, r, e));
	}
	return NaN;
}
function p(e) {
	return c(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
}
function m(t, n) {
	let r = e(t, n), i = c(r[0], r[1] - 1, r[2], r[3] % 24, r[4], r[5], 0).getTime(), a = t.getTime(), o = a % 1e3;
	return a -= o >= 0 ? o : 1e3 + o, i - a;
}
function h(e, t, n) {
	let r = e.getTime() - t, i = m(new Date(r), n);
	if (t === i) return t;
	r -= i - t;
	let a = m(new Date(r), n);
	return i === a ? i : Math.max(i, a);
}
function g(e, t) {
	return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
}
var _ = {};
function v(e) {
	if (_[e]) return !0;
	try {
		return new Intl.DateTimeFormat(void 0, { timeZone: e }), _[e] = !0, !0;
	} catch {
		return !1;
	}
}
//#endregion
//#region node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
function y(e) {
	let t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
	return t.setUTCFullYear(e.getFullYear()), e - +t;
}
//#endregion
//#region node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js
var b = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, x = 36e5, S = 6e4, C = 2, w = {
	dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
	datePattern: /^([0-9W+-]+)(.*)/,
	plainTime: /:/,
	YY: /^(\d{2})$/,
	YYY: [
		/^([+-]\d{2})$/,
		/^([+-]\d{3})$/,
		/^([+-]\d{4})$/
	],
	YYYY: /^(\d{4})/,
	YYYYY: [
		/^([+-]\d{4})/,
		/^([+-]\d{5})/,
		/^([+-]\d{6})/
	],
	MM: /^-(\d{2})$/,
	DDD: /^-?(\d{3})$/,
	MMDD: /^-?(\d{2})-?(\d{2})$/,
	Www: /^-?W(\d{2})$/,
	WwwD: /^-?W(\d{2})-?(\d{1})$/,
	HH: /^(\d{2}([.,]\d*)?)$/,
	HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
	HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
	timeZone: b
};
function T(e, t = {}) {
	if (arguments.length < 1) throw TypeError("1 argument required, but only " + arguments.length + " present");
	if (e === null) return /* @__PURE__ */ new Date(NaN);
	let n = t.additionalDigits == null ? C : Number(t.additionalDigits);
	if (n !== 2 && n !== 1 && n !== 0) throw RangeError("additionalDigits must be 0, 1 or 2");
	if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]") return new Date(e.getTime());
	if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]") return new Date(e);
	if (Object.prototype.toString.call(e) !== "[object String]") return /* @__PURE__ */ new Date(NaN);
	let r = E(e), { year: i, restDateString: a } = D(r.date, n), o = O(a, i);
	if (o === null || isNaN(o.getTime())) return /* @__PURE__ */ new Date(NaN);
	if (o) {
		let e = o.getTime(), n = 0, i;
		if (r.time && (n = k(r.time), n === null || isNaN(n))) return /* @__PURE__ */ new Date(NaN);
		if (r.timeZone || t.timeZone) {
			if (i = f(r.timeZone || t.timeZone, new Date(e + n)), isNaN(i)) return /* @__PURE__ */ new Date(NaN);
		} else i = y(new Date(e + n)), i = y(new Date(e + n + i));
		return new Date(e + n + i);
	} else return /* @__PURE__ */ new Date(NaN);
}
function E(e) {
	let t = {}, n = w.dateTimePattern.exec(e), r;
	if (n ? (t.date = n[1], r = n[3]) : (n = w.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
		let e = w.timeZone.exec(r);
		e ? (t.time = r.replace(e[1], ""), t.timeZone = e[1].trim()) : t.time = r;
	}
	return t;
}
function D(e, t) {
	if (e) {
		let n = w.YYY[t], r = w.YYYYY[t], i = w.YYYY.exec(e) || r.exec(e);
		if (i) {
			let t = i[1];
			return {
				year: parseInt(t, 10),
				restDateString: e.slice(t.length)
			};
		}
		if (i = w.YY.exec(e) || n.exec(e), i) {
			let t = i[1];
			return {
				year: parseInt(t, 10) * 100,
				restDateString: e.slice(t.length)
			};
		}
	}
	return { year: null };
}
function O(e, t) {
	if (t === null) return null;
	let n, r, i;
	if (!e || !e.length) return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
	let a = w.MM.exec(e);
	if (a) return n = /* @__PURE__ */ new Date(0), r = parseInt(a[1], 10) - 1, P(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
	if (a = w.DDD.exec(e), a) {
		n = /* @__PURE__ */ new Date(0);
		let e = parseInt(a[1], 10);
		return F(t, e) ? (n.setUTCFullYear(t, 0, e), n) : /* @__PURE__ */ new Date(NaN);
	}
	if (a = w.MMDD.exec(e), a) {
		n = /* @__PURE__ */ new Date(0), r = parseInt(a[1], 10) - 1;
		let e = parseInt(a[2], 10);
		return P(t, r, e) ? (n.setUTCFullYear(t, r, e), n) : /* @__PURE__ */ new Date(NaN);
	}
	if (a = w.Www.exec(e), a) return i = parseInt(a[1], 10) - 1, I(i) ? A(t, i) : /* @__PURE__ */ new Date(NaN);
	if (a = w.WwwD.exec(e), a) {
		i = parseInt(a[1], 10) - 1;
		let e = parseInt(a[2], 10) - 1;
		return I(i, e) ? A(t, i, e) : /* @__PURE__ */ new Date(NaN);
	}
	return null;
}
function k(e) {
	let t, n, r = w.HH.exec(e);
	if (r) return t = parseFloat(r[1].replace(",", ".")), L(t) ? t % 24 * x : NaN;
	if (r = w.HHMM.exec(e), r) return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), L(t, n) ? t % 24 * x + n * S : NaN;
	if (r = w.HHMMSS.exec(e), r) {
		t = parseInt(r[1], 10), n = parseInt(r[2], 10);
		let e = parseFloat(r[3].replace(",", "."));
		return L(t, n, e) ? t % 24 * x + n * S + e * 1e3 : NaN;
	}
	return null;
}
function A(e, t, n) {
	t ||= 0, n ||= 0;
	let r = /* @__PURE__ */ new Date(0);
	r.setUTCFullYear(e, 0, 4);
	let i = r.getUTCDay() || 7, a = t * 7 + n + 1 - i;
	return r.setUTCDate(r.getUTCDate() + a), r;
}
var j = [
	31,
	28,
	31,
	30,
	31,
	30,
	31,
	31,
	30,
	31,
	30,
	31
], M = [
	31,
	29,
	31,
	30,
	31,
	30,
	31,
	31,
	30,
	31,
	30,
	31
];
function N(e) {
	return e % 400 == 0 || e % 4 == 0 && e % 100 != 0;
}
function P(e, t, n) {
	if (t < 0 || t > 11) return !1;
	if (n != null) {
		if (n < 1) return !1;
		let r = N(e);
		if (r && n > M[t] || !r && n > j[t]) return !1;
	}
	return !0;
}
function F(e, t) {
	if (t < 1) return !1;
	let n = N(e);
	return !(n && t > 366 || !n && t > 365);
}
function I(e, t) {
	return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
}
function L(e, t, n) {
	return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
}
//#endregion
//#region node_modules/date-fns-tz/dist/esm/toZonedTime/index.js
function R(e, t, n) {
	e = T(e, n);
	let r = f(t, e, !0), i = new Date(e.getTime() - r), a = /* @__PURE__ */ new Date(0);
	return a.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), a.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), a;
}
//#endregion
export { c as a, f as i, T as n, b as r, R as t };
