var Io=M.U(M,"AdfDhtmlMasonryLayoutPeer",p);v("AdfDhtmlMasonryLayoutPeer",Io);
Io.m=function(){this.lLa="af|masonryLayout";this.mLa=this.lLa+"::drop-target";this.nLa="AFMasonryLayoutTransitionResizeTo";this.oLa="AFMasonryLayoutTransitionResizeToFast";this.cpa=this.bpa=10;this.Xoa="AFMasonryTileSize";var a=this.bpa+1,b=this.cpa+1,d=[n];this.wra=d;for(var e=1;e<a;e++){var f=[n];d.push(f);for(var g=1;g<b;g++)f.push(this.Xoa+e+"x"+g)}this.rLa="AFMasonryTileTransitionMoveTo";this.sLa="AFMasonryTileTransitionMoveToFast";this.tLa="AFMasonryTileTransitionResizeTo";this.pLa="AFMasonryTileTransitionHideFrom";
this.qLa="AFMasonryTileTransitionHideTo";this.Yoa="AFMasonryTileTransitionShowFrom";this.uLa="AFMasonryTileTransitionShowTo";this.kKa="hasDeleteListener";this.mKa="hasReorderListener"};v("AdfDhtmlMasonryLayoutPeer.InitSubclass",Io.m);
Io.prototype.q=function(a,b){Io.f.q.call(this,a,b);var d=F.c,e=d.Ma().Oa();this.bp=e;var f=d.is(),d=d.u(),g=Io.wra,h=Io.bpa+1,m=Io.cpa+1,q=[n];this.Ota=q;for(var s=1;s<h;s++){var y=g[s],A=[n];q.push(A);for(var C=1;C<m;C++){var G=d.getStyleClass(y[C]);A.push(G)}}g="";for(s=1;s<h;s++){A=q[s];for(C=1;C<m;C++)if(G=A[C])0<g.length&&(g+=", "),g+="."+G}h={};h.KEa=g;m={};m.OEa=d.getStyleClass(Io.nLa);m.NEa=d.getStyleClass(Io.oLa);m.SEa=d.getStyleClass(Io.rLa);m.REa=d.getStyleClass(Io.sLa);m.TEa=d.getStyleClass(Io.tLa);
m.PEa=d.getStyleClass(Io.pLa);m.QEa=d.getStyleClass(Io.qLa);m.UEa=d.getStyleClass(Io.Yoa);m.VEa=d.getStyleClass(Io.uLa);d={};d.VAa=H.n;d.LDa=H.F;d.CCa=this.o(this.S$);d.ECa=this.o(this.Iva);d.QCa=this.o(this.HO);d.nDa=this.o(this.aP);d.mDa=this.o(this.$t);d.lDa=this.o(this.xB);d.EEa=Io.Eda;if(q=this.kd(b))for(s=0;s<q.length;s++)q[s].Le=s+1;this.Vo=e=new window.adf.K.N.sc.wc(b,e,f,h,m,d);e.uD(l)};z.a("AdfDhtmlMasonryLayoutPeer.prototype.InitDomElement",{q:Io.prototype.q});Io.prototype.ja=t(l);
z.a("AdfDhtmlMasonryLayoutPeer.prototype.needsResizeNotify",{ja:Io.prototype.ja});Io.prototype.Ia=function(a,b,d,e){Io.f.Ia.call(this,a,b,d,e);this.YTa||(this.YTa=l,a=this.d(),(b=a.QI())&&a.eS(new rf(b)));if(a=this.Vo)this.iXa?a.se():(this.iXa=l,a.uD(l),this.h().style.visibility="")};z.a("AdfDhtmlMasonryLayoutPeer.prototype.ResizeNotify",{Ia:Io.prototype.Ia});
Io.prototype.Ab=function(a,b){if(0<=a.id.indexOf("optRnd"))for(var d=b.childNodes,e=d.length-1;0<=e;e--){var f=d[e];if(1==f.nodeType){var g=f.id;g&&0<g.length&&(a.querySelector("#"+Io.bO(g))||a.appendChild(f))}}Io.f.Ab.call(this,a,b)};z.a("AdfDhtmlMasonryLayoutPeer.prototype.ReplaceDomElement",{Ab:Io.prototype.Ab});
Io.prototype.Rb=function(a){if(0<=a.id.indexOf("optRnd")){if(this.Vo.Ac())for(var b=w.b,d=F.c.u().getStyleClass(Io.Yoa),e=a.childNodes,f=0;f<e.length;f++){var g=e[f];1==g.nodeType&&b.getAttribute(g,"data-insert")&&H.n(g.firstChild,d)}this.RY=F.c.oa(this,this.F_a,a,0)}};z.a("AdfDhtmlMasonryLayoutPeer.prototype.DomReplaceNotify",{Rb:Io.prototype.Rb});Io.prototype.Z=function(){this.RY&&(F.c.ac(this.RY),this.RY=n)};z.a("AdfDhtmlMasonryLayoutPeer.prototype.ComponentRemoved",{Z:Io.prototype.Z});
Io.prototype.ss=function(a,b){var d=this.Vo;d.Ij!=n&&Jo(d);var e=F.c.u(),f=document.getElementById(a),g=Ko(this,f),h=e.getStyleClass(g);if(b==g||b==h)D.i.warning("Unable to resize masonryLayout child ",a," to style class ",b," because ",b," is already applied.");else{this.$V||(this.$V=[]);this.$V.push(a);O.Vl(f)&&(this.$ca=f.id);var g=w.b,m=this.d(),q=m.e(),h=g.cloneNode(f);1==h.nodeType&&g.Sl(h);h.id=M.Na(q,a+"_resizePlaceholder");h.Le=f.Le;this.h().replaceChild(h,f);g=M.Na(q,"optRnd");document.getElementById(g).appendChild(f);
this.TF||(this.TF=[]);g=Ko(this,f);f=new Mb(m,a,g,b);this.TF.push(f);e=e.getStyleClass(b);d.ss("#"+Io.bO(h.id),e)}};z.a("AdfDhtmlMasonryLayoutPeer.prototype.resizeTile",{ss:Io.prototype.ss});
Io.prototype.Uu=function(a,b){var d=this.Vo;d.Ij!=n&&Jo(d);var e=F.c.u().getStyleClass(a);isNaN(b)&&(b=-1);var f=document.createElement("div"),g=this.d(),h=g.e(),h=M.Na(h,"placeholder"+b);f.id=h;H.n(f,e);e=f.style;e.top="-1px";this.bp?e.right="-1px":e.left="-1px";this.ZV||(this.ZV=[]);g=new Kb(g,b,a);this.ZV.push(g);Lo(this,f,b);g=b;e=Mo(d);d.gQ&&d.gQ(e);h=n;0<=g&&g<e.length&&(h=e[g]);d.Ne.insertBefore(f,h);No(d);this.Oaa=l};z.a("AdfDhtmlMasonryLayoutPeer.prototype.insertTile",{Uu:Io.prototype.Uu});
Io.prototype.$x=function(a){var b=this.Vo;b.Ij!=n&&Jo(b);var d=document.getElementById(a);if(O.Vl(d)){var e=this.kd(this.h(),l),d=ya.indexOf(e,d);0<d&&(this.S9=e[d-1].id)}this.YV||(this.YV=[]);e=new Jb(this.d(),a);e.qD(this.d().r(Io.kKa)!=n);this.YV.push(e);a="#"+Io.bO(a);if(a=b.Ne.querySelector(a))b.$q||(b.$q=[]),b.$q.push(a),b.rwa=l,No(b)};z.a("AdfDhtmlMasonryLayoutPeer.prototype.deleteTile",{$x:Io.prototype.$x});Io.bO=function(a){a=a.concat("");return a=a.replace(/:/g,"\\:")};
Io.Eda=function(a){a&&a.sort(Io.bTa);return a};Io.bTa=function(a,b){return b.Le<a.Le?1:a.Le<b.Le?-1:0};function Oo(a,b){a.CN||(a.CN=[]);a.CN.push(b)}function Po(a){if(a)for(var b=0;b<a.length;b++)a[b].v()}function Ko(a,b){for(var d,e=a.Ota,f=1;f<e.length;f++)for(var g=e[f],h=1;h<g.length;h++)if(H.ta(b,g[h])){d=Io.wra[f][h];break}return d}u=Io.prototype;u.S$=function(a){for(var b,d=this.Ota,e=1;e<d.length;e++)for(var f=d[e],g=1;g<f.length;g++){var h=f[g];if(H.ta(a,h)){b=h;break}}return b};
u.Iva=function(a){var b=Io.Xoa;a=Ko(this,a).substring(b.length);b=a.indexOf("x");return{colSpan:parseInt(a.substring(0,b),10),rowSpan:parseInt(a.substring(b+1),10)}};u.F_a=function(a){var b=w.b;this.RY=n;for(var d=a.childNodes,e=d.length,f=[],g=0;g<e;g++){var h=d[g];1==h.nodeType&&(b.getAttribute(h,"data-insert")?(Qo(this,h),f.push(h)):b.getAttribute(h,"data-resize")&&(Ro(this,h),f.push(h)))}for(;0<f.length;)h=f.pop(),a.removeChild(h);return-1};
function Qo(a,b){if(a.Vo.Ij!=n)Oo(a,function(){Qo(a,b)});else{var d=b.firstChild;a.Oaa?(a.dH||(a.dH={}),a.dH[d.id]=b):So(a,b)}}function Ro(a,b){if(a.Vo.Ij!=n)Oo(a,function(){Ro(a,b)});else{var d=b.firstChild.id,e=a.$V;e&&-1<ya.indexOf(e,d)?(a.Fba||(a.Fba={}),a.Fba[d]=b):To(a,b)}}
function So(a,b){var d=b.firstChild,e=a.d().e(),f=a.Vo,g=w.b.getAttribute(b,"data-insert"),h=M.Na(e,"placeholder"+g),e=a.h(),m=n;"-1"==g?m=document.getElementById(h):(h=e.querySelectorAll("#"+Io.bO(h)))&&0<h.length&&(m=h[h.length-1]);if(m){if(g=d.style,h=m.style,g.top=h.top,a.bp?g.right=h.right:g.left=h.left,d.Le=m.Le,e.replaceChild(d,m),F.c.Xl(d,l),d="#"+Io.bO(d.id),d=f.Ne.querySelector(d))f.Qm||(f.Qm=[]),f.Qm.push(d),f.Cda=l,d=window.adf.K.N.sc.wc,f.Ij!==d.Hpa&&f.Ij!==d.QU?No(f):f.Cda=p}else f=
a.S$(d),a.Uu(f,parseInt(g,10)),a.dH||(a.dH={}),a.dH[d.id]=b}function To(a,b){var d=b.firstChild,e=d.id,f=a.d().e(),e=M.Na(f,e+"_resizePlaceholder"),e=document.getElementById(e),f=e.style,g=d.style;g.top=f.top;a.bp?g.right=f.right:g.left=f.left;d.Le=e.Le;a.h().replaceChild(d,e);F.c.Xl(d,l);a.$ca&&(e=document.getElementById(a.$ca),e==d&&(O.Sj(e),a.$ca=n))}u.HO=function(a){var b=w.b;F.c.th(a);b.gc(a);a.parentNode.removeChild(a);Uo(this,a);Po(this.YV);this.YV=n};
u.aP=function(){var a=this.$V;if(a&&0<a.length){for(;0<a.length;){var b=a.pop(),d=this.Fba;if(d){var e=d[b];e&&(delete d[b],To(this,e))}}if(this.TF){a=this.TF;b=a[a.length-1];for(d=0;d<a.length-1;d++)e=a[d],b.Eea(e.Fu(),e.qga(),e.mga())}Po(this.TF);this.TF=n}if(this.Oaa){this.Oaa=p;if(a=this.dH)for(var f in a)b=a[f],delete a[f],So(this,b);Po(this.ZV);this.ZV=n}};u.$t=function(){this.iY=n;var a=F.c.Qc;if(a){var b=this.h();b&&H.oc(b,a)&&(this.iY=a)}};
u.xB=function(){var a=this.h();if(a&&this.iY){var b=this.iY;this.iY=n;var d=F.c.Qc;this.S9?(b=document.getElementById(this.S9),this.S9=n,b&&H.oc(a,b)&&(a=this.kd(a,l),d=ya.indexOf(a,b),0<=d&&d<a.length-1?O.Sj(a[d+1]):O.Sj(b))):d?H.oc(a,d)&&O.ra(d):H.oc(a,b)?O.ra(b):O.Sj(a)}if(this.CN){a=this.CN;this.CN=n;for(b=0;b<a.length;b++)d=a[b],a[b]=n,d()}};
u.kd=function(a,b){for(var d=H.Tc(a),e=d.length,f=[],g=0;g<e;g++){var h=d[g];if(!b||b&&h!==this.Ug){var m=h.style;"hidden"!==m.visibility&&"none"!==m.display&&f.push(h)}}return f};function Lo(a,b,d){a=a.kd(a.h());0>d&&(d=a.length);if(a)for(var e=0;e<a.length;e++){var f=a[e];f.Le&&f.Le>=d+1&&f.Le++}b.Le=d+1}function Uo(a,b){if(b.Le){var d=a.kd(a.h());if(d)for(var e=0;e<d.length;e++){var f=d[e];f.Le&&f.Le>b.Le&&f.Le--}delete b.Le}}
u.gfa=function(a){var b=l,d=n,e=this.d();a&&(d=a.Fe().d(),b=Vo(this,d));var f=this.h();a=-1;var g=n;if(!b&&d){var g=d.k().h(),h=g.style;h.display="";if(this.Ug){var m=this.Ug;a=m.style;this.bp?h.right=a.right:h.left=a.left;h.top=a.top;f.insertBefore(g,m);a=m.Nsa;Lo(this,g,m.Le-1)}}this.Ug&&(Uo(this,this.Ug),f.removeChild(this.Ug),this.Ug=n);!b&&d&&(b=Wo(this,f,g),a!=b&&(d=d.e(),e=new Lb(e,d,a,b),e.qD(this.d().r(Io.mKa)!=n),e.v()))};z.a("AdfDhtmlMasonryLayoutPeer.prototype.dropOnRowKey",{gfa:Io.prototype.gfa});
Io.prototype.ci=function(a,b,d,e,f,g,h){B.J(a,Ka);B.Cd(b);B.Ea(d);B.Cd(e);h&&(b=l,d=n,a&&(d=a.Fe().d(),b=Vo(this,d)),a=p,this.Ug&&(a=this.h(),Uo(this,this.Ug),a.removeChild(this.Ug),this.Ug=n,a=l),!b&&d&&(a=d.k().h(),a.style.display="",b=a.Le,delete a.Le,Lo(this,a,b-1),a=l),a&&this.Vo.uD(p,l))};z.a("AdfDhtmlMasonryLayoutPeer.prototype.showDragFeedback",{ci:Io.prototype.ci});
Io.prototype.Dn=function(a){if(!a)return n;a=this.h();var b=this.Iva(this.Ug),d=this.Vo.rW,e=this.Ug.style,f=b.colSpan*d.ei,g=w.b,h=0,h=this.bp?a.offsetWidth-parseInt(e.right,10)-f:parseInt(e.left,10),e=parseInt(e.top,10),g=g.Uc(a);g.left+=h-a.scrollLeft;g.right=g.left+f;g.top+=e-a.scrollTop;g.bottom=g.top+b.rowSpan*d.bj;return g};z.a("AdfDhtmlMasonryLayoutPeer.prototype.getRowKeyBounds",{Dn:Io.prototype.Dn});
Io.prototype.gy=function(a,b){var d=a.e();if(!b&&this.WW==d)return this.TN;this.WW=d;return this.TN=this.Ug.Nsa};z.a("AdfDhtmlMasonryLayoutPeer.prototype.getDraggedSourceChildIndex",{gy:Io.prototype.gy});
Io.prototype.dm=function(a,b,d){B.Ea(a);B.Ea(b);B.assert(d!=n);var e=d[qf.Wv],f=d[qf.rE],g=d[qf.qE];if(e&&f&&(B.s(e),B.zc(f),a>=f.left&&b>=f.top&&a<=f.right&&b<=f.bottom)){d[qf.Bh]=e;d[qf.wh]=g;return}var f=l,h=F.c,m=h.fg(),q=n;m&&(q=m.Fe().d(),f=Vo(this,q));this.eB(a,b,d,f,q);a=d[qf.Bh];e&&(!a||e===a)?(d[qf.Bh]=e,d[qf.wh]=g):(d=this.h(),!this.Ug&&q?q&&(g=h.u().getStyleClass(Io.mLa),e=q.k().h(),this.TN=this.WW=n,q=this.Ug=document.createElement("div"),h=this.S$(e),H.n(q,g),h||(h=this.J8a),H.n(q,h),
H.n(q,"p_AFDropTarget"),f?Lo(this,q,parseInt(a,10)):(f=Wo(this,d,e),q.Nsa=f,q.Le=e.Le,f=q.style,a=e.style,this.bp?f.right=a.right:f.left=a.left,f.top=a.top,a.display="none"),d.insertBefore(q,e)):(q=this.Ug,a?(f=parseInt(a,10),a=this.kd(d,l),Io.Eda(a),e=a.length,a=0<=f&&f<e?a[f]:n,Uo(this,q),Lo(this,q,f),d.insertBefore(q,a)):(f=this.kd(d,l),Uo(this,q),Lo(this,q,f.length),d.appendChild(q))),this.Vo.uD(p,l))};z.a("AdfDhtmlMasonryLayoutPeer.prototype.getRowKeyAndOrientationFromHints",{dm:Io.prototype.dm});
Io.prototype.eB=function(a,b,d,e,f){B.Ea(a);B.Ea(b);a:{this.d();e=this.h();var g=w.b;if(g.Kc(e,a,b)){b:{for(var h=this.kd(e,l),m=h.length,q=w.b,s=0;s<m;s++){var y=h[s];if(q.Kc(y,a,b)){b=y;break b}}b=n}if(b){a=a-document.documentElement.scrollLeft-g.rc(e)+e.scrollLeft>=b.offsetLeft+0.5*b.offsetWidth;g=F.c.Ma().Oa();e=Wo(this,e,b);f=f.k().h();b!==f&&b!==this.Ug&&(a&&!g||!a&&g)&&e++;f=""+e;break a}if(!this.Ug){f=(f=this.kd(e,l))&&0<f.length?""+f.length:"0";break a}}f=n}d[qf.Bh]=f?f:n;d[qf.wh]=pb.c3};
function Wo(a,b,d){a=a.kd(b,l);Io.Eda(a);b=a.length;for(var e=0;e<b;e++)if(a[e]===d)return e;return-1}function Vo(a,b){return b.k().h().parentNode==a.h()?p:l};