(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define("react-intl",["exports","react"],t):t((e=e||self).ReactIntl={},e.React)})(this,(function(e,t){"use strict";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}var a=n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t._=function(e){return e},t.defineMessages=function(e){return e}}));r(a);a._;var o,i=a.defineMessages;function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r0){for(t=1,r=1;tpe&&(pe=le,de=[]),de.push(e))}function Ce(){return xe()}function xe(){var e,t;for(e=[],t=Ee();t!==u;)e.push(t),t=Ee();return e}function Ee(){var t;return(t=(function(){var e,t;e=le,(t=Te())!==u&&(fe=e,r=t,t=E({type:o.literal,value:r},qe()));var r;return e=t})())===u&&(t=(function(){var t,r,n,a;ge++,t=le,123===e.charCodeAt(le)?(r="{",le++):(r=u,0===ge&&Pe(f));r!==u&&Le()!==u&&(n=Ue())!==u&&Le()!==u?(125===e.charCodeAt(le)?(a="}",le++):(a=u,0===ge&&Pe(m)),a!==u?(fe=t,i=n,r=E({type:o.argument,value:i},qe()),t=r):(le=t,t=u)):(le=t,t=u);var i;ge--,t===u&&(r=u,0===ge&&Pe(l));return t})())===u&&(t=(function(){var t;(t=(function(){var t,r,n,a,o,i,s,c,l;t=le,123===e.charCodeAt(le)?(r="{",le++):(r=u,0===ge&&Pe(f));r!==u&&Le()!==u&&(n=Ue())!==u&&Le()!==u?(44===e.charCodeAt(le)?(a=",",le++):(a=u,0===ge&&Pe(F)),a!==u&&Le()!==u?("number"===e.substr(le,6)?(o="number",le+=6):(o=u,0===ge&&Pe(O)),o!==u&&Le()!==u?(i=le,44===e.charCodeAt(le)?(s=",",le++):(s=u,0===ge&&Pe(F)),s!==u&&(c=Le())!==u&&(l=(function(){var t,r,n;t=le,"::"===e.substr(le,2)?(r="::",le+=2):(r=u,0===ge&&Pe(w));r!==u&&(n=(function(){var e,t,r;if(e=le,t=[],(r=Me())!==u)for(;r!==u;)t.push(r),r=Me();else t=u;t!==u&&(fe=e,t=E({type:0,tokens:t},qe()));return e=t})())!==u?(fe=t,t=r=n):(le=t,t=u);t===u&&(t=le,(r=Te())!==u&&(fe=t,r=A(r)),t=r);return t})())!==u?i=s=[s,c,l]:(le=i,i=u),i===u&&(i=null),i!==u&&(s=Le())!==u?(125===e.charCodeAt(le)?(c="}",le++):(c=u,0===ge&&Pe(m)),c!==u?(fe=t,r=P(n,o,i),t=r):(le=t,t=u)):(le=t,t=u)):(le=t,t=u)):(le=t,t=u)):(le=t,t=u);return t})())===u&&(t=(function(){var t,r,n,a,o,i,s,c,l;t=le,123===e.charCodeAt(le)?(r="{",le++):(r=u,0===ge&&Pe(f));r!==u&&Le()!==u&&(n=Ue())!==u&&Le()!==u?(44===e.charCodeAt(le)?(a=",",le++):(a=u,0===ge&&Pe(F)),a!==u&&Le()!==u?("date"===e.substr(le,4)?(o="date",le+=4):(o=u,0===ge&&Pe(k)),o===u&&("time"===e.substr(le,4)?(o="time",le+=4):(o=u,0===ge&&Pe(I))),o!==u&&Le()!==u?(i=le,44===e.charCodeAt(le)?(s=",",le++):(s=u,0===ge&&Pe(F)),s!==u&&(c=Le())!==u&&(l=(function(){var t,r,n;t=le,"::"===e.substr(le,2)?(r="::",le+=2):(r=u,0===ge&&Pe(w));r!==u&&(n=(function(){var t,r,n,a;t=le,r=le,n=[],(a=_e())===u&&(a=Se());if(a!==u)for(;a!==u;)n.push(a),(a=_e())===u&&(a=Se());else n=u;r=n!==u?e.substring(r,le):n;r!==u&&(fe=t,r=E({type:1,pattern:r},qe()));return t=r})())!==u?(fe=t,t=r=n):(le=t,t=u);t===u&&(t=le,(r=Te())!==u&&(fe=t,r=A(r)),t=r);return t})())!==u?i=s=[s,c,l]:(le=i,i=u),i===u&&(i=null),i!==u&&(s=Le())!==u?(125===e.charCodeAt(le)?(c="}",le++):(c=u,0===ge&&Pe(m)),c!==u?(fe=t,r=P(n,o,i),t=r):(le=t,t=u)):(le=t,t=u)):(le=t,t=u)):(le=t,t=u)):(le=t,t=u);return t})());return t})())===u&&(t=(function(){var t,r,n,a,i,s,c,l,p,d,g;t=le,123===e.charCodeAt(le)?(r="{",le++):(r=u,0===ge&&Pe(f));if(r!==u)if(Le()!==u)if((n=Ue())!==u)if(Le()!==u)if(44===e.charCodeAt(le)?(a=",",le++):(a=u,0===ge&&Pe(F)),a!==u)if(Le()!==u)if("plural"===e.substr(le,6)?(i="plural",le+=6):(i=u,0===ge&&Pe(R)),i===u&&("selectordinal"===e.substr(le,13)?(i="selectordinal",le+=13):(i=u,0===ge&&Pe(N))),i!==u)if(Le()!==u)if(44===e.charCodeAt(le)?(s=",",le++):(s=u,0===ge&&Pe(F)),s!==u)if(Le()!==u)if(c=le,"offset:"===e.substr(le,7)?(l="offset:",le+=7):(l=u,0===ge&&Pe(L)),l!==u&&(p=Le())!==u&&(d=$e())!==u?c=l=[l,p,d]:(le=c,c=u),c===u&&(c=null),c!==u)if((l=Le())!==u){if(p=[],(d=Ie())!==u)for(;d!==u;)p.push(d),d=Ie();else p=u;p!==u&&(d=Le())!==u?(125===e.charCodeAt(le)?(g="}",le++):(g=u,0===ge&&Pe(m)),g!==u?(fe=t,r=(function(e,t,r,n){return E({type:o.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:r?r[2]:0,options:n.reduce((function(e,t){var r=t.id,n=t.value,a=t.location;return r in e&&ye('Duplicate option "'+r+'" in plural element: "'+he()+'"',ve()),e[r]={value:n,location:a},e}),{})},qe())})(n,i,c,p),t=r):(le=t,t=u)):(le=t,t=u)}else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;return t})())===u&&(t=(function(){var t,r,n,a,i,s,c,l,p;t=le,123===e.charCodeAt(le)?(r="{",le++):(r=u,0===ge&&Pe(f));if(r!==u)if(Le()!==u)if((n=Ue())!==u)if(Le()!==u)if(44===e.charCodeAt(le)?(a=",",le++):(a=u,0===ge&&Pe(F)),a!==u)if(Le()!==u)if("select"===e.substr(le,6)?(i="select",le+=6):(i=u,0===ge&&Pe($)),i!==u)if(Le()!==u)if(44===e.charCodeAt(le)?(s=",",le++):(s=u,0===ge&&Pe(F)),s!==u)if(Le()!==u){if(c=[],(l=ke())!==u)for(;l!==u;)c.push(l),l=ke();else c=u;c!==u&&(l=Le())!==u?(125===e.charCodeAt(le)?(p="}",le++):(p=u,0===ge&&Pe(m)),p!==u?(fe=t,r=(function(e,t){return E({type:o.select,value:e,options:t.reduce((function(e,t){var r=t.id,n=t.value,a=t.location;return r in e&&ye('Duplicate option "'+r+'" in select element: "'+he()+'"',ve()),e[r]={value:n,location:a},e}),{})},qe())})(n,c),t=r):(le=t,t=u)):(le=t,t=u)}else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;else le=t,t=u;return t})()),t}function Te(){var e,t,r;if(e=le,t=[],(r=Ze())===u&&(r=ze())===u&&(r=He()),r!==u)for(;r!==u;)t.push(r),(r=Ze())===u&&(r=ze())===u&&(r=He());else t=u;return t!==u&&(fe=e,t=t.join("")),e=t}function je(){var t,r,n,a,o;if(ge++,t=le,r=[],n=le,a=le,ge++,(o=Re())===u&&(d.test(e.charAt(le))?(o=e.charAt(le),le++):(o=u,0===ge&&Pe(g))),ge--,o===u?a=void 0:(le=a,a=u),a!==u?(e.length>le?(o=e.charAt(le),le++):(o=u,0===ge&&Pe(h)),o!==u?n=a=[a,o]:(le=n,n=u)):(le=n,n=u),n!==u)for(;n!==u;)r.push(n),n=le,a=le,ge++,(o=Re())===u&&(d.test(e.charAt(le))?(o=e.charAt(le),le++):(o=u,0===ge&&Pe(g))),ge--,o===u?a=void 0:(le=a,a=u),a!==u?(e.length>le?(o=e.charAt(le),le++):(o=u,0===ge&&Pe(h)),o!==u?n=a=[a,o]:(le=n,n=u)):(le=n,n=u);else r=u;return t=r!==u?e.substring(t,le):r,ge--,t===u&&(r=u,0===ge&&Pe(p)),t}function De(){var t,r,n;return ge++,t=le,47===e.charCodeAt(le)?(r="/",le++):(r=u,0===ge&&Pe(y)),r!==u&&(n=je())!==u?(fe=t,t=r=n):(le=t,t=u),ge--,t===u&&(r=u,0===ge&&Pe(v)),t}function Me(){var e,t,r,n;if(ge++,e=le,Le()!==u)if((t=je())!==u){for(r=[],n=De();n!==u;)r.push(n),n=De();r!==u?(fe=e,e=(function(e,t){return{stem:e,options:t}})(t,r)):(le=e,e=u)}else le=e,e=u;else le=e,e=u;return ge--,e===u&&(u,0===ge&&Pe(b)),e}function _e(){var t,r,n,a;if(t=le,39===e.charCodeAt(le)?(r="'",le++):(r=u,0===ge&&Pe(C)),r!==u){if(n=[],(a=Ze())===u&&(x.test(e.charAt(le))?(a=e.charAt(le),le++):(a=u,0===ge&&Pe(j))),a!==u)for(;a!==u;)n.push(a),(a=Ze())===u&&(x.test(e.charAt(le))?(a=e.charAt(le),le++):(a=u,0===ge&&Pe(j)));else n=u;n!==u?(39===e.charCodeAt(le)?(a="'",le++):(a=u,0===ge&&Pe(C)),a!==u?t=r=[r,n,a]:(le=t,t=u)):(le=t,t=u)}else le=t,t=u;if(t===u)if(t=[],(r=Ze())===u&&(D.test(e.charAt(le))?(r=e.charAt(le),le++):(r=u,0===ge&&Pe(M))),r!==u)for(;r!==u;)t.push(r),(r=Ze())===u&&(D.test(e.charAt(le))?(r=e.charAt(le),le++):(r=u,0===ge&&Pe(M)));else t=u;return t}function Se(){var t,r;if(t=[],_.test(e.charAt(le))?(r=e.charAt(le),le++):(r=u,0===ge&&Pe(S)),r!==u)for(;r!==u;)t.push(r),_.test(e.charAt(le))?(r=e.charAt(le),le++):(r=u,0===ge&&Pe(S));else t=u;return t}function ke(){var t,r,n,a,o;return t=le,Le()!==u&&(r=Ve())!==u&&Le()!==u?(123===e.charCodeAt(le)?(n="{",le++):(n=u,0===ge&&Pe(f)),n!==u&&(a=xe())!==u?(125===e.charCodeAt(le)?(o="}",le++):(o=u,0===ge&&Pe(m)),o!==u?(fe=t,t=E({id:r,value:a},qe())):(le=t,t=u)):(le=t,t=u)):(le=t,t=u),t}function Ie(){var t,r,n,a,o;return t=le,Le()!==u&&(r=(function(){var t,r,n,a;return t=le,r=le,61===e.charCodeAt(le)?(n="=",le++):(n=u,0===ge&&Pe(Z)),n!==u&&(a=$e())!==u?r=n=[n,a]:(le=r,r=u),(t=r!==u?e.substring(t,le):r)===u&&(t=Ve()),t})())!==u&&Le()!==u?(123===e.charCodeAt(le)?(n="{",le++):(n=u,0===ge&&Pe(f)),n!==u&&(a=xe())!==u?(125===e.charCodeAt(le)?(o="}",le++):(o=u,0===ge&&Pe(m)),o!==u?(fe=t,t=E({id:r,value:a},qe())):(le=t,t=u)):(le=t,t=u)):(le=t,t=u),t}function Re(){var t;return ge++,H.test(e.charAt(le))?(t=e.charAt(le),le++):(t=u,0===ge&&Pe(U)),ge--,t===u&&0===ge&&Pe(z),t}function Ne(){var t;return ge++,V.test(e.charAt(le))?(t=e.charAt(le),le++):(t=u,0===ge&&Pe(q)),ge--,t===u&&0===ge&&Pe(B),t}function Le(){var t,r,n;for(ge++,t=le,r=[],n=Re();n!==u;)r.push(n),n=Re();return t=r!==u?e.substring(t,le):r,ge--,t===u&&(r=u,0===ge&&Pe(W)),t}function $e(){var t,r,n,a,o;return ge++,t=le,45===e.charCodeAt(le)?(r="-",le++):(r=u,0===ge&&Pe(X)),r===u&&(r=null),r!==u&&(n=Be())!==u?(fe=t,a=r,t=r=(o=n)?a?-o:o:0):(le=t,t=u),ge--,t===u&&(r=u,0===ge&&Pe(G)),t}function Ze(){var t,r;return ge++,t=le,"''"===e.substr(le,2)?(r="''",le+=2):(r=u,0===ge&&Pe(K)),r!==u&&(fe=t,r="'"),ge--,(t=r)===u&&(r=u,0===ge&&Pe(J)),t}function ze(){var t,r,n,a,o,i;if(t=le,39===e.charCodeAt(le)?(r="'",le++):(r=u,0===ge&&Pe(C)),r!==u)if(Q.test(e.charAt(le))?(n=e.charAt(le),le++):(n=u,0===ge&&Pe(Y)),n!==u){for(a=le,o=[],"''"===e.substr(le,2)?(i="''",le+=2):(i=u,0===ge&&Pe(K)),i===u&&(x.test(e.charAt(le))?(i=e.charAt(le),le++):(i=u,0===ge&&Pe(j)));i!==u;)o.push(i),"''"===e.substr(le,2)?(i="''",le+=2):(i=u,0===ge&&Pe(K)),i===u&&(x.test(e.charAt(le))?(i=e.charAt(le),le++):(i=u,0===ge&&Pe(j)));(a=o!==u?e.substring(a,le):o)!==u?(39===e.charCodeAt(le)?(o="'",le++):(o=u,0===ge&&Pe(C)),o!==u?(fe=t,t=r=n+a.replace("''","'")):(le=t,t=u)):(le=t,t=u)}else le=t,t=u;else le=t,t=u;return t}function He(){var t,r;return t=le,ee.test(e.charAt(le))?(r=e.charAt(le),le++):(r=u,0===ge&&Pe(te)),t=r!==u?e.substring(t,le):r}function Ue(){var t,r;return ge++,t=le,(r=Be())===u&&(r=Ve()),t=r!==u?e.substring(t,le):r,ge--,t===u&&(r=u,0===ge&&Pe(re)),t}function Be(){var t,r,n,a,o;if(ge++,t=le,48===e.charCodeAt(le)?(r="0",le++):(r=u,0===ge&&Pe(ae)),r!==u&&(fe=t,r=0),(t=r)===u){if(t=le,r=le,oe.test(e.charAt(le))?(n=e.charAt(le),le++):(n=u,0===ge&&Pe(ie)),n!==u){for(a=[],ue.test(e.charAt(le))?(o=e.charAt(le),le++):(o=u,0===ge&&Pe(se));o!==u;)a.push(o),ue.test(e.charAt(le))?(o=e.charAt(le),le++):(o=u,0===ge&&Pe(se));a!==u?r=n=[n,a]:(le=r,r=u)}else le=r,r=u;r!==u&&(fe=t,r=parseInt(r.join(""),10)),t=r}return ge--,t===u&&(r=u,0===ge&&Pe(ne)),t}function Ve(){var t,r,n,a,o;if(ge++,t=le,r=[],n=le,a=le,ge++,(o=Re())===u&&(o=Ne()),ge--,o===u?a=void 0:(le=a,a=u),a!==u?(e.length>le?(o=e.charAt(le),le++):(o=u,0===ge&&Pe(h)),o!==u?n=a=[a,o]:(le=n,n=u)):(le=n,n=u),n!==u)for(;n!==u;)r.push(n),n=le,a=le,ge++,(o=Re())===u&&(o=Ne()),ge--,o===u?a=void 0:(le=a,a=u),a!==u?(e.length>le?(o=e.charAt(le),le++):(o=u,0===ge&&Pe(h)),o!==u?n=a=[a,o]:(le=n,n=u)):(le=n,n=u);else r=u;return t=r!==u?e.substring(t,le):r,ge--,t===u&&(r=u,0===ge&&Pe(ce)),t}function qe(){return t&&t.captureLocation?{location:ve()}:{}}if((r=c())!==u&&le===e.length)return r;throw r!==u&&le1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(I,(function(e,r,n){return"."===e?t.maximumFractionDigits=0:"+"===n?t.minimumFractionDigits=n.length:"#"===r[0]?t.maximumFractionDigits=r.length:(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length+("string"==typeof n?n.length:0)),""})),a.options.length&&(t=_(_({},t),N(a.options[0])))}else if(R.test(a.stem))t=_(_({},t),N(a.stem));else{var o=L(a.stem);o&&(t=_(_({},t),o))}}return t}function z(e,t){var r=j(e,t);return t&&!1===t.normalizeHashtagInPlural||(function e(t){t.forEach((function(t){(F(t)||A(t))&&Object.keys(t.options).forEach((function(r){for(var n,a=t.options[r],o=-1,i=void 0,u=0;u(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/,re=Date.now()+"@@",ne=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"];function ae(e,t,r,n,a,o){var i=K(e,t,r,n,a,void 0,o),u={},s=i.reduce((function(e,t){if(0===t.type)return e+t.value;var r=Date.now()+"_"+ ++Y;return u[r]=t.value,e+"@@"+r+"@@"}),"");if(!te.test(s))return ee(s,u);if(!a)throw new J("Message has placeholders but no values was given");if("undefined"==typeof DOMParser)throw new J("Cannot format XML message without DOMParser");B||(B=new DOMParser);var c=B.parseFromString(''+s+"","text/html").getElementById(re);if(!c)throw new J("Malformed HTML message "+s);var l=Object.keys(a).filter((function(e){return!!c.getElementsByTagName(e).length}));if(!l.length)return ee(s,u);var f=l.filter((function(e){return e!==e.toLowerCase()}));if(f.length)throw new J("HTML tag must be lowercased but the following tags are not: "+f.join(", "));return Array.prototype.slice.call(c.childNodes).reduce((function(e,t){return e.concat((function e(t,r,n){var a=t.tagName,o=t.outerHTML,i=t.textContent,u=t.childNodes;if(!a)return ee(i||"",r);a=a.toLowerCase();var s=~ne.indexOf(a),c=n[a];if(c&&s)throw new J(a+" is a self-closing tag and can not be used, please use another tag name.");if(!u.length)return[o];var l=Array.prototype.slice.call(u).reduce((function(t,a){return t.concat(e(a,r,n))}),[]);return c?"function"==typeof c?[c.apply(void 0,l)]:[c]:W(["<"+a+">"],l,[""])})(t,u,a))}),[])}var oe=function(){return(oe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<"']/g;function pe(e){return(""+e).replace(me,(function(e){return fe[e.charCodeAt(0)]}))}function de(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.reduce((function(t,n){return n in e?t[n]=e[n]:n in r&&(t[n]=r[n]),t}),{})}function ge(e){le(e,"[React Intl] Could not find required `intl` object. needs to exist in the component ancestry.")}function he(e,t){var r=t?"\n".concat(t.stack):"";return"[React Intl] ".concat(e).concat(r)}var ve={formats:{},messages:{},timeZone:void 0,textComponent:t.Fragment,defaultLocale:"en",defaultFormats:{},onError:function(e){console.error(e)}};function ye(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{}}}function be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{}},t=Intl.RelativeTimeFormat,r=Intl.ListFormat;return{getDateTimeFormat:V(Intl.DateTimeFormat,e.dateTime),getNumberFormat:V(Intl.NumberFormat,e.number),getMessageFormat:V(ue,e.message),getRelativeTimeFormat:V(t,e.relativeTime),getPluralRules:V(Intl.PluralRules,e.pluralRules),getListFormat:V(r,e.list)}}function we(e,t,r,n){var a,o=e&&e[t];if(o&&(a=o[r]),a)return a;n(he("No ".concat(t," format named: ").concat(r)))}var Ae=n((function(e,t){(function(){Object.defineProperty(t,"__esModule",{value:!0});var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116;var h=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n2?r-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:{},i=o.format,u=i&&we(n,"number",i,a)||{},s=de(o,Ge,u);return t(r,s)}function Je(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{return Xe(e,t,n).format(r)}catch(t){e.onError(he("Error formatting number.",t))}return String(r)}function Ke(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{return Xe(e,t,n).formatToParts(r)}catch(t){e.onError(he("Error formatting number.",t))}return[]}var Qe=["numeric","style"];function Ye(e,t){var r=e.locale,n=e.formats,a=e.onError,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.format,u=!!i&&we(n,"relative",i,a)||{},s=de(o,Qe,u);return t(r,s)}function et(e,t,r,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};n||(n="second");var o=Intl.RelativeTimeFormat;o||e.onError(he('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n'));try{return Ye(e,t,a).format(r,n)}catch(t){e.onError(he("Error formatting relative time.",t))}return String(r)}var tt=["localeMatcher","formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"];function rt(e,t,r){var n=e.locale,a=e.formats,o=e.onError,i=e.timeZone,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=u.format,c=Object.assign({},i&&{timeZone:i},s&&we(a,t,s,o)),l=de(u,tt,c);return"time"!==t||l.hour||l.minute||l.second||(l=Object.assign({},l,{hour:"numeric",minute:"numeric"})),r(n,l)}function nt(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a="string"==typeof r?new Date(r||0):r;try{return rt(e,"date",t,n).format(a)}catch(t){e.onError(he("Error formatting date.",t))}return String(a)}function at(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a="string"==typeof r?new Date(r||0):r;try{return rt(e,"time",t,n).format(a)}catch(t){e.onError(he("Error formatting time.",t))}return String(a)}function ot(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a="string"==typeof r?new Date(r||0):r;try{return rt(e,"date",t,n).formatToParts(a)}catch(t){e.onError(he("Error formatting date.",t))}return[]}function it(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a="string"==typeof r?new Date(r||0):r;try{return rt(e,"time",t,n).formatToParts(a)}catch(t){e.onError(he("Error formatting time.",t))}return[]}var ut=["localeMatcher","type"];function st(e,t,r){var n=e.locale,a=e.onError,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Intl.PluralRules||a(he('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n'));var i=de(o,ut);try{return t(n,i).select(r)}catch(e){a(he("Error formatting plural.",e))}return"other"}var ct=se||ce;function lt(e,t){return Object.keys(e).reduce((function(r,n){return r[n]=Object.assign({timeZone:t},e[n]),r}),{})}function ft(e,t){return Object.keys(Object.assign({},e,t)).reduce((function(r,n){return r[n]=Object.assign({},e[n]||{},t[n]||{}),r}),{})}function mt(e,t){if(!t)return e;var r=ue.formats;return Object.assign({},r,e,{date:ft(lt(r.date,t),lt(e.date||{},t)),time:ft(lt(r.time,t),lt(e.time||{},t))})}function pt(e,t){var r=e.locale,n=e.formats,a=e.messages,o=e.defaultLocale,i=e.defaultFormats,u=e.onError,s=e.timeZone,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:""},l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},f=c.id,m=c.defaultMessage;if(ct(f,"[React Intl] An `id` must be provided to format a message."),!f)throw new Error("[React Intl] An `id` must be provided to format a message.");var p=a&&a[f];n=mt(n,s),i=mt(i,s);var d=[];if(p)try{var g=t.getMessageFormat(p,r,n,{formatters:t});d=g.formatHTMLMessage(l)}catch(e){u(he('Error formatting message: "'.concat(f,'" for locale: "').concat(r,'"')+(m?", using default message as fallback.":""),e))}else(!m||r&&r.toLowerCase()!==o.toLowerCase())&&u(he('Missing message: "'.concat(f,'" for locale: "').concat(r,'"')+(m?", using default message as fallback.":"")));if(!d.length&&m)try{var h=t.getMessageFormat(m,o,i);d=h.formatHTMLMessage(l)}catch(e){u(he('Error formatting the default message for: "'.concat(f,'"'),e))}return d.length?1===d.length&&"string"==typeof d[0]?d[0]||m||f:d:(u(he('Cannot format message: "'.concat(f,'", ')+"using message ".concat(p||m?"source":"id"," as fallback."))),"string"==typeof p?p||m||f:m||f)}function dt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{id:""},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=Object.keys(n).reduce((function(e,t){var r=n[t];return e[t]="string"==typeof r?pe(r):r,e}),{});return pt(e,t,r,a)}var gt=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),a=r.length;if(n.length!==a)return!1;for(var o=0;o3&&void 0!==arguments[3]?arguments[3]:{},i=Intl.ListFormat;i||a(he('Intl.ListFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-listformat"\n'));var s=de(o,vt);try{var c={},l=r.map((function(e,t){if("object"===u(e)){var r=bt(t);return c[r]=e,r}return String(e)}));if(!Object.keys(c).length)return t(n,s).format(l);var f=t(n,s).formatToParts(l);return f.reduce((function(e,t){var r=t.value;return c[r]?e.push(c[r]):"string"==typeof e[e.length-1]?e[e.length-1]+=r:e.push(r),e}),[])}catch(e){a(he("Error formatting list.",e))}return r}var At=gt||ht;function Ft(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}}function Ot(e,t){var r=be(t),n=Object.assign({},ve,e);if(!n.locale||!(function(e,t){if("undefined"==typeof Intl)return!1;if(!e)throw new Error("locales must be supplied.");Array.isArray(e)||(e=[e]);var r=t||[Intl.DateTimeFormat,Intl.NumberFormat,Intl.PluralRules];return!(0===(r=r.filter(Boolean)).length||t&&r.length!==t.length)&&r.every((function(t){return t.supportedLocalesOf(e).length===e.length}))})(n.locale)){var a=n.locale,o=n.defaultLocale,i=n.onError;"function"==typeof i&&i(he('Missing locale data for locale: "'.concat(a,'". ')+'Using default locale: "'.concat(o,'" as fallback.'))),n.locale=n.defaultLocale||"en"}return Object.assign({},n,{formatters:r,formatNumber:Je.bind(null,n,r.getNumberFormat),formatNumberToParts:Ke.bind(null,n,r.getNumberFormat),formatRelativeTime:et.bind(null,n,r.getRelativeTimeFormat),formatDate:nt.bind(null,n,r.getDateTimeFormat),formatDateToParts:ot.bind(null,n,r.getDateTimeFormat),formatTime:at.bind(null,n,r.getDateTimeFormat),formatTimeToParts:it.bind(null,n,r.getDateTimeFormat),formatPlural:st.bind(null,n,r.getPluralRules),formatMessage:pt.bind(null,n,r),formatHTMLMessage:dt.bind(null,n,r),formatList:wt.bind(null,n,r.getListFormat)})}var Pt=(function(e){function r(){var e;return s(this,r),(e=d(this,m(r).apply(this,arguments))).cache={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{}},e.state={cache:e.cache,intl:Ot(Ft(e.props),e.cache),prevConfig:Ft(e.props)},e}return f(r,e),l(r,[{key:"render",value:function(){return ge(this.state.intl),t.createElement($e,{value:this.state.intl},this.props.children)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=t.prevConfig,n=t.cache,a=Ft(e);return At(r,a)?null:{intl:Ot(a,n),prevConfig:a}}}]),r})(t.PureComponent);Pt.displayName="IntlProvider",Pt.defaultProps=ve;var Ct=se||ce;function xt(e){var t=Math.abs(e);return t<60?"second":t<3600?"minute":t<86400?"hour":"day"}function Et(e){switch(e){case"second":return 1;case"minute":return 60;case"hour":return 3600;default:return 86400}}function Tt(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return 3600*e}}var jt=["second","minute","hour"];function Dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"second";return jt.includes(e)}var Mt=(function(e){function r(e){var t,n,a;return s(this,r),(t=d(this,m(r).call(this,e)))._updateTimer=null,t.state={prevUnit:t.props.unit,prevValue:t.props.value,currentValueInSeconds:Dt(t.props.unit)?Tt(t.props.value,t.props.unit):0},n=e.updateIntervalInSeconds,a=e.unit,Ct(!n||n&&Dt(a),"Cannot schedule update with unit longer than hour"),t}return f(r,e),l(r,[{key:"scheduleNextUpdate",value:function(e,t){var r=this,n=e.updateIntervalInSeconds,a=e.unit,o=t.currentValueInSeconds;if(clearTimeout(this._updateTimer),this._updateTimer=null,n&&Dt(a)){var i=o-n,u=xt(i);if("day"!==u){var s=Et(u),c=i-i%s,l=c>=o?c-s:c,f=Math.abs(l-o);this._updateTimer=setTimeout((function(){return r.setState({currentValueInSeconds:l})}),1e3*f)}}}},{key:"componentDidMount",value:function(){this.scheduleNextUpdate(this.props,this.state)}},{key:"componentDidUpdate",value:function(){this.scheduleNextUpdate(this.props,this.state)}},{key:"componentWillUnmount",value:function(){clearTimeout(this._updateTimer),this._updateTimer=null}},{key:"render",value:function(){var e=this;return t.createElement(Ze.Consumer,null,(function(r){ge(r);var n=r.formatRelativeTime,a=r.textComponent,o=e.props,i=o.children,u=o.value,s=o.unit,c=o.updateIntervalInSeconds,l=e.state.currentValueInSeconds,f=u||0,m=s;if(Dt(s)&&"number"==typeof l&&c){var p=Et(m=xt(l));f=Math.round(l/p)}var d=n(f,m,Object.assign({},e.props));return"function"==typeof i?i(d):a?t.createElement(a,null,d):d}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.unit!==t.prevUnit||e.value!==t.prevValue?{prevValue:e.value,prevUnit:e.unit,currentValueInSeconds:Dt(e.unit)?Tt(e.value,e.unit):0}:null}}]),r})(t.PureComponent);Mt.displayName="FormattedRelativeTime",Mt.defaultProps={value:0,unit:"second"};var _t=function(e){var r=e.value,n=e.other,a=e.children,o=e.intl,i=o.formatPlural,u=o.textComponent,s=e[i(r,e)]||n;return"function"==typeof a?a(s):u?t.createElement(u,null,s):s};_t.defaultProps={type:"cardinal"},_t.displayName="FormattedPlural";var St=ze(_t),kt=function(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 a=0;for(n=Object.getOwnPropertySymbols(e);a needs to exist in the component ancestry. Using default message as fallback."),pt(Object.assign({},ve,{locale:"en"}),be(),e,t)},Nt=(function(e){function r(){return s(this,r),d(this,m(r).apply(this,arguments))}return f(r,e),l(r,[{key:"shouldComponentUpdate",value:function(e){var t=this.props,r=t.values,n=kt(t,["values"]),a=e.values,o=kt(e,["values"]);return!It(a,r)||!It(n,o)}},{key:"render",value:function(){var e=this;return t.createElement(Ze.Consumer,null,(function(r){e.props.defaultMessage||ge(r);var n=r||{},a=n.formatMessage,o=void 0===a?Rt:a,i=n.textComponent,u=void 0===i?t.Fragment:i,s=e.props,c=s.id,l=s.description,f=s.defaultMessage,m=s.values,p=s.children,d=s.tagName,h=void 0===d?u:d,v=o({id:c,description:l,defaultMessage:f},m);return Array.isArray(v)||(v=[v]),"function"==typeof p?p.apply(void 0,g(v)):h?t.createElement.apply(t,[h,null].concat(g(v))):v}))}}]),r})(t.Component);Nt.displayName="FormattedMessage",Nt.defaultProps={values:{}};var Lt=(function(e){function r(){return s(this,r),d(this,m(r).apply(this,arguments))}return f(r,e),l(r,[{key:"render",value:function(){var e=this;return t.createElement(Ze.Consumer,null,(function(r){e.props.defaultMessage||ge(r);var n=r.formatHTMLMessage,a=r.textComponent,o=e.props,i=o.id,u=o.description,s=o.defaultMessage,c=o.values,l=o.children,f=e.props.tagName;f||(f=a||"span");var m=n({id:i,description:u,defaultMessage:s},c);if("function"==typeof l)return l(m);var p={__html:m};return t.createElement(f,{dangerouslySetInnerHTML:p})}))}}]),r})(Nt);Lt.displayName="FormattedHTMLMessage",Lt.defaultProps=Object.assign({},Nt.defaultProps,{tagName:"span"});var $t=We("formatDate"),Zt=We("formatTime"),zt=We("formatNumber"),Ht=We("formatList"),Ut=qe("formatDate"),Bt=qe("formatTime");e.FormattedDate=$t,e.FormattedDateParts=Ut,e.FormattedHTMLMessage=Lt,e.FormattedList=Ht,e.FormattedMessage=Nt,e.FormattedNumber=zt,e.FormattedNumberParts=Ve,e.FormattedPlural=St,e.FormattedRelativeTime=Mt,e.FormattedTime=Zt,e.FormattedTimeParts=Bt,e.IntlContext=Ze,e.IntlProvider=Pt,e.RawIntlProvider=$e,e.createIntl=Ot,e.createIntlCache=ye,e.defineMessages=i,e.injectIntl=ze,e.useIntl=function(){var e=t.useContext(Ze);return ge(e),e},Object.defineProperty(e,"__esModule",{value:!0})})),define("modules/clean/i18n/formatters",["require","exports","tslib","react-intl"],(function(e,t,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=/%\((.*?)\)s/g;function o(e){return e.replace(a,"{$1}")}function i(e,t){return function(r,n){var a=r.id;if(a){var i=e[a];if("object"==typeof i&&n){var u=n[i.token],s=t.formatPlural(u),c=o(i.message(u));return t.formatMessage({id:a+"-"+s,defaultMessage:c},n)}}return n?t.formatMessage(r,n):t.formatMessage(r)}}var u=n.createIntlCache();function s(e,t,a){void 0===a&&(a=u),e=(function(e){return(e||"en").replace(/_/gi,"-")})(e);var s={},c={};Object.keys(t).forEach((function(e){var r=t[e];!(function(e){return"object"==typeof e})(r)?c[e]=o(r):s[e]=r}));var l=n.createIntl({locale:e,messages:c},a);return r.__assign({},l,{formatMessage:i(s,l)})}t.createFormatters=s,t.dummyI18nFormatters=s("en",{},n.createIntlCache())})); //# sourceMappingURL=pkg-icu-formatters.min.js-vfl2OHm50.map