var rB=I.ea(I,"AdfDhtmlToolbarPeer",!1);m("AdfDhtmlToolbarPeer",rB);rB.C=function(){r.bb(Xq);I.ra(this,D.Bc,D.hh,D.Pc)};m("AdfDhtmlToolbarPeer.InitSubclass",rB.C);rB.prototype.G=function(a,b){rB.h.G.call(this,a,b);var d=a.g(),e=I.j(d,"eoc"),f=q.b;if(this.Qk=(this.oe=f.getElementById(e))?!0:!1)e=I.j(d,"eoi"),this.Mn=f.getElementById(e),A.c.qr(a);this.lF=f.Cm(f.By(b.getElementsByTagName("table")[0],0));(this.kG=null==J.uSa(b))?this.Pa=J.qVa(b):this.Qk&&this.Mn.setAttribute("tabIndex","0")};
r.a("AdfDhtmlToolbarPeer.prototype.InitDomElement",{G:rB.prototype.G});rB.prototype.ue=function(){return!0};r.a("AdfDhtmlToolbarPeer.prototype.needsChildVisibilityChanges",{ue:rB.prototype.ue});rB.prototype.ya=function(){return!0};r.a("AdfDhtmlToolbarPeer.prototype.needsResizeNotify",{ya:rB.prototype.ya});rB.prototype.Cd=function(a,b){b||(b=[]);rB.h.Cd.call(this,a,b);1==this.Qk&&rl.osa(a,b);return b};r.a("AdfDhtmlToolbarPeer.prototype.getDescendantComponents",{Cd:rB.prototype.Cd});
rB.prototype.bh=function(){this.kG&&(this.Pa&&this.Pa.setAttribute("tabIndex","-1"),this.Pa=J.oI(this.i()))};r.a("AdfDhtmlToolbarPeer.prototype.resetActiveDescendant",{bh:rB.prototype.bh});
rB.prototype.Sa=function(){var a=this.i(),b=this.f(),d=b.g();if(0!=this.Qk||b.getStretchId()){this.cY();if(1==this.Qk){if(!this.Va)for(this.Va=new rl(d,this,"end",null,null,this.kG),b=q.b,a=b.Cm(b.By(a.getElementsByTagName("table")[0],0)),b=0,d=a[0];d;)this.Va.Mp(),this.Va.addElement(d),d=C.pa(d),Xq.Fta(d)&&(d=this.rF(d),this.Va.Wr(d)),b++,d=a[b];this.Va.te()}this.fX();this.Pa&&(0<this.Pa.offsetWidth||0<this.Pa.offsetHeight)||this.bh()}};r.a("AdfDhtmlToolbarPeer.prototype.ResizeNotify",{Sa:rB.prototype.Sa});
rB.prototype.le=function(){A.c.Kc(this.f());return!1};r.a("AdfDhtmlToolbarPeer.prototype.ChildVisibilityChanged",{le:rB.prototype.le});rB.prototype.yk=function(){if(this.mu)v.l.fine("toolbar#GetPreferredWidth called, returned cached value of: "+this.mu);else{var a=this.i().firstChild;this.cY();this.Va&&this.Va.iI();this.mu=a.offsetWidth;this.fX();v.l.fine("toolbar#GetPreferredWidth called, returned calculated value of: "+this.mu)}return this.mu};
r.a("AdfDhtmlToolbarPeer.prototype.GetPreferredWidth",{yk:rB.prototype.yk});rB.prototype.wJ=function(){if(!this.Sj)if(0==this.Qk)this.Sj=this.yk();else if(this.lF&&0<this.lF.length){var a=this.Mn.style.display,b=this.Mn;b.style.display="block";var d=q.b.getComputedStyle(b);this.Sj=b.offsetWidth+q.Ma(d.marginLeft)+q.Ma(d.marginRight);b.style.display=a;a=this.yk();this.Sj>a&&(this.Sj=a)}else this.Sj=0;return this.Sj};r.a("AdfDhtmlToolbarPeer.prototype.GetMinimumWidth",{wJ:rB.prototype.wJ});
rB.prototype.ka=function(a){this.Va&&(this.Va.Yy(),delete this.Va);delete this.oe;delete this.Mn;delete this.lF;delete this.Qk;delete this.mu;delete this.Sj;A.c.cp(a);rB.h.ka.call(this,a)};r.a("AdfDhtmlToolbarPeer.prototype.ComponentRemoved",{ka:rB.prototype.ka});rB.prototype.ma=function(a){if(!a.Aa()){var b=q.b,d=a.na();b.wC()==D.Bc&&this.sp(d,a)}};r.a("AdfDhtmlToolbarPeer.prototype.HandleComponentKeyDown",{ma:rB.prototype.ma});
rB.prototype.Yb=function(a){if(!a.Aa()&&q.b.wC()==D.hh){var b=a.na();this.sp(b,a)}};r.a("AdfDhtmlToolbarPeer.prototype.HandleComponentKeyPress",{Yb:rB.prototype.Yb});rB.prototype.Ta=function(a){if(this.kG){var b=a.getSource(),d=a.U(),d=q.b.ca(d),e=b.g(),e=q.b.getElementById(e);e==this.i()&&(e=d);d==this.Mn?this.Pa!=d&&this.ay(d):Xq.lk(e)?(b=J.ym(e))&&this.Va.Vaa(b):Xq.JTa(b)&&(b=J.ym(e))&&b!=this.Pa&&this.ay(b);a.cancel()}};r.a("AdfDhtmlToolbarPeer.prototype.HandleComponentFocus",{Ta:rB.prototype.Ta});
rB.prototype.Gj=function(a,b,d){rB.h.Gj.call(this,a,b,d);this.Qk&&this.Va.lk(b)&&this.Va.Daa()};r.a("AdfDhtmlToolbarPeer.prototype.SimulateMouseOnDescendant",{Gj:rB.prototype.Gj});rB.prototype.bd=function(a){this.bind(a);this.Sj=this.mu=null;a=this.bf(a);var b=null!=a?a.o():null;b&&b.bd&&b.bd(a)};r.a("AdfDhtmlToolbarPeer.prototype.__preferredSizeChangeNotify",{bd:rB.prototype.bd});k=rB.prototype;k.cY=function(){var a=this.nM();a&&(a.parentNode.style.width="")};
k.fX=function(){var a=this.nM();if(a)if(Xq.lk(a))a.parentNode.style.width="100%";else{var b=q.b.getWindowWidth()+"px";a.parentNode.style.width=b}};k.rF=function(a){var b=this.nM(),b=a==b?"auto":"100%",d=a.ownerDocument.createElement("table");d.cellPadding=0;d.cellSpacing=0;d.style.width="100%";d.Ao="presentation";var e=d.insertRow(-1),f=e.insertCell(-1);f.setAttribute(Xq.cE,"true");f.setAttribute("role","presentation");C.w(f,Xq.DR);a=this.Va.wY(a);f.appendChild(a);e.insertCell(-1).style.width=b;return d};
k.nM=function(){var a=this.f(),b=a.getStretchId();if(b){if(a=a.m(b))return b=a.g(),q.b.getElementById(b);v.l.warning("Unable to find client component for stretch id "+b)}return null};
k.sp=function(a,b){var d=b.U();if(!(d.ctrlKey||d.altKey||d.shiftKey||d.metaKey)){var d=q.b.ca(d),e=b.getSource().g(),e=q.b.getElementById(e);e==this.i()&&(e=d);if(Xq.lk(e))if(this.kG)switch(a){case w.ab:case w.ub:this.Va.P8(this.oe);b.cancel();break;case w.Ra:case w.vb:this.Va.O8(this.oe),b.cancel()}else switch(a){case w.ab:case w.ub:J.ni(d,this.oe);b.cancel();break;case w.Ra:case w.vb:J.ce(d,this.oe),b.cancel()}else switch(a){case w.ub:this.kG&&this.LA()?(d=this.i(),(d=J.EO(d,this.Pa))?this.Pa=d:
rB.k6(this.Pa,!0)):(d=b.U(),d=q.b.ca(d),rB.k6(d,!0));b.cancel();break;case w.vb:this.kG&&this.LA()?(d=this.i(),(d=J.DO(d,this.Pa))?this.Pa=d:rB.k6(this.Pa)):(d=b.U(),d=q.b.ca(d),rB.k6(d)),b.cancel()}}};rB.k6=function(a,b){var d=b?J.usa(a):J.tC(a);d&&J.va(d)};
rB.prototype.LA=function(){u.u(this.Pa);u.assert("0"==this.Pa.getAttribute("tabindex"),"The toolbar's active descendant should have tabindex 0");this.Pa||(v.l.warning("Toolbar has lost its assigned activeDescendant!"),this.bh());return null!=this.Pa};rB.prototype.ay=function(a){u.u(a);this.Pa&&this.Pa.setAttribute("tabIndex","-1");a.setAttribute("tabIndex","0");this.Pa=a};