react-intl 5.21.0 → 5.21.1
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 +8 -7
- package/index.d.ts.map +1 -1
- package/index.js +19 -21
- package/lib/index.d.ts +8 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -7
- package/package.json +3 -3
- package/react-intl.iife.js +1 -1
package/index.d.ts
CHANGED
|
@@ -3,13 +3,18 @@ import { MessageDescriptor, CustomFormatConfig, FormatDateOptions } from '@forma
|
|
|
3
3
|
import { IntlListFormatOptions } from '@formatjs/intl-listformat';
|
|
4
4
|
import { DisplayNamesOptions } from '@formatjs/intl-displaynames';
|
|
5
5
|
import { NumberFormatOptions } from '@formatjs/ecma402-abstract';
|
|
6
|
+
import injectIntl, { Provider as RawIntlProvider, Context as IntlContext, WithIntlProps, WrappedComponentProps } from './src/components/injectIntl';
|
|
7
|
+
import useIntl from './src/components/useIntl';
|
|
8
|
+
import IntlProvider, { createIntl } from './src/components/provider';
|
|
9
|
+
import FormattedRelativeTime from './src/components/relative';
|
|
10
|
+
import FormattedPlural from './src/components/plural';
|
|
11
|
+
import FormattedMessage from './src/components/message';
|
|
12
|
+
import FormattedDateTimeRange from './src/components/dateTimeRange';
|
|
13
|
+
export { FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, IntlContext, IntlProvider, RawIntlProvider, WithIntlProps, WrappedComponentProps, createIntl, injectIntl, useIntl, };
|
|
6
14
|
export { IntlConfig, ResolvedIntlConfig, IntlShape } from './src/types';
|
|
7
15
|
export { createIntlCache, MessageDescriptor, IntlCache, Formatters, IntlFormatters, FormatDisplayNameOptions, FormatListOptions, FormatPluralOptions, FormatRelativeTimeOptions, FormatNumberOptions, FormatDateOptions, CustomFormatConfig, CustomFormats, UnsupportedFormatterError, InvalidConfigError, MissingDataError, MessageFormatError, MissingTranslationError, IntlErrorCode as ReactIntlErrorCode, IntlError as ReactIntlError, } from '@formatjs/intl';
|
|
8
16
|
export declare function defineMessages<K extends keyof any, T = MessageDescriptor, U extends Record<K, T> = Record<K, T>>(msgs: U): U;
|
|
9
17
|
export declare function defineMessage<T extends MessageDescriptor>(msg: T): T;
|
|
10
|
-
export { default as injectIntl, Provider as RawIntlProvider, Context as IntlContext, WithIntlProps, WrappedComponentProps, } from './src/components/injectIntl';
|
|
11
|
-
export { default as useIntl } from './src/components/useIntl';
|
|
12
|
-
export { default as IntlProvider, createIntl } from './src/components/provider';
|
|
13
18
|
export declare const FormattedDate: React.FC<Intl.DateTimeFormatOptions & CustomFormatConfig & {
|
|
14
19
|
value: string | number | Date | undefined;
|
|
15
20
|
}>;
|
|
@@ -34,9 +39,5 @@ export declare const FormattedTimeParts: React.FC<FormatDateOptions & {
|
|
|
34
39
|
children(val: Intl.DateTimeFormatPart[]): React.ReactElement | null;
|
|
35
40
|
}>;
|
|
36
41
|
export { FormattedNumberParts, FormattedListParts, } from './src/components/createFormattedComponent';
|
|
37
|
-
export { default as FormattedRelativeTime } from './src/components/relative';
|
|
38
|
-
export { default as FormattedPlural } from './src/components/plural';
|
|
39
|
-
export { default as FormattedMessage } from './src/components/message';
|
|
40
|
-
export { default as FormattedDateTimeRange } from './src/components/dateTimeRange';
|
|
41
42
|
export type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
42
43
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAA;AAC/D,OAAO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,CAAA;IAC5D,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;CACpE,CACoD,CAAA;AAEvD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,2CAA2C,CAAA;AAClD,YAAY,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAA"}
|
package/index.js
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
3
|
+
exports.FormattedListParts = exports.FormattedNumberParts = exports.FormattedTimeParts = exports.FormattedDateParts = exports.FormattedDisplayName = exports.FormattedList = exports.FormattedNumber = exports.FormattedTime = exports.FormattedDate = exports.defineMessage = exports.defineMessages = exports.ReactIntlError = exports.ReactIntlErrorCode = exports.MissingTranslationError = exports.MessageFormatError = exports.MissingDataError = exports.InvalidConfigError = exports.UnsupportedFormatterError = exports.createIntlCache = exports.useIntl = exports.injectIntl = exports.createIntl = exports.RawIntlProvider = exports.IntlProvider = exports.IntlContext = exports.FormattedRelativeTime = exports.FormattedPlural = exports.FormattedMessage = exports.FormattedDateTimeRange = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
7
5
|
var createFormattedComponent_1 = require("./src/components/createFormattedComponent");
|
|
6
|
+
var injectIntl_1 = (0, tslib_1.__importStar)(require("./src/components/injectIntl"));
|
|
7
|
+
exports.injectIntl = injectIntl_1.default;
|
|
8
|
+
Object.defineProperty(exports, "RawIntlProvider", { enumerable: true, get: function () { return injectIntl_1.Provider; } });
|
|
9
|
+
Object.defineProperty(exports, "IntlContext", { enumerable: true, get: function () { return injectIntl_1.Context; } });
|
|
10
|
+
var useIntl_1 = (0, tslib_1.__importDefault)(require("./src/components/useIntl"));
|
|
11
|
+
exports.useIntl = useIntl_1.default;
|
|
12
|
+
var provider_1 = (0, tslib_1.__importStar)(require("./src/components/provider"));
|
|
13
|
+
exports.IntlProvider = provider_1.default;
|
|
14
|
+
Object.defineProperty(exports, "createIntl", { enumerable: true, get: function () { return provider_1.createIntl; } });
|
|
15
|
+
var relative_1 = (0, tslib_1.__importDefault)(require("./src/components/relative"));
|
|
16
|
+
exports.FormattedRelativeTime = relative_1.default;
|
|
17
|
+
var plural_1 = (0, tslib_1.__importDefault)(require("./src/components/plural"));
|
|
18
|
+
exports.FormattedPlural = plural_1.default;
|
|
19
|
+
var message_1 = (0, tslib_1.__importDefault)(require("./src/components/message"));
|
|
20
|
+
exports.FormattedMessage = message_1.default;
|
|
21
|
+
var dateTimeRange_1 = (0, tslib_1.__importDefault)(require("./src/components/dateTimeRange"));
|
|
22
|
+
exports.FormattedDateTimeRange = dateTimeRange_1.default;
|
|
8
23
|
var intl_1 = require("@formatjs/intl");
|
|
9
24
|
Object.defineProperty(exports, "createIntlCache", { enumerable: true, get: function () { return intl_1.createIntlCache; } });
|
|
10
25
|
Object.defineProperty(exports, "UnsupportedFormatterError", { enumerable: true, get: function () { return intl_1.UnsupportedFormatterError; } });
|
|
@@ -22,15 +37,6 @@ function defineMessage(msg) {
|
|
|
22
37
|
return msg;
|
|
23
38
|
}
|
|
24
39
|
exports.defineMessage = defineMessage;
|
|
25
|
-
var injectIntl_1 = require("./src/components/injectIntl");
|
|
26
|
-
Object.defineProperty(exports, "injectIntl", { enumerable: true, get: function () { return __importDefault(injectIntl_1).default; } });
|
|
27
|
-
Object.defineProperty(exports, "RawIntlProvider", { enumerable: true, get: function () { return injectIntl_1.Provider; } });
|
|
28
|
-
Object.defineProperty(exports, "IntlContext", { enumerable: true, get: function () { return injectIntl_1.Context; } });
|
|
29
|
-
var useIntl_1 = require("./src/components/useIntl");
|
|
30
|
-
Object.defineProperty(exports, "useIntl", { enumerable: true, get: function () { return __importDefault(useIntl_1).default; } });
|
|
31
|
-
var provider_1 = require("./src/components/provider");
|
|
32
|
-
Object.defineProperty(exports, "IntlProvider", { enumerable: true, get: function () { return __importDefault(provider_1).default; } });
|
|
33
|
-
Object.defineProperty(exports, "createIntl", { enumerable: true, get: function () { return provider_1.createIntl; } });
|
|
34
40
|
// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig`
|
|
35
41
|
exports.FormattedDate = (0, createFormattedComponent_1.createFormattedComponent)('formatDate');
|
|
36
42
|
exports.FormattedTime = (0, createFormattedComponent_1.createFormattedComponent)('formatTime');
|
|
@@ -43,11 +49,3 @@ exports.FormattedTimeParts = (0, createFormattedComponent_1.createFormattedDateT
|
|
|
43
49
|
var createFormattedComponent_2 = require("./src/components/createFormattedComponent");
|
|
44
50
|
Object.defineProperty(exports, "FormattedNumberParts", { enumerable: true, get: function () { return createFormattedComponent_2.FormattedNumberParts; } });
|
|
45
51
|
Object.defineProperty(exports, "FormattedListParts", { enumerable: true, get: function () { return createFormattedComponent_2.FormattedListParts; } });
|
|
46
|
-
var relative_1 = require("./src/components/relative");
|
|
47
|
-
Object.defineProperty(exports, "FormattedRelativeTime", { enumerable: true, get: function () { return __importDefault(relative_1).default; } });
|
|
48
|
-
var plural_1 = require("./src/components/plural");
|
|
49
|
-
Object.defineProperty(exports, "FormattedPlural", { enumerable: true, get: function () { return __importDefault(plural_1).default; } });
|
|
50
|
-
var message_1 = require("./src/components/message");
|
|
51
|
-
Object.defineProperty(exports, "FormattedMessage", { enumerable: true, get: function () { return __importDefault(message_1).default; } });
|
|
52
|
-
var dateTimeRange_1 = require("./src/components/dateTimeRange");
|
|
53
|
-
Object.defineProperty(exports, "FormattedDateTimeRange", { enumerable: true, get: function () { return __importDefault(dateTimeRange_1).default; } });
|
package/lib/index.d.ts
CHANGED
|
@@ -3,13 +3,18 @@ import { MessageDescriptor, CustomFormatConfig, FormatDateOptions } from '@forma
|
|
|
3
3
|
import { IntlListFormatOptions } from '@formatjs/intl-listformat';
|
|
4
4
|
import { DisplayNamesOptions } from '@formatjs/intl-displaynames';
|
|
5
5
|
import { NumberFormatOptions } from '@formatjs/ecma402-abstract';
|
|
6
|
+
import injectIntl, { Provider as RawIntlProvider, Context as IntlContext, WithIntlProps, WrappedComponentProps } from './src/components/injectIntl';
|
|
7
|
+
import useIntl from './src/components/useIntl';
|
|
8
|
+
import IntlProvider, { createIntl } from './src/components/provider';
|
|
9
|
+
import FormattedRelativeTime from './src/components/relative';
|
|
10
|
+
import FormattedPlural from './src/components/plural';
|
|
11
|
+
import FormattedMessage from './src/components/message';
|
|
12
|
+
import FormattedDateTimeRange from './src/components/dateTimeRange';
|
|
13
|
+
export { FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, IntlContext, IntlProvider, RawIntlProvider, WithIntlProps, WrappedComponentProps, createIntl, injectIntl, useIntl, };
|
|
6
14
|
export { IntlConfig, ResolvedIntlConfig, IntlShape } from './src/types';
|
|
7
15
|
export { createIntlCache, MessageDescriptor, IntlCache, Formatters, IntlFormatters, FormatDisplayNameOptions, FormatListOptions, FormatPluralOptions, FormatRelativeTimeOptions, FormatNumberOptions, FormatDateOptions, CustomFormatConfig, CustomFormats, UnsupportedFormatterError, InvalidConfigError, MissingDataError, MessageFormatError, MissingTranslationError, IntlErrorCode as ReactIntlErrorCode, IntlError as ReactIntlError, } from '@formatjs/intl';
|
|
8
16
|
export declare function defineMessages<K extends keyof any, T = MessageDescriptor, U extends Record<K, T> = Record<K, T>>(msgs: U): U;
|
|
9
17
|
export declare function defineMessage<T extends MessageDescriptor>(msg: T): T;
|
|
10
|
-
export { default as injectIntl, Provider as RawIntlProvider, Context as IntlContext, WithIntlProps, WrappedComponentProps, } from './src/components/injectIntl';
|
|
11
|
-
export { default as useIntl } from './src/components/useIntl';
|
|
12
|
-
export { default as IntlProvider, createIntl } from './src/components/provider';
|
|
13
18
|
export declare const FormattedDate: React.FC<Intl.DateTimeFormatOptions & CustomFormatConfig & {
|
|
14
19
|
value: string | number | Date | undefined;
|
|
15
20
|
}>;
|
|
@@ -34,9 +39,5 @@ export declare const FormattedTimeParts: React.FC<FormatDateOptions & {
|
|
|
34
39
|
children(val: Intl.DateTimeFormatPart[]): React.ReactElement | null;
|
|
35
40
|
}>;
|
|
36
41
|
export { FormattedNumberParts, FormattedListParts, } from './src/components/createFormattedComponent';
|
|
37
|
-
export { default as FormattedRelativeTime } from './src/components/relative';
|
|
38
|
-
export { default as FormattedPlural } from './src/components/plural';
|
|
39
|
-
export { default as FormattedMessage } from './src/components/message';
|
|
40
|
-
export { default as FormattedDateTimeRange } from './src/components/dateTimeRange';
|
|
41
42
|
export type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
42
43
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-intl/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAC,MAAM,aAAa,CAAA;AACrE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,E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AkB,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB,CACuC,CAAA;AAC5C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC,qBAAqB,GAAG;IACtB,KAAK,EAAE,SAAS,KAAK,CAAC,SAAS,EAAE,CAAA;CAClC,CACuC,CAAA;AAC1C,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CACzC,mBAAmB,GAAG;IACpB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjD,CAC8C,CAAA;AACjD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CACvC,iBAAiB,GAAG;IAClB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAA;IAC5D,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;CACpE,CACoD,CAAA;AACvD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CACvC,iBAAiB,GAAG;IAClB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAA;IAC5D,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAAE,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;CACpE,CACoD,CAAA;AAEvD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,2CAA2C,CAAA;AAClD,YAAY,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { createFormattedComponent, createFormattedDateTimePartsComponent, } from './src/components/createFormattedComponent';
|
|
2
|
+
import injectIntl, { Provider as RawIntlProvider, Context as IntlContext, } from './src/components/injectIntl';
|
|
3
|
+
import useIntl from './src/components/useIntl';
|
|
4
|
+
import IntlProvider, { createIntl } from './src/components/provider';
|
|
5
|
+
import FormattedRelativeTime from './src/components/relative';
|
|
6
|
+
import FormattedPlural from './src/components/plural';
|
|
7
|
+
import FormattedMessage from './src/components/message';
|
|
8
|
+
import FormattedDateTimeRange from './src/components/dateTimeRange';
|
|
9
|
+
export { FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, IntlContext, IntlProvider, RawIntlProvider, createIntl, injectIntl, useIntl, };
|
|
2
10
|
export { createIntlCache, UnsupportedFormatterError, InvalidConfigError, MissingDataError, MessageFormatError, MissingTranslationError, IntlErrorCode as ReactIntlErrorCode, IntlError as ReactIntlError, } from '@formatjs/intl';
|
|
3
11
|
export function defineMessages(msgs) {
|
|
4
12
|
return msgs;
|
|
@@ -6,9 +14,6 @@ export function defineMessages(msgs) {
|
|
|
6
14
|
export function defineMessage(msg) {
|
|
7
15
|
return msg;
|
|
8
16
|
}
|
|
9
|
-
export { default as injectIntl, Provider as RawIntlProvider, Context as IntlContext, } from './src/components/injectIntl';
|
|
10
|
-
export { default as useIntl } from './src/components/useIntl';
|
|
11
|
-
export { default as IntlProvider, createIntl } from './src/components/provider';
|
|
12
17
|
// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig`
|
|
13
18
|
export var FormattedDate = createFormattedComponent('formatDate');
|
|
14
19
|
export var FormattedTime = createFormattedComponent('formatTime');
|
|
@@ -19,7 +24,3 @@ export var FormattedDisplayName = createFormattedComponent('formatDisplayName');
|
|
|
19
24
|
export var FormattedDateParts = createFormattedDateTimePartsComponent('formatDate');
|
|
20
25
|
export var FormattedTimeParts = createFormattedDateTimePartsComponent('formatTime');
|
|
21
26
|
export { FormattedNumberParts, FormattedListParts, } from './src/components/createFormattedComponent';
|
|
22
|
-
export { default as FormattedRelativeTime } from './src/components/relative';
|
|
23
|
-
export { default as FormattedPlural } from './src/components/plural';
|
|
24
|
-
export { default as FormattedMessage } from './src/components/message';
|
|
25
|
-
export { default as FormattedDateTimeRange } from './src/components/dateTimeRange';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intl",
|
|
3
|
-
"version": "5.21.
|
|
3
|
+
"version": "5.21.1",
|
|
4
4
|
"description": "Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -130,13 +130,13 @@
|
|
|
130
130
|
"dependencies": {
|
|
131
131
|
"@formatjs/ecma402-abstract": "1.10.0",
|
|
132
132
|
"@formatjs/icu-messageformat-parser": "2.0.14",
|
|
133
|
-
"@formatjs/intl": "1.15.
|
|
133
|
+
"@formatjs/intl": "1.15.1",
|
|
134
134
|
"@formatjs/intl-displaynames": "5.2.5",
|
|
135
135
|
"@formatjs/intl-listformat": "6.3.5",
|
|
136
136
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
137
137
|
"@types/react": "16 || 17",
|
|
138
138
|
"hoist-non-react-statics": "^3.3.2",
|
|
139
|
-
"intl-messageformat": "9.9.
|
|
139
|
+
"intl-messageformat": "9.9.5",
|
|
140
140
|
"tslib": "^2.1.0"
|
|
141
141
|
},
|
|
142
142
|
"peerDependencies": {
|
package/react-intl.iife.js
CHANGED
|
@@ -2279,7 +2279,7 @@ var ReactIntl = (function() {
|
|
|
2279
2279
|
continue;
|
|
2280
2280
|
}
|
|
2281
2281
|
var varName = el.value;
|
|
2282
|
-
if (!(values && varName
|
|
2282
|
+
if (!(values && values[varName] != null)) {
|
|
2283
2283
|
throw new MissingValueError(varName, originalMessage);
|
|
2284
2284
|
}
|
|
2285
2285
|
var value = values[varName];
|