(function(n,t){typeof define=="function"&&define.amd?define(t):typeof module=="object"&&typeof module.exports=="object"?module.exports=t():n.Cldr=t()})(this,function(){var i=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},c=function(n,t){if(i(n)&&(n=n.join("/")),typeof n!="string")throw new Error('invalid path "'+n+'"');return n=n.replace(/^\//,"").replace(/^cldr\//,""),n=n.replace(/{[a-zA-Z]+}/g,function(n){return n=n.replace(/^{([^}]*)}$/,"$1"),t[n]}),n.split("/")},l=function(n,t){var i,r;if(n.some)return n.some(t);for(i=0,r=n.length;i<r;i++)if(t(n[i],i,n))return!0;return!1},u=function(n,t,i,r){var e,h,u=i[0],f=i[1],s=n.localeSep,o=i[2];return(r=r||{},u!=="und"&&f!=="Zzzz"&&o!=="ZZ")?[u,f,o]:typeof t.get("supplemental/likelySubtags")=="undefined"?void 0:(h=l([[u,f,o],[u,o],[u,f],[u],["und",f]],function(n){return e=!/\b(Zzzz|ZZ)\b/.test(n.join(s))&&t.get(["supplemental/likelySubtags",n.join(s)])}),h?(e=e.split(s),[u!=="und"?u:e[0],f!=="Zzzz"?f:e[1],o!=="ZZ"?o:e[2]]):r.force?t.get("supplemental/likelySubtags/und").split(s):void 0)},a=function(n,t,i){var f,e,r=i[0],o=i[1],s=i[2];return e=l([[[r,"Zzzz","ZZ"],[r]],[[r,"Zzzz",s],[r,s]],[[r,o,"ZZ"],[r,o]]],function(r){var e=u(n,t,r[0]);return f=r[1],e&&e[0]===i[0]&&e[1]===i[1]&&e[2]===i[2]}),e?f:i},v=function(n){var t,r,i=[];return(n=n.replace(/_/,"-"),t=n.split("-u-"),t[1]&&(t[1]=t[1].split("-t-"),n=t[0]+(t[1][1]?"-t-"+t[1][1]:""),i[4]=t[1][0]),r=n.split("-t-")[0],t=r.match(/^(([a-z]{2,3})(-([A-Z][a-z]{3}))?(-([A-Z]{2}|[0-9]{3}))?)(-[a-zA-Z0-9]{5,8}|[0-9][a-zA-Z0-9]{3})*$|^(root)$/),t===null)?["und","Zzzz","ZZ"]:(i[0]=t[9]||t[2]||"und",i[1]=t[4]||"Zzzz",i[2]=t[6]||"ZZ",i[3]=t[7],i)},f=function(n,t){var i,r;if(n.forEach)return n.forEach(t);for(i=0,r=n.length;i<r;i++)t(n[i],i,n)},d=function(n,t,i){var e=n._availableBundleMap,r=n._availableBundleMapQueue;return r.length&&(f(r,function(i){var o,h,f,s;(s=v(i),h=u(n,t,s,{force:!0})||s,f=a(n,t,h),f=f.join(n.localeSep),o=r[f],o&&o.length<i.length)||(e[f]=i)}),n._availableBundleMapQueue=[]),e[i]||null},g=function(n){var t,i=[];if(Object.keys)return Object.keys(n);for(t in n)i.push(t);return i},y=function(n,t){var i,r;return r=n+(t&&JSON?": "+JSON.stringify(t):""),i=new Error(r),i.code=n,f(g(t),function(n){i[n]=t[n]}),i},e=function(n,t,i){if(!t)throw y(n,i);},t=function(n,t){e("E_MISSING_PARAMETER",typeof n!="undefined",{name:t})},r=function(n,t,i,r){e("E_INVALID_PAR_TYPE",i,{expected:r,name:t,value:n})},o=function(n,t){r(n,t,typeof n=="string"||i(n),"String or Array")},nt=function(n){return n!==null&&""+n=="[object Object]"},p=function(n,t){r(n,t,typeof n=="undefined"||nt(n),"Plain Object")},tt=function(n,t){r(n,t,typeof n=="string","a string")},s=function(n,t){for(var r=n,u=t.length,i=0;i<u-1;i++)if(r=r[t[i]],!r)return undefined;return r[t[i]]},it=function(n,t){var i,u=n._availableBundleMapQueue,r=s(t,["main"]);if(r)for(i in r)r.hasOwnProperty(i)&&i!=="root"&&u.push(i)},h=function(n){return i(n)?n:[n]},w=function(){var n=function(){var t={},r=[].slice.call(arguments,0);return f(r,function(r){for(var u in r)t[u]=u in t&&i(t[u])?t[u].concat(r[u]):u in t&&typeof t[u]=="object"?n(t[u],r[u]):r[u]}),t};return n}(),b=function(n,i,r){var e,u,f;for(t(r[0],"json"),e=0;e<r.length;e++)for(f=h(r[e]),u=0;u<f.length;u++)p(f[u],"json"),i=w(i,f[u]),it(n,f[u]);return i},k=function(n,t,i){var r=c(t,i);return s(n._resolved,r)},n=function(n){this.init(n)};return n._alwaysArray=h,n._coreLoad=b,n._createError=y,n._itemGetResolved=k,n._jsonMerge=w,n._pathNormalize=c,n._resourceGet=s,n._validatePresence=t,n._validateType=r,n._validateTypePath=o,n._validateTypePlainObject=p,n._availableBundleMap={},n._availableBundleMapQueue=[],n._resolved={},n.localeSep="-",n.load=function(){n._resolved=b(n,n._resolved,arguments)},n.prototype.init=function(i){var e,c,r,o,l,f,s,h,y,p=n.localeSep;t(i,"locale");tt(i,"locale");f=v(i);h=f[4];y=f[3];r=u(n,this,f,{force:!0})||f;c=r[0];l=r[1];s=r[2];o=a(n,this,r).join(p);this.attributes=e={bundle:d(n,this,o),minlanguageId:o,maxLanguageId:r.join(p),language:c,script:l,territory:s,region:s,variant:y};h&&("-"+h).replace(/-[a-z]{3,8}|(-[a-z]{2})-([a-z]{3,8})/g,function(n,t,i){t?e["u"+t]=i:e["u"+n]=!0});this.locale=i},n.prototype.get=function(i){return t(i,"path"),o(i,"path"),k(n,i,this.attributes)},n.prototype.main=function(n){return t(n,"path"),o(n,"path"),e("E_MISSING_BUNDLE",this.attributes.bundle!==null,{locale:this.locale}),n=h(n),this.get(["main/{bundle}"].concat(n))},n}),function(n){typeof define=="function"&&define.amd?define(["../cldr"],n):typeof module=="object"&&typeof module.exports=="object"?module.exports=n(require("cldrjs")):n(Cldr)}(function(n){function y(n,t){f(n,t,typeof n=="string"||n instanceof RegExp,"String or RegExp")}function r(n,t){return function(i,r){return u(i,"event"),y(i,"event"),u(r,"listener"),e(r,"listener"),t[n].apply(t,arguments)}}function h(n){return r("off",n)}function c(n){return r("on",n)}function l(n){return r("once",n)}function a(){o=n.prototype.get;n.prototype.get=function(n){var i=o.apply(this,arguments);return n=v(n,this.attributes).join("/"),t.trigger("get",[n,i]),this.ee.trigger("get",[n,i]),i}}var v=n._pathNormalize,u=n._validatePresence,f=n._validateType,i,e,o,s,t;return i=function(){function i(){}function u(n,t){for(var i=n.length;i--;)if(n[i].listener===t)return i;return-1}function t(n){return function(){return this[n].apply(this,arguments)}}var n=i.prototype,r=this,f=r.EventEmitter;return n.getListeners=function(n){var t=this._getEvents(),r,i;if(n instanceof RegExp){r={};for(i in t)t.hasOwnProperty(i)&&n.test(i)&&(r[i]=t[i])}else r=t[n]||(t[n]=[]);return r},n.flattenListeners=function(n){for(var i=[],t=0;t<n.length;t+=1)i.push(n[t].listener);return i},n.getListenersAsObject=function(n){var t=this.getListeners(n),i;return t instanceof Array&&(i={},i[n]=t),i||t},n.addListener=function(n,t){var i=this.getListenersAsObject(n),f=typeof t=="object";for(var r in i)i.hasOwnProperty(r)&&u(i[r],t)===-1&&i[r].push(f?t:{listener:t,once:!1});return this},n.on=t("addListener"),n.addOnceListener=function(n,t){return this.addListener(n,{listener:t,once:!0})},n.once=t("addOnceListener"),n.defineEvent=function(n){return this.getListeners(n),this},n.defineEvents=function(n){for(var t=0;t<n.length;t+=1)this.defineEvent(n[t]);return this},n.removeListener=function(n,t){var i=this.getListenersAsObject(n),r;for(var f in i)i.hasOwnProperty(f)&&(r=u(i[f],t),r!==-1&&i[f].splice(r,1));return this},n.off=t("removeListener"),n.addListeners=function(n,t){return this.manipulateListeners(!1,n,t)},n.removeListeners=function(n,t){return this.manipulateListeners(!0,n,t)},n.manipulateListeners=function(n,t,i){var r,u,f=n?this.removeListener:this.addListener,e=n?this.removeListeners:this.addListeners;if(typeof t!="object"||t instanceof RegExp)for(r=i.length;r--;)f.call(this,t,i[r]);else for(r in t)t.hasOwnProperty(r)&&(u=t[r])&&(typeof u=="function"?f.call(this,r,u):e.call(this,r,u));return this},n.removeEvent=function(n){var r=typeof n,t=this._getEvents(),i;if(r==="string")delete t[n];else if(n instanceof RegExp)for(i in t)t.hasOwnProperty(i)&&n.test(i)&&delete t[i];else delete this._events;return this},n.removeAllListeners=t("removeEvent"),n.emitEvent=function(n,t){var r=this.getListenersAsObject(n),i,f,u,e;for(u in r)if(r.hasOwnProperty(u))for(f=r[u].length;f--;)i=r[u][f],i.once===!0&&this.removeListener(n,i.listener),e=i.listener.apply(this,t||[]),e===this._getOnceReturnValue()&&this.removeListener(n,i.listener);return this},n.trigger=t("emitEvent"),n.emit=function(n){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(n,t)},n.setOnceReturnValue=function(n){return this._onceReturnValue=n,this},n._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},n._getEvents=function(){return this._events||(this._events={})},i.noConflict=function(){return r.EventEmitter=f,i},i}(),e=function(n,t){f(n,t,typeof n=="undefined"||typeof n=="function","Function")},t=new i,n.off=h(t),n.on=c(t),n.once=l(t),s=n.prototype.init,n.prototype.init=function(){var n;this.ee=n=new i;this.off=h(n);this.on=c(n);this.once=l(n);s.apply(this,arguments)},n._eventInit=a,a(),n}),function(n){typeof define=="function"&&define.amd?define(["../cldr"],n):typeof module=="object"&&typeof module.exports=="object"?module.exports=n(require("cldrjs")):n(Cldr)}(function(n){var t=n._alwaysArray,i=function(n){var r,i;return r=function(i){return function(r){return r=t(r),n.get([i].concat(r))}},i=r("supplemental"),i.weekData=r("supplemental/weekData"),i.weekData.firstDay=function(){return n.get("supplemental/weekData/firstDay/{territory}")||n.get("supplemental/weekData/firstDay/001")},i.weekData.minDays=function(){var t=n.get("supplemental/weekData/minDays/{territory}")||n.get("supplemental/weekData/minDays/001");return parseInt(t,10)},i.timeData=r("supplemental/timeData"),i.timeData.allowed=function(){return n.get("supplemental/timeData/{territory}/_allowed")||n.get("supplemental/timeData/001/_allowed")},i.timeData.preferred=function(){return n.get("supplemental/timeData/{territory}/_preferred")||n.get("supplemental/timeData/001/_preferred")},i},r=n.prototype.init;return n.prototype.init=function(){r.apply(this,arguments);this.supplemental=i(this)},n}),function(n){typeof define=="function"&&define.amd?define(["../cldr"],n):typeof module=="object"&&typeof module.exports=="object"?module.exports=n(require("cldrjs")):n(Cldr)}(function(n){var r=n._coreLoad,u=n._jsonMerge,i=n._pathNormalize,t=n._resourceGet,f=n._validatePresence,e=n._validateTypePath,o=function(n,r){var f,u;if(r!=="root")return(f=i(["supplemental/parentLocales/parentLocale",r]),u=t(n._resolved,f)||t(n._raw,f),u)?u:(u=r.substr(0,r.lastIndexOf(n.localeSep)),!u)?"root":u},s=function(n,t,i){for(var u=n,f=t.length,r=0;r<f-1;r++)u[t[r]]||(u[t[r]]={}),u=u[t[r]];u[t[r]]=i},h=function(){var n;return n=function(r,f,e,h,c){var a,v,l;if(typeof f!="undefined"&&f!==c)return(a=i(e,h),l=t(r._resolved,a),l&&typeof l!="object")?l:(l=t(r._raw,a),l||(v=o(r,f),l=n(r,v,e,u(h,{bundle:v}),f)),l&&s(r._resolved,a,l),l)}}();return n._raw={},n.load=function(){n._raw=r(n,n._raw,arguments)},n.prototype.get=function(t){return f(t,"path"),e(t,"path"),h(n,this.attributes&&this.attributes.bundle||"",t,this.attributes)},n._eventInit&&n._eventInit(),n}),function(n,t){typeof define=="function"&&define.amd?define(["cldr","cldr/event"],t):typeof exports=="object"?module.exports=t(require("cldrjs")):n.Globalize=t(n.Cldr)}(this,function(n){function v(n){n.once("get",s);n.get("supplemental/likelySubtags")}function t(n){if(!(this instanceof t))return new t(n);h(n,"locale");c(n,"locale");this.cldr=a(n);v(this.cldr)}var y=function(n){return typeof n=="string"?n:typeof n=="number"?""+n:JSON.stringify(n)},u=function(n,t){return n.replace(/{[0-9a-zA-Z-_. ]+}/g,function(n){return n=n.replace(/^{([^}]*)}$/,"$1"),y(t[n])})},f=function(){var n=arguments[0],t=[].slice.call(arguments,1);return t.forEach(function(t){for(var i in t)n[i]=t[i]}),n},e=function(n,t,i){var r;return t=n+(t?": "+u(t,i):""),r=new Error(t),r.code=n,f(r,i),r},i=function(n,t,i,r){if(!i)throw e(n,t,r);},o=function(n){return Array.isArray(n)?n:n?[n]:[]},s=function(n,t,r){var u;r=r||{};u=o(r.skip).some(function(t){return t.test(n)});i("E_MISSING_CLDR","Missing required CLDR content `{path}`.",t||u,{path:n})},p=function(n){i("E_DEFAULT_LOCALE_NOT_DEFINED","Default locale has not been defined.",n!==undefined,{})},h=function(n,t){i("E_MISSING_PARAMETER","Missing required parameter `{name}`.",n!==undefined,{name:t})},w=function(n,t,r,u){i("E_PAR_OUT_OF_RANGE","Parameter `{name}` has value `{value}` out of range [{minimum}, {maximum}].",n===undefined||n>=r&&n<=u,{maximum:u,minimum:r,name:t,value:n})},r=function(n,t,r,u){i("E_INVALID_PAR_TYPE","Invalid `{name}` parameter ({value}). {expected} expected.",r,{expected:u,name:t,value:n})},c=function(t,i){r(t,i,t===undefined||typeof t=="string"||t instanceof n,"String or Cldr instance")},l=function(n){return n!==null&&""+n=="[object Object]"},b=function(n,t){r(n,t,n===undefined||l(n),"Plain Object")},a=function(t){return t instanceof n?t:new n(t)},k=function(n){return n.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")},d=function(n,t,i){var r;for(typeof n!="string"&&(n=String(n)),r=n.length;r<t;r+=1)n=i?n+"0":"0"+n;return n};return t.load=function(){n.load.apply(n,arguments)},t.locale=function(n){return c(n,"locale"),arguments.length&&(this.cldr=a(n),v(this.cldr)),this.cldr},t._alwaysArray=o,t._createError=e,t._formatMessage=u,t._isPlainObject=l,t._objectExtend=f,t._regexpEscape=k,t._stringPad=d,t._validate=i,t._validateCldr=s,t._validateDefaultLocale=p,t._validateParameterPresence=h,t._validateParameterRange=w,t._validateParameterTypePlainObject=b,t._validateParameterType=r,t}),function(n,t){typeof define=="function"&&define.amd?define(["cldr","../globalize","cldr/event","cldr/supplemental"],t):typeof exports=="object"?module.exports=t(require("cldrjs"),require("globalize")):t(n.Cldr,n.Globalize)}(this,function(n,t){var nt=t._createError,y=t._objectExtend,p=t._regexpEscape,e=t._stringPad,o=t._validateCldr,w=t._validateDefaultLocale,s=t._validateParameterPresence,r=t._validateParameterRange,b=t._validateParameterType,k=t._validateParameterTypePlainObject,u=function(n){return nt("E_UNSUPPORTED","Unsupported {feature}.",{feature:n})},c=function(n,t){b(n,t,n===undefined||typeof n=="number","Number")},l=function(n,t){b(n,t,n===undefined||typeof n=="string","a string")},tt=function(n,t,i){var r,f=t,u="",e=",",o=i?!0:!1;for(n=String(n).split("."),r=n[0].length;r>f;)u=n[0].slice(r-f,r)+(u.length?e:"")+u,r-=f,o&&(f=i,o=!1);return n[0]=n[0].slice(0,r)+(u.length?e:"")+u,n.join(".")},it=function(n,t,i,r,u,f){return r?(n=f?u(n,f):u(n,{exponent:-r}),i&&(n=String(n).split("."),n[1]=e(n[1]||"",i,!0),n=n.join("."))):n=u(n),n=String(n),t&&(n=n.split("."),n[0]=e(n[0],t),n=n.join(".")),n},d=function(n,t,i){var r;return n=n.toPrecision(t+2),r=Math.ceil(Math.log(Math.abs(n))/Math.log(10)),r-=t,i(n,{exponent:r})},rt=function(n,t,i,r){var f,o;if(t>i&&(i=t),f=d(n,t,r),o=d(n,i,r),n=+f==+o?f:o,n=(+n).toString(10),/e/.test(n))throw u({feature:"integers out of (1e21, 1e-7)"});return t-n.replace(/^0+|\./g,"").length>0&&(n=n.split("."),n[1]=e(n[1]||"",t-n[0].replace(/^0+/,"").length,!0),n=n.join(".")),n},ut=function(n,t){var l,a,e,v,y,o,p,s,d,i,h,r,u,c,w,b,f,k;return(d=t[1],y=t[2],v=t[3],a=t[4],o=t[5],e=t[6],w=t[7],h=t[8],b=t[9],c=t[15],l=t[16],p=t[17],k=t[18],s=t[19],isNaN(n))?p:(n<0?(r=t[12],i=t[13],f=t[14]):(r=t[11],i=t[0],f=t[10]),!isFinite(n))?i+l+f:(u=i,r.indexOf("%")!==-1?n*=100:r.indexOf("‰")!==-1&&(n*=1e3),n=isNaN(o*e)?it(n,y,v,a,c,w):rt(n,o,e,c),n=n.replace(/^-/,""),h&&(n=tt(n,h,b)),u+=n,u+=f,u.replace(/('([^']|'')+'|'')|./g,function(n,t){return t?(t=t.replace(/''/,"'"),t.length>2&&(t=t.slice(1,-1)),t):(n=n.replace(/[.,\-+E%\u2030]/,function(n){return k[n]}),s&&(n=n.replace(/[0-9]/,function(n){return s[+n]})),n)}))},h=function(n){var t=n.attributes["u-nu"];return t?(t==="traditio"&&(t="traditional"),["native","traditional","finance"].indexOf(t)!==-1)?n.main(["numbers/otherNumberingSystems",t]):t:n.main("numbers/defaultNumberingSystem")},g=function(n){var t,i=h(n);if(i!=="latn"){if(t=n.supplemental(["numberingSystems",i]),t._type!=="numeric")throw u("`"+t._type+"` numbering system");return t._digits}},ft=/^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,a=function(n){var i,r,f,e,c,l,a,t,v,o,s,y,p,w,b,k,h,d;if(n=n.match(ft),!n)throw new Error("Invalid pattern: "+n);if(y=n[1],s=n[3],e=n[4],h=n[8],b=n[9],d=n[10],h?h.replace(/(@+)(#*)/,function(n,t,i){o=t.length;a=o+i.length}):(f=n[7],c=n[6],f&&(f.replace(/[0-9]+/,function(n){t=n}),t?(w=+("0."+t),t=t.length):t=0,l=f.length-1),c.replace(/0+$/,function(n){v=n.length})),b)throw u({feature:"scientific notation (not implemented)"});if(s)throw u({feature:"padding (not implemented)"});return(i=e.lastIndexOf(","))!==-1&&(r=e.split(".")[0],p=r.length-i-1,(r=e.lastIndexOf(",",i-1))!==-1&&(k=i-1-r)),[y,s,v,t,l,o,a,w,p,k,d]},i=function(n,t){return t.main(["numbers/symbols-numberSystem-"+h(t),n])},f={".":"decimal",",":"group","%":"percentSign","+":"plusSign","-":"minusSign",E:"exponential","‰":"perMille"},et=function(n){var t,r={};for(t in f)r[t]=i(f[t],n);return r},ot=function(n){return isNaN(n)?NaN:Math[n<0?"ceil":"floor"](n)},st=function(n){return n=n||"round",n=n==="truncate"?ot:Math[n],function(t,i){var u,r;if(t=+t,isNaN(t))return NaN;if(typeof i=="object"&&i.exponent){if(u=+i.exponent,r=1,u===0)return n(t);if(!(typeof u=="number"&&u%1==0))return NaN}else{if(r=+i||1,r===1)return n(t);if(isNaN(r))return NaN;r=r.toExponential().split("e");u=+r[1];r=+r[0]}return t=t.toString().split("e"),t[0]=+t[0]/r,t[1]=t[1]?+t[1]-u:-u,t=n(+(t[0]+"e"+t[1])),t=t.toString().split("e"),t[0]=+t[0]*r,t[1]=t[1]?+t[1]+u:u,+(t[0]+"e"+t[1])}},ht=function(n,t,r){function e(n,t){n in r&&(u[t]=r[n])}var c,o,s,h,f,u;return r=r||{},n=n.split(";"),f=n[0],c=n[1]||"-"+f,s=a(c),o=s[0],h=s[10],u=a(f).concat([f,o+f+h,o,h,st(r.round),i("infinity",t),i("nan",t),et(t),g(t)]),e("minimumIntegerDigits",2),e("minimumFractionDigits",3),e("maximumFractionDigits",4),e("minimumSignificantDigits",5),e("maximumSignificantDigits",6),r.useGrouping===!1&&(u[8]=null),"minimumFractionDigits"in r&&!("maximumFractionDigits"in r)?u[4]=Math.max(u[3],u[4]):!("minimumFractionDigits"in r)&&"maximumFractionDigits"in r&&(u[3]=Math.min(u[3],u[4])),u},ct=/^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)(E[+-]?[0-9]+)?([^0-9]*)$/,lt=function(n,t){var f,s,u,e,h,c,l,a,i,o,r;if(s=t[0],e=t[1],l=t[2],a=t[3],u=t[4],f=n.match(s))i=Infinity,o=n.slice(0,f.length),r=n.slice(f.length+1);else{if(c=new RegExp(Object.keys(e).map(function(n){return p(n)}).join("|"),"g"),n=n.replace(c,function(n){return e[n]}),u&&(h=new RegExp(Object.keys(u).map(function(n){return p(n)}).join("|"),"g"),n=n.replace(h,function(n){return u[n]})),n=n.match(ct),!n)return NaN;if(o=n[1],r=n[6],i=n[2].replace(/,/g,""),n[5]&&(i+=n[5]),i=+i,isNaN(i))return NaN;n[0].indexOf("%")!==-1?(i/=100,r=r.replace("%","")):n[0].indexOf("‰")!==-1&&(i/=1e3,r=r.replace("‰",""))}return o===l&&r===a&&(i*=-1),i},at=function(n){var t,r={};for(t in f)r[i(f[t],n)]=t;return r},vt=function(n,t){var r,e,o,u,s=g(t);return n=n.split(";"),o=n[1]||"-"+n[0],u=a(o),s&&(r=s.split("").reduce(function(n,t,i){return n[t]=String(i),n},{}),e="0123456789".split("").reduce(function(n,t){return n[t]="invalid",n},{}),r=y(e,r)),[i("infinity",t),y({},f,at(t)),u[0],u[10].replace("%","").replace("‰",""),r]},v=function(n,t){if(n!=="decimal"&&n!=="percent")throw new Error("Invalid style");return t.main(["numbers",n+"Formats-numberSystem-"+h(t),"standard"])};return t.numberFormatter=t.prototype.numberFormatter=function(n){var i,h,f,e,l,u,a,t;k(n,"options");n=n||{};i=this.cldr;w(i);i.on("get",o);if(a=n.raw?n.raw:v(n.style||"decimal",i),t=ht(a,i,n),i.off("get",o),l=t[2],e=t[3],h=t[4],u=t[5],f=t[6],isNaN(u*f))if(isNaN(u)&&isNaN(f))r(l,"minimumIntegerDigits",1,21),r(e,"minimumFractionDigits",0,20),r(h,"maximumFractionDigits",e,20);else throw new Error("Neither or both the minimum and maximum significant digits must be present");else r(u,"minimumSignificantDigits",1,21),r(f,"maximumSignificantDigits",u,21);return function(n){return s(n,"value"),c(n,"value"),ut(n,t)}},t.numberParser=t.prototype.numberParser=function(n){var t,i,r;k(n,"options");n=n||{};t=this.cldr;w(t);t.on("get",o);return i=n.raw?n.raw:v(n.style||"decimal",t),r=vt(i,t),t.off("get",o),function(n){return s(n,"value"),l(n,"value"),lt(n,r)}},t.formatNumber=t.prototype.formatNumber=function(n,t){return s(n,"value"),c(n,"value"),this.numberFormatter(t)(n)},t.parseNumber=t.prototype.parseNumber=function(n,t){return s(n,"value"),l(n,"value"),this.numberParser(t)(n)},t._createErrorUnsupportedFeature=u,t._numberNumberingSystem=h,t._numberPattern=v,t._numberSymbol=i,t._stringPad=e,t._validateParameterTypeNumber=c,t._validateParameterTypeString=l,t}),function(n,t){typeof define=="function"&&define.amd?define(["cldr","../globalize","./number","cldr/event","cldr/supplemental"],t):typeof exports=="object"?module.exports=t(require("cldrjs"),require("globalize")):t(n.Cldr,n.Globalize)}(this,function(n,t){function h(n,t){rt(n,t,{skip:[/dates\/calendars\/gregorian\/dateTimeFormats\/availableFormats/,/dates\/calendars\/gregorian\/days\/.*\/short/,/supplemental\/timeData\/(?!001)/,/supplemental\/weekData\/(?!001)/]})}var nt=t._createError,u=t._createErrorUnsupportedFeature,tt=t._formatMessage,a=t._numberSymbol,it=t._regexpEscape,c=t._stringPad,rt=t._validateCldr,v=t._validateDefaultLocale,e=t._validateParameterPresence,ut=t._validateParameterType,y=t._validateParameterTypePlainObject,p=t._validateParameterTypeString,w=function(n,t){ut(n,t,n===undefined||n instanceof Date,"Date")},ft=function(n,t){return nt("E_INVALID_PAR_VALUE","Invalid `{name}` value ({value}).",{name:n,value:t})},b=function(n,t){function o(n,i,r){return tt(t.main(["dates/calendars/gregorian/dateTimeFormats",n]),[r,i])}var r,i,u,f,e;switch(!0){case"skeleton"in n:u=n.skeleton;i=t.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",u]);i||(f=u.split(/[^hHKkmsSAzZOvVXx]/).slice(-1)[0],r=u.split(/[^GyYuUrQqMLlwWdDFgEec]/)[0],e=/(MMMM|LLLL).*[Ec]/.test(r)?"full":/MMMM/g.test(r)?"long":/MMM/g.test(r)||/LLL/g.test(r)?"medium":"short",i=o(e,t.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",r]),t.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",f])));break;case"date"in n:case"time"in n:i=t.main(["dates/calendars/gregorian","date"in n?"dateFormats":"timeFormats",n.date||n.time]);break;case"datetime"in n:i=o(n.datetime,t.main(["dates/calendars/gregorian/dateFormats",n.datetime]),t.main(["dates/calendars/gregorian/timeFormats",n.datetime]));break;case"raw"in n:i=n.raw;break;default:throw ft({name:"options",value:n});}return i},o=function(n,t){return(n.getDay()-t+7)%7},et=function(n,t){return(t.getTime()-n.getTime())/864e5},f=function(n,t){n=new Date(n.getTime());switch(t){case"year":n.setMonth(0);case"month":n.setDate(1);case"day":n.setHours(0);case"hour":n.setMinutes(0);case"minute":n.setSeconds(0);case"second":n.setMilliseconds(0)}return n},k=function(n){return Math.floor(et(f(n,"year"),n))},d=["sun","mon","tue","wed","thu","fri","sat"],l=function(n){return d.indexOf(n.supplemental.weekData.firstDay())},ot=function(n){return n-f(n,"day")},s=/([a-z])\1*|'([^']|'')+'|''|./ig,g=function(n,t,i,r){var u,f=n.getTimezoneOffset();return u=Math.abs(f),r=r||{1:function(n){return c(n,1)},2:function(n){return c(n,2)}},t.split(";")[f>0?1:0].replace(":",i).replace(/HH?/,function(n){return r[n.length](Math.floor(u/60))}).replace(/mm/,function(){return r[2](u%60)})},st=function(n,t,i){var r=i.timeSeparator;return i.pattern.replace(s,function(u){var e,h=u.charAt(0),s=u.length;h==="j"&&(h=i.preferredTime);h==="Z"&&(s<4?(h="x",s=4):s<5?(h="O",s=4):(h="X",s=5));switch(h){case"G":e=i.eras[n.getFullYear()<0?0:1];break;case"y":e=n.getFullYear();s===2&&(e=String(e),e=+e.substr(e.length-2));break;case"Y":e=new Date(n.getTime());e.setDate(e.getDate()+7-o(n,i.firstDay)-i.firstDay-i.minDays);e=e.getFullYear();s===2&&(e=String(e),e=+e.substr(e.length-2));break;case"Q":case"q":e=Math.ceil((n.getMonth()+1)/3);s>2&&(e=i.quarters[h][s][e]);break;case"M":case"L":e=n.getMonth()+1;s>2&&(e=i.months[h][s][e]);break;case"w":e=o(f(n,"year"),i.firstDay);e=Math.ceil((k(n)+e)/7)-(7-e>=i.minDays?0:1);break;case"W":e=o(f(n,"month"),i.firstDay);e=Math.ceil((n.getDate()+e)/7)-(7-e>=i.minDays?0:1);break;case"d":e=n.getDate();break;case"D":e=k(n)+1;break;case"F":e=Math.floor(n.getDate()/7)+1;break;case"e":case"c":if(s<=2){e=o(n,i.firstDay)+1;break}case"E":e=d[n.getDay()];e=i.days[h][s][e];break;case"a":e=i.dayPeriods[n.getHours()<12?"am":"pm"];break;case"h":e=n.getHours()%12||12;break;case"H":e=n.getHours();break;case"K":e=n.getHours()%12;break;case"k":e=n.getHours()||24;break;case"m":e=n.getMinutes();break;case"s":e=n.getSeconds();break;case"S":e=Math.round(n.getMilliseconds()*Math.pow(10,s-3));break;case"A":e=Math.round(ot(n)*Math.pow(10,s-3));break;case"z":case"O":n.getTimezoneOffset()===0?e=i.gmtZeroFormat:(e=g(n,s<4?"+H;-H":i.tzLongHourFormat,r,t),e=i.gmtFormat.replace(/\{0\}/,e));break;case"X":if(n.getTimezoneOffset()===0){e="Z";break}case"x":e=s===1?"+HH;-HH":s%2?"+HH:mm;-HH:mm":"+HHmm;-HHmm";e=g(n,e,":");break;case":":e=r;break;case"'":u=u.replace(/''/,"'");s>2&&(u=u.slice(1,-1));e=u;break;default:e=u}return typeof e=="number"&&(e=t[s](e)),e})},ht=function(n,t){function f(n){i.numberFormatters||(i.numberFormatters={});i.numberFormatters[n]=c("",n)}var i={pattern:n,timeSeparator:a("timeSeparator",t)},r=["abbreviated","wide","narrow"];return n.replace(s,function(n){var s,e=n.charAt(0),o=n.length;e==="j"&&(i.preferredTime=e=t.supplemental.timeData.preferred());e==="Z"&&o===4&&(e="O",o=4);switch(e){case"G":i.eras=t.main(["dates/calendars/gregorian/eras",o<=3?"eraAbbr":o===4?"eraNames":"eraNarrow"]);break;case"y":s=!0;break;case"Y":i.firstDay=l(t);i.minDays=t.supplemental.weekData.minDays();s=!0;break;case"u":case"U":throw u({feature:"year pattern `"+e+"`"});case"Q":case"q":o>2?(i.quarters||(i.quarters={}),i.quarters[e]||(i.quarters[e]={}),i.quarters[e][o]=t.main(["dates/calendars/gregorian/quarters",e==="Q"?"format":"stand-alone",r[o-3]])):s=!0;break;case"M":case"L":o>2?(i.months||(i.months={}),i.months[e]||(i.months[e]={}),i.months[e][o]=t.main(["dates/calendars/gregorian/months",e==="M"?"format":"stand-alone",r[o-3]])):s=!0;break;case"w":case"W":i.firstDay=l(t);i.minDays=t.supplemental.weekData.minDays();s=!0;break;case"d":case"D":case"F":s=!0;break;case"g":throw u({feature:"Julian day pattern `g`"});case"e":case"c":if(o<=2){i.firstDay=l(t);s=!0;break}case"E":i.days||(i.days={});i.days[e]||(i.days[e]={});i.days[e][o]=o===6?t.main(["dates/calendars/gregorian/days",e==="c"?"stand-alone":"format","short"])||t.main(["dates/calendars/gregorian/days",e==="c"?"stand-alone":"format","abbreviated"]):t.main(["dates/calendars/gregorian/days",e==="c"?"stand-alone":"format",r[o<3?0:o-3]]);break;case"a":i.dayPeriods=t.main("dates/calendars/gregorian/dayPeriods/format/wide");break;case"h":case"H":case"K":case"k":case"m":case"s":case"S":case"A":s=!0;break;case"z":case"O":i.gmtFormat=t.main("dates/timeZoneNames/gmtFormat");i.gmtZeroFormat=t.main("dates/timeZoneNames/gmtZeroFormat");i.tzLongHourFormat=t.main("dates/timeZoneNames/hourFormat");case"Z":case"X":case"x":f(1);f(2);break;case"v":case"V":throw u({feature:"timezone pattern `"+e+"`"});}s&&f(o)}),i},ct=function(n){return new Date(n,1,29).getMonth()===1},lt=function(n){return new Date(n.getFullYear(),n.getMonth()+1,0).getDate()},at=function(n,t){var i=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();n.setDate(t<1?1:t<i?t:i)},vt=function(n,t){var i=n.getDate();n.setDate(1);n.setMonth(t);at(n,i)},r=function(n,t,i){return n<t||n>i},yt=function(n,t,i){var v,h,c,p,s,l,y,w,b=0,d=1,k=2,a=3,g=4,nt=5,tt=6,e=new Date,o=[];if(!t.length||(w=t.every(function(n){var it,f,t,w;if(n.type==="literal")return!0;f=n.type.charAt(0);w=n.type.length;f==="j"&&(f=i.preferredTimeData);switch(f){case"G":o.push(b);p=+n.value;break;case"y":if(t=n.value,w===2){if(r(t,0,99))return!1;it=Math.floor(e.getFullYear()/100)*100;t+=it;t>e.getFullYear()+20&&(t-=100)}e.setFullYear(t);o.push(b);break;case"Y":throw u({feature:"year pattern `"+f+"`"});case"M":case"L":if(t=w<=2?n.value:+n.value,r(t,1,12))return!1;vt(e,t-1);o.push(d);break;case"d":h=n.value;o.push(k);break;case"D":c=n.value;o.push(k);break;case"a":v=n.value;break;case"h":if(t=n.value,r(t,1,12))return!1;s=l=!0;e.setHours(t===12?0:t);o.push(a);break;case"K":if(t=n.value,r(t,0,11))return!1;s=l=!0;e.setHours(t);o.push(a);break;case"k":if(t=n.value,r(t,1,24))return!1;s=!0;e.setHours(t===24?0:t);o.push(a);break;case"H":if(t=n.value,r(t,0,23))return!1;s=!0;e.setHours(t);o.push(a);break;case"m":if(t=n.value,r(t,0,59))return!1;e.setMinutes(t);o.push(g);break;case"s":if(t=n.value,r(t,0,59))return!1;e.setSeconds(t);o.push(nt);break;case"A":e.setHours(0);e.setMinutes(0);e.setSeconds(0);case"S":t=Math.round(n.value*Math.pow(10,3-w));e.setMilliseconds(t);o.push(tt);break;case"Z":case"z":case"O":case"X":case"x":y=n.value-e.getTimezoneOffset()}return!0}),!w)||s&&!(!v^l))return null;if(p===0&&e.setFullYear(e.getFullYear()*-1+1),h!==undefined){if(r(h,1,lt(e)))return null;e.setDate(h)}else if(c!==undefined){if(r(c,1,ct(e.getFullYear())?366:365))return null;e.setMonth(0);e.setDate(c)}return l&&v==="pm"&&e.setHours(e.getHours()+12),y&&e.setMinutes(e.getMinutes()+y),o=Math.max.apply(null,o),e=f(e,["year","month","day","hour","minute","second","milliseconds"][o])},pt=function(n){return{preferredTimeData:n.supplemental.timeData.preferred()}},i=/[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDD16-\uDD1B\uDE40-\uDE47\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDE60-\uDE7E]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9]|\uD806[\uDCE0-\uDCF2]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59\uDF5B-\uDF61]|\uD834[\uDF60-\uDF71]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDCC7-\uDCCF]|\uD83C[\uDD00-\uDD0C]/,wt=function(n,t,r){var f,o=r.timeSeparator,e=[],u=["abbreviated","wide","narrow"];return f=r.pattern.match(s).every(function(f){function w(t,i){var r=n.match(t);return(i=i||function(n){return+n},!r)?!1:(c.value=r.length<8?(r[1]?-i(r[1]):i(r[4]))*60:(r[1]?-i(r[1]):i(r[7]))*60+(r[1]?-i(r[4]):i(r[10])),!0)}function b(n,t,r){var u;return t||(t="{0}"),u=n.replace("+","\\+").replace(/HH|mm/g,"(("+i.source+")("+i.source+"))").replace(/H|m/g,"(("+i.source+")("+i.source+")?)"),r&&(u=u.replace(/:/g,r)),u=u.split(";").map(function(n){return t.replace("{0}",n)}).join("|"),new RegExp(u)}function p(){if(s===1)return a=!0,h=i}function k(){if(s===1)return a=!0,h=new RegExp("("+i.source+")("+i.source+")?")}function y(){if(s===2)return a=!0,h=new RegExp("("+i.source+")("+i.source+")")}function v(t){var i,f,u=r[t.join("/")];for(i in u)if(f=new RegExp("^"+u[i]),f.test(n))return c.value=i,h=new RegExp(u[i]);return null}var l,s,a,h,c={};c.type=f;l=f.charAt(0);s=f.length;l==="Z"&&(s<4?(l="x",s=4):s<5?(l="O",s=4):(l="X",s=5));switch(l){case"G":v(["gregorian/eras",s<=3?"eraAbbr":s===4?"eraNames":"eraNarrow"]);break;case"y":case"Y":a=!0;h=s===1?new RegExp("("+i.source+")+"):s===2?new RegExp("("+i.source+")("+i.source+")"):new RegExp("("+i.source+"){"+s+",}");break;case"Q":case"q":p()||y()||v(["gregorian/quarters",l==="Q"?"format":"stand-alone",u[s-3]]);break;case"M":case"L":k()||y()||v(["gregorian/months",l==="M"?"format":"stand-alone",u[s-3]]);break;case"D":s<=3&&(a=!0,h=new RegExp("("+i.source+"){"+s+",3}"));break;case"W":case"F":p();break;case"e":case"c":if(s<=2){p()||y();break}case"E":s===6?v(["gregorian/days",[l==="c"?"stand-alone":"format"],"short"])||v(["gregorian/days",[l==="c"?"stand-alone":"format"],"abbreviated"]):v(["gregorian/days",[l==="c"?"stand-alone":"format"],u[s<3?0:s-3]]);break;case"a":v(["gregorian/dayPeriods/format/wide"]);break;case"w":case"d":case"h":case"H":case"K":case"k":case"j":case"m":case"s":k()||y();break;case"S":a=!0;h=new RegExp("("+i.source+"){"+s+"}");break;case"A":a=!0;h=new RegExp("("+i.source+"){"+(s+5)+"}");break;case"z":case"O":if(n===r["timeZoneNames/gmtZeroFormat"])c.value=0,h=new RegExp(r["timeZoneNames/gmtZeroFormat"]);else if(h=b(s<4?"+H;-H":r["timeZoneNames/hourFormat"],r["timeZoneNames/gmtFormat"],o),!w(h,t))return null;break;case"X":if(n==="Z"){c.value=0;h=/Z/;break}case"x":if(h=b(s===1?"+HH;-HH":s%2?"+HH:mm;-HH:mm":"+HHmm;-HHmm"),!w(h))return null;break;case"'":c.type="literal";f=f.replace(/''/,"'");s>2&&(f=f.slice(1,-1));h=new RegExp(it(f));break;default:c.type="literal";h=/./}return h?(n=n.replace(new RegExp("^"+h.source),function(n){return c.lexeme=n,a&&(c.value=t(n)),""}),!c.lexeme)?!1:(e.push(c),!0):!1}),f?e:[]},bt=function(n,t){function f(n,t){r[n.replace(/^.*\/dates\//,"").replace(/calendars\//,"")]=t}var r={pattern:n,timeSeparator:a("timeSeparator",t)},i=["abbreviated","wide","narrow"];t.on("get",f);return n.match(s).forEach(function(n){var f,r;f=n.charAt(0);r=n.length;f==="Z"&&r<5&&(f="O",r=4);switch(f){case"G":t.main(["dates/calendars/gregorian/eras",r<=3?"eraAbbr":r===4?"eraNames":"eraNarrow"]);break;case"u":case"U":throw u({feature:"year pattern `"+f+"`"});case"Q":case"q":r>2&&t.main(["dates/calendars/gregorian/quarters",f==="Q"?"format":"stand-alone",i[r-3]]);break;case"M":case"L":r>2&&t.main(["dates/calendars/gregorian/months",f==="M"?"format":"stand-alone",i[r-3]]);break;case"g":throw u({feature:"Julian day pattern `g`"});case"e":case"c":if(r<=2)break;case"E":r===6?t.main(["dates/calendars/gregorian/days",[f==="c"?"stand-alone":"format"],"short"])||t.main(["dates/calendars/gregorian/days",[f==="c"?"stand-alone":"format"],"abbreviated"]):t.main(["dates/calendars/gregorian/days",[f==="c"?"stand-alone":"format"],i[r<3?0:r-3]]);break;case"a":t.main(["dates/calendars/gregorian/dayPeriods/format/wide"]);break;case"z":case"O":t.main("dates/timeZoneNames/gmtFormat");t.main("dates/timeZoneNames/gmtZeroFormat");t.main("dates/timeZoneNames/hourFormat");break;case"v":case"V":throw u({feature:"timezone pattern `"+f+"`"});}}),t.off("get",f),r};return t.dateFormatter=t.prototype.dateFormatter=function(n){var t,i,u,f,r;y(n,"options");t=this.cldr;n=n||{skeleton:"yMd"};v(t);t.on("get",h);f=b(n,t);r=ht(f,t);t.off("get",h);i=r.numberFormatters;delete r.numberFormatters;for(u in i)i[u]=this.numberFormatter({raw:i[u]});return function(n){return e(n,"value"),w(n,"value"),st(n,i,r)}},t.dateParser=t.prototype.dateParser=function(n){var t,i,r,u,f;y(n,"options");t=this.cldr;n=n||{skeleton:"yMd"};v(t);t.on("get",h);return u=b(n,t),f=bt(u,t),r=pt(t),t.off("get",h),i=this.numberParser({raw:"0"}),function(n){var t;return e(n,"value"),p(n,"value"),t=wt(n,i,f),yt(n,t,r)||null}},t.formatDate=t.prototype.formatDate=function(n,t){return e(n,"value"),w(n,"value"),this.dateFormatter(t)(n)},t.parseDate=t.prototype.parseDate=function(n,t){return e(n,"value"),p(n,"value"),this.dateParser(t)(n)},t})