Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

intl-messageformat

Package Overview
Dependencies
Maintainers
12
Versions
268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intl-messageformat - npm Package Compare versions

Comparing version 9.4.4 to 9.4.5

2

intl-messageformat.umd.min.js

@@ -15,2 +15,2 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).IntlMessageFormat={})}(this,(function(e){"use strict";

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var t=function(e,r){return(t=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,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n,a,i=function(){return(i=Object.assign||function e(t){for(var r,n=1,a=arguments.length;n<a;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t}).apply(this,arguments)};function o(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,u=i.length;o<u;o++,a++)n[a]=i[o];return n}function u(e){return e.type===n.literal}function s(e){return e.type===n.argument}function c(e){return e.type===n.number}function l(e){return e.type===n.date}function f(e){return e.type===n.time}function p(e){return e.type===n.select}function h(e){return e.type===n.plural}function g(e){return e.type===n.pound}function m(e){return e.type===n.tag}function d(e){return!(!e||"object"!=typeof e||0!==e.type)}function y(e){return!(!e||"object"!=typeof e||1!==e.type)}!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"}(n||(n={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(a||(a={}));var v=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,A=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,b=/^(@+)?(\+|#+)?$/g,w=/(\*)(0+)|(#+)(0+)|(0+)/g,C=/^(0+)$/;function x(e){var t={};return e.replace(b,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function E(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":return{currencySign:"accounting"};case"sign-always":return{signDisplay:"always"};case"sign-accounting-always":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":return{signDisplay:"never"}}}function D(e){return E(e)||{}}function F(e){for(var t={},r=0,n=e;r<n.length;r++){var a=n[r];switch(a.stem){case"percent":t.style="percent";continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":t.style="unit",t.unit=a.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=i(i(i({},t),{notation:"scientific"}),a.options.reduce((function(e,t){return i(i({},e),D(t))}),{}));continue;case"engineering":t=i(i(i({},t),{notation:"engineering"}),a.options.reduce((function(e,t){return i(i({},e),D(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(w,(function(e,r,n,a,i,o){if(r)t.minimumIntegerDigits=n.length;else{if(a&&i)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(C.test(a.stem))t.minimumIntegerDigits=a.stem.length;else if(A.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(A,(function(e,r,n,a,i,o){return"*"===n?t.minimumFractionDigits=r.length:a&&"#"===a[0]?t.maximumFractionDigits=a.length:i&&o?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+o.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""})),a.options.length&&(t=i(i({},t),x(a.options[0])))}else if(b.test(a.stem))t=i(i({},t),x(a.stem));else{var o=E(a.stem);o&&(t=i(i({},t),o))}}return t}var I=function(e){function t(r,n,a,i){var o=e.call(this)||this;return o.message=r,o.expected=n,o.found=a,o.location=i,o.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(o,t),o}return r(t,e),t.buildMessage=function(e,t){function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function n(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function i(e){switch(e.type){case"literal":return'"'+n(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function o(e){var t,r,n=e.map(i);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function u(e){return e?'"'+n(e)+'"':"end of input"}(t)+" found."},t}(Error),k=function S(e,t){t=void 0!==t?t:{};var r,a={},o={start:Te},u=Te,s=Ee("<",!1),c=function(e){return e.join("")},l=Ee("#",!1),f=Fe("tagElement"),p=Ee("/>",!1),h=Ee(">",!1),g=Ee("</",!1),m=Fe("argumentElement"),d=Ee("{",!1),y=Ee("}",!1),A=Fe("numberSkeletonId"),b=/^['\/{}]/,w=De(["'","/","{","}"],!1,!1),C={type:"any"},x=Fe("numberSkeletonTokenOption"),E=Ee("/",!1),D=Fe("numberSkeletonToken"),k=Ee("::",!1),S=function(e){return rt.pop(),e.replace(/\s*$/,"")},T=Ee(",",!1),O=Ee("number",!1),_=function(e,t,r){return i({type:"number"===t?n.number:"date"===t?n.date:n.time,style:r&&r[2],value:e},at())},j=Ee("'",!1),N=/^[^']/,R=De(["'"],!0,!1),L=/^[^a-zA-Z'{}]/,P=De([["a","z"],["A","Z"],"'","{","}"],!0,!1),z=/^[a-zA-Z]/,M=De([["a","z"],["A","Z"]],!1,!1),V=Ee("date",!1),Z=Ee("time",!1),B=Ee("plural",!1),U=Ee("selectordinal",!1),G=Ee("offset:",!1),H=Ee("select",!1),$=Ee("=",!1),W=Fe("whitespace"),Y=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,q=De([["\t","\r"]," ","…"," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),X=Fe("syntax pattern"),J=/^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,K=De([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),Q=Fe("optional whitespace"),ee=Fe("number"),te=Ee("-",!1),re=Fe("double apostrophes"),ne=Ee("''",!1),ae=Ee("\n",!1),ie=Fe("argNameOrNumber"),oe=Fe("validTag"),ue=Fe("argNumber"),se=Ee("0",!1),ce=/^[1-9]/,le=De([["1","9"]],!1,!1),fe=/^[0-9]/,pe=De([["0","9"]],!1,!1),he=Fe("argName"),ge=Fe("tagName"),me=0,de=0,ye=[{line:1,column:1}],ve=0,Ae=[],be=0;if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');u=o[t.startRule]}function we(){return e.substring(de,me)}function Ce(){return ke(de,me)}function xe(e,t){throw function r(e,t){return new I(e,[],"",t)}(e,t=void 0!==t?t:ke(de,me))}function Ee(e,t){return{type:"literal",text:e,ignoreCase:t}}function De(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Fe(e){return{type:"other",description:e}}function Ie(t){var r,n=ye[t];if(n)return n;for(r=t-1;!ye[r];)r--;for(n={line:(n=ye[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return ye[t]=n,n}function ke(e,t){var r=Ie(e),n=Ie(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function Se(e){me<ve||(me>ve&&(ve=me,Ae=[]),Ae.push(e))}function Te(){return Oe()}function Oe(){var e,t;for(e=[],t=_e();t!==a;)e.push(t),t=_e();return e}function _e(){var t,r;return t=me,de=me,(it?a:void 0)!==a&&(r=function o(){var e,t,r,o,u,s,c;return be++,(e=Re())===a&&(e=me,(t=Le())!==a&&(r=Oe())!==a&&(o=Pe())!==a?(de=e,s=r,(u=t)!==(c=o)&&xe('Mismatch tag "'+u+'" !== "'+c+'"',Ce()),e=t=i({type:n.tag,value:u,children:s},at())):(me=e,e=a)),be--,e===a&&(t=a,0===be&&Se(f)),e}())!==a?(de=t,t=r):(me=t,t=a),t===a&&(t=function u(){var e,t;return e=me,(t=je())!==a&&(de=e,t=i({type:n.literal,value:t},at())),t}())===a&&(t=function s(){var t,r,o,u;return be++,t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a&&We()!==a&&(o=Ke())!==a&&We()!==a?(125===e.charCodeAt(me)?(u="}",me++):(u=a,0===be&&Se(y)),u!==a?(de=t,t=r=i({type:n.argument,value:o},at())):(me=t,t=a)):(me=t,t=a),be--,t===a&&(r=a,0===be&&Se(m)),t}())===a&&(t=function c(){var t;return(t=function r(){var t,r,n,o,u,s,c,l,f;return t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a&&We()!==a&&(n=Ke())!==a&&We()!==a?(44===e.charCodeAt(me)?(o=",",me++):(o=a,0===be&&Se(T)),o!==a&&We()!==a?("number"===e.substr(me,6)?(u="number",me+=6):(u=a,0===be&&Se(O)),u!==a&&We()!==a?(s=me,44===e.charCodeAt(me)?(c=",",me++):(c=a,0===be&&Se(T)),c!==a&&(l=We())!==a&&(f=function p(){var t,r,n;return t=me,"::"===e.substr(me,2)?(r="::",me+=2):(r=a,0===be&&Se(k)),r!==a&&(n=function o(){var e,t,r,n;if(e=me,t=[],(r=Ve())!==a)for(;r!==a;)t.push(r),r=Ve();else t=a;return t!==a&&(de=e,t=i({type:0,tokens:n=t,parsedOptions:ot?F(n):{}},at())),t}())!==a?(de=t,t=r=n):(me=t,t=a),t===a&&(t=me,de=me,rt.push("numberArgStyle"),(r=(r=!0)?void 0:a)!==a&&(n=je())!==a?(de=t,t=r=S(n)):(me=t,t=a)),t}())!==a?s=c=[c,l,f]:(me=s,s=a),s===a&&(s=null),s!==a&&(c=We())!==a?(125===e.charCodeAt(me)?(l="}",me++):(l=a,0===be&&Se(y)),l!==a?(de=t,t=r=_(n,u,s)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a),t}())===a&&(t=function n(){var t,r,n,o,u,s,c,l,f;return t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a&&We()!==a&&(n=Ke())!==a&&We()!==a?(44===e.charCodeAt(me)?(o=",",me++):(o=a,0===be&&Se(T)),o!==a&&We()!==a?("date"===e.substr(me,4)?(u="date",me+=4):(u=a,0===be&&Se(V)),u===a&&("time"===e.substr(me,4)?(u="time",me+=4):(u=a,0===be&&Se(Z))),u!==a&&We()!==a?(s=me,44===e.charCodeAt(me)?(c=",",me++):(c=a,0===be&&Se(T)),c!==a&&(l=We())!==a&&(f=function p(){var t,r,n;return t=me,"::"===e.substr(me,2)?(r="::",me+=2):(r=a,0===be&&Se(k)),r!==a&&(n=function o(){var t,r,n,o,u,s,c;if(t=me,r=me,n=[],(o=Ze())===a&&(o=Be()),o!==a)for(;o!==a;)n.push(o),(o=Ze())===a&&(o=Be());else n=a;return(r=n!==a?e.substring(r,me):n)!==a&&(de=t,r=i({type:1,pattern:u=r,parsedOptions:ot?(s=u,c={},s.replace(v,(function(e){var t=e.length;switch(e[0]){case"G":c.era=4===t?"long":5===t?"narrow":"short";break;case"y":c.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":c.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":c.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":c.weekday=4===t?"short":5===t?"narrow":"short";break;case"e":if(t<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");c.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");c.weekday=["short","long","narrow","short"][t-4];break;case"a":c.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":c.hourCycle="h12",c.hour=["numeric","2-digit"][t-1];break;case"H":c.hourCycle="h23",c.hour=["numeric","2-digit"][t-1];break;case"K":c.hourCycle="h11",c.hour=["numeric","2-digit"][t-1];break;case"k":c.hourCycle="h24",c.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":c.minute=["numeric","2-digit"][t-1];break;case"s":c.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":c.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),c):{}},at())),r}())!==a?(de=t,t=r=n):(me=t,t=a),t===a&&(t=me,de=me,rt.push("dateOrTimeArgStyle"),(r=(r=!0)?void 0:a)!==a&&(n=je())!==a?(de=t,t=r=S(n)):(me=t,t=a)),t}())!==a?s=c=[c,l,f]:(me=s,s=a),s===a&&(s=null),s!==a&&(c=We())!==a?(125===e.charCodeAt(me)?(l="}",me++):(l=a,0===be&&Se(y)),l!==a?(de=t,t=r=_(n,u,s)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a),t}()),t}())===a&&(t=function p(){var t,r,o,u,s,c,l,f,p,h,g;if(t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a)if(We()!==a)if((o=Ke())!==a)if(We()!==a)if(44===e.charCodeAt(me)?(u=",",me++):(u=a,0===be&&Se(T)),u!==a)if(We()!==a)if("plural"===e.substr(me,6)?(s="plural",me+=6):(s=a,0===be&&Se(B)),s===a&&("selectordinal"===e.substr(me,13)?(s="selectordinal",me+=13):(s=a,0===be&&Se(U))),s!==a)if(We()!==a)if(44===e.charCodeAt(me)?(c=",",me++):(c=a,0===be&&Se(T)),c!==a)if(We()!==a)if(l=me,"offset:"===e.substr(me,7)?(f="offset:",me+=7):(f=a,0===be&&Se(G)),f!==a&&(p=We())!==a&&(h=Ye())!==a?l=f=[f,p,h]:(me=l,l=a),l===a&&(l=null),l!==a)if((f=We())!==a){if(p=[],(h=Ge())!==a)for(;h!==a;)p.push(h),h=Ge();else p=a;p!==a&&(h=We())!==a?(125===e.charCodeAt(me)?(g="}",me++):(g=a,0===be&&Se(y)),g!==a?(de=t,t=r=function(e,t,r,a){return i({type:n.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:r?r[2]:0,options:a.reduce((function(e,t){var r=t.id,n=t.value,a=t.location;return r in e&&xe('Duplicate option "'+r+'" in plural element: "'+we()+'"',Ce()),e[r]={value:n,location:a},e}),{})},at())}(o,s,l,p)):(me=t,t=a)):(me=t,t=a)}else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;return t}())===a&&(t=function h(){var t,r,o,u,s,c,l,f,p;if(t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a)if(We()!==a)if((o=Ke())!==a)if(We()!==a)if(44===e.charCodeAt(me)?(u=",",me++):(u=a,0===be&&Se(T)),u!==a)if(We()!==a)if("select"===e.substr(me,6)?(s="select",me+=6):(s=a,0===be&&Se(H)),s!==a)if(We()!==a)if(44===e.charCodeAt(me)?(c=",",me++):(c=a,0===be&&Se(T)),c!==a)if(We()!==a){if(l=[],(f=Ue())!==a)for(;f!==a;)l.push(f),f=Ue();else l=a;l!==a&&(f=We())!==a?(125===e.charCodeAt(me)?(p="}",me++):(p=a,0===be&&Se(y)),p!==a?(de=t,t=r=function(e,t){return i({type:n.select,value:e,options:t.reduce((function(e,t){var r=t.id,n=t.value,a=t.location;return r in e&&xe('Duplicate option "'+r+'" in select element: "'+we()+'"',Ce()),e[r]={value:n,location:a},e}),{})},at())}(o,l)):(me=t,t=a)):(me=t,t=a)}else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;return t}())===a&&(t=function g(){var t,r;return t=me,35===e.charCodeAt(me)?(r="#",me++):(r=a,0===be&&Se(l)),r!==a&&(de=t,r=i({type:n.pound},at())),r}()),t}function je(){var t,r,n,i;if(t=me,de=me,(r=(r=it)?void 0:a)!==a){if(n=[],(i=qe())===a&&(i=Xe())===a&&(i=Je())===a&&(60===e.charCodeAt(me)?(i="<",me++):(i=a,0===be&&Se(s))),i!==a)for(;i!==a;)n.push(i),(i=qe())===a&&(i=Xe())===a&&(i=Je())===a&&(60===e.charCodeAt(me)?(i="<",me++):(i=a,0===be&&Se(s)));else n=a;n!==a?(de=t,t=r=c(n)):(me=t,t=a)}else me=t,t=a;if(t===a){if(t=me,r=[],(n=qe())===a&&(n=Xe())===a&&(n=Je())===a&&(n=Ne()),n!==a)for(;n!==a;)r.push(n),(n=qe())===a&&(n=Xe())===a&&(n=Je())===a&&(n=Ne());else r=a;r!==a&&(de=t,r=c(r)),t=r}return t}function Ne(){var t,r,n;return t=me,r=me,be++,(n=Le())===a&&(n=Pe())===a&&(n=Re()),be--,n===a?r=void 0:(me=r,r=a),r!==a?(60===e.charCodeAt(me)?(n="<",me++):(n=a,0===be&&Se(s)),n!==a?(de=t,t=r="<"):(me=t,t=a)):(me=t,t=a),t}function Re(){var t,r,o,u,c,l;return t=me,r=me,60===e.charCodeAt(me)?(o="<",me++):(o=a,0===be&&Se(s)),o!==a&&(u=Qe())!==a&&(c=We())!==a?("/>"===e.substr(me,2)?(l="/>",me+=2):(l=a,0===be&&Se(p)),l!==a?r=o=[o,u,c,l]:(me=r,r=a)):(me=r,r=a),r!==a&&(de=t,r=i({type:n.literal,value:r.join("")},at())),r}function Le(){var t,r,n,i;return t=me,60===e.charCodeAt(me)?(r="<",me++):(r=a,0===be&&Se(s)),r!==a&&(n=Qe())!==a?(62===e.charCodeAt(me)?(i=">",me++):(i=a,0===be&&Se(h)),i!==a?(de=t,t=r=n):(me=t,t=a)):(me=t,t=a),t}function Pe(){var t,r,n,i;return t=me,"</"===e.substr(me,2)?(r="</",me+=2):(r=a,0===be&&Se(g)),r!==a&&(n=Qe())!==a?(62===e.charCodeAt(me)?(i=">",me++):(i=a,0===be&&Se(h)),i!==a?(de=t,t=r=n):(me=t,t=a)):(me=t,t=a),t}function ze(){var t,r,n,i,o;if(be++,t=me,r=[],n=me,i=me,be++,(o=He())===a&&(b.test(e.charAt(me))?(o=e.charAt(me),me++):(o=a,0===be&&Se(w))),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(C)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a),n!==a)for(;n!==a;)r.push(n),n=me,i=me,be++,(o=He())===a&&(b.test(e.charAt(me))?(o=e.charAt(me),me++):(o=a,0===be&&Se(w))),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(C)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a);else r=a;return t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(A)),t}function Me(){var t,r,n;return be++,t=me,47===e.charCodeAt(me)?(r="/",me++):(r=a,0===be&&Se(E)),r!==a&&(n=ze())!==a?(de=t,t=r=n):(me=t,t=a),be--,t===a&&(r=a,0===be&&Se(x)),t}function Ve(){var e,t,r,n;if(be++,e=me,We()!==a)if((t=ze())!==a){for(r=[],n=Me();n!==a;)r.push(n),n=Me();r!==a?(de=e,e=function(e,t){return{stem:e,options:t}}(t,r)):(me=e,e=a)}else me=e,e=a;else me=e,e=a;return be--,e===a&&0===be&&Se(D),e}function Ze(){var t,r,n,i;if(t=me,39===e.charCodeAt(me)?(r="'",me++):(r=a,0===be&&Se(j)),r!==a){if(n=[],(i=qe())===a&&(N.test(e.charAt(me))?(i=e.charAt(me),me++):(i=a,0===be&&Se(R))),i!==a)for(;i!==a;)n.push(i),(i=qe())===a&&(N.test(e.charAt(me))?(i=e.charAt(me),me++):(i=a,0===be&&Se(R)));else n=a;n!==a?(39===e.charCodeAt(me)?(i="'",me++):(i=a,0===be&&Se(j)),i!==a?t=r=[r,n,i]:(me=t,t=a)):(me=t,t=a)}else me=t,t=a;if(t===a)if(t=[],(r=qe())===a&&(L.test(e.charAt(me))?(r=e.charAt(me),me++):(r=a,0===be&&Se(P))),r!==a)for(;r!==a;)t.push(r),(r=qe())===a&&(L.test(e.charAt(me))?(r=e.charAt(me),me++):(r=a,0===be&&Se(P)));else t=a;return t}function Be(){var t,r;if(t=[],z.test(e.charAt(me))?(r=e.charAt(me),me++):(r=a,0===be&&Se(M)),r!==a)for(;r!==a;)t.push(r),z.test(e.charAt(me))?(r=e.charAt(me),me++):(r=a,0===be&&Se(M));else t=a;return t}function Ue(){var t,r,n,o,u,s,c;return t=me,We()!==a&&(r=tt())!==a&&We()!==a?(123===e.charCodeAt(me)?(n="{",me++):(n=a,0===be&&Se(d)),n!==a?(de=me,rt.push("select"),void 0!==a&&(o=Oe())!==a?(125===e.charCodeAt(me)?(u="}",me++):(u=a,0===be&&Se(y)),u!==a?(de=t,s=r,c=o,rt.pop(),t=i({id:s,value:c},at())):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a),t}function Ge(){var t,r,n,o,u,s,c;return t=me,We()!==a&&(r=function l(){var t,r,n,i;return t=me,r=me,61===e.charCodeAt(me)?(n="=",me++):(n=a,0===be&&Se($)),n!==a&&(i=Ye())!==a?r=n=[n,i]:(me=r,r=a),(t=r!==a?e.substring(t,me):r)===a&&(t=tt()),t}())!==a&&We()!==a?(123===e.charCodeAt(me)?(n="{",me++):(n=a,0===be&&Se(d)),n!==a?(de=me,rt.push("plural"),void 0!==a&&(o=Oe())!==a?(125===e.charCodeAt(me)?(u="}",me++):(u=a,0===be&&Se(y)),u!==a?(de=t,s=r,c=o,rt.pop(),t=i({id:s,value:c},at())):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a),t}function He(){var t;return be++,Y.test(e.charAt(me))?(t=e.charAt(me),me++):(t=a,0===be&&Se(q)),be--,t===a&&0===be&&Se(W),t}function $e(){var t;return be++,J.test(e.charAt(me))?(t=e.charAt(me),me++):(t=a,0===be&&Se(K)),be--,t===a&&0===be&&Se(X),t}function We(){var t,r,n;for(be++,t=me,r=[],n=He();n!==a;)r.push(n),n=He();return t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(Q)),t}function Ye(){var t,r,n,i;return be++,t=me,45===e.charCodeAt(me)?(r="-",me++):(r=a,0===be&&Se(te)),r===a&&(r=null),r!==a&&(n=et())!==a?(de=t,t=r=(i=n)?r?-i:i:0):(me=t,t=a),be--,t===a&&(r=a,0===be&&Se(ee)),t}function qe(){var t,r;return be++,t=me,"''"===e.substr(me,2)?(r="''",me+=2):(r=a,0===be&&Se(ne)),r!==a&&(de=t,r="'"),be--,(t=r)===a&&(r=a,0===be&&Se(re)),t}function Xe(){var t,r,n,i,o,u;if(t=me,39===e.charCodeAt(me)?(r="'",me++):(r=a,0===be&&Se(j)),r!==a)if((n=function s(){var t,r,n,i,o;return t=me,r=me,e.length>me?(n=e.charAt(me),me++):(n=a,0===be&&Se(C)),n!==a?(de=me,(i=(i="<"===(o=n)||">"===o||"{"===o||"}"===o||nt()&&"#"===o)?void 0:a)!==a?r=n=[n,i]:(me=r,r=a)):(me=r,r=a),r!==a?e.substring(t,me):r}())!==a){for(i=me,o=[],"''"===e.substr(me,2)?(u="''",me+=2):(u=a,0===be&&Se(ne)),u===a&&(N.test(e.charAt(me))?(u=e.charAt(me),me++):(u=a,0===be&&Se(R)));u!==a;)o.push(u),"''"===e.substr(me,2)?(u="''",me+=2):(u=a,0===be&&Se(ne)),u===a&&(N.test(e.charAt(me))?(u=e.charAt(me),me++):(u=a,0===be&&Se(R)));(i=o!==a?e.substring(i,me):o)!==a?(39===e.charCodeAt(me)?(o="'",me++):(o=a,0===be&&Se(j)),o===a&&(o=null),o!==a?(de=t,t=r=n+i.replace("''","'")):(me=t,t=a)):(me=t,t=a)}else me=t,t=a;else me=t,t=a;return t}function Je(){var t,r,n,i,o;return t=me,r=me,e.length>me?(n=e.charAt(me),me++):(n=a,0===be&&Se(C)),n!==a?(de=me,(i=(i=!("<"===(o=n)||"{"===o||nt()&&"#"===o||function u(){return rt.length>1}()&&"}"===o))?void 0:a)!==a?r=n=[n,i]:(me=r,r=a)):(me=r,r=a),r===a&&(10===e.charCodeAt(me)?(r="\n",me++):(r=a,0===be&&Se(ae))),r!==a?e.substring(t,me):r}function Ke(){var t,r;return be++,t=me,(r=et())===a&&(r=tt()),t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(ie)),t}function Qe(){var t,r;return be++,t=me,(r=et())===a&&(r=function n(){var t,r,n,i,o;if(be++,t=me,r=[],45===e.charCodeAt(me)?(n="-",me++):(n=a,0===be&&Se(te)),n===a&&(n=me,i=me,be++,(o=He())===a&&(o=$e()),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(C)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a)),n!==a)for(;n!==a;)r.push(n),45===e.charCodeAt(me)?(n="-",me++):(n=a,0===be&&Se(te)),n===a&&(n=me,i=me,be++,(o=He())===a&&(o=$e()),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(C)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a));else r=a;return t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(ge)),t}()),t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(oe)),t}function et(){var t,r,n,i,o;if(be++,t=me,48===e.charCodeAt(me)?(r="0",me++):(r=a,0===be&&Se(se)),r!==a&&(de=t,r=0),(t=r)===a){if(t=me,r=me,ce.test(e.charAt(me))?(n=e.charAt(me),me++):(n=a,0===be&&Se(le)),n!==a){for(i=[],fe.test(e.charAt(me))?(o=e.charAt(me),me++):(o=a,0===be&&Se(pe));o!==a;)i.push(o),fe.test(e.charAt(me))?(o=e.charAt(me),me++):(o=a,0===be&&Se(pe));i!==a?r=n=[n,i]:(me=r,r=a)}else me=r,r=a;r!==a&&(de=t,r=parseInt(r.join(""),10)),t=r}return be--,t===a&&(r=a,0===be&&Se(ue)),t}function tt(){var t,r,n,i,o;if(be++,t=me,r=[],n=me,i=me,be++,(o=He())===a&&(o=$e()),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(C)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a),n!==a)for(;n!==a;)r.push(n),n=me,i=me,be++,(o=He())===a&&(o=$e()),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(C)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a);else r=a;return t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(he)),t}var rt=["root"];function nt(){return"plural"===rt[rt.length-1]}function at(){return t&&t.captureLocation?{location:Ce()}:{}}var it=t&&t.ignoreTag,ot=t&&t.shouldParseSkeleton;if((r=u())!==a&&me===e.length)return r;throw r!==a&&me<e.length&&Se({type:"end"}),function ut(e,t,r){return new I(I.buildMessage(e,t),e,t,r)}(Ae,ve<e.length?e.charAt(ve):null,ke(ve,ve<e.length?ve+1:ve))},T=/(^|[^\\])#/g;function O(e,t){t=i({normalizeHashtagInPlural:!0,shouldParseSkeleton:!0},t||{});var r=k(e,t);return t.normalizeHashtagInPlural&&function e(t){t.forEach((function(t){(h(t)||p(t))&&Object.keys(t.options).forEach((function(r){for(var n,a=t.options[r],i=-1,s=void 0,c=0;c<a.value.length;c++){var l=a.value[c];if(u(l)&&T.test(l.value)){i=c,s=l;break}}if(s){var f=s.value.replace(T,"$1{"+t.value+", number}"),p=k(f);(n=a.value).splice.apply(n,o([i,1],p))}e(a.value)}))}))}(r),r}function _(e,t,r,n){var a=function i(e){return null==e||"number"==typeof e||"boolean"==typeof e}(n)?n:r(n),o=t.get(a);return void 0===o&&(o=e.call(this,n),t.set(a,o)),o}function j(e,t,r){var n=Array.prototype.slice.call(arguments,3),a=r(n),i=t.get(a);return void 0===i&&(i=e.apply(this,n),t.set(a,i)),i}function N(e,t,r,n,a){return r.bind(t,e,n,a)}function R(e,t){return N(e,this,1===e.length?_:j,t.cache.create(),t.serializer)}function L(){return JSON.stringify(arguments)}function P(){this.cache=Object.create(null)}P.prototype.has=function(e){return e in this.cache},P.prototype.get=function(e){return this.cache[e]},P.prototype.set=function(e,t){this.cache[e]=t};var z={create:function e(){return new P}},M=function V(e,t){return(t&&t.strategy?t.strategy:R)(e,{cache:t&&t.cache?t.cache:z,serializer:t&&t.serializer?t.serializer:L})},Z={variadic:function B(e,t){return N(e,this,j,t.cache.create(),t.serializer)},monadic:function U(e,t){return N(e,this,_,t.cache.create(),t.serializer)}};M.strategies=Z;var G,H=Object.freeze(Object.assign(Object.create(null),M,{default:M,strategies:Z}));(G=e.ErrorCode||(e.ErrorCode={})).MISSING_VALUE="MISSING_VALUE",G.INVALID_VALUE="INVALID_VALUE",G.MISSING_INTL_API="MISSING_INTL_API";var $,W=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.code=r,a.originalMessage=n,a}return r(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),Y=function(e){function t(t,r,n,a){return e.call(this,'Invalid values for "'+t+'": "'+r+'". Options are "'+Object.keys(n).join('", "')+'"',"INVALID_VALUE",a)||this}return r(t,e),t}(W),q=function(e){function t(t,r,n){return e.call(this,'Value for "'+t+'" must be of type '+r,"INVALID_VALUE",n)||this}return r(t,e),t}(W),X=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 r(t,e),t}(W);function J(e){return"function"==typeof e}function K(e,t,r,n,a,i,o){if(1===e.length&&u(e[0]))return[{type:0,value:e[0].value}];for(var v=[],A=0,b=e;A<b.length;A++){var w=b[A];if(u(w))v.push({type:0,value:w.value});else if(g(w))"number"==typeof i&&v.push({type:0,value:r.getNumberFormat(t).format(i)});else{var C=w.value;if(!a||!(C in a))throw new X(C,o);var x=a[C];if(s(w))x&&"string"!=typeof x&&"number"!=typeof x||(x="string"==typeof x||"number"==typeof x?String(x):""),v.push({type:"string"==typeof x?0:1,value:x});else if(l(w)){var E="string"==typeof w.style?n.date[w.style]:y(w.style)?w.style.parsedOptions:void 0;v.push({type:0,value:r.getDateTimeFormat(t,E).format(x)})}else if(f(w))E="string"==typeof w.style?n.time[w.style]:y(w.style)?w.style.parsedOptions:void 0,v.push({type:0,value:r.getDateTimeFormat(t,E).format(x)});else if(c(w))(E="string"==typeof w.style?n.number[w.style]:d(w.style)?w.style.parsedOptions:void 0)&&E.scale&&(x*=E.scale||1),v.push({type:0,value:r.getNumberFormat(t,E).format(x)});else{if(m(w)){var D=w.children,F=w.value,I=a[F];if(!J(I))throw new q(F,"function",o);var k=I(K(D,t,r,n,a,i).map((function(e){return e.value})));Array.isArray(k)||(k=[k]),v.push.apply(v,k.map((function(e){return{type:"string"==typeof e?0:1,value:e}})))}if(p(w)){if(!(S=w.options[x]||w.options.other))throw new Y(w.value,x,Object.keys(w.options),o);v.push.apply(v,K(S.value,t,r,n,a))}else if(h(w)){var S;if(!(S=w.options["="+x])){if(!Intl.PluralRules)throw new W('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',"MISSING_INTL_API",o);var T=r.getPluralRules(t,{type:w.pluralType}).select(x-(w.offset||0));S=w.options[T]||w.options.other}if(!S)throw new Y(w.value,x,Object.keys(w.options),o);v.push.apply(v,K(S.value,t,r,n,a,x-(w.offset||0)))}}}}return function O(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}),[])}(v)}function Q(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}}}}}($=e.PART_TYPE||(e.PART_TYPE={}))[$.literal=0]="literal",$[$.object=1]="object";var ee=M||H,te=function(){function e(t,r,n,a){var u=this;if(void 0===r&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=u.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 K(u.ast,u.locales,u.formatters,u.formats,e,void 0,u.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(u.locales)[0]}},this.getAst=function(){return u.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==a?void 0:a.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 s(e,t){return t?Object.keys(e).reduce((function(r,n){return r[n]=function a(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=a&&a.formatters||function c(e){return void 0===e&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ee((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,o([void 0],t)))}),{cache:Q(e.number),strategy:ee.strategies.variadic}),getDateTimeFormat:ee((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,o([void 0],t)))}),{cache:Q(e.dateTime),strategy:ee.strategies.variadic}),getPluralRules:ee((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,o([void 0],t)))}),{cache:Q(e.pluralRules),strategy:ee.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=O,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.FormatError=W,e.IntlMessageFormat=te,e.InvalidValueError=Y,e.InvalidValueTypeError=q,e.MissingValueError=X,e.default=te,e.formatToParts=K,e.isFormatXMLElementFn=J,Object.defineProperty(e,"__esModule",{value:!0})}));
***************************************************************************** */var t=function(e,r){return(t=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,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n,a,i=function(){return(i=Object.assign||function e(t){for(var r,n=1,a=arguments.length;n<a;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t}).apply(this,arguments)};function o(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,u=i.length;o<u;o++,a++)n[a]=i[o];return n}function u(e){return e.type===n.literal}function s(e){return e.type===n.argument}function c(e){return e.type===n.number}function l(e){return e.type===n.date}function f(e){return e.type===n.time}function p(e){return e.type===n.select}function h(e){return e.type===n.plural}function g(e){return e.type===n.pound}function m(e){return e.type===n.tag}function d(e){return!(!e||"object"!=typeof e||0!==e.type)}function y(e){return!(!e||"object"!=typeof e||1!==e.type)}!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"}(n||(n={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(a||(a={}));var v=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,A=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,b=/^(@+)?(\+|#+)?$/g,w=/(\*)(0+)|(#+)(0+)|(0+)/g,x=/^(0+)$/;function C(e){var t={};return e.replace(b,(function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""})),t}function E(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function D(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!x.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function F(e){return E(e)||{}}function I(e){for(var t={},r=0,n=e;r<n.length;r++){var a=n[r];switch(a.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=a.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=a.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=i(i(i({},t),{notation:"scientific"}),a.options.reduce((function(e,t){return i(i({},e),F(t))}),{}));continue;case"engineering":t=i(i(i({},t),{notation:"engineering"}),a.options.reduce((function(e,t){return i(i({},e),F(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(a.options[0]);continue;case"integer-width":if(a.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(w,(function(e,r,n,a,i,o){if(r)t.minimumIntegerDigits=n.length;else{if(a&&i)throw new Error("We currently do not support maximum integer digits");if(o)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(x.test(a.stem))t.minimumIntegerDigits=a.stem.length;else if(A.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(A,(function(e,r,n,a,i,o){return"*"===n?t.minimumFractionDigits=r.length:a&&"#"===a[0]?t.maximumFractionDigits=a.length:i&&o?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+o.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""})),a.options.length&&(t=i(i({},t),C(a.options[0])))}else if(b.test(a.stem))t=i(i({},t),C(a.stem));else{var o=E(a.stem);o&&(t=i(i({},t),o));var u=D(a.stem);u&&(t=i(i({},t),u))}}return t}var k=function(e){function t(r,n,a,i){var o=e.call(this)||this;return o.message=r,o.expected=n,o.found=a,o.location=i,o.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(o,t),o}return r(t,e),t.buildMessage=function(e,t){function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function n(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function i(e){switch(e.type){case"literal":return'"'+n(e.text)+'"';case"class":var t=e.parts.map((function(e){return Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e)}));return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function o(e){var t,r,n=e.map(i);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function u(e){return e?'"'+n(e)+'"':"end of input"}(t)+" found."},t}(Error),S=function T(e,t){t=void 0!==t?t:{};var r,a={},o={start:Te},u=Te,s=Ee("<",!1),c=function(e){return e.join("")},l=Ee("#",!1),f=Fe("tagElement"),p=Ee("/>",!1),h=Ee(">",!1),g=Ee("</",!1),m=Fe("argumentElement"),d=Ee("{",!1),y=Ee("}",!1),A=Fe("numberSkeletonId"),b=/^['\/{}]/,w=De(["'","/","{","}"],!1,!1),x={type:"any"},C=Fe("numberSkeletonTokenOption"),E=Ee("/",!1),D=Fe("numberSkeletonToken"),F=Ee("::",!1),S=function(e){return rt.pop(),e.replace(/\s*$/,"")},T=Ee(",",!1),O=Ee("number",!1),_=function(e,t,r){return i({type:"number"===t?n.number:"date"===t?n.date:n.time,style:r&&r[2],value:e},at())},j=Ee("'",!1),N=/^[^']/,R=De(["'"],!0,!1),L=/^[^a-zA-Z'{}]/,P=De([["a","z"],["A","Z"],"'","{","}"],!0,!1),z=/^[a-zA-Z]/,M=De([["a","z"],["A","Z"]],!1,!1),V=Ee("date",!1),Z=Ee("time",!1),B=Ee("plural",!1),U=Ee("selectordinal",!1),G=Ee("offset:",!1),H=Ee("select",!1),K=Ee("=",!1),$=Fe("whitespace"),W=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Y=De([["\t","\r"]," ","…"," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),q=Fe("syntax pattern"),X=/^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/,J=De([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←","⑟"],["─","❵"],["➔","⯿"],["⸀","⹿"],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),Q=Fe("optional whitespace"),ee=Fe("number"),te=Ee("-",!1),re=Fe("double apostrophes"),ne=Ee("''",!1),ae=Ee("\n",!1),ie=Fe("argNameOrNumber"),oe=Fe("validTag"),ue=Fe("argNumber"),se=Ee("0",!1),ce=/^[1-9]/,le=De([["1","9"]],!1,!1),fe=/^[0-9]/,pe=De([["0","9"]],!1,!1),he=Fe("argName"),ge=Fe("tagName"),me=0,de=0,ye=[{line:1,column:1}],ve=0,Ae=[],be=0;if(void 0!==t.startRule){if(!(t.startRule in o))throw new Error("Can't start parsing from rule \""+t.startRule+'".');u=o[t.startRule]}function we(){return e.substring(de,me)}function xe(){return ke(de,me)}function Ce(e,t){throw function r(e,t){return new k(e,[],"",t)}(e,t=void 0!==t?t:ke(de,me))}function Ee(e,t){return{type:"literal",text:e,ignoreCase:t}}function De(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Fe(e){return{type:"other",description:e}}function Ie(t){var r,n=ye[t];if(n)return n;for(r=t-1;!ye[r];)r--;for(n={line:(n=ye[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return ye[t]=n,n}function ke(e,t){var r=Ie(e),n=Ie(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function Se(e){me<ve||(me>ve&&(ve=me,Ae=[]),Ae.push(e))}function Te(){return Oe()}function Oe(){var e,t;for(e=[],t=_e();t!==a;)e.push(t),t=_e();return e}function _e(){var t,r;return t=me,de=me,(it?a:void 0)!==a&&(r=function o(){var e,t,r,o,u,s,c;return be++,(e=Re())===a&&(e=me,(t=Le())!==a&&(r=Oe())!==a&&(o=Pe())!==a?(de=e,s=r,(u=t)!==(c=o)&&Ce('Mismatch tag "'+u+'" !== "'+c+'"',xe()),e=t=i({type:n.tag,value:u,children:s},at())):(me=e,e=a)),be--,e===a&&(t=a,0===be&&Se(f)),e}())!==a?(de=t,t=r):(me=t,t=a),t===a&&(t=function u(){var e,t;return e=me,(t=je())!==a&&(de=e,t=i({type:n.literal,value:t},at())),t}())===a&&(t=function s(){var t,r,o,u;return be++,t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a&&$e()!==a&&(o=Je())!==a&&$e()!==a?(125===e.charCodeAt(me)?(u="}",me++):(u=a,0===be&&Se(y)),u!==a?(de=t,t=r=i({type:n.argument,value:o},at())):(me=t,t=a)):(me=t,t=a),be--,t===a&&(r=a,0===be&&Se(m)),t}())===a&&(t=function c(){var t;return(t=function r(){var t,r,n,o,u,s,c,l,f;return t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a&&$e()!==a&&(n=Je())!==a&&$e()!==a?(44===e.charCodeAt(me)?(o=",",me++):(o=a,0===be&&Se(T)),o!==a&&$e()!==a?("number"===e.substr(me,6)?(u="number",me+=6):(u=a,0===be&&Se(O)),u!==a&&$e()!==a?(s=me,44===e.charCodeAt(me)?(c=",",me++):(c=a,0===be&&Se(T)),c!==a&&(l=$e())!==a&&(f=function p(){var t,r,n;return t=me,"::"===e.substr(me,2)?(r="::",me+=2):(r=a,0===be&&Se(F)),r!==a&&(n=function o(){var e,t,r,n;if(e=me,t=[],(r=Ve())!==a)for(;r!==a;)t.push(r),r=Ve();else t=a;return t!==a&&(de=e,t=i({type:0,tokens:n=t,parsedOptions:ot?I(n):{}},at())),t}())!==a?(de=t,t=r=n):(me=t,t=a),t===a&&(t=me,de=me,rt.push("numberArgStyle"),(r=(r=!0)?void 0:a)!==a&&(n=je())!==a?(de=t,t=r=S(n)):(me=t,t=a)),t}())!==a?s=c=[c,l,f]:(me=s,s=a),s===a&&(s=null),s!==a&&(c=$e())!==a?(125===e.charCodeAt(me)?(l="}",me++):(l=a,0===be&&Se(y)),l!==a?(de=t,t=r=_(n,u,s)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a),t}())===a&&(t=function n(){var t,r,n,o,u,s,c,l,f;return t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a&&$e()!==a&&(n=Je())!==a&&$e()!==a?(44===e.charCodeAt(me)?(o=",",me++):(o=a,0===be&&Se(T)),o!==a&&$e()!==a?("date"===e.substr(me,4)?(u="date",me+=4):(u=a,0===be&&Se(V)),u===a&&("time"===e.substr(me,4)?(u="time",me+=4):(u=a,0===be&&Se(Z))),u!==a&&$e()!==a?(s=me,44===e.charCodeAt(me)?(c=",",me++):(c=a,0===be&&Se(T)),c!==a&&(l=$e())!==a&&(f=function p(){var t,r,n;return t=me,"::"===e.substr(me,2)?(r="::",me+=2):(r=a,0===be&&Se(F)),r!==a&&(n=function o(){var t,r,n,o,u,s,c;if(t=me,r=me,n=[],(o=Ze())===a&&(o=Be()),o!==a)for(;o!==a;)n.push(o),(o=Ze())===a&&(o=Be());else n=a;return(r=n!==a?e.substring(r,me):n)!==a&&(de=t,r=i({type:1,pattern:u=r,parsedOptions:ot?(s=u,c={},s.replace(v,(function(e){var t=e.length;switch(e[0]){case"G":c.era=4===t?"long":5===t?"narrow":"short";break;case"y":c.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":c.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":c.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":c.weekday=4===t?"short":5===t?"narrow":"short";break;case"e":if(t<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");c.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");c.weekday=["short","long","narrow","short"][t-4];break;case"a":c.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":c.hourCycle="h12",c.hour=["numeric","2-digit"][t-1];break;case"H":c.hourCycle="h23",c.hour=["numeric","2-digit"][t-1];break;case"K":c.hourCycle="h11",c.hour=["numeric","2-digit"][t-1];break;case"k":c.hourCycle="h24",c.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":c.minute=["numeric","2-digit"][t-1];break;case"s":c.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":c.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),c):{}},at())),r}())!==a?(de=t,t=r=n):(me=t,t=a),t===a&&(t=me,de=me,rt.push("dateOrTimeArgStyle"),(r=(r=!0)?void 0:a)!==a&&(n=je())!==a?(de=t,t=r=S(n)):(me=t,t=a)),t}())!==a?s=c=[c,l,f]:(me=s,s=a),s===a&&(s=null),s!==a&&(c=$e())!==a?(125===e.charCodeAt(me)?(l="}",me++):(l=a,0===be&&Se(y)),l!==a?(de=t,t=r=_(n,u,s)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a),t}()),t}())===a&&(t=function p(){var t,r,o,u,s,c,l,f,p,h,g;if(t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a)if($e()!==a)if((o=Je())!==a)if($e()!==a)if(44===e.charCodeAt(me)?(u=",",me++):(u=a,0===be&&Se(T)),u!==a)if($e()!==a)if("plural"===e.substr(me,6)?(s="plural",me+=6):(s=a,0===be&&Se(B)),s===a&&("selectordinal"===e.substr(me,13)?(s="selectordinal",me+=13):(s=a,0===be&&Se(U))),s!==a)if($e()!==a)if(44===e.charCodeAt(me)?(c=",",me++):(c=a,0===be&&Se(T)),c!==a)if($e()!==a)if(l=me,"offset:"===e.substr(me,7)?(f="offset:",me+=7):(f=a,0===be&&Se(G)),f!==a&&(p=$e())!==a&&(h=We())!==a?l=f=[f,p,h]:(me=l,l=a),l===a&&(l=null),l!==a)if((f=$e())!==a){if(p=[],(h=Ge())!==a)for(;h!==a;)p.push(h),h=Ge();else p=a;p!==a&&(h=$e())!==a?(125===e.charCodeAt(me)?(g="}",me++):(g=a,0===be&&Se(y)),g!==a?(de=t,t=r=function(e,t,r,a){return i({type:n.plural,pluralType:"plural"===t?"cardinal":"ordinal",value:e,offset:r?r[2]:0,options:a.reduce((function(e,t){var r=t.id,n=t.value,a=t.location;return r in e&&Ce('Duplicate option "'+r+'" in plural element: "'+we()+'"',xe()),e[r]={value:n,location:a},e}),{})},at())}(o,s,l,p)):(me=t,t=a)):(me=t,t=a)}else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;return t}())===a&&(t=function h(){var t,r,o,u,s,c,l,f,p;if(t=me,123===e.charCodeAt(me)?(r="{",me++):(r=a,0===be&&Se(d)),r!==a)if($e()!==a)if((o=Je())!==a)if($e()!==a)if(44===e.charCodeAt(me)?(u=",",me++):(u=a,0===be&&Se(T)),u!==a)if($e()!==a)if("select"===e.substr(me,6)?(s="select",me+=6):(s=a,0===be&&Se(H)),s!==a)if($e()!==a)if(44===e.charCodeAt(me)?(c=",",me++):(c=a,0===be&&Se(T)),c!==a)if($e()!==a){if(l=[],(f=Ue())!==a)for(;f!==a;)l.push(f),f=Ue();else l=a;l!==a&&(f=$e())!==a?(125===e.charCodeAt(me)?(p="}",me++):(p=a,0===be&&Se(y)),p!==a?(de=t,t=r=function(e,t){return i({type:n.select,value:e,options:t.reduce((function(e,t){var r=t.id,n=t.value,a=t.location;return r in e&&Ce('Duplicate option "'+r+'" in select element: "'+we()+'"',xe()),e[r]={value:n,location:a},e}),{})},at())}(o,l)):(me=t,t=a)):(me=t,t=a)}else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;else me=t,t=a;return t}())===a&&(t=function g(){var t,r;return t=me,35===e.charCodeAt(me)?(r="#",me++):(r=a,0===be&&Se(l)),r!==a&&(de=t,r=i({type:n.pound},at())),r}()),t}function je(){var t,r,n,i;if(t=me,de=me,(r=(r=it)?void 0:a)!==a){if(n=[],(i=Ye())===a&&(i=qe())===a&&(i=Xe())===a&&(60===e.charCodeAt(me)?(i="<",me++):(i=a,0===be&&Se(s))),i!==a)for(;i!==a;)n.push(i),(i=Ye())===a&&(i=qe())===a&&(i=Xe())===a&&(60===e.charCodeAt(me)?(i="<",me++):(i=a,0===be&&Se(s)));else n=a;n!==a?(de=t,t=r=c(n)):(me=t,t=a)}else me=t,t=a;if(t===a){if(t=me,r=[],(n=Ye())===a&&(n=qe())===a&&(n=Xe())===a&&(n=Ne()),n!==a)for(;n!==a;)r.push(n),(n=Ye())===a&&(n=qe())===a&&(n=Xe())===a&&(n=Ne());else r=a;r!==a&&(de=t,r=c(r)),t=r}return t}function Ne(){var t,r,n;return t=me,r=me,be++,(n=Le())===a&&(n=Pe())===a&&(n=Re()),be--,n===a?r=void 0:(me=r,r=a),r!==a?(60===e.charCodeAt(me)?(n="<",me++):(n=a,0===be&&Se(s)),n!==a?(de=t,t=r="<"):(me=t,t=a)):(me=t,t=a),t}function Re(){var t,r,o,u,c,l;return t=me,r=me,60===e.charCodeAt(me)?(o="<",me++):(o=a,0===be&&Se(s)),o!==a&&(u=Qe())!==a&&(c=$e())!==a?("/>"===e.substr(me,2)?(l="/>",me+=2):(l=a,0===be&&Se(p)),l!==a?r=o=[o,u,c,l]:(me=r,r=a)):(me=r,r=a),r!==a&&(de=t,r=i({type:n.literal,value:r.join("")},at())),r}function Le(){var t,r,n,i;return t=me,60===e.charCodeAt(me)?(r="<",me++):(r=a,0===be&&Se(s)),r!==a&&(n=Qe())!==a?(62===e.charCodeAt(me)?(i=">",me++):(i=a,0===be&&Se(h)),i!==a?(de=t,t=r=n):(me=t,t=a)):(me=t,t=a),t}function Pe(){var t,r,n,i;return t=me,"</"===e.substr(me,2)?(r="</",me+=2):(r=a,0===be&&Se(g)),r!==a&&(n=Qe())!==a?(62===e.charCodeAt(me)?(i=">",me++):(i=a,0===be&&Se(h)),i!==a?(de=t,t=r=n):(me=t,t=a)):(me=t,t=a),t}function ze(){var t,r,n,i,o;if(be++,t=me,r=[],n=me,i=me,be++,(o=He())===a&&(b.test(e.charAt(me))?(o=e.charAt(me),me++):(o=a,0===be&&Se(w))),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(x)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a),n!==a)for(;n!==a;)r.push(n),n=me,i=me,be++,(o=He())===a&&(b.test(e.charAt(me))?(o=e.charAt(me),me++):(o=a,0===be&&Se(w))),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(x)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a);else r=a;return t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(A)),t}function Me(){var t,r,n;return be++,t=me,47===e.charCodeAt(me)?(r="/",me++):(r=a,0===be&&Se(E)),r!==a&&(n=ze())!==a?(de=t,t=r=n):(me=t,t=a),be--,t===a&&(r=a,0===be&&Se(C)),t}function Ve(){var e,t,r,n;if(be++,e=me,$e()!==a)if((t=ze())!==a){for(r=[],n=Me();n!==a;)r.push(n),n=Me();r!==a?(de=e,e=function(e,t){return{stem:e,options:t}}(t,r)):(me=e,e=a)}else me=e,e=a;else me=e,e=a;return be--,e===a&&0===be&&Se(D),e}function Ze(){var t,r,n,i;if(t=me,39===e.charCodeAt(me)?(r="'",me++):(r=a,0===be&&Se(j)),r!==a){if(n=[],(i=Ye())===a&&(N.test(e.charAt(me))?(i=e.charAt(me),me++):(i=a,0===be&&Se(R))),i!==a)for(;i!==a;)n.push(i),(i=Ye())===a&&(N.test(e.charAt(me))?(i=e.charAt(me),me++):(i=a,0===be&&Se(R)));else n=a;n!==a?(39===e.charCodeAt(me)?(i="'",me++):(i=a,0===be&&Se(j)),i!==a?t=r=[r,n,i]:(me=t,t=a)):(me=t,t=a)}else me=t,t=a;if(t===a)if(t=[],(r=Ye())===a&&(L.test(e.charAt(me))?(r=e.charAt(me),me++):(r=a,0===be&&Se(P))),r!==a)for(;r!==a;)t.push(r),(r=Ye())===a&&(L.test(e.charAt(me))?(r=e.charAt(me),me++):(r=a,0===be&&Se(P)));else t=a;return t}function Be(){var t,r;if(t=[],z.test(e.charAt(me))?(r=e.charAt(me),me++):(r=a,0===be&&Se(M)),r!==a)for(;r!==a;)t.push(r),z.test(e.charAt(me))?(r=e.charAt(me),me++):(r=a,0===be&&Se(M));else t=a;return t}function Ue(){var t,r,n,o,u,s,c;return t=me,$e()!==a&&(r=tt())!==a&&$e()!==a?(123===e.charCodeAt(me)?(n="{",me++):(n=a,0===be&&Se(d)),n!==a?(de=me,rt.push("select"),void 0!==a&&(o=Oe())!==a?(125===e.charCodeAt(me)?(u="}",me++):(u=a,0===be&&Se(y)),u!==a?(de=t,s=r,c=o,rt.pop(),t=i({id:s,value:c},at())):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a),t}function Ge(){var t,r,n,o,u,s,c;return t=me,$e()!==a&&(r=function l(){var t,r,n,i;return t=me,r=me,61===e.charCodeAt(me)?(n="=",me++):(n=a,0===be&&Se(K)),n!==a&&(i=We())!==a?r=n=[n,i]:(me=r,r=a),(t=r!==a?e.substring(t,me):r)===a&&(t=tt()),t}())!==a&&$e()!==a?(123===e.charCodeAt(me)?(n="{",me++):(n=a,0===be&&Se(d)),n!==a?(de=me,rt.push("plural"),void 0!==a&&(o=Oe())!==a?(125===e.charCodeAt(me)?(u="}",me++):(u=a,0===be&&Se(y)),u!==a?(de=t,s=r,c=o,rt.pop(),t=i({id:s,value:c},at())):(me=t,t=a)):(me=t,t=a)):(me=t,t=a)):(me=t,t=a),t}function He(){var t;return be++,W.test(e.charAt(me))?(t=e.charAt(me),me++):(t=a,0===be&&Se(Y)),be--,t===a&&0===be&&Se($),t}function Ke(){var t;return be++,X.test(e.charAt(me))?(t=e.charAt(me),me++):(t=a,0===be&&Se(J)),be--,t===a&&0===be&&Se(q),t}function $e(){var t,r,n;for(be++,t=me,r=[],n=He();n!==a;)r.push(n),n=He();return t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(Q)),t}function We(){var t,r,n,i;return be++,t=me,45===e.charCodeAt(me)?(r="-",me++):(r=a,0===be&&Se(te)),r===a&&(r=null),r!==a&&(n=et())!==a?(de=t,t=r=(i=n)?r?-i:i:0):(me=t,t=a),be--,t===a&&(r=a,0===be&&Se(ee)),t}function Ye(){var t,r;return be++,t=me,"''"===e.substr(me,2)?(r="''",me+=2):(r=a,0===be&&Se(ne)),r!==a&&(de=t,r="'"),be--,(t=r)===a&&(r=a,0===be&&Se(re)),t}function qe(){var t,r,n,i,o,u;if(t=me,39===e.charCodeAt(me)?(r="'",me++):(r=a,0===be&&Se(j)),r!==a)if((n=function s(){var t,r,n,i,o;return t=me,r=me,e.length>me?(n=e.charAt(me),me++):(n=a,0===be&&Se(x)),n!==a?(de=me,(i=(i="<"===(o=n)||">"===o||"{"===o||"}"===o||nt()&&"#"===o)?void 0:a)!==a?r=n=[n,i]:(me=r,r=a)):(me=r,r=a),r!==a?e.substring(t,me):r}())!==a){for(i=me,o=[],"''"===e.substr(me,2)?(u="''",me+=2):(u=a,0===be&&Se(ne)),u===a&&(N.test(e.charAt(me))?(u=e.charAt(me),me++):(u=a,0===be&&Se(R)));u!==a;)o.push(u),"''"===e.substr(me,2)?(u="''",me+=2):(u=a,0===be&&Se(ne)),u===a&&(N.test(e.charAt(me))?(u=e.charAt(me),me++):(u=a,0===be&&Se(R)));(i=o!==a?e.substring(i,me):o)!==a?(39===e.charCodeAt(me)?(o="'",me++):(o=a,0===be&&Se(j)),o===a&&(o=null),o!==a?(de=t,t=r=n+i.replace("''","'")):(me=t,t=a)):(me=t,t=a)}else me=t,t=a;else me=t,t=a;return t}function Xe(){var t,r,n,i,o;return t=me,r=me,e.length>me?(n=e.charAt(me),me++):(n=a,0===be&&Se(x)),n!==a?(de=me,(i=(i=!("<"===(o=n)||"{"===o||nt()&&"#"===o||function u(){return rt.length>1}()&&"}"===o))?void 0:a)!==a?r=n=[n,i]:(me=r,r=a)):(me=r,r=a),r===a&&(10===e.charCodeAt(me)?(r="\n",me++):(r=a,0===be&&Se(ae))),r!==a?e.substring(t,me):r}function Je(){var t,r;return be++,t=me,(r=et())===a&&(r=tt()),t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(ie)),t}function Qe(){var t,r;return be++,t=me,(r=et())===a&&(r=function n(){var t,r,n,i,o;if(be++,t=me,r=[],45===e.charCodeAt(me)?(n="-",me++):(n=a,0===be&&Se(te)),n===a&&(n=me,i=me,be++,(o=He())===a&&(o=Ke()),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(x)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a)),n!==a)for(;n!==a;)r.push(n),45===e.charCodeAt(me)?(n="-",me++):(n=a,0===be&&Se(te)),n===a&&(n=me,i=me,be++,(o=He())===a&&(o=Ke()),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(x)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a));else r=a;return t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(ge)),t}()),t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(oe)),t}function et(){var t,r,n,i,o;if(be++,t=me,48===e.charCodeAt(me)?(r="0",me++):(r=a,0===be&&Se(se)),r!==a&&(de=t,r=0),(t=r)===a){if(t=me,r=me,ce.test(e.charAt(me))?(n=e.charAt(me),me++):(n=a,0===be&&Se(le)),n!==a){for(i=[],fe.test(e.charAt(me))?(o=e.charAt(me),me++):(o=a,0===be&&Se(pe));o!==a;)i.push(o),fe.test(e.charAt(me))?(o=e.charAt(me),me++):(o=a,0===be&&Se(pe));i!==a?r=n=[n,i]:(me=r,r=a)}else me=r,r=a;r!==a&&(de=t,r=parseInt(r.join(""),10)),t=r}return be--,t===a&&(r=a,0===be&&Se(ue)),t}function tt(){var t,r,n,i,o;if(be++,t=me,r=[],n=me,i=me,be++,(o=He())===a&&(o=Ke()),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(x)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a),n!==a)for(;n!==a;)r.push(n),n=me,i=me,be++,(o=He())===a&&(o=Ke()),be--,o===a?i=void 0:(me=i,i=a),i!==a?(e.length>me?(o=e.charAt(me),me++):(o=a,0===be&&Se(x)),o!==a?n=i=[i,o]:(me=n,n=a)):(me=n,n=a);else r=a;return t=r!==a?e.substring(t,me):r,be--,t===a&&(r=a,0===be&&Se(he)),t}var rt=["root"];function nt(){return"plural"===rt[rt.length-1]}function at(){return t&&t.captureLocation?{location:xe()}:{}}var it=t&&t.ignoreTag,ot=t&&t.shouldParseSkeleton;if((r=u())!==a&&me===e.length)return r;throw r!==a&&me<e.length&&Se({type:"end"}),function ut(e,t,r){return new k(k.buildMessage(e,t),e,t,r)}(Ae,ve<e.length?e.charAt(ve):null,ke(ve,ve<e.length?ve+1:ve))},O=/(^|[^\\])#/g;function _(e,t){t=i({normalizeHashtagInPlural:!0,shouldParseSkeleton:!0},t||{});var r=S(e,t);return t.normalizeHashtagInPlural&&function e(t){t.forEach((function(t){(h(t)||p(t))&&Object.keys(t.options).forEach((function(r){for(var n,a=t.options[r],i=-1,s=void 0,c=0;c<a.value.length;c++){var l=a.value[c];if(u(l)&&O.test(l.value)){i=c,s=l;break}}if(s){var f=s.value.replace(O,"$1{"+t.value+", number}"),p=S(f);(n=a.value).splice.apply(n,o([i,1],p))}e(a.value)}))}))}(r),r}function j(e,t,r,n){var a=function i(e){return null==e||"number"==typeof e||"boolean"==typeof e}(n)?n:r(n),o=t.get(a);return void 0===o&&(o=e.call(this,n),t.set(a,o)),o}function N(e,t,r){var n=Array.prototype.slice.call(arguments,3),a=r(n),i=t.get(a);return void 0===i&&(i=e.apply(this,n),t.set(a,i)),i}function R(e,t,r,n,a){return r.bind(t,e,n,a)}function L(e,t){return R(e,this,1===e.length?j:N,t.cache.create(),t.serializer)}function P(){return JSON.stringify(arguments)}function z(){this.cache=Object.create(null)}z.prototype.has=function(e){return e in this.cache},z.prototype.get=function(e){return this.cache[e]},z.prototype.set=function(e,t){this.cache[e]=t};var M={create:function e(){return new z}},V=function Z(e,t){return(t&&t.strategy?t.strategy:L)(e,{cache:t&&t.cache?t.cache:M,serializer:t&&t.serializer?t.serializer:P})},B={variadic:function U(e,t){return R(e,this,N,t.cache.create(),t.serializer)},monadic:function G(e,t){return R(e,this,j,t.cache.create(),t.serializer)}};V.strategies=B;var H,K=Object.freeze(Object.assign(Object.create(null),V,{default:V,strategies:B}));(H=e.ErrorCode||(e.ErrorCode={})).MISSING_VALUE="MISSING_VALUE",H.INVALID_VALUE="INVALID_VALUE",H.MISSING_INTL_API="MISSING_INTL_API";var $,W=function(e){function t(t,r,n){var a=e.call(this,t)||this;return a.code=r,a.originalMessage=n,a}return r(t,e),t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error),Y=function(e){function t(t,r,n,a){return e.call(this,'Invalid values for "'+t+'": "'+r+'". Options are "'+Object.keys(n).join('", "')+'"',"INVALID_VALUE",a)||this}return r(t,e),t}(W),q=function(e){function t(t,r,n){return e.call(this,'Value for "'+t+'" must be of type '+r,"INVALID_VALUE",n)||this}return r(t,e),t}(W),X=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 r(t,e),t}(W);function J(e){return"function"==typeof e}function Q(e,t,r,n,a,i,o){if(1===e.length&&u(e[0]))return[{type:0,value:e[0].value}];for(var v=[],A=0,b=e;A<b.length;A++){var w=b[A];if(u(w))v.push({type:0,value:w.value});else if(g(w))"number"==typeof i&&v.push({type:0,value:r.getNumberFormat(t).format(i)});else{var x=w.value;if(!a||!(x in a))throw new X(x,o);var C=a[x];if(s(w))C&&"string"!=typeof C&&"number"!=typeof C||(C="string"==typeof C||"number"==typeof C?String(C):""),v.push({type:"string"==typeof C?0:1,value:C});else if(l(w)){var E="string"==typeof w.style?n.date[w.style]:y(w.style)?w.style.parsedOptions:void 0;v.push({type:0,value:r.getDateTimeFormat(t,E).format(C)})}else if(f(w))E="string"==typeof w.style?n.time[w.style]:y(w.style)?w.style.parsedOptions:void 0,v.push({type:0,value:r.getDateTimeFormat(t,E).format(C)});else if(c(w))(E="string"==typeof w.style?n.number[w.style]:d(w.style)?w.style.parsedOptions:void 0)&&E.scale&&(C*=E.scale||1),v.push({type:0,value:r.getNumberFormat(t,E).format(C)});else{if(m(w)){var D=w.children,F=w.value,I=a[F];if(!J(I))throw new q(F,"function",o);var k=I(Q(D,t,r,n,a,i).map((function(e){return e.value})));Array.isArray(k)||(k=[k]),v.push.apply(v,k.map((function(e){return{type:"string"==typeof e?0:1,value:e}})))}if(p(w)){if(!(S=w.options[C]||w.options.other))throw new Y(w.value,C,Object.keys(w.options),o);v.push.apply(v,Q(S.value,t,r,n,a))}else if(h(w)){var S;if(!(S=w.options["="+C])){if(!Intl.PluralRules)throw new W('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',"MISSING_INTL_API",o);var T=r.getPluralRules(t,{type:w.pluralType}).select(C-(w.offset||0));S=w.options[T]||w.options.other}if(!S)throw new Y(w.value,C,Object.keys(w.options),o);v.push.apply(v,Q(S.value,t,r,n,a,C-(w.offset||0)))}}}}return function O(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}),[])}(v)}function ee(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}}}}}($=e.PART_TYPE||(e.PART_TYPE={}))[$.literal=0]="literal",$[$.object=1]="object";var te=V||K,re=function(){function e(t,r,n,a){var u=this;if(void 0===r&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=u.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 Q(u.ast,u.locales,u.formatters,u.formats,e,void 0,u.message)},this.resolvedOptions=function(){return{locale:Intl.NumberFormat.supportedLocalesOf(u.locales)[0]}},this.getAst=function(){return u.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==a?void 0:a.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 s(e,t){return t?Object.keys(e).reduce((function(r,n){return r[n]=function a(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=a&&a.formatters||function c(e){return void 0===e&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:te((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,o([void 0],t)))}),{cache:ee(e.number),strategy:te.strategies.variadic}),getDateTimeFormat:te((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,o([void 0],t)))}),{cache:ee(e.dateTime),strategy:te.strategies.variadic}),getPluralRules:te((function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,o([void 0],t)))}),{cache:ee(e.pluralRules),strategy:te.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=_,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.FormatError=W,e.IntlMessageFormat=re,e.InvalidValueError=Y,e.InvalidValueTypeError=q,e.MissingValueError=X,e.default=re,e.formatToParts=Q,e.isFormatXMLElementFn=J,Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "intl-messageformat",
"version": "9.4.4",
"version": "9.4.5",
"description": "Formats ICU Message strings with number, date, plural, and select placeholders to create localized messages.",

@@ -35,3 +35,3 @@ "keywords": [

"fast-memoize": "^2.5.2",
"intl-messageformat-parser": "6.2.0",
"intl-messageformat-parser": "6.3.0",
"tslib": "^2.0.1"

@@ -38,0 +38,0 @@ },

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc