function Ih(a){Ih.h.constructor.call(this,a)}m("AdfDhtmlChooseDateNavigationPanelBase",Ih);r.v(Ih,Jh);Ih.prototype.kb=function(a,b){u.s(a,AdfRichChooseDate);u.u(b);return U.tva(a,b)?U.$r(a,b,T.Kf):!0};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.isVisible",{kb:Ih.prototype.kb});Ih.prototype.We=function(a,b){u.s(a,AdfRichChooseDate);u.s(b,na);return Ih.FF(b,T.ME)||Ih.FF(b,T.JE)?!0:!1};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.canProcessDomUIInputEvent",{We:Ih.prototype.We});
Ih.prototype.re=function(a,b){u.s(a,AdfRichChooseDate);u.s(b,ha);return b instanceof Gh||b instanceof xh};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.canProcessComponentEvent",{re:Ih.prototype.re});Ih.prototype.ns=function(a,b){return this.Lz(a,b)};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.handleComponentClick",{ns:Ih.prototype.ns});Ih.prototype.Ni=function(a,b){var d=q.b.na(b.U());return d==w.gd||d==w.jb?this.Lz(a,b):!1};
r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.handleComponentKeyDown",{Ni:Ih.prototype.Ni});Ih.prototype.qc=function(a,b){u.s(a,AdfRichChooseDate);u.u(b);var d=A.c.H();if(0==b.children.length){var e=Lh.uc("td",{"class":d.getStyleClass("af|chooseDate::month-year-row"),align:"center",colspan:7},b);Uh(this,a,d,e);q.b.Ia(e);return this.Lv(a)}e=b.children[0];Uh(this,a,d,e);q.b.Ia(e);return[]};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.render",{qc:Ih.prototype.qc});Ih.prototype.Lv=function(){return[]};
r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.ConstructNewRichComponents",{Lv:Ih.prototype.Lv});Ih.prototype.Lz=function(a,b){u.s(a,AdfRichChooseDate);u.s(b,ha);return Ih.FF(b,T.ME)?(Vh(this,a,!1),!0):Ih.FF(b,T.JE)?(Vh(this,a,!0),!0):!1};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.HandleComponentEvent",{Lz:Ih.prototype.Lz});
Ih.prototype.zt=function(a,b,d,e,f){u.s(a,AdfRichChooseDate);u.u(b);u.u(d);u.jf(e);u.Mb(f);a=C.Nu(d,T.J_a,"true","TD");u.u(a);a.textContent=f[e.getMonth()]+" "+e.getFullYear()};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.UpdateGridHeader",{zt:Ih.prototype.zt});Ih.prototype.Ts=function(a,b,d,e,f,g){d=Lh.uc("td",{"class":d.getStyleClass("af|chooseDate::month-year-label-cell"),"data-afr-mnt-yr-lbl":"true"},e);b=U.cb(a);a=U.Ru(a,b).getMonths().slice(0,12);d.textContent=a[f]+" "+g};
r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.BuildCalendarLabelForMonth",{Ts:Ih.prototype.Ts});Ih.prototype.tw=function(a,b,d,e){u.s(a,AdfRichChooseDate);u.dc(e);var f=d.getMonth();d=d.getFullYear();a=Math.min(12,U.Up(a,b));f=e?f+a:f-a;e=0;0>f?(f+=12,e=-1):11<f&&(f-=12,e=1);e&&(d+=e);return{month:f,year:d}};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.ManipulateMonth",{tw:Ih.prototype.tw});Ih.prototype.ED=function(a,b){b.setMonth(b.getMonth()+1);return b};
r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.GetNextDisplayedMonth",{ED:Ih.prototype.ED});Ih.prototype.DD=function(a){return U.IH(a)};r.a("AdfDhtmlChooseDateNavigationPanelBase.prototype.GetMonthDisplayRange",{DD:Ih.prototype.DD});
function Uh(a,b,d,e){if(0!=e.children.length){u.s(b,AdfRichChooseDate);u.u(e);var f=a.DD(b);d=f.months;u.assert(e.children.length==d);for(var f=f.start,g=U.cb(b),h=U.Ru(b,g).getMonths().slice(0,12),l=0;l<d;l++){var n=a,t=b,y=g,z=e.children[l],B=f,F=h;u.s(t,AdfRichChooseDate);u.u(y);u.u(z);u.jf(B);q.b.setAttribute(z,T.on,B.getFullYear()+"-"+B.getMonth());n.zt(t,y,z,B,F);f=a.ED(b,f)}}else for(g=a.DD(b),f=g.months,g=g.start,h=0;h<f;h++)e.appendChild(Wh(a,b,d,g.getMonth(),g.getFullYear(),0==h,h==f-1)),
g=a.ED(b,g)}function Vh(a,b,d){var e=U.cb(b),f=U.mf(b,e);a=a.tw(b,e,f,d);d=a.year;f.setMonth(a.month);f.setFullYear(d);xh.F(b,f)}
function Wh(a,b,d,e,f,g,h){var l=U.cb(b),n=d.getStyleClass("af|chooseDate::month-year-header"),t=U.mf(b,l),y=U.Up(b,l);f==t.getFullYear()&&e==t.getMonth()&&1<y&&(n+=" "+T.s2);n=Lh.ck("table",{"data-afr-yyyymm":f+"-"+e,"class":n,cellpadding:"0",cellspacing:"0",border:"0",summary:"",role:"presentation"});t=Lh.uc("tbody",{},n);t=Lh.uc("tr",{},t);g?Ih.X$a(b,d,t):Ih.Y$a(d,t);a.Ts(b,l,d,t,e,f);h?Ih.S$a(b,d,t):Ih.T$a(d,t);return n}
Ih.X$a=function(a,b,d){d=Lh.uc("td",{"class":b.getStyleClass("af|chooseDate::prev-month-arrow-cell")},d);var e=b.Z("af_chooseDate.TIP_PREVIOUS_MONTH");a=a.g();Lh.uc("a",{role:"button","aria-label":e,href:"#",onclick:"this.focus(); return false","class":b.getStyleClass("af|chooseDate::prev-month-arrow"),id:I.j(a,T.ME),title:e},d)};Ih.Y$a=function(a,b){Lh.uc("td",{"class":a.getStyleClass("af|chooseDate::prev-month-arrow-stub-cell")},b)};
Ih.S$a=function(a,b,d){d=Lh.uc("td",{"class":b.getStyleClass("af|chooseDate::next-month-arrow-cell")},d);var e=b.Z("af_chooseDate.TIP_NEXT_MONTH");a=a.g();Lh.uc("a",{role:"button","aria-label":e,href:"#",onclick:"this.focus();return false","class":b.getStyleClass("af|chooseDate::next-month-arrow"),id:I.j(a,T.JE),title:e},d)};Ih.T$a=function(a,b){Lh.uc("td",{"class":a.getStyleClass("af|chooseDate::next-month-arrow-stub-cell")},b)};
Ih.FF=function(a,b){var d=a.X(),e=a.he(),e=I.j(e.g(),b);return C.Nb(q.b.getElementById(e),d)};