var vs=M.U(M,"AdfDhtmlPanelGridLayoutPeer",p);v("AdfDhtmlPanelGridLayoutPeer",vs);vs.m=function(){M.hb(this,AdfRichPanelGridLayout.INLINE_STYLE)};v("AdfDhtmlPanelGridLayoutPeer.InitSubclass",vs.m);
vs.prototype.iz=function(a,b,d,e){var f=b.style,g=f.display,h=f.position,m=f.left,q=f.right,s=f.top,y=f.bottom,A=f.width,C=f.minWidth,G=f.maxWidth,K=f.height,N=f.minHeight,Q=f.maxHeight,T=[];if("n"==w.b.getAttribute(b,"_afrm")){var Y=f.k$a,f=f.l$a;vs.f.iz.call(this,a,b,d,e);Y!=n&&""!=Y&&T.push("-ms-grid-columns:"+Y);f!=n&&""!=f&&T.push("-ms-grid-rows:"+f)}else vs.f.iz.call(this,a,b,d,e),this.F$!=n&&H.jC(b,this.F$,l);g!=n&&""!=g&&T.push("display:"+g);h!=n&&""!=h&&T.push("position:"+h);m!=n&&""!=m&&
T.push("left:"+m);q!=n&&""!=q&&T.push("right:"+q);s!=n&&""!=s&&T.push("top:"+s);y!=n&&""!=y&&T.push("bottom:"+y);A!=n&&""!=A&&T.push("width:"+A);C!=n&&""!=C&&T.push("min-width:"+C);G!=n&&""!=G&&T.push("max-width:"+G);K!=n&&""!=K&&T.push("height:"+K);N!=n&&""!=N&&T.push("min-height:"+N);Q!=n&&""!=Q&&T.push("max-height:"+Q);0<T.length&&H.jC(b,T.join(";"),l)};z.a("AdfDhtmlPanelGridLayoutPeer.prototype.ComponentInlineStyleChanged",{iz:vs.prototype.iz});vs.prototype.ja=t(l);
z.a("AdfDhtmlPanelGridLayoutPeer.prototype.needsResizeNotify",{ja:vs.prototype.ja});vs.prototype.Md=t(l);z.a("AdfDhtmlPanelGridLayoutPeer.prototype.needsChildVisibilityChanges",{Md:vs.prototype.Md});vs.prototype.Z=function(a){this.Oca&&F.c.Nm(a)};z.a("AdfDhtmlPanelGridLayoutPeer.prototype.ComponentRemoved",{Z:vs.prototype.Z});
vs.prototype.Ia=function(a,b,d,e){a=this.d();if(this.F$!=n){b=-1!=ws(this,a).indexOf("%");var f=-1!=xs(this,a).indexOf("%"),g=-1!=ws(this,a).indexOf("auto"),h=-1!=xs(this,a).indexOf("auto");if(!b&&!f&&!g&&!h)return}b=this.h();H.ca(b)!=n&&(d=this.gn(d,e),this.Oca&&!d?(F.c.Nm(a),this.Oca=p):d&&(F.c.Go(a),this.Oca=l),"hidden"==b.style.visibility&&(b.style.visibility="visible"))};z.a("AdfDhtmlPanelGridLayoutPeer.prototype.ResizeNotify",{Ia:vs.prototype.Ia});
vs.prototype.Ed=function(a,b,d){return this.PX(b)?(H.setVisible(b.parentNode,d),this.gn(),H.setVisible(b,d),F.c.lh(this.d()),l):p};z.a("AdfDhtmlPanelGridLayoutPeer.prototype.ChildVisibilityChanged",{Ed:vs.prototype.Ed});vs.prototype.PX=function(a){return a.parentNode.parentNode==this.h()};function ws(a,b){a.rN==n&&(a.rN=b.r("_privateColumns"));return a.rN}function xs(a,b){a.Hf==n&&(a.Hf=b.r("_privateRows"));return a.Hf}
vs.prototype.gn=function(a,b){var d=this.h(),e=w.b;if("n"==e.getAttribute(d,"_afrm"))return p;for(var f=this.d(),g=ws(this,f).split(" "),h=xs(this,f).split(" "),m=0,q=0,s=H.Tc(d),y=[],A=D.i,C=n,G=-1!=ws(this,f).indexOf("%"),K=-1!=xs(this,f).indexOf("%"),N,Q,T,Y,ra=s.length-1,wa=0;wa<=ra;wa++){var Ca=s[wa],La=H.ca(Ca);La==n&&(La=H.Zfa(Ca,3));if(La==n)wa==ra&&e.getAttribute(Ca,"_afrr")!=n?C=Ca:A.finest("The grid layout ("+f.e()+") has an empty grid cell under wrapper index \x3d "+wa+", wrapper.innerHTML \x3d "+
Ca.innerHTML+")");else if(3==La.nodeType||H.hc(La)){var Ba=this.mO(e,Ca,"_afrc","1 1 1 1 stretch stretch").split(" ");N=parseInt(Ba[0],10);Q=parseInt(Ba[1],10);T=parseInt(Ba[2],10);Y=parseInt(Ba[3],10);var sb=Ba[4],Ba=Ba[5];0<N&&0<T&&(data={wrapper:Ca,child:La,col:N,cspan:Q,row:T,rspan:Y,halign:sb,valign:Ba},m=Math.max(m,N+Q-1),q=Math.max(q,T+Y-1),y.push(data))}else A.xd(D.FINE)&&A.fine("The grid layout ("+f.e()+") has an invisible child (wrapper index \x3d "+wa+", child.id \x3d "+La.id+", wrapper.innerHTML \x3d "+
Ca.innerHTML+")")}if(0==y.length)return A.xd(D.FINE)&&A.fine("The grid layout ("+f.e()+") has no child data to process (wrappers.length \x3d "+s.length+")."),p;ra=F.c.Ma().Oa();s=p;N=ys(g,m,d,y,"col","cspan","clientWidth",a);Y=ys(h,q,d,y,"row","rspan","clientHeight",b);Q=N[0];T=Y[0];s||(s=N[1]||Y[1]);C==n&&(C=d.ownerDocument.createElement("div"),e.setAttribute(C,"_afrr","y"),d.appendChild(C));H.jC(C,"width:"+Q+"px;height:"+T+"px",l);N="";G||(N+="max-width:"+Q+"px;min-width:"+Q+"px;");K||(N+="max-height:"+
T+"px;min-height:"+T+"px;");""!=N&&(H.jC(d,N,l),this.F$=N);A.xd(D.FINE)&&(A.fine("Grid layout details for "+f.e()+" (childData.length \x3d "+y.length+")"),A.fine("Columns: "+g),A.fine("Rows: "+h),A.fine("Grid (permanent) dimensions: "+Q+"px and "+T+"px."));G=y.length;for(wa=0;wa<G;wa++)data=y[wa],"center"==data.halign&&(data.sw=data.wrapper.scrollWidth),"middle"==data.valign&&(data.sh=data.wrapper.scrollHeight);for(wa=0;wa<G;wa++)data=y[wa],Ca=data.wrapper,N=data.col,Q=data.cspan,T=data.row,Y=data.rspan,
sb=data.halign,Ba=data.valign,K=[],"center"==sb?(s=l,e=zs(g,N),C=Math.max(0,zs(g,N+Q)-e),e=e+Math.ceil(C/2-data.sw/2)+"px",ra?K.push("right:"+e):K.push("left:"+e)):"stretch"==sb?(e=zs(g,N),C=zs(g,N+Q),ra?K.push("right:"+e+"px"):K.push("left:"+e+"px"),K.push("width:"+(C-e)+"px")):ra?("end"!=sb&&K.push("right:"+zs(g,N)+"px"),"start"!=sb&&K.push("left:"+As(g,N+Q-1)+"px")):("end"!=sb&&K.push("left:"+zs(g,N)+"px"),"start"!=sb&&K.push("right:"+As(g,N+Q-1)+"px")),"middle"==Ba?(s=l,e=zs(h,T),C=Math.max(0,
zs(h,T+Y)-e),K.push("top:"+(e+Math.ceil(C/2-data.sh/2))+"px")):"stretch"==Ba?(e=zs(h,T),C=zs(h,T+Y),K.push("top:"+e+"px"),K.push("height:"+(C-e)+"px")):("bottom"!=Ba&&K.push("top:"+zs(h,T)+"px"),"top"!=Ba&&K.push("bottom:"+As(h,T+Y-1)+"px")),0<K.length&&H.jC(Ca,K.join(";"),l),A.xd(D.FINE)&&A.fine("child "+wa+": c\x3d"+N+" (span\x3d"+Q+") halign\x3d"+sb+" -- r\x3d"+T+" (span\x3d"+Y+") valign\x3d"+Ba);if(a!=d.clientWidth||b!=d.clientHeight)a:{g=D.i;if(this.NP==n)this.NP=1,this.bZ=F.c.oa(this,this.h1a,
{},1E3);else{if(10<++this.NP&&(a==n||a>d.clientWidth||b==n||b>d.clientHeight)){g.xd(D.FINE)&&g.fine("Unsable structure encountered, stopping repositioning attempts (case a).");Bs(this);break a}if(15<++this.NP){g.xd(D.FINE)&&g.fine("Unsable structure encountered, stopping repositioning attempts (case b).");Bs(this);break a}}g.xd(D.FINE)&&g.fine("Grid layout size change, notifying ancestors: panelGridLayout\x3d"+d.id+" oldW\x3d"+a+", newW\x3d"+d.clientWidth+", oldH\x3d"+b+", newH\x3d"+d.clientHeight);
F.c.Iw(f);F.c.Dw()}else Bs(this);return s};vs.prototype.h1a=function(){this.bZ=this.NP=n};function Bs(a){a.bZ!=n&&F.c.ac(a.bZ);a.NP=n;a.bZ=n}function zs(a,b){for(var d=0,e=0;e<b-1;e++)d+=a[e];return d}function As(a,b){for(var d=0,e=a.length-1;e>=b;e--)d+=a[e];return d}vs.prototype.mO=function(a,b,d,e){a=a.getAttribute(b,d);return a==n?e:a};
function ys(a,b,d,e,f,g,h,m){var q=0,s,y,A,C,G=a.length;for(s=b-G;0<s;s--)a.push("auto");b=p;var K=0,G=a.length;for(s=0;s<G;s++)y=a[s],"auto"==y?(b=l,y=["auto"]):-1!=y.indexOf("%")?K+=parseFloat(y):(y=H.nCa(d,y),q+=y),a[s]=y;if(b){y=w.b;var N=[],Q,T,Y,ra=e.length;for(s=0;s<ra;s++)if(A=e[s],Q=A[f]-1,T=Q+A[g]-1,Q!=T)D.i.xd(D.FINE)&&D.i.fine("Skipped auto resolution for a multi-span child because firstLineIndex \x3d "+Q+" and lastLineIndex \x3d "+T);else{Y=-1;for(C=Q;C<=T;C++)if("object"==typeof a[C]){Y=
C;break}-1!=Y&&(C=A.wrapper,H.jC(C,"top:auto;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;max-width:none;max-height:none",l),N.push([C,Q,T,Y]))}e=N.length;for(s=0;s<e;s++){Y=N[s];C=Y[0];Q=Y[1];T=Y[2];Y=Y[3];f=0;"clientWidth"==h?(f=C.scrollWidth,y.G()==w.ed&&1.8<y.nb()&&++f):f=C.scrollHeight;for(C=Q;C<=T;C++){if(Y==C){a[C].push(f);break}Q=a[C];if("number"==typeof Q&&(f=Math.max(0,f-Q),0==f))break}}for(C=0;C<G;C++)if(y=a[C],N=0,"object"==typeof y){T=y.length;for(s=1;s<T;s++)N=Math.max(N,
y[s]);a[C]=N;q+=N}}s=0;if(0<K){s=Math.max(0,m==n?d[h]:m);G=a.length;for(C=0;C<G&&0<s;C++)y=a[C],"number"==typeof y&&(s=Math.max(0,s-y));for(C=0;C<G;C++)y=a[C],"string"==typeof y&&(a[C]=Math.floor(s*parseFloat(y)/K))}return[q,b]};