var oz=M.U(M,"AdfDhtmlToolboxPeer",p);v("AdfDhtmlToolboxPeer",oz);oz.m=function(){z.kb(ap)};v("AdfDhtmlToolboxPeer.InitSubclass",oz.m);oz.prototype.q=function(a,b){oz.f.q.call(this,a,b);F.c.Go(a)};z.a("AdfDhtmlToolboxPeer.prototype.InitDomElement",{q:oz.prototype.q});oz.prototype.Z=function(a){delete this.Hf;F.c.Nm(a);oz.f.Z.call(this,a)};z.a("AdfDhtmlToolboxPeer.prototype.ComponentRemoved",{Z:oz.prototype.Z});oz.prototype.ja=t(l);z.a("AdfDhtmlToolboxPeer.prototype.needsResizeNotify",{ja:oz.prototype.ja});
oz.prototype.Ia=function(a,b,d){if(!pz(this)){D.i.fine("toolbox#ResizeNotify, toolbox row size stale or not yet defined, recalculate row sizes");this.Hf=[];a=this.h().firstChild.childNodes;b=a.length;for(var e=0;e<b;e++){for(var f=this.Hf,g=e,h=w.b,m=[],q=0,s=0,y=0,A=a[e].getElementsByTagName("tr")[0].childNodes,C=A.length,G=0;G<C;G++){var K=A[G],N=H.ca(K);if(N&&N.id){var Q=N.id;K.style.width="";K.style.maxWidth="";if(K=F.c.j(Q))Q=K.k(),m.push(Q),Q.nj?(N=Q.nj()+qz(N),q+=N,N=K.getFlex!=n&&K.getFlex()!=
n?K.getFlex():0,y+=N):(N=h.MC(N,N.offsetWidth),q+=N,s+=N)}}f[g]={sC:m,fja:q,J9a:s,q2:y}}}a=w.b;b=this.h();d-=a.MC(b,0);d-=a.MC(H.ca(b),0);for(a=0;a<this.Hf.length;a++)if(b=this.Hf[a],e=d-b.sC.length,f=e-b.fja,0>f){D.i.fine("toolbox#ResizeNotify, resizing toolbar row "+a+", available width "+e+", is smaller than row width "+b.fja+", attempt to overflow. ");f=-f;for(g=b.sC.length-1;0<=g;--g){s=b.sC[g];if(s==n){D.i.severe("Unexpected null peer for toolbox child at index: ",g);break}h=s.h();if(h==n){D.i.warning("Unexpected child ["+
g+"] found in toolbox component.");break}h.style.width="";q=qz(h);s.nj?(m=s.nj()+q,y=s.d(),y=y.getFlex?y.getFlex()||0:0,A=y/b.q2,0<y&&1!=A?(s=e*A,h.parentNode.style.width=s+"px",h.parentNode.style.maxWidth=s+"px"):(s=s.iE()+q,s=Math.max(m-f,s),q=s-q,h.parentNode.style.width=s+1+"px",h.parentNode.style.maxWidth=s+1+"px",h.style.width=q+"px"),f-=m-s,0>=f&&(spaceToRemoved=0)):h.parentNode.style.width=h.offsetWidth+1+"px"}}else{D.i.fine("toolbox#ResizeNotify, resizing toolbar row "+a+", available width "+
e+", is not smaller than row width "+b.fja+", attempt to stretch.");f=b.sC.length;g=f-1;for(h=0;h<f;h++){y=b.sC[h];if(y==n){D.i.severe("Unexpected null peer for toolbox child at index: ",h);break}m=y.h();if(m==n){D.i.warning("Unexpected child ["+h+"] found in toolbox component.");break}m.style.width="";s=qz(m);y.nj?(q=y.nj(),s=q+s,y=y.d(),y=y.getFlex?y.getFlex()||0:0,0<y?(q=e*(y/b.q2),m.parentNode.style.width=q+"px",m.parentNode.style.maxWidth=q+"px"):h==g&&0==b.q2?(m.parentNode.style.width=e+"px",
m.parentNode.style.maxWidth=e+"px"):(m.parentNode.style.width=s+1+"px",m.parentNode.style.maxWidth=s+1+"px",m.style.width=q+"px")):m.parentNode.style.width=h==g&&0==b.q2?e+"px":m.offsetWidth+1+"px"}}};z.a("AdfDhtmlToolboxPeer.prototype.ResizeNotify",{Ia:oz.prototype.Ia});oz.prototype.uc=function(a){this.bind(a);this.Hf=n};z.a("AdfDhtmlToolboxPeer.prototype.__preferredSizeChangeNotify",{uc:oz.prototype.uc});
function qz(a){a=w.b.getComputedStyle(a);var b=w.ua;return b(a.paddingLeft)+b(a.paddingRight)+b(a.marginLeft)+b(a.marginRight)}
function pz(a){if(!a.Hf)return p;for(var b=0;b<a.Hf.length;b++)for(var d=a.Hf[b],e=0;e<d.sC.length;e++){var f=d.sC[e];if(f==n)return D.i.fine("Toolbox cached rows are not valid, due to unexpected null peer for toolbox child at row: "+b+", index: "+e),p;if(f.h()==n)return D.i.fine("Toolbox cached rows are not valid, due to toolbar peer without component (perhaps due to ppr) at row: "+b+", index: "+e),p}return l};