@formatjs/intl-listformat 5.0.9 → 5.0.13
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.d.ts +25 -25
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/lib/index.d.ts +25 -25
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/package.json +2 -2
- package/polyfill.iife.js +34 -20
- package/polyfill-locales.js +0 -1135
package/index.d.ts
CHANGED
|
@@ -8,45 +8,45 @@ export interface IntlListFormatOptions {
|
|
|
8
8
|
*/
|
|
9
9
|
localeMatcher?: 'best fit' | 'lookup';
|
|
10
10
|
/**
|
|
11
|
-
* The format of output message.
|
|
12
|
-
*
|
|
13
|
-
* -
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* The format of output message.
|
|
12
|
+
* Possible values are :
|
|
13
|
+
* - "conjunction" that stands for "and"-based lists (default, e.g., "A, B, and C")
|
|
14
|
+
* - "disjunction" that stands for "or"-based lists (e.g., "A, B, or C").
|
|
15
|
+
* - "unit" stands for lists of values with units (e.g., "5 pounds, 12 ounces").
|
|
16
16
|
*/
|
|
17
17
|
type?: 'conjunction' | 'disjunction' | 'unit';
|
|
18
18
|
/**
|
|
19
|
-
* The length of the
|
|
20
|
-
*
|
|
21
|
-
* - "
|
|
22
|
-
* -
|
|
23
|
-
*
|
|
19
|
+
* The length of the formatted message.
|
|
20
|
+
* Possible values are:
|
|
21
|
+
* - "long" (default, e.g., "A, B, and C");
|
|
22
|
+
* - "short" (e.g., "A, B, C"), or
|
|
23
|
+
* - "narrow" (e.g., "A B C").
|
|
24
|
+
* When style is "short" or "narrow", "unit" is the only allowed value for the type option.
|
|
24
25
|
*/
|
|
25
26
|
style?: 'long' | 'short' | 'narrow';
|
|
26
27
|
}
|
|
27
28
|
export interface ResolvedIntlListFormatOptions {
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* the key-value pairs that were requested and are
|
|
33
|
-
* supported for this locale are included in locale.
|
|
30
|
+
* A string with a BCP 47 language tag, or an array of such strings.
|
|
31
|
+
* For the general form and interpretation of the locales argument,
|
|
32
|
+
* see the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) page.
|
|
34
33
|
*/
|
|
35
34
|
locale: string;
|
|
36
35
|
/**
|
|
37
|
-
* The format of output message.
|
|
38
|
-
*
|
|
39
|
-
* -
|
|
40
|
-
*
|
|
41
|
-
*
|
|
36
|
+
* The format of output message.
|
|
37
|
+
* Possible values are :
|
|
38
|
+
* - "conjunction" that stands for "and"-based lists (default, e.g., "A, B, and C")
|
|
39
|
+
* - "disjunction" that stands for "or"-based lists (e.g., "A, B, or C").
|
|
40
|
+
* - "unit" stands for lists of values with units (e.g., "5 pounds, 12 ounces").
|
|
42
41
|
*/
|
|
43
42
|
type: 'conjunction' | 'disjunction' | 'unit';
|
|
44
43
|
/**
|
|
45
|
-
* The length of the
|
|
46
|
-
*
|
|
47
|
-
* - "
|
|
48
|
-
* -
|
|
49
|
-
*
|
|
44
|
+
* The length of the formatted message.
|
|
45
|
+
* Possible values are:
|
|
46
|
+
* - "long" (default, e.g., "A, B, and C");
|
|
47
|
+
* - "short" (e.g., "A, B, C"), or
|
|
48
|
+
* - "narrow" (e.g., "A B C").
|
|
49
|
+
* When style is "short" or "narrow", "unit" is the only allowed value for the type option.
|
|
50
50
|
*/
|
|
51
51
|
style: 'long' | 'short' | 'narrow';
|
|
52
52
|
}
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-listformat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAKrB,qBAAqB,EAKrB,WAAW,EAGZ,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-listformat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAKrB,qBAAqB,EAKrB,WAAW,EAGZ,MAAM,4BAA4B,CAAA;AAEnC,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAA;IACrC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,MAAM,CAAA;IAC7C;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;CACpC;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;OAMG;IACH,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,MAAM,CAAA;IAC5C;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;CACnC;AAED,oBAAY,IAAI,GAAG,WAAW,GAAG,WAAW,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AA6GD,MAAM,CAAC,OAAO,OAAO,UAAU;gBACjB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,qBAAqB;IAiFxE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM;IAgBlC,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE;IAiBzC,eAAe,IAAI,6BAA6B;WASlC,kBAAkB,CAC9B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,eAAe,CAAC;WAU1C,eAAe,CAAC,GAAG,IAAI,EAAE,qBAAqB,EAAE;IAa9D,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAAC,CAAK;IACzE,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAoB;IACnD,OAAO,CAAC,MAAM,CAAC,eAAe,CAAK;IACnC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAG/B,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAK;IACzC,OAAc,UAAU,UAAO;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAG1C;CACJ"}
|
package/index.js
CHANGED
|
@@ -95,7 +95,7 @@ var ListFormat = /** @class */ (function () {
|
|
|
95
95
|
ecma402_abstract_1.setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, 'initializedListFormat', true);
|
|
96
96
|
var requestedLocales = ecma402_abstract_1.CanonicalizeLocaleList(locales);
|
|
97
97
|
var opt = Object.create(null);
|
|
98
|
-
var opts =
|
|
98
|
+
var opts = ecma402_abstract_1.GetOptionsObject(options);
|
|
99
99
|
var matcher = ecma402_abstract_1.GetOption(opts, 'localeMatcher', 'string', ['best fit', 'lookup'], 'best fit');
|
|
100
100
|
opt.localeMatcher = matcher;
|
|
101
101
|
var localeData = ListFormat.localeData;
|
package/lib/index.d.ts
CHANGED
|
@@ -8,45 +8,45 @@ export interface IntlListFormatOptions {
|
|
|
8
8
|
*/
|
|
9
9
|
localeMatcher?: 'best fit' | 'lookup';
|
|
10
10
|
/**
|
|
11
|
-
* The format of output message.
|
|
12
|
-
*
|
|
13
|
-
* -
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* The format of output message.
|
|
12
|
+
* Possible values are :
|
|
13
|
+
* - "conjunction" that stands for "and"-based lists (default, e.g., "A, B, and C")
|
|
14
|
+
* - "disjunction" that stands for "or"-based lists (e.g., "A, B, or C").
|
|
15
|
+
* - "unit" stands for lists of values with units (e.g., "5 pounds, 12 ounces").
|
|
16
16
|
*/
|
|
17
17
|
type?: 'conjunction' | 'disjunction' | 'unit';
|
|
18
18
|
/**
|
|
19
|
-
* The length of the
|
|
20
|
-
*
|
|
21
|
-
* - "
|
|
22
|
-
* -
|
|
23
|
-
*
|
|
19
|
+
* The length of the formatted message.
|
|
20
|
+
* Possible values are:
|
|
21
|
+
* - "long" (default, e.g., "A, B, and C");
|
|
22
|
+
* - "short" (e.g., "A, B, C"), or
|
|
23
|
+
* - "narrow" (e.g., "A B C").
|
|
24
|
+
* When style is "short" or "narrow", "unit" is the only allowed value for the type option.
|
|
24
25
|
*/
|
|
25
26
|
style?: 'long' | 'short' | 'narrow';
|
|
26
27
|
}
|
|
27
28
|
export interface ResolvedIntlListFormatOptions {
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* the key-value pairs that were requested and are
|
|
33
|
-
* supported for this locale are included in locale.
|
|
30
|
+
* A string with a BCP 47 language tag, or an array of such strings.
|
|
31
|
+
* For the general form and interpretation of the locales argument,
|
|
32
|
+
* see the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) page.
|
|
34
33
|
*/
|
|
35
34
|
locale: string;
|
|
36
35
|
/**
|
|
37
|
-
* The format of output message.
|
|
38
|
-
*
|
|
39
|
-
* -
|
|
40
|
-
*
|
|
41
|
-
*
|
|
36
|
+
* The format of output message.
|
|
37
|
+
* Possible values are :
|
|
38
|
+
* - "conjunction" that stands for "and"-based lists (default, e.g., "A, B, and C")
|
|
39
|
+
* - "disjunction" that stands for "or"-based lists (e.g., "A, B, or C").
|
|
40
|
+
* - "unit" stands for lists of values with units (e.g., "5 pounds, 12 ounces").
|
|
42
41
|
*/
|
|
43
42
|
type: 'conjunction' | 'disjunction' | 'unit';
|
|
44
43
|
/**
|
|
45
|
-
* The length of the
|
|
46
|
-
*
|
|
47
|
-
* - "
|
|
48
|
-
* -
|
|
49
|
-
*
|
|
44
|
+
* The length of the formatted message.
|
|
45
|
+
* Possible values are:
|
|
46
|
+
* - "long" (default, e.g., "A, B, and C");
|
|
47
|
+
* - "short" (e.g., "A, B, C"), or
|
|
48
|
+
* - "narrow" (e.g., "A B C").
|
|
49
|
+
* When style is "short" or "narrow", "unit" is the only allowed value for the type option.
|
|
50
50
|
*/
|
|
51
51
|
style: 'long' | 'short' | 'narrow';
|
|
52
52
|
}
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-listformat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAKrB,qBAAqB,EAKrB,WAAW,EAGZ,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-listformat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAKrB,qBAAqB,EAKrB,WAAW,EAGZ,MAAM,4BAA4B,CAAA;AAEnC,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAA;IACrC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,MAAM,CAAA;IAC7C;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;CACpC;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;OAMG;IACH,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,MAAM,CAAA;IAC5C;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;CACnC;AAED,oBAAY,IAAI,GAAG,WAAW,GAAG,WAAW,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AA6GD,MAAM,CAAC,OAAO,OAAO,UAAU;gBACjB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,qBAAqB;IAiFxE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM;IAgBlC,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE;IAiBzC,eAAe,IAAI,6BAA6B;WASlC,kBAAkB,CAC9B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,eAAe,CAAC;WAU1C,eAAe,CAAC,GAAG,IAAI,EAAE,qBAAqB,EAAE;IAa9D,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAAC,CAAK;IACzE,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAoB;IACnD,OAAO,CAAC,MAAM,CAAC,eAAe,CAAK;IACnC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAG/B,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAK;IACzC,OAAc,UAAU,UAAO;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAG1C;CACJ"}
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import { GetOption, setInternalSlot, SupportedLocales, ResolveLocale, getInternalSlot, PartitionPattern, invariant, isLiteralPart,
|
|
2
|
+
import { GetOption, setInternalSlot, SupportedLocales, ResolveLocale, getInternalSlot, PartitionPattern, invariant, isLiteralPart, GetOptionsObject, CanonicalizeLocaleList, } from '@formatjs/ecma402-abstract';
|
|
3
3
|
function validateInstance(instance, method) {
|
|
4
4
|
if (!(instance instanceof ListFormat)) {
|
|
5
5
|
throw new TypeError("Method Intl.ListFormat.prototype." + method + " called on incompatible receiver " + String(instance));
|
|
@@ -93,7 +93,7 @@ var ListFormat = /** @class */ (function () {
|
|
|
93
93
|
setInternalSlot(ListFormat.__INTERNAL_SLOT_MAP__, this, 'initializedListFormat', true);
|
|
94
94
|
var requestedLocales = CanonicalizeLocaleList(locales);
|
|
95
95
|
var opt = Object.create(null);
|
|
96
|
-
var opts =
|
|
96
|
+
var opts = GetOptionsObject(options);
|
|
97
97
|
var matcher = GetOption(opts, 'localeMatcher', 'string', ['best fit', 'lookup'], 'best fit');
|
|
98
98
|
opt.localeMatcher = matcher;
|
|
99
99
|
var localeData = ListFormat.localeData;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-listformat",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.13",
|
|
4
4
|
"description": "Formats JS list in a i18n-safe way",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"url": "git@github.com:formatjs/formatjs.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@formatjs/ecma402-abstract": "1.6.
|
|
22
|
+
"@formatjs/ecma402-abstract": "1.6.4",
|
|
23
23
|
"tslib": "^2.1.0"
|
|
24
24
|
},
|
|
25
25
|
"main": "index.js",
|
package/polyfill.iife.js
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
return __assign.apply(this, arguments);
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
// bazel-out/
|
|
49
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/utils.js
|
|
50
50
|
function setInternalSlot(map, pl, field, value) {
|
|
51
51
|
if (!map.get(pl)) {
|
|
52
52
|
map.set(pl, Object.create(null));
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
// bazel-out/
|
|
87
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/types/date-time.js
|
|
88
88
|
var RangePatternType;
|
|
89
89
|
(function(RangePatternType2) {
|
|
90
90
|
RangePatternType2["startRange"] = "startRange";
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
RangePatternType2["endRange"] = "endRange";
|
|
93
93
|
})(RangePatternType || (RangePatternType = {}));
|
|
94
94
|
|
|
95
|
-
// bazel-out/
|
|
95
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/CanonicalizeLocaleList.js
|
|
96
96
|
function CanonicalizeLocaleList(locales) {
|
|
97
97
|
return Intl.getCanonicalLocales(locales);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
// bazel-out/
|
|
100
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/262.js
|
|
101
101
|
function ToString(o) {
|
|
102
102
|
if (typeof o === "symbol") {
|
|
103
103
|
throw TypeError("Cannot convert a Symbol value to a string");
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
|
|
117
117
|
var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
118
118
|
|
|
119
|
-
// bazel-out/
|
|
119
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/PartitionPattern.js
|
|
120
120
|
function PartitionPattern(pattern) {
|
|
121
121
|
var result = [];
|
|
122
122
|
var beginIndex = pattern.indexOf("{");
|
|
@@ -148,8 +148,11 @@
|
|
|
148
148
|
return result;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
// bazel-out/
|
|
151
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/GetOption.js
|
|
152
152
|
function GetOption(opts, prop, type, values, fallback) {
|
|
153
|
+
if (typeof opts !== "object") {
|
|
154
|
+
throw new TypeError("Options must be an object");
|
|
155
|
+
}
|
|
153
156
|
var value = opts[prop];
|
|
154
157
|
if (value !== void 0) {
|
|
155
158
|
if (type !== "boolean" && type !== "string") {
|
|
@@ -171,7 +174,7 @@
|
|
|
171
174
|
return fallback;
|
|
172
175
|
}
|
|
173
176
|
|
|
174
|
-
// bazel-out/
|
|
177
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/BestAvailableLocale.js
|
|
175
178
|
function BestAvailableLocale(availableLocales, locale) {
|
|
176
179
|
var candidate = locale;
|
|
177
180
|
while (true) {
|
|
@@ -189,7 +192,7 @@
|
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
|
|
192
|
-
// bazel-out/
|
|
195
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/LookupMatcher.js
|
|
193
196
|
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
194
197
|
var result = {locale: ""};
|
|
195
198
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -208,7 +211,7 @@
|
|
|
208
211
|
return result;
|
|
209
212
|
}
|
|
210
213
|
|
|
211
|
-
// bazel-out/
|
|
214
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/BestFitMatcher.js
|
|
212
215
|
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
213
216
|
var minimizedAvailableLocaleMap = {};
|
|
214
217
|
var minimizedAvailableLocales = new Set();
|
|
@@ -246,7 +249,7 @@
|
|
|
246
249
|
};
|
|
247
250
|
}
|
|
248
251
|
|
|
249
|
-
// bazel-out/
|
|
252
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/UnicodeExtensionValue.js
|
|
250
253
|
function UnicodeExtensionValue(extension, key) {
|
|
251
254
|
invariant(key.length === 2, "key must have 2 elements");
|
|
252
255
|
var size = extension.length;
|
|
@@ -285,7 +288,7 @@
|
|
|
285
288
|
return void 0;
|
|
286
289
|
}
|
|
287
290
|
|
|
288
|
-
// bazel-out/
|
|
291
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/ResolveLocale.js
|
|
289
292
|
function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
|
290
293
|
var matcher = options.localeMatcher;
|
|
291
294
|
var r;
|
|
@@ -349,7 +352,18 @@
|
|
|
349
352
|
return result;
|
|
350
353
|
}
|
|
351
354
|
|
|
352
|
-
// bazel-out/
|
|
355
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/GetOptionsObject.js
|
|
356
|
+
function GetOptionsObject(options) {
|
|
357
|
+
if (typeof options === "undefined") {
|
|
358
|
+
return Object.create(null);
|
|
359
|
+
}
|
|
360
|
+
if (typeof options === "object") {
|
|
361
|
+
return options;
|
|
362
|
+
}
|
|
363
|
+
throw new TypeError("Options must be an object");
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
|
|
353
367
|
var SANCTIONED_UNITS = [
|
|
354
368
|
"angle-degree",
|
|
355
369
|
"area-acre",
|
|
@@ -400,12 +414,12 @@
|
|
|
400
414
|
}
|
|
401
415
|
var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
|
|
402
416
|
|
|
403
|
-
// bazel-out/
|
|
417
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/NumberFormat/format_to_parts.js
|
|
404
418
|
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\u2B98-\u2BFF\u2CE5-\u2CEA\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\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-\uDD9B\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\uDD10-\uDD6C\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED5\uDEE0-\uDEEC\uDEF0-\uDEFA\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD0D-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95]/;
|
|
405
419
|
var CARET_S_UNICODE_REGEX = new RegExp("^" + S_UNICODE_REGEX.source);
|
|
406
420
|
var S_DOLLAR_UNICODE_REGEX = new RegExp(S_UNICODE_REGEX.source + "$");
|
|
407
421
|
|
|
408
|
-
// bazel-out/
|
|
422
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/LookupSupportedLocales.js
|
|
409
423
|
function LookupSupportedLocales(availableLocales, requestedLocales) {
|
|
410
424
|
var subset = [];
|
|
411
425
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -419,7 +433,7 @@
|
|
|
419
433
|
return subset;
|
|
420
434
|
}
|
|
421
435
|
|
|
422
|
-
// bazel-out/
|
|
436
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/SupportedLocales.js
|
|
423
437
|
function SupportedLocales(availableLocales, requestedLocales, options) {
|
|
424
438
|
var matcher = "best fit";
|
|
425
439
|
if (options !== void 0) {
|
|
@@ -432,7 +446,7 @@
|
|
|
432
446
|
return LookupSupportedLocales(availableLocales, requestedLocales);
|
|
433
447
|
}
|
|
434
448
|
|
|
435
|
-
// bazel-out/
|
|
449
|
+
// bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/data.js
|
|
436
450
|
var MissingLocaleDataError = function(_super) {
|
|
437
451
|
__extends(MissingLocaleDataError2, _super);
|
|
438
452
|
function MissingLocaleDataError2() {
|
|
@@ -443,7 +457,7 @@
|
|
|
443
457
|
return MissingLocaleDataError2;
|
|
444
458
|
}(Error);
|
|
445
459
|
|
|
446
|
-
// bazel-out/
|
|
460
|
+
// bazel-out/darwin-fastbuild/bin/packages/intl-listformat/lib/index.js
|
|
447
461
|
function validateInstance(instance, method) {
|
|
448
462
|
if (!(instance instanceof ListFormat)) {
|
|
449
463
|
throw new TypeError("Method Intl.ListFormat.prototype." + method + " called on incompatible receiver " + String(instance));
|
|
@@ -527,7 +541,7 @@
|
|
|
527
541
|
setInternalSlot(ListFormat2.__INTERNAL_SLOT_MAP__, this, "initializedListFormat", true);
|
|
528
542
|
var requestedLocales = CanonicalizeLocaleList(locales);
|
|
529
543
|
var opt = Object.create(null);
|
|
530
|
-
var opts =
|
|
544
|
+
var opts = GetOptionsObject(options);
|
|
531
545
|
var matcher = GetOption(opts, "localeMatcher", "string", ["best fit", "lookup"], "best fit");
|
|
532
546
|
opt.localeMatcher = matcher;
|
|
533
547
|
var localeData = ListFormat2.localeData;
|
|
@@ -636,12 +650,12 @@
|
|
|
636
650
|
} catch (e) {
|
|
637
651
|
}
|
|
638
652
|
|
|
639
|
-
// bazel-out/
|
|
653
|
+
// bazel-out/darwin-fastbuild/bin/packages/intl-listformat/lib/should-polyfill.js
|
|
640
654
|
function shouldPolyfill() {
|
|
641
655
|
return typeof Intl === "undefined" || !("ListFormat" in Intl);
|
|
642
656
|
}
|
|
643
657
|
|
|
644
|
-
// bazel-out/
|
|
658
|
+
// bazel-out/darwin-fastbuild/bin/packages/intl-listformat/lib/polyfill.js
|
|
645
659
|
if (shouldPolyfill()) {
|
|
646
660
|
Object.defineProperty(Intl, "ListFormat", {
|
|
647
661
|
value: lib_default,
|