var au=I.ea($t,"AdfDhtmlPanelDrawerPeer",!1);m("AdfDhtmlPanelDrawerPeer",au);au.C=function(){r.bb(AdfClientDomTracker);I.ra(this,D.wb);this.Rga="_adfTracker";this.$Ea="_adfTempFloat";this.BBa="p_AFFloat";this.aDa="p_AFOpen";this.C6a="tabp"};m("AdfDhtmlPanelDrawerPeer.InitSubclass",au.C);
au.prototype.tb=function(a,b){au.h.tb.call(this,a,b);var d=I.j(a.g(),"margins");if(d=A.c.Pe(d)){var e=bu(a);d.Lqb==e&&(b.style.marginTop=d.marginTop,e?b.style.marginLeft=d.marginLeft:b.style.marginRight=d.marginRight)}return A.c.ta(this,this.Ehb,a.g(),0,{isSynchronized:!0})};r.a("AdfDhtmlPanelDrawerPeer.prototype.BindToComponent",{tb:au.prototype.tb});
au.prototype.Pq=function(a){au.h.Pq.call(this,a);var b=A.c.Zg();if(this.at()&&b){var d="open"==A.c.Pe(a.g()),b=this.i();if(d){var d=this.Wp(a,a.g()).mo(),e=d[hj.HD];d[hj.HD]=!1;this.l3=!0;this.Za(a,a.g())&&this.Jb(a,a.g());delete this.l3;d[hj.HD]=e}cu(this,a,b)}};r.a("AdfDhtmlPanelDrawerPeer.prototype.NewTabSelected",{Pq:au.prototype.Pq});au.prototype.Do=function(){this.eu&&du(this,this.f())};r.a("AdfDhtmlPanelDrawerPeer.prototype.DescendantMessageChanged",{Do:au.prototype.Do});
au.prototype.Ro=function(a,b){au.h.Ro.call(this,a);b&&!this.Zla&&(this.i(),this.Za(a,a.g())&&this.Jb(a,a.g()))};r.a("AdfDhtmlPanelDrawerPeer.prototype.TabReselected",{Ro:au.prototype.Ro});au.prototype.M=function(a){var b=this.f(),d=this.at();if(d&&eu(this)){var e=a.X(),f=I.j(b.g(),au.C6a),f=q.b.getElementById(f);e==f&&this.Ro(b,d)}au.h.M.call(this,a)};r.a("AdfDhtmlPanelDrawerPeer.prototype.HandleComponentClick",{M:au.prototype.M});au.prototype.wK=function(){return!0};
r.a("AdfDhtmlPanelDrawerPeer.prototype.UseInvertedRenderingPosition",{wK:au.prototype.wK});au.prototype.OJ=function(){return!1};r.a("AdfDhtmlPanelDrawerPeer.prototype.IsDisclosedTabRequired",{OJ:au.prototype.OJ});au.prototype.YD=function(){return!1};r.a("AdfDhtmlPanelDrawerPeer.prototype.IsVerticalConveyorSupported",{YD:au.prototype.YD});
function du(a,b){var d=A.c,e=b.g(),f=d.Mu(e),e=a.Wp(b,e);if(f&&0<f.length)for(var g=0;g<f.length;g++){var h=d.m(f[g]);if(null!=h&&h instanceof AdfUIEditableValue&&!h.getValid()){a.Zla=!0;e&&e.fua();return}}e&&e.oua();delete a.Zla}
au.prototype.Ehb=function(a){var b=this.f(),d=this.i(),e=I.j(a,au.Rga),f=this.D(this.Unb);AdfClientDomTracker.MRa(d.parentNode,d,e,f,a);if("always"==b.K(AdfRichPanelDrawer.SHOW_HANDLES)){a=d.parentNode;e=q.b;bu(b)?this.$ja="left":this.$ja="right";var g=fu(this,b,d);(f=q.b.getElementById(g))||v.l.severe("no alignNode could be found for the id "+g);for(var h=a,g=!0;null!=h.ownerDocument&&h!=f&&1==g;){var l=e.getComputedStyle(h),n=l.overflowX;n||(n=l.overflow);"visible"!=n&&""!=n&&(g=!1);h=h.parentNode}h=
A.c.R().createElement("div");l=I.j(b.g(),au.$Ea);h.id=l;l=h.style;e.Js(h,this.$ja);l.display="none";g||(a.insertBefore(h,d),q.b.Ia(h),a.removeChild(d),f.appendChild(d),this.IW=f);this.ru=h;this.qna=g;gu(this,b,d)}else d.style.display="none";this.at()?cu(this,b,d):(b=fu(this,b,d),this.Kx=d=this.D(this.Fn),q.b.lY(b,d));this.eu=!0};au.prototype.af=function(a){this.bind(a);a=a.g();var b=I.j(a,au.Rga),b=q.b.getElementById(b),b=I.Cf(b.parentNode);a=au.Yeb(b,a);return null==a?b:a};
r.a("AdfDhtmlPanelDrawerPeer.prototype.getComponentParent",{af:au.prototype.af});au.Yeb=function(a,b){if(null!=a){var d=b.lastIndexOf(":");if(-1!=d&&(d=b.substring(0,d),!q.b.getElementById(d)&&(d=A.c.m(d))))for(var e=d.getParent();e;){if(e===a)return d;e=e.getParent()}}};
function gu(a,b,d){var e=q.b,f=fu(a,b,d),g=e.getElementById(f),h=bu(b),f=a.ru.style,l=e.jc(g),e=l.y+g.clientTop,l=l.x+g.clientLeft,n=d.offsetHeight,t=d.offsetWidth;a.yjb=t;f.height=n+"px";f.width=t+"px";f.display="";a.qna?(hu(b,d,g,e,l,h),a=d.style,f.marginLeft=a.marginLeft,f.marginRight=a.marginRight,f.marginTop=a.marginTop,f.marginBottom=a.marginBottom):(d.style.position="absolute",d.style.top="0",h?d.style.left="0":d.style.right="0",hu(b,d,g,e,l,h,a.ru,n,t))}
function hu(a,b,d,e,f,g,h,l,n){var t=b.style,y=!1,z=null;if(h){var z=q.b.jc(h),B=z.y-e;B>=l?(y=!0,h.style.height="0",h.style.width="0"):(h.style.height=l-B+"px",h.style.marginBottom=t.marginBottom)}l=q.b.jc(b);t.marginTop=q.Ma(t.marginTop)+e-d.scrollTop-l.y+"px";g?(t.marginLeft=q.Ma(t.marginLeft)+f-l.x+"px",h&&!y&&(b=z.x-f,b>=n?(h.style.width="0",h.style.height="0",h.style.marginBottom="0"):(h.style.width=n-b+"px",h.style.marginRight=t.marginRight))):(d=f+d.clientWidth,t.marginRight=q.Ma(t.marginRight)+
(l.x+b.offsetWidth)-d+"px",h&&!y&&(b=d-(z.x+b.offsetWidth),b>=n?(h.style.width="0",h.style.height="0",h.style.marginBottom="0"):(h.style.width=n-b+"px",h.style.marginLeft=t.marginLeft)));a=I.j(a.g(),"margins");A.c.Df(a,{Lqb:g,marginTop:t.marginTop,marginRight:t.marginRight,marginLeft:t.marginLeft})}au.prototype.Unb=function(){var a=this.f(),b=this.i();a&&b&&(this.O6(a),A.c.Ri(b))};function bu(a){a=a.getPosition();var b=A.c.Ka().La();return"left"==a||"start"==a&&!b||"end"==a&&b?!0:!1}
function cu(a,b,d){if(!a.Za(b,b.g())){var e=fu(a,b,d);!a.IW&&a.ru&&(d.parentNode.insertBefore(a.ru,d),q.b.Ia(a.ru));"always"!=b.K(AdfRichPanelDrawer.SHOW_HANDLES)?d.style.display="":(a.kjb=d.style.marginTop,a.hjb=d.style.marginBottom,a.ijb=d.style.marginLeft,a.jjb=d.style.marginRight,q.b.Js(d,""),d.style.marginTop="",d.style.marginBottom="",d.style.marginLeft="",d.style.marginRight="",a.qna||(d.style.position="",d.style.top="",bu(b)?d.style.left="":d.style.right=""));var f=d.style.position;d.style.position=
"absolute";a.ZQ().style.display="";var g=a.i(),h=b.getWidth(),l=b.getHeight(),n=a.mJ(),t=q.b,y=t.getElementById(e),z=g.offsetWidth,B=b.getMaximumWidth();B||(B="100%");var F=y.clientWidth,h=a.Dn(h,F),B=a.Dn(B,F);a.Cob=n;a.Eob=n.style.width;a.Dob=n.style.maxWidth;g=g.offsetHeight;(F=b.getMaximumHeight())||(F="100%");var K=y.clientHeight,l=a.Dn(l,K),F=a.Dn(F,K);a.Ugb=n;a.Vgb=n.style.height;a.Wgb=n.style.maxHeight;var K=t.zf(),P=t.Y(),K=K+t.Yu(P),y=t.Ld(y)+y.clientTop;l&&(y+l>K&&(l=K-y),t.Fh(n,l));F&&
(y+F>K&&(F=K-y),t.Qua(n,F));z-=n.offsetWidth;h&&t.uv(n,h-z);B&&t.Rua(n,B-z);h=null;l&&F?h=Math.min(l,F):F?h=F:l&&(h=l);h&&h<g&&(A.c.Ka().La()?(l=n.style.paddingLeft,a.uHa=""+l,n.style.paddingLeft=q.Ma(""+l)+20+"px"):(l=n.style.paddingRight,a.vHa=""+l,n.style.paddingRight=q.Ma(""+l)+20+"px"));d.style.position=f;e=a.Y4(b,e);C.w(d,au.BBa);C.w(d,au.aDa);A.c.Df(b.g(),"open");a.He(b,d,e,b.g())}}au.prototype.m8=function(){if(!this.l3){var a=this.at();if(a&&(a=this.$J(a,null))&&a.Aa())return!1}return!0};
r.a("AdfDhtmlPanelDrawerPeer.prototype.canHide",{m8:au.prototype.m8});k=au.prototype;
k.Y4=function(a,b){var d={};if(!this.AHa){var e={type:"layer"};e[hj.HD]=!0;e[hj.jca]="af|panelDrawer-tr-close-animation-duration";e[hj.hca]=3;e[hj.kca]="af|panelDrawer-tr-open-animation-duration";e.surrogateClientId=I.j(a.g(),au.$Ea);var f=!1,g=a.getPosition(),h=A.c.Ka().La();if("start"==g||"left"==g&&!h||"right"==g&&h)f=!0;e[AdfRichPopup.Ed]=f?AdfRichPopup.y_:AdfRichPopup.x_;e[AdfRichPopup.Jf]=b;0==eu(this)?e.autodismiss="autodismissNever":e.autodismiss="autodismissAlways";this.ALa||(this.ALa=this.D(this.wcb));
e.closeHandler=this.ALa;this.GNa||(this.GNa=this.D(this.xcb));e.openedHandler=this.GNa;e[hj.ica]=this.yjb;this.AHa=e}E.Rb(d,this.AHa);"open"!=A.c.Pe(a.g())?d.animate=AdfRichPopup.$aa:d.animate=AdfRichPopup.Av;return d};function eu(a){if(null==a.nHa){var b=page.H().qa("af|panelDrawer-tr-auto-dismiss"),d=a.f().K("autoDismiss");a.nHa="none"==d?!1:"focusLoss"==d?!0:"false"==b?!1:!0}return a.nHa}
function fu(a,b,d){if(!a.HA){var e=b.K("alignId"),f=b.m(e);if(f)e=f.g();else{if(":"==e.charAt(0)){var g=e.length;1<g&&(e=e.substring(1,g))}v.l.warning("Unable to find align component: ",e,". Make sure clientComponent is set to true on the align component. "," Without a component on the client the drawer should still work but may not line up as expected.")}q.b.getElementById(e)||(v.l.warning("Unable to find dom node with id: ",e,". Using parent as align component."),f=b.getParent(),e=f.g());f&&(b=
f.o())&&b.fl&&(b.bind(f),e=b.fl(d));a.HA=e}return a.HA}k.Fn=function(){var a=this.f();this.Za(a,a.g())?this.Jb(a,a.g()):"always"==a.K(AdfRichPanelDrawer.SHOW_HANDLES)&&gu(this,a,this.i())};k.xcb=function(){var a=this.f(),b=this.i();du(this,a);this.Zla&&A.c.sq();var d=this.at().g(),d=I.j(d,$t.zK),e=q.b,a=fu(this,a,b);this.Kx=b=this.D(this.Fn);e.lY(a,b);d=e.getElementById(d);J.va(d)};
k.wcb=function(){var a=A.c,b=a.R().activeElement;null!=this.vHa?this.mJ().style.paddingRight=this.vHa:null!=this.uHa&&(this.mJ().style.paddingLeft=this.uHa);var d=this.Cob;d.style.width=this.Eob;d.style.maxWidth=this.Dob;d=this.Ugb;d.style.height=this.Vgb;d.style.maxHeight=this.Wgb;var d=this.f(),e=this.i(),f=q.b;"always"!=d.K(AdfRichPanelDrawer.SHOW_HANDLES)?e.style.display="none":(q.b.Js(e,this.$ja),e.style.marginTop=this.kjb,e.style.marginBottom=this.hjb,e.style.marginLeft=this.ijb,e.style.marginRight=
this.jjb,this.qna||(e.style.position="absolute",e.style.top="0",bu(d)?e.style.left="0":e.style.right="0"));this.ZQ().style.display="none";e.style.width="";this.mJ().style.height="";C.O(e,au.BBa);C.O(e,au.aDa);var g=this.ru;this.IW?this.IW.appendChild(e):g?(g.parentNode.replaceChild(e,g),f.yc(g)):(g=I.j(d.g(),au.Rga),g=q.b.getElementById(g),g.parentNode.insertBefore(e,g));f.Ia(e);e=a.R().activeElement;b&&b!=e&&J.va(b);this.l3||(a.Df(d.g(),"closed"),a=this.at(),this.$J(a,null))};
k.Dn=function(a,b){return a?("%"==(""+a).charAt(a.length-1)&&(a=this.Bna(a,b)),q.Ma(""+a)):null};k.Bna=function(a,b){return b*Math.abs(parseInt(a.substring(0,a.length-1)))/100};k.O6=function(a){this.l3=!0;this.ak(a,!0);this.IW&&(a=this.ru.parentNode,a.insertBefore(this.i(),this.ru),a.removeChild(this.ru),q.b.yc(this.ru),this.IW=null)};k.Ze=function(a){var b=this.i();(b=fu(this,a,b))&&this.Kx&&q.b.O$(b,this.Kx);this.O6(a);au.h.Ze.call(this,a)};
r.a("AdfDhtmlPanelDrawerPeer.prototype.componentRemoved",{Ze:au.prototype.Ze});