//#region packages/intl-locale/should-polyfill.ts
/**
* https://bugs.chromium.org/p/v8/issues/detail?id=10682
*/
function hasIntlGetCanonicalLocalesBug() {
	try {
		return new Intl.Locale("und-x-private").toString() === "x-private";
	} catch {
		return true;
	}
}
/**
* Check if Intl.Locale is missing the variants property.
* This property was added to ECMA-402 via PR #960.
* https://github.com/tc39/ecma402/pull/960
* https://github.com/tc39/ecma402/issues/900
*/
function hasVariantsProperty() {
	try {
		const locale = new Intl.Locale("en-US-posix");
		const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(locale), "variants");
		return descriptor !== void 0 && typeof descriptor.get === "function";
	} catch {
		return false;
	}
}
/**
* Check if Intl.Locale is missing critical methods from the Intl Locale Info proposal.
* Firefox has an incomplete implementation that lacks getWeekInfo() and other methods.
* https://github.com/formatjs/formatjs/issues/5112
* https://bugzilla.mozilla.org/show_bug.cgi?id=1693576
*/
function hasIncompleteLocaleInfo() {
	try {
		const locale = new Intl.Locale("en-US");
		if (typeof locale.getWeekInfo !== "function") return true;
		if (typeof locale.getCalendars !== "function" || typeof locale.getCollations !== "function" || typeof locale.getHourCycles !== "function" || typeof locale.getNumberingSystems !== "function" || typeof locale.getTimeZones !== "function" || typeof locale.getTextInfo !== "function") return true;
		return false;
	} catch {
		return true;
	}
}
function shouldPolyfill() {
	return !("Locale" in Intl) || hasIntlGetCanonicalLocalesBug() || hasIncompleteLocaleInfo() || !hasVariantsProperty();
}
//#endregion
export { shouldPolyfill };

//# sourceMappingURL=should-polyfill.js.map