intl-messageformat-parser
Advanced tools
Comparing version 3.6.2 to 3.6.3
@@ -6,2 +6,14 @@ # Change Log | ||
## [3.6.3](https://github.com/formatjs/formatjs/compare/intl-messageformat-parser@3.6.2...intl-messageformat-parser@3.6.3) (2020-01-22) | ||
### Bug Fixes | ||
* **intl-messageformat-parser:** fix type definition for skeleton… ([#456](https://github.com/formatjs/formatjs/issues/456)) ([c208d01](https://github.com/formatjs/formatjs/commit/c208d013558789d0030782cb817562b712ed438e)) | ||
* **intl-messageformat-parser:** skip whitespaces that match unicode White_Space ([#468](https://github.com/formatjs/formatjs/issues/468)) ([d0dda6e](https://github.com/formatjs/formatjs/commit/d0dda6ebb40c58bf1fcaeea054d0a07db167d7b8)), closes [#467](https://github.com/formatjs/formatjs/issues/467) | ||
## [3.6.2](https://github.com/formatjs/formatjs/compare/intl-messageformat-parser@3.6.1...intl-messageformat-parser@3.6.2) (2020-01-09) | ||
@@ -8,0 +20,0 @@ |
@@ -111,4 +111,4 @@ export declare enum TYPE { | ||
export declare function isPoundElement(el: MessageFormatElement): el is PoundElement; | ||
export declare function isNumberSkeleton(el: NumberElement['style']): el is NumberSkeleton; | ||
export declare function isDateTimeSkeleton(el?: DateElement['style'] | TimeElement['style']): el is DateTimeSkeleton; | ||
export declare function isNumberSkeleton(el: NumberElement['style'] | Skeleton): el is NumberSkeleton; | ||
export declare function isDateTimeSkeleton(el?: DateElement['style'] | TimeElement['style'] | Skeleton): el is DateTimeSkeleton; | ||
export declare function createLiteralElement(value: string): LiteralElement; | ||
@@ -115,0 +115,0 @@ export declare function createNumberElement(value: string, style?: string | null): NumberElement; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).IntlMessageFormatParser={})}(this,function(jt){"use strict";var e;function f(e){return e.type===jt.TYPE.literal}function n(e){return e.type===jt.TYPE.select}function a(e){return e.type===jt.TYPE.plural}(e=jt.TYPE||(jt.TYPE={}))[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";var u,i,t=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Rt=function(){return(Rt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},Bt=(i=Error,t(o,i),o.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 u(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(e){var t,r,n=e.map(u);if(n.sort(),0<n.length){for(r=t=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 "+((i=t)?'"'+n(i)+'"':"end of input")+" found.";var i},o);function o(e,t,r,n){var a=i.call(this)||this;return a.message=e,a.expected=t,a.found=r,a.location=n,a.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a,o),a}var p=function(f,e){e=void 0!==e?e:{};var t,p={},r={start:it},n=it,a=function(e){return e.join("")},u=function(e){return Rt({type:jt.TYPE.literal,value:e},Ot())},i="#",o=et("#",!1),c=function(){return Rt({type:jt.TYPE.pound},Ot())},s=rt("argumentElement"),h="{",g=et("{",!1),d="}",m=et("}",!1),l=function(e){return Rt({type:jt.TYPE.argument,value:e},Ot())},y=rt("numberSkeletonId"),v=/^['\/{}]/,A=tt(["'","/","{","}"],!1,!1),b={type:"any"},w=rt("numberSkeletonTokenOption"),E="/",x=et("/",!1),C=function(e){return e},k=rt("numberSkeletonToken"),D=function(e,t){return{stem:e,options:t}},F=function(e){return Rt({type:0,tokens:e},Ot())},P="::",T=et("::",!1),S=function(e){return e},Y=function(){return St.push("numberArgStyle"),!0},O=function(e){return St.pop(),e.replace(/\s*$/,"")},j=",",R=et(",",!1),B="number",Z=et("number",!1),z=function(e,t,r){return Rt({type:"number"===t?jt.TYPE.number:"date"===t?jt.TYPE.date:jt.TYPE.time,style:r&&r[2],value:e},Ot())},N="'",_=et("'",!1),M=/^[^']/,L=tt(["'"],!0,!1),$=/^[^a-zA-Z'{}]/,q=tt([["a","z"],["A","Z"],"'","{","}"],!0,!1),H=/^[a-zA-Z]/,I=tt([["a","z"],["A","Z"]],!1,!1),U=function(e){return Rt({type:1,pattern:e},Ot())},G=function(){return St.push("dateOrTimeArgStyle"),!0},K="date",Q=et("date",!1),V="time",W=et("time",!1),X="plural",J=et("plural",!1),ee="selectordinal",te=et("selectordinal",!1),re="offset:",ne=et("offset:",!1),ae=function(e,t,r,n){return Rt({type:jt.TYPE.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&&Je('Duplicate option "'+r+'" in plural element: "'+We()+'"',Xe()),e[r]={value:n,location:a},e},{})},Ot())},ue="select",ie=et("select",!1),oe=function(e,t){return Rt({type:jt.TYPE.select,value:e,options:t.reduce(function(e,t){var r=t.id,n=t.value,a=t.location;return r in e&&Je('Duplicate option "'+r+'" in select element: "'+We()+'"',Xe()),e[r]={value:n,location:a},e},{})},Ot())},ce="=",se=et("=",!1),le=function(e){return St.push("select"),!0},fe=function(e,t){return St.pop(),Rt({id:e,value:t},Ot())},pe=function(e){return St.push("plural"),!0},he=function(e,t){return St.pop(),Rt({id:e,value:t},Ot())},ge=rt("whitespace pattern"),de=/^[\t-\r \x85\u200E\u200F\u2028\u2029]/,me=tt([["\t","\r"]," "," ","","","\u2028","\u2029"],!1,!1),ye=rt("syntax pattern"),ve=/^[!-\/:-@[-\^`{-~\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]/,Ae=tt([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←",""],["─","❵"],["➔","⯿"],["⸀",""],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),be=rt("optional whitespace"),we=rt("number"),Ee="-",xe=et("-",!1),Ce=function(e,t){return t?e?-t:t:0},ke=rt("double apostrophes"),De="''",Fe=et("''",!1),Pe=function(){return"'"},Te=function(e,t){return e+t.replace("''","'")},Se=function(e){return!("{"===e||Yt()&&"#"===e||1<St.length&&"}"===e)},Ye="\n",Oe=et("\n",!1),je=function(e){return"{"===e||"}"===e||Yt()&&"#"===e},Re=rt("argNameOrNumber"),Be=rt("argNumber"),Ze="0",ze=et("0",!1),Ne=function(){return 0},_e=/^[1-9]/,Me=tt([["1","9"]],!1,!1),Le=/^[0-9]/,$e=tt([["0","9"]],!1,!1),qe=function(e){return parseInt(e.join(""),10)},He=rt("argName"),Ie=0,Ue=0,Ge=[{line:1,column:1}],Ke=0,Qe=[],Ve=0;if(void 0!==e.startRule){if(!(e.startRule in r))throw new Error("Can't start parsing from rule \""+e.startRule+'".');n=r[e.startRule]}function We(){return f.substring(Ue,Ie)}function Xe(){return at(Ue,Ie)}function Je(e,t){throw function(e,t){return new Bt(e,[],"",t)}(e,t=void 0!==t?t:at(Ue,Ie))}function et(e,t){return{type:"literal",text:e,ignoreCase:t}}function tt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function rt(e){return{type:"other",description:e}}function nt(e){var t,r=Ge[e];if(r)return r;for(t=e-1;!Ge[t];)t--;for(r={line:(r=Ge[t]).line,column:r.column};t<e;)10===f.charCodeAt(t)?(r.line++,r.column=1):r.column++,t++;return Ge[e]=r}function at(e,t){var r=nt(e),n=nt(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function ut(e){Ie<Ke||(Ke<Ie&&(Ke=Ie,Qe=[]),Qe.push(e))}function it(){return ot()}function ot(){var e,t;for(e=[],t=ct();t!==p;)e.push(t),t=ct();return e}function ct(){var e;return(e=function(){var e,t;e=Ie,(t=st())!==p&&(Ue=e,t=u(t));return e=t}())===p&&(e=function(){var e,t,r,n,a;Ve++,e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&ut(g));e=t!==p?(r=At(),r!==p?(n=Ct())!==p?At()!==p?(125===f.charCodeAt(Ie)?(a=d,Ie++):(a=p,0===Ve&&ut(m)),a!==p?(Ue=e,t=l(n)):(Ie=e,p)):(Ie=e,p):(Ie=e,p):(Ie=e,p)):(Ie=e,p);Ve--,e===p&&(t=p,0===Ve&&ut(s));return e}())===p&&(e=function(){var e;(e=function(){var e,t,r,n,a,u,i,o,c,s;e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&ut(g));e=t!==p?(r=At(),r!==p?(n=Ct())!==p?At()!==p?(44===f.charCodeAt(Ie)?(a=j,Ie++):(a=p,0===Ve&&ut(R)),a!==p?At()!==p?(f.substr(Ie,6)===B?(u=B,Ie+=6):(u=p,0===Ve&&ut(Z)),u!==p?At()!==p?(i=Ie,44===f.charCodeAt(Ie)?(o=j,Ie++):(o=p,0===Ve&&ut(R)),(i=o!==p?(c=At())!==p?(s=function(){var e,t,r;e=Ie,f.substr(Ie,2)===P?(t=P,Ie+=2):(t=p,0===Ve&&ut(T));e=t!==p?(r=function(){var e,t,r;if(e=Ie,t=[],(r=pt())!==p)for(;r!==p;)t.push(r),r=pt();else t=p;t!==p&&(Ue=e,t=F(t));return e=t}(),r!==p?(Ue=e,t=S(r)):(Ie=e,p)):(Ie=e,p);e===p&&(Ue=e=Ie,t=Y(),e=(t=t?void 0:p)!==p?(r=st())!==p?(Ue=e,t=O(r)):(Ie=e,p):(Ie=e,p));return e}())!==p?o=[o,c,s]:(Ie=i,p):(Ie=i,p):(Ie=i,p))===p&&(i=null),i!==p?(o=At())!==p?(125===f.charCodeAt(Ie)?(c=d,Ie++):(c=p,0===Ve&&ut(m)),c!==p?(Ue=e,t=z(n,u,i)):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p):(Ie=e,p)):(Ie=e,p);return e}())===p&&(e=function(){var e,t,r,n,a,u,i,o,c,s;e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&ut(g));e=t!==p?(r=At(),r!==p?(n=Ct())!==p?At()!==p?(44===f.charCodeAt(Ie)?(a=j,Ie++):(a=p,0===Ve&&ut(R)),a!==p?At()!==p?(f.substr(Ie,4)===K?(u=K,Ie+=4):(u=p,0===Ve&&ut(Q)),u===p&&(f.substr(Ie,4)===V?(u=V,Ie+=4):(u=p,0===Ve&&ut(W))),u!==p?At()!==p?(i=Ie,44===f.charCodeAt(Ie)?(o=j,Ie++):(o=p,0===Ve&&ut(R)),(i=o!==p?(c=At())!==p?(s=function(){var e,t,r;e=Ie,f.substr(Ie,2)===P?(t=P,Ie+=2):(t=p,0===Ve&&ut(T));e=t!==p?(r=function(){var e,t,r,n;t=e=Ie,r=[],(n=ht())===p&&(n=gt());if(n!==p)for(;n!==p;)r.push(n),(n=ht())===p&&(n=gt());else r=p;t=r!==p?f.substring(t,Ie):r;t!==p&&(Ue=e,t=U(t));return e=t}(),r!==p?(Ue=e,t=S(r)):(Ie=e,p)):(Ie=e,p);e===p&&(Ue=e=Ie,t=G(),e=(t=t?void 0:p)!==p?(r=st())!==p?(Ue=e,t=O(r)):(Ie=e,p):(Ie=e,p));return e}())!==p?o=[o,c,s]:(Ie=i,p):(Ie=i,p):(Ie=i,p))===p&&(i=null),i!==p?(o=At())!==p?(125===f.charCodeAt(Ie)?(c=d,Ie++):(c=p,0===Ve&&ut(m)),c!==p?(Ue=e,t=z(n,u,i)):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p):(Ie=e,p)):(Ie=e,p);return e}());return e}())===p&&(e=function(){var e,t,r,n,a,u,i,o,c,s,l;e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&ut(g));if(t!==p)if(At()!==p)if((r=Ct())!==p)if(At()!==p)if(44===f.charCodeAt(Ie)?(n=j,Ie++):(n=p,0===Ve&&ut(R)),n!==p)if(At()!==p)if(f.substr(Ie,6)===X?(a=X,Ie+=6):(a=p,0===Ve&&ut(J)),a===p&&(f.substr(Ie,13)===ee?(a=ee,Ie+=13):(a=p,0===Ve&&ut(te))),a!==p)if(At()!==p)if(44===f.charCodeAt(Ie)?(u=j,Ie++):(u=p,0===Ve&&ut(R)),u!==p)if(At()!==p)if(i=Ie,f.substr(Ie,7)===re?(o=re,Ie+=7):(o=p,0===Ve&&ut(ne)),(i=o!==p?(c=At())!==p?(s=bt())!==p?o=[o,c,s]:(Ie=i,p):(Ie=i,p):(Ie=i,p))===p&&(i=null),i!==p)if((o=At())!==p){if(c=[],(s=mt())!==p)for(;s!==p;)c.push(s),s=mt();else c=p;e=c!==p?(s=At())!==p?(125===f.charCodeAt(Ie)?(l=d,Ie++):(l=p,0===Ve&&ut(m)),l!==p?(Ue=e,t=ae(r,a,i,c)):(Ie=e,p)):(Ie=e,p):(Ie=e,p)}else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;return e}())===p&&(e=function(){var e,t,r,n,a,u,i,o,c;e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&ut(g));if(t!==p)if(At()!==p)if((r=Ct())!==p)if(At()!==p)if(44===f.charCodeAt(Ie)?(n=j,Ie++):(n=p,0===Ve&&ut(R)),n!==p)if(At()!==p)if(f.substr(Ie,6)===ue?(a=ue,Ie+=6):(a=p,0===Ve&&ut(ie)),a!==p)if(At()!==p)if(44===f.charCodeAt(Ie)?(u=j,Ie++):(u=p,0===Ve&&ut(R)),u!==p)if(At()!==p){if(i=[],(o=dt())!==p)for(;o!==p;)i.push(o),o=dt();else i=p;e=i!==p?(o=At())!==p?(125===f.charCodeAt(Ie)?(c=d,Ie++):(c=p,0===Ve&&ut(m)),c!==p?(Ue=e,t=oe(r,i)):(Ie=e,p)):(Ie=e,p):(Ie=e,p)}else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;return e}())===p&&(e=function(){var e,t;e=Ie,35===f.charCodeAt(Ie)?(t=i,Ie++):(t=p,0===Ve&&ut(o));t!==p&&(Ue=e,t=c());return e=t}()),e}function st(){var e,t,r;if(e=Ie,t=[],(r=wt())===p&&(r=Et())===p&&(r=xt()),r!==p)for(;r!==p;)t.push(r),(r=wt())===p&&(r=Et())===p&&(r=xt());else t=p;return t!==p&&(Ue=e,t=a(t)),e=t}function lt(){var e,t,r,n,a;if(Ve++,t=[],n=r=e=Ie,Ve++,(a=yt())===p&&(v.test(f.charAt(Ie))?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&ut(A))),Ve--,(r=(n=a===p?void 0:(Ie=n,p))!==p?(f.length>Ie?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&ut(b)),a!==p?n=[n,a]:(Ie=r,p)):(Ie=r,p))!==p)for(;r!==p;)t.push(r),n=r=Ie,Ve++,(a=yt())===p&&(v.test(f.charAt(Ie))?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&ut(A))),Ve--,r=(n=a===p?void 0:(Ie=n,p))!==p?(f.length>Ie?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&ut(b)),a!==p?n=[n,a]:(Ie=r,p)):(Ie=r,p);else t=p;return e=t!==p?f.substring(e,Ie):t,Ve--,e===p&&(t=p,0===Ve&&ut(y)),e}function ft(){var e,t,r;return Ve++,e=Ie,47===f.charCodeAt(Ie)?(t=E,Ie++):(t=p,0===Ve&&ut(x)),e=t!==p&&(r=lt())!==p?(Ue=e,t=C(r)):(Ie=e,p),Ve--,e===p&&(t=p,0===Ve&&ut(w)),e}function pt(){var e,t,r,n;if(Ve++,e=Ie,At()!==p)if((t=lt())!==p){for(r=[],n=ft();n!==p;)r.push(n),n=ft();e=r!==p?(Ue=e,D(t,r)):(Ie=e,p)}else Ie=e,e=p;else Ie=e,e=p;return Ve--,e===p&&(p,0===Ve&&ut(k)),e}function ht(){var e,t,r,n;if(e=Ie,39===f.charCodeAt(Ie)?(t=N,Ie++):(t=p,0===Ve&&ut(_)),t!==p){if(r=[],(n=wt())===p&&(M.test(f.charAt(Ie))?(n=f.charAt(Ie),Ie++):(n=p,0===Ve&&ut(L))),n!==p)for(;n!==p;)r.push(n),(n=wt())===p&&(M.test(f.charAt(Ie))?(n=f.charAt(Ie),Ie++):(n=p,0===Ve&&ut(L)));else r=p;e=r!==p?(39===f.charCodeAt(Ie)?(n=N,Ie++):(n=p,0===Ve&&ut(_)),n!==p?t=[t,r,n]:(Ie=e,p)):(Ie=e,p)}else Ie=e,e=p;if(e===p)if(e=[],(t=wt())===p&&($.test(f.charAt(Ie))?(t=f.charAt(Ie),Ie++):(t=p,0===Ve&&ut(q))),t!==p)for(;t!==p;)e.push(t),(t=wt())===p&&($.test(f.charAt(Ie))?(t=f.charAt(Ie),Ie++):(t=p,0===Ve&&ut(q)));else e=p;return e}function gt(){var e,t;if(e=[],H.test(f.charAt(Ie))?(t=f.charAt(Ie),Ie++):(t=p,0===Ve&&ut(I)),t!==p)for(;t!==p;)e.push(t),H.test(f.charAt(Ie))?(t=f.charAt(Ie),Ie++):(t=p,0===Ve&&ut(I));else e=p;return e}function dt(){var e,t,r,n,a;return e=Ie,e=At()!==p&&(t=Dt())!==p&&At()!==p?(123===f.charCodeAt(Ie)?(r=h,Ie++):(r=p,0===Ve&&ut(g)),r!==p?(Ue=Ie,(le()?void 0:p)!==p&&(n=ot())!==p?(125===f.charCodeAt(Ie)?(a=d,Ie++):(a=p,0===Ve&&ut(m)),a!==p?(Ue=e,fe(t,n)):(Ie=e,p)):(Ie=e,p)):(Ie=e,p)):(Ie=e,p)}function mt(){var e,t,r,n,a;return e=Ie,e=At()!==p&&(t=function(){var e,t,r,n;return t=e=Ie,61===f.charCodeAt(Ie)?(r=ce,Ie++):(r=p,0===Ve&&ut(se)),(e=(t=r!==p&&(n=bt())!==p?r=[r,n]:(Ie=t,p))!==p?f.substring(e,Ie):t)===p&&(e=Dt()),e}())!==p&&At()!==p?(123===f.charCodeAt(Ie)?(r=h,Ie++):(r=p,0===Ve&&ut(g)),r!==p?(Ue=Ie,(pe()?void 0:p)!==p&&(n=ot())!==p?(125===f.charCodeAt(Ie)?(a=d,Ie++):(a=p,0===Ve&&ut(m)),a!==p?(Ue=e,he(t,n)):(Ie=e,p)):(Ie=e,p)):(Ie=e,p)):(Ie=e,p)}function yt(){var e;return Ve++,de.test(f.charAt(Ie))?(e=f.charAt(Ie),Ie++):(e=p,0===Ve&&ut(me)),Ve--,e===p&&0===Ve&&ut(ge),e}function vt(){var e;return Ve++,ve.test(f.charAt(Ie))?(e=f.charAt(Ie),Ie++):(e=p,0===Ve&&ut(Ae)),Ve--,e===p&&0===Ve&&ut(ye),e}function At(){var e,t,r;for(Ve++,e=Ie,t=[],r=yt();r!==p;)t.push(r),r=yt();return e=t!==p?f.substring(e,Ie):t,Ve--,e===p&&(t=p,0===Ve&&ut(be)),e}function bt(){var e,t,r;return Ve++,e=Ie,45===f.charCodeAt(Ie)?(t=Ee,Ie++):(t=p,0===Ve&&ut(xe)),t===p&&(t=null),e=t!==p&&(r=kt())!==p?(Ue=e,t=Ce(t,r)):(Ie=e,p),Ve--,e===p&&(t=p,0===Ve&&ut(we)),e}function wt(){var e,t;return Ve++,e=Ie,f.substr(Ie,2)===De?(t=De,Ie+=2):(t=p,0===Ve&&ut(Fe)),t!==p&&(Ue=e,t=Pe()),Ve--,(e=t)===p&&(t=p,0===Ve&&ut(ke)),e}function Et(){var e,t,r,n,a,u;if(e=Ie,39===f.charCodeAt(Ie)?(t=N,Ie++):(t=p,0===Ve&&ut(_)),t!==p)if((r=function(){var e,t,r,n;t=e=Ie,f.length>Ie?(r=f.charAt(Ie),Ie++):(r=p,0===Ve&&ut(b));t=r!==p?(Ue=Ie,n=je(r),(n=n?void 0:p)!==p?r=[r,n]:(Ie=t,p)):(Ie=t,p);e=t!==p?f.substring(e,Ie):t;return e}())!==p){for(n=Ie,a=[],f.substr(Ie,2)===De?(u=De,Ie+=2):(u=p,0===Ve&&ut(Fe)),u===p&&(M.test(f.charAt(Ie))?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&ut(L)));u!==p;)a.push(u),f.substr(Ie,2)===De?(u=De,Ie+=2):(u=p,0===Ve&&ut(Fe)),u===p&&(M.test(f.charAt(Ie))?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&ut(L)));e=(n=a!==p?f.substring(n,Ie):a)!==p?(39===f.charCodeAt(Ie)?(a=N,Ie++):(a=p,0===Ve&&ut(_)),a===p&&(a=null),a!==p?(Ue=e,t=Te(r,n)):(Ie=e,p)):(Ie=e,p)}else Ie=e,e=p;else Ie=e,e=p;return e}function xt(){var e,t,r,n;return t=e=Ie,f.length>Ie?(r=f.charAt(Ie),Ie++):(r=p,0===Ve&&ut(b)),(t=r!==p?(Ue=Ie,(n=(n=Se(r))?void 0:p)!==p?r=[r,n]:(Ie=t,p)):(Ie=t,p))===p&&(10===f.charCodeAt(Ie)?(t=Ye,Ie++):(t=p,0===Ve&&ut(Oe))),e=t!==p?f.substring(e,Ie):t}function Ct(){var e,t;return Ve++,e=Ie,(t=kt())===p&&(t=Dt()),e=t!==p?f.substring(e,Ie):t,Ve--,e===p&&(t=p,0===Ve&&ut(Re)),e}function kt(){var e,t,r,n,a;if(Ve++,e=Ie,48===f.charCodeAt(Ie)?(t=Ze,Ie++):(t=p,0===Ve&&ut(ze)),t!==p&&(Ue=e,t=Ne()),(e=t)===p){if(t=e=Ie,_e.test(f.charAt(Ie))?(r=f.charAt(Ie),Ie++):(r=p,0===Ve&&ut(Me)),r!==p){for(n=[],Le.test(f.charAt(Ie))?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&ut($e));a!==p;)n.push(a),Le.test(f.charAt(Ie))?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&ut($e));t=n!==p?r=[r,n]:(Ie=t,p)}else Ie=t,t=p;t!==p&&(Ue=e,t=qe(t)),e=t}return Ve--,e===p&&(t=p,0===Ve&&ut(Be)),e}function Dt(){var e,t,r,n,a;if(Ve++,t=[],n=r=e=Ie,Ve++,(a=yt())===p&&(a=vt()),Ve--,(r=(n=a===p?void 0:(Ie=n,p))!==p?(f.length>Ie?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&ut(b)),a!==p?n=[n,a]:(Ie=r,p)):(Ie=r,p))!==p)for(;r!==p;)t.push(r),n=r=Ie,Ve++,(a=yt())===p&&(a=vt()),Ve--,r=(n=a===p?void 0:(Ie=n,p))!==p?(f.length>Ie?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&ut(b)),a!==p?n=[n,a]:(Ie=r,p)):(Ie=r,p);else t=p;return e=t!==p?f.substring(e,Ie):t,Ve--,e===p&&(t=p,0===Ve&&ut(He)),e}var Ft,Pt,Tt,St=["root"];function Yt(){return"plural"===St[St.length-1]}function Ot(){return e&&e.captureLocation?{location:Xe()}:{}}if((t=n())!==p&&Ie===f.length)return t;throw t!==p&&Ie<f.length&&ut({type:"end"}),Ft=Qe,Pt=Ke<f.length?f.charAt(Ke):null,Tt=Ke<f.length?at(Ke,Ke+1):at(Ke,Ke),new Bt(Bt.buildMessage(Ft,Pt),Ft,Pt,Tt)},h=function(){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 u=arguments[t],i=0,o=u.length;i<o;i++,a++)n[a]=u[i];return n},g=/(^|[^\\])#/g;var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},s=/(?:[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;var l=/^\.(?:(0+)(\+|#+)?)?$/g,d=/^(@+)?(\+|#+)?$/g;function m(e){var n={};return e.replace(d,function(e,t,r){return"string"!=typeof r?(n.minimumSignificantDigits=t.length,n.maximumSignificantDigits=t.length):"+"===r?n.minimumSignificantDigits=t.length:"#"===t[0]?n.maximumSignificantDigits=t.length:(n.minimumSignificantDigits=t.length,n.maximumSignificantDigits=t.length+("string"==typeof r?r.length:0)),""}),n}function y(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 v(e){var t=y(e);return t||{}}jt.SyntaxError=Bt,jt.convertNumberSkeletonToNumberFormatOptions=function(e){for(var n={},t=0,r=e;t<r.length;t++){var a=r[t];switch(a.stem){case"percent":n.style="percent";continue;case"currency":n.style="currency",n.currency=a.options[0];continue;case"group-off":n.useGrouping=!1;continue;case"precision-integer":n.maximumFractionDigits=0;continue;case"measure-unit":n.style="unit",n.unit=a.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":n.notation="compact",n.compactDisplay="short";continue;case"compact-long":n.notation="compact",n.compactDisplay="long";continue;case"scientific":n=c(c(c({},n),{notation:"scientific"}),a.options.reduce(function(e,t){return c(c({},e),v(t))},{}));continue;case"engineering":n=c(c(c({},n),{notation:"engineering"}),a.options.reduce(function(e,t){return c(c({},e),v(t))},{}));continue;case"notation-simple":n.notation="standard";continue;case"unit-width-narrow":n.currencyDisplay="narrowSymbol",n.unitDisplay="narrow";continue;case"unit-width-short":n.currencyDisplay="code",n.unitDisplay="short";continue;case"unit-width-full-name":n.currencyDisplay="name",n.unitDisplay="long";continue;case"unit-width-iso-code":n.currencyDisplay="symbol";continue}if(l.test(a.stem)){if(1<a.options.length)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(l,function(e,t,r){return"."===e?n.maximumFractionDigits=0:"+"===r?n.minimumFractionDigits=r.length:"#"===t[0]?n.maximumFractionDigits=t.length:(n.minimumFractionDigits=t.length,n.maximumFractionDigits=t.length+("string"==typeof r?r.length:0)),""}),a.options.length&&(n=c(c({},n),m(a.options[0])))}else if(d.test(a.stem))n=c(c({},n),m(a.stem));else{var u=y(a.stem);u&&(n=c(c({},n),u))}}return n},jt.createLiteralElement=function(e){return{type:jt.TYPE.literal,value:e}},jt.createNumberElement=function(e,t){return{type:jt.TYPE.number,value:e,style:t}},jt.isArgumentElement=function(e){return e.type===jt.TYPE.argument},jt.isDateElement=function(e){return e.type===jt.TYPE.date},jt.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||1!==e.type)},jt.isLiteralElement=f,jt.isNumberElement=function(e){return e.type===jt.TYPE.number},jt.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||0!==e.type)},jt.isPluralElement=a,jt.isPoundElement=function(e){return e.type===jt.TYPE.pound},jt.isSelectElement=n,jt.isTimeElement=function(e){return e.type===jt.TYPE.time},jt.parse=function(e,t){var r=p(e,t);return t&&!1===t.normalizeHashtagInPlural||function l(e){e.forEach(function(s){(a(s)||n(s))&&Object.keys(s.options).forEach(function(e){for(var t,r=s.options[e],n=-1,a=void 0,u=0;u<r.value.length;u++){var i=r.value[u];if(f(i)&&g.test(i.value)){n=u,a=i;break}}if(a){var o=a.value.replace(g,"$1{"+s.value+", number}"),c=p(o);(t=r.value).splice.apply(t,h([n,1],c))}l(r.value)})})}(r),r},jt.parseDateTimeSkeleton=function(e){var r={};return e.replace(s,function(e){var t=e.length;switch(e[0]){case"G":r.era=4===t?"long":5===t?"narrow":"short";break;case"y":r.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":r.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":r.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":r.weekday=4===t?"short":5===t?"narrow":"short";break;case"e":if(t<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][t-4];break;case"a":r.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":r.hourCycle="h12",r.hour=["numeric","2-digit"][t-1];break;case"H":r.hourCycle="h23",r.hour=["numeric","2-digit"][t-1];break;case"K":r.hourCycle="h11",r.hour=["numeric","2-digit"][t-1];break;case"k":r.hourCycle="h24",r.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":r.minute=["numeric","2-digit"][t-1];break;case"s":r.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw new RangeError("`S/A` (second) pattenrs are not supported, use `s` instead");case"z":r.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) pattenrs are not supported, use `z` instead")}return""}),r},jt.pegParse=p,Object.defineProperty(jt,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).IntlMessageFormatParser={})}(this,function(jt){"use strict";var e;function f(e){return e.type===jt.TYPE.literal}function n(e){return e.type===jt.TYPE.select}function u(e){return e.type===jt.TYPE.plural}(e=jt.TYPE||(jt.TYPE={}))[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";var a,i,t=(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Rt=function(){return(Rt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var u in t=arguments[r])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e}).apply(this,arguments)},Bt=(i=Error,t(o,i),o.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 u(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 a(e){switch(e.type){case"literal":return'"'+n(e.text)+'"';case"class":var t=e.parts.map(function(e){return Array.isArray(e)?u(e[0])+"-"+u(e[1]):u(e)});return"["+(e.inverted?"^":"")+t+"]";case"any":return"any character";case"end":return"end of input";case"other":return e.description}}return"Expected "+function(e){var t,r,n=e.map(a);if(n.sort(),0<n.length){for(r=t=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 "+((i=t)?'"'+n(i)+'"':"end of input")+" found.";var i},o);function o(e,t,r,n){var u=i.call(this)||this;return u.message=e,u.expected=t,u.found=r,u.location=n,u.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(u,o),u}var p=function(f,e){e=void 0!==e?e:{};var t,p={},r={start:it},n=it,u=function(e){return e.join("")},a=function(e){return Rt({type:jt.TYPE.literal,value:e},Ot())},i="#",o=et("#",!1),c=function(){return Rt({type:jt.TYPE.pound},Ot())},s=rt("argumentElement"),h="{",g=et("{",!1),d="}",m=et("}",!1),l=function(e){return Rt({type:jt.TYPE.argument,value:e},Ot())},y=rt("numberSkeletonId"),v=/^['\/{}]/,A=tt(["'","/","{","}"],!1,!1),b={type:"any"},w=rt("numberSkeletonTokenOption"),E="/",x=et("/",!1),C=function(e){return e},k=rt("numberSkeletonToken"),D=function(e,t){return{stem:e,options:t}},F=function(e){return Rt({type:0,tokens:e},Ot())},P="::",T=et("::",!1),S=function(e){return e},Y=function(){return St.push("numberArgStyle"),!0},O=function(e){return St.pop(),e.replace(/\s*$/,"")},j=",",R=et(",",!1),B="number",Z=et("number",!1),z=function(e,t,r){return Rt({type:"number"===t?jt.TYPE.number:"date"===t?jt.TYPE.date:jt.TYPE.time,style:r&&r[2],value:e},Ot())},N="'",_=et("'",!1),M=/^[^']/,L=tt(["'"],!0,!1),$=/^[^a-zA-Z'{}]/,q=tt([["a","z"],["A","Z"],"'","{","}"],!0,!1),H=/^[a-zA-Z]/,I=tt([["a","z"],["A","Z"]],!1,!1),U=function(e){return Rt({type:1,pattern:e},Ot())},G=function(){return St.push("dateOrTimeArgStyle"),!0},K="date",Q=et("date",!1),V="time",W=et("time",!1),X="plural",J=et("plural",!1),ee="selectordinal",te=et("selectordinal",!1),re="offset:",ne=et("offset:",!1),ue=function(e,t,r,n){return Rt({type:jt.TYPE.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,u=t.location;return r in e&&Je('Duplicate option "'+r+'" in plural element: "'+We()+'"',Xe()),e[r]={value:n,location:u},e},{})},Ot())},ae="select",ie=et("select",!1),oe=function(e,t){return Rt({type:jt.TYPE.select,value:e,options:t.reduce(function(e,t){var r=t.id,n=t.value,u=t.location;return r in e&&Je('Duplicate option "'+r+'" in select element: "'+We()+'"',Xe()),e[r]={value:n,location:u},e},{})},Ot())},ce="=",se=et("=",!1),le=function(e){return St.push("select"),!0},fe=function(e,t){return St.pop(),Rt({id:e,value:t},Ot())},pe=function(e){return St.push("plural"),!0},he=function(e,t){return St.pop(),Rt({id:e,value:t},Ot())},ge=rt("whitespace"),de=/^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,me=tt([["\t","\r"]," "," "," "," ",[" "," "],"\u2028","\u2029"," "," "," "],!1,!1),ye=rt("syntax pattern"),ve=/^[!-\/:-@[-\^`{-~\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]/,Ae=tt([["!","/"],[":","@"],["[","^"],"`",["{","~"],["¡","§"],"©","«","¬","®","°","±","¶","»","¿","×","÷",["‐","‧"],["‰","‾"],["⁁","⁓"],["⁕","⁞"],["←",""],["─","❵"],["➔","⯿"],["⸀",""],["、","〃"],["〈","〠"],"〰","﴾","﴿","﹅","﹆"],!1,!1),be=rt("optional whitespace"),we=rt("number"),Ee="-",xe=et("-",!1),Ce=function(e,t){return t?e?-t:t:0},ke=rt("double apostrophes"),De="''",Fe=et("''",!1),Pe=function(){return"'"},Te=function(e,t){return e+t.replace("''","'")},Se=function(e){return!("{"===e||Yt()&&"#"===e||1<St.length&&"}"===e)},Ye="\n",Oe=et("\n",!1),je=function(e){return"{"===e||"}"===e||Yt()&&"#"===e},Re=rt("argNameOrNumber"),Be=rt("argNumber"),Ze="0",ze=et("0",!1),Ne=function(){return 0},_e=/^[1-9]/,Me=tt([["1","9"]],!1,!1),Le=/^[0-9]/,$e=tt([["0","9"]],!1,!1),qe=function(e){return parseInt(e.join(""),10)},He=rt("argName"),Ie=0,Ue=0,Ge=[{line:1,column:1}],Ke=0,Qe=[],Ve=0;if(void 0!==e.startRule){if(!(e.startRule in r))throw new Error("Can't start parsing from rule \""+e.startRule+'".');n=r[e.startRule]}function We(){return f.substring(Ue,Ie)}function Xe(){return ut(Ue,Ie)}function Je(e,t){throw function(e,t){return new Bt(e,[],"",t)}(e,t=void 0!==t?t:ut(Ue,Ie))}function et(e,t){return{type:"literal",text:e,ignoreCase:t}}function tt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function rt(e){return{type:"other",description:e}}function nt(e){var t,r=Ge[e];if(r)return r;for(t=e-1;!Ge[t];)t--;for(r={line:(r=Ge[t]).line,column:r.column};t<e;)10===f.charCodeAt(t)?(r.line++,r.column=1):r.column++,t++;return Ge[e]=r}function ut(e,t){var r=nt(e),n=nt(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function at(e){Ie<Ke||(Ke<Ie&&(Ke=Ie,Qe=[]),Qe.push(e))}function it(){return ot()}function ot(){var e,t;for(e=[],t=ct();t!==p;)e.push(t),t=ct();return e}function ct(){var e;return(e=function(){var e,t;e=Ie,(t=st())!==p&&(Ue=e,t=a(t));return e=t}())===p&&(e=function(){var e,t,r,n,u;Ve++,e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&at(g));e=t!==p?(r=At(),r!==p?(n=Ct())!==p?At()!==p?(125===f.charCodeAt(Ie)?(u=d,Ie++):(u=p,0===Ve&&at(m)),u!==p?(Ue=e,t=l(n)):(Ie=e,p)):(Ie=e,p):(Ie=e,p):(Ie=e,p)):(Ie=e,p);Ve--,e===p&&(t=p,0===Ve&&at(s));return e}())===p&&(e=function(){var e;(e=function(){var e,t,r,n,u,a,i,o,c,s;e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&at(g));e=t!==p?(r=At(),r!==p?(n=Ct())!==p?At()!==p?(44===f.charCodeAt(Ie)?(u=j,Ie++):(u=p,0===Ve&&at(R)),u!==p?At()!==p?(f.substr(Ie,6)===B?(a=B,Ie+=6):(a=p,0===Ve&&at(Z)),a!==p?At()!==p?(i=Ie,44===f.charCodeAt(Ie)?(o=j,Ie++):(o=p,0===Ve&&at(R)),(i=o!==p?(c=At())!==p?(s=function(){var e,t,r;e=Ie,f.substr(Ie,2)===P?(t=P,Ie+=2):(t=p,0===Ve&&at(T));e=t!==p?(r=function(){var e,t,r;if(e=Ie,t=[],(r=pt())!==p)for(;r!==p;)t.push(r),r=pt();else t=p;t!==p&&(Ue=e,t=F(t));return e=t}(),r!==p?(Ue=e,t=S(r)):(Ie=e,p)):(Ie=e,p);e===p&&(Ue=e=Ie,t=Y(),e=(t=t?void 0:p)!==p?(r=st())!==p?(Ue=e,t=O(r)):(Ie=e,p):(Ie=e,p));return e}())!==p?o=[o,c,s]:(Ie=i,p):(Ie=i,p):(Ie=i,p))===p&&(i=null),i!==p?(o=At())!==p?(125===f.charCodeAt(Ie)?(c=d,Ie++):(c=p,0===Ve&&at(m)),c!==p?(Ue=e,t=z(n,a,i)):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p):(Ie=e,p)):(Ie=e,p);return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c,s;e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&at(g));e=t!==p?(r=At(),r!==p?(n=Ct())!==p?At()!==p?(44===f.charCodeAt(Ie)?(u=j,Ie++):(u=p,0===Ve&&at(R)),u!==p?At()!==p?(f.substr(Ie,4)===K?(a=K,Ie+=4):(a=p,0===Ve&&at(Q)),a===p&&(f.substr(Ie,4)===V?(a=V,Ie+=4):(a=p,0===Ve&&at(W))),a!==p?At()!==p?(i=Ie,44===f.charCodeAt(Ie)?(o=j,Ie++):(o=p,0===Ve&&at(R)),(i=o!==p?(c=At())!==p?(s=function(){var e,t,r;e=Ie,f.substr(Ie,2)===P?(t=P,Ie+=2):(t=p,0===Ve&&at(T));e=t!==p?(r=function(){var e,t,r,n;t=e=Ie,r=[],(n=ht())===p&&(n=gt());if(n!==p)for(;n!==p;)r.push(n),(n=ht())===p&&(n=gt());else r=p;t=r!==p?f.substring(t,Ie):r;t!==p&&(Ue=e,t=U(t));return e=t}(),r!==p?(Ue=e,t=S(r)):(Ie=e,p)):(Ie=e,p);e===p&&(Ue=e=Ie,t=G(),e=(t=t?void 0:p)!==p?(r=st())!==p?(Ue=e,t=O(r)):(Ie=e,p):(Ie=e,p));return e}())!==p?o=[o,c,s]:(Ie=i,p):(Ie=i,p):(Ie=i,p))===p&&(i=null),i!==p?(o=At())!==p?(125===f.charCodeAt(Ie)?(c=d,Ie++):(c=p,0===Ve&&at(m)),c!==p?(Ue=e,t=z(n,a,i)):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p)):(Ie=e,p):(Ie=e,p):(Ie=e,p)):(Ie=e,p);return e}());return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c,s,l;e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&at(g));if(t!==p)if(At()!==p)if((r=Ct())!==p)if(At()!==p)if(44===f.charCodeAt(Ie)?(n=j,Ie++):(n=p,0===Ve&&at(R)),n!==p)if(At()!==p)if(f.substr(Ie,6)===X?(u=X,Ie+=6):(u=p,0===Ve&&at(J)),u===p&&(f.substr(Ie,13)===ee?(u=ee,Ie+=13):(u=p,0===Ve&&at(te))),u!==p)if(At()!==p)if(44===f.charCodeAt(Ie)?(a=j,Ie++):(a=p,0===Ve&&at(R)),a!==p)if(At()!==p)if(i=Ie,f.substr(Ie,7)===re?(o=re,Ie+=7):(o=p,0===Ve&&at(ne)),(i=o!==p?(c=At())!==p?(s=bt())!==p?o=[o,c,s]:(Ie=i,p):(Ie=i,p):(Ie=i,p))===p&&(i=null),i!==p)if((o=At())!==p){if(c=[],(s=mt())!==p)for(;s!==p;)c.push(s),s=mt();else c=p;e=c!==p?(s=At())!==p?(125===f.charCodeAt(Ie)?(l=d,Ie++):(l=p,0===Ve&&at(m)),l!==p?(Ue=e,t=ue(r,u,i,c)):(Ie=e,p)):(Ie=e,p):(Ie=e,p)}else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;return e}())===p&&(e=function(){var e,t,r,n,u,a,i,o,c;e=Ie,123===f.charCodeAt(Ie)?(t=h,Ie++):(t=p,0===Ve&&at(g));if(t!==p)if(At()!==p)if((r=Ct())!==p)if(At()!==p)if(44===f.charCodeAt(Ie)?(n=j,Ie++):(n=p,0===Ve&&at(R)),n!==p)if(At()!==p)if(f.substr(Ie,6)===ae?(u=ae,Ie+=6):(u=p,0===Ve&&at(ie)),u!==p)if(At()!==p)if(44===f.charCodeAt(Ie)?(a=j,Ie++):(a=p,0===Ve&&at(R)),a!==p)if(At()!==p){if(i=[],(o=dt())!==p)for(;o!==p;)i.push(o),o=dt();else i=p;e=i!==p?(o=At())!==p?(125===f.charCodeAt(Ie)?(c=d,Ie++):(c=p,0===Ve&&at(m)),c!==p?(Ue=e,t=oe(r,i)):(Ie=e,p)):(Ie=e,p):(Ie=e,p)}else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;else Ie=e,e=p;return e}())===p&&(e=function(){var e,t;e=Ie,35===f.charCodeAt(Ie)?(t=i,Ie++):(t=p,0===Ve&&at(o));t!==p&&(Ue=e,t=c());return e=t}()),e}function st(){var e,t,r;if(e=Ie,t=[],(r=wt())===p&&(r=Et())===p&&(r=xt()),r!==p)for(;r!==p;)t.push(r),(r=wt())===p&&(r=Et())===p&&(r=xt());else t=p;return t!==p&&(Ue=e,t=u(t)),e=t}function lt(){var e,t,r,n,u;if(Ve++,t=[],n=r=e=Ie,Ve++,(u=yt())===p&&(v.test(f.charAt(Ie))?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&at(A))),Ve--,(r=(n=u===p?void 0:(Ie=n,p))!==p?(f.length>Ie?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&at(b)),u!==p?n=[n,u]:(Ie=r,p)):(Ie=r,p))!==p)for(;r!==p;)t.push(r),n=r=Ie,Ve++,(u=yt())===p&&(v.test(f.charAt(Ie))?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&at(A))),Ve--,r=(n=u===p?void 0:(Ie=n,p))!==p?(f.length>Ie?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&at(b)),u!==p?n=[n,u]:(Ie=r,p)):(Ie=r,p);else t=p;return e=t!==p?f.substring(e,Ie):t,Ve--,e===p&&(t=p,0===Ve&&at(y)),e}function ft(){var e,t,r;return Ve++,e=Ie,47===f.charCodeAt(Ie)?(t=E,Ie++):(t=p,0===Ve&&at(x)),e=t!==p&&(r=lt())!==p?(Ue=e,t=C(r)):(Ie=e,p),Ve--,e===p&&(t=p,0===Ve&&at(w)),e}function pt(){var e,t,r,n;if(Ve++,e=Ie,At()!==p)if((t=lt())!==p){for(r=[],n=ft();n!==p;)r.push(n),n=ft();e=r!==p?(Ue=e,D(t,r)):(Ie=e,p)}else Ie=e,e=p;else Ie=e,e=p;return Ve--,e===p&&(p,0===Ve&&at(k)),e}function ht(){var e,t,r,n;if(e=Ie,39===f.charCodeAt(Ie)?(t=N,Ie++):(t=p,0===Ve&&at(_)),t!==p){if(r=[],(n=wt())===p&&(M.test(f.charAt(Ie))?(n=f.charAt(Ie),Ie++):(n=p,0===Ve&&at(L))),n!==p)for(;n!==p;)r.push(n),(n=wt())===p&&(M.test(f.charAt(Ie))?(n=f.charAt(Ie),Ie++):(n=p,0===Ve&&at(L)));else r=p;e=r!==p?(39===f.charCodeAt(Ie)?(n=N,Ie++):(n=p,0===Ve&&at(_)),n!==p?t=[t,r,n]:(Ie=e,p)):(Ie=e,p)}else Ie=e,e=p;if(e===p)if(e=[],(t=wt())===p&&($.test(f.charAt(Ie))?(t=f.charAt(Ie),Ie++):(t=p,0===Ve&&at(q))),t!==p)for(;t!==p;)e.push(t),(t=wt())===p&&($.test(f.charAt(Ie))?(t=f.charAt(Ie),Ie++):(t=p,0===Ve&&at(q)));else e=p;return e}function gt(){var e,t;if(e=[],H.test(f.charAt(Ie))?(t=f.charAt(Ie),Ie++):(t=p,0===Ve&&at(I)),t!==p)for(;t!==p;)e.push(t),H.test(f.charAt(Ie))?(t=f.charAt(Ie),Ie++):(t=p,0===Ve&&at(I));else e=p;return e}function dt(){var e,t,r,n,u;return e=Ie,e=At()!==p&&(t=Dt())!==p&&At()!==p?(123===f.charCodeAt(Ie)?(r=h,Ie++):(r=p,0===Ve&&at(g)),r!==p?(Ue=Ie,(le()?void 0:p)!==p&&(n=ot())!==p?(125===f.charCodeAt(Ie)?(u=d,Ie++):(u=p,0===Ve&&at(m)),u!==p?(Ue=e,fe(t,n)):(Ie=e,p)):(Ie=e,p)):(Ie=e,p)):(Ie=e,p)}function mt(){var e,t,r,n,u;return e=Ie,e=At()!==p&&(t=function(){var e,t,r,n;return t=e=Ie,61===f.charCodeAt(Ie)?(r=ce,Ie++):(r=p,0===Ve&&at(se)),(e=(t=r!==p&&(n=bt())!==p?r=[r,n]:(Ie=t,p))!==p?f.substring(e,Ie):t)===p&&(e=Dt()),e}())!==p&&At()!==p?(123===f.charCodeAt(Ie)?(r=h,Ie++):(r=p,0===Ve&&at(g)),r!==p?(Ue=Ie,(pe()?void 0:p)!==p&&(n=ot())!==p?(125===f.charCodeAt(Ie)?(u=d,Ie++):(u=p,0===Ve&&at(m)),u!==p?(Ue=e,he(t,n)):(Ie=e,p)):(Ie=e,p)):(Ie=e,p)):(Ie=e,p)}function yt(){var e;return Ve++,de.test(f.charAt(Ie))?(e=f.charAt(Ie),Ie++):(e=p,0===Ve&&at(me)),Ve--,e===p&&0===Ve&&at(ge),e}function vt(){var e;return Ve++,ve.test(f.charAt(Ie))?(e=f.charAt(Ie),Ie++):(e=p,0===Ve&&at(Ae)),Ve--,e===p&&0===Ve&&at(ye),e}function At(){var e,t,r;for(Ve++,e=Ie,t=[],r=yt();r!==p;)t.push(r),r=yt();return e=t!==p?f.substring(e,Ie):t,Ve--,e===p&&(t=p,0===Ve&&at(be)),e}function bt(){var e,t,r;return Ve++,e=Ie,45===f.charCodeAt(Ie)?(t=Ee,Ie++):(t=p,0===Ve&&at(xe)),t===p&&(t=null),e=t!==p&&(r=kt())!==p?(Ue=e,t=Ce(t,r)):(Ie=e,p),Ve--,e===p&&(t=p,0===Ve&&at(we)),e}function wt(){var e,t;return Ve++,e=Ie,f.substr(Ie,2)===De?(t=De,Ie+=2):(t=p,0===Ve&&at(Fe)),t!==p&&(Ue=e,t=Pe()),Ve--,(e=t)===p&&(t=p,0===Ve&&at(ke)),e}function Et(){var e,t,r,n,u,a;if(e=Ie,39===f.charCodeAt(Ie)?(t=N,Ie++):(t=p,0===Ve&&at(_)),t!==p)if((r=function(){var e,t,r,n;t=e=Ie,f.length>Ie?(r=f.charAt(Ie),Ie++):(r=p,0===Ve&&at(b));t=r!==p?(Ue=Ie,n=je(r),(n=n?void 0:p)!==p?r=[r,n]:(Ie=t,p)):(Ie=t,p);e=t!==p?f.substring(e,Ie):t;return e}())!==p){for(n=Ie,u=[],f.substr(Ie,2)===De?(a=De,Ie+=2):(a=p,0===Ve&&at(Fe)),a===p&&(M.test(f.charAt(Ie))?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&at(L)));a!==p;)u.push(a),f.substr(Ie,2)===De?(a=De,Ie+=2):(a=p,0===Ve&&at(Fe)),a===p&&(M.test(f.charAt(Ie))?(a=f.charAt(Ie),Ie++):(a=p,0===Ve&&at(L)));e=(n=u!==p?f.substring(n,Ie):u)!==p?(39===f.charCodeAt(Ie)?(u=N,Ie++):(u=p,0===Ve&&at(_)),u===p&&(u=null),u!==p?(Ue=e,t=Te(r,n)):(Ie=e,p)):(Ie=e,p)}else Ie=e,e=p;else Ie=e,e=p;return e}function xt(){var e,t,r,n;return t=e=Ie,f.length>Ie?(r=f.charAt(Ie),Ie++):(r=p,0===Ve&&at(b)),(t=r!==p?(Ue=Ie,(n=(n=Se(r))?void 0:p)!==p?r=[r,n]:(Ie=t,p)):(Ie=t,p))===p&&(10===f.charCodeAt(Ie)?(t=Ye,Ie++):(t=p,0===Ve&&at(Oe))),e=t!==p?f.substring(e,Ie):t}function Ct(){var e,t;return Ve++,e=Ie,(t=kt())===p&&(t=Dt()),e=t!==p?f.substring(e,Ie):t,Ve--,e===p&&(t=p,0===Ve&&at(Re)),e}function kt(){var e,t,r,n,u;if(Ve++,e=Ie,48===f.charCodeAt(Ie)?(t=Ze,Ie++):(t=p,0===Ve&&at(ze)),t!==p&&(Ue=e,t=Ne()),(e=t)===p){if(t=e=Ie,_e.test(f.charAt(Ie))?(r=f.charAt(Ie),Ie++):(r=p,0===Ve&&at(Me)),r!==p){for(n=[],Le.test(f.charAt(Ie))?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&at($e));u!==p;)n.push(u),Le.test(f.charAt(Ie))?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&at($e));t=n!==p?r=[r,n]:(Ie=t,p)}else Ie=t,t=p;t!==p&&(Ue=e,t=qe(t)),e=t}return Ve--,e===p&&(t=p,0===Ve&&at(Be)),e}function Dt(){var e,t,r,n,u;if(Ve++,t=[],n=r=e=Ie,Ve++,(u=yt())===p&&(u=vt()),Ve--,(r=(n=u===p?void 0:(Ie=n,p))!==p?(f.length>Ie?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&at(b)),u!==p?n=[n,u]:(Ie=r,p)):(Ie=r,p))!==p)for(;r!==p;)t.push(r),n=r=Ie,Ve++,(u=yt())===p&&(u=vt()),Ve--,r=(n=u===p?void 0:(Ie=n,p))!==p?(f.length>Ie?(u=f.charAt(Ie),Ie++):(u=p,0===Ve&&at(b)),u!==p?n=[n,u]:(Ie=r,p)):(Ie=r,p);else t=p;return e=t!==p?f.substring(e,Ie):t,Ve--,e===p&&(t=p,0===Ve&&at(He)),e}var Ft,Pt,Tt,St=["root"];function Yt(){return"plural"===St[St.length-1]}function Ot(){return e&&e.captureLocation?{location:Xe()}:{}}if((t=n())!==p&&Ie===f.length)return t;throw t!==p&&Ie<f.length&&at({type:"end"}),Ft=Qe,Pt=Ke<f.length?f.charAt(Ke):null,Tt=Ke<f.length?ut(Ke,Ke+1):ut(Ke,Ke),new Bt(Bt.buildMessage(Ft,Pt),Ft,Pt,Tt)},h=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),u=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,o=a.length;i<o;i++,u++)n[u]=a[i];return n},g=/(^|[^\\])#/g;var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var u in t=arguments[r])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e}).apply(this,arguments)},s=/(?:[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;var l=/^\.(?:(0+)(\+|#+)?)?$/g,d=/^(@+)?(\+|#+)?$/g;function m(e){var n={};return e.replace(d,function(e,t,r){return"string"!=typeof r?(n.minimumSignificantDigits=t.length,n.maximumSignificantDigits=t.length):"+"===r?n.minimumSignificantDigits=t.length:"#"===t[0]?n.maximumSignificantDigits=t.length:(n.minimumSignificantDigits=t.length,n.maximumSignificantDigits=t.length+("string"==typeof r?r.length:0)),""}),n}function y(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 v(e){var t=y(e);return t||{}}jt.SyntaxError=Bt,jt.convertNumberSkeletonToNumberFormatOptions=function(e){for(var n={},t=0,r=e;t<r.length;t++){var u=r[t];switch(u.stem){case"percent":n.style="percent";continue;case"currency":n.style="currency",n.currency=u.options[0];continue;case"group-off":n.useGrouping=!1;continue;case"precision-integer":n.maximumFractionDigits=0;continue;case"measure-unit":n.style="unit",n.unit=u.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":n.notation="compact",n.compactDisplay="short";continue;case"compact-long":n.notation="compact",n.compactDisplay="long";continue;case"scientific":n=c(c(c({},n),{notation:"scientific"}),u.options.reduce(function(e,t){return c(c({},e),v(t))},{}));continue;case"engineering":n=c(c(c({},n),{notation:"engineering"}),u.options.reduce(function(e,t){return c(c({},e),v(t))},{}));continue;case"notation-simple":n.notation="standard";continue;case"unit-width-narrow":n.currencyDisplay="narrowSymbol",n.unitDisplay="narrow";continue;case"unit-width-short":n.currencyDisplay="code",n.unitDisplay="short";continue;case"unit-width-full-name":n.currencyDisplay="name",n.unitDisplay="long";continue;case"unit-width-iso-code":n.currencyDisplay="symbol";continue}if(l.test(u.stem)){if(1<u.options.length)throw new RangeError("Fraction-precision stems only accept a single optional option");u.stem.replace(l,function(e,t,r){return"."===e?n.maximumFractionDigits=0:"+"===r?n.minimumFractionDigits=r.length:"#"===t[0]?n.maximumFractionDigits=t.length:(n.minimumFractionDigits=t.length,n.maximumFractionDigits=t.length+("string"==typeof r?r.length:0)),""}),u.options.length&&(n=c(c({},n),m(u.options[0])))}else if(d.test(u.stem))n=c(c({},n),m(u.stem));else{var a=y(u.stem);a&&(n=c(c({},n),a))}}return n},jt.createLiteralElement=function(e){return{type:jt.TYPE.literal,value:e}},jt.createNumberElement=function(e,t){return{type:jt.TYPE.number,value:e,style:t}},jt.isArgumentElement=function(e){return e.type===jt.TYPE.argument},jt.isDateElement=function(e){return e.type===jt.TYPE.date},jt.isDateTimeSkeleton=function(e){return!(!e||"object"!=typeof e||1!==e.type)},jt.isLiteralElement=f,jt.isNumberElement=function(e){return e.type===jt.TYPE.number},jt.isNumberSkeleton=function(e){return!(!e||"object"!=typeof e||0!==e.type)},jt.isPluralElement=u,jt.isPoundElement=function(e){return e.type===jt.TYPE.pound},jt.isSelectElement=n,jt.isTimeElement=function(e){return e.type===jt.TYPE.time},jt.parse=function(e,t){var r=p(e,t);return t&&!1===t.normalizeHashtagInPlural||function l(e){e.forEach(function(s){(u(s)||n(s))&&Object.keys(s.options).forEach(function(e){for(var t,r=s.options[e],n=-1,u=void 0,a=0;a<r.value.length;a++){var i=r.value[a];if(f(i)&&g.test(i.value)){n=a,u=i;break}}if(u){var o=u.value.replace(g,"$1{"+s.value+", number}"),c=p(o);(t=r.value).splice.apply(t,h([n,1],c))}l(r.value)})})}(r),r},jt.parseDateTimeSkeleton=function(e){var r={};return e.replace(s,function(e){var t=e.length;switch(e[0]){case"G":r.era=4===t?"long":5===t?"narrow":"short";break;case"y":r.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":r.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":r.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":r.weekday=4===t?"short":5===t?"narrow":"short";break;case"e":if(t<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][t-4];break;case"a":r.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":r.hourCycle="h12",r.hour=["numeric","2-digit"][t-1];break;case"H":r.hourCycle="h23",r.hour=["numeric","2-digit"][t-1];break;case"K":r.hourCycle="h11",r.hour=["numeric","2-digit"][t-1];break;case"k":r.hourCycle="h24",r.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":r.minute=["numeric","2-digit"][t-1];break;case"s":r.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw new RangeError("`S/A` (second) pattenrs are not supported, use `s` instead");case"z":r.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) pattenrs are not supported, use `z` instead")}return""}),r},jt.pegParse=p,Object.defineProperty(jt,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=intl-messageformat-parser.min.js.map |
@@ -85,3 +85,3 @@ import { UnifiedNumberFormatOptions } from '@formatjs/intl-unified-numberformat'; | ||
export declare function isDateTimeSkeleton(el?: DateElement['style'] | TimeElement['style']): el is DateTimeSkeleton; | ||
export declare function isDateTimeSkeleton(el?: DateElement['style'] | TimeElement['style'] | Skeleton): el is DateTimeSkeleton; | ||
@@ -95,3 +95,3 @@ /** | ||
export declare function isNumberSkeleton(el: NumberElement['style']): el is NumberSkeleton; | ||
export declare function isNumberSkeleton(el: NumberElement['style'] | Skeleton): el is NumberSkeleton; | ||
@@ -98,0 +98,0 @@ export declare function isPluralElement(el: MessageFormatElement): el is PluralElement; |
@@ -111,4 +111,4 @@ export declare enum TYPE { | ||
export declare function isPoundElement(el: MessageFormatElement): el is PoundElement; | ||
export declare function isNumberSkeleton(el: NumberElement['style']): el is NumberSkeleton; | ||
export declare function isDateTimeSkeleton(el?: DateElement['style'] | TimeElement['style']): el is DateTimeSkeleton; | ||
export declare function isNumberSkeleton(el: NumberElement['style'] | Skeleton): el is NumberSkeleton; | ||
export declare function isDateTimeSkeleton(el?: DateElement['style'] | TimeElement['style'] | Skeleton): el is DateTimeSkeleton; | ||
export declare function createLiteralElement(value: string): LiteralElement; | ||
@@ -115,0 +115,0 @@ export declare function createNumberElement(value: string, style?: string | null): NumberElement; |
{ | ||
"name": "intl-messageformat-parser", | ||
"version": "3.6.2", | ||
"version": "3.6.3", | ||
"description": "Parses ICU Message strings into an AST via JavaScript.", | ||
@@ -49,6 +49,6 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@formatjs/intl-unified-numberformat": "^3.0.4" | ||
"@formatjs/intl-unified-numberformat": "^3.1.0" | ||
}, | ||
"homepage": "https://github.com/formatjs/formatjs", | ||
"gitHead": "8b0baec8eda5002715cf893274fe59782fc2d371" | ||
"gitHead": "86f218a78e66f003e35d4807842102d6ff670af9" | ||
} |
@@ -166,3 +166,3 @@ export enum TYPE { | ||
export function isNumberSkeleton( | ||
el: NumberElement['style'] | ||
el: NumberElement['style'] | Skeleton | ||
): el is NumberSkeleton { | ||
@@ -172,3 +172,3 @@ return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number); | ||
export function isDateTimeSkeleton( | ||
el?: DateElement['style'] | TimeElement['style'] | ||
el?: DateElement['style'] | TimeElement['style'] | Skeleton | ||
): el is DateTimeSkeleton { | ||
@@ -175,0 +175,0 @@ return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
889031
13167