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