function ca(a){this.Init(a)}m("AdfResizeTrackManager",ca);r.v(ca);ca.prototype.Init=function(a){ca.h.Init.call(this);this.Ln=[];this.xb=a;this.a5a=2;this.ooa=0;this.kna=this.vX=this.ioa=this.au=this.kg=this.t6=this.iN=this.cG=null};r.a("AdfResizeTrackManager.prototype.Init",{Init:ca.prototype.Init});ca.prototype.addListener=function(a){this.Ln.push(a)};r.a("AdfResizeTrackManager.prototype.addListener",{addListener:ca.prototype.addListener});
ca.prototype.removeListener=function(a){for(var b=this.Ln.length-1;0<=b;b--)if(this.Ln[b]===a){this.Ln.splice(b,1);break}};r.a("AdfResizeTrackManager.prototype.removeListener",{removeListener:ca.prototype.removeListener});ca.prototype.zc=function(){return 0==this.Ln.length};r.a("AdfResizeTrackManager.prototype.isEmpty",{zc:ca.prototype.zc});
ca.prototype.start=function(){this.vX=this.D(ca.Tka);if(this.xb.attachEvent)this.ioa=this.D(ca.Fn),this.xb.attachEvent("onresize",this.ioa);else{var a=this.xb.childNodes[0];this.kg=document.createElement("div");C.jm(this.kg,"position:absolute; overflow:hidden; visibility:hidden; top:0; left:0; right:0; bottom:0; direction:ltr;");this.kg.className="AFDetectExpansion";this.kg.appendChild(document.createElement("div"));null!=a?this.xb.insertBefore(this.kg,a):this.xb.appendChild(this.kg);this.kg.addEventListener("scroll",
this.vX,!1);this.au=document.createElement("div");this.au.className="AFDetectContraction";C.jm(this.au,"position:absolute; overflow:hidden; visibility:hidden; top:0; left:0; right:0; bottom:0; direction:ltr;");a=document.createElement("div");a.style.width="200%";a.style.height="200%";this.au.appendChild(a);this.xb.insertBefore(this.au,this.kg);this.au.addEventListener("scroll",this.vX,!1);this.cta(!1)}};r.a("AdfResizeTrackManager.prototype.start",{start:ca.prototype.start});
ca.prototype.stop=function(){null!=this.cG&&(ca.IHa(this.cG),this.cG=null);null!=this.kg?(this.kg.removeEventListener("scroll",this.vX,!1),this.au.removeEventListener("scroll",this.vX,!1),this.xb.removeChild(this.kg),this.xb.removeChild(this.au)):this.xb.detachEvent("onresize",this.ioa)};r.a("AdfResizeTrackManager.prototype.stop",{stop:ca.prototype.stop});ca.prototype.cta=function(a){var b=va(this,a);a&&!b&&null!=this.kg.offsetParent&&wa(this,this.iN,this.t6)};
r.a("AdfResizeTrackManager.prototype.initializeElements",{cta:ca.prototype.cta});function va(a,b){var d=!1;if(null!=a.kg.offsetParent){var e=a.kg.offsetWidth,f=a.kg.offsetHeight,g=q.b.Y().innerHeight;if(a.iN!==e||a.t6!==f&&f<g)a.ooa=a.a5a,wa(a,e,f),d=!0,b&&a.oh(!0)}return d}ca.prototype.oh=function(a){if(0<this.Ln.length)if(a){null!==this.cG&&ca.IHa(this.cG);var b=this;this.cG=ca.Qhb(function(){b.cG=null;for(var a=0;a<b.Ln.length;a++)b.Ln[a]()})}else for(a=0;a<this.Ln.length;a++)this.Ln[a]()};
ca.Tka=function(a){a.stopPropagation();this.kna||(this.kna=A.c.ta(this,ca.ukb,{},100))};ca.ukb=function(){!va(this,!0)&&0<this.ooa&&null!=this.kg.offsetParent&&(0==this.kg.scrollLeft||0==this.kg.scrollTop)&&(this.ooa--,wa(this,this.iN,this.t6));this.kna=null};ca.Fn=function(){this.oh(!1)};
function wa(a,b,d){a.iN=b;a.t6=d;var e=a.kg.firstChild.style,f=1;do e.width=b+f+"px",e.height=d+f+"px",a.kg.scrollLeft=a.kg.scrollTop=f,f++;while((0==a.kg.scrollTop||0==a.kg.scrollLeft)&&5>=f);a.au.scrollLeft=b;a.au.scrollTop=d}ca.Qhb=function(a){var b=q.b;return b.Y().requestAnimationFrame?b.Y().requestAnimationFrame(a):b.Y().mozRequestAnimationFrame?b.Y().mozRequestAnimationFrame(a):b.Y().webkitRequestAnimationFrame?b.Y().webkitRequestAnimationFrame(a):b.Y().setTimeout(a,0)};
ca.IHa=function(a){var b=q.b;b.Y().cancelAnimationFrame?b.Y().cancelAnimationFrame(a):b.Y().mozCancelAnimationFrame?b.Y().mozCancelAnimationFrame(a):b.Y().webkitCancelAnimationFrame?b.Y().webkitCancelAnimationFrame(a):b.Y().clearTimeout(a)};