//>>built
define("dojox/date/hebrew/locale","dojox/main dojo/_base/lang dojo/_base/array dojo/date dojo/i18n dojo/regexp dojo/string ./Date ./numerals dojo/i18n!dojo/cldr/nls/hebrew".split(" "),function(D,x,r,I,v,E,F,y,w){function G(e,b,a,k,l){return l.replace(/([a-z])\1*/ig,function(f){var c=f.charAt(0);f=f.length;var h=["abbr","wide","narrow"];switch(c){case "G":var d=b[4>f?"eraAbbr":"eraNames"][0];break;case "y":d=a.match(/^he(?:-.+)?$/)?w.getYearHebrewLetters(e.getFullYear()):String(e.getFullYear());break;
case "M":d=e.getMonth();if(3>f)if(!e.isLeapYear(e.getFullYear())&&5<d&&d--,a.match(/^he(?:-.+)?$/))d=w.getMonthHebrewLetters(d);else{d+=1;var n=!0}else d=m.getNames("months",h[f-3],"format",a,e)[d];break;case "d":a.match(/^he(?:-.+)?$/)?d=e.getDateLocalized(a):(d=e.getDate(),n=!0);break;case "E":d=e.getDay();3>f?(d+=1,n=!0):(c=["days-format",h[f-3]].join("-"),d=b[c][d]);break;case "a":d=12>e.getHours()?"am":"pm";d=b["dayPeriods-format-wide-"+d];break;case "h":case "H":case "K":case "k":n=e.getHours();
switch(c){case "h":d=n%12||12;break;case "H":d=n;break;case "K":d=n%12;break;case "k":d=n||24}n=!0;break;case "m":d=e.getMinutes();n=!0;break;case "s":d=e.getSeconds();n=!0;break;case "S":d=Math.round(e.getMilliseconds()*Math.pow(10,f-3));n=!0;break;case "z":d="";break;default:throw Error("dojox.date.hebrew.locale.formatPattern: invalid pattern char: "+l);}n&&(d=F.pad(d,f));return d})}function z(e,b,a,k){var l=function(h){return h};b=b||l;a=a||l;k=k||l;var f=e.match(/(''|[^'])+/g),c="'"==e.charAt(0);
r.forEach(f,function(h,d){h?(f[d]=(c?a:b)(h),c=!c):f[d]=""});return k(f.join(""))}function H(e,b,a,k){k=E.escapeString(k);var l=v.normalizeLocale(a.locale);return k.replace(/([a-z])\1*/ig,function(f){var c=f.charAt(0);var h=f.length,d="";a.strict?1<h&&(d="0{"+(h-1)+"}"):d="0?";switch(c){case "y":c="\\S+";break;case "M":c=l.match("^he(?:-.+)?$")?2<h?"\\S+ ?\\S+":"\\S{1,4}":2<h?"\\S+ ?\\S+":d+"[1-9]|1[0-3]";break;case "d":c=l.match("^he(?:-.+)?$")?"\\S['\"'\u05f3]{1,2}\\S?":"[12]\\d|"+d+"[1-9]|30";
break;case "E":c=l.match("^he(?:-.+)?$")?3<h?"\\S+ ?\\S+":"\\S":"\\S+";break;case "h":c=d+"[1-9]|1[0-2]";break;case "k":c=d+"\\d|1[01]";break;case "H":c=d+"\\d|1\\d|2[0-3]";break;case "K":c=d+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":c=d+"\\d|[0-5]\\d";break;case "S":c="\\d{"+h+"}";break;case "a":h=a.am||b["dayPeriods-format-wide-am"];d=a.pm||b["dayPeriods-format-wide-pm"];a.strict?c=h+"|"+d:(c=h+"|"+d,h!=h.toLowerCase()&&(c+="|"+h.toLowerCase()),d!=d.toLowerCase()&&(c+="|"+d.toLowerCase()));break;
default:c=".*"}e&&e.push(f);return"("+c+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var m=x.getObject("date.hebrew.locale",!0,D);v.getLocalization("dojo.cldr","hebrew");m.format=function(e,b){b=b||{};var a=v.normalizeLocale(b.locale),k=b.formatLength||"short",l=m._getHebrewBundle(a),f=[],c=x.hitch(this,G,e,l,a,b.fullYear);if("year"==b.selector)return f=e.getFullYear(),a.match(/^he(?:-.+)?$/)?w.getYearHebrewLetters(f):f;"time"!=b.selector&&(a=b.datePattern||l["dateFormat-"+k])&&f.push(z(a,c));"date"!=b.selector&&
(a=b.timePattern||l["timeFormat-"+k])&&f.push(z(a,c));return f.join(" ")};m.regexp=function(e){return m._parseInfo(e).regexp};m._parseInfo=function(e){e=e||{};var b=v.normalizeLocale(e.locale);b=m._getHebrewBundle(b);var a=e.formatLength||"short",k=e.datePattern||b["dateFormat-"+a];a=e.timePattern||b["timeFormat-"+a];var l=[];return{regexp:z("date"==e.selector?k:"time"==e.selector?a:void 0===a?k:k+" "+a,x.hitch(this,H,l,b,e)),tokens:l,bundle:b}};m.parse=function(e,b){e=e.replace(/[\u200E\u200F\u202A-\u202E]/g,
"");b||(b={});var a=m._parseInfo(b),k=a.tokens,l=a.bundle;a=(new RegExp("^"+a.regexp+"$")).exec(e);var f=v.normalizeLocale(b.locale);if(!a)return null;var c=[5730,3,23,0,0,0,0],h="",d=0,n=["abbr","wide","narrow"];r.every(a,function(g,A){if(!A)return!0;var p=k[A-1],q=p.length;switch(p.charAt(0)){case "y":f.match(/^he(?:-.+)?$/)?c[0]=w.parseYearHebrewLetters(g):c[0]=Number(g);break;case "M":if(2<q){p=m.getNames("months",n[q-3],"format",f,new y(5769,1,1));var t=m.getNames("months",n[q-3],"format",f,
new y(5768,1,1));b.strict||(g=g.replace(".","").toLowerCase(),p=r.map(p,function(u){return u?u.replace(".","").toLowerCase():u}),t=r.map(t,function(u){return u?u.replace(".","").toLowerCase():u}));var B=g;g=r.indexOf(p,B);if(-1==g&&(g=r.indexOf(t,B),-1==g))return!1;d=q}else f.match(/^he(?:-.+)?$/)?g=w.parseMonthHebrewLetters(g):g--;c[1]=Number(g);break;case "D":c[1]=0;case "d":f.match(/^he(?:-.+)?$/)?c[2]=w.parseDayHebrewLetters(g):c[2]=Number(g);break;case "a":q=b.am||l["dayPeriods-format-wide-am"];
p=b.pm||l["dayPeriods-format-wide-pm"];b.strict||(t=/\./g,g=g.replace(t,"").toLowerCase(),q=q.replace(t,"").toLowerCase(),p=p.replace(t,"").toLowerCase());if(b.strict&&g!=q&&g!=p)return!1;h=g==p?"p":g==q?"a":"";break;case "K":24==g&&(g=0);case "h":case "H":case "k":c[3]=Number(g);break;case "m":c[4]=Number(g);break;case "s":c[5]=Number(g);break;case "S":c[6]=Number(g)}return!0});a=+c[3];"p"===h&&12>a?c[3]=a+12:"a"===h&&12==a&&(c[3]=0);a=new y(c[0],c[1],c[2],c[3],c[4],c[5],c[6]);3>d&&5<=c[1]&&!a.isLeapYear(a.getFullYear())&&
a.setMonth(c[1]+1);return a};var C=[];m.addCustomFormats=function(e,b){C.push({pkg:e,name:b})};m._getHebrewBundle=function(e){var b={};r.forEach(C,function(a){a=v.getLocalization(a.pkg,a.name,e);b=x.mixin(b,a)},this);return b};m.addCustomFormats("dojo.cldr","hebrew");m.getNames=function(e,b,a,k,l){k=m._getHebrewBundle(k);b=[e,a,b];if("standAlone"==a){a=b.join("-");var f=k[a];1==f[0]&&(f=void 0)}b[1]="format";a=(f||k[b.join("-")]).concat();"months"==e&&(l.isLeapYear(l.getFullYear())?(b.push("leap"),
a[6]=k[b.join("-")]):delete a[5]);return a};return m});