function xf(){this.Init()}v("AdfColumnDropTarget",xf);z.l(xf,$a);xf.prototype.Init=function(){xf.f.Init.call(this,Ka.mg)};z.a("AdfColumnDropTarget.prototype.Init",{Init:xf.prototype.Init});xf.prototype.Oh=function(a){Af(this);return xf.f.Oh.apply(this,arguments)};z.a("AdfColumnDropTarget.prototype.dragExit",{Oh:xf.prototype.Oh});xf.prototype.Tf=function(){return Ka.mg};z.a("AdfColumnDropTarget.prototype.GetAllowedActions",{Tf:xf.prototype.Tf});
xf.prototype.mh=function(a){Af(this);if(a.RZ==n||a.en==n)return Ka.lb;var b=this.d(),d=Bf(a),b=this.Tt(b),d=new Cf(b,d.e(),"reorderColumn");d.S1(a.RZ);d.v1(a.en);d.v();delete a.RZ;delete a.en;return Ka.lb};z.a("AdfColumnDropTarget.prototype.drop",{mh:xf.prototype.mh});xf.prototype.Je=function(){return[xf.joa]};z.a("AdfColumnDropTarget.prototype.GetAllowedFlavors",{Je:xf.prototype.Je});
xf.prototype.gI=function(a,b,d,e){var f=xf.f.gI.apply(this,arguments);if(f!=Ka.lb){if(!Ff(this,a))return Ka.lb;var g=a,h=d,m=this.d(),m=this.Tt(m),m=M.Qk(m),q=m.ownerDocument.createElement("div");q.className=xf.aIa;var s=q.style;s.position="absolute";s.width="10px";s.overflow="hidden";s.top="0px";s.zIndex=1E3;s.height=m.offsetHeight+"px";w.b.yd(q,80);m.appendChild(q);this.zW=q;Gf(this,g,h)}return f};z.a("AdfColumnDropTarget.prototype.acceptDragEnter",{gI:xf.prototype.gI});
xf.prototype.hI=function(a,b,d,e){var f=xf.f.hI.apply(this,arguments);if(f!=Ka.lb){if(!Ff(this,a))return Ka.lb;Gf(this,a,d)}return f};z.a("AdfColumnDropTarget.prototype.acceptDragOver",{hI:xf.prototype.hI});function Ff(a,b){var d=a.d(),e=Bf(b);return e==n||e==d||a.Tt(e)!=a.Tt(d)?p:l}xf.prototype.Tt=function(a){for(;a!=n;a=a.getParent())if(a instanceof AdfRichTable)return a;return n};function Bf(a){(a=a.Zj().em(xf.joa))&&(a=a[0]);return a instanceof AdfRichColumn?a:n}
function Gf(a,b,d){var e=F.c.Ma().Oa(),f=a.d(),g=a.Tt(f),h=M.Qk(g),f=a.zW,m=f.style,q=w.b.Ub(h);d=Math.max(d-q.x,0);var s=g.k(),g=s.Gb(),y,A=V.Ra(g,"t"),C,G=s.b8();0<=G&&(y=V.Ra(g,"d2"),C=V.Ra(y,"t2"));var K,g=0,q=n,N=s.a8();e?(K=h.offsetWidth-A.offsetWidth,y&&d<=K?(K=C,g=-a.Rd,a=s.d8(),s.c8().scrollHeight>a.offsetHeight&&(g+=a.offsetWidth-a.clientWidth)):(h.offsetWidth>A.offsetWidth&&(g=h.offsetWidth-A.offsetWidth),K=A)):d<=A.offsetWidth?K=A:y&&(g=A.offsetWidth,g-=N,K=C);if(K!=n){-1==G&&(g-=N);for(a=
A.rows.length-1;0<=a;--a){y=K.rows[a].cells;C=y.length;for(h=0;h<C;++h)if(s=y[h],s.getAttribute("_afrRoot")&&s.getAttribute("_afrRH")==n)if(cellLeft=s.offsetLeft+g,cellRight=cellLeft+s.offsetWidth,d>=cellLeft&&d<=cellRight-s.offsetWidth/2){b.en=e;b.RZ=s.id;q=cellLeft-f.offsetWidth/2;break}else if(d>=cellLeft&&d<=cellRight){b.en=!e;b.RZ=s.id;q=cellRight-f.offsetWidth/2;break}}q!=n&&(m.left=Math.max(q,0)+"px")}}function Af(a){var b=a.Tt(a.d()),b=M.Qk(b);a.zW!=n&&(b.removeChild(a.zW),delete a.zW)}
xf.joa=hb.bR(J,"AdfRichColumn");xf.aIa="AFColumnDropTarget";