From 9bd23bd0aec1042976e3af122ba319fec48c7486 Mon Sep 17 00:00:00 2001 From: Pornchai Korpraserttaworn Date: Wed, 6 Mar 2024 10:05:58 +0700 Subject: [PATCH] Update document for efx-grid v6.0.120 --- index.html | 2 +- resources/elf-halo-dark.js | 37113 ++++++++++++++++++---------------- resources/elf-halo-light.js | 37113 ++++++++++++++++++---------------- template-184.html | 6 +- template-87.html | 9 +- 5 files changed, 39924 insertions(+), 34319 deletions(-) diff --git a/index.html b/index.html index 6859b3fd..2f7ec467 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
Theme :

\ No newline at end of file +
Theme :

\ No newline at end of file diff --git a/resources/elf-halo-dark.js b/resources/elf-halo-dark.js index 914c595f..1b3cf2e4 100644 --- a/resources/elf-halo-dark.js +++ b/resources/elf-halo-dark.js @@ -39,1964 +39,137 @@ /***/ }), - /***/8928: ( /***/(__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + /***/2952: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { "use strict"; - // ESM COMPAT FLAG - __webpack_require__.r(__webpack_exports__); - - // EXPORTS - __webpack_require__.d(__webpack_exports__, { - ArrayCreate: () => ( /* reexport */ArrayCreate), - CanonicalizeLocaleList: () => ( /* reexport */CanonicalizeLocaleList), - CanonicalizeTimeZoneName: () => ( /* reexport */CanonicalizeTimeZoneName), - CoerceOptionsToObject: () => ( /* reexport */CoerceOptionsToObject), - ComputeExponent: () => ( /* reexport */ComputeExponent), - ComputeExponentForMagnitude: () => ( /* reexport */ComputeExponentForMagnitude), - CurrencyDigits: () => ( /* reexport */CurrencyDigits), - DateFromTime: () => ( /* reexport */DateFromTime), - Day: () => ( /* reexport */Day), - DayFromYear: () => ( /* reexport */DayFromYear), - DayWithinYear: () => ( /* reexport */DayWithinYear), - DaysInYear: () => ( /* reexport */DaysInYear), - FormatNumericToParts: () => ( /* reexport */FormatNumericToParts), - FormatNumericToString: () => ( /* reexport */FormatNumericToString), - GetNumberOption: () => ( /* reexport */GetNumberOption), - GetOption: () => ( /* reexport */GetOption), - GetOptionsObject: () => ( /* reexport */GetOptionsObject), - HasOwnProperty: () => ( /* reexport */HasOwnProperty), - HourFromTime: () => ( /* reexport */HourFromTime), - InLeapYear: () => ( /* reexport */InLeapYear), - InitializeNumberFormat: () => ( /* reexport */InitializeNumberFormat), - IsSanctionedSimpleUnitIdentifier: () => ( /* reexport */IsSanctionedSimpleUnitIdentifier), - IsValidTimeZoneName: () => ( /* reexport */IsValidTimeZoneName), - IsWellFormedCurrencyCode: () => ( /* reexport */IsWellFormedCurrencyCode), - IsWellFormedUnitIdentifier: () => ( /* reexport */IsWellFormedUnitIdentifier), - MinFromTime: () => ( /* reexport */MinFromTime), - MonthFromTime: () => ( /* reexport */MonthFromTime), - OrdinaryHasInstance: () => ( /* reexport */OrdinaryHasInstance), - PartitionNumberPattern: () => ( /* reexport */PartitionNumberPattern), - PartitionPattern: () => ( /* reexport */PartitionPattern), - RangePatternType: () => ( /* reexport */RangePatternType), - SANCTIONED_UNITS: () => ( /* reexport */SANCTIONED_UNITS), - SIMPLE_UNITS: () => ( /* reexport */SIMPLE_UNITS), - SameValue: () => ( /* reexport */SameValue), - SecFromTime: () => ( /* reexport */SecFromTime), - SetNumberFormatDigitOptions: () => ( /* reexport */SetNumberFormatDigitOptions), - SetNumberFormatUnitOptions: () => ( /* reexport */SetNumberFormatUnitOptions), - SupportedLocales: () => ( /* reexport */SupportedLocales), - TimeClip: () => ( /* reexport */TimeClip), - TimeFromYear: () => ( /* reexport */TimeFromYear), - ToNumber: () => ( /* reexport */ToNumber), - ToObject: () => ( /* reexport */ToObject), - ToRawFixed: () => ( /* reexport */ToRawFixed), - ToRawPrecision: () => ( /* reexport */ToRawPrecision), - ToString: () => ( /* reexport */ToString), - Type: () => ( /* reexport */Type), - WeekDay: () => ( /* reexport */WeekDay), - YearFromTime: () => ( /* reexport */YearFromTime), - _formatToParts: () => ( /* reexport */formatToParts), - defineProperty: () => ( /* reexport */defineProperty), - getInternalSlot: () => ( /* reexport */getInternalSlot), - getMagnitude: () => ( /* reexport */getMagnitude), - getMultiInternalSlots: () => ( /* reexport */getMultiInternalSlots), - invariant: () => ( /* reexport */invariant), - isLiteralPart: () => ( /* reexport */isLiteralPart), - isMissingLocaleDataError: () => ( /* reexport */isMissingLocaleDataError), - msFromTime: () => ( /* reexport */msFromTime), - removeUnitNamespace: () => ( /* reexport */removeUnitNamespace), - setInternalSlot: () => ( /* reexport */setInternalSlot), - setMultiInternalSlots: () => ( /* reexport */setMultiInternalSlots) + Object.defineProperty(exports, "__esModule", { + value: true }); - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeLocaleList.js + exports.isUnicodeLanguageSubtag = exports.isUnicodeScriptSubtag = exports.isUnicodeRegionSubtag = exports.isStructurallyValidLanguageTag = exports.parseUnicodeLanguageId = exports.parseUnicodeLocaleId = exports.getCanonicalLocales = void 0; + var tslib_1 = __webpack_require__(5215); + var parser_1 = __webpack_require__(4195); + var emitter_1 = __webpack_require__(8400); + var canonicalizer_1 = __webpack_require__(2784); /** - * http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist + * https://tc39.es/ecma402/#sec-canonicalizelocalelist * @param locales */ function CanonicalizeLocaleList(locales) { - // TODO - return Intl.getCanonicalLocales(locales); - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeTimeZoneName.js - /** - * https://tc39.es/ecma402/#sec-canonicalizetimezonename - * @param tz - */ - function CanonicalizeTimeZoneName(tz, _a) { - var tzData = _a.tzData, - uppercaseLinks = _a.uppercaseLinks; - var uppercasedTz = tz.toUpperCase(); - var uppercasedZones = Object.keys(tzData).reduce(function (all, z) { - all[z.toUpperCase()] = z; - return all; - }, {}); - var ianaTimeZone = uppercaseLinks[uppercasedTz] || uppercasedZones[uppercasedTz]; - if (ianaTimeZone === 'Etc/UTC' || ianaTimeZone === 'Etc/GMT') { - return 'UTC'; - } - return ianaTimeZone; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/262.js - /** - * https://tc39.es/ecma262/#sec-tostring - */ - function ToString(o) { - // Only symbol is irregular... - if (typeof o === 'symbol') { - throw TypeError('Cannot convert a Symbol value to a string'); - } - return String(o); - } - /** - * https://tc39.es/ecma262/#sec-tonumber - * @param val - */ - function ToNumber(val) { - if (val === undefined) { - return NaN; - } - if (val === null) { - return +0; - } - if (typeof val === 'boolean') { - return val ? 1 : +0; - } - if (typeof val === 'number') { - return val; - } - if (typeof val === 'symbol' || typeof val === 'bigint') { - throw new TypeError('Cannot convert symbol/bigint to number'); - } - return Number(val); - } - /** - * https://tc39.es/ecma262/#sec-tointeger - * @param n - */ - function ToInteger(n) { - var number = ToNumber(n); - if (isNaN(number) || SameValue(number, -0)) { - return 0; - } - if (isFinite(number)) { - return number; - } - var integer = Math.floor(Math.abs(number)); - if (number < 0) { - integer = -integer; - } - if (SameValue(integer, -0)) { - return 0; - } - return integer; - } - /** - * https://tc39.es/ecma262/#sec-timeclip - * @param time - */ - function TimeClip(time) { - if (!isFinite(time)) { - return NaN; - } - if (Math.abs(time) > 8.64 * 1e15) { - return NaN; - } - return ToInteger(time); - } - /** - * https://tc39.es/ecma262/#sec-toobject - * @param arg - */ - function ToObject(arg) { - if (arg == null) { - throw new TypeError('undefined/null cannot be converted to object'); - } - return Object(arg); - } - /** - * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue - * @param x - * @param y - */ - function SameValue(x, y) { - if (Object.is) { - return Object.is(x, y); - } - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - /** - * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate - * @param len - */ - function ArrayCreate(len) { - return new Array(len); - } - /** - * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty - * @param o - * @param prop - */ - function HasOwnProperty(o, prop) { - return Object.prototype.hasOwnProperty.call(o, prop); - } - /** - * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type - * @param x - */ - function Type(x) { - if (x === null) { - return 'Null'; - } - if (typeof x === 'undefined') { - return 'Undefined'; - } - if (typeof x === 'function' || typeof x === 'object') { - return 'Object'; - } - if (typeof x === 'number') { - return 'Number'; - } - if (typeof x === 'boolean') { - return 'Boolean'; - } - if (typeof x === 'string') { - return 'String'; - } - if (typeof x === 'symbol') { - return 'Symbol'; - } - if (typeof x === 'bigint') { - return 'BigInt'; - } - } - var MS_PER_DAY = 86400000; - /** - * https://www.ecma-international.org/ecma-262/11.0/index.html#eqn-modulo - * @param x - * @param y - * @return k of the same sign as y - */ - function mod(x, y) { - return x - Math.floor(x / y) * y; - } - /** - * https://tc39.es/ecma262/#eqn-Day - * @param t - */ - function Day(t) { - return Math.floor(t / MS_PER_DAY); - } - /** - * https://tc39.es/ecma262/#sec-week-day - * @param t - */ - function WeekDay(t) { - return mod(Day(t) + 4, 7); - } - /** - * https://tc39.es/ecma262/#sec-year-number - * @param y - */ - function DayFromYear(y) { - return Date.UTC(y, 0) / MS_PER_DAY; - } - /** - * https://tc39.es/ecma262/#sec-year-number - * @param y - */ - function TimeFromYear(y) { - return Date.UTC(y, 0); - } - /** - * https://tc39.es/ecma262/#sec-year-number - * @param t - */ - function YearFromTime(t) { - return new Date(t).getUTCFullYear(); - } - function DaysInYear(y) { - if (y % 4 !== 0) { - return 365; - } - if (y % 100 !== 0) { - return 366; - } - if (y % 400 !== 0) { - return 365; - } - return 366; - } - function DayWithinYear(t) { - return Day(t) - DayFromYear(YearFromTime(t)); - } - function InLeapYear(t) { - return DaysInYear(YearFromTime(t)) === 365 ? 0 : 1; - } - /** - * https://tc39.es/ecma262/#sec-month-number - * @param t - */ - function MonthFromTime(t) { - var dwy = DayWithinYear(t); - var leap = InLeapYear(t); - if (dwy >= 0 && dwy < 31) { - return 0; - } - if (dwy < 59 + leap) { - return 1; - } - if (dwy < 90 + leap) { - return 2; - } - if (dwy < 120 + leap) { - return 3; - } - if (dwy < 151 + leap) { - return 4; - } - if (dwy < 181 + leap) { - return 5; - } - if (dwy < 212 + leap) { - return 6; - } - if (dwy < 243 + leap) { - return 7; - } - if (dwy < 273 + leap) { - return 8; - } - if (dwy < 304 + leap) { - return 9; - } - if (dwy < 334 + leap) { - return 10; - } - if (dwy < 365 + leap) { - return 11; - } - throw new Error('Invalid time'); - } - function DateFromTime(t) { - var dwy = DayWithinYear(t); - var mft = MonthFromTime(t); - var leap = InLeapYear(t); - if (mft === 0) { - return dwy + 1; - } - if (mft === 1) { - return dwy - 30; - } - if (mft === 2) { - return dwy - 58 - leap; - } - if (mft === 3) { - return dwy - 89 - leap; - } - if (mft === 4) { - return dwy - 119 - leap; - } - if (mft === 5) { - return dwy - 150 - leap; - } - if (mft === 6) { - return dwy - 180 - leap; - } - if (mft === 7) { - return dwy - 211 - leap; - } - if (mft === 8) { - return dwy - 242 - leap; - } - if (mft === 9) { - return dwy - 272 - leap; - } - if (mft === 10) { - return dwy - 303 - leap; - } - if (mft === 11) { - return dwy - 333 - leap; - } - throw new Error('Invalid time'); - } - var HOURS_PER_DAY = 24; - var MINUTES_PER_HOUR = 60; - var SECONDS_PER_MINUTE = 60; - var MS_PER_SECOND = 1e3; - var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE; - var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR; - function HourFromTime(t) { - return mod(Math.floor(t / MS_PER_HOUR), HOURS_PER_DAY); - } - function MinFromTime(t) { - return mod(Math.floor(t / MS_PER_MINUTE), MINUTES_PER_HOUR); - } - function SecFromTime(t) { - return mod(Math.floor(t / MS_PER_SECOND), SECONDS_PER_MINUTE); - } - function IsCallable(fn) { - return typeof fn === 'function'; - } - /** - * The abstract operation OrdinaryHasInstance implements - * the default algorithm for determining if an object O - * inherits from the instance object inheritance path - * provided by constructor C. - * @param C class - * @param O object - * @param internalSlots internalSlots - */ - function OrdinaryHasInstance(C, O, internalSlots) { - if (!IsCallable(C)) { - return false; - } - if (internalSlots === null || internalSlots === void 0 ? void 0 : internalSlots.boundTargetFunction) { - var BC = internalSlots === null || internalSlots === void 0 ? void 0 : internalSlots.boundTargetFunction; - return O instanceof BC; - } - if (typeof O !== 'object') { - return false; - } - var P = C.prototype; - if (typeof P !== 'object') { - throw new TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + if (locales === undefined) { + return []; } - return Object.prototype.isPrototypeOf.call(P, O); - } - function msFromTime(t) { - return mod(t, MS_PER_SECOND); - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js - - /** - * https://tc39.es/ecma402/#sec-coerceoptionstoobject - * @param options - * @returns - */ - function CoerceOptionsToObject(options) { - if (typeof options === 'undefined') { - return Object.create(null); + var seen = []; + if (typeof locales === 'string') { + locales = [locales]; } - return ToObject(options); - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/DefaultNumberOption.js - function DefaultNumberOption(val, min, max, fallback) { - if (val !== undefined) { - val = Number(val); - if (isNaN(val) || val < min || val > max) { - throw new RangeError("".concat(val, " is outside of range [").concat(min, ", ").concat(max, "]")); + for (var _i = 0, locales_1 = locales; _i < locales_1.length; _i++) { + var locale = locales_1[_i]; + var canonicalizedTag = (0, emitter_1.emitUnicodeLocaleId)((0, canonicalizer_1.canonicalizeUnicodeLocaleId)((0, parser_1.parseUnicodeLocaleId)(locale))); + if (seen.indexOf(canonicalizedTag) < 0) { + seen.push(canonicalizedTag); } - return Math.floor(val); } - return fallback; + return seen; } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/GetNumberOption.js - /** - * https://tc39.es/ecma402/#sec-getnumberoption - * @param options - * @param property - * @param min - * @param max - * @param fallback - */ - - function GetNumberOption(options, property, minimum, maximum, fallback) { - var val = options[property]; - // @ts-expect-error - return DefaultNumberOption(val, minimum, maximum, fallback); + function getCanonicalLocales(locales) { + return CanonicalizeLocaleList(locales); } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/GetOption.js - - /** - * https://tc39.es/ecma402/#sec-getoption - * @param opts - * @param prop - * @param type - * @param values - * @param fallback - */ - function GetOption(opts, prop, type, values, fallback) { - if (typeof opts !== 'object') { - throw new TypeError('Options must be an object'); + exports.getCanonicalLocales = getCanonicalLocales; + var parser_2 = __webpack_require__(4195); + Object.defineProperty(exports, "parseUnicodeLocaleId", { + enumerable: true, + get: function () { + return parser_2.parseUnicodeLocaleId; } - var value = opts[prop]; - if (value !== undefined) { - if (type !== 'boolean' && type !== 'string') { - throw new TypeError('invalid type'); - } - if (type === 'boolean') { - value = Boolean(value); - } - if (type === 'string') { - value = ToString(value); - } - if (values !== undefined && !values.filter(function (val) { - return val == value; - }).length) { - throw new RangeError("".concat(value, " is not within ").concat(values.join(', '))); - } - return value; + }); + Object.defineProperty(exports, "parseUnicodeLanguageId", { + enumerable: true, + get: function () { + return parser_2.parseUnicodeLanguageId; } - return fallback; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js - /** - * https://tc39.es/ecma402/#sec-getoptionsobject - * @param options - * @returns - */ - function GetOptionsObject(options) { - if (typeof options === 'undefined') { - return Object.create(null); + }); + Object.defineProperty(exports, "isStructurallyValidLanguageTag", { + enumerable: true, + get: function () { + return parser_2.isStructurallyValidLanguageTag; } - if (typeof options === 'object') { - return options; + }); + Object.defineProperty(exports, "isUnicodeRegionSubtag", { + enumerable: true, + get: function () { + return parser_2.isUnicodeRegionSubtag; } - throw new TypeError('Options must be an object'); - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js - /** - * https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers - */ - var SANCTIONED_UNITS = ['angle-degree', 'area-acre', 'area-hectare', 'concentr-percent', 'digital-bit', 'digital-byte', 'digital-gigabit', 'digital-gigabyte', 'digital-kilobit', 'digital-kilobyte', 'digital-megabit', 'digital-megabyte', 'digital-petabyte', 'digital-terabit', 'digital-terabyte', 'duration-day', 'duration-hour', 'duration-millisecond', 'duration-minute', 'duration-month', 'duration-second', 'duration-week', 'duration-year', 'length-centimeter', 'length-foot', 'length-inch', 'length-kilometer', 'length-meter', 'length-mile-scandinavian', 'length-mile', 'length-millimeter', 'length-yard', 'mass-gram', 'mass-kilogram', 'mass-ounce', 'mass-pound', 'mass-stone', 'temperature-celsius', 'temperature-fahrenheit', 'volume-fluid-ounce', 'volume-gallon', 'volume-liter', 'volume-milliliter']; - // In CLDR, the unit name always follows the form `namespace-unit` pattern. - // For example: `digital-bit` instead of `bit`. This function removes the namespace prefix. - function removeUnitNamespace(unit) { - return unit.slice(unit.indexOf('-') + 1); - } - /** - * https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers - */ - var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace); - /** - * https://tc39.es/ecma402/#sec-issanctionedsimpleunitidentifier - */ - function IsSanctionedSimpleUnitIdentifier(unitIdentifier) { - return SIMPLE_UNITS.indexOf(unitIdentifier) > -1; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/IsValidTimeZoneName.js - /** - * https://tc39.es/ecma402/#sec-isvalidtimezonename - * @param tz - * @param implDetails implementation details - */ - function IsValidTimeZoneName(tz, _a) { - var tzData = _a.tzData, - uppercaseLinks = _a.uppercaseLinks; - var uppercasedTz = tz.toUpperCase(); - var zoneNames = new Set(); - var linkNames = new Set(); - Object.keys(tzData).map(function (z) { - return z.toUpperCase(); - }).forEach(function (z) { - return zoneNames.add(z); - }); - Object.keys(uppercaseLinks).forEach(function (linkName) { - linkNames.add(linkName.toUpperCase()); - zoneNames.add(uppercaseLinks[linkName].toUpperCase()); - }); - return zoneNames.has(uppercasedTz) || linkNames.has(uppercasedTz); - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedCurrencyCode.js - /** - * This follows https://tc39.es/ecma402/#sec-case-sensitivity-and-case-mapping - * @param str string to convert - */ - function toUpperCase(str) { - return str.replace(/([a-z])/g, function (_, c) { - return c.toUpperCase(); - }); - } - var NOT_A_Z_REGEX = /[^A-Z]/; - /** - * https://tc39.es/ecma402/#sec-iswellformedcurrencycode - */ - function IsWellFormedCurrencyCode(currency) { - currency = toUpperCase(currency); - if (currency.length !== 3) { - return false; + }); + Object.defineProperty(exports, "isUnicodeScriptSubtag", { + enumerable: true, + get: function () { + return parser_2.isUnicodeScriptSubtag; } - if (NOT_A_Z_REGEX.test(currency)) { - return false; + }); + Object.defineProperty(exports, "isUnicodeLanguageSubtag", { + enumerable: true, + get: function () { + return parser_2.isUnicodeLanguageSubtag; } - return true; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedUnitIdentifier.js + }); + (0, tslib_1.__exportStar)(__webpack_require__(8199), exports); + (0, tslib_1.__exportStar)(__webpack_require__(8400), exports); + (0, tslib_1.__exportStar)(__webpack_require__(5802), exports); - /** - * This follows https://tc39.es/ecma402/#sec-case-sensitivity-and-case-mapping - * @param str string to convert - */ - function toLowerCase(str) { - return str.replace(/([A-Z])/g, function (_, c) { - return c.toLowerCase(); - }); - } - /** - * https://tc39.es/ecma402/#sec-iswellformedunitidentifier - * @param unit - */ - function IsWellFormedUnitIdentifier(unit) { - unit = toLowerCase(unit); - if (IsSanctionedSimpleUnitIdentifier(unit)) { - return true; - } - var units = unit.split('-per-'); - if (units.length !== 2) { - return false; - } - var numerator = units[0], - denominator = units[1]; - if (!IsSanctionedSimpleUnitIdentifier(numerator) || !IsSanctionedSimpleUnitIdentifier(denominator)) { - return false; - } - return true; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/utils.js - /** - * Cannot do Math.log(x) / Math.log(10) bc if IEEE floating point issue - * @param x number - */ - function getMagnitude(x) { - // Cannot count string length via Number.toString because it may use scientific notation - // for very small or very large numbers. - return Math.floor(Math.log(x) * Math.LOG10E); - } - function repeat(s, times) { - if (typeof s.repeat === 'function') { - return s.repeat(times); - } - var arr = new Array(times); - for (var i = 0; i < arr.length; i++) { - arr[i] = s; - } - return arr.join(''); - } - function setInternalSlot(map, pl, field, value) { - if (!map.get(pl)) { - map.set(pl, Object.create(null)); - } - var slots = map.get(pl); - slots[field] = value; - } - function setMultiInternalSlots(map, pl, props) { - for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) { - var k = _a[_i]; - setInternalSlot(map, pl, k, props[k]); - } - } - function getInternalSlot(map, pl, field) { - return getMultiInternalSlots(map, pl, field)[field]; - } - function getMultiInternalSlots(map, pl) { - var fields = []; - for (var _i = 2; _i < arguments.length; _i++) { - fields[_i - 2] = arguments[_i]; - } - var slots = map.get(pl); - if (!slots) { - throw new TypeError("".concat(pl, " InternalSlot has not been initialized")); + /***/ + }), + /***/4792: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { + "use strict"; + + var __webpack_unused_export__; + __webpack_unused_export__ = { + value: true + }; + var _1 = __webpack_require__(2952); + var should_polyfill_1 = __webpack_require__(8782); + if (typeof Intl === 'undefined') { + if (typeof window !== 'undefined') { + Object.defineProperty(window, 'Intl', { + value: {} + }); + // @ts-ignore we don't include @types/node so global isn't a thing + } else if (typeof __webpack_require__.g !== 'undefined') { + // @ts-ignore we don't include @types/node so global isn't a thing + Object.defineProperty(__webpack_require__.g, 'Intl', { + value: {} + }); } - return fields.reduce(function (all, f) { - all[f] = slots[f]; - return all; - }, Object.create(null)); } - function isLiteralPart(patternPart) { - return patternPart.type === 'literal'; - } - /* - 17 ECMAScript Standard Built-in Objects: - Every built-in Function object, including constructors, that is not - identified as an anonymous function has a name property whose value - is a String. - - Unless otherwise specified, the name property of a built-in Function - object, if it exists, has the attributes { [[Writable]]: false, - [[Enumerable]]: false, [[Configurable]]: true }. - */ - function defineProperty(target, name, _a) { - var value = _a.value; - Object.defineProperty(target, name, { - configurable: true, - enumerable: false, + if ((0, should_polyfill_1.shouldPolyfill)()) { + Object.defineProperty(Intl, 'getCanonicalLocales', { + value: _1.getCanonicalLocales, writable: true, - value: value + enumerable: false, + configurable: true }); } - var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi; - function invariant(condition, message, Err) { - if (Err === void 0) { - Err = Error; - } - if (!condition) { - throw new Err(message); - } - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponentForMagnitude.js - /** - * The abstract operation ComputeExponentForMagnitude computes an exponent by which to scale a - * number of the given magnitude (power of ten of the most significant digit) according to the - * locale and the desired notation (scientific, engineering, or compact). - */ - function ComputeExponentForMagnitude(numberFormat, magnitude, _a) { - var getInternalSlots = _a.getInternalSlots; - var internalSlots = getInternalSlots(numberFormat); - var notation = internalSlots.notation, - dataLocaleData = internalSlots.dataLocaleData, - numberingSystem = internalSlots.numberingSystem; - switch (notation) { - case 'standard': - return 0; - case 'scientific': - return magnitude; - case 'engineering': - return Math.floor(magnitude / 3) * 3; - default: - { - // Let exponent be an implementation- and locale-dependent (ILD) integer by which to scale a - // number of the given magnitude in compact notation for the current locale. - var compactDisplay = internalSlots.compactDisplay, - style = internalSlots.style, - currencyDisplay = internalSlots.currencyDisplay; - var thresholdMap = void 0; - if (style === 'currency' && currencyDisplay !== 'name') { - var currency = dataLocaleData.numbers.currency[numberingSystem] || dataLocaleData.numbers.currency[dataLocaleData.numbers.nu[0]]; - thresholdMap = currency.short; - } else { - var decimal = dataLocaleData.numbers.decimal[numberingSystem] || dataLocaleData.numbers.decimal[dataLocaleData.numbers.nu[0]]; - thresholdMap = compactDisplay === 'long' ? decimal.long : decimal.short; - } - if (!thresholdMap) { - return 0; - } - var num = String(Math.pow(10, magnitude)); - var thresholds = Object.keys(thresholdMap); // TODO: this can be pre-processed - if (num < thresholds[0]) { - return 0; - } - if (num > thresholds[thresholds.length - 1]) { - return thresholds[thresholds.length - 1].length - 1; - } - var i = thresholds.indexOf(num); - if (i === -1) { - return 0; - } - // See https://unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats - // Special handling if the pattern is precisely `0`. - var magnitudeKey = thresholds[i]; - // TODO: do we need to handle plural here? - var compactPattern = thresholdMap[magnitudeKey].other; - if (compactPattern === '0') { - return 0; - } - // Example: in zh-TW, `10000000` maps to `0000萬`. So we need to return 8 - 4 = 4 here. - return magnitudeKey.length - thresholdMap[magnitudeKey].other.match(/0+/)[0].length; - } - } - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js - - function ToRawPrecision(x, minPrecision, maxPrecision) { - var p = maxPrecision; - var m; - var e; - var xFinal; - if (x === 0) { - m = repeat('0', p); - e = 0; - xFinal = 0; - } else { - var xToString = x.toString(); - // If xToString is formatted as scientific notation, the number is either very small or very - // large. If the precision of the formatted string is lower that requested max precision, we - // should still infer them from the formatted string, otherwise the formatted result might have - // precision loss (e.g. 1e41 will not have 0 in every trailing digits). - var xToStringExponentIndex = xToString.indexOf('e'); - var _a = xToString.split('e'), - xToStringMantissa = _a[0], - xToStringExponent = _a[1]; - var xToStringMantissaWithoutDecimalPoint = xToStringMantissa.replace('.', ''); - if (xToStringExponentIndex >= 0 && xToStringMantissaWithoutDecimalPoint.length <= p) { - e = +xToStringExponent; - m = xToStringMantissaWithoutDecimalPoint + repeat('0', p - xToStringMantissaWithoutDecimalPoint.length); - xFinal = x; - } else { - e = getMagnitude(x); - var decimalPlaceOffset = e - p + 1; - // n is the integer containing the required precision digits. To derive the formatted string, - // we will adjust its decimal place in the logic below. - var n = Math.round(adjustDecimalPlace(x, decimalPlaceOffset)); - // The rounding caused the change of magnitude, so we should increment `e` by 1. - if (adjustDecimalPlace(n, p - 1) >= 10) { - e = e + 1; - // Divide n by 10 to swallow one precision. - n = Math.floor(n / 10); - } - m = n.toString(); - // Equivalent of n * 10 ** (e - p + 1) - xFinal = adjustDecimalPlace(n, p - 1 - e); - } - } - var int; - if (e >= p - 1) { - m = m + repeat('0', e - p + 1); - int = e + 1; - } else if (e >= 0) { - m = "".concat(m.slice(0, e + 1), ".").concat(m.slice(e + 1)); - int = e + 1; - } else { - m = "0.".concat(repeat('0', -e - 1)).concat(m); - int = 1; - } - if (m.indexOf('.') >= 0 && maxPrecision > minPrecision) { - var cut = maxPrecision - minPrecision; - while (cut > 0 && m[m.length - 1] === '0') { - m = m.slice(0, -1); - cut--; - } - if (m[m.length - 1] === '.') { - m = m.slice(0, -1); - } - } - return { - formattedString: m, - roundedNumber: xFinal, - integerDigitsCount: int - }; - // x / (10 ** magnitude), but try to preserve as much floating point precision as possible. - function adjustDecimalPlace(x, magnitude) { - return magnitude < 0 ? x * Math.pow(10, -magnitude) : x / Math.pow(10, magnitude); - } - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawFixed.js - /** - * TODO: dedup with intl-pluralrules and support BigInt - * https://tc39.es/ecma402/#sec-torawfixed - * @param x a finite non-negative Number or BigInt - * @param minFraction and integer between 0 and 20 - * @param maxFraction and integer between 0 and 20 - */ - function ToRawFixed(x, minFraction, maxFraction) { - var f = maxFraction; - var n = Math.round(x * Math.pow(10, f)); - var xFinal = n / Math.pow(10, f); - // n is a positive integer, but it is possible to be greater than 1e21. - // In such case we will go the slow path. - // See also: https://tc39.es/ecma262/#sec-numeric-types-number-tostring - var m; - if (n < 1e21) { - m = n.toString(); - } else { - m = n.toString(); - var _a = m.split('e'), - mantissa = _a[0], - exponent = _a[1]; - m = mantissa.replace('.', ''); - m = m + repeat('0', Math.max(+exponent - m.length + 1, 0)); - } - var int; - if (f !== 0) { - var k = m.length; - if (k <= f) { - var z = repeat('0', f + 1 - k); - m = z + m; - k = f + 1; - } - var a = m.slice(0, k - f); - var b = m.slice(k - f); - m = "".concat(a, ".").concat(b); - int = a.length; - } else { - int = m.length; - } - var cut = maxFraction - minFraction; - while (cut > 0 && m[m.length - 1] === '0') { - m = m.slice(0, -1); - cut--; - } - if (m[m.length - 1] === '.') { - m = m.slice(0, -1); - } - return { - formattedString: m, - roundedNumber: xFinal, - integerDigitsCount: int - }; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToString.js + /***/ + }), + /***/8782: ( /***/(__unused_webpack_module, exports) => { + "use strict"; - /** - * https://tc39.es/ecma402/#sec-formatnumberstring - */ - function FormatNumericToString(intlObject, x) { - var isNegative = x < 0 || SameValue(x, -0); - if (isNegative) { - x = -x; - } - var result; - var rourndingType = intlObject.roundingType; - switch (rourndingType) { - case 'significantDigits': - result = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits); - break; - case 'fractionDigits': - result = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits); - break; - default: - result = ToRawPrecision(x, 1, 2); - if (result.integerDigitsCount > 1) { - result = ToRawFixed(x, 0, 0); - } - break; - } - x = result.roundedNumber; - var string = result.formattedString; - var int = result.integerDigitsCount; - var minInteger = intlObject.minimumIntegerDigits; - if (int < minInteger) { - var forwardZeros = repeat('0', minInteger - int); - string = forwardZeros + string; - } - if (isNegative) { - x = -x; - } - return { - roundedNumber: x, - formattedString: string - }; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.shouldPolyfill = void 0; + function shouldPolyfill() { + return typeof Intl === 'undefined' || !('getCanonicalLocales' in Intl) || + // Native Intl.getCanonicalLocales is just buggy + // https://bugs.chromium.org/p/v8/issues/detail?id=10682 + Intl.getCanonicalLocales('und-x-private')[0] === 'x-private'; } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponent.js + exports.shouldPolyfill = shouldPolyfill; - /** - * The abstract operation ComputeExponent computes an exponent (power of ten) by which to scale x - * according to the number formatting settings. It handles cases such as 999 rounding up to 1000, - * requiring a different exponent. - * - * NOT IN SPEC: it returns [exponent, magnitude]. - */ - function ComputeExponent(numberFormat, x, _a) { - var getInternalSlots = _a.getInternalSlots; - if (x === 0) { - return [0, 0]; - } - if (x < 0) { - x = -x; - } - var magnitude = getMagnitude(x); - var exponent = ComputeExponentForMagnitude(numberFormat, magnitude, { - getInternalSlots: getInternalSlots - }); - // Preserve more precision by doing multiplication when exponent is negative. - x = exponent < 0 ? x * Math.pow(10, -exponent) : x / Math.pow(10, exponent); - var formatNumberResult = FormatNumericToString(getInternalSlots(numberFormat), x); - if (formatNumberResult.roundedNumber === 0) { - return [exponent, magnitude]; - } - var newMagnitude = getMagnitude(formatNumberResult.roundedNumber); - if (newMagnitude === magnitude - exponent) { - return [exponent, magnitude]; - } - return [ComputeExponentForMagnitude(numberFormat, magnitude + 1, { - getInternalSlots: getInternalSlots - }), magnitude + 1]; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/CurrencyDigits.js - - /** - * https://tc39.es/ecma402/#sec-currencydigits - */ - function CurrencyDigits(c, _a) { - var currencyDigitsData = _a.currencyDigitsData; - return HasOwnProperty(currencyDigitsData, c) ? currencyDigitsData[c] : 2; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/digit-mapping.generated.js - var digitMapping = { - "adlm": ["𞥐", "𞥑", "𞥒", "𞥓", "𞥔", "𞥕", "𞥖", "𞥗", "𞥘", "𞥙"], - "ahom": ["𑜰", "𑜱", "𑜲", "𑜳", "𑜴", "𑜵", "𑜶", "𑜷", "𑜸", "𑜹"], - "arab": ["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"], - "arabext": ["۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹"], - "bali": ["᭐", "᭑", "᭒", "᭓", "᭔", "᭕", "᭖", "᭗", "᭘", "᭙"], - "beng": ["০", "১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯"], - "bhks": ["𑱐", "𑱑", "𑱒", "𑱓", "𑱔", "𑱕", "𑱖", "𑱗", "𑱘", "𑱙"], - "brah": ["𑁦", "𑁧", "𑁨", "𑁩", "𑁪", "𑁫", "𑁬", "𑁭", "𑁮", "𑁯"], - "cakm": ["𑄶", "𑄷", "𑄸", "𑄹", "𑄺", "𑄻", "𑄼", "𑄽", "𑄾", "𑄿"], - "cham": ["꩐", "꩑", "꩒", "꩓", "꩔", "꩕", "꩖", "꩗", "꩘", "꩙"], - "deva": ["०", "१", "२", "३", "४", "५", "६", "७", "८", "९"], - "diak": ["𑥐", "𑥑", "𑥒", "𑥓", "𑥔", "𑥕", "𑥖", "𑥗", "𑥘", "𑥙"], - "fullwide": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], - "gong": ["𑶠", "𑶡", "𑶢", "𑶣", "𑶤", "𑶥", "𑶦", "𑶧", "𑶨", "𑶩"], - "gonm": ["𑵐", "𑵑", "𑵒", "𑵓", "𑵔", "𑵕", "𑵖", "𑵗", "𑵘", "𑵙"], - "gujr": ["૦", "૧", "૨", "૩", "૪", "૫", "૬", "૭", "૮", "૯"], - "guru": ["੦", "੧", "੨", "੩", "੪", "੫", "੬", "੭", "੮", "੯"], - "hanidec": ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"], - "hmng": ["𖭐", "𖭑", "𖭒", "𖭓", "𖭔", "𖭕", "𖭖", "𖭗", "𖭘", "𖭙"], - "hmnp": ["𞅀", "𞅁", "𞅂", "𞅃", "𞅄", "𞅅", "𞅆", "𞅇", "𞅈", "𞅉"], - "java": ["꧐", "꧑", "꧒", "꧓", "꧔", "꧕", "꧖", "꧗", "꧘", "꧙"], - "kali": ["꤀", "꤁", "꤂", "꤃", "꤄", "꤅", "꤆", "꤇", "꤈", "꤉"], - "khmr": ["០", "១", "២", "៣", "៤", "៥", "៦", "៧", "៨", "៩"], - "knda": ["೦", "೧", "೨", "೩", "೪", "೫", "೬", "೭", "೮", "೯"], - "lana": ["᪀", "᪁", "᪂", "᪃", "᪄", "᪅", "᪆", "᪇", "᪈", "᪉"], - "lanatham": ["᪐", "᪑", "᪒", "᪓", "᪔", "᪕", "᪖", "᪗", "᪘", "᪙"], - "laoo": ["໐", "໑", "໒", "໓", "໔", "໕", "໖", "໗", "໘", "໙"], - "lepc": ["᪐", "᪑", "᪒", "᪓", "᪔", "᪕", "᪖", "᪗", "᪘", "᪙"], - "limb": ["᥆", "᥇", "᥈", "᥉", "᥊", "᥋", "᥌", "᥍", "᥎", "᥏"], - "mathbold": ["𝟎", "𝟏", "𝟐", "𝟑", "𝟒", "𝟓", "𝟔", "𝟕", "𝟖", "𝟗"], - "mathdbl": ["𝟘", "𝟙", "𝟚", "𝟛", "𝟜", "𝟝", "𝟞", "𝟟", "𝟠", "𝟡"], - "mathmono": ["𝟶", "𝟷", "𝟸", "𝟹", "𝟺", "𝟻", "𝟼", "𝟽", "𝟾", "𝟿"], - "mathsanb": ["𝟬", "𝟭", "𝟮", "𝟯", "𝟰", "𝟱", "𝟲", "𝟳", "𝟴", "𝟵"], - "mathsans": ["𝟢", "𝟣", "𝟤", "𝟥", "𝟦", "𝟧", "𝟨", "𝟩", "𝟪", "𝟫"], - "mlym": ["൦", "൧", "൨", "൩", "൪", "൫", "൬", "൭", "൮", "൯"], - "modi": ["𑙐", "𑙑", "𑙒", "𑙓", "𑙔", "𑙕", "𑙖", "𑙗", "𑙘", "𑙙"], - "mong": ["᠐", "᠑", "᠒", "᠓", "᠔", "᠕", "᠖", "᠗", "᠘", "᠙"], - "mroo": ["𖩠", "𖩡", "𖩢", "𖩣", "𖩤", "𖩥", "𖩦", "𖩧", "𖩨", "𖩩"], - "mtei": ["꯰", "꯱", "꯲", "꯳", "꯴", "꯵", "꯶", "꯷", "꯸", "꯹"], - "mymr": ["၀", "၁", "၂", "၃", "၄", "၅", "၆", "၇", "၈", "၉"], - "mymrshan": ["႐", "႑", "႒", "႓", "႔", "႕", "႖", "႗", "႘", "႙"], - "mymrtlng": ["꧰", "꧱", "꧲", "꧳", "꧴", "꧵", "꧶", "꧷", "꧸", "꧹"], - "newa": ["𑑐", "𑑑", "𑑒", "𑑓", "𑑔", "𑑕", "𑑖", "𑑗", "𑑘", "𑑙"], - "nkoo": ["߀", "߁", "߂", "߃", "߄", "߅", "߆", "߇", "߈", "߉"], - "olck": ["᱐", "᱑", "᱒", "᱓", "᱔", "᱕", "᱖", "᱗", "᱘", "᱙"], - "orya": ["୦", "୧", "୨", "୩", "୪", "୫", "୬", "୭", "୮", "୯"], - "osma": ["𐒠", "𐒡", "𐒢", "𐒣", "𐒤", "𐒥", "𐒦", "𐒧", "𐒨", "𐒩"], - "rohg": ["𐴰", "𐴱", "𐴲", "𐴳", "𐴴", "𐴵", "𐴶", "𐴷", "𐴸", "𐴹"], - "saur": ["꣐", "꣑", "꣒", "꣓", "꣔", "꣕", "꣖", "꣗", "꣘", "꣙"], - "segment": ["🯰", "🯱", "🯲", "🯳", "🯴", "🯵", "🯶", "🯷", "🯸", "🯹"], - "shrd": ["𑇐", "𑇑", "𑇒", "𑇓", "𑇔", "𑇕", "𑇖", "𑇗", "𑇘", "𑇙"], - "sind": ["𑋰", "𑋱", "𑋲", "𑋳", "𑋴", "𑋵", "𑋶", "𑋷", "𑋸", "𑋹"], - "sinh": ["෦", "෧", "෨", "෩", "෪", "෫", "෬", "෭", "෮", "෯"], - "sora": ["𑃰", "𑃱", "𑃲", "𑃳", "𑃴", "𑃵", "𑃶", "𑃷", "𑃸", "𑃹"], - "sund": ["᮰", "᮱", "᮲", "᮳", "᮴", "᮵", "᮶", "᮷", "᮸", "᮹"], - "takr": ["𑛀", "𑛁", "𑛂", "𑛃", "𑛄", "𑛅", "𑛆", "𑛇", "𑛈", "𑛉"], - "talu": ["᧐", "᧑", "᧒", "᧓", "᧔", "᧕", "᧖", "᧗", "᧘", "᧙"], - "tamldec": ["௦", "௧", "௨", "௩", "௪", "௫", "௬", "௭", "௮", "௯"], - "telu": ["౦", "౧", "౨", "౩", "౪", "౫", "౬", "౭", "౮", "౯"], - "thai": ["๐", "๑", "๒", "๓", "๔", "๕", "๖", "๗", "๘", "๙"], - "tibt": ["༠", "༡", "༢", "༣", "༤", "༥", "༦", "༧", "༨", "༩"], - "tirh": ["𑓐", "𑓑", "𑓒", "𑓓", "𑓔", "𑓕", "𑓖", "𑓗", "𑓘", "𑓙"], - "vaii": ["ᘠ", "ᘡ", "ᘢ", "ᘣ", "ᘤ", "ᘥ", "ᘦ", "ᘧ", "ᘨ", "ᘩ"], - "wara": ["𑣠", "𑣡", "𑣢", "𑣣", "𑣤", "𑣥", "𑣦", "𑣧", "𑣨", "𑣩"], - "wcho": ["𞋰", "𞋱", "𞋲", "𞋳", "𞋴", "𞋵", "𞋶", "𞋷", "𞋸", "𞋹"] - }; - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js - // @generated from regex-gen.ts - var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/; - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js - - // This is from: unicode-12.1.0/General_Category/Symbol/regex.js - // IE11 does not support unicode flag, otherwise this is just /\p{S}/u. - // /^\p{S}/u - var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source)); - // /\p{S}$/u - var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$")); - var CLDR_NUMBER_PATTERN = /[#0](?:[\.,][#0]+)*/g; - function formatToParts(numberResult, data, pl, options) { - var sign = numberResult.sign, - exponent = numberResult.exponent, - magnitude = numberResult.magnitude; - var notation = options.notation, - style = options.style, - numberingSystem = options.numberingSystem; - var defaultNumberingSystem = data.numbers.nu[0]; - // #region Part 1: partition and interpolate the CLDR number pattern. - // ---------------------------------------------------------- - var compactNumberPattern = null; - if (notation === 'compact' && magnitude) { - compactNumberPattern = getCompactDisplayPattern(numberResult, pl, data, style, options.compactDisplay, options.currencyDisplay, numberingSystem); - } - // This is used multiple times - var nonNameCurrencyPart; - if (style === 'currency' && options.currencyDisplay !== 'name') { - var byCurrencyDisplay = data.currencies[options.currency]; - if (byCurrencyDisplay) { - switch (options.currencyDisplay) { - case 'code': - nonNameCurrencyPart = options.currency; - break; - case 'symbol': - nonNameCurrencyPart = byCurrencyDisplay.symbol; - break; - default: - nonNameCurrencyPart = byCurrencyDisplay.narrow; - break; - } - } else { - // Fallback for unknown currency - nonNameCurrencyPart = options.currency; - } - } - var numberPattern; - if (!compactNumberPattern) { - // Note: if the style is unit, or is currency and the currency display is name, - // its unit parts will be interpolated in part 2. So here we can fallback to decimal. - if (style === 'decimal' || style === 'unit' || style === 'currency' && options.currencyDisplay === 'name') { - // Shortcut for decimal - var decimalData = data.numbers.decimal[numberingSystem] || data.numbers.decimal[defaultNumberingSystem]; - numberPattern = getPatternForSign(decimalData.standard, sign); - } else if (style === 'currency') { - var currencyData = data.numbers.currency[numberingSystem] || data.numbers.currency[defaultNumberingSystem]; - // We replace number pattern part with `0` for easier postprocessing. - numberPattern = getPatternForSign(currencyData[options.currencySign], sign); - } else { - // percent - var percentPattern = data.numbers.percent[numberingSystem] || data.numbers.percent[defaultNumberingSystem]; - numberPattern = getPatternForSign(percentPattern, sign); - } - } else { - numberPattern = compactNumberPattern; - } - // Extract the decimal number pattern string. It looks like "#,##0,00", which will later be - // used to infer decimal group sizes. - var decimalNumberPattern = CLDR_NUMBER_PATTERN.exec(numberPattern)[0]; - // Now we start to substitute patterns - // 1. replace strings like `0` and `#,##0.00` with `{0}` - // 2. unquote characters (invariant: the quoted characters does not contain the special tokens) - numberPattern = numberPattern.replace(CLDR_NUMBER_PATTERN, '{0}').replace(/'(.)'/g, '$1'); - // Handle currency spacing (both compact and non-compact). - if (style === 'currency' && options.currencyDisplay !== 'name') { - var currencyData = data.numbers.currency[numberingSystem] || data.numbers.currency[defaultNumberingSystem]; - // See `currencySpacing` substitution rule in TR-35. - // Here we always assume the currencyMatch is "[:^S:]" and surroundingMatch is "[:digit:]". - // - // Example 1: for pattern "#,##0.00¤" with symbol "US$", we replace "¤" with the symbol, - // but insert an extra non-break space before the symbol, because "[:^S:]" matches "U" in - // "US$" and "[:digit:]" matches the latn numbering system digits. - // - // Example 2: for pattern "¤#,##0.00" with symbol "US$", there is no spacing between symbol - // and number, because `$` does not match "[:^S:]". - // - // Implementation note: here we do the best effort to infer the insertion. - // We also assume that `beforeInsertBetween` and `afterInsertBetween` will never be `;`. - var afterCurrency = currencyData.currencySpacing.afterInsertBetween; - if (afterCurrency && !S_DOLLAR_UNICODE_REGEX.test(nonNameCurrencyPart)) { - numberPattern = numberPattern.replace('¤{0}', "\u00A4".concat(afterCurrency, "{0}")); - } - var beforeCurrency = currencyData.currencySpacing.beforeInsertBetween; - if (beforeCurrency && !CARET_S_UNICODE_REGEX.test(nonNameCurrencyPart)) { - numberPattern = numberPattern.replace('{0}¤', "{0}".concat(beforeCurrency, "\u00A4")); - } - } - // The following tokens are special: `{0}`, `¤`, `%`, `-`, `+`, `{c:...}. - var numberPatternParts = numberPattern.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g); - var numberParts = []; - var symbols = data.numbers.symbols[numberingSystem] || data.numbers.symbols[defaultNumberingSystem]; - for (var _i = 0, numberPatternParts_1 = numberPatternParts; _i < numberPatternParts_1.length; _i++) { - var part = numberPatternParts_1[_i]; - if (!part) { - continue; - } - switch (part) { - case '{0}': - { - // We only need to handle scientific and engineering notation here. - numberParts.push.apply(numberParts, paritionNumberIntoParts(symbols, numberResult, notation, exponent, numberingSystem, - // If compact number pattern exists, do not insert group separators. - !compactNumberPattern && options.useGrouping, decimalNumberPattern)); - break; - } - case '-': - numberParts.push({ - type: 'minusSign', - value: symbols.minusSign - }); - break; - case '+': - numberParts.push({ - type: 'plusSign', - value: symbols.plusSign - }); - break; - case '%': - numberParts.push({ - type: 'percentSign', - value: symbols.percentSign - }); - break; - case '¤': - // Computed above when handling currency spacing. - numberParts.push({ - type: 'currency', - value: nonNameCurrencyPart - }); - break; - default: - if (/^\{c:/.test(part)) { - numberParts.push({ - type: 'compact', - value: part.substring(3, part.length - 1) - }); - } else { - // literal - numberParts.push({ - type: 'literal', - value: part - }); - } - break; - } - } - // #endregion - // #region Part 2: interpolate unit pattern if necessary. - // ---------------------------------------------- - switch (style) { - case 'currency': - { - // `currencyDisplay: 'name'` has similar pattern handling as units. - if (options.currencyDisplay === 'name') { - var unitPattern = (data.numbers.currency[numberingSystem] || data.numbers.currency[defaultNumberingSystem]).unitPattern; - // Select plural - var unitName = void 0; - var currencyNameData = data.currencies[options.currency]; - if (currencyNameData) { - unitName = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), currencyNameData.displayName); - } else { - // Fallback for unknown currency - unitName = options.currency; - } - // Do {0} and {1} substitution - var unitPatternParts = unitPattern.split(/(\{[01]\})/g); - var result = []; - for (var _a = 0, unitPatternParts_1 = unitPatternParts; _a < unitPatternParts_1.length; _a++) { - var part = unitPatternParts_1[_a]; - switch (part) { - case '{0}': - result.push.apply(result, numberParts); - break; - case '{1}': - result.push({ - type: 'currency', - value: unitName - }); - break; - default: - if (part) { - result.push({ - type: 'literal', - value: part - }); - } - break; - } - } - return result; - } else { - return numberParts; - } - } - case 'unit': - { - var unit = options.unit, - unitDisplay = options.unitDisplay; - var unitData = data.units.simple[unit]; - var unitPattern = void 0; - if (unitData) { - // Simple unit pattern - unitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[unit][unitDisplay]); - } else { - // See: http://unicode.org/reports/tr35/tr35-general.html#perUnitPatterns - // If cannot find unit in the simple pattern, it must be "per" compound pattern. - // Implementation note: we are not following TR-35 here because we need to format to parts! - var _b = unit.split('-per-'), - numeratorUnit = _b[0], - denominatorUnit = _b[1]; - unitData = data.units.simple[numeratorUnit]; - var numeratorUnitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[numeratorUnit][unitDisplay]); - var perUnitPattern = data.units.simple[denominatorUnit].perUnit[unitDisplay]; - if (perUnitPattern) { - // perUnitPattern exists, combine it with numeratorUnitPattern - unitPattern = perUnitPattern.replace('{0}', numeratorUnitPattern); - } else { - // get compoundUnit pattern (e.g. "{0} per {1}"), repalce {0} with numerator pattern and {1} with - // the denominator pattern in singular form. - var perPattern = data.units.compound.per[unitDisplay]; - var denominatorPattern = selectPlural(pl, 1, data.units.simple[denominatorUnit][unitDisplay]); - unitPattern = unitPattern = perPattern.replace('{0}', numeratorUnitPattern).replace('{1}', denominatorPattern.replace('{0}', '')); - } - } - var result = []; - // We need spacing around "{0}" because they are not treated as "unit" parts, but "literal". - for (var _c = 0, _d = unitPattern.split(/(\s*\{0\}\s*)/); _c < _d.length; _c++) { - var part = _d[_c]; - var interpolateMatch = /^(\s*)\{0\}(\s*)$/.exec(part); - if (interpolateMatch) { - // Space before "{0}" - if (interpolateMatch[1]) { - result.push({ - type: 'literal', - value: interpolateMatch[1] - }); - } - // "{0}" itself - result.push.apply(result, numberParts); - // Space after "{0}" - if (interpolateMatch[2]) { - result.push({ - type: 'literal', - value: interpolateMatch[2] - }); - } - } else if (part) { - result.push({ - type: 'unit', - value: part - }); - } - } - return result; - } - default: - return numberParts; - } - // #endregion - } - // A subset of https://tc39.es/ecma402/#sec-partitionnotationsubpattern - // Plus the exponent parts handling. - function paritionNumberIntoParts(symbols, numberResult, notation, exponent, numberingSystem, useGrouping, - /** - * This is the decimal number pattern without signs or symbols. - * It is used to infer the group size when `useGrouping` is true. - * - * A typical value looks like "#,##0.00" (primary group size is 3). - * Some locales like Hindi has secondary group size of 2 (e.g. "#,##,##0.00"). - */ - decimalNumberPattern) { - var result = []; - // eslint-disable-next-line prefer-const - var n = numberResult.formattedString, - x = numberResult.roundedNumber; - if (isNaN(x)) { - return [{ - type: 'nan', - value: n - }]; - } else if (!isFinite(x)) { - return [{ - type: 'infinity', - value: n - }]; - } - var digitReplacementTable = digitMapping[numberingSystem]; - if (digitReplacementTable) { - n = n.replace(/\d/g, function (digit) { - return digitReplacementTable[+digit] || digit; - }); - } - // TODO: Else use an implementation dependent algorithm to map n to the appropriate - // representation of n in the given numbering system. - var decimalSepIndex = n.indexOf('.'); - var integer; - var fraction; - if (decimalSepIndex > 0) { - integer = n.slice(0, decimalSepIndex); - fraction = n.slice(decimalSepIndex + 1); - } else { - integer = n; - } - // #region Grouping integer digits - // The weird compact and x >= 10000 check is to ensure consistency with Node.js and Chrome. - // Note that `de` does not have compact form for thousands, but Node.js does not insert grouping separator - // unless the rounded number is greater than 10000: - // NumberFormat('de', {notation: 'compact', compactDisplay: 'short'}).format(1234) //=> "1234" - // NumberFormat('de').format(1234) //=> "1.234" - if (useGrouping && (notation !== 'compact' || x >= 10000)) { - var groupSepSymbol = symbols.group; - var groups = []; - // > There may be two different grouping sizes: The primary grouping size used for the least - // > significant integer group, and the secondary grouping size used for more significant groups. - // > If a pattern contains multiple grouping separators, the interval between the last one and the - // > end of the integer defines the primary grouping size, and the interval between the last two - // > defines the secondary grouping size. All others are ignored. - var integerNumberPattern = decimalNumberPattern.split('.')[0]; - var patternGroups = integerNumberPattern.split(','); - var primaryGroupingSize = 3; - var secondaryGroupingSize = 3; - if (patternGroups.length > 1) { - primaryGroupingSize = patternGroups[patternGroups.length - 1].length; - } - if (patternGroups.length > 2) { - secondaryGroupingSize = patternGroups[patternGroups.length - 2].length; - } - var i = integer.length - primaryGroupingSize; - if (i > 0) { - // Slice the least significant integer group - groups.push(integer.slice(i, i + primaryGroupingSize)); - // Then iteratively push the more signicant groups - // TODO: handle surrogate pairs in some numbering system digits - for (i -= secondaryGroupingSize; i > 0; i -= secondaryGroupingSize) { - groups.push(integer.slice(i, i + secondaryGroupingSize)); - } - groups.push(integer.slice(0, i + secondaryGroupingSize)); - } else { - groups.push(integer); - } - while (groups.length > 0) { - var integerGroup = groups.pop(); - result.push({ - type: 'integer', - value: integerGroup - }); - if (groups.length > 0) { - result.push({ - type: 'group', - value: groupSepSymbol - }); - } - } - } else { - result.push({ - type: 'integer', - value: integer - }); - } - // #endregion - if (fraction !== undefined) { - result.push({ - type: 'decimal', - value: symbols.decimal - }, { - type: 'fraction', - value: fraction - }); - } - if ((notation === 'scientific' || notation === 'engineering') && isFinite(x)) { - result.push({ - type: 'exponentSeparator', - value: symbols.exponential - }); - if (exponent < 0) { - result.push({ - type: 'exponentMinusSign', - value: symbols.minusSign - }); - exponent = -exponent; - } - var exponentResult = ToRawFixed(exponent, 0, 0); - result.push({ - type: 'exponentInteger', - value: exponentResult.formattedString - }); - } - return result; - } - function getPatternForSign(pattern, sign) { - if (pattern.indexOf(';') < 0) { - pattern = "".concat(pattern, ";-").concat(pattern); - } - var _a = pattern.split(';'), - zeroPattern = _a[0], - negativePattern = _a[1]; - switch (sign) { - case 0: - return zeroPattern; - case -1: - return negativePattern; - default: - return negativePattern.indexOf('-') >= 0 ? negativePattern.replace(/-/g, '+') : "+".concat(zeroPattern); - } - } - // Find the CLDR pattern for compact notation based on the magnitude of data and style. - // - // Example return value: "¤ {c:laki}000;¤{c:laki} -0" (`sw` locale): - // - Notice the `{c:...}` token that wraps the compact literal. - // - The consecutive zeros are normalized to single zero to match CLDR_NUMBER_PATTERN. - // - // Returning null means the compact display pattern cannot be found. - function getCompactDisplayPattern(numberResult, pl, data, style, compactDisplay, currencyDisplay, numberingSystem) { - var _a; - var roundedNumber = numberResult.roundedNumber, - sign = numberResult.sign, - magnitude = numberResult.magnitude; - var magnitudeKey = String(Math.pow(10, magnitude)); - var defaultNumberingSystem = data.numbers.nu[0]; - var pattern; - if (style === 'currency' && currencyDisplay !== 'name') { - var byNumberingSystem = data.numbers.currency; - var currencyData = byNumberingSystem[numberingSystem] || byNumberingSystem[defaultNumberingSystem]; - // NOTE: compact notation ignores currencySign! - var compactPluralRules = (_a = currencyData.short) === null || _a === void 0 ? void 0 : _a[magnitudeKey]; - if (!compactPluralRules) { - return null; - } - pattern = selectPlural(pl, roundedNumber, compactPluralRules); - } else { - var byNumberingSystem = data.numbers.decimal; - var byCompactDisplay = byNumberingSystem[numberingSystem] || byNumberingSystem[defaultNumberingSystem]; - var compactPlaralRule = byCompactDisplay[compactDisplay][magnitudeKey]; - if (!compactPlaralRule) { - return null; - } - pattern = selectPlural(pl, roundedNumber, compactPlaralRule); - } - // See https://unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats - // > If the value is precisely “0”, either explicit or defaulted, then the normal number format - // > pattern for that sort of object is supplied. - if (pattern === '0') { - return null; - } - pattern = getPatternForSign(pattern, sign) - // Extract compact literal from the pattern - .replace(/([^\s;\-\+\d¤]+)/g, '{c:$1}') - // We replace one or more zeros with a single zero so it matches `CLDR_NUMBER_PATTERN`. - .replace(/0+/, '0'); - return pattern; - } - function selectPlural(pl, x, rules) { - return rules[pl.select(x)] || rules.other; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/PartitionNumberPattern.js - - /** - * https://tc39.es/ecma402/#sec-formatnumberstring - */ - function PartitionNumberPattern(numberFormat, x, _a) { - var _b; - var getInternalSlots = _a.getInternalSlots; - var internalSlots = getInternalSlots(numberFormat); - var pl = internalSlots.pl, - dataLocaleData = internalSlots.dataLocaleData, - numberingSystem = internalSlots.numberingSystem; - var symbols = dataLocaleData.numbers.symbols[numberingSystem] || dataLocaleData.numbers.symbols[dataLocaleData.numbers.nu[0]]; - var magnitude = 0; - var exponent = 0; - var n; - if (isNaN(x)) { - n = symbols.nan; - } else if (!isFinite(x)) { - n = symbols.infinity; - } else { - if (internalSlots.style === 'percent') { - x *= 100; - } - ; - _b = ComputeExponent(numberFormat, x, { - getInternalSlots: getInternalSlots - }), exponent = _b[0], magnitude = _b[1]; - // Preserve more precision by doing multiplication when exponent is negative. - x = exponent < 0 ? x * Math.pow(10, -exponent) : x / Math.pow(10, exponent); - var formatNumberResult = FormatNumericToString(internalSlots, x); - n = formatNumberResult.formattedString; - x = formatNumberResult.roundedNumber; - } - // Based on https://tc39.es/ecma402/#sec-getnumberformatpattern - // We need to do this before `x` is rounded. - var sign; - var signDisplay = internalSlots.signDisplay; - switch (signDisplay) { - case 'never': - sign = 0; - break; - case 'auto': - if (SameValue(x, 0) || x > 0 || isNaN(x)) { - sign = 0; - } else { - sign = -1; - } - break; - case 'always': - if (SameValue(x, 0) || x > 0 || isNaN(x)) { - sign = 1; - } else { - sign = -1; - } - break; - default: - // x === 0 -> x is 0 or x is -0 - if (x === 0 || isNaN(x)) { - sign = 0; - } else if (x > 0) { - sign = 1; - } else { - sign = -1; - } - } - return formatToParts({ - roundedNumber: x, - formattedString: n, - exponent: exponent, - magnitude: magnitude, - sign: sign - }, internalSlots.dataLocaleData, pl, internalSlots); - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToParts.js - - function FormatNumericToParts(nf, x, implDetails) { - var parts = PartitionNumberPattern(nf, x, implDetails); - var result = ArrayCreate(0); - for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) { - var part = parts_1[_i]; - result.push({ - type: part.type, - value: part.value - }); - } - return result; - } - - // EXTERNAL MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js + 3 modules - var ResolveLocale = __webpack_require__(9443); - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/SetNumberFormatUnitOptions.js - - /** - * https://tc39.es/ecma402/#sec-setnumberformatunitoptions - */ - function SetNumberFormatUnitOptions(nf, options, _a) { - if (options === void 0) { - options = Object.create(null); - } - var getInternalSlots = _a.getInternalSlots; - var internalSlots = getInternalSlots(nf); - var style = GetOption(options, 'style', 'string', ['decimal', 'percent', 'currency', 'unit'], 'decimal'); - internalSlots.style = style; - var currency = GetOption(options, 'currency', 'string', undefined, undefined); - if (currency !== undefined && !IsWellFormedCurrencyCode(currency)) { - throw RangeError('Malformed currency code'); - } - if (style === 'currency' && currency === undefined) { - throw TypeError('currency cannot be undefined'); - } - var currencyDisplay = GetOption(options, 'currencyDisplay', 'string', ['code', 'symbol', 'narrowSymbol', 'name'], 'symbol'); - var currencySign = GetOption(options, 'currencySign', 'string', ['standard', 'accounting'], 'standard'); - var unit = GetOption(options, 'unit', 'string', undefined, undefined); - if (unit !== undefined && !IsWellFormedUnitIdentifier(unit)) { - throw RangeError('Invalid unit argument for Intl.NumberFormat()'); - } - if (style === 'unit' && unit === undefined) { - throw TypeError('unit cannot be undefined'); - } - var unitDisplay = GetOption(options, 'unitDisplay', 'string', ['short', 'narrow', 'long'], 'short'); - if (style === 'currency') { - internalSlots.currency = currency.toUpperCase(); - internalSlots.currencyDisplay = currencyDisplay; - internalSlots.currencySign = currencySign; - } - if (style === 'unit') { - internalSlots.unit = unit; - internalSlots.unitDisplay = unitDisplay; - } - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/SetNumberFormatDigitOptions.js - - /** - * https://tc39.es/ecma402/#sec-setnfdigitoptions - */ - function SetNumberFormatDigitOptions(internalSlots, opts, mnfdDefault, mxfdDefault, notation) { - var mnid = GetNumberOption(opts, 'minimumIntegerDigits', 1, 21, 1); - var mnfd = opts.minimumFractionDigits; - var mxfd = opts.maximumFractionDigits; - var mnsd = opts.minimumSignificantDigits; - var mxsd = opts.maximumSignificantDigits; - internalSlots.minimumIntegerDigits = mnid; - if (mnsd !== undefined || mxsd !== undefined) { - internalSlots.roundingType = 'significantDigits'; - mnsd = DefaultNumberOption(mnsd, 1, 21, 1); - mxsd = DefaultNumberOption(mxsd, mnsd, 21, 21); - internalSlots.minimumSignificantDigits = mnsd; - internalSlots.maximumSignificantDigits = mxsd; - } else if (mnfd !== undefined || mxfd !== undefined) { - internalSlots.roundingType = 'fractionDigits'; - mnfd = DefaultNumberOption(mnfd, 0, 20, mnfdDefault); - var mxfdActualDefault = Math.max(mnfd, mxfdDefault); - mxfd = DefaultNumberOption(mxfd, mnfd, 20, mxfdActualDefault); - internalSlots.minimumFractionDigits = mnfd; - internalSlots.maximumFractionDigits = mxfd; - } else if (notation === 'compact') { - internalSlots.roundingType = 'compactRounding'; - } else { - internalSlots.roundingType = 'fractionDigits'; - internalSlots.minimumFractionDigits = mnfdDefault; - internalSlots.maximumFractionDigits = mxfdDefault; - } - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/InitializeNumberFormat.js - - /** - * https://tc39.es/ecma402/#sec-initializenumberformat - */ - function InitializeNumberFormat(nf, locales, opts, _a) { - var getInternalSlots = _a.getInternalSlots, - localeData = _a.localeData, - availableLocales = _a.availableLocales, - numberingSystemNames = _a.numberingSystemNames, - getDefaultLocale = _a.getDefaultLocale, - currencyDigitsData = _a.currencyDigitsData; - // @ts-ignore - var requestedLocales = CanonicalizeLocaleList(locales); - var options = CoerceOptionsToObject(opts); - var opt = Object.create(null); - var matcher = GetOption(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit'); - opt.localeMatcher = matcher; - var numberingSystem = GetOption(options, 'numberingSystem', 'string', undefined, undefined); - if (numberingSystem !== undefined && numberingSystemNames.indexOf(numberingSystem) < 0) { - // 8.a. If numberingSystem does not match the Unicode Locale Identifier type nonterminal, - // throw a RangeError exception. - throw RangeError("Invalid numberingSystems: ".concat(numberingSystem)); - } - opt.nu = numberingSystem; - var r = (0, ResolveLocale /* ResolveLocale */.B)(availableLocales, requestedLocales, opt, - // [[RelevantExtensionKeys]] slot, which is a constant - ['nu'], localeData, getDefaultLocale); - var dataLocaleData = localeData[r.dataLocale]; - invariant(!!dataLocaleData, "Missing locale data for ".concat(r.dataLocale)); - var internalSlots = getInternalSlots(nf); - internalSlots.locale = r.locale; - internalSlots.dataLocale = r.dataLocale; - internalSlots.numberingSystem = r.nu; - internalSlots.dataLocaleData = dataLocaleData; - SetNumberFormatUnitOptions(nf, options, { - getInternalSlots: getInternalSlots - }); - var style = internalSlots.style; - var mnfdDefault; - var mxfdDefault; - if (style === 'currency') { - var currency = internalSlots.currency; - var cDigits = CurrencyDigits(currency, { - currencyDigitsData: currencyDigitsData - }); - mnfdDefault = cDigits; - mxfdDefault = cDigits; - } else { - mnfdDefault = 0; - mxfdDefault = style === 'percent' ? 0 : 3; - } - var notation = GetOption(options, 'notation', 'string', ['standard', 'scientific', 'engineering', 'compact'], 'standard'); - internalSlots.notation = notation; - SetNumberFormatDigitOptions(internalSlots, options, mnfdDefault, mxfdDefault, notation); - var compactDisplay = GetOption(options, 'compactDisplay', 'string', ['short', 'long'], 'short'); - if (notation === 'compact') { - internalSlots.compactDisplay = compactDisplay; - } - var useGrouping = GetOption(options, 'useGrouping', 'boolean', undefined, true); - internalSlots.useGrouping = useGrouping; - var signDisplay = GetOption(options, 'signDisplay', 'string', ['auto', 'never', 'always', 'exceptZero'], 'auto'); - internalSlots.signDisplay = signDisplay; - return nf; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/PartitionPattern.js - - /** - * https://tc39.es/ecma402/#sec-partitionpattern - * @param pattern - */ - function PartitionPattern(pattern) { - var result = []; - var beginIndex = pattern.indexOf('{'); - var endIndex = 0; - var nextIndex = 0; - var length = pattern.length; - while (beginIndex < pattern.length && beginIndex > -1) { - endIndex = pattern.indexOf('}', beginIndex); - invariant(endIndex > beginIndex, "Invalid pattern ".concat(pattern)); - if (beginIndex > nextIndex) { - result.push({ - type: 'literal', - value: pattern.substring(nextIndex, beginIndex) - }); - } - result.push({ - type: pattern.substring(beginIndex + 1, endIndex), - value: undefined - }); - nextIndex = endIndex + 1; - beginIndex = pattern.indexOf('{', nextIndex); - } - if (nextIndex < length) { - result.push({ - type: 'literal', - value: pattern.substring(nextIndex, length) - }); - } - return result; - } - - // EXTERNAL MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js - var LookupSupportedLocales = __webpack_require__(806); - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/SupportedLocales.js - - /** - * https://tc39.es/ecma402/#sec-supportedlocales - * @param availableLocales - * @param requestedLocales - * @param options - */ - function SupportedLocales(availableLocales, requestedLocales, options) { - var matcher = 'best fit'; - if (options !== undefined) { - options = ToObject(options); - matcher = GetOption(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit'); - } - if (matcher === 'best fit') { - return (0, LookupSupportedLocales /* LookupSupportedLocales */.s)(availableLocales, requestedLocales); - } - return (0, LookupSupportedLocales /* LookupSupportedLocales */.s)(availableLocales, requestedLocales); - } - - // EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.mjs - var tslib_es6 = __webpack_require__(1635); - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/data.js - - var MissingLocaleDataError = /** @class */function (_super) { - (0, tslib_es6.__extends)(MissingLocaleDataError, _super); - function MissingLocaleDataError() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.type = 'MISSING_LOCALE_DATA'; - return _this; - } - return MissingLocaleDataError; - }(Error); - function isMissingLocaleDataError(e) { - return e.type === 'MISSING_LOCALE_DATA'; - } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js - var RangePatternType; - (function (RangePatternType) { - RangePatternType["startRange"] = "startRange"; - RangePatternType["shared"] = "shared"; - RangePatternType["endRange"] = "endRange"; - })(RangePatternType || (RangePatternType = {})); - ; // CONCATENATED MODULE: ./node_modules/@formatjs/ecma402-abstract/lib/index.js - - /***/ - }), - /***/2952: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.isUnicodeLanguageSubtag = exports.isUnicodeScriptSubtag = exports.isUnicodeRegionSubtag = exports.isStructurallyValidLanguageTag = exports.parseUnicodeLanguageId = exports.parseUnicodeLocaleId = exports.getCanonicalLocales = void 0; - var tslib_1 = __webpack_require__(1635); - var parser_1 = __webpack_require__(4195); - var emitter_1 = __webpack_require__(8400); - var canonicalizer_1 = __webpack_require__(2784); - /** - * https://tc39.es/ecma402/#sec-canonicalizelocalelist - * @param locales - */ - function CanonicalizeLocaleList(locales) { - if (locales === undefined) { - return []; - } - var seen = []; - if (typeof locales === 'string') { - locales = [locales]; - } - for (var _i = 0, locales_1 = locales; _i < locales_1.length; _i++) { - var locale = locales_1[_i]; - var canonicalizedTag = (0, emitter_1.emitUnicodeLocaleId)((0, canonicalizer_1.canonicalizeUnicodeLocaleId)((0, parser_1.parseUnicodeLocaleId)(locale))); - if (seen.indexOf(canonicalizedTag) < 0) { - seen.push(canonicalizedTag); - } - } - return seen; - } - function getCanonicalLocales(locales) { - return CanonicalizeLocaleList(locales); - } - exports.getCanonicalLocales = getCanonicalLocales; - var parser_2 = __webpack_require__(4195); - Object.defineProperty(exports, "parseUnicodeLocaleId", { - enumerable: true, - get: function () { - return parser_2.parseUnicodeLocaleId; - } - }); - Object.defineProperty(exports, "parseUnicodeLanguageId", { - enumerable: true, - get: function () { - return parser_2.parseUnicodeLanguageId; - } - }); - Object.defineProperty(exports, "isStructurallyValidLanguageTag", { - enumerable: true, - get: function () { - return parser_2.isStructurallyValidLanguageTag; - } - }); - Object.defineProperty(exports, "isUnicodeRegionSubtag", { - enumerable: true, - get: function () { - return parser_2.isUnicodeRegionSubtag; - } - }); - Object.defineProperty(exports, "isUnicodeScriptSubtag", { - enumerable: true, - get: function () { - return parser_2.isUnicodeScriptSubtag; - } - }); - Object.defineProperty(exports, "isUnicodeLanguageSubtag", { - enumerable: true, - get: function () { - return parser_2.isUnicodeLanguageSubtag; - } - }); - (0, tslib_1.__exportStar)(__webpack_require__(8199), exports); - (0, tslib_1.__exportStar)(__webpack_require__(8400), exports); - (0, tslib_1.__exportStar)(__webpack_require__(5802), exports); - - /***/ - }), - /***/4792: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { - "use strict"; - - var __webpack_unused_export__; - __webpack_unused_export__ = { - value: true - }; - var _1 = __webpack_require__(2952); - var should_polyfill_1 = __webpack_require__(8782); - if (typeof Intl === 'undefined') { - if (typeof window !== 'undefined') { - Object.defineProperty(window, 'Intl', { - value: {} - }); - // @ts-ignore we don't include @types/node so global isn't a thing - } else if (typeof __webpack_require__.g !== 'undefined') { - // @ts-ignore we don't include @types/node so global isn't a thing - Object.defineProperty(__webpack_require__.g, 'Intl', { - value: {} - }); - } - } - if ((0, should_polyfill_1.shouldPolyfill)()) { - Object.defineProperty(Intl, 'getCanonicalLocales', { - value: _1.getCanonicalLocales, - writable: true, - enumerable: false, - configurable: true - }); - } - - /***/ - }), - /***/8782: ( /***/(__unused_webpack_module, exports) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.shouldPolyfill = void 0; - function shouldPolyfill() { - return typeof Intl === 'undefined' || !('getCanonicalLocales' in Intl) || - // Native Intl.getCanonicalLocales is just buggy - // https://bugs.chromium.org/p/v8/issues/detail?id=10682 - Intl.getCanonicalLocales('und-x-private')[0] === 'x-private'; - } - exports.shouldPolyfill = shouldPolyfill; - - /***/ - }), - /***/3309: ( /***/(__unused_webpack_module, exports) => { - "use strict"; + /***/ + }), + /***/3309: ( /***/(__unused_webpack_module, exports) => { + "use strict"; Object.defineProperty(exports, "__esModule", { value: true @@ -3149,7 +1322,7 @@ value: true }); exports.canonicalizeUnicodeLocaleId = exports.canonicalizeUnicodeLanguageId = void 0; - var tslib_1 = __webpack_require__(1635); + var tslib_1 = __webpack_require__(5215); var aliases_generated_1 = __webpack_require__(3309); var parser_1 = __webpack_require__(4195); var likelySubtags_generated_1 = __webpack_require__(5802); @@ -3375,7 +1548,7 @@ value: true }); exports.emitUnicodeLocaleId = exports.emitUnicodeLanguageId = void 0; - var tslib_1 = __webpack_require__(1635); + var tslib_1 = __webpack_require__(5215); function emitUnicodeLanguageId(lang) { if (!lang) { return ''; @@ -5299,7 +3472,7 @@ value: true }); exports.parseUnicodeLocaleId = exports.parseUnicodeLanguageId = exports.isUnicodeVariantSubtag = exports.isUnicodeScriptSubtag = exports.isUnicodeRegionSubtag = exports.isStructurallyValidLanguageTag = exports.isUnicodeLanguageSubtag = exports.SEPARATOR = void 0; - var tslib_1 = __webpack_require__(1635); + var tslib_1 = __webpack_require__(5215); var ALPHANUM_1_8 = /^[a-z0-9]{1,8}$/i; var ALPHANUM_2_8 = /^[a-z0-9]{2,8}$/i; var ALPHANUM_3_8 = /^[a-z0-9]{3,8}$/i; @@ -5586,8 +3759,8 @@ value: true }); exports.Locale = void 0; - var tslib_1 = __webpack_require__(1635); - var ecma402_abstract_1 = __webpack_require__(8928); + var tslib_1 = __webpack_require__(5215); + var ecma402_abstract_1 = __webpack_require__(3618); var intl_getcanonicallocales_1 = __webpack_require__(2952); var get_internal_slots_1 = (0, tslib_1.__importDefault)(__webpack_require__(740)); var RELEVANT_EXTENSION_KEYS = ['ca', 'co', 'hc', 'kf', 'kn', 'nu']; @@ -6011,14432 +4184,18668 @@ /***/ }), - /***/2593: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { + /***/3618: ( /***/(__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; - var __webpack_unused_export__; - __webpack_unused_export__ = { - value: true - }; - var _1 = __webpack_require__(2800); - var should_polyfill_1 = __webpack_require__(6235); - if ((0, should_polyfill_1.shouldPolyfill)()) { - Object.defineProperty(Intl, 'Locale', { - value: _1.Locale, - writable: true, - enumerable: false, - configurable: true - }); - } - - /***/ - }), - /***/6235: ( /***/(__unused_webpack_module, exports) => { - "use strict"; + // ESM COMPAT FLAG + __webpack_require__.r(__webpack_exports__); - Object.defineProperty(exports, "__esModule", { - value: true + // EXPORTS + __webpack_require__.d(__webpack_exports__, { + ArrayCreate: () => ( /* reexport */ArrayCreate), + CanonicalizeLocaleList: () => ( /* reexport */CanonicalizeLocaleList), + CanonicalizeTimeZoneName: () => ( /* reexport */CanonicalizeTimeZoneName), + CoerceOptionsToObject: () => ( /* reexport */CoerceOptionsToObject), + ComputeExponent: () => ( /* reexport */ComputeExponent), + ComputeExponentForMagnitude: () => ( /* reexport */ComputeExponentForMagnitude), + CurrencyDigits: () => ( /* reexport */CurrencyDigits), + DateFromTime: () => ( /* reexport */DateFromTime), + Day: () => ( /* reexport */Day), + DayFromYear: () => ( /* reexport */DayFromYear), + DayWithinYear: () => ( /* reexport */DayWithinYear), + DaysInYear: () => ( /* reexport */DaysInYear), + FormatNumericToParts: () => ( /* reexport */FormatNumericToParts), + FormatNumericToString: () => ( /* reexport */FormatNumericToString), + GetNumberOption: () => ( /* reexport */GetNumberOption), + GetOption: () => ( /* reexport */GetOption), + GetOptionsObject: () => ( /* reexport */GetOptionsObject), + HasOwnProperty: () => ( /* reexport */HasOwnProperty), + HourFromTime: () => ( /* reexport */HourFromTime), + InLeapYear: () => ( /* reexport */InLeapYear), + InitializeNumberFormat: () => ( /* reexport */InitializeNumberFormat), + IsSanctionedSimpleUnitIdentifier: () => ( /* reexport */IsSanctionedSimpleUnitIdentifier), + IsValidTimeZoneName: () => ( /* reexport */IsValidTimeZoneName), + IsWellFormedCurrencyCode: () => ( /* reexport */IsWellFormedCurrencyCode), + IsWellFormedUnitIdentifier: () => ( /* reexport */IsWellFormedUnitIdentifier), + MinFromTime: () => ( /* reexport */MinFromTime), + MonthFromTime: () => ( /* reexport */MonthFromTime), + OrdinaryHasInstance: () => ( /* reexport */OrdinaryHasInstance), + PartitionNumberPattern: () => ( /* reexport */PartitionNumberPattern), + PartitionPattern: () => ( /* reexport */PartitionPattern), + RangePatternType: () => ( /* reexport */RangePatternType), + SANCTIONED_UNITS: () => ( /* reexport */SANCTIONED_UNITS), + SIMPLE_UNITS: () => ( /* reexport */SIMPLE_UNITS), + SameValue: () => ( /* reexport */SameValue), + SecFromTime: () => ( /* reexport */SecFromTime), + SetNumberFormatDigitOptions: () => ( /* reexport */SetNumberFormatDigitOptions), + SetNumberFormatUnitOptions: () => ( /* reexport */SetNumberFormatUnitOptions), + SupportedLocales: () => ( /* reexport */SupportedLocales), + TimeClip: () => ( /* reexport */TimeClip), + TimeFromYear: () => ( /* reexport */TimeFromYear), + ToNumber: () => ( /* reexport */ToNumber), + ToObject: () => ( /* reexport */ToObject), + ToRawFixed: () => ( /* reexport */ToRawFixed), + ToRawPrecision: () => ( /* reexport */ToRawPrecision), + ToString: () => ( /* reexport */ToString), + Type: () => ( /* reexport */Type), + WeekDay: () => ( /* reexport */WeekDay), + YearFromTime: () => ( /* reexport */YearFromTime), + _formatToParts: () => ( /* reexport */formatToParts), + defineProperty: () => ( /* reexport */defineProperty), + getInternalSlot: () => ( /* reexport */getInternalSlot), + getMagnitude: () => ( /* reexport */getMagnitude), + getMultiInternalSlots: () => ( /* reexport */getMultiInternalSlots), + invariant: () => ( /* reexport */invariant), + isLiteralPart: () => ( /* reexport */isLiteralPart), + isMissingLocaleDataError: () => ( /* reexport */isMissingLocaleDataError), + msFromTime: () => ( /* reexport */msFromTime), + removeUnitNamespace: () => ( /* reexport */removeUnitNamespace), + setInternalSlot: () => ( /* reexport */setInternalSlot), + setMultiInternalSlots: () => ( /* reexport */setMultiInternalSlots) }); - exports.shouldPolyfill = void 0; + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeLocaleList.js /** - * https://bugs.chromium.org/p/v8/issues/detail?id=10682 + * http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist + * @param locales */ - function hasIntlGetCanonicalLocalesBug() { - try { - return new Intl.Locale('und-x-private').toString() === 'x-private'; - } catch (e) { - return true; - } + function CanonicalizeLocaleList(locales) { + // TODO + return Intl.getCanonicalLocales(locales); } - function shouldPolyfill() { - return !('Locale' in Intl) || hasIntlGetCanonicalLocalesBug(); + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeTimeZoneName.js + /** + * https://tc39.es/ecma402/#sec-canonicalizetimezonename + * @param tz + */ + function CanonicalizeTimeZoneName(tz, _a) { + var tzData = _a.tzData, + uppercaseLinks = _a.uppercaseLinks; + var uppercasedTz = tz.toUpperCase(); + var uppercasedZones = Object.keys(tzData).reduce(function (all, z) { + all[z.toUpperCase()] = z; + return all; + }, {}); + var ianaTimeZone = uppercaseLinks[uppercasedTz] || uppercasedZones[uppercasedTz]; + if (ianaTimeZone === 'Etc/UTC' || ianaTimeZone === 'Etc/GMT') { + return 'UTC'; + } + return ianaTimeZone; } - exports.shouldPolyfill = shouldPolyfill; - - /***/ - }), - /***/8374: ( /***/(__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - "use strict"; - - /* harmony export */ - __webpack_require__.d(__webpack_exports__, { - /* harmony export */q: () => ( /* binding */BestAvailableLocale) - /* harmony export */ - }); + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/262.js /** - * https://tc39.es/ecma402/#sec-bestavailablelocale - * @param availableLocales - * @param locale + * https://tc39.es/ecma262/#sec-tostring */ - function BestAvailableLocale(availableLocales, locale) { - var candidate = locale; - while (true) { - if (availableLocales.has(candidate)) { - return candidate; - } - var pos = candidate.lastIndexOf('-'); - if (!~pos) { - return undefined; - } - if (pos >= 2 && candidate[pos - 2] === '-') { - pos -= 2; - } - candidate = candidate.slice(0, pos); + function ToString(o) { + // Only symbol is irregular... + if (typeof o === 'symbol') { + throw TypeError('Cannot convert a Symbol value to a string'); } + return String(o); } - - /***/ - }), - /***/806: ( /***/(__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - "use strict"; - - /* harmony export */ - __webpack_require__.d(__webpack_exports__, { - /* harmony export */s: () => ( /* binding */LookupSupportedLocales) - /* harmony export */ - }); - /* harmony import */ - var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8748); - /* harmony import */ - var _BestAvailableLocale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8374); - /** - * https://tc39.es/ecma402/#sec-lookupsupportedlocales - * @param availableLocales - * @param requestedLocales + * https://tc39.es/ecma262/#sec-tonumber + * @param val */ - function LookupSupportedLocales(availableLocales, requestedLocales) { - var subset = []; - for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) { - var locale = requestedLocales_1[_i]; - var noExtensionLocale = locale.replace(_utils__WEBPACK_IMPORTED_MODULE_0__ /* .UNICODE_EXTENSION_SEQUENCE_REGEX */.K, ''); - var availableLocale = (0, _BestAvailableLocale__WEBPACK_IMPORTED_MODULE_1__ /* .BestAvailableLocale */.q)(availableLocales, noExtensionLocale); - if (availableLocale) { - subset.push(availableLocale); - } + function ToNumber(val) { + if (val === undefined) { + return NaN; } - return subset; + if (val === null) { + return +0; + } + if (typeof val === 'boolean') { + return val ? 1 : +0; + } + if (typeof val === 'number') { + return val; + } + if (typeof val === 'symbol' || typeof val === 'bigint') { + throw new TypeError('Cannot convert symbol/bigint to number'); + } + return Number(val); } - - /***/ - }), - /***/9443: ( /***/(__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - "use strict"; - - // EXPORTS - __webpack_require__.d(__webpack_exports__, { - B: () => ( /* binding */ResolveLocale) - }); - - // EXTERNAL MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js - var utils = __webpack_require__(8748); - // EXTERNAL MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js - var BestAvailableLocale = __webpack_require__(8374); - ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js - /** - * https://tc39.es/ecma402/#sec-lookupmatcher - * @param availableLocales - * @param requestedLocales - * @param getDefaultLocale + * https://tc39.es/ecma262/#sec-tointeger + * @param n */ - function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) { - var result = { - locale: '' - }; - for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) { - var locale = requestedLocales_1[_i]; - var noExtensionLocale = locale.replace(utils /* UNICODE_EXTENSION_SEQUENCE_REGEX */.K, ''); - var availableLocale = (0, BestAvailableLocale /* BestAvailableLocale */.q)(availableLocales, noExtensionLocale); - if (availableLocale) { - result.locale = availableLocale; - if (locale !== noExtensionLocale) { - result.extension = locale.slice(noExtensionLocale.length + 1, locale.length); - } - return result; - } + function ToInteger(n) { + var number = ToNumber(n); + if (isNaN(number) || SameValue(number, -0)) { + return 0; } - result.locale = getDefaultLocale(); - return result; + if (isFinite(number)) { + return number; + } + var integer = Math.floor(Math.abs(number)); + if (number < 0) { + integer = -integer; + } + if (SameValue(integer, -0)) { + return 0; + } + return integer; } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js - /** - * https://tc39.es/ecma402/#sec-bestfitmatcher - * @param availableLocales - * @param requestedLocales - * @param getDefaultLocale + * https://tc39.es/ecma262/#sec-timeclip + * @param time */ - function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) { - var minimizedAvailableLocaleMap = {}; - var availableLocaleMap = {}; - var canonicalizedLocaleMap = {}; - var minimizedAvailableLocales = new Set(); - availableLocales.forEach(function (locale) { - var minimizedLocale = new Intl.Locale(locale).minimize().toString(); - var canonicalizedLocale = Intl.getCanonicalLocales(locale)[0] || locale; - minimizedAvailableLocaleMap[minimizedLocale] = locale; - availableLocaleMap[locale] = locale; - canonicalizedLocaleMap[canonicalizedLocale] = locale; - minimizedAvailableLocales.add(minimizedLocale); - minimizedAvailableLocales.add(locale); - minimizedAvailableLocales.add(canonicalizedLocale); - }); - var foundLocale; - for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) { - var l = requestedLocales_1[_i]; - if (foundLocale) { - break; - } - var noExtensionLocale = l.replace(utils /* UNICODE_EXTENSION_SEQUENCE_REGEX */.K, ''); - if (availableLocales.has(noExtensionLocale)) { - foundLocale = noExtensionLocale; - break; - } - if (minimizedAvailableLocales.has(noExtensionLocale)) { - foundLocale = noExtensionLocale; - break; - } - var locale = new Intl.Locale(noExtensionLocale); - var maximizedRequestedLocale = locale.maximize().toString(); - var minimizedRequestedLocale = locale.minimize().toString(); - // Check minimized locale - if (minimizedAvailableLocales.has(minimizedRequestedLocale)) { - foundLocale = minimizedRequestedLocale; - break; - } - // Lookup algo on maximized locale - foundLocale = (0, BestAvailableLocale /* BestAvailableLocale */.q)(minimizedAvailableLocales, maximizedRequestedLocale); + function TimeClip(time) { + if (!isFinite(time)) { + return NaN; } - if (!foundLocale) { - return { - locale: getDefaultLocale() - }; + if (Math.abs(time) > 8.64 * 1e15) { + return NaN; } - return { - locale: availableLocaleMap[foundLocale] || canonicalizedLocaleMap[foundLocale] || minimizedAvailableLocaleMap[foundLocale] || foundLocale - }; + return ToInteger(time); } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js - /** - * https://tc39.es/ecma402/#sec-unicodeextensionvalue - * @param extension - * @param key + * https://tc39.es/ecma262/#sec-toobject + * @param arg */ - function UnicodeExtensionValue(extension, key) { - (0, utils /* invariant */.V)(key.length === 2, 'key must have 2 elements'); - var size = extension.length; - var searchValue = "-".concat(key, "-"); - var pos = extension.indexOf(searchValue); - if (pos !== -1) { - var start = pos + 4; - var end = start; - var k = start; - var done = false; - while (!done) { - var e = extension.indexOf('-', k); - var len = void 0; - if (e === -1) { - len = size - k; - } else { - len = e - k; - } - if (len === 2) { - done = true; - } else if (e === -1) { - end = size; - done = true; - } else { - end = e; - k = e + 1; - } - } - return extension.slice(start, end); + function ToObject(arg) { + if (arg == null) { + throw new TypeError('undefined/null cannot be converted to object'); } - searchValue = "-".concat(key); - pos = extension.indexOf(searchValue); - if (pos !== -1 && pos + 3 === size) { - return ''; + return Object(arg); + } + /** + * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue + * @param x + * @param y + */ + function SameValue(x, y) { + if (Object.is) { + return Object.is(x, y); } - return undefined; + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } + // Step 6.a: NaN == NaN + return x !== x && y !== y; } - ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js - /** - * https://tc39.es/ecma402/#sec-resolvelocale + * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate + * @param len */ - function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) { - var matcher = options.localeMatcher; - var r; - if (matcher === 'lookup') { - r = LookupMatcher(availableLocales, requestedLocales, getDefaultLocale); - } else { - r = BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale); + function ArrayCreate(len) { + return new Array(len); + } + /** + * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty + * @param o + * @param prop + */ + function HasOwnProperty(o, prop) { + return Object.prototype.hasOwnProperty.call(o, prop); + } + /** + * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type + * @param x + */ + function Type(x) { + if (x === null) { + return 'Null'; } - var foundLocale = r.locale; - var result = { - locale: '', - dataLocale: foundLocale - }; - var supportedExtension = '-u'; - for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) { - var key = relevantExtensionKeys_1[_i]; - (0, utils /* invariant */.V)(foundLocale in localeData, "Missing locale data for ".concat(foundLocale)); - var foundLocaleData = localeData[foundLocale]; - (0, utils /* invariant */.V)(typeof foundLocaleData === 'object' && foundLocaleData !== null, "locale data ".concat(key, " must be an object")); - var keyLocaleData = foundLocaleData[key]; - (0, utils /* invariant */.V)(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key, " must be an array")); - var value = keyLocaleData[0]; - (0, utils /* invariant */.V)(typeof value === 'string' || value === null, "value must be string or null but got ".concat(typeof value, " in key ").concat(key)); - var supportedExtensionAddition = ''; - if (r.extension) { - var requestedValue = UnicodeExtensionValue(r.extension, key); - if (requestedValue !== undefined) { - if (requestedValue !== '') { - if (~keyLocaleData.indexOf(requestedValue)) { - value = requestedValue; - supportedExtensionAddition = "-".concat(key, "-").concat(value); - } - } else if (~requestedValue.indexOf('true')) { - value = 'true'; - supportedExtensionAddition = "-".concat(key); - } - } - } - if (key in options) { - var optionsValue = options[key]; - (0, utils /* invariant */.V)(typeof optionsValue === 'string' || typeof optionsValue === 'undefined' || optionsValue === null, 'optionsValue must be String, Undefined or Null'); - if (~keyLocaleData.indexOf(optionsValue)) { - if (optionsValue !== value) { - value = optionsValue; - supportedExtensionAddition = ''; - } - } - } - result[key] = value; - supportedExtension += supportedExtensionAddition; + if (typeof x === 'undefined') { + return 'Undefined'; } - if (supportedExtension.length > 2) { - var privateIndex = foundLocale.indexOf('-x-'); - if (privateIndex === -1) { - foundLocale = foundLocale + supportedExtension; - } else { - var preExtension = foundLocale.slice(0, privateIndex); - var postExtension = foundLocale.slice(privateIndex, foundLocale.length); - foundLocale = preExtension + supportedExtension + postExtension; - } - foundLocale = Intl.getCanonicalLocales(foundLocale)[0]; + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } + if (typeof x === 'symbol') { + return 'Symbol'; + } + if (typeof x === 'bigint') { + return 'BigInt'; } - result.locale = foundLocale; - return result; } - - /***/ - }), - /***/8748: ( /***/(__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - "use strict"; - - /* harmony export */ - __webpack_require__.d(__webpack_exports__, { - /* harmony export */K: () => ( /* binding */UNICODE_EXTENSION_SEQUENCE_REGEX), - /* harmony export */V: () => ( /* binding */invariant) - /* harmony export */ - }); - var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi; - function invariant(condition, message, Err) { - if (Err === void 0) { - Err = Error; + var MS_PER_DAY = 86400000; + /** + * https://www.ecma-international.org/ecma-262/11.0/index.html#eqn-modulo + * @param x + * @param y + * @return k of the same sign as y + */ + function mod(x, y) { + return x - Math.floor(x / y) * y; + } + /** + * https://tc39.es/ecma262/#eqn-Day + * @param t + */ + function Day(t) { + return Math.floor(t / MS_PER_DAY); + } + /** + * https://tc39.es/ecma262/#sec-week-day + * @param t + */ + function WeekDay(t) { + return mod(Day(t) + 4, 7); + } + /** + * https://tc39.es/ecma262/#sec-year-number + * @param y + */ + function DayFromYear(y) { + return Date.UTC(y, 0) / MS_PER_DAY; + } + /** + * https://tc39.es/ecma262/#sec-year-number + * @param y + */ + function TimeFromYear(y) { + return Date.UTC(y, 0); + } + /** + * https://tc39.es/ecma262/#sec-year-number + * @param t + */ + function YearFromTime(t) { + return new Date(t).getUTCFullYear(); + } + function DaysInYear(y) { + if (y % 4 !== 0) { + return 365; } - if (!condition) { - throw new Err(message); + if (y % 100 !== 0) { + return 366; + } + if (y % 400 !== 0) { + return 365; } + return 366; + } + function DayWithinYear(t) { + return Day(t) - DayFromYear(YearFromTime(t)); + } + function InLeapYear(t) { + return DaysInYear(YearFromTime(t)) === 365 ? 0 : 1; } - - /***/ - }), - /***/5399: ( /***/(__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - "use strict"; - - // ESM COMPAT FLAG - __webpack_require__.r(__webpack_exports__); - - // EXPORTS - __webpack_require__.d(__webpack_exports__, { - LookupSupportedLocales: () => ( /* reexport */LookupSupportedLocales /* LookupSupportedLocales */.s), - ResolveLocale: () => ( /* reexport */ResolveLocale /* ResolveLocale */.B), - match: () => ( /* binding */match) - }); - ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeLocaleList.js /** - * http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist - * @param locales + * https://tc39.es/ecma262/#sec-month-number + * @param t */ - function CanonicalizeLocaleList(locales) { - // TODO - return Intl.getCanonicalLocales(locales); + function MonthFromTime(t) { + var dwy = DayWithinYear(t); + var leap = InLeapYear(t); + if (dwy >= 0 && dwy < 31) { + return 0; + } + if (dwy < 59 + leap) { + return 1; + } + if (dwy < 90 + leap) { + return 2; + } + if (dwy < 120 + leap) { + return 3; + } + if (dwy < 151 + leap) { + return 4; + } + if (dwy < 181 + leap) { + return 5; + } + if (dwy < 212 + leap) { + return 6; + } + if (dwy < 243 + leap) { + return 7; + } + if (dwy < 273 + leap) { + return 8; + } + if (dwy < 304 + leap) { + return 9; + } + if (dwy < 334 + leap) { + return 10; + } + if (dwy < 365 + leap) { + return 11; + } + throw new Error('Invalid time'); } - - // EXTERNAL MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js + 3 modules - var ResolveLocale = __webpack_require__(9443); - // EXTERNAL MODULE: ./node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js - var LookupSupportedLocales = __webpack_require__(806); - ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-localematcher/lib/index.js - - function match(requestedLocales, availableLocales, defaultLocale, opts) { - var locales = availableLocales.reduce(function (all, l) { - all.add(l); - return all; - }, new Set()); - return (0, ResolveLocale /* ResolveLocale */.B)(locales, CanonicalizeLocaleList(requestedLocales), { - localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || 'best fit' - }, [], {}, function () { - return defaultLocale; - }).locale; + function DateFromTime(t) { + var dwy = DayWithinYear(t); + var mft = MonthFromTime(t); + var leap = InLeapYear(t); + if (mft === 0) { + return dwy + 1; + } + if (mft === 1) { + return dwy - 30; + } + if (mft === 2) { + return dwy - 58 - leap; + } + if (mft === 3) { + return dwy - 89 - leap; + } + if (mft === 4) { + return dwy - 119 - leap; + } + if (mft === 5) { + return dwy - 150 - leap; + } + if (mft === 6) { + return dwy - 180 - leap; + } + if (mft === 7) { + return dwy - 211 - leap; + } + if (mft === 8) { + return dwy - 242 - leap; + } + if (mft === 9) { + return dwy - 272 - leap; + } + if (mft === 10) { + return dwy - 303 - leap; + } + if (mft === 11) { + return dwy - 333 - leap; + } + throw new Error('Invalid time'); + } + var HOURS_PER_DAY = 24; + var MINUTES_PER_HOUR = 60; + var SECONDS_PER_MINUTE = 60; + var MS_PER_SECOND = 1e3; + var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE; + var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR; + function HourFromTime(t) { + return mod(Math.floor(t / MS_PER_HOUR), HOURS_PER_DAY); + } + function MinFromTime(t) { + return mod(Math.floor(t / MS_PER_MINUTE), MINUTES_PER_HOUR); + } + function SecFromTime(t) { + return mod(Math.floor(t / MS_PER_SECOND), SECONDS_PER_MINUTE); + } + function IsCallable(fn) { + return typeof fn === 'function'; } - - /***/ - }), - /***/2236: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.GetOperands = void 0; - var ecma402_abstract_1 = __webpack_require__(8928); /** - * http://ecma-international.org/ecma-402/7.0/index.html#sec-getoperands - * @param s + * The abstract operation OrdinaryHasInstance implements + * the default algorithm for determining if an object O + * inherits from the instance object inheritance path + * provided by constructor C. + * @param C class + * @param O object + * @param internalSlots internalSlots */ - function GetOperands(s) { - (0, ecma402_abstract_1.invariant)(typeof s === 'string', "GetOperands should have been called with a string"); - var n = (0, ecma402_abstract_1.ToNumber)(s); - (0, ecma402_abstract_1.invariant)(isFinite(n), 'n should be finite'); - var dp = s.indexOf('.'); - var iv; - var f; - var v; - var fv = ''; - if (dp === -1) { - iv = n; - f = 0; - v = 0; - } else { - iv = s.slice(0, dp); - fv = s.slice(dp, s.length); - f = (0, ecma402_abstract_1.ToNumber)(fv); - v = fv.length; + function OrdinaryHasInstance(C, O, internalSlots) { + if (!IsCallable(C)) { + return false; } - var i = Math.abs((0, ecma402_abstract_1.ToNumber)(iv)); - var w; - var t; - if (f !== 0) { - var ft = fv.replace(/0+$/, ''); - w = ft.length; - t = (0, ecma402_abstract_1.ToNumber)(ft); - } else { - w = 0; - t = 0; + if (internalSlots === null || internalSlots === void 0 ? void 0 : internalSlots.boundTargetFunction) { + var BC = internalSlots === null || internalSlots === void 0 ? void 0 : internalSlots.boundTargetFunction; + return O instanceof BC; } - return { - Number: n, - IntegerDigits: i, - NumberOfFractionDigits: v, - NumberOfFractionDigitsWithoutTrailing: w, - FractionDigits: f, - FractionDigitsWithoutTrailing: t - }; + if (typeof O !== 'object') { + return false; + } + var P = C.prototype; + if (typeof P !== 'object') { + throw new TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.'); + } + return Object.prototype.isPrototypeOf.call(P, O); } - exports.GetOperands = GetOperands; - - /***/ - }), - /***/4205: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.InitializePluralRules = void 0; - var ecma402_abstract_1 = __webpack_require__(8928); - var intl_localematcher_1 = __webpack_require__(5399); - function InitializePluralRules(pl, locales, options, _a) { - var availableLocales = _a.availableLocales, - relevantExtensionKeys = _a.relevantExtensionKeys, - localeData = _a.localeData, - getDefaultLocale = _a.getDefaultLocale, - getInternalSlots = _a.getInternalSlots; - var requestedLocales = (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales); - var opt = Object.create(null); - var opts = (0, ecma402_abstract_1.CoerceOptionsToObject)(options); - var internalSlots = getInternalSlots(pl); - internalSlots.initializedPluralRules = true; - var matcher = (0, ecma402_abstract_1.GetOption)(opts, 'localeMatcher', 'string', ['best fit', 'lookup'], 'best fit'); - opt.localeMatcher = matcher; - internalSlots.type = (0, ecma402_abstract_1.GetOption)(opts, 'type', 'string', ['cardinal', 'ordinal'], 'cardinal'); - (0, ecma402_abstract_1.SetNumberFormatDigitOptions)(internalSlots, opts, 0, 3, 'standard'); - var r = (0, intl_localematcher_1.ResolveLocale)(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale); - internalSlots.locale = r.locale; - return pl; + function msFromTime(t) { + return mod(t, MS_PER_SECOND); } - exports.InitializePluralRules = InitializePluralRules; - - /***/ - }), - /***/7996: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { - "use strict"; + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ResolvePlural = void 0; - var ecma402_abstract_1 = __webpack_require__(8928); - var GetOperands_1 = __webpack_require__(2236); /** - * http://ecma-international.org/ecma-402/7.0/index.html#sec-resolveplural - * @param pl - * @param n - * @param PluralRuleSelect Has to pass in bc it's implementation-specific + * https://tc39.es/ecma402/#sec-coerceoptionstoobject + * @param options + * @returns */ - function ResolvePlural(pl, n, _a) { - var getInternalSlots = _a.getInternalSlots, - PluralRuleSelect = _a.PluralRuleSelect; - var internalSlots = getInternalSlots(pl); - (0, ecma402_abstract_1.invariant)((0, ecma402_abstract_1.Type)(internalSlots) === 'Object', 'pl has to be an object'); - (0, ecma402_abstract_1.invariant)('initializedPluralRules' in internalSlots, 'pluralrules must be initialized'); - (0, ecma402_abstract_1.invariant)((0, ecma402_abstract_1.Type)(n) === 'Number', 'n must be a number'); - if (!isFinite(n)) { - return 'other'; + function CoerceOptionsToObject(options) { + if (typeof options === 'undefined') { + return Object.create(null); } - var locale = internalSlots.locale, - type = internalSlots.type; - var res = (0, ecma402_abstract_1.FormatNumericToString)(internalSlots, n); - var s = res.formattedString; - var operands = (0, GetOperands_1.GetOperands)(s); - return PluralRuleSelect(locale, type, n, operands); + return ToObject(options); } - exports.ResolvePlural = ResolvePlural; - - /***/ - }), - /***/5949: ( /***/(__unused_webpack_module, exports) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var internalSlotMap = new WeakMap(); - function getInternalSlots(x) { - var internalSlots = internalSlotMap.get(x); - if (!internalSlots) { - internalSlots = Object.create(null); - internalSlotMap.set(x, internalSlots); + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/DefaultNumberOption.js + function DefaultNumberOption(val, min, max, fallback) { + if (val !== undefined) { + val = Number(val); + if (isNaN(val) || val < min || val > max) { + throw new RangeError("".concat(val, " is outside of range [").concat(min, ", ").concat(max, "]")); + } + return Math.floor(val); } - return internalSlots; + return fallback; } - exports["default"] = getInternalSlots; - - /***/ - }), - /***/9355: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { - "use strict"; + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/GetNumberOption.js + /** + * https://tc39.es/ecma402/#sec-getnumberoption + * @param options + * @param property + * @param min + * @param max + * @param fallback + */ - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.PluralRules = void 0; - var tslib_1 = __webpack_require__(1635); - var ecma402_abstract_1 = __webpack_require__(8928); - var InitializePluralRules_1 = __webpack_require__(4205); - var ResolvePlural_1 = __webpack_require__(7996); - var get_internal_slots_1 = (0, tslib_1.__importDefault)(__webpack_require__(5949)); - function validateInstance(instance, method) { - if (!(instance instanceof PluralRules)) { - throw new TypeError("Method Intl.PluralRules.prototype.".concat(method, " called on incompatible receiver ").concat(String(instance))); - } + function GetNumberOption(options, property, minimum, maximum, fallback) { + var val = options[property]; + // @ts-expect-error + return DefaultNumberOption(val, minimum, maximum, fallback); } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js + /** - * http://ecma-international.org/ecma-402/7.0/index.html#sec-pluralruleselect - * @param locale + * https://tc39.es/ecma402/#sec-getoption + * @param opts + * @param prop * @param type - * @param _n - * @param param3 + * @param values + * @param fallback */ - function PluralRuleSelect(locale, type, _n, _a) { - var IntegerDigits = _a.IntegerDigits, - NumberOfFractionDigits = _a.NumberOfFractionDigits, - FractionDigits = _a.FractionDigits; - return PluralRules.localeData[locale].fn(NumberOfFractionDigits ? "".concat(IntegerDigits, ".").concat(FractionDigits) : IntegerDigits, type === 'ordinal'); - } - var PluralRules = /** @class */function () { - function PluralRules(locales, options) { - // test262/test/intl402/RelativeTimeFormat/constructor/constructor/newtarget-undefined.js - // Cannot use `new.target` bc of IE11 & TS transpiles it to something else - var newTarget = this && this instanceof PluralRules ? this.constructor : void 0; - if (!newTarget) { - throw new TypeError("Intl.PluralRules must be called with 'new'"); - } - return (0, InitializePluralRules_1.InitializePluralRules)(this, locales, options, { - availableLocales: PluralRules.availableLocales, - relevantExtensionKeys: PluralRules.relevantExtensionKeys, - localeData: PluralRules.localeData, - getDefaultLocale: PluralRules.getDefaultLocale, - getInternalSlots: get_internal_slots_1.default - }); + function GetOption(opts, prop, type, values, fallback) { + if (typeof opts !== 'object') { + throw new TypeError('Options must be an object'); } - PluralRules.prototype.resolvedOptions = function () { - validateInstance(this, 'resolvedOptions'); - var opts = Object.create(null); - var internalSlots = (0, get_internal_slots_1.default)(this); - opts.locale = internalSlots.locale; - opts.type = internalSlots.type; - ['minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits'].forEach(function (field) { - var val = internalSlots[field]; - if (val !== undefined) { - opts[field] = val; - } - }); - opts.pluralCategories = (0, tslib_1.__spreadArray)([], PluralRules.localeData[opts.locale].categories[opts.type], true); - return opts; - }; - PluralRules.prototype.select = function (val) { - var pr = this; - validateInstance(pr, 'select'); - var n = (0, ecma402_abstract_1.ToNumber)(val); - return (0, ResolvePlural_1.ResolvePlural)(pr, n, { - getInternalSlots: get_internal_slots_1.default, - PluralRuleSelect: PluralRuleSelect - }); - }; - PluralRules.prototype.toString = function () { - return '[object Intl.PluralRules]'; - }; - PluralRules.supportedLocalesOf = function (locales, options) { - return (0, ecma402_abstract_1.SupportedLocales)(PluralRules.availableLocales, (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales), options); - }; - PluralRules.__addLocaleData = function () { - var data = []; - for (var _i = 0; _i < arguments.length; _i++) { - data[_i] = arguments[_i]; + var value = opts[prop]; + if (value !== undefined) { + if (type !== 'boolean' && type !== 'string') { + throw new TypeError('invalid type'); } - for (var _a = 0, data_1 = data; _a < data_1.length; _a++) { - var _b = data_1[_a], - d = _b.data, - locale = _b.locale; - PluralRules.localeData[locale] = d; - PluralRules.availableLocales.add(locale); - if (!PluralRules.__defaultLocale) { - PluralRules.__defaultLocale = locale; - } + if (type === 'boolean') { + value = Boolean(value); } - }; - PluralRules.getDefaultLocale = function () { - return PluralRules.__defaultLocale; - }; - PluralRules.localeData = {}; - PluralRules.availableLocales = new Set(); - PluralRules.__defaultLocale = ''; - PluralRules.relevantExtensionKeys = []; - PluralRules.polyfilled = true; - return PluralRules; - }(); - exports.PluralRules = PluralRules; - try { - // IE11 does not have Symbol - if (typeof Symbol !== 'undefined') { - Object.defineProperty(PluralRules.prototype, Symbol.toStringTag, { - value: 'Intl.PluralRules', - writable: false, - enumerable: false, - configurable: true - }); + if (type === 'string') { + value = ToString(value); + } + if (values !== undefined && !values.filter(function (val) { + return val == value; + }).length) { + throw new RangeError("".concat(value, " is not within ").concat(values.join(', '))); + } + return value; } - try { - // https://github.com/tc39/test262/blob/master/test/intl402/PluralRules/length.js - Object.defineProperty(PluralRules, 'length', { - value: 0, - writable: false, - enumerable: false, - configurable: true - }); - } catch (error) { - // IE 11 sets Function.prototype.length to be non-configurable which will cause the - // above Object.defineProperty to throw an error. + return fallback; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js + /** + * https://tc39.es/ecma402/#sec-getoptionsobject + * @param options + * @returns + */ + function GetOptionsObject(options) { + if (typeof options === 'undefined') { + return Object.create(null); } - // https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/length.js - Object.defineProperty(PluralRules.prototype.constructor, 'length', { - value: 0, - writable: false, - enumerable: false, - configurable: true - }); - // https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/length.js - Object.defineProperty(PluralRules.supportedLocalesOf, 'length', { - value: 1, - writable: false, - enumerable: false, - configurable: true - }); - } catch (ex) { - // Meta fixes for test262 + if (typeof options === 'object') { + return options; + } + throw new TypeError('Options must be an object'); } - - /***/ - }), - /***/4482: ( /***/() => { - /* @generated */ - // prettier-ignore - if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') { - Intl.PluralRules.__addLocaleData({ - "data": { - "categories": { - "cardinal": ["one", "other"], - "ordinal": ["other"] - }, - "fn": function (n, ord) { - var s = String(n).split('.'), - v0 = !s[1]; - if (ord) return 'other'; - return n == 1 && v0 ? 'one' : 'other'; - } - }, - "locale": "de" - }); + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js + /** + * https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers + */ + var SANCTIONED_UNITS = ['angle-degree', 'area-acre', 'area-hectare', 'concentr-percent', 'digital-bit', 'digital-byte', 'digital-gigabit', 'digital-gigabyte', 'digital-kilobit', 'digital-kilobyte', 'digital-megabit', 'digital-megabyte', 'digital-petabyte', 'digital-terabit', 'digital-terabyte', 'duration-day', 'duration-hour', 'duration-millisecond', 'duration-minute', 'duration-month', 'duration-second', 'duration-week', 'duration-year', 'length-centimeter', 'length-foot', 'length-inch', 'length-kilometer', 'length-meter', 'length-mile-scandinavian', 'length-mile', 'length-millimeter', 'length-yard', 'mass-gram', 'mass-kilogram', 'mass-ounce', 'mass-pound', 'mass-stone', 'temperature-celsius', 'temperature-fahrenheit', 'volume-fluid-ounce', 'volume-gallon', 'volume-liter', 'volume-milliliter']; + // In CLDR, the unit name always follows the form `namespace-unit` pattern. + // For example: `digital-bit` instead of `bit`. This function removes the namespace prefix. + function removeUnitNamespace(unit) { + return unit.slice(unit.indexOf('-') + 1); } - - /***/ - }), - /***/1942: ( /***/() => { - /* @generated */ - // prettier-ignore - if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') { - Intl.PluralRules.__addLocaleData({ - "data": { - "categories": { - "cardinal": ["one", "other"], - "ordinal": ["one", "two", "few", "other"] - }, - "fn": function (n, ord) { - var s = String(n).split('.'), - v0 = !s[1], - t0 = Number(s[0]) == n, - n10 = t0 && s[0].slice(-1), - n100 = t0 && s[0].slice(-2); - if (ord) return n10 == 1 && n100 != 11 ? 'one' : n10 == 2 && n100 != 12 ? 'two' : n10 == 3 && n100 != 13 ? 'few' : 'other'; - return n == 1 && v0 ? 'one' : 'other'; - } - }, - "locale": "en" - }); + /** + * https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers + */ + var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace); + /** + * https://tc39.es/ecma402/#sec-issanctionedsimpleunitidentifier + */ + function IsSanctionedSimpleUnitIdentifier(unitIdentifier) { + return SIMPLE_UNITS.indexOf(unitIdentifier) > -1; } - - /***/ - }), - /***/5836: ( /***/() => { - /* @generated */ - // prettier-ignore - if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') { - Intl.PluralRules.__addLocaleData({ - "data": { - "categories": { - "cardinal": ["other"], - "ordinal": ["other"] - }, - "fn": function (n, ord) { - return 'other'; - } - }, - "locale": "ja" + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/IsValidTimeZoneName.js + /** + * https://tc39.es/ecma402/#sec-isvalidtimezonename + * @param tz + * @param implDetails implementation details + */ + function IsValidTimeZoneName(tz, _a) { + var tzData = _a.tzData, + uppercaseLinks = _a.uppercaseLinks; + var uppercasedTz = tz.toUpperCase(); + var zoneNames = new Set(); + var linkNames = new Set(); + Object.keys(tzData).map(function (z) { + return z.toUpperCase(); + }).forEach(function (z) { + return zoneNames.add(z); }); - } - - /***/ - }), - /***/6331: ( /***/() => { - /* @generated */ - // prettier-ignore - if (Intl.PluralRules && typeof Intl.PluralRules.__addLocaleData === 'function') { - Intl.PluralRules.__addLocaleData({ - "data": { - "categories": { - "cardinal": ["other"], - "ordinal": ["other"] - }, - "fn": function (n, ord) { - return 'other'; - } - }, - "locale": "zh" + Object.keys(uppercaseLinks).forEach(function (linkName) { + linkNames.add(linkName.toUpperCase()); + zoneNames.add(uppercaseLinks[linkName].toUpperCase()); }); + return zoneNames.has(uppercasedTz) || linkNames.has(uppercasedTz); } - - /***/ - }), - /***/1624: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { - "use strict"; - - var __webpack_unused_export__; - __webpack_unused_export__ = { - value: true - }; - var _1 = __webpack_require__(9355); - var should_polyfill_1 = __webpack_require__(2321); - if ((0, should_polyfill_1.shouldPolyfill)()) { - Object.defineProperty(Intl, 'PluralRules', { - value: _1.PluralRules, - writable: true, - enumerable: false, - configurable: true + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedCurrencyCode.js + /** + * This follows https://tc39.es/ecma402/#sec-case-sensitivity-and-case-mapping + * @param str string to convert + */ + function toUpperCase(str) { + return str.replace(/([a-z])/g, function (_, c) { + return c.toUpperCase(); }); } - - /***/ - }), - /***/2321: ( /***/(__unused_webpack_module, exports, __webpack_require__) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.shouldPolyfill = void 0; - var intl_localematcher_1 = __webpack_require__(5399); - var supported_locales_1 = __webpack_require__(7999); - function supportedLocalesOf(locale) { - if (!locale) { - return true; - } - var locales = Array.isArray(locale) ? locale : [locale]; - return Intl.PluralRules.supportedLocalesOf(locales).length === locales.length; - } - function shouldPolyfill(locale) { - if (locale === void 0) { - locale = 'en'; + var NOT_A_Z_REGEX = /[^A-Z]/; + /** + * https://tc39.es/ecma402/#sec-iswellformedcurrencycode + */ + function IsWellFormedCurrencyCode(currency) { + currency = toUpperCase(currency); + if (currency.length !== 3) { + return false; } - if (!('PluralRules' in Intl) || new Intl.PluralRules('en', { - minimumFractionDigits: 2 - }).select(1) === 'one' || !supportedLocalesOf(locale)) { - return locale ? (0, intl_localematcher_1.match)([locale], supported_locales_1.supportedLocales, 'en') : undefined; + if (NOT_A_Z_REGEX.test(currency)) { + return false; } + return true; } - exports.shouldPolyfill = shouldPolyfill; - - /***/ - }), - /***/7999: ( /***/(__unused_webpack_module, exports) => { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.supportedLocales = void 0; - // This file is generated from supported-locales-gen.ts - exports.supportedLocales = ["af", "ak", "am", "an", "ar", "ars", "as", "asa", "ast", "az", "bal", "be", "bem", "bez", "bg", "bho", "bm", "bn", "bo", "br", "brx", "bs", "ca", "ce", "ceb", "cgg", "chr", "ckb", "cs", "cy", "da", "de", "doi", "dsb", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fil", "fo", "fr", "fur", "fy", "ga", "gd", "gl", "gsw", "gu", "guw", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "jw", "ka", "kab", "kaj", "kcg", "kde", "kea", "kk", "kkj", "kl", "km", "kn", "ko", "ks", "ksb", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lij", "lkt", "ln", "lo", "lt", "lv", "mas", "mg", "mgo", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "nah", "naq", "nb", "nd", "ne", "nl", "nn", "nnh", "no", "nqo", "nr", "nso", "ny", "nyn", "om", "or", "os", "osa", "pa", "pap", "pcm", "pl", "prg", "ps", "pt-PT", "pt", "rm", "ro", "rof", "ru", "rwk", "sah", "saq", "sat", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "sh", "shi", "si", "sk", "sl", "sma", "smi", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "ta", "te", "teo", "th", "ti", "tig", "tk", "tl", "tn", "to", "tpi", "tr", "ts", "tzm", "ug", "uk", "und", "ur", "uz", "ve", "vi", "vo", "vun", "wa", "wae", "wo", "xh", "xog", "yi", "yo", "yue", "zh", "zu"]; + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedUnitIdentifier.js - /***/ - }), - /***/49: ( /***/() => { /** - * https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNames - * returns the attribute names of the element as an Array of strings. + * This follows https://tc39.es/ecma402/#sec-case-sensitivity-and-case-mapping + * @param str string to convert */ - if (Element.prototype.getAttributeNames == undefined) { - Element.prototype.getAttributeNames = function () { - var attributes = this.attributes; - var length = attributes.length; - var result = new Array(length); - for (var i = 0; i < length; i++) { - result[i] = attributes[i].name; - } - return result; - }; - } - - /***/ - }), - /***/9754: ( /***/() => { - (function () { - /* - - Copyright (c) 2016 The Polymer Project Authors. All rights reserved. - This code may only be used under the BSD style license found at - http://polymer.github.io/LICENSE.txt The complete set of authors may be found - at http://polymer.github.io/AUTHORS.txt The complete set of contributors may - be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by - Google as part of the polymer project is also subject to an additional IP - rights grant found at http://polymer.github.io/PATENTS.txt - */ - 'use strict'; - - var n = window.Document.prototype.createElement, - p = window.Document.prototype.createElementNS, - aa = window.Document.prototype.importNode, - ba = window.Document.prototype.prepend, - ca = window.Document.prototype.append, - da = window.DocumentFragment.prototype.prepend, - ea = window.DocumentFragment.prototype.append, - q = window.Node.prototype.cloneNode, - r = window.Node.prototype.appendChild, - t = window.Node.prototype.insertBefore, - u = window.Node.prototype.removeChild, - v = window.Node.prototype.replaceChild, - w = Object.getOwnPropertyDescriptor(window.Node.prototype, "textContent"), - y = window.Element.prototype.attachShadow, - z = Object.getOwnPropertyDescriptor(window.Element.prototype, "innerHTML"), - A = window.Element.prototype.getAttribute, - B = window.Element.prototype.setAttribute, - C = window.Element.prototype.removeAttribute, - D = window.Element.prototype.toggleAttribute, - E = window.Element.prototype.getAttributeNS, - F = window.Element.prototype.setAttributeNS, - G = window.Element.prototype.removeAttributeNS, - H = window.Element.prototype.insertAdjacentElement, - fa = window.Element.prototype.insertAdjacentHTML, - ha = window.Element.prototype.prepend, - ia = window.Element.prototype.append, - ja = window.Element.prototype.before, - ka = window.Element.prototype.after, - la = window.Element.prototype.replaceWith, - ma = window.Element.prototype.remove, - na = window.HTMLElement, - I = Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, "innerHTML"), - oa = window.HTMLElement.prototype.insertAdjacentElement, - pa = window.HTMLElement.prototype.insertAdjacentHTML; - var qa = new Set(); - "annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function (a) { - return qa.add(a); + function toLowerCase(str) { + return str.replace(/([A-Z])/g, function (_, c) { + return c.toLowerCase(); }); - function ra(a) { - var b = qa.has(a); - a = /^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(a); - return !b && a; - } - var sa = document.contains ? document.contains.bind(document) : document.documentElement.contains.bind(document.documentElement); - function J(a) { - var b = a.isConnected; - if (void 0 !== b) return b; - if (sa(a)) return !0; - for (; a && !(a.__CE_isImportDocument || a instanceof Document);) a = a.parentNode || (window.ShadowRoot && a instanceof ShadowRoot ? a.host : void 0); - return !(!a || !(a.__CE_isImportDocument || a instanceof Document)); - } - function K(a) { - var b = a.children; - if (b) return Array.prototype.slice.call(b); - b = []; - for (a = a.firstChild; a; a = a.nextSibling) a.nodeType === Node.ELEMENT_NODE && b.push(a); - return b; - } - function L(a, b) { - for (; b && b !== a && !b.nextSibling;) b = b.parentNode; - return b && b !== a ? b.nextSibling : null; + } + /** + * https://tc39.es/ecma402/#sec-iswellformedunitidentifier + * @param unit + */ + function IsWellFormedUnitIdentifier(unit) { + unit = toLowerCase(unit); + if (IsSanctionedSimpleUnitIdentifier(unit)) { + return true; } - function M(a, b, d) { - for (var f = a; f;) { - if (f.nodeType === Node.ELEMENT_NODE) { - var c = f; - b(c); - var e = c.localName; - if ("link" === e && "import" === c.getAttribute("rel")) { - f = c.import; - void 0 === d && (d = new Set()); - if (f instanceof Node && !d.has(f)) for (d.add(f), f = f.firstChild; f; f = f.nextSibling) M(f, b, d); - f = L(a, c); - continue; - } else if ("template" === e) { - f = L(a, c); - continue; - } - if (c = c.__CE_shadowRoot) for (c = c.firstChild; c; c = c.nextSibling) M(c, b, d); - } - f = f.firstChild ? f.firstChild : L(a, f); - } + var units = unit.split('-per-'); + if (units.length !== 2) { + return false; } - ; - function N() { - var a = !(null === O || void 0 === O || !O.noDocumentConstructionObserver), - b = !(null === O || void 0 === O || !O.shadyDomFastWalk); - this.m = []; - this.g = []; - this.j = !1; - this.shadyDomFastWalk = b; - this.I = !a; + var numerator = units[0], + denominator = units[1]; + if (!IsSanctionedSimpleUnitIdentifier(numerator) || !IsSanctionedSimpleUnitIdentifier(denominator)) { + return false; } - function P(a, b, d, f) { - var c = window.ShadyDOM; - if (a.shadyDomFastWalk && c && c.inUse) { - if (b.nodeType === Node.ELEMENT_NODE && d(b), b.querySelectorAll) for (a = c.nativeMethods.querySelectorAll.call(b, "*"), b = 0; b < a.length; b++) d(a[b]); - } else M(b, d, f); + return true; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/utils.js + /** + * Cannot do Math.log(x) / Math.log(10) bc if IEEE floating point issue + * @param x number + */ + function getMagnitude(x) { + // Cannot count string length via Number.toString because it may use scientific notation + // for very small or very large numbers. + return Math.floor(Math.log(x) * Math.LOG10E); + } + function repeat(s, times) { + if (typeof s.repeat === 'function') { + return s.repeat(times); } - function ta(a, b) { - a.j = !0; - a.m.push(b); + var arr = new Array(times); + for (var i = 0; i < arr.length; i++) { + arr[i] = s; } - function ua(a, b) { - a.j = !0; - a.g.push(b); + return arr.join(''); + } + function setInternalSlot(map, pl, field, value) { + if (!map.get(pl)) { + map.set(pl, Object.create(null)); } - function Q(a, b) { - a.j && P(a, b, function (d) { - return R(a, d); - }); + var slots = map.get(pl); + slots[field] = value; + } + function setMultiInternalSlots(map, pl, props) { + for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) { + var k = _a[_i]; + setInternalSlot(map, pl, k, props[k]); } - function R(a, b) { - if (a.j && !b.__CE_patched) { - b.__CE_patched = !0; - for (var d = 0; d < a.m.length; d++) a.m[d](b); - for (d = 0; d < a.g.length; d++) a.g[d](b); - } + } + function getInternalSlot(map, pl, field) { + return getMultiInternalSlots(map, pl, field)[field]; + } + function getMultiInternalSlots(map, pl) { + var fields = []; + for (var _i = 2; _i < arguments.length; _i++) { + fields[_i - 2] = arguments[_i]; } - function S(a, b) { - var d = []; - P(a, b, function (c) { - return d.push(c); - }); - for (b = 0; b < d.length; b++) { - var f = d[b]; - 1 === f.__CE_state ? a.connectedCallback(f) : T(a, f); - } + var slots = map.get(pl); + if (!slots) { + throw new TypeError("".concat(pl, " InternalSlot has not been initialized")); } - function U(a, b) { - var d = []; - P(a, b, function (c) { - return d.push(c); - }); - for (b = 0; b < d.length; b++) { - var f = d[b]; - 1 === f.__CE_state && a.disconnectedCallback(f); - } + return fields.reduce(function (all, f) { + all[f] = slots[f]; + return all; + }, Object.create(null)); + } + function isLiteralPart(patternPart) { + return patternPart.type === 'literal'; + } + /* + 17 ECMAScript Standard Built-in Objects: + Every built-in Function object, including constructors, that is not + identified as an anonymous function has a name property whose value + is a String. + + Unless otherwise specified, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. + */ + function defineProperty(target, name, _a) { + var value = _a.value; + Object.defineProperty(target, name, { + configurable: true, + enumerable: false, + writable: true, + value: value + }); + } + var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi; + function invariant(condition, message, Err) { + if (Err === void 0) { + Err = Error; } - function V(a, b, d) { - d = void 0 === d ? {} : d; - var f = d.J, - c = d.upgrade || function (g) { - return T(a, g); - }, - e = []; - P(a, b, function (g) { - a.j && R(a, g); - if ("link" === g.localName && "import" === g.getAttribute("rel")) { - var h = g.import; - h instanceof Node && (h.__CE_isImportDocument = !0, h.__CE_registry = document.__CE_registry); - h && "complete" === h.readyState ? h.__CE_documentLoadHandled = !0 : g.addEventListener("load", function () { - var k = g.import; - if (!k.__CE_documentLoadHandled) { - k.__CE_documentLoadHandled = !0; - var l = new Set(); - f && (f.forEach(function (m) { - return l.add(m); - }), l.delete(k)); - V(a, k, { - J: l, - upgrade: c - }); - } - }); - } else e.push(g); - }, f); - for (b = 0; b < e.length; b++) c(e[b]); + if (!condition) { + throw new Err(message); } - function T(a, b) { - try { - var d = b.ownerDocument, - f = d.__CE_registry; - var c = f && (d.defaultView || d.__CE_isImportDocument) ? W(f, b.localName) : void 0; - if (c && void 0 === b.__CE_state) { - c.constructionStack.push(b); - try { - try { - if (new c.constructorFunction() !== b) throw Error("The custom element constructor did not produce the element being upgraded."); - } finally { - c.constructionStack.pop(); - } - } catch (k) { - throw b.__CE_state = 2, k; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponentForMagnitude.js + /** + * The abstract operation ComputeExponentForMagnitude computes an exponent by which to scale a + * number of the given magnitude (power of ten of the most significant digit) according to the + * locale and the desired notation (scientific, engineering, or compact). + */ + function ComputeExponentForMagnitude(numberFormat, magnitude, _a) { + var getInternalSlots = _a.getInternalSlots; + var internalSlots = getInternalSlots(numberFormat); + var notation = internalSlots.notation, + dataLocaleData = internalSlots.dataLocaleData, + numberingSystem = internalSlots.numberingSystem; + switch (notation) { + case 'standard': + return 0; + case 'scientific': + return magnitude; + case 'engineering': + return Math.floor(magnitude / 3) * 3; + default: + { + // Let exponent be an implementation- and locale-dependent (ILD) integer by which to scale a + // number of the given magnitude in compact notation for the current locale. + var compactDisplay = internalSlots.compactDisplay, + style = internalSlots.style, + currencyDisplay = internalSlots.currencyDisplay; + var thresholdMap = void 0; + if (style === 'currency' && currencyDisplay !== 'name') { + var currency = dataLocaleData.numbers.currency[numberingSystem] || dataLocaleData.numbers.currency[dataLocaleData.numbers.nu[0]]; + thresholdMap = currency.short; + } else { + var decimal = dataLocaleData.numbers.decimal[numberingSystem] || dataLocaleData.numbers.decimal[dataLocaleData.numbers.nu[0]]; + thresholdMap = compactDisplay === 'long' ? decimal.long : decimal.short; } - b.__CE_state = 1; - b.__CE_definition = c; - if (c.attributeChangedCallback && b.hasAttributes()) { - var e = c.observedAttributes; - for (c = 0; c < e.length; c++) { - var g = e[c], - h = b.getAttribute(g); - null !== h && a.attributeChangedCallback(b, g, null, h, null); - } + if (!thresholdMap) { + return 0; } - J(b) && a.connectedCallback(b); + var num = String(Math.pow(10, magnitude)); + var thresholds = Object.keys(thresholdMap); // TODO: this can be pre-processed + if (num < thresholds[0]) { + return 0; + } + if (num > thresholds[thresholds.length - 1]) { + return thresholds[thresholds.length - 1].length - 1; + } + var i = thresholds.indexOf(num); + if (i === -1) { + return 0; + } + // See https://unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats + // Special handling if the pattern is precisely `0`. + var magnitudeKey = thresholds[i]; + // TODO: do we need to handle plural here? + var compactPattern = thresholdMap[magnitudeKey].other; + if (compactPattern === '0') { + return 0; + } + // Example: in zh-TW, `10000000` maps to `0000萬`. So we need to return 8 - 4 = 4 here. + return magnitudeKey.length - thresholdMap[magnitudeKey].other.match(/0+/)[0].length; } - } catch (k) { - X(k); - } } - N.prototype.connectedCallback = function (a) { - var b = a.__CE_definition; - if (b.connectedCallback) try { - b.connectedCallback.call(a); - } catch (d) { - X(d); + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js + + function ToRawPrecision(x, minPrecision, maxPrecision) { + var p = maxPrecision; + var m; + var e; + var xFinal; + if (x === 0) { + m = repeat('0', p); + e = 0; + xFinal = 0; + } else { + var xToString = x.toString(); + // If xToString is formatted as scientific notation, the number is either very small or very + // large. If the precision of the formatted string is lower that requested max precision, we + // should still infer them from the formatted string, otherwise the formatted result might have + // precision loss (e.g. 1e41 will not have 0 in every trailing digits). + var xToStringExponentIndex = xToString.indexOf('e'); + var _a = xToString.split('e'), + xToStringMantissa = _a[0], + xToStringExponent = _a[1]; + var xToStringMantissaWithoutDecimalPoint = xToStringMantissa.replace('.', ''); + if (xToStringExponentIndex >= 0 && xToStringMantissaWithoutDecimalPoint.length <= p) { + e = +xToStringExponent; + m = xToStringMantissaWithoutDecimalPoint + repeat('0', p - xToStringMantissaWithoutDecimalPoint.length); + xFinal = x; + } else { + e = getMagnitude(x); + var decimalPlaceOffset = e - p + 1; + // n is the integer containing the required precision digits. To derive the formatted string, + // we will adjust its decimal place in the logic below. + var n = Math.round(adjustDecimalPlace(x, decimalPlaceOffset)); + // The rounding caused the change of magnitude, so we should increment `e` by 1. + if (adjustDecimalPlace(n, p - 1) >= 10) { + e = e + 1; + // Divide n by 10 to swallow one precision. + n = Math.floor(n / 10); + } + m = n.toString(); + // Equivalent of n * 10 ** (e - p + 1) + xFinal = adjustDecimalPlace(n, p - 1 - e); } - }; - N.prototype.disconnectedCallback = function (a) { - var b = a.__CE_definition; - if (b.disconnectedCallback) try { - b.disconnectedCallback.call(a); - } catch (d) { - X(d); + } + var int; + if (e >= p - 1) { + m = m + repeat('0', e - p + 1); + int = e + 1; + } else if (e >= 0) { + m = "".concat(m.slice(0, e + 1), ".").concat(m.slice(e + 1)); + int = e + 1; + } else { + m = "0.".concat(repeat('0', -e - 1)).concat(m); + int = 1; + } + if (m.indexOf('.') >= 0 && maxPrecision > minPrecision) { + var cut = maxPrecision - minPrecision; + while (cut > 0 && m[m.length - 1] === '0') { + m = m.slice(0, -1); + cut--; } - }; - N.prototype.attributeChangedCallback = function (a, b, d, f, c) { - var e = a.__CE_definition; - if (e.attributeChangedCallback && -1 < e.observedAttributes.indexOf(b)) try { - e.attributeChangedCallback.call(a, b, d, f, c); - } catch (g) { - X(g); + if (m[m.length - 1] === '.') { + m = m.slice(0, -1); } + } + return { + formattedString: m, + roundedNumber: xFinal, + integerDigitsCount: int }; - function va(a, b, d, f) { - var c = b.__CE_registry; - if (c && (null === f || "http://www.w3.org/1999/xhtml" === f) && (c = W(c, d))) try { - var e = new c.constructorFunction(); - if (void 0 === e.__CE_state || void 0 === e.__CE_definition) throw Error("Failed to construct '" + d + "': The returned value was not constructed with the HTMLElement constructor."); - if ("http://www.w3.org/1999/xhtml" !== e.namespaceURI) throw Error("Failed to construct '" + d + "': The constructed element's namespace must be the HTML namespace."); - if (e.hasAttributes()) throw Error("Failed to construct '" + d + "': The constructed element must not have any attributes."); - if (null !== e.firstChild) throw Error("Failed to construct '" + d + "': The constructed element must not have any children."); - if (null !== e.parentNode) throw Error("Failed to construct '" + d + "': The constructed element must not have a parent node."); - if (e.ownerDocument !== b) throw Error("Failed to construct '" + d + "': The constructed element's owner document is incorrect."); - if (e.localName !== d) throw Error("Failed to construct '" + d + "': The constructed element's local name is incorrect."); - return e; - } catch (g) { - return X(g), b = null === f ? n.call(b, d) : p.call(b, f, d), Object.setPrototypeOf(b, HTMLUnknownElement.prototype), b.__CE_state = 2, b.__CE_definition = void 0, R(a, b), b; - } - b = null === f ? n.call(b, d) : p.call(b, f, d); - R(a, b); - return b; + // x / (10 ** magnitude), but try to preserve as much floating point precision as possible. + function adjustDecimalPlace(x, magnitude) { + return magnitude < 0 ? x * Math.pow(10, -magnitude) : x / Math.pow(10, magnitude); } - function X(a) { - var b = "", - d = "", - f = 0, - c = 0; - a instanceof Error ? (b = a.message, d = a.sourceURL || a.fileName || "", f = a.line || a.lineNumber || 0, c = a.column || a.columnNumber || 0) : b = "Uncaught " + String(a); - var e = void 0; - void 0 === ErrorEvent.prototype.initErrorEvent ? e = new ErrorEvent("error", { - cancelable: !0, - message: b, - filename: d, - lineno: f, - colno: c, - error: a - }) : (e = document.createEvent("ErrorEvent"), e.initErrorEvent("error", !1, !0, b, d, f), e.preventDefault = function () { - Object.defineProperty(this, "defaultPrevented", { - configurable: !0, - get: function () { - return !0; - } - }); - }); - void 0 === e.error && Object.defineProperty(e, "error", { - configurable: !0, - enumerable: !0, - get: function () { - return a; - } - }); - window.dispatchEvent(e); - e.defaultPrevented || console.error(a); + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawFixed.js + + /** + * TODO: dedup with intl-pluralrules and support BigInt + * https://tc39.es/ecma402/#sec-torawfixed + * @param x a finite non-negative Number or BigInt + * @param minFraction and integer between 0 and 20 + * @param maxFraction and integer between 0 and 20 + */ + function ToRawFixed(x, minFraction, maxFraction) { + var f = maxFraction; + var n = Math.round(x * Math.pow(10, f)); + var xFinal = n / Math.pow(10, f); + // n is a positive integer, but it is possible to be greater than 1e21. + // In such case we will go the slow path. + // See also: https://tc39.es/ecma262/#sec-numeric-types-number-tostring + var m; + if (n < 1e21) { + m = n.toString(); + } else { + m = n.toString(); + var _a = m.split('e'), + mantissa = _a[0], + exponent = _a[1]; + m = mantissa.replace('.', ''); + m = m + repeat('0', Math.max(+exponent - m.length + 1, 0)); } - ; - function wa() { - var a = this; - this.g = void 0; - this.F = new Promise(function (b) { - a.l = b; - }); + var int; + if (f !== 0) { + var k = m.length; + if (k <= f) { + var z = repeat('0', f + 1 - k); + m = z + m; + k = f + 1; + } + var a = m.slice(0, k - f); + var b = m.slice(k - f); + m = "".concat(a, ".").concat(b); + int = a.length; + } else { + int = m.length; } - wa.prototype.resolve = function (a) { - if (this.g) throw Error("Already resolved."); - this.g = a; - this.l(a); - }; - function xa(a) { - var b = document; - this.l = void 0; - this.h = a; - this.g = b; - V(this.h, this.g); - "loading" === this.g.readyState && (this.l = new MutationObserver(this.G.bind(this)), this.l.observe(this.g, { - childList: !0, - subtree: !0 - })); + var cut = maxFraction - minFraction; + while (cut > 0 && m[m.length - 1] === '0') { + m = m.slice(0, -1); + cut--; } - function ya(a) { - a.l && a.l.disconnect(); + if (m[m.length - 1] === '.') { + m = m.slice(0, -1); } - xa.prototype.G = function (a) { - var b = this.g.readyState; - "interactive" !== b && "complete" !== b || ya(this); - for (b = 0; b < a.length; b++) for (var d = a[b].addedNodes, f = 0; f < d.length; f++) V(this.h, d[f]); + return { + formattedString: m, + roundedNumber: xFinal, + integerDigitsCount: int }; - function Y(a) { - this.s = new Map(); - this.u = new Map(); - this.C = new Map(); - this.A = !1; - this.B = new Map(); - this.o = function (b) { - return b(); - }; - this.i = !1; - this.v = []; - this.h = a; - this.D = a.I ? new xa(a) : void 0; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToString.js + + /** + * https://tc39.es/ecma402/#sec-formatnumberstring + */ + function FormatNumericToString(intlObject, x) { + var isNegative = x < 0 || SameValue(x, -0); + if (isNegative) { + x = -x; } - Y.prototype.H = function (a, b) { - var d = this; - if (!(b instanceof Function)) throw new TypeError("Custom element constructor getters must be functions."); - za(this, a); - this.s.set(a, b); - this.v.push(a); - this.i || (this.i = !0, this.o(function () { - return Aa(d); - })); - }; - Y.prototype.define = function (a, b) { - var d = this; - if (!(b instanceof Function)) throw new TypeError("Custom element constructors must be functions."); - za(this, a); - Ba(this, a, b); - this.v.push(a); - this.i || (this.i = !0, this.o(function () { - return Aa(d); - })); - }; - function za(a, b) { - if (!ra(b)) throw new SyntaxError("The element name '" + b + "' is not valid."); - if (W(a, b)) throw Error("A custom element with name '" + (b + "' has already been defined.")); - if (a.A) throw Error("A custom element is already being defined."); + var result; + var rourndingType = intlObject.roundingType; + switch (rourndingType) { + case 'significantDigits': + result = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits); + break; + case 'fractionDigits': + result = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits); + break; + default: + result = ToRawPrecision(x, 1, 2); + if (result.integerDigitsCount > 1) { + result = ToRawFixed(x, 0, 0); + } + break; } - function Ba(a, b, d) { - a.A = !0; - var f; - try { - var c = d.prototype; - if (!(c instanceof Object)) throw new TypeError("The custom element constructor's prototype is not an object."); - var e = function (m) { - var x = c[m]; - if (void 0 !== x && !(x instanceof Function)) throw Error("The '" + m + "' callback must be a function."); - return x; - }; - var g = e("connectedCallback"); - var h = e("disconnectedCallback"); - var k = e("adoptedCallback"); - var l = (f = e("attributeChangedCallback")) && d.observedAttributes || []; - } catch (m) { - throw m; - } finally { - a.A = !1; - } - d = { - localName: b, - constructorFunction: d, - connectedCallback: g, - disconnectedCallback: h, - adoptedCallback: k, - attributeChangedCallback: f, - observedAttributes: l, - constructionStack: [] - }; - a.u.set(b, d); - a.C.set(d.constructorFunction, d); - return d; + x = result.roundedNumber; + var string = result.formattedString; + var int = result.integerDigitsCount; + var minInteger = intlObject.minimumIntegerDigits; + if (int < minInteger) { + var forwardZeros = repeat('0', minInteger - int); + string = forwardZeros + string; } - Y.prototype.upgrade = function (a) { - V(this.h, a); - }; - function Aa(a) { - if (!1 !== a.i) { - a.i = !1; - for (var b = [], d = a.v, f = new Map(), c = 0; c < d.length; c++) f.set(d[c], []); - V(a.h, document, { - upgrade: function (k) { - if (void 0 === k.__CE_state) { - var l = k.localName, - m = f.get(l); - m ? m.push(k) : a.u.has(l) && b.push(k); - } - } - }); - for (c = 0; c < b.length; c++) T(a.h, b[c]); - for (c = 0; c < d.length; c++) { - for (var e = d[c], g = f.get(e), h = 0; h < g.length; h++) T(a.h, g[h]); - (e = a.B.get(e)) && e.resolve(void 0); - } - d.length = 0; - } + if (isNegative) { + x = -x; } - Y.prototype.get = function (a) { - if (a = W(this, a)) return a.constructorFunction; - }; - Y.prototype.whenDefined = function (a) { - if (!ra(a)) return Promise.reject(new SyntaxError("'" + a + "' is not a valid custom element name.")); - var b = this.B.get(a); - if (b) return b.F; - b = new wa(); - this.B.set(a, b); - var d = this.u.has(a) || this.s.has(a); - a = -1 === this.v.indexOf(a); - d && a && b.resolve(void 0); - return b.F; - }; - Y.prototype.polyfillWrapFlushCallback = function (a) { - this.D && ya(this.D); - var b = this.o; - this.o = function (d) { - return a(function () { - return b(d); - }); - }; + return { + roundedNumber: x, + formattedString: string }; - function W(a, b) { - var d = a.u.get(b); - if (d) return d; - if (d = a.s.get(b)) { - a.s.delete(b); - try { - return Ba(a, b, d()); - } catch (f) { - X(f); - } - } + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponent.js + + /** + * The abstract operation ComputeExponent computes an exponent (power of ten) by which to scale x + * according to the number formatting settings. It handles cases such as 999 rounding up to 1000, + * requiring a different exponent. + * + * NOT IN SPEC: it returns [exponent, magnitude]. + */ + function ComputeExponent(numberFormat, x, _a) { + var getInternalSlots = _a.getInternalSlots; + if (x === 0) { + return [0, 0]; } - Y.prototype.define = Y.prototype.define; - Y.prototype.upgrade = Y.prototype.upgrade; - Y.prototype.get = Y.prototype.get; - Y.prototype.whenDefined = Y.prototype.whenDefined; - Y.prototype.polyfillDefineLazy = Y.prototype.H; - Y.prototype.polyfillWrapFlushCallback = Y.prototype.polyfillWrapFlushCallback; - function Z(a, b, d) { - function f(c) { - return function (e) { - for (var g = [], h = 0; h < arguments.length; ++h) g[h] = arguments[h]; - h = []; - for (var k = [], l = 0; l < g.length; l++) { - var m = g[l]; - m instanceof Element && J(m) && k.push(m); - if (m instanceof DocumentFragment) for (m = m.firstChild; m; m = m.nextSibling) h.push(m);else h.push(m); - } - c.apply(this, g); - for (g = 0; g < k.length; g++) U(a, k[g]); - if (J(this)) for (g = 0; g < h.length; g++) k = h[g], k instanceof Element && S(a, k); - }; - } - void 0 !== d.prepend && (b.prepend = f(d.prepend)); - void 0 !== d.append && (b.append = f(d.append)); + if (x < 0) { + x = -x; } - ; - function Ca(a) { - Document.prototype.createElement = function (b) { - return va(a, this, b, null); - }; - Document.prototype.importNode = function (b, d) { - b = aa.call(this, b, !!d); - this.__CE_registry ? V(a, b) : Q(a, b); - return b; - }; - Document.prototype.createElementNS = function (b, d) { - return va(a, this, d, b); - }; - Z(a, Document.prototype, { - prepend: ba, - append: ca - }); + var magnitude = getMagnitude(x); + var exponent = ComputeExponentForMagnitude(numberFormat, magnitude, { + getInternalSlots: getInternalSlots + }); + // Preserve more precision by doing multiplication when exponent is negative. + x = exponent < 0 ? x * Math.pow(10, -exponent) : x / Math.pow(10, exponent); + var formatNumberResult = FormatNumericToString(getInternalSlots(numberFormat), x); + if (formatNumberResult.roundedNumber === 0) { + return [exponent, magnitude]; } - ; - function Da(a) { - function b(f) { - return function (c) { - for (var e = [], g = 0; g < arguments.length; ++g) e[g] = arguments[g]; - g = []; - for (var h = [], k = 0; k < e.length; k++) { - var l = e[k]; - l instanceof Element && J(l) && h.push(l); - if (l instanceof DocumentFragment) for (l = l.firstChild; l; l = l.nextSibling) g.push(l);else g.push(l); - } - f.apply(this, e); - for (e = 0; e < h.length; e++) U(a, h[e]); - if (J(this)) for (e = 0; e < g.length; e++) h = g[e], h instanceof Element && S(a, h); - }; - } - var d = Element.prototype; - void 0 !== ja && (d.before = b(ja)); - void 0 !== ka && (d.after = b(ka)); - void 0 !== la && (d.replaceWith = function (f) { - for (var c = [], e = 0; e < arguments.length; ++e) c[e] = arguments[e]; - e = []; - for (var g = [], h = 0; h < c.length; h++) { - var k = c[h]; - k instanceof Element && J(k) && g.push(k); - if (k instanceof DocumentFragment) for (k = k.firstChild; k; k = k.nextSibling) e.push(k);else e.push(k); + var newMagnitude = getMagnitude(formatNumberResult.roundedNumber); + if (newMagnitude === magnitude - exponent) { + return [exponent, magnitude]; + } + return [ComputeExponentForMagnitude(numberFormat, magnitude + 1, { + getInternalSlots: getInternalSlots + }), magnitude + 1]; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/CurrencyDigits.js + + /** + * https://tc39.es/ecma402/#sec-currencydigits + */ + function CurrencyDigits(c, _a) { + var currencyDigitsData = _a.currencyDigitsData; + return HasOwnProperty(currencyDigitsData, c) ? currencyDigitsData[c] : 2; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/digit-mapping.generated.js + var digitMapping = { + "adlm": ["𞥐", "𞥑", "𞥒", "𞥓", "𞥔", "𞥕", "𞥖", "𞥗", "𞥘", "𞥙"], + "ahom": ["𑜰", "𑜱", "𑜲", "𑜳", "𑜴", "𑜵", "𑜶", "𑜷", "𑜸", "𑜹"], + "arab": ["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"], + "arabext": ["۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹"], + "bali": ["᭐", "᭑", "᭒", "᭓", "᭔", "᭕", "᭖", "᭗", "᭘", "᭙"], + "beng": ["০", "১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯"], + "bhks": ["𑱐", "𑱑", "𑱒", "𑱓", "𑱔", "𑱕", "𑱖", "𑱗", "𑱘", "𑱙"], + "brah": ["𑁦", "𑁧", "𑁨", "𑁩", "𑁪", "𑁫", "𑁬", "𑁭", "𑁮", "𑁯"], + "cakm": ["𑄶", "𑄷", "𑄸", "𑄹", "𑄺", "𑄻", "𑄼", "𑄽", "𑄾", "𑄿"], + "cham": ["꩐", "꩑", "꩒", "꩓", "꩔", "꩕", "꩖", "꩗", "꩘", "꩙"], + "deva": ["०", "१", "२", "३", "४", "५", "६", "७", "८", "९"], + "diak": ["𑥐", "𑥑", "𑥒", "𑥓", "𑥔", "𑥕", "𑥖", "𑥗", "𑥘", "𑥙"], + "fullwide": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], + "gong": ["𑶠", "𑶡", "𑶢", "𑶣", "𑶤", "𑶥", "𑶦", "𑶧", "𑶨", "𑶩"], + "gonm": ["𑵐", "𑵑", "𑵒", "𑵓", "𑵔", "𑵕", "𑵖", "𑵗", "𑵘", "𑵙"], + "gujr": ["૦", "૧", "૨", "૩", "૪", "૫", "૬", "૭", "૮", "૯"], + "guru": ["੦", "੧", "੨", "੩", "੪", "੫", "੬", "੭", "੮", "੯"], + "hanidec": ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"], + "hmng": ["𖭐", "𖭑", "𖭒", "𖭓", "𖭔", "𖭕", "𖭖", "𖭗", "𖭘", "𖭙"], + "hmnp": ["𞅀", "𞅁", "𞅂", "𞅃", "𞅄", "𞅅", "𞅆", "𞅇", "𞅈", "𞅉"], + "java": ["꧐", "꧑", "꧒", "꧓", "꧔", "꧕", "꧖", "꧗", "꧘", "꧙"], + "kali": ["꤀", "꤁", "꤂", "꤃", "꤄", "꤅", "꤆", "꤇", "꤈", "꤉"], + "khmr": ["០", "១", "២", "៣", "៤", "៥", "៦", "៧", "៨", "៩"], + "knda": ["೦", "೧", "೨", "೩", "೪", "೫", "೬", "೭", "೮", "೯"], + "lana": ["᪀", "᪁", "᪂", "᪃", "᪄", "᪅", "᪆", "᪇", "᪈", "᪉"], + "lanatham": ["᪐", "᪑", "᪒", "᪓", "᪔", "᪕", "᪖", "᪗", "᪘", "᪙"], + "laoo": ["໐", "໑", "໒", "໓", "໔", "໕", "໖", "໗", "໘", "໙"], + "lepc": ["᪐", "᪑", "᪒", "᪓", "᪔", "᪕", "᪖", "᪗", "᪘", "᪙"], + "limb": ["᥆", "᥇", "᥈", "᥉", "᥊", "᥋", "᥌", "᥍", "᥎", "᥏"], + "mathbold": ["𝟎", "𝟏", "𝟐", "𝟑", "𝟒", "𝟓", "𝟔", "𝟕", "𝟖", "𝟗"], + "mathdbl": ["𝟘", "𝟙", "𝟚", "𝟛", "𝟜", "𝟝", "𝟞", "𝟟", "𝟠", "𝟡"], + "mathmono": ["𝟶", "𝟷", "𝟸", "𝟹", "𝟺", "𝟻", "𝟼", "𝟽", "𝟾", "𝟿"], + "mathsanb": ["𝟬", "𝟭", "𝟮", "𝟯", "𝟰", "𝟱", "𝟲", "𝟳", "𝟴", "𝟵"], + "mathsans": ["𝟢", "𝟣", "𝟤", "𝟥", "𝟦", "𝟧", "𝟨", "𝟩", "𝟪", "𝟫"], + "mlym": ["൦", "൧", "൨", "൩", "൪", "൫", "൬", "൭", "൮", "൯"], + "modi": ["𑙐", "𑙑", "𑙒", "𑙓", "𑙔", "𑙕", "𑙖", "𑙗", "𑙘", "𑙙"], + "mong": ["᠐", "᠑", "᠒", "᠓", "᠔", "᠕", "᠖", "᠗", "᠘", "᠙"], + "mroo": ["𖩠", "𖩡", "𖩢", "𖩣", "𖩤", "𖩥", "𖩦", "𖩧", "𖩨", "𖩩"], + "mtei": ["꯰", "꯱", "꯲", "꯳", "꯴", "꯵", "꯶", "꯷", "꯸", "꯹"], + "mymr": ["၀", "၁", "၂", "၃", "၄", "၅", "၆", "၇", "၈", "၉"], + "mymrshan": ["႐", "႑", "႒", "႓", "႔", "႕", "႖", "႗", "႘", "႙"], + "mymrtlng": ["꧰", "꧱", "꧲", "꧳", "꧴", "꧵", "꧶", "꧷", "꧸", "꧹"], + "newa": ["𑑐", "𑑑", "𑑒", "𑑓", "𑑔", "𑑕", "𑑖", "𑑗", "𑑘", "𑑙"], + "nkoo": ["߀", "߁", "߂", "߃", "߄", "߅", "߆", "߇", "߈", "߉"], + "olck": ["᱐", "᱑", "᱒", "᱓", "᱔", "᱕", "᱖", "᱗", "᱘", "᱙"], + "orya": ["୦", "୧", "୨", "୩", "୪", "୫", "୬", "୭", "୮", "୯"], + "osma": ["𐒠", "𐒡", "𐒢", "𐒣", "𐒤", "𐒥", "𐒦", "𐒧", "𐒨", "𐒩"], + "rohg": ["𐴰", "𐴱", "𐴲", "𐴳", "𐴴", "𐴵", "𐴶", "𐴷", "𐴸", "𐴹"], + "saur": ["꣐", "꣑", "꣒", "꣓", "꣔", "꣕", "꣖", "꣗", "꣘", "꣙"], + "segment": ["🯰", "🯱", "🯲", "🯳", "🯴", "🯵", "🯶", "🯷", "🯸", "🯹"], + "shrd": ["𑇐", "𑇑", "𑇒", "𑇓", "𑇔", "𑇕", "𑇖", "𑇗", "𑇘", "𑇙"], + "sind": ["𑋰", "𑋱", "𑋲", "𑋳", "𑋴", "𑋵", "𑋶", "𑋷", "𑋸", "𑋹"], + "sinh": ["෦", "෧", "෨", "෩", "෪", "෫", "෬", "෭", "෮", "෯"], + "sora": ["𑃰", "𑃱", "𑃲", "𑃳", "𑃴", "𑃵", "𑃶", "𑃷", "𑃸", "𑃹"], + "sund": ["᮰", "᮱", "᮲", "᮳", "᮴", "᮵", "᮶", "᮷", "᮸", "᮹"], + "takr": ["𑛀", "𑛁", "𑛂", "𑛃", "𑛄", "𑛅", "𑛆", "𑛇", "𑛈", "𑛉"], + "talu": ["᧐", "᧑", "᧒", "᧓", "᧔", "᧕", "᧖", "᧗", "᧘", "᧙"], + "tamldec": ["௦", "௧", "௨", "௩", "௪", "௫", "௬", "௭", "௮", "௯"], + "telu": ["౦", "౧", "౨", "౩", "౪", "౫", "౬", "౭", "౮", "౯"], + "thai": ["๐", "๑", "๒", "๓", "๔", "๕", "๖", "๗", "๘", "๙"], + "tibt": ["༠", "༡", "༢", "༣", "༤", "༥", "༦", "༧", "༨", "༩"], + "tirh": ["𑓐", "𑓑", "𑓒", "𑓓", "𑓔", "𑓕", "𑓖", "𑓗", "𑓘", "𑓙"], + "vaii": ["ᘠ", "ᘡ", "ᘢ", "ᘣ", "ᘤ", "ᘥ", "ᘦ", "ᘧ", "ᘨ", "ᘩ"], + "wara": ["𑣠", "𑣡", "𑣢", "𑣣", "𑣤", "𑣥", "𑣦", "𑣧", "𑣨", "𑣩"], + "wcho": ["𞋰", "𞋱", "𞋲", "𞋳", "𞋴", "𞋵", "𞋶", "𞋷", "𞋸", "𞋹"] + }; + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js + // @generated from regex-gen.ts + var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/; + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js + + // This is from: unicode-12.1.0/General_Category/Symbol/regex.js + // IE11 does not support unicode flag, otherwise this is just /\p{S}/u. + // /^\p{S}/u + var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source)); + // /\p{S}$/u + var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$")); + var CLDR_NUMBER_PATTERN = /[#0](?:[\.,][#0]+)*/g; + function formatToParts(numberResult, data, pl, options) { + var sign = numberResult.sign, + exponent = numberResult.exponent, + magnitude = numberResult.magnitude; + var notation = options.notation, + style = options.style, + numberingSystem = options.numberingSystem; + var defaultNumberingSystem = data.numbers.nu[0]; + // #region Part 1: partition and interpolate the CLDR number pattern. + // ---------------------------------------------------------- + var compactNumberPattern = null; + if (notation === 'compact' && magnitude) { + compactNumberPattern = getCompactDisplayPattern(numberResult, pl, data, style, options.compactDisplay, options.currencyDisplay, numberingSystem); + } + // This is used multiple times + var nonNameCurrencyPart; + if (style === 'currency' && options.currencyDisplay !== 'name') { + var byCurrencyDisplay = data.currencies[options.currency]; + if (byCurrencyDisplay) { + switch (options.currencyDisplay) { + case 'code': + nonNameCurrencyPart = options.currency; + break; + case 'symbol': + nonNameCurrencyPart = byCurrencyDisplay.symbol; + break; + default: + nonNameCurrencyPart = byCurrencyDisplay.narrow; + break; } - h = J(this); - la.apply(this, c); - for (c = 0; c < g.length; c++) U(a, g[c]); - if (h) for (U(a, this), c = 0; c < e.length; c++) g = e[c], g instanceof Element && S(a, g); - }); - void 0 !== ma && (d.remove = function () { - var f = J(this); - ma.call(this); - f && U(a, this); - }); + } else { + // Fallback for unknown currency + nonNameCurrencyPart = options.currency; + } } - ; - function Ea(a) { - function b(c, e) { - Object.defineProperty(c, "innerHTML", { - enumerable: e.enumerable, - configurable: !0, - get: e.get, - set: function (g) { - var h = this, - k = void 0; - J(this) && (k = [], P(a, this, function (x) { - x !== h && k.push(x); - })); - e.set.call(this, g); - if (k) for (var l = 0; l < k.length; l++) { - var m = k[l]; - 1 === m.__CE_state && a.disconnectedCallback(m); + var numberPattern; + if (!compactNumberPattern) { + // Note: if the style is unit, or is currency and the currency display is name, + // its unit parts will be interpolated in part 2. So here we can fallback to decimal. + if (style === 'decimal' || style === 'unit' || style === 'currency' && options.currencyDisplay === 'name') { + // Shortcut for decimal + var decimalData = data.numbers.decimal[numberingSystem] || data.numbers.decimal[defaultNumberingSystem]; + numberPattern = getPatternForSign(decimalData.standard, sign); + } else if (style === 'currency') { + var currencyData = data.numbers.currency[numberingSystem] || data.numbers.currency[defaultNumberingSystem]; + // We replace number pattern part with `0` for easier postprocessing. + numberPattern = getPatternForSign(currencyData[options.currencySign], sign); + } else { + // percent + var percentPattern = data.numbers.percent[numberingSystem] || data.numbers.percent[defaultNumberingSystem]; + numberPattern = getPatternForSign(percentPattern, sign); + } + } else { + numberPattern = compactNumberPattern; + } + // Extract the decimal number pattern string. It looks like "#,##0,00", which will later be + // used to infer decimal group sizes. + var decimalNumberPattern = CLDR_NUMBER_PATTERN.exec(numberPattern)[0]; + // Now we start to substitute patterns + // 1. replace strings like `0` and `#,##0.00` with `{0}` + // 2. unquote characters (invariant: the quoted characters does not contain the special tokens) + numberPattern = numberPattern.replace(CLDR_NUMBER_PATTERN, '{0}').replace(/'(.)'/g, '$1'); + // Handle currency spacing (both compact and non-compact). + if (style === 'currency' && options.currencyDisplay !== 'name') { + var currencyData = data.numbers.currency[numberingSystem] || data.numbers.currency[defaultNumberingSystem]; + // See `currencySpacing` substitution rule in TR-35. + // Here we always assume the currencyMatch is "[:^S:]" and surroundingMatch is "[:digit:]". + // + // Example 1: for pattern "#,##0.00¤" with symbol "US$", we replace "¤" with the symbol, + // but insert an extra non-break space before the symbol, because "[:^S:]" matches "U" in + // "US$" and "[:digit:]" matches the latn numbering system digits. + // + // Example 2: for pattern "¤#,##0.00" with symbol "US$", there is no spacing between symbol + // and number, because `$` does not match "[:^S:]". + // + // Implementation note: here we do the best effort to infer the insertion. + // We also assume that `beforeInsertBetween` and `afterInsertBetween` will never be `;`. + var afterCurrency = currencyData.currencySpacing.afterInsertBetween; + if (afterCurrency && !S_DOLLAR_UNICODE_REGEX.test(nonNameCurrencyPart)) { + numberPattern = numberPattern.replace('¤{0}', "\u00A4".concat(afterCurrency, "{0}")); + } + var beforeCurrency = currencyData.currencySpacing.beforeInsertBetween; + if (beforeCurrency && !CARET_S_UNICODE_REGEX.test(nonNameCurrencyPart)) { + numberPattern = numberPattern.replace('{0}¤', "{0}".concat(beforeCurrency, "\u00A4")); + } + } + // The following tokens are special: `{0}`, `¤`, `%`, `-`, `+`, `{c:...}. + var numberPatternParts = numberPattern.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g); + var numberParts = []; + var symbols = data.numbers.symbols[numberingSystem] || data.numbers.symbols[defaultNumberingSystem]; + for (var _i = 0, numberPatternParts_1 = numberPatternParts; _i < numberPatternParts_1.length; _i++) { + var part = numberPatternParts_1[_i]; + if (!part) { + continue; + } + switch (part) { + case '{0}': + { + // We only need to handle scientific and engineering notation here. + numberParts.push.apply(numberParts, paritionNumberIntoParts(symbols, numberResult, notation, exponent, numberingSystem, + // If compact number pattern exists, do not insert group separators. + !compactNumberPattern && options.useGrouping, decimalNumberPattern)); + break; + } + case '-': + numberParts.push({ + type: 'minusSign', + value: symbols.minusSign + }); + break; + case '+': + numberParts.push({ + type: 'plusSign', + value: symbols.plusSign + }); + break; + case '%': + numberParts.push({ + type: 'percentSign', + value: symbols.percentSign + }); + break; + case '¤': + // Computed above when handling currency spacing. + numberParts.push({ + type: 'currency', + value: nonNameCurrencyPart + }); + break; + default: + if (/^\{c:/.test(part)) { + numberParts.push({ + type: 'compact', + value: part.substring(3, part.length - 1) + }); + } else { + // literal + numberParts.push({ + type: 'literal', + value: part + }); + } + break; + } + } + // #endregion + // #region Part 2: interpolate unit pattern if necessary. + // ---------------------------------------------- + switch (style) { + case 'currency': + { + // `currencyDisplay: 'name'` has similar pattern handling as units. + if (options.currencyDisplay === 'name') { + var unitPattern = (data.numbers.currency[numberingSystem] || data.numbers.currency[defaultNumberingSystem]).unitPattern; + // Select plural + var unitName = void 0; + var currencyNameData = data.currencies[options.currency]; + if (currencyNameData) { + unitName = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), currencyNameData.displayName); + } else { + // Fallback for unknown currency + unitName = options.currency; } - this.ownerDocument.__CE_registry ? V(a, this) : Q(a, this); - return g; + // Do {0} and {1} substitution + var unitPatternParts = unitPattern.split(/(\{[01]\})/g); + var result = []; + for (var _a = 0, unitPatternParts_1 = unitPatternParts; _a < unitPatternParts_1.length; _a++) { + var part = unitPatternParts_1[_a]; + switch (part) { + case '{0}': + result.push.apply(result, numberParts); + break; + case '{1}': + result.push({ + type: 'currency', + value: unitName + }); + break; + default: + if (part) { + result.push({ + type: 'literal', + value: part + }); + } + break; + } + } + return result; + } else { + return numberParts; } - }); + } + case 'unit': + { + var unit = options.unit, + unitDisplay = options.unitDisplay; + var unitData = data.units.simple[unit]; + var unitPattern = void 0; + if (unitData) { + // Simple unit pattern + unitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[unit][unitDisplay]); + } else { + // See: http://unicode.org/reports/tr35/tr35-general.html#perUnitPatterns + // If cannot find unit in the simple pattern, it must be "per" compound pattern. + // Implementation note: we are not following TR-35 here because we need to format to parts! + var _b = unit.split('-per-'), + numeratorUnit = _b[0], + denominatorUnit = _b[1]; + unitData = data.units.simple[numeratorUnit]; + var numeratorUnitPattern = selectPlural(pl, numberResult.roundedNumber * Math.pow(10, exponent), data.units.simple[numeratorUnit][unitDisplay]); + var perUnitPattern = data.units.simple[denominatorUnit].perUnit[unitDisplay]; + if (perUnitPattern) { + // perUnitPattern exists, combine it with numeratorUnitPattern + unitPattern = perUnitPattern.replace('{0}', numeratorUnitPattern); + } else { + // get compoundUnit pattern (e.g. "{0} per {1}"), repalce {0} with numerator pattern and {1} with + // the denominator pattern in singular form. + var perPattern = data.units.compound.per[unitDisplay]; + var denominatorPattern = selectPlural(pl, 1, data.units.simple[denominatorUnit][unitDisplay]); + unitPattern = unitPattern = perPattern.replace('{0}', numeratorUnitPattern).replace('{1}', denominatorPattern.replace('{0}', '')); + } + } + var result = []; + // We need spacing around "{0}" because they are not treated as "unit" parts, but "literal". + for (var _c = 0, _d = unitPattern.split(/(\s*\{0\}\s*)/); _c < _d.length; _c++) { + var part = _d[_c]; + var interpolateMatch = /^(\s*)\{0\}(\s*)$/.exec(part); + if (interpolateMatch) { + // Space before "{0}" + if (interpolateMatch[1]) { + result.push({ + type: 'literal', + value: interpolateMatch[1] + }); + } + // "{0}" itself + result.push.apply(result, numberParts); + // Space after "{0}" + if (interpolateMatch[2]) { + result.push({ + type: 'literal', + value: interpolateMatch[2] + }); + } + } else if (part) { + result.push({ + type: 'unit', + value: part + }); + } + } + return result; + } + default: + return numberParts; + } + // #endregion + } + // A subset of https://tc39.es/ecma402/#sec-partitionnotationsubpattern + // Plus the exponent parts handling. + function paritionNumberIntoParts(symbols, numberResult, notation, exponent, numberingSystem, useGrouping, + /** + * This is the decimal number pattern without signs or symbols. + * It is used to infer the group size when `useGrouping` is true. + * + * A typical value looks like "#,##0.00" (primary group size is 3). + * Some locales like Hindi has secondary group size of 2 (e.g. "#,##,##0.00"). + */ + decimalNumberPattern) { + var result = []; + // eslint-disable-next-line prefer-const + var n = numberResult.formattedString, + x = numberResult.roundedNumber; + if (isNaN(x)) { + return [{ + type: 'nan', + value: n + }]; + } else if (!isFinite(x)) { + return [{ + type: 'infinity', + value: n + }]; + } + var digitReplacementTable = digitMapping[numberingSystem]; + if (digitReplacementTable) { + n = n.replace(/\d/g, function (digit) { + return digitReplacementTable[+digit] || digit; + }); + } + // TODO: Else use an implementation dependent algorithm to map n to the appropriate + // representation of n in the given numbering system. + var decimalSepIndex = n.indexOf('.'); + var integer; + var fraction; + if (decimalSepIndex > 0) { + integer = n.slice(0, decimalSepIndex); + fraction = n.slice(decimalSepIndex + 1); + } else { + integer = n; + } + // #region Grouping integer digits + // The weird compact and x >= 10000 check is to ensure consistency with Node.js and Chrome. + // Note that `de` does not have compact form for thousands, but Node.js does not insert grouping separator + // unless the rounded number is greater than 10000: + // NumberFormat('de', {notation: 'compact', compactDisplay: 'short'}).format(1234) //=> "1234" + // NumberFormat('de').format(1234) //=> "1.234" + if (useGrouping && (notation !== 'compact' || x >= 10000)) { + var groupSepSymbol = symbols.group; + var groups = []; + // > There may be two different grouping sizes: The primary grouping size used for the least + // > significant integer group, and the secondary grouping size used for more significant groups. + // > If a pattern contains multiple grouping separators, the interval between the last one and the + // > end of the integer defines the primary grouping size, and the interval between the last two + // > defines the secondary grouping size. All others are ignored. + var integerNumberPattern = decimalNumberPattern.split('.')[0]; + var patternGroups = integerNumberPattern.split(','); + var primaryGroupingSize = 3; + var secondaryGroupingSize = 3; + if (patternGroups.length > 1) { + primaryGroupingSize = patternGroups[patternGroups.length - 1].length; } - function d(c, e) { - c.insertAdjacentElement = function (g, h) { - var k = J(h); - g = e.call(this, g, h); - k && U(a, h); - J(g) && S(a, h); - return g; - }; + if (patternGroups.length > 2) { + secondaryGroupingSize = patternGroups[patternGroups.length - 2].length; } - function f(c, e) { - function g(h, k) { - for (var l = []; h !== k; h = h.nextSibling) l.push(h); - for (k = 0; k < l.length; k++) V(a, l[k]); + var i = integer.length - primaryGroupingSize; + if (i > 0) { + // Slice the least significant integer group + groups.push(integer.slice(i, i + primaryGroupingSize)); + // Then iteratively push the more signicant groups + // TODO: handle surrogate pairs in some numbering system digits + for (i -= secondaryGroupingSize; i > 0; i -= secondaryGroupingSize) { + groups.push(integer.slice(i, i + secondaryGroupingSize)); } - c.insertAdjacentHTML = function (h, k) { - h = h.toLowerCase(); - if ("beforebegin" === h) { - var l = this.previousSibling; - e.call(this, h, k); - g(l || this.parentNode.firstChild, this); - } else if ("afterbegin" === h) l = this.firstChild, e.call(this, h, k), g(this.firstChild, l);else if ("beforeend" === h) l = this.lastChild, e.call(this, h, k), g(l || this.firstChild, null);else if ("afterend" === h) l = this.nextSibling, e.call(this, h, k), g(this.nextSibling, l);else throw new SyntaxError("The value provided (" + String(h) + ") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'."); - }; + groups.push(integer.slice(0, i + secondaryGroupingSize)); + } else { + groups.push(integer); } - y && (Element.prototype.attachShadow = function (c) { - c = y.call(this, c); - if (a.j && !c.__CE_patched) { - c.__CE_patched = !0; - for (var e = 0; e < a.m.length; e++) a.m[e](c); + while (groups.length > 0) { + var integerGroup = groups.pop(); + result.push({ + type: 'integer', + value: integerGroup + }); + if (groups.length > 0) { + result.push({ + type: 'group', + value: groupSepSymbol + }); } - return this.__CE_shadowRoot = c; + } + } else { + result.push({ + type: 'integer', + value: integer }); - z && z.get ? b(Element.prototype, z) : I && I.get ? b(HTMLElement.prototype, I) : ua(a, function (c) { - b(c, { - enumerable: !0, - configurable: !0, - get: function () { - return q.call(this, !0).innerHTML; - }, - set: function (e) { - var g = "template" === this.localName, - h = g ? this.content : this, - k = p.call(document, this.namespaceURI, this.localName); - for (k.innerHTML = e; 0 < h.childNodes.length;) u.call(h, h.childNodes[0]); - for (e = g ? k.content : k; 0 < e.childNodes.length;) r.call(h, e.childNodes[0]); - } - }); + } + // #endregion + if (fraction !== undefined) { + result.push({ + type: 'decimal', + value: symbols.decimal + }, { + type: 'fraction', + value: fraction }); - Element.prototype.setAttribute = function (c, e) { - if (1 !== this.__CE_state) return B.call(this, c, e); - var g = A.call(this, c); - B.call(this, c, e); - e = A.call(this, c); - a.attributeChangedCallback(this, c, g, e, null); - }; - Element.prototype.setAttributeNS = function (c, e, g) { - if (1 !== this.__CE_state) return F.call(this, c, e, g); - var h = E.call(this, c, e); - F.call(this, c, e, g); - g = E.call(this, c, e); - a.attributeChangedCallback(this, e, h, g, c); - }; - Element.prototype.removeAttribute = function (c) { - if (1 !== this.__CE_state) return C.call(this, c); - var e = A.call(this, c); - C.call(this, c); - null !== e && a.attributeChangedCallback(this, c, e, null, null); - }; - D && (Element.prototype.toggleAttribute = function (c, e) { - if (1 !== this.__CE_state) return D.call(this, c, e); - var g = A.call(this, c), - h = null !== g; - e = D.call(this, c, e); - h !== e && a.attributeChangedCallback(this, c, g, e ? "" : null, null); - return e; + } + if ((notation === 'scientific' || notation === 'engineering') && isFinite(x)) { + result.push({ + type: 'exponentSeparator', + value: symbols.exponential }); - Element.prototype.removeAttributeNS = function (c, e) { - if (1 !== this.__CE_state) return G.call(this, c, e); - var g = E.call(this, c, e); - G.call(this, c, e); - var h = E.call(this, c, e); - g !== h && a.attributeChangedCallback(this, e, g, h, c); - }; - oa ? d(HTMLElement.prototype, oa) : H && d(Element.prototype, H); - pa ? f(HTMLElement.prototype, pa) : fa && f(Element.prototype, fa); - Z(a, Element.prototype, { - prepend: ha, - append: ia + if (exponent < 0) { + result.push({ + type: 'exponentMinusSign', + value: symbols.minusSign + }); + exponent = -exponent; + } + var exponentResult = ToRawFixed(exponent, 0, 0); + result.push({ + type: 'exponentInteger', + value: exponentResult.formattedString }); - Da(a); } - ; - var Fa = {}; - function Ga(a) { - function b() { - var d = this.constructor; - var f = document.__CE_registry.C.get(d); - if (!f) throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`."); - var c = f.constructionStack; - if (0 === c.length) return c = n.call(document, f.localName), Object.setPrototypeOf(c, d.prototype), c.__CE_state = 1, c.__CE_definition = f, R(a, c), c; - var e = c.length - 1, - g = c[e]; - if (g === Fa) throw Error("Failed to construct '" + f.localName + "': This element was already constructed."); - c[e] = Fa; - Object.setPrototypeOf(g, d.prototype); - R(a, g); - return g; + return result; + } + function getPatternForSign(pattern, sign) { + if (pattern.indexOf(';') < 0) { + pattern = "".concat(pattern, ";-").concat(pattern); + } + var _a = pattern.split(';'), + zeroPattern = _a[0], + negativePattern = _a[1]; + switch (sign) { + case 0: + return zeroPattern; + case -1: + return negativePattern; + default: + return negativePattern.indexOf('-') >= 0 ? negativePattern.replace(/-/g, '+') : "+".concat(zeroPattern); + } + } + // Find the CLDR pattern for compact notation based on the magnitude of data and style. + // + // Example return value: "¤ {c:laki}000;¤{c:laki} -0" (`sw` locale): + // - Notice the `{c:...}` token that wraps the compact literal. + // - The consecutive zeros are normalized to single zero to match CLDR_NUMBER_PATTERN. + // + // Returning null means the compact display pattern cannot be found. + function getCompactDisplayPattern(numberResult, pl, data, style, compactDisplay, currencyDisplay, numberingSystem) { + var _a; + var roundedNumber = numberResult.roundedNumber, + sign = numberResult.sign, + magnitude = numberResult.magnitude; + var magnitudeKey = String(Math.pow(10, magnitude)); + var defaultNumberingSystem = data.numbers.nu[0]; + var pattern; + if (style === 'currency' && currencyDisplay !== 'name') { + var byNumberingSystem = data.numbers.currency; + var currencyData = byNumberingSystem[numberingSystem] || byNumberingSystem[defaultNumberingSystem]; + // NOTE: compact notation ignores currencySign! + var compactPluralRules = (_a = currencyData.short) === null || _a === void 0 ? void 0 : _a[magnitudeKey]; + if (!compactPluralRules) { + return null; } - b.prototype = na.prototype; - Object.defineProperty(HTMLElement.prototype, "constructor", { - writable: !0, - configurable: !0, - enumerable: !1, - value: b - }); - window.HTMLElement = b; + pattern = selectPlural(pl, roundedNumber, compactPluralRules); + } else { + var byNumberingSystem = data.numbers.decimal; + var byCompactDisplay = byNumberingSystem[numberingSystem] || byNumberingSystem[defaultNumberingSystem]; + var compactPlaralRule = byCompactDisplay[compactDisplay][magnitudeKey]; + if (!compactPlaralRule) { + return null; + } + pattern = selectPlural(pl, roundedNumber, compactPlaralRule); } - ; - function Ha(a) { - function b(d, f) { - Object.defineProperty(d, "textContent", { - enumerable: f.enumerable, - configurable: !0, - get: f.get, - set: function (c) { - if (this.nodeType === Node.TEXT_NODE) f.set.call(this, c);else { - var e = void 0; - if (this.firstChild) { - var g = this.childNodes, - h = g.length; - if (0 < h && J(this)) { - e = Array(h); - for (var k = 0; k < h; k++) e[k] = g[k]; - } - } - f.set.call(this, c); - if (e) for (c = 0; c < e.length; c++) U(a, e[c]); - } - } - }); + // See https://unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats + // > If the value is precisely “0”, either explicit or defaulted, then the normal number format + // > pattern for that sort of object is supplied. + if (pattern === '0') { + return null; + } + pattern = getPatternForSign(pattern, sign) + // Extract compact literal from the pattern + .replace(/([^\s;\-\+\d¤]+)/g, '{c:$1}') + // We replace one or more zeros with a single zero so it matches `CLDR_NUMBER_PATTERN`. + .replace(/0+/, '0'); + return pattern; + } + function selectPlural(pl, x, rules) { + return rules[pl.select(x)] || rules.other; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/PartitionNumberPattern.js + + /** + * https://tc39.es/ecma402/#sec-formatnumberstring + */ + function PartitionNumberPattern(numberFormat, x, _a) { + var _b; + var getInternalSlots = _a.getInternalSlots; + var internalSlots = getInternalSlots(numberFormat); + var pl = internalSlots.pl, + dataLocaleData = internalSlots.dataLocaleData, + numberingSystem = internalSlots.numberingSystem; + var symbols = dataLocaleData.numbers.symbols[numberingSystem] || dataLocaleData.numbers.symbols[dataLocaleData.numbers.nu[0]]; + var magnitude = 0; + var exponent = 0; + var n; + if (isNaN(x)) { + n = symbols.nan; + } else if (!isFinite(x)) { + n = symbols.infinity; + } else { + if (internalSlots.style === 'percent') { + x *= 100; } - Node.prototype.insertBefore = function (d, f) { - if (d instanceof DocumentFragment) { - var c = K(d); - d = t.call(this, d, f); - if (J(this)) for (f = 0; f < c.length; f++) S(a, c[f]); - return d; + ; + _b = ComputeExponent(numberFormat, x, { + getInternalSlots: getInternalSlots + }), exponent = _b[0], magnitude = _b[1]; + // Preserve more precision by doing multiplication when exponent is negative. + x = exponent < 0 ? x * Math.pow(10, -exponent) : x / Math.pow(10, exponent); + var formatNumberResult = FormatNumericToString(internalSlots, x); + n = formatNumberResult.formattedString; + x = formatNumberResult.roundedNumber; + } + // Based on https://tc39.es/ecma402/#sec-getnumberformatpattern + // We need to do this before `x` is rounded. + var sign; + var signDisplay = internalSlots.signDisplay; + switch (signDisplay) { + case 'never': + sign = 0; + break; + case 'auto': + if (SameValue(x, 0) || x > 0 || isNaN(x)) { + sign = 0; + } else { + sign = -1; } - c = d instanceof Element && J(d); - f = t.call(this, d, f); - c && U(a, d); - J(this) && S(a, d); - return f; - }; - Node.prototype.appendChild = function (d) { - if (d instanceof DocumentFragment) { - var f = K(d); - d = r.call(this, d); - if (J(this)) for (var c = 0; c < f.length; c++) S(a, f[c]); - return d; + break; + case 'always': + if (SameValue(x, 0) || x > 0 || isNaN(x)) { + sign = 1; + } else { + sign = -1; } - f = d instanceof Element && J(d); - c = r.call(this, d); - f && U(a, d); - J(this) && S(a, d); - return c; - }; - Node.prototype.cloneNode = function (d) { - d = q.call(this, !!d); - this.ownerDocument.__CE_registry ? V(a, d) : Q(a, d); - return d; - }; - Node.prototype.removeChild = function (d) { - var f = d instanceof Element && J(d), - c = u.call(this, d); - f && U(a, d); - return c; - }; - Node.prototype.replaceChild = function (d, f) { - if (d instanceof DocumentFragment) { - var c = K(d); - d = v.call(this, d, f); - if (J(this)) for (U(a, f), f = 0; f < c.length; f++) S(a, c[f]); - return d; + break; + default: + // x === 0 -> x is 0 or x is -0 + if (x === 0 || isNaN(x)) { + sign = 0; + } else if (x > 0) { + sign = 1; + } else { + sign = -1; } - c = d instanceof Element && J(d); - var e = v.call(this, d, f), - g = J(this); - g && U(a, f); - c && U(a, d); - g && S(a, d); - return e; - }; - w && w.get ? b(Node.prototype, w) : ta(a, function (d) { - b(d, { - enumerable: !0, - configurable: !0, - get: function () { - for (var f = [], c = this.firstChild; c; c = c.nextSibling) c.nodeType !== Node.COMMENT_NODE && f.push(c.textContent); - return f.join(""); - }, - set: function (f) { - for (; this.firstChild;) u.call(this, this.firstChild); - null != f && "" !== f && r.call(this, document.createTextNode(f)); - } - }); - }); } - ; - var O = window.customElements; - function Ia() { - var a = new N(); - Ga(a); - Ca(a); - Z(a, DocumentFragment.prototype, { - prepend: da, - append: ea - }); - Ha(a); - Ea(a); - window.CustomElementRegistry = Y; - a = new Y(a); - document.__CE_registry = a; - Object.defineProperty(window, "customElements", { - configurable: !0, - enumerable: !0, - value: a + return formatToParts({ + roundedNumber: x, + formattedString: n, + exponent: exponent, + magnitude: magnitude, + sign: sign + }, internalSlots.dataLocaleData, pl, internalSlots); + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToParts.js + + function FormatNumericToParts(nf, x, implDetails) { + var parts = PartitionNumberPattern(nf, x, implDetails); + var result = ArrayCreate(0); + for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) { + var part = parts_1[_i]; + result.push({ + type: part.type, + value: part.value }); } - O && !O.forcePolyfill && "function" == typeof O.define && "function" == typeof O.get || Ia(); - window.__CE_installPolyfill = Ia; - }).call(self); - - /***/ - }), - /***/946: ( /***/() => { + return result; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js + var utils_UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi; + function utils_invariant(condition, message, Err) { + if (Err === void 0) { + Err = Error; + } + if (!condition) { + throw new Err(message); + } + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js /** - * @license - * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + * https://tc39.es/ecma402/#sec-bestavailablelocale + * @param availableLocales + * @param locale */ + function BestAvailableLocale(availableLocales, locale) { + var candidate = locale; + while (true) { + if (availableLocales.has(candidate)) { + return candidate; + } + var pos = candidate.lastIndexOf('-'); + if (!~pos) { + return undefined; + } + if (pos >= 2 && candidate[pos - 2] === '-') { + pos -= 2; + } + candidate = candidate.slice(0, pos); + } + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js - // minimal template polyfill - (function () { - 'use strict'; - - var needsTemplate = typeof HTMLTemplateElement === 'undefined'; - var brokenDocFragment = !(document.createDocumentFragment().cloneNode() instanceof DocumentFragment); - var needsDocFrag = false; - - // NOTE: Replace DocumentFragment to work around IE11 bug that - // causes children of a document fragment modified while - // there is a mutation observer to not have a parentNode, or - // have a broken parentNode (!?!) - if (/Trident/.test(navigator.userAgent)) { - (function () { - needsDocFrag = true; - var origCloneNode = Node.prototype.cloneNode; - Node.prototype.cloneNode = function cloneNode(deep) { - var newDom = origCloneNode.call(this, deep); - if (this instanceof DocumentFragment) { - newDom.__proto__ = DocumentFragment.prototype; - } - return newDom; - }; - - // IE's DocumentFragment querySelector code doesn't work when - // called on an element instance - DocumentFragment.prototype.querySelectorAll = HTMLElement.prototype.querySelectorAll; - DocumentFragment.prototype.querySelector = HTMLElement.prototype.querySelector; - Object.defineProperties(DocumentFragment.prototype, { - 'nodeType': { - get: function () { - return Node.DOCUMENT_FRAGMENT_NODE; - }, - configurable: true - }, - 'localName': { - get: function () { - return undefined; - }, - configurable: true - }, - 'nodeName': { - get: function () { - return '#document-fragment'; - }, - configurable: true - } - }); - var origInsertBefore = Node.prototype.insertBefore; - function insertBefore(newNode, refNode) { - if (newNode instanceof DocumentFragment) { - var child; - while (child = newNode.firstChild) { - origInsertBefore.call(this, child, refNode); - } - } else { - origInsertBefore.call(this, newNode, refNode); - } - return newNode; + /** + * https://tc39.es/ecma402/#sec-lookupmatcher + * @param availableLocales + * @param requestedLocales + * @param getDefaultLocale + */ + function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) { + var result = { + locale: '' + }; + for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) { + var locale = requestedLocales_1[_i]; + var noExtensionLocale = locale.replace(utils_UNICODE_EXTENSION_SEQUENCE_REGEX, ''); + var availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale); + if (availableLocale) { + result.locale = availableLocale; + if (locale !== noExtensionLocale) { + result.extension = locale.slice(noExtensionLocale.length + 1, locale.length); } - Node.prototype.insertBefore = insertBefore; - var origAppendChild = Node.prototype.appendChild; - Node.prototype.appendChild = function appendChild(child) { - if (child instanceof DocumentFragment) { - insertBefore.call(this, child, null); - } else { - origAppendChild.call(this, child); - } - return child; - }; - var origRemoveChild = Node.prototype.removeChild; - var origReplaceChild = Node.prototype.replaceChild; - Node.prototype.replaceChild = function replaceChild(newChild, oldChild) { - if (newChild instanceof DocumentFragment) { - insertBefore.call(this, newChild, oldChild); - origRemoveChild.call(this, oldChild); - } else { - origReplaceChild.call(this, newChild, oldChild); - } - return oldChild; - }; - Document.prototype.createDocumentFragment = function createDocumentFragment() { - var frag = this.createElement('df'); - frag.__proto__ = DocumentFragment.prototype; - return frag; - }; - var origImportNode = Document.prototype.importNode; - Document.prototype.importNode = function importNode(impNode, deep) { - deep = deep || false; - var newNode = origImportNode.call(this, impNode, deep); - if (impNode instanceof DocumentFragment) { - newNode.__proto__ = DocumentFragment.prototype; - } - return newNode; - }; - })(); + return result; + } } + result.locale = getDefaultLocale(); + return result; + } + ; // CONCATENATED MODULE: ./node_modules/@formatjs/intl-locale/node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js - // NOTE: we rely on this cloneNode not causing element upgrade. - // This means this polyfill must load before the CE polyfill and - // this would need to be re-worked if a browser supports native CE - // but not