text: /*!
   * Globalize v1.1.1 2016-03-29T14:33Z Released under the MIT license
   * http://git.io/TrdQbw
   */
  !function(a,b){"function"==typeof define&&define.amd?define(["cldr","../globalize","./number","cldr/event","cldr/supplemental"],b):"object"==typeof exports?module.exports=b(require("cldrjs"),require("globalize")):b(a.Cldr,a.Globalize)}(this,function(a,b){function c(a,b){k(a,b,{skip:[/dates\/calendars\/gregorian\/dateTimeFormats\/availableFormats/,/dates\/calendars\/gregorian\/days\/.*\/short/,/supplemental\/timeData\/(?!001)/,/supplemental\/weekData\/(?!001)/]})}var d=b._createError,e=b._createErrorUnsupportedFeature,f=b._formatMessage,g=b._numberSymbol,h=b._regexpEscape,i=b._runtimeBind,j=b._stringPad,k=b._validateCldr,l=b._validateDefaultLocale,m=b._validateParameterPresence,n=b._validateParameterType,o=b._validateParameterTypePlainObject,p=b._validateParameterTypeString,q=function(a,b){n(a,b,void 0===a||a instanceof Date,"Date")},r=function(a,b){return d("E_INVALID_PAR_VALUE","Invalid `{name}` value ({value}).",{name:a,value:b})},s=function(a,b){function c(a,c,d){return f(b.main(["dates/calendars/gregorian/dateTimeFormats",a]),[d,c])}var d,e,g,h,i;switch(!0){case"skeleton"in a:g=a.skeleton,e=b.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",g]),e||(h=g.split(/[^hHKkmsSAzZOvVXx]/).slice(-1)[0],d=g.split(/[^GyYuUrQqMLlwWdDFgEec]/)[0],i=/(MMMM|LLLL).*[Ec]/.test(d)?"full":/MMMM/g.test(d)?"long":/MMM/g.test(d)||/LLL/g.test(d)?"medium":"short",e=c(i,b.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",d]),b.main(["dates/calendars/gregorian/dateTimeFormats/availableFormats",h])));break;case"date"in a:case"time"in a:e=b.main(["dates/calendars/gregorian","date"in a?"dateFormats":"timeFormats",a.date||a.time]);break;case"datetime"in a:e=c(a.datetime,b.main(["dates/calendars/gregorian/dateFormats",a.datetime]),b.main(["dates/calendars/gregorian/timeFormats",a.datetime]));break;case"raw"in a:e=a.raw;break;default:throw r({name:"options",value:a})}return e},t=function(a,b){return(a.getDay()-b+7)%7},u=function(a,b){var c=864e5;return(b.getTime()-a.getTime())/c},v=function(a,b){switch(a=new Date(a.getTime()),b){case"year":a.setMonth(0);case"month":a.setDate(1);case"day":a.setHours(0);case"hour":a.setMinutes(0);case"minute":a.setSeconds(0);case"second":a.setMilliseconds(0)}return a},w=function(a){return Math.floor(u(v(a,"year"),a))},x=function(a){return a-v(a,"day")},y=/([a-z])\1*|'([^']|'')+'|''|./gi,z=function(a,b,c,d){var e,f=a.getTimezoneOffset();return e=Math.abs(f),d=d||{1:function(a){return j(a,1)},2:function(a){return j(a,2)}},b.split(";")[f>0?1:0].replace(":",c).replace(/HH?/,function(a){return d[a.length](Math.floor(e/60))}).replace(/mm/,function(){return d[2](e%60)})},A=["sun","mon","tue","wed","thu","fri","sat"],B=function(a,b,c){var d=c.timeSeparator;return c.pattern.replace(y,function(e){var f,g=e.charAt(0),h=e.length;switch("j"===g&&(g=c.preferredTime),"Z"===g&&(4>h?(g="x",h=4):5>h?(g="O",h=4):(g="X",h=5)),g){case"G":f=c.eras[a.getFullYear()<0?0:1];break;case"y":f=a.getFullYear(),2===h&&(f=String(f),f=+f.substr(f.length-2));break;case"Y":f=new Date(a.getTime()),f.setDate(f.getDate()+7-t(a,c.firstDay)-c.firstDay-c.minDays),f=f.getFullYear(),2===h&&(f=String(f),f=+f.substr(f.length-2));break;case"Q":case"q":f=Math.ceil((a.getMonth()+1)/3),h>2&&(f=c.quarters[g][h][f]);break;case"M":case"L":f=a.getMonth()+1,h>2&&(f=c.months[g][h][f]);break;case"w":f=t(v(a,"year"),c.firstDay),f=Math.ceil((w(a)+f)/7)-(7-f>=c.minDays?0:1);break;case"W":f=t(v(a,"month"),c.firstDay),f=Math.ceil((a.getDate()+f)/7)-(7-f>=c.minDays?0:1);break;case"d":f=a.getDate();break;case"D":f=w(a)+1;break;case"F":f=Math.floor(a.getDate()/7)+1;break;case"e":case"c":if(2>=h){f=t(a,c.firstDay)+1;break}case"E":f=A[a.getDay()],f=c.days[g][h][f];break;case"a":f=c.dayPeriods[a.getHours()<12?"am":"pm"];break;case"h":f=a.getHours()%12||12;break;case"H":f=a.getHours();break;case"K":f=a.getHours()%12;break;case"k":f=a.getHours()||24;break;case"m":f=a.getMinutes();break;case"s":f=a.getSeconds();break;case"S":f=Math.round(a.getMilliseconds()*Math.pow(10,h-3));break;case"A":f=Math.round(x(a)*Math.pow(10,h-3));break;case"z":case"O":0===a.getTimezoneOffset()?f=c.gmtZeroFormat:(f=z(a,4>h?"+H;-H":c.tzLongHourFormat,d,b),f=c.gmtFormat.replace(/\{0\}/,f));break;case"X":if(0===a.getTimezoneOffset()){f="Z";break}case"x":f=1===h?"+HH;-HH":h%2?"+HH:mm;-HH:mm":"+HHmm;-HHmm",f=z(a,f,":");break;case":":f=d;break;case"'":e=e.replace(/''/,"'"),h>2&&(e=e.slice(1,-1)),f=e;break;default:f=e}return"number"==typeof f&&(f=b[h](f)),f})},C=function(a,b){return function(c){return m(c,"value"),q(c,"value"),B(c,a,b)}},D=function(a){return A.indexOf(a.supplemental.weekData.firstDay())},E=function(a,b){function c(a){d.numberFormatters[a]=j("",a)}var d={numberFormatters:{},pattern:a,timeSeparator:g("timeSeparator",b)},f=["abbreviated","wide","narrow"];return a.replace(y,function(a){var g,h=a.charAt(0),i=a.length;switch("j"===h&&(d.preferredTime=h=b.supplemental.timeData.preferred()),"Z"===h&&4===i&&(h="O",i=4),h){case"G":d.eras=b.main(["dates/calendars/gregorian/eras",3>=i?"eraAbbr":4===i?"eraNames":"eraNarrow"]);break;case"y":g=!0;break;case"Y":d.firstDay=D(b),d.minDays=b.supplemental.weekData.minDays(),g=!0;break;case"u":case"U":throw e({feature:"year pattern `"+h+"`"});case"Q":case"q":i>2?(d.quarters||(d.quarters={}),d.quarters[h]||(d.quarters[h]={}),d.quarters[h][i]=b.main(["dates/calendars/gregorian/quarters","Q"===h?"format":"stand-alone",f[i-3]])):g=!0;break;case"M":case"L":i>2?(d.months||(d.months={}),d.months[h]||(d.months[h]={}),d.months[h][i]=b.main(["dates/calendars/gregorian/months","M"===h?"format":"stand-alone",f[i-3]])):g=!0;break;case"w":case"W":d.firstDay=D(b),d.minDays=b.supplemental.weekData.minDays(),g=!0;break;case"d":case"D":case"F":g=!0;break;case"g":throw e({feature:"Julian day pattern `g`"});case"e":case"c":if(2>=i){d.firstDay=D(b),g=!0;break}case"E":d.days||(d.days={}),d.days[h]||(d.days[h]={}),6===i?d.days[h][i]=b.main(["dates/calendars/gregorian/days","c"===h?"stand-alone":"format","short"])||b.main(["dates/calendars/gregorian/days","c"===h?"stand-alone":"format","abbreviated"]):d.days[h][i]=b.main(["dates/calendars/gregorian/days","c"===h?"stand-alone":"format",f[3>i?0:i-3]]);break;case"a":d.dayPeriods=b.main("dates/calendars/gregorian/dayPeriods/format/wide");break;case"h":case"H":case"K":case"k":case"m":case"s":case"S":case"A":g=!0;break;case"z":case"O":d.gmtFormat=b.main("dates/timeZoneNames/gmtFormat"),d.gmtZeroFormat=b.main("dates/timeZoneNames/gmtZeroFormat"),d.tzLongHourFormat=b.main("dates/timeZoneNames/hourFormat");case"Z":case"X":case"x":c(1),c(2);break;case"v":case"V":throw e({feature:"timezone pattern `"+h+"`"})}g&&c(i)}),d},F=function(a){return 1===new Date(a,1,29).getMonth()},G=function(a){return new Date(a.getFullYear(),a.getMonth()+1,0).getDate()},H=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();a.setDate(1>b?1:c>b?b:c)},I=function(a,b){var c=a.getDate();a.setDate(1),a.setMonth(b),H(a,c)},J=function(a,b,c){return b>a||a>c},K=function(a,b,c){var d,f,g,h,i,j,k,l,m,n=0,o=1,p=2,q=3,r=4,s=5,t=6,u=new Date,w=[],x=["year","month","day","hour","minute","second","milliseconds"];if(!b.length)return null;if(m=b.every(function(a){var b,m,v,x;if("literal"===a.type)return!0;switch(m=a.type.charAt(0),x=a.type.length,"j"===m&&(m=c.preferredTimeData),m){case"G":w.push(n),i=+a.value;break;case"y":if(v=a.value,2===x){if(J(v,0,99))return!1;b=100*Math.floor(u.getFullYear()/100),v+=b,v>u.getFullYear()+20&&(v-=100)}u.setFullYear(v),w.push(n);break;case"Y":throw e({feature:"year pattern `"+m+"`"});case"Q":case"q":break;case"M":case"L":if(v=2>=x?a.value:+a.value,J(v,1,12))return!1;h=v,w.push(o);break;case"w":case"W":break;case"d":f=a.value,w.push(p);break;case"D":g=a.value,w.push(p);break;case"F":break;case"e":case"c":case"E":break;case"a":d=a.value;break;case"h":if(v=a.value,J(v,1,12))return!1;j=k=!0,u.setHours(12===v?0:v),w.push(q);break;case"K":if(v=a.value,J(v,0,11))return!1;j=k=!0,u.setHours(v),w.push(q);break;case"k":if(v=a.value,J(v,1,24))return!1;j=!0,u.setHours(24===v?0:v),w.push(q);break;case"H":if(v=a.value,J(v,0,23))return!1;j=!0,u.setHours(v),w.push(q);break;case"m":if(v=a.value,J(v,0,59))return!1;u.setMinutes(v),w.push(r);break;case"s":if(v=a.value,J(v,0,59))return!1;u.setSeconds(v),w.push(s);break;case"A":u.setHours(0),u.setMinutes(0),u.setSeconds(0);case"S":v=Math.round(a.value*Math.pow(10,3-x)),u.setMilliseconds(v),w.push(t);break;case"Z":case"z":case"O":case"X":case"x":l=a.value-u.getTimezoneOffset()}return!0}),!m)return null;if(j&&!(!d^k))return null;if(0===i&&u.setFullYear(-1*u.getFullYear()+1),void 0!==h&&I(u,h-1),void 0!==f){if(J(f,1,G(u)))return null;u.setDate(f)}else if(void 0!==g){if(J(g,1,F(u.getFullYear())?366:365))return null;u.setMonth(0),u.setDate(g)}return k&&"pm"===d&&u.setHours(u.getHours()+12),l&&u.setMinutes(u.getMinutes()+l),w=Math.max.apply(null,w),u=v(u,x[w])},L=/[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]/,M=function(a,b,c){var d,e=c.timeSeparator,f=[],g=["abbreviated","wide","narrow"];return d=c.pattern.match(y).every(function(d){function i(b,c){var d=a.match(b);return c=c||function(a){return+a},d?(d.length<8?s.value=60*(d[1]?-c(d[1]):c(d[4])):s.value=60*(d[1]?-c(d[1]):c(d[7]))+(d[1]?-c(d[4]):c(d[10])),!0):!1}function j(a,b,c){var d;return b||(b="{0}"),d=a.replace("+","\\+").replace(/HH|mm/g,"(("+L.source+")("+L.source+"))").replace(/H|m/g,"(("+L.source+")("+L.source+")?)"),c&&(d=d.replace(/:/g,c)),d=d.split(";").map(function(a){return b.replace("{0}",a)}).join("|"),new RegExp(d)}function k(){return 1===p?(q=!0,r=L):void 0}function l(){return 1===p?(q=!0,r=new RegExp("("+L.source+")("+L.source+")?")):void 0}function m(){return 2===p?(q=!0,r=new RegExp("("+L.source+")("+L.source+")")):void 0}function n(b){var d,e,f=c[b.join("/")];for(d in f)if(e=new RegExp("^"+f[d]),e.test(a))return s.value=d,r=new RegExp(f[d]);return null}var o,p,q,r,s={};switch(s.type=d,o=d.charAt(0),p=d.length,"Z"===o&&(4>p?(o="x",p=4):5>p?(o="O",p=4):(o="X",p=5)),o){case"G":n(["gregorian/eras",3>=p?"eraAbbr":4===p?"eraNames":"eraNarrow"]);break;case"y":case"Y":q=!0,r=1===p?new RegExp("("+L.source+")+"):2===p?new RegExp("("+L.source+")("+L.source+")"):new RegExp("("+L.source+"){"+p+",}");break;case"Q":case"q":k()||m()||n(["gregorian/quarters","Q"===o?"format":"stand-alone",g[p-3]]);break;case"M":case"L":l()||m()||n(["gregorian/months","M"===o?"format":"stand-alone",g[p-3]]);break;case"D":3>=p&&(q=!0,r=new RegExp("("+L.source+"){"+p+",3}"));break;case"W":case"F":k();break;case"e":case"c":if(2>=p){k()||m();break}case"E":6===p?n(["gregorian/days",["c"===o?"stand-alone":"format"],"short"])||n(["gregorian/days",["c"===o?"stand-alone":"format"],"abbreviated"]):n(["gregorian/days",["c"===o?"stand-alone":"format"],g[3>p?0:p-3]]);break;case"a":n(["gregorian/dayPeriods/format/wide"]);break;case"w":case"d":case"h":case"H":case"K":case"k":case"j":case"m":case"s":l()||m();break;case"S":q=!0,r=new RegExp("("+L.source+"){"+p+"}");break;case"A":q=!0,r=new RegExp("("+L.source+"){"+(p+5)+"}");break;case"z":case"O":if(a===c["timeZoneNames/gmtZeroFormat"])s.value=0,r=new RegExp(c["timeZoneNames/gmtZeroFormat"]);else if(r=j(4>p?"+H;-H":c["timeZoneNames/hourFormat"],c["timeZoneNames/gmtFormat"],e),!i(r,b))return null;break;case"X":if("Z"===a){s.value=0,r=/Z/;break}case"x":if(r=j(1===p?"+HH;-HH":p%2?"+HH:mm;-HH:mm":"+HHmm;-HHmm"),!i(r))return null;break;case"'":s.type="literal",d=d.replace(/''/,"'"),p>2&&(d=d.slice(1,-1)),r=new RegExp(h(d));break;default:s.type="literal",r=/./}return r?(a=a.replace(new RegExp("^"+r.source),function(a){return s.lexeme=a,q&&(s.value=b(a)),""}),s.lexeme?(f.push(s),!0):!1):!1}),""!==a&&(d=!1),d?f:[]},N=function(a,b,c){return function(d){var e;return m(d,"value"),p(d,"value"),e=M(d,a,c),K(d,e,b)||null}},O=function(a){return{preferredTimeData:a.supplemental.timeData.preferred()}},P=function(a,b){function c(a,b){d[a.replace(/^.*\/dates\//,"").replace(/calendars\//,"")]=b}var d={pattern:a,timeSeparator:g("timeSeparator",b)},f=["abbreviated","wide","narrow"];return b.on("get",c),a.match(y).forEach(function(a){var c,d;switch(c=a.charAt(0),d=a.length,"Z"===c&&5>d&&(c="O",d=4),c){case"G":b.main(["dates/calendars/gregorian/eras",3>=d?"eraAbbr":4===d?"eraNames":"eraNarrow"]);break;case"u":case"U":throw e({feature:"year pattern `"+c+"`"});case"Q":case"q":d>2&&b.main(["dates/calendars/gregorian/quarters","Q"===c?"format":"stand-alone",f[d-3]]);break;case"M":case"L":d>2&&b.main(["dates/calendars/gregorian/months","M"===c?"format":"stand-alone",f[d-3]]);break;case"g":throw e({feature:"Julian day pattern `g`"});case"e":case"c":if(2>=d)break;case"E":6===d?b.main(["dates/calendars/gregorian/days",["c"===c?"stand-alone":"format"],"short"])||b.main(["dates/calendars/gregorian/days",["c"===c?"stand-alone":"format"],"abbreviated"]):b.main(["dates/calendars/gregorian/days",["c"===c?"stand-alone":"format"],f[3>d?0:d-3]]);break;case"a":b.main(["dates/calendars/gregorian/dayPeriods/format/wide"]);break;case"z":case"O":b.main("dates/timeZoneNames/gmtFormat"),b.main("dates/timeZoneNames/gmtZeroFormat"),b.main("dates/timeZoneNames/hourFormat");break;case"v":case"V":throw e({feature:"timezone pattern `"+c+"`"})}}),b.off("get",c),d};return b.dateFormatter=b.prototype.dateFormatter=function(a){var b,d,e,f,g,h,j;o(a,"options"),d=this.cldr,a=a||{skeleton:"yMd"},b=[a],l(d),d.on("get",c),g=s(a,d),h=E(g,d),d.off("get",c),e=h.numberFormatters,delete h.numberFormatters;for(f in e)e[f]=this.numberFormatter({raw:e[f]});return j=C(e,h),i(b,d,j,[e,h]),j},b.dateParser=b.prototype.dateParser=function(a){var b,d,e,f,g,h,j;return o(a,"options"),d=this.cldr,a=a||{skeleton:"yMd"},b=[a],l(d),d.on("get",c),g=s(a,d),h=P(g,d),f=O(d),d.off("get",c),e=this.numberParser({raw:"0"}),j=N(e,f,h),i(b,d,j,[e,f,h]),j},b.formatDate=b.prototype.formatDate=function(a,b){return m(a,"value"),q(a,"value"),this.dateFormatter(b)(a)},b.parseDate=b.prototype.parseDate=function(a,b){return m(a,"value"),p(a,"value"),this.dateParser(b)(a)},b});