var ej=I.ea(I,"AdfDhtmlPanelWindowBasePeer");m("AdfDhtmlPanelWindowBasePeer",ej);
ej.C=function(){I.ra(this,D.wb,D.Bc,D.gh,D.Ad,D.Oc);r.bb(AdfRichPanelWindow);I.sb(this,AdfRichPanelWindow.TITLE_ICON_SOURCE,AdfRichPanelWindow.TITLE,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);I.hc(this,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);I.ii(this,AdfRichPanelWindow.TITLE,AdfRichPanelWindow.CONTENT_HEIGHT,AdfRichPanelWindow.CONTENT_WIDTH);this.RBa="_hse";this.Qea="_hce";this.QBa="_hee";this.yAa="_cse";this.uAa="_cee";this.GBa="_fse";this.CBa=
"_fce";this.DBa="_fee";this.EBa="_ree";this.FBa="_rse";this.W4a=[this.RBa,this.Qea,this.QBa,this.yAa,this.uAa,this.GBa,this.CBa,this.DBa,this.EBa,this.FBa];this.JZa="contentContainer";this.gea="_ccntr";this.xAa="data-afr-csfm";this.SBa="tb";this.jea="data-afr-cri";this.V3a="af|panelWindow::resize-ghost";this.TDa="on";this.d6a="first";this.Fda="af|panelWindow-tr-open-animation-duration";this.Eda="af|panelWindow-tr-animate"};m("AdfDhtmlPanelWindowBasePeer.InitSubclass",ej.C);
ej.prototype.EC=function(a){this.UI();q.b.Ea(a.U())};r.a("AdfDhtmlPanelWindowBasePeer.prototype.handleEscapeKey",{EC:ej.prototype.EC});ej.prototype.ma=function(a){if(!a.Aa()){var b=q.b,d=a.U(),e=b.ca(d);d.keyCode==w.tf?(d.shiftKey?J.ni(e,this.i(),0,null,!0):J.be(e,this.i(),null,null,!0),b.Ea(d),a.wc()):d.keyCode==w.Ih&&(this.EC(a),a.wc())}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyDown",{ma:ej.prototype.ma});
ej.prototype.Yb=function(a){a.Aa()||(a.U(),a.na()==w.jb&&(this.NJ(a)?(a.cancel(),a.wc(),this.UI()):this.o0(a)&&this.A0()))};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyPress",{Yb:ej.prototype.Yb});ej.prototype.za=function(a){if(!a.Aa()){var b=a.U(),d=a.na();d==w.gd?this.NJ(a)&&(this.UI(),a.cancel(),a.wc()):b.ctrlKey&&b.altKey&&d==w.xK&&!this.f().getModal()&&(Qi.$().CY(),a.cancel(),a.wc())}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentKeyUp",{za:ej.prototype.za});
ej.prototype.Ta=function(a){a.ce()==Qa.Ef&&a instanceof ja&&fj(this,a,!1)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentFocus",{Ta:ej.prototype.Ta});function fj(a,b,d){if(!b.Aa()){var e=a.f(),f=a.i(),g=b.X();C.Nb(f,g)&&(a=a.lM(e))&&a.mZ(d)&&(b.cancel(),b.wc())}}
function gj(a,b){fj(a,b,!0);var d=a.f();if(d==b.getSource()&&d.K("resize")==ej.TDa&&!A.c.rl()){var e=b.U(),f=q.b,g=f.ca(e),h=g.id;if(h&&(h=h.split("::"),1<h.length&&(h=h[h.length-1],-1<E.indexOf(ej.W4a,h)&&(d=a.lM(d))&&!d.rs()&&C.Nb(d.gl(),g)))){f.preventDefault(e);var g=A.c,l=q.b,f=l.ca(e).style;u.J(h);a.Uja=h;h=d.EH();u.J(h);a.Gna=d;u.s(d,Pi);a.lqa();var h=I.la(h,ej.gea),n=a.$na=l.getElementById(h);u.u(n,"DIV");var t=n.style,y=q.Ma(t.width),z=q.Ma(t.height),h=q.Ma(t.minWidth),l=q.Ma(t.minHeight);
a.zla=y=0<y?y:n.offsetWidth;a.yla=z=0<z?z:n.offsetHeight;t.height=z+"px";t.width=y+"px";n=a.kh=n.ownerDocument.createElement("div");t=g.H().getStyleClass(a.yJ());C.w(n,t);var t=d.getWidth()-2,B=d.getHeight()-2,y=a.Zia=t-y,z=a.$ia=B-z;g.Gg().Tr(n,bj.iJ);g=n.style;g.cursor=f.cursor;g.top=d.vP()+"px";g.left=d.$O()+"px";g.width=t+"px";g.height=B+"px";g.minWidth=h+y+"px";g.minHeight=l+z+"px";d.faa(!0);d.paa(!1);A.c.Md(e,a.fna,a.gna,a.Sub,!0);b.cancel()}}}
ej.prototype.M=function(a){a.ec()&&(this.NJ(a)?this.UI():this.o0(a)&&this.A0())};r.a("AdfDhtmlPanelWindowBasePeer.prototype.HandleComponentClick",{M:ej.prototype.M});ej.prototype.NJ=function(a){a=a.X();var b=this.f(),b=I.j(b.g(),"close");return a.id==b?!0:a.parentNode.id==b};r.a("AdfDhtmlPanelWindowBasePeer.prototype.IsClose",{NJ:ej.prototype.NJ});ej.prototype.o0=function(a){a=a.X();var b=this.f(),b=I.j(b.g(),"pin");return a.id==b?!0:a.parentNode.id==b};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.IsPin",{o0:ej.prototype.o0});ej.prototype.jya=function(){var a=this.f().getParent();a instanceof AdfRichPopup?a.Tb():this.SH(a)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.Hide",{jya:ej.prototype.jya});ej.prototype.UI=function(){var a=this.f().getParent();a instanceof AdfRichPopup?a.cancel():this.ak(a)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.Cancel",{UI:ej.prototype.UI});
ej.prototype.A0=function(){var a=this.f().getParent();if(a instanceof AdfRichPopup&&a[I.Yo]){var b=a[I.Yo][a.g()].Ha();A.c.el().nqa(a,b)}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.Pin",{A0:ej.prototype.A0});ej.prototype.Init=function(a,b){ej.h.Init.call(this,a,b);this.fna=this.D(this.Oka);this.gna=this.D(this.Pka);this.D(this.ygb)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.Init",{Init:ej.prototype.Init});
ej.prototype.G=function(a){var b=a.getParent();null==b&&(b=a);var d={};d.modal=a.getModal();d.dragElement=this.e9();"none"!=a.getInitialFocus()||a.getModal()?d.focus=!0:d.focus=!1;d.autodismiss="autodismissInactivate";d.type="dialogWindow";d[AdfRichPopup.Ed]=AdfRichPopup.DQ;d.componentEventsEnabled=!0;xc.Cua(b,d)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.InitDomElement",{G:ej.prototype.G});ej.prototype.e9=function(){var a=I.j(this.f().g(),ej.SBa);return q.b.getElementById(a)};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.getDragElement",{e9:ej.prototype.e9});ej.prototype.SQ=function(a,b,d){b=q.b;a=I.j(a.g(),"_ttxt");a=b.getElementById(a);b.bc(a,d);return!0};r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentTitleChanged",{SQ:ej.prototype.SQ});
ej.prototype.Owa=function(a,b,d){b=q.b;a=I.j(a.g(),"_ticn");a=b.getElementById(a);var e=b.R().createElement("img");e.alt="";b.tv(e,d);d?(a.hasChildNodes()?a.replaceChild(e,a.firstChild):a.appendChild(e),C.setVisible(a,!0)):C.setVisible(a,!1)};r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentTitleIconSourceChanged",{Owa:ej.prototype.Owa});ej.prototype.twa=function(a,b,d){ej.a5(a).style.width=d+"px";b.setAttribute(ej.jea,"1");return!0};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentContentWidthChanged",{twa:ej.prototype.twa});ej.prototype.rwa=function(a,b,d){ej.a5(a).style.height=d+"px";b.setAttribute(ej.jea,"1");return!0};r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentContentHeightChanged",{rwa:ej.prototype.rwa});ej.prototype.uxa=function(a){a=ej.a5(a);var b=a.style;return b.width?q.Ma(b.width):a.offsetWidth};r.a("AdfDhtmlPanelWindowBasePeer.prototype.GetComponentContentWidth",{uxa:ej.prototype.uxa});
ej.prototype.txa=function(a){a=ej.a5(a);var b=a.style;return b.height?q.Ma(b.height):a.offsetHeight};r.a("AdfDhtmlPanelWindowBasePeer.prototype.GetComponentContentHeight",{txa:ej.prototype.txa});ej.a5=function(a){var b=a.g(),d=null,d=null;a.K("resize")==ej.TDa||a.K("stretchChildren")==ej.d6a?(d=I.la(b,ej.gea),d=q.b.getElementById(d),u.u(d,"DIV")):(d=I.la(b,ej.JZa),d=q.b.getElementById(d),u.u(d,"TD"));return d};
ej.prototype.lM=function(a){var b=null,d=(a=a.getParent())?a.o():null;if(d)if(d.bind(a),a instanceof AdfRichPopup)b=d.Wp(a,a.g());else{a=d.ky(a);for(var e in a)if(d=a[e],d instanceof Pi){b=d;break}}u.$j(b,Pi);return b};ej.prototype.tb=function(a,b){ej.h.tb.call(this,a,b);if(A.c.jta()){var d=this.lM(a);d&&d.R9()}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.BindToComponent",{tb:ej.prototype.tb});ej.prototype.ka=function(a){(a=this.lM(a))&&a.Osa()};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.ComponentRemoved",{ka:ej.prototype.ka});
ej.prototype.lqa=function(){var a=this.f().g(),b=q.b,d=I.la(a,ej.gea),d=b.getElementById(d);u.u(d,"DIV");if(!d.hasAttribute(ej.xAa)){var e=I.la(a,ej.Qea),f=b.getElementById(e);u.u(f,"TD");for(var e=Math.max(1,f.offsetWidth),g=I.la(a,ej.SBa),f=f.getElementsByTagName("TD"),h=a=0;h<f.length;h++){var l=f[h],n=null;l.id&&l.id==g&&(n=l.style.width,l.style.width="1px");for(var t=C.Dc(l),y=0;y<t.length;y++)var z=t[y],a=a+b.gP(z,z.offsetWidth);l.id&&l.id==g&&(l.style.width=n)}b=q.Ma(d.style.minWidth);b=Math.max(b,
a);d.style.minWidth=b+"px";b=q.Ma(d.style.minHeight);b=Math.max(b,Math.round(a/e*Math.max(1,d.offsetHeight)));d.style.minHeight=b+"px";d.setAttribute(ej.xAa,"1")}};r.a("AdfDhtmlPanelWindowBasePeer.prototype.calculateMinimumContentSize",{lqa:ej.prototype.lqa});ej.prototype.yJ=function(){return ej.V3a};r.a("AdfDhtmlPanelWindowBasePeer.prototype.GetResizeGhostSelector",{yJ:ej.prototype.yJ});
ej.prototype.Oka=function(a){var b=q.b,d=b.zf(),e=b.Oe(),f=b.getWindowWidth(),g=b.getWindowHeight(),h=this.Uja;u.J(h);var l=this.kh;u.u(l,"DIV");var l=l.style,n=q.Ma(l.width),t=q.Ma(l.height);a=b.Xb(a);if(!(a.x<e||a.x>f+e||a.y<d||a.y>g+d)){var d=q.Ma(l.minWidth),e=q.Ma(l.minHeight),f=q.Ma(l.top),g=q.Ma(l.left),b=f,y=g,z=n,B=t;switch(h){case ej.RBa:f=a.y;t+=b-a.y;g=a.x;n+=y-a.x;t<e&&(f=b,t=B);n<d&&(g=y,n=z);break;case ej.Qea:f=a.y;t+=b-a.y;t<e&&(f=b,t=B);break;case ej.QBa:f=a.y;t+=b-a.y;n=a.x-y;t<
e&&(f=b,t=B);n<d&&(n=z);break;case ej.yAa:g=a.x;n+=y-a.x;n<d&&(g=y,n=z);break;case ej.uAa:n=a.x-y;n<d&&(n=z);break;case ej.FBa:case ej.GBa:g=a.x;n+=y-a.x;t=a.y-b;n<d&&(g=y,n=z);t<e&&(t=B);break;case ej.CBa:t=a.y-b;t<e&&(t=B);break;case ej.EBa:case ej.DBa:t=a.y-b,n=a.x-y,t<e&&(t=B),n<d&&(n=z)}b!=f&&(l.top=f+"px");y!=g&&(l.left=g+"px");B!=t&&(l.height=t+"px");z!=n&&(l.width=n+"px")}};
ej.prototype.Pka=function(){var a=A.c,b=this.kh;u.u(b,"DIV");var d=b.style,e=this.Gna;u.s(e,Pi);var f=e.EH();u.J(f);var g=this.zla;u.Xf(g);var h=this.yla;u.Xf(h);var l=this.$na;u.u(l,"DIV");var n=this.Zia;u.Xf(n);var t=this.$ia;u.Xf(t);delete this.Uja;delete this.Gna;delete this.zla;delete this.yla;delete this.$na;delete this.Zia;delete this.$ia;delete this.kh;var y=q.Ma(d.top),z=q.Ma(d.left),n=q.Ma(d.width)-n,d=q.Ma(d.height)-t;(f=a.m(f))&&f.getContentWidth&&f.getContentHeight&&(f.o().bind(f),n!=
g&&f.setProperty(AdfRichPanelWindow.CONTENT_WIDTH,n,!0,!0),d!=h&&f.setProperty(AdfRichPanelWindow.CONTENT_HEIGHT,d,!0,!0));a.Gg().Si(b);e.Hp();a.jo(l,!1);e.faa(!1);e.paa(!0);e.setPosition(y,z)};ej.prototype.ygb=function(){var a=this.kh;u.u(a,"DIV");delete this.Uja;delete this.Gna;delete this.zla;delete this.yla;delete this.$na;delete this.Zia;delete this.$ia;delete this.kh;A.c.Gg().Si(a)};ej.prototype.ita=function(a){var b=a.o();b.bind(a);return(a=b.i().getAttribute(ej.jea))&&"1"==a};
r.a("AdfDhtmlPanelWindowBasePeer.prototype.isContentResized",{ita:ej.prototype.ita});ej.prototype.HO=function(){return ej.Fda};r.a("AdfDhtmlPanelWindowBasePeer.prototype.getAnimationDurationSkinProperty",{HO:ej.prototype.HO});ej.prototype.GO=function(){return ej.Eda};r.a("AdfDhtmlPanelWindowBasePeer.prototype.getAnimateSkinProperty",{GO:ej.prototype.GO});