UNPKG

react-intl

Version:

Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.

23 lines (21 loc) 40.8 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactIntl={},e.React)}(this,(function(e,t){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(t),o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function e(t){for(var r,n=1,o=arguments.length;n<o;n++)for(var a in r=arguments[n])Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a]);return t}).apply(this,arguments)};function u(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}var l=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function s(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function f(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,u=a.length;i<u;i++,o++)n[o]=a[i];return n}function m(e){return this instanceof m?(this.v=e,this):new m(e)}var p=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},d=Object.freeze({__proto__:null,__extends:a,get __assign(){return i},__rest:u,__decorate:function y(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},__param:function v(e,t){return function(r,n){t(r,n,e)}},__metadata:function g(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function h(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{l(n.next(e))}catch(e){a(e)}}function u(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):function t(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(i,u)}l((n=n.apply(e,t||[])).next())}))},__generator:function b(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function l(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},__createBinding:l,__exportStar:function E(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||l(t,e,r)},__values:s,__read:c,__spread:function T(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e},__spreadArrays:f,__spreadArray:function I(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},__await:m,__asyncGenerator:function _(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{!function r(e){e.value instanceof m?Promise.resolve(e.value.v).then(l,s):c(a[0][2],e)}(o[e](t))}catch(e){c(a[0][3],e)}}function l(e){u("next",e)}function s(e){u("throw",e)}function c(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}},__asyncDelegator:function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:o?o(t):t}:o}},__asyncValues:function R(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=s(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){!function a(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,o,(t=e[r](t)).done,t.value)}))}}},__makeTemplateObject:function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&l(t,e,r);return p(t,e),t},__importDefault:function P(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function N(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet:function F(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}});function D(e,t,r){if(void 0===r&&(r=Error),!e)throw new r(t)}function j(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function r(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports}function M(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var A=j((function(e,t){var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.createNumberElement=t.createLiteralElement=t.isDateTimeSkeleton=t.isNumberSkeleton=t.isTagElement=t.isPoundElement=t.isPluralElement=t.isSelectElement=t.isTimeElement=t.isDateElement=t.isNumberElement=t.isArgumentElement=t.isLiteralElement=t.SKELETON_TYPE=t.TYPE=void 0,function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(r=t.TYPE||(t.TYPE={})),(n=t.SKELETON_TYPE||(t.SKELETON_TYPE={}))[n.number=0]="number",n[n.dateTime=1]="dateTime",t.isLiteralElement=function o(e){return e.type===r.literal},t.isArgumentElement=function a(e){return e.type===r.argument},t.isNumberElement=function i(e){return e.type===r.number},t.isDateElement=function u(e){return e.type===r.date},t.isTimeElement=function l(e){return e.type===r.time},t.isSelectElement=function s(e){return e.type===r.select},t.isPluralElement=function c(e){return e.type===r.plural},t.isPoundElement=function f(e){return e.type===r.pound},t.isTagElement=function m(e){return e.type===r.tag},t.isNumberSkeleton=function p(e){return!(!e||"object"!=typeof e||0!==e.type)},t.isDateTimeSkeleton=function d(e){return!(!e||"object"!=typeof e||1!==e.type)},t.createLiteralElement=function y(e){return{type:r.literal,value:e}},t.createNumberElement=function v(e,t){return{type:r.number,value:e,style:t}}})),C=M(d),L=j((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0,C.__exportStar(A,t),t.parse=function r(){throw new Error("You're trying to format an uncompiled message with react-intl without parser, please import from 'react-int' instead")}}));function x(e,t,r,n){var o=function a(e){return null==e||"number"==typeof e||"boolean"==typeof e}(n)?n:r(n),i=t.get(o);return void 0===i&&(i=e.call(this,n),t.set(o,i)),i}function k(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),a=t.get(o);return void 0===a&&(a=e.apply(this,n),t.set(o,a)),a}function $(e,t,r,n,o){return r.bind(t,e,n,o)}function U(e,t){return $(e,this,1===e.length?x:k,t.cache.create(),t.serializer)}function V(){return JSON.stringify(arguments)}function G(){this.cache=Object.create(null)}G.prototype.has=function(e){return e in this.cache},G.prototype.get=function(e){return this.cache[e]},G.prototype.set=function(e,t){this.cache[e]=t};var z={create:function e(){return new G}},Z=function Y(e,t){return(t&&t.strategy?t.strategy:U)(e,{cache:t&&t.cache?t.cache:z,serializer:t&&t.serializer?t.serializer:V})},q={variadic:function K(e,t){return $(e,this,k,t.cache.create(),t.serializer)},monadic:function W(e,t){return $(e,this,x,t.cache.create(),t.serializer)}};Z.strategies=q;var B,H=Object.freeze(Object.assign(Object.create(null),Z,{default:Z,strategies:q}));!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(B||(B={}));var J,Q=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.code=r,o.originalMessage=n,o}return a(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),X=function(e){function t(t,r,n,o){return e.call(this,'Invalid values for "'+t+'": "'+r+'". Options are "'+Object.keys(n).join('", "')+'"',"INVALID_VALUE",o)||this}return a(t,e),t}(Q),ee=function(e){function t(t,r,n){return e.call(this,'Value for "'+t+'" must be of type '+r,"INVALID_VALUE",n)||this}return a(t,e),t}(Q),te=function(e){function t(t,r){return e.call(this,'The intl string context variable "'+t+'" was not provided to the string "'+r+'"',"MISSING_VALUE",r)||this}return a(t,e),t}(Q);function re(e){return"function"==typeof e}function ne(e){return{create:function(){return{has:function(t){return t in e},get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(J||(J={}));var oe,ae=Z||H,ie=function(){function e(t,r,n,o){var a=this;if(void 0===r&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=a.formatToParts(e);if(1===t.length)return t[0].value;var r=t.reduce((function(e,t){return e.length&&0===t.type&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return r.length<=1?r[0]||"":r},this.formatToParts=function(e){return function e(t,r,n,o,a,i,u){if(1===t.length&&L.isLiteralElement(t[0]))return[{type:0,value:t[0].value}];for(var l=[],s=0,c=t;s<c.length;s++){var f=c[s];if(L.isLiteralElement(f))l.push({type:0,value:f.value});else if(L.isPoundElement(f))"number"==typeof i&&l.push({type:0,value:n.getNumberFormat(r).format(i)});else{var m=f.value;if(!a||!(m in a))throw new te(m,u);var p=a[m];if(L.isArgumentElement(f))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),l.push({type:"string"==typeof p?0:1,value:p});else if(L.isDateElement(f)){var d="string"==typeof f.style?o.date[f.style]:L.isDateTimeSkeleton(f.style)?f.style.parsedOptions:void 0;l.push({type:0,value:n.getDateTimeFormat(r,d).format(p)})}else if(L.isTimeElement(f))d="string"==typeof f.style?o.time[f.style]:L.isDateTimeSkeleton(f.style)?f.style.parsedOptions:void 0,l.push({type:0,value:n.getDateTimeFormat(r,d).format(p)});else if(L.isNumberElement(f))(d="string"==typeof f.style?o.number[f.style]:L.isNumberSkeleton(f.style)?f.style.parsedOptions:void 0)&&d.scale&&(p*=d.scale||1),l.push({type:0,value:n.getNumberFormat(r,d).format(p)});else{if(L.isTagElement(f)){var y=f.children,v=f.value,g=a[v];if(!re(g))throw new ee(v,"function",u);var h=g(e(y,r,n,o,a,i).map((function(e){return e.value})));Array.isArray(h)||(h=[h]),l.push.apply(l,h.map((function(e){return{type:"string"==typeof e?0:1,value:e}})))}if(L.isSelectElement(f)){if(!(b=f.options[p]||f.options.other))throw new X(f.value,p,Object.keys(f.options),u);l.push.apply(l,e(b.value,r,n,o,a))}else if(L.isPluralElement(f)){var b;if(!(b=f.options["="+p])){if(!Intl.PluralRules)throw new Q('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',"MISSING_INTL_API",u);var E=n.getPluralRules(r,{type:f.pluralType}).select(p-(f.offset||0));b=f.options[E]||f.options.other}if(!b)throw new X(f.value,p,Object.keys(f.options),u);l.push.apply(l,e(b.value,r,n,o,a,p-(f.offset||0)))}}}}return function T(e){return e.length<2?e:e.reduce((function(e,t){var r=e[e.length-1];return r&&0===r.type&&0===t.type?r.value+=t.value:e.push(t),e}),[])}(l)}(a.ast,a.locales,a.formatters,a.formats,e,void 0,a.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{normalizeHashtagInPlural:!1,ignoreTag:null==o?void 0:o.ignoreTag})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=function u(e,t){return t?Object.keys(e).reduce((function(r,n){return r[n]=function o(e,t){return t?i(i(i({},e||{}),t||{}),Object.keys(e).reduce((function(r,n){return r[n]=i(i({},e[n]),t[n]||{}),r}),{})):e}(e[n],t[n]),r}),i({},e)):e}(e.formats,n),this.locales=r,this.formatters=o&&o.formatters||function l(e){return void 0===e&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ae((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,f([void 0],t)))}),{cache:ne(e.number),strategy:ae.strategies.variadic}),getDateTimeFormat:ae((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,f([void 0],t)))}),{cache:ne(e.dateTime),strategy:ae.strategies.variadic}),getPluralRules:ae((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,f([void 0],t)))}),{cache:ne(e.pluralRules),strategy:ae.strategies.variadic})}}(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.__parse=L.parse,e.formats={number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();e.ReactIntlErrorCode=void 0,(oe=e.ReactIntlErrorCode||(e.ReactIntlErrorCode={})).FORMAT_ERROR="FORMAT_ERROR",oe.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",oe.INVALID_CONFIG="INVALID_CONFIG",oe.MISSING_DATA="MISSING_DATA",oe.MISSING_TRANSLATION="MISSING_TRANSLATION";var ue=function(e){function t(r,n,o){var a=e.call(this,"[@formatjs/intl Error "+r+"] "+n+" \n"+(o?"\n"+o.message+"\n"+o.stack:""))||this;return a.code=r,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,t),a}return a(t,e),t}(Error),le=function(t){function r(r,n){return t.call(this,e.ReactIntlErrorCode.UNSUPPORTED_FORMATTER,r,n)||this}return a(r,t),r}(ue),se=function(t){function r(r,n){return t.call(this,e.ReactIntlErrorCode.INVALID_CONFIG,r,n)||this}return a(r,t),r}(ue),ce=function(t){function r(r,n){return t.call(this,e.ReactIntlErrorCode.MISSING_DATA,r,n)||this}return a(r,t),r}(ue),fe=function(t){function r(r,n,o,a){var i=t.call(this,e.ReactIntlErrorCode.FORMAT_ERROR,r+" \nLocale: "+n+"\nMessageID: "+(null==o?void 0:o.id)+"\nDefault Message: "+(null==o?void 0:o.defaultMessage)+"\nDescription: "+(null==o?void 0:o.description)+" \n",a)||this;return i.descriptor=o,i}return a(r,t),r}(ue),me=function(t){function r(r,n){var o=t.call(this,e.ReactIntlErrorCode.MISSING_TRANSLATION,'Missing message: "'+r.id+'" for locale "'+n+'", using '+(r.defaultMessage?"default message":"id")+" as fallback.")||this;return o.descriptor=r,o}return a(r,t),r}(ue);function pe(e,t,r){return void 0===r&&(r={}),t.reduce((function(t,n){return n in e?t[n]=e[n]:n in r&&(t[n]=r[n]),t}),{})}var de={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},onError:function(e){}};function ye(e){return{create:function(){return{has:function(t){return t in e},get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}var ve=Z||H;function ge(e,t,r,n){var o,a=e&&e[t];if(a&&(o=a[r]),o)return o;n(new le("No "+t+" format named: "+r))}function he(e,t){return Object.keys(e).reduce((function(r,n){return r[n]=i({timeZone:t},e[n]),r}),{})}function be(e,t){return Object.keys(i(i({},e),t)).reduce((function(r,n){return r[n]=i(i({},e[n]||{}),t[n]||{}),r}),{})}function Ee(e,t){if(!t)return e;var r=ie.formats;return i(i(i({},r),e),{date:be(he(r.date,t),he(e.date||{},t)),time:be(he(r.time,t),he(e.time||{},t))})}function Te(e,t,r,n,o){var a=e.locale,u=e.formats,l=e.messages,s=e.defaultLocale,c=e.defaultFormats,f=e.onError,m=e.timeZone,p=e.defaultRichTextElements;void 0===r&&(r={id:""});var d=r.id,y=r.defaultMessage;D(!!d,"[@formatjs/intl] An `id` must be provided to format a message.");var v=String(d),g=l&&Object.prototype.hasOwnProperty.call(l,v)&&l[v];if(Array.isArray(g)&&1===g.length&&g[0].type===L.TYPE.literal)return g[0].value;if(!n&&g&&"string"==typeof g&&!p)return g.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=i(i({},p),n||{}),u=Ee(u,m),c=Ee(c,m),!g){if((!y||a&&a.toLowerCase()!==s.toLowerCase())&&f(new me(r,a)),y)try{return t.getMessageFormat(y,s,c,o).format(n)}catch(e){return f(new fe('Error formatting default message for: "'+v+'", rendering default message verbatim',a,r,e)),"string"==typeof y?y:v}return v}try{return t.getMessageFormat(g,a,u,i({formatters:t},o||{})).format(n)}catch(e){f(new fe('Error formatting message: "'+v+'", using '+(y?"default message":"id")+" as fallback.",a,r,e))}if(y)try{return t.getMessageFormat(y,s,c,o).format(n)}catch(e){f(new fe('Error formatting the default message for: "'+v+'", rendering message verbatim',a,r,e))}return"string"==typeof g?g:"string"==typeof y?y:v}var Ie=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","fractionalSecondDigits","calendar","numberingSystem"];function _e(e,t,r,n){var o=e.locale,a=e.formats,u=e.onError,l=e.timeZone;void 0===n&&(n={});var s=n.format,c=i(i({},l&&{timeZone:l}),s&&ge(a,t,s,u)),f=pe(n,Ie,c);return"time"!==t||f.hour||f.minute||f.second||f.timeStyle||f.dateStyle||(f=i(i({},f),{hour:"numeric",minute:"numeric"})),r(o,f)}function we(t,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=n[0],i=n[1],u=void 0===i?{}:i,l="string"==typeof a?new Date(a||0):a;try{return _e(t,"date",r,u).format(l)}catch(r){t.onError(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting date.",r))}return String(l)}function Re(t,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=n[0],i=n[1],u=void 0===i?{}:i,l="string"==typeof a?new Date(a||0):a;try{return _e(t,"time",r,u).format(l)}catch(r){t.onError(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting time.",r))}return String(l)}function Se(t,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=n[0],i=n[1],u=n[2],l=void 0===u?{}:u,s=t.timeZone,c=t.locale,f=t.onError,m=pe(l,Ie,s?{timeZone:s}:{});try{return r(c,m).formatRange(a,i)}catch(t){f(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting date time range.",t))}return String(a)}function Oe(t,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=n[0],i=n[1],u=void 0===i?{}:i,l="string"==typeof a?new Date(a||0):a;try{return _e(t,"date",r,u).formatToParts(l)}catch(r){t.onError(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting date.",r))}return[]}function Pe(t,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var a=n[0],i=n[1],u=void 0===i?{}:i,l="string"==typeof a?new Date(a||0):a;try{return _e(t,"time",r,u).formatToParts(l)}catch(r){t.onError(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting time.",r))}return[]}var Ne=["localeMatcher","style","type","fallback"];function Fe(t,r,n,o){var a=t.locale,i=t.onError;Intl.DisplayNames||i(new Q('Intl.DisplayNames is not available in this environment.\nTry polyfilling it using "@formatjs/intl-displaynames"\n',"MISSING_INTL_API"));var u=pe(o,Ne);try{return r(a,u).of(n)}catch(t){i(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting display name.",t))}}var De=["localeMatcher","type","style"],je=Date.now();function Me(t,r,n,o){var a=t.locale,i=t.onError;void 0===o&&(o={}),Intl.ListFormat||i(new Q('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n',"MISSING_INTL_API"));var u=pe(o,De);try{var l={},s=n.map((function(e,t){if("object"==typeof e){var r=function n(e){return je+"_"+e+"_"+je}(t);return l[r]=e,r}return String(e)}));return Object.keys(l).length?r(a,u).formatToParts(s).reduce((function(e,t){var r=t.value;return l[r]?e.push(l[r]):"string"==typeof e[e.length-1]?e[e.length-1]+=r:e.push(r),e}),[]):r(a,u).format(s)}catch(t){i(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting list.",t))}return n}var Ae=["localeMatcher","type"];function Ce(e,t,r,n){var o=e.locale,a=e.onError;void 0===n&&(n={}),Intl.PluralRules||a(new Q('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',"MISSING_INTL_API"));var i=pe(n,Ae);try{return t(o,i).select(r)}catch(e){a(new fe("Error formatting plural.",e))}return"other"}var Le=["numeric","style"];function xe(e,t,r,n,o){void 0===o&&(o={}),n||(n="second"),Intl.RelativeTimeFormat||e.onError(new Q('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',"MISSING_INTL_API"));try{return function a(e,t,r){var n=e.locale;void 0===r&&(r={});var o=r.format,a=!!o&&ge(e.formats,"relative",o,e.onError)||{};return t(n,pe(r,Le,a))}(e,t,o).format(r,n)}catch(t){e.onError(new fe("Error formatting relative time.",t))}return String(r)}var ke=["localeMatcher","style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay"];function $e(e,t,r){var n=e.locale;void 0===r&&(r={});var o=r.format,a=o&&ge(e.formats,"number",o,e.onError)||{};return t(n,pe(r,ke,a))}function Ue(t,r,n,o){void 0===o&&(o={});try{return $e(t,r,o).format(n)}catch(r){t.onError(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting number.",r))}return String(n)}function Ve(t,r,n,o){void 0===o&&(o={});try{return $e(t,r,o).formatToParts(n)}catch(r){t.onError(new ue(e.ReactIntlErrorCode.FORMAT_ERROR,"Error formatting number.",r))}return[]}function Ge(e){D(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var ze=i(i({},de),{textComponent:t.Fragment}),Ze="function"==typeof Symbol&&Symbol.for,Ye=Ze?Symbol.for("react.element"):60103,qe=Ze?Symbol.for("react.portal"):60106,Ke=Ze?Symbol.for("react.fragment"):60107,We=Ze?Symbol.for("react.strict_mode"):60108,Be=Ze?Symbol.for("react.profiler"):60114,He=Ze?Symbol.for("react.provider"):60109,Je=Ze?Symbol.for("react.context"):60110,Qe=Ze?Symbol.for("react.async_mode"):60111,Xe=Ze?Symbol.for("react.concurrent_mode"):60111,et=Ze?Symbol.for("react.forward_ref"):60112,tt=Ze?Symbol.for("react.suspense"):60113,rt=Ze?Symbol.for("react.suspense_list"):60120,nt=Ze?Symbol.for("react.memo"):60115,ot=Ze?Symbol.for("react.lazy"):60116,at=Ze?Symbol.for("react.block"):60121,it=Ze?Symbol.for("react.fundamental"):60117,ut=Ze?Symbol.for("react.responder"):60118,lt=Ze?Symbol.for("react.scope"):60119;function st(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Ye:switch(e=e.type){case Qe:case Xe:case Ke:case Be:case We:case tt:return e;default:switch(e=e&&e.$$typeof){case Je:case et:case ot:case nt:case He:return e;default:return t}}case qe:return t}}}function ct(e){return st(e)===Xe}var ft={AsyncMode:Qe,ConcurrentMode:Xe,ContextConsumer:Je,ContextProvider:He,Element:Ye,ForwardRef:et,Fragment:Ke,Lazy:ot,Memo:nt,Portal:qe,Profiler:Be,StrictMode:We,Suspense:tt,isAsyncMode:function(e){return ct(e)||st(e)===Qe},isConcurrentMode:ct,isContextConsumer:function(e){return st(e)===Je},isContextProvider:function(e){return st(e)===He},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Ye},isForwardRef:function(e){return st(e)===et},isFragment:function(e){return st(e)===Ke},isLazy:function(e){return st(e)===ot},isMemo:function(e){return st(e)===nt},isPortal:function(e){return st(e)===qe},isProfiler:function(e){return st(e)===Be},isStrictMode:function(e){return st(e)===We},isSuspense:function(e){return st(e)===tt},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===Ke||e===Xe||e===Be||e===We||e===tt||e===rt||"object"==typeof e&&null!==e&&(e.$$typeof===ot||e.$$typeof===nt||e.$$typeof===He||e.$$typeof===Je||e.$$typeof===et||e.$$typeof===it||e.$$typeof===ut||e.$$typeof===lt||e.$$typeof===at)},typeOf:st},mt=j((function(e){e.exports=ft})),pt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},dt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vt={};function gt(e){return mt.isMemo(e)?yt:vt[e.$$typeof]||pt}vt[mt.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},vt[mt.Memo]=yt;var ht,bt,Et=Object.defineProperty,Tt=Object.getOwnPropertyNames,It=Object.getOwnPropertySymbols,_t=Object.getOwnPropertyDescriptor,wt=Object.getPrototypeOf,Rt=Object.prototype,St=function e(t,r,n){if("string"!=typeof r){if(Rt){var o=wt(r);o&&o!==Rt&&e(t,o,n)}var a=Tt(r);It&&(a=a.concat(It(r)));for(var i=gt(t),u=gt(r),l=0;l<a.length;++l){var s=a[l];if(!(dt[s]||n&&n[s]||u&&u[s]||i&&i[s])){var c=_t(r,s);try{Et(t,s,c)}catch(e){}}}}return t},Ot=St.default||St,Pt=t.createContext(null),Nt=Pt.Consumer,Ft=Pt.Provider,Dt=Pt;function jt(e,r){var n=r||{},o=n.intlPropName,a=void 0===o?"intl":o,u=n.forwardRef,l=void 0!==u&&u,s=n.enforceContext,c=void 0===s||s,f=function(r){return t.createElement(Nt,null,(function(n){var o;c&&Ge(n);var u=((o={})[a]=n,o);return t.createElement(e,i({},r,u,{ref:l?r.forwardedRef:null}))}))};return f.displayName="injectIntl("+function m(e){return e.displayName||e.name||"Component"}(e)+")",f.WrappedComponent=e,Ot(l?t.forwardRef((function(e,r){return t.createElement(f,i({},e,{forwardedRef:r}))})):f,e)}!function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"}(ht||(ht={})),function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"}(bt||(bt={}));var Mt=function(e){return t.createElement(Dt.Consumer,null,(function(t){Ge(t);var r=e.value,n=e.children,o=u(e,["value","children"]);return n(t.formatNumberToParts(r,o))}))};function At(e){var r=function(r){return t.createElement(Dt.Consumer,null,(function(t){Ge(t);var n=r.value,o=r.children,a=u(r,["value","children"]),i="string"==typeof n?new Date(n||0):n;return o("formatDate"===e?t.formatDateToParts(i,a):t.formatTimeToParts(i,a))}))};return r.displayName=bt[e],r}function Ct(e){var r=function(r){return t.createElement(Dt.Consumer,null,(function(n){Ge(n);var o=r.value,a=r.children,i=u(r,["value","children"]),l=n[e](o,i);return"function"==typeof a?a(l):t.createElement(n.textComponent||t.Fragment,null,l)}))};return r.displayName=ht[e],r}Mt.displayName="FormattedNumberParts";var Lt=function xt(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),o=r.length;if(n.length!==o)return!1;for(var a=0;a<o;a++){var i=r[a];if(e[i]!==t[i]||!Object.prototype.hasOwnProperty.call(t,i))return!1}return!0},kt=Object.freeze(Object.assign(Object.create(null),Lt,{default:Lt})),$t=Lt||kt;function Ut(e){return{locale:e.locale,timeZone:e.timeZone,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function Vt(e){return e?Object.keys(e).reduce((function(r,n){var o=e[n];return r[n]=re(o)?function a(e){return function(r){return e(t.Children.toArray(r))}} /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(o):o,r}),{}):e}var Gt=function(e,r,n,o){for(var a=[],i=4;i<arguments.length;i++)a[i-4]=arguments[i];var u=Vt(o),l=Te.apply(void 0,f([e,r,n,u],a));return Array.isArray(l)?t.Children.toArray(l):l},zt=function(e,t){var r=e.defaultRichTextElements,n=u(e,["defaultRichTextElements"]),o=Vt(r),a=function l(e,t){var r=function n(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,o=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,f([void 0],t)))}),{cache:ye(e.dateTime),strategy:ve.strategies.variadic}),a=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,f([void 0],t)))}),{cache:ye(e.number),strategy:ve.strategies.variadic}),u=ve((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,f([void 0],t)))}),{cache:ye(e.pluralRules),strategy:ve.strategies.variadic});return{getDateTimeFormat:o,getNumberFormat:a,getMessageFormat:ve((function(e,t,r,n){return new ie(e,t,r,i({formatters:{getNumberFormat:a,getDateTimeFormat:o,getPluralRules:u}},n||{}))}),{cache:ye(e.message),strategy:ve.strategies.variadic}),getRelativeTimeFormat:ve((function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new(t.bind.apply(t,f([void 0],e)))}),{cache:ye(e.relativeTime),strategy:ve.strategies.variadic}),getPluralRules:u,getListFormat:ve((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(r.bind.apply(r,f([void 0],e)))}),{cache:ye(e.list),strategy:ve.strategies.variadic}),getDisplayNames:ve((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(n.bind.apply(n,f([void 0],e)))}),{cache:ye(e.displayNames),strategy:ve.strategies.variadic})}}(t),o=i(i({},de),e),a=o.locale,u=o.defaultLocale,l=o.onError;return a?!Intl.NumberFormat.supportedLocalesOf(a).length&&l?l(new ce('Missing locale data for locale: "'+a+'" in Intl.NumberFormat. Using default locale: "'+u+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):!Intl.DateTimeFormat.supportedLocalesOf(a).length&&l&&l(new ce('Missing locale data for locale: "'+a+'" in Intl.DateTimeFormat. Using default locale: "'+u+'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details')):(l&&l(new se('"locale" was not configured, using "'+u+'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details')),o.locale=o.defaultLocale||"en"),function s(e){e.defaultRichTextElements&&function t(e){return"string"==typeof(e?e[Object.keys(e)[0]]:void 0)}(e.messages||{})&&console.warn('[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. \nPlease consider using "@formatjs/cli" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution')}(o),i(i({},o),{formatters:r,formatNumber:Ue.bind(null,o,r.getNumberFormat),formatNumberToParts:Ve.bind(null,o,r.getNumberFormat),formatRelativeTime:xe.bind(null,o,r.getRelativeTimeFormat),formatDate:we.bind(null,o,r.getDateTimeFormat),formatDateToParts:Oe.bind(null,o,r.getDateTimeFormat),formatTime:Re.bind(null,o,r.getDateTimeFormat),formatDateTimeRange:Se.bind(null,o,r.getDateTimeFormat),formatTimeToParts:Pe.bind(null,o,r.getDateTimeFormat),formatPlural:Ce.bind(null,o,r.getPluralRules),formatMessage:Te.bind(null,o,r),formatList:Me.bind(null,o,r.getListFormat),formatDisplayName:Fe.bind(null,o,r.getDisplayNames)})}(i(i(i({},ze),n),{defaultRichTextElements:o}),t);return i(i({},a),{formatMessage:Gt.bind(null,{locale:a.locale,timeZone:a.timeZone,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:o},a.formatters)})},Zt=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},t.state={cache:t.cache,intl:zt(Ut(t.props),t.cache),prevConfig:Ut(t.props)},t}return a(r,e),r.getDerivedStateFromProps=function(e,t){var r=t.prevConfig,n=t.cache,o=Ut(e);return $t(r,o)?null:{intl:zt(o,n),prevConfig:o}},r.prototype.render=function(){return Ge(this.state.intl),t.createElement(Ft,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=ze,r}(t.PureComponent);function Yt(e){var t=Math.abs(e);return t<60?"second":t<3600?"minute":t<86400?"hour":"day"}function qt(e){switch(e){case"second":return 1;case"minute":return 60;case"hour":return 3600;default:return 86400}}function Kt(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return 3600*e}}var Wt=["second","minute","hour"];function Bt(e){return void 0===e&&(e="second"),Wt.includes(e)}var Ht=function(e){function r(t){var r=e.call(this,t)||this;return r._updateTimer=null,r.state={prevUnit:r.props.unit,prevValue:r.props.value,currentValueInSeconds:Bt(r.props.unit)?Kt(r.props.value,r.props.unit):0},D(!t.updateIntervalInSeconds||!(!t.updateIntervalInSeconds||!Bt(t.unit)),"Cannot schedule update with unit longer than hour"),r}return a(r,e),r.prototype.scheduleNextUpdate=function(e,t){var r=this,n=e.updateIntervalInSeconds,o=e.unit,a=t.currentValueInSeconds;if(clearTimeout(this._updateTimer),this._updateTimer=null,n&&Bt(o)){var i=a-n,u=Yt(i);if("day"!==u){var l=qt(u),s=i-i%l,c=s>=a?s-l:s,f=Math.abs(c-a);this._updateTimer=setTimeout((function(){return r.setState({currentValueInSeconds:c})}),1e3*f)}}},r.prototype.componentDidMount=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentDidUpdate=function(){this.scheduleNextUpdate(this.props,this.state)},r.prototype.componentWillUnmount=function(){clearTimeout(this._updateTimer),this._updateTimer=null},r.getDerivedStateFromProps=function(e,t){return e.unit!==t.prevUnit||e.value!==t.prevValue?{prevValue:e.value,prevUnit:e.unit,currentValueInSeconds:Bt(e.unit)?Kt(e.value,e.unit):0}:null},r.prototype.render=function(){var e=this;return t.createElement(Dt.Consumer,null,(function(r){Ge(r);var n=r.formatRelativeTime,o=r.textComponent,a=e.props,u=a.children,l=a.unit,s=a.updateIntervalInSeconds,c=e.state.currentValueInSeconds,f=a.value||0,m=l;if(Bt(l)&&"number"==typeof c&&s){var p=qt(m=Yt(c));f=Math.round(c/p)}var d=n(f,m,i({},e.props));return"function"==typeof u?u(d):o?t.createElement(o,null,d):d}))},r.displayName="FormattedRelativeTime",r.defaultProps={value:0,unit:"second"},r}(t.PureComponent),Jt=function(e){var r=e.other,n=e.children,o=e.intl,a=o.textComponent,i=e[(0,o.formatPlural)(e.value,e)]||r;return"function"==typeof n?n(i):a?t.createElement(a,null,i):i};Jt.defaultProps={type:"cardinal"},Jt.displayName="FormattedPlural";var Qt=jt(Jt),Xt=Lt||kt,er=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.values,n=u(t,["values"]),o=e.values,a=u(e,["values"]);return!Xt(o,r)||!Xt(n,a)},r.prototype.render=function(){var e=this;return t.createElement(Dt.Consumer,null,(function(r){Ge(r);var o=r.textComponent,a=e.props,i=a.children,u=a.tagName,l=void 0===u?void 0===o?t.Fragment:o:u,s=(0,r.formatMessage)({id:a.id,description:a.description,defaultMessage:a.defaultMessage},a.values,{ignoreTag:a.ignoreTag});return Array.isArray(s)||(s=[s]),"function"==typeof i?i(s):l?t.createElement.apply(n,f([l,null],s)):s}))},r.displayName="FormattedMessage",r}(t.Component),tr=function(e){return t.createElement(Dt.Consumer,null,(function(r){Ge(r);var n=e.from,o=e.to,a=e.children,i=u(e,["from","to","children"]),l=r.formatDateTimeRange(n,o,i);return"function"==typeof a?a(l):t.createElement(r.textComponent||t.Fragment,null,l)}))};tr.displayName="FormattedDateTimeRange";var rr=Ct("formatDate"),nr=Ct("formatTime"),or=Ct("formatNumber"),ar=Ct("formatList"),ir=Ct("formatDisplayName"),ur=At("formatDate"),lr=At("formatTime");e.FormattedDate=rr,e.FormattedDateParts=ur,e.FormattedDateTimeRange=tr,e.FormattedDisplayName=ir,e.FormattedList=ar,e.FormattedMessage=er,e.FormattedNumber=or,e.FormattedNumberParts=Mt,e.FormattedPlural=Qt,e.FormattedRelativeTime=Ht,e.FormattedTime=nr,e.FormattedTimeParts=lr,e.IntlContext=Dt,e.IntlProvider=Zt,e.InvalidConfigError=se,e.MessageFormatError=fe,e.MissingDataError=ce,e.MissingTranslationError=me,e.RawIntlProvider=Ft,e.ReactIntlError=ue,e.UnsupportedFormatterError=le,e.createIntl=zt,e.createIntlCache=function sr(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}},e.defineMessage=function cr(e){return e},e.defineMessages=function fr(e){return e},e.injectIntl=jt,e.useIntl=function mr(){var e=t.useContext(Dt);return Ge(e),e},Object.defineProperty(e,"__esModule",{value:!0})}));