@formatjs/intl-relativetimeformat 12.3.10 → 12.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/locale-data/ar-BH.js +4 -2
- package/locale-data/ar-DJ.js +4 -2
- package/locale-data/ar-EG.js +4 -2
- package/locale-data/ar-ER.js +4 -2
- package/locale-data/ar-IL.js +4 -2
- package/locale-data/ar-IQ.js +4 -2
- package/locale-data/ar-JO.js +4 -2
- package/locale-data/ar-KM.js +4 -2
- package/locale-data/ar-KW.js +4 -2
- package/locale-data/ar-LB.js +4 -2
- package/locale-data/ar-MR.js +4 -2
- package/locale-data/ar-OM.js +4 -2
- package/locale-data/ar-PS.js +4 -2
- package/locale-data/ar-QA.js +4 -2
- package/locale-data/ar-SA.js +4 -2
- package/locale-data/ar-SD.js +4 -2
- package/locale-data/ar-SO.js +4 -2
- package/locale-data/ar-SS.js +4 -2
- package/locale-data/ar-SY.js +4 -2
- package/locale-data/ar-TD.js +4 -2
- package/locale-data/ar-YE.js +4 -2
- package/locale-data/as.js +4 -2
- package/locale-data/az-Arab-IQ.js +4 -2
- package/locale-data/az-Arab-TR.js +4 -2
- package/locale-data/az-Arab.js +4 -2
- package/locale-data/bgc.js +4 -2
- package/locale-data/bgn-AE.js +4 -2
- package/locale-data/bgn-AF.js +4 -2
- package/locale-data/bgn-IR.js +4 -2
- package/locale-data/bgn-OM.js +4 -2
- package/locale-data/bgn.js +4 -2
- package/locale-data/bho.js +4 -2
- package/locale-data/bn-IN.js +4 -2
- package/locale-data/bn.js +4 -2
- package/locale-data/ccp-IN.js +4 -2
- package/locale-data/ccp.js +4 -2
- package/locale-data/ckb-IR.js +4 -2
- package/locale-data/ckb.js +4 -2
- package/locale-data/dz.js +4 -2
- package/locale-data/fa-AF.js +4 -2
- package/locale-data/fa.js +4 -2
- package/locale-data/ff-Adlm-BF.js +4 -2
- package/locale-data/ff-Adlm-CM.js +4 -2
- package/locale-data/ff-Adlm-GH.js +4 -2
- package/locale-data/ff-Adlm-GM.js +4 -2
- package/locale-data/ff-Adlm-GW.js +4 -2
- package/locale-data/ff-Adlm-LR.js +4 -2
- package/locale-data/ff-Adlm-MR.js +4 -2
- package/locale-data/ff-Adlm-NE.js +4 -2
- package/locale-data/ff-Adlm-NG.js +4 -2
- package/locale-data/ff-Adlm-SL.js +4 -2
- package/locale-data/ff-Adlm-SN.js +4 -2
- package/locale-data/ff-Adlm.js +4 -2
- package/locale-data/hnj-Hmnp.js +4 -2
- package/locale-data/hnj.js +4 -2
- package/locale-data/ks-Arab.js +4 -2
- package/locale-data/ks.js +4 -2
- package/locale-data/lrc-IQ.js +4 -2
- package/locale-data/lrc.js +4 -2
- package/locale-data/mni-Beng.js +4 -2
- package/locale-data/mni-Mtei.js +4 -2
- package/locale-data/mni.js +4 -2
- package/locale-data/mr.js +4 -2
- package/locale-data/mww-Hmnp.js +4 -2
- package/locale-data/mww.js +4 -2
- package/locale-data/my.js +4 -2
- package/locale-data/mzn.js +4 -2
- package/locale-data/ne-IN.js +4 -2
- package/locale-data/ne.js +4 -2
- package/locale-data/nqo.js +4 -2
- package/locale-data/pa-Arab.js +4 -2
- package/locale-data/ps-PK.js +4 -2
- package/locale-data/ps.js +4 -2
- package/locale-data/raj.js +4 -2
- package/locale-data/sa.js +4 -2
- package/locale-data/sat-Deva.js +4 -2
- package/locale-data/sat-Olck.js +4 -2
- package/locale-data/sat.js +4 -2
- package/locale-data/sd-Arab.js +4 -2
- package/locale-data/sd.js +4 -2
- package/locale-data/sdh-IQ.js +4 -2
- package/locale-data/sdh.js +4 -2
- package/locale-data/ur-IN.js +4 -2
- package/locale-data/uz-Arab.js +4 -2
- package/package.json +6 -3
- package/polyfill-force.js +1 -1
- package/polyfill-force.js.map +1 -1
- package/polyfill.iife.js +1 -1
- package/polyfill.js +1 -1
- package/polyfill.js.map +1 -1
- package/should-polyfill.js.map +1 -1
package/index.js
CHANGED
|
@@ -176,7 +176,7 @@ function InitializeRelativeTimeFormat(rtf, locales, options, { getInternalSlots,
|
|
|
176
176
|
const fields = localeData[r.dataLocale];
|
|
177
177
|
invariant(!!fields, `Missing locale data for ${r.dataLocale}`);
|
|
178
178
|
internalSlots.fields = fields;
|
|
179
|
-
internalSlots.numberFormat = createMemoizedNumberFormat(locales);
|
|
179
|
+
internalSlots.numberFormat = createMemoizedNumberFormat(locales, { numberingSystem: nu });
|
|
180
180
|
internalSlots.pluralRules = createMemoizedPluralRules(locales);
|
|
181
181
|
internalSlots.numberingSystem = nu;
|
|
182
182
|
return rtf;
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../ecma262-abstract/ToString.js","../../ecma402-abstract/CanonicalizeLocaleList.js","../../ecma262-abstract/ToObject.js","../../ecma402-abstract/GetOption.js","../../ecma402-abstract/SupportedLocales.js","../../ecma402-abstract/CoerceOptionsToObject.js","../../../node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js","../../ecma402-abstract/utils.js","../../ecma402-abstract/RelativeTimeFormat/InitializeRelativeTimeFormat.js","../../ecma262-abstract/SameValue.js","../../ecma262-abstract/Type.js","../../ecma402-abstract/RelativeTimeFormat/SingularRelativeTimeUnit.js","../../ecma402-abstract/PartitionPattern.js","../../ecma402-abstract/RelativeTimeFormat/MakePartsList.js","../../ecma402-abstract/RelativeTimeFormat/PartitionRelativeTimePattern.js","../get_internal_slots.ts","../index.ts"],"sourcesContent":["/**\n* https://tc39.es/ecma262/#sec-tostring\n*/\nexport function ToString(o) {\n\tif (typeof o === \"symbol\") {\n\t\tthrow TypeError(\"Cannot convert a Symbol value to a string\");\n\t}\n\treturn String(o);\n}\n","/**\n* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist\n* @param locales\n*/\nexport function CanonicalizeLocaleList(locales) {\n\t// TODO\n\treturn Intl.getCanonicalLocales(locales);\n}\n","/**\n* https://tc39.es/ecma262/#sec-toobject\n*/\nexport function ToObject(arg) {\n\tif (arg == null) {\n\t\tthrow new TypeError(\"undefined/null cannot be converted to object\");\n\t}\n\treturn Object(arg);\n}\n","import { ToString } from \"#packages/ecma262-abstract/ToString.js\";\n/**\n* https://tc39.es/ecma402/#sec-getoption\n* @param opts\n* @param prop\n* @param type\n* @param values\n* @param fallback\n*/\nexport function GetOption(opts, prop, type, values, fallback) {\n\tif (typeof opts !== \"object\") {\n\t\tthrow new TypeError(\"Options must be an object\");\n\t}\n\tlet value = opts[prop];\n\tif (value !== undefined) {\n\t\tif (type !== \"boolean\" && type !== \"string\") {\n\t\t\tthrow new TypeError(\"invalid type\");\n\t\t}\n\t\tif (type === \"boolean\") {\n\t\t\tvalue = Boolean(value);\n\t\t}\n\t\tif (type === \"string\") {\n\t\t\tvalue = ToString(value);\n\t\t}\n\t\tif (values !== undefined && !values.filter((val) => val == value).length) {\n\t\t\tthrow new RangeError(`${value} is not within ${values.join(\", \")}`);\n\t\t}\n\t\treturn value;\n\t}\n\treturn fallback;\n}\n","import { LookupSupportedLocales } from \"@formatjs/intl-localematcher\";\nimport { ToObject } from \"#packages/ecma262-abstract/ToObject.js\";\nimport { GetOption } from \"#packages/ecma402-abstract/GetOption.js\";\n/**\n* https://tc39.es/ecma402/#sec-supportedlocales\n* @param availableLocales\n* @param requestedLocales\n* @param options\n*/\nexport function SupportedLocales(availableLocales, requestedLocales, options) {\n\tlet matcher = \"best fit\";\n\tif (options !== undefined) {\n\t\toptions = ToObject(options);\n\t\tmatcher = GetOption(options, \"localeMatcher\", \"string\", [\"lookup\", \"best fit\"], \"best fit\");\n\t}\n\tif (matcher === \"best fit\") {\n\t\treturn LookupSupportedLocales(Array.from(availableLocales), requestedLocales);\n\t}\n\treturn LookupSupportedLocales(Array.from(availableLocales), requestedLocales);\n}\n","import { ToObject } from \"#packages/ecma262-abstract/ToObject.js\";\n/**\n* https://tc39.es/ecma402/#sec-coerceoptionstoobject\n* @param options\n* @returns\n*/\nexport function CoerceOptionsToObject(options) {\n\tif (typeof options === \"undefined\") {\n\t\treturn Object.create(null);\n\t}\n\treturn ToObject(options);\n}\n","//#region packages/fast-memoize/index.ts\nfunction memoize(fn, options) {\n\tconst cache = options && options.cache ? options.cache : cacheDefault;\n\tconst serializer = options && options.serializer ? options.serializer : serializerDefault;\n\treturn (options && options.strategy ? options.strategy : strategyDefault)(fn, {\n\t\tcache,\n\t\tserializer\n\t});\n}\nfunction isPrimitive(value) {\n\treturn value == null || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction monadic(fn, cache, serializer, arg) {\n\tconst cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.call(this, arg);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n\tconst args = Array.prototype.slice.call(arguments, 3);\n\tconst cacheKey = serializer(args);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.apply(this, args);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n\treturn strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n\tconst strategy = fn.length === 1 ? monadic : variadic;\n\treturn assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n\treturn assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n\treturn assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\nconst serializerDefault = function() {\n\treturn JSON.stringify(arguments);\n};\nvar ObjectWithoutPrototypeCache = class {\n\tconstructor() {\n\t\tthis.cache = Object.create(null);\n\t}\n\tget(key) {\n\t\treturn this.cache[key];\n\t}\n\tset(key, value) {\n\t\tthis.cache[key] = value;\n\t}\n};\nconst cacheDefault = { create: function create() {\n\treturn new ObjectWithoutPrototypeCache();\n} };\nconst strategies = {\n\tvariadic: strategyVariadic,\n\tmonadic: strategyMonadic\n};\n//#endregion\nexport { memoize, strategies };\n\n//# sourceMappingURL=index.js.map","import { memoize, strategies } from \"@formatjs/fast-memoize\";\nexport function repeat(s, times) {\n\tif (typeof s.repeat === \"function\") {\n\t\treturn s.repeat(times);\n\t}\n\tconst arr = Array.from({ length: times });\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tarr[i] = s;\n\t}\n\treturn arr.join(\"\");\n}\nexport function setInternalSlot(map, pl, field, value) {\n\tif (!map.get(pl)) {\n\t\tmap.set(pl, Object.create(null));\n\t}\n\tconst slots = map.get(pl);\n\tslots[field] = value;\n}\nexport function getInternalSlot(map, pl, field) {\n\treturn getMultiInternalSlots(map, pl, field)[field];\n}\nexport function getMultiInternalSlots(map, pl, ...fields) {\n\tconst slots = map.get(pl);\n\tif (!slots) {\n\t\tthrow new TypeError(`${pl} InternalSlot has not been initialized`);\n\t}\n\treturn fields.reduce((all, f) => {\n\t\tall[f] = slots[f];\n\t\treturn all;\n\t}, Object.create(null));\n}\nexport function isLiteralPart(patternPart) {\n\treturn patternPart.type === \"literal\";\n}\n/*\n17 ECMAScript Standard Built-in Objects:\nEvery built-in Function object, including constructors, that is not\nidentified as an anonymous function has a name property whose value\nis a String.\n\nUnless otherwise specified, the name property of a built-in Function\nobject, if it exists, has the attributes { [[Writable]]: false,\n[[Enumerable]]: false, [[Configurable]]: true }.\n*/\nexport function defineProperty(target, name, { value }) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport function ensureIntl() {\n\tif (typeof Intl === \"undefined\") {\n\t\tObject.defineProperty(globalThis, \"Intl\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: {}\n\t\t});\n\t}\n\treturn Intl;\n}\n/**\n* 7.3.5 CreateDataProperty\n* @param target\n* @param name\n* @param value\n*/\nexport function createDataProperty(target, name, value) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport function invariant(condition, message, Err = Error) {\n\tif (!condition) {\n\t\tthrow new Err(message);\n\t}\n}\nexport const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });\nexport const createMemoizedPluralRules = memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });\nexport const createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });\n","import { CanonicalizeLocaleList } from \"#packages/ecma402-abstract/CanonicalizeLocaleList.js\";\nimport { CoerceOptionsToObject } from \"#packages/ecma402-abstract/CoerceOptionsToObject.js\";\nimport { GetOption } from \"#packages/ecma402-abstract/GetOption.js\";\nimport \"#packages/ecma402-abstract/types/relative-time.js\";\nimport { createMemoizedNumberFormat, createMemoizedPluralRules, invariant } from \"#packages/ecma402-abstract/utils.js\";\nimport { ResolveLocale } from \"@formatjs/intl-localematcher\";\nconst NUMBERING_SYSTEM_REGEX = /^[a-z0-9]{3,8}(-[a-z0-9]{3,8})*$/i;\nexport function InitializeRelativeTimeFormat(rtf, locales, options, { getInternalSlots, availableLocales, relevantExtensionKeys, localeData, getDefaultLocale }) {\n\tconst internalSlots = getInternalSlots(rtf);\n\tinternalSlots.initializedRelativeTimeFormat = true;\n\tconst requestedLocales = CanonicalizeLocaleList(locales);\n\tconst opt = Object.create(null);\n\tconst opts = CoerceOptionsToObject(options);\n\tconst matcher = GetOption(opts, \"localeMatcher\", \"string\", [\"best fit\", \"lookup\"], \"best fit\");\n\topt.localeMatcher = matcher;\n\tconst numberingSystem = GetOption(\n\t\topts,\n\t\t// @ts-expect-error TS option is wack\n\t\t\"numberingSystem\",\n\t\t\"string\",\n\t\tundefined,\n\t\tundefined\n\t);\n\tif (numberingSystem !== undefined) {\n\t\tif (!NUMBERING_SYSTEM_REGEX.test(numberingSystem)) {\n\t\t\tthrow new RangeError(`Invalid numbering system ${numberingSystem}`);\n\t\t}\n\t}\n\topt.nu = numberingSystem;\n\tconst r = ResolveLocale(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);\n\tconst { locale, nu } = r;\n\tinternalSlots.locale = locale;\n\tinternalSlots.style = GetOption(opts, \"style\", \"string\", [\n\t\t\"long\",\n\t\t\"narrow\",\n\t\t\"short\"\n\t], \"long\");\n\tinternalSlots.numeric = GetOption(opts, \"numeric\", \"string\", [\"always\", \"auto\"], \"always\");\n\tconst fields = localeData[r.dataLocale];\n\tinvariant(!!fields, `Missing locale data for ${r.dataLocale}`);\n\tinternalSlots.fields = fields;\n\tinternalSlots.numberFormat = createMemoizedNumberFormat(locales);\n\tinternalSlots.pluralRules = createMemoizedPluralRules(locales);\n\tinternalSlots.numberingSystem = nu;\n\treturn rtf;\n}\n","/**\n* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue\n*/\nexport function SameValue(x, y) {\n\tif (Object.is) {\n\t\treturn Object.is(x, y);\n\t}\n\tif (x === y) {\n\t\treturn x !== 0 || 1 / x === 1 / y;\n\t}\n\treturn x !== x && y !== y;\n}\n","/**\n* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type\n*/\nexport function Type(x) {\n\tif (x === null) {\n\t\treturn \"Null\";\n\t}\n\tif (typeof x === \"undefined\") {\n\t\treturn \"Undefined\";\n\t}\n\tif (typeof x === \"function\" || typeof x === \"object\") {\n\t\treturn \"Object\";\n\t}\n\tif (typeof x === \"number\") {\n\t\treturn \"Number\";\n\t}\n\tif (typeof x === \"boolean\") {\n\t\treturn \"Boolean\";\n\t}\n\tif (typeof x === \"string\") {\n\t\treturn \"String\";\n\t}\n\tif (typeof x === \"symbol\") {\n\t\treturn \"Symbol\";\n\t}\n\tif (typeof x === \"bigint\") {\n\t\treturn \"BigInt\";\n\t}\n}\n","import { Type } from \"#packages/ecma262-abstract/Type.js\";\nimport \"#packages/ecma402-abstract/types/relative-time.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\n/**\n* https://tc39.es/proposal-intl-relative-time/#sec-singularrelativetimeunit\n* @param unit\n*/\nexport function SingularRelativeTimeUnit(unit) {\n\tinvariant(Type(unit) === \"String\", \"unit must be a string\");\n\tif (unit === \"seconds\") return \"second\";\n\tif (unit === \"minutes\") return \"minute\";\n\tif (unit === \"hours\") return \"hour\";\n\tif (unit === \"days\") return \"day\";\n\tif (unit === \"weeks\") return \"week\";\n\tif (unit === \"months\") return \"month\";\n\tif (unit === \"quarters\") return \"quarter\";\n\tif (unit === \"years\") return \"year\";\n\tif (unit !== \"second\" && unit !== \"minute\" && unit !== \"hour\" && unit !== \"day\" && unit !== \"week\" && unit !== \"month\" && unit !== \"quarter\" && unit !== \"year\") {\n\t\tthrow new RangeError(\"invalid unit\");\n\t}\n\treturn unit;\n}\n","import { invariant } from \"#packages/ecma402-abstract/utils.js\";\n/**\n* Partition a pattern into a list of literals and placeholders\n* https://tc39.es/ecma402/#sec-partitionpattern\n* @param pattern\n*/\nexport function PartitionPattern(pattern) {\n\tconst result = [];\n\tlet beginIndex = pattern.indexOf(\"{\");\n\tlet endIndex = 0;\n\tlet nextIndex = 0;\n\tconst length = pattern.length;\n\twhile (beginIndex < pattern.length && beginIndex > -1) {\n\t\tendIndex = pattern.indexOf(\"}\", beginIndex);\n\t\tinvariant(endIndex > beginIndex, `Invalid pattern ${pattern}`);\n\t\tif (beginIndex > nextIndex) {\n\t\t\tresult.push({\n\t\t\t\ttype: \"literal\",\n\t\t\t\tvalue: pattern.substring(nextIndex, beginIndex)\n\t\t\t});\n\t\t}\n\t\tresult.push({\n\t\t\ttype: pattern.substring(beginIndex + 1, endIndex),\n\t\t\tvalue: undefined\n\t\t});\n\t\tnextIndex = endIndex + 1;\n\t\tbeginIndex = pattern.indexOf(\"{\", nextIndex);\n\t}\n\tif (nextIndex < length) {\n\t\tresult.push({\n\t\t\ttype: \"literal\",\n\t\t\tvalue: pattern.substring(nextIndex, length)\n\t\t});\n\t}\n\treturn result;\n}\n","import { PartitionPattern } from \"#packages/ecma402-abstract/PartitionPattern.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nexport function MakePartsList(pattern, unit, parts) {\n\tconst patternParts = PartitionPattern(pattern);\n\tconst result = [];\n\tfor (const patternPart of patternParts) {\n\t\tif (patternPart.type === \"literal\") {\n\t\t\tresult.push({\n\t\t\t\ttype: \"literal\",\n\t\t\t\tvalue: patternPart.value\n\t\t\t});\n\t\t} else {\n\t\t\tinvariant(patternPart.type === \"0\", `Malformed pattern ${pattern}`);\n\t\t\tfor (const part of parts) {\n\t\t\t\tresult.push({\n\t\t\t\t\ttype: part.type,\n\t\t\t\t\tvalue: part.value,\n\t\t\t\t\tunit\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n}\n","import { SameValue } from \"#packages/ecma262-abstract/SameValue.js\";\nimport { ToString } from \"#packages/ecma262-abstract/ToString.js\";\nimport { Type } from \"#packages/ecma262-abstract/Type.js\";\nimport \"#packages/ecma402-abstract/types/plural-rules.js\";\nimport \"#packages/ecma402-abstract/types/relative-time.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nimport { SingularRelativeTimeUnit } from \"#packages/ecma402-abstract/RelativeTimeFormat/SingularRelativeTimeUnit.js\";\nimport { MakePartsList } from \"#packages/ecma402-abstract/RelativeTimeFormat/MakePartsList.js\";\nexport function PartitionRelativeTimePattern(rtf, value, unit, { getInternalSlots }) {\n\tinvariant(Type(value) === \"Number\", `value must be number, instead got ${typeof value}`, TypeError);\n\tinvariant(Type(unit) === \"String\", `unit must be number, instead got ${typeof value}`, TypeError);\n\tif (isNaN(value) || !isFinite(value)) {\n\t\tthrow new RangeError(`Invalid value ${value}`);\n\t}\n\tconst resolvedUnit = SingularRelativeTimeUnit(unit);\n\tconst { fields, style, numeric, pluralRules, numberFormat } = getInternalSlots(rtf);\n\tlet entry = resolvedUnit;\n\tif (style === \"short\") {\n\t\tentry = `${resolvedUnit}-short`;\n\t} else if (style === \"narrow\") {\n\t\tentry = `${resolvedUnit}-narrow`;\n\t}\n\tif (!(entry in fields)) {\n\t\tentry = resolvedUnit;\n\t}\n\tconst patterns = fields[entry];\n\tif (numeric === \"auto\") {\n\t\tif (ToString(value) in patterns) {\n\t\t\treturn [{\n\t\t\t\ttype: \"literal\",\n\t\t\t\tvalue: patterns[ToString(value)]\n\t\t\t}];\n\t\t}\n\t}\n\tlet tl = \"future\";\n\tif (SameValue(value, -0) || value < 0) {\n\t\ttl = \"past\";\n\t}\n\tconst po = patterns[tl];\n\tconst fv = typeof numberFormat.formatToParts === \"function\" ? numberFormat.formatToParts(Math.abs(value)) : \n\t// number is a part\n[{\n\t\ttype: \"literal\",\n\t\tvalue: numberFormat.format(Math.abs(value)),\n\t\tunit\n\t}];\n\tconst pr = pluralRules.select(value);\n\tconst pattern = po[pr];\n\treturn MakePartsList(pattern, resolvedUnit, fv);\n}\n","// Type-only circular import\n// eslint-disable-next-line import/no-cycle\n\nimport {type RelativeTimeFormatInternal} from '#packages/ecma402-abstract/types/relative-time.js'\n\nconst internalSlotMap = new WeakMap<\n Intl.RelativeTimeFormat,\n RelativeTimeFormatInternal\n>()\n\nexport default function getInternalSlots(\n x: Intl.RelativeTimeFormat\n): RelativeTimeFormatInternal {\n let internalSlots = internalSlotMap.get(x)\n if (!internalSlots) {\n internalSlots = Object.create(null) as RelativeTimeFormatInternal\n internalSlotMap.set(x, internalSlots)\n }\n return internalSlots\n}\n","import {ToString} from '#packages/ecma262-abstract/ToString.js'\nimport {CanonicalizeLocaleList} from '#packages/ecma402-abstract/CanonicalizeLocaleList.js'\nimport {SupportedLocales} from '#packages/ecma402-abstract/SupportedLocales.js'\nimport {\n type LocaleFieldsData,\n type RelativeTimeLocaleData,\n} from '#packages/ecma402-abstract/types/relative-time.js'\nimport {InitializeRelativeTimeFormat} from '#packages/ecma402-abstract/RelativeTimeFormat/InitializeRelativeTimeFormat.js'\nimport {PartitionRelativeTimePattern} from '#packages/ecma402-abstract/RelativeTimeFormat/PartitionRelativeTimePattern.js'\nimport getInternalSlots from '#packages/intl-relativetimeformat/get_internal_slots.js'\n\nexport default class RelativeTimeFormat {\n constructor(\n locales?: string | string[],\n options?: Intl.RelativeTimeFormatOptions\n ) {\n // test262/test/intl402/RelativeTimeFormat/constructor/constructor/newtarget-undefined.js\n // Cannot use `new.target` bc of IE11 & TS transpiles it to something else\n const newTarget =\n this && this instanceof RelativeTimeFormat ? this.constructor : void 0\n if (!newTarget) {\n throw new TypeError(\"Intl.RelativeTimeFormat must be called with 'new'\")\n }\n return InitializeRelativeTimeFormat(this, locales, options, {\n getInternalSlots,\n availableLocales: RelativeTimeFormat.availableLocales,\n relevantExtensionKeys: RelativeTimeFormat.relevantExtensionKeys,\n localeData: RelativeTimeFormat.localeData,\n getDefaultLocale: RelativeTimeFormat.getDefaultLocale,\n })\n }\n format(value: number, unit: Intl.RelativeTimeFormatUnit): string {\n if (typeof this !== 'object') {\n throw new TypeError('format was called on a non-object')\n }\n const internalSlots = getInternalSlots(this)\n if (!internalSlots.initializedRelativeTimeFormat) {\n throw new TypeError('format was called on a invalid context')\n }\n return PartitionRelativeTimePattern(\n this,\n Number(value),\n ToString(unit) as Intl.RelativeTimeFormatUnit,\n {\n getInternalSlots,\n }\n )\n .map(el => el.value)\n .join('')\n }\n formatToParts(\n value: number,\n unit: Intl.RelativeTimeFormatUnit\n ): Intl.RelativeTimeFormatPart[] {\n if (typeof this !== 'object') {\n throw new TypeError('formatToParts was called on a non-object')\n }\n const internalSlots = getInternalSlots(this)\n if (!internalSlots.initializedRelativeTimeFormat) {\n throw new TypeError('formatToParts was called on a invalid context')\n }\n return PartitionRelativeTimePattern(\n this,\n Number(value),\n ToString(unit) as Intl.RelativeTimeFormatUnit,\n {getInternalSlots}\n )\n }\n\n resolvedOptions(): Intl.ResolvedRelativeTimeFormatOptions {\n if (typeof this !== 'object') {\n throw new TypeError('resolvedOptions was called on a non-object')\n }\n const internalSlots = getInternalSlots(this)\n if (!internalSlots.initializedRelativeTimeFormat) {\n throw new TypeError('resolvedOptions was called on a invalid context')\n }\n\n // test262/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/type.js\n return {\n locale: internalSlots.locale,\n style: internalSlots.style,\n numeric: internalSlots.numeric,\n numberingSystem: internalSlots.numberingSystem,\n }\n }\n\n public static supportedLocalesOf(\n locales: string | string[],\n options?: Pick<Intl.RelativeTimeFormatOptions, 'localeMatcher'>\n ): string[] {\n return SupportedLocales(\n RelativeTimeFormat.availableLocales,\n CanonicalizeLocaleList(locales),\n options\n )\n }\n\n public static __addLocaleData(...data: RelativeTimeLocaleData[]): void {\n for (const {data: d, locale} of data) {\n const minimizedLocale = new (Intl as any).Locale(locale)\n .minimize()\n .toString()\n RelativeTimeFormat.localeData[locale] = RelativeTimeFormat.localeData[\n minimizedLocale\n ] = d\n RelativeTimeFormat.availableLocales.add(minimizedLocale)\n RelativeTimeFormat.availableLocales.add(locale)\n if (!RelativeTimeFormat.__defaultLocale) {\n RelativeTimeFormat.__defaultLocale = minimizedLocale\n }\n }\n }\n static localeData: Record<string, LocaleFieldsData> = {}\n private static availableLocales = new Set<string>()\n private static __defaultLocale = ''\n private static getDefaultLocale() {\n return RelativeTimeFormat.__defaultLocale\n }\n private static relevantExtensionKeys = ['nu']\n public static polyfilled = true\n}\n\ntry {\n // IE11 does not have Symbol\n if (typeof Symbol !== 'undefined') {\n Object.defineProperty(RelativeTimeFormat.prototype, Symbol.toStringTag, {\n value: 'Intl.RelativeTimeFormat',\n writable: false,\n enumerable: false,\n configurable: true,\n })\n }\n\n // https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/length.js\n Object.defineProperty(RelativeTimeFormat.prototype.constructor, 'length', {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n // https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/length.js\n Object.defineProperty(RelativeTimeFormat.supportedLocalesOf, 'length', {\n value: 1,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n} catch {\n // Meta fix so we're test262-compliant, not important\n}\n"],"x_google_ignoreList":[6],"mappings":";;;;;AAGA,SAAgB,SAAS,GAAG;CAC3B,IAAI,OAAO,MAAM,UAChB,MAAM,UAAU,2CAA2C;CAE5D,OAAO,OAAO,CAAC;AAChB;;;;;;;ACJA,SAAgB,uBAAuB,SAAS;CAE/C,OAAO,KAAK,oBAAoB,OAAO;AACxC;;;;;;ACJA,SAAgB,SAAS,KAAK;CAC7B,IAAI,OAAO,MACV,MAAM,IAAI,UAAU,8CAA8C;CAEnE,OAAO,OAAO,GAAG;AAClB;;;;;;;;;;;ACCA,SAAgB,UAAU,MAAM,MAAM,MAAM,QAAQ,UAAU;CAC7D,IAAI,OAAO,SAAS,UACnB,MAAM,IAAI,UAAU,2BAA2B;CAEhD,IAAI,QAAQ,KAAK;CACjB,IAAI,UAAU,KAAA,GAAW;EACxB,IAAI,SAAS,aAAa,SAAS,UAClC,MAAM,IAAI,UAAU,cAAc;EAEnC,IAAI,SAAS,WACZ,QAAQ,QAAQ,KAAK;EAEtB,IAAI,SAAS,UACZ,QAAQ,SAAS,KAAK;EAEvB,IAAI,WAAW,KAAA,KAAa,CAAC,OAAO,QAAQ,QAAQ,OAAO,KAAK,EAAE,QACjE,MAAM,IAAI,WAAW,GAAG,MAAM,iBAAiB,OAAO,KAAK,IAAI,GAAG;EAEnE,OAAO;CACR;CACA,OAAO;AACR;;;;;;;;;ACrBA,SAAgB,iBAAiB,kBAAkB,kBAAkB,SAAS;CAC7E,IAAI,UAAU;CACd,IAAI,YAAY,KAAA,GAAW;EAC1B,UAAU,SAAS,OAAO;EAC1B,UAAU,UAAU,SAAS,iBAAiB,UAAU,CAAC,UAAU,UAAU,GAAG,UAAU;CAC3F;CACA,IAAI,YAAY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":[],"sources":["../../ecma262-abstract/ToString.js","../../ecma402-abstract/CanonicalizeLocaleList.js","../../ecma262-abstract/ToObject.js","../../ecma402-abstract/GetOption.js","../../ecma402-abstract/SupportedLocales.js","../../ecma402-abstract/CoerceOptionsToObject.js","../../../node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js","../../ecma402-abstract/utils.js","../../ecma402-abstract/RelativeTimeFormat/InitializeRelativeTimeFormat.js","../../ecma262-abstract/SameValue.js","../../ecma262-abstract/Type.js","../../ecma402-abstract/RelativeTimeFormat/SingularRelativeTimeUnit.js","../../ecma402-abstract/PartitionPattern.js","../../ecma402-abstract/RelativeTimeFormat/MakePartsList.js","../../ecma402-abstract/RelativeTimeFormat/PartitionRelativeTimePattern.js","../get_internal_slots.ts","../index.ts"],"sourcesContent":["/**\n* https://tc39.es/ecma262/#sec-tostring\n*/\nexport function ToString(o) {\n\tif (typeof o === \"symbol\") {\n\t\tthrow TypeError(\"Cannot convert a Symbol value to a string\");\n\t}\n\treturn String(o);\n}\n","/**\n* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist\n* @param locales\n*/\nexport function CanonicalizeLocaleList(locales) {\n\t// TODO\n\treturn Intl.getCanonicalLocales(locales);\n}\n","/**\n* https://tc39.es/ecma262/#sec-toobject\n*/\nexport function ToObject(arg) {\n\tif (arg == null) {\n\t\tthrow new TypeError(\"undefined/null cannot be converted to object\");\n\t}\n\treturn Object(arg);\n}\n","import { ToString } from \"#packages/ecma262-abstract/ToString.js\";\n/**\n* https://tc39.es/ecma402/#sec-getoption\n* @param opts\n* @param prop\n* @param type\n* @param values\n* @param fallback\n*/\nexport function GetOption(opts, prop, type, values, fallback) {\n\tif (typeof opts !== \"object\") {\n\t\tthrow new TypeError(\"Options must be an object\");\n\t}\n\tlet value = opts[prop];\n\tif (value !== undefined) {\n\t\tif (type !== \"boolean\" && type !== \"string\") {\n\t\t\tthrow new TypeError(\"invalid type\");\n\t\t}\n\t\tif (type === \"boolean\") {\n\t\t\tvalue = Boolean(value);\n\t\t}\n\t\tif (type === \"string\") {\n\t\t\tvalue = ToString(value);\n\t\t}\n\t\tif (values !== undefined && !values.filter((val) => val == value).length) {\n\t\t\tthrow new RangeError(`${value} is not within ${values.join(\", \")}`);\n\t\t}\n\t\treturn value;\n\t}\n\treturn fallback;\n}\n","import { LookupSupportedLocales } from \"@formatjs/intl-localematcher\";\nimport { ToObject } from \"#packages/ecma262-abstract/ToObject.js\";\nimport { GetOption } from \"#packages/ecma402-abstract/GetOption.js\";\n/**\n* https://tc39.es/ecma402/#sec-supportedlocales\n* @param availableLocales\n* @param requestedLocales\n* @param options\n*/\nexport function SupportedLocales(availableLocales, requestedLocales, options) {\n\tlet matcher = \"best fit\";\n\tif (options !== undefined) {\n\t\toptions = ToObject(options);\n\t\tmatcher = GetOption(options, \"localeMatcher\", \"string\", [\"lookup\", \"best fit\"], \"best fit\");\n\t}\n\tif (matcher === \"best fit\") {\n\t\treturn LookupSupportedLocales(Array.from(availableLocales), requestedLocales);\n\t}\n\treturn LookupSupportedLocales(Array.from(availableLocales), requestedLocales);\n}\n","import { ToObject } from \"#packages/ecma262-abstract/ToObject.js\";\n/**\n* https://tc39.es/ecma402/#sec-coerceoptionstoobject\n* @param options\n* @returns\n*/\nexport function CoerceOptionsToObject(options) {\n\tif (typeof options === \"undefined\") {\n\t\treturn Object.create(null);\n\t}\n\treturn ToObject(options);\n}\n","//#region packages/fast-memoize/index.ts\nfunction memoize(fn, options) {\n\tconst cache = options && options.cache ? options.cache : cacheDefault;\n\tconst serializer = options && options.serializer ? options.serializer : serializerDefault;\n\treturn (options && options.strategy ? options.strategy : strategyDefault)(fn, {\n\t\tcache,\n\t\tserializer\n\t});\n}\nfunction isPrimitive(value) {\n\treturn value == null || typeof value === \"number\" || typeof value === \"boolean\";\n}\nfunction monadic(fn, cache, serializer, arg) {\n\tconst cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.call(this, arg);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n\tconst args = Array.prototype.slice.call(arguments, 3);\n\tconst cacheKey = serializer(args);\n\tlet computedValue = cache.get(cacheKey);\n\tif (typeof computedValue === \"undefined\") {\n\t\tcomputedValue = fn.apply(this, args);\n\t\tcache.set(cacheKey, computedValue);\n\t}\n\treturn computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n\treturn strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n\tconst strategy = fn.length === 1 ? monadic : variadic;\n\treturn assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n\treturn assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n\treturn assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\nconst serializerDefault = function() {\n\treturn JSON.stringify(arguments);\n};\nvar ObjectWithoutPrototypeCache = class {\n\tconstructor() {\n\t\tthis.cache = Object.create(null);\n\t}\n\tget(key) {\n\t\treturn this.cache[key];\n\t}\n\tset(key, value) {\n\t\tthis.cache[key] = value;\n\t}\n};\nconst cacheDefault = { create: function create() {\n\treturn new ObjectWithoutPrototypeCache();\n} };\nconst strategies = {\n\tvariadic: strategyVariadic,\n\tmonadic: strategyMonadic\n};\n//#endregion\nexport { memoize, strategies };\n\n//# sourceMappingURL=index.js.map","import { memoize, strategies } from \"@formatjs/fast-memoize\";\nexport function repeat(s, times) {\n\tif (typeof s.repeat === \"function\") {\n\t\treturn s.repeat(times);\n\t}\n\tconst arr = Array.from({ length: times });\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tarr[i] = s;\n\t}\n\treturn arr.join(\"\");\n}\nexport function setInternalSlot(map, pl, field, value) {\n\tif (!map.get(pl)) {\n\t\tmap.set(pl, Object.create(null));\n\t}\n\tconst slots = map.get(pl);\n\tslots[field] = value;\n}\nexport function getInternalSlot(map, pl, field) {\n\treturn getMultiInternalSlots(map, pl, field)[field];\n}\nexport function getMultiInternalSlots(map, pl, ...fields) {\n\tconst slots = map.get(pl);\n\tif (!slots) {\n\t\tthrow new TypeError(`${pl} InternalSlot has not been initialized`);\n\t}\n\treturn fields.reduce((all, f) => {\n\t\tall[f] = slots[f];\n\t\treturn all;\n\t}, Object.create(null));\n}\nexport function isLiteralPart(patternPart) {\n\treturn patternPart.type === \"literal\";\n}\n/*\n17 ECMAScript Standard Built-in Objects:\nEvery built-in Function object, including constructors, that is not\nidentified as an anonymous function has a name property whose value\nis a String.\n\nUnless otherwise specified, the name property of a built-in Function\nobject, if it exists, has the attributes { [[Writable]]: false,\n[[Enumerable]]: false, [[Configurable]]: true }.\n*/\nexport function defineProperty(target, name, { value }) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: false,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport function ensureIntl() {\n\tif (typeof Intl === \"undefined\") {\n\t\tObject.defineProperty(globalThis, \"Intl\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t\tvalue: {}\n\t\t});\n\t}\n\treturn Intl;\n}\n/**\n* 7.3.5 CreateDataProperty\n* @param target\n* @param name\n* @param value\n*/\nexport function createDataProperty(target, name, value) {\n\tObject.defineProperty(target, name, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\twritable: true,\n\t\tvalue\n\t});\n}\nexport function invariant(condition, message, Err = Error) {\n\tif (!condition) {\n\t\tthrow new Err(message);\n\t}\n}\nexport const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });\nexport const createMemoizedPluralRules = memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });\nexport const createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });\n","import { CanonicalizeLocaleList } from \"#packages/ecma402-abstract/CanonicalizeLocaleList.js\";\nimport { CoerceOptionsToObject } from \"#packages/ecma402-abstract/CoerceOptionsToObject.js\";\nimport { GetOption } from \"#packages/ecma402-abstract/GetOption.js\";\nimport \"#packages/ecma402-abstract/types/relative-time.js\";\nimport { createMemoizedNumberFormat, createMemoizedPluralRules, invariant } from \"#packages/ecma402-abstract/utils.js\";\nimport { ResolveLocale } from \"@formatjs/intl-localematcher\";\nconst NUMBERING_SYSTEM_REGEX = /^[a-z0-9]{3,8}(-[a-z0-9]{3,8})*$/i;\nexport function InitializeRelativeTimeFormat(rtf, locales, options, { getInternalSlots, availableLocales, relevantExtensionKeys, localeData, getDefaultLocale }) {\n\tconst internalSlots = getInternalSlots(rtf);\n\tinternalSlots.initializedRelativeTimeFormat = true;\n\tconst requestedLocales = CanonicalizeLocaleList(locales);\n\tconst opt = Object.create(null);\n\tconst opts = CoerceOptionsToObject(options);\n\tconst matcher = GetOption(opts, \"localeMatcher\", \"string\", [\"best fit\", \"lookup\"], \"best fit\");\n\topt.localeMatcher = matcher;\n\tconst numberingSystem = GetOption(\n\t\topts,\n\t\t// @ts-expect-error TS option is wack\n\t\t\"numberingSystem\",\n\t\t\"string\",\n\t\tundefined,\n\t\tundefined\n\t);\n\tif (numberingSystem !== undefined) {\n\t\tif (!NUMBERING_SYSTEM_REGEX.test(numberingSystem)) {\n\t\t\tthrow new RangeError(`Invalid numbering system ${numberingSystem}`);\n\t\t}\n\t}\n\topt.nu = numberingSystem;\n\tconst r = ResolveLocale(availableLocales, requestedLocales, opt, relevantExtensionKeys, localeData, getDefaultLocale);\n\tconst { locale, nu } = r;\n\tinternalSlots.locale = locale;\n\tinternalSlots.style = GetOption(opts, \"style\", \"string\", [\n\t\t\"long\",\n\t\t\"narrow\",\n\t\t\"short\"\n\t], \"long\");\n\tinternalSlots.numeric = GetOption(opts, \"numeric\", \"string\", [\"always\", \"auto\"], \"always\");\n\tconst fields = localeData[r.dataLocale];\n\tinvariant(!!fields, `Missing locale data for ${r.dataLocale}`);\n\tinternalSlots.fields = fields;\n\tinternalSlots.numberFormat = createMemoizedNumberFormat(locales, { numberingSystem: nu });\n\tinternalSlots.pluralRules = createMemoizedPluralRules(locales);\n\tinternalSlots.numberingSystem = nu;\n\treturn rtf;\n}\n","/**\n* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue\n*/\nexport function SameValue(x, y) {\n\tif (Object.is) {\n\t\treturn Object.is(x, y);\n\t}\n\tif (x === y) {\n\t\treturn x !== 0 || 1 / x === 1 / y;\n\t}\n\treturn x !== x && y !== y;\n}\n","/**\n* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type\n*/\nexport function Type(x) {\n\tif (x === null) {\n\t\treturn \"Null\";\n\t}\n\tif (typeof x === \"undefined\") {\n\t\treturn \"Undefined\";\n\t}\n\tif (typeof x === \"function\" || typeof x === \"object\") {\n\t\treturn \"Object\";\n\t}\n\tif (typeof x === \"number\") {\n\t\treturn \"Number\";\n\t}\n\tif (typeof x === \"boolean\") {\n\t\treturn \"Boolean\";\n\t}\n\tif (typeof x === \"string\") {\n\t\treturn \"String\";\n\t}\n\tif (typeof x === \"symbol\") {\n\t\treturn \"Symbol\";\n\t}\n\tif (typeof x === \"bigint\") {\n\t\treturn \"BigInt\";\n\t}\n}\n","import { Type } from \"#packages/ecma262-abstract/Type.js\";\nimport \"#packages/ecma402-abstract/types/relative-time.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\n/**\n* https://tc39.es/proposal-intl-relative-time/#sec-singularrelativetimeunit\n* @param unit\n*/\nexport function SingularRelativeTimeUnit(unit) {\n\tinvariant(Type(unit) === \"String\", \"unit must be a string\");\n\tif (unit === \"seconds\") return \"second\";\n\tif (unit === \"minutes\") return \"minute\";\n\tif (unit === \"hours\") return \"hour\";\n\tif (unit === \"days\") return \"day\";\n\tif (unit === \"weeks\") return \"week\";\n\tif (unit === \"months\") return \"month\";\n\tif (unit === \"quarters\") return \"quarter\";\n\tif (unit === \"years\") return \"year\";\n\tif (unit !== \"second\" && unit !== \"minute\" && unit !== \"hour\" && unit !== \"day\" && unit !== \"week\" && unit !== \"month\" && unit !== \"quarter\" && unit !== \"year\") {\n\t\tthrow new RangeError(\"invalid unit\");\n\t}\n\treturn unit;\n}\n","import { invariant } from \"#packages/ecma402-abstract/utils.js\";\n/**\n* Partition a pattern into a list of literals and placeholders\n* https://tc39.es/ecma402/#sec-partitionpattern\n* @param pattern\n*/\nexport function PartitionPattern(pattern) {\n\tconst result = [];\n\tlet beginIndex = pattern.indexOf(\"{\");\n\tlet endIndex = 0;\n\tlet nextIndex = 0;\n\tconst length = pattern.length;\n\twhile (beginIndex < pattern.length && beginIndex > -1) {\n\t\tendIndex = pattern.indexOf(\"}\", beginIndex);\n\t\tinvariant(endIndex > beginIndex, `Invalid pattern ${pattern}`);\n\t\tif (beginIndex > nextIndex) {\n\t\t\tresult.push({\n\t\t\t\ttype: \"literal\",\n\t\t\t\tvalue: pattern.substring(nextIndex, beginIndex)\n\t\t\t});\n\t\t}\n\t\tresult.push({\n\t\t\ttype: pattern.substring(beginIndex + 1, endIndex),\n\t\t\tvalue: undefined\n\t\t});\n\t\tnextIndex = endIndex + 1;\n\t\tbeginIndex = pattern.indexOf(\"{\", nextIndex);\n\t}\n\tif (nextIndex < length) {\n\t\tresult.push({\n\t\t\ttype: \"literal\",\n\t\t\tvalue: pattern.substring(nextIndex, length)\n\t\t});\n\t}\n\treturn result;\n}\n","import { PartitionPattern } from \"#packages/ecma402-abstract/PartitionPattern.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nexport function MakePartsList(pattern, unit, parts) {\n\tconst patternParts = PartitionPattern(pattern);\n\tconst result = [];\n\tfor (const patternPart of patternParts) {\n\t\tif (patternPart.type === \"literal\") {\n\t\t\tresult.push({\n\t\t\t\ttype: \"literal\",\n\t\t\t\tvalue: patternPart.value\n\t\t\t});\n\t\t} else {\n\t\t\tinvariant(patternPart.type === \"0\", `Malformed pattern ${pattern}`);\n\t\t\tfor (const part of parts) {\n\t\t\t\tresult.push({\n\t\t\t\t\ttype: part.type,\n\t\t\t\t\tvalue: part.value,\n\t\t\t\t\tunit\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n}\n","import { SameValue } from \"#packages/ecma262-abstract/SameValue.js\";\nimport { ToString } from \"#packages/ecma262-abstract/ToString.js\";\nimport { Type } from \"#packages/ecma262-abstract/Type.js\";\nimport \"#packages/ecma402-abstract/types/plural-rules.js\";\nimport \"#packages/ecma402-abstract/types/relative-time.js\";\nimport { invariant } from \"#packages/ecma402-abstract/utils.js\";\nimport { SingularRelativeTimeUnit } from \"#packages/ecma402-abstract/RelativeTimeFormat/SingularRelativeTimeUnit.js\";\nimport { MakePartsList } from \"#packages/ecma402-abstract/RelativeTimeFormat/MakePartsList.js\";\nexport function PartitionRelativeTimePattern(rtf, value, unit, { getInternalSlots }) {\n\tinvariant(Type(value) === \"Number\", `value must be number, instead got ${typeof value}`, TypeError);\n\tinvariant(Type(unit) === \"String\", `unit must be number, instead got ${typeof value}`, TypeError);\n\tif (isNaN(value) || !isFinite(value)) {\n\t\tthrow new RangeError(`Invalid value ${value}`);\n\t}\n\tconst resolvedUnit = SingularRelativeTimeUnit(unit);\n\tconst { fields, style, numeric, pluralRules, numberFormat } = getInternalSlots(rtf);\n\tlet entry = resolvedUnit;\n\tif (style === \"short\") {\n\t\tentry = `${resolvedUnit}-short`;\n\t} else if (style === \"narrow\") {\n\t\tentry = `${resolvedUnit}-narrow`;\n\t}\n\tif (!(entry in fields)) {\n\t\tentry = resolvedUnit;\n\t}\n\tconst patterns = fields[entry];\n\tif (numeric === \"auto\") {\n\t\tif (ToString(value) in patterns) {\n\t\t\treturn [{\n\t\t\t\ttype: \"literal\",\n\t\t\t\tvalue: patterns[ToString(value)]\n\t\t\t}];\n\t\t}\n\t}\n\tlet tl = \"future\";\n\tif (SameValue(value, -0) || value < 0) {\n\t\ttl = \"past\";\n\t}\n\tconst po = patterns[tl];\n\tconst fv = typeof numberFormat.formatToParts === \"function\" ? numberFormat.formatToParts(Math.abs(value)) : \n\t// number is a part\n[{\n\t\ttype: \"literal\",\n\t\tvalue: numberFormat.format(Math.abs(value)),\n\t\tunit\n\t}];\n\tconst pr = pluralRules.select(value);\n\tconst pattern = po[pr];\n\treturn MakePartsList(pattern, resolvedUnit, fv);\n}\n","// Type-only circular import\n// eslint-disable-next-line import/no-cycle\n\nimport {type RelativeTimeFormatInternal} from '#packages/ecma402-abstract/types/relative-time.js'\n\nconst internalSlotMap = new WeakMap<\n Intl.RelativeTimeFormat,\n RelativeTimeFormatInternal\n>()\n\nexport default function getInternalSlots(\n x: Intl.RelativeTimeFormat\n): RelativeTimeFormatInternal {\n let internalSlots = internalSlotMap.get(x)\n if (!internalSlots) {\n internalSlots = Object.create(null) as RelativeTimeFormatInternal\n internalSlotMap.set(x, internalSlots)\n }\n return internalSlots\n}\n","import {ToString} from '#packages/ecma262-abstract/ToString.js'\nimport {CanonicalizeLocaleList} from '#packages/ecma402-abstract/CanonicalizeLocaleList.js'\nimport {SupportedLocales} from '#packages/ecma402-abstract/SupportedLocales.js'\nimport {\n type LocaleFieldsData,\n type RelativeTimeLocaleData,\n} from '#packages/ecma402-abstract/types/relative-time.js'\nimport {InitializeRelativeTimeFormat} from '#packages/ecma402-abstract/RelativeTimeFormat/InitializeRelativeTimeFormat.js'\nimport {PartitionRelativeTimePattern} from '#packages/ecma402-abstract/RelativeTimeFormat/PartitionRelativeTimePattern.js'\nimport getInternalSlots from '#packages/intl-relativetimeformat/get_internal_slots.js'\n\nexport default class RelativeTimeFormat {\n constructor(\n locales?: string | string[],\n options?: Intl.RelativeTimeFormatOptions\n ) {\n // test262/test/intl402/RelativeTimeFormat/constructor/constructor/newtarget-undefined.js\n // Cannot use `new.target` bc of IE11 & TS transpiles it to something else\n const newTarget =\n this && this instanceof RelativeTimeFormat ? this.constructor : void 0\n if (!newTarget) {\n throw new TypeError(\"Intl.RelativeTimeFormat must be called with 'new'\")\n }\n return InitializeRelativeTimeFormat(this, locales, options, {\n getInternalSlots,\n availableLocales: RelativeTimeFormat.availableLocales,\n relevantExtensionKeys: RelativeTimeFormat.relevantExtensionKeys,\n localeData: RelativeTimeFormat.localeData,\n getDefaultLocale: RelativeTimeFormat.getDefaultLocale,\n })\n }\n format(value: number, unit: Intl.RelativeTimeFormatUnit): string {\n if (typeof this !== 'object') {\n throw new TypeError('format was called on a non-object')\n }\n const internalSlots = getInternalSlots(this)\n if (!internalSlots.initializedRelativeTimeFormat) {\n throw new TypeError('format was called on a invalid context')\n }\n return PartitionRelativeTimePattern(\n this,\n Number(value),\n ToString(unit) as Intl.RelativeTimeFormatUnit,\n {\n getInternalSlots,\n }\n )\n .map(el => el.value)\n .join('')\n }\n formatToParts(\n value: number,\n unit: Intl.RelativeTimeFormatUnit\n ): Intl.RelativeTimeFormatPart[] {\n if (typeof this !== 'object') {\n throw new TypeError('formatToParts was called on a non-object')\n }\n const internalSlots = getInternalSlots(this)\n if (!internalSlots.initializedRelativeTimeFormat) {\n throw new TypeError('formatToParts was called on a invalid context')\n }\n return PartitionRelativeTimePattern(\n this,\n Number(value),\n ToString(unit) as Intl.RelativeTimeFormatUnit,\n {getInternalSlots}\n )\n }\n\n resolvedOptions(): Intl.ResolvedRelativeTimeFormatOptions {\n if (typeof this !== 'object') {\n throw new TypeError('resolvedOptions was called on a non-object')\n }\n const internalSlots = getInternalSlots(this)\n if (!internalSlots.initializedRelativeTimeFormat) {\n throw new TypeError('resolvedOptions was called on a invalid context')\n }\n\n // test262/test/intl402/RelativeTimeFormat/prototype/resolvedOptions/type.js\n return {\n locale: internalSlots.locale,\n style: internalSlots.style,\n numeric: internalSlots.numeric,\n numberingSystem: internalSlots.numberingSystem,\n }\n }\n\n public static supportedLocalesOf(\n locales: string | string[],\n options?: Pick<Intl.RelativeTimeFormatOptions, 'localeMatcher'>\n ): string[] {\n return SupportedLocales(\n RelativeTimeFormat.availableLocales,\n CanonicalizeLocaleList(locales),\n options\n )\n }\n\n public static __addLocaleData(...data: RelativeTimeLocaleData[]): void {\n for (const {data: d, locale} of data) {\n const minimizedLocale = new (Intl as any).Locale(locale)\n .minimize()\n .toString()\n RelativeTimeFormat.localeData[locale] = RelativeTimeFormat.localeData[\n minimizedLocale\n ] = d\n RelativeTimeFormat.availableLocales.add(minimizedLocale)\n RelativeTimeFormat.availableLocales.add(locale)\n if (!RelativeTimeFormat.__defaultLocale) {\n RelativeTimeFormat.__defaultLocale = minimizedLocale\n }\n }\n }\n static localeData: Record<string, LocaleFieldsData> = {}\n private static availableLocales = new Set<string>()\n private static __defaultLocale = ''\n private static getDefaultLocale() {\n return RelativeTimeFormat.__defaultLocale\n }\n private static relevantExtensionKeys = ['nu']\n public static polyfilled = true\n}\n\ntry {\n // IE11 does not have Symbol\n if (typeof Symbol !== 'undefined') {\n Object.defineProperty(RelativeTimeFormat.prototype, Symbol.toStringTag, {\n value: 'Intl.RelativeTimeFormat',\n writable: false,\n enumerable: false,\n configurable: true,\n })\n }\n\n // https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/length.js\n Object.defineProperty(RelativeTimeFormat.prototype.constructor, 'length', {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n // https://github.com/tc39/test262/blob/master/test/intl402/RelativeTimeFormat/constructor/supportedLocalesOf/length.js\n Object.defineProperty(RelativeTimeFormat.supportedLocalesOf, 'length', {\n value: 1,\n writable: false,\n enumerable: false,\n configurable: true,\n })\n} catch {\n // Meta fix so we're test262-compliant, not important\n}\n"],"x_google_ignoreList":[6],"mappings":";;;;;AAGA,SAAgB,SAAS,GAAG;CAC3B,IAAI,OAAO,MAAM,UAChB,MAAM,UAAU,2CAA2C;CAE5D,OAAO,OAAO,CAAC;AAChB;;;;;;;ACJA,SAAgB,uBAAuB,SAAS;CAE/C,OAAO,KAAK,oBAAoB,OAAO;AACxC;;;;;;ACJA,SAAgB,SAAS,KAAK;CAC7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C9B,OACF;CACF;CAEA,OAAc,gBAAgB,GAAG,MAAsC;EACrE,KAAK,MAAM,EAAC,MAAM,GAAG,YAAW,MAAM;GACpC,MAAM,kBAAkB,IAAK,KAAa,OAAO,MAAM,CAAC,CACrD,SAAS,CAAC,CACV,SAAS;GACZ,mBAAmB,WAAW,UAAU,mBAAmB,WACzD,mBACE;GACJ,mBAAmB,iBAAiB,IAAI,eAAe;GACvD,mBAAmB,iBAAiB,IAAI,MAAM;GAC9C,IAAI,CAAC,mBAAmB,iBACtB,mBAAmB,kBAAkB;EAEzC;CACF;;oBACsD,CAAC;;;0CACrB,IAAI,IAAY;;;yBACjB;;CACjC,OAAe,mBAAmB;EAChC,OAAO,mBAAmB;CAC5B;;+BACuC,CAAC,IAAI;;;oBACjB;;AAC7B;AAEA,IAAI;CAEF,IAAI,OAAO,WAAW,aACpB,OAAO,eAAe,mBAAmB,WAAW,OAAO,aAAa;EACtE,OAAO;EACP,UAAU;EACV,YAAY;EACZ,cAAc;CAChB,CAAC;CAIH,OAAO,eAAe,mBAAmB,UAAU,aAAa,UAAU;EACxE,OAAO;EACP,UAAU;EACV,YAAY;EACZ,cAAc;CAChB,CAAC;CAED,OAAO,eAAe,mBAAmB,oBAAoB,UAAU;EACrE,OAAO;EACP,UAAU;EACV,YAAY;EACZ,cAAc;CAChB,CAAC;AACH,QAAQ,CAER"}
|
package/locale-data/ar-BH.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-DJ.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-EG.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-ER.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-IL.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-IQ.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-JO.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-KM.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-KW.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-LB.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-MR.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-OM.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-PS.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-QA.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-SA.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-SD.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-SO.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-SS.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-SY.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-TD.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/ar-YE.js
CHANGED
|
@@ -250,7 +250,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
"nu": [
|
|
253
|
-
"arab"
|
|
253
|
+
"arab",
|
|
254
|
+
"latn"
|
|
254
255
|
],
|
|
255
256
|
"quarter": {
|
|
256
257
|
"-1": "الربع الأخير",
|
|
@@ -751,7 +752,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
"nu": [
|
|
754
|
-
"arab"
|
|
755
|
+
"arab",
|
|
756
|
+
"latn"
|
|
755
757
|
],
|
|
756
758
|
"quarter": {
|
|
757
759
|
"-1": "الربع الأخير",
|
package/locale-data/as.js
CHANGED
|
@@ -154,7 +154,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
156
|
"nu": [
|
|
157
|
-
"beng"
|
|
157
|
+
"beng",
|
|
158
|
+
"latn"
|
|
158
159
|
],
|
|
159
160
|
"quarter": {
|
|
160
161
|
"-1": "যোৱা তিনি মাহ",
|
|
@@ -463,7 +464,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
463
464
|
}
|
|
464
465
|
},
|
|
465
466
|
"nu": [
|
|
466
|
-
"beng"
|
|
467
|
+
"beng",
|
|
468
|
+
"latn"
|
|
467
469
|
],
|
|
468
470
|
"quarter": {
|
|
469
471
|
"-1": "যোৱা তিনি মাহ",
|
|
@@ -124,7 +124,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
"nu": [
|
|
127
|
-
"arabext"
|
|
127
|
+
"arabext",
|
|
128
|
+
"latn"
|
|
128
129
|
],
|
|
129
130
|
"quarter": {
|
|
130
131
|
"-1": "last quarter",
|
|
@@ -379,7 +380,8 @@ if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData ==
|
|
|
379
380
|
}
|
|
380
381
|
},
|
|
381
382
|
"nu": [
|
|
382
|
-
"arabext"
|
|
383
|
+
"arabext",
|
|
384
|
+
"latn"
|
|
383
385
|
],
|
|
384
386
|
"quarter": {
|
|
385
387
|
"-1": "last quarter",
|